summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--3rdparty/README.md2
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/LICENSE32
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/README.txt36
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/include/convolve.h111
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/include/decimate.h55
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/include/iqa.h134
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/include/iqa_os.h68
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/include/math_utils.h64
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/include/ssim.h117
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/source/convolve.c195
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/source/decimate.c59
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/source/math_utils.c82
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/source/ms_ssim.c277
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/source/mse.c50
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/source/psnr.c42
-rw-r--r--3rdparty/bgfx/3rdparty/iqa/source/ssim.c322
-rw-r--r--3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp154
-rw-r--r--3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h44
-rw-r--r--3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp19
-rw-r--r--3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp2
-rw-r--r--3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h4
-rw-r--r--3rdparty/bgfx/3rdparty/openvr/openvr_capi.h1416
-rw-r--r--3rdparty/bgfx/3rdparty/stb/stb_image.c962
-rw-r--r--3rdparty/bgfx/3rdparty/stb/stb_rect_pack.h55
-rw-r--r--3rdparty/bgfx/3rdparty/stb/stb_textedit.h84
-rw-r--r--3rdparty/bgfx/3rdparty/stb/stb_truetype.h159
-rw-r--r--3rdparty/bgfx/CONTRIBUTING.md (renamed from 3rdparty/bgfx/CONTRUBUTING.md)3
-rw-r--r--3rdparty/bgfx/README.md4
-rw-r--r--3rdparty/bgfx/examples/00-helloworld/helloworld.cpp191
-rw-r--r--3rdparty/bgfx/examples/01-cubes/cubes.cpp8
-rw-r--r--3rdparty/bgfx/examples/02-metaballs/metaballs.cpp8
-rw-r--r--3rdparty/bgfx/examples/03-raymarch/raymarch.cpp16
-rw-r--r--3rdparty/bgfx/examples/04-mesh/mesh.cpp8
-rw-r--r--3rdparty/bgfx/examples/05-instancing/instancing.cpp6
-rw-r--r--3rdparty/bgfx/examples/06-bump/bump.cpp8
-rw-r--r--3rdparty/bgfx/examples/09-hdr/hdr.cpp23
-rw-r--r--3rdparty/bgfx/examples/12-lod/lod.cpp6
-rw-r--r--3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp19
-rw-r--r--3rdparty/bgfx/examples/21-deferred/deferred.cpp10
-rw-r--r--3rdparty/bgfx/examples/21-deferred/fs_deferred_light.sc2
-rw-r--r--3rdparty/bgfx/examples/24-nbody/nbody.cpp6
-rw-r--r--3rdparty/bgfx/examples/26-occlusion/occlusion.cpp7
-rw-r--r--3rdparty/bgfx/examples/27-terrain/terrain.cpp7
-rw-r--r--3rdparty/bgfx/examples/29-debugdraw/debugdraw.cpp37
-rw-r--r--3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp143
-rw-r--r--3rdparty/bgfx/examples/common/debugdraw/debugdraw.h6
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_p.h2
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_winrt.cpp40
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/cs_indirect.binbin1676 -> 2048 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/cs_init_instances.binbin3834 -> 4206 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/cs_update_instances.binbin3142 -> 3514 bytes
-rw-r--r--3rdparty/bgfx/include/bgfx/bgfx.h8
-rw-r--r--3rdparty/bgfx/include/bgfx/c99/bgfx.h2
-rw-r--r--3rdparty/bgfx/scripts/bgfx.lua12
-rw-r--r--3rdparty/bgfx/scripts/genie.lua45
-rw-r--r--3rdparty/bgfx/scripts/texturec.lua3
-rw-r--r--3rdparty/bgfx/src/amalgamated.cpp4
-rw-r--r--3rdparty/bgfx/src/bgfx.cpp12
-rw-r--r--3rdparty/bgfx/src/bgfx_p.h2
-rw-r--r--3rdparty/bgfx/src/bgfx_shader.sh131
-rw-r--r--3rdparty/bgfx/src/debug_renderdoc.cpp (renamed from 3rdparty/bgfx/src/renderdoc.cpp)0
-rw-r--r--3rdparty/bgfx/src/debug_renderdoc.h (renamed from 3rdparty/bgfx/src/renderdoc.h)0
-rw-r--r--3rdparty/bgfx/src/glcontext_egl.h4
-rw-r--r--3rdparty/bgfx/src/glimports.h2
-rw-r--r--3rdparty/bgfx/src/hmd_openvr.cpp95
-rw-r--r--3rdparty/bgfx/src/hmd_openvr.h18
-rw-r--r--3rdparty/bgfx/src/hmd_ovr.cpp266
-rw-r--r--3rdparty/bgfx/src/hmd_ovr.h (renamed from 3rdparty/bgfx/src/ovr.h)117
-rw-r--r--3rdparty/bgfx/src/image.cpp22
-rw-r--r--3rdparty/bgfx/src/ovr.cpp328
-rw-r--r--3rdparty/bgfx/src/renderer_d3d11.cpp583
-rw-r--r--3rdparty/bgfx/src/renderer_d3d11.h28
-rw-r--r--3rdparty/bgfx/src/renderer_gl.cpp333
-rw-r--r--3rdparty/bgfx/src/renderer_gl.h55
-rw-r--r--3rdparty/bgfx/tools/texturec/texturec.cpp26
-rw-r--r--3rdparty/expat/CMake.README12
-rw-r--r--3rdparty/expat/CMakeLists.txt11
-rw-r--r--3rdparty/expat/Changes17
-rw-r--r--3rdparty/expat/MANIFEST2
-rw-r--r--3rdparty/expat/Makefile.in4
-rw-r--r--3rdparty/expat/README2
-rw-r--r--3rdparty/expat/aclocal.m48459
-rw-r--r--3rdparty/expat/bcb5/elements.bpr2
-rw-r--r--3rdparty/expat/bcb5/expat.bpr2
-rw-r--r--3rdparty/expat/bcb5/expat_static.bpr2
-rw-r--r--3rdparty/expat/bcb5/expatw.bpr2
-rw-r--r--3rdparty/expat/bcb5/expatw_static.bpr2
-rw-r--r--3rdparty/expat/bcb5/outline.bpr2
-rw-r--r--3rdparty/expat/bcb5/xmlwf.bpr2
-rwxr-xr-x[-rw-r--r--]3rdparty/expat/configure608
-rw-r--r--3rdparty/expat/configure.ac (renamed from 3rdparty/expat/configure.in)0
-rwxr-xr-x[-rw-r--r--]3rdparty/expat/conftools/PrintPath0
-rw-r--r--3rdparty/expat/conftools/ac_c_bigendian_cross.m42
-rwxr-xr-x[-rw-r--r--]3rdparty/expat/conftools/config.guess367
-rwxr-xr-x[-rw-r--r--]3rdparty/expat/conftools/config.sub173
-rwxr-xr-x[-rw-r--r--]3rdparty/expat/conftools/get-version.sh0
-rwxr-xr-x[-rw-r--r--]3rdparty/expat/conftools/install-sh35
-rw-r--r--3rdparty/expat/conftools/ltmain.sh95
-rwxr-xr-x[-rw-r--r--]3rdparty/expat/conftools/mkinstalldirs2
-rw-r--r--3rdparty/expat/doc/expat.pngbin1027 -> 1029 bytes
-rw-r--r--3rdparty/expat/doc/reference.html8
-rw-r--r--3rdparty/expat/doc/valid-xhtml10.pngbin2368 -> 2370 bytes
-rw-r--r--3rdparty/expat/doc/xmlwf.1209
-rw-r--r--3rdparty/expat/doc/xmlwf.sgml7
-rw-r--r--3rdparty/expat/examples/elements.c2
-rw-r--r--3rdparty/expat/expat_config.h.in2
-rw-r--r--3rdparty/expat/lib/amigaconfig.h3
-rw-r--r--3rdparty/expat/lib/expat.h2
-rw-r--r--3rdparty/expat/lib/intconfig.h19
-rw-r--r--3rdparty/expat/lib/libexpat.def3
-rw-r--r--3rdparty/expat/lib/libexpatw.def3
-rw-r--r--3rdparty/expat/lib/xmlparse.c33
-rw-r--r--3rdparty/expat/lib/xmlrole.c14
-rw-r--r--3rdparty/expat/lib/xmltok.c14
-rw-r--r--3rdparty/expat/m4/libtool.m4314
-rw-r--r--3rdparty/expat/m4/ltoptions.m419
-rw-r--r--3rdparty/expat/m4/ltversion.m410
-rw-r--r--3rdparty/expat/tests/benchmark/README.txt2
-rw-r--r--3rdparty/expat/tests/chardata.c4
-rwxr-xr-x[-rw-r--r--]3rdparty/expat/tests/xmltest.sh0
-rw-r--r--3rdparty/expat/win32/expat.iss10
-rw-r--r--3rdparty/expat/xmlwf/unixfilemap.c4
-rw-r--r--3rdparty/expat/xmlwf/xmlwf.c3
-rw-r--r--3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua4
-rw-r--r--3rdparty/genie/src/host/scripts.c16
-rw-r--r--3rdparty/libuv/AUTHORS13
-rw-r--r--3rdparty/libuv/CONTRIBUTING.md9
-rw-r--r--3rdparty/libuv/ChangeLog141
-rw-r--r--3rdparty/libuv/MAINTAINERS.md1
-rw-r--r--3rdparty/libuv/Makefile.am13
-rw-r--r--3rdparty/libuv/Makefile.mingw1
-rw-r--r--3rdparty/libuv/README.md8
-rw-r--r--3rdparty/libuv/appveyor.yml2
-rw-r--r--3rdparty/libuv/autogen.sh2
-rw-r--r--3rdparty/libuv/checksparse.sh2
-rw-r--r--3rdparty/libuv/configure.ac2
-rw-r--r--3rdparty/libuv/docs/src/loop.rst7
-rw-r--r--3rdparty/libuv/docs/src/misc.rst54
-rw-r--r--3rdparty/libuv/docs/src/poll.rst17
-rw-r--r--3rdparty/libuv/docs/src/stream.rst8
-rw-r--r--3rdparty/libuv/docs/src/tty.rst16
-rw-r--r--3rdparty/libuv/gyp_uv.py5
-rw-r--r--3rdparty/libuv/include/uv-version.h2
-rw-r--r--3rdparty/libuv/include/uv-win.h5
-rw-r--r--3rdparty/libuv/include/uv.h15
-rw-r--r--3rdparty/libuv/src/fs-poll.c5
-rw-r--r--3rdparty/libuv/src/unix/aix.c63
-rw-r--r--3rdparty/libuv/src/unix/core.c194
-rw-r--r--3rdparty/libuv/src/unix/fs.c17
-rw-r--r--3rdparty/libuv/src/unix/internal.h31
-rw-r--r--3rdparty/libuv/src/unix/kqueue.c21
-rw-r--r--3rdparty/libuv/src/unix/linux-core.c77
-rw-r--r--3rdparty/libuv/src/unix/linux-syscalls.h1
-rw-r--r--3rdparty/libuv/src/unix/pipe.c11
-rw-r--r--3rdparty/libuv/src/unix/poll.c16
-rw-r--r--3rdparty/libuv/src/unix/process.c6
-rw-r--r--3rdparty/libuv/src/unix/stream.c22
-rw-r--r--3rdparty/libuv/src/unix/sunos.c11
-rw-r--r--3rdparty/libuv/src/unix/thread.c33
-rw-r--r--3rdparty/libuv/src/unix/tty.c36
-rw-r--r--3rdparty/libuv/src/uv-common.c5
-rw-r--r--3rdparty/libuv/src/win/core.c130
-rw-r--r--3rdparty/libuv/src/win/dl.c7
-rw-r--r--3rdparty/libuv/src/win/fs-event.c108
-rw-r--r--3rdparty/libuv/src/win/fs.c25
-rw-r--r--3rdparty/libuv/src/win/getaddrinfo.c61
-rw-r--r--3rdparty/libuv/src/win/internal.h3
-rw-r--r--3rdparty/libuv/src/win/pipe.c23
-rw-r--r--3rdparty/libuv/src/win/poll.c15
-rw-r--r--3rdparty/libuv/src/win/timer.c9
-rw-r--r--3rdparty/libuv/src/win/tty.c9
-rw-r--r--3rdparty/libuv/src/win/util.c254
-rw-r--r--3rdparty/libuv/test/runner-unix.c2
-rw-r--r--3rdparty/libuv/test/task.h10
-rw-r--r--3rdparty/libuv/test/test-condvar.c100
-rw-r--r--3rdparty/libuv/test/test-eintr-handling.c94
-rw-r--r--3rdparty/libuv/test/test-fs-event.c28
-rw-r--r--3rdparty/libuv/test/test-fs-poll.c1
-rw-r--r--3rdparty/libuv/test/test-get-passwd.c80
-rw-r--r--3rdparty/libuv/test/test-homedir.c21
-rw-r--r--3rdparty/libuv/test/test-list.h29
-rw-r--r--3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c3
-rw-r--r--3rdparty/libuv/test/test-pipe-getsockname.c1
-rw-r--r--3rdparty/libuv/test/test-platform-output.c11
-rw-r--r--3rdparty/libuv/test/test-poll.c52
-rw-r--r--3rdparty/libuv/test/test-tcp-close-while-connecting.c2
-rw-r--r--3rdparty/libuv/test/test-thread.c21
-rw-r--r--3rdparty/libuv/test/test-timer.c27
-rw-r--r--3rdparty/libuv/test/test-tmpdir.c71
-rw-r--r--3rdparty/libuv/test/test-tty.c39
-rw-r--r--3rdparty/libuv/uv.gyp21
-rw-r--r--3rdparty/libuv/vcbuild.bat5
-rw-r--r--3rdparty/lzma/7zr.exebin335360 -> 0 bytes
-rw-r--r--3rdparty/lzma/Asm/x86/7zAsm.asm28
-rw-r--r--3rdparty/lzma/Asm/x86/XzCrc64Opt.asm205
-rw-r--r--3rdparty/lzma/C/7z.h205
-rw-r--r--3rdparty/lzma/C/7zAlloc.c16
-rw-r--r--3rdparty/lzma/C/7zAlloc.h10
-rw-r--r--3rdparty/lzma/C/7zArcIn.c1770
-rw-r--r--3rdparty/lzma/C/7zBuf.c6
-rw-r--r--3rdparty/lzma/C/7zBuf.h12
-rw-r--r--3rdparty/lzma/C/7zBuf2.c12
-rw-r--r--3rdparty/lzma/C/7zCrc.c72
-rw-r--r--3rdparty/lzma/C/7zCrc.h4
-rw-r--r--3rdparty/lzma/C/7zCrcOpt.c87
-rw-r--r--3rdparty/lzma/C/7zDec.c351
-rw-r--r--3rdparty/lzma/C/7zFile.c2
-rw-r--r--3rdparty/lzma/C/7zFile.h4
-rw-r--r--3rdparty/lzma/C/7zIn.c1402
-rw-r--r--3rdparty/lzma/C/7zStream.c6
-rw-r--r--3rdparty/lzma/C/7zTypes.h (renamed from 3rdparty/lzma/C/Types.h)22
-rw-r--r--3rdparty/lzma/C/7zVersion.h27
-rw-r--r--3rdparty/lzma/C/Aes.c295
-rw-r--r--3rdparty/lzma/C/Aes.h38
-rw-r--r--3rdparty/lzma/C/AesOpt.c184
-rw-r--r--3rdparty/lzma/C/Alloc.c19
-rw-r--r--3rdparty/lzma/C/Alloc.h17
-rw-r--r--3rdparty/lzma/C/Bcj2.c330
-rw-r--r--3rdparty/lzma/C/Bcj2.h158
-rw-r--r--3rdparty/lzma/C/Bcj2Enc.c312
-rw-r--r--3rdparty/lzma/C/Bra.c2
-rw-r--r--3rdparty/lzma/C/Bra.h12
-rw-r--r--3rdparty/lzma/C/Bra86.c99
-rw-r--r--3rdparty/lzma/C/BraIA64.c4
-rw-r--r--3rdparty/lzma/C/Compiler.h32
-rw-r--r--3rdparty/lzma/C/CpuArch.c75
-rw-r--r--3rdparty/lzma/C/CpuArch.h156
-rw-r--r--3rdparty/lzma/C/Delta.c2
-rw-r--r--3rdparty/lzma/C/Delta.h12
-rw-r--r--3rdparty/lzma/C/LzFind.c499
-rw-r--r--3rdparty/lzma/C/LzFind.h38
-rw-r--r--3rdparty/lzma/C/LzFindMt.c190
-rw-r--r--3rdparty/lzma/C/LzFindMt.h12
-rw-r--r--3rdparty/lzma/C/LzHash.h43
-rw-r--r--3rdparty/lzma/C/Lzma2Dec.c50
-rw-r--r--3rdparty/lzma/C/Lzma2Dec.h12
-rw-r--r--3rdparty/lzma/C/Lzma2Enc.c73
-rw-r--r--3rdparty/lzma/C/Lzma2Enc.h10
-rw-r--r--3rdparty/lzma/C/Lzma86.h4
-rw-r--r--3rdparty/lzma/C/Lzma86Dec.c8
-rw-r--r--3rdparty/lzma/C/Lzma86Enc.c10
-rw-r--r--3rdparty/lzma/C/LzmaDec.c250
-rw-r--r--3rdparty/lzma/C/LzmaDec.h17
-rw-r--r--3rdparty/lzma/C/LzmaEnc.c348
-rw-r--r--3rdparty/lzma/C/LzmaEnc.h6
-rw-r--r--3rdparty/lzma/C/LzmaLib.c16
-rw-r--r--3rdparty/lzma/C/LzmaLib.h12
-rw-r--r--3rdparty/lzma/C/MtCoder.c6
-rw-r--r--3rdparty/lzma/C/Ppmd.h3
-rw-r--r--3rdparty/lzma/C/Ppmd7.c8
-rw-r--r--3rdparty/lzma/C/Ppmd7Dec.c2
-rw-r--r--3rdparty/lzma/C/Ppmd7Enc.c6
-rw-r--r--3rdparty/lzma/C/Precomp.h10
-rw-r--r--3rdparty/lzma/C/RotateDefs.h12
-rw-r--r--3rdparty/lzma/C/Sha256.c170
-rw-r--r--3rdparty/lzma/C/Sha256.h4
-rw-r--r--3rdparty/lzma/C/Sort.c141
-rw-r--r--3rdparty/lzma/C/Sort.h18
-rw-r--r--3rdparty/lzma/C/Threads.c29
-rw-r--r--3rdparty/lzma/C/Threads.h26
-rw-r--r--3rdparty/lzma/C/Util/7z/7z.dsp45
-rw-r--r--3rdparty/lzma/C/Util/7z/7zMain.c315
-rw-r--r--3rdparty/lzma/C/Util/7z/Precomp.c4
-rw-r--r--3rdparty/lzma/C/Util/7z/Precomp.h10
-rw-r--r--3rdparty/lzma/C/Util/7z/makefile13
-rw-r--r--3rdparty/lzma/C/Util/7z/makefile.gcc19
-rw-r--r--3rdparty/lzma/C/Util/Lzma/LzmaUtil.c12
-rw-r--r--3rdparty/lzma/C/Util/Lzma/LzmaUtil.dsp4
-rw-r--r--3rdparty/lzma/C/Util/Lzma/makefile2
-rw-r--r--3rdparty/lzma/C/Util/LzmaLib/LzmaLib.dsp8
-rw-r--r--3rdparty/lzma/C/Util/LzmaLib/LzmaLibExports.c10
-rw-r--r--3rdparty/lzma/C/Util/SfxSetup/Precomp.c4
-rw-r--r--3rdparty/lzma/C/Util/SfxSetup/Precomp.h10
-rw-r--r--3rdparty/lzma/C/Util/SfxSetup/SfxSetup.c109
-rw-r--r--3rdparty/lzma/C/Util/SfxSetup/SfxSetup.dsp35
-rw-r--r--3rdparty/lzma/C/Util/SfxSetup/makefile6
-rw-r--r--3rdparty/lzma/C/Util/SfxSetup/makefile_con7
-rw-r--r--3rdparty/lzma/C/Xz.c12
-rw-r--r--3rdparty/lzma/C/Xz.h49
-rw-r--r--3rdparty/lzma/C/XzCrc64.c85
-rw-r--r--3rdparty/lzma/C/XzCrc64.h4
-rw-r--r--3rdparty/lzma/C/XzCrc64Opt.c69
-rw-r--r--3rdparty/lzma/C/XzDec.c102
-rw-r--r--3rdparty/lzma/C/XzEnc.c94
-rw-r--r--3rdparty/lzma/C/XzIn.c74
-rw-r--r--3rdparty/lzma/CPP/7zip/7zip.mak240
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h43
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zDecode.cpp569
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zDecode.h58
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zEncode.cpp622
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zEncode.h69
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zExtract.cpp484
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp135
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h41
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderOutStream.cpp149
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderOutStream.h58
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zHandler.cpp735
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zHandler.h57
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp561
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zHeader.cpp5
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zHeader.h57
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zIn.cpp1571
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zIn.h363
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zItem.h239
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zOut.cpp504
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zOut.h209
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zProperties.cpp108
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zRegister.cpp21
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp10
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zSpecStream.h10
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp2072
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/7zUpdate.h71
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/7z/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Archive.def8
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Archive2.def12
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/ArchiveExports.cpp80
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp1065
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2.h465
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2MT.cpp240
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2MT.h81
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/CrossThreadProgress.cpp15
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/CrossThreadProgress.h37
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp19
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.h7
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp60
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.h16
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp32
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp37
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h7
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/MultiStream.cpp49
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/MultiStream.h11
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h1
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/Common/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/DllExports2.cpp82
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/IArchive.h466
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/LzmaHandler.cpp382
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/SplitHandler.cpp345
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/XzHandler.cpp668
-rw-r--r--3rdparty/lzma/CPP/7zip/Archive/XzHandler.h65
-rw-r--r--3rdparty/lzma/CPP/7zip/Asm.mak2
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp285
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile111
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile49
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Format7zR/makefile52
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp633
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp16
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h2
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile38
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc49
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc3
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp715
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/7z.icobin0 -> 1078 bytes
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp869
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw29
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp459
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp3
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h8
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile127
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/resource.rc5
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp246
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h86
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp138
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h11
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp760
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw29
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp356
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp3
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h13
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/makefile109
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/resource.h6
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc16
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/setup.icobin0 -> 1078 bytes
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/7z.icobin0 -> 1078 bytes
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp953
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw29
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp235
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp3
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h14
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/makefile146
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.h1
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.rc50
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/CWrappers.cpp46
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/CWrappers.h33
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/CreateCoder.cpp428
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/CreateCoder.h152
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/FilePathAutoRename.cpp50
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/FilePathAutoRename.h2
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/FileStreams.cpp209
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/FileStreams.h50
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/FilterCoder.cpp433
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/FilterCoder.h184
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/InBuffer.cpp122
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/InBuffer.h99
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/InOutTempBuffer.cpp28
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/InOutTempBuffer.h8
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/LimitedStreams.cpp280
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/LimitedStreams.h142
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/LockedStream.cpp20
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/LockedStream.h36
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/MethodId.h2
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/MethodProps.cpp184
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/MethodProps.h26
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/OffsetStream.cpp12
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/OffsetStream.h7
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/OutBuffer.cpp57
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/OutBuffer.h35
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/ProgressUtils.cpp35
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/ProgressUtils.h7
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/PropId.cpp108
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/RegisterArc.h80
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/RegisterCodec.h85
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/StreamBinder.cpp52
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/StreamBinder.h32
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/StreamObjects.cpp110
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/StreamObjects.h50
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/StreamUtils.cpp8
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/StreamUtils.h12
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/UniqBlocks.cpp57
-rw-r--r--3rdparty/lzma/CPP/7zip/Common/UniqBlocks.h26
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/Bcj2Coder.cpp836
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/Bcj2Coder.h144
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/Bcj2Register.cpp10
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/BcjCoder.cpp12
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/BcjCoder.h19
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/BcjRegister.cpp15
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/BranchCoder.cpp19
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/BranchCoder.h44
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/BranchMisc.cpp43
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/BranchMisc.h28
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/BranchRegister.cpp36
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/ByteSwap.cpp62
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/CodecExports.cpp324
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/CopyCoder.cpp82
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/CopyCoder.h18
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/CopyRegister.cpp7
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/DeltaFilter.cpp58
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp169
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/Lzma2Decoder.h43
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp23
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/Lzma2Register.cpp13
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/LzmaDecoder.cpp32
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/LzmaDecoder.h9
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/LzmaEncoder.cpp32
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/LzmaEncoder.h2
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/LzmaRegister.cpp13
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/PpmdDecoder.cpp6
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/PpmdEncoder.cpp6
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/PpmdRegister.cpp14
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/RangeCoder.h205
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/RangeCoderBit.h114
-rw-r--r--3rdparty/lzma/CPP/7zip/Compress/StdAfx.h2
-rw-r--r--3rdparty/lzma/CPP/7zip/Crc.mak2
-rw-r--r--3rdparty/lzma/CPP/7zip/Crc64.mak8
-rw-r--r--3rdparty/lzma/CPP/7zip/Crypto/7zAes.cpp280
-rw-r--r--3rdparty/lzma/CPP/7zip/Crypto/7zAes.h116
-rw-r--r--3rdparty/lzma/CPP/7zip/Crypto/7zAesRegister.cpp12
-rw-r--r--3rdparty/lzma/CPP/7zip/Crypto/MyAes.cpp112
-rw-r--r--3rdparty/lzma/CPP/7zip/Crypto/MyAes.h55
-rw-r--r--3rdparty/lzma/CPP/7zip/Crypto/MyAesReg.cpp12
-rw-r--r--3rdparty/lzma/CPP/7zip/Crypto/RandGen.cpp124
-rw-r--r--3rdparty/lzma/CPP/7zip/Crypto/RandGen.h21
-rw-r--r--3rdparty/lzma/CPP/7zip/Crypto/StdAfx.h8
-rw-r--r--3rdparty/lzma/CPP/7zip/GuiCommon.rc81
-rw-r--r--3rdparty/lzma/CPP/7zip/Guid.txt62
-rw-r--r--3rdparty/lzma/CPP/7zip/ICoder.h215
-rw-r--r--3rdparty/lzma/CPP/7zip/IDecl.h19
-rw-r--r--3rdparty/lzma/CPP/7zip/IPassword.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/IProgress.h18
-rw-r--r--3rdparty/lzma/CPP/7zip/IStream.h95
-rw-r--r--3rdparty/lzma/CPP/7zip/MyVersion.h8
-rw-r--r--3rdparty/lzma/CPP/7zip/PropID.h69
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Client7z/Client7z.cpp245
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Client7z/Client7z.dsp21
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Client7z/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Client7z/makefile25
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Client7z/resource.rc3
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp1227
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h110
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp1478
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h259
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ArchiveName.cpp68
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ArchiveName.h11
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp72
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h55
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/Bench.cpp2236
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/Bench.h12
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/DefaultName.cpp16
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/DefaultName.h6
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/DirItem.h114
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp809
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/EnumDirItems.h20
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/Extract.cpp416
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/Extract.h54
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ExtractMode.h41
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp275
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h16
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/HashCalc.cpp351
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/HashCalc.h107
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h106
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp1008
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/LoadCodecs.h334
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/OpenArchive.cpp3448
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/OpenArchive.h415
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp582
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/PropIDUtils.h14
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/SetProperties.cpp25
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/SortUtils.cpp19
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/SortUtils.h8
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/StdAfx.h5
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/TempFiles.cpp8
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/TempFiles.h2
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/Update.cpp1272
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/Update.h163
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/UpdateAction.cpp10
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/UpdateAction.h23
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp664
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/UpdateCallback.h112
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/UpdatePair.cpp204
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/UpdatePair.h4
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp30
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/UpdateProduce.h26
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/WorkDir.cpp21
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/WorkDir.h8
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h26
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/BenchCon.cpp5
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/BenchCon.h2
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/Console.mak36
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp29
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/ConsoleClose.h19
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp766
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h155
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/HashCon.cpp367
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/HashCon.h48
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/List.cpp1425
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/List.h15
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/Main.cpp1174
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/MainAr.cpp113
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp83
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h55
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp205
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/PercentPrinter.h70
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp615
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h120
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp71
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/UserInputUtils.h6
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Console/makefile87
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp37
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Explorer/MyMessages.h16
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp1024
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h21
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h9
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp64
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialog.h28
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h4
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/DialogSize.h16
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp1035
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h328
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp28
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/FormatUtils.h14
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/LangUtils.h40
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h76
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp119
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h69
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc91
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h17
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp58
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h28
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc14
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h5
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp196
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h170
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc12
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp1319
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h313
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc40
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h48
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc80
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h3
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp23
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyName.h10
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h95
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp255
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h62
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/resource.h175
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/FileManager/resourceGui.h15
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/Extract.rc59
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp418
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.h113
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc98
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h24
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp272
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.h38
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractRes.h51
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/HashGUI.h16
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/resource2.h2
-rw-r--r--3rdparty/lzma/CPP/Build.mak39
-rw-r--r--3rdparty/lzma/CPP/Common/Buffer.h77
-rw-r--r--3rdparty/lzma/CPP/Common/C_FileIO.h4
-rw-r--r--3rdparty/lzma/CPP/Common/CommandLineParser.cpp270
-rw-r--r--3rdparty/lzma/CPP/Common/CommandLineParser.h49
-rw-r--r--3rdparty/lzma/CPP/Common/Common.h13
-rw-r--r--3rdparty/lzma/CPP/Common/CrcReg.cpp98
-rw-r--r--3rdparty/lzma/CPP/Common/Defs.h15
-rw-r--r--3rdparty/lzma/CPP/Common/DynamicBuffer.h76
-rw-r--r--3rdparty/lzma/CPP/Common/IntToString.cpp149
-rw-r--r--3rdparty/lzma/CPP/Common/IntToString.h23
-rw-r--r--3rdparty/lzma/CPP/Common/Lang.h23
-rw-r--r--3rdparty/lzma/CPP/Common/ListFileUtils.cpp117
-rw-r--r--3rdparty/lzma/CPP/Common/ListFileUtils.h5
-rw-r--r--3rdparty/lzma/CPP/Common/MyBuffer.h244
-rw-r--r--3rdparty/lzma/CPP/Common/MyCom.h93
-rw-r--r--3rdparty/lzma/CPP/Common/MyGuidDef.h2
-rw-r--r--3rdparty/lzma/CPP/Common/MyInitGuid.h23
-rw-r--r--3rdparty/lzma/CPP/Common/MyLinux.h42
-rw-r--r--3rdparty/lzma/CPP/Common/MyString.cpp1460
-rw-r--r--3rdparty/lzma/CPP/Common/MyString.h1075
-rw-r--r--3rdparty/lzma/CPP/Common/MyTypes.h35
-rw-r--r--3rdparty/lzma/CPP/Common/MyUnknown.h4
-rw-r--r--3rdparty/lzma/CPP/Common/MyVector.cpp84
-rw-r--r--3rdparty/lzma/CPP/Common/MyVector.h584
-rw-r--r--3rdparty/lzma/CPP/Common/MyWindows.cpp109
-rw-r--r--3rdparty/lzma/CPP/Common/MyWindows.h15
-rw-r--r--3rdparty/lzma/CPP/Common/NewHandler.cpp67
-rw-r--r--3rdparty/lzma/CPP/Common/NewHandler.h57
-rw-r--r--3rdparty/lzma/CPP/Common/Sha256Reg.cpp40
-rw-r--r--3rdparty/lzma/CPP/Common/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/Common/StdInStream.cpp25
-rw-r--r--3rdparty/lzma/CPP/Common/StdInStream.h21
-rw-r--r--3rdparty/lzma/CPP/Common/StdOutStream.cpp86
-rw-r--r--3rdparty/lzma/CPP/Common/StdOutStream.h61
-rw-r--r--3rdparty/lzma/CPP/Common/StringConvert.cpp330
-rw-r--r--3rdparty/lzma/CPP/Common/StringConvert.h10
-rw-r--r--3rdparty/lzma/CPP/Common/StringToInt.cpp157
-rw-r--r--3rdparty/lzma/CPP/Common/StringToInt.h19
-rw-r--r--3rdparty/lzma/CPP/Common/TextConfig.cpp124
-rw-r--r--3rdparty/lzma/CPP/Common/TextConfig.h19
-rw-r--r--3rdparty/lzma/CPP/Common/Types.h11
-rw-r--r--3rdparty/lzma/CPP/Common/UTFConvert.cpp293
-rw-r--r--3rdparty/lzma/CPP/Common/UTFConvert.h7
-rw-r--r--3rdparty/lzma/CPP/Common/Wildcard.cpp468
-rw-r--r--3rdparty/lzma/CPP/Common/Wildcard.h95
-rw-r--r--3rdparty/lzma/CPP/Common/XzCrc64Reg.cpp42
-rw-r--r--3rdparty/lzma/CPP/Windows/COM.h70
-rw-r--r--3rdparty/lzma/CPP/Windows/CommonDialog.cpp185
-rw-r--r--3rdparty/lzma/CPP/Windows/CommonDialog.h23
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/ComboBox.cpp66
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/ComboBox.h65
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/CommandBar.h52
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/Dialog.cpp250
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/Dialog.h167
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/Edit.h19
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/ImageList.cpp10
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/ImageList.h87
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/ListView.cpp155
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/ListView.h146
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/ProgressBar.h35
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/PropertyPage.cpp143
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/PropertyPage.h50
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/ReBar.h34
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/Static.h28
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/StatusBar.h42
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/StdAfx.h8
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/ToolBar.h43
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/Trackbar.h27
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/Window2.cpp200
-rw-r--r--3rdparty/lzma/CPP/Windows/Control/Window2.h51
-rw-r--r--3rdparty/lzma/CPP/Windows/DLL.cpp15
-rw-r--r--3rdparty/lzma/CPP/Windows/DLL.h16
-rw-r--r--3rdparty/lzma/CPP/Windows/Error.h15
-rw-r--r--3rdparty/lzma/CPP/Windows/ErrorMsg.cpp (renamed from 3rdparty/lzma/CPP/Windows/Error.cpp)30
-rw-r--r--3rdparty/lzma/CPP/Windows/ErrorMsg.h15
-rw-r--r--3rdparty/lzma/CPP/Windows/FileDir.cpp501
-rw-r--r--3rdparty/lzma/CPP/Windows/FileDir.h60
-rw-r--r--3rdparty/lzma/CPP/Windows/FileFind.cpp546
-rw-r--r--3rdparty/lzma/CPP/Windows/FileFind.h67
-rw-r--r--3rdparty/lzma/CPP/Windows/FileIO.cpp337
-rw-r--r--3rdparty/lzma/CPP/Windows/FileIO.h184
-rw-r--r--3rdparty/lzma/CPP/Windows/FileLink.cpp436
-rw-r--r--3rdparty/lzma/CPP/Windows/FileMapping.cpp2
-rw-r--r--3rdparty/lzma/CPP/Windows/FileMapping.h8
-rw-r--r--3rdparty/lzma/CPP/Windows/FileName.cpp810
-rw-r--r--3rdparty/lzma/CPP/Windows/FileName.h98
-rw-r--r--3rdparty/lzma/CPP/Windows/FileSystem.cpp131
-rw-r--r--3rdparty/lzma/CPP/Windows/FileSystem.h27
-rw-r--r--3rdparty/lzma/CPP/Windows/MemoryLock.cpp100
-rw-r--r--3rdparty/lzma/CPP/Windows/MemoryLock.h29
-rw-r--r--3rdparty/lzma/CPP/Windows/NtCheck.h2
-rw-r--r--3rdparty/lzma/CPP/Windows/PropVariant.cpp164
-rw-r--r--3rdparty/lzma/CPP/Windows/PropVariant.h104
-rw-r--r--3rdparty/lzma/CPP/Windows/PropVariantConv.cpp109
-rw-r--r--3rdparty/lzma/CPP/Windows/PropVariantConv.h30
-rw-r--r--3rdparty/lzma/CPP/Windows/PropVariantConversions.cpp105
-rw-r--r--3rdparty/lzma/CPP/Windows/PropVariantConversions.h14
-rw-r--r--3rdparty/lzma/CPP/Windows/Registry.cpp165
-rw-r--r--3rdparty/lzma/CPP/Windows/Registry.h39
-rw-r--r--3rdparty/lzma/CPP/Windows/ResourceString.cpp103
-rw-r--r--3rdparty/lzma/CPP/Windows/ResourceString.h16
-rw-r--r--3rdparty/lzma/CPP/Windows/SecurityUtils.cpp181
-rw-r--r--3rdparty/lzma/CPP/Windows/SecurityUtils.h167
-rw-r--r--3rdparty/lzma/CPP/Windows/Shell.cpp340
-rw-r--r--3rdparty/lzma/CPP/Windows/Shell.h94
-rw-r--r--3rdparty/lzma/CPP/Windows/StdAfx.h3
-rw-r--r--3rdparty/lzma/CPP/Windows/System.cpp74
-rw-r--r--3rdparty/lzma/CPP/Windows/System.h5
-rw-r--r--3rdparty/lzma/CPP/Windows/Time.h23
-rw-r--r--3rdparty/lzma/CPP/Windows/TimeUtils.cpp (renamed from 3rdparty/lzma/CPP/Windows/Time.cpp)50
-rw-r--r--3rdparty/lzma/CPP/Windows/TimeUtils.h24
-rw-r--r--3rdparty/lzma/CPP/Windows/Window.cpp179
-rw-r--r--3rdparty/lzma/CPP/Windows/Window.h284
-rw-r--r--3rdparty/lzma/DOC/7zC.txt (renamed from 3rdparty/lzma/7zC.txt)19
-rw-r--r--3rdparty/lzma/DOC/7zFormat.txt (renamed from 3rdparty/lzma/7zFormat.txt)84
-rw-r--r--3rdparty/lzma/DOC/Methods.txt158
-rw-r--r--3rdparty/lzma/DOC/installer.txt166
-rw-r--r--3rdparty/lzma/DOC/lzma-history.txt (renamed from 3rdparty/lzma/history.txt)56
-rw-r--r--3rdparty/lzma/DOC/lzma-sdk.txt357
-rw-r--r--3rdparty/lzma/DOC/lzma-specification.txt1176
-rw-r--r--3rdparty/lzma/DOC/lzma.txt328
-rw-r--r--3rdparty/lzma/Methods.txt152
-rw-r--r--3rdparty/lzma/lzma.exebin87552 -> 0 bytes
-rw-r--r--3rdparty/lzma/lzma.txt604
-rw-r--r--3rdparty/nanosvg/LICENSE.txt18
-rw-r--r--3rdparty/nanosvg/README.md100
-rw-r--r--3rdparty/nanosvg/example/23.svg730
-rw-r--r--3rdparty/nanosvg/example/drawing.svg97
-rw-r--r--3rdparty/nanosvg/example/example1.c258
-rw-r--r--3rdparty/nanosvg/example/example2.c69
-rw-r--r--3rdparty/nanosvg/example/nano.svg27
-rw-r--r--3rdparty/nanosvg/example/screenshot-1.pngbin0 -> 60837 bytes
-rw-r--r--3rdparty/nanosvg/example/screenshot-2.pngbin0 -> 158111 bytes
-rw-r--r--3rdparty/nanosvg/example/stb_image_write.h511
-rw-r--r--3rdparty/nanosvg/premake4.lua56
-rw-r--r--3rdparty/nanosvg/src/nanosvg.h2892
-rw-r--r--3rdparty/nanosvg/src/nanosvgrast.h1447
-rw-r--r--bgfx/shaders/dx11/chains/default/fs_blit.binbin0 -> 396 bytes
-rw-r--r--bgfx/shaders/dx11/chains/default/vs_blit.binbin0 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/fs_blit.binbin42904 -> 396 bytes
-rw-r--r--bgfx/shaders/dx11/fs_color.binbin45305 -> 749 bytes
-rw-r--r--bgfx/shaders/dx11/fs_deconverge.binbin45228 -> 672 bytes
-rw-r--r--bgfx/shaders/dx11/fs_defocus.binbin49982 -> 1330 bytes
-rw-r--r--bgfx/shaders/dx11/fs_distortion.binbin60534 -> 3690 bytes
-rw-r--r--bgfx/shaders/dx11/fs_gui.binbin42904 -> 396 bytes
-rw-r--r--bgfx/shaders/dx11/fs_ntsc_decode.binbin60554 -> 3710 bytes
-rw-r--r--bgfx/shaders/dx11/fs_ntsc_encode.binbin50379 -> 1727 bytes
-rw-r--r--bgfx/shaders/dx11/fs_phosphor.binbin45190 -> 634 bytes
-rw-r--r--bgfx/shaders/dx11/fs_post.binbin57682 -> 2886 bytes
-rw-r--r--bgfx/shaders/dx11/fs_prescale.binbin42904 -> 396 bytes
-rw-r--r--bgfx/shaders/dx11/fs_screen.binbin42904 -> 396 bytes
-rw-r--r--bgfx/shaders/dx11/vs_blit.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/vs_color.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/vs_deconverge.binbin45892 -> 1336 bytes
-rw-r--r--bgfx/shaders/dx11/vs_defocus.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/vs_distortion.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/vs_gui.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/vs_ntsc_decode.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/vs_ntsc_encode.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/vs_phosphor.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/vs_post.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/vs_prescale.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/vs_screen.binbin43083 -> 575 bytes
-rw-r--r--bgfx/shaders/dx9/chains/default/fs_blit.binbin0 -> 241 bytes
-rw-r--r--bgfx/shaders/dx9/chains/default/vs_blit.binbin0 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/fs_blit.binbin613 -> 241 bytes
-rw-r--r--bgfx/shaders/dx9/fs_color.binbin1474 -> 694 bytes
-rw-r--r--bgfx/shaders/dx9/fs_deconverge.binbin1101 -> 361 bytes
-rw-r--r--bgfx/shaders/dx9/fs_defocus.binbin1911 -> 879 bytes
-rw-r--r--bgfx/shaders/dx9/fs_distortion.binbin5499 -> 2735 bytes
-rw-r--r--bgfx/shaders/dx9/fs_gui.binbin613 -> 241 bytes
-rw-r--r--bgfx/shaders/dx9/fs_ntsc_decode.binbin8439 -> 4259 bytes
-rw-r--r--bgfx/shaders/dx9/fs_ntsc_encode.binbin3528 -> 1760 bytes
-rw-r--r--bgfx/shaders/dx9/fs_phosphor.binbin983 -> 483 bytes
-rw-r--r--bgfx/shaders/dx9/fs_post.binbin4835 -> 2587 bytes
-rw-r--r--bgfx/shaders/dx9/fs_prescale.binbin617 -> 241 bytes
-rw-r--r--bgfx/shaders/dx9/fs_screen.binbin613 -> 241 bytes
-rw-r--r--bgfx/shaders/dx9/vs_blit.binbin894 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/vs_color.binbin894 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/vs_deconverge.binbin1871 -> 1071 bytes
-rw-r--r--bgfx/shaders/dx9/vs_defocus.binbin898 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/vs_distortion.binbin898 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/vs_gui.binbin894 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/vs_ntsc_decode.binbin902 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/vs_ntsc_encode.binbin902 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/vs_phosphor.binbin898 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/vs_post.binbin894 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/vs_prescale.binbin898 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/vs_screen.binbin894 -> 330 bytes
-rw-r--r--bgfx/shaders/gles/chains/default/fs_blit.binbin0 -> 238 bytes
-rw-r--r--bgfx/shaders/gles/chains/default/vs_blit.binbin0 -> 419 bytes
-rw-r--r--bgfx/shaders/glsl/chains/default/fs_blit.binbin0 -> 181 bytes
-rw-r--r--bgfx/shaders/glsl/chains/default/vs_blit.binbin0 -> 377 bytes
-rw-r--r--bgfx/shaders/metal/chains/default/fs_blit.binbin0 -> 634 bytes
-rw-r--r--bgfx/shaders/metal/chains/default/vs_blit.binbin0 -> 757 bytes
-rw-r--r--docs/man/LICENSE (renamed from src/osd/sdl/man/LICENSE)0
-rw-r--r--docs/man/README.md (renamed from src/osd/sdl/man/README.md)0
-rw-r--r--docs/man/castool.1 (renamed from src/osd/sdl/man/castool.1)0
-rw-r--r--docs/man/chdman.1 (renamed from src/osd/sdl/man/chdman.1)0
-rw-r--r--docs/man/floptool.1 (renamed from src/osd/sdl/man/floptool.1)0
-rw-r--r--docs/man/imgtool.1 (renamed from src/osd/sdl/man/imgtool.1)0
-rw-r--r--docs/man/jedutil.1 (renamed from src/osd/sdl/man/jedutil.1)0
-rw-r--r--docs/man/ldplayer.1 (renamed from src/osd/sdl/man/ldplayer.1)0
-rw-r--r--docs/man/ldresample.1 (renamed from src/osd/sdl/man/ldresample.1)0
-rw-r--r--docs/man/ldverify.1 (renamed from src/osd/sdl/man/ldverify.1)0
-rw-r--r--docs/man/mame.6 (renamed from src/osd/sdl/man/mame.6)0
-rw-r--r--docs/man/mess.6 (renamed from src/osd/sdl/man/mess.6)0
-rw-r--r--docs/man/romcmp.1 (renamed from src/osd/sdl/man/romcmp.1)0
-rw-r--r--docs/man/testkeys.1 (renamed from src/osd/sdl/man/testkeys.1)0
-rw-r--r--hash/coco_flop.xml18
-rw-r--r--hash/sms.xml1
-rw-r--r--language/Afrikaans/strings.po907
-rw-r--r--language/Albanian/strings.po907
-rw-r--r--language/Arabic/strings.po907
-rw-r--r--language/Basque/strings.po907
-rw-r--r--language/Belarusian/strings.po907
-rw-r--r--language/Bosnian/strings.po907
-rw-r--r--language/Bulgarian/strings.po907
-rw-r--r--language/Burmese/strings.po907
-rw-r--r--language/Catalan/strings.po1445
-rw-r--r--language/Chinese_Simplified/strings.po978
-rw-r--r--language/Chinese_Traditional/strings.po978
-rw-r--r--language/Croatian/strings.po907
-rw-r--r--language/Czech/strings.po1862
-rw-r--r--language/Danish/strings.po907
-rw-r--r--language/Dutch/strings.po1033
-rw-r--r--language/English/strings.po907
-rw-r--r--language/Estonian/strings.po907
-rw-r--r--language/Finnish/strings.po907
-rw-r--r--language/French/strings.po907
-rw-r--r--language/French_Belgium/strings.po1024
-rw-r--r--language/French_Canada/strings.po907
-rw-r--r--language/Georgian/strings.po907
-rw-r--r--language/German/strings.po1035
-rw-r--r--language/Greek/strings.po1033
-rw-r--r--language/Hebrew/strings.po907
-rw-r--r--language/Hindi/strings.po907
-rw-r--r--language/Hungarian/strings.po907
-rw-r--r--language/Indonesian/strings.po907
-rw-r--r--language/Italian/strings.po1074
-rw-r--r--language/Japanese/strings.po1033
-rw-r--r--language/Korean/strings.po907
-rw-r--r--language/Latvian/strings.po907
-rw-r--r--language/Lithuanian/strings.po907
-rw-r--r--language/Macedonian/strings.po907
-rw-r--r--language/Norwegian/strings.po907
-rw-r--r--language/Persian/strings.po907
-rw-r--r--language/Polish/strings.po907
-rw-r--r--language/Portuguese/strings.po907
-rw-r--r--language/Portuguese_Brazil/strings.po1166
-rw-r--r--language/Romanian/strings.po907
-rw-r--r--language/Russian/strings.po970
-rw-r--r--language/Serbian/strings.po1031
-rw-r--r--language/Serbian_Cyrillic/strings.po1031
-rw-r--r--language/Slovak/strings.po907
-rw-r--r--language/Slovenian/strings.po907
-rw-r--r--language/Spanish/strings.po1033
-rw-r--r--language/Spanish_Mexico/strings.po907
-rw-r--r--language/Swedish/strings.po907
-rw-r--r--language/Thai/strings.po907
-rw-r--r--language/Turkish/strings.po907
-rw-r--r--language/Ukrainian/strings.po907
-rw-r--r--language/Vietnamese/strings.po907
-rw-r--r--makefile11
-rw-r--r--nl_examples/kidniki.c4
-rw-r--r--plugins/cheat/conv_cheat.lua11
-rw-r--r--plugins/cheat/init.lua469
-rw-r--r--plugins/cheat/plugin.json10
-rw-r--r--plugins/cheat/xml_conv.lua244
-rw-r--r--plugins/cheatfind/init.lua498
-rw-r--r--plugins/cheatfind/plugin.json10
-rw-r--r--plugins/dummy/init.lua11
-rw-r--r--plugins/timer/init.lua93
-rw-r--r--plugins/timer/plugin.json10
-rw-r--r--scripts/genie.lua17
-rw-r--r--scripts/resources/emscripten/emscripten_post.js (renamed from src/osd/sdl/emscripten_post.js)0
-rw-r--r--scripts/resources/windows/mame/mame.ico (renamed from src/mame/osd/windows/mame/mame.ico)bin372526 -> 372526 bytes
-rw-r--r--scripts/resources/windows/mame/mame.man (renamed from src/mame/osd/windows/mame/mame.man)0
-rw-r--r--scripts/resources/windows/mame/mame.rc (renamed from src/mame/osd/windows/mame/mame.rc)0
-rw-r--r--scripts/resources/windows/mess/mess.ico (renamed from src/mame/osd/windows/mess/mess.ico)bin372526 -> 372526 bytes
-rw-r--r--scripts/resources/windows/mess/mess.man (renamed from src/mame/osd/windows/mess/mess.man)0
-rw-r--r--scripts/resources/windows/mess/mess.rc (renamed from src/mame/osd/windows/mess/mess.rc)0
-rw-r--r--scripts/src/3rdparty.lua97
-rw-r--r--scripts/src/bus.lua21
-rw-r--r--scripts/src/cpu.lua6
-rw-r--r--scripts/src/emu.lua16
-rw-r--r--scripts/src/lib.lua1
-rw-r--r--scripts/src/main.lua9
-rw-r--r--scripts/src/osd/modules.lua28
-rw-r--r--scripts/src/osd/osdmini.lua4
-rw-r--r--scripts/src/osd/sdl.lua123
-rw-r--r--scripts/src/osd/windows.lua34
-rw-r--r--scripts/src/sound.lua10
-rw-r--r--scripts/src/tools.lua42
-rw-r--r--scripts/target/mame/arcade.lua15
-rw-r--r--scripts/target/mame/mess.lua2
-rw-r--r--scripts/target/mame/nl.lua16
-rw-r--r--src/devices/bus/a1bus/a1bus.cpp3
-rw-r--r--src/devices/bus/a2bus/a2bus.cpp1
-rw-r--r--src/devices/bus/a2bus/a2eauxslot.cpp1
-rw-r--r--src/devices/bus/a2bus/pc_xporter.cpp50
-rw-r--r--src/devices/bus/a2bus/pc_xporter.h1
-rw-r--r--src/devices/bus/bml3/bml3bus.cpp1
-rw-r--r--src/devices/bus/coco/cococart.cpp1
-rw-r--r--src/devices/bus/comx35/clm.cpp1
-rw-r--r--src/devices/bus/comx35/clm.h3
-rw-r--r--src/devices/bus/cpc/cpcexp.cpp1
-rw-r--r--src/devices/bus/gameboy/gb_slot.cpp28
-rw-r--r--src/devices/bus/generic/slot.cpp3
-rw-r--r--src/devices/bus/generic/slot.h16
-rw-r--r--src/devices/bus/intv/ecs.cpp424
-rw-r--r--src/devices/bus/intv/ecs.h20
-rw-r--r--src/devices/bus/intv_ctrl/ctrl.cpp95
-rw-r--r--src/devices/bus/intv_ctrl/ctrl.h76
-rw-r--r--src/devices/bus/intv_ctrl/ecs_ctrl.cpp448
-rw-r--r--src/devices/bus/intv_ctrl/ecs_ctrl.h171
-rw-r--r--src/devices/bus/intv_ctrl/handctrl.cpp179
-rw-r--r--src/devices/bus/intv_ctrl/handctrl.h55
-rw-r--r--src/devices/bus/iq151/iq151.cpp1
-rw-r--r--src/devices/bus/iq151/video32.cpp24
-rw-r--r--src/devices/bus/iq151/video32.h4
-rw-r--r--src/devices/bus/iq151/video64.cpp24
-rw-r--r--src/devices/bus/iq151/video64.h4
-rw-r--r--src/devices/bus/isa/isa.cpp5
-rw-r--r--src/devices/bus/kc/kc.cpp1
-rw-r--r--src/devices/bus/kc/rom.cpp2
-rw-r--r--src/devices/bus/macpds/macpds.cpp3
-rw-r--r--src/devices/bus/msx_slot/bunsetsu.cpp28
-rw-r--r--src/devices/bus/msx_slot/bunsetsu.h10
-rw-r--r--src/devices/bus/msx_slot/disk.h12
-rw-r--r--src/devices/bus/msx_slot/fs4600.cpp14
-rw-r--r--src/devices/bus/msx_slot/fs4600.h4
-rw-r--r--src/devices/bus/msx_slot/music.h2
-rw-r--r--src/devices/bus/msx_slot/panasonic08.cpp14
-rw-r--r--src/devices/bus/msx_slot/panasonic08.h4
-rw-r--r--src/devices/bus/msx_slot/rom.cpp16
-rw-r--r--src/devices/bus/msx_slot/rom.h4
-rw-r--r--src/devices/bus/msx_slot/sony08.cpp14
-rw-r--r--src/devices/bus/msx_slot/sony08.h4
-rw-r--r--src/devices/bus/nubus/nubus.cpp3
-rw-r--r--src/devices/bus/pc_kbd/pc_kbdc.cpp1
-rw-r--r--src/devices/bus/sms_ctrl/lphaser.cpp11
-rw-r--r--src/devices/bus/sms_ctrl/lphaser.h2
-rw-r--r--src/devices/bus/sms_ctrl/paddle.cpp8
-rw-r--r--src/devices/bus/sms_ctrl/paddle.h4
-rw-r--r--src/devices/bus/sms_ctrl/sports.cpp20
-rw-r--r--src/devices/bus/sms_ctrl/sports.h8
-rw-r--r--src/devices/bus/sms_ctrl/sportsjp.cpp88
-rw-r--r--src/devices/bus/sms_ctrl/sportsjp.h9
-rw-r--r--src/devices/bus/snes_ctrl/joypad.h2
-rw-r--r--src/devices/bus/snes_ctrl/mouse.h2
-rw-r--r--src/devices/bus/snes_ctrl/multitap.h2
-rw-r--r--src/devices/bus/snes_ctrl/pachinko.h2
-rw-r--r--src/devices/bus/snes_ctrl/sscope.h2
-rw-r--r--src/devices/bus/snes_ctrl/twintap.h2
-rw-r--r--src/devices/bus/ti99_peb/pcode.cpp208
-rw-r--r--src/devices/bus/ti99_peb/pcode.h21
-rw-r--r--src/devices/bus/ti99_peb/peribox.cpp2
-rw-r--r--src/devices/bus/ti99_peb/spchsyn.cpp105
-rw-r--r--src/devices/bus/ti99_peb/spchsyn.h6
-rw-r--r--src/devices/bus/ti99x/998board.cpp2318
-rw-r--r--src/devices/bus/ti99x/998board.h606
-rw-r--r--src/devices/bus/ti99x/datamux.cpp404
-rw-r--r--src/devices/bus/ti99x/datamux.h100
-rw-r--r--src/devices/bus/ti99x/genboard.cpp70
-rw-r--r--src/devices/bus/ti99x/genboard.h8
-rw-r--r--src/devices/bus/ti99x/grom.cpp269
-rw-r--r--src/devices/bus/ti99x/grom.h108
-rw-r--r--src/devices/bus/ti99x/gromport.cpp465
-rw-r--r--src/devices/bus/ti99x/gromport.h83
-rw-r--r--src/devices/bus/ti99x/ti99defs.h48
-rw-r--r--src/devices/bus/ti99x/videowrp.cpp160
-rw-r--r--src/devices/bus/ti99x/videowrp.h102
-rw-r--r--src/devices/bus/tvc/tvc.cpp1
-rw-r--r--src/devices/bus/vtech/memexp/carts.cpp1
-rw-r--r--src/devices/bus/vtech/memexp/carts.h1
-rw-r--r--src/devices/bus/vtech/memexp/rs232.cpp4
-rw-r--r--src/devices/bus/vtech/memexp/rs232.h2
-rw-r--r--src/devices/bus/vtech/memexp/rtty.cpp88
-rw-r--r--src/devices/bus/vtech/memexp/rtty.h45
-rw-r--r--src/devices/bus/x68k/x68kexp.cpp1
-rw-r--r--src/devices/bus/z88/z88.cpp1
-rw-r--r--src/devices/cpu/avr8/avr8.cpp5
-rw-r--r--src/devices/cpu/avr8/avr8.h7
-rw-r--r--src/devices/cpu/drcbec.cpp16
-rw-r--r--src/devices/cpu/drcbex64.cpp133
-rw-r--r--src/devices/cpu/drcbex64.h2
-rw-r--r--src/devices/cpu/drcbex86.cpp104
-rw-r--r--src/devices/cpu/drcbex86.h2
-rw-r--r--src/devices/cpu/drcuml.cpp1
-rw-r--r--src/devices/cpu/drcumlsh.h4
-rw-r--r--src/devices/cpu/hmcs40/hmcs40.cpp10
-rw-r--r--src/devices/cpu/hmcs40/hmcs40d.cpp4
-rw-r--r--src/devices/cpu/hmcs40/hmcs40op.cpp4
-rw-r--r--src/devices/cpu/hphybrid/hphybrid.cpp2
-rw-r--r--src/devices/cpu/m6809/m6809.cpp4
-rw-r--r--src/devices/cpu/mips/mips3.cpp157
-rw-r--r--src/devices/cpu/mips/mips3drc.cpp4
-rw-r--r--src/devices/cpu/powerpc/ppcdrc.cpp56
-rw-r--r--src/devices/cpu/rsp/rsp.cpp2
-rw-r--r--src/devices/cpu/rsp/rspdrc.cpp4
-rw-r--r--src/devices/cpu/sh2/sh2.cpp4
-rw-r--r--src/devices/cpu/sh2/sh2drc.cpp5
-rw-r--r--src/devices/cpu/sh4/sh4.cpp101
-rw-r--r--src/devices/cpu/sm510/kb1013vk1-2.h41
-rw-r--r--src/devices/cpu/sm510/kb1013vk1-2core.cpp135
-rw-r--r--src/devices/cpu/sm510/kb1013vk1-2op.cpp21
-rw-r--r--src/devices/cpu/sm510/sm500.h82
-rw-r--r--src/devices/cpu/sm510/sm500core.cpp153
-rw-r--r--src/devices/cpu/sm510/sm500op.cpp95
-rw-r--r--src/devices/cpu/sm510/sm510.cpp48
-rw-r--r--src/devices/cpu/sm510/sm510.h133
-rw-r--r--src/devices/cpu/sm510/sm510core.cpp3
-rw-r--r--src/devices/cpu/sm510/sm510d.cpp157
-rw-r--r--src/devices/cpu/sm510/sm510op.cpp19
-rw-r--r--src/devices/cpu/sm510/sm511core.cpp3
-rw-r--r--src/devices/cpu/uml.cpp19
-rw-r--r--src/devices/cpu/uml.h6
-rw-r--r--src/devices/cpu/x86emit.h7
-rw-r--r--src/devices/machine/at28c16.cpp33
-rw-r--r--src/devices/machine/at28c16.h1
-rw-r--r--src/devices/machine/at45dbxx.cpp7
-rw-r--r--src/devices/machine/ds1204.cpp3
-rw-r--r--src/devices/machine/ds1204.h2
-rw-r--r--src/devices/machine/ds2401.cpp9
-rw-r--r--src/devices/machine/eeprom.cpp27
-rw-r--r--src/devices/machine/eeprom.h2
-rw-r--r--src/devices/machine/er2055.cpp15
-rw-r--r--src/devices/machine/er2055.h2
-rw-r--r--src/devices/machine/gt64xxx.cpp3
-rw-r--r--src/devices/machine/gt64xxx.h2
-rw-r--r--src/devices/machine/hp_taco.cpp1551
-rw-r--r--src/devices/machine/hp_taco.h201
-rw-r--r--src/devices/machine/i2cmem.cpp17
-rw-r--r--src/devices/machine/i2cmem.h2
-rw-r--r--src/devices/machine/i6300esb.cpp3
-rw-r--r--src/devices/machine/i6300esb.h1
-rw-r--r--src/devices/machine/intelfsh.cpp59
-rw-r--r--src/devices/machine/intelfsh.h10
-rw-r--r--src/devices/machine/k033906.cpp5
-rw-r--r--src/devices/machine/k033906.h7
-rw-r--r--src/devices/machine/k053252.cpp13
-rw-r--r--src/devices/machine/k053252.h5
-rw-r--r--src/devices/machine/mc146818.cpp9
-rw-r--r--src/devices/machine/mc146818.h2
-rw-r--r--src/devices/machine/mos6530n.cpp1
-rw-r--r--src/devices/machine/mos6530n.h3
-rw-r--r--src/devices/machine/netlist.cpp11
-rw-r--r--src/devices/machine/netlist.h4
-rw-r--r--src/devices/machine/nvram.cpp5
-rw-r--r--src/devices/machine/nvram.h1
-rw-r--r--src/devices/machine/pci.cpp3
-rw-r--r--src/devices/machine/pci.h2
-rw-r--r--src/devices/machine/pla.cpp6
-rw-r--r--src/devices/machine/pla.h2
-rw-r--r--src/devices/machine/rp5h01.cpp15
-rw-r--r--src/devices/machine/rp5h01.h5
-rw-r--r--src/devices/machine/rtc9701.cpp21
-rw-r--r--src/devices/machine/serflash.cpp34
-rw-r--r--src/devices/machine/serflash.h4
-rw-r--r--src/devices/machine/tc009xlvc.cpp23
-rw-r--r--src/devices/machine/tc009xlvc.h5
-rw-r--r--src/devices/machine/timekpr.cpp27
-rw-r--r--src/devices/machine/timekpr.h2
-rw-r--r--src/devices/machine/vrc4373.cpp4
-rw-r--r--src/devices/machine/vrc4373.h1
-rw-r--r--src/devices/machine/x2212.cpp60
-rw-r--r--src/devices/machine/x2212.h11
-rw-r--r--src/devices/machine/x76f041.cpp3
-rw-r--r--src/devices/machine/x76f041.h2
-rw-r--r--src/devices/machine/x76f100.cpp3
-rw-r--r--src/devices/machine/x76f100.h2
-rw-r--r--src/devices/sound/2608intf.cpp7
-rw-r--r--src/devices/sound/2608intf.h1
-rw-r--r--src/devices/sound/2610intf.cpp6
-rw-r--r--src/devices/sound/2610intf.h1
-rw-r--r--src/devices/sound/8950intf.cpp5
-rw-r--r--src/devices/sound/8950intf.h1
-rw-r--r--src/devices/sound/digitalk.cpp3
-rw-r--r--src/devices/sound/digitalk.h2
-rw-r--r--src/devices/sound/gaelco.cpp8
-rw-r--r--src/devices/sound/gaelco.h8
-rw-r--r--src/devices/sound/iremga20.cpp9
-rw-r--r--src/devices/sound/iremga20.h3
-rw-r--r--src/devices/sound/k005289.cpp8
-rw-r--r--src/devices/sound/k005289.h2
-rw-r--r--src/devices/sound/k007232.cpp2
-rw-r--r--src/devices/sound/k053260.cpp16
-rw-r--r--src/devices/sound/k053260.h9
-rw-r--r--src/devices/sound/k054539.cpp38
-rw-r--r--src/devices/sound/k054539.h8
-rw-r--r--src/devices/sound/l7a1045_l6028_dsp_a.cpp14
-rw-r--r--src/devices/sound/l7a1045_l6028_dsp_a.h3
-rw-r--r--src/devices/sound/nile.cpp5
-rw-r--r--src/devices/sound/nile.h2
-rw-r--r--src/devices/sound/okim6295.cpp1
-rw-r--r--src/devices/sound/okim6295.h1
-rw-r--r--src/devices/sound/tc8830f.cpp18
-rw-r--r--src/devices/sound/tc8830f.h3
-rw-r--r--src/devices/sound/tms5110.cpp10
-rw-r--r--src/devices/sound/tms5110.h9
-rw-r--r--src/devices/sound/tms5220.cpp214
-rw-r--r--src/devices/sound/tms5220.h8
-rw-r--r--src/devices/sound/vlm5030.cpp6
-rw-r--r--src/devices/sound/vlm5030.h1
-rw-r--r--src/devices/sound/ymf278b.cpp2
-rw-r--r--src/devices/sound/ymz280b.cpp7
-rw-r--r--src/devices/sound/ymz770.cpp25
-rw-r--r--src/devices/sound/ymz770.h3
-rw-r--r--src/devices/video/bufsprite.h2
-rw-r--r--src/devices/video/ef9345.cpp8
-rw-r--r--src/devices/video/ef9345.h2
-rw-r--r--src/devices/video/ef9364.cpp4
-rw-r--r--src/devices/video/ef9364.h2
-rw-r--r--src/devices/video/ef9365.cpp4
-rw-r--r--src/devices/video/ef9365.h2
-rw-r--r--src/devices/video/epic12.cpp14
-rw-r--r--src/devices/video/hd44352.cpp5
-rw-r--r--src/devices/video/hd44352.h1
-rw-r--r--src/devices/video/hd44780.cpp12
-rw-r--r--src/devices/video/hd44780.h2
-rw-r--r--src/devices/video/msm6222b.cpp19
-rw-r--r--src/devices/video/msm6222b.h3
-rw-r--r--src/devices/video/tms9927.cpp13
-rw-r--r--src/devices/video/tms9927.h7
-rw-r--r--src/emu/addrmap.h11
-rw-r--r--src/emu/audit.cpp1
-rw-r--r--src/emu/clifront.cpp3
-rw-r--r--src/emu/debug/debugcmd.h1
-rw-r--r--src/emu/debug/debugcon.h1
-rw-r--r--src/emu/devcpu.cpp25
-rw-r--r--src/emu/devcpu.h14
-rw-r--r--src/emu/devfind.cpp55
-rw-r--r--src/emu/devfind.h37
-rw-r--r--src/emu/device.cpp23
-rw-r--r--src/emu/device.h13
-rw-r--r--src/emu/diimage.cpp11
-rw-r--r--src/emu/diimage.h20
-rw-r--r--src/emu/dimemory.h3
-rw-r--r--src/emu/diserial.cpp4
-rw-r--r--src/emu/drivers/empty.cpp1
-rw-r--r--src/emu/emu.h6
-rw-r--r--src/emu/emumem.cpp (renamed from src/emu/memory.cpp)3
-rw-r--r--src/emu/emumem.h (renamed from src/emu/memory.h)8
-rw-r--r--src/emu/emuopts.cpp61
-rw-r--r--src/emu/emuopts.h8
-rw-r--r--src/emu/image.cpp4
-rw-r--r--src/emu/info.cpp831
-rw-r--r--src/emu/inpttype.h2
-rw-r--r--src/emu/ioport.cpp72
-rw-r--r--src/emu/language.cpp1
-rw-r--r--src/emu/layout/svg.lay8
-rw-r--r--src/emu/luaengine.cpp663
-rw-r--r--src/emu/luaengine.h46
-rw-r--r--src/emu/machine.cpp18
-rw-r--r--src/emu/machine.h53
-rw-r--r--src/emu/machine.ipp77
-rw-r--r--src/emu/mconfig.cpp1
-rw-r--r--src/emu/mconfig.h7
-rw-r--r--src/emu/render.cpp31
-rw-r--r--src/emu/render.h6
-rw-r--r--src/emu/rendlay.cpp2
-rw-r--r--src/emu/rendlay.h3
-rw-r--r--src/emu/screen.cpp149
-rw-r--r--src/emu/screen.h14
-rw-r--r--src/emu/ui/ctrlmenu.cpp149
-rw-r--r--src/emu/ui/ctrlmenu.h41
-rw-r--r--src/emu/ui/dsplmenu.cpp224
-rw-r--r--src/emu/ui/dsplmenu.h44
-rw-r--r--src/emu/ui/filemngr.cpp3
-rw-r--r--src/emu/ui/imgcntrl.cpp1
-rw-r--r--src/emu/ui/mainmenu.cpp63
-rw-r--r--src/emu/ui/mainmenu.h1
-rw-r--r--src/emu/ui/menu.cpp85
-rw-r--r--src/emu/ui/menu.h27
-rw-r--r--src/emu/ui/miscmenu.cpp121
-rw-r--r--src/emu/ui/optsmenu.cpp20
-rw-r--r--src/emu/ui/optsmenu.h3
-rw-r--r--src/emu/ui/pluginopt.cpp112
-rw-r--r--src/emu/ui/pluginopt.h38
-rw-r--r--src/emu/ui/selgame.cpp37
-rw-r--r--src/emu/ui/selgame.h3
-rw-r--r--src/emu/ui/selsoft.cpp14
-rw-r--r--src/emu/ui/simpleselgame.cpp3
-rw-r--r--src/emu/ui/sliders.cpp62
-rw-r--r--src/emu/ui/sliders.h4
-rw-r--r--src/emu/ui/slotopt.cpp2
-rw-r--r--src/emu/ui/submenu.cpp361
-rw-r--r--src/emu/ui/submenu.h158
-rw-r--r--src/emu/ui/ui.cpp254
-rw-r--r--src/emu/ui/ui.h16
-rw-r--r--src/emu/ui/utils.cpp9
-rw-r--r--src/emu/ui/utils.h1
-rw-r--r--src/lib/netlist/build/makefile9
-rw-r--r--src/lib/netlist/devices/nld_system.h6
-rw-r--r--src/lib/netlist/macro/nlm_ttl74xx.cpp4
-rw-r--r--src/lib/netlist/macro/nlm_ttl74xx.h4
-rw-r--r--src/lib/netlist/nl_base.cpp52
-rw-r--r--src/lib/netlist/nl_base.h36
-rw-r--r--src/lib/netlist/nl_setup.cpp5
-rw-r--r--src/lib/netlist/nl_util.h41
-rw-r--r--src/lib/netlist/plib/plists.h2
-rw-r--r--src/lib/netlist/plib/pstate.h45
-rw-r--r--src/lib/netlist/prg/nltool.cpp9
-rw-r--r--src/lib/netlist/solver/mat_cr.h14
-rw-r--r--src/lib/netlist/solver/nld_matrix_solver.h106
-rw-r--r--src/lib/netlist/solver/nld_ms_direct.h382
-rw-r--r--src/lib/netlist/solver/nld_ms_direct1.h4
-rw-r--r--src/lib/netlist/solver/nld_ms_direct2.h4
-rw-r--r--src/lib/netlist/solver/nld_ms_direct_lu.h12
-rw-r--r--src/lib/netlist/solver/nld_ms_sm.h215
-rw-r--r--src/lib/netlist/solver/nld_ms_sor_mat.h4
-rw-r--r--src/lib/netlist/solver/nld_ms_w.h217
-rw-r--r--src/lib/netlist/solver/nld_solver.cpp77
-rw-r--r--src/lib/util/chdcodec.cpp29
-rw-r--r--src/lib/util/chdcodec.h1
-rw-r--r--src/lib/util/delegate.h2
-rw-r--r--src/lib/util/nanosvg.cpp6
-rw-r--r--src/lib/util/options.cpp18
-rw-r--r--src/lib/util/options.h5
-rw-r--r--src/lib/util/plaparse.h2
-rw-r--r--src/lib/util/un7z.cpp152
-rw-r--r--src/lib/util/unzip.cpp1103
-rw-r--r--src/lib/util/vbiparse.h1
-rw-r--r--src/lib/util/zippath.cpp98
-rw-r--r--src/mame/arcade.flt3
-rw-r--r--src/mame/audio/atarijsa.cpp25
-rw-r--r--src/mame/audio/atarijsa.h7
-rw-r--r--src/mame/audio/seibu.cpp30
-rw-r--r--src/mame/audio/seibu.h13
-rw-r--r--src/mame/audio/wpcsnd.cpp8
-rw-r--r--src/mame/audio/wpcsnd.h3
-rw-r--r--src/mame/drivers/actfancr.cpp14
-rw-r--r--src/mame/drivers/aerofgt.cpp14
-rw-r--r--src/mame/drivers/airbustr.cpp1
-rw-r--r--src/mame/drivers/aleck64.cpp4
-rw-r--r--src/mame/drivers/angelkds.cpp20
-rw-r--r--src/mame/drivers/apple2e.cpp31
-rw-r--r--src/mame/drivers/appoooh.cpp54
-rw-r--r--src/mame/drivers/artmagic.cpp2
-rw-r--r--src/mame/drivers/asterix.cpp5
-rw-r--r--src/mame/drivers/attckufo.cpp219
-rw-r--r--src/mame/drivers/backfire.cpp4
-rw-r--r--src/mame/drivers/bbusters.cpp55
-rw-r--r--src/mame/drivers/bishi.cpp5
-rw-r--r--src/mame/drivers/blackt96.cpp1
-rw-r--r--src/mame/drivers/boogwing.cpp4
-rw-r--r--src/mame/drivers/cabal.cpp10
-rw-r--r--src/mame/drivers/calorie.cpp18
-rw-r--r--src/mame/drivers/cbuster.cpp3
-rw-r--r--src/mame/drivers/cchance.cpp1
-rw-r--r--src/mame/drivers/cclimber.cpp75
-rw-r--r--src/mame/drivers/champbwl.cpp2
-rw-r--r--src/mame/drivers/chihiro.cpp37
-rw-r--r--src/mame/drivers/cninja.cpp18
-rw-r--r--src/mame/drivers/cobra.cpp4
-rw-r--r--src/mame/drivers/crospang.cpp1
-rw-r--r--src/mame/drivers/crshrace.cpp1
-rw-r--r--src/mame/drivers/cshooter.cpp423
-rw-r--r--src/mame/drivers/cv1k.cpp52
-rw-r--r--src/mame/drivers/darius.cpp1
-rw-r--r--src/mame/drivers/darkseal.cpp3
-rw-r--r--src/mame/drivers/dassault.cpp4
-rw-r--r--src/mame/drivers/dblewing.cpp2
-rw-r--r--src/mame/drivers/dbz.cpp6
-rw-r--r--src/mame/drivers/deadang.cpp8
-rw-r--r--src/mame/drivers/dec0.cpp27
-rw-r--r--src/mame/drivers/dec8.cpp32
-rw-r--r--src/mame/drivers/deco156.cpp4
-rw-r--r--src/mame/drivers/deco32.cpp23
-rw-r--r--src/mame/drivers/dfruit.cpp1
-rw-r--r--src/mame/drivers/dietgo.cpp2
-rw-r--r--src/mame/drivers/djboy.cpp1
-rw-r--r--src/mame/drivers/djmain.cpp3
-rw-r--r--src/mame/drivers/dreambal.cpp1
-rw-r--r--src/mame/drivers/esd16.cpp1
-rw-r--r--src/mame/drivers/f1gp.cpp3
-rw-r--r--src/mame/drivers/fb01.cpp2
-rw-r--r--src/mame/drivers/fidel6502.cpp112
-rw-r--r--src/mame/drivers/fidel68k.cpp3
-rw-r--r--src/mame/drivers/fidelz80.cpp1
-rw-r--r--src/mame/drivers/funkyjet.cpp2
-rw-r--r--src/mame/drivers/galastrm.cpp1
-rw-r--r--src/mame/drivers/galaxi.cpp35
-rw-r--r--src/mame/drivers/galaxian.cpp49
-rw-r--r--src/mame/drivers/galpanic.cpp1
-rw-r--r--src/mame/drivers/gba.cpp2
-rw-r--r--src/mame/drivers/geneve.cpp12
-rw-r--r--src/mame/drivers/gijoe.cpp8
-rw-r--r--src/mame/drivers/glasgow.cpp560
-rw-r--r--src/mame/drivers/gotcha.cpp1
-rw-r--r--src/mame/drivers/groundfx.cpp1
-rw-r--r--src/mame/drivers/gstriker.cpp1
-rw-r--r--src/mame/drivers/gticlub.cpp15
-rw-r--r--src/mame/drivers/gunbustr.cpp1
-rw-r--r--src/mame/drivers/harddriv.cpp89
-rw-r--r--src/mame/drivers/hh_hmcs40.cpp23
-rw-r--r--src/mame/drivers/hh_sm510.cpp197
-rw-r--r--src/mame/drivers/hh_ucom4.cpp1
-rw-r--r--src/mame/drivers/himesiki.cpp76
-rw-r--r--src/mame/drivers/hornet.cpp11
-rw-r--r--src/mame/drivers/hp9845.cpp13
-rw-r--r--src/mame/drivers/hvyunit.cpp1
-rw-r--r--src/mame/drivers/igs009.cpp72
-rw-r--r--src/mame/drivers/intv.cpp120
-rw-r--r--src/mame/drivers/inufuku.cpp1
-rw-r--r--src/mame/drivers/jaguar.cpp1
-rw-r--r--src/mame/drivers/jclub2.cpp8
-rw-r--r--src/mame/drivers/jongkyo.cpp45
-rw-r--r--src/mame/drivers/jungleyo.cpp158
-rw-r--r--src/mame/drivers/kaneko16.cpp19
-rw-r--r--src/mame/drivers/karnov.cpp6
-rw-r--r--src/mame/drivers/konamigx.cpp69
-rw-r--r--src/mame/drivers/ksys573.cpp21
-rw-r--r--src/mame/drivers/lastbank.cpp1
-rw-r--r--src/mame/drivers/leapster.cpp2
-rw-r--r--src/mame/drivers/lemmings.cpp2
-rw-r--r--src/mame/drivers/lethal.cpp5
-rw-r--r--src/mame/drivers/m92.cpp152
-rw-r--r--src/mame/drivers/macs.cpp164
-rw-r--r--src/mame/drivers/madmotor.cpp9
-rw-r--r--src/mame/drivers/magic10.cpp606
-rw-r--r--src/mame/drivers/mhavoc.cpp83
-rw-r--r--src/mame/drivers/mirage.cpp2
-rw-r--r--src/mame/drivers/model1.cpp6
-rw-r--r--src/mame/drivers/model2.cpp20
-rw-r--r--src/mame/drivers/model3.cpp39
-rw-r--r--src/mame/drivers/moo.cpp18
-rw-r--r--src/mame/drivers/mystwarr.cpp65
-rw-r--r--src/mame/drivers/n64.cpp5
-rw-r--r--src/mame/drivers/namcond1.cpp110
-rw-r--r--src/mame/drivers/naomi.cpp18
-rw-r--r--src/mame/drivers/nc.cpp1
-rw-r--r--src/mame/drivers/neogeo_noslot.cpp26
-rw-r--r--src/mame/drivers/ninjakd2.cpp66
-rw-r--r--src/mame/drivers/nmg5.cpp1
-rw-r--r--src/mame/drivers/nwk-tr.cpp8
-rw-r--r--src/mame/drivers/opwolf.cpp7
-rw-r--r--src/mame/drivers/overdriv.cpp6
-rw-r--r--src/mame/drivers/pbaction.cpp41
-rw-r--r--src/mame/drivers/pc.cpp15
-rw-r--r--src/mame/drivers/pcktgal.cpp2
-rw-r--r--src/mame/drivers/pengo.cpp43
-rw-r--r--src/mame/drivers/pipedrm.cpp1
-rw-r--r--src/mame/drivers/pktgaldx.cpp2
-rw-r--r--src/mame/drivers/playch10.cpp37
-rw-r--r--src/mame/drivers/qdrmfgp.cpp10
-rw-r--r--src/mame/drivers/r9751.cpp35
-rw-r--r--src/mame/drivers/raiden2.cpp37
-rw-r--r--src/mame/drivers/rastan.cpp1
-rw-r--r--src/mame/drivers/rbisland.cpp2
-rw-r--r--src/mame/drivers/rohga.cpp14
-rw-r--r--src/mame/drivers/rungun.cpp3
-rw-r--r--src/mame/drivers/sandscrp.cpp1
-rw-r--r--src/mame/drivers/segae.cpp67
-rw-r--r--src/mame/drivers/segag80r.cpp60
-rw-r--r--src/mame/drivers/segas16a.cpp66
-rw-r--r--src/mame/drivers/segas18.cpp2
-rw-r--r--src/mame/drivers/segas24.cpp2
-rw-r--r--src/mame/drivers/segasp.cpp2
-rw-r--r--src/mame/drivers/segaybd.cpp36
-rw-r--r--src/mame/drivers/senjyo.cpp84
-rw-r--r--src/mame/drivers/seta.cpp41
-rw-r--r--src/mame/drivers/sg1000a.cpp38
-rw-r--r--src/mame/drivers/silvmil.cpp1
-rw-r--r--src/mame/drivers/simpl156.cpp2
-rw-r--r--src/mame/drivers/simpsons.cpp5
-rw-r--r--src/mame/drivers/skylncr.cpp34
-rw-r--r--src/mame/drivers/slapshot.cpp2
-rw-r--r--src/mame/drivers/sms.cpp8
-rw-r--r--src/mame/drivers/snk68.cpp1
-rw-r--r--src/mame/drivers/snowbros.cpp1
-rw-r--r--src/mame/drivers/speglsht.cpp6
-rw-r--r--src/mame/drivers/spy.cpp2
-rw-r--r--src/mame/drivers/spyhuntertec.cpp92
-rw-r--r--src/mame/drivers/srmp2.cpp3
-rw-r--r--src/mame/drivers/sshangha.cpp3
-rw-r--r--src/mame/drivers/ssv.cpp1
-rw-r--r--src/mame/drivers/stadhero.cpp5
-rw-r--r--src/mame/drivers/subsino2.cpp18
-rw-r--r--src/mame/drivers/supbtime.cpp4
-rw-r--r--src/mame/drivers/super80.cpp1
-rw-r--r--src/mame/drivers/superchs.cpp1
-rw-r--r--src/mame/drivers/suprloco.cpp29
-rw-r--r--src/mame/drivers/suprslam.cpp1
-rw-r--r--src/mame/drivers/system1.cpp1085
-rw-r--r--src/mame/drivers/taito_f2.cpp40
-rw-r--r--src/mame/drivers/taito_h.cpp3
-rw-r--r--src/mame/drivers/taito_o.cpp1
-rw-r--r--src/mame/drivers/taito_x.cpp4
-rw-r--r--src/mame/drivers/taito_z.cpp2
-rw-r--r--src/mame/drivers/taitoair.cpp1
-rw-r--r--src/mame/drivers/taotaido.cpp1
-rw-r--r--src/mame/drivers/tasman.cpp54
-rw-r--r--src/mame/drivers/thedealr.cpp1
-rw-r--r--src/mame/drivers/thedeep.cpp3
-rw-r--r--src/mame/drivers/ti99_4p.cpp89
-rw-r--r--src/mame/drivers/ti99_4x.cpp237
-rw-r--r--src/mame/drivers/ti99_8.cpp498
-rw-r--r--src/mame/drivers/tnzs.cpp7
-rw-r--r--src/mame/drivers/topspeed.cpp2
-rw-r--r--src/mame/drivers/tourvis.cpp22
-rw-r--r--src/mame/drivers/triforce.cpp2
-rw-r--r--src/mame/drivers/tumbleb.cpp7
-rw-r--r--src/mame/drivers/tumblep.cpp2
-rw-r--r--src/mame/drivers/turbo.cpp47
-rw-r--r--src/mame/drivers/twincobr.cpp6
-rw-r--r--src/mame/drivers/undrfire.cpp2
-rw-r--r--src/mame/drivers/vaportra.cpp5
-rw-r--r--src/mame/drivers/vendetta.cpp7
-rw-r--r--src/mame/drivers/vsnes.cpp38
-rw-r--r--src/mame/drivers/welltris.cpp1
-rw-r--r--src/mame/drivers/xexex.cpp8
-rw-r--r--src/mame/drivers/xmen.cpp10
-rw-r--r--src/mame/drivers/zaxxon.cpp132
-rw-r--r--src/mame/drivers/zr107.cpp10
-rw-r--r--src/mame/includes/angelkds.h1
-rw-r--r--src/mame/includes/appoooh.h1
-rw-r--r--src/mame/includes/artmagic.h2
-rw-r--r--src/mame/includes/cybiko.h1
-rw-r--r--src/mame/includes/fidelz80.h1
-rw-r--r--src/mame/includes/harddriv.h5
-rw-r--r--src/mame/includes/intv.h10
-rw-r--r--src/mame/includes/konamigx.h4
-rw-r--r--src/mame/includes/model1.h19
-rw-r--r--src/mame/includes/model3.h3
-rw-r--r--src/mame/includes/naomi.h1
-rw-r--r--src/mame/includes/nb1414m4.h2
-rw-r--r--src/mame/includes/pbaction.h1
-rw-r--r--src/mame/includes/playch10.h1
-rw-r--r--src/mame/includes/segas18.h2
-rw-r--r--src/mame/includes/segaybd.h2
-rw-r--r--src/mame/includes/system1.h38
-rw-r--r--src/mame/includes/turbo.h1
-rw-r--r--src/mame/includes/xbox.h61
-rw-r--r--src/mame/includes/zaxxon.h2
-rw-r--r--src/mame/layout/cc40.lay30
-rw-r--r--src/mame/layout/fidel_sc12.lay115
-rw-r--r--src/mame/layout/fidel_sc9.lay437
-rw-r--r--src/mame/layout/lantutor.lay4
-rw-r--r--src/mame/layout/spyhunttec.lay174
-rw-r--r--src/mame/layout/ti74.lay12
-rw-r--r--src/mame/layout/ti95.lay6
-rw-r--r--src/mame/machine/awboard.cpp26
-rw-r--r--src/mame/machine/awboard.h7
-rw-r--r--src/mame/machine/dec_lk201.cpp25
-rw-r--r--src/mame/machine/decocass_tape.cpp17
-rw-r--r--src/mame/machine/decocass_tape.h1
-rw-r--r--src/mame/machine/fd1089.cpp17
-rw-r--r--src/mame/machine/fd1089.h3
-rw-r--r--src/mame/machine/fd1094.cpp36
-rw-r--r--src/mame/machine/fd1094.h7
-rw-r--r--src/mame/machine/harddriv.cpp16
-rw-r--r--src/mame/machine/intv.cpp93
-rw-r--r--src/mame/machine/m1comm.cpp2
-rw-r--r--src/mame/machine/m1comm.h1
-rw-r--r--src/mame/machine/m3comm.cpp437
-rw-r--r--src/mame/machine/m3comm.h82
-rw-r--r--src/mame/machine/mhavoc.cpp3
-rw-r--r--src/mame/machine/model1.cpp456
-rw-r--r--src/mame/machine/naomibd.cpp5
-rw-r--r--src/mame/machine/naomibd.h3
-rw-r--r--src/mame/machine/naomigd.h2
-rw-r--r--src/mame/machine/naomim1.cpp7
-rw-r--r--src/mame/machine/naomim1.h2
-rw-r--r--src/mame/machine/naomim2.cpp5
-rw-r--r--src/mame/machine/naomim2.h1
-rw-r--r--src/mame/machine/naomim4.cpp22
-rw-r--r--src/mame/machine/naomim4.h7
-rw-r--r--src/mame/machine/naomirom.cpp3
-rw-r--r--src/mame/machine/naomirom.h1
-rw-r--r--src/mame/machine/pc9801_118.cpp2
-rw-r--r--src/mame/machine/pc9801_26.cpp2
-rw-r--r--src/mame/machine/s32comm.cpp2
-rw-r--r--src/mame/machine/s32comm.h2
-rw-r--r--src/mame/machine/segacrp2.cpp124
-rw-r--r--src/mame/machine/segacrp2.h7
-rw-r--r--src/mame/machine/segacrp2_device.cpp371
-rw-r--r--src/mame/machine/segacrp2_device.h123
-rw-r--r--src/mame/machine/segacrpt.cpp254
-rw-r--r--src/mame/machine/segacrpt.h4
-rw-r--r--src/mame/machine/segacrpt_device.cpp1091
-rw-r--r--src/mame/machine/segacrpt_device.h296
-rw-r--r--src/mame/machine/segaic16.cpp22
-rw-r--r--src/mame/machine/segaic16.h6
-rw-r--r--src/mame/machine/st0016.cpp25
-rw-r--r--src/mame/machine/st0016.h9
-rw-r--r--src/mame/machine/xbox.cpp168
-rw-r--r--src/mame/machine/zs01.cpp3
-rw-r--r--src/mame/machine/zs01.h1
-rw-r--r--src/mame/mame.lst27
-rw-r--r--src/mame/nl.lst25
-rw-r--r--src/mame/video/733_asr.cpp19
-rw-r--r--src/mame/video/733_asr.h5
-rw-r--r--src/mame/video/911_vdt.cpp17
-rw-r--r--src/mame/video/911_vdt.h5
-rw-r--r--src/mame/video/atarirle.cpp13
-rw-r--r--src/mame/video/atarirle.h3
-rw-r--r--src/mame/video/battlex.cpp2
-rw-r--r--src/mame/video/bbusters.cpp8
-rw-r--r--src/mame/video/bfm_adr2.cpp90
-rw-r--r--src/mame/video/bfm_adr2.h7
-rw-r--r--src/mame/video/decbac06.h3
-rw-r--r--src/mame/video/deckarn.cpp13
-rw-r--r--src/mame/video/deckarn.h6
-rw-r--r--src/mame/video/decmxc06.cpp13
-rw-r--r--src/mame/video/decmxc06.h6
-rw-r--r--src/mame/video/deco16ic.cpp15
-rw-r--r--src/mame/video/deco16ic.h4
-rw-r--r--src/mame/video/deco_zoomspr.cpp13
-rw-r--r--src/mame/video/deco_zoomspr.h5
-rw-r--r--src/mame/video/decospr.cpp15
-rw-r--r--src/mame/video/decospr.h5
-rw-r--r--src/mame/video/k001604.cpp61
-rw-r--r--src/mame/video/k001604.h22
-rw-r--r--src/mame/video/k037122.cpp38
-rw-r--r--src/mame/video/k037122.h17
-rw-r--r--src/mame/video/k051316.cpp14
-rw-r--r--src/mame/video/k051316.h3
-rw-r--r--src/mame/video/k051960.cpp16
-rw-r--r--src/mame/video/k051960.h10
-rw-r--r--src/mame/video/k052109.cpp26
-rw-r--r--src/mame/video/k052109.h9
-rw-r--r--src/mame/video/k053244_k053245.cpp7
-rw-r--r--src/mame/video/k053244_k053245.h3
-rw-r--r--src/mame/video/k053246_k053247_k055673.cpp64
-rw-r--r--src/mame/video/k053246_k053247_k055673.h35
-rw-r--r--src/mame/video/k053250.cpp19
-rw-r--r--src/mame/video/k053250.h1
-rw-r--r--src/mame/video/k054156_k054157_k056832.cpp145
-rw-r--r--src/mame/video/k054156_k054157_k056832.h29
-rw-r--r--src/mame/video/kan_pand.cpp13
-rw-r--r--src/mame/video/kan_pand.h5
-rw-r--r--src/mame/video/konami_helper.cpp5
-rw-r--r--src/mame/video/konami_helper.h2
-rw-r--r--src/mame/video/mystwarr.cpp2
-rw-r--r--src/mame/video/pc080sn.cpp13
-rw-r--r--src/mame/video/pc080sn.h5
-rw-r--r--src/mame/video/pcd.cpp19
-rw-r--r--src/mame/video/pcd.h4
-rw-r--r--src/mame/video/powervr2.cpp2
-rw-r--r--src/mame/video/sega16sp.cpp37
-rw-r--r--src/mame/video/sega16sp.h17
-rw-r--r--src/mame/video/segaic24.cpp46
-rw-r--r--src/mame/video/segaic24.h11
-rw-r--r--src/mame/video/senjyo.cpp1
-rw-r--r--src/mame/video/seta001.cpp13
-rw-r--r--src/mame/video/seta001.h5
-rw-r--r--src/mame/video/snk68_spr.cpp11
-rw-r--r--src/mame/video/snk68_spr.h6
-rw-r--r--src/mame/video/st0020.cpp37
-rw-r--r--src/mame/video/st0020.h13
-rw-r--r--src/mame/video/tc0080vco.cpp15
-rw-r--r--src/mame/video/tc0080vco.h5
-rw-r--r--src/mame/video/tc0150rod.cpp5
-rw-r--r--src/mame/video/tc0150rod.h2
-rw-r--r--src/mame/video/tc0480scp.cpp15
-rw-r--r--src/mame/video/tc0480scp.h5
-rw-r--r--src/mame/video/vsystem_spr.cpp13
-rw-r--r--src/mame/video/vsystem_spr.h4
-rw-r--r--src/mame/video/vsystem_spr2.cpp13
-rw-r--r--src/mame/video/vsystem_spr2.h4
-rw-r--r--src/mame/video/vtvideo.cpp11
-rw-r--r--src/mame/video/vtvideo.h8
-rw-r--r--src/mame/video/ygv608.cpp168
-rw-r--r--src/mame/video/ygv608.h13
-rw-r--r--src/osd/eminline.h3
-rw-r--r--src/osd/modules/font/font_dwrite.cpp2
-rw-r--r--src/osd/modules/input/input_common.cpp2
-rw-r--r--src/osd/modules/input/input_common.h28
-rw-r--r--src/osd/modules/input/input_dinput.cpp572
-rw-r--r--src/osd/modules/input/input_dinput.h177
-rw-r--r--src/osd/modules/input/input_sdl.cpp35
-rw-r--r--src/osd/modules/input/input_winhybrid.cpp413
-rw-r--r--src/osd/modules/input/input_xinput.cpp406
-rw-r--r--src/osd/modules/input/input_xinput.h140
-rw-r--r--src/osd/modules/ipc/raw_tcp_connection.cpp29
-rw-r--r--src/osd/modules/ipc/raw_tcp_connection.h30
-rw-r--r--src/osd/modules/ipc/raw_tcp_server.cpp42
-rw-r--r--src/osd/modules/ipc/raw_tcp_server.h36
-rw-r--r--src/osd/modules/ipc/rtc_tcp_connection.cpp150
-rw-r--r--src/osd/modules/ipc/rtc_tcp_connection.h33
-rw-r--r--src/osd/modules/ipc/rtc_tcp_server.cpp42
-rw-r--r--src/osd/modules/ipc/rtc_tcp_server.h36
-rw-r--r--src/osd/modules/ipc/tcp_connection.cpp414
-rw-r--r--src/osd/modules/ipc/tcp_connection.h137
-rw-r--r--src/osd/modules/ipc/tcp_server.cpp279
-rw-r--r--src/osd/modules/ipc/tcp_server.h72
-rw-r--r--src/osd/modules/lib/osdlib.h10
-rw-r--r--src/osd/modules/lib/osdlib_macosx.cpp83
-rw-r--r--src/osd/modules/lib/osdlib_unix.cpp27
-rw-r--r--src/osd/modules/lib/osdlib_win32.cpp74
-rw-r--r--src/osd/modules/lib/osdobj_common.cpp48
-rw-r--r--src/osd/modules/lib/osdobj_common.h11
-rw-r--r--src/osd/modules/opengl/gl_shader_mgr.h2
-rw-r--r--src/osd/modules/osdwindow.cpp8
-rw-r--r--src/osd/modules/osdwindow.h112
-rw-r--r--src/osd/modules/output/console.cpp32
-rw-r--r--src/osd/modules/output/network.cpp86
-rw-r--r--src/osd/modules/output/none.cpp32
-rw-r--r--src/osd/modules/output/output_module.h30
-rw-r--r--src/osd/modules/render/bgfx/chain.cpp13
-rw-r--r--src/osd/modules/render/bgfx/chain.h7
-rw-r--r--src/osd/modules/render/bgfx/chainentry.cpp3
-rw-r--r--src/osd/modules/render/bgfx/chainmanager.cpp414
-rw-r--r--src/osd/modules/render/bgfx/chainmanager.h58
-rw-r--r--src/osd/modules/render/bgfx/chainreader.cpp7
-rw-r--r--src/osd/modules/render/bgfx/effectmanager.cpp4
-rw-r--r--src/osd/modules/render/bgfx/inputpair.cpp2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/default/fs_blit.sc (renamed from src/osd/modules/render/bgfx/shaders/fs_blit.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/default/varying.def.sc6
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/default/vs_blit.sc (renamed from src/osd/modules/render/bgfx/shaders/vs_blit.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_color.sc (renamed from src/osd/modules/render/bgfx/shaders/fs_color.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_deconverge.sc (renamed from src/osd/modules/render/bgfx/shaders/fs_deconverge.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_defocus.sc (renamed from src/osd/modules/render/bgfx/shaders/fs_defocus.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc (renamed from src/osd/modules/render/bgfx/shaders/fs_distortion.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_ntsc_decode.sc (renamed from src/osd/modules/render/bgfx/shaders/fs_ntsc_decode.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_ntsc_encode.sc (renamed from src/osd/modules/render/bgfx/shaders/fs_ntsc_encode.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_phosphor.sc (renamed from src/osd/modules/render/bgfx/shaders/fs_phosphor.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc (renamed from src/osd/modules/render/bgfx/shaders/fs_post.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_prescale.sc (renamed from src/osd/modules/render/bgfx/shaders/fs_prescale.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/varying.def.sc9
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_color.sc (renamed from src/osd/modules/render/bgfx/shaders/vs_color.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_deconverge.sc (renamed from src/osd/modules/render/bgfx/shaders/vs_deconverge.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_defocus.sc (renamed from src/osd/modules/render/bgfx/shaders/vs_defocus.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_distortion.sc (renamed from src/osd/modules/render/bgfx/shaders/vs_distortion.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_ntsc_decode.sc (renamed from src/osd/modules/render/bgfx/shaders/vs_ntsc_decode.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_ntsc_encode.sc (renamed from src/osd/modules/render/bgfx/shaders/vs_ntsc_encode.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_phosphor.sc (renamed from src/osd/modules/render/bgfx/shaders/vs_phosphor.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_post.sc (renamed from src/osd/modules/render/bgfx/shaders/vs_post.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_prescale.sc (renamed from src/osd/modules/render/bgfx/shaders/vs_prescale.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/unfiltered/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/unfiltered/varying.def.sc6
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/unfiltered/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/fs_gui.sc2
-rw-r--r--src/osd/modules/render/bgfx/shaders/fs_screen.sc2
-rw-r--r--src/osd/modules/render/bgfx/shaders/makefile22
-rw-r--r--src/osd/modules/render/bgfx/shaders/shader.mk147
-rw-r--r--src/osd/modules/render/bgfx/shaders/varying.def.sc4
-rw-r--r--src/osd/modules/render/bgfx/shaders/vs_gui.sc2
-rw-r--r--src/osd/modules/render/bgfx/shaders/vs_screen.sc2
-rw-r--r--src/osd/modules/render/bgfx/slider.cpp4
-rw-r--r--src/osd/modules/render/bgfx/statereader.cpp2
-rw-r--r--src/osd/modules/render/bgfx/statereader.h5
-rw-r--r--src/osd/modules/render/bgfx/target.cpp2
-rw-r--r--src/osd/modules/render/bgfx/targetmanager.cpp28
-rw-r--r--src/osd/modules/render/bgfx/targetmanager.h3
-rw-r--r--src/osd/modules/render/bgfx/targetreader.cpp23
-rw-r--r--src/osd/modules/render/bgfx/targetreader.h3
-rw-r--r--src/osd/modules/render/bgfx/texture.cpp2
-rw-r--r--src/osd/modules/render/bgfx/texturemanager.cpp35
-rw-r--r--src/osd/modules/render/bgfx/texturemanager.h1
-rw-r--r--src/osd/modules/render/bgfxutil.cpp67
-rw-r--r--src/osd/modules/render/bgfxutil.h18
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.cpp69
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.h8
-rw-r--r--src/osd/modules/render/d3dtarget.h14
-rw-r--r--src/osd/modules/render/drawbgfx.cpp273
-rw-r--r--src/osd/modules/render/drawbgfx.h19
-rw-r--r--src/osd/modules/render/drawd3d.cpp15
-rw-r--r--src/osd/modules/render/drawd3d.h12
-rw-r--r--src/osd/modules/render/sdlglcontext.h1
-rw-r--r--src/osd/modules/render/sliderdirtynotifier.h22
-rw-r--r--src/osd/modules/sync/osdsync.cpp118
-rw-r--r--src/osd/modules/sync/osdsync.h222
-rw-r--r--src/osd/modules/sync/work_osd.cpp297
-rw-r--r--src/osd/osdcore.cpp23
-rw-r--r--src/osd/osdcore.h5
-rw-r--r--src/osd/osdepend.h5
-rw-r--r--src/osd/sdl/README_SDL20.txt130
-rw-r--r--src/osd/sdl/ledutil.sh95
-rw-r--r--src/osd/sdl/main.cpp61
-rw-r--r--src/osd/sdl/osdsdl.h10
-rw-r--r--src/osd/sdl/osxutils.h21
-rw-r--r--src/osd/sdl/osxutils.mm34
-rw-r--r--src/osd/sdl/output.cpp143
-rw-r--r--src/osd/sdl/sdlmain.cpp16
-rw-r--r--src/osd/sdl/sdlos_macosx.cpp101
-rw-r--r--src/osd/sdl/sdlos_unix.cpp50
-rw-r--r--src/osd/sdl/sdlos_win32.cpp102
-rw-r--r--src/osd/sdl/testkeys.cpp117
-rw-r--r--src/osd/sdl/video.cpp25
-rw-r--r--src/osd/sdl/video.h82
-rw-r--r--src/osd/sdl/watchdog.cpp9
-rw-r--r--src/osd/sdl/watchdog.h8
-rw-r--r--src/osd/sdl/window.cpp98
-rw-r--r--src/osd/sdl/window.h43
-rw-r--r--src/osd/strconv.h11
-rw-r--r--src/osd/windows/ledutil.cpp710
-rw-r--r--src/osd/windows/main.cpp32
-rw-r--r--src/osd/windows/output.cpp320
-rw-r--r--src/osd/windows/output.h86
-rw-r--r--src/osd/windows/video.cpp11
-rw-r--r--src/osd/windows/video.h70
-rw-r--r--src/osd/windows/winclip.cpp89
-rw-r--r--src/osd/windows/window.cpp27
-rw-r--r--src/osd/windows/window.h8
-rw-r--r--src/osd/windows/winmain.cpp228
-rw-r--r--src/osd/windows/winmain.h34
-rw-r--r--src/tools/aueffectutil-Info.plist (renamed from src/osd/sdl/aueffectutil-Info.plist)0
-rw-r--r--src/tools/aueffectutil.mm (renamed from src/osd/sdl/aueffectutil.mm)0
-rw-r--r--src/tools/unidasm.cpp6
1706 files changed, 128447 insertions, 73050 deletions
diff --git a/3rdparty/README.md b/3rdparty/README.md
index 4868144ee2c..8bd08dc07c9 100644
--- a/3rdparty/README.md
+++ b/3rdparty/README.md
@@ -38,6 +38,8 @@ luafilesystem - [The MIT License (MIT)](http://opensource.org/licenses/MIT)
lzma - [The GNU Lesser General Public License](http://opensource.org/licenses/LGPL-2.1)
+nanosvg - [zlib license](http://opensource.org/licenses/Zlib)
+
portaudio - [The MIT License (MIT)](http://opensource.org/licenses/MIT) explanation at [their site](http://www.portaudio.com/license.html)
portmidi - [The MIT License (MIT)](http://opensource.org/licenses/MIT)
diff --git a/3rdparty/bgfx/3rdparty/iqa/LICENSE b/3rdparty/bgfx/3rdparty/iqa/LICENSE
new file mode 100644
index 00000000000..ff67944bfde
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/LICENSE
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
diff --git a/3rdparty/bgfx/3rdparty/iqa/README.txt b/3rdparty/bgfx/3rdparty/iqa/README.txt
new file mode 100644
index 00000000000..0a95346fe8a
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/README.txt
@@ -0,0 +1,36 @@
+Doxygen documentation can be found at: http://tdistler.com/iqa
+
+BUILD:
+
+ All build artifacts end up in build/<configuration>, where <configuration> is
+ 'debug' or 'release'.
+
+ Windows:
+ - Open iqa.sln, select 'Debug' or 'Release', and build. The output is a
+ static library 'iqa.lib'.
+ - To run the tests under the debugger, first right-click the 'test' project,
+ select Properties -> Configuration Properties -> Debugging and set
+ 'Working Directory' to '$(OutDir)'. Then start the application.
+
+ Linux:
+ - Change directories into the root of the IQA branch you want to build.
+ - Type `make` for a debug build, or `make RELEASE=1` for a release build.
+ The output is a static library 'libiqa.a'.
+ - Type `make test` (or `make test RELEASE=1`) to build the unit tests.
+ - Type `make clean` (or `make clean RELEASE=1`) to delete all build
+ artifacts.
+ - To run the tests, `cd` to the build/<configuration> directory and type
+ `./test`.
+
+
+USE:
+
+ - Include 'iqa.h' in your source file.
+ - Call iqa_* methods.
+ - Link against the IQA library.
+
+
+HELP & SUPPORT:
+
+ Further help can be found at: https://sourceforge.net/projects/iqa/support
+
diff --git a/3rdparty/bgfx/3rdparty/iqa/include/convolve.h b/3rdparty/bgfx/3rdparty/iqa/include/convolve.h
new file mode 100644
index 00000000000..a5e2e71a211
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/include/convolve.h
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _CONVOLVE_H_
+#define _CONVOLVE_H_
+
+typedef float (*_iqa_get_pixel)(const float *img, int w, int h, int x, int y, float bnd_const);
+
+/** Out-of-bounds array values are a mirrored reflection of the border values*/
+float KBND_SYMMETRIC(const float *img, int w, int h, int x, int y, float bnd_const);
+/** Out-of-bounds array values are set to the nearest border value */
+float KBND_REPLICATE(const float *img, int w, int h, int x, int y, float bnd_const);
+/** Out-of-bounds array values are set to 'bnd_const' */
+float KBND_CONSTANT(const float *img, int w, int h, int x, int y, float bnd_const);
+
+
+/** Defines a convolution kernel */
+struct _kernel {
+ float *kernel; /**< Pointer to the kernel values */
+ int w; /**< The kernel width */
+ int h; /**< The kernel height */
+ int normalized; /**< 1 if the kernel values add up to 1. 0 otherwise */
+ _iqa_get_pixel bnd_opt; /**< Defines how out-of-bounds image values are handled */
+ float bnd_const; /**< If 'bnd_opt' is KBND_CONSTANT, this specifies the out-of-bounds value */
+};
+
+/**
+ * @brief Applies the specified kernel to the image.
+ * The kernel will be applied to all areas where it fits completely within
+ * the image. The resulting image will be smaller by half the kernel width
+ * and height (w - kw/2 and h - kh/2).
+ *
+ * @param img Image to modify
+ * @param w Image width
+ * @param h Image height
+ * @param k The kernel to apply
+ * @param result Buffer to hold the resulting image ((w-kw)*(h-kh), where kw
+ * and kh are the kernel width and height). If 0, the result
+ * will be written to the original image buffer.
+ * @param rw Optional. The width of the resulting image will be stored here.
+ * @param rh Optional. The height of the resulting image will be stored here.
+ */
+void _iqa_convolve(float *img, int w, int h, const struct _kernel *k, float *result, int *rw, int *rh);
+
+/**
+ * The same as _iqa_convolve() except the kernel is applied to the entire image.
+ * In other words, the kernel is applied to all areas where the top-left corner
+ * of the kernel is in the image. Out-of-bound pixel value (off the right and
+ * bottom edges) are chosen based on the 'bnd_opt' and 'bnd_const' members of
+ * the kernel structure. The resulting array is the same size as the input
+ * image.
+ *
+ * @param img Image to modify
+ * @param w Image width
+ * @param h Image height
+ * @param k The kernel to apply
+ * @param result Buffer to hold the resulting image ((w-kw)*(h-kh), where kw
+ * and kh are the kernel width and height). If 0, the result
+ * will be written to the original image buffer.
+ * @return 0 if successful. Non-zero otherwise.
+ */
+int _iqa_img_filter(float *img, int w, int h, const struct _kernel *k, float *result);
+
+/**
+ * Returns the filtered version of the specified pixel. If no kernel is given,
+ * the raw pixel value is returned.
+ *
+ * @param img Source image
+ * @param w Image width
+ * @param h Image height
+ * @param x The x location of the pixel to filter
+ * @param y The y location of the pixel to filter
+ * @param k Optional. The convolution kernel to apply to the pixel.
+ * @param kscale The scale of the kernel (for normalization). 1 for normalized
+ * kernels. Required if 'k' is not null.
+ * @return The filtered pixel value.
+ */
+float _iqa_filter_pixel(const float *img, int w, int h, int x, int y, const struct _kernel *k, const float kscale);
+
+
+#endif /*_CONVOLVE_H_*/
diff --git a/3rdparty/bgfx/3rdparty/iqa/include/decimate.h b/3rdparty/bgfx/3rdparty/iqa/include/decimate.h
new file mode 100644
index 00000000000..40f1a8c04e5
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/include/decimate.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _DECIMATE_H_
+#define _DECIMATE_H_
+
+#include "convolve.h"
+
+/**
+ * @brief Downsamples (decimates) an image.
+ *
+ * @param img Image to modify
+ * @param w Image width
+ * @param h Image height
+ * @param factor Decimation factor
+ * @param k The kernel to apply (e.g. low-pass filter). Can be 0.
+ * @param result Buffer to hold the resulting image (w/factor*h/factor). If 0,
+ * the result will be written to the original image buffer.
+ * @param rw Optional. The width of the resulting image will be stored here.
+ * @param rh Optional. The height of the resulting image will be stored here.
+ * @return 0 on success.
+ */
+int _iqa_decimate(float *img, int w, int h, int factor, const struct _kernel *k, float *result, int *rw, int *rh);
+
+#endif /*_DECIMATE_H_*/
diff --git a/3rdparty/bgfx/3rdparty/iqa/include/iqa.h b/3rdparty/bgfx/3rdparty/iqa/include/iqa.h
new file mode 100644
index 00000000000..408675e5abe
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/include/iqa.h
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _IQA_H_
+#define _IQA_H_
+
+#include "iqa_os.h"
+
+/**
+ * Allows fine-grain control of the SSIM algorithm.
+ */
+struct iqa_ssim_args {
+ float alpha; /**< luminance exponent */
+ float beta; /**< contrast exponent */
+ float gamma; /**< structure exponent */
+ int L; /**< dynamic range (2^8 - 1)*/
+ float K1; /**< stabilization constant 1 */
+ float K2; /**< stabilization constant 2 */
+ int f; /**< scale factor. 0=default scaling, 1=no scaling */
+};
+
+/**
+ * Allows fine-grain control of the MS-SSIM algorithm.
+ */
+struct iqa_ms_ssim_args {
+ int wang; /**< 1=original algorithm by Wang, et al. 0=MS-SSIM* by Rouse/Hemami (default). */
+ int gaussian; /**< 1=11x11 Gaussian window (default). 0=8x8 linear window. */
+ int scales; /**< Number of scaled images to use. Default is 5. */
+ const float *alphas; /**< Pointer to array of alpha values for each scale. Required if 'scales' isn't 5. */
+ const float *betas; /**< Pointer to array of beta values for each scale. Required if 'scales' isn't 5. */
+ const float *gammas; /**< Pointer to array of gamma values for each scale. Required if 'scales' isn't 5. */
+};
+
+/**
+ * Calculates the Mean Squared Error between 2 equal-sized 8-bit images.
+ * @note The images must have the same width, height, and stride.
+ * @param ref Original reference image
+ * @param cmp Distorted image
+ * @param w Width of the images
+ * @param h Height of the images
+ * @param stride The length (in bytes) of each horizontal line in the image.
+ * This may be different from the image width.
+ * @return The MSE.
+ */
+float iqa_mse(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride);
+
+/**
+ * Calculates the Peak Signal-to-Noise-Ratio between 2 equal-sized 8-bit
+ * images.
+ * @note The images must have the same width, height, and stride.
+ * @param ref Original reference image
+ * @param cmp Distorted image
+ * @param w Width of the images
+ * @param h Height of the images
+ * @param stride The length (in bytes) of each horizontal line in the image.
+ * This may be different from the image width.
+ * @return The PSNR.
+ */
+float iqa_psnr(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride);
+
+/**
+ * Calculates the Structural SIMilarity between 2 equal-sized 8-bit images.
+ *
+ * See https://ece.uwaterloo.ca/~z70wang/publications/ssim.html
+ * @note The images must have the same width, height, and stride.
+ * @param ref Original reference image
+ * @param cmp Distorted image
+ * @param w Width of the images
+ * @param h Height of the images
+ * @param stride The length (in bytes) of each horizontal line in the image.
+ * This may be different from the image width.
+ * @param gaussian 0 = 8x8 square window, 1 = 11x11 circular-symmetric Gaussian
+ * weighting.
+ * @param args Optional SSIM arguments for fine control of the algorithm. 0 for
+ * defaults. Defaults are a=b=g=1.0, L=255, K1=0.01, K2=0.03
+ * @return The mean SSIM over the entire image (MSSIM), or INFINITY if error.
+ */
+float iqa_ssim(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride,
+ int gaussian, const struct iqa_ssim_args *args);
+
+/**
+ * Calculates the Multi-Scale Structural SIMilarity between 2 equal-sized 8-bit
+ * images. The default algorithm is MS-SSIM* proposed by Rouse/Hemami 2008.
+ *
+ * See https://ece.uwaterloo.ca/~z70wang/publications/msssim.pdf and
+ * http://foulard.ece.cornell.edu/publications/dmr_hvei2008_paper.pdf
+ *
+ * @note 1. The images must have the same width, height, and stride.
+ * @note 2. The minimum image width or height is 2^(scales-1) * filter, where 'filter' is 11
+ * if a Gaussian window is being used, or 9 otherwise.
+ * @param ref Original reference image
+ * @param cmp Distorted image
+ * @param w Width of the images.
+ * @param h Height of the images.
+ * @param stride The length (in bytes) of each horizontal line in the image.
+ * This may be different from the image width.
+ * @param args Optional MS-SSIM arguments for fine control of the algorithm. 0
+ * for defaults. Defaults are wang=0, scales=5, gaussian=1.
+ * @return The mean MS-SSIM over the entire image, or INFINITY if error.
+ */
+float iqa_ms_ssim(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride,
+ const struct iqa_ms_ssim_args *args);
+
+#endif /*_IQA_H_*/
diff --git a/3rdparty/bgfx/3rdparty/iqa/include/iqa_os.h b/3rdparty/bgfx/3rdparty/iqa/include/iqa_os.h
new file mode 100644
index 00000000000..52e0be0169a
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/include/iqa_os.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _OS_H_
+#define _OS_H_
+
+/* Microsoft tends to implement features early, but they have a high legacy
+ * cost because they won't break existing implementations. As such, certain
+ * features we take for granted on other platforms (like C99) aren't fully
+ * implemented. This file is meant to rectify that.
+ */
+
+#ifdef WIN32
+
+#include <windows.h>
+#include <math.h>
+
+#define IQA_INLINE __inline
+
+#ifndef INFINITY
+ #define INFINITY (float)HUGE_VAL /**< Defined in C99 (Windows is C89) */
+#endif /*INFINITY*/
+
+#ifndef NAN
+ static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
+ #define NAN (*(const float *) __nan) /**< Defined in C99 (Windows is C99) */
+#endif
+
+#define IQA_EXPORT __declspec(dllexport)
+
+#else /* !Windows */
+
+#define IQA_INLINE inline
+#define IQA_EXPORT
+
+#endif
+
+#endif /* _OS_H_ */
diff --git a/3rdparty/bgfx/3rdparty/iqa/include/math_utils.h b/3rdparty/bgfx/3rdparty/iqa/include/math_utils.h
new file mode 100644
index 00000000000..0445caa42ed
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/include/math_utils.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MATH_UTILS_H_
+#define _MATH_UTILS_H_
+
+#include "iqa_os.h"
+#include <math.h>
+
+/**
+ * Rounds a float to the nearest integer.
+ */
+IQA_EXPORT IQA_INLINE int _round(float a);
+
+IQA_EXPORT IQA_INLINE int _max(int x, int y);
+
+IQA_EXPORT IQA_INLINE int _min(int x, int y);
+
+
+/**
+ * Compares 2 floats to the specified digit of precision.
+ * @return 0 if equal, 1 otherwise.
+ */
+IQA_EXPORT IQA_INLINE int _cmp_float(float a, float b, int digits);
+
+
+/**
+ * Compares 2 matrices with the specified precision. 'b' is assumed to be the
+ * same size as 'a' or smaller.
+ * @return 0 if equal, 1 otherwise
+ */
+IQA_EXPORT IQA_INLINE int _matrix_cmp(const float *a, const float *b, int w, int h, int digits);
+
+#endif /*_MATH_UTILS_H_*/
diff --git a/3rdparty/bgfx/3rdparty/iqa/include/ssim.h b/3rdparty/bgfx/3rdparty/iqa/include/ssim.h
new file mode 100644
index 00000000000..5653afe8064
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/include/ssim.h
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _SSIM_H_
+#define _SSIM_H_
+
+#include "convolve.h"
+
+/*
+ * Circular-symmetric Gaussian weighting.
+ * h(x,y) = hg(x,y)/SUM(SUM(hg)) , for normalization to 1.0
+ * hg(x,y) = e^( -0.5*( (x^2+y^2)/sigma^2 ) ) , where sigma was 1.5
+ */
+#define GAUSSIAN_LEN 11
+static const float g_gaussian_window[GAUSSIAN_LEN][GAUSSIAN_LEN] = {
+ {0.000001f, 0.000008f, 0.000037f, 0.000112f, 0.000219f, 0.000274f, 0.000219f, 0.000112f, 0.000037f, 0.000008f, 0.000001f},
+ {0.000008f, 0.000058f, 0.000274f, 0.000831f, 0.001619f, 0.002021f, 0.001619f, 0.000831f, 0.000274f, 0.000058f, 0.000008f},
+ {0.000037f, 0.000274f, 0.001296f, 0.003937f, 0.007668f, 0.009577f, 0.007668f, 0.003937f, 0.001296f, 0.000274f, 0.000037f},
+ {0.000112f, 0.000831f, 0.003937f, 0.011960f, 0.023294f, 0.029091f, 0.023294f, 0.011960f, 0.003937f, 0.000831f, 0.000112f},
+ {0.000219f, 0.001619f, 0.007668f, 0.023294f, 0.045371f, 0.056662f, 0.045371f, 0.023294f, 0.007668f, 0.001619f, 0.000219f},
+ {0.000274f, 0.002021f, 0.009577f, 0.029091f, 0.056662f, 0.070762f, 0.056662f, 0.029091f, 0.009577f, 0.002021f, 0.000274f},
+ {0.000219f, 0.001619f, 0.007668f, 0.023294f, 0.045371f, 0.056662f, 0.045371f, 0.023294f, 0.007668f, 0.001619f, 0.000219f},
+ {0.000112f, 0.000831f, 0.003937f, 0.011960f, 0.023294f, 0.029091f, 0.023294f, 0.011960f, 0.003937f, 0.000831f, 0.000112f},
+ {0.000037f, 0.000274f, 0.001296f, 0.003937f, 0.007668f, 0.009577f, 0.007668f, 0.003937f, 0.001296f, 0.000274f, 0.000037f},
+ {0.000008f, 0.000058f, 0.000274f, 0.000831f, 0.001619f, 0.002021f, 0.001619f, 0.000831f, 0.000274f, 0.000058f, 0.000008f},
+ {0.000001f, 0.000008f, 0.000037f, 0.000112f, 0.000219f, 0.000274f, 0.000219f, 0.000112f, 0.000037f, 0.000008f, 0.000001f},
+};
+
+/*
+ * Equal weight square window.
+ * Each pixel is equally weighted (1/64) so that SUM(x) = 1.0
+ */
+#define SQUARE_LEN 8
+static const float g_square_window[SQUARE_LEN][SQUARE_LEN] = {
+ {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f},
+ {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f},
+ {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f},
+ {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f},
+ {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f},
+ {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f},
+ {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f},
+ {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f},
+};
+
+/* Holds intermediate SSIM values for map-reduce operation. */
+struct _ssim_int {
+ double l;
+ double c;
+ double s;
+};
+
+/* Defines the pointers to the map-reduce functions. */
+typedef int (*_map)(const struct _ssim_int *, void *);
+typedef float (*_reduce)(int, int, void *);
+
+/* Arguments for map-reduce. The 'context' is user-defined. */
+struct _map_reduce {
+ _map map;
+ _reduce reduce;
+ void *context;
+};
+
+/**
+ * Private method that calculates the SSIM value on a pre-processed image.
+ *
+ * The input images must have stride==width. This method does not scale.
+ *
+ * @note Image buffers are modified.
+ *
+ * Map-reduce is used for doing the final SSIM calculation. The map function is
+ * called for every pixel, and the reduce is called at the end. The context is
+ * caller-defined and *not* modified by this method.
+ *
+ * @param ref Original reference image
+ * @param cmp Distorted image
+ * @param w Width of the images
+ * @param h Height of the images
+ * @param k The kernel used as the window function
+ * @param mr Optional map-reduce functions to use to calculate SSIM. Required
+ * if 'args' is not null. Ignored if 'args' is null.
+ * @param args Optional SSIM arguments for fine control of the algorithm. 0 for defaults.
+ * Defaults are a=b=g=1.0, L=255, K1=0.01, K2=0.03
+ * @return The mean SSIM over the entire image (MSSIM), or INFINITY if error.
+ */
+float _iqa_ssim(float *ref, float *cmp, int w, int h, const struct _kernel *k, const struct _map_reduce *mr, const struct iqa_ssim_args *args);
+
+#endif /* _SSIM_H_ */
diff --git a/3rdparty/bgfx/3rdparty/iqa/source/convolve.c b/3rdparty/bgfx/3rdparty/iqa/source/convolve.c
new file mode 100644
index 00000000000..c9159070fd5
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/source/convolve.c
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "convolve.h"
+#include <stdlib.h>
+
+float KBND_SYMMETRIC(const float *img, int w, int h, int x, int y, float bnd_const)
+{
+ (void)bnd_const;
+ if (x<0) x=-1-x;
+ else if (x>=w) x=(w-(x-w))-1;
+ if (y<0) y=-1-y;
+ else if (y>=h) y=(h-(y-h))-1;
+ return img[y*w + x];
+}
+
+float KBND_REPLICATE(const float *img, int w, int h, int x, int y, float bnd_const)
+{
+ (void)bnd_const;
+ if (x<0) x=0;
+ if (x>=w) x=w-1;
+ if (y<0) y=0;
+ if (y>=h) y=h-1;
+ return img[y*w + x];
+}
+
+float KBND_CONSTANT(const float *img, int w, int h, int x, int y, float bnd_const)
+{
+ if (x<0) x=0;
+ if (y<0) y=0;
+ if (x>=w || y>=h)
+ return bnd_const;
+ return img[y*w + x];
+}
+
+static float _calc_scale(const struct _kernel *k)
+{
+ int ii,k_len;
+ double sum=0.0;
+
+ if (k->normalized)
+ return 1.0f;
+ else {
+ k_len = k->w * k->h;
+ for (ii=0; ii<k_len; ++ii)
+ sum += k->kernel[ii];
+ if (sum != 0.0)
+ return (float)(1.0 / sum);
+ return 1.0f;
+ }
+}
+
+void _iqa_convolve(float *img, int w, int h, const struct _kernel *k, float *result, int *rw, int *rh)
+{
+ int x,y,kx,ky,u,v;
+ int uc = k->w/2;
+ int vc = k->h/2;
+ int kw_even = (k->w&1)?0:1;
+ int kh_even = (k->h&1)?0:1;
+ int dst_w = w - k->w + 1;
+ int dst_h = h - k->h + 1;
+ int img_offset,k_offset;
+ double sum;
+ float scale, *dst=result;
+
+ if (!dst)
+ dst = img; /* Convolve in-place */
+
+ /* Kernel is applied to all positions where the kernel is fully contained
+ * in the image */
+ scale = _calc_scale(k);
+ for (y=0; y < dst_h; ++y) {
+ for (x=0; x < dst_w; ++x) {
+ sum = 0.0;
+ k_offset = 0;
+ ky = y+vc;
+ kx = x+uc;
+ for (v=-vc; v <= vc-kh_even; ++v) {
+ img_offset = (ky+v)*w + kx;
+ for (u=-uc; u <= uc-kw_even; ++u, ++k_offset) {
+ sum += img[img_offset+u] * k->kernel[k_offset];
+ }
+ }
+ dst[y*dst_w + x] = (float)(sum * scale);
+ }
+ }
+
+ if (rw) *rw = dst_w;
+ if (rh) *rh = dst_h;
+}
+
+int _iqa_img_filter(float *img, int w, int h, const struct _kernel *k, float *result)
+{
+ int x,y;
+ int img_offset;
+ float scale, *dst=result;
+
+ if (!k || !k->bnd_opt)
+ return 1;
+
+ if (!dst) {
+ dst = (float*)malloc(w*h*sizeof(float));
+ if (!dst)
+ return 2;
+ }
+
+ scale = _calc_scale(k);
+
+ /* Kernel is applied to all positions where top-left corner is in the image */
+ for (y=0; y < h; ++y) {
+ for (x=0; x < w; ++x) {
+ dst[y*w + x] = _iqa_filter_pixel(img, w, h, x, y, k, scale);
+ }
+ }
+
+ /* If no result buffer given, copy results to image buffer */
+ if (!result) {
+ for (y=0; y<h; ++y) {
+ img_offset = y*w;
+ for (x=0; x<w; ++x, ++img_offset) {
+ img[img_offset] = dst[img_offset];
+ }
+ }
+ free(dst);
+ }
+ return 0;
+}
+
+float _iqa_filter_pixel(const float *img, int w, int h, int x, int y, const struct _kernel *k, const float kscale)
+{
+ int u,v,uc,vc;
+ int kw_even,kh_even;
+ int x_edge_left,x_edge_right,y_edge_top,y_edge_bottom;
+ int edge,img_offset,k_offset;
+ double sum;
+
+ if (!k)
+ return img[y*w + x];
+
+ uc = k->w/2;
+ vc = k->h/2;
+ kw_even = (k->w&1)?0:1;
+ kh_even = (k->h&1)?0:1;
+ x_edge_left = uc;
+ x_edge_right = w-uc;
+ y_edge_top = vc;
+ y_edge_bottom = h-vc;
+
+ edge = 0;
+ if (x < x_edge_left || y < y_edge_top || x >= x_edge_right || y >= y_edge_bottom)
+ edge = 1;
+
+ sum = 0.0;
+ k_offset = 0;
+ for (v=-vc; v <= vc-kh_even; ++v) {
+ img_offset = (y+v)*w + x;
+ for (u=-uc; u <= uc-kw_even; ++u, ++k_offset) {
+ if (!edge)
+ sum += img[img_offset+u] * k->kernel[k_offset];
+ else
+ sum += k->bnd_opt(img, w, h, x+u, y+v, k->bnd_const) * k->kernel[k_offset];
+ }
+ }
+ return (float)(sum * kscale);
+}
diff --git a/3rdparty/bgfx/3rdparty/iqa/source/decimate.c b/3rdparty/bgfx/3rdparty/iqa/source/decimate.c
new file mode 100644
index 00000000000..91c6a9be3ed
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/source/decimate.c
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "decimate.h"
+#include <stdlib.h>
+
+int _iqa_decimate(float *img, int w, int h, int factor, const struct _kernel *k, float *result, int *rw, int *rh)
+{
+ int x,y;
+ int sw = w/factor + (w&1);
+ int sh = h/factor + (h&1);
+ int dst_offset;
+ float *dst=img;
+
+ if (result)
+ dst = result;
+
+ /* Downsample */
+ for (y=0; y<sh; ++y) {
+ dst_offset = y*sw;
+ for (x=0; x<sw; ++x,++dst_offset) {
+ dst[dst_offset] = _iqa_filter_pixel(img, w, h, x*factor, y*factor, k, 1.0f);
+ }
+ }
+
+ if (rw) *rw = sw;
+ if (rh) *rh = sh;
+ return 0;
+}
diff --git a/3rdparty/bgfx/3rdparty/iqa/source/math_utils.c b/3rdparty/bgfx/3rdparty/iqa/source/math_utils.c
new file mode 100644
index 00000000000..83f923d7673
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/source/math_utils.c
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "math_utils.h"
+#include <math.h>
+
+int _round(float a)
+{
+ int sign_a = a > 0.0f ? 1 : -1;
+ return a-(int)a >= 0.5 ? (int)a + sign_a : (int)a;
+}
+
+int _max(int x, int y)
+{
+ return x >= y ? x : y;
+}
+
+int _min(int x, int y)
+{
+ return x <= y ? x : y;
+}
+
+int _cmp_float(float a, float b, int digits)
+{
+ /* Round */
+ int sign_a = a > 0.0f ? 1 : -1;
+ int sign_b = b > 0.0f ? 1 : -1;
+ double scale = pow(10.0, (double)digits);
+ double ax = a * scale;
+ double bx = b * scale;
+ int ai = ax-(int)ax >= 0.5 ? (int)ax + sign_a : (int)ax;
+ int bi = bx-(int)bx >= 0.5 ? (int)bx + sign_b : (int)bx;
+
+ /* Compare */
+ return ai == bi ? 0 : 1;
+}
+
+int _matrix_cmp(const float *a, const float *b, int w, int h, int digits)
+{
+ int offset;
+ int result=0;
+ int len=w*h;
+ for (offset=0; offset<len; ++offset) {
+ if (_cmp_float(a[offset], b[offset], digits)) {
+ result = 1;
+ break;
+ }
+ }
+
+ return result;
+}
+
diff --git a/3rdparty/bgfx/3rdparty/iqa/source/ms_ssim.c b/3rdparty/bgfx/3rdparty/iqa/source/ms_ssim.c
new file mode 100644
index 00000000000..91812a07722
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/source/ms_ssim.c
@@ -0,0 +1,277 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "iqa.h"
+#include "ssim.h"
+#include "decimate.h"
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Default number of scales */
+#define SCALES 5
+
+/* Low-pass filter for down-sampling (9/7 biorthogonal wavelet filter) */
+#define LPF_LEN 9
+static const float g_lpf[LPF_LEN][LPF_LEN] = {
+ { 0.000714f,-0.000450f,-0.002090f, 0.007132f, 0.016114f, 0.007132f,-0.002090f,-0.000450f, 0.000714f},
+ {-0.000450f, 0.000283f, 0.001316f,-0.004490f,-0.010146f,-0.004490f, 0.001316f, 0.000283f,-0.000450f},
+ {-0.002090f, 0.001316f, 0.006115f,-0.020867f,-0.047149f,-0.020867f, 0.006115f, 0.001316f,-0.002090f},
+ { 0.007132f,-0.004490f,-0.020867f, 0.071207f, 0.160885f, 0.071207f,-0.020867f,-0.004490f, 0.007132f},
+ { 0.016114f,-0.010146f,-0.047149f, 0.160885f, 0.363505f, 0.160885f,-0.047149f,-0.010146f, 0.016114f},
+ { 0.007132f,-0.004490f,-0.020867f, 0.071207f, 0.160885f, 0.071207f,-0.020867f,-0.004490f, 0.007132f},
+ {-0.002090f, 0.001316f, 0.006115f,-0.020867f,-0.047149f,-0.020867f, 0.006115f, 0.001316f,-0.002090f},
+ {-0.000450f, 0.000283f, 0.001316f,-0.004490f,-0.010146f,-0.004490f, 0.001316f, 0.000283f,-0.000450f},
+ { 0.000714f,-0.000450f,-0.002090f, 0.007132f, 0.016114f, 0.007132f,-0.002090f,-0.000450f, 0.000714f},
+};
+
+/* Alpha, beta, and gamma values for each scale */
+static float g_alphas[] = { 0.0000f, 0.0000f, 0.0000f, 0.0000f, 0.1333f };
+static float g_betas[] = { 0.0448f, 0.2856f, 0.3001f, 0.2363f, 0.1333f };
+static float g_gammas[] = { 0.0448f, 0.2856f, 0.3001f, 0.2363f, 0.1333f };
+
+
+struct _context {
+ double l; /* Luminance */
+ double c; /* Contrast */
+ double s; /* Structure */
+ float alpha;
+ float beta;
+ float gamma;
+};
+
+/* Called for each pixel */
+int _ms_ssim_map(const struct _ssim_int *si, void *ctx)
+{
+ struct _context *ms_ctx = (struct _context*)ctx;
+ ms_ctx->l += si->l;
+ ms_ctx->c += si->c;
+ ms_ctx->s += si->s;
+ return 0;
+}
+
+/* Called to calculate the final result */
+float _ms_ssim_reduce(int w, int h, void *ctx)
+{
+ double size = (double)(w*h);
+ struct _context *ms_ctx = (struct _context*)ctx;
+ ms_ctx->l = pow(ms_ctx->l / size, (double)ms_ctx->alpha);
+ ms_ctx->c = pow(ms_ctx->c / size, (double)ms_ctx->beta);
+ ms_ctx->s = pow(fabs(ms_ctx->s / size), (double)ms_ctx->gamma);
+ return (float)(ms_ctx->l * ms_ctx->c * ms_ctx->s);
+}
+
+/* Releases the scaled buffers */
+void _free_buffers(float **buf, int scales)
+{
+ int idx;
+ for (idx=0; idx<scales; ++idx)
+ free(buf[idx]);
+}
+
+/* Allocates the scaled buffers. If error, all buffers are free'd */
+int _alloc_buffers(float **buf, int w, int h, int scales)
+{
+ int idx;
+ int cur_w = w;
+ int cur_h = h;
+ for (idx=0; idx<scales; ++idx) {
+ buf[idx] = (float*)malloc(cur_w*cur_h*sizeof(float));
+ if (!buf[idx]) {
+ _free_buffers(buf, idx);
+ return 1;
+ }
+ cur_w = cur_w/2 + (cur_w&1);
+ cur_h = cur_h/2 + (cur_h&1);
+ }
+ return 0;
+}
+
+/*
+ * MS_SSIM(X,Y) = Lm(x,y)^aM * MULT[j=1->M]( Cj(x,y)^bj * Sj(x,y)^gj )
+ * where,
+ * L = mean
+ * C = variance
+ * S = cross-correlation
+ *
+ * b1=g1=0.0448, b2=g2=0.2856, b3=g3=0.3001, b4=g4=0.2363, a5=b5=g5=0.1333
+ */
+float iqa_ms_ssim(const unsigned char *ref, const unsigned char *cmp, int w, int h,
+ int stride, const struct iqa_ms_ssim_args *args)
+{
+ int wang=0;
+ int scales=SCALES;
+ int gauss=1;
+ const float *alphas=g_alphas, *betas=g_betas, *gammas=g_gammas;
+ int idx,x,y,cur_w,cur_h;
+ int offset,src_offset;
+ float **ref_imgs, **cmp_imgs; /* Array of pointers to scaled images */
+ float msssim;
+ struct _kernel lpf, window;
+ struct iqa_ssim_args s_args;
+ struct _map_reduce mr;
+ struct _context ms_ctx;
+
+ if (args) {
+ wang = args->wang;
+ gauss = args->gaussian;
+ scales = args->scales;
+ if (args->alphas)
+ alphas = args->alphas;
+ if (args->betas)
+ betas = args->betas;
+ if (args->gammas)
+ gammas = args->gammas;
+ }
+
+ /* Make sure we won't scale below 1x1 */
+ cur_w = w;
+ cur_h = h;
+ for (idx=0; idx<scales; ++idx) {
+ if ( gauss ? cur_w<GAUSSIAN_LEN || cur_h<GAUSSIAN_LEN : cur_w<LPF_LEN || cur_h<LPF_LEN )
+ return INFINITY;
+ cur_w /= 2;
+ cur_h /= 2;
+ }
+
+ window.kernel = (float*)g_square_window;
+ window.w = window.h = SQUARE_LEN;
+ window.normalized = 1;
+ window.bnd_opt = KBND_SYMMETRIC;
+ if (gauss) {
+ window.kernel = (float*)g_gaussian_window;
+ window.w = window.h = GAUSSIAN_LEN;
+ }
+
+ mr.map = _ms_ssim_map;
+ mr.reduce = _ms_ssim_reduce;
+
+ /* Allocate the scaled image buffers */
+ ref_imgs = (float**)malloc(scales*sizeof(float*));
+ cmp_imgs = (float**)malloc(scales*sizeof(float*));
+ if (!ref_imgs || !cmp_imgs) {
+ if (ref_imgs) free(ref_imgs);
+ if (cmp_imgs) free(cmp_imgs);
+ return INFINITY;
+ }
+ if (_alloc_buffers(ref_imgs, w, h, scales)) {
+ free(ref_imgs);
+ free(cmp_imgs);
+ return INFINITY;
+ }
+ if (_alloc_buffers(cmp_imgs, w, h, scales)) {
+ _free_buffers(ref_imgs, scales);
+ free(ref_imgs);
+ free(cmp_imgs);
+ return INFINITY;
+ }
+
+ /* Copy original images into first scale buffer, forcing stride = width. */
+ for (y=0; y<h; ++y) {
+ src_offset = y*stride;
+ offset = y*w;
+ for (x=0; x<w; ++x, ++offset, ++src_offset) {
+ ref_imgs[0][offset] = (float)ref[src_offset];
+ cmp_imgs[0][offset] = (float)cmp[src_offset];
+ }
+ }
+
+ /* Create scaled versions of the images */
+ cur_w=w;
+ cur_h=h;
+ lpf.kernel = (float*)g_lpf;
+ lpf.w = lpf.h = LPF_LEN;
+ lpf.normalized = 1;
+ lpf.bnd_opt = KBND_SYMMETRIC;
+ for (idx=1; idx<scales; ++idx) {
+ if (_iqa_decimate(ref_imgs[idx-1], cur_w, cur_h, 2, &lpf, ref_imgs[idx], 0, 0) ||
+ _iqa_decimate(cmp_imgs[idx-1], cur_w, cur_h, 2, &lpf, cmp_imgs[idx], &cur_w, &cur_h))
+ {
+ _free_buffers(ref_imgs, scales);
+ _free_buffers(cmp_imgs, scales);
+ free(ref_imgs);
+ free(cmp_imgs);
+ return INFINITY;
+ }
+ }
+
+ cur_w=w;
+ cur_h=h;
+ msssim = 1.0;
+ for (idx=0; idx<scales; ++idx) {
+
+ ms_ctx.l = 0;
+ ms_ctx.c = 0;
+ ms_ctx.s = 0;
+ ms_ctx.alpha = alphas[idx];
+ ms_ctx.beta = betas[idx];
+ ms_ctx.gamma = gammas[idx];
+
+ if (!wang) {
+ /* MS-SSIM* (Rouse/Hemami) */
+ s_args.alpha = 1.0f;
+ s_args.beta = 1.0f;
+ s_args.gamma = 1.0f;
+ s_args.K1 = 0.0f; /* Force stabilization constants to 0 */
+ s_args.K2 = 0.0f;
+ s_args.L = 255;
+ s_args.f = 1; /* Don't resize */
+ mr.context = &ms_ctx;
+ msssim *= _iqa_ssim(ref_imgs[idx], cmp_imgs[idx], cur_w, cur_h, &window, &mr, &s_args);
+ }
+ else {
+ /* MS-SSIM (Wang) */
+ s_args.alpha = 1.0f;
+ s_args.beta = 1.0f;
+ s_args.gamma = 1.0f;
+ s_args.K1 = 0.01f;
+ s_args.K2 = 0.03f;
+ s_args.L = 255;
+ s_args.f = 1; /* Don't resize */
+ mr.context = &ms_ctx;
+ msssim *= _iqa_ssim(ref_imgs[idx], cmp_imgs[idx], cur_w, cur_h, &window, &mr, &s_args);
+ }
+
+ if (msssim == INFINITY)
+ break;
+ cur_w = cur_w/2 + (cur_w&1);
+ cur_h = cur_h/2 + (cur_h&1);
+ }
+
+ _free_buffers(ref_imgs, scales);
+ _free_buffers(cmp_imgs, scales);
+ free(ref_imgs);
+ free(cmp_imgs);
+
+ return msssim;
+}
diff --git a/3rdparty/bgfx/3rdparty/iqa/source/mse.c b/3rdparty/bgfx/3rdparty/iqa/source/mse.c
new file mode 100644
index 00000000000..da0ce772e45
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/source/mse.c
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "iqa.h"
+
+/* MSE(a,b) = 1/N * SUM((a-b)^2) */
+float iqa_mse(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride)
+{
+ int error, offset;
+ unsigned long long sum=0;
+ int ww,hh;
+ for (hh=0; hh<h; ++hh) {
+ offset = hh*stride;
+ for (ww=0; ww<w; ++ww, ++offset) {
+ error = ref[offset] - cmp[offset];
+ sum += error * error;
+ }
+ }
+ return (float)( (double)sum / (double)(w*h) );
+}
diff --git a/3rdparty/bgfx/3rdparty/iqa/source/psnr.c b/3rdparty/bgfx/3rdparty/iqa/source/psnr.c
new file mode 100644
index 00000000000..45670716505
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/source/psnr.c
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "iqa.h"
+#include <math.h>
+
+/* PSNR(a,b) = 10*log10(L^2 / MSE(a,b)), where L=2^b - 1 (8bit = 255) */
+float iqa_psnr(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride)
+{
+ const int L_sqd = 255 * 255;
+ return (float)( 10.0 * log10( L_sqd / iqa_mse(ref,cmp,w,h,stride) ) );
+}
diff --git a/3rdparty/bgfx/3rdparty/iqa/source/ssim.c b/3rdparty/bgfx/3rdparty/iqa/source/ssim.c
new file mode 100644
index 00000000000..d1acccb40fb
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/iqa/source/ssim.c
@@ -0,0 +1,322 @@
+/*
+ * Copyright (c) 2011, Tom Distler (http://tdistler.com)
+ * All rights reserved.
+ *
+ * The BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the tdistler.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "iqa.h"
+#include "convolve.h"
+#include "decimate.h"
+#include "math_utils.h"
+#include "ssim.h"
+#include <stdlib.h>
+#include <math.h>
+
+
+/* Forward declarations. */
+IQA_INLINE static double _calc_luminance(float, float, float, float);
+IQA_INLINE static double _calc_contrast(double, float, float, float, float);
+IQA_INLINE static double _calc_structure(float, double, float, float, float, float);
+static int _ssim_map(const struct _ssim_int *, void *);
+static float _ssim_reduce(int, int, void *);
+
+/*
+ * SSIM(x,y)=(2*ux*uy + C1)*(2sxy + C2) / (ux^2 + uy^2 + C1)*(sx^2 + sy^2 + C2)
+ * where,
+ * ux = SUM(w*x)
+ * sx = (SUM(w*(x-ux)^2)^0.5
+ * sxy = SUM(w*(x-ux)*(y-uy))
+ *
+ * Returns mean SSIM. MSSIM(X,Y) = 1/M * SUM(SSIM(x,y))
+ */
+float iqa_ssim(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride,
+ int gaussian, const struct iqa_ssim_args *args)
+{
+ int scale;
+ int x,y,src_offset,offset;
+ float *ref_f,*cmp_f;
+ struct _kernel low_pass;
+ struct _kernel window;
+ float result;
+ double ssim_sum=0.0;
+ struct _map_reduce mr;
+
+ /* Initialize algorithm parameters */
+ scale = _max( 1, _round( (float)_min(w,h) / 256.0f ) );
+ if (args) {
+ if(args->f)
+ scale = args->f;
+ mr.map = _ssim_map;
+ mr.reduce = _ssim_reduce;
+ mr.context = (void*)&ssim_sum;
+ }
+ window.kernel = (float*)g_square_window;
+ window.w = window.h = SQUARE_LEN;
+ window.normalized = 1;
+ window.bnd_opt = KBND_SYMMETRIC;
+ if (gaussian) {
+ window.kernel = (float*)g_gaussian_window;
+ window.w = window.h = GAUSSIAN_LEN;
+ }
+
+ /* Convert image values to floats. Forcing stride = width. */
+ ref_f = (float*)malloc(w*h*sizeof(float));
+ cmp_f = (float*)malloc(w*h*sizeof(float));
+ if (!ref_f || !cmp_f) {
+ if (ref_f) free(ref_f);
+ if (cmp_f) free(cmp_f);
+ return INFINITY;
+ }
+ for (y=0; y<h; ++y) {
+ src_offset = y*stride;
+ offset = y*w;
+ for (x=0; x<w; ++x, ++offset, ++src_offset) {
+ ref_f[offset] = (float)ref[src_offset];
+ cmp_f[offset] = (float)cmp[src_offset];
+ }
+ }
+
+ /* Scale the images down if required */
+ if (scale > 1) {
+ /* Generate simple low-pass filter */
+ low_pass.kernel = (float*)malloc(scale*scale*sizeof(float));
+ if (!low_pass.kernel) {
+ free(ref_f);
+ free(cmp_f);
+ return INFINITY;
+ }
+ low_pass.w = low_pass.h = scale;
+ low_pass.normalized = 0;
+ low_pass.bnd_opt = KBND_SYMMETRIC;
+ for (offset=0; offset<scale*scale; ++offset)
+ low_pass.kernel[offset] = 1.0f/(scale*scale);
+
+ /* Resample */
+ if (_iqa_decimate(ref_f, w, h, scale, &low_pass, 0, 0, 0) ||
+ _iqa_decimate(cmp_f, w, h, scale, &low_pass, 0, &w, &h)) { /* Update w/h */
+ free(ref_f);
+ free(cmp_f);
+ free(low_pass.kernel);
+ return INFINITY;
+ }
+ free(low_pass.kernel);
+ }
+
+ result = _iqa_ssim(ref_f, cmp_f, w, h, &window, &mr, args);
+
+ free(ref_f);
+ free(cmp_f);
+
+ return result;
+}
+
+
+/* _iqa_ssim */
+float _iqa_ssim(float *ref, float *cmp, int w, int h, const struct _kernel *k, const struct _map_reduce *mr, const struct iqa_ssim_args *args)
+{
+ float alpha=1.0f, beta=1.0f, gamma=1.0f;
+ int L=255;
+ float K1=0.01f, K2=0.03f;
+ float C1,C2,C3;
+ int x,y,offset;
+ float *ref_mu,*cmp_mu,*ref_sigma_sqd,*cmp_sigma_sqd,*sigma_both;
+ double ssim_sum, numerator, denominator;
+ double luminance_comp, contrast_comp, structure_comp, sigma_root;
+ struct _ssim_int sint;
+
+ /* Initialize algorithm parameters */
+ if (args) {
+ if (!mr)
+ return INFINITY;
+ alpha = args->alpha;
+ beta = args->beta;
+ gamma = args->gamma;
+ L = args->L;
+ K1 = args->K1;
+ K2 = args->K2;
+ }
+ C1 = (K1*L)*(K1*L);
+ C2 = (K2*L)*(K2*L);
+ C3 = C2 / 2.0f;
+
+ ref_mu = (float*)malloc(w*h*sizeof(float));
+ cmp_mu = (float*)malloc(w*h*sizeof(float));
+ ref_sigma_sqd = (float*)malloc(w*h*sizeof(float));
+ cmp_sigma_sqd = (float*)malloc(w*h*sizeof(float));
+ sigma_both = (float*)malloc(w*h*sizeof(float));
+ if (!ref_mu || !cmp_mu || !ref_sigma_sqd || !cmp_sigma_sqd || !sigma_both) {
+ if (ref_mu) free(ref_mu);
+ if (cmp_mu) free(cmp_mu);
+ if (ref_sigma_sqd) free(ref_sigma_sqd);
+ if (cmp_sigma_sqd) free(cmp_sigma_sqd);
+ if (sigma_both) free(sigma_both);
+ return INFINITY;
+ }
+
+ /* Calculate mean */
+ _iqa_convolve(ref, w, h, k, ref_mu, 0, 0);
+ _iqa_convolve(cmp, w, h, k, cmp_mu, 0, 0);
+
+ for (y=0; y<h; ++y) {
+ offset = y*w;
+ for (x=0; x<w; ++x, ++offset) {
+ ref_sigma_sqd[offset] = ref[offset] * ref[offset];
+ cmp_sigma_sqd[offset] = cmp[offset] * cmp[offset];
+ sigma_both[offset] = ref[offset] * cmp[offset];
+ }
+ }
+
+ /* Calculate sigma */
+ _iqa_convolve(ref_sigma_sqd, w, h, k, 0, 0, 0);
+ _iqa_convolve(cmp_sigma_sqd, w, h, k, 0, 0, 0);
+ _iqa_convolve(sigma_both, w, h, k, 0, &w, &h); /* Update the width and height */
+
+ /* The convolution results are smaller by the kernel width and height */
+ for (y=0; y<h; ++y) {
+ offset = y*w;
+ for (x=0; x<w; ++x, ++offset) {
+ ref_sigma_sqd[offset] -= ref_mu[offset] * ref_mu[offset];
+ cmp_sigma_sqd[offset] -= cmp_mu[offset] * cmp_mu[offset];
+ sigma_both[offset] -= ref_mu[offset] * cmp_mu[offset];
+ }
+ }
+
+ ssim_sum = 0.0;
+ for (y=0; y<h; ++y) {
+ offset = y*w;
+ for (x=0; x<w; ++x, ++offset) {
+
+ if (!args) {
+ /* The default case */
+ numerator = (2.0 * ref_mu[offset] * cmp_mu[offset] + C1) * (2.0 * sigma_both[offset] + C2);
+ denominator = (ref_mu[offset]*ref_mu[offset] + cmp_mu[offset]*cmp_mu[offset] + C1) *
+ (ref_sigma_sqd[offset] + cmp_sigma_sqd[offset] + C2);
+ ssim_sum += numerator / denominator;
+ }
+ else {
+ /* User tweaked alpha, beta, or gamma */
+
+ /* passing a negative number to sqrt() cause a domain error */
+ if (ref_sigma_sqd[offset] < 0.0f)
+ ref_sigma_sqd[offset] = 0.0f;
+ if (cmp_sigma_sqd[offset] < 0.0f)
+ cmp_sigma_sqd[offset] = 0.0f;
+ sigma_root = sqrt(ref_sigma_sqd[offset] * cmp_sigma_sqd[offset]);
+
+ luminance_comp = _calc_luminance(ref_mu[offset], cmp_mu[offset], C1, alpha);
+ contrast_comp = _calc_contrast(sigma_root, ref_sigma_sqd[offset], cmp_sigma_sqd[offset], C2, beta);
+ structure_comp = _calc_structure(sigma_both[offset], sigma_root, ref_sigma_sqd[offset], cmp_sigma_sqd[offset], C3, gamma);
+
+ sint.l = luminance_comp;
+ sint.c = contrast_comp;
+ sint.s = structure_comp;
+
+ if (mr->map(&sint, mr->context))
+ return INFINITY;
+ }
+ }
+ }
+
+ free(ref_mu);
+ free(cmp_mu);
+ free(ref_sigma_sqd);
+ free(cmp_sigma_sqd);
+ free(sigma_both);
+
+ if (!args)
+ return (float)(ssim_sum / (double)(w*h));
+ return mr->reduce(w, h, mr->context);
+}
+
+
+/* _ssim_map */
+int _ssim_map(const struct _ssim_int *si, void *ctx)
+{
+ double *ssim_sum = (double*)ctx;
+ *ssim_sum += si->l * si->c * si->s;
+ return 0;
+}
+
+/* _ssim_reduce */
+float _ssim_reduce(int w, int h, void *ctx)
+{
+ double *ssim_sum = (double*)ctx;
+ return (float)(*ssim_sum / (double)(w*h));
+}
+
+
+/* _calc_luminance */
+IQA_INLINE static double _calc_luminance(float mu1, float mu2, float C1, float alpha)
+{
+ double result;
+ float sign;
+ /* For MS-SSIM* */
+ if (C1 == 0 && mu1*mu1 == 0 && mu2*mu2 == 0)
+ return 1.0;
+ result = (2.0 * mu1 * mu2 + C1) / (mu1*mu1 + mu2*mu2 + C1);
+ if (alpha == 1.0f)
+ return result;
+ sign = result < 0.0 ? -1.0f : 1.0f;
+ return sign * pow(fabs(result),(double)alpha);
+}
+
+/* _calc_contrast */
+IQA_INLINE static double _calc_contrast(double sigma_comb_12, float sigma1_sqd, float sigma2_sqd, float C2, float beta)
+{
+ double result;
+ float sign;
+ /* For MS-SSIM* */
+ if (C2 == 0 && sigma1_sqd + sigma2_sqd == 0)
+ return 1.0;
+ result = (2.0 * sigma_comb_12 + C2) / (sigma1_sqd + sigma2_sqd + C2);
+ if (beta == 1.0f)
+ return result;
+ sign = result < 0.0 ? -1.0f : 1.0f;
+ return sign * pow(fabs(result),(double)beta);
+}
+
+/* _calc_structure */
+IQA_INLINE static double _calc_structure(float sigma_12, double sigma_comb_12, float sigma1, float sigma2, float C3, float gamma)
+{
+ double result;
+ float sign;
+ /* For MS-SSIM* */
+ if (C3 == 0 && sigma_comb_12 == 0) {
+ if (sigma1 == 0 && sigma2 == 0)
+ return 1.0;
+ else if (sigma1 == 0 || sigma2 == 0)
+ return 0.0;
+ }
+ result = (sigma_12 + C3) / (sigma_comb_12 + C3);
+ if (gamma == 1.0f)
+ return result;
+ sign = result < 0.0 ? -1.0f : 1.0f;
+ return sign * pow(fabs(result),(double)gamma);
+} \ No newline at end of file
diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
index 77fe7decfdc..b09e71cba59 100644
--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
+++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
@@ -1,4 +1,4 @@
-// dear imgui, v1.48 WIP
+// dear imgui, v1.49 WIP
// (main code and documentation)
// See ImGui::ShowTestWindow() in imgui_demo.cpp for demo code.
@@ -152,6 +152,8 @@
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
Also read releases logs https://github.com/ocornut/imgui/releases for more details.
+ - 2016/04/03 (1.48) - removed style.WindowFillAlphaDefault setting which was redundant. Bake default BG alpha inside style.Colors[ImGuiCol_WindowBg] and all other Bg color values. (ref github issue #337).
+ - 2016/04/03 (1.48) - renamed ImGuiCol_TooltipBg to ImGuiCol_PopupBg, used by popups/menus and tooltips. popups/menus were previously using ImGuiCol_WindowBg. (ref github issue #337)
- 2016/03/21 (1.48) - renamed GetWindowFont() to GetFont(), GetWindowFontSize() to GetFontSize(). Kept inline redirection function (will obsolete).
- 2016/03/02 (1.48) - InputText() completion/history/always callbacks: if you modify the text buffer manually (without using DeleteChars()/InsertChars() helper) you need to maintain the BufTextLen field. added an assert.
- 2016/01/23 (1.48) - fixed not honoring exact width passed to PushItemWidth(), previously it would add extra FramePadding.x*2 over that width. if you had manual pixel-perfect alignment in place it might affect you.
@@ -439,6 +441,7 @@
!- window: begin with *p_opened == false should return false.
- window: get size/pos helpers given names (see discussion in #249)
- window: a collapsed window can be stuck behind the main menu bar?
+ - window: when window is small, prioritize resize button over close button.
- window: detect extra End() call that pop the "Debug" window out and assert at call site instead of later.
- window/tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic.
- window: increase minimum size of a window with menus or fix the menu rendering so that it doesn't look odd.
@@ -448,15 +451,19 @@
- widgets: display mode: widget-label, label-widget (aligned on column or using fixed size), label-newline-tab-widget etc.
- widgets: clean up widgets internal toward exposing everything.
- widgets: add disabled and read-only modes (#211)
- - main: considering adding EndFrame()/Init(). some constructs are awkward in the implementation because of the lack of them.
- - main: make it so that a frame with no window registered won't refocus every window on subsequent frames (~bump LastFrameActive of all windows).
+ - main: considering adding an Init() function? some constructs are awkward in the implementation because of the lack of them.
+!- main: make it so that a frame with no window registered won't refocus every window on subsequent frames (~bump LastFrameActive of all windows).
- main: IsItemHovered() make it more consistent for various type of widgets, widgets with multiple components, etc. also effectively IsHovered() region sometimes differs from hot region, e.g tree nodes
- main: IsItemHovered() info stored in a stack? so that 'if TreeNode() { Text; TreePop; } if IsHovered' return the hover state of the TreeNode?
- - input text: add ImGuiInputTextFlags_EnterToApply? (off #218)
+ - input text: clean up the mess caused by converting UTF-8 <> wchar. the code is rather inefficient right now.
- input text: reorganize event handling, allow CharFilter to modify buffers, allow multiple events? (#541)
+ - input text: flag to disable live update of the user buffer (also applies to float/int text input)
+ - input text: resize behavior - field could stretch when being edited? hover tooltip shows more text?
+ - input text: add ImGuiInputTextFlags_EnterToApply? (off #218)
- input text multi-line: don't directly call AddText() which does an unnecessary vertex reserve for character count prior to clipping. and/or more line-based clipping to AddText(). and/or reorganize TextUnformatted/RenderText for more efficiency for large text (e.g TextUnformatted could clip and log separately, etc).
- input text multi-line: way to dynamically grow the buffer without forcing the user to initially allocate for worse case (follow up on #200)
- input text multi-line: line numbers? status bar? (follow up on #200)
+ - input text: allow centering/positioning text so that ctrl+clicking Drag or Slider keeps the textual value at the same pixel position.
- input number: optional range min/max for Input*() functions
- input number: holding [-]/[+] buttons could increase the step speed non-linearly (or user-controlled)
- input number: use mouse wheel to step up/down
@@ -495,10 +502,11 @@
- statusbar: add a per-window status bar helper similar to what menubar does.
- tabs (#261, #351)
- separator: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y)
- - color: the color helpers/typing is a mess and needs sorting out.
+!- color: the color helpers/typing is a mess and needs sorting out.
- color: add a better color picker (#346)
- node/graph editor (#306)
- pie menus patterns (#434)
+ - drag'n drop, dragging helpers (carry dragging info, visualize drag source before clicking, drop target, etc.) (#143, #479)
- plot: PlotLines() should use the polygon-stroke facilities (currently issues with averaging normals)
- plot: make it easier for user to draw extra stuff into the graph (e.g: draw basis, highlight certain points, 2d plots, multiple plots)
- plot: "smooth" automatic scale over time, user give an input 0.0(full user scale) 1.0(full derived from value)
@@ -510,14 +518,11 @@
- slider & drag: int data passing through a float
- drag float: up/down axis
- drag float: added leeway on edge (e.g. a few invisible steps past the clamp limits)
- - text edit: clean up the mess caused by converting UTF-8 <> wchar. the code is rather inefficient right now.
- - text edit: centered text for slider as input text so it matches typical positioning.
- - text edit: flag to disable live update of the user buffer.
- - text edit: field resize behavior - field could stretch when being edited? hover tooltip shows more text?
- tree node / optimization: avoid formatting when clipped.
- tree node: clarify spacing, perhaps provide API to query exact spacing. provide API to draw the primitive. same with Bullet().
- tree node: tree-node/header right-most side doesn't take account of horizontal scrolling.
- tree node: add treenode/treepush int variants? because (void*) cast from int warns on some platforms/settings
+ - tree node: try to apply scrolling at time of TreePop() if node was just opened and end of node is past scrolling limits?
- tree node / selectable render mismatch which is visible if you use them both next to each other (e.g. cf. property viewer)
- textwrapped: figure out better way to use TextWrapped() in an always auto-resize context (tooltip, etc.) (git issue #249)
- settings: write more decent code to allow saving/loading new fields
@@ -527,6 +532,7 @@
- style: color-box not always square?
- style: a concept of "compact style" that the end-user can easily rely on (e.g. PushStyleCompact()?) that maps to other settings? avoid implementing duplicate helpers such as SmallCheckbox(), etc.
- style: try to make PushStyleVar() more robust to incorrect parameters (to be more friendly to edit & continues situation).
+ - style/opt: PopStyleVar could be optimized by having GetStyleVar returns the type, using a table mapping stylevar enum to data type.
- style: global scale setting.
- text: simple markup language for color change?
- font: dynamic font atlas to avoid baking huge ranges into bitmap and make scaling easier.
@@ -550,7 +556,8 @@
- style editor: have a more global HSV setter (e.g. alter hue on all elements). consider replacing active/hovered by offset in HSV space? (#438)
- style editor: color child window height expressed in multiple of line height.
- remote: make a system like RemoteImGui first-class citizen/project (#75)
- - drawlist: user probably can't call Clear() because we expect a texture to be pushed in the stack.
+!- demo: custom render demo pushes a clipping rectangle past parent window bounds. expose ImGui::PushClipRect() from imgui_internal.h?
+ - drawlist: end-user probably can't call Clear() directly because we expect a texture to be pushed in the stack.
- examples: directx9/directx11: save/restore device state more thoroughly.
- optimization: use another hash function than crc32, e.g. FNV1a
- optimization/render: merge command-lists with same clip-rect into one even if they aren't sequential? (as long as in-between clip rectangle don't overlap)?
@@ -595,6 +602,7 @@
#pragma clang diagnostic ignored "-Wmissing-noreturn" // warning : function xx could be declared with attribute 'noreturn' warning // GetDefaultFontData() asserts which some implementation makes it never return.
#pragma clang diagnostic ignored "-Wdeprecated-declarations"// warning : 'xx' is deprecated: The POSIX name for this item.. // for strdup used in demo code (so user can copy & paste the code)
#pragma clang diagnostic ignored "-Wint-to-void-pointer-cast" // warning : cast to 'void *' from smaller integer type 'int'
+#pragma clang diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used
#endif
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used
@@ -689,13 +697,12 @@ ImGuiStyle::ImGuiStyle()
WindowMinSize = ImVec2(32,32); // Minimum window size
WindowRounding = 9.0f; // Radius of window corners rounding. Set to 0.0f to have rectangular windows
WindowTitleAlign = ImGuiAlign_Left; // Alignment for title bar text
- ChildWindowRounding = 0.0f; // Radius of child window corners rounding. Set to 0.0f to have rectangular windows
+ ChildWindowRounding = 0.0f; // Radius of child window corners rounding. Set to 0.0f to have rectangular child windows
FramePadding = ImVec2(4,3); // Padding within a framed rectangle (used by most widgets)
FrameRounding = 0.0f; // Radius of frame corners rounding. Set to 0.0f to have rectangular frames (used by most widgets).
ItemSpacing = ImVec2(8,4); // Horizontal and vertical spacing between widgets/lines
ItemInnerSpacing = ImVec2(4,4); // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label)
TouchExtraPadding = ImVec2(0,0); // Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
- WindowFillAlphaDefault = 0.70f; // Default alpha of window background, if not specified in ImGui::Begin()
IndentSpacing = 22.0f; // Horizontal spacing when e.g. entering a tree node
ColumnsMinSpacing = 6.0f; // Minimum horizontal spacing between two columns
ScrollbarSize = 16.0f; // Width of the vertical scrollbar, Height of the horizontal scrollbar
@@ -710,8 +717,9 @@ ImGuiStyle::ImGuiStyle()
Colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f);
Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
- Colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
+ Colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.70f);
Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
+ Colors[ImGuiCol_PopupBg] = ImVec4(0.05f, 0.05f, 0.10f, 0.90f);
Colors[ImGuiCol_Border] = ImVec4(0.70f, 0.70f, 0.70f, 0.65f);
Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
Colors[ImGuiCol_FrameBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.30f); // Background of checkbox, radio button, plot, slider, text input
@@ -749,7 +757,6 @@ ImGuiStyle::ImGuiStyle()
Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
- Colors[ImGuiCol_TooltipBg] = ImVec4(0.05f, 0.05f, 0.10f, 0.90f);
Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
}
@@ -788,6 +795,14 @@ ImGuiIO::ImGuiIO()
GetClipboardTextFn = GetClipboardTextFn_DefaultImpl; // Platform dependent default implementations
SetClipboardTextFn = SetClipboardTextFn_DefaultImpl;
ImeSetInputScreenPosFn = ImeSetInputScreenPosFn_DefaultImpl;
+
+ // Set OS X style defaults based on __APPLE__ compile time flag
+#ifdef __APPLE__
+ WordMovementUsesAltKey = true; // OS X style: Text editing cursor movement using Alt instead of Ctrl
+ ShortcutsUseSuperKey = true; // OS X style: Shortcuts using Cmd/Super instead of Ctrl
+ DoubleClickSelectsWord = true; // OS X style: Double click selects by word instead of selecting whole text
+ MultiSelectUsesSuperKey = true; // OS X style: Multi-selection in lists uses Cmd/Super instead of Ctrl
+#endif
}
// Pass in translated ASCII characters for text input.
@@ -1639,7 +1654,7 @@ ImGuiWindow* ImGui::GetParentWindow()
{
ImGuiState& g = *GImGui;
IM_ASSERT(g.CurrentWindowStack.Size >= 2);
- return g.CurrentWindowStack[g.CurrentWindowStack.Size - 2];
+ return g.CurrentWindowStack[(unsigned int)g.CurrentWindowStack.Size - 2];
}
void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window = NULL)
@@ -2326,9 +2341,9 @@ static void AddDrawListToRenderList(ImVector<ImDrawList*>& out_render_list, ImDr
// Check that draw_list doesn't use more vertices than indexable (default ImDrawIdx = 2 bytes = 64K vertices)
// If this assert triggers because you are drawing lots of stuff manually, A) workaround by calling BeginChild()/EndChild() to put your draw commands in multiple draw lists, B) #define ImDrawIdx to a 'unsigned int' in imconfig.h and render accordingly.
- IM_ASSERT((int)draw_list->_VtxCurrentIdx == draw_list->VtxBuffer.Size); // Sanity check. Bug or mismatch between PrimReserve() calls and incrementing _VtxCurrentIdx, _VtxWritePtr etc.
- IM_ASSERT((unsigned long long int)draw_list->_VtxCurrentIdx <= ((unsigned long long int)1L << (sizeof(ImDrawIdx)*8))); // Too many vertices in same ImDrawList. See comment above.
-
+ IM_ASSERT((int)draw_list->_VtxCurrentIdx == draw_list->VtxBuffer.Size); // Sanity check. Bug or mismatch between PrimReserve() calls and incrementing _VtxCurrentIdx, _VtxWritePtr etc.
+ IM_ASSERT((int64_t)draw_list->_VtxCurrentIdx <= ((int64_t)1L << (sizeof(ImDrawIdx)*8))); // Too many vertices in same ImDrawList. See comment above.
+
out_render_list.push_back(draw_list);
GImGui->IO.MetricsRenderVertices += draw_list->VtxBuffer.Size;
GImGui->IO.MetricsRenderIndices += draw_list->IdxBuffer.Size;
@@ -3126,9 +3141,8 @@ static ImRect GetVisibleRect()
void ImGui::BeginTooltip()
{
- ImGuiState& g = *GImGui;
ImGuiWindowFlags flags = ImGuiWindowFlags_Tooltip|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_AlwaysAutoResize;
- ImGui::Begin("##Tooltip", NULL, ImVec2(0,0), g.Style.Colors[ImGuiCol_TooltipBg].w, flags);
+ ImGui::Begin("##Tooltip", NULL, flags);
}
void ImGui::EndTooltip()
@@ -3266,9 +3280,8 @@ static bool BeginPopupEx(const char* str_id, ImGuiWindowFlags extra_flags)
ImFormatString(name, 20, "##menu_%d", g.CurrentPopupStack.Size); // Recycle windows based on depth
else
ImFormatString(name, 20, "##popup_%08x", id); // Not recycling, so we can close/open during the same frame
- float alpha = 1.0f;
- bool opened = ImGui::Begin(name, NULL, ImVec2(0.0f, 0.0f), alpha, flags);
+ bool opened = ImGui::Begin(name, NULL, flags);
if (!(window->Flags & ImGuiWindowFlags_ShowBorders))
g.CurrentWindow->Flags &= ~ImGuiWindowFlags_ShowBorders;
if (!opened) // opened can be 'false' when the popup is completely clipped (e.g. zero size display)
@@ -3299,7 +3312,7 @@ bool ImGui::BeginPopupModal(const char* name, bool* p_opened, ImGuiWindowFlags e
}
ImGuiWindowFlags flags = extra_flags|ImGuiWindowFlags_Popup|ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoCollapse|ImGuiWindowFlags_NoSavedSettings;
- bool opened = ImGui::Begin(name, p_opened, ImVec2(0.0f, 0.0f), -1.0f, flags);
+ bool opened = ImGui::Begin(name, p_opened, flags);
if (!opened || (p_opened && !*p_opened)) // Opened can be 'false' when the popup is completely clipped (e.g. zero size display)
{
ImGui::EndPopup();
@@ -3379,8 +3392,7 @@ bool ImGui::BeginChild(const char* str_id, const ImVec2& size_arg, bool border,
char title[256];
ImFormatString(title, IM_ARRAYSIZE(title), "%s.%s", window->Name, str_id);
- const float alpha = 1.0f;
- bool ret = ImGui::Begin(title, NULL, size, alpha, flags);
+ bool ret = ImGui::Begin(title, NULL, size, -1.0f, flags);
if (!(window->Flags & ImGuiWindowFlags_ShowBorders))
GetCurrentWindow()->Flags &= ~ImGuiWindowFlags_ShowBorders;
@@ -3430,13 +3442,14 @@ bool ImGui::BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags ext
const ImGuiStyle& style = g.Style;
ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, style.Colors[ImGuiCol_FrameBg]);
ImGui::PushStyleVar(ImGuiStyleVar_ChildWindowRounding, style.FrameRounding);
- return ImGui::BeginChild(id, size, false, ImGuiWindowFlags_NoMove | extra_flags);
+ ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, style.FramePadding);
+ return ImGui::BeginChild(id, size, (g.CurrentWindow->Flags & ImGuiWindowFlags_ShowBorders) ? true : false, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysUseWindowPadding | extra_flags);
}
void ImGui::EndChildFrame()
{
ImGui::EndChild();
- ImGui::PopStyleVar();
+ ImGui::PopStyleVar(2);
ImGui::PopStyleColor();
}
@@ -3679,10 +3692,6 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
window->RootWindow = g.CurrentWindowStack[root_idx];
window->RootNonPopupWindow = g.CurrentWindowStack[root_non_popup_idx]; // This is merely for displaying the TitleBgActive color.
- // Default alpha
- if (bg_alpha < 0.0f)
- bg_alpha = style.WindowFillAlphaDefault;
-
// When reusing window again multiple times a frame, just append content (don't need to setup again)
if (first_begin_of_the_frame)
{
@@ -3754,7 +3763,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
}
// Lock window padding so that altering the ShowBorders flag for children doesn't have side-effects.
- window->WindowPadding = ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_ComboBox | ImGuiWindowFlags_Popup))) ? ImVec2(0,0) : style.WindowPadding;
+ window->WindowPadding = ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_ComboBox | ImGuiWindowFlags_Popup))) ? ImVec2(0,0) : style.WindowPadding;
// Calculate auto-fit size
ImVec2 size_auto_fit;
@@ -3968,27 +3977,26 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
}
// Scrollbars
- window->ScrollbarY = (flags & ImGuiWindowFlags_ForceVerticalScrollbar) || ((window->SizeContents.y > window->Size.y + style.ItemSpacing.y) && !(flags & ImGuiWindowFlags_NoScrollbar));
- window->ScrollbarX = (flags & ImGuiWindowFlags_ForceHorizontalScrollbar) || ((window->SizeContents.x > window->Size.x - (window->ScrollbarY ? style.ScrollbarSize : 0.0f) - window->WindowPadding.x) && !(flags & ImGuiWindowFlags_NoScrollbar) && (flags & ImGuiWindowFlags_HorizontalScrollbar));
+ window->ScrollbarY = (flags & ImGuiWindowFlags_AlwaysVerticalScrollbar) || ((window->SizeContents.y > window->Size.y + style.ItemSpacing.y) && !(flags & ImGuiWindowFlags_NoScrollbar));
+ window->ScrollbarX = (flags & ImGuiWindowFlags_AlwaysHorizontalScrollbar) || ((window->SizeContents.x > window->Size.x - (window->ScrollbarY ? style.ScrollbarSize : 0.0f) - window->WindowPadding.x) && !(flags & ImGuiWindowFlags_NoScrollbar) && (flags & ImGuiWindowFlags_HorizontalScrollbar));
window->ScrollbarSizes = ImVec2(window->ScrollbarY ? style.ScrollbarSize : 0.0f, window->ScrollbarX ? style.ScrollbarSize : 0.0f);
window->BorderSize = (flags & ImGuiWindowFlags_ShowBorders) ? 1.0f : 0.0f;
// Window background
- if (bg_alpha > 0.0f)
- {
- ImGuiCol col_idx;
- if ((flags & ImGuiWindowFlags_ComboBox) != 0)
- col_idx = ImGuiCol_ComboBg;
- else if ((flags & ImGuiWindowFlags_Tooltip) != 0)
- col_idx = ImGuiCol_TooltipBg;
- else if ((flags & ImGuiWindowFlags_Popup) != 0)
- col_idx = ImGuiCol_WindowBg;
- else if ((flags & ImGuiWindowFlags_ChildWindow) != 0)
- col_idx = ImGuiCol_ChildWindowBg;
- else
- col_idx = ImGuiCol_WindowBg;
- window->DrawList->AddRectFilled(window->Pos, window->Pos+window->Size, GetColorU32(col_idx, bg_alpha), window_rounding);
- }
+ // Default alpha
+ ImGuiCol bg_color_idx = ImGuiCol_WindowBg;
+ if ((flags & ImGuiWindowFlags_ComboBox) != 0)
+ bg_color_idx = ImGuiCol_ComboBg;
+ else if ((flags & ImGuiWindowFlags_Tooltip) != 0 || (flags & ImGuiWindowFlags_Popup) != 0)
+ bg_color_idx = ImGuiCol_PopupBg;
+ else if ((flags & ImGuiWindowFlags_ChildWindow) != 0)
+ bg_color_idx = ImGuiCol_ChildWindowBg;
+ ImVec4 bg_color = style.Colors[bg_color_idx];
+ if (bg_alpha >= 0.0f)
+ bg_color.w = bg_alpha;
+ bg_color.w *= style.Alpha;
+ if (bg_color.w > 0.0f)
+ window->DrawList->AddRectFilled(window->Pos, window->Pos+window->Size, ColorConvertFloat4ToU32(bg_color), window_rounding);
// Title bar
if (!(flags & ImGuiWindowFlags_NoTitleBar))
@@ -4510,6 +4518,7 @@ const char* ImGui::GetStyleColName(ImGuiCol idx)
case ImGuiCol_TextDisabled: return "TextDisabled";
case ImGuiCol_WindowBg: return "WindowBg";
case ImGuiCol_ChildWindowBg: return "ChildWindowBg";
+ case ImGuiCol_PopupBg: return "PopupBg";
case ImGuiCol_Border: return "Border";
case ImGuiCol_BorderShadow: return "BorderShadow";
case ImGuiCol_FrameBg: return "FrameBg";
@@ -4547,7 +4556,6 @@ const char* ImGui::GetStyleColName(ImGuiCol idx)
case ImGuiCol_PlotHistogram: return "PlotHistogram";
case ImGuiCol_PlotHistogramHovered: return "PlotHistogramHovered";
case ImGuiCol_TextSelectedBg: return "TextSelectedBg";
- case ImGuiCol_TooltipBg: return "TooltipBg";
case ImGuiCol_ModalWindowDarkening: return "ModalWindowDarkening";
}
IM_ASSERT(0);
@@ -7091,8 +7099,18 @@ static void STB_TEXTEDIT_LAYOUTROW(StbTexteditRow* r, STB_TEXTEDIT_STRING* ob
r->num_chars = (int)(text_remaining - (text + line_start_idx));
}
-static bool is_separator(unsigned int c) { return c==',' || c==';' || c=='(' || c==')' || c=='{' || c=='}' || c=='[' || c==']' || c=='|'; }
-#define STB_TEXTEDIT_IS_SPACE(CH) ( ImCharIsSpace((unsigned int)CH) || is_separator((unsigned int)CH) )
+static bool is_separator(unsigned int c) { return ImCharIsSpace(c) || c==',' || c==';' || c=='(' || c==')' || c=='{' || c=='}' || c=='[' || c==']' || c=='|'; }
+static int is_word_boundary_from_right(STB_TEXTEDIT_STRING* obj, int idx) { return idx > 0 ? (is_separator( obj->Text[idx-1] ) && !is_separator( obj->Text[idx] ) ) : 1; }
+static int STB_TEXTEDIT_MOVEWORDLEFT_IMPL(STB_TEXTEDIT_STRING* obj, int idx) { while (idx >= 0 && !is_word_boundary_from_right(obj, idx)) idx--; return idx < 0 ? 0 : idx; }
+#ifdef __APPLE__ // FIXME: Move setting to IO structure
+static int is_word_boundary_from_left(STB_TEXTEDIT_STRING* obj, int idx) { return idx > 0 ? (!is_separator( obj->Text[idx-1] ) && is_separator( obj->Text[idx] ) ) : 1; }
+static int STB_TEXTEDIT_MOVEWORDRIGHT_IMPL(STB_TEXTEDIT_STRING* obj, int idx) { int len = obj->CurLenW; while (idx < len && !is_word_boundary_from_left(obj, idx)) idx++; return idx > len ? len : idx; }
+#else
+static int STB_TEXTEDIT_MOVEWORDRIGHT_IMPL(STB_TEXTEDIT_STRING* obj, int idx) { int len = obj->CurLenW; while (idx < len && !is_word_boundary_from_right(obj, idx)) idx++; return idx > len ? len : idx; }
+#endif
+#define STB_TEXTEDIT_MOVEWORDLEFT STB_TEXTEDIT_MOVEWORDLEFT_IMPL // They need to be #define for stb_textedit.h
+#define STB_TEXTEDIT_MOVEWORDRIGHT STB_TEXTEDIT_MOVEWORDRIGHT_IMPL
+
static void STB_TEXTEDIT_DELETECHARS(STB_TEXTEDIT_STRING* obj, int pos, int n)
{
ImWchar* dst = obj->Text.Data + pos;
@@ -7289,7 +7307,6 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
return false;
}
draw_window = GetCurrentWindow();
- draw_window->DC.CursorPos += style.FramePadding;
size.x -= draw_window->ScrollbarSizes.x;
}
else
@@ -7322,6 +7339,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
const bool is_ctrl_down = io.KeyCtrl;
const bool is_shift_down = io.KeyShift;
const bool is_alt_down = io.KeyAlt;
+ const bool is_super_down = io.KeySuper;
const bool focus_requested = FocusableItemRegister(window, g.ActiveId == id, (flags & (ImGuiInputTextFlags_CallbackCompletion|ImGuiInputTextFlags_AllowTabInput)) == 0); // Using completion callback disable keyboard tabbing
const bool focus_requested_by_code = focus_requested && (window->FocusIdxAllCounter == window->FocusIdxAllRequestCurrent);
const bool focus_requested_by_tab = focus_requested && !focus_requested_by_code;
@@ -7409,11 +7427,17 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
const float mouse_x = (g.IO.MousePos.x - frame_bb.Min.x - style.FramePadding.x) + edit_state.ScrollX;
const float mouse_y = (is_multiline ? (g.IO.MousePos.y - draw_window->DC.CursorPos.y - style.FramePadding.y) : (g.FontSize*0.5f));
- if (select_all || (hovered && io.MouseDoubleClicked[0]))
+ if (select_all || (hovered && !io.DoubleClickSelectsWord && io.MouseDoubleClicked[0]))
{
edit_state.SelectAll();
edit_state.SelectedAllMouseLock = true;
}
+ else if (hovered && io.DoubleClickSelectsWord && io.MouseDoubleClicked[0])
+ {
+ // Select a word only, OS X style (by simulating keystrokes)
+ edit_state.OnKeyPressed(STB_TEXTEDIT_K_WORDLEFT);
+ edit_state.OnKeyPressed(STB_TEXTEDIT_K_WORDRIGHT | STB_TEXTEDIT_K_SHIFT);
+ }
else if (io.MouseClicked[0] && !edit_state.SelectedAllMouseLock)
{
stb_textedit_click(&edit_state, &edit_state.StbState, mouse_x, mouse_y);
@@ -7451,9 +7475,11 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
// Handle various key-presses
bool cancel_edit = false;
const int k_mask = (is_shift_down ? STB_TEXTEDIT_K_SHIFT : 0);
- const bool is_ctrl_only = is_ctrl_down && !is_alt_down && !is_shift_down;
- if (IsKeyPressedMap(ImGuiKey_LeftArrow)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_WORDLEFT | k_mask : STB_TEXTEDIT_K_LEFT | k_mask); }
- else if (IsKeyPressedMap(ImGuiKey_RightArrow)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_WORDRIGHT | k_mask : STB_TEXTEDIT_K_RIGHT | k_mask); }
+ const bool is_shortcutkey_only = (io.ShortcutsUseSuperKey ? (is_super_down && !is_alt_down && !is_shift_down && !is_ctrl_down) : (is_ctrl_down && !is_alt_down && !is_shift_down && !is_super_down));
+ const bool is_wordmove_key_down = (io.WordMovementUsesAltKey ? io.KeyAlt : io.KeyCtrl);
+
+ if (IsKeyPressedMap(ImGuiKey_LeftArrow)) { edit_state.OnKeyPressed(is_wordmove_key_down ? STB_TEXTEDIT_K_WORDLEFT | k_mask : STB_TEXTEDIT_K_LEFT | k_mask); }
+ else if (IsKeyPressedMap(ImGuiKey_RightArrow)) { edit_state.OnKeyPressed(is_wordmove_key_down ? STB_TEXTEDIT_K_WORDRIGHT | k_mask : STB_TEXTEDIT_K_RIGHT | k_mask); }
else if (is_multiline && IsKeyPressedMap(ImGuiKey_UpArrow)) { if (is_ctrl_down) SetWindowScrollY(draw_window, draw_window->Scroll.y - g.FontSize); else edit_state.OnKeyPressed(STB_TEXTEDIT_K_UP | k_mask); }
else if (is_multiline && IsKeyPressedMap(ImGuiKey_DownArrow)) { if (is_ctrl_down) SetWindowScrollY(draw_window, draw_window->Scroll.y + g.FontSize); else edit_state.OnKeyPressed(STB_TEXTEDIT_K_DOWN| k_mask); }
else if (IsKeyPressedMap(ImGuiKey_Home)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_TEXTSTART | k_mask : STB_TEXTEDIT_K_LINESTART | k_mask); }
@@ -7481,11 +7507,11 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
if (InputTextFilterCharacter(&c, flags, callback, user_data))
edit_state.OnKeyPressed((int)c);
}
- else if (IsKeyPressedMap(ImGuiKey_Escape)) { SetActiveID(0); cancel_edit = true; }
- else if (is_ctrl_only && IsKeyPressedMap(ImGuiKey_Z) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_UNDO); edit_state.ClearSelection(); }
- else if (is_ctrl_only && IsKeyPressedMap(ImGuiKey_Y) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_REDO); edit_state.ClearSelection(); }
- else if (is_ctrl_only && IsKeyPressedMap(ImGuiKey_A)) { edit_state.SelectAll(); edit_state.CursorFollow = true; }
- else if (is_ctrl_only && !is_password && ((IsKeyPressedMap(ImGuiKey_X) && is_editable) || IsKeyPressedMap(ImGuiKey_C)) && (!is_multiline || edit_state.HasSelection()))
+ else if (IsKeyPressedMap(ImGuiKey_Escape)) { SetActiveID(0); cancel_edit = true; }
+ else if (is_shortcutkey_only && IsKeyPressedMap(ImGuiKey_Z) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_UNDO); edit_state.ClearSelection(); }
+ else if (is_shortcutkey_only && IsKeyPressedMap(ImGuiKey_Y) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_REDO); edit_state.ClearSelection(); }
+ else if (is_shortcutkey_only && IsKeyPressedMap(ImGuiKey_A)) { edit_state.SelectAll(); edit_state.CursorFollow = true; }
+ else if (is_shortcutkey_only && !is_password && ((IsKeyPressedMap(ImGuiKey_X) && is_editable) || IsKeyPressedMap(ImGuiKey_C)) && (!is_multiline || edit_state.HasSelection()))
{
// Cut, Copy
const bool cut = IsKeyPressedMap(ImGuiKey_X);
@@ -7507,7 +7533,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
stb_textedit_cut(&edit_state, &edit_state.StbState);
}
}
- else if (is_ctrl_only && IsKeyPressedMap(ImGuiKey_V) && is_editable)
+ else if (is_shortcutkey_only && IsKeyPressedMap(ImGuiKey_V) && is_editable)
{
// Paste
if (g.IO.GetClipboardTextFn)
@@ -8471,7 +8497,7 @@ bool ImGui::BeginMenu(const char* label, bool enabled)
bool want_open = false, want_close = false;
if (window->Flags & (ImGuiWindowFlags_Popup|ImGuiWindowFlags_ChildMenu))
{
- // Implement http://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown to avoid using timers so menus feel more reactive.
+ // Implement http://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown to avoid using timers, so menus feels more reactive.
bool moving_within_opened_triangle = false;
if (g.HoveredWindow == window && g.OpenedPopupStack.Size > g.CurrentPopupStack.Size && g.OpenedPopupStack[g.CurrentPopupStack.Size].ParentWindow == window)
{
diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h
index 639891c2028..0c41e7ae9f8 100644
--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h
+++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h
@@ -1,4 +1,4 @@
-// dear imgui, v1.48 WIP
+// dear imgui, v1.49 WIP
// (headers)
// See imgui.cpp file for documentation.
@@ -16,7 +16,7 @@
#include <stddef.h> // ptrdiff_t, NULL
#include <string.h> // memset, memmove, memcpy, strlen, strchr, strcpy, strcmp
-#define IMGUI_VERSION "1.48 WIP"
+#define IMGUI_VERSION "1.49 WIP"
// Define attributes of all API symbols declarations, e.g. for DLL under Windows.
#ifndef IMGUI_API
@@ -105,7 +105,6 @@ namespace ImGui
IMGUI_API ImGuiStyle& GetStyle();
IMGUI_API ImDrawData* GetDrawData(); // same value as passed to your io.RenderDrawListsFn() function. valid after Render() and until the next call to NewFrame()
IMGUI_API void NewFrame(); // start a new ImGui frame, you can submit any command from this point until NewFrame()/Render().
- IMGUI_API void EndFrame(); // ends the ImGui frame. automatically called by Render()!
IMGUI_API void Render(); // ends the ImGui frame, finalize rendering data, then call your io.RenderDrawListsFn() function if set.
IMGUI_API void Shutdown();
IMGUI_API void ShowUserGuide(); // help block
@@ -114,11 +113,11 @@ namespace ImGui
IMGUI_API void ShowMetricsWindow(bool* opened = NULL); // metrics window for debugging ImGui
// Window
- IMGUI_API bool Begin(const char* name, bool* p_opened = NULL, ImGuiWindowFlags flags = 0); // see .cpp for details. return false when window is collapsed, so you can early out in your code. 'bool* p_opened' creates a widget on the upper-right to close the window (which sets your bool to false).
- IMGUI_API bool Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_use, float bg_alpha = -1.0f, ImGuiWindowFlags flags = 0); // this is the older/longer API. the extra parameters aren't very relevant. call SetNextWindowSize() instead if you want to set a window size. For regular windows, 'size_on_first_use' only applies to the first time EVER the window is created and probably not what you want! maybe obsolete this API eventually.
- IMGUI_API void End();
- IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0,0), bool border = false, ImGuiWindowFlags extra_flags = 0); // begin a scrolling region. size==0.0f: use remaining window size, size<0.0f: use remaining window size minus abs(size). size>0.0f: fixed size. each axis can use a different mode, e.g. ImVec2(0,400).
- IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0,0), bool border = false, ImGuiWindowFlags extra_flags = 0); // "
+ IMGUI_API bool Begin(const char* name, bool* p_opened = NULL, ImGuiWindowFlags flags = 0); // push window to the stack and start appending to it. see .cpp for details. return false when window is collapsed, so you can early out in your code. 'bool* p_opened' creates a widget on the upper-right to close the window (which sets your bool to false).
+ IMGUI_API bool Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_use, float bg_alpha = -1.0f, ImGuiWindowFlags flags = 0); // OBSOLETE. this is the older/longer API. the extra parameters aren't very relevant. call SetNextWindowSize() instead if you want to set a window size. For regular windows, 'size_on_first_use' only applies to the first time EVER the window is created and probably not what you want! might obsolete this API eventually.
+ IMGUI_API void End(); // finish appending to current window, pop it off the window stack.
+ IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0,0), bool border = false, ImGuiWindowFlags extra_flags = 0); // begin a scrolling region. size==0.0f: use remaining window size, size<0.0f: use remaining window size minus abs(size). size>0.0f: fixed size. each axis can use a different mode, e.g. ImVec2(0,400).
+ IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0,0), bool border = false, ImGuiWindowFlags extra_flags = 0); // "
IMGUI_API void EndChild();
IMGUI_API ImVec2 GetContentRegionMax(); // current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
IMGUI_API ImVec2 GetContentRegionAvail(); // == GetContentRegionMax() - GetCursorPos()
@@ -316,7 +315,7 @@ namespace ImGui
IMGUI_API void TreePush(const char* str_id = NULL); // already called by TreeNode(), but you can call Push/Pop yourself for layouting purpose
IMGUI_API void TreePush(const void* ptr_id = NULL); // "
IMGUI_API void TreePop();
- IMGUI_API void SetNextTreeNodeOpened(bool opened, ImGuiSetCond cond = 0); // set next tree node to be opened.
+ IMGUI_API void SetNextTreeNodeOpened(bool opened, ImGuiSetCond cond = 0); // set next tree node/collapsing header to be opened.
// Widgets: Selectable / Lists
IMGUI_API bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0,0)); // size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height
@@ -467,11 +466,12 @@ enum ImGuiWindowFlags_
ImGuiWindowFlags_NoSavedSettings = 1 << 8, // Never load/save settings in .ini file
ImGuiWindowFlags_NoInputs = 1 << 9, // Disable catching mouse or keyboard inputs
ImGuiWindowFlags_MenuBar = 1 << 10, // Has a menu-bar
- ImGuiWindowFlags_HorizontalScrollbar = 1 << 11, // Allow horizontal scrollbar to appear (off by default). You need to use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section.
+ ImGuiWindowFlags_HorizontalScrollbar = 1 << 11, // Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section.
ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12, // Disable taking focus when transitioning from hidden to visible state
ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13, // Disable bringing window to front when taking focus (e.g. clicking on it or programatically giving it focus)
- ImGuiWindowFlags_ForceVerticalScrollbar = 1 << 14, // Always show vertical scrollbar (even if ContentSize.y < Size.y)
- ImGuiWindowFlags_ForceHorizontalScrollbar=1 << 15, // Always show horizontal scrollbar (even if ContentSize.x < Size.x)
+ ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14, // Always show vertical scrollbar (even if ContentSize.y < Size.y)
+ ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15, // Always show horizontal scrollbar (even if ContentSize.x < Size.x)
+ ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16, // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)
// [Internal]
ImGuiWindowFlags_ChildWindow = 1 << 20, // Don't use! For internal use by BeginChild()
ImGuiWindowFlags_ChildWindowAutoFitX = 1 << 21, // Don't use! For internal use by BeginChild()
@@ -546,8 +546,9 @@ enum ImGuiCol_
{
ImGuiCol_Text,
ImGuiCol_TextDisabled,
- ImGuiCol_WindowBg,
- ImGuiCol_ChildWindowBg,
+ ImGuiCol_WindowBg, // Background of normal windows
+ ImGuiCol_ChildWindowBg, // Background of child windows
+ ImGuiCol_PopupBg, // Background of popups, menus, tooltips windows
ImGuiCol_Border,
ImGuiCol_BorderShadow,
ImGuiCol_FrameBg, // Background of checkbox, radio button, plot, slider, text input
@@ -585,7 +586,6 @@ enum ImGuiCol_
ImGuiCol_PlotHistogram,
ImGuiCol_PlotHistogramHovered,
ImGuiCol_TextSelectedBg,
- ImGuiCol_TooltipBg,
ImGuiCol_ModalWindowDarkening, // darken entire screen when a modal window is active
ImGuiCol_COUNT
};
@@ -664,7 +664,6 @@ struct ImGuiStyle
ImVec2 ItemSpacing; // Horizontal and vertical spacing between widgets/lines
ImVec2 ItemInnerSpacing; // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label)
ImVec2 TouchExtraPadding; // Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
- float WindowFillAlphaDefault; // Default alpha of window background, if not specified in ImGui::Begin()
float IndentSpacing; // Horizontal indentation when e.g. entering a tree node
float ColumnsMinSpacing; // Minimum horizontal spacing between two columns
float ScrollbarSize; // Width of the vertical scrollbar, Height of the horizontal scrollbar
@@ -710,6 +709,12 @@ struct ImGuiIO
ImVec2 DisplayVisibleMin; // <unset> (0.0f,0.0f) // If you use DisplaySize as a virtual space larger than your screen, set DisplayVisibleMin/Max to the visible area.
ImVec2 DisplayVisibleMax; // <unset> (0.0f,0.0f) // If the values are the same, we defaults to Min=(0.0f) and Max=DisplaySize
+ // Advanced/subtle behaviors
+ bool WordMovementUsesAltKey; // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl
+ bool ShortcutsUseSuperKey; // = defined(__APPLE__) // OS X style: Shortcuts using Cmd/Super instead of Ctrl
+ bool DoubleClickSelectsWord; // = defined(__APPLE__) // OS X style: Double click selects by word instead of selecting whole text
+ bool MultiSelectUsesSuperKey; // = defined(__APPLE__) // OS X style: Multi-selection in lists uses Cmd/Super instead of Ctrl [unused yet]
+
//------------------------------------------------------------------
// User Functions
//------------------------------------------------------------------
@@ -745,6 +750,7 @@ struct ImGuiIO
bool KeyCtrl; // Keyboard modifier pressed: Control
bool KeyShift; // Keyboard modifier pressed: Shift
bool KeyAlt; // Keyboard modifier pressed: Alt
+ bool KeySuper; // Keyboard modifier pressed: Cmd/Super/Windows
bool KeysDown[512]; // Keyboard keys that are pressed (in whatever storage order you naturally have access to keyboard data)
ImWchar InputCharacters[16+1]; // List of characters input (translated by user from keypress+keyboard state). Fill using AddInputCharacter() helper.
@@ -886,6 +892,7 @@ struct ImGuiTextFilter
int CountGrep;
ImGuiTextFilter(const char* default_filter = "");
+ ~ImGuiTextFilter() {}
void Clear() { InputBuf[0] = 0; Build(); }
bool Draw(const char* label = "Filter (inc,-exc)", float width = 0.0f); // Helper calling InputText+Build
bool PassFilter(const char* text, const char* text_end = NULL) const;
@@ -982,7 +989,8 @@ struct ImGuiTextEditCallbackData
bool HasSelection() const { return SelectionStart != SelectionEnd; }
};
-// ImColor() is just a helper that implicity converts to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float)
+// ImColor() helper to implicity converts colors to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float)
+// Avoid storing ImColor! Store either u32 of ImVec4. This is not a full-featured color class.
// None of the ImGui API are using ImColor directly but you can use it as a convenience to pass colors in either ImU32 or ImVec4 formats.
struct ImColor
{
@@ -1148,7 +1156,7 @@ struct ImDrawList
// Stateful path API, add points then finish with PathFill() or PathStroke()
inline void PathClear() { _Path.resize(0); }
inline void PathLineTo(const ImVec2& pos) { _Path.push_back(pos); }
- inline void PathLineToMergeDuplicate(const ImVec2& pos) { if (_Path.Size == 0 || _Path[_Path.Size-1].x != pos.x || _Path[_Path.Size-1].y != pos.y) _Path.push_back(pos); }
+ inline void PathLineToMergeDuplicate(const ImVec2& pos) { if (_Path.Size == 0 || memcmp(&_Path[_Path.Size-1], &pos, 8) != 0) _Path.push_back(pos); }
inline void PathFill(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col, true); PathClear(); }
inline void PathStroke(ImU32 col, bool closed, float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, closed, thickness, true); PathClear(); }
IMGUI_API void PathArcTo(const ImVec2& centre, float radius, float a_min, float a_max, int num_segments = 10);
diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp
index 533d23b4510..2bc386b50a7 100644
--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp
+++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp
@@ -1,4 +1,4 @@
-// dear imgui, v1.48 WIP
+// dear imgui, v1.49 WIP
// (demo code)
// Don't remove this file from your project! It is useful reference code that you can execute.
@@ -139,7 +139,6 @@ void ImGui::ShowTestWindow(bool* p_opened)
static bool no_scrollbar = false;
static bool no_collapse = false;
static bool no_menu = false;
- static float bg_alpha = -0.01f; // <0: default
// Demonstrate the various window flags. Typically you would just use the default.
ImGuiWindowFlags window_flags = 0;
@@ -150,7 +149,8 @@ void ImGui::ShowTestWindow(bool* p_opened)
if (no_scrollbar) window_flags |= ImGuiWindowFlags_NoScrollbar;
if (no_collapse) window_flags |= ImGuiWindowFlags_NoCollapse;
if (!no_menu) window_flags |= ImGuiWindowFlags_MenuBar;
- if (!ImGui::Begin("ImGui Demo", p_opened, ImVec2(550,680), bg_alpha, window_flags))
+ ImGui::SetNextWindowSize(ImVec2(550,680), ImGuiSetCond_FirstUseEver);
+ if (!ImGui::Begin("ImGui Demo", p_opened, window_flags))
{
// Early out if the window is collapsed, as an optimization.
ImGui::End();
@@ -211,10 +211,6 @@ void ImGui::ShowTestWindow(bool* p_opened)
ImGui::Checkbox("No collapse", &no_collapse);
ImGui::Checkbox("No menu", &no_menu);
- ImGui::PushItemWidth(100);
- ImGui::DragFloat("Window Fill Alpha", &bg_alpha, 0.005f, -0.01f, 1.0f, bg_alpha < 0.0f ? "(default)" : "%.3f"); // Not exposing zero here so user doesn't "lose" the UI (zero alpha clips all widgets). But application code could have a toggle to switch between zero and non-zero.
- ImGui::PopItemWidth();
-
if (ImGui::TreeNode("Style"))
{
ImGui::ShowStyleEditor();
@@ -1500,7 +1496,7 @@ void ImGui::ShowTestWindow(bool* p_opened)
ImGui::Text("Keys down:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (io.KeysDownDuration[i] >= 0.0f) { ImGui::SameLine(); ImGui::Text("%d (%.02f secs)", i, io.KeysDownDuration[i]); }
ImGui::Text("Keys pressed:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (ImGui::IsKeyPressed(i)) { ImGui::SameLine(); ImGui::Text("%d", i); }
ImGui::Text("Keys release:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (ImGui::IsKeyReleased(i)) { ImGui::SameLine(); ImGui::Text("%d", i); }
- ImGui::Text("KeyMods: %s%s%s", io.KeyCtrl ? "CTRL " : "", io.KeyShift ? "SHIFT " : "", io.KeyAlt ? "ALT " : "");
+ ImGui::Text("KeyMods: %s%s%s%s", io.KeyCtrl ? "CTRL " : "", io.KeyShift ? "SHIFT " : "", io.KeyAlt ? "ALT " : "", io.KeySuper ? "SUPER " : "");
ImGui::Text("WantCaptureMouse: %s", io.WantCaptureMouse ? "true" : "false");
ImGui::Text("WantCaptureKeyboard: %s", io.WantCaptureKeyboard ? "true" : "false");
@@ -1561,7 +1557,6 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
ImGui::DragFloat("Curve Tessellation Tolerance", &style.CurveTessellationTol, 0.02f, 0.10f, FLT_MAX, NULL, 2.0f);
if (style.CurveTessellationTol < 0.0f) style.CurveTessellationTol = 0.10f;
ImGui::DragFloat("Global Alpha", &style.Alpha, 0.005f, 0.20f, 1.0f, "%.2f"); // Not exposing zero here so user doesn't "lose" the UI (zero alpha clips all widgets). But application code could have a toggle to switch between zero and non-zero.
- ImGui::DragFloat("Window Fill Alpha Default", &style.WindowFillAlphaDefault, 0.005f, 0.0f, 1.0f, "%.2f");
ImGui::PopItemWidth();
ImGui::TreePop();
}
@@ -1618,7 +1613,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
static ImGuiTextFilter filter;
filter.Draw("Filter colors", 200);
- ImGui::BeginChild("#colors", ImVec2(0, 300), true);
+ ImGui::BeginChild("#colors", ImVec2(0, 300), true, ImGuiWindowFlags_AlwaysVerticalScrollbar);
ImGui::PushItemWidth(-160);
ImGui::ColorEditMode(edit_mode);
for (int i = 0; i < ImGuiCol_COUNT; i++)
@@ -2300,12 +2295,12 @@ static void ShowExampleAppPropertyEditor(bool* p_opened)
{
ImGui::PushID(uid); // Use object uid as identifier. Most commonly you could also use the object pointer as a base ID.
ImGui::AlignFirstTextHeightToWidgets(); // Text and Tree nodes are less high than regular widgets, here we add vertical spacing to make the tree lines equal high.
- bool opened = ImGui::TreeNode("Object", "%s_%u", prefix, uid);
+ bool is_opened = ImGui::TreeNode("Object", "%s_%u", prefix, uid);
ImGui::NextColumn();
ImGui::AlignFirstTextHeightToWidgets();
ImGui::Text("my sailor is rich");
ImGui::NextColumn();
- if (opened)
+ if (is_opened)
{
static float dummy_members[8] = { 0.0f,0.0f,1.0f,3.1416f,100.0f,999.0f };
for (int i = 0; i < 8; i++)
diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp
index 38a110292cf..091e2dca085 100644
--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp
+++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp
@@ -1,4 +1,4 @@
-// dear imgui, v1.48 WIP
+// dear imgui, v1.49 WIP
// (drawing and font code)
// Contains implementation for
diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h
index 9c42da079dd..e886ff1bbb2 100644
--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h
+++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h
@@ -1,4 +1,4 @@
-// dear imgui, v1.48 WIP
+// dear imgui, v1.49 WIP
// (internals)
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
@@ -679,6 +679,8 @@ namespace ImGui
IMGUI_API ImGuiWindow* FindWindowByName(const char* name);
IMGUI_API void FocusWindow(ImGuiWindow* window);
+ IMGUI_API void EndFrame(); // Ends the ImGui frame. Automatically called by Render()! you most likely don't need to ever call that yourself directly. If you don't need to render you can call EndFrame() but you'll have wasted CPU already. If you don't need to render, don't create any windows instead!
+
IMGUI_API void SetActiveID(ImGuiID id, ImGuiWindow* window);
IMGUI_API void SetHoveredID(ImGuiID id);
IMGUI_API void KeepAliveID(ImGuiID id);
diff --git a/3rdparty/bgfx/3rdparty/openvr/openvr_capi.h b/3rdparty/bgfx/3rdparty/openvr/openvr_capi.h
new file mode 100644
index 00000000000..230cd3b4513
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/openvr/openvr_capi.h
@@ -0,0 +1,1416 @@
+//======= Copyright 1996-2016, Valve Corporation, All rights reserved. ========
+//
+// Purpose: Header for flatted SteamAPI. Use this for binding to other languages.
+// This file is auto-generated, do not edit it.
+//
+//=============================================================================
+
+#ifndef __OPENVR_API_FLAT_H__
+#define __OPENVR_API_FLAT_H__
+#if defined( _WIN32 ) || defined( __clang__ )
+#pragma once
+#endif
+
+#ifdef __cplusplus
+#define EXTERN_C extern "C"
+#else
+#define EXTERN_C
+#endif
+
+#if defined( _WIN32 )
+# define OPENVR_FNTABLE_CALLTYPE __stdcall
+#else
+# define OPENVR_FNTABLE_CALLTYPE
+#endif //
+
+// OPENVR API export macro
+#if defined( _WIN32 ) && !defined( _X360 )
+ #if defined( OPENVR_API_EXPORTS )
+ #define S_API EXTERN_C __declspec( dllexport )
+ #elif defined( OPENVR_API_NODLL )
+ #define S_API EXTERN_C
+ #else
+ #define S_API extern "C" __declspec( dllimport )
+ #endif // OPENVR_API_EXPORTS
+#elif defined( GNUC )
+ #if defined( OPENVR_API_EXPORTS )
+ #define S_API EXTERN_C __attribute__ ((visibility("default")))
+ #else
+ #define S_API EXTERN_C
+ #endif // OPENVR_API_EXPORTS
+#else // !WIN32
+ #if defined( OPENVR_API_EXPORTS )
+ #define S_API EXTERN_C
+ #else
+ #define S_API EXTERN_C
+ #endif // OPENVR_API_EXPORTS
+#endif
+
+#include <stdint.h>
+
+// OpenVR Constants
+
+static const unsigned int k_unTrackingStringSize = 32;
+static const unsigned int k_unMaxDriverDebugResponseSize = 32768;
+static const unsigned int k_unTrackedDeviceIndex_Hmd = 0;
+static const unsigned int k_unMaxTrackedDeviceCount = 16;
+static const unsigned int k_unTrackedDeviceIndexInvalid = 4294967295;
+static const unsigned int k_unMaxPropertyStringSize = 32768;
+static const unsigned int k_unControllerStateAxisCount = 5;
+static const unsigned long k_ulOverlayHandleInvalid = 0;
+static const char * IVRSystem_Version = "IVRSystem_012";
+static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
+static const unsigned int k_unMaxApplicationKeyLength = 128;
+static const char * IVRApplications_Version = "IVRApplications_005";
+static const char * IVRChaperone_Version = "IVRChaperone_003";
+static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
+static const char * IVRCompositor_Version = "IVRCompositor_013";
+static const unsigned int k_unVROverlayMaxKeyLength = 128;
+static const unsigned int k_unVROverlayMaxNameLength = 128;
+static const unsigned int k_unMaxOverlayCount = 32;
+static const char * IVROverlay_Version = "IVROverlay_011";
+static const char * k_pch_Controller_Component_GDC2015 = "gdc2015";
+static const char * k_pch_Controller_Component_Base = "base";
+static const char * k_pch_Controller_Component_Tip = "tip";
+static const char * k_pch_Controller_Component_HandGrip = "handgrip";
+static const char * k_pch_Controller_Component_Status = "status";
+static const char * IVRRenderModels_Version = "IVRRenderModels_005";
+static const unsigned int k_unNotificationTextMaxSize = 256;
+static const char * IVRNotifications_Version = "IVRNotifications_002";
+static const unsigned int k_unMaxSettingsKeyLength = 128;
+static const char * k_pch_SteamVR_Section = "steamvr";
+static const char * k_pch_SteamVR_RequireHmd_String = "requireHmd";
+static const char * k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
+static const char * k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
+static const char * k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
+static const char * k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe";
+static const char * k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion";
+static const char * k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
+static const char * k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
+static const char * k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps";
+static const char * k_pch_SteamVR_LogLevel_Int32 = "loglevel";
+static const char * k_pch_SteamVR_IPD_Float = "ipd";
+static const char * k_pch_SteamVR_Background_String = "background";
+static const char * k_pch_SteamVR_GridColor_String = "gridColor";
+static const char * k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
+static const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
+static const char * k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit";
+static const char * k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout";
+static const char * k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout";
+static const char * k_pch_SteamVR_DirectMode_Bool = "directMode";
+static const char * k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid";
+static const char * k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid";
+static const char * k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
+static const char * k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
+static const char * k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
+static const char * k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
+static const char * k_pch_Lighthouse_Section = "driver_lighthouse";
+static const char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
+static const char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
+static const char * k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
+static const char * k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
+static const char * k_pch_Lighthouse_LighthouseName_String = "lighthousename";
+static const char * k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
+static const char * k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
+static const char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
+static const char * k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx";
+static const char * k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety";
+static const char * k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz";
+static const char * k_pch_Lighthouse_HeadingOffset_Float = "headingoffset";
+static const char * k_pch_Null_Section = "driver_null";
+static const char * k_pch_Null_EnableNullDriver_Bool = "enable";
+static const char * k_pch_Null_SerialNumber_String = "serialNumber";
+static const char * k_pch_Null_ModelNumber_String = "modelNumber";
+static const char * k_pch_Null_WindowX_Int32 = "windowX";
+static const char * k_pch_Null_WindowY_Int32 = "windowY";
+static const char * k_pch_Null_WindowWidth_Int32 = "windowWidth";
+static const char * k_pch_Null_WindowHeight_Int32 = "windowHeight";
+static const char * k_pch_Null_RenderWidth_Int32 = "renderWidth";
+static const char * k_pch_Null_RenderHeight_Int32 = "renderHeight";
+static const char * k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
+static const char * k_pch_Null_DisplayFrequency_Float = "displayFrequency";
+static const char * k_pch_UserInterface_Section = "userinterface";
+static const char * k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
+static const char * k_pch_Notifications_Section = "notifications";
+static const char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
+static const char * k_pch_Keyboard_Section = "keyboard";
+static const char * k_pch_Keyboard_TutorialCompletions = "TutorialCompletions";
+static const char * k_pch_Perf_Section = "perfcheck";
+static const char * k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
+static const char * k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
+static const char * k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
+static const char * k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
+static const char * k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
+static const char * k_pch_Perf_TestData_Float = "perfTestData";
+static const char * k_pch_Camera_Section = "camera";
+static const char * IVRSettings_Version = "IVRSettings_001";
+static const char * k_pch_audio_Section = "audio";
+static const char * k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice";
+static const char * k_pch_audio_OnRecordDevice_String = "onRecordDevice";
+static const char * k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice";
+static const char * k_pch_audio_OffRecordDevice_String = "offRecordDevice";
+static const char * k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
+
+// OpenVR Enums
+
+typedef enum EVREye
+{
+ EVREye_Eye_Left = 0,
+ EVREye_Eye_Right = 1,
+} EVREye;
+
+typedef enum EGraphicsAPIConvention
+{
+ EGraphicsAPIConvention_API_DirectX = 0,
+ EGraphicsAPIConvention_API_OpenGL = 1,
+} EGraphicsAPIConvention;
+
+typedef enum EColorSpace
+{
+ EColorSpace_ColorSpace_Auto = 0,
+ EColorSpace_ColorSpace_Gamma = 1,
+ EColorSpace_ColorSpace_Linear = 2,
+} EColorSpace;
+
+typedef enum ETrackingResult
+{
+ ETrackingResult_TrackingResult_Uninitialized = 1,
+ ETrackingResult_TrackingResult_Calibrating_InProgress = 100,
+ ETrackingResult_TrackingResult_Calibrating_OutOfRange = 101,
+ ETrackingResult_TrackingResult_Running_OK = 200,
+ ETrackingResult_TrackingResult_Running_OutOfRange = 201,
+} ETrackingResult;
+
+typedef enum ETrackedDeviceClass
+{
+ ETrackedDeviceClass_TrackedDeviceClass_Invalid = 0,
+ ETrackedDeviceClass_TrackedDeviceClass_HMD = 1,
+ ETrackedDeviceClass_TrackedDeviceClass_Controller = 2,
+ ETrackedDeviceClass_TrackedDeviceClass_TrackingReference = 4,
+ ETrackedDeviceClass_TrackedDeviceClass_Other = 1000,
+} ETrackedDeviceClass;
+
+typedef enum ETrackedControllerRole
+{
+ ETrackedControllerRole_TrackedControllerRole_Invalid = 0,
+ ETrackedControllerRole_TrackedControllerRole_LeftHand = 1,
+ ETrackedControllerRole_TrackedControllerRole_RightHand = 2,
+} ETrackedControllerRole;
+
+typedef enum ETrackingUniverseOrigin
+{
+ ETrackingUniverseOrigin_TrackingUniverseSeated = 0,
+ ETrackingUniverseOrigin_TrackingUniverseStanding = 1,
+ ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated = 2,
+} ETrackingUniverseOrigin;
+
+typedef enum ETrackedDeviceProperty
+{
+ ETrackedDeviceProperty_Prop_TrackingSystemName_String = 1000,
+ ETrackedDeviceProperty_Prop_ModelNumber_String = 1001,
+ ETrackedDeviceProperty_Prop_SerialNumber_String = 1002,
+ ETrackedDeviceProperty_Prop_RenderModelName_String = 1003,
+ ETrackedDeviceProperty_Prop_WillDriftInYaw_Bool = 1004,
+ ETrackedDeviceProperty_Prop_ManufacturerName_String = 1005,
+ ETrackedDeviceProperty_Prop_TrackingFirmwareVersion_String = 1006,
+ ETrackedDeviceProperty_Prop_HardwareRevision_String = 1007,
+ ETrackedDeviceProperty_Prop_AllWirelessDongleDescriptions_String = 1008,
+ ETrackedDeviceProperty_Prop_ConnectedWirelessDongle_String = 1009,
+ ETrackedDeviceProperty_Prop_DeviceIsWireless_Bool = 1010,
+ ETrackedDeviceProperty_Prop_DeviceIsCharging_Bool = 1011,
+ ETrackedDeviceProperty_Prop_DeviceBatteryPercentage_Float = 1012,
+ ETrackedDeviceProperty_Prop_StatusDisplayTransform_Matrix34 = 1013,
+ ETrackedDeviceProperty_Prop_Firmware_UpdateAvailable_Bool = 1014,
+ ETrackedDeviceProperty_Prop_Firmware_ManualUpdate_Bool = 1015,
+ ETrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_String = 1016,
+ ETrackedDeviceProperty_Prop_HardwareRevision_Uint64 = 1017,
+ ETrackedDeviceProperty_Prop_FirmwareVersion_Uint64 = 1018,
+ ETrackedDeviceProperty_Prop_FPGAVersion_Uint64 = 1019,
+ ETrackedDeviceProperty_Prop_VRCVersion_Uint64 = 1020,
+ ETrackedDeviceProperty_Prop_RadioVersion_Uint64 = 1021,
+ ETrackedDeviceProperty_Prop_DongleVersion_Uint64 = 1022,
+ ETrackedDeviceProperty_Prop_BlockServerShutdown_Bool = 1023,
+ ETrackedDeviceProperty_Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024,
+ ETrackedDeviceProperty_Prop_ContainsProximitySensor_Bool = 1025,
+ ETrackedDeviceProperty_Prop_DeviceProvidesBatteryStatus_Bool = 1026,
+ ETrackedDeviceProperty_Prop_DeviceCanPowerOff_Bool = 1027,
+ ETrackedDeviceProperty_Prop_Firmware_ProgrammingTarget_String = 1028,
+ ETrackedDeviceProperty_Prop_DeviceClass_Int32 = 1029,
+ ETrackedDeviceProperty_Prop_HasCamera_Bool = 1030,
+ ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000,
+ ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001,
+ ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002,
+ ETrackedDeviceProperty_Prop_UserIpdMeters_Float = 2003,
+ ETrackedDeviceProperty_Prop_CurrentUniverseId_Uint64 = 2004,
+ ETrackedDeviceProperty_Prop_PreviousUniverseId_Uint64 = 2005,
+ ETrackedDeviceProperty_Prop_DisplayFirmwareVersion_Uint64 = 2006,
+ ETrackedDeviceProperty_Prop_IsOnDesktop_Bool = 2007,
+ ETrackedDeviceProperty_Prop_DisplayMCType_Int32 = 2008,
+ ETrackedDeviceProperty_Prop_DisplayMCOffset_Float = 2009,
+ ETrackedDeviceProperty_Prop_DisplayMCScale_Float = 2010,
+ ETrackedDeviceProperty_Prop_EdidVendorID_Int32 = 2011,
+ ETrackedDeviceProperty_Prop_DisplayMCImageLeft_String = 2012,
+ ETrackedDeviceProperty_Prop_DisplayMCImageRight_String = 2013,
+ ETrackedDeviceProperty_Prop_DisplayGCBlackClamp_Float = 2014,
+ ETrackedDeviceProperty_Prop_EdidProductID_Int32 = 2015,
+ ETrackedDeviceProperty_Prop_CameraToHeadTransform_Matrix34 = 2016,
+ ETrackedDeviceProperty_Prop_DisplayGCType_Int32 = 2017,
+ ETrackedDeviceProperty_Prop_DisplayGCOffset_Float = 2018,
+ ETrackedDeviceProperty_Prop_DisplayGCScale_Float = 2019,
+ ETrackedDeviceProperty_Prop_DisplayGCPrescale_Float = 2020,
+ ETrackedDeviceProperty_Prop_DisplayGCImage_String = 2021,
+ ETrackedDeviceProperty_Prop_LensCenterLeftU_Float = 2022,
+ ETrackedDeviceProperty_Prop_LensCenterLeftV_Float = 2023,
+ ETrackedDeviceProperty_Prop_LensCenterRightU_Float = 2024,
+ ETrackedDeviceProperty_Prop_LensCenterRightV_Float = 2025,
+ ETrackedDeviceProperty_Prop_UserHeadToEyeDepthMeters_Float = 2026,
+ ETrackedDeviceProperty_Prop_CameraFirmwareVersion_Uint64 = 2027,
+ ETrackedDeviceProperty_Prop_CameraFirmwareDescription_String = 2028,
+ ETrackedDeviceProperty_Prop_DisplayFPGAVersion_Uint64 = 2029,
+ ETrackedDeviceProperty_Prop_DisplayBootloaderVersion_Uint64 = 2030,
+ ETrackedDeviceProperty_Prop_DisplayHardwareVersion_Uint64 = 2031,
+ ETrackedDeviceProperty_Prop_AudioFirmwareVersion_Uint64 = 2032,
+ ETrackedDeviceProperty_Prop_CameraCompatibilityMode_Int32 = 2033,
+ ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000,
+ ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001,
+ ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002,
+ ETrackedDeviceProperty_Prop_Axis1Type_Int32 = 3003,
+ ETrackedDeviceProperty_Prop_Axis2Type_Int32 = 3004,
+ ETrackedDeviceProperty_Prop_Axis3Type_Int32 = 3005,
+ ETrackedDeviceProperty_Prop_Axis4Type_Int32 = 3006,
+ ETrackedDeviceProperty_Prop_FieldOfViewLeftDegrees_Float = 4000,
+ ETrackedDeviceProperty_Prop_FieldOfViewRightDegrees_Float = 4001,
+ ETrackedDeviceProperty_Prop_FieldOfViewTopDegrees_Float = 4002,
+ ETrackedDeviceProperty_Prop_FieldOfViewBottomDegrees_Float = 4003,
+ ETrackedDeviceProperty_Prop_TrackingRangeMinimumMeters_Float = 4004,
+ ETrackedDeviceProperty_Prop_TrackingRangeMaximumMeters_Float = 4005,
+ ETrackedDeviceProperty_Prop_ModeLabel_String = 4006,
+ ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_Start = 10000,
+ ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_End = 10999,
+} ETrackedDeviceProperty;
+
+typedef enum ETrackedPropertyError
+{
+ ETrackedPropertyError_TrackedProp_Success = 0,
+ ETrackedPropertyError_TrackedProp_WrongDataType = 1,
+ ETrackedPropertyError_TrackedProp_WrongDeviceClass = 2,
+ ETrackedPropertyError_TrackedProp_BufferTooSmall = 3,
+ ETrackedPropertyError_TrackedProp_UnknownProperty = 4,
+ ETrackedPropertyError_TrackedProp_InvalidDevice = 5,
+ ETrackedPropertyError_TrackedProp_CouldNotContactServer = 6,
+ ETrackedPropertyError_TrackedProp_ValueNotProvidedByDevice = 7,
+ ETrackedPropertyError_TrackedProp_StringExceedsMaximumLength = 8,
+ ETrackedPropertyError_TrackedProp_NotYetAvailable = 9,
+} ETrackedPropertyError;
+
+typedef enum EVRSubmitFlags
+{
+ EVRSubmitFlags_Submit_Default = 0,
+ EVRSubmitFlags_Submit_LensDistortionAlreadyApplied = 1,
+ EVRSubmitFlags_Submit_GlRenderBuffer = 2,
+} EVRSubmitFlags;
+
+typedef enum EVRState
+{
+ EVRState_VRState_Undefined = -1,
+ EVRState_VRState_Off = 0,
+ EVRState_VRState_Searching = 1,
+ EVRState_VRState_Searching_Alert = 2,
+ EVRState_VRState_Ready = 3,
+ EVRState_VRState_Ready_Alert = 4,
+ EVRState_VRState_NotReady = 5,
+} EVRState;
+
+typedef enum EVREventType
+{
+ EVREventType_VREvent_None = 0,
+ EVREventType_VREvent_TrackedDeviceActivated = 100,
+ EVREventType_VREvent_TrackedDeviceDeactivated = 101,
+ EVREventType_VREvent_TrackedDeviceUpdated = 102,
+ EVREventType_VREvent_TrackedDeviceUserInteractionStarted = 103,
+ EVREventType_VREvent_TrackedDeviceUserInteractionEnded = 104,
+ EVREventType_VREvent_IpdChanged = 105,
+ EVREventType_VREvent_EnterStandbyMode = 106,
+ EVREventType_VREvent_LeaveStandbyMode = 107,
+ EVREventType_VREvent_TrackedDeviceRoleChanged = 108,
+ EVREventType_VREvent_ButtonPress = 200,
+ EVREventType_VREvent_ButtonUnpress = 201,
+ EVREventType_VREvent_ButtonTouch = 202,
+ EVREventType_VREvent_ButtonUntouch = 203,
+ EVREventType_VREvent_MouseMove = 300,
+ EVREventType_VREvent_MouseButtonDown = 301,
+ EVREventType_VREvent_MouseButtonUp = 302,
+ EVREventType_VREvent_FocusEnter = 303,
+ EVREventType_VREvent_FocusLeave = 304,
+ EVREventType_VREvent_Scroll = 305,
+ EVREventType_VREvent_TouchPadMove = 306,
+ EVREventType_VREvent_InputFocusCaptured = 400,
+ EVREventType_VREvent_InputFocusReleased = 401,
+ EVREventType_VREvent_SceneFocusLost = 402,
+ EVREventType_VREvent_SceneFocusGained = 403,
+ EVREventType_VREvent_SceneApplicationChanged = 404,
+ EVREventType_VREvent_SceneFocusChanged = 405,
+ EVREventType_VREvent_HideRenderModels = 410,
+ EVREventType_VREvent_ShowRenderModels = 411,
+ EVREventType_VREvent_OverlayShown = 500,
+ EVREventType_VREvent_OverlayHidden = 501,
+ EVREventType_VREvent_DashboardActivated = 502,
+ EVREventType_VREvent_DashboardDeactivated = 503,
+ EVREventType_VREvent_DashboardThumbSelected = 504,
+ EVREventType_VREvent_DashboardRequested = 505,
+ EVREventType_VREvent_ResetDashboard = 506,
+ EVREventType_VREvent_RenderToast = 507,
+ EVREventType_VREvent_ImageLoaded = 508,
+ EVREventType_VREvent_ShowKeyboard = 509,
+ EVREventType_VREvent_HideKeyboard = 510,
+ EVREventType_VREvent_OverlayGamepadFocusGained = 511,
+ EVREventType_VREvent_OverlayGamepadFocusLost = 512,
+ EVREventType_VREvent_OverlaySharedTextureChanged = 513,
+ EVREventType_VREvent_Notification_Shown = 600,
+ EVREventType_VREvent_Notification_Hidden = 601,
+ EVREventType_VREvent_Notification_BeginInteraction = 602,
+ EVREventType_VREvent_Notification_Destroyed = 603,
+ EVREventType_VREvent_Quit = 700,
+ EVREventType_VREvent_ProcessQuit = 701,
+ EVREventType_VREvent_QuitAborted_UserPrompt = 702,
+ EVREventType_VREvent_QuitAcknowledged = 703,
+ EVREventType_VREvent_ChaperoneDataHasChanged = 800,
+ EVREventType_VREvent_ChaperoneUniverseHasChanged = 801,
+ EVREventType_VREvent_ChaperoneTempDataHasChanged = 802,
+ EVREventType_VREvent_ChaperoneSettingsHaveChanged = 803,
+ EVREventType_VREvent_SeatedZeroPoseReset = 804,
+ EVREventType_VREvent_BackgroundSettingHasChanged = 850,
+ EVREventType_VREvent_CameraSettingsHaveChanged = 851,
+ EVREventType_VREvent_StatusUpdate = 900,
+ EVREventType_VREvent_MCImageUpdated = 1000,
+ EVREventType_VREvent_FirmwareUpdateStarted = 1100,
+ EVREventType_VREvent_FirmwareUpdateFinished = 1101,
+ EVREventType_VREvent_KeyboardClosed = 1200,
+ EVREventType_VREvent_KeyboardCharInput = 1201,
+ EVREventType_VREvent_KeyboardDone = 1202,
+ EVREventType_VREvent_ApplicationTransitionStarted = 1300,
+ EVREventType_VREvent_ApplicationTransitionAborted = 1301,
+ EVREventType_VREvent_ApplicationTransitionNewAppStarted = 1302,
+ EVREventType_VREvent_Compositor_MirrorWindowShown = 1400,
+ EVREventType_VREvent_Compositor_MirrorWindowHidden = 1401,
+ EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410,
+ EVREventType_VREvent_Compositor_ChaperoneBoundsHidden = 1411,
+ EVREventType_VREvent_TrackedCamera_StartVideoStream = 1500,
+ EVREventType_VREvent_TrackedCamera_StopVideoStream = 1501,
+ EVREventType_VREvent_TrackedCamera_PauseVideoStream = 1502,
+ EVREventType_VREvent_TrackedCamera_ResumeVideoStream = 1503,
+ EVREventType_VREvent_PerformanceTest_EnableCapture = 1600,
+ EVREventType_VREvent_PerformanceTest_DisableCapture = 1601,
+ EVREventType_VREvent_PerformanceTest_FidelityLevel = 1602,
+ EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000,
+ EVREventType_VREvent_VendorSpecific_Reserved_End = 19999,
+} EVREventType;
+
+typedef enum EDeviceActivityLevel
+{
+ EDeviceActivityLevel_k_EDeviceActivityLevel_Unknown = -1,
+ EDeviceActivityLevel_k_EDeviceActivityLevel_Idle = 0,
+ EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction = 1,
+ EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction_Timeout = 2,
+ EDeviceActivityLevel_k_EDeviceActivityLevel_Standby = 3,
+} EDeviceActivityLevel;
+
+typedef enum EVRButtonId
+{
+ EVRButtonId_k_EButton_System = 0,
+ EVRButtonId_k_EButton_ApplicationMenu = 1,
+ EVRButtonId_k_EButton_Grip = 2,
+ EVRButtonId_k_EButton_DPad_Left = 3,
+ EVRButtonId_k_EButton_DPad_Up = 4,
+ EVRButtonId_k_EButton_DPad_Right = 5,
+ EVRButtonId_k_EButton_DPad_Down = 6,
+ EVRButtonId_k_EButton_A = 7,
+ EVRButtonId_k_EButton_Axis0 = 32,
+ EVRButtonId_k_EButton_Axis1 = 33,
+ EVRButtonId_k_EButton_Axis2 = 34,
+ EVRButtonId_k_EButton_Axis3 = 35,
+ EVRButtonId_k_EButton_Axis4 = 36,
+ EVRButtonId_k_EButton_SteamVR_Touchpad = 32,
+ EVRButtonId_k_EButton_SteamVR_Trigger = 33,
+ EVRButtonId_k_EButton_Dashboard_Back = 2,
+ EVRButtonId_k_EButton_Max = 64,
+} EVRButtonId;
+
+typedef enum EVRMouseButton
+{
+ EVRMouseButton_VRMouseButton_Left = 1,
+ EVRMouseButton_VRMouseButton_Right = 2,
+ EVRMouseButton_VRMouseButton_Middle = 4,
+} EVRMouseButton;
+
+typedef enum EVRControllerAxisType
+{
+ EVRControllerAxisType_k_eControllerAxis_None = 0,
+ EVRControllerAxisType_k_eControllerAxis_TrackPad = 1,
+ EVRControllerAxisType_k_eControllerAxis_Joystick = 2,
+ EVRControllerAxisType_k_eControllerAxis_Trigger = 3,
+} EVRControllerAxisType;
+
+typedef enum EVRControllerEventOutputType
+{
+ EVRControllerEventOutputType_ControllerEventOutput_OSEvents = 0,
+ EVRControllerEventOutputType_ControllerEventOutput_VREvents = 1,
+} EVRControllerEventOutputType;
+
+typedef enum ECollisionBoundsStyle
+{
+ ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_BEGINNER = 0,
+ ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_INTERMEDIATE = 1,
+ ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_SQUARES = 2,
+ ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_ADVANCED = 3,
+ ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_NONE = 4,
+ ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_COUNT = 5,
+} ECollisionBoundsStyle;
+
+typedef enum EVROverlayError
+{
+ EVROverlayError_VROverlayError_None = 0,
+ EVROverlayError_VROverlayError_UnknownOverlay = 10,
+ EVROverlayError_VROverlayError_InvalidHandle = 11,
+ EVROverlayError_VROverlayError_PermissionDenied = 12,
+ EVROverlayError_VROverlayError_OverlayLimitExceeded = 13,
+ EVROverlayError_VROverlayError_WrongVisibilityType = 14,
+ EVROverlayError_VROverlayError_KeyTooLong = 15,
+ EVROverlayError_VROverlayError_NameTooLong = 16,
+ EVROverlayError_VROverlayError_KeyInUse = 17,
+ EVROverlayError_VROverlayError_WrongTransformType = 18,
+ EVROverlayError_VROverlayError_InvalidTrackedDevice = 19,
+ EVROverlayError_VROverlayError_InvalidParameter = 20,
+ EVROverlayError_VROverlayError_ThumbnailCantBeDestroyed = 21,
+ EVROverlayError_VROverlayError_ArrayTooSmall = 22,
+ EVROverlayError_VROverlayError_RequestFailed = 23,
+ EVROverlayError_VROverlayError_InvalidTexture = 24,
+ EVROverlayError_VROverlayError_UnableToLoadFile = 25,
+ EVROverlayError_VROVerlayError_KeyboardAlreadyInUse = 26,
+ EVROverlayError_VROverlayError_NoNeighbor = 27,
+} EVROverlayError;
+
+typedef enum EVRApplicationType
+{
+ EVRApplicationType_VRApplication_Other = 0,
+ EVRApplicationType_VRApplication_Scene = 1,
+ EVRApplicationType_VRApplication_Overlay = 2,
+ EVRApplicationType_VRApplication_Background = 3,
+ EVRApplicationType_VRApplication_Utility = 4,
+} EVRApplicationType;
+
+typedef enum EVRFirmwareError
+{
+ EVRFirmwareError_VRFirmwareError_None = 0,
+ EVRFirmwareError_VRFirmwareError_Success = 1,
+ EVRFirmwareError_VRFirmwareError_Fail = 2,
+} EVRFirmwareError;
+
+typedef enum EVRNotificationError
+{
+ EVRNotificationError_VRNotificationError_OK = 0,
+ EVRNotificationError_VRNotificationError_InvalidNotificationId = 100,
+ EVRNotificationError_VRNotificationError_NotificationQueueFull = 101,
+ EVRNotificationError_VRNotificationError_InvalidOverlayHandle = 102,
+} EVRNotificationError;
+
+typedef enum EVRInitError
+{
+ EVRInitError_VRInitError_None = 0,
+ EVRInitError_VRInitError_Unknown = 1,
+ EVRInitError_VRInitError_Init_InstallationNotFound = 100,
+ EVRInitError_VRInitError_Init_InstallationCorrupt = 101,
+ EVRInitError_VRInitError_Init_VRClientDLLNotFound = 102,
+ EVRInitError_VRInitError_Init_FileNotFound = 103,
+ EVRInitError_VRInitError_Init_FactoryNotFound = 104,
+ EVRInitError_VRInitError_Init_InterfaceNotFound = 105,
+ EVRInitError_VRInitError_Init_InvalidInterface = 106,
+ EVRInitError_VRInitError_Init_UserConfigDirectoryInvalid = 107,
+ EVRInitError_VRInitError_Init_HmdNotFound = 108,
+ EVRInitError_VRInitError_Init_NotInitialized = 109,
+ EVRInitError_VRInitError_Init_PathRegistryNotFound = 110,
+ EVRInitError_VRInitError_Init_NoConfigPath = 111,
+ EVRInitError_VRInitError_Init_NoLogPath = 112,
+ EVRInitError_VRInitError_Init_PathRegistryNotWritable = 113,
+ EVRInitError_VRInitError_Init_AppInfoInitFailed = 114,
+ EVRInitError_VRInitError_Init_Retry = 115,
+ EVRInitError_VRInitError_Init_InitCanceledByUser = 116,
+ EVRInitError_VRInitError_Init_AnotherAppLaunching = 117,
+ EVRInitError_VRInitError_Init_SettingsInitFailed = 118,
+ EVRInitError_VRInitError_Init_ShuttingDown = 119,
+ EVRInitError_VRInitError_Init_TooManyObjects = 120,
+ EVRInitError_VRInitError_Init_NoServerForBackgroundApp = 121,
+ EVRInitError_VRInitError_Init_NotSupportedWithCompositor = 122,
+ EVRInitError_VRInitError_Init_NotAvailableToUtilityApps = 123,
+ EVRInitError_VRInitError_Driver_Failed = 200,
+ EVRInitError_VRInitError_Driver_Unknown = 201,
+ EVRInitError_VRInitError_Driver_HmdUnknown = 202,
+ EVRInitError_VRInitError_Driver_NotLoaded = 203,
+ EVRInitError_VRInitError_Driver_RuntimeOutOfDate = 204,
+ EVRInitError_VRInitError_Driver_HmdInUse = 205,
+ EVRInitError_VRInitError_Driver_NotCalibrated = 206,
+ EVRInitError_VRInitError_Driver_CalibrationInvalid = 207,
+ EVRInitError_VRInitError_Driver_HmdDisplayNotFound = 208,
+ EVRInitError_VRInitError_IPC_ServerInitFailed = 300,
+ EVRInitError_VRInitError_IPC_ConnectFailed = 301,
+ EVRInitError_VRInitError_IPC_SharedStateInitFailed = 302,
+ EVRInitError_VRInitError_IPC_CompositorInitFailed = 303,
+ EVRInitError_VRInitError_IPC_MutexInitFailed = 304,
+ EVRInitError_VRInitError_IPC_Failed = 305,
+ EVRInitError_VRInitError_Compositor_Failed = 400,
+ EVRInitError_VRInitError_Compositor_D3D11HardwareRequired = 401,
+ EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataError = 1112,
+ EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
+ EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000,
+} EVRInitError;
+
+typedef enum EVRApplicationError
+{
+ EVRApplicationError_VRApplicationError_None = 0,
+ EVRApplicationError_VRApplicationError_AppKeyAlreadyExists = 100,
+ EVRApplicationError_VRApplicationError_NoManifest = 101,
+ EVRApplicationError_VRApplicationError_NoApplication = 102,
+ EVRApplicationError_VRApplicationError_InvalidIndex = 103,
+ EVRApplicationError_VRApplicationError_UnknownApplication = 104,
+ EVRApplicationError_VRApplicationError_IPCFailed = 105,
+ EVRApplicationError_VRApplicationError_ApplicationAlreadyRunning = 106,
+ EVRApplicationError_VRApplicationError_InvalidManifest = 107,
+ EVRApplicationError_VRApplicationError_InvalidApplication = 108,
+ EVRApplicationError_VRApplicationError_LaunchFailed = 109,
+ EVRApplicationError_VRApplicationError_ApplicationAlreadyStarting = 110,
+ EVRApplicationError_VRApplicationError_LaunchInProgress = 111,
+ EVRApplicationError_VRApplicationError_OldApplicationQuitting = 112,
+ EVRApplicationError_VRApplicationError_TransitionAborted = 113,
+ EVRApplicationError_VRApplicationError_IsTemplate = 114,
+ EVRApplicationError_VRApplicationError_BufferTooSmall = 200,
+ EVRApplicationError_VRApplicationError_PropertyNotSet = 201,
+ EVRApplicationError_VRApplicationError_UnknownProperty = 202,
+} EVRApplicationError;
+
+typedef enum EVRApplicationProperty
+{
+ EVRApplicationProperty_VRApplicationProperty_Name_String = 0,
+ EVRApplicationProperty_VRApplicationProperty_LaunchType_String = 11,
+ EVRApplicationProperty_VRApplicationProperty_WorkingDirectory_String = 12,
+ EVRApplicationProperty_VRApplicationProperty_BinaryPath_String = 13,
+ EVRApplicationProperty_VRApplicationProperty_Arguments_String = 14,
+ EVRApplicationProperty_VRApplicationProperty_URL_String = 15,
+ EVRApplicationProperty_VRApplicationProperty_Description_String = 50,
+ EVRApplicationProperty_VRApplicationProperty_NewsURL_String = 51,
+ EVRApplicationProperty_VRApplicationProperty_ImagePath_String = 52,
+ EVRApplicationProperty_VRApplicationProperty_Source_String = 53,
+ EVRApplicationProperty_VRApplicationProperty_IsDashboardOverlay_Bool = 60,
+ EVRApplicationProperty_VRApplicationProperty_IsTemplate_Bool = 61,
+ EVRApplicationProperty_VRApplicationProperty_IsInstanced_Bool = 62,
+ EVRApplicationProperty_VRApplicationProperty_LastLaunchTime_Uint64 = 70,
+} EVRApplicationProperty;
+
+typedef enum EVRApplicationTransitionState
+{
+ EVRApplicationTransitionState_VRApplicationTransition_None = 0,
+ EVRApplicationTransitionState_VRApplicationTransition_OldAppQuitSent = 10,
+ EVRApplicationTransitionState_VRApplicationTransition_WaitingForExternalLaunch = 11,
+ EVRApplicationTransitionState_VRApplicationTransition_NewAppLaunched = 20,
+} EVRApplicationTransitionState;
+
+typedef enum ChaperoneCalibrationState
+{
+ ChaperoneCalibrationState_OK = 1,
+ ChaperoneCalibrationState_Warning = 100,
+ ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101,
+ ChaperoneCalibrationState_Warning_BaseStationRemoved = 102,
+ ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103,
+ ChaperoneCalibrationState_Error = 200,
+ ChaperoneCalibrationState_Error_BaseStationUninitalized = 201,
+ ChaperoneCalibrationState_Error_BaseStationConflict = 202,
+ ChaperoneCalibrationState_Error_PlayAreaInvalid = 203,
+ ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204,
+} ChaperoneCalibrationState;
+
+typedef enum EChaperoneConfigFile
+{
+ EChaperoneConfigFile_Live = 1,
+ EChaperoneConfigFile_Temp = 2,
+} EChaperoneConfigFile;
+
+typedef enum EChaperoneImportFlags
+{
+ EChaperoneImportFlags_EChaperoneImport_BoundsOnly = 1,
+} EChaperoneImportFlags;
+
+typedef enum EVRCompositorError
+{
+ EVRCompositorError_VRCompositorError_None = 0,
+ EVRCompositorError_VRCompositorError_IncompatibleVersion = 100,
+ EVRCompositorError_VRCompositorError_DoNotHaveFocus = 101,
+ EVRCompositorError_VRCompositorError_InvalidTexture = 102,
+ EVRCompositorError_VRCompositorError_IsNotSceneApplication = 103,
+ EVRCompositorError_VRCompositorError_TextureIsOnWrongDevice = 104,
+ EVRCompositorError_VRCompositorError_TextureUsesUnsupportedFormat = 105,
+ EVRCompositorError_VRCompositorError_SharedTexturesNotSupported = 106,
+ EVRCompositorError_VRCompositorError_IndexOutOfRange = 107,
+} EVRCompositorError;
+
+typedef enum VROverlayInputMethod
+{
+ VROverlayInputMethod_None = 0,
+ VROverlayInputMethod_Mouse = 1,
+} VROverlayInputMethod;
+
+typedef enum VROverlayTransformType
+{
+ VROverlayTransformType_VROverlayTransform_Absolute = 0,
+ VROverlayTransformType_VROverlayTransform_TrackedDeviceRelative = 1,
+ VROverlayTransformType_VROverlayTransform_SystemOverlay = 2,
+ VROverlayTransformType_VROverlayTransform_TrackedComponent = 3,
+} VROverlayTransformType;
+
+typedef enum VROverlayFlags
+{
+ VROverlayFlags_None = 0,
+ VROverlayFlags_Curved = 1,
+ VROverlayFlags_RGSS4X = 2,
+ VROverlayFlags_NoDashboardTab = 3,
+ VROverlayFlags_AcceptsGamepadEvents = 4,
+ VROverlayFlags_ShowGamepadFocus = 5,
+ VROverlayFlags_SendVRScrollEvents = 6,
+ VROverlayFlags_SendVRTouchpadEvents = 7,
+ VROverlayFlags_ShowTouchPadScrollWheel = 8,
+} VROverlayFlags;
+
+typedef enum EGamepadTextInputMode
+{
+ EGamepadTextInputMode_k_EGamepadTextInputModeNormal = 0,
+ EGamepadTextInputMode_k_EGamepadTextInputModePassword = 1,
+ EGamepadTextInputMode_k_EGamepadTextInputModeSubmit = 2,
+} EGamepadTextInputMode;
+
+typedef enum EGamepadTextInputLineMode
+{
+ EGamepadTextInputLineMode_k_EGamepadTextInputLineModeSingleLine = 0,
+ EGamepadTextInputLineMode_k_EGamepadTextInputLineModeMultipleLines = 1,
+} EGamepadTextInputLineMode;
+
+typedef enum EOverlayDirection
+{
+ EOverlayDirection_OverlayDirection_Up = 0,
+ EOverlayDirection_OverlayDirection_Down = 1,
+ EOverlayDirection_OverlayDirection_Left = 2,
+ EOverlayDirection_OverlayDirection_Right = 3,
+ EOverlayDirection_OverlayDirection_Count = 4,
+} EOverlayDirection;
+
+typedef enum EVRRenderModelError
+{
+ EVRRenderModelError_VRRenderModelError_None = 0,
+ EVRRenderModelError_VRRenderModelError_Loading = 100,
+ EVRRenderModelError_VRRenderModelError_NotSupported = 200,
+ EVRRenderModelError_VRRenderModelError_InvalidArg = 300,
+ EVRRenderModelError_VRRenderModelError_InvalidModel = 301,
+ EVRRenderModelError_VRRenderModelError_NoShapes = 302,
+ EVRRenderModelError_VRRenderModelError_MultipleShapes = 303,
+ EVRRenderModelError_VRRenderModelError_TooManyIndices = 304,
+ EVRRenderModelError_VRRenderModelError_MultipleTextures = 305,
+ EVRRenderModelError_VRRenderModelError_InvalidTexture = 400,
+} EVRRenderModelError;
+
+typedef enum EVRComponentProperty
+{
+ EVRComponentProperty_VRComponentProperty_IsStatic = 1,
+ EVRComponentProperty_VRComponentProperty_IsVisible = 2,
+ EVRComponentProperty_VRComponentProperty_IsTouched = 4,
+ EVRComponentProperty_VRComponentProperty_IsPressed = 8,
+ EVRComponentProperty_VRComponentProperty_IsScrolled = 16,
+} EVRComponentProperty;
+
+typedef enum EVRNotificationType
+{
+ EVRNotificationType_Transient = 0,
+ EVRNotificationType_Persistent = 1,
+} EVRNotificationType;
+
+typedef enum EVRNotificationStyle
+{
+ EVRNotificationStyle_None = 0,
+ EVRNotificationStyle_Application = 100,
+ EVRNotificationStyle_Contact_Disabled = 200,
+ EVRNotificationStyle_Contact_Enabled = 201,
+ EVRNotificationStyle_Contact_Active = 202,
+} EVRNotificationStyle;
+
+typedef enum EVRSettingsError
+{
+ EVRSettingsError_VRSettingsError_None = 0,
+ EVRSettingsError_VRSettingsError_IPCFailed = 1,
+ EVRSettingsError_VRSettingsError_WriteFailed = 2,
+ EVRSettingsError_VRSettingsError_ReadFailed = 3,
+} EVRSettingsError;
+
+
+// OpenVR typedefs
+
+typedef uint32_t TrackedDeviceIndex_t;
+typedef uint32_t VRNotificationId;
+typedef uint64_t VROverlayHandle_t;
+typedef void * glSharedTextureHandle_t;
+typedef int32_t glInt_t;
+typedef uint32_t glUInt_t;
+typedef uint32_t TrackedDeviceIndex_t;
+typedef uint64_t VROverlayHandle_t;
+typedef uint32_t VRComponentProperties;
+typedef int32_t TextureID_t;
+typedef uint32_t VRNotificationId;
+typedef EVRInitError HmdError;
+typedef EVREye Hmd_Eye;
+typedef EGraphicsAPIConvention GraphicsAPIConvention;
+typedef EColorSpace ColorSpace;
+typedef ETrackingResult HmdTrackingResult;
+typedef ETrackedDeviceClass TrackedDeviceClass;
+typedef ETrackingUniverseOrigin TrackingUniverseOrigin;
+typedef ETrackedDeviceProperty TrackedDeviceProperty;
+typedef ETrackedPropertyError TrackedPropertyError;
+typedef EVRSubmitFlags VRSubmitFlags_t;
+typedef EVRState VRState_t;
+typedef ECollisionBoundsStyle CollisionBoundsStyle_t;
+typedef EVROverlayError VROverlayError;
+typedef EVRFirmwareError VRFirmwareError;
+typedef EVRCompositorError VRCompositorError;
+
+// OpenVR Structs
+
+typedef struct HmdMatrix34_t
+{
+ float m[3][4]; //float[3][4]
+} HmdMatrix34_t;
+
+typedef struct HmdMatrix44_t
+{
+ float m[4][4]; //float[4][4]
+} HmdMatrix44_t;
+
+typedef struct HmdVector3_t
+{
+ float v[3]; //float[3]
+} HmdVector3_t;
+
+typedef struct HmdVector4_t
+{
+ float v[4]; //float[4]
+} HmdVector4_t;
+
+typedef struct HmdVector3d_t
+{
+ double v[3]; //double[3]
+} HmdVector3d_t;
+
+typedef struct HmdVector2_t
+{
+ float v[2]; //float[2]
+} HmdVector2_t;
+
+typedef struct HmdQuaternion_t
+{
+ double w;
+ double x;
+ double y;
+ double z;
+} HmdQuaternion_t;
+
+typedef struct HmdColor_t
+{
+ float r;
+ float g;
+ float b;
+ float a;
+} HmdColor_t;
+
+typedef struct HmdQuad_t
+{
+ struct HmdVector3_t vCorners[4]; //struct vr::HmdVector3_t[4]
+} HmdQuad_t;
+
+typedef struct HmdRect2_t
+{
+ struct HmdVector2_t vTopLeft;
+ struct HmdVector2_t vBottomRight;
+} HmdRect2_t;
+
+typedef struct DistortionCoordinates_t
+{
+ float rfRed[2]; //float[2]
+ float rfGreen[2]; //float[2]
+ float rfBlue[2]; //float[2]
+} DistortionCoordinates_t;
+
+typedef struct Texture_t
+{
+ void * handle; // void *
+ enum EGraphicsAPIConvention eType;
+ enum EColorSpace eColorSpace;
+} Texture_t;
+
+typedef struct TrackedDevicePose_t
+{
+ struct HmdMatrix34_t mDeviceToAbsoluteTracking;
+ struct HmdVector3_t vVelocity;
+ struct HmdVector3_t vAngularVelocity;
+ enum ETrackingResult eTrackingResult;
+ bool bPoseIsValid;
+ bool bDeviceIsConnected;
+} TrackedDevicePose_t;
+
+typedef struct VRTextureBounds_t
+{
+ float uMin;
+ float vMin;
+ float uMax;
+ float vMax;
+} VRTextureBounds_t;
+
+typedef struct VREvent_Controller_t
+{
+ uint32_t button;
+} VREvent_Controller_t;
+
+typedef struct VREvent_Mouse_t
+{
+ float x;
+ float y;
+ uint32_t button;
+} VREvent_Mouse_t;
+
+typedef struct VREvent_Scroll_t
+{
+ float xdelta;
+ float ydelta;
+ uint32_t repeatCount;
+} VREvent_Scroll_t;
+
+typedef struct VREvent_TouchPadMove_t
+{
+ bool bFingerDown;
+ float flSecondsFingerDown;
+ float fValueXFirst;
+ float fValueYFirst;
+ float fValueXRaw;
+ float fValueYRaw;
+} VREvent_TouchPadMove_t;
+
+typedef struct VREvent_Notification_t
+{
+ uint64_t ulUserValue;
+ uint32_t notificationId;
+} VREvent_Notification_t;
+
+typedef struct VREvent_Process_t
+{
+ uint32_t pid;
+ uint32_t oldPid;
+ bool bForced;
+} VREvent_Process_t;
+
+typedef struct VREvent_Overlay_t
+{
+ uint64_t overlayHandle;
+} VREvent_Overlay_t;
+
+typedef struct VREvent_Status_t
+{
+ uint32_t statusState;
+} VREvent_Status_t;
+
+typedef struct VREvent_Keyboard_t
+{
+ char * cNewInput[8]; //char[8]
+ uint64_t uUserValue;
+} VREvent_Keyboard_t;
+
+typedef struct VREvent_Ipd_t
+{
+ float ipdMeters;
+} VREvent_Ipd_t;
+
+typedef struct VREvent_Chaperone_t
+{
+ uint64_t m_nPreviousUniverse;
+ uint64_t m_nCurrentUniverse;
+} VREvent_Chaperone_t;
+
+typedef struct VREvent_Reserved_t
+{
+ uint64_t reserved0;
+ uint64_t reserved1;
+} VREvent_Reserved_t;
+
+typedef struct VREvent_PerformanceTest_t
+{
+ uint32_t m_nFidelityLevel;
+} VREvent_PerformanceTest_t;
+
+typedef struct VREvent_SeatedZeroPoseReset_t
+{
+ bool bResetBySystemMenu;
+} VREvent_SeatedZeroPoseReset_t;
+
+typedef struct HiddenAreaMesh_t
+{
+ struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t *
+ uint32_t unTriangleCount;
+} HiddenAreaMesh_t;
+
+typedef struct VRControllerAxis_t
+{
+ float x;
+ float y;
+} VRControllerAxis_t;
+
+typedef struct VRControllerState_t
+{
+ uint32_t unPacketNum;
+ uint64_t ulButtonPressed;
+ uint64_t ulButtonTouched;
+ struct VRControllerAxis_t rAxis[5]; //struct vr::VRControllerAxis_t[5]
+} VRControllerState_t;
+
+typedef struct Compositor_OverlaySettings
+{
+ uint32_t size;
+ bool curved;
+ bool antialias;
+ float scale;
+ float distance;
+ float alpha;
+ float uOffset;
+ float vOffset;
+ float uScale;
+ float vScale;
+ float gridDivs;
+ float gridWidth;
+ float gridScale;
+ struct HmdMatrix44_t transform;
+} Compositor_OverlaySettings;
+
+typedef struct AppOverrideKeys_t
+{
+ char * pchKey; // const char *
+ char * pchValue; // const char *
+} AppOverrideKeys_t;
+
+typedef struct Compositor_FrameTiming
+{
+ uint32_t m_nSize;
+ uint32_t m_nFrameIndex;
+ uint32_t m_nNumFramePresents;
+ uint32_t m_nNumDroppedFrames;
+ double m_flSystemTimeInSeconds;
+ float m_flSceneRenderGpuMs;
+ float m_flTotalRenderGpuMs;
+ float m_flCompositorRenderGpuMs;
+ float m_flCompositorRenderCpuMs;
+ float m_flCompositorIdleCpuMs;
+ float m_flClientFrameIntervalMs;
+ float m_flPresentCallCpuMs;
+ float m_flWaitForPresentCpuMs;
+ float m_flSubmitFrameMs;
+ float m_flWaitGetPosesCalledMs;
+ float m_flNewPosesReadyMs;
+ float m_flNewFrameReadyMs;
+ float m_flCompositorUpdateStartMs;
+ float m_flCompositorUpdateEndMs;
+ float m_flCompositorRenderStartMs;
+ TrackedDevicePose_t m_HmdPose;
+ int32_t m_nFidelityLevel;
+} Compositor_FrameTiming;
+
+typedef struct VROverlayIntersectionParams_t
+{
+ struct HmdVector3_t vSource;
+ struct HmdVector3_t vDirection;
+ enum ETrackingUniverseOrigin eOrigin;
+} VROverlayIntersectionParams_t;
+
+typedef struct VROverlayIntersectionResults_t
+{
+ struct HmdVector3_t vPoint;
+ struct HmdVector3_t vNormal;
+ struct HmdVector2_t vUVs;
+ float fDistance;
+} VROverlayIntersectionResults_t;
+
+typedef struct RenderModel_ComponentState_t
+{
+ struct HmdMatrix34_t mTrackingToComponentRenderModel;
+ struct HmdMatrix34_t mTrackingToComponentLocal;
+ VRComponentProperties uProperties;
+} RenderModel_ComponentState_t;
+
+typedef struct RenderModel_Vertex_t
+{
+ struct HmdVector3_t vPosition;
+ struct HmdVector3_t vNormal;
+ float rfTextureCoord[2]; //float[2]
+} RenderModel_Vertex_t;
+
+typedef struct RenderModel_TextureMap_t
+{
+ uint16_t unWidth;
+ uint16_t unHeight;
+ uint8_t * rubTextureMapData; // const uint8_t *
+} RenderModel_TextureMap_t;
+
+typedef struct RenderModel_t
+{
+ struct RenderModel_Vertex_t * rVertexData; // const struct vr::RenderModel_Vertex_t *
+ uint32_t unVertexCount;
+ uint16_t * rIndexData; // const uint16_t *
+ uint32_t unTriangleCount;
+ TextureID_t diffuseTextureId;
+} RenderModel_t;
+
+typedef struct RenderModel_ControllerMode_State_t
+{
+ bool bScrollWheelVisible;
+} RenderModel_ControllerMode_State_t;
+
+typedef struct NotificationBitmap_t
+{
+ void * bytes; // void *
+ int32_t width;
+ int32_t height;
+ int32_t depth;
+} NotificationBitmap_t;
+
+typedef struct COpenVRContext
+{
+ intptr_t m_pVRSystem; // class vr::IVRSystem *
+ intptr_t m_pVRChaperone; // class vr::IVRChaperone *
+ intptr_t m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup *
+ intptr_t m_pVRCompositor; // class vr::IVRCompositor *
+ intptr_t m_pVROverlay; // class vr::IVROverlay *
+ intptr_t m_pVRRenderModels; // class vr::IVRRenderModels *
+ intptr_t m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay *
+ intptr_t m_pVRSettings; // class vr::IVRSettings *
+ intptr_t m_pVRApplications; // class vr::IVRApplications *
+} COpenVRContext;
+
+
+typedef union
+{
+ VREvent_Reserved_t reserved;
+ VREvent_Controller_t controller;
+ VREvent_Mouse_t mouse;
+ VREvent_Scroll_t scroll;
+ VREvent_Process_t process;
+ VREvent_Notification_t notification;
+ VREvent_Overlay_t overlay;
+ VREvent_Status_t status;
+ VREvent_Keyboard_t keyboard;
+ VREvent_Ipd_t ipd;
+ VREvent_Chaperone_t chaperone;
+ VREvent_PerformanceTest_t performanceTest;
+ VREvent_TouchPadMove_t touchPadMove;
+ VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
+} VREvent_Data_t;
+
+/** An event posted by the server to all running applications */
+struct VREvent_t
+{
+ uint32_t eventType; // EVREventType enum
+ TrackedDeviceIndex_t trackedDeviceIndex;
+ float eventAgeSeconds;
+ // event data must be the end of the struct as its size is variable
+ VREvent_Data_t data;
+};
+
+
+// OpenVR Function Pointer Tables
+
+struct VR_IVRSystem_FnTable
+{
+ void (OPENVR_FNTABLE_CALLTYPE *GetRecommendedRenderTargetSize)(uint32_t * pnWidth, uint32_t * pnHeight);
+ struct HmdMatrix44_t (OPENVR_FNTABLE_CALLTYPE *GetProjectionMatrix)(EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType);
+ void (OPENVR_FNTABLE_CALLTYPE *GetProjectionRaw)(EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom);
+ struct DistortionCoordinates_t (OPENVR_FNTABLE_CALLTYPE *ComputeDistortion)(EVREye eEye, float fU, float fV);
+ struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetEyeToHeadTransform)(EVREye eEye);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetTimeSinceLastVsync)(float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter);
+ int32_t (OPENVR_FNTABLE_CALLTYPE *GetD3D9AdapterIndex)();
+ void (OPENVR_FNTABLE_CALLTYPE *GetDXGIOutputInfo)(int32_t * pnAdapterIndex);
+ bool (OPENVR_FNTABLE_CALLTYPE *IsDisplayOnDesktop)();
+ bool (OPENVR_FNTABLE_CALLTYPE *SetDisplayVisibility)(bool bIsVisibleOnDesktop);
+ void (OPENVR_FNTABLE_CALLTYPE *GetDeviceToAbsoluteTrackingPose)(ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, struct TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount);
+ void (OPENVR_FNTABLE_CALLTYPE *ResetSeatedZeroPose)();
+ struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetSeatedZeroPoseToStandingAbsoluteTrackingPose)();
+ struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetRawZeroPoseToStandingAbsoluteTrackingPose)();
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetSortedTrackedDeviceIndicesOfClass)(ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex);
+ EDeviceActivityLevel (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceActivityLevel)(TrackedDeviceIndex_t unDeviceId);
+ void (OPENVR_FNTABLE_CALLTYPE *ApplyTransform)(struct TrackedDevicePose_t * pOutputPose, struct TrackedDevicePose_t * pTrackedDevicePose, struct HmdMatrix34_t * pTransform);
+ TrackedDeviceIndex_t (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceIndexForControllerRole)(ETrackedControllerRole unDeviceType);
+ ETrackedControllerRole (OPENVR_FNTABLE_CALLTYPE *GetControllerRoleForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex);
+ ETrackedDeviceClass (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceClass)(TrackedDeviceIndex_t unDeviceIndex);
+ bool (OPENVR_FNTABLE_CALLTYPE *IsTrackedDeviceConnected)(TrackedDeviceIndex_t unDeviceIndex);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetBoolTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
+ float (OPENVR_FNTABLE_CALLTYPE *GetFloatTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
+ int32_t (OPENVR_FNTABLE_CALLTYPE *GetInt32TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
+ uint64_t (OPENVR_FNTABLE_CALLTYPE *GetUint64TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
+ struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetMatrix34TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetStringTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError);
+ char * (OPENVR_FNTABLE_CALLTYPE *GetPropErrorNameFromEnum)(ETrackedPropertyError error);
+ bool (OPENVR_FNTABLE_CALLTYPE *PollNextEvent)(struct VREvent_t * pEvent, uint32_t uncbVREvent);
+ bool (OPENVR_FNTABLE_CALLTYPE *PollNextEventWithPose)(ETrackingUniverseOrigin eOrigin, struct VREvent_t * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose);
+ char * (OPENVR_FNTABLE_CALLTYPE *GetEventTypeNameFromEnum)(EVREventType eType);
+ struct HiddenAreaMesh_t (OPENVR_FNTABLE_CALLTYPE *GetHiddenAreaMesh)(EVREye eEye);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetControllerState)(TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetControllerStateWithPose)(ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, struct TrackedDevicePose_t * pTrackedDevicePose);
+ void (OPENVR_FNTABLE_CALLTYPE *TriggerHapticPulse)(TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec);
+ char * (OPENVR_FNTABLE_CALLTYPE *GetButtonIdNameFromEnum)(EVRButtonId eButtonId);
+ char * (OPENVR_FNTABLE_CALLTYPE *GetControllerAxisTypeNameFromEnum)(EVRControllerAxisType eAxisType);
+ bool (OPENVR_FNTABLE_CALLTYPE *CaptureInputFocus)();
+ void (OPENVR_FNTABLE_CALLTYPE *ReleaseInputFocus)();
+ bool (OPENVR_FNTABLE_CALLTYPE *IsInputFocusCapturedByAnotherProcess)();
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *DriverDebugRequest)(TrackedDeviceIndex_t unDeviceIndex, char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize);
+ EVRFirmwareError (OPENVR_FNTABLE_CALLTYPE *PerformFirmwareUpdate)(TrackedDeviceIndex_t unDeviceIndex);
+ void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_Exiting)();
+ void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_UserPrompt)();
+};
+
+struct VR_IVRExtendedDisplay_FnTable
+{
+ void (OPENVR_FNTABLE_CALLTYPE *GetWindowBounds)(int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight);
+ void (OPENVR_FNTABLE_CALLTYPE *GetEyeOutputViewport)(EVREye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight);
+ void (OPENVR_FNTABLE_CALLTYPE *GetDXGIOutputInfo)(int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex);
+};
+
+struct VR_IVRApplications_FnTable
+{
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *AddApplicationManifest)(char * pchApplicationManifestFullPath, bool bTemporary);
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *RemoveApplicationManifest)(char * pchApplicationManifestFullPath);
+ bool (OPENVR_FNTABLE_CALLTYPE *IsApplicationInstalled)(char * pchAppKey);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationCount)();
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetApplicationKeyByIndex)(uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetApplicationKeyByProcessId)(uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchApplication)(char * pchAppKey);
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchTemplateApplication)(char * pchTemplateAppKey, char * pchNewAppKey, struct AppOverrideKeys_t * pKeys, uint32_t unKeys);
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchDashboardOverlay)(char * pchAppKey);
+ bool (OPENVR_FNTABLE_CALLTYPE *CancelApplicationLaunch)(char * pchAppKey);
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *IdentifyApplication)(uint32_t unProcessId, char * pchAppKey);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationProcessId)(char * pchAppKey);
+ char * (OPENVR_FNTABLE_CALLTYPE *GetApplicationsErrorNameFromEnum)(EVRApplicationError error);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyString)(char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyBool)(char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError);
+ uint64_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyUint64)(char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError);
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *SetApplicationAutoLaunch)(char * pchAppKey, bool bAutoLaunch);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationAutoLaunch)(char * pchAppKey);
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetStartingApplication)(char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
+ EVRApplicationTransitionState (OPENVR_FNTABLE_CALLTYPE *GetTransitionState)();
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *PerformApplicationPrelaunchCheck)(char * pchAppKey);
+ char * (OPENVR_FNTABLE_CALLTYPE *GetApplicationsTransitionStateNameFromEnum)(EVRApplicationTransitionState state);
+ bool (OPENVR_FNTABLE_CALLTYPE *IsQuitUserPromptRequested)();
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchInternalProcess)(char * pchBinaryPath, char * pchArguments, char * pchWorkingDirectory);
+};
+
+struct VR_IVRChaperone_FnTable
+{
+ ChaperoneCalibrationState (OPENVR_FNTABLE_CALLTYPE *GetCalibrationState)();
+ bool (OPENVR_FNTABLE_CALLTYPE *GetPlayAreaSize)(float * pSizeX, float * pSizeZ);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetPlayAreaRect)(struct HmdQuad_t * rect);
+ void (OPENVR_FNTABLE_CALLTYPE *ReloadInfo)();
+ void (OPENVR_FNTABLE_CALLTYPE *SetSceneColor)(struct HmdColor_t color);
+ void (OPENVR_FNTABLE_CALLTYPE *GetBoundsColor)(struct HmdColor_t * pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, struct HmdColor_t * pOutputCameraColor);
+ bool (OPENVR_FNTABLE_CALLTYPE *AreBoundsVisible)();
+ void (OPENVR_FNTABLE_CALLTYPE *ForceBoundsVisible)(bool bForce);
+};
+
+struct VR_IVRChaperoneSetup_FnTable
+{
+ bool (OPENVR_FNTABLE_CALLTYPE *CommitWorkingCopy)(EChaperoneConfigFile configFile);
+ void (OPENVR_FNTABLE_CALLTYPE *RevertWorkingCopy)();
+ bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingPlayAreaSize)(float * pSizeX, float * pSizeZ);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingPlayAreaRect)(struct HmdQuad_t * rect);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetLiveCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingStandingZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatStandingZeroPoseToRawTrackingPose);
+ void (OPENVR_FNTABLE_CALLTYPE *SetWorkingPlayAreaSize)(float sizeX, float sizeZ);
+ void (OPENVR_FNTABLE_CALLTYPE *SetWorkingCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount);
+ void (OPENVR_FNTABLE_CALLTYPE *SetWorkingSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pMatSeatedZeroPoseToRawTrackingPose);
+ void (OPENVR_FNTABLE_CALLTYPE *SetWorkingStandingZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pMatStandingZeroPoseToRawTrackingPose);
+ void (OPENVR_FNTABLE_CALLTYPE *ReloadFromDisk)(EChaperoneConfigFile configFile);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetLiveSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose);
+ void (OPENVR_FNTABLE_CALLTYPE *SetWorkingCollisionBoundsTagsInfo)(uint8_t * pTagsBuffer, uint32_t unTagCount);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetLiveCollisionBoundsTagsInfo)(uint8_t * pTagsBuffer, uint32_t * punTagCount);
+ bool (OPENVR_FNTABLE_CALLTYPE *SetWorkingPhysicalBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetLivePhysicalBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount);
+ bool (OPENVR_FNTABLE_CALLTYPE *ExportLiveToBuffer)(char * pBuffer, uint32_t * pnBufferLength);
+ bool (OPENVR_FNTABLE_CALLTYPE *ImportFromBufferToWorking)(char * pBuffer, uint32_t nImportFlags);
+};
+
+struct VR_IVRCompositor_FnTable
+{
+ void (OPENVR_FNTABLE_CALLTYPE *SetTrackingSpace)(ETrackingUniverseOrigin eOrigin);
+ ETrackingUniverseOrigin (OPENVR_FNTABLE_CALLTYPE *GetTrackingSpace)();
+ EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *WaitGetPoses)(struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount);
+ EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPoses)(struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount);
+ EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPoseForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex, struct TrackedDevicePose_t * pOutputPose, struct TrackedDevicePose_t * pOutputGamePose);
+ EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *Submit)(EVREye eEye, struct Texture_t * pTexture, struct VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags);
+ void (OPENVR_FNTABLE_CALLTYPE *ClearLastSubmittedFrame)();
+ void (OPENVR_FNTABLE_CALLTYPE *PostPresentHandoff)();
+ bool (OPENVR_FNTABLE_CALLTYPE *GetFrameTiming)(struct Compositor_FrameTiming * pTiming, uint32_t unFramesAgo);
+ float (OPENVR_FNTABLE_CALLTYPE *GetFrameTimeRemaining)();
+ void (OPENVR_FNTABLE_CALLTYPE *FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
+ void (OPENVR_FNTABLE_CALLTYPE *FadeGrid)(float fSeconds, bool bFadeIn);
+ EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SetSkyboxOverride)(struct Texture_t * pTextures, uint32_t unTextureCount);
+ void (OPENVR_FNTABLE_CALLTYPE *ClearSkyboxOverride)();
+ void (OPENVR_FNTABLE_CALLTYPE *CompositorBringToFront)();
+ void (OPENVR_FNTABLE_CALLTYPE *CompositorGoToBack)();
+ void (OPENVR_FNTABLE_CALLTYPE *CompositorQuit)();
+ bool (OPENVR_FNTABLE_CALLTYPE *IsFullscreen)();
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentSceneFocusProcess)();
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetLastFrameRenderer)();
+ bool (OPENVR_FNTABLE_CALLTYPE *CanRenderScene)();
+ void (OPENVR_FNTABLE_CALLTYPE *ShowMirrorWindow)();
+ void (OPENVR_FNTABLE_CALLTYPE *HideMirrorWindow)();
+ bool (OPENVR_FNTABLE_CALLTYPE *IsMirrorWindowVisible)();
+ void (OPENVR_FNTABLE_CALLTYPE *CompositorDumpImages)();
+ bool (OPENVR_FNTABLE_CALLTYPE *ShouldAppRenderWithLowResources)();
+ void (OPENVR_FNTABLE_CALLTYPE *ForceInterleavedReprojectionOn)(bool bOverride);
+};
+
+struct VR_IVROverlay_FnTable
+{
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *FindOverlay)(char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateOverlay)(char * pchOverlayKey, char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *DestroyOverlay)(VROverlayHandle_t ulOverlayHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetHighQualityOverlay)(VROverlayHandle_t ulOverlayHandle);
+ VROverlayHandle_t (OPENVR_FNTABLE_CALLTYPE *GetHighQualityOverlay)();
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayKey)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayImageData)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight);
+ char * (OPENVR_FNTABLE_CALLTYPE *GetOverlayErrorNameFromEnum)(EVROverlayError error);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle, uint32_t unPID);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float * pfAlpha);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float fWidthInMeters);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAutoCurveDistanceRangeInMeters)(VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayAutoCurveDistanceRangeInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformType)(VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, struct HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, struct HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, char * pchComponentName);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowOverlay)(VROverlayHandle_t ulOverlayHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *HideOverlay)(VROverlayHandle_t ulOverlayHandle);
+ bool (OPENVR_FNTABLE_CALLTYPE *IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetTransformForOverlayCoordinates)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdVector2_t coordinatesInOverlay, struct HmdMatrix34_t * pmatTransform);
+ bool (OPENVR_FNTABLE_CALLTYPE *PollNextOverlayEvent)(VROverlayHandle_t ulOverlayHandle, struct VREvent_t * pEvent, uint32_t uncbVREvent);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale);
+ bool (OPENVR_FNTABLE_CALLTYPE *ComputeOverlayIntersection)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionParams_t * pParams, struct VROverlayIntersectionResults_t * pResults);
+ bool (OPENVR_FNTABLE_CALLTYPE *HandleControllerOverlayInteractionAsMouse)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex);
+ bool (OPENVR_FNTABLE_CALLTYPE *IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle);
+ VROverlayHandle_t (OPENVR_FNTABLE_CALLTYPE *GetGamepadFocusOverlay)();
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetGamepadFocusOverlay)(VROverlayHandle_t ulNewFocusOverlay);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *MoveGamepadFocusToNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, struct Texture_t * pTexture);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, char * pchFilePath);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateDashboardOverlay)(char * pchOverlayKey, char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle);
+ bool (OPENVR_FNTABLE_CALLTYPE *IsDashboardVisible)();
+ bool (OPENVR_FNTABLE_CALLTYPE *IsActiveDashboardOverlay)(VROverlayHandle_t ulOverlayHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId);
+ void (OPENVR_FNTABLE_CALLTYPE *ShowDashboard)(char * pchOverlayToShow);
+ TrackedDeviceIndex_t (OPENVR_FNTABLE_CALLTYPE *GetPrimaryDashboardDevice)();
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboard)(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, char * pchDescription, uint32_t unCharMax, char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboardForOverlay)(VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, char * pchDescription, uint32_t unCharMax, char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetKeyboardText)(char * pchText, uint32_t cchText);
+ void (OPENVR_FNTABLE_CALLTYPE *HideKeyboard)();
+ void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform);
+ void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, struct HmdRect2_t avoidRect);
+};
+
+struct VR_IVRRenderModels_FnTable
+{
+ EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadRenderModel_Async)(char * pchRenderModelName, struct RenderModel_t ** ppRenderModel);
+ void (OPENVR_FNTABLE_CALLTYPE *FreeRenderModel)(struct RenderModel_t * pRenderModel);
+ EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadTexture_Async)(TextureID_t textureId, struct RenderModel_TextureMap_t ** ppTexture);
+ void (OPENVR_FNTABLE_CALLTYPE *FreeTexture)(struct RenderModel_TextureMap_t * pTexture);
+ EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadTextureD3D11_Async)(TextureID_t textureId, void * pD3D11Device, void ** ppD3D11Texture2D);
+ EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadIntoTextureD3D11_Async)(TextureID_t textureId, void * pDstTexture);
+ void (OPENVR_FNTABLE_CALLTYPE *FreeTextureD3D11)(void * pD3D11Texture2D);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelName)(uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelCount)();
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentCount)(char * pchRenderModelName);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentName)(char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen);
+ uint64_t (OPENVR_FNTABLE_CALLTYPE *GetComponentButtonMask)(char * pchRenderModelName, char * pchComponentName);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentRenderModelName)(char * pchRenderModelName, char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetComponentState)(char * pchRenderModelName, char * pchComponentName, VRControllerState_t * pControllerState, struct RenderModel_ControllerMode_State_t * pState, struct RenderModel_ComponentState_t * pComponentState);
+ bool (OPENVR_FNTABLE_CALLTYPE *RenderModelHasComponent)(char * pchRenderModelName, char * pchComponentName);
+};
+
+struct VR_IVRNotifications_FnTable
+{
+ EVRNotificationError (OPENVR_FNTABLE_CALLTYPE *CreateNotification)(VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, char * pchText, EVRNotificationStyle style, struct NotificationBitmap_t * pImage, VRNotificationId * pNotificationId);
+ EVRNotificationError (OPENVR_FNTABLE_CALLTYPE *RemoveNotification)(VRNotificationId notificationId);
+};
+
+struct VR_IVRSettings_FnTable
+{
+ char * (OPENVR_FNTABLE_CALLTYPE *GetSettingsErrorNameFromEnum)(EVRSettingsError eError);
+ bool (OPENVR_FNTABLE_CALLTYPE *Sync)(bool bForce, EVRSettingsError * peError);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetBool)(char * pchSection, char * pchSettingsKey, bool bDefaultValue, EVRSettingsError * peError);
+ void (OPENVR_FNTABLE_CALLTYPE *SetBool)(char * pchSection, char * pchSettingsKey, bool bValue, EVRSettingsError * peError);
+ int32_t (OPENVR_FNTABLE_CALLTYPE *GetInt32)(char * pchSection, char * pchSettingsKey, int32_t nDefaultValue, EVRSettingsError * peError);
+ void (OPENVR_FNTABLE_CALLTYPE *SetInt32)(char * pchSection, char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError);
+ float (OPENVR_FNTABLE_CALLTYPE *GetFloat)(char * pchSection, char * pchSettingsKey, float flDefaultValue, EVRSettingsError * peError);
+ void (OPENVR_FNTABLE_CALLTYPE *SetFloat)(char * pchSection, char * pchSettingsKey, float flValue, EVRSettingsError * peError);
+ void (OPENVR_FNTABLE_CALLTYPE *GetString)(char * pchSection, char * pchSettingsKey, char * pchValue, uint32_t unValueLen, char * pchDefaultValue, EVRSettingsError * peError);
+ void (OPENVR_FNTABLE_CALLTYPE *SetString)(char * pchSection, char * pchSettingsKey, char * pchValue, EVRSettingsError * peError);
+ void (OPENVR_FNTABLE_CALLTYPE *RemoveSection)(char * pchSection, EVRSettingsError * peError);
+ void (OPENVR_FNTABLE_CALLTYPE *RemoveKeyInSection)(char * pchSection, char * pchSettingsKey, EVRSettingsError * peError);
+};
+
+
+#if 0
+// Global entry points
+S_API intptr_t VR_InitInternal( EVRInitError *peError, EVRApplicationType eType );
+S_API void VR_ShutdownInternal();
+S_API bool VR_IsHmdPresent();
+S_API intptr_t VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError );
+S_API bool VR_IsRuntimeInstalled();
+S_API const char * VR_GetVRInitErrorAsSymbol( EVRInitError error );
+S_API const char * VR_GetVRInitErrorAsEnglishDescription( EVRInitError error );
+#endif
+
+#endif // __OPENVR_API_FLAT_H__
+
+
diff --git a/3rdparty/bgfx/3rdparty/stb/stb_image.c b/3rdparty/bgfx/3rdparty/stb/stb_image.c
index e98f211dcd8..ad26b74f55d 100644
--- a/3rdparty/bgfx/3rdparty/stb/stb_image.c
+++ b/3rdparty/bgfx/3rdparty/stb/stb_image.c
@@ -5,6 +5,8 @@
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
# endif // __clang__
#elif defined(_MSC_VER)
+# pragma warning(disable:4244) // warning C4244: '=': conversion from 'int' to 'stbi__uint16', possible loss of data
+# pragma warning(disable:4245) // warning C4245: 'argument': conversion from 'int' to 'char', signed/unsigned mismatch
# pragma warning(disable:4312) // warning C4312: 'type cast': conversion from '' to '' of greater size
# pragma warning(disable:4456) // warning C4456: declaration of 'k' hides previous local declaration
# pragma warning(disable:4457) // warning C4457: declaration of 'y' hides function parameter
@@ -37,13 +39,16 @@
TGA (not sure what subset, if a subset)
BMP non-1bpp, non-RLE
- PSD (composited view only, no extra channels)
+ PSD (composited view only, no extra channels, 8/16 bit-per-channel)
GIF (*comp always reports as 4-channel)
HDR (radiance rgbE format)
PIC (Softimage PIC)
PNM (PPM and PGM binary only)
+ Animated GIF still needs a proper API, but here's one way to do it:
+ http://gist.github.com/urraka/685d9a6340b26b830d49
+
- decode from memory or through FILE (define STBI_NO_STDIO to remove code)
- decode from arbitrary I/O callbacks
- SIMD acceleration on x86/x64 (SSE2) and ARM (NEON)
@@ -155,6 +160,17 @@
Latest revision history:
+ 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes
+ 2.11 (2016-04-02) 16-bit PNGS; enable SSE2 in non-gcc x64
+ RGB-format JPEG; remove white matting in PSD;
+ allocate large structures on the stack;
+ correct channel count for PNG & BMP
+ 2.10 (2016-01-22) avoid warning introduced in 2.09
+ 2.09 (2016-01-16) 16-bit TGA; comments in PNM files; STBI_REALLOC_SIZED
+ 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA
+ 2.07 (2015-09-13) partial animated GIF support
+ limited 16-bit PSD support
+ minor bugs, code cleanup, and compiler warnings
2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value
2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning
2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit
@@ -170,56 +186,47 @@
STBI_MALLOC,STBI_REALLOC,STBI_FREE
STBI_NO_*, STBI_ONLY_*
GIF bugfix
- 1.48 (2014-12-14) fix incorrectly-named assert()
- 1.47 (2014-12-14) 1/2/4-bit PNG support (both grayscale and paletted)
- optimize PNG
- fix bug in interlaced PNG with user-specified channel count
See end of file for full revision history.
============================ Contributors =========================
- Image formats Bug fixes & warning fixes
- Sean Barrett (jpeg, png, bmp) Marc LeBlanc
- Nicolas Schulz (hdr, psd) Christpher Lloyd
- Jonathan Dummer (tga) Dave Moore
- Jean-Marc Lienher (gif) Won Chun
- Tom Seddon (pic) the Horde3D community
- Thatcher Ulrich (psd) Janez Zemva
- Ken Miller (pgm, ppm) Jonathan Blow
- Laurent Gomila
- Aruelien Pocheville
- Extensions, features Ryamond Barbiero
- Jetro Lauha (stbi_info) David Woo
- Martin "SpartanJ" Golini (stbi_info) Martin Golini
- James "moose2000" Brown (iPhone PNG) Roy Eltham
- Ben "Disch" Wenger (io callbacks) Luke Graham
- Omar Cornut (1/2/4-bit PNG) Thomas Ruf
- Nicolas Guillemot (vertical flip) John Bartholomew
- Ken Hamada
- Optimizations & bugfixes Cort Stratton
- Fabian "ryg" Giesen Blazej Dariusz Roszkowski
- Arseny Kapoulkine Thibault Reuille
- Paul Du Bois
- Guillaume George
- If your name should be here but Jerry Jansson
- isn't, let Sean know. Hayaki Saito
- Johan Duparc
- Ronny Chevalier
- Michal Cichon
- Tero Hanninen
- Sergio Gonzalez
- Cass Everitt
- Engin Manap
- Martins Mozeiko
- Joseph Thomson
- Phil Jordan
-
-License:
- This software is in the public domain. Where that dedication is not
- recognized, you are granted a perpetual, irrevocable license to copy
- and modify this file however you want.
+ Image formats Extensions, features
+ Sean Barrett (jpeg, png, bmp) Jetro Lauha (stbi_info)
+ Nicolas Schulz (hdr, psd) Martin "SpartanJ" Golini (stbi_info)
+ Jonathan Dummer (tga) James "moose2000" Brown (iPhone PNG)
+ Jean-Marc Lienher (gif) Ben "Disch" Wenger (io callbacks)
+ Tom Seddon (pic) Omar Cornut (1/2/4-bit PNG)
+ Thatcher Ulrich (psd) Nicolas Guillemot (vertical flip)
+ Ken Miller (pgm, ppm) Richard Mitton (16-bit PSD)
+ urraka@github (animated gif) Junggon Kim (PNM comments)
+ Daniel Gibson (16-bit TGA)
+
+ Optimizations & bugfixes
+ Fabian "ryg" Giesen
+ Arseny Kapoulkine
+
+ Bug & warning fixes
+ Marc LeBlanc David Woo Guillaume George Martins Mozeiko
+ Christpher Lloyd Martin Golini Jerry Jansson Joseph Thomson
+ Dave Moore Roy Eltham Hayaki Saito Phil Jordan
+ Won Chun Luke Graham Johan Duparc Nathan Reed
+ the Horde3D community Thomas Ruf Ronny Chevalier Nick Verigakis
+ Janez Zemva John Bartholomew Michal Cichon svdijk@github
+ Jonathan Blow Ken Hamada Tero Hanninen Baldur Karlsson
+ Laurent Gomila Cort Stratton Sergio Gonzalez romigrou@github
+ Aruelien Pocheville Thibault Reuille Cass Everitt Matthew Gregan
+ Ryamond Barbiero Paul Du Bois Engin Manap snagar@github
+ Michaelangel007@github Oriol Ferrer Mesia socks-the-fox
+ Blazej Dariusz Roszkowski
+
+
+LICENSE
+
+This software is dual-licensed to the public domain and under the following
+license: you are granted a perpetual, irrevocable license to copy, modify,
+publish, and distribute this file as you see fit.
*/
@@ -462,12 +469,12 @@ STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y,
#ifndef STBI_NO_HDR
STBIDEF void stbi_hdr_to_ldr_gamma(float gamma);
STBIDEF void stbi_hdr_to_ldr_scale(float scale);
-#endif
+#endif // STBI_NO_HDR
#ifndef STBI_NO_LINEAR
STBIDEF void stbi_ldr_to_hdr_gamma(float gamma);
STBIDEF void stbi_ldr_to_hdr_scale(float scale);
-#endif // STBI_NO_HDR
+#endif // STBI_NO_LINEAR
// stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR
STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user);
@@ -631,18 +638,22 @@ typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
#define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (32 - (y))))
#endif
-#if defined(STBI_MALLOC) && defined(STBI_FREE) && defined(STBI_REALLOC)
+#if defined(STBI_MALLOC) && defined(STBI_FREE) && (defined(STBI_REALLOC) || defined(STBI_REALLOC_SIZED))
// ok
-#elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC)
+#elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC) && !defined(STBI_REALLOC_SIZED)
// ok
#else
-#error "Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC."
+#error "Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC (or STBI_REALLOC_SIZED)."
#endif
#ifndef STBI_MALLOC
-#define STBI_MALLOC(sz) malloc(sz)
-#define STBI_REALLOC(p,sz) realloc(p,sz)
-#define STBI_FREE(p) free(p)
+#define STBI_MALLOC(sz) malloc(sz)
+#define STBI_REALLOC(p,newsz) realloc(p,newsz)
+#define STBI_FREE(p) free(p)
+#endif
+
+#ifndef STBI_REALLOC_SIZED
+#define STBI_REALLOC_SIZED(p,oldsz,newsz) STBI_REALLOC(p,newsz)
#endif
// x86/x64 detection
@@ -676,7 +687,7 @@ typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
#define STBI_NO_SIMD
#endif
-#if !defined(STBI_NO_SIMD) && defined(STBI__X86_TARGET)
+#if !defined(STBI_NO_SIMD) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET))
#define STBI_SSE2
#include <emmintrin.h>
@@ -761,7 +772,7 @@ typedef struct
stbi_uc buffer_start[128];
stbi_uc *img_buffer, *img_buffer_end;
- stbi_uc *img_buffer_original;
+ stbi_uc *img_buffer_original, *img_buffer_original_end;
} stbi__context;
@@ -773,7 +784,7 @@ static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len)
s->io.read = NULL;
s->read_from_callbacks = 0;
s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer;
- s->img_buffer_end = (stbi_uc *) buffer+len;
+ s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len;
}
// initialize a callback-based context
@@ -785,6 +796,7 @@ static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *
s->read_from_callbacks = 1;
s->img_buffer_original = s->buffer_start;
stbi__refill_buffer(s);
+ s->img_buffer_original_end = s->img_buffer_end;
}
#ifndef STBI_NO_STDIO
@@ -826,6 +838,7 @@ static void stbi__rewind(stbi__context *s)
// but we just rewind to the beginning of the initial buffer, because
// we only use it after doing 'test', which only ever looks at at most 92 bytes
s->img_buffer = s->img_buffer_original;
+ s->img_buffer_end = s->img_buffer_original_end;
}
#ifndef STBI_NO_JPEG
@@ -913,8 +926,8 @@ static void *stbi__malloc(size_t size)
#define stbi__err(x,y) stbi__err(x)
#endif
-#define stbi__errpf(x,y) ((float *) (stbi__err(x,y)?NULL:NULL))
-#define stbi__errpuc(x,y) ((unsigned char *) (stbi__err(x,y)?NULL:NULL))
+#define stbi__errpf(x,y) ((float *)(size_t) (stbi__err(x,y)?NULL:NULL))
+#define stbi__errpuc(x,y) ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
STBIDEF void stbi_image_free(void *retval_from_stbi_load)
{
@@ -1001,6 +1014,7 @@ static unsigned char *stbi__load_flip(stbi__context *s, int *x, int *y, int *com
return result;
}
+#ifndef STBI_NO_HDR
static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp)
{
if (stbi__vertically_flip_on_load && result != NULL) {
@@ -1021,7 +1035,7 @@ static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, in
}
}
}
-
+#endif
#ifndef STBI_NO_STDIO
@@ -1165,6 +1179,7 @@ STBIDEF int stbi_is_hdr_from_file(FILE *f)
stbi__start_file(&s,f);
return stbi__hdr_test(&s);
#else
+ STBI_NOTUSED(f);
return 0;
#endif
}
@@ -1177,18 +1192,21 @@ STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void
stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
return stbi__hdr_test(&s);
#else
+ STBI_NOTUSED(clbk);
+ STBI_NOTUSED(user);
return 0;
#endif
}
-static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f;
+#ifndef STBI_NO_LINEAR
static float stbi__l2h_gamma=2.2f, stbi__l2h_scale=1.0f;
-#ifndef STBI_NO_LINEAR
STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; }
STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; }
#endif
+static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f;
+
STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; }
STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; }
@@ -1297,17 +1315,23 @@ static stbi__uint32 stbi__get32be(stbi__context *s)
return (z << 16) + stbi__get16be(s);
}
+#if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF)
+// nothing
+#else
static int stbi__get16le(stbi__context *s)
{
int z = stbi__get8(s);
return z + (stbi__get8(s) << 8);
}
+#endif
+#ifndef STBI_NO_BMP
static stbi__uint32 stbi__get32le(stbi__context *s)
{
stbi__uint32 z = stbi__get16le(s);
return z + (stbi__get16le(s) << 16);
}
+#endif
#define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings
@@ -1497,6 +1521,7 @@ typedef struct
int succ_high;
int succ_low;
int eob_run;
+ int rgb;
int scan_n, order[4];
int restart_interval, todo;
@@ -2708,11 +2733,17 @@ static int stbi__process_frame_header(stbi__jpeg *z, int scan)
if (Lf != 8+3*s->img_n) return stbi__err("bad SOF len","Corrupt JPEG");
+ z->rgb = 0;
for (i=0; i < s->img_n; ++i) {
+ static unsigned char rgb[3] = { 'R', 'G', 'B' };
z->img_comp[i].id = stbi__get8(s);
if (z->img_comp[i].id != i+1) // JFIF requires
- if (z->img_comp[i].id != i) // some version of jpegtran outputs non-JFIF-compliant files!
- return stbi__err("bad component ID","Corrupt JPEG");
+ if (z->img_comp[i].id != i) { // some version of jpegtran outputs non-JFIF-compliant files!
+ // somethings output this (see http://fileformats.archiveteam.org/wiki/JPEG#Color_format)
+ if (z->img_comp[i].id != rgb[i])
+ return stbi__err("bad component ID","Corrupt JPEG");
+ ++z->rgb;
+ }
q = stbi__get8(s);
z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H","Corrupt JPEG");
z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V","Corrupt JPEG");
@@ -2751,7 +2782,7 @@ static int stbi__process_frame_header(stbi__jpeg *z, int scan)
if (z->img_comp[i].raw_data == NULL) {
for(--i; i >= 0; --i) {
STBI_FREE(z->img_comp[i].raw_data);
- z->img_comp[i].data = NULL;
+ z->img_comp[i].raw_data = NULL;
}
return stbi__err("outofmem", "Out of memory");
}
@@ -3118,7 +3149,7 @@ static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc cons
// so just accelerate step == 4 case.
if (step == 4) {
// this is a fairly straightforward implementation and not super-optimized.
- __m128i signflip = _mm_set1_epi8((char)0x80);
+ __m128i signflip = _mm_set1_epi8(-0x80);
__m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f));
__m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f));
__m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f));
@@ -3374,7 +3405,17 @@ static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp
if (n >= 3) {
stbi_uc *y = coutput[0];
if (z->s->img_n == 3) {
- z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
+ if (z->rgb == 3) {
+ for (i=0; i < z->s->img_x; ++i) {
+ out[0] = y[i];
+ out[1] = coutput[1][i];
+ out[2] = coutput[2][i];
+ out[3] = 255;
+ out += n;
+ }
+ } else {
+ z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
+ }
} else
for (i=0; i < z->s->img_x; ++i) {
out[0] = out[1] = out[2] = y[i];
@@ -3399,10 +3440,13 @@ static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp
static unsigned char *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
- stbi__jpeg j;
- j.s = s;
- stbi__setup_jpeg(&j);
- return load_jpeg_image(&j, x,y,comp,req_comp);
+ unsigned char* result;
+ stbi__jpeg* j = (stbi__jpeg*) stbi__malloc(sizeof(stbi__jpeg));
+ j->s = s;
+ stbi__setup_jpeg(j);
+ result = load_jpeg_image(j, x,y,comp,req_comp);
+ STBI_FREE(j);
+ return result;
}
static int stbi__jpeg_test(stbi__context *s)
@@ -3430,9 +3474,12 @@ static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp)
static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp)
{
- stbi__jpeg j;
- j.s = s;
- return stbi__jpeg_info_raw(&j, x, y, comp);
+ int result;
+ stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg)));
+ j->s = s;
+ result = stbi__jpeg_info_raw(j, x, y, comp);
+ STBI_FREE(j);
+ return result;
}
#endif
@@ -3513,10 +3560,10 @@ static int stbi__zbuild_huffman(stbi__zhuffman *z, stbi_uc *sizelist, int num)
z->size [c] = (stbi_uc ) s;
z->value[c] = (stbi__uint16) i;
if (s <= STBI__ZFAST_BITS) {
- int k = stbi__bit_reverse(next_code[s],s);
- while (k < (1 << STBI__ZFAST_BITS)) {
- z->fast[k] = fastv;
- k += (1 << s);
+ int j = stbi__bit_reverse(next_code[s],s);
+ while (j < (1 << STBI__ZFAST_BITS)) {
+ z->fast[j] = fastv;
+ j += (1 << s);
}
}
++next_code[s];
@@ -3555,7 +3602,7 @@ static void stbi__fill_bits(stbi__zbuf *z)
{
do {
STBI_ASSERT(z->code_buffer < (1U << z->num_bits));
- z->code_buffer |= stbi__zget8(z) << z->num_bits;
+ z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits;
z->num_bits += 8;
} while (z->num_bits <= 24);
}
@@ -3605,14 +3652,15 @@ stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z)
static int stbi__zexpand(stbi__zbuf *z, char *zout, int n) // need to make room for n bytes
{
char *q;
- int cur, limit;
+ int cur, limit, old_limit;
z->zout = zout;
if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG");
cur = (int) (z->zout - z->zout_start);
- limit = (int) (z->zout_end - z->zout_start);
+ limit = old_limit = (int) (z->zout_end - z->zout_start);
while (cur + n > limit)
limit *= 2;
- q = (char *) STBI_REALLOC(z->zout_start, limit);
+ q = (char *) STBI_REALLOC_SIZED(z->zout_start, old_limit, limit);
+ STBI_NOTUSED(old_limit);
if (q == NULL) return stbi__err("outofmem", "Out of memory");
z->zout_start = q;
z->zout = q + cur;
@@ -3722,7 +3770,7 @@ static int stbi__compute_huffman_codes(stbi__zbuf *a)
return 1;
}
-static int stbi__parse_uncomperssed_block(stbi__zbuf *a)
+static int stbi__parse_uncompressed_block(stbi__zbuf *a)
{
stbi_uc header[4];
int len,nlen,k;
@@ -3788,7 +3836,7 @@ static int stbi__parse_zlib(stbi__zbuf *a, int parse_header)
final = stbi__zreceive(a,1);
type = stbi__zreceive(a,2);
if (type == 0) {
- if (!stbi__parse_uncomperssed_block(a)) return 0;
+ if (!stbi__parse_uncompressed_block(a)) return 0;
} else if (type == 3) {
return 0;
} else {
@@ -3930,6 +3978,7 @@ typedef struct
{
stbi__context *s;
stbi_uc *idata, *expanded, *out;
+ int depth;
} stbi__png;
@@ -3969,14 +4018,19 @@ static stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x0
// create the png data from post-deflated data
static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color)
{
+ int bytes = (depth == 16? 2 : 1);
stbi__context *s = a->s;
- stbi__uint32 i,j,stride = x*out_n;
+ stbi__uint32 i,j,stride = x*out_n*bytes;
stbi__uint32 img_len, img_width_bytes;
int k;
int img_n = s->img_n; // copy it into a local for later
+ int output_bytes = out_n*bytes;
+ int filter_bytes = img_n*bytes;
+ int width = x;
+
STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1);
- a->out = (stbi_uc *) stbi__malloc(x * y * out_n); // extra bytes to write off the end into
+ a->out = (stbi_uc *) stbi__malloc(x * y * output_bytes); // extra bytes to write off the end into
if (!a->out) return stbi__err("outofmem", "Out of memory");
img_width_bytes = (((img_n * x * depth) + 7) >> 3);
@@ -3991,8 +4045,7 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
stbi_uc *cur = a->out + stride*j;
stbi_uc *prior = cur - stride;
int filter = *raw++;
- int filter_bytes = img_n;
- int width = x;
+
if (filter > 4)
return stbi__err("invalid filter","Corrupt PNG");
@@ -4025,6 +4078,14 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
raw += img_n;
cur += out_n;
prior += out_n;
+ } else if (depth == 16) {
+ if (img_n != out_n) {
+ cur[filter_bytes] = 255; // first pixel top byte
+ cur[filter_bytes+1] = 255; // first pixel bottom byte
+ }
+ raw += filter_bytes;
+ cur += output_bytes;
+ prior += output_bytes;
} else {
raw += 1;
cur += 1;
@@ -4033,7 +4094,7 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
// this is a little gross, so that we don't switch per-pixel or per-component
if (depth < 8 || img_n == out_n) {
- int nk = (width - 1)*img_n;
+ int nk = (width - 1)*filter_bytes;
#define CASE(f) \
case f: \
for (k=0; k < nk; ++k)
@@ -4053,18 +4114,27 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
STBI_ASSERT(img_n+1 == out_n);
#define CASE(f) \
case f: \
- for (i=x-1; i >= 1; --i, cur[img_n]=255,raw+=img_n,cur+=out_n,prior+=out_n) \
- for (k=0; k < img_n; ++k)
+ for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \
+ for (k=0; k < filter_bytes; ++k)
switch (filter) {
CASE(STBI__F_none) cur[k] = raw[k]; break;
- CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k-out_n]); break;
+ CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); break;
CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
- CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-out_n])>>1)); break;
- CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-out_n],prior[k],prior[k-out_n])); break;
- CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k-out_n] >> 1)); break;
- CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-out_n],0,0)); break;
+ CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); break;
+ CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); break;
+ CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); break;
+ CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); break;
}
#undef CASE
+
+ // the loop above sets the high byte of the pixels' alpha, but for
+ // 16 bit png files we also need the low byte set. we'll do that here.
+ if (depth == 16) {
+ cur = a->out + stride*j; // start at the beginning of the row again
+ for (i=0; i < x; ++i,cur+=output_bytes) {
+ cur[filter_bytes+1] = 255;
+ }
+ }
}
}
@@ -4121,25 +4191,36 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01);
}
if (img_n != out_n) {
+ int q;
// insert alpha = 255
- stbi_uc *cur = a->out + stride*j;
- int i;
+ cur = a->out + stride*j;
if (img_n == 1) {
- for (i=x-1; i >= 0; --i) {
- cur[i*2+1] = 255;
- cur[i*2+0] = cur[i];
+ for (q=x-1; q >= 0; --q) {
+ cur[q*2+1] = 255;
+ cur[q*2+0] = cur[q];
}
} else {
STBI_ASSERT(img_n == 3);
- for (i=x-1; i >= 0; --i) {
- cur[i*4+3] = 255;
- cur[i*4+2] = cur[i*3+2];
- cur[i*4+1] = cur[i*3+1];
- cur[i*4+0] = cur[i*3+0];
+ for (q=x-1; q >= 0; --q) {
+ cur[q*4+3] = 255;
+ cur[q*4+2] = cur[q*3+2];
+ cur[q*4+1] = cur[q*3+1];
+ cur[q*4+0] = cur[q*3+0];
}
}
}
}
+ } else if (depth == 16) {
+ // force the image data from big-endian to platform-native.
+ // this is done in a separate pass due to the decoding relying
+ // on the data being untouched, but could probably be done
+ // per-line during decode if care is taken.
+ stbi_uc *cur = a->out;
+ stbi__uint16 *cur16 = (stbi__uint16*)cur;
+
+ for(i=0; i < x*y*out_n; ++i,cur16++,cur+=2) {
+ *cur16 = (cur[0] << 8) | cur[1];
+ }
}
return 1;
@@ -4212,6 +4293,31 @@ static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n)
return 1;
}
+static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int out_n)
+{
+ stbi__context *s = z->s;
+ stbi__uint32 i, pixel_count = s->img_x * s->img_y;
+ stbi__uint16 *p = (stbi__uint16*) z->out;
+
+ // compute color-based transparency, assuming we've
+ // already got 65535 as the alpha value in the output
+ STBI_ASSERT(out_n == 2 || out_n == 4);
+
+ if (out_n == 2) {
+ for (i = 0; i < pixel_count; ++i) {
+ p[1] = (p[0] == tc[0] ? 0 : 65535);
+ p += 2;
+ }
+ } else {
+ for (i = 0; i < pixel_count; ++i) {
+ if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2])
+ p[3] = 0;
+ p += 4;
+ }
+ }
+ return 1;
+}
+
static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int pal_img_n)
{
stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y;
@@ -4249,6 +4355,26 @@ static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int
return 1;
}
+static int stbi__reduce_png(stbi__png *p)
+{
+ int i;
+ int img_len = p->s->img_x * p->s->img_y * p->s->img_out_n;
+ stbi_uc *reduced;
+ stbi__uint16 *orig = (stbi__uint16*)p->out;
+
+ if (p->depth != 16) return 1; // don't need to do anything if not 16-bit data
+
+ reduced = (stbi_uc *)stbi__malloc(img_len);
+ if (p == NULL) return stbi__err("outofmem", "Out of memory");
+
+ for (i = 0; i < img_len; ++i) reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is a decent approx of 16->8 bit scaling
+
+ p->out = reduced;
+ STBI_FREE(orig);
+
+ return 1;
+}
+
static int stbi__unpremultiply_on_load = 0;
static int stbi__de_iphone_flag = 0;
@@ -4310,8 +4436,9 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
{
stbi_uc palette[1024], pal_img_n=0;
stbi_uc has_trans=0, tc[3];
+ stbi__uint16 tc16[3];
stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0;
- int first=1,k,interlace=0, color=0, depth=0, is_iphone=0;
+ int first=1,k,interlace=0, color=0, is_iphone=0;
stbi__context *s = z->s;
z->expanded = NULL;
@@ -4336,8 +4463,9 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
if (c.length != 13) return stbi__err("bad IHDR len","Corrupt PNG");
s->img_x = stbi__get32be(s); if (s->img_x > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)");
s->img_y = stbi__get32be(s); if (s->img_y > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)");
- depth = stbi__get8(s); if (depth != 1 && depth != 2 && depth != 4 && depth != 8) return stbi__err("1/2/4/8-bit only","PNG not supported: 1/2/4/8-bit only");
+ z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only","PNG not supported: 1/2/4/8/16-bit only");
color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype","Corrupt PNG");
+ if (color == 3 && z->depth == 16) return stbi__err("bad ctype","Corrupt PNG");
if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype","Corrupt PNG");
comp = stbi__get8(s); if (comp) return stbi__err("bad comp method","Corrupt PNG");
filter= stbi__get8(s); if (filter) return stbi__err("bad filter method","Corrupt PNG");
@@ -4385,8 +4513,11 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG");
if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG");
has_trans = 1;
- for (k=0; k < s->img_n; ++k)
- tc[k] = (stbi_uc) (stbi__get16be(s) & 255) * stbi__depth_scale_table[depth]; // non 8-bit images will be larger
+ if (z->depth == 16) {
+ for (k = 0; k < s->img_n; ++k) tc16[k] = stbi__get16be(s); // copy the values as-is
+ } else {
+ for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
+ }
}
break;
}
@@ -4397,11 +4528,13 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
if (scan == STBI__SCAN_header) { s->img_n = pal_img_n; return 1; }
if ((int)(ioff + c.length) < (int)ioff) return 0;
if (ioff + c.length > idata_limit) {
+ stbi__uint32 idata_limit_old = idata_limit;
stbi_uc *p;
if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096;
while (ioff + c.length > idata_limit)
idata_limit *= 2;
- p = (stbi_uc *) STBI_REALLOC(z->idata, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory");
+ STBI_NOTUSED(idata_limit_old);
+ p = (stbi_uc *) STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory");
z->idata = p;
}
if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err("outofdata","Corrupt PNG");
@@ -4415,7 +4548,7 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
if (scan != STBI__SCAN_load) return 1;
if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG");
// initial guess for decoded data size to avoid unnecessary reallocs
- bpl = (s->img_x * depth + 7) / 8; // bytes per line, per component
+ bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component
raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */;
z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone);
if (z->expanded == NULL) return 0; // zlib should set error
@@ -4424,9 +4557,14 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
s->img_out_n = s->img_n+1;
else
s->img_out_n = s->img_n;
- if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, depth, color, interlace)) return 0;
- if (has_trans)
- if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0;
+ if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0;
+ if (has_trans) {
+ if (z->depth == 16) {
+ if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0;
+ } else {
+ if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0;
+ }
+ }
if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2)
stbi__de_iphone(z);
if (pal_img_n) {
@@ -4468,6 +4606,11 @@ static unsigned char *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req
unsigned char *result=NULL;
if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error");
if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) {
+ if (p->depth == 16) {
+ if (!stbi__reduce_png(p)) {
+ return result;
+ }
+ }
result = p->out;
p->out = NULL;
if (req_comp && req_comp != p->s->img_out_n) {
@@ -4477,7 +4620,7 @@ static unsigned char *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req
}
*x = p->s->img_x;
*y = p->s->img_y;
- if (n) *n = p->s->img_out_n;
+ if (n) *n = p->s->img_n;
}
STBI_FREE(p->out); p->out = NULL;
STBI_FREE(p->expanded); p->expanded = NULL;
@@ -4587,19 +4730,23 @@ static int stbi__shiftsigned(int v, int shift, int bits)
return result;
}
-static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
+typedef struct
{
- stbi_uc *out;
- unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
- stbi_uc pal[256][4];
- int psize=0,i,j,compress=0,width;
- int bpp, flip_vertically, pad, target, offset, hsz;
+ int bpp, offset, hsz;
+ unsigned int mr,mg,mb,ma, all_a;
+} stbi__bmp_data;
+
+static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info)
+{
+ int hsz;
if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP");
stbi__get32le(s); // discard filesize
stbi__get16le(s); // discard reserved
stbi__get16le(s); // discard reserved
- offset = stbi__get32le(s);
- hsz = stbi__get32le(s);
+ info->offset = stbi__get32le(s);
+ info->hsz = hsz = stbi__get32le(s);
+ info->mr = info->mg = info->mb = info->ma = 0;
+
if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown");
if (hsz == 12) {
s->img_x = stbi__get16le(s);
@@ -4609,15 +4756,10 @@ static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int
s->img_y = stbi__get32le(s);
}
if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP");
- bpp = stbi__get16le(s);
- if (bpp == 1) return stbi__errpuc("monochrome", "BMP type not supported: 1-bit");
- flip_vertically = ((int) s->img_y) > 0;
- s->img_y = abs((int) s->img_y);
- if (hsz == 12) {
- if (bpp < 24)
- psize = (offset - 14 - 24) / 3;
- } else {
- compress = stbi__get32le(s);
+ info->bpp = stbi__get16le(s);
+ if (info->bpp == 1) return stbi__errpuc("monochrome", "BMP type not supported: 1-bit");
+ if (hsz != 12) {
+ int compress = stbi__get32le(s);
if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE");
stbi__get32le(s); // discard sizeof
stbi__get32le(s); // discard hres
@@ -4631,27 +4773,25 @@ static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int
stbi__get32le(s);
stbi__get32le(s);
}
- if (bpp == 16 || bpp == 32) {
- mr = mg = mb = 0;
+ if (info->bpp == 16 || info->bpp == 32) {
if (compress == 0) {
- if (bpp == 32) {
- mr = 0xffu << 16;
- mg = 0xffu << 8;
- mb = 0xffu << 0;
- ma = 0xffu << 24;
- fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255
- STBI_NOTUSED(fake_a);
+ if (info->bpp == 32) {
+ info->mr = 0xffu << 16;
+ info->mg = 0xffu << 8;
+ info->mb = 0xffu << 0;
+ info->ma = 0xffu << 24;
+ info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0
} else {
- mr = 31u << 10;
- mg = 31u << 5;
- mb = 31u << 0;
+ info->mr = 31u << 10;
+ info->mg = 31u << 5;
+ info->mb = 31u << 0;
}
} else if (compress == 3) {
- mr = stbi__get32le(s);
- mg = stbi__get32le(s);
- mb = stbi__get32le(s);
+ info->mr = stbi__get32le(s);
+ info->mg = stbi__get32le(s);
+ info->mb = stbi__get32le(s);
// not documented, but generated by photoshop and handled by mspaint
- if (mr == mg && mg == mb) {
+ if (info->mr == info->mg && info->mg == info->mb) {
// ?!?!?
return stbi__errpuc("bad BMP", "bad BMP");
}
@@ -4659,11 +4799,13 @@ static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int
return stbi__errpuc("bad BMP", "bad BMP");
}
} else {
- STBI_ASSERT(hsz == 108 || hsz == 124);
- mr = stbi__get32le(s);
- mg = stbi__get32le(s);
- mb = stbi__get32le(s);
- ma = stbi__get32le(s);
+ int i;
+ if (hsz != 108 && hsz != 124)
+ return stbi__errpuc("bad BMP", "bad BMP");
+ info->mr = stbi__get32le(s);
+ info->mg = stbi__get32le(s);
+ info->mb = stbi__get32le(s);
+ info->ma = stbi__get32le(s);
stbi__get32le(s); // discard color space
for (i=0; i < 12; ++i)
stbi__get32le(s); // discard color space parameters
@@ -4674,35 +4816,68 @@ static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int
stbi__get32le(s); // discard reserved
}
}
- if (bpp < 16)
- psize = (offset - 14 - hsz) >> 2;
}
+ return (void *) 1;
+}
+
+
+static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
+{
+ stbi_uc *out;
+ unsigned int mr=0,mg=0,mb=0,ma=0, all_a;
+ stbi_uc pal[256][4];
+ int psize=0,i,j,width;
+ int flip_vertically, pad, target;
+ stbi__bmp_data info;
+
+ info.all_a = 255;
+ if (stbi__bmp_parse_header(s, &info) == NULL)
+ return NULL; // error code already set
+
+ flip_vertically = ((int) s->img_y) > 0;
+ s->img_y = abs((int) s->img_y);
+
+ mr = info.mr;
+ mg = info.mg;
+ mb = info.mb;
+ ma = info.ma;
+ all_a = info.all_a;
+
+ if (info.hsz == 12) {
+ if (info.bpp < 24)
+ psize = (info.offset - 14 - 24) / 3;
+ } else {
+ if (info.bpp < 16)
+ psize = (info.offset - 14 - info.hsz) >> 2;
+ }
+
s->img_n = ma ? 4 : 3;
if (req_comp && req_comp >= 3) // we can directly decode 3 or 4
target = req_comp;
else
target = s->img_n; // if they want monochrome, we'll post-convert
+
out = (stbi_uc *) stbi__malloc(target * s->img_x * s->img_y);
if (!out) return stbi__errpuc("outofmem", "Out of memory");
- if (bpp < 16) {
+ if (info.bpp < 16) {
int z=0;
if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); }
for (i=0; i < psize; ++i) {
pal[i][2] = stbi__get8(s);
pal[i][1] = stbi__get8(s);
pal[i][0] = stbi__get8(s);
- if (hsz != 12) stbi__get8(s);
+ if (info.hsz != 12) stbi__get8(s);
pal[i][3] = 255;
}
- stbi__skip(s, offset - 14 - hsz - psize * (hsz == 12 ? 3 : 4));
- if (bpp == 4) width = (s->img_x + 1) >> 1;
- else if (bpp == 8) width = s->img_x;
+ stbi__skip(s, info.offset - 14 - info.hsz - psize * (info.hsz == 12 ? 3 : 4));
+ if (info.bpp == 4) width = (s->img_x + 1) >> 1;
+ else if (info.bpp == 8) width = s->img_x;
else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); }
pad = (-width)&3;
for (j=0; j < (int) s->img_y; ++j) {
for (i=0; i < (int) s->img_x; i += 2) {
int v=stbi__get8(s),v2=0;
- if (bpp == 4) {
+ if (info.bpp == 4) {
v2 = v & 15;
v >>= 4;
}
@@ -4711,7 +4886,7 @@ static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int
out[z++] = pal[v][2];
if (target == 4) out[z++] = 255;
if (i+1 == (int) s->img_x) break;
- v = (bpp == 8) ? stbi__get8(s) : v2;
+ v = (info.bpp == 8) ? stbi__get8(s) : v2;
out[z++] = pal[v][0];
out[z++] = pal[v][1];
out[z++] = pal[v][2];
@@ -4723,14 +4898,14 @@ static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int
int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0;
int z = 0;
int easy=0;
- stbi__skip(s, offset - 14 - hsz);
- if (bpp == 24) width = 3 * s->img_x;
- else if (bpp == 16) width = 2*s->img_x;
+ stbi__skip(s, info.offset - 14 - info.hsz);
+ if (info.bpp == 24) width = 3 * s->img_x;
+ else if (info.bpp == 16) width = 2*s->img_x;
else /* bpp = 32 and pad = 0 */ width=0;
pad = (-width) & 3;
- if (bpp == 24) {
+ if (info.bpp == 24) {
easy = 1;
- } else if (bpp == 32) {
+ } else if (info.bpp == 32) {
if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000)
easy = 2;
}
@@ -4751,9 +4926,11 @@ static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int
out[z+0] = stbi__get8(s);
z += 3;
a = (easy == 2 ? stbi__get8(s) : 255);
+ all_a |= a;
if (target == 4) out[z++] = a;
}
} else {
+ int bpp = info.bpp;
for (i=0; i < (int) s->img_x; ++i) {
stbi__uint32 v = (bpp == 16 ? (stbi__uint32) stbi__get16le(s) : stbi__get32le(s));
int a;
@@ -4761,12 +4938,19 @@ static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int
out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount));
out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount));
a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255);
+ all_a |= a;
if (target == 4) out[z++] = STBI__BYTECAST(a);
}
}
stbi__skip(s, pad);
}
}
+
+ // if alpha channel is all 0s, replace with all 255s
+ if (target == 4 && all_a == 0)
+ for (i=4*s->img_x*s->img_y-1; i >= 0; i -= 4)
+ out[i] = 255;
+
if (flip_vertically) {
stbi_uc t;
for (j=0; j < (int) s->img_y>>1; ++j) {
@@ -4793,20 +4977,55 @@ static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int
// Targa Truevision - TGA
// by Jonathan Dummer
#ifndef STBI_NO_TGA
+// returns STBI_rgb or whatever, 0 on error
+static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16)
+{
+ // only RGB or RGBA (incl. 16bit) or grey allowed
+ if(is_rgb16) *is_rgb16 = 0;
+ switch(bits_per_pixel) {
+ case 8: return STBI_grey;
+ case 16: if(is_grey) return STBI_grey_alpha;
+ // else: fall-through
+ case 15: if(is_rgb16) *is_rgb16 = 1;
+ return STBI_rgb;
+ case 24: // fall-through
+ case 32: return bits_per_pixel/8;
+ default: return 0;
+ }
+}
+
static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp)
{
- int tga_w, tga_h, tga_comp;
- int sz;
+ int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp;
+ int sz, tga_colormap_type;
stbi__get8(s); // discard Offset
- sz = stbi__get8(s); // color type
- if( sz > 1 ) {
+ tga_colormap_type = stbi__get8(s); // colormap type
+ if( tga_colormap_type > 1 ) {
stbi__rewind(s);
return 0; // only RGB or indexed allowed
}
- sz = stbi__get8(s); // image type
- // only RGB or grey allowed, +/- RLE
- if ((sz != 1) && (sz != 2) && (sz != 3) && (sz != 9) && (sz != 10) && (sz != 11)) return 0;
- stbi__skip(s,9);
+ tga_image_type = stbi__get8(s); // image type
+ if ( tga_colormap_type == 1 ) { // colormapped (paletted) image
+ if (tga_image_type != 1 && tga_image_type != 9) {
+ stbi__rewind(s);
+ return 0;
+ }
+ stbi__skip(s,4); // skip index of first colormap entry and number of entries
+ sz = stbi__get8(s); // check bits per palette color entry
+ if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) {
+ stbi__rewind(s);
+ return 0;
+ }
+ stbi__skip(s,4); // skip image x and y origin
+ tga_colormap_bpp = sz;
+ } else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE
+ if ( (tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11) ) {
+ stbi__rewind(s);
+ return 0; // only RGB or grey allowed, +/- RLE
+ }
+ stbi__skip(s,9); // skip colormap specification and image x/y origin
+ tga_colormap_bpp = 0;
+ }
tga_w = stbi__get16le(s);
if( tga_w < 1 ) {
stbi__rewind(s);
@@ -4817,44 +5036,80 @@ static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp)
stbi__rewind(s);
return 0; // test height
}
- sz = stbi__get8(s); // bits per pixel
- // only RGB or RGBA or grey allowed
- if ((sz != 8) && (sz != 16) && (sz != 24) && (sz != 32)) {
- stbi__rewind(s);
- return 0;
+ tga_bits_per_pixel = stbi__get8(s); // bits per pixel
+ stbi__get8(s); // ignore alpha bits
+ if (tga_colormap_bpp != 0) {
+ if((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) {
+ // when using a colormap, tga_bits_per_pixel is the size of the indexes
+ // I don't think anything but 8 or 16bit indexes makes sense
+ stbi__rewind(s);
+ return 0;
+ }
+ tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL);
+ } else {
+ tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL);
+ }
+ if(!tga_comp) {
+ stbi__rewind(s);
+ return 0;
}
- tga_comp = sz;
if (x) *x = tga_w;
if (y) *y = tga_h;
- if (comp) *comp = tga_comp / 8;
+ if (comp) *comp = tga_comp;
return 1; // seems to have passed everything
}
static int stbi__tga_test(stbi__context *s)
{
- int res;
- int sz;
+ int res = 0;
+ int sz, tga_color_type;
stbi__get8(s); // discard Offset
- sz = stbi__get8(s); // color type
- if ( sz > 1 ) return 0; // only RGB or indexed allowed
+ tga_color_type = stbi__get8(s); // color type
+ if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed
sz = stbi__get8(s); // image type
- if ( (sz != 1) && (sz != 2) && (sz != 3) && (sz != 9) && (sz != 10) && (sz != 11) ) return 0; // only RGB or grey allowed, +/- RLE
- stbi__get16be(s); // discard palette start
- stbi__get16be(s); // discard palette length
- stbi__get8(s); // discard bits per palette color entry
- stbi__get16be(s); // discard x origin
- stbi__get16be(s); // discard y origin
- if ( stbi__get16be(s) < 1 ) return 0; // test width
- if ( stbi__get16be(s) < 1 ) return 0; // test height
+ if ( tga_color_type == 1 ) { // colormapped (paletted) image
+ if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9
+ stbi__skip(s,4); // skip index of first colormap entry and number of entries
+ sz = stbi__get8(s); // check bits per palette color entry
+ if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd;
+ stbi__skip(s,4); // skip image x and y origin
+ } else { // "normal" image w/o colormap
+ if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE
+ stbi__skip(s,9); // skip colormap specification and image x/y origin
+ }
+ if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width
+ if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height
sz = stbi__get8(s); // bits per pixel
- if ( (sz != 8) && (sz != 16) && (sz != 24) && (sz != 32) )
- res = 0;
- else
- res = 1;
+ if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index
+ if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd;
+
+ res = 1; // if we got this far, everything's good and we can return 1 instead of 0
+
+errorEnd:
stbi__rewind(s);
return res;
}
+// read 16bit value and convert to 24bit RGB
+void stbi__tga_read_rgb16(stbi__context *s, stbi_uc* out)
+{
+ stbi__uint16 px = stbi__get16le(s);
+ stbi__uint16 fiveBitMask = 31;
+ // we have 3 channels with 5bits each
+ int r = (px >> 10) & fiveBitMask;
+ int g = (px >> 5) & fiveBitMask;
+ int b = px & fiveBitMask;
+ // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later
+ out[0] = (r * 255)/31;
+ out[1] = (g * 255)/31;
+ out[2] = (b * 255)/31;
+
+ // some people claim that the most significant bit might be used for alpha
+ // (possibly if an alpha-bit is set in the "image descriptor byte")
+ // but that only made 16bit test images completely translucent..
+ // so let's treat all 15 and 16bit TGAs as RGB with no alpha.
+}
+
static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
// read in the TGA header stuff
@@ -4870,8 +5125,9 @@ static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int
int tga_width = stbi__get16le(s);
int tga_height = stbi__get16le(s);
int tga_bits_per_pixel = stbi__get8(s);
- int tga_comp = tga_bits_per_pixel / 8;
+ int tga_comp, tga_rgb16=0;
int tga_inverted = stbi__get8(s);
+ // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?)
// image data
unsigned char *tga_data;
unsigned char *tga_palette = NULL;
@@ -4887,25 +5143,14 @@ static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int
tga_image_type -= 8;
tga_is_RLE = 1;
}
- /* int tga_alpha_bits = tga_inverted & 15; */
tga_inverted = 1 - ((tga_inverted >> 5) & 1);
- // error check
- if ( //(tga_indexed) ||
- (tga_width < 1) || (tga_height < 1) ||
- (tga_image_type < 1) || (tga_image_type > 3) ||
- ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16) &&
- (tga_bits_per_pixel != 24) && (tga_bits_per_pixel != 32))
- )
- {
- return NULL; // we don't report this as a bad TGA because we don't even know if it's TGA
- }
-
// If I'm paletted, then I'll use the number of bits from the palette
- if ( tga_indexed )
- {
- tga_comp = tga_palette_bits / 8;
- }
+ if ( tga_indexed ) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16);
+ else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16);
+
+ if(!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency
+ return stbi__errpuc("bad format", "Can't find out TGA pixelformat");
// tga info
*x = tga_width;
@@ -4918,10 +5163,10 @@ static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int
// skip to the data's starting position (offset usually = 0)
stbi__skip(s, tga_offset );
- if ( !tga_indexed && !tga_is_RLE) {
+ if ( !tga_indexed && !tga_is_RLE && !tga_rgb16 ) {
for (i=0; i < tga_height; ++i) {
- int y = tga_inverted ? tga_height -i - 1 : i;
- stbi_uc *tga_row = tga_data + y*tga_width*tga_comp;
+ int row = tga_inverted ? tga_height -i - 1 : i;
+ stbi_uc *tga_row = tga_data + row*tga_width*tga_comp;
stbi__getn(s, tga_row, tga_width * tga_comp);
}
} else {
@@ -4931,15 +5176,22 @@ static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int
// any data to skip? (offset usually = 0)
stbi__skip(s, tga_palette_start );
// load the palette
- tga_palette = (unsigned char*)stbi__malloc( tga_palette_len * tga_palette_bits / 8 );
+ tga_palette = (unsigned char*)stbi__malloc( tga_palette_len * tga_comp );
if (!tga_palette) {
STBI_FREE(tga_data);
return stbi__errpuc("outofmem", "Out of memory");
}
- if (!stbi__getn(s, tga_palette, tga_palette_len * tga_palette_bits / 8 )) {
- STBI_FREE(tga_data);
- STBI_FREE(tga_palette);
- return stbi__errpuc("bad palette", "Corrupt TGA");
+ if (tga_rgb16) {
+ stbi_uc *pal_entry = tga_palette;
+ STBI_ASSERT(tga_comp == STBI_rgb);
+ for (i=0; i < tga_palette_len; ++i) {
+ stbi__tga_read_rgb16(s, pal_entry);
+ pal_entry += tga_comp;
+ }
+ } else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) {
+ STBI_FREE(tga_data);
+ STBI_FREE(tga_palette);
+ return stbi__errpuc("bad palette", "Corrupt TGA");
}
}
// load the data
@@ -4969,23 +5221,22 @@ static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int
// load however much data we did have
if ( tga_indexed )
{
- // read in 1 byte, then perform the lookup
- int pal_idx = stbi__get8(s);
- if ( pal_idx >= tga_palette_len )
- {
- // invalid index
+ // read in index, then perform the lookup
+ int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s);
+ if ( pal_idx >= tga_palette_len ) {
+ // invalid index
pal_idx = 0;
}
- pal_idx *= tga_bits_per_pixel / 8;
- for (j = 0; j*8 < tga_bits_per_pixel; ++j)
- {
+ pal_idx *= tga_comp;
+ for (j = 0; j < tga_comp; ++j) {
raw_data[j] = tga_palette[pal_idx+j];
}
- } else
- {
+ } else if(tga_rgb16) {
+ STBI_ASSERT(tga_comp == STBI_rgb);
+ stbi__tga_read_rgb16(s, raw_data);
+ } else {
// read in the data raw
- for (j = 0; j*8 < tga_bits_per_pixel; ++j)
- {
+ for (j = 0; j < tga_comp; ++j) {
raw_data[j] = stbi__get8(s);
}
}
@@ -5024,8 +5275,8 @@ static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int
}
}
- // swap RGB
- if (tga_comp >= 3)
+ // swap RGB - if the source data was RGB16, it already is in the right order
+ if (tga_comp >= 3 && !tga_rgb16)
{
unsigned char* tga_pixel = tga_data;
for (i=0; i < tga_width * tga_height; ++i)
@@ -5066,6 +5317,7 @@ static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int
int pixelCount;
int channelCount, compression;
int channel, i, count, len;
+ int bitdepth;
int w,h;
stbi_uc *out;
@@ -5090,8 +5342,9 @@ static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int
w = stbi__get32be(s);
// Make sure the depth is 8 bits.
- if (stbi__get16be(s) != 8)
- return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 bit");
+ bitdepth = stbi__get16be(s);
+ if (bitdepth != 8 && bitdepth != 16)
+ return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit");
// Make sure the color mode is RGB.
// Valid options are:
@@ -5197,14 +5450,35 @@ static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int
stbi_uc *p;
p = out + channel;
- if (channel > channelCount) {
+ if (channel >= channelCount) {
// Fill this channel with default data.
+ stbi_uc val = channel == 3 ? 255 : 0;
for (i = 0; i < pixelCount; i++, p += 4)
- *p = channel == 3 ? 255 : 0;
+ *p = val;
} else {
// Read the data.
- for (i = 0; i < pixelCount; i++, p += 4)
- *p = stbi__get8(s);
+ if (bitdepth == 16) {
+ for (i = 0; i < pixelCount; i++, p += 4)
+ *p = (stbi_uc) (stbi__get16be(s) >> 8);
+ } else {
+ for (i = 0; i < pixelCount; i++, p += 4)
+ *p = stbi__get8(s);
+ }
+ }
+ }
+ }
+
+ if (channelCount >= 4) {
+ for (i=0; i < w*h; ++i) {
+ unsigned char *pixel = out + 4*i;
+ if (pixel[3] != 0 && pixel[3] != 255) {
+ // remove weird white matte from PSD
+ float a = pixel[3] / 255.0f;
+ float ra = 1.0f / a;
+ float inv_a = 255.0f * (1 - ra);
+ pixel[0] = (unsigned char) (pixel[0]*ra + inv_a);
+ pixel[1] = (unsigned char) (pixel[1]*ra + inv_a);
+ pixel[2] = (unsigned char) (pixel[2]*ra + inv_a);
}
}
}
@@ -5362,7 +5636,6 @@ static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *c
if (count >= 128) { // Repeated
stbi_uc value[4];
- int i;
if (count==128)
count = stbi__get16be(s);
@@ -5450,8 +5723,8 @@ typedef struct
typedef struct
{
int w,h;
- stbi_uc *out; // output buffer (always 4 components)
- int flags, bgindex, ratio, transparent, eflags;
+ stbi_uc *out, *old_out; // output buffer (always 4 components)
+ int flags, bgindex, ratio, transparent, eflags, delay;
stbi_uc pal[256][4];
stbi_uc lpal[256][4];
stbi__gif_lzw codes[4096];
@@ -5522,13 +5795,15 @@ static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_in
static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp)
{
- stbi__gif g;
- if (!stbi__gif_header(s, &g, comp, 1)) {
+ stbi__gif* g = (stbi__gif*) stbi__malloc(sizeof(stbi__gif));
+ if (!stbi__gif_header(s, g, comp, 1)) {
+ STBI_FREE(g);
stbi__rewind( s );
return 0;
}
- if (x) *x = g.w;
- if (y) *y = g.h;
+ if (x) *x = g->w;
+ if (y) *y = g->h;
+ STBI_FREE(g);
return 1;
}
@@ -5569,7 +5844,7 @@ static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)
static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g)
{
stbi_uc lzw_cs;
- stbi__int32 len, code;
+ stbi__int32 len, init_code;
stbi__uint32 first;
stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear;
stbi__gif_lzw *p;
@@ -5582,10 +5857,10 @@ static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g)
codemask = (1 << codesize) - 1;
bits = 0;
valid_bits = 0;
- for (code = 0; code < clear; code++) {
- g->codes[code].prefix = -1;
- g->codes[code].first = (stbi_uc) code;
- g->codes[code].suffix = (stbi_uc) code;
+ for (init_code = 0; init_code < clear; init_code++) {
+ g->codes[init_code].prefix = -1;
+ g->codes[init_code].first = (stbi_uc) init_code;
+ g->codes[init_code].suffix = (stbi_uc) init_code;
}
// support no starting clear code
@@ -5646,17 +5921,18 @@ static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g)
}
}
-static void stbi__fill_gif_background(stbi__gif *g)
+static void stbi__fill_gif_background(stbi__gif *g, int x0, int y0, int x1, int y1)
{
- int i;
+ int x, y;
stbi_uc *c = g->pal[g->bgindex];
- // @OPTIMIZE: write a dword at a time
- for (i = 0; i < g->w * g->h * 4; i += 4) {
- stbi_uc *p = &g->out[i];
- p[0] = c[2];
- p[1] = c[1];
- p[2] = c[0];
- p[3] = c[3];
+ for (y = y0; y < y1; y += 4 * g->w) {
+ for (x = x0; x < x1; x += 4) {
+ stbi_uc *p = &g->out[y + x];
+ p[0] = c[2];
+ p[1] = c[1];
+ p[2] = c[0];
+ p[3] = 0;
+ }
}
}
@@ -5664,27 +5940,40 @@ static void stbi__fill_gif_background(stbi__gif *g)
static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp)
{
int i;
- stbi_uc *old_out = 0;
+ stbi_uc *prev_out = 0;
- if (g->out == 0) {
- if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header
- g->out = (stbi_uc *) stbi__malloc(4 * g->w * g->h);
- if (g->out == 0) return stbi__errpuc("outofmem", "Out of memory");
- stbi__fill_gif_background(g);
- } else {
- // animated-gif-only path
- if (((g->eflags & 0x1C) >> 2) == 3) {
- old_out = g->out;
- g->out = (stbi_uc *) stbi__malloc(4 * g->w * g->h);
- if (g->out == 0) return stbi__errpuc("outofmem", "Out of memory");
- memcpy(g->out, old_out, g->w*g->h*4);
- }
+ if (g->out == 0 && !stbi__gif_header(s, g, comp,0))
+ return 0; // stbi__g_failure_reason set by stbi__gif_header
+
+ prev_out = g->out;
+ g->out = (stbi_uc *) stbi__malloc(4 * g->w * g->h);
+ if (g->out == 0) return stbi__errpuc("outofmem", "Out of memory");
+
+ switch ((g->eflags & 0x1C) >> 2) {
+ case 0: // unspecified (also always used on 1st frame)
+ stbi__fill_gif_background(g, 0, 0, 4 * g->w, 4 * g->w * g->h);
+ break;
+ case 1: // do not dispose
+ if (prev_out) memcpy(g->out, prev_out, 4 * g->w * g->h);
+ g->old_out = prev_out;
+ break;
+ case 2: // dispose to background
+ if (prev_out) memcpy(g->out, prev_out, 4 * g->w * g->h);
+ stbi__fill_gif_background(g, g->start_x, g->start_y, g->max_x, g->max_y);
+ break;
+ case 3: // dispose to previous
+ if (g->old_out) {
+ for (i = g->start_y; i < g->max_y; i += 4 * g->w)
+ memcpy(&g->out[i + g->start_x], &g->old_out[i + g->start_x], g->max_x - g->start_x);
+ }
+ break;
}
for (;;) {
switch (stbi__get8(s)) {
case 0x2C: /* Image Descriptor */
{
+ int prev_trans = -1;
stbi__int32 x, y, w, h;
stbi_uc *o;
@@ -5717,10 +6006,10 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i
stbi__gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1);
g->color_table = (stbi_uc *) g->lpal;
} else if (g->flags & 0x80) {
- for (i=0; i < 256; ++i) // @OPTIMIZE: stbi__jpeg_reset only the previous transparent
- g->pal[i][3] = 255;
- if (g->transparent >= 0 && (g->eflags & 0x01))
+ if (g->transparent >= 0 && (g->eflags & 0x01)) {
+ prev_trans = g->pal[g->transparent][3];
g->pal[g->transparent][3] = 0;
+ }
g->color_table = (stbi_uc *) g->pal;
} else
return stbi__errpuc("missing color table", "Corrupt GIF");
@@ -5728,8 +6017,9 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i
o = stbi__process_gif_raster(s, g);
if (o == NULL) return NULL;
- if (req_comp && req_comp != 4)
- o = stbi__convert_format(o, 4, req_comp, g->w, g->h);
+ if (prev_trans != -1)
+ g->pal[g->transparent][3] = (stbi_uc) prev_trans;
+
return o;
}
@@ -5740,7 +6030,7 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i
len = stbi__get8(s);
if (len == 4) {
g->eflags = stbi__get8(s);
- stbi__get16le(s); // delay
+ g->delay = stbi__get16le(s);
g->transparent = stbi__get8(s);
} else {
stbi__skip(s, len);
@@ -5759,21 +6049,27 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i
return stbi__errpuc("unknown code", "Corrupt GIF");
}
}
+
+ STBI_NOTUSED(req_comp);
}
static stbi_uc *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
stbi_uc *u = 0;
- stbi__gif g;
- memset(&g, 0, sizeof(g));
+ stbi__gif* g = (stbi__gif*) stbi__malloc(sizeof(stbi__gif));
+ memset(g, 0, sizeof(*g));
- u = stbi__gif_load_next(s, &g, comp, req_comp);
+ u = stbi__gif_load_next(s, g, comp, req_comp);
if (u == (stbi_uc *) s) u = 0; // end of animated gif marker
if (u) {
- *x = g.w;
- *y = g.h;
- }
-
+ *x = g->w;
+ *y = g->h;
+ if (req_comp && req_comp != 4)
+ u = stbi__convert_format(u, 4, req_comp, g->w, g->h);
+ }
+ else if (g->out)
+ STBI_FREE(g->out);
+ STBI_FREE(g);
return u;
}
@@ -5971,7 +6267,7 @@ static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp)
char *token;
int valid = 0;
- if (strcmp(stbi__hdr_gettoken(s,buffer), "#?RADIANCE") != 0) {
+ if (stbi__hdr_test(s) == 0) {
stbi__rewind( s );
return 0;
}
@@ -6008,29 +6304,17 @@ static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp)
#ifndef STBI_NO_BMP
static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp)
{
- int hsz;
- if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') {
- stbi__rewind( s );
- return 0;
- }
- stbi__skip(s,12);
- hsz = stbi__get32le(s);
- if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) {
- stbi__rewind( s );
- return 0;
- }
- if (hsz == 12) {
- *x = stbi__get16le(s);
- *y = stbi__get16le(s);
- } else {
- *x = stbi__get32le(s);
- *y = stbi__get32le(s);
- }
- if (stbi__get16le(s) != 1) {
- stbi__rewind( s );
- return 0;
- }
- *comp = stbi__get16le(s) / 8;
+ void *p;
+ stbi__bmp_data info;
+
+ info.all_a = 255;
+ p = stbi__bmp_parse_header(s, &info);
+ stbi__rewind( s );
+ if (p == NULL)
+ return 0;
+ *x = s->img_x;
+ *y = s->img_y;
+ *comp = info.ma ? 4 : 3;
return 1;
}
#endif
@@ -6074,14 +6358,22 @@ static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp)
int act_comp=0,num_packets=0,chained;
stbi__pic_packet packets[10];
- stbi__skip(s, 92);
+ if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) {
+ stbi__rewind(s);
+ return 0;
+ }
+
+ stbi__skip(s, 88);
*x = stbi__get16be(s);
*y = stbi__get16be(s);
- if (stbi__at_eof(s)) return 0;
+ if (stbi__at_eof(s)) {
+ stbi__rewind( s);
+ return 0;
+ }
if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) {
- stbi__rewind( s );
- return 0;
+ stbi__rewind( s );
+ return 0;
}
stbi__skip(s, 8);
@@ -6168,8 +6460,16 @@ static int stbi__pnm_isspace(char c)
static void stbi__pnm_skip_whitespace(stbi__context *s, char *c)
{
- while (!stbi__at_eof(s) && stbi__pnm_isspace(*c))
- *c = (char) stbi__get8(s);
+ for (;;) {
+ while (!stbi__at_eof(s) && stbi__pnm_isspace(*c))
+ *c = (char) stbi__get8(s);
+
+ if (stbi__at_eof(s) || *c != '#')
+ break;
+
+ while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' )
+ *c = (char) stbi__get8(s);
+ }
}
static int stbi__pnm_isdigit(char c)
@@ -6307,6 +6607,26 @@ STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int
/*
revision history:
+ 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes
+ 2.11 (2016-04-02) allocate large structures on the stack
+ remove white matting for transparent PSD
+ fix reported channel count for PNG & BMP
+ re-enable SSE2 in non-gcc 64-bit
+ support RGB-formatted JPEG
+ read 16-bit PNGs (only as 8-bit)
+ 2.10 (2016-01-22) avoid warning introduced in 2.09 by STBI_REALLOC_SIZED
+ 2.09 (2016-01-16) allow comments in PNM files
+ 16-bit-per-pixel TGA (not bit-per-component)
+ info() for TGA could break due to .hdr handling
+ info() for BMP to shares code instead of sloppy parse
+ can use STBI_REALLOC_SIZED if allocator doesn't support realloc
+ code cleanup
+ 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA
+ 2.07 (2015-09-13) fix compiler warnings
+ partial animated GIF support
+ limited 16-bpc PSD support
+ #ifdef unused functions
+ bug with < 92 byte PIC,PNM,HDR,TGA
2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value
2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning
2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit
diff --git a/3rdparty/bgfx/3rdparty/stb/stb_rect_pack.h b/3rdparty/bgfx/3rdparty/stb/stb_rect_pack.h
index eb0ef2f268f..b09786bd520 100644
--- a/3rdparty/bgfx/3rdparty/stb/stb_rect_pack.h
+++ b/3rdparty/bgfx/3rdparty/stb/stb_rect_pack.h
@@ -1,4 +1,12 @@
-// stb_rect_pack.h - v0.05 - public domain - rectangle packing
+#if defined(__GNUC__) || defined(__clang__)
+# pragma GCC diagnostic ignored "-Wtype-limits"
+# pragma GCC diagnostic ignored "-Wunused-function"
+# pragma GCC diagnostic ignored "-Wunused-parameter"
+#else
+# pragma warning(disable:4100) // C4100: 'c': unreferenced formal parameter
+#endif
+
+// stb_rect_pack.h - v0.08 - public domain - rectangle packing
// Sean Barrett 2014
//
// Useful for e.g. packing rectangular textures into an atlas.
@@ -13,6 +21,7 @@
// More docs to come.
//
// No memory allocations; uses qsort() and assert() from stdlib.
+// Can override those by defining STBRP_SORT and STBRP_ASSERT.
//
// This library currently uses the Skyline Bottom-Left algorithm.
//
@@ -20,11 +29,29 @@
// implement them to the same API, but with a different init
// function.
//
+// Credits
+//
+// Library
+// Sean Barrett
+// Minor features
+// Martins Mozeiko
+// Bugfixes / warning fixes
+// Jeremy Jaussaud
+//
// Version history:
//
+// 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0)
+// 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0)
+// 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort
// 0.05: added STBRP_ASSERT to allow replacing assert
// 0.04: fixed minor bug in STBRP_LARGE_RECTS support
// 0.01: initial release
+//
+// LICENSE
+//
+// This software is dual-licensed to the public domain and under the following
+// license: you are granted a perpetual, irrevocable license to copy, modify,
+// publish, and distribute this file as you see fit.
//////////////////////////////////////////////////////////////////////////////
//
@@ -129,7 +156,7 @@ enum
{
STBRP_HEURISTIC_Skyline_default=0,
STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default,
- STBRP_HEURISTIC_Skyline_BF_sortHeight
+ STBRP_HEURISTIC_Skyline_BF_sortHeight,
};
@@ -169,7 +196,10 @@ struct stbrp_context
//
#ifdef STB_RECT_PACK_IMPLEMENTATION
+#ifndef STBRP_SORT
#include <stdlib.h>
+#define STBRP_SORT qsort
+#endif
#ifndef STBRP_ASSERT
#include <assert.h>
@@ -178,7 +208,7 @@ struct stbrp_context
enum
{
- STBRP__INIT_skyline = 1
+ STBRP__INIT_skyline = 1,
};
STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
@@ -248,7 +278,6 @@ STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height,
// find minimum y position if it starts at x1
static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first, int x0, int width, int *pwaste)
{
- (void)c;
stbrp_node *node = first;
int x1 = x0 + width;
int min_y, visited_width, waste_area;
@@ -525,20 +554,24 @@ STBRP_DEF void stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int n
}
// sort according to heuristic
- qsort(rects, num_rects, sizeof(rects[0]), rect_height_compare);
+ STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare);
for (i=0; i < num_rects; ++i) {
- stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
- if (fr.prev_link) {
- rects[i].x = (stbrp_coord) fr.x;
- rects[i].y = (stbrp_coord) fr.y;
+ if (rects[i].w == 0 || rects[i].h == 0) {
+ rects[i].x = rects[i].y = 0; // empty rect needs no space
} else {
- rects[i].x = rects[i].y = STBRP__MAXVAL;
+ stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
+ if (fr.prev_link) {
+ rects[i].x = (stbrp_coord) fr.x;
+ rects[i].y = (stbrp_coord) fr.y;
+ } else {
+ rects[i].x = rects[i].y = STBRP__MAXVAL;
+ }
}
}
// unsort
- qsort(rects, num_rects, sizeof(rects[0]), rect_original_order);
+ STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_original_order);
// set was_packed flags
for (i=0; i < num_rects; ++i)
diff --git a/3rdparty/bgfx/3rdparty/stb/stb_textedit.h b/3rdparty/bgfx/3rdparty/stb/stb_textedit.h
index 5aa79f02ada..29af484b1c6 100644
--- a/3rdparty/bgfx/3rdparty/stb/stb_textedit.h
+++ b/3rdparty/bgfx/3rdparty/stb/stb_textedit.h
@@ -1,4 +1,4 @@
-// stb_textedit.h - v1.4 - public domain - Sean Barrett
+// stb_textedit.h - v1.8 - public domain - Sean Barrett
// Development of this library was sponsored by RAD Game Tools
//
// This C header file implements the guts of a multi-line text-editing
@@ -17,19 +17,24 @@
//
// LICENSE
//
-// This software has been placed in the public domain by its author.
-// Where that dedication is not recognized, you are granted a perpetual,
-// irrevocable license to copy and modify this file as you see fit.
+// This software is dual-licensed to the public domain and under the following
+// license: you are granted a perpetual, irrevocable license to copy, modify,
+// publish, and distribute this file as you see fit.
//
//
// DEPENDENCIES
//
-// Uses the C runtime function 'memmove'. Uses no other functions.
-// Performs no runtime allocations.
+// Uses the C runtime function 'memmove', which you can override
+// by defining STB_TEXTEDIT_memmove before the implementation.
+// Uses no other functions. Performs no runtime allocations.
//
//
// VERSION HISTORY
//
+// 1.8 (2016-04-02) better keyboard handling when mouse button is down
+// 1.7 (2015-09-13) change y range handling in case baseline is non-0
+// 1.6 (2015-04-15) allow STB_TEXTEDIT_memmove
+// 1.5 (2014-09-10) add support for secondary keys for OS X
// 1.4 (2014-08-17) fix signed/unsigned warnings
// 1.3 (2014-06-19) fix mouse clicking to round to nearest char boundary
// 1.2 (2014-05-27) fix some RAD types that had crept into the new code
@@ -42,7 +47,13 @@
// ADDITIONAL CONTRIBUTORS
//
// Ulf Winklemann: move-by-word in 1.1
-// Scott Graham: mouse selection bugfix in 1.3
+// Fabian Giesen: secondary key inputs in 1.5
+// Martins Mozeiko: STB_TEXTEDIT_memmove
+//
+// Bugfixes:
+// Scott Graham
+// Daniel Keller
+// Omar Cornut
//
// USAGE
//
@@ -142,6 +153,10 @@
// required for WORDLEFT/WORDRIGHT
// STB_TEXTEDIT_K_WORDLEFT keyboard input to move cursor left one word // e.g. ctrl-LEFT
// STB_TEXTEDIT_K_WORDRIGHT keyboard input to move cursor right one word // e.g. ctrl-RIGHT
+// STB_TEXTEDIT_K_LINESTART2 secondary keyboard input to move cursor to start of line
+// STB_TEXTEDIT_K_LINEEND2 secondary keyboard input to move cursor to end of line
+// STB_TEXTEDIT_K_TEXTSTART2 secondary keyboard input to move cursor to start of text
+// STB_TEXTEDIT_K_TEXTEND2 secondary keyboard input to move cursor to end of text
//
// Todo:
// STB_TEXTEDIT_K_PGUP keyboard input to move cursor up a page
@@ -352,7 +367,10 @@ typedef struct
// included just the "header" portion
#ifdef STB_TEXTEDIT_IMPLEMENTATION
-#include <string.h> // memmove
+#ifndef STB_TEXTEDIT_memmove
+#include <string.h>
+#define STB_TEXTEDIT_memmove memmove
+#endif
/////////////////////////////////////////////////////////////////////////////
@@ -368,9 +386,6 @@ static int stb_text_locate_coord(STB_TEXTEDIT_STRING *str, float x, float y)
float base_y = 0, prev_x;
int i=0, k;
- if (y < 0)
- return 0;
-
r.x0 = r.x1 = 0;
r.ymin = r.ymax = 0;
r.num_chars = 0;
@@ -381,6 +396,9 @@ static int stb_text_locate_coord(STB_TEXTEDIT_STRING *str, float x, float y)
if (r.num_chars <= 0)
return n;
+ if (i==0 && y < base_y + r.ymin)
+ return 0;
+
if (y < base_y + r.ymax)
break;
@@ -434,6 +452,8 @@ static void stb_textedit_click(STB_TEXTEDIT_STRING *str, STB_TexteditState *stat
static void stb_textedit_drag(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y)
{
int p = stb_text_locate_coord(str, x, y);
+ if (state->select_start == state->select_end)
+ state->select_start = state->cursor;
state->cursor = state->select_end = p;
}
@@ -917,23 +937,35 @@ retry:
state->has_preferred_x = 0;
break;
+#ifdef STB_TEXTEDIT_K_TEXTSTART2
+ case STB_TEXTEDIT_K_TEXTSTART2:
+#endif
case STB_TEXTEDIT_K_TEXTSTART:
state->cursor = state->select_start = state->select_end = 0;
state->has_preferred_x = 0;
break;
+#ifdef STB_TEXTEDIT_K_TEXTEND2
+ case STB_TEXTEDIT_K_TEXTEND2:
+#endif
case STB_TEXTEDIT_K_TEXTEND:
state->cursor = STB_TEXTEDIT_STRINGLEN(str);
state->select_start = state->select_end = 0;
state->has_preferred_x = 0;
break;
+#ifdef STB_TEXTEDIT_K_TEXTSTART2
+ case STB_TEXTEDIT_K_TEXTSTART2 | STB_TEXTEDIT_K_SHIFT:
+#endif
case STB_TEXTEDIT_K_TEXTSTART | STB_TEXTEDIT_K_SHIFT:
stb_textedit_prep_selection_at_cursor(state);
state->cursor = state->select_end = 0;
state->has_preferred_x = 0;
break;
+#ifdef STB_TEXTEDIT_K_TEXTEND2
+ case STB_TEXTEDIT_K_TEXTEND2 | STB_TEXTEDIT_K_SHIFT:
+#endif
case STB_TEXTEDIT_K_TEXTEND | STB_TEXTEDIT_K_SHIFT:
stb_textedit_prep_selection_at_cursor(state);
state->cursor = state->select_end = STB_TEXTEDIT_STRINGLEN(str);
@@ -941,6 +973,9 @@ retry:
break;
+#ifdef STB_TEXTEDIT_K_LINESTART2
+ case STB_TEXTEDIT_K_LINESTART2:
+#endif
case STB_TEXTEDIT_K_LINESTART: {
StbFindState find;
stb_textedit_clamp(str, state);
@@ -951,16 +986,25 @@ retry:
break;
}
+#ifdef STB_TEXTEDIT_K_LINEEND2
+ case STB_TEXTEDIT_K_LINEEND2:
+#endif
case STB_TEXTEDIT_K_LINEEND: {
StbFindState find;
stb_textedit_clamp(str, state);
stb_textedit_move_to_first(state);
stb_textedit_find_charpos(&find, str, state->cursor, state->single_line);
- state->cursor = find.first_char + find.length;
+
state->has_preferred_x = 0;
+ state->cursor = find.first_char + find.length;
+ if (find.length > 0 && STB_TEXTEDIT_GETCHAR(str, state->cursor-1) == STB_TEXTEDIT_NEWLINE)
+ --state->cursor;
break;
}
+#ifdef STB_TEXTEDIT_K_LINESTART2
+ case STB_TEXTEDIT_K_LINESTART2 | STB_TEXTEDIT_K_SHIFT:
+#endif
case STB_TEXTEDIT_K_LINESTART | STB_TEXTEDIT_K_SHIFT: {
StbFindState find;
stb_textedit_clamp(str, state);
@@ -971,13 +1015,19 @@ retry:
break;
}
+#ifdef STB_TEXTEDIT_K_LINEEND2
+ case STB_TEXTEDIT_K_LINEEND2 | STB_TEXTEDIT_K_SHIFT:
+#endif
case STB_TEXTEDIT_K_LINEEND | STB_TEXTEDIT_K_SHIFT: {
StbFindState find;
stb_textedit_clamp(str, state);
stb_textedit_prep_selection_at_cursor(state);
stb_textedit_find_charpos(&find, str, state->cursor, state->single_line);
- state->cursor = state->select_end = find.first_char + find.length;
state->has_preferred_x = 0;
+ state->cursor = find.first_char + find.length;
+ if (find.length > 0 && STB_TEXTEDIT_GETCHAR(str, state->cursor-1) == STB_TEXTEDIT_NEWLINE)
+ --state->cursor;
+ state->select_end = state->cursor;
break;
}
@@ -1008,13 +1058,13 @@ static void stb_textedit_discard_undo(StbUndoState *state)
int n = state->undo_rec[0].insert_length, i;
// delete n characters from all other records
state->undo_char_point = state->undo_char_point - (short) n; // vsnet05
- memmove(state->undo_char, state->undo_char + n, (size_t) ((size_t)state->undo_char_point*sizeof(STB_TEXTEDIT_CHARTYPE)));
+ STB_TEXTEDIT_memmove(state->undo_char, state->undo_char + n, (size_t) (state->undo_char_point*sizeof(STB_TEXTEDIT_CHARTYPE)));
for (i=0; i < state->undo_point; ++i)
if (state->undo_rec[i].char_storage >= 0)
state->undo_rec[i].char_storage = state->undo_rec[i].char_storage - (short) n; // vsnet05 // @OPTIMIZE: get rid of char_storage and infer it
}
--state->undo_point;
- memmove(state->undo_rec, state->undo_rec+1, (size_t) ((size_t)state->undo_point*sizeof(state->undo_rec[0])));
+ STB_TEXTEDIT_memmove(state->undo_rec, state->undo_rec+1, (size_t) (state->undo_point*sizeof(state->undo_rec[0])));
}
}
@@ -1032,13 +1082,13 @@ static void stb_textedit_discard_redo(StbUndoState *state)
int n = state->undo_rec[k].insert_length, i;
// delete n characters from all other records
state->redo_char_point = state->redo_char_point + (short) n; // vsnet05
- memmove(state->undo_char + state->redo_char_point, state->undo_char + state->redo_char_point-n, (size_t) ((size_t)(STB_TEXTEDIT_UNDOSTATECOUNT - state->redo_char_point)*sizeof(STB_TEXTEDIT_CHARTYPE)));
+ STB_TEXTEDIT_memmove(state->undo_char + state->redo_char_point, state->undo_char + state->redo_char_point-n, (size_t) ((STB_TEXTEDIT_UNDOSTATECOUNT - state->redo_char_point)*sizeof(STB_TEXTEDIT_CHARTYPE)));
for (i=state->redo_point; i < k; ++i)
if (state->undo_rec[i].char_storage >= 0)
state->undo_rec[i].char_storage = state->undo_rec[i].char_storage + (short) n; // vsnet05
}
++state->redo_point;
- memmove(state->undo_rec + state->redo_point-1, state->undo_rec + state->redo_point, (size_t) ((size_t)(STB_TEXTEDIT_UNDOSTATECOUNT - state->redo_point)*sizeof(state->undo_rec[0])));
+ STB_TEXTEDIT_memmove(state->undo_rec + state->redo_point-1, state->undo_rec + state->redo_point, (size_t) ((STB_TEXTEDIT_UNDOSTATECOUNT - state->redo_point)*sizeof(state->undo_rec[0])));
}
}
diff --git a/3rdparty/bgfx/3rdparty/stb/stb_truetype.h b/3rdparty/bgfx/3rdparty/stb/stb_truetype.h
index 98f1319e844..c99f5d63e01 100644
--- a/3rdparty/bgfx/3rdparty/stb/stb_truetype.h
+++ b/3rdparty/bgfx/3rdparty/stb/stb_truetype.h
@@ -27,6 +27,10 @@
// Mikko Mononen: compound shape support, more cmap formats
// Tor Andersson: kerning, subpixel rendering
//
+// Misc other:
+// Ryan Gordon
+// Simon Glass
+//
// Bug/warning reports/fixes:
// "Zer" on mollyrocket (with fix)
// Cass Everitt
@@ -45,13 +49,18 @@
// Omar Cornut
// github:aloucks
// Peter LaValle
+// Sergey Popov
// Giumo X. Clanjor
-//
-// Misc other:
-// Ryan Gordon
+// Higor Euripedes
+// Thomas Fields
+// Derek Vinyard
//
// VERSION HISTORY
//
+// 1.11 (2016-04-02) fix unused-variable warning
+// 1.10 (2016-04-02) user-defined fabs(); rare memory leak; remove duplicate typedef
+// 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use allocation userdata properly
+// 1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges
// 1.07 (2015-08-01) allow PackFontRanges to accept arrays of sparse codepoints;
// variant PackFontRanges to pack and render in separate phases;
// fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?);
@@ -68,9 +77,9 @@
//
// LICENSE
//
-// This software is in the public domain. Where that dedication is not
-// recognized, you are granted a perpetual, irrevocable license to copy,
-// distribute, and modify this file as you see fit.
+// This software is dual-licensed to the public domain and under the following
+// license: you are granted a perpetual, irrevocable license to copy, modify,
+// publish, and distribute this file as you see fit.
//
// USAGE
//
@@ -406,6 +415,11 @@ int main(int arg, char **argv)
#define STBTT_sqrt(x) sqrt(x)
#endif
+ #ifndef STBTT_fabs
+ #include <math.h>
+ #define STBTT_fabs(x) fabs(x)
+ #endif
+
// #define your own functions "STBTT_malloc" / "STBTT_free" to avoid malloc.h
#ifndef STBTT_malloc
#include <stdlib.h>
@@ -629,7 +643,7 @@ STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index);
// The following structure is defined publically so you can declare one on
// the stack or as a global or etc, but you should treat it as opaque.
-typedef struct stbtt_fontinfo
+struct stbtt_fontinfo
{
void * userdata;
unsigned char * data; // pointer to .ttf file
@@ -640,7 +654,7 @@ typedef struct stbtt_fontinfo
int loca,head,glyf,hhea,hmtx,kern; // table locations as offset from start of .ttf
int index_map; // a cmap mapping for our chosen character encoding
int indexToLocFormat; // format needed to map from glyph index to glyph
-} stbtt_fontinfo;
+};
STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset);
// Given an offset into the file that defines a font, this function builds
@@ -808,7 +822,16 @@ typedef struct
unsigned char *pixels;
} stbtt__bitmap;
-STBTT_DEF void stbtt_Rasterize(stbtt__bitmap *result, float flatness_in_pixels, stbtt_vertex *vertices, int num_verts, float scale_x, float scale_y, float shift_x, float shift_y, int x_off, int y_off, int invert, void *userdata);
+// rasterize a shape with quadratic beziers into a bitmap
+STBTT_DEF void stbtt_Rasterize(stbtt__bitmap *result, // 1-channel bitmap to draw into
+ float flatness_in_pixels, // allowable error of curve in pixels
+ stbtt_vertex *vertices, // array of vertices defining shape
+ int num_verts, // number of vertices in above array
+ float scale_x, float scale_y, // scale applied to input vertices
+ float shift_x, float shift_y, // translation applied to input vertices
+ int x_off, int y_off, // another translation applied to input
+ int invert, // if non-zero, vertically flip shape
+ void *userdata); // context for to STBTT_MALLOC
//////////////////////////////////////////////////////////////////////////////
//
@@ -933,6 +956,12 @@ typedef int stbtt__test_oversample_pow2[(STBTT_MAX_OVERSAMPLE & (STBTT_MAX_OVERS
#define STBTT_RASTERIZER_VERSION 2
#endif
+#ifdef _MSC_VER
+#define STBTT__NOTUSED(v) (void)(v)
+#else
+#define STBTT__NOTUSED(v) (void)sizeof(v)
+#endif
+
//////////////////////////////////////////////////////////////////////////
//
// accessors to parse data from file
@@ -1550,7 +1579,7 @@ STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *v)
STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1)
{
- int x0,y0,x1,y1;
+ int x0=0,y0=0,x1,y1; // =0 suppresses compiler warning
if (!stbtt_GetGlyphBox(font, glyph, &x0,&y0,&x1,&y1)) {
// e.g. space character
if (ix0) *ix0 = 0;
@@ -1666,6 +1695,7 @@ static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, i
{
stbtt__active_edge *z = (stbtt__active_edge *) stbtt__hheap_alloc(hh, sizeof(*z), userdata);
float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
+ STBTT_assert(z != NULL);
if (!z) return z;
// round dx down to avoid overshooting
@@ -1687,10 +1717,11 @@ static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, i
{
stbtt__active_edge *z = (stbtt__active_edge *) stbtt__hheap_alloc(hh, sizeof(*z), userdata);
float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
+ STBTT_assert(z != NULL);
//STBTT_assert(e->y0 <= start_point);
if (!z) return z;
z->fdx = dxdy;
- z->fdy = (1/dxdy);
+ z->fdy = dxdy != 0.0f ? (1.0f/dxdy) : 0.0f;
z->fx = e->x0 + dxdy * (start_point - e->y0);
z->fx -= off_x;
z->direction = e->invert ? 1.0f : -1.0f;
@@ -1751,7 +1782,7 @@ static void stbtt__fill_active_edges(unsigned char *scanline, int len, stbtt__ac
static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e, int n, int vsubsample, int off_x, int off_y, void *userdata)
{
- stbtt__hheap hh = { 0 };
+ stbtt__hheap hh = { 0, 0, 0 };
stbtt__active_edge *active = NULL;
int y,j=0;
int max_weight = (255 / vsubsample); // weight per vertical scanline
@@ -1811,21 +1842,23 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
while (e->y0 <= scan_y) {
if (e->y1 > scan_y) {
stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y, userdata);
- // find insertion point
- if (active == NULL)
- active = z;
- else if (z->x < active->x) {
- // insert at front
- z->next = active;
- active = z;
- } else {
- // find thing to insert AFTER
- stbtt__active_edge *p = active;
- while (p->next && p->next->x < z->x)
- p = p->next;
- // at this point, p->next->x is NOT < z->x
- z->next = p->next;
- p->next = z;
+ if (z != NULL) {
+ // find insertion point
+ if (active == NULL)
+ active = z;
+ else if (z->x < active->x) {
+ // insert at front
+ z->next = active;
+ active = z;
+ } else {
+ // find thing to insert AFTER
+ stbtt__active_edge *p = active;
+ while (p->next && p->next->x < z->x)
+ p = p->next;
+ // at this point, p->next->x is NOT < z->x
+ z->next = p->next;
+ p->next = z;
+ }
}
}
++e;
@@ -1913,7 +1946,7 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
float dx = e->fdx;
float xb = x0 + dx;
float x_top, x_bottom;
- float y0,y1;
+ float sy0,sy1;
float dy = e->fdy;
STBTT_assert(e->sy <= y_bottom && e->ey >= y_top);
@@ -1922,17 +1955,17 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
// line with y_top, but that may be off the line segment.
if (e->sy > y_top) {
x_top = x0 + dx * (e->sy - y_top);
- y0 = e->sy;
+ sy0 = e->sy;
} else {
x_top = x0;
- y0 = y_top;
+ sy0 = y_top;
}
if (e->ey < y_bottom) {
x_bottom = x0 + dx * (e->ey - y_top);
- y1 = e->ey;
+ sy1 = e->ey;
} else {
x_bottom = xb;
- y1 = y_bottom;
+ sy1 = y_bottom;
}
if (x_top >= 0 && x_bottom >= 0 && x_top < len && x_bottom < len) {
@@ -1942,7 +1975,7 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
float height;
// simple case, only spans one pixel
int x = (int) x_top;
- height = y1 - y0;
+ height = sy1 - sy0;
STBTT_assert(x >= 0 && x < len);
scanline[x] += e->direction * (1-((x_top - x) + (x_bottom-x))/2) * height;
scanline_fill[x] += e->direction * height; // everything right of this pixel is filled
@@ -1953,9 +1986,9 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
if (x_top > x_bottom) {
// flip scanline vertically; signed area is the same
float t;
- y0 = y_bottom - (y0 - y_top);
- y1 = y_bottom - (y1 - y_top);
- t = y0, y0 = y1, y1 = t;
+ sy0 = y_bottom - (sy0 - y_top);
+ sy1 = y_bottom - (sy1 - y_top);
+ t = sy0, sy0 = sy1, sy1 = t;
t = x_bottom, x_bottom = x_top, x_top = t;
dx = -dx;
dy = -dy;
@@ -1969,7 +2002,7 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
sign = e->direction;
// area of the rectangle covered from y0..y_crossing
- area = sign * (y_crossing-y0);
+ area = sign * (y_crossing-sy0);
// area of the triangle (x_top,y0), (x+1,y0), (x+1,y_crossing)
scanline[x1] += area * (1-((x_top - x1)+(x1+1-x1))/2);
@@ -1980,11 +2013,11 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
}
y_crossing += dy * (x2 - (x1+1));
- STBTT_assert(fabs(area) <= 1.01f);
+ STBTT_assert(STBTT_fabs(area) <= 1.01f);
- scanline[x2] += area + sign * (1-((x2-x2)+(x_bottom-x2))/2) * (y1-y_crossing);
+ scanline[x2] += area + sign * (1-((x2-x2)+(x_bottom-x2))/2) * (sy1-y_crossing);
- scanline_fill[x2] += sign * (y1-y0);
+ scanline_fill[x2] += sign * (sy1-sy0);
}
} else {
// if edge goes outside of box we're drawing, we require
@@ -2053,13 +2086,13 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
// directly AA rasterize edges w/o supersampling
static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e, int n, int vsubsample, int off_x, int off_y, void *userdata)
{
- (void)vsubsample;
- stbtt__hheap hh;
- memset(&hh, 0, sizeof(hh));
+ stbtt__hheap hh = { 0, 0, 0 };
stbtt__active_edge *active = NULL;
int y,j=0, i;
float scanline_data[129], *scanline, *scanline2;
+ STBTT__NOTUSED(vsubsample);
+
if (result->w > 64)
scanline = (float *) STBTT_malloc((result->w*2+1) * sizeof(float), userdata);
else
@@ -2095,11 +2128,15 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
// insert all edges that start before the bottom of this scanline
while (e->y0 <= scan_y_bottom) {
- stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y_top, userdata);
- STBTT_assert(z->ey >= scan_y_top);
- // insert at front
- z->next = active;
- active = z;
+ if (e->y0 != e->y1) {
+ stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y_top, userdata);
+ if (z != NULL) {
+ STBTT_assert(z->ey >= scan_y_top);
+ // insert at front
+ z->next = active;
+ active = z;
+ }
+ }
++e;
}
@@ -2114,7 +2151,7 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
int m;
sum += scanline2[i];
k = scanline[i] + sum;
- k = (float) fabs(k)*255 + 0.5f;
+ k = (float) STBTT_fabs(k)*255 + 0.5f;
m = (int) k;
if (m > 255) m = 255;
result->pixels[j*result->stride + i] = (unsigned char) m;
@@ -2415,7 +2452,10 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info
if (scale_x == 0) scale_x = scale_y;
if (scale_y == 0) {
- if (scale_x == 0) return NULL;
+ if (scale_x == 0) {
+ STBTT_free(vertices, info->userdata);
+ return NULL;
+ }
scale_y = scale_x;
}
@@ -2507,6 +2547,7 @@ STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset, // fo
float scale;
int x,y,bottom_y, i;
stbtt_fontinfo f;
+ f.userdata = NULL;
if (!stbtt_InitFont(&f, data, offset))
return -1;
STBTT_memset(pixels, 0, pw*ph); // background of 0 around pixels
@@ -2570,11 +2611,6 @@ STBTT_DEF void stbtt_GetBakedQuad(stbtt_bakedchar *chardata, int pw, int ph, int
//
#ifndef STB_RECT_PACK_VERSION
-#ifdef _MSC_VER
-#define STBTT__NOTUSED(v) (void)(v)
-#else
-#define STBTT__NOTUSED(v) (void)sizeof(v)
-#endif
typedef int stbrp_coord;
@@ -2700,6 +2736,7 @@ static void stbtt__h_prefilter(unsigned char *pixels, int w, int h, int stride_i
unsigned char buffer[STBTT_MAX_OVERSAMPLE];
int safe_w = w - kernel_width;
int j;
+ STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze
for (j=0; j < h; ++j) {
int i;
unsigned int total;
@@ -2761,6 +2798,7 @@ static void stbtt__v_prefilter(unsigned char *pixels, int w, int h, int stride_i
unsigned char buffer[STBTT_MAX_OVERSAMPLE];
int safe_h = h - kernel_width;
int j;
+ STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze
for (j=0; j < w; ++j) {
int i;
unsigned int total;
@@ -2842,7 +2880,7 @@ STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, stbtt_fon
ranges[i].v_oversample = (unsigned char) spc->v_oversample;
for (j=0; j < ranges[i].num_chars; ++j) {
int x0,y0,x1,y1;
- int codepoint = ranges[i].first_unicode_codepoint_in_range ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j];
+ int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j];
int glyph = stbtt_FindGlyphIndex(info, codepoint);
stbtt_GetGlyphBitmapBoxSubpixel(info,glyph,
scale * spc->h_oversample,
@@ -2883,7 +2921,7 @@ STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, stbtt
if (r->was_packed) {
stbtt_packedchar *bc = &ranges[i].chardata_for_range[j];
int advance, lsb, x0,y0,x1,y1;
- int codepoint = ranges[i].first_unicode_codepoint_in_range ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j];
+ int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j];
int glyph = stbtt_FindGlyphIndex(info, codepoint);
stbrp_coord pad = (stbrp_coord) spc->padding;
@@ -2969,6 +3007,7 @@ STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, unsigned char *fontd
if (rects == NULL)
return 0;
+ info.userdata = spc->user_allocator_context;
stbtt_InitFont(&info, fontdata, stbtt_GetFontOffsetForIndex(fontdata,font_index));
n = stbtt_PackFontRangesGatherRects(spc, &info, ranges, num_ranges, rects);
@@ -3186,6 +3225,12 @@ STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *font_collection, const
// FULL VERSION HISTORY
//
+// 1.11 (2016-04-02) fix unused-variable warning
+// 1.10 (2016-04-02) allow user-defined fabs() replacement
+// fix memory leak if fontsize=0.0
+// fix warning from duplicate typedef
+// 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use alloc userdata for PackFontRanges
+// 1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges
// 1.07 (2015-08-01) allow PackFontRanges to accept arrays of sparse codepoints;
// allow PackFontRanges to pack and render in separate phases;
// fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?);
diff --git a/3rdparty/bgfx/CONTRUBUTING.md b/3rdparty/bgfx/CONTRIBUTING.md
index e65eb715934..e6931eafcfb 100644
--- a/3rdparty/bgfx/CONTRUBUTING.md
+++ b/3rdparty/bgfx/CONTRIBUTING.md
@@ -4,6 +4,9 @@ Everyone is welcome to contribute to bgfx by submitting bug reports, testing on
different platforms, writing examples, improving documentation, profiling and
optimizing, helping newcomers, telling others about bgfx, etc.
+If you have just quick oneliner question it's prefereable to ask it at chat
+https://gitter.im/bkaradzic/bgfx instead opening new issue.
+
## Submitting bugs
Unless bug is trivial, and easy to explain and understand, the fastest way to
diff --git a/3rdparty/bgfx/README.md b/3rdparty/bgfx/README.md
index ca00102568c..9c163f9c644 100644
--- a/3rdparty/bgfx/README.md
+++ b/3rdparty/bgfx/README.md
@@ -1,6 +1,8 @@
[bgfx](https://github.com/bkaradzic/bgfx) - Cross-platform rendering library
============================================================================
+[![Join the chat at https://gitter.im/bkaradzic/bgfx](https://badges.gitter.im/bkaradzic/bgfx.svg)](https://gitter.im/bkaradzic/bgfx)
+
[![Build Status](https://travis-ci.org/bkaradzic/bgfx.svg?branch=master)](https://travis-ci.org/bkaradzic/bgfx)
[![Build status](https://ci.appveyor.com/api/projects/status/ipa3ojgeaet1oko5?svg=true)](https://ci.appveyor.com/project/bkaradzic/bgfx)
@@ -25,7 +27,7 @@ Supported rendering backends:
Supported HMD:
- * OculusVR (0.4.2+)
+ * OculusVR (1.3.0)
Supported platforms:
diff --git a/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp b/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
index e2e8a599a15..92996ae0314 100644
--- a/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
+++ b/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
@@ -7,7 +7,6 @@
#include "common.h"
#include "bgfx_utils.h"
#include "logo.h"
-#include "imgui/imgui.h"
class ExampleHelloWorld : public entry::AppI
{
@@ -29,111 +28,23 @@ class ExampleHelloWorld : public entry::AppI
// Set view 0 clear state.
bgfx::setViewClear(0
, BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH
- , 0x000000ff
+ , 0x303030ff
, 1.0f
, 0
);
- imguiCreate();
- ImGui::GetIO().FontGlobalScale = 1.5;
}
virtual int shutdown() BX_OVERRIDE
{
- // Cleanup.
- imguiDestroy();
-
// Shutdown bgfx.
bgfx::shutdown();
return 0;
}
- void displayMainMenu()
- {
- if (ImGui::BeginMainMenuBar())
- {
- if (ImGui::BeginMenu("Left"))
- {
- if (ImGui::MenuItem("Brief", "CTRL+1")) {}
- if (ImGui::MenuItem("Medium", "CTRL+2")) {}
- if (ImGui::MenuItem("Two columns", "CTRL+3")) {}
- if (ImGui::MenuItem("Full (name)", "CTRL+4")) {}
- if (ImGui::MenuItem("Full (size, time)", "CTRL+5")) {}
- if (ImGui::MenuItem("Full (access)", "CTRL+6")) {}
- ImGui::Separator();
- if (ImGui::BeginMenu("Sort mode"))
- {
- ImGui::MenuItem("Name");
- ImGui::MenuItem("Extension");
- ImGui::MenuItem("Modif. Time");
- ImGui::MenuItem("Size");
- ImGui::MenuItem("Unsorted");
- ImGui::EndMenu();
- }
- if (ImGui::MenuItem("Change source")) {}
- ImGui::EndMenu();
- }
- if (ImGui::BeginMenu("Files"))
- {
- if (ImGui::MenuItem("User menu", "F2")) {}
- if (ImGui::MenuItem("View", "F3")) {}
- if (ImGui::MenuItem("Edit", "F4")) {}
- if (ImGui::MenuItem("Copy", "F5")) {}
- if (ImGui::MenuItem("Rename or move", "F6")) {}
- if (ImGui::MenuItem("Make directory", "F7")) {}
- if (ImGui::MenuItem("Delete", "F8")) {}
- ImGui::Separator();
- if (ImGui::MenuItem("File attributes", "CTRL+A")) {}
- if (ImGui::MenuItem("Apply command", "CTRL+G")) {}
- ImGui::Separator();
- if (ImGui::MenuItem("Select group")) {}
- if (ImGui::MenuItem("Unselect group")) {}
- if (ImGui::MenuItem("Invert selection")) {}
- ImGui::EndMenu();
- }
- if (ImGui::BeginMenu("Commands"))
- {
- if (ImGui::MenuItem("Find file", "ALT+F7")) {}
- if (ImGui::MenuItem("History", "ALT+F8")) {}
- if (ImGui::MenuItem("Maximize window", "ALT+F9")) {}
- ImGui::Separator();
- if (ImGui::MenuItem("Panel on/off", "CTRL+O")) {}
- if (ImGui::MenuItem("Equal panels", "CTRL+=")) {}
- ImGui::EndMenu();
- }
- if (ImGui::BeginMenu("Options"))
- {
- if (ImGui::MenuItem("Settings")) {}
- ImGui::EndMenu();
- }
- if (ImGui::BeginMenu("Right"))
- {
- if (ImGui::MenuItem("Brief", "CTRL+1")) {}
- if (ImGui::MenuItem("Medium", "CTRL+2")) {}
- if (ImGui::MenuItem("Two columns", "CTRL+3")) {}
- if (ImGui::MenuItem("Full (name)", "CTRL+4")) {}
- if (ImGui::MenuItem("Full (size, time)", "CTRL+5")) {}
- if (ImGui::MenuItem("Full (access)", "CTRL+6")) {}
- ImGui::Separator();
- if (ImGui::BeginMenu("Sort mode"))
- {
- ImGui::MenuItem("Name");
- ImGui::MenuItem("Extension");
- ImGui::MenuItem("Modif. Time");
- ImGui::MenuItem("Size");
- ImGui::MenuItem("Unsorted");
- ImGui::EndMenu();
- }
- if (ImGui::MenuItem("Change source")) {}
- ImGui::EndMenu();
- }
- ImGui::EndMainMenuBar();
- }
- }
-
bool update() BX_OVERRIDE
{
- if (!entry::processEvents(m_width, m_height, m_debug, m_reset, &m_mouseState) )
+ if (!entry::processEvents(m_width, m_height, m_debug, m_reset) )
{
// Set view 0 default viewport.
bgfx::setViewRect(0, 0, 0, m_width, m_height);
@@ -142,91 +53,18 @@ class ExampleHelloWorld : public entry::AppI
// if no other draw calls are submitted to view 0.
bgfx::touch(0);
- imguiBeginFrame(m_mouseState.m_mx
- , m_mouseState.m_my
- , (m_mouseState.m_buttons[entry::MouseButton::Left] ? IMGUI_MBUT_LEFT : 0)
- | (m_mouseState.m_buttons[entry::MouseButton::Right] ? IMGUI_MBUT_RIGHT : 0)
- , m_mouseState.m_mz
- , m_width
- , m_height
- );
- displayMainMenu();
- ImGui::SetNextWindowPos(ImVec2(0, 32));
- ImGui::SetNextWindowSize(ImVec2(m_width/2, m_height - 32));
- if (ImGui::Begin("Window1", nullptr, ImVec2(m_width/2, m_height-32), 1.0f, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar))
- {
- ImGui::PushStyleVar(ImGuiStyleVar_ChildWindowRounding, 5.0f);
- ImGui::BeginChild("Sub1", ImVec2(0, m_height - 48), true);
-
-
- ImGui::Columns(4, "mycolumns");
- ImGui::Separator();
- ImGui::Text("ID"); ImGui::NextColumn();
- ImGui::Text("Name"); ImGui::NextColumn();
- ImGui::Text("Path"); ImGui::NextColumn();
- ImGui::Text("Flags"); ImGui::NextColumn();
- ImGui::Separator();
- const char* names[3] = { "One", "Two", "Three" };
- const char* paths[3] = { "/path/one", "/path/two", "/path/three" };
- static int selected = -1;
- for (int i = 0; i < 50; i++)
- {
- char label[32];
- sprintf(label, "%04d", i);
- if (ImGui::Selectable(label, selected == i, ImGuiSelectableFlags_SpanAllColumns))
- selected = i;
- ImGui::NextColumn();
- ImGui::Text(names[i%3]); ImGui::NextColumn();
- ImGui::Text(paths[i % 3]); ImGui::NextColumn();
- ImGui::Text("...."); ImGui::NextColumn();
- }
- ImGui::Columns(1);
- ImGui::Separator();
-
-
-
- ImGui::EndChild();
- ImGui::PopStyleVar();
- }
- ImGui::End();
- ImGui::SameLine();
- ImGui::SetNextWindowPos(ImVec2(m_width / 2, 32));
- ImGui::SetNextWindowSize(ImVec2(m_width / 2, m_height - 32));
- if (ImGui::Begin("Window2", nullptr, ImVec2(m_width/2, m_height - 32), 1.0f, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar))
- {
- ImGui::PushStyleVar(ImGuiStyleVar_ChildWindowRounding, 5.0f);
- ImGui::BeginChild("Sub2", ImVec2(0, m_height - 48), true);
-
- ImGui::Columns(4, "mycolumns");
- ImGui::Separator();
- ImGui::Text("ID"); ImGui::NextColumn();
- ImGui::Text("Name"); ImGui::NextColumn();
- ImGui::Text("Path"); ImGui::NextColumn();
- ImGui::Text("Flags"); ImGui::NextColumn();
- ImGui::Separator();
- const char* names[3] = { "One", "Two", "Three" };
- const char* paths[3] = { "/path/one", "/path/two", "/path/three" };
- static int selected = -1;
- for (int i = 0; i < 3; i++)
- {
- char label[32];
- sprintf(label, "%04d", i);
- if (ImGui::Selectable(label, selected == i, ImGuiSelectableFlags_SpanAllColumns))
- selected = i;
- ImGui::NextColumn();
- ImGui::Text(names[i]); ImGui::NextColumn();
- ImGui::Text(paths[i]); ImGui::NextColumn();
- ImGui::Text("...."); ImGui::NextColumn();
- }
- ImGui::Columns(1);
- ImGui::Separator();
-
-
- ImGui::EndChild();
- ImGui::PopStyleVar();
- }
- ImGui::End();
- imguiEndFrame();
+ // Use debug font to print information about this example.
+ bgfx::dbgTextClear();
+ bgfx::dbgTextImage(bx::uint16_max(m_width /2/8, 20)-20
+ , bx::uint16_max(m_height/2/16, 6)-6
+ , 40
+ , 12
+ , s_logo
+ , 160
+ );
+ bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/00-helloworld");
+ bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Initialization and debug text.");
+
// Advance to next frame. Rendering thread will be kicked to
// process submitted rendering primitives.
bgfx::frame();
@@ -241,7 +79,6 @@ class ExampleHelloWorld : public entry::AppI
uint32_t m_height;
uint32_t m_debug;
uint32_t m_reset;
- entry::MouseState m_mouseState;
};
ENTRY_IMPLEMENT_MAIN(ExampleHelloWorld);
diff --git a/3rdparty/bgfx/examples/01-cubes/cubes.cpp b/3rdparty/bgfx/examples/01-cubes/cubes.cpp
index bf88eb3f7f0..b0e580647ea 100644
--- a/3rdparty/bgfx/examples/01-cubes/cubes.cpp
+++ b/3rdparty/bgfx/examples/01-cubes/cubes.cpp
@@ -60,7 +60,7 @@ class ExampleCubes : public entry::AppI
void init(int _argc, char** _argv) BX_OVERRIDE
{
Args args(_argc, _argv);
-
+
m_width = 1280;
m_height = 720;
m_debug = BGFX_DEBUG_TEXT;
@@ -143,11 +143,7 @@ class ExampleCubes : public entry::AppI
{
float view[16];
bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye);
-
- float proj[16];
- bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f);
-
- bgfx::setViewTransform(0, view, proj);
+ bgfx::setViewTransform(0, view, hmd->eye[0].projection, BGFX_VIEW_STEREO, hmd->eye[1].projection);
// Set view 0 default viewport.
//
diff --git a/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp b/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp
index bedf55497eb..882b18b59b0 100644
--- a/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp
+++ b/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp
@@ -467,7 +467,7 @@ class ExampleMetaballs : public entry::AppI
void init(int _argc, char** _argv) BX_OVERRIDE
{
Args args(_argc, _argv);
-
+
m_width = 1280;
m_height = 720;
m_debug = BGFX_DEBUG_TEXT;
@@ -577,11 +577,7 @@ class ExampleMetaballs : public entry::AppI
{
float view[16];
bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye);
-
- float proj[16];
- bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f);
-
- bgfx::setViewTransform(0, view, proj);
+ bgfx::setViewTransform(0, view, hmd->eye[0].projection, BGFX_VIEW_STEREO, hmd->eye[1].projection);
// Set view 0 default viewport.
//
diff --git a/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp b/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp
index 60a4664546e..0e4a84c3dc9 100644
--- a/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp
+++ b/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp
@@ -107,7 +107,7 @@ class ExampleRaymarch : public entry::AppI
void init(int _argc, char** _argv) BX_OVERRIDE
{
Args args(_argc, _argv);
-
+
m_width = 1280;
m_height = 720;
m_debug = BGFX_DEBUG_TEXT;
@@ -127,18 +127,8 @@ class ExampleRaymarch : public entry::AppI
, 0
);
- // Setup root path for binary shaders. Shader binaries are different
- // for each renderer.
- switch (bgfx::getRendererType() )
- {
- default:
- break;
-
- case bgfx::RendererType::OpenGL:
- case bgfx::RendererType::OpenGLES:
- s_oglNdc = true;
- break;
- }
+ const bgfx::Caps* caps = bgfx::getCaps();
+ s_oglNdc = caps->homogeneousDepth;
// Create vertex stream declaration.
PosColorTexCoord0Vertex::init();
diff --git a/3rdparty/bgfx/examples/04-mesh/mesh.cpp b/3rdparty/bgfx/examples/04-mesh/mesh.cpp
index bfe61df6a3f..3ae361d9549 100644
--- a/3rdparty/bgfx/examples/04-mesh/mesh.cpp
+++ b/3rdparty/bgfx/examples/04-mesh/mesh.cpp
@@ -11,7 +11,7 @@ class ExampleMesh : public entry::AppI
void init(int _argc, char** _argv) BX_OVERRIDE
{
Args args(_argc, _argv);
-
+
m_width = 1280;
m_height = 720;
m_debug = BGFX_DEBUG_TEXT;
@@ -91,11 +91,7 @@ class ExampleMesh : public entry::AppI
{
float view[16];
bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye);
-
- float proj[16];
- bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f);
-
- bgfx::setViewTransform(0, view, proj);
+ bgfx::setViewTransform(0, view, hmd->eye[0].projection, BGFX_VIEW_STEREO, hmd->eye[1].projection);
// Set view 0 default viewport.
//
diff --git a/3rdparty/bgfx/examples/05-instancing/instancing.cpp b/3rdparty/bgfx/examples/05-instancing/instancing.cpp
index 6e854b20785..34268762948 100644
--- a/3rdparty/bgfx/examples/05-instancing/instancing.cpp
+++ b/3rdparty/bgfx/examples/05-instancing/instancing.cpp
@@ -160,11 +160,7 @@ class ExampleInstancing : public entry::AppI
{
float view[16];
bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye);
-
- float proj[16];
- bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f);
-
- bgfx::setViewTransform(0, view, proj);
+ bgfx::setViewTransform(0, view, hmd->eye[0].projection, BGFX_VIEW_STEREO, hmd->eye[1].projection);
// Set view 0 default viewport.
//
diff --git a/3rdparty/bgfx/examples/06-bump/bump.cpp b/3rdparty/bgfx/examples/06-bump/bump.cpp
index bc5f9e74b7e..71e06c8d99a 100644
--- a/3rdparty/bgfx/examples/06-bump/bump.cpp
+++ b/3rdparty/bgfx/examples/06-bump/bump.cpp
@@ -108,7 +108,7 @@ class ExampleBump : public entry::AppI
void init(int _argc, char** _argv) BX_OVERRIDE
{
Args args(_argc, _argv);
-
+
m_width = 1280;
m_height = 720;
m_debug = BGFX_DEBUG_TEXT;
@@ -225,11 +225,7 @@ class ExampleBump : public entry::AppI
{
float view[16];
bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye);
-
- float proj[16];
- bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f);
-
- bgfx::setViewTransform(0, view, proj);
+ bgfx::setViewTransform(0, view, hmd->eye[0].projection, BGFX_VIEW_STEREO, hmd->eye[1].projection);
// Set view 0 default viewport.
//
diff --git a/3rdparty/bgfx/examples/09-hdr/hdr.cpp b/3rdparty/bgfx/examples/09-hdr/hdr.cpp
index bee42aed2bf..dfe6f7dd390 100644
--- a/3rdparty/bgfx/examples/09-hdr/hdr.cpp
+++ b/3rdparty/bgfx/examples/09-hdr/hdr.cpp
@@ -8,7 +8,6 @@
#include "imgui/imgui.h"
static float s_texelHalf = 0.0f;
-static bool s_originBottomLeft = false;
struct PosColorTexCoord0Vertex
{
@@ -230,9 +229,8 @@ class ExampleHDR : public entry::AppI
// Imgui.
imguiCreate();
- const bgfx::RendererType::Enum renderer = bgfx::getRendererType();
- s_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f;
- s_originBottomLeft = bgfx::RendererType::OpenGL == renderer || bgfx::RendererType::OpenGLES == renderer;
+ m_caps = bgfx::getCaps();
+ s_texelHalf = bgfx::RendererType::Direct3D9 == m_caps->rendererType ? 0.5f : 0.0f;
m_oldWidth = 0;
m_oldHeight = 0;
@@ -441,35 +439,35 @@ class ExampleHDR : public entry::AppI
setOffsets2x2Lum(u_offset, 128, 128);
bgfx::setTexture(0, s_texColor, m_fbtextures[0]);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
- screenSpaceQuad(128.0f, 128.0f, s_originBottomLeft);
+ screenSpaceQuad(128.0f, 128.0f, m_caps->originBottomLeft);
bgfx::submit(2, m_lumProgram);
// Downscale luminance 0.
setOffsets4x4Lum(u_offset, 128, 128);
bgfx::setTexture(0, s_texColor, m_lum[0]);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
- screenSpaceQuad(64.0f, 64.0f, s_originBottomLeft);
+ screenSpaceQuad(64.0f, 64.0f, m_caps->originBottomLeft);
bgfx::submit(3, m_lumAvgProgram);
// Downscale luminance 1.
setOffsets4x4Lum(u_offset, 64, 64);
bgfx::setTexture(0, s_texColor, m_lum[1]);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
- screenSpaceQuad(16.0f, 16.0f, s_originBottomLeft);
+ screenSpaceQuad(16.0f, 16.0f, m_caps->originBottomLeft);
bgfx::submit(4, m_lumAvgProgram);
// Downscale luminance 2.
setOffsets4x4Lum(u_offset, 16, 16);
bgfx::setTexture(0, s_texColor, m_lum[2]);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
- screenSpaceQuad(4.0f, 4.0f, s_originBottomLeft);
+ screenSpaceQuad(4.0f, 4.0f, m_caps->originBottomLeft);
bgfx::submit(5, m_lumAvgProgram);
// Downscale luminance 3.
setOffsets4x4Lum(u_offset, 4, 4);
bgfx::setTexture(0, s_texColor, m_lum[3]);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
- screenSpaceQuad(1.0f, 1.0f, s_originBottomLeft);
+ screenSpaceQuad(1.0f, 1.0f, m_caps->originBottomLeft);
bgfx::submit(6, m_lumAvgProgram);
float tonemap[4] = { m_middleGray, square(m_white), m_threshold, m_time };
@@ -480,13 +478,13 @@ class ExampleHDR : public entry::AppI
bgfx::setTexture(0, s_texColor, m_fbtextures[0]);
bgfx::setTexture(1, s_texLum, m_lum[4]);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
- screenSpaceQuad( (float)m_width/2.0f, (float)m_height/2.0f, s_originBottomLeft);
+ screenSpaceQuad( (float)m_width/2.0f, (float)m_height/2.0f, m_caps->originBottomLeft);
bgfx::submit(7, m_brightProgram);
// m_blur m_bright pass vertically.
bgfx::setTexture(0, s_texColor, m_bright);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
- screenSpaceQuad( (float)m_width/8.0f, (float)m_height/8.0f, s_originBottomLeft);
+ screenSpaceQuad( (float)m_width/8.0f, (float)m_height/8.0f, m_caps->originBottomLeft);
bgfx::submit(8, m_blurProgram);
// m_blur m_bright pass horizontally, do tonemaping and combine.
@@ -494,7 +492,7 @@ class ExampleHDR : public entry::AppI
bgfx::setTexture(1, s_texLum, m_lum[4]);
bgfx::setTexture(2, s_texBlur, m_blur);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
- screenSpaceQuad( (float)m_width, (float)m_height, s_originBottomLeft);
+ screenSpaceQuad( (float)m_width, (float)m_height, m_caps->originBottomLeft);
bgfx::submit(9, m_tonemapProgram);
if (bgfx::isValid(m_rb) )
@@ -558,6 +556,7 @@ class ExampleHDR : public entry::AppI
int32_t m_scrollArea;
+ const bgfx::Caps* m_caps;
float m_time;
};
diff --git a/3rdparty/bgfx/examples/12-lod/lod.cpp b/3rdparty/bgfx/examples/12-lod/lod.cpp
index ef37d254c11..7e79c36b28f 100644
--- a/3rdparty/bgfx/examples/12-lod/lod.cpp
+++ b/3rdparty/bgfx/examples/12-lod/lod.cpp
@@ -174,11 +174,7 @@ class ExampleLod : public entry::AppI
{
float view[16];
bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye);
-
- float proj[16];
- bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f);
-
- bgfx::setViewTransform(0, view, proj);
+ bgfx::setViewTransform(0, view, hmd->eye[0].projection, BGFX_VIEW_STEREO, hmd->eye[1].projection);
// Set view 0 default viewport.
//
diff --git a/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp b/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp
index fbdc8804b02..093b168d42f 100644
--- a/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp
+++ b/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp
@@ -1866,22 +1866,9 @@ int _main_(int _argc, char** _argv)
// Enable debug text.
bgfx::setDebug(debug);
- // Setup root path for binary shaders. Shader binaries are different
- // for each renderer.
- switch (bgfx::getRendererType() )
- {
- case bgfx::RendererType::Direct3D9:
- s_texelHalf = 0.5f;
- break;
-
- case bgfx::RendererType::OpenGL:
- case bgfx::RendererType::OpenGLES:
- s_oglNdc = true;
- break;
-
- default:
- break;
- }
+ const bgfx::Caps* caps = bgfx::getCaps();
+ s_oglNdc = caps->homogeneousDepth;
+ s_texelHalf = bgfx::RendererType::Direct3D9 == caps->rendererType ? 0.5f : 0.0f;
// Imgui
imguiCreate();
diff --git a/3rdparty/bgfx/examples/21-deferred/deferred.cpp b/3rdparty/bgfx/examples/21-deferred/deferred.cpp
index 2f8fb5d3816..fbf5c546022 100644
--- a/3rdparty/bgfx/examples/21-deferred/deferred.cpp
+++ b/3rdparty/bgfx/examples/21-deferred/deferred.cpp
@@ -16,7 +16,6 @@
#define RENDER_PASS_DEBUG_GBUFFER_ID 4
static float s_texelHalf = 0.0f;
-static bool s_originBottomLeft = false;
struct PosNormalTangentTexcoordVertex
{
@@ -218,7 +217,7 @@ class ExampleDeferred : public entry::AppI
void init(int _argc, char** _argv) BX_OVERRIDE
{
Args args(_argc, _argv);
-
+
m_width = 1280;
m_height = 720;
m_debug = BGFX_DEBUG_TEXT;
@@ -311,7 +310,6 @@ class ExampleDeferred : public entry::AppI
m_timeOffset = bx::getHPCounter();
const bgfx::RendererType::Enum renderer = bgfx::getRendererType();
s_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f;
- s_originBottomLeft = bgfx::RendererType::OpenGL == renderer || bgfx::RendererType::OpenGLES == renderer;
// Get renderer capabilities info.
m_caps = bgfx::getCaps();
@@ -501,7 +499,7 @@ class ExampleDeferred : public entry::AppI
bgfx::setViewFrameBuffer(RENDER_PASS_LIGHT_ID, m_lightBuffer);
float proj[16];
- bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f, s_originBottomLeft);
+ bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f, m_caps->homogeneousDepth);
bgfx::setViewFrameBuffer(RENDER_PASS_GEOMETRY_ID, m_gbuffer);
bgfx::setViewTransform(RENDER_PASS_GEOMETRY_ID, view, proj);
@@ -695,7 +693,7 @@ class ExampleDeferred : public entry::AppI
| BGFX_STATE_ALPHA_WRITE
| BGFX_STATE_BLEND_ADD
);
- screenSpaceQuad( (float)m_width, (float)m_height, s_texelHalf, s_originBottomLeft);
+ screenSpaceQuad( (float)m_width, (float)m_height, s_texelHalf, m_caps->originBottomLeft);
bgfx::submit(RENDER_PASS_LIGHT_ID, m_lightProgram);
}
}
@@ -707,7 +705,7 @@ class ExampleDeferred : public entry::AppI
| BGFX_STATE_RGB_WRITE
| BGFX_STATE_ALPHA_WRITE
);
- screenSpaceQuad( (float)m_width, (float)m_height, s_texelHalf, s_originBottomLeft);
+ screenSpaceQuad( (float)m_width, (float)m_height, s_texelHalf, m_caps->originBottomLeft);
bgfx::submit(RENDER_PASS_COMBINE_ID, m_combineProgram);
if (m_showGBuffer)
diff --git a/3rdparty/bgfx/examples/21-deferred/fs_deferred_light.sc b/3rdparty/bgfx/examples/21-deferred/fs_deferred_light.sc
index 378f1eded71..81f9ad25984 100644
--- a/3rdparty/bgfx/examples/21-deferred/fs_deferred_light.sc
+++ b/3rdparty/bgfx/examples/21-deferred/fs_deferred_light.sc
@@ -72,7 +72,7 @@ vec3 clipToWorld(mat4 _invViewProj, vec3 _clipPos)
void main()
{
vec3 normal = decodeNormalUint(texture2D(s_normal, v_texcoord0).xyz);
- float deviceDepth = texture2D(s_depth, v_texcoord0).x;
+ float deviceDepth = texture2D(s_depth, v_texcoord0).x;
float depth = toClipSpaceDepth(deviceDepth);
vec3 clip = vec3(v_texcoord0 * 2.0 - 1.0, depth);
diff --git a/3rdparty/bgfx/examples/24-nbody/nbody.cpp b/3rdparty/bgfx/examples/24-nbody/nbody.cpp
index 79f722f962e..636d8f52500 100644
--- a/3rdparty/bgfx/examples/24-nbody/nbody.cpp
+++ b/3rdparty/bgfx/examples/24-nbody/nbody.cpp
@@ -305,11 +305,7 @@ int _main_(int _argc, char** _argv)
float tmp[16];
bx::mtxMul(tmp, view, viewHead);
-
- float proj[16];
- bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 10000.0f);
-
- bgfx::setViewTransform(0, tmp, proj);
+ bgfx::setViewTransform(0, tmp, hmd->eye[0].projection, BGFX_VIEW_STEREO, hmd->eye[1].projection);
// Set view 0 default viewport.
//
diff --git a/3rdparty/bgfx/examples/26-occlusion/occlusion.cpp b/3rdparty/bgfx/examples/26-occlusion/occlusion.cpp
index 81e00f0c5fe..8f03686ede1 100644
--- a/3rdparty/bgfx/examples/26-occlusion/occlusion.cpp
+++ b/3rdparty/bgfx/examples/26-occlusion/occlusion.cpp
@@ -181,13 +181,10 @@ class ExampleOcclusion : public entry::AppI
float tmp[16];
bx::mtxMul(tmp, view, viewHead);
- float proj[16];
- bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 10000.0f);
-
- bgfx::setViewTransform(0, tmp, proj);
+ bgfx::setViewTransform(0, tmp, hmd->eye[0].projection);
bgfx::setViewRect(0, 0, 0, hmd->width, hmd->height);
- bgfx::setViewTransform(1, tmp, proj);
+ bgfx::setViewTransform(1, tmp, hmd->eye[1].projection);
bgfx::setViewRect(1, 0, 0, hmd->width, hmd->height);
}
else
diff --git a/3rdparty/bgfx/examples/27-terrain/terrain.cpp b/3rdparty/bgfx/examples/27-terrain/terrain.cpp
index 74d88ac350d..0f50be2d4b3 100644
--- a/3rdparty/bgfx/examples/27-terrain/terrain.cpp
+++ b/3rdparty/bgfx/examples/27-terrain/terrain.cpp
@@ -12,8 +12,6 @@
#include <bx/debug.h>
#include <bx/fpumath.h>
-static float s_texelHalf = 0.0f;
-static bool s_originBottomLeft = false;
static uint32_t s_terrainSize = 256;
struct PosTexCoord0Vertex
@@ -94,9 +92,6 @@ class ExampleTerrain : public entry::AppI
imguiCreate();
m_timeOffset = bx::getHPCounter();
- const bgfx::RendererType::Enum renderer = bgfx::getRendererType();
- s_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f;
- s_originBottomLeft = bgfx::RendererType::OpenGL == renderer || bgfx::RendererType::OpenGLES == renderer;
m_vbh.idx = bgfx::invalidHandle;
m_ibh.idx = bgfx::invalidHandle;
@@ -463,7 +458,7 @@ class ExampleTerrain : public entry::AppI
bgfx::setViewRect(0, 0, 0, m_width, m_height);
cameraGetViewMtx(m_viewMtx);
- bx::mtxProj(m_projMtx, 60.0f, float(m_width) / float(m_height), 0.1f, 2000.0f, s_originBottomLeft);
+ bx::mtxProj(m_projMtx, 60.0f, float(m_width) / float(m_height), 0.1f, 2000.0f);
bgfx::setViewTransform(0, m_viewMtx, m_projMtx);
bgfx::setTransform(m_terrain.m_transform);
diff --git a/3rdparty/bgfx/examples/29-debugdraw/debugdraw.cpp b/3rdparty/bgfx/examples/29-debugdraw/debugdraw.cpp
index 4d467b95e61..f0950a205d5 100644
--- a/3rdparty/bgfx/examples/29-debugdraw/debugdraw.cpp
+++ b/3rdparty/bgfx/examples/29-debugdraw/debugdraw.cpp
@@ -65,9 +65,6 @@ class DebugDrawApp : public entry::AppI
{
if (!entry::processEvents(m_width, m_height, m_debug, m_reset, &m_mouseState) )
{
- // Set view 0 default viewport.
- bgfx::setViewRect(0, 0, 0, m_width, m_height);
-
int64_t now = bx::getHPCounter() - m_timeOffset;
static int64_t last = now;
const int64_t frameTime = now - last;
@@ -89,9 +86,24 @@ class DebugDrawApp : public entry::AppI
cameraGetViewMtx(view);
float proj[16];
- bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f);
- bgfx::setViewTransform(0, view, proj);
+ // Set view and projection matrix for view 0.
+ const bgfx::HMD* hmd = bgfx::getHMD();
+ if (NULL != hmd && 0 != (hmd->flags & BGFX_HMD_RENDERING) )
+ {
+ float eye[3];
+ cameraGetPosition(eye);
+ bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye);
+ bgfx::setViewTransform(0, view, hmd->eye[0].projection, BGFX_VIEW_STEREO, hmd->eye[1].projection);
+ bgfx::setViewRect(0, 0, 0, hmd->width, hmd->height);
+ }
+ else
+ {
+ bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f);
+
+ bgfx::setViewTransform(0, view, proj);
+ bgfx::setViewRect(0, 0, 0, m_width, m_height);
+ }
float zero[3] = {};
@@ -174,6 +186,21 @@ class DebugDrawApp : public entry::AppI
ddDrawCircle(Axis::Z, -8.0f, 0.0f, 0.0f, 1.25f, 2.0f);
ddPop();
+ ddPush();
+ ddSetLod(UINT8_MAX);
+ {
+ float from[3] = { -11.0f, 4.0f, 0.0f };
+ float to[3] = { -13.0f, 6.0f, 1.0f };
+ ddDrawCone(from, to, 1.0f );
+ }
+
+ {
+ float from[3] = { -9.0f, 2.0f, -1.0f };
+ float to[3] = { -11.0f, 4.0f, 0.0f };
+ ddDrawCylinder(from, to, 0.5f );
+ }
+ ddPop();
+
ddDrawOrb(-11.0f, 0.0f, 0.0f, 1.0f);
ddEnd();
diff --git a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp
index 87bc1e6530a..f02e4d6523d 100644
--- a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp
+++ b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp
@@ -1018,6 +1018,132 @@ struct DebugDraw
close();
}
+ void drawCone(const float* _from, const float* _to, float _radius, float _weight = 0.0f)
+ {
+ const Attrib& attrib = m_attrib[m_stack];
+ const uint32_t num = getCircleLod(attrib.m_lod);
+ const float step = bx::pi * 2.0f / num;
+ _weight = bx::fclamp(_weight, 0.0f, 2.0f);
+
+ float pos[3];
+ float tmp0[3];
+ float tmp1[3];
+
+ bx::vec3Sub(tmp0, _from, _to);
+
+ Plane plane;
+ plane.m_dist = 0.0f;
+ bx::vec3Norm(plane.m_normal, tmp0);
+
+ float udir[3];
+ float vdir[3];
+ calcPlaneUv(plane, udir, vdir);
+
+ float xy0[2];
+ float xy1[2];
+ circle(xy0, 0.0f);
+ squircle(xy1, 0.0f);
+
+ bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius);
+ bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius);
+ bx::vec3Add(tmp1, pos, tmp0);
+ bx::vec3Add(pos, tmp1, _from);
+ moveTo(pos);
+
+ for (uint32_t ii = 1; ii < num; ++ii)
+ {
+ float angle = step * ii;
+ circle(xy0, angle);
+ squircle(xy1, angle);
+
+ bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius);
+ bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius);
+ bx::vec3Add(tmp1, pos, tmp0);
+ bx::vec3Add(pos, tmp1, _from);
+ lineTo(pos);
+ }
+
+ close();
+
+ for (uint32_t ii = 0; ii < num; ++ii)
+ {
+ float angle = step * ii;
+ circle(xy0, angle);
+ squircle(xy1, angle);
+
+ bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius);
+ bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius);
+ bx::vec3Add(tmp1, pos, tmp0);
+ bx::vec3Add(pos, tmp1, _from);
+ moveTo(pos);
+ lineTo(_to);
+ }
+ }
+
+ void drawCone(const void* _from, const void* _to, float _radius, float _weight = 0.0f)
+ {
+ drawCone( (const float*)_from, (const float*)_to, _radius, _weight);
+ }
+
+ void drawCylinder(const float* _from, const float* _to, float _radius, float _weight = 0.0f)
+ {
+ const Attrib& attrib = m_attrib[m_stack];
+ const uint32_t num = getCircleLod(attrib.m_lod);
+ const float step = bx::pi * 2.0f / num;
+ _weight = bx::fclamp(_weight, 0.0f, 2.0f);
+
+ float pos[3];
+ float tmp0[3];
+ float tmp1[3];
+
+ bx::vec3Sub(tmp0, _from, _to);
+
+ Plane plane;
+ plane.m_dist = 0.0f;
+ bx::vec3Norm(plane.m_normal, tmp0);
+
+ float udir[3];
+ float vdir[3];
+ calcPlaneUv(plane, udir, vdir);
+
+ float xy0[2];
+ float xy1[2];
+ circle(xy0, 0.0f);
+ squircle(xy1, 0.0f);
+
+ float pos1[3];
+ bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius);
+ bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius);
+ bx::vec3Add(tmp1, pos, tmp0);
+ bx::vec3Add(pos, tmp1, _from);
+ bx::vec3Add(pos1, tmp1, _to);
+
+ for (uint32_t ii = 1; ii < num+1; ++ii)
+ {
+ float angle = step * ii;
+ circle(xy0, angle);
+ squircle(xy1, angle);
+
+ moveTo(pos); lineTo(pos1);
+
+ moveTo(pos);
+ bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius);
+ bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius);
+ bx::vec3Add(tmp1, pos, tmp0);
+ bx::vec3Add(pos, tmp1, _from);
+ lineTo(pos);
+
+ moveTo(pos1);
+ bx::vec3Add(pos1, tmp1, _to);
+ lineTo(pos1);
+ }
+ }
+
+ void drawCylinder(const void* _from, const void* _to, float _radius, float _weight = 0.0f)
+ {
+ drawCylinder( (const float*)_from, (const float*)_to, _radius, _weight);
+ }
+
void drawAxis(float _x, float _y, float _z, float _len, Axis::Enum _highlight)
{
push();
@@ -1271,18 +1397,19 @@ private:
bgfx::allocTransientIndexBuffer(&tib, m_indexPos);
memcpy(tib.data, m_indices, m_indexPos * sizeof(uint16_t) );
+ const Attrib& attrib = m_attrib[m_stack];
+
bgfx::setVertexBuffer(&tvb);
bgfx::setIndexBuffer(&tib);
bgfx::setState(0
| BGFX_STATE_RGB_WRITE
| BGFX_STATE_PT_LINES
- | (m_depthTestLess ? BGFX_STATE_DEPTH_TEST_LEQUAL : BGFX_STATE_DEPTH_TEST_GEQUAL)
- | BGFX_STATE_DEPTH_WRITE
+ | attrib.m_state
| BGFX_STATE_LINEAA
| BGFX_STATE_BLEND_ALPHA
);
bgfx::setTransform(m_mtx);
- bgfx::ProgramHandle program = m_program[m_attrib[m_stack].m_stipple ? 1 : 0];
+ bgfx::ProgramHandle program = m_program[attrib.m_stipple ? 1 : 0];
bgfx::submit(m_viewId, program);
}
@@ -1481,6 +1608,16 @@ void ddDrawCircle(Axis::Enum _axis, float _x, float _y, float _z, float _radius,
s_dd.drawCircle(_axis, _x, _y, _z, _radius, _weight);
}
+void ddDrawCone(const void* _from, const void* _to, float _radius, float _weight)
+{
+ s_dd.drawCone(_from, _to, _radius, _weight);
+}
+
+void ddDrawCylinder(const void* _from, const void* _to, float _radius, float _weight)
+{
+ s_dd.drawCylinder(_from, _to, _radius, _weight);
+}
+
void ddDrawAxis(float _x, float _y, float _z, float _len, Axis::Enum _hightlight)
{
s_dd.drawAxis(_x, _y, _z, _len, _hightlight);
diff --git a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h
index a318132e94f..0888ffdae61 100644
--- a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h
+++ b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h
@@ -103,6 +103,12 @@ void ddDrawCircle(const void* _normal, const void* _center, float _radius, float
void ddDrawCircle(Axis::Enum _axis, float _x, float _y, float _z, float _radius, float _weight = 0.0f);
///
+void ddDrawCone(const void* _from, const void* _to, float _radius, float _weight = 0.0f);
+
+///
+void ddDrawCylinder(const void* _from, const void* _to, float _radius, float _weight = 0.0f);
+
+///
void ddDrawAxis(float _x, float _y, float _z, float _len = 1.0f, Axis::Enum _highlight = Axis::Count);
///
diff --git a/3rdparty/bgfx/examples/common/entry/entry_p.h b/3rdparty/bgfx/examples/common/entry/entry_p.h
index f44a421946a..971b880552d 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_p.h
+++ b/3rdparty/bgfx/examples/common/entry/entry_p.h
@@ -14,7 +14,7 @@
#include <string.h> // memcpy
#ifndef ENTRY_CONFIG_USE_NOOP
-# define ENTRY_CONFIG_USE_NOOP (BX_PLATFORM_QNX || BX_PLATFORM_XBOXONE)
+# define ENTRY_CONFIG_USE_NOOP (BX_PLATFORM_QNX)
#endif // ENTRY_CONFIG_USE_NOOP
#ifndef ENTRY_CONFIG_USE_SDL
diff --git a/3rdparty/bgfx/examples/common/entry/entry_winrt.cpp b/3rdparty/bgfx/examples/common/entry/entry_winrt.cpp
index caf4f235ad2..9edbc36e92a 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_winrt.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry_winrt.cpp
@@ -5,7 +5,7 @@
#include "entry_p.h"
-#if BX_PLATFORM_WINRT
+#if BX_PLATFORM_WINRT || BX_PLATFORM_XBOXONE
#include <bgfx/bgfxplatform.h>
#include <bx/thread.h>
@@ -17,7 +17,9 @@ using namespace Windows::UI::Core;
using namespace Windows::UI::Input;
using namespace Windows::System;
using namespace Windows::Foundation;
+#if BX_PLATFORM_WINRT
using namespace Windows::Graphics::Display;
+#endif // BX_PLATFORM_WINRT
using namespace Platform;
static char* g_emptyArgs[] = { "" };
@@ -36,13 +38,23 @@ public:
// IFrameworkView Methods.
virtual void Initialize(CoreApplicationView^ applicationView)
{
- applicationView->Activated += ref new TypedEventHandler<CoreApplicationView^, IActivatedEventArgs^>(this, &App::OnActivated);
+ applicationView->Activated += ref new
+ TypedEventHandler<CoreApplicationView^, IActivatedEventArgs^>(this, &App::OnActivated);
+
+ CoreApplication::Suspending += ref new
+ EventHandler<SuspendingEventArgs^>(this, &App::OnSuspending);
+
+ CoreApplication::Resuming += ref new
+ EventHandler<Platform::Object^>(this, &App::OnResuming);
}
virtual void SetWindow(CoreWindow^ window)
{
- window->VisibilityChanged += ref new TypedEventHandler<CoreWindow^, VisibilityChangedEventArgs^>(this, &App::OnVisibilityChanged);
- window->Closed += ref new TypedEventHandler<CoreWindow^, CoreWindowEventArgs^>(this, &App::OnWindowClosed);
+ window->VisibilityChanged += ref new
+ TypedEventHandler<CoreWindow^, VisibilityChangedEventArgs^>(this, &App::OnVisibilityChanged);
+
+ window->Closed += ref new
+ TypedEventHandler<CoreWindow^, CoreWindowEventArgs^>(this, &App::OnWindowClosed);
bgfx::winrtSetWindow(reinterpret_cast<IUnknown*>(window) );
}
@@ -58,13 +70,15 @@ public:
CoreWindow^ window = CoreWindow::GetForCurrentThread();
auto bounds = window->Bounds;
- auto dpi = DisplayInformation::GetForCurrentView()->LogicalDpi;
+#if BX_PLATFORM_WINRT
+ auto dpi = DisplayInformation::GetForCurrentView()->LogicalDpi;
static const float dipsPerInch = 96.0f;
g_eventQueue.postSizeEvent(g_defaultWindow
- , lround(floorf(bounds.Width * dpi / dipsPerInch + 0.5f) )
- , lround(floorf(bounds.Height * dpi / dipsPerInch + 0.5f) )
+ , lround(bx::ffloor(bounds.Width * dpi / dipsPerInch + 0.5f) )
+ , lround(bx::ffloor(bounds.Height * dpi / dipsPerInch + 0.5f) )
);
+#endif // BX_PLATFORM_WINRT
while (!m_windowClosed)
{
@@ -101,6 +115,16 @@ private:
m_windowVisible = args->Visible;
}
+ void OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ args)
+ {
+ SuspendingDeferral^ deferral = args->SuspendingOperation->GetDeferral();
+ BX_UNUSED(deferral);
+ }
+
+ void OnResuming(Platform::Object^ sender, Platform::Object^ args)
+ {
+ }
+
void OnWindowClosed(CoreWindow^ sender, CoreWindowEventArgs^ args)
{
m_windowClosed = true;
@@ -189,4 +213,4 @@ int main(Array<String^>^)
return 0;
}
-#endif // BX_PLATFORM_WINRT
+#endif // BX_PLATFORM_WINRT || BX_PLATFORM_XBOXONE
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_indirect.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_indirect.bin
index 9a0b306fb00..2004cc3d3ea 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_indirect.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_indirect.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_init_instances.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_init_instances.bin
index bd4bd9b6086..19265eb8f1d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_init_instances.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_init_instances.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_update_instances.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_update_instances.bin
index 3b695029314..5686edfa68b 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_update_instances.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/cs_update_instances.bin
Binary files differ
diff --git a/3rdparty/bgfx/include/bgfx/bgfx.h b/3rdparty/bgfx/include/bgfx/bgfx.h
index 28c232d5c7d..37d0538e342 100644
--- a/3rdparty/bgfx/include/bgfx/bgfx.h
+++ b/3rdparty/bgfx/include/bgfx/bgfx.h
@@ -499,6 +499,8 @@ namespace bgfx
uint8_t numGPUs; //!< Number of enumerated GPUs.
uint16_t vendorId; //!< Selected GPU vendor id.
uint16_t deviceId; //!< Selected GPU device id.
+ bool homogeneousDepth; //!< True when NDC depth is in [-1, 1] range.
+ bool originBottomLeft; //!< True when NDC origin is at bottom left.
/// GPU info.
///
@@ -613,6 +615,7 @@ namespace bgfx
float translation[3]; //!< Eye translation.
float fov[4]; //!< Field of view (up, down, left, right).
float viewOffset[3]; //!< Eye view matrix translation adjustment.
+ float projection[16]; //!< Eye projection matrix
float pixelsPerTanAngle[2]; //!<
};
@@ -1912,7 +1915,7 @@ namespace bgfx
///
void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height);
- /// @attention C99 equivalent is `bgfx_set_view_rect_auto`.
+ /// @attention C99 equivalent is `bgfx_set_view_rect_auto`.
///
void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, BackbufferRatio::Enum _ratio);
@@ -2162,7 +2165,8 @@ namespace bgfx
///
/// @param[in] _handle Uniform.
/// @param[in] _value Pointer to uniform data.
- /// @param[in] _num Number of elements.
+ /// @param[in] _num Number of elements. Passing `UINT16_MAX` will
+ /// use the _num passed on uniform creation.
///
/// @attention C99 equivalent is `bgfx_set_uniform`.
///
diff --git a/3rdparty/bgfx/include/bgfx/c99/bgfx.h b/3rdparty/bgfx/include/bgfx/c99/bgfx.h
index 736ac51f132..92793335336 100644
--- a/3rdparty/bgfx/include/bgfx/c99/bgfx.h
+++ b/3rdparty/bgfx/include/bgfx/c99/bgfx.h
@@ -393,6 +393,8 @@ typedef struct bgfx_caps
uint16_t maxViews;
uint8_t maxFBAttachments;
uint8_t numGPUs;
+ bool homogeneousDepth;
+ bool originBottomLeft;
uint16_t vendorId;
uint16_t deviceId;
diff --git a/3rdparty/bgfx/scripts/bgfx.lua b/3rdparty/bgfx/scripts/bgfx.lua
index 97ec723ddba..76d6b70258a 100644
--- a/3rdparty/bgfx/scripts/bgfx.lua
+++ b/3rdparty/bgfx/scripts/bgfx.lua
@@ -51,11 +51,23 @@ function bgfxProject(_name, _kind, _defines)
if _OPTIONS["with-ovr"] then
defines {
+-- "BGFX_CONFIG_MULTITHREADED=0",
"BGFX_CONFIG_USE_OVR=1",
}
includedirs {
"$(OVR_DIR)/LibOVR/Include",
}
+
+ configuration { "x32" }
+ libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/Win32/Release", _ACTION) }
+
+ configuration { "x64" }
+ libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/x64/Release", _ACTION) }
+
+ configuration { "x32 or x64" }
+ links { "libovr" }
+
+ configuration {}
end
configuration { "Debug" }
diff --git a/3rdparty/bgfx/scripts/genie.lua b/3rdparty/bgfx/scripts/genie.lua
index 5ae3b4f73f1..3cf7e9b4b76 100644
--- a/3rdparty/bgfx/scripts/genie.lua
+++ b/3rdparty/bgfx/scripts/genie.lua
@@ -173,47 +173,14 @@ function exampleProject(_name)
end
if _OPTIONS["with-ovr"] then
- links {
- "winmm",
- "ws2_32",
- }
-
- -- Check for LibOVR 5.0+
- if os.isdir(path.join(os.getenv("OVR_DIR"), "LibOVR/Lib/Windows/Win32/Debug/VS2012")) then
-
- configuration { "x32", "Debug" }
- libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/Win32/Debug", _ACTION) }
-
- configuration { "x32", "Release" }
- libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/Win32/Release", _ACTION) }
-
- configuration { "x64", "Debug" }
- libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/x64/Debug", _ACTION) }
-
- configuration { "x64", "Release" }
- libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/x64/Release", _ACTION) }
+ configuration { "x32" }
+ libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/Win32/Release", _ACTION) }
- configuration { "x32 or x64" }
- links { "libovr" }
- else
- configuration { "x32" }
- libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Win32", _ACTION) }
+ configuration { "x64" }
+ libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/x64/Release", _ACTION) }
- configuration { "x64" }
- libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/x64", _ACTION) }
-
- configuration { "x32", "Debug" }
- links { "libovrd" }
-
- configuration { "x32", "Release" }
- links { "libovr" }
-
- configuration { "x64", "Debug" }
- links { "libovr64d" }
-
- configuration { "x64", "Release" }
- links { "libovr64" }
- end
+ configuration { "x32 or x64" }
+ links { "libovr" }
configuration {}
end
diff --git a/3rdparty/bgfx/scripts/texturec.lua b/3rdparty/bgfx/scripts/texturec.lua
index dac357b6b86..28e9bcc8bd4 100644
--- a/3rdparty/bgfx/scripts/texturec.lua
+++ b/3rdparty/bgfx/scripts/texturec.lua
@@ -13,6 +13,7 @@ project "texturec"
path.join(BGFX_DIR, "src"),
path.join(BGFX_DIR, "3rdparty"),
path.join(BGFX_DIR, "3rdparty/nvtt"),
+ path.join(BGFX_DIR, "3rdparty/iqa/include"),
}
files {
@@ -31,6 +32,8 @@ project "texturec"
path.join(BGFX_DIR, "3rdparty/pvrtc/**.h"),
path.join(BGFX_DIR, "3rdparty/tinyexr/**.cc"),
path.join(BGFX_DIR, "3rdparty/tinyexr/**.h"),
+ path.join(BGFX_DIR, "3rdparty/iqa/include/**.h"),
+ path.join(BGFX_DIR, "3rdparty/iqa/source/**.c"),
path.join(BGFX_DIR, "tools/texturec/**.cpp"),
path.join(BGFX_DIR, "tools/texturec/**.h"),
}
diff --git a/3rdparty/bgfx/src/amalgamated.cpp b/3rdparty/bgfx/src/amalgamated.cpp
index d61f06845cd..dc6c8f6cd50 100644
--- a/3rdparty/bgfx/src/amalgamated.cpp
+++ b/3rdparty/bgfx/src/amalgamated.cpp
@@ -9,8 +9,8 @@
#include "glcontext_ppapi.cpp"
#include "glcontext_wgl.cpp"
#include "image.cpp"
-#include "ovr.cpp"
-#include "renderdoc.cpp"
+#include "hmd_ovr.cpp"
+#include "debug_renderdoc.cpp"
#include "renderer_d3d9.cpp"
#include "renderer_d3d11.cpp"
#include "renderer_d3d12.cpp"
diff --git a/3rdparty/bgfx/src/bgfx.cpp b/3rdparty/bgfx/src/bgfx.cpp
index 3a839c82815..13fc896d710 100644
--- a/3rdparty/bgfx/src/bgfx.cpp
+++ b/3rdparty/bgfx/src/bgfx.cpp
@@ -1151,6 +1151,10 @@ namespace bgfx
}
BX_TRACE("Max FB attachments: %d", g_caps.maxFBAttachments);
+ BX_TRACE("NDC depth [%d, 1], origin %s left."
+ , g_caps.homogeneousDepth ? -1 : 0
+ , g_caps.originBottomLeft ? "bottom" : "top"
+ );
}
TextureFormat::Enum getViableTextureFormat(const ImageContainer& _imageContainer)
@@ -1427,14 +1431,14 @@ namespace bgfx
m_indexBufferHandle.free(_frame->m_freeIndexBufferHandle[ii].idx);
}
- for (uint16_t ii = 0, num = _frame->m_numFreeVertexDeclHandles; ii < num; ++ii)
+ for (uint16_t ii = 0, num = _frame->m_numFreeVertexBufferHandles; ii < num; ++ii)
{
- m_vertexDeclHandle.free(_frame->m_freeVertexDeclHandle[ii].idx);
+ destroyVertexBufferInternal(_frame->m_freeVertexBufferHandle[ii]);
}
- for (uint16_t ii = 0, num = _frame->m_numFreeVertexBufferHandles; ii < num; ++ii)
+ for (uint16_t ii = 0, num = _frame->m_numFreeVertexDeclHandles; ii < num; ++ii)
{
- destroyVertexBufferInternal(_frame->m_freeVertexBufferHandle[ii]);
+ m_vertexDeclHandle.free(_frame->m_freeVertexDeclHandle[ii].idx);
}
for (uint16_t ii = 0, num = _frame->m_numFreeShaderHandles; ii < num; ++ii)
diff --git a/3rdparty/bgfx/src/bgfx_p.h b/3rdparty/bgfx/src/bgfx_p.h
index 34fd1378ff8..1bb850e4756 100644
--- a/3rdparty/bgfx/src/bgfx_p.h
+++ b/3rdparty/bgfx/src/bgfx_p.h
@@ -3617,7 +3617,7 @@ namespace bgfx
{
BGFX_CHECK_HANDLE("setUniform", m_uniformHandle, _handle);
UniformRef& uniform = m_uniformRef[_handle.idx];
- BX_CHECK(uniform.m_num >= _num, "Truncated uniform update. %d (max: %d)", _num, uniform.m_num);
+ BX_CHECK(_num == UINT16_MAX || uniform.m_num >= _num, "Truncated uniform update. %d (max: %d)", _num, uniform.m_num);
if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) )
{
BX_CHECK(m_uniformSet.end() == m_uniformSet.find(_handle.idx)
diff --git a/3rdparty/bgfx/src/bgfx_shader.sh b/3rdparty/bgfx/src/bgfx_shader.sh
index 3a1c669f321..bd1d1d864c9 100644
--- a/3rdparty/bgfx/src/bgfx_shader.sh
+++ b/3rdparty/bgfx/src/bgfx_shader.sh
@@ -88,6 +88,50 @@ struct BgfxSampler2D
Texture2D m_texture;
};
+struct BgfxISampler2D
+{
+ Texture2D<ivec4> m_texture;
+};
+
+struct BgfxUSampler2D
+{
+ Texture2D<uvec4> m_texture;
+};
+
+struct BgfxSampler2DShadow
+{
+ SamplerComparisonState m_sampler;
+ Texture2D m_texture;
+};
+
+struct BgfxSampler3D
+{
+ SamplerState m_sampler;
+ Texture3D m_texture;
+};
+
+struct BgfxISampler3D
+{
+ Texture3D<ivec4> m_texture;
+};
+
+struct BgfxUSampler3D
+{
+ Texture3D<uvec4> m_texture;
+};
+
+struct BgfxSamplerCube
+{
+ SamplerState m_sampler;
+ TextureCube m_texture;
+};
+
+struct BgfxSampler2DMS
+{
+ SamplerState m_sampler;
+ Texture2DMS<vec4> m_texture;
+};
+
vec4 bgfxTexture2D(BgfxSampler2D _sampler, vec2 _coord)
{
return _sampler.m_texture.Sample(_sampler.m_sampler, _coord);
@@ -110,18 +154,6 @@ vec4 bgfxTexture2DProj(BgfxSampler2D _sampler, vec4 _coord)
return _sampler.m_texture.Sample(_sampler.m_sampler, coord);
}
-struct BgfxSampler2DMS
-{
- SamplerState m_sampler;
- Texture2DMS m_texture;
-};
-
-struct BgfxSampler2DShadow
-{
- SamplerComparisonState m_sampler;
- Texture2D m_texture;
-};
-
float bgfxShadow2D(BgfxSampler2DShadow _sampler, vec3 _coord)
{
return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, _coord.xy, _coord.z);
@@ -133,22 +165,6 @@ float bgfxShadow2DProj(BgfxSampler2DShadow _sampler, vec4 _coord)
return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, coord.xy, coord.z);
}
-struct BgfxSampler3D
-{
- SamplerState m_sampler;
- Texture3D m_texture;
-};
-
-struct BgfxISampler3D
-{
- Texture3D<ivec4> m_texture;
-};
-
-struct BgfxUSampler3D
-{
- Texture3D<uvec4> m_texture;
-};
-
vec4 bgfxTexture3D(BgfxSampler3D _sampler, vec3 _coord)
{
return _sampler.m_texture.Sample(_sampler.m_sampler, _coord);
@@ -173,12 +189,6 @@ uvec4 bgfxTexture3D(BgfxUSampler3D _sampler, vec3 _coord)
return _sampler.m_texture.Load(uvec4(_coord * size, 0) );
}
-struct BgfxSamplerCube
-{
- SamplerState m_sampler;
- TextureCube m_texture;
-};
-
vec4 bgfxTextureCube(BgfxSamplerCube _sampler, vec3 _coord)
{
return _sampler.m_texture.Sample(_sampler.m_sampler, _coord);
@@ -194,6 +204,16 @@ vec4 bgfxTexelFetch(BgfxSampler2D _sampler, ivec2 _coord, int _lod)
return _sampler.m_texture.Load(ivec3(_coord, _lod) );
}
+ivec4 bgfxTexelFetch(BgfxISampler2D _sampler, ivec2 _coord, int _lod)
+{
+ return _sampler.m_texture.Load(ivec3(_coord, _lod) );
+}
+
+uvec4 bgfxTexelFetch(BgfxUSampler2D _sampler, ivec2 _coord, int _lod)
+{
+ return _sampler.m_texture.Load(ivec3(_coord, _lod) );
+}
+
vec4 bgfxTexelFetch(BgfxSampler2DMS _sampler, ivec2 _coord, int _sampleIdx)
{
return _sampler.m_texture.Load(_coord, _sampleIdx);
@@ -208,6 +228,12 @@ vec4 bgfxTexelFetch(BgfxSampler3D _sampler, ivec3 _coord, int _lod)
uniform SamplerState _name ## Sampler : register(s[_reg]); \
uniform Texture2D _name ## Texture : register(t[_reg]); \
static BgfxSampler2D _name = { _name ## Sampler, _name ## Texture }
+# define ISAMPLER2D(_name, _reg) \
+ uniform Texture2D<ivec4> _name ## Texture : register(t[_reg]); \
+ static BgfxISampler2D _name = { _name ## Texture }
+# define USAMPLER2D(_name, _reg) \
+ uniform Texture2D<uvec4> _name ## Texture : register(t[_reg]); \
+ static BgfxUSampler2D _name = { _name ## Texture }
# define sampler2D BgfxSampler2D
# define texture2D(_sampler, _coord) bgfxTexture2D(_sampler, _coord)
# define texture2DLod(_sampler, _coord, _level) bgfxTexture2DLod(_sampler, _coord, _level)
@@ -364,10 +390,43 @@ vec4 mod(vec4 _a, vec4 _b) { return _a - _b * floor(_a / _b); }
# define SAMPLER2DSHADOW(_name, _reg) uniform sampler2DShadow _name
# if BGFX_SHADER_LANGUAGE_GLSL >= 130
+# define ISAMPLER2D(_name, _reg) uniform isampler2D _name
+# define USAMPLER2D(_name, _reg) uniform usampler2D _name
# define ISAMPLER3D(_name, _reg) uniform isampler3D _name
# define USAMPLER3D(_name, _reg) uniform usampler3D _name
-ivec4 texture3D(isampler3D _sampler, vec3 _coord) { return texture(_sampler, _coord); }
-uvec4 texture3D(usampler3D _sampler, vec3 _coord) { return texture(_sampler, _coord); }
+
+vec4 bgfxTexture2D(sampler2D _sampler, vec2 _coord)
+{
+ return texture(_sampler, _coord);
+}
+
+ivec4 bgfxTexture2D(isampler2D _sampler, vec2 _coord)
+{
+ return texture(_sampler, _coord);
+}
+
+uvec4 bgfxTexture2D(usampler2D _sampler, vec2 _coord)
+{
+ return texture(_sampler, _coord);
+}
+
+vec4 bgfxTexture3D(sampler3D _sampler, vec3 _coord)
+{
+ return texture(_sampler, _coord);
+}
+
+ivec4 bgfxTexture3D(isampler3D _sampler, vec3 _coord)
+{
+ return texture(_sampler, _coord);
+}
+
+uvec4 bgfxTexture3D(usampler3D _sampler, vec3 _coord)
+{
+ return texture(_sampler, _coord);
+}
+
+# define texture2D(_sampler, _coord) bgfxTexture2D(_sampler, _coord)
+# define texture3D(_sampler, _coord) bgfxTexture3D(_sampler, _coord)
# endif // BGFX_SHADER_LANGUAGE_GLSL >= 130
vec3 instMul(vec3 _vec, mat3 _mtx) { return mul(_vec, _mtx); }
diff --git a/3rdparty/bgfx/src/renderdoc.cpp b/3rdparty/bgfx/src/debug_renderdoc.cpp
index 0cb7be99d64..0cb7be99d64 100644
--- a/3rdparty/bgfx/src/renderdoc.cpp
+++ b/3rdparty/bgfx/src/debug_renderdoc.cpp
diff --git a/3rdparty/bgfx/src/renderdoc.h b/3rdparty/bgfx/src/debug_renderdoc.h
index 803805ea581..803805ea581 100644
--- a/3rdparty/bgfx/src/renderdoc.h
+++ b/3rdparty/bgfx/src/debug_renderdoc.h
diff --git a/3rdparty/bgfx/src/glcontext_egl.h b/3rdparty/bgfx/src/glcontext_egl.h
index 95323fe419a..767879c8349 100644
--- a/3rdparty/bgfx/src/glcontext_egl.h
+++ b/3rdparty/bgfx/src/glcontext_egl.h
@@ -10,6 +10,10 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#if defined(Success)
+// X11 defines Success
+# undef Success
+#endif // defined(Success)
namespace bgfx { namespace gl
{
diff --git a/3rdparty/bgfx/src/glimports.h b/3rdparty/bgfx/src/glimports.h
index f288a6a3597..7e110f06928 100644
--- a/3rdparty/bgfx/src/glimports.h
+++ b/3rdparty/bgfx/src/glimports.h
@@ -515,6 +515,7 @@ GL_IMPORT_OES__(true, PFNGLBINDVERTEXARRAYPROC, glBindVertexA
GL_IMPORT_OES__(true, PFNGLDELETEVERTEXARRAYSPROC, glDeleteVertexArrays);
GL_IMPORT_OES__(true, PFNGLGENVERTEXARRAYSPROC, glGenVertexArrays);
+GL_IMPORT_____x(true, PFNGLCLIPCONTROLPROC, glClipControl);
GL_IMPORT_____x(true, PFNGLENABLEIPROC, glEnablei);
GL_IMPORT_____x(true, PFNGLDISABLEIPROC, glDisablei);
GL_IMPORT_____x(true, PFNGLBLENDEQUATIONIPROC, glBlendEquationi);
@@ -556,6 +557,7 @@ GL_IMPORT_NV___(true, PFNGLQUERYCOUNTERPROC, glQueryCounte
GL_IMPORT (true, PFNGLINVALIDATEFRAMEBUFFERPROC, glInvalidateFramebuffer, glDiscardFramebufferEXT);
# elif !BGFX_USE_GL_DYNAMIC_LIB
+GL_IMPORT______(true, PFNGLCLIPCONTROLPROC, glClipControl);
GL_IMPORT______(true, PFNGLGETSTRINGIPROC, glGetStringi);
GL_IMPORT______(true, PFNGLTEXIMAGE3DPROC, glTexImage3D);
diff --git a/3rdparty/bgfx/src/hmd_openvr.cpp b/3rdparty/bgfx/src/hmd_openvr.cpp
new file mode 100644
index 00000000000..8e873032154
--- /dev/null
+++ b/3rdparty/bgfx/src/hmd_openvr.cpp
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2011-2016 Branimir Karadzic. All rights reserved.
+ * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
+ */
+
+#include "hmd_openvr.h"
+
+BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-variable")
+#include <openvr/openvr_capi.h>
+
+namespace bgfx
+{
+#if BX_PLATFORM_WINDOWS
+# define VR_CALLTYPE __cdecl
+#else
+# define VR_CALLTYPE
+#endif
+
+ typedef uint32_t (VR_CALLTYPE *PFN_VR_INITINTERNAL)(EVRInitError* peError, EVRApplicationType eType);
+ typedef void (VR_CALLTYPE *PFN_VR_SHUTDOWNINTERNAL)();
+ typedef bool (VR_CALLTYPE *PFN_VR_ISHMDPRESENT)();
+ typedef void* (VR_CALLTYPE *PFN_VR_GETGENERICINTERFACE)(const char* pchInterfaceVersion, EVRInitError* peError);
+ typedef bool (VR_CALLTYPE *PFN_VR_ISRUNTIMEINSTALLED)();
+ typedef bool (VR_CALLTYPE *PFN_VR_ISINTERFACEVERSIONVALID)(const char *pchInterfaceVersion);
+ typedef uint32_t (VR_CALLTYPE *PFN_VR_GETINITTOKEN)();
+ typedef const char* (VR_CALLTYPE *PFN_VR_GETVRINITERRORASSYMBOL)(EVRInitError error);
+ typedef const char* (VR_CALLTYPE *PFN_VR_GETVRINITERRORASENGLISHDESCRIPTION)(EVRInitError error);
+
+ PFN_VR_INITINTERNAL VR_InitInternal;
+ PFN_VR_SHUTDOWNINTERNAL VR_ShutdownInternal;
+ PFN_VR_ISHMDPRESENT VR_IsHmdPresent;
+ PFN_VR_GETGENERICINTERFACE VR_GetGenericInterface;
+ PFN_VR_ISRUNTIMEINSTALLED VR_IsRuntimeInstalled;
+ PFN_VR_ISINTERFACEVERSIONVALID VR_IsInterfaceVersionValid;
+ PFN_VR_GETINITTOKEN VR_GetInitToken;
+ PFN_VR_GETVRINITERRORASSYMBOL VR_GetVRInitErrorAsSymbol;
+ PFN_VR_GETVRINITERRORASENGLISHDESCRIPTION VR_GetVRInitErrorAsEnglishDescription;
+
+ void* loadOpenVR()
+ {
+ void* openvrdll = bx::dlopen(
+#if BX_PLATFORM_LINUX
+ "libopenvr_api.so"
+#elif BX_PLATFORM_OSX
+ "libopenvr_api.dylib"
+#else
+ "openvr_api.dll"
+#endif // BX_PLATFORM_*
+ );
+ if (NULL != openvrdll)
+ {
+ VR_InitInternal = (PFN_VR_INITINTERNAL )bx::dlsym(openvrdll, "VR_InitInternal");
+ VR_ShutdownInternal = (PFN_VR_SHUTDOWNINTERNAL )bx::dlsym(openvrdll, "VR_ShutdownInternal");
+ VR_IsHmdPresent = (PFN_VR_ISHMDPRESENT )bx::dlsym(openvrdll, "VR_IsHmdPresent");
+ VR_GetGenericInterface = (PFN_VR_GETGENERICINTERFACE )bx::dlsym(openvrdll, "VR_GetGenericInterface");
+ VR_IsRuntimeInstalled = (PFN_VR_ISRUNTIMEINSTALLED )bx::dlsym(openvrdll, "VR_IsRuntimeInstalled");
+ VR_IsInterfaceVersionValid = (PFN_VR_ISINTERFACEVERSIONVALID)bx::dlsym(openvrdll, "VR_IsInterfaceVersionValid");
+ VR_GetInitToken = (PFN_VR_GETINITTOKEN )bx::dlsym(openvrdll, "VR_GetInitToken");
+ VR_GetVRInitErrorAsSymbol = (PFN_VR_GETVRINITERRORASSYMBOL )bx::dlsym(openvrdll, "VR_GetVRInitErrorAsSymbol");
+ VR_GetVRInitErrorAsEnglishDescription = (PFN_VR_GETVRINITERRORASENGLISHDESCRIPTION)bx::dlsym(openvrdll, "VR_GetVRInitErrorAsEnglishDescription");
+
+ if (NULL == VR_InitInternal
+ && NULL == VR_ShutdownInternal
+ && NULL == VR_IsHmdPresent
+ && NULL == VR_GetGenericInterface
+ && NULL == VR_IsRuntimeInstalled
+ && NULL == VR_IsInterfaceVersionValid
+ && NULL == VR_GetInitToken
+ && NULL == VR_GetVRInitErrorAsSymbol
+ && NULL == VR_GetVRInitErrorAsEnglishDescription)
+ {
+ bx::dlclose(openvrdll);
+ return NULL;
+ }
+
+ EVRInitError err;
+ uint32_t token = VR_InitInternal(&err, EVRApplicationType_VRApplication_Scene);
+ BX_UNUSED(token);
+
+ BX_TRACE("OpenVR: HMD is %spresent, Runtime is %sinstalled."
+ , VR_IsHmdPresent() ? "" : "not "
+ , VR_IsRuntimeInstalled() ? "" : "not "
+ );
+ }
+
+ return openvrdll;
+ }
+
+ void unloadOpenVR(void* _openvrdll)
+ {
+ VR_ShutdownInternal();
+ bx::dlclose(_openvrdll);
+ }
+
+} // namespace bgfx
diff --git a/3rdparty/bgfx/src/hmd_openvr.h b/3rdparty/bgfx/src/hmd_openvr.h
new file mode 100644
index 00000000000..262f8c947a1
--- /dev/null
+++ b/3rdparty/bgfx/src/hmd_openvr.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2011-2016 Branimir Karadzic. All rights reserved.
+ * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
+ */
+
+#ifndef BGFX_OPENVR_H_HEADER_GUARD
+#define BGFX_OPENVR_H_HEADER_GUARD
+
+#include "bgfx_p.h"
+
+namespace bgfx
+{
+ void* loadOpenVR();
+ void unloadOpenVR(void*);
+
+} // namespace bgfx
+
+#endif // BGFX_OPENVR_H_HEADER_GUARD
diff --git a/3rdparty/bgfx/src/hmd_ovr.cpp b/3rdparty/bgfx/src/hmd_ovr.cpp
new file mode 100644
index 00000000000..7d3109dbd45
--- /dev/null
+++ b/3rdparty/bgfx/src/hmd_ovr.cpp
@@ -0,0 +1,266 @@
+/*
+ * Copyright 2011-2016 Branimir Karadzic. All rights reserved.
+ * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
+ */
+
+#include "hmd_ovr.h"
+
+#if BGFX_CONFIG_USE_OVR
+
+namespace bgfx
+{
+#define _OVR_CHECK(_call) \
+ BX_MACRO_BLOCK_BEGIN \
+ ovrResult __result__ = _call; \
+ BX_CHECK(OVR_SUCCESS(__result__), #_call " FAILED %d", __result__); \
+ BX_MACRO_BLOCK_END
+
+#if BGFX_CONFIG_DEBUG
+# define OVR_CHECK(_call) _OVR_CHECK(_call)
+#else
+# define OVR_CHECK(_call) _call
+#endif // BGFX_CONFIG_DEBUG
+
+ OVR::OVR()
+ : m_hmd(NULL)
+ , m_enabled(false)
+ , m_mirror(NULL)
+ , m_frameIndex(0)
+ , m_sensorSampleTime(0)
+ {
+ memset(m_eyeBuffers, 0, sizeof(m_eyeBuffers));
+ }
+
+ OVR::~OVR()
+ {
+ BX_CHECK(NULL == m_hmd, "OVR not shutdown properly.");
+ }
+
+ void OVR::init()
+ {
+ ovrResult result = ovr_Initialize(NULL);
+
+ if (result != ovrSuccess)
+ {
+ BX_TRACE("Unable to create OVR device.");
+ return;
+ }
+
+ ovrGraphicsLuid luid;
+ result = ovr_Create(&m_hmd, &luid);
+ if (result != ovrSuccess)
+ {
+ BX_TRACE("Unable to create OVR device.");
+ return;
+ }
+
+ m_hmdDesc = ovr_GetHmdDesc(m_hmd);
+
+ BX_TRACE("HMD: %s, %s, firmware: %d.%d"
+ , m_hmdDesc.ProductName
+ , m_hmdDesc.Manufacturer
+ , m_hmdDesc.FirmwareMajor
+ , m_hmdDesc.FirmwareMinor
+ );
+
+ ovrSizei sizeL = ovr_GetFovTextureSize(m_hmd, ovrEye_Left, m_hmdDesc.DefaultEyeFov[0], 1.0f);
+ ovrSizei sizeR = ovr_GetFovTextureSize(m_hmd, ovrEye_Right, m_hmdDesc.DefaultEyeFov[1], 1.0f);
+ m_hmdSize.w = sizeL.w + sizeR.w;
+ m_hmdSize.h = bx::uint32_max(sizeL.h, sizeR.h);
+ }
+
+ void OVR::shutdown()
+ {
+ BX_CHECK(!m_enabled, "HMD not disabled.");
+
+ for (uint32_t ii = 0; ii < 2; ++ii)
+ {
+ if (NULL != m_eyeBuffers[ii])
+ {
+ m_eyeBuffers[ii]->destroy(m_hmd);
+ m_eyeBuffers[ii] = NULL;
+ }
+ }
+
+ if (NULL != m_mirror)
+ {
+ m_mirror->destroy(m_hmd);
+ m_mirror = NULL;
+ }
+
+ ovr_Destroy(m_hmd);
+ m_hmd = NULL;
+ ovr_Shutdown();
+ }
+
+ void OVR::getViewport(uint8_t _eye, Rect* _viewport)
+ {
+ _viewport->m_x = 0;
+ _viewport->m_y = 0;
+ _viewport->m_width = m_eyeBuffers[_eye]->m_eyeTextureSize.w;
+ _viewport->m_height = m_eyeBuffers[_eye]->m_eyeTextureSize.h;
+ }
+
+ void OVR::renderEyeStart(uint8_t _eye)
+ {
+ m_eyeBuffers[_eye]->render(m_hmd);
+ }
+
+ bool OVR::postReset()
+ {
+ if (NULL == m_hmd)
+ {
+ return false;
+ }
+
+ for (uint32_t ii = 0; ii < 2; ++ii)
+ {
+ m_erd[ii] = ovr_GetRenderDesc(m_hmd, ovrEyeType(ii), m_hmdDesc.DefaultEyeFov[ii]);
+ }
+
+ m_enabled = true;
+
+ return true;
+ }
+
+ void OVR::preReset()
+ {
+ if (m_enabled)
+ {
+ // on window resize this will recreate the mirror texture in ovrPostReset
+ m_mirror->destroy(m_hmd);
+ m_mirror = NULL;
+ m_enabled = false;
+ }
+ }
+
+ OVR::Enum OVR::swap(HMD& _hmd, bool originBottomLeft)
+ {
+ _hmd.flags = BGFX_HMD_NONE;
+
+ if (NULL != m_hmd)
+ {
+ _hmd.flags |= BGFX_HMD_DEVICE_RESOLUTION;
+ _hmd.deviceWidth = m_hmdDesc.Resolution.w;
+ _hmd.deviceHeight = m_hmdDesc.Resolution.h;
+ }
+
+ if (!m_enabled)
+ {
+ return NotEnabled;
+ }
+
+ ovrResult result;
+
+ for (uint32_t ii = 0; ii < 2; ++ii)
+ {
+ m_eyeBuffers[ii]->postRender(m_hmd);
+ result = ovr_CommitTextureSwapChain(m_hmd, m_eyeBuffers[ii]->m_textureSwapChain);
+ if (!OVR_SUCCESS(result) )
+ {
+ return DeviceLost;
+ }
+ }
+
+ _hmd.flags |= BGFX_HMD_RENDERING;
+
+ // finish frame for current eye
+ ovrViewScaleDesc viewScaleDesc;
+ viewScaleDesc.HmdSpaceToWorldScaleInMeters = 1.0f;
+ viewScaleDesc.HmdToEyeOffset[0] = m_hmdToEyeOffset[0];
+ viewScaleDesc.HmdToEyeOffset[1] = m_hmdToEyeOffset[1];
+
+ // create the main eye layer
+ ovrLayerEyeFov eyeLayer;
+ eyeLayer.Header.Type = ovrLayerType_EyeFov;
+ eyeLayer.Header.Flags = originBottomLeft ? ovrLayerFlag_TextureOriginAtBottomLeft : 0;
+
+ for (uint32_t ii = 0; ii < 2; ++ii)
+ {
+ eyeLayer.ColorTexture[ii] = m_eyeBuffers[ii]->m_textureSwapChain;
+ eyeLayer.Viewport[ii].Pos.x = 0;
+ eyeLayer.Viewport[ii].Pos.y = 0;
+ eyeLayer.Viewport[ii].Size.w = m_eyeBuffers[ii]->m_eyeTextureSize.w;
+ eyeLayer.Viewport[ii].Size.h = m_eyeBuffers[ii]->m_eyeTextureSize.h;
+ eyeLayer.Fov[ii] = m_hmdDesc.DefaultEyeFov[ii];
+ eyeLayer.RenderPose[ii] = m_pose[ii];
+ eyeLayer.SensorSampleTime = m_sensorSampleTime;
+ }
+
+ // append all the layers to global list
+ ovrLayerHeader* layerList = &eyeLayer.Header;
+
+ result = ovr_SubmitFrame(m_hmd, m_frameIndex, NULL, &layerList, 1);
+ if (!OVR_SUCCESS(result) )
+ {
+ return DeviceLost;
+ }
+
+ // perform mirror texture blit right after the entire frame is submitted to HMD
+ m_mirror->blit(m_hmd);
+
+ m_hmdToEyeOffset[0] = m_erd[0].HmdToEyeOffset;
+ m_hmdToEyeOffset[1] = m_erd[1].HmdToEyeOffset;
+
+ ovr_GetEyePoses(m_hmd, m_frameIndex, ovrTrue, m_hmdToEyeOffset, m_pose, &m_sensorSampleTime);
+
+ getEyePose(_hmd);
+
+ return Success;
+ }
+
+ void OVR::recenter()
+ {
+ if (NULL != m_hmd)
+ {
+ OVR_CHECK(ovr_RecenterTrackingOrigin(m_hmd) );
+ }
+ }
+
+ void OVR::getEyePose(HMD& _hmd)
+ {
+ if (NULL != m_hmd)
+ {
+ for (uint32_t ii = 0; ii < 2; ++ii)
+ {
+ const ovrPosef& pose = m_pose[ii];
+ HMD::Eye& eye = _hmd.eye[ii];
+ eye.rotation[0] = pose.Orientation.x;
+ eye.rotation[1] = pose.Orientation.y;
+ eye.rotation[2] = pose.Orientation.z;
+ eye.rotation[3] = pose.Orientation.w;
+ eye.translation[0] = pose.Position.x;
+ eye.translation[1] = pose.Position.y;
+ eye.translation[2] = pose.Position.z;
+
+ const ovrEyeRenderDesc& erd = m_erd[ii];
+ eye.fov[0] = erd.Fov.UpTan;
+ eye.fov[1] = erd.Fov.DownTan;
+ eye.fov[2] = erd.Fov.LeftTan;
+ eye.fov[3] = erd.Fov.RightTan;
+
+ ovrMatrix4f eyeProj = ovrMatrix4f_Projection(m_erd[ii].Fov, 0.01f, 1000.0f, ovrProjection_LeftHanded);
+ for (uint32_t jj = 0; jj < 4; ++jj)
+ {
+ for (uint32_t kk = 0; kk < 4; ++kk)
+ {
+ eye.projection[4 * jj + kk] = eyeProj.M[kk][jj];
+ }
+ }
+
+ eye.viewOffset[0] = erd.HmdToEyeOffset.x;
+ eye.viewOffset[1] = erd.HmdToEyeOffset.y;
+ eye.viewOffset[2] = erd.HmdToEyeOffset.z;
+
+ eye.pixelsPerTanAngle[0] = erd.PixelsPerTanAngleAtCenter.x;
+ eye.pixelsPerTanAngle[1] = erd.PixelsPerTanAngleAtCenter.y;
+ }
+ }
+
+ _hmd.width = uint16_t(m_hmdSize.w);
+ _hmd.height = uint16_t(m_hmdSize.h);
+ }
+
+} // namespace bgfx
+
+#endif // BGFX_CONFIG_USE_OVR
diff --git a/3rdparty/bgfx/src/ovr.h b/3rdparty/bgfx/src/hmd_ovr.h
index b717d0d47a8..675e711c01e 100644
--- a/3rdparty/bgfx/src/ovr.h
+++ b/3rdparty/bgfx/src/hmd_ovr.h
@@ -14,38 +14,54 @@
# define OVR_VERSION_(_a, _b, _c) (_a * 10000 + _b * 100 + _c)
# define OVR_VERSION OVR_VERSION_(OVR_PRODUCT_VERSION, OVR_MAJOR_VERSION, OVR_MINOR_VERSION)
-# define OVR_VERSION_042 OVR_VERSION_(0, 4, 2)
-# define OVR_VERSION_043 OVR_VERSION_(0, 4, 3)
-# define OVR_VERSION_044 OVR_VERSION_(0, 4, 4)
-# define OVR_VERSION_050 OVR_VERSION_(0, 5, 0)
-# if OVR_VERSION < OVR_VERSION_050
-# include <OVR.h>
-# else
-# include <OVR_CAPI.h>
-# endif // OVR_VERSION < OVR_VERSION_050
+# include <OVR_CAPI.h>
# if BGFX_CONFIG_RENDERER_DIRECT3D11
-# if OVR_VERSION < OVR_VERSION_050
-# define OVR_D3D_VERSION 11
-# include <OVR_D3D.h>
-# else
-# include <OVR_CAPI_D3D.h>
-# endif
+# include <OVR_CAPI_D3D.h>
# endif // BGFX_CONFIG_RENDERER_DIRECT3D11
# if BGFX_CONFIG_RENDERER_OPENGL
-# if OVR_VERSION < OVR_VERSION_050
-# include <OVR_GL.h>
-# else
-# include <OVR_CAPI_GL.h>
-# endif
+# include <OVR_CAPI_GL.h>
# endif // BGFX_CONFIG_RENDERER_OPENGL
namespace bgfx
{
+ // single eye buffer
+ struct OVRBufferI
+ {
+ virtual ~OVRBufferI() {};
+ virtual void create(const ovrSession& _session, int _eyeIdx, int _msaaSamples) = 0;
+ virtual void destroy(const ovrSession& _session) = 0;
+ virtual void render(const ovrSession& _session) = 0;
+ virtual void postRender(const ovrSession& _session) = 0;
+ ovrSizei m_eyeTextureSize;
+ ovrTextureSwapChain m_textureSwapChain;
+ };
+
+ // mirrored window output
+ struct OVRMirrorI
+ {
+ virtual ~OVRMirrorI() {};
+ virtual void create(const ovrSession& _session, int windowWidth, int windowHeight) = 0;
+ virtual void destroy(const ovrSession& _session) = 0;
+ virtual void blit(const ovrSession& _session) = 0;
+
+ ovrMirrorTexture m_mirrorTexture;
+ ovrMirrorTextureDesc m_mirrorTextureDesc;
+ };
+
struct OVR
{
+ enum Enum
+ {
+ NotEnabled,
+ DeviceLost,
+ Success,
+
+ Count
+ };
+
OVR();
~OVR();
@@ -56,40 +72,32 @@ namespace bgfx
bool isEnabled() const
{
- return m_isenabled;
- }
-
- bool isDebug() const
- {
- return m_debug;
+ return m_enabled;
}
void init();
void shutdown();
void getViewport(uint8_t _eye, Rect* _viewport);
- bool postReset(void* _nwh, ovrRenderAPIConfig* _config, bool _debug = false);
- void postReset(const ovrTexture& _texture);
+ void renderEyeStart(uint8_t _eye);
+ bool postReset();
void preReset();
- bool swap(HMD& _hmd);
+ Enum swap(HMD& _hmd, bool originBottomLeft);
void recenter();
void getEyePose(HMD& _hmd);
- void getSize(uint32_t& _width, uint32_t& _height) const
- {
- _width = m_rtSize.w;
- _height = m_rtSize.h;
- }
- ovrHmd m_hmd;
- ovrFrameTiming m_timing;
+ ovrSession m_hmd;
+ ovrHmdDesc m_hmdDesc;
ovrEyeRenderDesc m_erd[2];
- ovrRecti m_rect[2];
- ovrPosef m_pose[2];
- ovrTexture m_texture[2];
- ovrSizei m_rtSize;
- bool m_warning;
- bool m_isenabled;
- bool m_debug;
+ ovrRecti m_rect[2];
+ ovrPosef m_pose[2];
+ ovrVector3f m_hmdToEyeOffset[2];
+ ovrSizei m_hmdSize;
+ OVRBufferI *m_eyeBuffers[2];
+ OVRMirrorI *m_mirror;
+ uint64_t m_frameIndex;
+ double m_sensorSampleTime;
+ bool m_enabled;
};
} // namespace bgfx
@@ -100,6 +108,15 @@ namespace bgfx
{
struct OVR
{
+ enum Enum
+ {
+ NotEnabled,
+ DeviceLost,
+ Success,
+
+ Count
+ };
+
OVR()
{
}
@@ -139,11 +156,15 @@ namespace bgfx
_viewport->m_height = 0;
}
- bool swap(HMD& _hmd)
+ void renderEyeStart(uint8_t /*_eye*/)
+ {
+ }
+
+ Enum swap(HMD& _hmd, bool /*originBottomLeft*/)
{
_hmd.flags = BGFX_HMD_NONE;
getEyePose(_hmd);
- return false;
+ return NotEnabled;
}
void recenter()
@@ -155,12 +176,6 @@ namespace bgfx
_hmd.width = 0;
_hmd.height = 0;
}
-
- void getSize(uint32_t& _width, uint32_t& _height) const
- {
- _width = 0;
- _height = 0;
- }
};
} // namespace bgfx
diff --git a/3rdparty/bgfx/src/image.cpp b/3rdparty/bgfx/src/image.cpp
index 9d337c3d4f6..2aa69de0a8d 100644
--- a/3rdparty/bgfx/src/image.cpp
+++ b/3rdparty/bgfx/src/image.cpp
@@ -252,24 +252,12 @@ namespace bgfx
const uint16_t minBlockX = blockInfo.minBlockX;
const uint16_t minBlockY = blockInfo.minBlockY;
- _width = bx::uint16_max(blockWidth * minBlockX, ( (_width + blockWidth - 1) / blockWidth)*blockWidth);
- _height = bx::uint16_max(blockHeight * minBlockY, ( (_height + blockHeight - 1) / blockHeight)*blockHeight);
- _depth = bx::uint16_max(1, _depth);
-
- uint8_t numMips = 0;
+ _width = bx::uint16_max(blockWidth * minBlockX, ( (_width + blockWidth - 1) / blockWidth)*blockWidth);
+ _height = bx::uint16_max(blockHeight * minBlockY, ( (_height + blockHeight - 1) / blockHeight)*blockHeight);
+ _depth = bx::uint16_max(1, _depth);
- for (uint32_t width = _width, height = _height, depth = _depth
- ; blockWidth < width || blockHeight < height || 1 < depth
- ; ++numMips)
- {
- width = bx::uint32_max(blockWidth * minBlockX, ( (width + blockWidth - 1) / blockWidth )*blockWidth);
- height = bx::uint32_max(blockHeight * minBlockY, ( (height + blockHeight - 1) / blockHeight)*blockHeight);
- depth = bx::uint32_max(1, depth);
-
- width >>= 1;
- height >>= 1;
- depth >>= 1;
- }
+ uint32_t max = bx::uint32_max(_width, bx::uint32_max(_height, _depth) );
+ uint8_t numMips = uint8_t(bx::flog2(float(max) ) );
return numMips;
}
diff --git a/3rdparty/bgfx/src/ovr.cpp b/3rdparty/bgfx/src/ovr.cpp
deleted file mode 100644
index 5cd62ef3956..00000000000
--- a/3rdparty/bgfx/src/ovr.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright 2011-2016 Branimir Karadzic. All rights reserved.
- * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
- */
-
-#include "ovr.h"
-
-#if BGFX_CONFIG_USE_OVR
-
-namespace bgfx
-{
-#if OVR_VERSION <= OVR_VERSION_050
-# define OVR_EYE_BUFFER 100
-#else
-# define OVR_EYE_BUFFER 8
-#endif // OVR_VERSION...
-
- OVR::OVR()
- : m_hmd(NULL)
- , m_isenabled(false)
- , m_debug(false)
- {
- }
-
- OVR::~OVR()
- {
- BX_CHECK(NULL == m_hmd, "OVR not shutdown properly.");
- }
-
- void OVR::init()
- {
- bool initialized = !!ovr_Initialize();
- BX_WARN(initialized, "Unable to create OVR device.");
- if (!initialized)
- {
- return;
- }
-
- m_hmd = ovrHmd_Create(0);
- if (NULL == m_hmd)
- {
- m_hmd = ovrHmd_CreateDebug(ovrHmd_DK2);
- BX_WARN(NULL != m_hmd, "Unable to create OVR device.");
- if (NULL == m_hmd)
- {
- return;
- }
- }
-
- BX_TRACE("HMD: %s, %s, firmware: %d.%d"
- , m_hmd->ProductName
- , m_hmd->Manufacturer
- , m_hmd->FirmwareMajor
- , m_hmd->FirmwareMinor
- );
-
- ovrSizei sizeL = ovrHmd_GetFovTextureSize(m_hmd, ovrEye_Left, m_hmd->DefaultEyeFov[0], 1.0f);
- ovrSizei sizeR = ovrHmd_GetFovTextureSize(m_hmd, ovrEye_Right, m_hmd->DefaultEyeFov[1], 1.0f);
- m_rtSize.w = sizeL.w + sizeR.w + OVR_EYE_BUFFER;
- m_rtSize.h = bx::uint32_max(sizeL.h, sizeR.h);
- m_warning = true;
- }
-
- void OVR::shutdown()
- {
- BX_CHECK(!m_isenabled, "HMD not disabled.");
- ovrHmd_Destroy(m_hmd);
- m_hmd = NULL;
- ovr_Shutdown();
- }
-
- void OVR::getViewport(uint8_t _eye, Rect* _viewport)
- {
- _viewport->m_x = _eye * (m_rtSize.w + OVR_EYE_BUFFER + 1)/2;
- _viewport->m_y = 0;
- _viewport->m_width = (m_rtSize.w - OVR_EYE_BUFFER)/2;
- _viewport->m_height = m_rtSize.h;
- }
-
- bool OVR::postReset(void* _nwh, ovrRenderAPIConfig* _config, bool _debug)
- {
- if (_debug)
- {
- switch (_config->Header.API)
- {
-#if BGFX_CONFIG_RENDERER_DIRECT3D11
- case ovrRenderAPI_D3D11:
- {
- ovrD3D11ConfigData* data = (ovrD3D11ConfigData*)_config;
-# if OVR_VERSION > OVR_VERSION_043
- m_rtSize = data->Header.BackBufferSize;
-# else
- m_rtSize = data->Header.RTSize;
-# endif // OVR_VERSION > OVR_VERSION_043
- }
- break;
-#endif // BGFX_CONFIG_RENDERER_DIRECT3D11
-
-#if BGFX_CONFIG_RENDERER_OPENGL
- case ovrRenderAPI_OpenGL:
- {
- ovrGLConfigData* data = (ovrGLConfigData*)_config;
-# if OVR_VERSION > OVR_VERSION_043
- m_rtSize = data->Header.BackBufferSize;
-# else
- m_rtSize = data->Header.RTSize;
-# endif // OVR_VERSION > OVR_VERSION_043
- }
- break;
-#endif // BGFX_CONFIG_RENDERER_OPENGL
-
- case ovrRenderAPI_None:
- default:
- BX_CHECK(false, "You should not be here!");
- break;
- }
-
- m_debug = true;
- return false;
- }
-
- if (NULL == m_hmd)
- {
- return false;
- }
-
- m_isenabled = true;
-
- ovrBool result;
- result = ovrHmd_AttachToWindow(m_hmd, _nwh, NULL, NULL);
- if (!result) { goto ovrError; }
-
- ovrFovPort eyeFov[2] = { m_hmd->DefaultEyeFov[0], m_hmd->DefaultEyeFov[1] };
- result = ovrHmd_ConfigureRendering(m_hmd
- , _config
- , 0
-#if OVR_VERSION < OVR_VERSION_050
- | ovrDistortionCap_Chromatic // permanently enabled >= v5.0
-#endif
- | ovrDistortionCap_Vignette
- | ovrDistortionCap_TimeWarp
- | ovrDistortionCap_Overdrive
- | ovrDistortionCap_NoRestore
- | ovrDistortionCap_HqDistortion
- , eyeFov
- , m_erd
- );
- if (!result) { goto ovrError; }
-
- ovrHmd_SetEnabledCaps(m_hmd
- , 0
- | ovrHmdCap_LowPersistence
- | ovrHmdCap_DynamicPrediction
- );
-
- result = ovrHmd_ConfigureTracking(m_hmd
- , 0
- | ovrTrackingCap_Orientation
- | ovrTrackingCap_MagYawCorrection
- | ovrTrackingCap_Position
- , 0
- );
-
- if (!result)
- {
-ovrError:
- BX_TRACE("Failed to initialize OVR.");
- m_isenabled = false;
- return false;
- }
-
- m_warning = true;
- return true;
- }
-
- void OVR::postReset(const ovrTexture& _texture)
- {
- if (NULL != m_hmd)
- {
- m_texture[0] = _texture;
- m_texture[1] = _texture;
-
- ovrRecti rect;
- rect.Pos.x = 0;
- rect.Pos.y = 0;
- rect.Size.w = (m_rtSize.w - OVR_EYE_BUFFER)/2;
- rect.Size.h = m_rtSize.h;
-
- m_texture[0].Header.RenderViewport = rect;
-
- rect.Pos.x += rect.Size.w + OVR_EYE_BUFFER;
- m_texture[1].Header.RenderViewport = rect;
-
- m_timing = ovrHmd_BeginFrame(m_hmd, 0);
-#if OVR_VERSION > OVR_VERSION_042
- m_pose[0] = ovrHmd_GetHmdPosePerEye(m_hmd, ovrEye_Left);
- m_pose[1] = ovrHmd_GetHmdPosePerEye(m_hmd, ovrEye_Right);
-#else
- m_pose[0] = ovrHmd_GetEyePose(m_hmd, ovrEye_Left);
- m_pose[1] = ovrHmd_GetEyePose(m_hmd, ovrEye_Right);
-#endif // OVR_VERSION > OVR_VERSION_042
- }
- }
-
- void OVR::preReset()
- {
- if (m_isenabled)
- {
- ovrHmd_EndFrame(m_hmd, m_pose, m_texture);
- ovrHmd_AttachToWindow(m_hmd, NULL, NULL, NULL);
- ovrHmd_ConfigureRendering(m_hmd, NULL, 0, NULL, NULL);
- m_isenabled = false;
- }
-
- m_debug = false;
- }
-
- bool OVR::swap(HMD& _hmd)
- {
- _hmd.flags = BGFX_HMD_NONE;
-
- if (NULL != m_hmd)
- {
- _hmd.flags |= BGFX_HMD_DEVICE_RESOLUTION;
- _hmd.deviceWidth = m_hmd->Resolution.w;
- _hmd.deviceHeight = m_hmd->Resolution.h;
- }
-
- if (!m_isenabled)
- {
- return false;
- }
-
- _hmd.flags |= BGFX_HMD_RENDERING;
- ovrHmd_EndFrame(m_hmd, m_pose, m_texture);
-
- if (m_warning)
- {
- m_warning = !ovrHmd_DismissHSWDisplay(m_hmd);
- }
-
- m_timing = ovrHmd_BeginFrame(m_hmd, 0);
-
-#if OVR_VERSION > OVR_VERSION_042
- m_pose[0] = ovrHmd_GetHmdPosePerEye(m_hmd, ovrEye_Left);
- m_pose[1] = ovrHmd_GetHmdPosePerEye(m_hmd, ovrEye_Right);
-#else
- m_pose[0] = ovrHmd_GetEyePose(m_hmd, ovrEye_Left);
- m_pose[1] = ovrHmd_GetEyePose(m_hmd, ovrEye_Right);
-#endif // OVR_VERSION > OVR_VERSION_042
-
- getEyePose(_hmd);
-
- return true;
- }
-
- void OVR::recenter()
- {
- if (NULL != m_hmd)
- {
- ovrHmd_RecenterPose(m_hmd);
- }
- }
-
- void OVR::getEyePose(HMD& _hmd)
- {
- if (NULL != m_hmd)
- {
- for (int ii = 0; ii < 2; ++ii)
- {
- const ovrPosef& pose = m_pose[ii];
- HMD::Eye& eye = _hmd.eye[ii];
- eye.rotation[0] = pose.Orientation.x;
- eye.rotation[1] = pose.Orientation.y;
- eye.rotation[2] = pose.Orientation.z;
- eye.rotation[3] = pose.Orientation.w;
- eye.translation[0] = pose.Position.x;
- eye.translation[1] = pose.Position.y;
- eye.translation[2] = pose.Position.z;
-
- const ovrEyeRenderDesc& erd = m_erd[ii];
- eye.fov[0] = erd.Fov.UpTan;
- eye.fov[1] = erd.Fov.DownTan;
- eye.fov[2] = erd.Fov.LeftTan;
- eye.fov[3] = erd.Fov.RightTan;
-#if OVR_VERSION > OVR_VERSION_042
- eye.viewOffset[0] = erd.HmdToEyeViewOffset.x;
- eye.viewOffset[1] = erd.HmdToEyeViewOffset.y;
- eye.viewOffset[2] = erd.HmdToEyeViewOffset.z;
-#else
- eye.viewOffset[0] = erd.ViewAdjust.x;
- eye.viewOffset[1] = erd.ViewAdjust.y;
- eye.viewOffset[2] = erd.ViewAdjust.z;
-#endif // OVR_VERSION > OVR_VERSION_042
- eye.pixelsPerTanAngle[0] = erd.PixelsPerTanAngleAtCenter.x;
- eye.pixelsPerTanAngle[1] = erd.PixelsPerTanAngleAtCenter.y;
- }
- }
- else
- {
- for (int ii = 0; ii < 2; ++ii)
- {
- _hmd.eye[ii].rotation[0] = 0.0f;
- _hmd.eye[ii].rotation[1] = 0.0f;
- _hmd.eye[ii].rotation[2] = 0.0f;
- _hmd.eye[ii].rotation[3] = 1.0f;
- _hmd.eye[ii].translation[0] = 0.0f;
- _hmd.eye[ii].translation[1] = 0.0f;
- _hmd.eye[ii].translation[2] = 0.0f;
- _hmd.eye[ii].fov[0] = 1.32928634f;
- _hmd.eye[ii].fov[1] = 1.32928634f;
- _hmd.eye[ii].fov[2] = 0 == ii ? 1.05865765f : 1.09236801f;
- _hmd.eye[ii].fov[3] = 0 == ii ? 1.09236801f : 1.05865765f;
- _hmd.eye[ii].viewOffset[0] = 0 == ii ? 0.0355070010f : -0.0375000015f;
- _hmd.eye[ii].viewOffset[1] = 0.0f;
- _hmd.eye[ii].viewOffset[2] = 0 == ii ? 0.00150949787f : -0.00150949787f;
- _hmd.eye[ii].pixelsPerTanAngle[0] = 1;
- _hmd.eye[ii].pixelsPerTanAngle[1] = 1;
- }
- }
-
- _hmd.width = uint16_t(m_rtSize.w);
- _hmd.height = uint16_t(m_rtSize.h);
- }
-
-} // namespace bgfx
-
-#endif // BGFX_CONFIG_USE_OVR
diff --git a/3rdparty/bgfx/src/renderer_d3d11.cpp b/3rdparty/bgfx/src/renderer_d3d11.cpp
index cd794028c30..140f6a344c1 100644
--- a/3rdparty/bgfx/src/renderer_d3d11.cpp
+++ b/3rdparty/bgfx/src/renderer_d3d11.cpp
@@ -635,8 +635,6 @@ namespace bgfx { namespace d3d11
, m_fsChanges(0)
, m_rtMsaa(false)
, m_timerQuerySupport(false)
- , m_ovrRtv(NULL)
- , m_ovrDsv(NULL)
{
m_fbh.idx = invalidHandle;
memset(&m_adapterDesc, 0, sizeof(m_adapterDesc) );
@@ -1016,6 +1014,13 @@ namespace bgfx { namespace d3d11
}
}
+ if (NULL != m_renderdocdll)
+ {
+ // RenderDoc doesn't support ID3D11Device3 yet:
+ // https://github.com/baldurk/renderdoc/issues/235
+ m_deviceInterfaceVersion = bx::uint32_min(m_deviceInterfaceVersion, 1);
+ }
+
IDXGIDevice* device = NULL;
IDXGIAdapter* adapter = NULL;
hr = E_FAIL;
@@ -1071,13 +1076,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
DX_RELEASE(device, 2);
}
+ memset(&m_adapterDesc, 0, sizeof(m_adapterDesc) );
hr = adapter->GetDesc(&m_adapterDesc);
- if (FAILED(hr) )
- {
- BX_TRACE("Unable to create Direct3D11 device.");
- DX_RELEASE(adapter, 2);
- goto error;
- }
+ BX_WARN(SUCCEEDED(hr), "Adapter GetDesc failed 0x%08x.", hr);
g_caps.vendorId = 0 == m_adapterDesc.VendorId
? BGFX_PCI_ID_SOFTWARE_RASTERIZER
@@ -1224,7 +1225,6 @@ BX_PRAGMA_DIAGNOSTIC_POP();
}
{
-
UniformHandle handle = BGFX_INVALID_HANDLE;
for (uint32_t ii = 0; ii < PredefinedUniform::Count; ++ii)
{
@@ -1350,140 +1350,168 @@ BX_PRAGMA_DIAGNOSTIC_POP();
if (DXGI_FORMAT_UNKNOWN != fmt)
{
- struct D3D11_FEATURE_DATA_FORMAT_SUPPORT
+ if (BX_ENABLED(BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT) )
{
- DXGI_FORMAT InFormat;
- UINT OutFormatSupport;
- };
+ struct D3D11_FEATURE_DATA_FORMAT_SUPPORT
+ {
+ DXGI_FORMAT InFormat;
+ UINT OutFormatSupport;
+ };
- D3D11_FEATURE_DATA_FORMAT_SUPPORT data; // D3D11_FEATURE_DATA_FORMAT_SUPPORT2
- data.InFormat = fmt;
- hr = m_device->CheckFeatureSupport(D3D11_FEATURE_FORMAT_SUPPORT, &data, sizeof(data) );
- if (SUCCEEDED(hr) )
- {
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_TEXTURE2D
- | D3D11_FORMAT_SUPPORT_TEXTURE3D
- | D3D11_FORMAT_SUPPORT_TEXTURECUBE
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_2D
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
+ D3D11_FEATURE_DATA_FORMAT_SUPPORT data; // D3D11_FEATURE_DATA_FORMAT_SUPPORT2
+ data.InFormat = fmt;
+ hr = m_device->CheckFeatureSupport(D3D11_FEATURE_FORMAT_SUPPORT, &data, sizeof(data) );
+ if (SUCCEEDED(hr) )
+ {
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_TEXTURE2D
+ | D3D11_FORMAT_SUPPORT_TEXTURE3D
+ | D3D11_FORMAT_SUPPORT_TEXTURECUBE
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_2D
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_TEXTURE3D
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_3D
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_TEXTURE3D
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_3D
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_TEXTURECUBE
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_CUBE
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_TEXTURECUBE
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_CUBE
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_BUFFER
- | D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER
- | D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_VERTEX
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_BUFFER
+ | D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER
+ | D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_VERTEX
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_SHADER_LOAD
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_IMAGE
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_SHADER_LOAD
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_IMAGE
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_RENDER_TARGET
- | D3D11_FORMAT_SUPPORT_DEPTH_STENCIL
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_RENDER_TARGET
+ | D3D11_FORMAT_SUPPORT_DEPTH_STENCIL
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_MSAA
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_MSAA
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+ }
+ else
+ {
+ BX_TRACE("CheckFeatureSupport failed with %x for format %s.", hr, getName(TextureFormat::Enum(ii) ) );
+ }
+
+ if (0 != (support & BGFX_CAPS_FORMAT_TEXTURE_IMAGE) )
+ {
+ // clear image flag for additional testing
+ support &= ~BGFX_CAPS_FORMAT_TEXTURE_IMAGE;
+
+ data.InFormat = s_textureFormat[ii].m_fmt;
+ hr = m_device->CheckFeatureSupport(D3D11_FEATURE_FORMAT_SUPPORT2, &data, sizeof(data) );
+ if (SUCCEEDED(hr) )
+ {
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD
+ | D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_IMAGE
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+ }
+ }
}
else
{
- BX_TRACE("CheckFeatureSupport failed with %x for format %s.", hr, getName(TextureFormat::Enum(ii) ) );
+ support |= 0
+ | BGFX_CAPS_FORMAT_TEXTURE_2D
+ | BGFX_CAPS_FORMAT_TEXTURE_3D
+ | BGFX_CAPS_FORMAT_TEXTURE_CUBE
+ | BGFX_CAPS_FORMAT_TEXTURE_IMAGE
+ | BGFX_CAPS_FORMAT_TEXTURE_VERTEX
+ | BGFX_CAPS_FORMAT_TEXTURE_IMAGE
+ | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER
+ | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA
+ | BGFX_CAPS_FORMAT_TEXTURE_MSAA
+ ;
}
+ }
- if (0 != (support & BGFX_CAPS_FORMAT_TEXTURE_IMAGE) )
+ if (DXGI_FORMAT_UNKNOWN != fmtSrgb)
+ {
+ if (BX_ENABLED(BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT) )
{
- // clear image flag for additional testing
- support &= ~BGFX_CAPS_FORMAT_TEXTURE_IMAGE;
+ struct D3D11_FEATURE_DATA_FORMAT_SUPPORT
+ {
+ DXGI_FORMAT InFormat;
+ UINT OutFormatSupport;
+ };
- data.InFormat = s_textureFormat[ii].m_fmt;
- hr = m_device->CheckFeatureSupport(D3D11_FEATURE_FORMAT_SUPPORT2, &data, sizeof(data) );
+ D3D11_FEATURE_DATA_FORMAT_SUPPORT data; // D3D11_FEATURE_DATA_FORMAT_SUPPORT2
+ data.InFormat = fmtSrgb;
+ hr = m_device->CheckFeatureSupport(D3D11_FEATURE_FORMAT_SUPPORT, &data, sizeof(data) );
if (SUCCEEDED(hr) )
{
support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD
- | D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE
+ | D3D11_FORMAT_SUPPORT_TEXTURE2D
) )
- ? BGFX_CAPS_FORMAT_TEXTURE_IMAGE
+ ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB
: BGFX_CAPS_FORMAT_TEXTURE_NONE
;
- }
- }
- }
- if (DXGI_FORMAT_UNKNOWN != fmtSrgb)
- {
- struct D3D11_FEATURE_DATA_FORMAT_SUPPORT
- {
- DXGI_FORMAT InFormat;
- UINT OutFormatSupport;
- };
-
- D3D11_FEATURE_DATA_FORMAT_SUPPORT data; // D3D11_FEATURE_DATA_FORMAT_SUPPORT2
- data.InFormat = fmtSrgb;
- hr = m_device->CheckFeatureSupport(D3D11_FEATURE_FORMAT_SUPPORT, &data, sizeof(data) );
- if (SUCCEEDED(hr) )
- {
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_TEXTURE2D
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
-
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_TEXTURE3D
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_TEXTURE3D
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
- support |= 0 != (data.OutFormatSupport & (0
- | D3D11_FORMAT_SUPPORT_TEXTURECUBE
- ) )
- ? BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB
- : BGFX_CAPS_FORMAT_TEXTURE_NONE
- ;
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_TEXTURECUBE
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+ }
+ else
+ {
+ BX_TRACE("CheckFeatureSupport failed with %x for sRGB format %s.", hr, getName(TextureFormat::Enum(ii) ) );
+ }
}
else
{
- BX_TRACE("CheckFeatureSupport failed with %x for sRGB format %s.", hr, getName(TextureFormat::Enum(ii) ) );
+ support |= 0
+ | BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB
+ | BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB
+ | BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB
+ ;
}
}
@@ -2001,10 +2029,6 @@ BX_PRAGMA_DIAGNOSTIC_POP();
uint32_t width = getBufferWidth();
uint32_t height = getBufferHeight();
- if (m_ovr.isEnabled() )
- {
- m_ovr.getSize(width, height);
- }
FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
setFrameBuffer(fbh, false);
@@ -2132,7 +2156,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
ovrPostReset();
// If OVR doesn't create separate depth stencil view, create default one.
- if (NULL == m_backBufferDepthStencil)
+ if (!m_ovr.isEnabled() && NULL == m_backBufferDepthStencil)
{
D3D11_TEXTURE2D_DESC dsd;
dsd.Width = getBufferWidth();
@@ -2192,9 +2216,18 @@ BX_PRAGMA_DIAGNOSTIC_POP();
if (SUCCEEDED(hr) )
{
- if (!m_ovr.swap(_hmd) )
+ switch (m_ovr.swap(_hmd, false) )
{
+ case OVR::NotEnabled:
hr = m_swapChain->Present(syncInterval, 0);
+ break;
+
+ case OVR::DeviceLost:
+ ovrPreReset();
+ break;
+
+ default:
+ break;
}
}
@@ -3083,77 +3116,25 @@ BX_PRAGMA_DIAGNOSTIC_POP();
void ovrPostReset()
{
#if BGFX_CONFIG_USE_OVR
- if (m_flags & (BGFX_RESET_HMD|BGFX_RESET_HMD_DEBUG) )
+ if (m_resolution.m_flags & (BGFX_RESET_HMD|BGFX_RESET_HMD_DEBUG) )
{
- ovrD3D11Config config;
- config.D3D11.Header.API = ovrRenderAPI_D3D11;
-# if OVR_VERSION > OVR_VERSION_043
- config.D3D11.Header.BackBufferSize.w = m_scd.BufferDesc.Width;
- config.D3D11.Header.BackBufferSize.h = m_scd.BufferDesc.Height;
- config.D3D11.pBackBufferUAV = NULL;
-# else
- config.D3D11.Header.RTSize.w = m_scd.BufferDesc.Width;
- config.D3D11.Header.RTSize.h = m_scd.BufferDesc.Height;
-# endif // OVR_VERSION > OVR_VERSION_042
- config.D3D11.Header.Multisample = 0;
- config.D3D11.pDevice = m_device;
- config.D3D11.pDeviceContext = m_deviceCtx;
- config.D3D11.pBackBufferRT = m_backBufferColor;
- config.D3D11.pSwapChain = m_swapChain;
- if (m_ovr.postReset(g_platformData.nwh, &config.Config, !!(m_flags & BGFX_RESET_HMD_DEBUG) ) )
+ if (m_ovr.postReset() )
{
- uint32_t size = sizeof(uint32_t) + sizeof(TextureCreate);
- const Memory* mem = alloc(size);
-
- bx::StaticMemoryBlockWriter writer(mem->data, mem->size);
- uint32_t magic = BGFX_CHUNK_MAGIC_TEX;
- bx::write(&writer, magic);
-
- TextureCreate tc;
- tc.m_flags = BGFX_TEXTURE_RT|( ((m_flags & BGFX_RESET_MSAA_MASK) >> BGFX_RESET_MSAA_SHIFT) << BGFX_TEXTURE_RT_MSAA_SHIFT);
- tc.m_width = m_ovr.m_rtSize.w;
- tc.m_height = m_ovr.m_rtSize.h;
- tc.m_sides = 0;
- tc.m_depth = 0;
- tc.m_numMips = 1;
- tc.m_format = uint8_t(bgfx::TextureFormat::BGRA8);
- tc.m_cubeMap = false;
- tc.m_mem = NULL;
- bx::write(&writer, tc);
- m_ovrRT.create(mem, tc.m_flags, 0);
-
- release(mem);
-
- DX_CHECK(m_device->CreateRenderTargetView(m_ovrRT.m_ptr, NULL, &m_ovrRtv) );
-
- D3D11_TEXTURE2D_DESC dsd;
- dsd.Width = m_ovr.m_rtSize.w;
- dsd.Height = m_ovr.m_rtSize.h;
- dsd.MipLevels = 1;
- dsd.ArraySize = 1;
- dsd.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
- dsd.SampleDesc = m_scd.SampleDesc;
- dsd.Usage = D3D11_USAGE_DEFAULT;
- dsd.BindFlags = D3D11_BIND_DEPTH_STENCIL;
- dsd.CPUAccessFlags = 0;
- dsd.MiscFlags = 0;
-
- ID3D11Texture2D* depthStencil;
- DX_CHECK(m_device->CreateTexture2D(&dsd, NULL, &depthStencil) );
- DX_CHECK(m_device->CreateDepthStencilView(depthStencil, NULL, &m_ovrDsv) );
- DX_RELEASE(depthStencil, 0);
-
- ovrD3D11Texture texture;
- texture.D3D11.Header.API = ovrRenderAPI_D3D11;
- texture.D3D11.Header.TextureSize = m_ovr.m_rtSize;
- texture.D3D11.pTexture = m_ovrRT.m_texture2d;
- texture.D3D11.pSRView = m_ovrRT.m_srv;
- m_ovr.postReset(texture.Texture);
-
- bx::xchg(m_ovrRtv, m_backBufferColor);
-
- BX_CHECK(NULL == m_backBufferDepthStencil, "");
- bx::xchg(m_ovrDsv, m_backBufferDepthStencil);
+ const uint32_t msaaSamples = 1 << ((m_resolution.m_flags&BGFX_RESET_MSAA_MASK) >> BGFX_RESET_MSAA_SHIFT);
+
+ for (uint32_t ii = 0; ii < 2; ++ii)
+ {
+ // eye buffers need to be initialized only once during application lifetime
+ if (NULL == m_ovr.m_eyeBuffers[ii])
+ {
+ m_ovr.m_eyeBuffers[ii] = &m_ovrBuffers[ii];
+ m_ovr.m_eyeBuffers[ii]->create(m_ovr.m_hmd, ii, msaaSamples);
+ }
+ }
+
+ // recreate mirror texture
+ m_ovr.m_mirror = &m_ovrMirror;
+ m_ovr.m_mirror->create(m_ovr.m_hmd, m_resolution.m_width, m_resolution.m_height);
}
}
#endif // BGFX_CONFIG_USE_OVR
@@ -3163,16 +3144,6 @@ BX_PRAGMA_DIAGNOSTIC_POP();
{
#if BGFX_CONFIG_USE_OVR
m_ovr.preReset();
- if (NULL != m_ovrRtv)
- {
- bx::xchg(m_ovrRtv, m_backBufferColor);
- bx::xchg(m_ovrDsv, m_backBufferDepthStencil);
- BX_CHECK(NULL == m_backBufferDepthStencil, "");
-
- DX_RELEASE(m_ovrRtv, 0);
- DX_RELEASE(m_ovrDsv, 0);
- m_ovrRT.destroy();
- }
#endif // BGFX_CONFIG_USE_OVR
}
@@ -3564,9 +3535,10 @@ BX_PRAGMA_DIAGNOSTIC_POP();
bool m_timerQuerySupport;
OVR m_ovr;
- TextureD3D11 m_ovrRT;
- ID3D11RenderTargetView* m_ovrRtv;
- ID3D11DepthStencilView* m_ovrDsv;
+#if BGFX_CONFIG_USE_OVR
+ OVRMirrorD3D11 m_ovrMirror;
+ OVRBufferD3D11 m_ovrBuffers[2];
+#endif // BGFX_CONFIG_USE_OVR
};
static RendererContextD3D11* s_renderD3D11;
@@ -3619,6 +3591,206 @@ BX_PRAGMA_DIAGNOSTIC_POP();
agsDriverExtensions_MultiDrawIndexedInstancedIndirect(s_renderD3D11->m_ags, _numDrawIndirect, _ptr, _offset, _stride);
}
+#if BGFX_CONFIG_USE_OVR
+ void OVRBufferD3D11::create(const ovrSession& _session, int _eyeIdx, int _msaaSamples)
+ {
+ ovrHmdDesc hmdDesc = ovr_GetHmdDesc(_session);
+ m_eyeTextureSize = ovr_GetFovTextureSize(_session, (ovrEyeType)_eyeIdx, hmdDesc.DefaultEyeFov[_eyeIdx], 1.0f);
+ m_msaaTexture = NULL;
+ m_msaaRtv = NULL;
+ m_msaaSv = NULL;
+
+ ovrTextureSwapChainDesc desc = {};
+ desc.Type = ovrTexture_2D;
+ desc.ArraySize = 1;
+ desc.Format = OVR_FORMAT_R8G8B8A8_UNORM_SRGB;
+ desc.Width = m_eyeTextureSize.w;
+ desc.Height = m_eyeTextureSize.h;
+ desc.MipLevels = 1;
+ desc.SampleCount = 1;
+ desc.MiscFlags = ovrTextureMisc_DX_Typeless;
+ desc.BindFlags = ovrTextureBind_DX_RenderTarget;
+ desc.StaticImage = ovrFalse;
+
+ ID3D11Device* device = s_renderD3D11->m_device;
+
+ ovrResult result = ovr_CreateTextureSwapChainDX(_session, device, &desc, &m_textureSwapChain);
+
+ if (!OVR_SUCCESS(result) )
+ {
+ BX_CHECK(false, "Could not create D3D11 OVR swap texture");
+ }
+
+ memset(m_eyeRtv, 0, sizeof(m_eyeRtv) );
+ int textureCount = 0;
+ ovr_GetTextureSwapChainLength(_session, m_textureSwapChain, &textureCount);
+
+ for (int ii = 0; ii < textureCount; ++ii)
+ {
+ ID3D11Texture2D* tex = NULL;
+ ovr_GetTextureSwapChainBufferDX(_session, m_textureSwapChain, ii, IID_PPV_ARGS(&tex) );
+ D3D11_RENDER_TARGET_VIEW_DESC rtvd = {};
+ rtvd.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ rtvd.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
+
+ ID3D11RenderTargetView* rtv;
+ DX_CHECK(device->CreateRenderTargetView(tex, &rtvd, &rtv) );
+ m_eyeRtv[ii] = rtv;
+ DX_RELEASE(tex, 1);
+ }
+
+ // setup depth buffer
+ D3D11_TEXTURE2D_DESC dbDesc;
+ dbDesc.Width = m_eyeTextureSize.w;
+ dbDesc.Height = m_eyeTextureSize.h;
+ dbDesc.MipLevels = 1;
+ dbDesc.ArraySize = 1;
+ dbDesc.Format = DXGI_FORMAT_D32_FLOAT;
+ dbDesc.SampleDesc.Count = _msaaSamples;
+ dbDesc.SampleDesc.Quality = 0;
+ dbDesc.Usage = D3D11_USAGE_DEFAULT;
+ dbDesc.CPUAccessFlags = 0;
+ dbDesc.MiscFlags = 0;
+ dbDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL;
+ ID3D11Texture2D* tex;
+ DX_CHECK(device->CreateTexture2D(&dbDesc, NULL, &tex) );
+ DX_CHECK(device->CreateDepthStencilView(tex, NULL, &m_depthBuffer) );
+ DX_RELEASE(tex, 0);
+
+ // create MSAA render target
+ if (_msaaSamples > 1)
+ {
+ D3D11_TEXTURE2D_DESC dsDesc;
+ dsDesc.Width = m_eyeTextureSize.w;
+ dsDesc.Height = m_eyeTextureSize.h;
+ dsDesc.MipLevels = 1;
+ dsDesc.ArraySize = 1;
+ dsDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ dsDesc.SampleDesc.Count = _msaaSamples;
+ dsDesc.SampleDesc.Quality = 0;
+ dsDesc.Usage = D3D11_USAGE_DEFAULT;
+ dsDesc.CPUAccessFlags = 0;
+ dsDesc.MiscFlags = 0;
+ dsDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET;
+
+ ID3D11Device* device = s_renderD3D11->m_device;
+ DX_CHECK(device->CreateTexture2D(&dsDesc, NULL, &m_msaaTexture));
+ DX_CHECK(device->CreateShaderResourceView(m_msaaTexture, NULL, &m_msaaSv));
+ DX_CHECK(device->CreateRenderTargetView(m_msaaTexture, NULL, &m_msaaRtv));
+ }
+ }
+
+ void OVRBufferD3D11::render(const ovrSession& _session)
+ {
+ ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx;
+ float black[] = { 0.0f, 0.0f, 0.0f, 0.0f }; // Important that alpha=0, if want pixels to be transparent, for manual layers
+
+ // render to MSAA target
+ if (NULL != m_msaaTexture)
+ {
+ deviceCtx->OMSetRenderTargets(1, &m_msaaRtv, m_depthBuffer);
+ deviceCtx->ClearRenderTargetView(m_msaaRtv, black);
+ deviceCtx->ClearDepthStencilView(m_depthBuffer, D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1, 0);
+ }
+ else // MSAA disabled? render directly to eye buffer
+ {
+ int texIndex = 0;
+ ovr_GetTextureSwapChainCurrentIndex(_session, m_textureSwapChain, &texIndex);
+
+ deviceCtx->OMSetRenderTargets(1, &m_eyeRtv[texIndex], m_depthBuffer);
+ deviceCtx->ClearRenderTargetView(m_eyeRtv[texIndex], black);
+ deviceCtx->ClearDepthStencilView(m_depthBuffer, D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1, 0);
+
+ D3D11_VIEWPORT D3Dvp;
+ D3Dvp.TopLeftX = 0;
+ D3Dvp.TopLeftY = 0;
+ D3Dvp.Width = (FLOAT)m_eyeTextureSize.w;
+ D3Dvp.Height = (FLOAT)m_eyeTextureSize.h;
+ D3Dvp.MinDepth = 0;
+ D3Dvp.MaxDepth = 1;
+ deviceCtx->RSSetViewports(1, &D3Dvp);
+ }
+ }
+
+ void OVRBufferD3D11::postRender(const ovrSession& _session)
+ {
+ if (NULL != m_msaaTexture)
+ {
+ ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx;
+ int destIndex = 0;
+ ovr_GetTextureSwapChainCurrentIndex(_session, m_textureSwapChain, &destIndex);
+ ID3D11Resource* dstTex = NULL;
+ ovr_GetTextureSwapChainBufferDX(_session, m_textureSwapChain, destIndex, IID_PPV_ARGS(&dstTex));
+ deviceCtx->ResolveSubresource(dstTex, 0, m_msaaTexture, 0, DXGI_FORMAT_R8G8B8A8_UNORM);
+ dstTex->Release();
+ }
+ }
+
+ void OVRBufferD3D11::destroy(const ovrSession& _session)
+ {
+ for (uint32_t ii = 0; ii < BX_COUNTOF(m_eyeRtv); ++ii)
+ {
+ DX_RELEASE(m_eyeRtv[ii], 0);
+ }
+
+ ovr_DestroyTextureSwapChain(_session, m_textureSwapChain);
+ m_depthBuffer->Release();
+
+ if (NULL != m_msaaTexture)
+ {
+ m_msaaTexture->Release();
+ m_msaaTexture = NULL;
+ }
+
+ if (NULL != m_msaaSv)
+ {
+ m_msaaSv->Release();
+ m_msaaSv = NULL;
+ }
+
+ if (NULL != m_msaaRtv)
+ {
+ m_msaaRtv->Release();
+ m_msaaRtv = NULL;
+ }
+ }
+
+ void OVRMirrorD3D11::create(const ovrSession& _session, int _width, int _height)
+ {
+ m_mirrorTextureDesc.Format = OVR_FORMAT_R8G8B8A8_UNORM_SRGB;
+ m_mirrorTextureDesc.Width = _width;
+ m_mirrorTextureDesc.Height = _height;
+ ovrResult result = ovr_CreateMirrorTextureDX(_session, s_renderD3D11->m_device, &m_mirrorTextureDesc, &m_mirrorTexture);
+ BX_WARN(OVR_SUCCESS(result), "Could not create D3D11 OVR mirror texture");
+ }
+
+ void OVRMirrorD3D11::destroy(const ovrSession& session)
+ {
+ if (NULL != m_mirrorTexture)
+ {
+ ovr_DestroyMirrorTexture(session, m_mirrorTexture);
+ m_mirrorTexture = NULL;
+ }
+ }
+
+ void OVRMirrorD3D11::blit(const ovrSession& _session)
+ {
+ if (NULL != m_mirrorTexture)
+ {
+ ID3D11Texture2D* tex = NULL;
+ ovr_GetMirrorTextureBufferDX(_session, m_mirrorTexture, IID_PPV_ARGS(&tex) );
+ ID3D11Texture2D* backBuffer;
+ DX_CHECK(s_renderD3D11->m_swapChain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&backBuffer) );
+
+ s_renderD3D11->m_deviceCtx->CopyResource(backBuffer, tex);
+ DX_CHECK(s_renderD3D11->m_swapChain->Present(0, 0) );
+
+ DX_RELEASE(tex, 1);
+ DX_RELEASE(backBuffer, 0);
+ }
+ }
+#endif // BGFX_CONFIG_USE_OVR
+
struct UavFormat
{
DXGI_FORMAT format[3];
@@ -4864,7 +5036,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
_render->m_hmdInitialized = m_ovr.isInitialized();
- const bool hmdEnabled = m_ovr.isEnabled() || m_ovr.isDebug();
+ const bool hmdEnabled = m_ovr.isEnabled();
ViewState viewState(_render, hmdEnabled);
bool wireframe = !!(_render->m_debug&BGFX_DEBUG_WIREFRAME);
@@ -4987,6 +5159,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
if (m_ovr.isEnabled() )
{
m_ovr.getViewport(eye, &viewState.m_rect);
+ m_ovr.renderEyeStart(eye);
}
else
{
diff --git a/3rdparty/bgfx/src/renderer_d3d11.h b/3rdparty/bgfx/src/renderer_d3d11.h
index dbe16a984d0..84dd0c61981 100644
--- a/3rdparty/bgfx/src/renderer_d3d11.h
+++ b/3rdparty/bgfx/src/renderer_d3d11.h
@@ -32,8 +32,9 @@ BX_PRAGMA_DIAGNOSTIC_POP()
#include "renderer.h"
#include "renderer_d3d.h"
#include "shader_dxbc.h"
-#include "ovr.h"
-#include "renderdoc.h"
+#include "hmd_ovr.h"
+#include "hmd_openvr.h"
+#include "debug_renderdoc.h"
#ifndef D3DCOLOR_ARGB
# define D3DCOLOR_ARGB(_a, _r, _g, _b) ( (DWORD)( ( ( (_a)&0xff)<<24)|( ( (_r)&0xff)<<16)|( ( (_g)&0xff)<<8)|( (_b)&0xff) ) )
@@ -59,6 +60,29 @@ BX_PRAGMA_DIAGNOSTIC_POP()
namespace bgfx { namespace d3d11
{
+#if BGFX_CONFIG_USE_OVR
+ struct OVRBufferD3D11 : public OVRBufferI
+ {
+ virtual void create(const ovrSession& _session, int _eyeIdx, int _msaaSamples) BX_OVERRIDE;
+ virtual void destroy(const ovrSession& _session) BX_OVERRIDE;
+ virtual void render(const ovrSession& _session) BX_OVERRIDE;
+ virtual void postRender(const ovrSession& _session) BX_OVERRIDE;
+
+ ID3D11RenderTargetView* m_eyeRtv[4];
+ ID3D11DepthStencilView* m_depthBuffer;
+ ID3D11Texture2D* m_msaaTexture;
+ ID3D11ShaderResourceView* m_msaaSv;
+ ID3D11RenderTargetView* m_msaaRtv;
+ };
+
+ struct OVRMirrorD3D11 : public OVRMirrorI
+ {
+ virtual void create(const ovrSession& _session, int _width, int _height) BX_OVERRIDE;
+ virtual void destroy(const ovrSession& session) BX_OVERRIDE;
+ virtual void blit(const ovrSession& session) BX_OVERRIDE;
+ };
+#endif // BGFX_CONFIG_USE_OVR
+
struct BufferD3D11
{
BufferD3D11()
diff --git a/3rdparty/bgfx/src/renderer_gl.cpp b/3rdparty/bgfx/src/renderer_gl.cpp
index ca09b64eba1..10f5a1c3fd9 100644
--- a/3rdparty/bgfx/src/renderer_gl.cpp
+++ b/3rdparty/bgfx/src/renderer_gl.cpp
@@ -1304,7 +1304,6 @@ namespace bgfx { namespace gl
, m_hash( (BX_PLATFORM_WINDOWS<<1) | BX_ARCH_64BIT)
, m_backBufferFbo(0)
, m_msaaBackBufferFbo(0)
- , m_ovrFbo(0)
{
memset(m_msaaBackBufferRbos, 0, sizeof(m_msaaBackBufferRbos) );
}
@@ -1818,6 +1817,17 @@ namespace bgfx { namespace gl
);
}
+// if (s_extension[Extension::ARB_clip_control].m_supported)
+// {
+// GL_CHECK(glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE) );
+// g_caps.originBottomLeft = true;
+// }
+// else
+ {
+ g_caps.homogeneousDepth = true;
+ g_caps.originBottomLeft = true;
+ }
+
m_vaoSupport = !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30)
|| s_extension[Extension::ARB_vertex_array_object].m_supported
|| s_extension[Extension::OES_vertex_array_object].m_supported
@@ -2096,10 +2106,18 @@ namespace bgfx { namespace gl
m_glctx.swap(m_frameBuffers[m_windows[ii].idx].m_swapChain);
}
- if (!m_ovr.swap(_hmd) )
+ switch (m_ovr.swap(_hmd, true) )
{
- m_glctx.swap();
+ case OVR::DeviceLost:
+ ovrPreReset();
+ break;
+
+ default:
+ break;
}
+
+ // need to swap GL render context even if OVR is enabled to get the mirror texture in the output
+ m_glctx.swap();
}
}
@@ -2386,10 +2404,6 @@ namespace bgfx { namespace gl
uint32_t width = m_resolution.m_width;
uint32_t height = m_resolution.m_height;
- if (m_ovr.isEnabled() )
- {
- m_ovr.getSize(width, height);
- }
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_backBufferFbo) );
GL_CHECK(glViewport(0, 0, width, height) );
@@ -2848,61 +2862,23 @@ namespace bgfx { namespace gl
#if BGFX_CONFIG_USE_OVR
if (m_resolution.m_flags & (BGFX_RESET_HMD|BGFX_RESET_HMD_DEBUG) )
{
- ovrGLConfig config;
- config.OGL.Header.API = ovrRenderAPI_OpenGL;
-# if OVR_VERSION > OVR_VERSION_043
- config.OGL.Header.BackBufferSize.w = m_resolution.m_width;
- config.OGL.Header.BackBufferSize.h = m_resolution.m_height;
-# else
- config.OGL.Header.RTSize.w = m_resolution.m_width;
- config.OGL.Header.RTSize.h = m_resolution.m_height;
-# endif // OVR_VERSION > OVR_VERSION_043
- config.OGL.Header.Multisample = 0;
- config.OGL.Window = (HWND)g_platformData.nwh;
- config.OGL.DC = GetDC(config.OGL.Window);
- if (m_ovr.postReset(g_platformData.nwh, &config.Config, !!(m_resolution.m_flags & BGFX_RESET_HMD_DEBUG) ) )
+ if (m_ovr.postReset() )
{
- uint32_t size = sizeof(uint32_t) + sizeof(TextureCreate);
- const Memory* mem = alloc(size);
-
- bx::StaticMemoryBlockWriter writer(mem->data, mem->size);
- uint32_t magic = BGFX_CHUNK_MAGIC_TEX;
- bx::write(&writer, magic);
-
- TextureCreate tc;
- tc.m_flags = BGFX_TEXTURE_RT|( ((m_resolution.m_flags & BGFX_RESET_MSAA_MASK) >> BGFX_RESET_MSAA_SHIFT) << BGFX_TEXTURE_RT_MSAA_SHIFT);;
- tc.m_width = m_ovr.m_rtSize.w;
- tc.m_height = m_ovr.m_rtSize.h;
- tc.m_sides = 0;
- tc.m_depth = 0;
- tc.m_numMips = 1;
- tc.m_format = uint8_t(bgfx::TextureFormat::BGRA8);
- tc.m_cubeMap = false;
- tc.m_mem = NULL;
- bx::write(&writer, tc);
-
- m_ovrRT.create(mem, tc.m_flags, 0);
- release(mem);
-
- m_ovrFbo = m_msaaBackBufferFbo;
-
- GL_CHECK(glGenFramebuffers(1, &m_msaaBackBufferFbo) );
- GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_msaaBackBufferFbo) );
-
- GL_CHECK(glFramebufferTexture2D(GL_FRAMEBUFFER
- , GL_COLOR_ATTACHMENT0
- , GL_TEXTURE_2D
- , m_ovrRT.m_id
- , 0
- ) );
+ const uint32_t msaaSamples = 1 << ((m_resolution.m_flags&BGFX_RESET_MSAA_MASK) >> BGFX_RESET_MSAA_SHIFT);
- GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_ovrFbo) );
+ for (uint32_t ii = 0; ii < 2; ++ii)
+ {
+ // eye buffers need to be initialized only once during application lifetime
+ if (NULL == m_ovr.m_eyeBuffers[ii])
+ {
+ m_ovr.m_eyeBuffers[ii] = &m_ovrBuffers[ii];
+ m_ovr.m_eyeBuffers[ii]->create(m_ovr.m_hmd, ii, msaaSamples);
+ }
+ }
- ovrGLTexture texture;
- texture.OGL.Header.API = ovrRenderAPI_OpenGL;
- texture.OGL.Header.TextureSize = m_ovr.m_rtSize;
- texture.OGL.TexId = m_ovrRT.m_id;
- m_ovr.postReset(texture.Texture);
+ // recreate mirror texture
+ m_ovr.m_mirror = &m_ovrMirror;
+ m_ovr.m_mirror->create(m_ovr.m_hmd, m_resolution.m_width, m_resolution.m_height);
}
}
#endif // BGFX_CONFIG_USE_OVR
@@ -2912,14 +2888,6 @@ namespace bgfx { namespace gl
{
#if BGFX_CONFIG_USE_OVR
m_ovr.preReset();
- if (m_ovr.isEnabled() )
- {
- GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, 0) );
- GL_CHECK(glDeleteFramebuffers(1, &m_msaaBackBufferFbo) );
- m_msaaBackBufferFbo = m_ovrFbo;
- m_ovrFbo = 0;
- m_ovrRT.destroy();
- }
#endif // BGFX_CONFIG_USE_OVR
}
@@ -3343,8 +3311,10 @@ namespace bgfx { namespace gl
const char* m_glslVersion;
OVR m_ovr;
- TextureGL m_ovrRT;
- GLint m_ovrFbo;
+#if BGFX_CONFIG_USE_OVR
+ OVRMirrorGL m_ovrMirror;
+ OVRBufferGL m_ovrBuffers[2];
+#endif // BGFX_CONFIG_USE_OVR
};
RendererContextGL* s_renderGL;
@@ -3363,6 +3333,219 @@ namespace bgfx { namespace gl
s_renderGL = NULL;
}
+#if BGFX_CONFIG_USE_OVR
+ void OVRBufferGL::create(const ovrSession& _session, int _eyeIdx, int _msaaSamples)
+ {
+ m_eyeFbo = 0;
+ m_eyeTexId = 0;
+ m_depthBuffer = 0;
+ m_msaaEyeFbo = 0;
+ m_msaaEyeTexId = 0;
+ m_msaaDepthBuffer = 0;
+
+ ovrHmdDesc hmdDesc = ovr_GetHmdDesc(_session);
+ m_eyeTextureSize = ovr_GetFovTextureSize(_session, ovrEyeType(_eyeIdx), hmdDesc.DefaultEyeFov[_eyeIdx], 1.0f);
+
+ ovrTextureSwapChainDesc desc = {};
+ desc.Type = ovrTexture_2D;
+ desc.ArraySize = 1;
+ desc.Width = m_eyeTextureSize.w;
+ desc.Height = m_eyeTextureSize.h;
+ desc.MipLevels = 1;
+ desc.Format = OVR_FORMAT_R8G8B8A8_UNORM_SRGB;
+ desc.SampleCount = 1;
+ desc.StaticImage = ovrFalse;
+
+ ovr_CreateTextureSwapChainGL(_session, &desc, &m_textureSwapChain);
+
+ int textureCount = 0;
+ ovr_GetTextureSwapChainLength(_session, m_textureSwapChain, &textureCount);
+
+ for (int j = 0; j < textureCount; ++j)
+ {
+ GLuint chainTexId;
+ ovr_GetTextureSwapChainBufferGL(_session, m_textureSwapChain, j, &chainTexId);
+ GL_CHECK(glBindTexture(GL_TEXTURE_2D, chainTexId) );
+
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) );
+ }
+
+ GL_CHECK(glGenFramebuffers(1, &m_eyeFbo) );
+
+ // create depth buffer
+ GL_CHECK(glGenTextures(1, &m_depthBuffer) );
+ GL_CHECK(glBindTexture(GL_TEXTURE_2D, m_depthBuffer) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) );
+
+ GL_CHECK(glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, m_eyeTextureSize.w, m_eyeTextureSize.h, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL) );
+
+ // create MSAA buffers
+ if (_msaaSamples > 1)
+ {
+ GL_CHECK(glGenFramebuffers(1, &m_msaaEyeFbo) );
+
+ // create color MSAA texture
+ GL_CHECK(glGenTextures(1, &m_msaaEyeTexId) );
+ GL_CHECK(glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, m_msaaEyeTexId) );
+
+ GL_CHECK(glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, _msaaSamples, GL_RGBA, m_eyeTextureSize.w, m_eyeTextureSize.h, false) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_MAX_LEVEL, 0) );
+
+ // create MSAA depth buffer
+ GL_CHECK(glGenTextures(1, &m_msaaDepthBuffer) );
+ GL_CHECK(glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, m_msaaDepthBuffer) );
+
+ GL_CHECK(glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, _msaaSamples, GL_DEPTH_COMPONENT, m_eyeTextureSize.w, m_eyeTextureSize.h, false) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR) );
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) );
+
+ GL_CHECK(glTexParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_MAX_LEVEL, 0) );
+ }
+ }
+
+ void OVRBufferGL::render(const ovrSession& _session)
+ {
+ // set the current eye texture in swap chain
+ int curIndex;
+ ovr_GetTextureSwapChainCurrentIndex(_session, m_textureSwapChain, &curIndex);
+ ovr_GetTextureSwapChainBufferGL(_session, m_textureSwapChain, curIndex, &m_eyeTexId);
+
+ if (0 != m_msaaEyeFbo)
+ {
+ GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_msaaEyeFbo) );
+ GL_CHECK(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D_MULTISAMPLE, m_msaaEyeTexId, 0) );
+ GL_CHECK(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D_MULTISAMPLE, m_msaaDepthBuffer, 0) );
+ }
+ else // MSAA disabled? render directly to eye buffer
+ {
+ GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_eyeFbo) );
+ GL_CHECK(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_eyeTexId, 0) );
+ GL_CHECK(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, m_depthBuffer, 0) );
+ }
+ GL_CHECK(glViewport(0, 0, m_eyeTextureSize.w, m_eyeTextureSize.h) );
+ GL_CHECK(glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) );
+ }
+
+ void OVRBufferGL::postRender(const ovrSession& /*_sesion*/)
+ {
+ if (0 != m_msaaEyeFbo && 0 != m_eyeTexId)
+ {
+ // blit the contents of MSAA FBO to the regular eye buffer "connected" to the HMD
+ GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, m_msaaEyeFbo));
+ GL_CHECK(glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D_MULTISAMPLE, m_msaaEyeTexId, 0) );
+ GL_CHECK(glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0) );
+
+ BX_CHECK(GL_FRAMEBUFFER_COMPLETE == glCheckFramebufferStatus(GL_READ_FRAMEBUFFER)
+ , "glCheckFramebufferStatus failed 0x%08x"
+ , glCheckFramebufferStatus(GL_READ_FRAMEBUFFER) );
+
+ GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_eyeFbo));
+ GL_CHECK(glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_eyeTexId, 0) );
+ GL_CHECK(glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0) );
+
+ BX_CHECK(GL_FRAMEBUFFER_COMPLETE == glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER)
+ , "glCheckFramebufferStatus failed 0x%08x"
+ , glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER) );
+
+ GL_CHECK(glBlitFramebuffer(0, 0, m_eyeTextureSize.w, m_eyeTextureSize.h,
+ 0, 0, m_eyeTextureSize.w, m_eyeTextureSize.h, GL_COLOR_BUFFER_BIT, GL_NEAREST) );
+
+ GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, 0) );
+ }
+ }
+
+ void OVRBufferGL::destroy(const ovrSession& _session)
+ {
+ GL_CHECK(glDeleteFramebuffers(1, &m_eyeFbo) );
+ GL_CHECK(glDeleteTextures(1, &m_depthBuffer) );
+
+ ovr_DestroyTextureSwapChain(_session, m_textureSwapChain);
+
+ if (0 != m_msaaEyeFbo)
+ {
+ GL_CHECK(glDeleteFramebuffers(1, &m_msaaEyeFbo) );
+ m_msaaEyeFbo = 0;
+ }
+
+ if (0 != m_msaaEyeTexId)
+ {
+ GL_CHECK(glDeleteTextures(1, &m_msaaEyeTexId));
+ m_msaaEyeTexId = 0;
+ }
+
+ if (0 != m_msaaDepthBuffer)
+ {
+ GL_CHECK(glDeleteTextures(1, &m_msaaDepthBuffer));
+ m_msaaDepthBuffer = 0;
+ }
+ }
+
+ void OVRMirrorGL::create(const ovrSession& _session, int _width, int _height)
+ {
+ memset(&m_mirrorTextureDesc, 0, sizeof(m_mirrorTextureDesc) );
+ m_mirrorTextureDesc.Width = _width;
+ m_mirrorTextureDesc.Height = _height;
+ m_mirrorTextureDesc.Format = OVR_FORMAT_R8G8B8A8_UNORM_SRGB;
+
+ ovr_CreateMirrorTextureGL(_session, &m_mirrorTextureDesc, &m_mirrorTexture);
+
+ // Fallback to doing nothing if mirror was not created. This is to prevent errors with fast window resizes
+ if (!m_mirrorTexture)
+ return;
+
+ // Configure the mirror read buffer
+ GLuint texId;
+ ovr_GetMirrorTextureBufferGL(_session, m_mirrorTexture, &texId);
+ GL_CHECK(glGenFramebuffers(1, &m_mirrorFBO) );
+ GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, m_mirrorFBO) );
+ GL_CHECK(glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texId, 0) );
+ GL_CHECK(glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0) );
+ GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, 0) );
+
+ if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
+ {
+ GL_CHECK(glDeleteFramebuffers(1, &m_mirrorFBO) );
+ BX_CHECK(false, "Could not initialize VR buffers!");
+ }
+ }
+
+ void OVRMirrorGL::destroy(const ovrSession& _session)
+ {
+ if (NULL != m_mirrorTexture)
+ {
+ GL_CHECK(glDeleteFramebuffers(1, &m_mirrorFBO) );
+ ovr_DestroyMirrorTexture(_session, m_mirrorTexture);
+ m_mirrorTexture = NULL;
+ }
+ }
+
+ void OVRMirrorGL::blit(const ovrSession& /*_session*/)
+ {
+ if (NULL != m_mirrorTexture)
+ {
+ // Blit mirror texture to back buffer
+ GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, m_mirrorFBO) );
+ GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0) );
+ GLint width = m_mirrorTextureDesc.Width;
+ GLint height = m_mirrorTextureDesc.Height;
+ GL_CHECK(glBlitFramebuffer(0, height, width, 0, 0, 0, width, height, GL_COLOR_BUFFER_BIT, GL_NEAREST) );
+ GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, 0) );
+ }
+ }
+#endif // BGFX_CONFIG_USE_OVR
+
const char* glslTypeName(GLuint _type)
{
#define GLSL_TYPE(_ty) case _ty: return #_ty
@@ -3636,7 +3819,7 @@ namespace bgfx { namespace gl
}
m_numPredefined = 0;
- m_numSamplers = 0;
+ m_numSamplers = 0;
BX_TRACE("Uniforms (%d):", activeUniforms);
for (int32_t ii = 0; ii < activeUniforms; ++ii)
@@ -5428,7 +5611,7 @@ namespace bgfx { namespace gl
_render->m_hmdInitialized = m_ovr.isInitialized();
- const bool hmdEnabled = m_ovr.isEnabled() || m_ovr.isDebug();
+ const bool hmdEnabled = m_ovr.isEnabled();
ViewState viewState(_render, hmdEnabled);
uint16_t programIdx = invalidHandle;
@@ -5478,12 +5661,13 @@ namespace bgfx { namespace gl
m_occlusionQuery.resolve(_render);
}
+ uint8_t eye = 0;
+
if (0 == (_render->m_debug&BGFX_DEBUG_IFH) )
{
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_msaaBackBufferFbo) );
bool viewRestart = false;
- uint8_t eye = 0;
uint8_t restartState = 0;
viewState.m_rect = _render->m_rect[0];
@@ -5565,6 +5749,7 @@ namespace bgfx { namespace gl
if (m_ovr.isEnabled() )
{
m_ovr.getViewport(eye, &viewState.m_rect);
+ m_ovr.renderEyeStart(eye);
}
else
{
@@ -5584,7 +5769,7 @@ namespace bgfx { namespace gl
}
const Rect& scissorRect = _render->m_scissor[view];
- viewHasScissor = !scissorRect.isZero();
+ viewHasScissor = !scissorRect.isZero();
viewScissorRect = viewHasScissor ? scissorRect : viewState.m_rect;
GL_CHECK(glViewport(viewState.m_rect.m_x
@@ -5666,7 +5851,7 @@ namespace bgfx { namespace gl
const RenderCompute& compute = renderItem.compute;
ProgramGL& program = m_program[key.m_program];
- GL_CHECK(glUseProgram(program.m_id) );
+ GL_CHECK(glUseProgram(program.m_id) );
GLbitfield barrier = 0;
for (uint32_t ii = 0; ii < BGFX_MAX_COMPUTE_BINDINGS; ++ii)
diff --git a/3rdparty/bgfx/src/renderer_gl.h b/3rdparty/bgfx/src/renderer_gl.h
index 65aebcbaa39..527910e559e 100644
--- a/3rdparty/bgfx/src/renderer_gl.h
+++ b/3rdparty/bgfx/src/renderer_gl.h
@@ -107,8 +107,9 @@ typedef uint64_t GLuint64;
#endif // BGFX_CONFIG_RENDERER_OPENGL
#include "renderer.h"
-#include "ovr.h"
-#include "renderdoc.h"
+#include "hmd_ovr.h"
+#include "hmd_openvr.h"
+#include "debug_renderdoc.h"
#ifndef GL_LUMINANCE
# define GL_LUMINANCE 0x1909
@@ -791,6 +792,22 @@ typedef uint64_t GLuint64;
# define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346
#endif // GL_CONSERVATIVE_RASTERIZATION_NV
+#ifndef GL_NEGATIVE_ONE_TO_ONE
+# define GL_NEGATIVE_ONE_TO_ONE 0x935E
+#endif // GL_NEGATIVE_ONE_TO_ONE
+
+#ifndef GL_ZERO_TO_ONE
+# define GL_ZERO_TO_ONE 0x935F
+#endif // GL_ZERO_TO_ONE
+
+#ifndef GL_LOWER_LEFT
+# define GL_LOWER_LEFT 0x8CA1
+#endif // GL_LOWER_LEFT
+
+#ifndef GL_UPPER_LEFT
+# define GL_UPPER_LEFT 0x8CA2
+#endif // GL_UPPER_LEFT
+
// _KHR or _ARB...
#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
@@ -885,6 +902,32 @@ namespace bgfx
namespace bgfx { namespace gl
{
+#if BGFX_CONFIG_USE_OVR
+ struct OVRBufferGL : public OVRBufferI
+ {
+ virtual void create(const ovrSession& _session, int _eyeIdx, int _msaaSamples) BX_OVERRIDE;
+ virtual void destroy(const ovrSession& _session) BX_OVERRIDE;
+ virtual void render(const ovrSession& _session) BX_OVERRIDE;
+ virtual void postRender(const ovrSession& _sesion) BX_OVERRIDE;
+
+ GLuint m_eyeFbo;
+ GLuint m_eyeTexId;
+ GLuint m_depthBuffer;
+ GLuint m_msaaEyeFbo;
+ GLuint m_msaaEyeTexId;
+ GLuint m_msaaDepthBuffer;
+ };
+
+ struct OVRMirrorGL : public OVRMirrorI
+ {
+ virtual void create(const ovrSession& _session, int _width, int _height) BX_OVERRIDE;
+ virtual void destroy(const ovrSession& _session) BX_OVERRIDE;
+ virtual void blit(const ovrSession& _session) BX_OVERRIDE;
+
+ GLuint m_mirrorFBO;
+ };
+#endif // BGFX_CONFIG_USE_OVR
+
void dumpExtensions(const char* _extensions);
const char* glEnumName(GLenum _enum);
@@ -1246,8 +1289,8 @@ namespace bgfx { namespace gl
void create(const ShaderGL& _vsh, const ShaderGL& _fsh);
void destroy();
- void init();
- void bindAttributes(const VertexDecl& _vertexDecl, uint32_t _baseVertex = 0) const;
+ void init();
+ void bindAttributes(const VertexDecl& _vertexDecl, uint32_t _baseVertex = 0) const;
void bindInstanceData(uint32_t _stride, uint32_t _baseVertex = 0) const;
void add(uint32_t _hash)
@@ -1261,8 +1304,8 @@ namespace bgfx { namespace gl
GLint m_attributes[Attrib::Count]; // sparse
GLint m_instanceData[BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT+1];
- GLint m_sampler[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS];
- uint8_t m_numSamplers;
+ GLint m_sampler[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS];
+ uint8_t m_numSamplers;
UniformBuffer* m_constantBuffer;
PredefinedUniform m_predefined[PredefinedUniform::Count];
diff --git a/3rdparty/bgfx/tools/texturec/texturec.cpp b/3rdparty/bgfx/tools/texturec/texturec.cpp
index 12a5bda84bf..21d256ffbbb 100644
--- a/3rdparty/bgfx/tools/texturec/texturec.cpp
+++ b/3rdparty/bgfx/tools/texturec/texturec.cpp
@@ -477,6 +477,19 @@ int main(int _argc, const char* _argv[])
ImageMip dstMip;
imageGetRawData(imageContainer, 0, 0, NULL, 0, dstMip);
+ if (mip.m_width != dstMip.m_width
+ && mip.m_height != dstMip.m_height)
+ {
+ printf("Invalid input image size %dx%d, it must be at least %dx%d to be converted to %s format.\n"
+ , mip.m_width
+ , mip.m_height
+ , dstMip.m_width
+ , dstMip.m_height
+ , getName(format)
+ );
+ return EXIT_FAILURE;
+ }
+
uint32_t size = imageGetSize(TextureFormat::RGBA32F, dstMip.m_width, dstMip.m_height);
temp = BX_ALLOC(&allocator, size);
float* rgba = (float*)temp;
@@ -528,6 +541,19 @@ int main(int _argc, const char* _argv[])
ImageMip dstMip;
imageGetRawData(imageContainer, 0, 0, NULL, 0, dstMip);
+ if (mip.m_width != dstMip.m_width
+ && mip.m_height != dstMip.m_height)
+ {
+ printf("Invalid input image size %dx%d, it must be at least %dx%d to be converted to %s format.\n"
+ , mip.m_width
+ , mip.m_height
+ , dstMip.m_width
+ , dstMip.m_height
+ , getName(format)
+ );
+ return EXIT_FAILURE;
+ }
+
uint32_t size = imageGetSize(TextureFormat::RGBA8, dstMip.m_width, dstMip.m_height);
temp = BX_ALLOC(&allocator, size);
memset(temp, 0, size);
diff --git a/3rdparty/expat/CMake.README b/3rdparty/expat/CMake.README
index eda302d9123..0198e615640 100644
--- a/3rdparty/expat/CMake.README
+++ b/3rdparty/expat/CMake.README
@@ -3,25 +3,25 @@
The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual
Studio) and should work on all other platform cmake supports.
-Assuming ~/expat-2.1.0 is the source directory of expat, add a subdirectory
+Assuming ~/expat-2.1.1 is the source directory of expat, add a subdirectory
build and change into that directory:
-~/expat-2.1.0$ mkdir build && cd build
-~/expat-2.1.0/build$
+~/expat-2.1.1$ mkdir build && cd build
+~/expat-2.1.1/build$
From that directory, call cmake first, then call make, make test and
make install in the usual way:
-~/expat-2.1.0/build$ cmake ..
+~/expat-2.1.1/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
....
-- Configuring done
-- Generating done
--- Build files have been written to: /home/patrick/expat-2.1.0/build
+-- Build files have been written to: /home/patrick/expat-2.1.1/build
If you want to specify the install location for your files, append
-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.
-~/expat-2.1.0/build$ make && make test && make install
+~/expat-2.1.1/build$ make && make test && make install
Scanning dependencies of target expat
[ 5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
diff --git a/3rdparty/expat/CMakeLists.txt b/3rdparty/expat/CMakeLists.txt
index bc930571b41..9e07a5e1b50 100644
--- a/3rdparty/expat/CMakeLists.txt
+++ b/3rdparty/expat/CMakeLists.txt
@@ -6,7 +6,7 @@ project(expat)
cmake_minimum_required(VERSION 2.6)
set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org")
set(PACKAGE_NAME "expat")
-set(PACKAGE_VERSION "2.1.0")
+set(PACKAGE_VERSION "2.1.1")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}")
@@ -86,6 +86,7 @@ if(BUILD_tools AND NOT WINCE)
)
add_executable(xmlwf ${xmlwf_SRCS})
+ set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf)
target_link_libraries(xmlwf expat)
install(TARGETS xmlwf DESTINATION bin)
install(FILES doc/xmlwf.1 DESTINATION share/man/man1)
@@ -93,19 +94,23 @@ endif(BUILD_tools AND NOT WINCE)
if(BUILD_examples)
add_executable(elements examples/elements.c)
+ set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
target_link_libraries(elements expat)
add_executable(outline examples/outline.c)
+ set_property(TARGET outline PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
target_link_libraries(outline expat)
endif(BUILD_examples)
if(BUILD_tests)
## these are unittests that can be run on any platform
add_executable(runtests tests/runtests.c tests/chardata.c tests/minicheck.c)
+ set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
target_link_libraries(runtests expat)
- add_test(runtests runtests)
+ add_test(runtests tests/runtests)
add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c)
+ set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
target_link_libraries(runtestspp expat)
- add_test(runtestspp runtestspp)
+ add_test(runtestspp tests/runtestspp)
endif(BUILD_tests)
diff --git a/3rdparty/expat/Changes b/3rdparty/expat/Changes
index 08897b9f9ed..db5f7f32eb4 100644
--- a/3rdparty/expat/Changes
+++ b/3rdparty/expat/Changes
@@ -1,3 +1,18 @@
+Release 2.1.1 Sat March 12 2016
+ Security fixes:
+ #582: CVE-2015-1283 - Multiple integer overflows in XML_GetBuffer
+
+ Bug fixes:
+ #502: Fix potential null pointer dereference
+ #520: Symbol XML_SetHashSalt was not exported
+ Output of "xmlwf -h" was incomplete
+
+ Other changes
+ #503: Document behavior of calling XML_SetHashSalt with salt 0
+ Minor improvements to man page xmlwf(1)
+ Improvements to the experimental CMake build system
+ libtool now invoked with --verbose
+
Release 2.1.0 Sat March 24 2012
- Bug Fixes:
#1742315: Harmful XML_ParserCreateNS suggestion.
@@ -23,7 +38,7 @@ Release 2.1.0 Sat March 24 2012
#3312568: CMake support.
#3446384: Report byte offsets for attr names and values.
- New Features / API changes:
- Added new API member XML_SetHashSalt() that allows setting an intial
+ Added new API member XML_SetHashSalt() that allows setting an initial
value (salt) for hash calculations. This is part of the fix for
bug #3496608 to randomize hash parameters.
When compiled with XML_ATTR_INFO defined, adds new API member
diff --git a/3rdparty/expat/MANIFEST b/3rdparty/expat/MANIFEST
index 7a020dc05b0..209152706ef 100644
--- a/3rdparty/expat/MANIFEST
+++ b/3rdparty/expat/MANIFEST
@@ -54,7 +54,7 @@ MANIFEST
Makefile.in
README
configure
-configure.in
+configure.ac
expat_config.h.in
expat_config.h.cmake
expat.pc.in
diff --git a/3rdparty/expat/Makefile.in b/3rdparty/expat/Makefile.in
index 9c0f5d49f0f..6863b092bc1 100644
--- a/3rdparty/expat/Makefile.in
+++ b/3rdparty/expat/Makefile.in
@@ -42,7 +42,7 @@ INSTALL_DATA = @INSTALL_DATA@
mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
MANFILE = $(srcdir)/doc/xmlwf.1
-APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h
+APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h expat_config.h
LIBRARY = libexpat.la
DESTDIR = $(INSTALL_ROOT)
@@ -116,7 +116,7 @@ CXXFLAGS = @CXXFLAGS@
VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
### autoconf this?
-LTFLAGS = --silent
+LTFLAGS = --verbose
COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
diff --git a/3rdparty/expat/README b/3rdparty/expat/README
index 1f88467d1b0..9ec8d0c6ade 100644
--- a/3rdparty/expat/README
+++ b/3rdparty/expat/README
@@ -1,5 +1,5 @@
- Expat, Release 2.1.0
+ Expat, Release 2.1.1
This is Expat, a C library for parsing XML, written by James Clark.
Expat is a stream-oriented XML parser. This means that you register
diff --git a/3rdparty/expat/aclocal.m4 b/3rdparty/expat/aclocal.m4
index 6fe5ffd2a6a..f70f488482b 100644
--- a/3rdparty/expat/aclocal.m4
+++ b/3rdparty/expat/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,8450 +11,9 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 57 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
- [m4_default([$3],
- [m4_fatal([Libtool version $1 or higher is required],
- 63)])],
- [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
- *\ * | *\ *)
- AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
-
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_WITH_SYSROOT])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- _LT_PATH_MAGIC
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PREPARE_SED_QUOTE_VARS
-# --------------------------
-# Define a few sed substitution that help us do robust quoting.
-m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
-[# Backslashify metacharacters that are still active within
-# double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-])
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
- [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME. Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
- [m4_ifval([$1], [$1], [$2])])
- lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
- m4_ifval([$4],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
- lt_dict_add_subkey([lt_decl_dict], [$2],
- [tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
- [0], [m4_fatal([$0: too few arguments: $#])],
- [1], [m4_fatal([$0: too few arguments: $#: $1])],
- [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
- [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
- [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
- m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_if([$2], [],
- m4_quote(lt_decl_varnames),
- m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
- lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'. VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly. In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
- [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-# # Some comment about what VAR is for.
-# visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
- [description])))[]dnl
-m4_pushdef([_libtool_name],
- m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
- [0], [_libtool_name=[$]$1],
- [1], [_libtool_name=$lt_[]$1],
- [2], [_libtool_name=$lt_[]$1],
- [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
- m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'. Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
- dnl If the libtool generation code has been placed in $CONFIG_LT,
- dnl instead of duplicating it all over again into config.status,
- dnl then we will have config.status run $CONFIG_LT later, so it
- dnl needs to know what name is stored there:
- [AC_CONFIG_COMMANDS([libtool],
- [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
- dnl If the libtool generation code is destined for config.status,
- dnl expand the accumulated commands and init code now:
- [AC_CONFIG_COMMANDS([libtool],
- [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
- eval 'cat <<_LTECHO_EOF
-\$[]1
-_LTECHO_EOF'
-}
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
- case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
- case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
-# ------------------------------------
-# Generate a child script FILE with all initialization necessary to
-# reuse the environment learned by the parent script, and make the
-# file executable. If COMMENT is supplied, it is inserted after the
-# `#!' sequence but before initialization text begins. After this
-# macro, additional text can be appended to FILE to form the body of
-# the child script. The macro ends with non-zero status if the
-# file could not be fully written (such as if the disk is full).
-m4_ifdef([AS_INIT_GENERATED],
-[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
-[m4_defun([_LT_GENERATED_FILE_INIT],
-[m4_require([AS_PREPARE])]dnl
-[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
-[lt_write_fail=0
-cat >$1 <<_ASEOF || lt_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-$2
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$1 <<\_ASEOF || lt_write_fail=1
-AS_SHELL_SANITIZE
-_AS_PREPARE
-exec AS_MESSAGE_FD>&1
-_ASEOF
-test $lt_write_fail = 0 && chmod +x $1[]dnl
-m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
-[# Run this file to recreate a libtool stub with the current configuration.])
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-lt_cl_silent=false
-exec AS_MESSAGE_LOG_FD>>config.log
-{
- echo
- AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2010 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
- case $[1] in
- --version | --v* | -V )
- echo "$lt_cl_version"; exit 0 ;;
- --help | --h* | -h )
- echo "$lt_cl_help"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --quiet | --q* | --silent | --s* | -q )
- lt_cl_silent=: ;;
-
- -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
- *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
- esac
- shift
-done
-
-if $lt_cl_silent; then
- exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure. Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-lt_cl_success=:
-test "$silent" = yes &&
- lt_config_lt_args="$lt_config_lt_args --quiet"
-exec AS_MESSAGE_LOG_FD>/dev/null
-$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-exec AS_MESSAGE_LOG_FD>>config.log
-$lt_cl_success || AS_EXIT(1)
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars. Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
- m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
- m4_if(_LT_TAG, [C], [
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
- _LT_PROG_LTMAIN
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- _LT_PROG_REPLACE_SHELLFNS
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-# autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
- [C], [_LT_LANG(C)],
- [C++], [_LT_LANG(CXX)],
- [Java], [_LT_LANG(GCJ)],
- [Fortran 77], [_LT_LANG(F77)],
- [Fortran], [_LT_LANG(FC)],
- [Windows Resource], [_LT_LANG(RC)],
- [m4_ifdef([_LT_LANG_]$1[_CONFIG],
- [_LT_LANG($1)],
- [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
- [LT_SUPPORTED_TAG([$1])dnl
- m4_append([_LT_TAGS], [$1 ])dnl
- m4_define([_LT_LANG_]$1[_enabled], [])dnl
- _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [LT_LANG(CXX)],
- [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
- [LT_LANG(F77)],
- [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
- [LT_LANG(FC)],
- [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
- [LT_LANG(GCJ)],
- [m4_ifdef([AC_PROG_GCJ],
- [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([A][M_PROG_GCJ],
- [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([LT_PROG_GCJ],
- [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
- [LT_LANG(RC)],
- [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-dnl AC_DEFUN([AC_LIBTOOL_RC], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
- case $host_os in
- rhapsody* | darwin*)
- AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
- AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
- AC_CHECK_TOOL([LIPO], [lipo], [:])
- AC_CHECK_TOOL([OTOOL], [otool], [:])
- AC_CHECK_TOOL([OTOOL64], [otool64], [:])
- _LT_DECL([], [DSYMUTIL], [1],
- [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
- _LT_DECL([], [NMEDIT], [1],
- [Tool to change global to local symbols on Mac OS X])
- _LT_DECL([], [LIPO], [1],
- [Tool to manipulate fat objects and archives on Mac OS X])
- _LT_DECL([], [OTOOL], [1],
- [ldd/readelf like tool for Mach-O binaries on Mac OS X])
- _LT_DECL([], [OTOOL64], [1],
- [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
- AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
- [lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&AS_MESSAGE_LOG_FD
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi])
- AC_CACHE_CHECK([for -exported_symbols_list linker flag],
- [lt_cv_ld_exported_symbols_list],
- [lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [lt_cv_ld_exported_symbols_list=yes],
- [lt_cv_ld_exported_symbols_list=no])
- LDFLAGS="$save_LDFLAGS"
- ])
- AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
- [lt_cv_ld_force_load=no
- cat > conftest.c << _LT_EOF
-int forced_loaded() { return 2;}
-_LT_EOF
- echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
- echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
- $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
- echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
- $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
- cat > conftest.c << _LT_EOF
-int main() { return 0;}
-_LT_EOF
- echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
- _lt_result=$?
- if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
- lt_cv_ld_force_load=yes
- else
- cat conftest.err >&AS_MESSAGE_LOG_FD
- fi
- rm -f conftest.err libconftest.a conftest conftest.c
- rm -rf conftest.dSYM
- ])
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
- m4_require([_LT_REQUIRED_DARWIN_CHECKS])
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_automatic, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- if test "$lt_cv_ld_force_load" = "yes"; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=''
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=func_echo_all
- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
- m4_if([$1], [CXX],
-[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
- fi
-],[])
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
-# ----------------------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-# Store the results from the different compilers for each TAGNAME.
-# Allow to override them for all tags through lt_cv_aix_libpath.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-if test "${lt_cv_aix_libpath+set}" = set; then
- aix_libpath=$lt_cv_aix_libpath
-else
- AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
- lt_aix_libpath_sed='[
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\([^ ]*\) *$/\1/
- p
- }
- }]'
- _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
- _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
- fi],[])
- if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
- _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
- fi
- ])
- aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
-fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[m4_divert_text([M4SH-INIT], [$1
-])])# _LT_SHELL_INIT
-
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Find how we can fake an echo command that does not interpret backslash.
-# In particular, with Autoconf 2.60 or later we add some code to the start
-# of the generated configure script which will find a shell with a builtin
-# printf (which we can use as an echo command).
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-
-AC_MSG_CHECKING([how to print strings])
-# Test print first, because it will be a builtin if present.
-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
- test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='print -r --'
-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='printf %s\n'
-else
- # Use this function as a fallback that always works.
- func_fallback_echo ()
- {
- eval 'cat <<_LTECHO_EOF
-$[]1
-_LTECHO_EOF'
- }
- ECHO='func_fallback_echo'
-fi
-
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
- $ECHO "$*"
-}
-
-case "$ECHO" in
- printf*) AC_MSG_RESULT([printf]) ;;
- print*) AC_MSG_RESULT([print -r]) ;;
- *) AC_MSG_RESULT([cat]) ;;
-esac
-
-m4_ifdef([_AS_DETECT_SUGGESTED],
-[_AS_DETECT_SUGGESTED([
- test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
- ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
- ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
- ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
- PATH=/empty FPATH=/empty; export PATH FPATH
- test "X`printf %s $ECHO`" = "X$ECHO" \
- || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
-
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_WITH_SYSROOT
-# ----------------
-AC_DEFUN([_LT_WITH_SYSROOT],
-[AC_MSG_CHECKING([for sysroot])
-AC_ARG_WITH([sysroot],
-[ --with-sysroot[=DIR] Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).],
-[], [with_sysroot=no])
-
-dnl lt_sysroot will always be passed unquoted. We quote it here
-dnl in case the user passed a directory name.
-lt_sysroot=
-case ${with_sysroot} in #(
- yes)
- if test "$GCC" = yes; then
- lt_sysroot=`$CC --print-sysroot 2>/dev/null`
- fi
- ;; #(
- /*)
- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
- ;; #(
- no|'')
- ;; #(
- *)
- AC_MSG_RESULT([${with_sysroot}])
- AC_MSG_ERROR([The sysroot must be an absolute path.])
- ;;
-esac
-
- AC_MSG_RESULT([${lt_sysroot:-no}])
-_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
-[dependent libraries, and in which our libraries should be installed.])])
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
- [AS_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_PROG_AR
-# -----------
-m4_defun([_LT_PROG_AR],
-[AC_CHECK_TOOLS(AR, [ar], false)
-: ${AR=ar}
-: ${AR_FLAGS=cru}
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
-
-AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
- [lt_cv_ar_at_file=no
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
- [echo conftest.$ac_objext > conftest.lst
- lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
- AC_TRY_EVAL([lt_ar_try])
- if test "$ac_status" -eq 0; then
- # Ensure the archiver fails upon bogus file names.
- rm -f conftest.$ac_objext libconftest.a
- AC_TRY_EVAL([lt_ar_try])
- if test "$ac_status" -ne 0; then
- lt_cv_ar_at_file=@
- fi
- fi
- rm -f conftest.* libconftest.a
- ])
- ])
-
-if test "x$lt_cv_ar_at_file" = xno; then
- archiver_list_spec=
-else
- archiver_list_spec=$lt_cv_ar_at_file
-fi
-_LT_DECL([], [archiver_list_spec], [1],
- [How to feed a file listing to the archiver])
-])# _LT_PROG_AR
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[_LT_PROG_AR
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
- [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-case $host_os in
- darwin*)
- lock_old_archive_extraction=yes ;;
- *)
- lock_old_archive_extraction=no ;;
-esac
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
- [Commands used to build an old-style archive])
-_LT_DECL([], [lock_old_archive_extraction], [0],
- [Whether to use a lock for old archive extraction])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$5], , :, [$5])
-else
- m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$4], , :, [$4])
-else
- m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- mint*)
- # On MiNT this can take a long time and run out of memory.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
- = "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
- [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-[#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-/* When -fvisbility=hidden is used, assume the code has been annotated
- correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
-
-int fnord () { return 42; }
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else
- {
- if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- else puts (dlerror ());
- }
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}]
-_LT_EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_dlunknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
- ])
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
- [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
- [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
- [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
- fi
- fi
- chmod u+w . 2>&AS_MESSAGE_LOG_FD
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
- [Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- AC_MSG_CHECKING([if we can lock with hard links])
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
- [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
- test -n "$_LT_TAGVAR(runpath_var, $1)" ||
- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
- # Linking always hardcodes the temporary library directory.
- _LT_TAGVAR(hardcode_action, $1)=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_TAGVAR(hardcode_action, $1)=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
- [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
- [], [
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
- *) lt_sed_strip_eq="s,=/,/,g" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
- case $lt_search_path_spec in
- *\;*)
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
- ;;
- *)
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
- ;;
- esac
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[[lt_foo]]++; }
- if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
- # AWK program above erroneously prepends '/' to C:/dos/paths
- # for these hosts.
- case $host_os in
- mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
- esac
- sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[[4-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[[45]]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$cc_basename in
- yes,*)
- # gcc
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- ;;
-
- *,cl*)
- # Native MSVC
- libname_spec='$name'
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- library_names_spec='${libname}.dll.lib'
-
- case $build_os in
- mingw*)
- sys_lib_search_path_spec=
- lt_save_ifs=$IFS
- IFS=';'
- for lt_path in $LIB
- do
- IFS=$lt_save_ifs
- # Let DOS variable expansion print the short 8.3 style file name.
- lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
- sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
- done
- IFS=$lt_save_ifs
- # Convert to MSYS style.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
- ;;
- cygwin*)
- # Convert to unix form, then to dos form, then back to unix form
- # but this time dos style (no spaces!) so that the unix form looks
- # like /cygdrive/c/PROGRA~1:/cygdr...
- sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
- sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
- sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- ;;
- *)
- sys_lib_search_path_spec="$LIB"
- if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
- # It is most probably a Windows format PATH.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # FIXME: find the short name or the path components, as spaces are
- # common. (e.g. "Program Files" -> "PROGRA~1")
- ;;
- esac
-
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
- dynamic_linker='Win32 link.exe'
- ;;
-
- *)
- # Assume MSVC wrapper
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
- dynamic_linker='Win32 ld.exe'
- ;;
- esac
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[[123]]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-haiku*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- dynamic_linker="$host_os runtime_loader"
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
- postinstall_cmds='chmod 555 $lib'
- # or fails outright, so override atomically:
- install_override_mode=555
- ;;
-
-interix[[3-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
-
- # Some binutils ld are patched to set DT_RUNPATH
- AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
- [lt_cv_shlibpath_overrides_runpath=no
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
- LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
- [lt_cv_shlibpath_overrides_runpath=yes])])
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
- ])
- shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
- [Variables whose values should be saved in libtool wrapper scripts and
- restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
- [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
- [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
- [[List of archive names. First name is the real one, the rest are links.
- The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
- [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [install_override_mode], [1],
- [Permission mode override for installation of shared libraries])
-_LT_DECL([], [postinstall_cmds], [2],
- [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
- [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
- [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
- [[As "finish_cmds", except a single script fragment to be evaled but
- not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
- [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
- [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
- [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="m4_if([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
- [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
-
-AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--with-gnu-ld],
- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_ld=yes],
- [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
- lt_cv_ld_reload_flag,
- [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- if test "$GCC" != yes; then
- reload_cmds=false
- fi
- ;;
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_TAGDECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[[45]]*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
- if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- # Keep this pattern in sync with the one in func_win32_libid.
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc*)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-haiku*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[[3-9]]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-])
-
-file_magic_glob=
-want_nocaseglob=no
-if test "$build" = "$host"; then
- case $host_os in
- mingw* | pw32*)
- if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
- want_nocaseglob=yes
- else
- file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
- fi
- ;;
- esac
-fi
-
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
- [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
- [Command to use when deplibs_check_method = "file_magic"])
-_LT_DECL([], [file_magic_glob], [1],
- [How to find potential files when deplibs_check_method = "file_magic"])
-_LT_DECL([], [want_nocaseglob], [1],
- [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- if test -n "$DUMPBIN"; then :
- # Let the user override the test.
- else
- AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
- case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
- *COFF*)
- DUMPBIN="$DUMPBIN -symbols"
- ;;
- *)
- DUMPBIN=:
- ;;
- esac
- fi
- AC_SUBST([DUMPBIN])
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
- [lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
- cat conftest.out >&AS_MESSAGE_LOG_FD
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
-# --------------------------------
-# how to determine the name of the shared library
-# associated with a specific link library.
-# -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-m4_require([_LT_DECL_DLLTOOL])
-AC_CACHE_CHECK([how to associate runtime and link libraries],
-lt_cv_sharedlib_from_linklib_cmd,
-[lt_cv_sharedlib_from_linklib_cmd='unknown'
-
-case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
- # two different shell functions defined in ltmain.sh
- # decide which to use based on capabilities of $DLLTOOL
- case `$DLLTOOL --help 2>&1` in
- *--identify-strict*)
- lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
- ;;
- *)
- lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
- ;;
- esac
- ;;
-*)
- # fallback: assume linklib IS sharedlib
- lt_cv_sharedlib_from_linklib_cmd="$ECHO"
- ;;
-esac
-])
-sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
-test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
-
-_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
- [Command to associate shared and link libraries])
-])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
-
-
-# _LT_PATH_MANIFEST_TOOL
-# ----------------------
-# locate the manifest tool
-m4_defun([_LT_PATH_MANIFEST_TOOL],
-[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
-test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
- [lt_cv_path_mainfest_tool=no
- echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
- $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
- cat conftest.err >&AS_MESSAGE_LOG_FD
- if $GREP 'Manifest Tool' conftest.out > /dev/null; then
- lt_cv_path_mainfest_tool=yes
- fi
- rm -f conftest*])
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
- MANIFEST_TOOL=:
-fi
-_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
-])# _LT_PATH_MANIFEST_TOOL
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
- ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
- case $cc_basename in
- nvcc*)
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
- esac
-
- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
- lt_cv_prog_compiler_rtti_exceptions,
- [-fno-rtti -fno-exceptions], [],
- [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
- [Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDEGRST]]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris*)
- symcode='[[BDRT]]'
- ;;
-sco3.2v5*)
- symcode='[[DT]]'
- ;;
-sysv4.2uw2*)
- symcode='[[DT]]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[[ABDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK ['"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx]"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
- lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
- relocations are performed -- see ld's documentation on pseudo-relocs. */
-# define LT@&t@_DLSYM_CONST
-#elif defined(__osf__)
-/* This system does not cope well with relocations in const data. */
-# define LT@&t@_DLSYM_CONST
-#else
-# define LT@&t@_DLSYM_CONST const
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-LT@&t@_DLSYM_CONST struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_globsym_save_LIBS=$LIBS
- lt_globsym_save_CFLAGS=$CFLAGS
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS=$lt_globsym_save_LIBS
- CFLAGS=$lt_globsym_save_CFLAGS
- else
- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-
-# Response file support.
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- nm_file_list_spec='@'
-elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
- nm_file_list_spec='@'
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
- [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
- [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
- [lt_cv_sys_global_symbol_to_c_name_address], [1],
- [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
- [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
- [Transform the output of nm in a C name address pair when lib prefix is needed])
-_LT_DECL([], [nm_file_list_spec], [1],
- [Specify filename containing input files for $NM])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-m4_if([$1], [CXX], [
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- haiku*)
- # PIC is the default for Haiku.
- # The "-static" flag exists, but is broken.
- _LT_TAGVAR(lt_prog_compiler_static, $1)=
- ;;
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix[[4-9]]*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- fi
- ;;
- aCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- icpc* )
- # Intel C++, used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
- # IBM XL 8.0, 9.0 on PPC and BlueGene
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd* | netbsdelf*-gnu)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC* | sunCC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- lcc*)
- # Lucid
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-],
-[
- if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
-
- haiku*)
- # PIC is the default for Haiku.
- # The "-static" flag exists, but is broken.
- _LT_TAGVAR(lt_prog_compiler_static, $1)=
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
-
- case $cc_basename in
- nvcc*) # Cuda Compiler Driver 2.2
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- hpux9* | hpux10* | hpux11*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC (with -KPIC) is the default.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
- ecc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
- ;;
- nagfor*)
- # NAG Fortran compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- ccc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All Alpha code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xl* | bgxl* | bgf* | mpixl*)
- # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ F* | *Sun*Fortran*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
- ;;
- *Sun\ C*)
- # Sun C 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All OSF/1 code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- rdos*)
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- solaris*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
- *)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- unicos*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
-
- uts4*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-])
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
- ;;
-esac
-
-AC_CACHE_CHECK([for $compiler option to produce PIC],
- [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
- [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
- [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
- [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
- [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
- "" | " "*) ;;
- *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
- esac],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
- [Additional compiler flags for building library objects])
-
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
- [How to pass a linker flag through the compiler])
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
- $lt_tmp_static_flag,
- [],
- [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
- [Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
- case $host_os in
- aix[[4-9]]*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- # Also, AIX nm treats weak defined symbols like other global defined
- # symbols, whereas GNU nm marks them as "W".
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
- ;;
- cygwin* | mingw* | cegcc*)
- case $cc_basename in
- cl*) ;;
- *)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu | gnu*)
- _LT_TAGVAR(link_all_deplibs, $1)=no
- ;;
- *)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
-], [
- runpath_var=
- _LT_TAGVAR(allow_undefined_flag, $1)=
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(archive_cmds, $1)=
- _LT_TAGVAR(archive_expsym_cmds, $1)=
- _LT_TAGVAR(compiler_needs_object, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(hardcode_automatic, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- _LT_TAGVAR(hardcode_minus_L, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(inherit_rpath, $1)=no
- _LT_TAGVAR(link_all_deplibs, $1)=unknown
- _LT_TAGVAR(module_cmds, $1)=
- _LT_TAGVAR(module_expsym_cmds, $1)=
- _LT_TAGVAR(old_archive_from_new_cmds, $1)=
- _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
- _LT_TAGVAR(thread_safe_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- _LT_TAGVAR(include_expsyms, $1)=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- linux* | k*bsd*-gnu | gnu*)
- _LT_TAGVAR(link_all_deplibs, $1)=no
- ;;
- esac
-
- _LT_TAGVAR(ld_shlibs, $1)=yes
-
- # On some targets, GNU ld is compatible enough with the native linker
- # that we're better off using the native interface for both.
- lt_use_gnu_ld_interface=no
- if test "$with_gnu_ld" = yes; then
- case $host_os in
- aix*)
- # The AIX port of GNU ld has always aspired to compatibility
- # with the native linker. However, as the warning in the GNU ld
- # block says, versions before 2.19.5* couldn't really create working
- # shared libraries, regardless of the interface used.
- case `$LD -v 2>&1` in
- *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
- *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
- *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
- *)
- lt_use_gnu_ld_interface=yes
- ;;
- esac
- ;;
- *)
- lt_use_gnu_ld_interface=yes
- ;;
- esac
- fi
-
- if test "$lt_use_gnu_ld_interface" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *GNU\ gold*) supports_anon_versioning=yes ;;
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[[3-9]]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.19, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to install binutils
-*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
-*** You will then need to restart the configuration process.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- haiku*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=' $pic_flag'
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95* | pgfortran*)
- # Portland Group f77 and f90 compilers
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- tmp_sharedflag='--shared' ;;
- xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
- tmp_sharedflag='-qmkshrobj'
- tmp_addflag= ;;
- nvcc*) # Cuda Compiler Driver 2.2
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
- ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- xlf* | bgf* | bgxlf* | mpixlf*)
- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
- _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
-
- if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
- runpath_var=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- # Also, AIX nm treats weak defined symbols like other global
- # defined symbols, whereas GNU nm marks them as "W".
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=no
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- if test "$with_gnu_ld" = yes; then
- # We only use this code for GNU lds that support --whole-archive.
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- else
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- bsdi[[45]]*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- case $cc_basename in
- cl*)
- # Native MSVC
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='@'
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
- else
- sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
- # The linker will not automatically build a static lib if we build a DLL.
- # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
- # Don't use ranlib
- _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
- _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile="$lt_outputfile.exe"
- lt_tool_outputfile="$lt_tool_outputfile.exe"
- ;;
- esac~
- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
- ;;
- *)
- # Assume MSVC wrapper
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
- # FIXME: Should let the user specify the lib program.
- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
- esac
- ;;
-
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- freebsd1*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- m4_if($1, [], [
- # Older versions of the 11.00 compiler do not understand -b yet
- # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
- _LT_LINKER_OPTION([if $CC understands -b],
- _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
- [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
- [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
- [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- # This should be the same for all languages, so no per-tag cache variable.
- AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
- [lt_cv_irix_exported_symbol],
- [save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- AC_LINK_IFELSE(
- [AC_LANG_SOURCE(
- [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
- [C++], [[int foo (void) { return 0; }]],
- [Fortran 77], [[
- subroutine foo
- end]],
- [Fortran], [[
- subroutine foo
- end]])])],
- [lt_cv_irix_exported_symbol=yes],
- [lt_cv_irix_exported_symbol=no])
- LDFLAGS="$save_LDFLAGS"])
- if test "$lt_cv_irix_exported_symbol" = yes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
- fi
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- newsos6)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- solaris*)
- _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
- _LT_TAGVAR(hardcode_direct, $1)=no
- ;;
- motorola)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4.3*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- _LT_TAGVAR(ld_shlibs, $1)=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
- [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
- # Assume -lc should be added
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $_LT_TAGVAR(archive_cmds, $1) in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- AC_CACHE_CHECK([whether -lc should be explicitly linked in],
- [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
- [$RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
- pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
- _LT_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
- then
- lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
- else
- lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- fi
- _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- ])
- _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
- ;;
- esac
- fi
- ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
- [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
- [enable_shared_with_static_runtimes], [0],
- [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
- [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
- [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
- [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
- [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
- [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
- [Commands used to build a loadable module if different from building
- a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
- [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
- [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
- [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
- [Flag to hardcode $libdir into a binary during linking.
- This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
- [[If ld is used when linking, flag to hardcode $libdir into a binary
- during linking. This must work even if $libdir does not exist]])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
- [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting ${shlibpath_var} if the
- library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
- [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
- [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
- [Set to "yes" if building a shared library automatically hardcodes DIR
- into the library and all subsequent libraries and executables linked
- against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
- [Set to yes if linker adds runtime paths of dependent libraries
- to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
- [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [always_export_symbols], [0],
- [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
- [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
- [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
- [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
- [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [postlink_cmds], [2],
- [Commands necessary for finishing linking programs])
-_LT_TAGDECL([], [file_list_spec], [1],
- [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
- LT_SYS_DLOPEN_SELF
- _LT_CMD_STRIPLIB
-
- # Report which library types will actually be built
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_PROG_CXXCPP
-else
- _lt_caught_CXX_error=yes
-fi
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_CFLAGS=$CFLAGS
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
- $as_unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
- else
- $as_unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- CFLAGS=$CXXFLAGS
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- # We don't want -fno-exception when compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
- else
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
- fi
-
- if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
- LT_PATH_LD
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-
- else
- GXX=no
- with_gnu_ld=no
- wlarc=
- fi
-
- # PORTME: fill in a description of your system's C++ link characteristics
- AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
- _LT_TAGVAR(ld_shlibs, $1)=yes
- case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to
- # export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty
- # executable.
- _LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- if test "$with_gnu_ld" = yes; then
- # We only use this code for GNU lds that support --whole-archive.
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- else
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- case $GXX,$cc_basename in
- ,cl* | no,cl*)
- # Native MSVC
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='@'
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
- else
- $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
- # The linker will not automatically build a static lib if we build a DLL.
- # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- # Don't use ranlib
- _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
- _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile="$lt_outputfile.exe"
- lt_tool_outputfile="$lt_tool_outputfile.exe"
- ;;
- esac~
- func_to_tool_file "$lt_outputfile"~
- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
- ;;
- *)
- # g++
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- freebsd[[12]]*)
- # C++ shared libraries reported to be fairly broken before
- # switch to ELF
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- freebsd-elf*)
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
-
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- gnu*)
- ;;
-
- haiku*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- hpux9*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
- ;;
- *)
- if test "$GXX" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
- fi
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
- esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc* | ecpc* )
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- case `$CC -V` in
- *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
- _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
- _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
- $RANLIB $oldlib'
- _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- *) # Version 6 and above use weak symbols
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
- ;;
- xl* | mpixl* | bgxl*)
- # IBM XL 8.0 on PPC, with GNU ld
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
-
- # Not sure whether something based on
- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
- # would be better.
- output_verbose_link_cmd='func_echo_all'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- esac
- ;;
- esac
- ;;
-
- lynxos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- m88k*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
-
- *nto* | *qnx*)
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd=func_echo_all
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- case $host in
- osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
- *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
- esac
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- case $host in
- osf3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- ;;
- *)
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- case $host in
- osf3*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- psos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- solaris*)
- case $cc_basename in
- CC* | sunCC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
-
- output_verbose_link_cmd='func_echo_all'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
- if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
- fi
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- fi
- ;;
- esac
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
- '"$_LT_TAGVAR(old_archive_cmds, $1)"
- _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
- '"$_LT_TAGVAR(reload_cmds, $1)"
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- vxworks*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
- test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
- _LT_TAGVAR(GCC, $1)="$GXX"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- CC=$lt_save_CC
- CFLAGS=$lt_save_CFLAGS
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_FUNC_STRIPNAME_CNF
-# ----------------------
-# func_stripname_cnf prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-#
-# This function is identical to the (non-XSI) version of func_stripname,
-# except this one can be used by m4 code that may be executed by configure,
-# rather than the libtool script.
-m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
-AC_REQUIRE([_LT_DECL_SED])
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
-func_stripname_cnf ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
- esac
-} # func_stripname_cnf
-])# _LT_FUNC_STRIPNAME_CNF
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library. It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer*4 a
- a=0
- return
- end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer a
- a=0
- return
- end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
- private int a;
- public void bar (void) {
- a = 0;
- }
-};
-_LT_EOF
-])
-
-_lt_libdeps_save_CFLAGS=$CFLAGS
-case "$CC $CFLAGS " in #(
-*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
-*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
-esac
-
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- for p in `eval "$output_verbose_link_cmd"`; do
- case ${prev}${p} in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
- prev=$p
- continue
- fi
-
- # Expand the sysroot to ease extracting the directories later.
- if test -z "$prev"; then
- case $p in
- -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
- -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
- -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
- esac
- fi
- case $p in
- =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
- esac
- if test "$pre_test_object_deps_done" = no; then
- case ${prev} in
- -L | -R)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
- else
- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$_LT_TAGVAR(postdeps, $1)"; then
- _LT_TAGVAR(postdeps, $1)="${prev}${p}"
- else
- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
- fi
- fi
- prev=
- ;;
-
- *.lto.$objext) ;; # Ignore GCC LTO objects
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
- _LT_TAGVAR(predep_objects, $1)="$p"
- else
- _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
- fi
- else
- if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
- _LT_TAGVAR(postdep_objects, $1)="$p"
- else
- _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-CFLAGS=$_lt_libdeps_save_CFLAGS
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- _LT_TAGVAR(predep_objects,$1)=
- _LT_TAGVAR(postdep_objects,$1)=
- _LT_TAGVAR(postdeps,$1)=
- ;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
-
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC* | sunCC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
- [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
- [Dependencies to place before and after the objects being linked to
- create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
- [The library search path used internally by the compiler when linking
- a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_LANG_PUSH(Fortran 77)
-if test -z "$F77" || test "X$F77" = "Xno"; then
- _lt_disable_F77=yes
-fi
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- lt_save_CFLAGS=$CFLAGS
- CC=${F77-"f77"}
- CFLAGS=$FFLAGS
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
- GCC=$G77
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$G77"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC="$lt_save_CC"
- CFLAGS="$lt_save_CFLAGS"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_LANG_PUSH(Fortran)
-
-if test -z "$FC" || test "X$FC" = "Xno"; then
- _lt_disable_FC=yes
-fi
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- lt_save_CFLAGS=$CFLAGS
- CC=${FC-"f95"}
- CFLAGS=$FCFLAGS
- compiler=$CC
- GCC=$ac_cv_fc_compiler_gnu
-
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC=$lt_save_CC
- CFLAGS=$lt_save_CFLAGS
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-CFLAGS=$GCJFLAGS
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-CFLAGS=
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
- :
- _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
- [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
- [AC_CHECK_TOOL(GCJ, gcj,)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-# _LT_DECL_DLLTOOL
-# ----------------
-# Ensure DLLTOOL variable is set.
-m4_defun([_LT_DECL_DLLTOOL],
-[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
-AC_SUBST([DLLTOOL])
-])
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
- [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,b/c, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
-# ------------------------------------------------------
-# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
-# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
-m4_defun([_LT_PROG_FUNCTION_REPLACE],
-[dnl {
-sed -e '/^$1 ()$/,/^} # $1 /c\
-$1 ()\
-{\
-m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
-} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-])
-
-
-# _LT_PROG_REPLACE_SHELLFNS
-# -------------------------
-# Replace existing portable implementations of several shell functions with
-# equivalent extended shell implementations where those features are available..
-m4_defun([_LT_PROG_REPLACE_SHELLFNS],
-[if test x"$xsi_shell" = xyes; then
- _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac])
-
- _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
- func_basename_result="${1##*/}"])
-
- _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
- func_basename_result="${1##*/}"])
-
- _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}])
-
- _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
- func_split_long_opt_name=${1%%=*}
- func_split_long_opt_arg=${1#*=}])
-
- _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
- func_split_short_opt_arg=${1#??}
- func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
-
- _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac])
-
- _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
-
- _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
-
- _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
-fi
-
-if test x"$lt_shell_append" = xyes; then
- _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
-
- _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
- func_quote_for_eval "${2}"
-dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
- eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
-
- # Save a `func_append' function call where possible by direct use of '+='
- sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-else
- # Save a `func_append' function call even when '+=' is not available
- sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
- AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
-fi
-])
-
-# _LT_PATH_CONVERSION_FUNCTIONS
-# -----------------------------
-# Determine which file name conversion functions should be used by
-# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
-# for certain cross-compile configurations and native mingw.
-m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_MSG_CHECKING([how to convert $build file names to $host format])
-AC_CACHE_VAL(lt_cv_to_host_file_cmd,
-[case $host in
- *-*-mingw* )
- case $build in
- *-*-mingw* ) # actually msys
- lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
- ;;
- *-*-cygwin* )
- lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
- ;;
- * ) # otherwise, assume *nix
- lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
- ;;
- esac
- ;;
- *-*-cygwin* )
- case $build in
- *-*-mingw* ) # actually msys
- lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
- ;;
- *-*-cygwin* )
- lt_cv_to_host_file_cmd=func_convert_file_noop
- ;;
- * ) # otherwise, assume *nix
- lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
- ;;
- esac
- ;;
- * ) # unhandled hosts (and "normal" native builds)
- lt_cv_to_host_file_cmd=func_convert_file_noop
- ;;
-esac
-])
-to_host_file_cmd=$lt_cv_to_host_file_cmd
-AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
-_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
- [0], [convert $build file names to $host format])dnl
-
-AC_MSG_CHECKING([how to convert $build file names to toolchain format])
-AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
-[#assume ordinary cross tools, or native build.
-lt_cv_to_tool_file_cmd=func_convert_file_noop
-case $host in
- *-*-mingw* )
- case $build in
- *-*-mingw* ) # actually msys
- lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
- ;;
- esac
- ;;
-esac
-])
-to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
-_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
- [0], [convert $build files to toolchain format])dnl
-])# _LT_PATH_CONVERSION_FUNCTIONS
-
-# Helper functions for option handling. -*- Autoconf -*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 7 ltoptions.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
-# ------------------------------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
-# ---------------------------------------
-# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
-# matching handler defined, dispatch to it. Other OPTION-NAMEs are
-# saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
- _LT_MANGLE_DEFUN([$1], [$2]),
- [m4_warning([Unknown $1 option `$2'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
-# ------------------------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
-
-
-# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
-# -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
-# are set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
- [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
-# ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
-# with MACRO-NAME. If any OPTION has a matching handler declared with
-# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
-# the unknown option and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [_LT_SET_OPTION([$1], _LT_Option)])
-
-m4_if([$1],[LT_INIT],[
- dnl
- dnl Simply set some default values (i.e off) if boolean options were not
- dnl specified:
- _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
- ])
- _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
- ])
- dnl
- dnl If no reference was made to various pairs of opposing options, then
- dnl we run the default mode handler for the pair. For example, if neither
- dnl `shared' nor `disable-shared' was passed, we enable building of shared
- dnl archives by default:
- _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
- _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
- [_LT_ENABLE_FAST_INSTALL])
- ])
-])# _LT_SET_OPTIONS
-
-
-
-# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
-# -----------------------------------------
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
-
-
-# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
-# -----------------------------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([LT_INIT], [dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([LT_INIT], [win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS], [1], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-_LT_SET_OPTION([LT_INIT], [win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
- [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
- _LT_DECL([build_libtool_libs], [enable_shared], [0],
- [Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
-])
-
-AC_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], [disable-shared])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
- [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
- _LT_DECL([build_old_libs], [enable_static], [0],
- [Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
-])
-
-AC_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], [disable-static])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
- [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
- [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([LT_INIT], [pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
-
-
-m4_define([_LTDL_MODE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
- [m4_define([_LTDL_MODE], [nonrecursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [recursive],
- [m4_define([_LTDL_MODE], [recursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [subproject],
- [m4_define([_LTDL_MODE], [subproject])])
-
-m4_define([_LTDL_TYPE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [installable],
- [m4_define([_LTDL_TYPE], [installable])])
-LT_OPTION_DEFINE([LTDL_INIT], [convenience],
- [m4_define([_LTDL_TYPE], [convenience])])
-
-# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
-# versions in m4sugar had bugs.
-m4_define([lt_join],
-[m4_if([$#], [1], [],
- [$#], [2], [[$2]],
- [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
-m4_define([_lt_join],
-[m4_if([$#$2], [2], [],
- [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
- [$#], 1, [],
- [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_append(MACRO-NAME, STRING, [SEPARATOR])
-# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
-# Note that neither SEPARATOR nor STRING are expanded; they are appended
-# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
-# No SEPARATOR is output if MACRO-NAME was previously undefined (different
-# than defined and empty).
-#
-# This macro is needed until we can rely on Autoconf 2.62, since earlier
-# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
-m4_define([lt_append],
-[m4_define([$1],
- m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
-
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-# Needed until we can rely on m4_combine added in Autoconf 2.62.
-m4_define([lt_combine],
-[m4_if(m4_eval([$# > 3]), [1],
- [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
-[[m4_foreach([_Lt_prefix], [$2],
- [m4_foreach([_Lt_suffix],
- ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
- [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
- [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
- [lt_append([$1], [$2], [$3])$4],
- [$5])],
- [lt_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$3])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
- m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
- m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
- [$5],
- [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
- [lt_join(m4_quote(m4_default([$4], [[, ]])),
- lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
- [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
-
-# ltversion.m4 -- version numbers -*- Autoconf -*-
-#
-# Copyright (C) 2004 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# @configure_input@
-
-# serial 3293 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.4])
-m4_define([LT_PACKAGE_REVISION], [1.3293])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4'
-macro_revision='1.3293'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
-
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004.
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 5 lt~obsolete.m4
-
-# These exist entirely to fool aclocal when bootstrapping libtool.
-#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
-# which have later been changed to m4_define as they aren't part of the
-# exported API, or moved to Autoconf or Automake where they belong.
-#
-# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
-# using a macro with the same name in our local m4/libtool.m4 it'll
-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
-# and doesn't know about Autoconf macros at all.)
-#
-# So we provide this file, which has a silly filename so it's always
-# included after everything else. This provides aclocal with the
-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
-# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
-#
-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
-# Yes, that means every name once taken will need to remain here until
-# we give up compatibility with versions before 1.7, at which point
-# we need to keep only those names which we still refer to.
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
-
-m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
-m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
-m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
-m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
-m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
-m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
-m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
-m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
-m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
-m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
-m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
-m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
-m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
-m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
-m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
-m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
-m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
-m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
-m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
-m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
-m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
-m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
-m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
-m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
-m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
-m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
-m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
-m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
-m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
-m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
-m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
-m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
-m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
-m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
-m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
-m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
-m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
-m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
-
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
diff --git a/3rdparty/expat/bcb5/elements.bpr b/3rdparty/expat/bcb5/elements.bpr
index c21c0f59f29..e6e260f8a71 100644
--- a/3rdparty/expat/bcb5/elements.bpr
+++ b/3rdparty/expat/bcb5/elements.bpr
@@ -146,4 +146,4 @@ ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
-</PROJECT> \ No newline at end of file
+</PROJECT>@
diff --git a/3rdparty/expat/bcb5/expat.bpr b/3rdparty/expat/bcb5/expat.bpr
index 291b8cafc1d..7aff450b0ee 100644
--- a/3rdparty/expat/bcb5/expat.bpr
+++ b/3rdparty/expat/bcb5/expat.bpr
@@ -137,4 +137,4 @@ ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
-</PROJECT> \ No newline at end of file
+</PROJECT>@
diff --git a/3rdparty/expat/bcb5/expat_static.bpr b/3rdparty/expat/bcb5/expat_static.bpr
index 2f6ec4d3bd9..0b78ec89128 100644
--- a/3rdparty/expat/bcb5/expat_static.bpr
+++ b/3rdparty/expat/bcb5/expat_static.bpr
@@ -140,4 +140,4 @@ ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
-</PROJECT> \ No newline at end of file
+</PROJECT>@
diff --git a/3rdparty/expat/bcb5/expatw.bpr b/3rdparty/expat/bcb5/expatw.bpr
index 9ec50010b72..a9c9f75cf3f 100644
--- a/3rdparty/expat/bcb5/expatw.bpr
+++ b/3rdparty/expat/bcb5/expatw.bpr
@@ -143,4 +143,4 @@ ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
-</PROJECT> \ No newline at end of file
+</PROJECT>@
diff --git a/3rdparty/expat/bcb5/expatw_static.bpr b/3rdparty/expat/bcb5/expatw_static.bpr
index 3f12644b64c..457acc7c1ad 100644
--- a/3rdparty/expat/bcb5/expatw_static.bpr
+++ b/3rdparty/expat/bcb5/expatw_static.bpr
@@ -149,4 +149,4 @@ ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
-</PROJECT> \ No newline at end of file
+</PROJECT>@
diff --git a/3rdparty/expat/bcb5/outline.bpr b/3rdparty/expat/bcb5/outline.bpr
index e0ae5cdeebd..9ad8bed2736 100644
--- a/3rdparty/expat/bcb5/outline.bpr
+++ b/3rdparty/expat/bcb5/outline.bpr
@@ -129,4 +129,4 @@ ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
-</PROJECT> \ No newline at end of file
+</PROJECT>@
diff --git a/3rdparty/expat/bcb5/xmlwf.bpr b/3rdparty/expat/bcb5/xmlwf.bpr
index d33a1538764..bc765863d86 100644
--- a/3rdparty/expat/bcb5/xmlwf.bpr
+++ b/3rdparty/expat/bcb5/xmlwf.bpr
@@ -133,4 +133,4 @@ ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
-</PROJECT> \ No newline at end of file
+</PROJECT>@
diff --git a/3rdparty/expat/configure b/3rdparty/expat/configure
index 247d0ef2717..d1486076c26 100644..100755
--- a/3rdparty/expat/configure
+++ b/3rdparty/expat/configure
@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for expat 2.1.0.
+# Generated by GNU Autoconf 2.69 for expat 2.1.1.
#
# Report bugs to <expat-bugs@libexpat.org>.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -222,21 +246,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -339,6 +367,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -460,6 +496,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -494,16 +534,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -515,28 +555,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -570,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='expat'
PACKAGE_TARNAME='expat'
-PACKAGE_VERSION='2.1.0'
-PACKAGE_STRING='expat 2.1.0'
+PACKAGE_VERSION='2.1.1'
+PACKAGE_STRING='expat 2.1.1'
PACKAGE_BUGREPORT='expat-bugs@libexpat.org'
PACKAGE_URL=''
@@ -1183,8 +1203,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1270,7 +1288,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures expat 2.1.0 to adapt to many kinds of systems.
+\`configure' configures expat 2.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1335,7 +1353,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of expat 2.1.0:";;
+ short | recursive ) echo "Configuration of expat 2.1.1:";;
esac
cat <<\_ACEOF
@@ -1352,7 +1370,7 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pic try to use only PIC/non-PIC objects [default=use
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot=DIR Search for dependent libraries within DIR
@@ -1437,10 +1455,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-expat configure 2.1.0
-generated by GNU Autoconf 2.68
+expat configure 2.1.1
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1516,7 +1534,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1814,7 +1832,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1981,8 +1999,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by expat $as_me 2.1.0, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by expat $as_me 2.1.1, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2470,7 +2488,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AS="${ac_tool_prefix}as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2510,7 +2528,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AS="as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2562,7 +2580,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2602,7 +2620,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2654,7 +2672,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2694,7 +2712,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2760,8 +2778,8 @@ esac
-macro_version='2.4'
-macro_revision='1.3293'
+macro_version='2.4.2'
+macro_revision='1.3337'
@@ -2868,7 +2886,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2908,7 +2926,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2961,7 +2979,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3002,7 +3020,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3060,7 +3078,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3104,7 +3122,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3550,8 +3568,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3658,7 +3675,7 @@ do
for ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+ as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
case `"$ac_path_SED" --version 2>&1` in
@@ -3734,7 +3751,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -3800,7 +3817,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -3867,7 +3884,7 @@ do
for ac_prog in fgrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+ as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
case `"$ac_path_FGREP" --version 2>&1` in
@@ -4123,7 +4140,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4167,7 +4184,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4325,6 +4342,11 @@ else
lt_cv_sys_max_cmd_len=196608
;;
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
osf*)
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -4351,7 +4373,8 @@ else
;;
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
@@ -4364,7 +4387,7 @@ else
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
- while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+ while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
test $i != 17 # 1/2 MB should be enough
do
@@ -4586,7 +4609,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4626,7 +4649,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4749,10 +4772,6 @@ freebsd* | dragonfly*)
fi
;;
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
haiku*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -4790,8 +4809,8 @@ irix5* | irix6* | nonstopux*)
lt_cv_deplibs_check_method=pass_all
;;
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -4929,7 +4948,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4969,7 +4988,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5070,7 +5089,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5114,7 +5133,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5239,7 +5258,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5279,7 +5298,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5338,7 +5357,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5378,7 +5397,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5428,13 +5447,13 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
;;
esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
fi
case $host_os in
@@ -5482,7 +5501,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5623,6 +5642,7 @@ for ac_symprfx in "" "_"; do
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK '"\
" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -5911,7 +5931,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -5927,9 +5947,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -5948,7 +5978,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -6011,7 +6044,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
CFLAGS="$SAVE_CFLAGS"
fi
;;
-sparc*-*solaris*)
+*-*solaris*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -6022,7 +6055,20 @@ sparc*-*solaris*)
case `/usr/bin/file conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ yes*)
+ case $host in
+ i?86-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD="${LD-ld}_sol2"
+ fi
+ ;;
*)
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
LD="${LD-ld} -64"
@@ -6055,7 +6101,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6095,7 +6141,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6175,7 +6221,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6215,7 +6261,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6267,7 +6313,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6307,7 +6353,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6359,7 +6405,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6399,7 +6445,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LIPO="lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6451,7 +6497,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6491,7 +6537,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL="otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6543,7 +6589,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6583,7 +6629,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL64="otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6662,7 +6708,13 @@ else
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
_lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&5
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test $_lt_result -eq 0; then
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&5
@@ -6673,6 +6725,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
if ${lt_cv_ld_exported_symbols_list+:} false; then :
@@ -6705,6 +6758,7 @@ rm -f core conftest.err conftest.$ac_objext \
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
$as_echo_n "checking for -force_load linker flag... " >&6; }
if ${lt_cv_ld_force_load+:} false; then :
@@ -6726,7 +6780,9 @@ _LT_EOF
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
_lt_result=$?
- if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&5
+ elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&5
@@ -7129,7 +7185,22 @@ fi
# Check whether --with-pic was given.
if test "${with_pic+set}" = set; then :
- withval=$with_pic; pic_mode="$withval"
+ withval=$with_pic; lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for lt_pkg in $withval; do
+ IFS="$lt_save_ifs"
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
pic_mode=default
fi
@@ -7207,6 +7278,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
test -z "$LN_S" && LN_S="ln -s"
@@ -7496,6 +7571,10 @@ _lt_linker_boilerplate=`cat conftest.err`
$RM -r conftest*
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
@@ -7662,7 +7741,9 @@ lt_prog_compiler_static=
case $cc_basename in
nvcc*) # Cuda Compiler Driver 2.2
lt_prog_compiler_wl='-Xlinker '
- lt_prog_compiler_pic='-Xcompiler -fPIC'
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
;;
esac
else
@@ -7706,7 +7787,7 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -7753,18 +7834,33 @@ lt_prog_compiler_static=
;;
*)
case `$CC -V 2>&1 | sed 5q` in
- *Sun\ F* | *Sun*Fortran*)
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
# Sun Fortran 8.3 passes all unrecognized flags to the linker
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
lt_prog_compiler_wl=''
;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
*Sun\ C*)
# Sun C 5.9
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
lt_prog_compiler_wl='-Wl,'
;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
esac
;;
esac
@@ -8126,7 +8222,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
hardcode_direct=no
hardcode_direct_absolute=no
hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld=
hardcode_libdir_separator=
hardcode_minus_L=no
hardcode_shlibpath_var=unsupported
@@ -8379,8 +8474,7 @@ _LT_EOF
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
if test "x$supports_anon_versioning" = xyes; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
@@ -8760,6 +8854,7 @@ fi
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
enable_shared_with_static_runtimes=yes
+ exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
# Don't use ranlib
old_postinstall_cmds='chmod 644 $oldlib'
@@ -8805,6 +8900,7 @@ fi
hardcode_shlibpath_var=unsupported
if test "$lt_cv_ld_force_load" = "yes"; then
whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
else
whole_archive_flag_spec=''
fi
@@ -8833,10 +8929,6 @@ fi
hardcode_shlibpath_var=no
;;
- freebsd1*)
- ld_shlibs=no
- ;;
-
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
# support. Future versions do this automatically, but an explicit c++rt0.o
# does not break anything, and helps significantly (at the cost of a little
@@ -8849,7 +8941,7 @@ fi
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
+ freebsd2.*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=yes
@@ -8888,7 +8980,6 @@ fi
fi
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_flag_spec_ld='+b $libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_direct_absolute=yes
@@ -9512,11 +9603,6 @@ esac
-
-
-
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
$as_echo_n "checking dynamic linker characteristics... " >&6; }
@@ -9606,7 +9692,7 @@ need_version=unknown
case $host_os in
aix3*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
@@ -9615,7 +9701,7 @@ aix3*)
;;
aix[4-9]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
@@ -9680,7 +9766,7 @@ beos*)
;;
bsdi[45]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
@@ -9819,7 +9905,7 @@ darwin* | rhapsody*)
;;
dgux*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -9827,10 +9913,6 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd1*)
- dynamic_linker=no
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -9838,7 +9920,7 @@ freebsd* | dragonfly*)
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[123]*) objformat=aout ;;
+ freebsd[23].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -9856,7 +9938,7 @@ freebsd* | dragonfly*)
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
@@ -9875,19 +9957,8 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
@@ -9948,7 +10019,7 @@ hpux9* | hpux10* | hpux11*)
;;
interix[3-9]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -9964,7 +10035,7 @@ irix5* | irix6* | nonstopux*)
nonstopux*) version_type=nonstopux ;;
*)
if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
fi ;;
@@ -10001,9 +10072,9 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -10097,7 +10168,7 @@ netbsd*)
;;
newsos6)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -10166,7 +10237,7 @@ rdos*)
;;
solaris*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -10191,7 +10262,7 @@ sunos4*)
;;
sysv4 | sysv4.3*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -10215,7 +10286,7 @@ sysv4 | sysv4.3*)
sysv4*MP*)
if test -d /usr/nec ;then
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
soname_spec='$libname${shared_ext}.$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -10246,7 +10317,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
tpf*)
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -10256,7 +10327,7 @@ tpf*)
;;
uts4*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -11038,6 +11109,8 @@ CC="$lt_save_CC"
+
+
ac_config_commands="$ac_config_commands libtool"
@@ -11073,7 +11146,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11113,7 +11186,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11166,7 +11239,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11207,7 +11280,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -11265,7 +11338,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11309,7 +11382,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11505,8 +11578,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -11619,7 +11691,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11663,7 +11735,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -12013,7 +12085,6 @@ export_dynamic_flag_spec_CXX=
hardcode_direct_CXX=no
hardcode_direct_absolute_CXX=no
hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
hardcode_libdir_separator_CXX=
hardcode_minus_L_CXX=no
hardcode_shlibpath_var_CXX=unsupported
@@ -12597,6 +12668,7 @@ fi
hardcode_shlibpath_var_CXX=unsupported
if test "$lt_cv_ld_force_load" = "yes"; then
whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
else
whole_archive_flag_spec_CXX=''
fi
@@ -12641,7 +12713,7 @@ fi
esac
;;
- freebsd[12]*)
+ freebsd2.*)
# C++ shared libraries reported to be fairly broken before
# switch to ELF
ld_shlibs_CXX=no
@@ -12657,9 +12729,6 @@ fi
ld_shlibs_CXX=yes
;;
- gnu*)
- ;;
-
haiku*)
archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
link_all_deplibs_CXX=yes
@@ -12821,7 +12890,7 @@ fi
inherit_rpath_CXX=yes
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -13317,6 +13386,7 @@ _lt_libdeps_save_CFLAGS=$CFLAGS
case "$CC $CFLAGS " in #(
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
esac
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -13680,7 +13750,7 @@ lt_prog_compiler_static_CXX=
;;
esac
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -14106,7 +14176,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
- cl*) ;;
+ cl*)
+ exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
*)
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
@@ -14262,8 +14334,6 @@ esac
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
$as_echo_n "checking dynamic linker characteristics... " >&6; }
@@ -14289,7 +14359,7 @@ need_version=unknown
case $host_os in
aix3*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
@@ -14298,7 +14368,7 @@ aix3*)
;;
aix[4-9]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
@@ -14363,7 +14433,7 @@ beos*)
;;
bsdi[45]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
@@ -14500,7 +14570,7 @@ darwin* | rhapsody*)
;;
dgux*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -14508,10 +14578,6 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd1*)
- dynamic_linker=no
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -14519,7 +14585,7 @@ freebsd* | dragonfly*)
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[123]*) objformat=aout ;;
+ freebsd[23].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -14537,7 +14603,7 @@ freebsd* | dragonfly*)
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
@@ -14556,19 +14622,8 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
@@ -14629,7 +14684,7 @@ hpux9* | hpux10* | hpux11*)
;;
interix[3-9]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -14645,7 +14700,7 @@ irix5* | irix6* | nonstopux*)
nonstopux*) version_type=nonstopux ;;
*)
if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
fi ;;
@@ -14682,9 +14737,9 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -14778,7 +14833,7 @@ netbsd*)
;;
newsos6)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -14847,7 +14902,7 @@ rdos*)
;;
solaris*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -14872,7 +14927,7 @@ sunos4*)
;;
sysv4 | sysv4.3*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -14896,7 +14951,7 @@ sysv4 | sysv4.3*)
sysv4*MP*)
if test -d /usr/nec ;then
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
soname_spec='$libname${shared_ext}.$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -14927,7 +14982,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
tpf*)
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -14937,7 +14992,7 @@ tpf*)
;;
uts4*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -15102,7 +15157,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -15440,11 +15495,11 @@ else
int
main ()
{
-/* FIXME: Include the comments suggested by Paul. */
+
#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
+ /* Ultrix mips cc rejects this sort of thing. */
typedef int charset[2];
- const charset cs;
+ const charset cs = { 0, 0 };
/* SunOS 4.1.1 cc rejects this. */
char const *const *pcpcc;
char **ppc;
@@ -15461,8 +15516,9 @@ main ()
++pcpcc;
ppc = (char**) pcpcc;
pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
+ { /* SCO 3.2v4 cc rejects this sort of thing. */
+ char tx;
+ char *t = &tx;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
@@ -15478,10 +15534,10 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this saying
+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
+ struct s { int j; const int *ap[3]; } bx;
+ struct s *b = &bx; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
@@ -15924,7 +15980,7 @@ main ()
return 0;
}
_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
do
CC="$ac_save_CC $ac_arg"
if ac_fn_c_try_compile "$LINENO"; then :
@@ -15964,8 +16020,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -16539,16 +16594,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -16608,28 +16663,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -16650,8 +16693,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by expat $as_me 2.1.0, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by expat $as_me 2.1.1, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -16716,11 +16759,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-expat config.status 2.1.0
-configured by $0, generated by GNU Autoconf 2.68,
+expat config.status 2.1.1
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -16810,7 +16853,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -16854,6 +16897,7 @@ pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
@@ -16934,7 +16978,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
@@ -17006,7 +17049,6 @@ with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
@@ -17048,6 +17090,7 @@ DLLTOOL \
OBJDUMP \
SHELL \
ECHO \
+PATH_SEPARATOR \
SED \
GREP \
EGREP \
@@ -17096,7 +17139,6 @@ with_gnu_ld \
allow_undefined_flag \
no_undefined_flag \
hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
exclude_expsyms \
include_expsyms \
@@ -17130,7 +17172,6 @@ with_gnu_ld_CXX \
allow_undefined_flag_CXX \
no_undefined_flag_CXX \
hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_ld_CXX \
hardcode_libdir_separator_CXX \
exclude_expsyms_CXX \
include_expsyms_CXX \
@@ -17802,8 +17843,8 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
@@ -17866,6 +17907,9 @@ SHELL=$lt_SHELL
# An echo program that protects backslashes.
ECHO=$lt_ECHO
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
# The host system.
host_alias=$host_alias
host=$host
@@ -18161,10 +18205,6 @@ no_undefined_flag=$lt_no_undefined_flag
# This must work even if \$libdir does not exist
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator
@@ -18507,10 +18547,6 @@ no_undefined_flag=$lt_no_undefined_flag_CXX
# This must work even if \$libdir does not exist
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
diff --git a/3rdparty/expat/configure.in b/3rdparty/expat/configure.ac
index 7e968c46de3..7e968c46de3 100644
--- a/3rdparty/expat/configure.in
+++ b/3rdparty/expat/configure.ac
diff --git a/3rdparty/expat/conftools/PrintPath b/3rdparty/expat/conftools/PrintPath
index e8559a3d643..e8559a3d643 100644..100755
--- a/3rdparty/expat/conftools/PrintPath
+++ b/3rdparty/expat/conftools/PrintPath
diff --git a/3rdparty/expat/conftools/ac_c_bigendian_cross.m4 b/3rdparty/expat/conftools/ac_c_bigendian_cross.m4
index 8ed3edb24fb..e95ffb6dcbe 100644
--- a/3rdparty/expat/conftools/ac_c_bigendian_cross.m4
+++ b/3rdparty/expat/conftools/ac_c_bigendian_cross.m4
@@ -7,7 +7,7 @@ dnl The implementation will create a binary, and instead of running
dnl the binary it will be grep'ed for some symbols that will look
dnl different for different endianess of the binary.
dnl
-dnl @version $Id: ac_c_bigendian_cross.m4,v 1.2 2001/10/01 20:03:13 fdrake Exp $
+dnl @version $Id: ac_c_bigendian_cross.m4,v 1.1 2001/07/24 19:51:35 fdrake Exp $
dnl @author Guido Draheim <guidod@gmx.de>
dnl
AC_DEFUN([AC_C_BIGENDIAN_CROSS],
diff --git a/3rdparty/expat/conftools/config.guess b/3rdparty/expat/conftools/config.guess
index 40eaed4821e..1f5c50c0d15 100644..100755
--- a/3rdparty/expat/conftools/config.guess
+++ b/3rdparty/expat/conftools/config.guess
@@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2011-05-11'
+timestamp='2014-03-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2011-05-11'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -56,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -140,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -202,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -304,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -792,21 +809,26 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ *:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
@@ -852,15 +874,22 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -872,56 +901,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -940,54 +967,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-tilera-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1191,6 +1227,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1217,19 +1256,31 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1246,7 +1297,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1315,158 +1366,10 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
+esac
cat >&2 <<EOF
$0: unable to guess system type
diff --git a/3rdparty/expat/conftools/config.sub b/3rdparty/expat/conftools/config.sub
index 30fdca81215..bba4efb8057 100644..100755
--- a/3rdparty/expat/conftools/config.sub
+++ b/3rdparty/expat/conftools/config.sub
@@ -1,38 +1,31 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2011-03-23'
+timestamp='2014-09-11'
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -75,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -125,13 +116,17 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -154,7 +149,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -223,6 +218,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
@@ -247,20 +248,28 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
+ | epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -274,24 +283,27 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | open8 \
- | or32 \
+ | open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
- | rx \
+ | riscv32 | riscv64 \
+ | rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
@@ -300,7 +312,7 @@ case $basic_machine in
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
- | v850 | v850e \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -315,8 +327,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
- # Motorola 68HC11/12.
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -329,7 +340,10 @@ case $basic_machine in
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
-
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
xscaleeb)
basic_machine=armeb-unknown
;;
@@ -352,25 +366,31 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
+ | le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -384,23 +404,27 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
- | romp-* | rs6000-* | rx-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
@@ -408,10 +432,11 @@ case $basic_machine in
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile-* | tilegx-* \
+ | tile*-* \
| tron-* \
| ubicom32-* \
- | v850-* | v850e-* | vax-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -711,7 +736,6 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@@ -769,11 +793,15 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -801,6 +829,10 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -808,10 +840,18 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
+ msys)
+ basic_machine=i686-pc
+ os=-msys
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@@ -992,7 +1032,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1120,13 +1164,8 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- # This must be matched before tile*.
- tilegx*)
- basic_machine=tilegx-unknown
- os=-linux-gnu
- ;;
tile*)
- basic_machine=tile-unknown
+ basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
@@ -1324,29 +1363,29 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1470,9 +1509,6 @@ case $os in
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
@@ -1521,6 +1557,12 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
tic54x-*)
os=-coff
;;
@@ -1548,9 +1590,6 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout
diff --git a/3rdparty/expat/conftools/get-version.sh b/3rdparty/expat/conftools/get-version.sh
index a70e0fb47a8..a70e0fb47a8 100644..100755
--- a/3rdparty/expat/conftools/get-version.sh
+++ b/3rdparty/expat/conftools/get-version.sh
diff --git a/3rdparty/expat/conftools/install-sh b/3rdparty/expat/conftools/install-sh
index 6781b987bdb..377bb8687ff 100644..100755
--- a/3rdparty/expat/conftools/install-sh
+++ b/3rdparty/expat/conftools/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,7 +35,7 @@ scriptversion=2009-04-28.21; # UTC
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
@@ -156,6 +156,10 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
shift;;
-T) no_target_directory=true;;
@@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
done
fi
@@ -194,13 +202,17 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
- # It's OK to call `install-sh -d' without argument.
+ # It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@@ -228,9 +240,9 @@ fi
for src
do
- # Protect names starting with `-'.
+ # Protect names problematic for 'test' and other utilities.
case $src in
- -*) src=./$src;;
+ -* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
@@ -252,12 +264,7 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
-
dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
@@ -347,7 +354,7 @@ do
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
+ # other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
@@ -385,7 +392,7 @@ do
case $dstdir in
/*) prefix='/';;
- -*) prefix='./';;
+ [-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
@@ -403,7 +410,7 @@ do
for d
do
- test -z "$d" && continue
+ test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
diff --git a/3rdparty/expat/conftools/ltmain.sh b/3rdparty/expat/conftools/ltmain.sh
index b4a3231ca3b..bffda54187a 100644
--- a/3rdparty/expat/conftools/ltmain.sh
+++ b/3rdparty/expat/conftools/ltmain.sh
@@ -1,9 +1,9 @@
-# libtool (GNU libtool) 2.4
+# libtool (GNU libtool) 2.4.2
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -41,6 +41,7 @@
# --quiet, --silent don't print informational messages
# --no-quiet, --no-silent
# print informational messages (default)
+# --no-warn don't display warning messages
# --tag=TAG use configuration variables from tag TAG
# -v, --verbose print more informational messages than default
# --no-verbose don't print the extra informational messages
@@ -69,7 +70,7 @@
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.4 Debian-2.4-2ubuntu1
+# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11
# automake: $automake_version
# autoconf: $autoconf_version
#
@@ -79,9 +80,9 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION="2.4 Debian-2.4-2ubuntu1"
+VERSION="2.4.2 Debian-2.4.2-1.11"
TIMESTAMP=""
-package_revision=1.3293
+package_revision=1.3337
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -136,15 +137,10 @@ progpath="$0"
: ${CP="cp -f"}
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
-: ${LN_S="ln -s"}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
: ${MV="mv -f"}
: ${RM="rm -f"}
-: ${SED="/bin/sed"}
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
: ${Xsed="$SED -e 1s/^X//"}
@@ -387,7 +383,7 @@ case $progpath in
;;
*)
save_IFS="$IFS"
- IFS=:
+ IFS=${PATH_SEPARATOR-:}
for progdir in $PATH; do
IFS="$save_IFS"
test -x "$progdir/$progname" && break
@@ -771,8 +767,8 @@ func_help ()
s*\$LTCFLAGS*'"$LTCFLAGS"'*
s*\$LD*'"$LD"'*
s/\$with_gnu_ld/'"$with_gnu_ld"'/
- s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
- s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
p
d
}
@@ -1052,6 +1048,7 @@ opt_finish=false
opt_help=false
opt_help_all=false
opt_silent=:
+opt_warning=:
opt_verbose=:
opt_silent=false
opt_verbose=false
@@ -1120,6 +1117,10 @@ esac
opt_silent=false
func_append preserve_args " $opt"
;;
+ --no-warning|--no-warn)
+ opt_warning=false
+func_append preserve_args " $opt"
+ ;;
--no-verbose)
opt_verbose=false
func_append preserve_args " $opt"
@@ -2059,7 +2060,7 @@ func_mode_compile ()
*.[cCFSifmso] | \
*.ada | *.adb | *.ads | *.asm | \
*.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
- *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
func_xform "$libobj"
libobj=$func_xform_result
;;
@@ -3201,11 +3202,13 @@ func_mode_install ()
# Set up the ranlib parameters.
oldlib="$destdir/$name"
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
if test -n "$stripme" && test -n "$old_striplib"; then
- func_show_eval "$old_striplib $oldlib" 'exit $?'
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
fi
# Do each command in the postinstall commands.
@@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() {
# linked before any other PIC object. But we must not use
# pic_flag when linking with -static. The problem exists in
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
*-*-hpux*)
pic_flag_for_symtable=" $pic_flag" ;;
@@ -3982,14 +3985,17 @@ func_exec_program_core ()
# launches target application with the remaining arguments.
func_exec_program ()
{
- for lt_wr_arg
- do
- case \$lt_wr_arg in
- --lt-*) ;;
- *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
- esac
- shift
- done
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
func_exec_program_core \${1+\"\$@\"}
}
@@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f)
{
EOF
func_emit_wrapper yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
-
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
cat <<"EOF"
}
EOF
@@ -5643,7 +5655,8 @@ func_mode_link ()
continue
;;
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
@@ -6150,7 +6163,8 @@ func_mode_link ()
lib=
found=no
case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
@@ -6834,7 +6848,7 @@ func_mode_link ()
test "$hardcode_direct_absolute" = no; then
add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
+ add_dir="-L$absdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
@@ -7319,6 +7333,7 @@ func_mode_link ()
# which has an extra 1 added just for fun
#
case $version_type in
+ # correct linux to gnu/linux during the next big refactor
darwin|linux|osf|windows|none)
func_arith $number_major + $number_minor
current=$func_arith_result
@@ -7438,7 +7453,7 @@ func_mode_link ()
versuffix="$major.$revision"
;;
- linux)
+ linux) # correct to gnu/linux during the next big refactor
func_arith $current - $age
major=.$func_arith_result
versuffix="$major.$age.$revision"
@@ -8026,6 +8041,11 @@ EOF
# Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
+ # Remove ${wl} instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
if test "$hardcode_into_libs" = yes; then
# Hardcode the library paths
hardcode_libdirs=
@@ -8056,7 +8076,7 @@ EOF
elif test -n "$runpath_var"; then
case "$perm_rpath " in
*" $libdir "*) ;;
- *) func_apped perm_rpath " $libdir" ;;
+ *) func_append perm_rpath " $libdir" ;;
esac
fi
done
@@ -8064,11 +8084,7 @@ EOF
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
- if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
- else
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- fi
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
# We should set the runpath_var.
@@ -9158,6 +9174,8 @@ EOF
esac
done
fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
eval cmds=\"$old_archive_cmds\"
func_len " $cmds"
@@ -9267,7 +9285,8 @@ EOF
*.la)
func_basename "$deplib"
name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ func_resolve_sysroot "$deplib"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
test -z "$libdir" && \
func_fatal_error "\`$deplib' is not a valid libtool archive"
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
diff --git a/3rdparty/expat/conftools/mkinstalldirs b/3rdparty/expat/conftools/mkinstalldirs
index c5291db0365..4f58503ea4e 100644..100755
--- a/3rdparty/expat/conftools/mkinstalldirs
+++ b/3rdparty/expat/conftools/mkinstalldirs
@@ -4,7 +4,7 @@
# Created: 1993-05-16
# Public domain
-# $Id: mkinstalldirs,v 1.1 2000/09/18 16:26:21 coopercc Exp $
+# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
errstatus=0
diff --git a/3rdparty/expat/doc/expat.png b/3rdparty/expat/doc/expat.png
index 5bc0726cfd8..3d88eac4a13 100644
--- a/3rdparty/expat/doc/expat.png
+++ b/3rdparty/expat/doc/expat.png
Binary files differ
diff --git a/3rdparty/expat/doc/reference.html b/3rdparty/expat/doc/reference.html
index 8811a3397c7..a4ab40530aa 100644
--- a/3rdparty/expat/doc/reference.html
+++ b/3rdparty/expat/doc/reference.html
@@ -2151,8 +2151,12 @@ Helps in preventing DoS attacks based on predicting hash
function behavior. In order to have an effect this must be called
before parsing has started. Returns 1 if successful, 0 when called
after <code>XML_Parse</code> or <code>XML_ParseBuffer</code>.
-<p><b>Note:</b> This call is optional, as the parser will auto-generate a new
-random salt value if no value has been set at the start of parsing.</p>
+<p><b>Note:</b>This call is optional, as the parser will auto-generate
+a new random salt value if no value has been set at the start of parsing.
+<p><b>Note:</b>One should not call <code>XML_SetHashSalt</code> with a
+hash salt value of 0, as this value is used as sentinel value to indicate
+that <code>XML_SetHashSalt</code> has <b>not</b> been called. Consequently
+such a call will have no effect, even if it returns 1.</p>
</div>
<pre class="fcndec" id="XML_UseForeignDTD">
diff --git a/3rdparty/expat/doc/valid-xhtml10.png b/3rdparty/expat/doc/valid-xhtml10.png
index 4c23f48fe02..2f755c62b52 100644
--- a/3rdparty/expat/doc/valid-xhtml10.png
+++ b/3rdparty/expat/doc/valid-xhtml10.png
Binary files differ
diff --git a/3rdparty/expat/doc/xmlwf.1 b/3rdparty/expat/doc/xmlwf.1
index 174719a709e..f45aea9cb4d 100644
--- a/3rdparty/expat/doc/xmlwf.1
+++ b/3rdparty/expat/doc/xmlwf.1
@@ -1,33 +1,40 @@
-.\" This manpage has been automatically generated by docbook2man
-.\" from a DocBook document. This tool can be found at:
-.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
-.\" Please send any bug reports, improvements, comments, patches,
-.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "XMLWF" "1" "24 January 2003" "" ""
+'\" -*- coding: us-ascii -*-
+.if \n(.g .ds T< \\FC
+.if \n(.g .ds T> \\F[\n[.fam]]
+.de URL
+\\$2 \(la\\$1\(ra\\$3
+..
+.if \n(.g .mso www.tmac
+.TH XMLWF 1 "March 11, 2016" "" ""
.SH NAME
xmlwf \- Determines if an XML document is well-formed
.SH SYNOPSIS
-
-\fBxmlwf\fR [ \fB-s\fR] [ \fB-n\fR] [ \fB-p\fR] [ \fB-x\fR] [ \fB-e \fIencoding\fB\fR] [ \fB-w\fR] [ \fB-d \fIoutput-dir\fB\fR] [ \fB-c\fR] [ \fB-m\fR] [ \fB-r\fR] [ \fB-t\fR] [ \fB-v\fR] [ \fBfile ...\fR]
-
-.SH "DESCRIPTION"
-.PP
+'nh
+.fi
+.ad l
+\fBxmlwf\fR \kx
+.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
+'in \n(.iu+\nxu
+[\fB-s\fR] [\fB-n\fR] [\fB-p\fR] [\fB-x\fR] [\fB-e \fIencoding\fB\fR] [\fB-w\fR] [\fB-d \fIoutput-dir\fB\fR] [\fB-c\fR] [\fB-m\fR] [\fB-r\fR] [\fB-t\fR] [\fB-v\fR] [file ...]
+'in \n(.iu-\nxu
+.ad b
+'hy
+.SH DESCRIPTION
\fBxmlwf\fR uses the Expat library to
-determine if an XML document is well-formed. It is
+determine if an XML document is well-formed. It is
non-validating.
.PP
If you do not specify any files on the command-line, and you
have a recent version of \fBxmlwf\fR, the
input file will be read from standard input.
.SH "WELL-FORMED DOCUMENTS"
-.PP
A well-formed document must adhere to the
following rules:
.TP 0.2i
\(bu
-The file begins with an XML declaration. For instance,
-<?xml version="1.0" standalone="yes"?>.
-\fBNOTE:\fR
+The file begins with an XML declaration. For instance,
+\*(T<<?xml version="1.0" standalone="yes"?>\*(T>.
+\fINOTE:\fR
\fBxmlwf\fR does not currently
check for a valid XML declaration.
.TP 0.2i
@@ -36,8 +43,8 @@ Every start tag is either empty (<tag/>)
or has a corresponding end tag.
.TP 0.2i
\(bu
-There is exactly one root element. This element must contain
-all other elements in the document. Only comments, white
+There is exactly one root element. This element must contain
+all other elements in the document. Only comments, white
space, and processing instructions may come after the close
of the root element.
.TP 0.2i
@@ -49,39 +56,38 @@ All attribute values are enclosed in quotes (either single
or double).
.PP
If the document has a DTD, and it strictly complies with that
-DTD, then the document is also considered \fBvalid\fR.
+DTD, then the document is also considered \fIvalid\fR.
\fBxmlwf\fR is a non-validating parser --
-it does not check the DTD. However, it does support
-external entities (see the \fB-x\fR option).
-.SH "OPTIONS"
-.PP
+it does not check the DTD. However, it does support
+external entities (see the \*(T<\fB\-x\fR\*(T> option).
+.SH OPTIONS
When an option includes an argument, you may specify the argument either
-separately ("\fB-d\fR output") or concatenated with the
-option ("\fB-d\fRoutput"). \fBxmlwf\fR
+separately ("\*(T<\fB\-d\fR\*(T> output") or concatenated with the
+option ("\*(T<\fB\-d\fR\*(T>output"). \fBxmlwf\fR
supports both.
-.TP
-\fB-c\fR
+.TP
+\*(T<\fB\-c\fR\*(T>
If the input file is well-formed and \fBxmlwf\fR
doesn't encounter any errors, the input file is simply copied to
the output directory unchanged.
-This implies no namespaces (turns off \fB-n\fR) and
-requires \fB-d\fR to specify an output file.
-.TP
-\fB-d output-dir\fR
+This implies no namespaces (turns off \*(T<\fB\-n\fR\*(T>) and
+requires \*(T<\fB\-d\fR\*(T> to specify an output file.
+.TP
+\*(T<\fB\-d output\-dir\fR\*(T>
Specifies a directory to contain transformed
representations of the input files.
-By default, \fB-d\fR outputs a canonical representation
+By default, \*(T<\fB\-d\fR\*(T> outputs a canonical representation
(described below).
-You can select different output formats using \fB-c\fR
-and \fB-m\fR.
+You can select different output formats using \*(T<\fB\-c\fR\*(T>
+and \*(T<\fB\-m\fR\*(T>.
The output filenames will
be exactly the same as the input filenames or "STDIN" if the input is
-coming from standard input. Therefore, you must be careful that the
+coming from standard input. Therefore, you must be careful that the
output file does not go into the same directory as the input
-file. Otherwise, \fBxmlwf\fR will delete the
+file. Otherwise, \fBxmlwf\fR will delete the
input file before it generates the output file (just like running
-cat < file > file in most shells).
+\*(T<cat < file > file\*(T> in most shells).
Two structurally equivalent XML documents have a byte-for-byte
identical canonical XML representation.
@@ -89,39 +95,39 @@ Note that ignorable white space is considered significant and
is treated equivalently to data.
More on canonical XML can be found at
http://www.jclark.com/xml/canonxml.html .
-.TP
-\fB-e encoding\fR
+.TP
+\*(T<\fB\-e encoding\fR\*(T>
Specifies the character encoding for the document, overriding
-any document encoding declaration. \fBxmlwf\fR
+any document encoding declaration. \fBxmlwf\fR
supports four built-in encodings:
-US-ASCII,
-UTF-8,
-UTF-16, and
-ISO-8859-1.
-Also see the \fB-w\fR option.
-.TP
-\fB-m\fR
+\*(T<US\-ASCII\*(T>,
+\*(T<UTF\-8\*(T>,
+\*(T<UTF\-16\*(T>, and
+\*(T<ISO\-8859\-1\*(T>.
+Also see the \*(T<\fB\-w\fR\*(T> option.
+.TP
+\*(T<\fB\-m\fR\*(T>
Outputs some strange sort of XML file that completely
describes the input file, including character positions.
-Requires \fB-d\fR to specify an output file.
-.TP
-\fB-n\fR
-Turns on namespace processing. (describe namespaces)
-\fB-c\fR disables namespaces.
-.TP
-\fB-p\fR
+Requires \*(T<\fB\-d\fR\*(T> to specify an output file.
+.TP
+\*(T<\fB\-n\fR\*(T>
+Turns on namespace processing. (describe namespaces)
+\*(T<\fB\-c\fR\*(T> disables namespaces.
+.TP
+\*(T<\fB\-p\fR\*(T>
Tells xmlwf to process external DTDs and parameter
entities.
Normally \fBxmlwf\fR never parses parameter
-entities. \fB-p\fR tells it to always parse them.
-\fB-p\fR implies \fB-x\fR.
-.TP
-\fB-r\fR
+entities. \*(T<\fB\-p\fR\*(T> tells it to always parse them.
+\*(T<\fB\-p\fR\*(T> implies \*(T<\fB\-x\fR\*(T>.
+.TP
+\*(T<\fB\-r\fR\*(T>
Normally \fBxmlwf\fR memory-maps the XML file
before parsing; this can result in faster parsing on many
platforms.
-\fB-r\fR turns off memory-mapping and uses normal file
+\*(T<\fB\-r\fR\*(T> turns off memory-mapping and uses normal file
IO calls instead.
Of course, memory-mapping is automatically turned off
when reading from standard input.
@@ -131,34 +137,33 @@ substantially higher memory usage for
\fBxmlwf\fR, but this appears to be a matter of
the operating system reporting memory in a strange way; there is
not a leak in \fBxmlwf\fR.
-.TP
-\fB-s\fR
+.TP
+\*(T<\fB\-s\fR\*(T>
Prints an error if the document is not standalone.
A document is standalone if it has no external subset and no
references to parameter entities.
-.TP
-\fB-t\fR
-Turns on timings. This tells Expat to parse the entire file,
+.TP
+\*(T<\fB\-t\fR\*(T>
+Turns on timings. This tells Expat to parse the entire file,
but not perform any processing.
This gives a fairly accurate idea of the raw speed of Expat itself
without client overhead.
-\fB-t\fR turns off most of the output options
-(\fB-d\fR, \fB-m\fR, \fB-c\fR,
-\&...).
-.TP
-\fB-v\fR
+\*(T<\fB\-t\fR\*(T> turns off most of the output options
+(\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-m\fR\*(T>, \*(T<\fB\-c\fR\*(T>, ...).
+.TP
+\*(T<\fB\-v\fR\*(T>
Prints the version of the Expat library being used, including some
information on the compile-time configuration of the library, and
then exits.
-.TP
-\fB-w\fR
+.TP
+\*(T<\fB\-w\fR\*(T>
Enables support for Windows code pages.
Normally, \fBxmlwf\fR will throw an error if it
-runs across an encoding that it is not equipped to handle itself. With
-\fB-w\fR, xmlwf will try to use a Windows code
-page. See also \fB-e\fR.
-.TP
-\fB-x\fR
+runs across an encoding that it is not equipped to handle itself. With
+\*(T<\fB\-w\fR\*(T>, xmlwf will try to use a Windows code
+page. See also \*(T<\fB\-e\fR\*(T>.
+.TP
+\*(T<\fB\-x\fR\*(T>
Turns on parsing external entities.
Non-validating parsers are not required to resolve external
@@ -178,74 +183,64 @@ This is an example of an internal entity:
And here are some examples of external entities:
.nf
-<!ENTITY header SYSTEM "header-&vers;.xml"> (parsed)
+<!ENTITY header SYSTEM "header\-&vers;.xml"> (parsed)
<!ENTITY logo SYSTEM "logo.png" PNG> (unparsed)
.fi
-.TP
-\fB--\fR
+.TP
+\*(T<\fB\-\-\fR\*(T>
(Two hyphens.)
-Terminates the list of options. This is only needed if a filename
-starts with a hyphen. For example:
+Terminates the list of options. This is only needed if a filename
+starts with a hyphen. For example:
.nf
-xmlwf -- -myfile.xml
+xmlwf \-\- \-myfile.xml
.fi
will run \fBxmlwf\fR on the file
-\fI-myfile.xml\fR.
+\*(T<\fI\-myfile.xml\fR\*(T>.
.PP
Older versions of \fBxmlwf\fR do not support
reading from standard input.
-.SH "OUTPUT"
-.PP
+.SH OUTPUT
If an input file is not well-formed,
\fBxmlwf\fR prints a single line describing
-the problem to standard output. If a file is well formed,
+the problem to standard output. If a file is well formed,
\fBxmlwf\fR outputs nothing.
-Note that the result code is \fBnot\fR set.
-.SH "BUGS"
-.PP
-According to the W3C standard, an XML file without a
-declaration at the beginning is not considered well-formed.
-However, \fBxmlwf\fR allows this to pass.
-.PP
+Note that the result code is \fInot\fR set.
+.SH BUGS
\fBxmlwf\fR returns a 0 - noerr result,
-even if the file is not well-formed. There is no good way for
+even if the file is not well-formed. There is no good way for
a program to use \fBxmlwf\fR to quickly
check a file -- it must parse \fBxmlwf\fR's
standard output.
.PP
The errors should go to standard error, not standard output.
.PP
-There should be a way to get \fB-d\fR to send its
+There should be a way to get \*(T<\fB\-d\fR\*(T> to send its
output to standard output rather than forcing the user to send
it to a file.
.PP
I have no idea why anyone would want to use the
-\fB-d\fR, \fB-c\fR, and
-\fB-m\fR options. If someone could explain it to
+\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-c\fR\*(T>, and
+\*(T<\fB\-m\fR\*(T> options. If someone could explain it to
me, I'd like to add this information to this manpage.
-.SH "ALTERNATIVES"
-.PP
+.SH ALTERNATIVES
Here are some XML validators on the web:
.nf
-http://www.hcrc.ed.ac.uk/~richard/xml-check.html
+http://www.hcrc.ed.ac.uk/~richard/xml\-check.html
http://www.stg.brown.edu/service/xmlvalid/
http://www.scripting.com/frontier5/xml/code/xmlValidator.html
http://www.xml.com/pub/a/tools/ruwf/check.html
.fi
.SH "SEE ALSO"
-.PP
-
.nf
The Expat home page: http://www.libexpat.org/
-The W3 XML specification: http://www.w3.org/TR/REC-xml
+The W3 XML specification: http://www.w3.org/TR/REC\-xml
.fi
-.SH "AUTHOR"
-.PP
-This manual page was written by Scott Bronson <bronson@rinspin.com> for
-the Debian GNU/Linux system (but may be used by others). Permission is
+.SH AUTHOR
+This manual page was written by Scott Bronson <\*(T<bronson@rinspin.com\*(T>> for
+the Debian GNU/Linux system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation
License, Version 1.1.
diff --git a/3rdparty/expat/doc/xmlwf.sgml b/3rdparty/expat/doc/xmlwf.sgml
index 313cfbcb210..e1f779e1f3b 100644
--- a/3rdparty/expat/doc/xmlwf.sgml
+++ b/3rdparty/expat/doc/xmlwf.sgml
@@ -13,7 +13,7 @@ manpage.1: manpage.sgml
<!ENTITY dhfirstname "<firstname>Scott</firstname>">
<!ENTITY dhsurname "<surname>Bronson</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
- <!ENTITY dhdate "<date>December 5, 2001</date>">
+ <!ENTITY dhdate "<date>March 11, 2016</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>1</manvolnum>">
@@ -213,7 +213,7 @@ supports both.
<listitem>
<para>
Outputs some strange sort of XML file that completely
- describes the the input file, including character postitions.
+ describes the input file, including character positions.
Requires <option>-d</option> to specify an output file.
</para>
</listitem>
@@ -286,8 +286,7 @@ supports both.
This gives a fairly accurate idea of the raw speed of Expat itself
without client overhead.
<option>-t</option> turns off most of the output options
- (<option>-d</option>, <option>-m</option>, <option>-c</option>,
- ...).
+ (<option>-d</option>, <option>-m</option>, <option>-c</option>, ...).
</para>
</listitem>
</varlistentry>
diff --git a/3rdparty/expat/examples/elements.c b/3rdparty/expat/examples/elements.c
index 6b8f85501b6..bc04b6b1515 100644
--- a/3rdparty/expat/examples/elements.c
+++ b/3rdparty/expat/examples/elements.c
@@ -50,7 +50,7 @@ main(int argc, char *argv[])
XML_SetUserData(parser, &depth);
XML_SetElementHandler(parser, startElement, endElement);
do {
- int len = (int)fread(buf, 1, sizeof(buf), stdin);
+ size_t len = fread(buf, 1, sizeof(buf), stdin);
done = len < sizeof(buf);
if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) {
fprintf(stderr,
diff --git a/3rdparty/expat/expat_config.h.in b/3rdparty/expat/expat_config.h.in
index 8c6e51409e0..5fcd5fd8da6 100644
--- a/3rdparty/expat/expat_config.h.in
+++ b/3rdparty/expat/expat_config.h.in
@@ -1,4 +1,4 @@
-/* expat_config.h.in. Generated from configure.in by autoheader. */
+/* expat_config.h.in. Generated from configure.ac by autoheader. */
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#undef BYTEORDER
diff --git a/3rdparty/expat/lib/amigaconfig.h b/3rdparty/expat/lib/amigaconfig.h
index 86c61150402..49c92c70149 100644
--- a/3rdparty/expat/lib/amigaconfig.h
+++ b/3rdparty/expat/lib/amigaconfig.h
@@ -7,9 +7,6 @@
/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1
-/* Define to 1 if you have the <check.h> header file. */
-#undef HAVE_CHECK_H
-
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
diff --git a/3rdparty/expat/lib/expat.h b/3rdparty/expat/lib/expat.h
index 9a21680be46..ec62f140515 100644
--- a/3rdparty/expat/lib/expat.h
+++ b/3rdparty/expat/lib/expat.h
@@ -1038,7 +1038,7 @@ XML_GetFeatureList(void);
*/
#define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 1
-#define XML_MICRO_VERSION 0
+#define XML_MICRO_VERSION 1
#ifdef __cplusplus
}
diff --git a/3rdparty/expat/lib/intconfig.h b/3rdparty/expat/lib/intconfig.h
deleted file mode 100644
index 88092e6a006..00000000000
--- a/3rdparty/expat/lib/intconfig.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef INTCONFIG_H
-#define INTCONFIG_H
-
-#include <stdlib.h>
-#include <string.h>
-
-#define XML_NS 1
-#define XML_DTD 1
-#define XML_CONTEXT_BYTES 1024
-
-#ifdef USE_LSB
-#define BYTEORDER 1234
-#else
-#define BYTEORDER 4321
-#endif
-
-#define HAVE_MEMMOVE
-
-#endif
diff --git a/3rdparty/expat/lib/libexpat.def b/3rdparty/expat/lib/libexpat.def
index 3920bbcf901..79b049116de 100644
--- a/3rdparty/expat/lib/libexpat.def
+++ b/3rdparty/expat/lib/libexpat.def
@@ -71,3 +71,6 @@ EXPORTS
XML_StopParser @63
XML_ResumeParser @64
XML_GetParsingStatus @65
+; added with version 2.1.1
+; XML_GetAttributeInfo @66
+ XML_SetHashSalt @67@
diff --git a/3rdparty/expat/lib/libexpatw.def b/3rdparty/expat/lib/libexpatw.def
index 3920bbcf901..79b049116de 100644
--- a/3rdparty/expat/lib/libexpatw.def
+++ b/3rdparty/expat/lib/libexpatw.def
@@ -71,3 +71,6 @@ EXPORTS
XML_StopParser @63
XML_ResumeParser @64
XML_GetParsingStatus @65
+; added with version 2.1.1
+; XML_GetAttributeInfo @66
+ XML_SetHashSalt @67@
diff --git a/3rdparty/expat/lib/xmlparse.c b/3rdparty/expat/lib/xmlparse.c
index 7244741ad3d..e308c795dd9 100644
--- a/3rdparty/expat/lib/xmlparse.c
+++ b/3rdparty/expat/lib/xmlparse.c
@@ -10,7 +10,17 @@
#define XML_BUILDING_EXPAT 1
-#include "intconfig.h"
+#ifdef COMPILED_FROM_DSP
+#include "winconfig.h"
+#elif defined(MACOS_CLASSIC)
+#include "macconfig.h"
+#elif defined(__amigaos__)
+#include "amigaconfig.h"
+#elif defined(__WATCOMC__)
+#include "watcomconfig.h"
+#elif defined(HAVE_EXPAT_CONFIG_H)
+#include <expat_config.h>
+#endif /* ndef COMPILED_FROM_DSP */
#include "ascii.h"
#include "expat.h"
@@ -1540,7 +1550,7 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
else if (bufferPtr == bufferEnd) {
const char *end;
int nLeftOver;
- enum XML_Error result;
+ enum XML_Status result;
parseEndByteIndex += len;
positionPtr = s;
ps_finalBuffer = (XML_Bool)isFinal;
@@ -1668,6 +1678,10 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
void * XMLCALL
XML_GetBuffer(XML_Parser parser, int len)
{
+ if (len < 0) {
+ errorCode = XML_ERROR_NO_MEMORY;
+ return NULL;
+ }
switch (ps_parsing) {
case XML_SUSPENDED:
errorCode = XML_ERROR_SUSPENDED;
@@ -1679,8 +1693,11 @@ XML_GetBuffer(XML_Parser parser, int len)
}
if (len > bufferLim - bufferEnd) {
- /* FIXME avoid integer overflow */
int neededSize = len + (int)(bufferEnd - bufferPtr);
+ if (neededSize < 0) {
+ errorCode = XML_ERROR_NO_MEMORY;
+ return NULL;
+ }
#ifdef XML_CONTEXT_BYTES
int keep = (int)(bufferPtr - buffer);
@@ -1709,7 +1726,11 @@ XML_GetBuffer(XML_Parser parser, int len)
bufferSize = INIT_BUFFER_SIZE;
do {
bufferSize *= 2;
- } while (bufferSize < neededSize);
+ } while (bufferSize < neededSize && bufferSize > 0);
+ if (bufferSize <= 0) {
+ errorCode = XML_ERROR_NO_MEMORY;
+ return NULL;
+ }
newBuf = (char *)MALLOC(bufferSize);
if (newBuf == 0) {
errorCode = XML_ERROR_NO_MEMORY;
@@ -2901,6 +2922,8 @@ storeAtts(XML_Parser parser, const ENCODING *enc,
unsigned long uriHash = hash_secret_salt;
((XML_Char *)s)[-1] = 0; /* clear flag */
id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
+ if (!id || !id->prefix)
+ return XML_ERROR_NO_MEMORY;
b = id->prefix->binding;
if (!b)
return XML_ERROR_UNBOUND_PREFIX;
@@ -5465,6 +5488,8 @@ getAttributeId(XML_Parser parser, const ENCODING *enc,
return NULL;
id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
sizeof(PREFIX));
+ if (!id->prefix)
+ return NULL;
if (id->prefix->name == poolStart(&dtd->pool))
poolFinish(&dtd->pool);
else
diff --git a/3rdparty/expat/lib/xmlrole.c b/3rdparty/expat/lib/xmlrole.c
index bf6d30f30a8..44772e21dd3 100644
--- a/3rdparty/expat/lib/xmlrole.c
+++ b/3rdparty/expat/lib/xmlrole.c
@@ -4,7 +4,19 @@
#include <stddef.h>
-#include "intconfig.h"
+#ifdef COMPILED_FROM_DSP
+#include "winconfig.h"
+#elif defined(MACOS_CLASSIC)
+#include "macconfig.h"
+#elif defined(__amigaos__)
+#include "amigaconfig.h"
+#elif defined(__WATCOMC__)
+#include "watcomconfig.h"
+#else
+#ifdef HAVE_EXPAT_CONFIG_H
+#include <expat_config.h>
+#endif
+#endif /* ndef COMPILED_FROM_DSP */
#include "expat_external.h"
#include "internal.h"
diff --git a/3rdparty/expat/lib/xmltok.c b/3rdparty/expat/lib/xmltok.c
index dcc6fde724c..bf09dfc72b9 100644
--- a/3rdparty/expat/lib/xmltok.c
+++ b/3rdparty/expat/lib/xmltok.c
@@ -4,7 +4,19 @@
#include <stddef.h>
-#include "intconfig.h"
+#ifdef COMPILED_FROM_DSP
+#include "winconfig.h"
+#elif defined(MACOS_CLASSIC)
+#include "macconfig.h"
+#elif defined(__amigaos__)
+#include "amigaconfig.h"
+#elif defined(__WATCOMC__)
+#include "watcomconfig.h"
+#else
+#ifdef HAVE_EXPAT_CONFIG_H
+#include <expat_config.h>
+#endif
+#endif /* ndef COMPILED_FROM_DSP */
#include "expat_external.h"
#include "internal.h"
diff --git a/3rdparty/expat/m4/libtool.m4 b/3rdparty/expat/m4/libtool.m4
index 8ff3c76f8ba..d7c043f4f99 100644
--- a/3rdparty/expat/m4/libtool.m4
+++ b/3rdparty/expat/m4/libtool.m4
@@ -1,8 +1,8 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is free software; the Free Software Foundation gives
@@ -11,8 +11,8 @@
m4_define([_LT_COPYING], [dnl
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
@@ -146,6 +146,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
_LT_DECL([], [host_alias], [0], [The host system])dnl
_LT_DECL([], [host], [0])dnl
_LT_DECL([], [host_os], [0])dnl
@@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
configured by $[0], generated by m4_PACKAGE_STRING.
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
This config.lt script is free software; the Free Software Foundation
gives unlimited permision to copy, distribute and modify it."
@@ -801,6 +803,7 @@ AC_DEFUN([LT_LANG],
m4_case([$1],
[C], [_LT_LANG(C)],
[C++], [_LT_LANG(CXX)],
+ [Go], [_LT_LANG(GO)],
[Java], [_LT_LANG(GCJ)],
[Fortran 77], [_LT_LANG(F77)],
[Fortran], [_LT_LANG(FC)],
@@ -822,6 +825,31 @@ m4_defun([_LT_LANG],
])# _LT_LANG
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_GO. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC], [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+ fi
+fi
+if test -z "$GOC"; then
+ AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
# _LT_LANG_DEFAULT_CONFIG
# -----------------------
m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@ -852,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
m4_ifdef([LT_PROG_GCJ],
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+ [LT_LANG(GO)],
+ [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
AC_PROVIDE_IFELSE([LT_PROG_RC],
[LT_LANG(RC)],
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@ -954,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
_lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test $_lt_result -eq 0; then
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -962,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
rm -rf libconftest.dylib*
rm -f conftest.*
fi])
+
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
[lt_cv_ld_exported_symbols_list],
[lt_cv_ld_exported_symbols_list=no
@@ -973,6 +1012,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
[lt_cv_ld_exported_symbols_list=no])
LDFLAGS="$save_LDFLAGS"
])
+
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
[lt_cv_ld_force_load=no
cat > conftest.c << _LT_EOF
@@ -990,7 +1030,9 @@ _LT_EOF
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
_lt_result=$?
- if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1035,8 +1077,8 @@ _LT_EOF
])
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
# Checks for linker and compiler features on darwin
m4_defun([_LT_DARWIN_LINKER_FEATURES],
[
@@ -1047,6 +1089,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
if test "$lt_cv_ld_force_load" = "yes"; then
_LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+ [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
fi
@@ -1268,7 +1312,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -1280,9 +1324,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*)
+ LD="${LD-ld} -m elf32lppclinux"
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64-*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -1301,7 +1355,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -1330,14 +1387,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
CFLAGS="$SAVE_CFLAGS"
fi
;;
-sparc*-*solaris*)
+*-*solaris*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ yes*)
+ case $host in
+ i?86-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD="${LD-ld}_sol2"
+ fi
+ ;;
*)
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
LD="${LD-ld} -64"
@@ -1414,13 +1484,13 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
;;
esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
fi
case $host_os in
@@ -1600,6 +1670,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=196608
;;
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
osf*)
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -1626,7 +1701,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
;;
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
@@ -1639,7 +1715,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
- while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+ while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
test $i != 17 # 1/2 MB should be enough
do
@@ -2185,7 +2261,7 @@ need_version=unknown
case $host_os in
aix3*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
@@ -2194,7 +2270,7 @@ aix3*)
;;
aix[[4-9]]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
@@ -2259,7 +2335,7 @@ beos*)
;;
bsdi[[45]]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
@@ -2398,7 +2474,7 @@ m4_if([$1], [],[
;;
dgux*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -2406,10 +2482,6 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd1*)
- dynamic_linker=no
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -2417,7 +2489,7 @@ freebsd* | dragonfly*)
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[[123]]*) objformat=aout ;;
+ freebsd[[23]].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -2435,7 +2507,7 @@ freebsd* | dragonfly*)
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2454,19 +2526,8 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
@@ -2527,7 +2588,7 @@ hpux9* | hpux10* | hpux11*)
;;
interix[[3-9]]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -2543,7 +2604,7 @@ irix5* | irix6* | nonstopux*)
nonstopux*) version_type=nonstopux ;;
*)
if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
fi ;;
@@ -2580,9 +2641,9 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2657,7 +2718,7 @@ netbsd*)
;;
newsos6)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -2726,7 +2787,7 @@ rdos*)
;;
solaris*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2751,7 +2812,7 @@ sunos4*)
;;
sysv4 | sysv4.3*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -2775,7 +2836,7 @@ sysv4 | sysv4.3*)
sysv4*MP*)
if test -d /usr/nec ;then
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
soname_spec='$libname${shared_ext}.$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -2806,7 +2867,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
tpf*)
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2816,7 +2877,7 @@ tpf*)
;;
uts4*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -3197,10 +3258,6 @@ freebsd* | dragonfly*)
fi
;;
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
haiku*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3238,8 +3295,8 @@ irix5* | irix6* | nonstopux*)
lt_cv_deplibs_check_method=pass_all
;;
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3658,6 +3715,7 @@ for ac_symprfx in "" "_"; do
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK ['"\
" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -3990,7 +4048,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -4242,7 +4300,9 @@ m4_if([$1], [CXX], [
case $cc_basename in
nvcc*) # Cuda Compiler Driver 2.2
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+ if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+ fi
;;
esac
else
@@ -4287,7 +4347,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -4334,18 +4394,33 @@ m4_if([$1], [CXX], [
;;
*)
case `$CC -V 2>&1 | sed 5q` in
- *Sun\ F* | *Sun*Fortran*)
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
# Sun Fortran 8.3 passes all unrecognized flags to the linker
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
;;
+ *Sun\ F* | *Sun*Fortran*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
*Sun\ C*)
# Sun C 5.9
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
;;
+ *Intel*\ [[CF]]*Compiler*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ *Portland\ Group*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
esac
;;
esac
@@ -4505,7 +4580,9 @@ m4_if([$1], [CXX], [
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
- cl*) ;;
+ cl*)
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
*)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
@@ -4533,7 +4610,6 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
_LT_TAGVAR(hardcode_minus_L, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -4787,8 +4863,7 @@ _LT_EOF
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
if test "x$supports_anon_versioning" = xyes; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
@@ -5084,6 +5159,7 @@ _LT_EOF
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
# Don't use ranlib
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
@@ -5130,10 +5206,6 @@ _LT_EOF
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
- freebsd1*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
# support. Future versions do this automatically, but an explicit c++rt0.o
# does not break anything, and helps significantly (at the cost of a little
@@ -5146,7 +5218,7 @@ _LT_EOF
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
+ freebsd2.*)
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -5185,7 +5257,6 @@ _LT_EOF
fi
if test "$with_gnu_ld" = no; then
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
@@ -5627,9 +5698,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
[Flag to hardcode $libdir into a binary during linking.
This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
- [[If ld is used when linking, flag to hardcode $libdir into a binary
- during linking. This must work even if $libdir does not exist]])
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
[Whether we need a single "-rpath" flag with a separated argument])
_LT_TAGDECL([], [hardcode_direct], [0],
@@ -5787,7 +5855,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
_LT_TAGVAR(hardcode_minus_L, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -6157,7 +6224,7 @@ if test "$_lt_caught_CXX_error" != yes; then
esac
;;
- freebsd[[12]]*)
+ freebsd2.*)
# C++ shared libraries reported to be fairly broken before
# switch to ELF
_LT_TAGVAR(ld_shlibs, $1)=no
@@ -6173,9 +6240,6 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=yes
;;
- gnu*)
- ;;
-
haiku*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -6337,7 +6401,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(inherit_rpath, $1)=yes
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -6918,12 +6982,18 @@ public class foo {
}
};
_LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
])
_lt_libdeps_save_CFLAGS=$CFLAGS
case "$CC $CFLAGS " in #(
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
esac
dnl Parse the compiler output and extract the necessary
@@ -7120,7 +7190,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
_LT_TAGVAR(hardcode_minus_L, $1)=no
_LT_TAGVAR(hardcode_automatic, $1)=no
@@ -7253,7 +7322,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
_LT_TAGVAR(hardcode_minus_L, $1)=no
_LT_TAGVAR(hardcode_automatic, $1)=no
@@ -7440,6 +7508,77 @@ CFLAGS=$lt_save_CFLAGS
])# _LT_LANG_GCJ_CONFIG
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
# _LT_LANG_RC_CONFIG([TAG])
# -------------------------
# Ensure that the configuration variables for the Windows resource compiler
@@ -7509,6 +7648,13 @@ dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
# LT_PROG_RC
# ----------
AC_DEFUN([LT_PROG_RC],
diff --git a/3rdparty/expat/m4/ltoptions.m4 b/3rdparty/expat/m4/ltoptions.m4
index 17cfd51c0b3..5d9acd8e23b 100644
--- a/3rdparty/expat/m4/ltoptions.m4
+++ b/3rdparty/expat/m4/ltoptions.m4
@@ -326,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic],
+ [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for lt_pkg in $withval; do
+ IFS="$lt_save_ifs"
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
diff --git a/3rdparty/expat/m4/ltversion.m4 b/3rdparty/expat/m4/ltversion.m4
index 9c7b5d41185..07a8602d48d 100644
--- a/3rdparty/expat/m4/ltversion.m4
+++ b/3rdparty/expat/m4/ltversion.m4
@@ -9,15 +9,15 @@
# @configure_input@
-# serial 3293 ltversion.m4
+# serial 3337 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4])
-m4_define([LT_PACKAGE_REVISION], [1.3293])
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4'
-macro_revision='1.3293'
+[macro_version='2.4.2'
+macro_revision='1.3337'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
diff --git a/3rdparty/expat/tests/benchmark/README.txt b/3rdparty/expat/tests/benchmark/README.txt
index 7f9cca037ec..86414d5815a 100644
--- a/3rdparty/expat/tests/benchmark/README.txt
+++ b/3rdparty/expat/tests/benchmark/README.txt
@@ -13,4 +13,4 @@ The command line arguments are:
Returns:
The time (in seconds) it takes to parse the test file,
- averaged over the number of iterations. \ No newline at end of file
+ averaged over the number of iterations.@
diff --git a/3rdparty/expat/tests/chardata.c b/3rdparty/expat/tests/chardata.c
index 5fb0299d88e..02243e048c7 100644
--- a/3rdparty/expat/tests/chardata.c
+++ b/3rdparty/expat/tests/chardata.c
@@ -7,11 +7,7 @@
#ifdef HAVE_EXPAT_CONFIG_H
#include <expat_config.h>
#endif
-#ifdef HAVE_CHECK_H
-#include <check.h>
-#else
#include "minicheck.h"
-#endif
#include <assert.h>
#include <stdio.h>
diff --git a/3rdparty/expat/tests/xmltest.sh b/3rdparty/expat/tests/xmltest.sh
index 793a5cc2819..793a5cc2819 100644..100755
--- a/3rdparty/expat/tests/xmltest.sh
+++ b/3rdparty/expat/tests/xmltest.sh
diff --git a/3rdparty/expat/win32/expat.iss b/3rdparty/expat/win32/expat.iss
index de5b6efdd9b..793887b6474 100644
--- a/3rdparty/expat/win32/expat.iss
+++ b/3rdparty/expat/win32/expat.iss
@@ -7,17 +7,17 @@
[Setup]
AppName=Expat
AppId=expat
-AppVersion=2.1.0
-AppVerName=Expat 2.1.0
+AppVersion=2.1.1
+AppVerName=Expat 2.1.1
AppCopyright=Copyright © 1998-2012 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers
AppPublisher=The Expat Developers
AppPublisherURL=http://www.libexpat.org/
AppSupportURL=http://www.libexpat.org/
AppUpdatesURL=http://www.libexpat.org/
-UninstallDisplayName=Expat XML Parser 2.1.0
-VersionInfoVersion=2.1.0
+UninstallDisplayName=Expat XML Parser 2.1.1
+VersionInfoVersion=2.1.1
-DefaultDirName={pf}\Expat 2.1.0
+DefaultDirName={pf}\Expat 2.1.1
UninstallFilesDir={app}\Uninstall
Compression=lzma
diff --git a/3rdparty/expat/xmlwf/unixfilemap.c b/3rdparty/expat/xmlwf/unixfilemap.c
index 93adce32e82..e13299da05f 100644
--- a/3rdparty/expat/xmlwf/unixfilemap.c
+++ b/3rdparty/expat/xmlwf/unixfilemap.c
@@ -51,7 +51,7 @@ filemap(const char *name,
close(fd);
return 1;
}
- p = (void *)mmap((caddr_t)0, (size_t)nbytes, PROT_READ,
+ p = (void *)mmap((void *)0, (size_t)nbytes, PROT_READ,
MAP_FILE|MAP_PRIVATE, fd, (off_t)0);
if (p == (void *)-1) {
perror(name);
@@ -59,7 +59,7 @@ filemap(const char *name,
return 0;
}
processor(p, nbytes, name, arg);
- munmap((caddr_t)p, nbytes);
+ munmap((void *)p, nbytes);
close(fd);
return 1;
}
diff --git a/3rdparty/expat/xmlwf/xmlwf.c b/3rdparty/expat/xmlwf/xmlwf.c
index 4fc77da9441..c4090b0e406 100644
--- a/3rdparty/expat/xmlwf/xmlwf.c
+++ b/3rdparty/expat/xmlwf/xmlwf.c
@@ -634,8 +634,7 @@ static void
usage(const XML_Char *prog, int rc)
{
ftprintf(stderr,
- T("usage: %s [-n] [-p] [-r] [-s] [-w] [-x] [-d output-dir] "
- "[-e encoding] file ...\n"), prog);
+ T("usage: %s [-s] [-n] [-p] [-x] [-e encoding] [-w] [-d output-dir] [-c] [-m] [-r] [-t] [file ...]\n"), prog);
exit(rc);
}
diff --git a/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua b/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua
index 29b3299c48e..5da2de0944f 100644
--- a/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua
+++ b/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua
@@ -719,8 +719,8 @@
for _, file in ipairs(files) do
local translatedpath = path.translate(file.name, "\\")
_p(2, '<ClCompile Include=\"%s\">', translatedpath)
- _p(3, '<ObjectFileName>$(IntDir)%s.obj</ObjectFileName>'
- , premake.esc(path.translate(path.trimdots(path.removeext(file.name))))
+ _p(3, '<ObjectFileName>$(IntDir)%s\\</ObjectFileName>'
+ , premake.esc(path.translate(path.trimdots(path.getdirectory(file.name))))
)
--For Windows Store Builds, if the file is .c we have to exclude it from /ZW compilation
diff --git a/3rdparty/genie/src/host/scripts.c b/3rdparty/genie/src/host/scripts.c
index 47814bb1e95..ea4521e0dda 100644
--- a/3rdparty/genie/src/host/scripts.c
+++ b/3rdparty/genie/src/host/scripts.c
@@ -304,14 +304,14 @@ const char* builtin_scripts[] = {
"e(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nlocal groupedBuildTasks = {}\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nif (groupedBuildTasks[buildtask[1]] == nil) then\ngroupedBuildTasks[buildtask[1]] = {}\nend\ntable.insert(groupedBuildTasks[buildtask[1]], buildtask)\nend\nend\nfor name, custombuildtask in pairs(groupedBuildTasks or {}) do\n_p(2,'<CustomBuild Include=\\\"%s\\\">', path.translate(path.getrelative(prj.location,name), \"\\\\\"))\n_p(3,'<FileType>Text</FileType>')\nlocal cmd = \"\"\nlocal outputs = \"\"\nfor _, buildtask in ipairs(custombuildtask or {}) do\nfor _, cmdline in ipairs(buildtask[4] or {}) do\ncmd = cmd .. cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd"
" = string.gsub(cmd, \"%$%(<%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[1])))\ncmd = string.gsub(cmd, \"%$%(@%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[2])))\ncmd = cmd .. \"\\r\\n\"\nend\noutputs = outputs .. path.getrelative(prj.location,buildtask[2]) .. \";\"\nend\n_p(3,'<Command>%s</Command>',cmd)\n_p(3,'<Outputs>%s%%(Outputs)</Outputs>',outputs)\n_p(3,'<SubType>Designer</SubType>')\n_p(3,'<Message></Message>')\n_p(2,'</CustomBuild>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.simplefilesgroup(prj, section, subtype)\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nif subtype then\n_p(2,'<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\n_p(3,'<SubType>%s</SubType>', subtype)\n_p(2,'</%s>', section)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.deployment"
"contentgroup(prj, section, filetype)\nif filetype == nil then\nfiletype = section\nend\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\n_p(2,'<%s Include=\\\"%s\\\">', filetype, path.translate(file.name, \"\\\\\"))\n_p(3,'<DeploymentContent>true</DeploymentContent>')\n_p(3,'<Link>%s</Link>', path.translate(file.vpath, \"\\\\\"))\n_p(2,'</%s>', filetype)\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.compilerfilesgroup(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"ClCompile\")\nif #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal translatedpath = path.translate(file.name, "
- "\"\\\\\")\n_p(2, '<ClCompile Include=\\\"%s\\\">', translatedpath)\n_p(3, '<ObjectFileName>$(IntDir)%s.obj</ObjectFileName>'\n, premake.esc(path.translate(path.trimdots(path.removeext(file.name))))\n)\nif vstudio.iswinrt() and string.len(file.name) > 2 and string.sub(file.name, -2) == \".c\" then\n_p(3,'<CompileAsWinRT>FALSE</CompileAsWinRT>')\nend\nfor _, cfginfo in ipairs(configs) do\nif config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then\n_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>Create</PrecompiledHeader>', premake.esc(cfginfo.name))\nconfig_mappings[cfginfo] = nil --only one source file per pch\nend\nend\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif excluded or table.icontains(cfg.excludes, file.name) then\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(vsconfig.name)\n)"
- "\nend\nend\n_p(2,'</ClCompile>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.header(targets)\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nlocal t = \"\"\nif targets then\nt = ' DefaultTargets=\"' .. targets .. '\"'\nend\n_p('<Project%s ToolsVersion=\"%s\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">', t, action.vstudio.toolsVersion)\nend\nfunction premake.vs2010_vcxproj(prj)\nio.indent = \" \"\nvc2010.header(\"Build\")\nvs2010_config(prj)\nvs2010_globals(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc2010.configurationPropertyGroup(cfg, cfginfo)\nend\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')\n_p(1,'<ImportGroup Label=\"ExtensionSettings\">')\n_p(1,'</ImportGroup>')\nimport_props(prj)\n_p(1,'<PropertyGroup Label=\"UserMacros\" />')\nvc2010.outputProp"
- "erties(prj)\nitem_definitions(prj)\nvc2010.files(prj)\nvc2010.projectReferences(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')\n_p(1,'<ImportGroup Label=\"ExtensionTargets\">')\n_p(1,'</ImportGroup>')\n_p('</Project>')\nend\nfunction vc2010.projectReferences(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\n_p(1,'<ItemGroup>')\nfor _, dep in ipairs(deps) do\nlocal deppath = path.getrelative(prj.location, vstudio.projectfile(dep))\n_p(2,'<ProjectReference Include=\\\"%s\\\">', path.translate(deppath, \"\\\\\"))\n_p(3,'<Project>{%s}</Project>', dep.uuid)\nif vstudio.iswinrt() then\n_p(3,'<ReferenceOutputAssembly>false</ReferenceOutputAssembly>')\nend\n_p(2,'</ProjectReference>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.debugdir(cfg)\nif cfg.debugdir and not vstudio.iswinrt() then\n_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>', path.translate(cfg.debugdir, '\\\\'))\n_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFla"
- "vor>')\nend\nif cfg.debugargs then\n_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>', table.concat(cfg.debugargs, \" \"))\nend\nend\nfunction vc2010.debugenvs(cfg)\nif cfg.debugenvs and #cfg.debugenvs > 0 then\n_p(2,'<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>',table.concat(cfg.debugenvs, \"\\n\")\n,iif(cfg.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)','')\n)\nif cfg.flags.DebugEnvsDontMerge then\n_p(2,'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')\nend\nend\nend\nfunction premake.vs2010_vcxproj_user(prj)\nio.indent = \" \"\nvc2010.header()\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(' <PropertyGroup '.. if_config_and_platform() ..'>', premake.esc(cfginfo.name))\nvc2010.debugdir(cfg)\nvc2010.debugenvs(cfg)\n_p(' </PropertyGroup>')\nend\n_p('</Project>')\nend\nfunction premake.vs2010_appxmanifest(prj)\nio.indent = \" \"\nio.eol = \"\\r"
- "\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nif vstudio.toolset == \"v120_wp81\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">')\nelseif vstudio.storeapp == \"8.1\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2013/manifest\">')\nelseif vstudio.storeapp == \"durango\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:mx=\"http://schemas.microsoft.com/appx/2013/xbox/manifest\" IgnorableNamespaces=\"mx\">')\nelse\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\">')\nend\n_p(1,'<Identity Name=\"' .. prj.u"
- "uid .. '\"')\n_p(2,'Publisher=\"CN=Unknown\"')\n_p(2,'Version=\"1.0.0.0\" />')\nif vstudio.toolset == \"v120_wp81\" or vstudio.storeapp == \"8.2\" then\n_p(1,'<mp:PhoneIdentity PhoneProductId=\"' .. prj.uuid .. '\" PhonePublisherId=\"00000000-0000-0000-0000-000000000000\"/>')\nend\n_p(1,'<Properties>')\n_p(2,'<DisplayName>' .. prj.name .. '</DisplayName>')\n_p(2,'<PublisherDisplayName>Unknown</PublisherDisplayName>')\n_p(2,'<Logo>EmptyLogo.png</Logo>')\n_p(1,'</Properties>')\nif vstudio.storeapp == \"8.2\" then\n_p(1, '<Dependencies>')\n_p(2, '<TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10069.0\" MaxVersionTested=\"10.0.10069.0\" />')\n_p(1, '</Dependencies>')\nelseif vstudio.storeapp == \"durango\" then\n_p(1, '<Prerequisites>')\n_p(2, '<OSMinVersion>6.2</OSMinVersion>')\n_p(2, '<OSMaxVersionTested>6.2</OSMaxVersionTested>')\n_p(1, '</Prerequisites>')\nelse\n_p(1, '<Prerequisites>')\n_p(2, '<OSMinVersion>6.3.0</OSMinVersion>')\n_p(2, '<OSMaxVersionTested>6.3.0</OSMaxVersionTested>')\n_p(1"
- ", '</Prerequisites>')\nend\n_p(1,'<Resources>')\n_p(2,'<Resource Language=\"x-generate\"/>')\n_p(1,'</Resources>')\n_p(1,'<Applications>')\n_p(2,'<Application Id=\"App\"')\n_p(3,'Executable=\"$targetnametoken$.exe\"')\n_p(3,'EntryPoint=\"App\">')\nif vstudio.storeapp == \"durango\" then\n_p(3, '<VisualElements')\n_p(4, 'DisplayName=\"GENie\"')\n_p(4, 'Logo=\"Assets\\\\Logo.png\"')\n_p(4, 'SmallLogo=\"Assets\\\\SmallLogo.png\"')\n_p(4, 'Description=\"GENie\"')\n_p(4, 'ForegroundText=\"light\"')\n_p(4, 'BackgroundColor=\"transparent\">')\n_p(5, '<SplashScreen Image=\"Assets\\\\SplashScreen.png\" />')\n_p(3, '</VisualElements>')\n_p(3, '<Extensions>')\n_p(4, '<mx:Extension Category=\"xbox.system.resources\">')\n_p(4, '<mx:XboxSystemResources />')\n_p(4, '</mx:Extension>')\n_p(3, '</Extensions>')\nelse\n_p(3, '<m3:VisualElements')\n_p(4, 'DisplayName=\"GENie\"')\n_p(4, 'Square150x150Logo=\"Assets\\\\Logo.png\"')\nif vstudio.toolset == \"v120_wp81\" or vstudio.storeapp == \"8.2\" then\n_p(4, 'Square44x44Logo=\"Asse"
- "ts\\\\SmallLogo.png\"')\nelse\n_p(4, 'Square30x30Logo=\"Assets\\\\SmallLogo.png\"')\nend\n_p(4, 'Description=\"GENie\"')\n_p(4, 'ForegroundText=\"light\"')\n_p(4, 'BackgroundColor=\"transparent\">')\n_p(4, '<m3:SplashScreen Image=\"%s\" />', path.getname(vstudio.splashpath))\n_p(3, '</m3:VisualElements>')\nend\n_p(2,'</Application>')\n_p(1,'</Applications>')\n_p('</Package>')\nend\n",
+ "\"\\\\\")\n_p(2, '<ClCompile Include=\\\"%s\\\">', translatedpath)\n_p(3, '<ObjectFileName>$(IntDir)%s\\\\</ObjectFileName>'\n, premake.esc(path.translate(path.trimdots(path.getdirectory(file.name))))\n)\nif vstudio.iswinrt() and string.len(file.name) > 2 and string.sub(file.name, -2) == \".c\" then\n_p(3,'<CompileAsWinRT>FALSE</CompileAsWinRT>')\nend\nfor _, cfginfo in ipairs(configs) do\nif config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then\n_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>Create</PrecompiledHeader>', premake.esc(cfginfo.name))\nconfig_mappings[cfginfo] = nil --only one source file per pch\nend\nend\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif excluded or table.icontains(cfg.excludes, file.name) then\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(vsconfig.name)"
+ "\n)\nend\nend\n_p(2,'</ClCompile>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.header(targets)\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nlocal t = \"\"\nif targets then\nt = ' DefaultTargets=\"' .. targets .. '\"'\nend\n_p('<Project%s ToolsVersion=\"%s\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">', t, action.vstudio.toolsVersion)\nend\nfunction premake.vs2010_vcxproj(prj)\nio.indent = \" \"\nvc2010.header(\"Build\")\nvs2010_config(prj)\nvs2010_globals(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc2010.configurationPropertyGroup(cfg, cfginfo)\nend\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')\n_p(1,'<ImportGroup Label=\"ExtensionSettings\">')\n_p(1,'</ImportGroup>')\nimport_props(prj)\n_p(1,'<PropertyGroup Label=\"UserMacros\" />')\nvc2010.outputP"
+ "roperties(prj)\nitem_definitions(prj)\nvc2010.files(prj)\nvc2010.projectReferences(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')\n_p(1,'<ImportGroup Label=\"ExtensionTargets\">')\n_p(1,'</ImportGroup>')\n_p('</Project>')\nend\nfunction vc2010.projectReferences(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\n_p(1,'<ItemGroup>')\nfor _, dep in ipairs(deps) do\nlocal deppath = path.getrelative(prj.location, vstudio.projectfile(dep))\n_p(2,'<ProjectReference Include=\\\"%s\\\">', path.translate(deppath, \"\\\\\"))\n_p(3,'<Project>{%s}</Project>', dep.uuid)\nif vstudio.iswinrt() then\n_p(3,'<ReferenceOutputAssembly>false</ReferenceOutputAssembly>')\nend\n_p(2,'</ProjectReference>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.debugdir(cfg)\nif cfg.debugdir and not vstudio.iswinrt() then\n_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>', path.translate(cfg.debugdir, '\\\\'))\n_p(' <DebuggerFlavor>WindowsLocalDebugger</Debugger"
+ "Flavor>')\nend\nif cfg.debugargs then\n_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>', table.concat(cfg.debugargs, \" \"))\nend\nend\nfunction vc2010.debugenvs(cfg)\nif cfg.debugenvs and #cfg.debugenvs > 0 then\n_p(2,'<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>',table.concat(cfg.debugenvs, \"\\n\")\n,iif(cfg.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)','')\n)\nif cfg.flags.DebugEnvsDontMerge then\n_p(2,'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')\nend\nend\nend\nfunction premake.vs2010_vcxproj_user(prj)\nio.indent = \" \"\nvc2010.header()\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(' <PropertyGroup '.. if_config_and_platform() ..'>', premake.esc(cfginfo.name))\nvc2010.debugdir(cfg)\nvc2010.debugenvs(cfg)\n_p(' </PropertyGroup>')\nend\n_p('</Project>')\nend\nfunction premake.vs2010_appxmanifest(prj)\nio.indent = \" \"\nio.eol = \""
+ "\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nif vstudio.toolset == \"v120_wp81\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">')\nelseif vstudio.storeapp == \"8.1\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2013/manifest\">')\nelseif vstudio.storeapp == \"durango\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:mx=\"http://schemas.microsoft.com/appx/2013/xbox/manifest\" IgnorableNamespaces=\"mx\">')\nelse\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\">')\nend\n_p(1,'<Identity Name=\"' .. pr"
+ "j.uuid .. '\"')\n_p(2,'Publisher=\"CN=Unknown\"')\n_p(2,'Version=\"1.0.0.0\" />')\nif vstudio.toolset == \"v120_wp81\" or vstudio.storeapp == \"8.2\" then\n_p(1,'<mp:PhoneIdentity PhoneProductId=\"' .. prj.uuid .. '\" PhonePublisherId=\"00000000-0000-0000-0000-000000000000\"/>')\nend\n_p(1,'<Properties>')\n_p(2,'<DisplayName>' .. prj.name .. '</DisplayName>')\n_p(2,'<PublisherDisplayName>Unknown</PublisherDisplayName>')\n_p(2,'<Logo>EmptyLogo.png</Logo>')\n_p(1,'</Properties>')\nif vstudio.storeapp == \"8.2\" then\n_p(1, '<Dependencies>')\n_p(2, '<TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10069.0\" MaxVersionTested=\"10.0.10069.0\" />')\n_p(1, '</Dependencies>')\nelseif vstudio.storeapp == \"durango\" then\n_p(1, '<Prerequisites>')\n_p(2, '<OSMinVersion>6.2</OSMinVersion>')\n_p(2, '<OSMaxVersionTested>6.2</OSMaxVersionTested>')\n_p(1, '</Prerequisites>')\nelse\n_p(1, '<Prerequisites>')\n_p(2, '<OSMinVersion>6.3.0</OSMinVersion>')\n_p(2, '<OSMaxVersionTested>6.3.0</OSMaxVersionTested>')\n_"
+ "p(1, '</Prerequisites>')\nend\n_p(1,'<Resources>')\n_p(2,'<Resource Language=\"x-generate\"/>')\n_p(1,'</Resources>')\n_p(1,'<Applications>')\n_p(2,'<Application Id=\"App\"')\n_p(3,'Executable=\"$targetnametoken$.exe\"')\n_p(3,'EntryPoint=\"App\">')\nif vstudio.storeapp == \"durango\" then\n_p(3, '<VisualElements')\n_p(4, 'DisplayName=\"GENie\"')\n_p(4, 'Logo=\"Assets\\\\Logo.png\"')\n_p(4, 'SmallLogo=\"Assets\\\\SmallLogo.png\"')\n_p(4, 'Description=\"GENie\"')\n_p(4, 'ForegroundText=\"light\"')\n_p(4, 'BackgroundColor=\"transparent\">')\n_p(5, '<SplashScreen Image=\"Assets\\\\SplashScreen.png\" />')\n_p(3, '</VisualElements>')\n_p(3, '<Extensions>')\n_p(4, '<mx:Extension Category=\"xbox.system.resources\">')\n_p(4, '<mx:XboxSystemResources />')\n_p(4, '</mx:Extension>')\n_p(3, '</Extensions>')\nelse\n_p(3, '<m3:VisualElements')\n_p(4, 'DisplayName=\"GENie\"')\n_p(4, 'Square150x150Logo=\"Assets\\\\Logo.png\"')\nif vstudio.toolset == \"v120_wp81\" or vstudio.storeapp == \"8.2\" then\n_p(4, 'Square44x44Logo=\"A"
+ "ssets\\\\SmallLogo.png\"')\nelse\n_p(4, 'Square30x30Logo=\"Assets\\\\SmallLogo.png\"')\nend\n_p(4, 'Description=\"GENie\"')\n_p(4, 'ForegroundText=\"light\"')\n_p(4, 'BackgroundColor=\"transparent\">')\n_p(4, '<m3:SplashScreen Image=\"%s\" />', path.getname(vstudio.splashpath))\n_p(3, '</m3:VisualElements>')\nend\n_p(2,'</Application>')\n_p(1,'</Applications>')\n_p('</Package>')\nend\n",
/* actions/vstudio/vs2010_vcxproj_filters.lua */
"local vc2010 = premake.vstudio.vc2010\nlocal project = premake.project\nfunction vc2010.filteridgroup(prj)\nlocal filters = { }\nlocal filterfound = false\nfor file in project.eachfile(prj) do\nlocal folders = string.explode(file.vpath, \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = true\n_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid(path))\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal folders = string.explode(path.trimdots(path.getrelative(prj.location,buildtask[1])), \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = tr"
diff --git a/3rdparty/libuv/AUTHORS b/3rdparty/libuv/AUTHORS
index 8dc3955cad5..9a9e9c2a220 100644
--- a/3rdparty/libuv/AUTHORS
+++ b/3rdparty/libuv/AUTHORS
@@ -240,3 +240,16 @@ Yuval Brik <yuval@brik.org.il>
Joran Dirk Greef <joran@ronomon.com>
Andrey Mazo <andrey.mazo@fidelissecurity.com>
sztomi <hello.sztomi@gmail.com>
+Martin Bark <martin@barkynet.com>
+Dave <dave@jut.io>
+Alexis Murzeau <amubtdx@gmail.com>
+Didiet <lynxluna@gmail.com>
+Nan Xiang <514580344@qq.com>
+Samuel Lorétan <sloretan@riotgames.com>
+Nándor István Krácser <bonifaido@gmail.com>
+Katsutoshi Horie <mps299792458@gmail.com>
+Lukasz Jagiello <lukasz@wikia-inc.com>
+Robert Chiras <robert.chiras@intel.com>
+Kári Tristan Helgason <kthelgason@gmail.com>
+Krishnaraj Bhat <krrishnarraj@gmail.com>
+Enno Boland <g@s01.de>
diff --git a/3rdparty/libuv/CONTRIBUTING.md b/3rdparty/libuv/CONTRIBUTING.md
index b46edd492aa..ef5c2b2feaa 100644
--- a/3rdparty/libuv/CONTRIBUTING.md
+++ b/3rdparty/libuv/CONTRIBUTING.md
@@ -23,8 +23,7 @@ The stable branch is effectively frozen; patches that change the libuv
API/ABI or affect the run-time behavior of applications get rejected.
In case of doubt, open an issue in the [issue tracker][], post your question
-to the [libuv mailing list], or contact one of project maintainers
-(@bnoordhuis, @piscisaureus, @indutny or @saghul) on [IRC][].
+to the [libuv mailing list], or contact one of [project maintainers][] on [IRC][].
Especially do so if you plan to work on something big. Nothing is more
frustrating than seeing your hard work go to waste because your vision
@@ -138,7 +137,10 @@ $ git rebase upstream/v1.x # or upstream/master
### TEST
Bug fixes and features should come with tests. Add your tests in the
-`test/` directory. Tests also need to be registered in `test/test-list.h`.
+`test/` directory. Each new test needs to be registered in `test/test-list.h`. If you add a new test file, it needs to be registered in two places:
+- `Makefile.am`: add the file's name to the `test_run_tests_SOURCES` list.
+- `uv.gyp`: add the file's name to the `sources` list in the `run-tests` target.
+
Look at other tests to see how they should be structured (license boilerplate,
the way entry points are declared, etc.).
@@ -164,3 +166,4 @@ not send out notifications when you add commits.
[libuv mailing list]: http://groups.google.com/group/libuv
[IRC]: http://webchat.freelibuv.net/?channels=libuv
[Google C/C++ style guide]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
+[project maintainers]: https://github.com/libuv/libuv/blob/master/MAINTAINERS.md
diff --git a/3rdparty/libuv/ChangeLog b/3rdparty/libuv/ChangeLog
index d5f95404a56..01114d083d6 100644
--- a/3rdparty/libuv/ChangeLog
+++ b/3rdparty/libuv/ChangeLog
@@ -1,4 +1,143 @@
-2015.12.15, Version 1.8.0 (Stable)
+2016.04.08, Version 1.9.0 (Stable)
+
+Changes since version 1.8.0:
+
+* win: wait for full timeout duration (João Reis)
+
+* unix: fix support for uClibc-ng (Martin Bark)
+
+* doc: indicate where new test files need to be added (Dave)
+
+* test,unix: fix logic error in test runner (Ben Noordhuis)
+
+* fs: don't nullify req->bufs on EINTR (Dave)
+
+* osx: set the default thread stack size to RLIMIT_STACK (Saúl Ibarra Corretgé)
+
+* build: invoke libtoolize with --copy (Ben Noordhuis)
+
+* test: fixup eintr_handling (Saúl Ibarra Corretgé)
+
+* osx: avoid compilation warning with Clang (Saúl Ibarra Corretgé)
+
+* test,win: fix compilation with shared lib (Alexis Murzeau)
+
+* test: fix race condition in pipe-close-stdout (Imran Iqbal)
+
+* unix,win: add uv_os_tmpdir() (cjihrig)
+
+* ios: fix undefined PTHREAD_STACK_MIN (Didiet)
+
+* test: fix threadpool_multiple_event_loops for AIX (Imran Iqbal)
+
+* unix: report errors for unpollable fds (Ben Noordhuis)
+
+* win: fix watching root files (Nicholas Vavilov)
+
+* build,win: print the Visual Studio version in use (Saúl Ibarra Corretgé)
+
+* build,win: remove unneeded condition from GYP file (Saúl Ibarra Corretgé)
+
+* test,win: fix compilation warning (Saúl Ibarra Corretgé)
+
+* test: use uv_loop_close and assert its result (Nan Xiang)
+
+* build: map 'AMD64' host arch to 'x64' (Ben Noordhuis)
+
+* osx: protected use of potentially undefined macro (Samuel Lorétan)
+
+* linux: fix compilation with musl (Saúl Ibarra Corretgé)
+
+* doc: describe how to make release builds on Unix (Saúl Ibarra Corretgé)
+
+* doc: add missing link in README (Saúl Ibarra Corretgé)
+
+* build: python 2.x/3.x consistent print usage (Rasmus Christian Pedersen)
+
+* test: assume no IPv6 if interfaces cannot be listed (Nan Xiang)
+
+* darwin: replace F_FULLFSYNC with fdatasync syscall (Saúl Ibarra Corretgé)
+
+* doc: add missing write callback to example (Nándor István Krácser)
+
+* build: compile with -D_THREAD_SAFE on AIX (Imran Iqbal)
+
+* test: fix threadpool_multiple_event_loops on PPC (Imran Iqbal)
+
+* test: reduce timeout in tcp_close_while_connecting (Imran Iqbal)
+
+* unix, win: consistently null-terminate buffers (Saúl Ibarra Corretgé)
+
+* unix, win: count null byte on UV_ENOBUFS (Saúl Ibarra Corretgé)
+
+* test: fix deadlocks in uv_cond_wait (Katsutoshi Horie)
+
+* linux: fix cpu count (Lukasz Jagiello)
+
+* unix: fix uv__handle_type for AIX (Imran Iqbal)
+
+* linux: call fclose(), fix fdopen() memory leak (Ben Noordhuis)
+
+* win: remove unneeded condition (Saúl Ibarra Corretgé)
+
+* unix: fix compile error in Android using bionic (Robert Chiras)
+
+* linux: add braces to multi-statement if (Kári Tristan Helgason)
+
+* doc: add @cjihrig as a maintainer (Saúl Ibarra Corretgé)
+
+* unix: add fork-safe open file function (Kári Tristan Helgason)
+
+* linux: replace calls to fopen with uv__open_file (Kári Tristan Helgason)
+
+* linux: remove redundant call to rewind() (Krishnaraj Bhat)
+
+* win: remove duplicated code when processing fsevents (Saúl Ibarra Corretgé)
+
+* test: fix poll_bad_fdtype for AIX (Imran Iqbal)
+
+* linux: fix error checking in uv__open_file (Saúl Ibarra Corretgé)
+
+* poll: add UV_DISCONNECT event (Santiago Gimeno)
+
+* fs: realpath: fix string size before converting (Yuval Brik)
+
+* win: use native APIs for UTF conversions (cjihrig)
+
+* doc: clarify uv_loop_close() (Ben Noordhuis)
+
+* unix: retry ioctl(TIOCGWINSZ) on EINTR (Ben Noordhuis)
+
+* win,build: remove unused build defines (Saúl Ibarra Corretgé)
+
+* win: fix buffer overflow in fs events (Joran Dirk Greef)
+
+* win: fix uv_relative_path and remove dead branch (Joran Dirk Greef)
+
+* unix: use open(2) with O_CLOEXEC on OS X (Kári Tristan Helgason)
+
+* test: add missing copyright header (cjihrig)
+
+* aix: fix 'POLLRDHUP undeclared' build error (Ben Noordhuis)
+
+* unix,win: add uv_get_passwd() (cjihrig)
+
+* process: fix uv_spawn edge-case (Santiago Gimeno)
+
+* test: use %ld for printing uid/gid (Ben Noordhuis)
+
+* aix: fix ahafs implementation (Imran Iqbal)
+
+* aix: do not store absolute path to ahafs (Imran Iqbal)
+
+* process: close process pipes safely (Santiago Gimeno)
+
+* unix: open ttyname instead of /dev/tty (Enno Boland)
+
+* unix: remove outdated comment (Kári Tristan Helgason)
+
+
+2015.12.15, Version 1.8.0 (Stable), 5467299450ecf61635657557b6e01aaaf6c3fdf4
Changes since version 1.7.5:
diff --git a/3rdparty/libuv/MAINTAINERS.md b/3rdparty/libuv/MAINTAINERS.md
index 4db2f5130c0..2f0e618ca24 100644
--- a/3rdparty/libuv/MAINTAINERS.md
+++ b/3rdparty/libuv/MAINTAINERS.md
@@ -6,6 +6,7 @@ libuv is currently managed by the following individuals:
* **Ben Noordhuis** ([@bnoordhuis](https://github.com/bnoordhuis))
- GPG key: D77B 1E34 243F BAF0 5F8E 9CC3 4F55 C8C8 46AB 89B9 (pubkey-bnoordhuis)
* **Bert Belder** ([@piscisaureus](https://github.com/piscisaureus))
+* **Colin Ihrig** ([@cjihrig](https://github.com/cjihrig))
* **Fedor Indutny** ([@indutny](https://github.com/indutny))
- GPG key: AF2E EA41 EC34 47BF DD86 FED9 D706 3CCE 19B7 E890 (pubkey-indutny)
* **Saúl Ibarra Corretgé** ([@saghul](https://github.com/saghul))
diff --git a/3rdparty/libuv/Makefile.am b/3rdparty/libuv/Makefile.am
index 0ef781ff198..dfd4353a31b 100644
--- a/3rdparty/libuv/Makefile.am
+++ b/3rdparty/libuv/Makefile.am
@@ -43,7 +43,6 @@ if WINNT
include_HEADERS += include/uv-win.h include/tree.h
AM_CPPFLAGS += -I$(top_srcdir)/src/win \
- -DWIN32_LEAN_AND_MEAN \
-D_WIN32_WINNT=0x0600
LIBS += -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv
libuv_la_SOURCES += src/win/async.c \
@@ -130,6 +129,7 @@ EXTRA_DIST = test/fixtures/empty_file \
TESTS = test/run-tests
check_PROGRAMS = test/run-tests
test_run_tests_CFLAGS =
+test_run_tests_LDFLAGS =
test_run_tests_SOURCES = test/blackhole-server.c \
test/dns-server.c \
test/echo-server.c \
@@ -151,6 +151,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-default-loop-close.c \
test/test-delayed-accept.c \
test/test-dlerror.c \
+ test/test-eintr-handling.c \
test/test-embed.c \
test/test-emfile.c \
test/test-error.c \
@@ -161,6 +162,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-get-currentexe.c \
test/test-get-loadavg.c \
test/test-get-memory.c \
+ test/test-get-passwd.c \
test/test-getaddrinfo.c \
test/test-getnameinfo.c \
test/test-getsockname.c \
@@ -242,6 +244,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-timer-again.c \
test/test-timer-from-check.c \
test/test-timer.c \
+ test/test-tmpdir.c \
test/test-tty.c \
test/test-udp-bind.c \
test/test-udp-create-socket-early.c \
@@ -280,7 +283,7 @@ endif
if AIX
-libuv_la_CFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPAT
+libuv_la_CFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPAT -D_THREAD_SAFE
include_HEADERS += include/uv-aix.h
libuv_la_SOURCES += src/unix/aix.c
endif
@@ -301,15 +304,18 @@ libuv_la_SOURCES += src/unix/darwin.c \
src/unix/fsevents.c \
src/unix/kqueue.c \
src/unix/proctitle.c
+test_run_tests_LDFLAGS += -lutil
endif
if DRAGONFLY
include_HEADERS += include/uv-bsd.h
+test_run_tests_LDFLAGS += -lutil
endif
if FREEBSD
include_HEADERS += include/uv-bsd.h
libuv_la_SOURCES += src/unix/freebsd.c src/unix/kqueue.c
+test_run_tests_LDFLAGS += -lutil
endif
if LINUX
@@ -320,16 +326,19 @@ libuv_la_SOURCES += src/unix/linux-core.c \
src/unix/linux-syscalls.c \
src/unix/linux-syscalls.h \
src/unix/proctitle.c
+test_run_tests_LDFLAGS += -lutil
endif
if NETBSD
include_HEADERS += include/uv-bsd.h
libuv_la_SOURCES += src/unix/kqueue.c src/unix/netbsd.c
+test_run_tests_LDFLAGS += -lutil
endif
if OPENBSD
include_HEADERS += include/uv-bsd.h
libuv_la_SOURCES += src/unix/kqueue.c src/unix/openbsd.c
+test_run_tests_LDFLAGS += -lutil
endif
if SUNOS
diff --git a/3rdparty/libuv/Makefile.mingw b/3rdparty/libuv/Makefile.mingw
index 156f15dab15..3130bac473d 100644
--- a/3rdparty/libuv/Makefile.mingw
+++ b/3rdparty/libuv/Makefile.mingw
@@ -20,7 +20,6 @@ CFLAGS += -Wall \
-Iinclude \
-Isrc \
-Isrc/win \
- -DWIN32_LEAN_AND_MEAN \
-D_WIN32_WINNT=0x0600
INCLUDES = include/stdint-msvc2008.h \
diff --git a/3rdparty/libuv/README.md b/3rdparty/libuv/README.md
index dfd24ba79d1..17304a7ab57 100644
--- a/3rdparty/libuv/README.md
+++ b/3rdparty/libuv/README.md
@@ -156,11 +156,16 @@ project tree manually:
### Unix
-Run:
+For Debug builds (recommended) run:
$ ./gyp_uv.py -f make
$ make -C out
+For Release builds run:
+
+ $ ./gyp_uv.py -f make
+ $ BUILDTYPE=Release make -C out
+
Run `./gyp_uv.py -f make -Dtarget_arch=x32` to build [x32][] binaries.
### OS X
@@ -243,3 +248,4 @@ See the [guidelines for contributing][].
[Visual Studio Express 2010]: http://www.microsoft.com/visualstudio/eng/products/visual-studio-2010-express
[guidelines for contributing]: https://github.com/libuv/libuv/blob/master/CONTRIBUTING.md
[libuv_banner]: https://raw.githubusercontent.com/libuv/libuv/master/img/banner.png
+[x32]: https://en.wikipedia.org/wiki/X32_ABI
diff --git a/3rdparty/libuv/appveyor.yml b/3rdparty/libuv/appveyor.yml
index 9aa63c5a5d2..835730b924c 100644
--- a/3rdparty/libuv/appveyor.yml
+++ b/3rdparty/libuv/appveyor.yml
@@ -1,4 +1,4 @@
-version: v1.8.0.build{build}
+version: v1.9.0.build{build}
install:
- cinst -y nsis
diff --git a/3rdparty/libuv/autogen.sh b/3rdparty/libuv/autogen.sh
index 0574778a4e1..271c2ee8c33 100644
--- a/3rdparty/libuv/autogen.sh
+++ b/3rdparty/libuv/autogen.sh
@@ -40,7 +40,7 @@ echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [$UV_EXTRA_AUTOMAKE_FLAGS])" \
> m4/libuv-extra-automake-flags.m4
set -ex
-"$LIBTOOLIZE"
+"$LIBTOOLIZE" --copy
"$ACLOCAL" -I m4
"$AUTOCONF"
"$AUTOMAKE" --add-missing --copy
diff --git a/3rdparty/libuv/checksparse.sh b/3rdparty/libuv/checksparse.sh
index 619cf6f8b67..68e3bde3930 100644
--- a/3rdparty/libuv/checksparse.sh
+++ b/3rdparty/libuv/checksparse.sh
@@ -101,6 +101,7 @@ test/test-fs.c
test/test-get-currentexe.c
test/test-get-loadavg.c
test/test-get-memory.c
+test/test-get-passwd.c
test/test-getaddrinfo.c
test/test-getsockname.c
test/test-homedir.c
@@ -155,6 +156,7 @@ test/test-threadpool-cancel.c
test/test-threadpool.c
test/test-timer-again.c
test/test-timer.c
+test/test-tmpdir.c
test/test-tty.c
test/test-udp-dgram-too-big.c
test/test-udp-ipv6.c
diff --git a/3rdparty/libuv/configure.ac b/3rdparty/libuv/configure.ac
index 011bee2a891..2d5a3b9de5e 100644
--- a/3rdparty/libuv/configure.ac
+++ b/3rdparty/libuv/configure.ac
@@ -13,7 +13,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_PREREQ(2.57)
-AC_INIT([libuv], [1.8.0], [https://github.com/libuv/libuv/issues])
+AC_INIT([libuv], [1.9.0], [https://github.com/libuv/libuv/issues])
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/libuv-extra-automake-flags.m4])
m4_include([m4/as_case.m4])
diff --git a/3rdparty/libuv/docs/src/loop.rst b/3rdparty/libuv/docs/src/loop.rst
index 2a01d796375..1f504cb391f 100644
--- a/3rdparty/libuv/docs/src/loop.rst
+++ b/3rdparty/libuv/docs/src/loop.rst
@@ -71,9 +71,10 @@ API
.. c:function:: int uv_loop_close(uv_loop_t* loop)
- Closes all internal loop resources. This function must only be called once
- the loop has finished its execution or it will return UV_EBUSY. After this
- function returns the user shall free the memory allocated for the loop.
+ Releases all internal loop resources. Call this function only when the loop
+ has finished executing and all open handles and requests have been closed,
+ or it will return UV_EBUSY. After this function returns, the user can free
+ the memory allocated for the loop.
.. c:function:: uv_loop_t* uv_default_loop(void)
diff --git a/3rdparty/libuv/docs/src/misc.rst b/3rdparty/libuv/docs/src/misc.rst
index 2ce0887db0c..f32af48ff9e 100644
--- a/3rdparty/libuv/docs/src/misc.rst
+++ b/3rdparty/libuv/docs/src/misc.rst
@@ -122,6 +122,20 @@ Data types
} netmask;
} uv_interface_address_t;
+.. c:type:: uv_passwd_t
+
+ Data type for password file information.
+
+ ::
+
+ typedef struct uv_passwd_s {
+ char* username;
+ long uid;
+ long gid;
+ char* shell;
+ char* homedir;
+ } uv_passwd_t;
+
API
---
@@ -265,14 +279,50 @@ API
`uv_os_homedir()` first checks the `HOME` environment variable using
:man:`getenv(3)`. If `HOME` is not set, :man:`getpwuid_r(3)` is called. The
user's home directory is stored in `buffer`. When `uv_os_homedir()` is
- called, `size` indicates the maximum size of `buffer`. On success or
- `UV_ENOBUFS` failure, `size` is set to the string length of `buffer`.
+ called, `size` indicates the maximum size of `buffer`. On success `size` is set
+ to the string length of `buffer`. On `UV_ENOBUFS` failure `size` is set to the
+ required length for `buffer`, including the null byte.
.. warning::
`uv_os_homedir()` is not thread safe.
.. versionadded:: 1.6.0
+.. c:function:: int uv_os_tmpdir(char* buffer, size_t* size)
+
+ Gets the temp directory. On Windows, `uv_os_tmpdir()` uses `GetTempPathW()`.
+ On all other operating systems, `uv_os_tmpdir()` uses the first environment
+ variable found in the ordered list `TMPDIR`, `TMP`, `TEMP`, and `TEMPDIR`.
+ If none of these are found, the path `"/tmp"` is used, or, on Android,
+ `"/data/local/tmp"` is used. The temp directory is stored in `buffer`. When
+ `uv_os_tmpdir()` is called, `size` indicates the maximum size of `buffer`.
+ On success `size` is set to the string length of `buffer` (which does not
+ include the terminating null). On `UV_ENOBUFS` failure `size` is set to the
+ required length for `buffer`, including the null byte.
+
+ .. warning::
+ `uv_os_tmpdir()` is not thread safe.
+
+ .. versionadded:: 1.9.0
+
+.. c:function:: int uv_os_get_passwd(uv_passwd_t* pwd)
+
+ Gets a subset of the password file entry for the current effective uid (not
+ the real uid). The populated data includes the username, euid, gid, shell,
+ and home directory. On non-Windows systems, all data comes from
+ :man:`getpwuid_r(3)`. On Windows, uid and gid are set to -1 and have no
+ meaning, and shell is `NULL`. After successfully calling this function, the
+ memory allocated to `pwd` needs to be freed with
+ :c:func:`uv_os_free_passwd`.
+
+ .. versionadded:: 1.9.0
+
+.. c:function:: void uv_os_free_passwd(uv_passwd_t* pwd)
+
+ Frees the `pwd` memory previously allocated with :c:func:`uv_os_get_passwd`.
+
+ .. versionadded:: 1.9.0
+
.. uint64_t uv_get_free_memory(void)
.. c:function:: uint64_t uv_get_total_memory(void)
diff --git a/3rdparty/libuv/docs/src/poll.rst b/3rdparty/libuv/docs/src/poll.rst
index 6dc41839ac1..69d45be6d32 100644
--- a/3rdparty/libuv/docs/src/poll.rst
+++ b/3rdparty/libuv/docs/src/poll.rst
@@ -4,8 +4,8 @@
:c:type:`uv_poll_t` --- Poll handle
===================================
-Poll handles are used to watch file descriptors for readability and
-writability, similar to the purpose of :man:`poll(2)`.
+Poll handles are used to watch file descriptors for readability,
+writability and disconnection similar to the purpose of :man:`poll(2)`.
The purpose of poll handles is to enable integrating external libraries that
rely on the event loop to signal it about the socket status changes, like
@@ -51,7 +51,8 @@ Data types
enum uv_poll_event {
UV_READABLE = 1,
- UV_WRITABLE = 2
+ UV_WRITABLE = 2,
+ UV_DISCONNECT = 4
};
@@ -82,10 +83,14 @@ API
.. c:function:: int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb)
Starts polling the file descriptor. `events` is a bitmask consisting made up
- of UV_READABLE and UV_WRITABLE. As soon as an event is detected the callback
- will be called with `status` set to 0, and the detected events set on the
+ of UV_READABLE, UV_WRITABLE and UV_DISCONNECT. As soon as an event is detected
+ the callback will be called with `status` set to 0, and the detected events set on the
`events` field.
+ The UV_DISCONNECT event is optional in the sense that it may not be
+ reported and the user is free to ignore it, but it can help optimize the shutdown
+ path because an extra read or write call might be avoided.
+
If an error happens while polling, `status` will be < 0 and corresponds
with one of the UV_E* error codes (see :ref:`errors`). The user should
not close the socket while the handle is active. If the user does that
@@ -96,6 +101,8 @@ API
Calling :c:func:`uv_poll_start` on a handle that is already active is fine. Doing so
will update the events mask that is being watched for.
+ .. versionchanged:: 1.9.0 Added the UV_DISCONNECT event.
+
.. c:function:: int uv_poll_stop(uv_poll_t* poll)
Stop polling the file descriptor, the callback will no longer be called.
diff --git a/3rdparty/libuv/docs/src/stream.rst b/3rdparty/libuv/docs/src/stream.rst
index 9f0aacd1643..ed0c79d0045 100644
--- a/3rdparty/libuv/docs/src/stream.rst
+++ b/3rdparty/libuv/docs/src/stream.rst
@@ -148,6 +148,10 @@ API
::
+ void cb(uv_write_t* req, int status) {
+ /* Logic which handles the write result */
+ }
+
uv_buf_t a[] = {
{ .base = "1", .len = 1 },
{ .base = "2", .len = 1 }
@@ -162,8 +166,8 @@ API
uv_write_t req2;
/* writes "1234" */
- uv_write(&req1, stream, a, 2);
- uv_write(&req2, stream, b, 2);
+ uv_write(&req1, stream, a, 2, cb);
+ uv_write(&req2, stream, b, 2, cb);
.. c:function:: int uv_write2(uv_write_t* req, uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs, uv_stream_t* send_handle, uv_write_cb cb)
diff --git a/3rdparty/libuv/docs/src/tty.rst b/3rdparty/libuv/docs/src/tty.rst
index 655dca9ca20..01a0585287a 100644
--- a/3rdparty/libuv/docs/src/tty.rst
+++ b/3rdparty/libuv/docs/src/tty.rst
@@ -58,14 +58,22 @@ API
`readable`, specifies if you plan on calling :c:func:`uv_read_start` with
this stream. stdin is readable, stdout is not.
- On Unix this function will try to open ``/dev/tty`` and use it if the passed
- file descriptor refers to a TTY. This lets libuv put the tty in non-blocking
- mode without affecting other processes that share the tty.
+ On Unix this function will determine the path of the fd of the terminal
+ using :man:`ttyname_r(3)`, open it, and use it if the passed file descriptor
+ refers to a TTY. This lets libuv put the tty in non-blocking mode without
+ affecting other processes that share the tty.
+
+ This function is not thread safe on systems that don't support
+ ioctl TIOCGPTN or TIOCPTYGNAME, for instance OpenBSD and Solaris.
.. note::
- If opening ``/dev/tty`` fails, libuv falls back to blocking writes for
+ If reopening the TTY fails, libuv falls back to blocking writes for
non-readable TTY streams.
+ .. versionchanged:: 1.9.0: the path of the TTY is determined by
+ :man:`ttyname_r(3)`. In earlier versions libuv opened
+ `/dev/tty` instead.
+
.. versionchanged:: 1.5.0: trying to initialize a TTY stream with a file
descriptor that refers to a file returns `UV_EINVAL`
on UNIX.
diff --git a/3rdparty/libuv/gyp_uv.py b/3rdparty/libuv/gyp_uv.py
index 39933f624d5..bd37d95c471 100644
--- a/3rdparty/libuv/gyp_uv.py
+++ b/3rdparty/libuv/gyp_uv.py
@@ -27,6 +27,7 @@ except ImportError:
def host_arch():
machine = platform.machine()
if machine == 'i386': return 'ia32'
+ if machine == 'AMD64': return 'x64'
if machine == 'x86_64': return 'x64'
if machine.startswith('arm'): return 'arm'
if machine.startswith('mips'): return 'mips'
@@ -36,7 +37,7 @@ def host_arch():
def run_gyp(args):
rc = gyp.main(args)
if rc != 0:
- print 'Error running GYP'
+ print('Error running GYP')
sys.exit(rc)
@@ -89,5 +90,5 @@ if __name__ == '__main__':
args.append('--no-parallel')
gyp_args = list(args)
- print gyp_args
+ print(gyp_args)
run_gyp(gyp_args)
diff --git a/3rdparty/libuv/include/uv-version.h b/3rdparty/libuv/include/uv-version.h
index 6e61f55ed20..cb666182892 100644
--- a/3rdparty/libuv/include/uv-version.h
+++ b/3rdparty/libuv/include/uv-version.h
@@ -31,7 +31,7 @@
*/
#define UV_VERSION_MAJOR 1
-#define UV_VERSION_MINOR 8
+#define UV_VERSION_MINOR 9
#define UV_VERSION_PATCH 0
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""
diff --git a/3rdparty/libuv/include/uv-win.h b/3rdparty/libuv/include/uv-win.h
index 300be476203..6b537fed0d9 100644
--- a/3rdparty/libuv/include/uv-win.h
+++ b/3rdparty/libuv/include/uv-win.h
@@ -634,11 +634,6 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
struct uv_req_s signal_req; \
unsigned long pending_signum;
-int uv_utf16_to_utf8(const WCHAR* utf16Buffer, size_t utf16Size,
- char* utf8Buffer, size_t utf8Size);
-int uv_utf8_to_utf16(const char* utf8Buffer, WCHAR* utf16Buffer,
- size_t utf16Size);
-
#ifndef F_OK
#define F_OK 0
#endif
diff --git a/3rdparty/libuv/include/uv.h b/3rdparty/libuv/include/uv.h
index dd3111a960e..baa0b28124b 100644
--- a/3rdparty/libuv/include/uv.h
+++ b/3rdparty/libuv/include/uv.h
@@ -230,6 +230,7 @@ typedef struct uv_work_s uv_work_t;
typedef struct uv_cpu_info_s uv_cpu_info_t;
typedef struct uv_interface_address_s uv_interface_address_t;
typedef struct uv_dirent_s uv_dirent_t;
+typedef struct uv_passwd_s uv_passwd_t;
typedef enum {
UV_LOOP_BLOCK_SIGNAL
@@ -714,7 +715,8 @@ struct uv_poll_s {
enum uv_poll_event {
UV_READABLE = 1,
- UV_WRITABLE = 2
+ UV_WRITABLE = 2,
+ UV_DISCONNECT = 4
};
UV_EXTERN int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd);
@@ -1000,6 +1002,14 @@ struct uv_interface_address_s {
} netmask;
};
+struct uv_passwd_s {
+ char* username;
+ long uid;
+ long gid;
+ char* shell;
+ char* homedir;
+};
+
typedef enum {
UV_DIRENT_UNKNOWN,
UV_DIRENT_FILE,
@@ -1049,6 +1059,9 @@ typedef struct {
UV_EXTERN int uv_getrusage(uv_rusage_t* rusage);
UV_EXTERN int uv_os_homedir(char* buffer, size_t* size);
+UV_EXTERN int uv_os_tmpdir(char* buffer, size_t* size);
+UV_EXTERN int uv_os_get_passwd(uv_passwd_t* pwd);
+UV_EXTERN void uv_os_free_passwd(uv_passwd_t* pwd);
UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count);
UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count);
diff --git a/3rdparty/libuv/src/fs-poll.c b/3rdparty/libuv/src/fs-poll.c
index 44d47b88ed2..ee73d5a2e6e 100644
--- a/3rdparty/libuv/src/fs-poll.c
+++ b/3rdparty/libuv/src/fs-poll.c
@@ -138,13 +138,14 @@ int uv_fs_poll_getpath(uv_fs_poll_t* handle, char* buffer, size_t* size) {
assert(ctx != NULL);
required_len = strlen(ctx->path);
- if (required_len > *size) {
- *size = required_len;
+ if (required_len >= *size) {
+ *size = required_len + 1;
return UV_ENOBUFS;
}
memcpy(buffer, ctx->path, required_len);
*size = required_len;
+ buffer[required_len] = '\0';
return 0;
}
diff --git a/3rdparty/libuv/src/unix/aix.c b/3rdparty/libuv/src/unix/aix.c
index c90b7e5cb9b..bcaa5ee50bc 100644
--- a/3rdparty/libuv/src/unix/aix.c
+++ b/3rdparty/libuv/src/unix/aix.c
@@ -91,6 +91,24 @@ void uv__platform_loop_delete(uv_loop_t* loop) {
}
+int uv__io_check_fd(uv_loop_t* loop, int fd) {
+ struct poll_ctl pc;
+
+ pc.events = POLLIN;
+ pc.cmd = PS_MOD; /* Equivalent to PS_ADD if the fd is not in the pollset. */
+ pc.fd = fd;
+
+ if (pollset_ctl(loop->backend_fd, &pc, 1))
+ return -errno;
+
+ pc.cmd = PS_DELETE;
+ if (pollset_ctl(loop->backend_fd, &pc, 1))
+ abort();
+
+ return 0;
+}
+
+
void uv__io_poll(uv_loop_t* loop, int timeout) {
struct pollfd events[1024];
struct pollfd pqry;
@@ -506,7 +524,7 @@ static int uv__makedir_p(const char *dir) {
if (*p == '/') {
*p = 0;
err = mkdir(tmp, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
- if(err != 0)
+ if (err != 0 && errno != EEXIST)
return err;
*p = '/';
}
@@ -707,59 +725,44 @@ static void uv__ahafs_event(uv_loop_t* loop, uv__io_t* event_watch, unsigned int
int bytes, rc = 0;
uv_fs_event_t* handle;
int events = 0;
- int i = 0;
char fname[PATH_MAX];
char *p;
handle = container_of(event_watch, uv_fs_event_t, event_watcher);
- /* Clean all the buffers*/
- for(i = 0; i < PATH_MAX; i++) {
- fname[i] = 0;
- }
- i = 0;
-
/* At this point, we assume that polling has been done on the
* file descriptor, so we can just read the AHAFS event occurrence
* data and parse its results without having to block anything
*/
bytes = pread(event_watch->fd, result_data, RDWR_BUF_SIZE, 0);
- assert((bytes <= 0) && "uv__ahafs_event - Error reading monitor file");
+ assert((bytes >= 0) && "uv__ahafs_event - Error reading monitor file");
/* Parse the data */
if(bytes > 0)
rc = uv__parse_data(result_data, &events, handle);
+ /* Unrecoverable error */
+ if (rc == -1)
+ return;
+
/* For directory changes, the name of the files that triggered the change
* are never absolute pathnames
*/
if (uv__path_is_a_directory(handle->path) == 0) {
p = handle->dir_filename;
- while(*p != NULL){
- fname[i]= *p;
- i++;
- p++;
- }
} else {
- /* For file changes, figure out whether filename is absolute or not */
- if (handle->path[0] == '/') {
- p = strrchr(handle->path, '/');
+ p = strrchr(handle->path, '/');
+ if (p == NULL)
+ p = handle->path;
+ else
p++;
-
- while(*p != NULL) {
- fname[i]= *p;
- i++;
- p++;
- }
- }
}
+ strncpy(fname, p, sizeof(fname) - 1);
+ /* Just in case */
+ fname[sizeof(fname) - 1] = '\0';
- /* Unrecoverable error */
- if (rc == -1)
- return;
- else /* Call the actual JavaScript callback function */
- handle->cb(handle, (const char*)&fname, events, 0);
+ handle->cb(handle, fname, events, 0);
}
#endif
@@ -839,7 +842,7 @@ int uv_fs_event_start(uv_fs_event_t* handle,
/* Setup/Initialize all the libuv routines */
uv__handle_start(handle);
uv__io_init(&handle->event_watcher, uv__ahafs_event, fd);
- handle->path = uv__strdup((const char*)&absolute_path);
+ handle->path = uv__strdup(filename);
handle->cb = cb;
uv__io_start(handle->loop, &handle->event_watcher, UV__POLLIN);
diff --git a/3rdparty/libuv/src/unix/core.c b/3rdparty/libuv/src/unix/core.c
index cedd86ed34a..9aaca841870 100644
--- a/3rdparty/libuv/src/unix/core.c
+++ b/3rdparty/libuv/src/unix/core.c
@@ -53,6 +53,9 @@
# include <mach-o/dyld.h> /* _NSGetExecutablePath */
# include <sys/filio.h>
# include <sys/ioctl.h>
+# if defined(O_CLOEXEC)
+# define UV__O_CLOEXEC O_CLOEXEC
+# endif
#endif
#if defined(__FreeBSD__) || defined(__DragonFly__)
@@ -427,6 +430,22 @@ int uv__socket(int domain, int type, int protocol) {
return sockfd;
}
+/* get a file pointer to a file in read-only and close-on-exec mode */
+FILE* uv__open_file(const char* path) {
+ int fd;
+ FILE* fp;
+
+ fd = uv__open_cloexec(path, O_RDONLY);
+ if (fd < 0)
+ return NULL;
+
+ fp = fdopen(fd, "r");
+ if (fp == NULL)
+ uv__close(fd);
+
+ return fp;
+}
+
int uv__accept(int sockfd) {
int peerfd;
@@ -435,7 +454,7 @@ int uv__accept(int sockfd) {
assert(sockfd >= 0);
while (1) {
-#if defined(__linux__) || __FreeBSD__ >= 10
+#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10)
static int no_accept4;
if (no_accept4)
@@ -479,12 +498,11 @@ skip:
}
-int uv__close(int fd) {
+int uv__close_nocheckstdio(int fd) {
int saved_errno;
int rc;
assert(fd > -1); /* Catch uninitialized io_watcher.fd bugs. */
- assert(fd > STDERR_FILENO); /* Catch stdio close bugs. */
saved_errno = errno;
rc = close(fd);
@@ -499,6 +517,12 @@ int uv__close(int fd) {
}
+int uv__close(int fd) {
+ assert(fd > STDERR_FILENO); /* Catch stdio close bugs. */
+ return uv__close_nocheckstdio(fd);
+}
+
+
#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
defined(_AIX) || defined(__DragonFly__)
@@ -809,7 +833,7 @@ void uv__io_init(uv__io_t* w, uv__io_cb cb, int fd) {
void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
- assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT)));
+ assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT | UV__POLLRDHUP)));
assert(0 != events);
assert(w->fd >= 0);
assert(w->fd < INT_MAX);
@@ -842,7 +866,7 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
- assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT)));
+ assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT | UV__POLLRDHUP)));
assert(0 != events);
if (w->fd == -1)
@@ -874,7 +898,7 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
- uv__io_stop(loop, w, UV__POLLIN | UV__POLLOUT);
+ uv__io_stop(loop, w, UV__POLLIN | UV__POLLOUT | UV__POLLRDHUP);
QUEUE_REMOVE(&w->pending_queue);
/* Remove stale events for this file descriptor */
@@ -889,7 +913,7 @@ void uv__io_feed(uv_loop_t* loop, uv__io_t* w) {
int uv__io_active(const uv__io_t* w, unsigned int events) {
- assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT)));
+ assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT | UV__POLLRDHUP)));
assert(0 != events);
return 0 != (w->pevents & events);
}
@@ -930,8 +954,7 @@ int uv__open_cloexec(const char* path, int flags) {
int err;
int fd;
-#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 9) || \
- defined(__DragonFly__)
+#if defined(UV__O_CLOEXEC)
static int no_cloexec;
if (!no_cloexec) {
@@ -1014,17 +1037,10 @@ int uv__dup2_cloexec(int oldfd, int newfd) {
int uv_os_homedir(char* buffer, size_t* size) {
- struct passwd pw;
- struct passwd* result;
+ uv_passwd_t pwd;
char* buf;
- uid_t uid;
- size_t bufsize;
size_t len;
- long initsize;
int r;
-#if defined(__ANDROID_API__) && __ANDROID_API__ < 21
- int (*getpwuid_r)(uid_t, struct passwd*, char*, size_t, struct passwd**);
-#endif
if (buffer == NULL || size == NULL || *size == 0)
return -EINVAL;
@@ -1036,7 +1052,7 @@ int uv_os_homedir(char* buffer, size_t* size) {
len = strlen(buf);
if (len >= *size) {
- *size = len;
+ *size = len + 1;
return -ENOBUFS;
}
@@ -1046,13 +1062,102 @@ int uv_os_homedir(char* buffer, size_t* size) {
return 0;
}
+ /* HOME is not set, so call uv__getpwuid_r() */
+ r = uv__getpwuid_r(&pwd);
+
+ if (r != 0) {
+ return r;
+ }
+
+ len = strlen(pwd.homedir);
+
+ if (len >= *size) {
+ *size = len + 1;
+ uv_os_free_passwd(&pwd);
+ return -ENOBUFS;
+ }
+
+ memcpy(buffer, pwd.homedir, len + 1);
+ *size = len;
+ uv_os_free_passwd(&pwd);
+
+ return 0;
+}
+
+
+int uv_os_tmpdir(char* buffer, size_t* size) {
+ const char* buf;
+ size_t len;
+
+ if (buffer == NULL || size == NULL || *size == 0)
+ return -EINVAL;
+
+#define CHECK_ENV_VAR(name) \
+ do { \
+ buf = getenv(name); \
+ if (buf != NULL) \
+ goto return_buffer; \
+ } \
+ while (0)
+
+ /* Check the TMPDIR, TMP, TEMP, and TEMPDIR environment variables in order */
+ CHECK_ENV_VAR("TMPDIR");
+ CHECK_ENV_VAR("TMP");
+ CHECK_ENV_VAR("TEMP");
+ CHECK_ENV_VAR("TEMPDIR");
+
+#undef CHECK_ENV_VAR
+
+ /* No temp environment variables defined */
+ #if defined(__ANDROID__)
+ buf = "/data/local/tmp";
+ #else
+ buf = "/tmp";
+ #endif
+
+return_buffer:
+ len = strlen(buf);
+
+ if (len >= *size) {
+ *size = len + 1;
+ return -ENOBUFS;
+ }
+
+ /* The returned directory should not have a trailing slash. */
+ if (len > 1 && buf[len - 1] == '/') {
+ len--;
+ }
+
+ memcpy(buffer, buf, len + 1);
+ buffer[len] = '\0';
+ *size = len;
+
+ return 0;
+}
+
+
+int uv__getpwuid_r(uv_passwd_t* pwd) {
+ struct passwd pw;
+ struct passwd* result;
+ char* buf;
+ uid_t uid;
+ size_t bufsize;
+ size_t name_size;
+ size_t homedir_size;
+ size_t shell_size;
+ long initsize;
+ int r;
#if defined(__ANDROID_API__) && __ANDROID_API__ < 21
+ int (*getpwuid_r)(uid_t, struct passwd*, char*, size_t, struct passwd**);
+
getpwuid_r = dlsym(RTLD_DEFAULT, "getpwuid_r");
if (getpwuid_r == NULL)
return -ENOSYS;
#endif
- /* HOME is not set, so call getpwuid() */
+ if (pwd == NULL)
+ return -EINVAL;
+
initsize = sysconf(_SC_GETPW_R_SIZE_MAX);
if (initsize <= 0)
@@ -1060,7 +1165,7 @@ int uv_os_homedir(char* buffer, size_t* size) {
else
bufsize = (size_t) initsize;
- uid = getuid();
+ uid = geteuid();
buf = NULL;
for (;;) {
@@ -1088,17 +1193,54 @@ int uv_os_homedir(char* buffer, size_t* size) {
return -ENOENT;
}
- len = strlen(pw.pw_dir);
+ /* Allocate memory for the username, shell, and home directory */
+ name_size = strlen(pw.pw_name) + 1;
+ homedir_size = strlen(pw.pw_dir) + 1;
+ shell_size = strlen(pw.pw_shell) + 1;
+ pwd->username = uv__malloc(name_size + homedir_size + shell_size);
- if (len >= *size) {
- *size = len;
+ if (pwd->username == NULL) {
uv__free(buf);
- return -ENOBUFS;
+ return -ENOMEM;
}
- memcpy(buffer, pw.pw_dir, len + 1);
- *size = len;
+ /* Copy the username */
+ memcpy(pwd->username, pw.pw_name, name_size);
+
+ /* Copy the home directory */
+ pwd->homedir = pwd->username + name_size;
+ memcpy(pwd->homedir, pw.pw_dir, homedir_size);
+
+ /* Copy the shell */
+ pwd->shell = pwd->homedir + homedir_size;
+ memcpy(pwd->shell, pw.pw_shell, shell_size);
+
+ /* Copy the uid and gid */
+ pwd->uid = pw.pw_uid;
+ pwd->gid = pw.pw_gid;
+
uv__free(buf);
return 0;
}
+
+
+void uv_os_free_passwd(uv_passwd_t* pwd) {
+ if (pwd == NULL)
+ return;
+
+ /*
+ The memory for name, shell, and homedir are allocated in a single
+ uv__malloc() call. The base of the pointer is stored in pwd->username, so
+ that is the field that needs to be freed.
+ */
+ uv__free(pwd->username);
+ pwd->username = NULL;
+ pwd->shell = NULL;
+ pwd->homedir = NULL;
+}
+
+
+int uv_os_get_passwd(uv_passwd_t* pwd) {
+ return uv__getpwuid_r(pwd);
+}
diff --git a/3rdparty/libuv/src/unix/fs.c b/3rdparty/libuv/src/unix/fs.c
index 57b65be25a8..8936ad9d837 100644
--- a/3rdparty/libuv/src/unix/fs.c
+++ b/3rdparty/libuv/src/unix/fs.c
@@ -127,8 +127,8 @@
static ssize_t uv__fs_fdatasync(uv_fs_t* req) {
#if defined(__linux__) || defined(__sun) || defined(__NetBSD__)
return fdatasync(req->file);
-#elif defined(__APPLE__) && defined(F_FULLFSYNC)
- return fcntl(req->file, F_FULLFSYNC);
+#elif defined(__APPLE__) && defined(SYS_fdatasync)
+ return syscall(SYS_fdatasync, req->file);
#else
return fsync(req->file);
#endif
@@ -749,13 +749,13 @@ static void uv__to_stat(struct stat* src, uv_stat_t* dst) {
dst->st_gen = src->st_gen;
#elif defined(__ANDROID__)
dst->st_atim.tv_sec = src->st_atime;
- dst->st_atim.tv_nsec = src->st_atime_nsec;
+ dst->st_atim.tv_nsec = src->st_atimensec;
dst->st_mtim.tv_sec = src->st_mtime;
- dst->st_mtim.tv_nsec = src->st_mtime_nsec;
+ dst->st_mtim.tv_nsec = src->st_mtimensec;
dst->st_ctim.tv_sec = src->st_ctime;
- dst->st_ctim.tv_nsec = src->st_ctime_nsec;
+ dst->st_ctim.tv_nsec = src->st_ctimensec;
dst->st_birthtim.tv_sec = src->st_ctime;
- dst->st_birthtim.tv_nsec = src->st_ctime_nsec;
+ dst->st_birthtim.tv_nsec = src->st_ctimensec;
dst->st_flags = 0;
dst->st_gen = 0;
#elif !defined(_AIX) && ( \
@@ -858,9 +858,14 @@ static ssize_t uv__fs_buf_iter(uv_fs_t* req, uv__fs_buf_iter_processor process)
total += result;
}
+ if (errno == EINTR && total == -1)
+ return total;
+
if (bufs != req->bufsml)
uv__free(bufs);
+
req->bufs = NULL;
+ req->nbufs = 0;
return total;
}
diff --git a/3rdparty/libuv/src/unix/internal.h b/3rdparty/libuv/src/unix/internal.h
index 741fa57d69c..938e76f1d18 100644
--- a/3rdparty/libuv/src/unix/internal.h
+++ b/3rdparty/libuv/src/unix/internal.h
@@ -28,6 +28,7 @@
#include <stdlib.h> /* abort */
#include <string.h> /* strrchr */
#include <fcntl.h> /* O_CLOEXEC, may be */
+#include <stdio.h>
#if defined(__STRICT_ANSI__)
# define inline __inline
@@ -89,17 +90,18 @@
#endif
#if defined(__linux__)
-# define UV__POLLIN UV__EPOLLIN
-# define UV__POLLOUT UV__EPOLLOUT
-# define UV__POLLERR UV__EPOLLERR
-# define UV__POLLHUP UV__EPOLLHUP
+# define UV__POLLIN UV__EPOLLIN
+# define UV__POLLOUT UV__EPOLLOUT
+# define UV__POLLERR UV__EPOLLERR
+# define UV__POLLHUP UV__EPOLLHUP
+# define UV__POLLRDHUP UV__EPOLLRDHUP
#endif
#if defined(__sun) || defined(_AIX)
-# define UV__POLLIN POLLIN
-# define UV__POLLOUT POLLOUT
-# define UV__POLLERR POLLERR
-# define UV__POLLHUP POLLHUP
+# define UV__POLLIN POLLIN
+# define UV__POLLOUT POLLOUT
+# define UV__POLLERR POLLERR
+# define UV__POLLHUP POLLHUP
#endif
#ifndef UV__POLLIN
@@ -118,6 +120,14 @@
# define UV__POLLHUP 8
#endif
+#ifndef UV__POLLRDHUP
+# ifdef POLLRDHUP
+# define UV__POLLRDHUP POLLRDHUP
+# else
+# define UV__POLLRDHUP 0x200
+# endif
+#endif
+
#if !defined(O_CLOEXEC) && defined(__FreeBSD__)
/*
* It may be that we are just missing `__POSIX_VISIBLE >= 200809`.
@@ -167,6 +177,7 @@ struct uv__stream_queued_fds_s {
/* core */
int uv__nonblock(int fd, int set);
int uv__close(int fd);
+int uv__close_nocheckstdio(int fd);
int uv__cloexec(int fd, int set);
int uv__socket(int domain, int type, int protocol);
int uv__dup(int fd);
@@ -180,6 +191,7 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events);
void uv__io_close(uv_loop_t* loop, uv__io_t* w);
void uv__io_feed(uv_loop_t* loop, uv__io_t* w);
int uv__io_active(const uv__io_t* w, unsigned int events);
+int uv__io_check_fd(uv_loop_t* loop, int fd);
void uv__io_poll(uv_loop_t* loop, int timeout); /* in milliseconds or -1 */
/* async */
@@ -245,6 +257,9 @@ void uv__timer_close(uv_timer_t* handle);
void uv__udp_close(uv_udp_t* handle);
void uv__udp_finish_close(uv_udp_t* handle);
uv_handle_type uv__handle_type(int fd);
+FILE* uv__open_file(const char* path);
+int uv__getpwuid_r(uv_passwd_t* pwd);
+
#if defined(__APPLE__)
int uv___stream_fd(const uv_stream_t* handle);
diff --git a/3rdparty/libuv/src/unix/kqueue.c b/3rdparty/libuv/src/unix/kqueue.c
index 495f20d285f..400b4a4b7c6 100644
--- a/3rdparty/libuv/src/unix/kqueue.c
+++ b/3rdparty/libuv/src/unix/kqueue.c
@@ -48,6 +48,24 @@ int uv__kqueue_init(uv_loop_t* loop) {
}
+int uv__io_check_fd(uv_loop_t* loop, int fd) {
+ struct kevent ev;
+ int rc;
+
+ rc = 0;
+ EV_SET(&ev, fd, EVFILT_READ, EV_ADD, 0, 0, 0);
+ if (kevent(loop->backend_fd, &ev, 1, NULL, 0, NULL))
+ rc = -errno;
+
+ EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, 0);
+ if (rc == 0)
+ if (kevent(loop->backend_fd, &ev, 1, NULL, 0, NULL))
+ abort();
+
+ return rc;
+}
+
+
void uv__io_poll(uv_loop_t* loop, int timeout) {
struct kevent events[1024];
struct kevent* ev;
@@ -241,6 +259,9 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
if (ev->flags & EV_ERROR)
revents |= UV__POLLERR;
+ if ((ev->flags & EV_EOF) && (w->pevents & UV__POLLRDHUP))
+ revents |= UV__POLLRDHUP;
+
if (revents == 0)
continue;
diff --git a/3rdparty/libuv/src/unix/linux-core.c b/3rdparty/libuv/src/unix/linux-core.c
index 3ff6fb15e93..fb8ac3f2379 100644
--- a/3rdparty/libuv/src/unix/linux-core.c
+++ b/3rdparty/libuv/src/unix/linux-core.c
@@ -39,7 +39,7 @@
#define HAVE_IFADDRS_H 1
#ifdef __UCLIBC__
-# if __UCLIBC_MAJOR__ < 0 || __UCLIBC_MINOR__ < 9 || __UCLIBC_SUBLEVEL__ < 32
+# if __UCLIBC_MAJOR__ < 0 && __UCLIBC_MINOR__ < 9 && __UCLIBC_SUBLEVEL__ < 32
# undef HAVE_IFADDRS_H
# endif
#endif
@@ -52,7 +52,7 @@
# endif
# include <sys/socket.h>
# include <net/ethernet.h>
-# include <linux/if_packet.h>
+# include <netpacket/packet.h>
#endif /* HAVE_IFADDRS_H */
/* Available from 2.6.32 onwards. */
@@ -69,7 +69,7 @@
#endif
static int read_models(unsigned int numcpus, uv_cpu_info_t* ci);
-static int read_times(unsigned int numcpus, uv_cpu_info_t* ci);
+static int read_times(FILE* statfile_fp, unsigned int numcpus, uv_cpu_info_t* ci);
static void read_speeds(unsigned int numcpus, uv_cpu_info_t* ci);
static unsigned long read_cpufreq(unsigned int cpunum);
@@ -140,6 +140,26 @@ void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) {
}
+int uv__io_check_fd(uv_loop_t* loop, int fd) {
+ struct uv__epoll_event e;
+ int rc;
+
+ e.events = UV__EPOLLIN;
+ e.data = -1;
+
+ rc = 0;
+ if (uv__epoll_ctl(loop->backend_fd, UV__EPOLL_CTL_ADD, fd, &e))
+ if (errno != EEXIST)
+ rc = -errno;
+
+ if (rc == 0)
+ if (uv__epoll_ctl(loop->backend_fd, UV__EPOLL_CTL_DEL, fd, &e))
+ abort();
+
+ return rc;
+}
+
+
void uv__io_poll(uv_loop_t* loop, int timeout) {
/* A bug in kernels < 2.6.37 makes timeouts larger than ~30 minutes
* effectively infinite on 32 bits architectures. To avoid blocking
@@ -532,15 +552,42 @@ int uv_uptime(double* uptime) {
}
+static int uv__cpu_num(FILE* statfile_fp, unsigned int* numcpus) {
+ unsigned int num;
+ char buf[1024];
+
+ if (!fgets(buf, sizeof(buf), statfile_fp))
+ abort();
+
+ num = 0;
+ while (fgets(buf, sizeof(buf), statfile_fp)) {
+ if (strncmp(buf, "cpu", 3))
+ break;
+ num++;
+ }
+
+ *numcpus = num;
+ return 0;
+}
+
+
int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
unsigned int numcpus;
uv_cpu_info_t* ci;
int err;
+ FILE* statfile_fp;
*cpu_infos = NULL;
*count = 0;
- numcpus = sysconf(_SC_NPROCESSORS_ONLN);
+ statfile_fp = uv__open_file("/proc/stat");
+ if (statfile_fp == NULL)
+ return -errno;
+
+ err = uv__cpu_num(statfile_fp, &numcpus);
+ if (err < 0)
+ return err;
+
assert(numcpus != (unsigned int) -1);
assert(numcpus != 0);
@@ -550,7 +597,11 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
err = read_models(numcpus, ci);
if (err == 0)
- err = read_times(numcpus, ci);
+ err = read_times(statfile_fp, numcpus, ci);
+
+ if (fclose(statfile_fp))
+ if (errno != EINTR && errno != EINPROGRESS)
+ abort();
if (err) {
uv_free_cpu_info(ci, numcpus);
@@ -608,7 +659,7 @@ static int read_models(unsigned int numcpus, uv_cpu_info_t* ci) {
defined(__i386__) || \
defined(__mips__) || \
defined(__x86_64__)
- fp = fopen("/proc/cpuinfo", "r");
+ fp = uv__open_file("/proc/cpuinfo");
if (fp == NULL)
return -errno;
@@ -676,7 +727,7 @@ static int read_models(unsigned int numcpus, uv_cpu_info_t* ci) {
}
-static int read_times(unsigned int numcpus, uv_cpu_info_t* ci) {
+static int read_times(FILE* statfile_fp, unsigned int numcpus, uv_cpu_info_t* ci) {
unsigned long clock_ticks;
struct uv_cpu_times_s ts;
unsigned long user;
@@ -688,22 +739,19 @@ static int read_times(unsigned int numcpus, uv_cpu_info_t* ci) {
unsigned int num;
unsigned int len;
char buf[1024];
- FILE* fp;
clock_ticks = sysconf(_SC_CLK_TCK);
assert(clock_ticks != (unsigned long) -1);
assert(clock_ticks != 0);
- fp = fopen("/proc/stat", "r");
- if (fp == NULL)
- return -errno;
+ rewind(statfile_fp);
- if (!fgets(buf, sizeof(buf), fp))
+ if (!fgets(buf, sizeof(buf), statfile_fp))
abort();
num = 0;
- while (fgets(buf, sizeof(buf), fp)) {
+ while (fgets(buf, sizeof(buf), statfile_fp)) {
if (num >= numcpus)
break;
@@ -742,7 +790,6 @@ static int read_times(unsigned int numcpus, uv_cpu_info_t* ci) {
ts.irq = clock_ticks * irq;
ci[num++].cpu_times = ts;
}
- fclose(fp);
assert(num == numcpus);
return 0;
@@ -759,7 +806,7 @@ static unsigned long read_cpufreq(unsigned int cpunum) {
"/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq",
cpunum);
- fp = fopen(buf, "r");
+ fp = uv__open_file(buf);
if (fp == NULL)
return 0;
diff --git a/3rdparty/libuv/src/unix/linux-syscalls.h b/3rdparty/libuv/src/unix/linux-syscalls.h
index 96e79439cf0..4260df111f3 100644
--- a/3rdparty/libuv/src/unix/linux-syscalls.h
+++ b/3rdparty/libuv/src/unix/linux-syscalls.h
@@ -76,6 +76,7 @@
#define UV__EPOLLOUT 4
#define UV__EPOLLERR 8
#define UV__EPOLLHUP 16
+#define UV__EPOLLRDHUP 0x2000
#define UV__EPOLLONESHOT 0x40000000
#define UV__EPOLLET 0x80000000
diff --git a/3rdparty/libuv/src/unix/pipe.c b/3rdparty/libuv/src/unix/pipe.c
index 7f87a713bf4..d4fdfa9d5a5 100644
--- a/3rdparty/libuv/src/unix/pipe.c
+++ b/3rdparty/libuv/src/unix/pipe.c
@@ -200,9 +200,6 @@ out:
if (err)
uv__io_feed(handle->loop, &handle->io_watcher);
- /* Mimic the Windows pipe implementation, always
- * return 0 and let the callback handle errors.
- */
}
@@ -234,14 +231,18 @@ static int uv__pipe_getsockpeername(const uv_pipe_t* handle,
addrlen = strlen(sa.sun_path);
- if (addrlen > *size) {
- *size = addrlen;
+ if (addrlen >= *size) {
+ *size = addrlen + 1;
return UV_ENOBUFS;
}
memcpy(buffer, sa.sun_path, addrlen);
*size = addrlen;
+ /* only null-terminate if it's not an abstract socket */
+ if (buffer[0] != '\0')
+ buffer[addrlen] = '\0';
+
return 0;
}
diff --git a/3rdparty/libuv/src/unix/poll.c b/3rdparty/libuv/src/unix/poll.c
index 37da3b95851..e5efb17160f 100644
--- a/3rdparty/libuv/src/unix/poll.c
+++ b/3rdparty/libuv/src/unix/poll.c
@@ -34,7 +34,7 @@ static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
handle = container_of(w, uv_poll_t, io_watcher);
if (events & UV__POLLERR) {
- uv__io_stop(loop, w, UV__POLLIN | UV__POLLOUT);
+ uv__io_stop(loop, w, UV__POLLIN | UV__POLLOUT | UV__POLLRDHUP);
uv__handle_stop(handle);
handle->poll_cb(handle, -EBADF, 0);
return;
@@ -45,6 +45,8 @@ static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
pevents |= UV_READABLE;
if (events & UV__POLLOUT)
pevents |= UV_WRITABLE;
+ if (events & UV__POLLRDHUP)
+ pevents |= UV_DISCONNECT;
handle->poll_cb(handle, 0, pevents);
}
@@ -53,6 +55,10 @@ static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) {
int err;
+ err = uv__io_check_fd(loop, fd);
+ if (err)
+ return err;
+
err = uv__nonblock(fd, 1);
if (err)
return err;
@@ -71,7 +77,9 @@ int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle,
static void uv__poll_stop(uv_poll_t* handle) {
- uv__io_stop(handle->loop, &handle->io_watcher, UV__POLLIN | UV__POLLOUT);
+ uv__io_stop(handle->loop,
+ &handle->io_watcher,
+ UV__POLLIN | UV__POLLOUT | UV__POLLRDHUP);
uv__handle_stop(handle);
}
@@ -86,7 +94,7 @@ int uv_poll_stop(uv_poll_t* handle) {
int uv_poll_start(uv_poll_t* handle, int pevents, uv_poll_cb poll_cb) {
int events;
- assert((pevents & ~(UV_READABLE | UV_WRITABLE)) == 0);
+ assert((pevents & ~(UV_READABLE | UV_WRITABLE | UV_DISCONNECT)) == 0);
assert(!(handle->flags & (UV_CLOSING | UV_CLOSED)));
uv__poll_stop(handle);
@@ -99,6 +107,8 @@ int uv_poll_start(uv_poll_t* handle, int pevents, uv_poll_cb poll_cb) {
events |= UV__POLLIN;
if (pevents & UV_WRITABLE)
events |= UV__POLLOUT;
+ if (pevents & UV_DISCONNECT)
+ events |= UV__POLLRDHUP;
uv__io_start(handle->loop, &handle->io_watcher, events);
uv__handle_start(handle);
diff --git a/3rdparty/libuv/src/unix/process.c b/3rdparty/libuv/src/unix/process.c
index 571f8cd778c..ef10a3422dc 100644
--- a/3rdparty/libuv/src/unix/process.c
+++ b/3rdparty/libuv/src/unix/process.c
@@ -498,7 +498,7 @@ int uv_spawn(uv_loop_t* loop,
} else
abort();
- uv__close(signal_pipe[0]);
+ uv__close_nocheckstdio(signal_pipe[0]);
for (i = 0; i < options->stdio_count; i++) {
err = uv__process_open_stream(options->stdio + i, pipes[i], i == 0);
@@ -530,9 +530,9 @@ error:
if (options->stdio[i].flags & (UV_INHERIT_FD | UV_INHERIT_STREAM))
continue;
if (pipes[i][0] != -1)
- close(pipes[i][0]);
+ uv__close_nocheckstdio(pipes[i][0]);
if (pipes[i][1] != -1)
- close(pipes[i][1]);
+ uv__close_nocheckstdio(pipes[i][1]);
}
uv__free(pipes);
}
diff --git a/3rdparty/libuv/src/unix/stream.c b/3rdparty/libuv/src/unix/stream.c
index 7d7ab2633b6..9043664dfca 100644
--- a/3rdparty/libuv/src/unix/stream.c
+++ b/3rdparty/libuv/src/unix/stream.c
@@ -946,13 +946,14 @@ static void uv__write_callbacks(uv_stream_t* stream) {
uv_handle_type uv__handle_type(int fd) {
struct sockaddr_storage ss;
+ socklen_t sslen;
socklen_t len;
int type;
memset(&ss, 0, sizeof(ss));
- len = sizeof(ss);
+ sslen = sizeof(ss);
- if (getsockname(fd, (struct sockaddr*)&ss, &len))
+ if (getsockname(fd, (struct sockaddr*)&ss, &sslen))
return UV_UNKNOWN_HANDLE;
len = sizeof type;
@@ -961,6 +962,14 @@ uv_handle_type uv__handle_type(int fd) {
return UV_UNKNOWN_HANDLE;
if (type == SOCK_STREAM) {
+#if defined(_AIX)
+ /* on AIX the getsockname call returns an empty sa structure
+ * for sockets of type AF_UNIX. For all other types it will
+ * return a properly filled in structure.
+ */
+ if (sslen == 0)
+ return UV_NAMED_PIPE;
+#endif
switch (ss.ss_family) {
case AF_UNIX:
return UV_NAMED_PIPE;
@@ -1082,6 +1091,11 @@ static int uv__stream_recv_cmsg(uv_stream_t* stream, struct msghdr* msg) {
}
+#ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wgnu-folding-constant"
+#endif
+
static void uv__read(uv_stream_t* stream) {
uv_buf_t buf;
ssize_t nread;
@@ -1187,6 +1201,10 @@ static void uv__read(uv_stream_t* stream) {
}
+#ifdef __clang__
+# pragma clang diagnostic pop
+#endif
+
#undef UV__CMSG_FD_COUNT
#undef UV__CMSG_FD_SIZE
diff --git a/3rdparty/libuv/src/unix/sunos.c b/3rdparty/libuv/src/unix/sunos.c
index 0c46817b446..9a6cc42b5bf 100644
--- a/3rdparty/libuv/src/unix/sunos.c
+++ b/3rdparty/libuv/src/unix/sunos.c
@@ -116,6 +116,17 @@ void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) {
}
+int uv__io_check_fd(uv_loop_t* loop, int fd) {
+ if (port_associate(loop->backend_fd, PORT_SOURCE_FD, fd, POLLIN, 0))
+ return -errno;
+
+ if (port_dissociate(loop->backend_fd, PORT_SOURCE_FD, fd))
+ abort();
+
+ return 0;
+}
+
+
void uv__io_poll(uv_loop_t* loop, int timeout) {
struct port_event events[1024];
struct port_event* pe;
diff --git a/3rdparty/libuv/src/unix/thread.c b/3rdparty/libuv/src/unix/thread.c
index c56a3170259..c35bc926bf0 100644
--- a/3rdparty/libuv/src/unix/thread.c
+++ b/3rdparty/libuv/src/unix/thread.c
@@ -27,6 +27,9 @@
#include <errno.h>
#include <sys/time.h>
+#include <sys/resource.h> /* getrlimit() */
+
+#include <limits.h>
#undef NANOSEC
#define NANOSEC ((uint64_t) 1e9)
@@ -55,6 +58,11 @@ static void* uv__thread_start(void *arg)
int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) {
struct thread_ctx* ctx;
int err;
+ pthread_attr_t* attr;
+#if defined(__APPLE__)
+ pthread_attr_t attr_storage;
+ struct rlimit lim;
+#endif
ctx = uv__malloc(sizeof(*ctx));
if (ctx == NULL)
@@ -63,7 +71,30 @@ int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) {
ctx->entry = entry;
ctx->arg = arg;
- err = pthread_create(tid, NULL, uv__thread_start, ctx);
+ /* On OSX threads other than the main thread are created with a reduced stack
+ * size by default, adjust it to RLIMIT_STACK.
+ */
+#if defined(__APPLE__)
+ if (getrlimit(RLIMIT_STACK, &lim))
+ abort();
+
+ attr = &attr_storage;
+ if (pthread_attr_init(attr))
+ abort();
+
+ if (lim.rlim_cur != RLIM_INFINITY &&
+ lim.rlim_cur >= PTHREAD_STACK_MIN) {
+ if (pthread_attr_setstacksize(attr, lim.rlim_cur))
+ abort();
+ }
+#else
+ attr = NULL;
+#endif
+
+ err = pthread_create(tid, attr, uv__thread_start, ctx);
+
+ if (attr != NULL)
+ pthread_attr_destroy(attr);
if (err)
uv__free(ctx);
diff --git a/3rdparty/libuv/src/unix/tty.c b/3rdparty/libuv/src/unix/tty.c
index 7cc5b714ed3..32fa37eac96 100644
--- a/3rdparty/libuv/src/unix/tty.c
+++ b/3rdparty/libuv/src/unix/tty.c
@@ -23,6 +23,7 @@
#include "internal.h"
#include "spinlock.h"
+#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <termios.h>
@@ -33,12 +34,30 @@ static int orig_termios_fd = -1;
static struct termios orig_termios;
static uv_spinlock_t termios_spinlock = UV_SPINLOCK_INITIALIZER;
+static int uv__tty_is_slave(const int fd) {
+ int result;
+#if defined(__linux__) || defined(__FreeBSD__)
+ int dummy;
+
+ result = ioctl(fd, TIOCGPTN, &dummy) != 0;
+#elif defined(__APPLE__)
+ char dummy[256];
+
+ result = ioctl(fd, TIOCPTYGNAME, &dummy) != 0;
+#else
+ /* Fallback to ptsname
+ */
+ result = ptsname(fd) == NULL;
+#endif
+ return result;
+}
int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) {
uv_handle_type type;
int flags;
int newfd;
int r;
+ char path[256];
/* File descriptors that refer to files cannot be monitored with epoll.
* That restriction also applies to character devices like /dev/random
@@ -62,7 +81,15 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) {
* other processes.
*/
if (type == UV_TTY) {
- r = uv__open_cloexec("/dev/tty", O_RDWR);
+ /* Reopening a pty in master mode won't work either because the reopened
+ * pty will be in slave mode (*BSD) or reopening will allocate a new
+ * master/slave pair (Linux). Therefore check if the fd points to a
+ * slave device.
+ */
+ if (uv__tty_is_slave(fd) && ttyname_r(fd, path, sizeof(path)) == 0)
+ r = uv__open_cloexec(path, O_RDWR);
+ else
+ r = -1;
if (r < 0) {
/* fallback to using blocking writes */
@@ -185,8 +212,13 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) {
int uv_tty_get_winsize(uv_tty_t* tty, int* width, int* height) {
struct winsize ws;
+ int err;
+
+ do
+ err = ioctl(uv__stream_fd(tty), TIOCGWINSZ, &ws);
+ while (err == -1 && errno == EINTR);
- if (ioctl(uv__stream_fd(tty), TIOCGWINSZ, &ws))
+ if (err == -1)
return -errno;
*width = ws.ws_col;
diff --git a/3rdparty/libuv/src/uv-common.c b/3rdparty/libuv/src/uv-common.c
index 40ed28fec5a..6b8c584fbe7 100644
--- a/3rdparty/libuv/src/uv-common.c
+++ b/3rdparty/libuv/src/uv-common.c
@@ -451,13 +451,14 @@ int uv_fs_event_getpath(uv_fs_event_t* handle, char* buffer, size_t* size) {
}
required_len = strlen(handle->path);
- if (required_len > *size) {
- *size = required_len;
+ if (required_len >= *size) {
+ *size = required_len + 1;
return UV_ENOBUFS;
}
memcpy(buffer, handle->path, required_len);
*size = required_len;
+ buffer[required_len] = '\0';
return 0;
}
diff --git a/3rdparty/libuv/src/win/core.c b/3rdparty/libuv/src/win/core.c
index de0483e1023..ba306ebc083 100644
--- a/3rdparty/libuv/src/win/core.c
+++ b/3rdparty/libuv/src/win/core.c
@@ -256,30 +256,48 @@ static void uv_poll(uv_loop_t* loop, DWORD timeout) {
ULONG_PTR key;
OVERLAPPED* overlapped;
uv_req_t* req;
+ int repeat;
+ uint64_t timeout_time;
- GetQueuedCompletionStatus(loop->iocp,
- &bytes,
- &key,
- &overlapped,
- timeout);
+ timeout_time = loop->time + timeout;
- if (overlapped) {
- /* Package was dequeued */
- req = uv_overlapped_to_req(overlapped);
- uv_insert_pending_req(loop, req);
+ for (repeat = 0; ; repeat++) {
+ GetQueuedCompletionStatus(loop->iocp,
+ &bytes,
+ &key,
+ &overlapped,
+ timeout);
- /* Some time might have passed waiting for I/O,
- * so update the loop time here.
- */
- uv_update_time(loop);
- } else if (GetLastError() != WAIT_TIMEOUT) {
- /* Serious error */
- uv_fatal_error(GetLastError(), "GetQueuedCompletionStatus");
- } else if (timeout > 0) {
- /* GetQueuedCompletionStatus can occasionally return a little early.
- * Make sure that the desired timeout is reflected in the loop time.
- */
- uv__time_forward(loop, timeout);
+ if (overlapped) {
+ /* Package was dequeued */
+ req = uv_overlapped_to_req(overlapped);
+ uv_insert_pending_req(loop, req);
+
+ /* Some time might have passed waiting for I/O,
+ * so update the loop time here.
+ */
+ uv_update_time(loop);
+ } else if (GetLastError() != WAIT_TIMEOUT) {
+ /* Serious error */
+ uv_fatal_error(GetLastError(), "GetQueuedCompletionStatus");
+ } else if (timeout > 0) {
+ /* GetQueuedCompletionStatus can occasionally return a little early.
+ * Make sure that the desired timeout target time is reached.
+ */
+ uv_update_time(loop);
+ if (timeout_time > loop->time) {
+ timeout = (DWORD)(timeout_time - loop->time);
+ /* The first call to GetQueuedCompletionStatus should return very
+ * close to the target time and the second should reach it, but
+ * this is not stated in the documentation. To make sure a busy
+ * loop cannot happen, the timeout is increased exponentially
+ * starting on the third round.
+ */
+ timeout += repeat ? (1 << (repeat - 1)) : 0;
+ continue;
+ }
+ }
+ break;
}
}
@@ -290,33 +308,51 @@ static void uv_poll_ex(uv_loop_t* loop, DWORD timeout) {
OVERLAPPED_ENTRY overlappeds[128];
ULONG count;
ULONG i;
-
- success = pGetQueuedCompletionStatusEx(loop->iocp,
- overlappeds,
- ARRAY_SIZE(overlappeds),
- &count,
- timeout,
- FALSE);
-
- if (success) {
- for (i = 0; i < count; i++) {
- /* Package was dequeued */
- req = uv_overlapped_to_req(overlappeds[i].lpOverlapped);
- uv_insert_pending_req(loop, req);
+ int repeat;
+ uint64_t timeout_time;
+
+ timeout_time = loop->time + timeout;
+
+ for (repeat = 0; ; repeat++) {
+ success = pGetQueuedCompletionStatusEx(loop->iocp,
+ overlappeds,
+ ARRAY_SIZE(overlappeds),
+ &count,
+ timeout,
+ FALSE);
+
+ if (success) {
+ for (i = 0; i < count; i++) {
+ /* Package was dequeued */
+ req = uv_overlapped_to_req(overlappeds[i].lpOverlapped);
+ uv_insert_pending_req(loop, req);
+ }
+
+ /* Some time might have passed waiting for I/O,
+ * so update the loop time here.
+ */
+ uv_update_time(loop);
+ } else if (GetLastError() != WAIT_TIMEOUT) {
+ /* Serious error */
+ uv_fatal_error(GetLastError(), "GetQueuedCompletionStatusEx");
+ } else if (timeout > 0) {
+ /* GetQueuedCompletionStatus can occasionally return a little early.
+ * Make sure that the desired timeout target time is reached.
+ */
+ uv_update_time(loop);
+ if (timeout_time > loop->time) {
+ timeout = (DWORD)(timeout_time - loop->time);
+ /* The first call to GetQueuedCompletionStatus should return very
+ * close to the target time and the second should reach it, but
+ * this is not stated in the documentation. To make sure a busy
+ * loop cannot happen, the timeout is increased exponentially
+ * starting on the third round.
+ */
+ timeout += repeat ? (1 << (repeat - 1)) : 0;
+ continue;
+ }
}
-
- /* Some time might have passed waiting for I/O,
- * so update the loop time here.
- */
- uv_update_time(loop);
- } else if (GetLastError() != WAIT_TIMEOUT) {
- /* Serious error */
- uv_fatal_error(GetLastError(), "GetQueuedCompletionStatusEx");
- } else if (timeout > 0) {
- /* GetQueuedCompletionStatus can occasionally return a little early.
- * Make sure that the desired timeout is reflected in the loop time.
- */
- uv__time_forward(loop, timeout);
+ break;
}
}
diff --git a/3rdparty/libuv/src/win/dl.c b/3rdparty/libuv/src/win/dl.c
index e5f3407f8eb..39e400ab2db 100644
--- a/3rdparty/libuv/src/win/dl.c
+++ b/3rdparty/libuv/src/win/dl.c
@@ -31,7 +31,12 @@ int uv_dlopen(const char* filename, uv_lib_t* lib) {
lib->handle = NULL;
lib->errmsg = NULL;
- if (!uv_utf8_to_utf16(filename, filename_w, ARRAY_SIZE(filename_w))) {
+ if (!MultiByteToWideChar(CP_UTF8,
+ 0,
+ filename,
+ -1,
+ filename_w,
+ ARRAY_SIZE(filename_w))) {
return uv__dlerror(lib, GetLastError());
}
diff --git a/3rdparty/libuv/src/win/fs-event.c b/3rdparty/libuv/src/win/fs-event.c
index 76ecfebaa24..77c935a2d8c 100644
--- a/3rdparty/libuv/src/win/fs-event.c
+++ b/3rdparty/libuv/src/win/fs-event.c
@@ -63,19 +63,19 @@ static void uv_fs_event_queue_readdirchanges(uv_loop_t* loop,
handle->req_pending = 1;
}
-static int uv_relative_path(const WCHAR* filename,
- const WCHAR* dir,
- WCHAR** relpath) {
- int dirlen = wcslen(dir);
- int filelen = wcslen(filename);
- if (dir[dirlen - 1] == '\\')
+static void uv_relative_path(const WCHAR* filename,
+ const WCHAR* dir,
+ WCHAR** relpath) {
+ size_t dirlen = wcslen(dir);
+ if (dirlen > 0 && dir[dirlen - 1] == '\\')
dirlen--;
- *relpath = uv__malloc((MAX_PATH + 1) * sizeof(WCHAR));
+ size_t filenamelen = wcslen(filename);
+ size_t relpathlen = filenamelen - dirlen - 1;
+ *relpath = uv__malloc((relpathlen + 1) * sizeof(WCHAR));
if (!*relpath)
uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- wcsncpy(*relpath, filename + dirlen + 1, filelen - dirlen - 1);
- (*relpath)[filelen - dirlen - 1] = L'\0';
- return 0;
+ wcsncpy(*relpath, filename + dirlen + 1, relpathlen);
+ (*relpath)[relpathlen] = L'\0';
}
static int uv_split_path(const WCHAR* filename, WCHAR** dir,
@@ -101,12 +101,12 @@ static int uv_split_path(const WCHAR* filename, WCHAR** dir,
*file = wcsdup(filename);
} else {
if (dir) {
- *dir = (WCHAR*)uv__malloc((i + 1) * sizeof(WCHAR));
+ *dir = (WCHAR*)uv__malloc((i + 2) * sizeof(WCHAR));
if (!*dir) {
uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
}
- wcsncpy(*dir, filename, i);
- (*dir)[i] = L'\0';
+ wcsncpy(*dir, filename, i + 1);
+ (*dir)[i + 1] = L'\0';
}
*file = (WCHAR*)uv__malloc((len - i) * sizeof(WCHAR));
@@ -159,14 +159,20 @@ int uv_fs_event_start(uv_fs_event_t* handle,
uv__handle_start(handle);
/* Convert name to UTF16. */
- name_size = uv_utf8_to_utf16(path, NULL, 0) * sizeof(WCHAR);
+
+ name_size = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0) *
+ sizeof(WCHAR);
pathw = (WCHAR*)uv__malloc(name_size);
if (!pathw) {
uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
}
- if (!uv_utf8_to_utf16(path, pathw,
- name_size / sizeof(WCHAR))) {
+ if (!MultiByteToWideChar(CP_UTF8,
+ 0,
+ path,
+ -1,
+ pathw,
+ name_size / sizeof(WCHAR))) {
return uv_translate_sys_error(GetLastError());
}
@@ -340,7 +346,7 @@ int uv_fs_event_stop(uv_fs_event_t* handle) {
void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req,
uv_fs_event_t* handle) {
FILE_NOTIFY_INFORMATION* file_info;
- int err, sizew, size, result;
+ int err, sizew, size;
char* filename = NULL;
WCHAR* filenamew, *long_filenamew = NULL;
DWORD offset = 0;
@@ -425,39 +431,23 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req,
if (long_filenamew) {
/* Get the file name out of the long path. */
- result = uv_relative_path(long_filenamew,
- handle->dirw,
- &filenamew);
+ uv_relative_path(long_filenamew,
+ handle->dirw,
+ &filenamew);
uv__free(long_filenamew);
-
- if (result == 0) {
- long_filenamew = filenamew;
- sizew = -1;
- } else {
- long_filenamew = NULL;
- }
- }
-
- /*
- * We could not resolve the long form explicitly.
- * We therefore use the name given by ReadDirectoryChangesW.
- * This may be the long form or the 8.3 short name in some cases.
- */
- if (!long_filenamew) {
- filenamew = file_info->FileName;
- sizew = file_info->FileNameLength / sizeof(WCHAR);
- }
- } else {
- /*
- * Removed or renamed events cannot be resolved to the long form.
- * We therefore use the name given by ReadDirectoryChangesW.
- * This may be the long form or the 8.3 short name in some cases.
- */
- if (!long_filenamew) {
- filenamew = file_info->FileName;
- sizew = file_info->FileNameLength / sizeof(WCHAR);
+ long_filenamew = filenamew;
+ sizew = -1;
}
}
+ /*
+ * Removed or renamed events cannot be resolved to the long form.
+ * We therefore use the name given by ReadDirectoryChangesW.
+ * This may be the long form or the 8.3 short name in some cases.
+ */
+ if (!long_filenamew) {
+ filenamew = file_info->FileName;
+ sizew = file_info->FileNameLength / sizeof(WCHAR);
+ }
} else {
/* We already have the long name of the file, so just use it. */
filenamew = handle->filew;
@@ -466,20 +456,28 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req,
if (filenamew) {
/* Convert the filename to utf8. */
- size = uv_utf16_to_utf8(filenamew,
- sizew,
- NULL,
- 0);
+ size = WideCharToMultiByte(CP_UTF8,
+ 0,
+ filenamew,
+ sizew,
+ NULL,
+ 0,
+ NULL,
+ NULL);
if (size) {
filename = (char*)uv__malloc(size + 1);
if (!filename) {
uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
}
- size = uv_utf16_to_utf8(filenamew,
- sizew,
- filename,
- size);
+ size = WideCharToMultiByte(CP_UTF8,
+ 0,
+ filenamew,
+ sizew,
+ filename,
+ size,
+ NULL,
+ NULL);
if (size) {
filename[size] = '\0';
} else {
diff --git a/3rdparty/libuv/src/win/fs.c b/3rdparty/libuv/src/win/fs.c
index a32b0127f7e..16e3ae7cf1b 100644
--- a/3rdparty/libuv/src/win/fs.c
+++ b/3rdparty/libuv/src/win/fs.c
@@ -1717,25 +1717,26 @@ static void fs__readlink(uv_fs_t* req) {
static size_t fs__realpath_handle(HANDLE handle, char** realpath_ptr) {
int r;
DWORD w_realpath_len;
- WCHAR* w_realpath_ptr;
- WCHAR* w_finalpath_ptr = NULL;
+ WCHAR* w_realpath_ptr = NULL;
+ WCHAR* w_realpath_buf;
w_realpath_len = pGetFinalPathNameByHandleW(handle, NULL, 0, VOLUME_NAME_DOS);
if (w_realpath_len == 0) {
return -1;
}
- w_realpath_ptr = uv__malloc((w_realpath_len + 1) * sizeof(WCHAR));
- if (w_realpath_ptr == NULL) {
+ w_realpath_buf = uv__malloc((w_realpath_len + 1) * sizeof(WCHAR));
+ if (w_realpath_buf == NULL) {
SetLastError(ERROR_OUTOFMEMORY);
return -1;
}
+ w_realpath_ptr = w_realpath_buf;
if (pGetFinalPathNameByHandleW(handle,
w_realpath_ptr,
w_realpath_len,
VOLUME_NAME_DOS) == 0) {
- uv__free(w_realpath_ptr);
+ uv__free(w_realpath_buf);
SetLastError(ERROR_INVALID_HANDLE);
return -1;
}
@@ -1744,20 +1745,22 @@ static size_t fs__realpath_handle(HANDLE handle, char** realpath_ptr) {
if (wcsncmp(w_realpath_ptr,
UNC_PATH_PREFIX,
UNC_PATH_PREFIX_LEN) == 0) {
- w_finalpath_ptr = w_realpath_ptr + 6;
- *w_finalpath_ptr = L'\\';
+ w_realpath_ptr += 6;
+ *w_realpath_ptr = L'\\';
+ w_realpath_len -= 6;
} else if (wcsncmp(w_realpath_ptr,
LONG_PATH_PREFIX,
LONG_PATH_PREFIX_LEN) == 0) {
- w_finalpath_ptr = w_realpath_ptr + 4;
+ w_realpath_ptr += 4;
+ w_realpath_len -= 4;
} else {
- uv__free(w_realpath_ptr);
+ uv__free(w_realpath_buf);
SetLastError(ERROR_INVALID_HANDLE);
return -1;
}
- r = fs__wide_to_utf8(w_finalpath_ptr, w_realpath_len, realpath_ptr, NULL);
- uv__free(w_realpath_ptr);
+ r = fs__wide_to_utf8(w_realpath_ptr, w_realpath_len, realpath_ptr, NULL);
+ uv__free(w_realpath_buf);
return r;
}
diff --git a/3rdparty/libuv/src/win/getaddrinfo.c b/3rdparty/libuv/src/win/getaddrinfo.c
index ceed3b7638b..744f8e02629 100644
--- a/3rdparty/libuv/src/win/getaddrinfo.c
+++ b/3rdparty/libuv/src/win/getaddrinfo.c
@@ -126,7 +126,14 @@ static void uv__getaddrinfo_done(struct uv__work* w, int status) {
addrinfo_len += addrinfo_struct_len +
ALIGNED_SIZE(addrinfow_ptr->ai_addrlen);
if (addrinfow_ptr->ai_canonname != NULL) {
- name_len = uv_utf16_to_utf8(addrinfow_ptr->ai_canonname, -1, NULL, 0);
+ name_len = WideCharToMultiByte(CP_UTF8,
+ 0,
+ addrinfow_ptr->ai_canonname,
+ -1,
+ NULL,
+ 0,
+ NULL,
+ NULL);
if (name_len == 0) {
req->retcode = uv_translate_sys_error(GetLastError());
goto complete;
@@ -170,16 +177,24 @@ static void uv__getaddrinfo_done(struct uv__work* w, int status) {
/* convert canonical name to UTF-8 */
if (addrinfow_ptr->ai_canonname != NULL) {
- name_len = uv_utf16_to_utf8(addrinfow_ptr->ai_canonname,
- -1,
- NULL,
- 0);
+ name_len = WideCharToMultiByte(CP_UTF8,
+ 0,
+ addrinfow_ptr->ai_canonname,
+ -1,
+ NULL,
+ 0,
+ NULL,
+ NULL);
assert(name_len > 0);
assert(cur_ptr + name_len <= alloc_ptr + addrinfo_len);
- name_len = uv_utf16_to_utf8(addrinfow_ptr->ai_canonname,
- -1,
- cur_ptr,
- name_len);
+ name_len = WideCharToMultiByte(CP_UTF8,
+ 0,
+ addrinfow_ptr->ai_canonname,
+ -1,
+ cur_ptr,
+ name_len,
+ NULL,
+ NULL);
assert(name_len > 0);
addrinfo_ptr->ai_canonname = cur_ptr;
cur_ptr += ALIGNED_SIZE(name_len);
@@ -261,7 +276,8 @@ int uv_getaddrinfo(uv_loop_t* loop,
/* calculate required memory size for all input values */
if (node != NULL) {
- nodesize = ALIGNED_SIZE(uv_utf8_to_utf16(node, NULL, 0) * sizeof(WCHAR));
+ nodesize = ALIGNED_SIZE(MultiByteToWideChar(CP_UTF8, 0, node, -1, NULL, 0) *
+ sizeof(WCHAR));
if (nodesize == 0) {
err = GetLastError();
goto error;
@@ -269,7 +285,12 @@ int uv_getaddrinfo(uv_loop_t* loop,
}
if (service != NULL) {
- servicesize = ALIGNED_SIZE(uv_utf8_to_utf16(service, NULL, 0) *
+ servicesize = ALIGNED_SIZE(MultiByteToWideChar(CP_UTF8,
+ 0,
+ service,
+ -1,
+ NULL,
+ 0) *
sizeof(WCHAR));
if (servicesize == 0) {
err = GetLastError();
@@ -294,9 +315,12 @@ int uv_getaddrinfo(uv_loop_t* loop,
/* the request. */
if (node != NULL) {
req->node = (WCHAR*)alloc_ptr;
- if (uv_utf8_to_utf16(node,
- (WCHAR*) alloc_ptr,
- nodesize / sizeof(WCHAR)) == 0) {
+ if (MultiByteToWideChar(CP_UTF8,
+ 0,
+ node,
+ -1,
+ (WCHAR*) alloc_ptr,
+ nodesize / sizeof(WCHAR)) == 0) {
err = GetLastError();
goto error;
}
@@ -309,9 +333,12 @@ int uv_getaddrinfo(uv_loop_t* loop,
/* in the req. */
if (service != NULL) {
req->service = (WCHAR*)alloc_ptr;
- if (uv_utf8_to_utf16(service,
- (WCHAR*) alloc_ptr,
- servicesize / sizeof(WCHAR)) == 0) {
+ if (MultiByteToWideChar(CP_UTF8,
+ 0,
+ service,
+ -1,
+ (WCHAR*) alloc_ptr,
+ servicesize / sizeof(WCHAR)) == 0) {
err = GetLastError();
goto error;
}
diff --git a/3rdparty/libuv/src/win/internal.h b/3rdparty/libuv/src/win/internal.h
index 783f21af0fe..c724793bf05 100644
--- a/3rdparty/libuv/src/win/internal.h
+++ b/3rdparty/libuv/src/win/internal.h
@@ -246,7 +246,6 @@ void uv_poll_endgame(uv_loop_t* loop, uv_poll_t* handle);
void uv_timer_endgame(uv_loop_t* loop, uv_timer_t* handle);
DWORD uv__next_timeout(const uv_loop_t* loop);
-void uv__time_forward(uv_loop_t* loop, uint64_t msecs);
void uv_process_timers(uv_loop_t* loop);
@@ -329,6 +328,8 @@ uint64_t uv__hrtime(double scale);
int uv_parent_pid();
int uv_current_pid();
__declspec(noreturn) void uv_fatal_error(const int errorno, const char* syscall);
+int uv__getpwuid_r(uv_passwd_t* pwd);
+int uv__convert_utf16_to_utf8(const WCHAR* utf16, char** utf8);
/*
diff --git a/3rdparty/libuv/src/win/pipe.c b/3rdparty/libuv/src/win/pipe.c
index bcce80c77e5..a784325c589 100644
--- a/3rdparty/libuv/src/win/pipe.c
+++ b/3rdparty/libuv/src/win/pipe.c
@@ -513,13 +513,18 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
}
/* Convert name to UTF16. */
- nameSize = uv_utf8_to_utf16(name, NULL, 0) * sizeof(WCHAR);
+ nameSize = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0) * sizeof(WCHAR);
handle->name = (WCHAR*)uv__malloc(nameSize);
if (!handle->name) {
uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
}
- if (!uv_utf8_to_utf16(name, handle->name, nameSize / sizeof(WCHAR))) {
+ if (!MultiByteToWideChar(CP_UTF8,
+ 0,
+ name,
+ -1,
+ handle->name,
+ nameSize / sizeof(WCHAR))) {
err = GetLastError();
goto error;
}
@@ -627,13 +632,18 @@ void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle,
req->cb = cb;
/* Convert name to UTF16. */
- nameSize = uv_utf8_to_utf16(name, NULL, 0) * sizeof(WCHAR);
+ nameSize = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0) * sizeof(WCHAR);
handle->name = (WCHAR*)uv__malloc(nameSize);
if (!handle->name) {
uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
}
- if (!uv_utf8_to_utf16(name, handle->name, nameSize / sizeof(WCHAR))) {
+ if (!MultiByteToWideChar(CP_UTF8,
+ 0,
+ name,
+ -1,
+ handle->name,
+ nameSize / sizeof(WCHAR))) {
err = GetLastError();
goto error;
}
@@ -2038,9 +2048,9 @@ static int uv__pipe_getname(const uv_pipe_t* handle, char* buffer, size_t* size)
*size = 0;
err = uv_translate_sys_error(GetLastError());
goto error;
- } else if (pipe_prefix_len + addrlen > *size) {
+ } else if (pipe_prefix_len + addrlen >= *size) {
/* "\\\\.\\pipe" + name */
- *size = pipe_prefix_len + addrlen;
+ *size = pipe_prefix_len + addrlen + 1;
err = UV_ENOBUFS;
goto error;
}
@@ -2062,6 +2072,7 @@ static int uv__pipe_getname(const uv_pipe_t* handle, char* buffer, size_t* size)
addrlen += pipe_prefix_len;
*size = addrlen;
+ buffer[addrlen] = '\0';
err = 0;
goto cleanup;
diff --git a/3rdparty/libuv/src/win/poll.c b/3rdparty/libuv/src/win/poll.c
index ce861d6ffc4..d479e521efe 100644
--- a/3rdparty/libuv/src/win/poll.c
+++ b/3rdparty/libuv/src/win/poll.c
@@ -91,7 +91,11 @@ static void uv__fast_poll_submit_poll_req(uv_loop_t* loop, uv_poll_t* handle) {
handle->mask_events_1 = handle->events;
handle->mask_events_2 = 0;
} else {
- assert(0);
+ /* Just wait until there's an unsubmitted req. */
+ /* This will happen almost immediately as one of the 2 outstanding */
+ /* requests is about to return. When this happens, */
+ /* uv__fast_poll_process_poll_req will be called, and the pending */
+ /* events, if needed, will be processed in a subsequent request. */
return;
}
@@ -107,6 +111,10 @@ static void uv__fast_poll_submit_poll_req(uv_loop_t* loop, uv_poll_t* handle) {
if (handle->events & UV_READABLE) {
afd_poll_info->Handles[0].Events |= AFD_POLL_RECEIVE |
AFD_POLL_DISCONNECT | AFD_POLL_ACCEPT | AFD_POLL_ABORT;
+ } else {
+ if (handle->events & UV_DISCONNECT) {
+ afd_poll_info->Handles[0].Events |= AFD_POLL_DISCONNECT;
+ }
}
if (handle->events & UV_WRITABLE) {
afd_poll_info->Handles[0].Events |= AFD_POLL_SEND | AFD_POLL_CONNECT_FAIL;
@@ -184,6 +192,9 @@ static void uv__fast_poll_process_poll_req(uv_loop_t* loop, uv_poll_t* handle,
if ((afd_poll_info->Handles[0].Events & (AFD_POLL_RECEIVE |
AFD_POLL_DISCONNECT | AFD_POLL_ACCEPT | AFD_POLL_ABORT)) != 0) {
events |= UV_READABLE;
+ if ((afd_poll_info->Handles[0].Events & AFD_POLL_DISCONNECT) != 0) {
+ events |= UV_DISCONNECT;
+ }
}
if ((afd_poll_info->Handles[0].Events & (AFD_POLL_SEND |
AFD_POLL_CONNECT_FAIL)) != 0) {
@@ -218,7 +229,7 @@ static void uv__fast_poll_process_poll_req(uv_loop_t* loop, uv_poll_t* handle,
static int uv__fast_poll_set(uv_loop_t* loop, uv_poll_t* handle, int events) {
assert(handle->type == UV_POLL);
assert(!(handle->flags & UV__HANDLE_CLOSING));
- assert((events & ~(UV_READABLE | UV_WRITABLE)) == 0);
+ assert((events & ~(UV_READABLE | UV_WRITABLE | UV_DISCONNECT)) == 0);
handle->events = events;
diff --git a/3rdparty/libuv/src/win/timer.c b/3rdparty/libuv/src/win/timer.c
index 0da541a2c86..27ca7716af6 100644
--- a/3rdparty/libuv/src/win/timer.c
+++ b/3rdparty/libuv/src/win/timer.c
@@ -34,13 +34,8 @@
void uv_update_time(uv_loop_t* loop) {
uint64_t new_time = uv__hrtime(UV__MILLISEC);
- if (new_time > loop->time) {
- loop->time = new_time;
- }
-}
-
-void uv__time_forward(uv_loop_t* loop, uint64_t msecs) {
- loop->time += msecs;
+ assert(new_time >= loop->time);
+ loop->time = new_time;
}
diff --git a/3rdparty/libuv/src/win/tty.c b/3rdparty/libuv/src/win/tty.c
index d87cc699097..1b27f60a6f0 100644
--- a/3rdparty/libuv/src/win/tty.c
+++ b/3rdparty/libuv/src/win/tty.c
@@ -292,12 +292,9 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) {
was_reading = 1;
alloc_cb = tty->alloc_cb;
read_cb = tty->read_cb;
-
- if (was_reading) {
- err = uv_tty_read_stop(tty);
- if (err) {
- return uv_translate_sys_error(err);
- }
+ err = uv_tty_read_stop(tty);
+ if (err) {
+ return uv_translate_sys_error(err);
}
} else {
was_reading = 0;
diff --git a/3rdparty/libuv/src/win/util.c b/3rdparty/libuv/src/win/util.c
index cb247513046..1788b1780e9 100644
--- a/3rdparty/libuv/src/win/util.c
+++ b/3rdparty/libuv/src/win/util.c
@@ -87,30 +87,6 @@ void uv__util_init() {
}
-int uv_utf16_to_utf8(const WCHAR* utf16Buffer, size_t utf16Size,
- char* utf8Buffer, size_t utf8Size) {
- return WideCharToMultiByte(CP_UTF8,
- 0,
- utf16Buffer,
- utf16Size,
- utf8Buffer,
- utf8Size,
- NULL,
- NULL);
-}
-
-
-int uv_utf8_to_utf16(const char* utf8Buffer, WCHAR* utf16Buffer,
- size_t utf16Size) {
- return MultiByteToWideChar(CP_UTF8,
- 0,
- utf8Buffer,
- -1,
- utf16Buffer,
- utf16Size);
-}
-
-
int uv_exepath(char* buffer, size_t* size_ptr) {
int utf8_len, utf16_buffer_len, utf16_len;
WCHAR* utf16_buffer;
@@ -210,7 +186,7 @@ int uv_cwd(char* buffer, size_t* size) {
if (r == 0) {
return uv_translate_sys_error(GetLastError());
} else if (r > (int) *size) {
- *size = r -1;
+ *size = r;
return UV_ENOBUFS;
}
@@ -384,7 +360,7 @@ int uv_set_process_title(const char* title) {
uv__once_init();
/* Find out how big the buffer for the wide-char title must be */
- length = uv_utf8_to_utf16(title, NULL, 0);
+ length = MultiByteToWideChar(CP_UTF8, 0, title, -1, NULL, 0);
if (!length) {
err = GetLastError();
goto done;
@@ -396,7 +372,7 @@ int uv_set_process_title(const char* title) {
uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
}
- length = uv_utf8_to_utf16(title, title_w, length);
+ length = MultiByteToWideChar(CP_UTF8, 0, title, -1, title_w, length);
if (!length) {
err = GetLastError();
goto done;
@@ -434,7 +410,7 @@ static int uv__get_process_title() {
}
/* Find out what the size of the buffer is that we need */
- length = uv_utf16_to_utf8(title_w, -1, NULL, 0);
+ length = WideCharToMultiByte(CP_UTF8, 0, title_w, -1, NULL, 0, NULL, NULL);
if (!length) {
return -1;
}
@@ -446,7 +422,14 @@ static int uv__get_process_title() {
}
/* Do utf16 -> utf8 conversion here */
- if (!uv_utf16_to_utf8(title_w, -1, process_title, length)) {
+ if (!WideCharToMultiByte(CP_UTF8,
+ 0,
+ title_w,
+ -1,
+ process_title,
+ length,
+ NULL,
+ NULL)) {
uv__free(process_title);
return -1;
}
@@ -1169,7 +1152,7 @@ int uv_getrusage(uv_rusage_t *uv_rusage) {
int uv_os_homedir(char* buffer, size_t* size) {
- HANDLE token;
+ uv_passwd_t pwd;
wchar_t path[MAX_PATH];
DWORD bufsize;
size_t len;
@@ -1183,6 +1166,7 @@ int uv_os_homedir(char* buffer, size_t* size) {
if (len == 0) {
r = GetLastError();
+
/* Don't return an error if USERPROFILE was not found */
if (r != ERROR_ENVVAR_NOT_FOUND)
return uv_translate_sys_error(r);
@@ -1190,43 +1174,219 @@ int uv_os_homedir(char* buffer, size_t* size) {
/* This should not be possible */
return UV_EIO;
} else {
- goto convert_buffer;
+ /* Check how much space we need */
+ bufsize = WideCharToMultiByte(CP_UTF8, 0, path, -1, NULL, 0, NULL, NULL);
+
+ if (bufsize == 0) {
+ return uv_translate_sys_error(GetLastError());
+ } else if (bufsize > *size) {
+ *size = bufsize;
+ return UV_ENOBUFS;
+ }
+
+ /* Convert to UTF-8 */
+ bufsize = WideCharToMultiByte(CP_UTF8,
+ 0,
+ path,
+ -1,
+ buffer,
+ *size,
+ NULL,
+ NULL);
+
+ if (bufsize == 0)
+ return uv_translate_sys_error(GetLastError());
+
+ *size = bufsize - 1;
+ return 0;
}
- /* USERPROFILE is not set, so call GetUserProfileDirectoryW() */
- if (OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &token) == 0)
- return uv_translate_sys_error(GetLastError());
+ /* USERPROFILE is not set, so call uv__getpwuid_r() */
+ r = uv__getpwuid_r(&pwd);
- bufsize = MAX_PATH;
- if (!GetUserProfileDirectoryW(token, path, &bufsize)) {
- r = GetLastError();
- CloseHandle(token);
+ if (r != 0) {
+ return r;
+ }
- /* This should not be possible */
- if (r == ERROR_INSUFFICIENT_BUFFER)
- return UV_EIO;
+ len = strlen(pwd.homedir);
- return uv_translate_sys_error(r);
+ if (len >= *size) {
+ *size = len + 1;
+ uv_os_free_passwd(&pwd);
+ return UV_ENOBUFS;
}
- CloseHandle(token);
+ memcpy(buffer, pwd.homedir, len + 1);
+ *size = len;
+ uv_os_free_passwd(&pwd);
+
+ return 0;
+}
-convert_buffer:
+
+int uv_os_tmpdir(char* buffer, size_t* size) {
+ wchar_t path[MAX_PATH + 1];
+ DWORD bufsize;
+ size_t len;
+
+ if (buffer == NULL || size == NULL || *size == 0)
+ return UV_EINVAL;
+
+ len = GetTempPathW(MAX_PATH + 1, path);
+
+ if (len == 0) {
+ return uv_translate_sys_error(GetLastError());
+ } else if (len > MAX_PATH + 1) {
+ /* This should not be possible */
+ return UV_EIO;
+ }
+
+ /* The returned directory should not have a trailing slash, unless it */
+ /* points at a drive root, like c:\. Remove it if needed.*/
+ if (path[len - 1] == L'\\' &&
+ !(len == 3 && path[1] == L':')) {
+ len--;
+ path[len] = L'\0';
+ }
/* Check how much space we need */
- bufsize = uv_utf16_to_utf8(path, -1, NULL, 0);
+ bufsize = WideCharToMultiByte(CP_UTF8, 0, path, -1, NULL, 0, NULL, NULL);
+
if (bufsize == 0) {
return uv_translate_sys_error(GetLastError());
} else if (bufsize > *size) {
- *size = bufsize - 1;
+ *size = bufsize;
return UV_ENOBUFS;
}
/* Convert to UTF-8 */
- bufsize = uv_utf16_to_utf8(path, -1, buffer, *size);
+ bufsize = WideCharToMultiByte(CP_UTF8,
+ 0,
+ path,
+ -1,
+ buffer,
+ *size,
+ NULL,
+ NULL);
+
if (bufsize == 0)
return uv_translate_sys_error(GetLastError());
*size = bufsize - 1;
return 0;
}
+
+
+void uv_os_free_passwd(uv_passwd_t* pwd) {
+ if (pwd == NULL)
+ return;
+
+ uv__free(pwd->username);
+ uv__free(pwd->homedir);
+ pwd->username = NULL;
+ pwd->homedir = NULL;
+}
+
+
+int uv__convert_utf16_to_utf8(const WCHAR* utf16, char** utf8) {
+ DWORD bufsize;
+
+ if (utf16 == NULL)
+ return UV_EINVAL;
+
+ /* Check how much space we need */
+ bufsize = WideCharToMultiByte(CP_UTF8, 0, utf16, -1, NULL, 0, NULL, NULL);
+
+ if (bufsize == 0)
+ return uv_translate_sys_error(GetLastError());
+
+ /* Allocate the destination buffer */
+ *utf8 = uv__malloc(bufsize);
+
+ if (*utf8 == NULL)
+ return UV_ENOMEM;
+
+ /* Convert to UTF-8 */
+ bufsize = WideCharToMultiByte(CP_UTF8,
+ 0,
+ utf16,
+ -1,
+ *utf8,
+ bufsize,
+ NULL,
+ NULL);
+
+ if (bufsize == 0) {
+ uv__free(*utf8);
+ return uv_translate_sys_error(GetLastError());
+ }
+
+ return 0;
+}
+
+
+int uv__getpwuid_r(uv_passwd_t* pwd) {
+ HANDLE token;
+ wchar_t username[UNLEN + 1];
+ wchar_t path[MAX_PATH];
+ DWORD bufsize;
+ int r;
+
+ if (pwd == NULL)
+ return UV_EINVAL;
+
+ /* Get the home directory using GetUserProfileDirectoryW() */
+ if (OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &token) == 0)
+ return uv_translate_sys_error(GetLastError());
+
+ bufsize = sizeof(path);
+ if (!GetUserProfileDirectoryW(token, path, &bufsize)) {
+ r = GetLastError();
+ CloseHandle(token);
+
+ /* This should not be possible */
+ if (r == ERROR_INSUFFICIENT_BUFFER)
+ return UV_ENOMEM;
+
+ return uv_translate_sys_error(r);
+ }
+
+ CloseHandle(token);
+
+ /* Get the username using GetUserNameW() */
+ bufsize = sizeof(username);
+ if (!GetUserNameW(username, &bufsize)) {
+ r = GetLastError();
+
+ /* This should not be possible */
+ if (r == ERROR_INSUFFICIENT_BUFFER)
+ return UV_ENOMEM;
+
+ return uv_translate_sys_error(r);
+ }
+
+ pwd->homedir = NULL;
+ r = uv__convert_utf16_to_utf8(path, &pwd->homedir);
+
+ if (r != 0)
+ return r;
+
+ pwd->username = NULL;
+ r = uv__convert_utf16_to_utf8(username, &pwd->username);
+
+ if (r != 0) {
+ uv__free(pwd->homedir);
+ return r;
+ }
+
+ pwd->shell = NULL;
+ pwd->uid = -1;
+ pwd->gid = -1;
+
+ return 0;
+}
+
+
+int uv_os_get_passwd(uv_passwd_t* pwd) {
+ return uv__getpwuid_r(pwd);
+}
diff --git a/3rdparty/libuv/test/runner-unix.c b/3rdparty/libuv/test/runner-unix.c
index 2264d1e89d5..2405fa878c0 100644
--- a/3rdparty/libuv/test/runner-unix.c
+++ b/3rdparty/libuv/test/runner-unix.c
@@ -226,7 +226,7 @@ int process_wait(process_info_t* vec, int n, int timeout) {
tv = timebase;
for (;;) {
/* Check that gettimeofday() doesn't jump back in time. */
- assert(tv.tv_sec == timebase.tv_sec ||
+ assert(tv.tv_sec > timebase.tv_sec ||
(tv.tv_sec == timebase.tv_sec && tv.tv_usec >= timebase.tv_usec));
elapsed_ms =
diff --git a/3rdparty/libuv/test/task.h b/3rdparty/libuv/test/task.h
index d18c1daa364..96cc6377cb1 100644
--- a/3rdparty/libuv/test/task.h
+++ b/3rdparty/libuv/test/task.h
@@ -108,10 +108,10 @@ typedef enum {
/* This macro cleans up the main loop. This is used to avoid valgrind
* warnings about memory being "leaked" by the main event loop.
*/
-#define MAKE_VALGRIND_HAPPY() \
- do { \
- close_loop(uv_default_loop()); \
- uv_loop_delete(uv_default_loop()); \
+#define MAKE_VALGRIND_HAPPY() \
+ do { \
+ close_loop(uv_default_loop()); \
+ ASSERT(0 == uv_loop_close(uv_default_loop())); \
} while (0)
/* Just sugar for wrapping the main() for a task or helper. */
@@ -207,7 +207,7 @@ UNUSED static int can_ipv6(void) {
int i;
if (uv_interface_addresses(&addr, &count))
- return 1; /* Assume IPv6 support on failure. */
+ return 0; /* Assume no IPv6 support on failure. */
supported = 0;
for (i = 0; supported == 0 && i < count; i += 1)
diff --git a/3rdparty/libuv/test/test-condvar.c b/3rdparty/libuv/test/test-condvar.c
index dbacdba384d..83b28494adb 100644
--- a/3rdparty/libuv/test/test-condvar.c
+++ b/3rdparty/libuv/test/test-condvar.c
@@ -25,24 +25,33 @@
#include <string.h>
#include <errno.h>
-typedef struct {
+typedef struct worker_config {
uv_mutex_t mutex;
uv_cond_t cond;
- int delay;
+ int signal_delay;
+ int wait_delay;
int use_broadcast;
- volatile int posted;
+ volatile int posted_1;
+ volatile int posted_2;
+ void (*signal_cond)(struct worker_config* c, volatile int* flag);
+ void (*wait_cond)(struct worker_config* c, const volatile int* flag);
} worker_config;
static void worker(void* arg) {
worker_config* c = arg;
+ c->signal_cond(c, &c->posted_1);
+ c->wait_cond(c, &c->posted_2);
+}
+
- if (c->delay)
- uv_sleep(c->delay);
+static void condvar_signal(worker_config* c, volatile int* flag) {
+ if (c->signal_delay)
+ uv_sleep(c->signal_delay);
uv_mutex_lock(&c->mutex);
- ASSERT(c->posted == 0);
- c->posted = 1;
+ ASSERT(*flag == 0);
+ *flag = 1;
if (c->use_broadcast)
uv_cond_broadcast(&c->cond);
else
@@ -51,21 +60,33 @@ static void worker(void* arg) {
}
+static void condvar_wait(worker_config* c, const volatile int* flag) {
+ uv_mutex_lock(&c->mutex);
+ if (c->wait_delay)
+ uv_sleep(c->wait_delay);
+ while (*flag == 0) {
+ uv_cond_wait(&c->cond, &c->mutex);
+ }
+ ASSERT(*flag == 1);
+ uv_mutex_unlock(&c->mutex);
+}
+
+
TEST_IMPL(condvar_1) {
uv_thread_t thread;
worker_config wc;
memset(&wc, 0, sizeof(wc));
+ wc.wait_delay = 100;
+ wc.signal_cond = condvar_signal;
+ wc.wait_cond = condvar_wait;
ASSERT(0 == uv_cond_init(&wc.cond));
ASSERT(0 == uv_mutex_init(&wc.mutex));
ASSERT(0 == uv_thread_create(&thread, worker, &wc));
- uv_mutex_lock(&wc.mutex);
- uv_sleep(100);
- uv_cond_wait(&wc.cond, &wc.mutex);
- ASSERT(wc.posted == 1);
- uv_mutex_unlock(&wc.mutex);
+ wc.wait_cond(&wc, &wc.posted_1);
+ wc.signal_cond(&wc, &wc.posted_2);
ASSERT(0 == uv_thread_join(&thread));
uv_mutex_destroy(&wc.mutex);
@@ -80,15 +101,16 @@ TEST_IMPL(condvar_2) {
worker_config wc;
memset(&wc, 0, sizeof(wc));
- wc.delay = 100;
+ wc.signal_delay = 100;
+ wc.signal_cond = condvar_signal;
+ wc.wait_cond = condvar_wait;
ASSERT(0 == uv_cond_init(&wc.cond));
ASSERT(0 == uv_mutex_init(&wc.mutex));
ASSERT(0 == uv_thread_create(&thread, worker, &wc));
- uv_mutex_lock(&wc.mutex);
- uv_cond_wait(&wc.cond, &wc.mutex);
- uv_mutex_unlock(&wc.mutex);
+ wc.wait_cond(&wc, &wc.posted_1);
+ wc.signal_cond(&wc, &wc.posted_2);
ASSERT(0 == uv_thread_join(&thread));
uv_mutex_destroy(&wc.mutex);
@@ -98,22 +120,35 @@ TEST_IMPL(condvar_2) {
}
+static void condvar_timedwait(worker_config* c, const volatile int* flag) {
+ int r;
+
+ uv_mutex_lock(&c->mutex);
+ if (c->wait_delay)
+ uv_sleep(c->wait_delay);
+ while (*flag == 0) {
+ r = uv_cond_timedwait(&c->cond, &c->mutex, (uint64_t)(150 * 1e6));
+ ASSERT(r == 0);
+ }
+ uv_mutex_unlock(&c->mutex);
+}
+
+
TEST_IMPL(condvar_3) {
uv_thread_t thread;
worker_config wc;
- int r;
memset(&wc, 0, sizeof(wc));
- wc.delay = 100;
+ wc.signal_delay = 100;
+ wc.signal_cond = condvar_signal;
+ wc.wait_cond = condvar_timedwait;
ASSERT(0 == uv_cond_init(&wc.cond));
ASSERT(0 == uv_mutex_init(&wc.mutex));
ASSERT(0 == uv_thread_create(&thread, worker, &wc));
- uv_mutex_lock(&wc.mutex);
- r = uv_cond_timedwait(&wc.cond, &wc.mutex, (uint64_t)(50 * 1e6));
- ASSERT(r == UV_ETIMEDOUT);
- uv_mutex_unlock(&wc.mutex);
+ wc.wait_cond(&wc, &wc.posted_1);
+ wc.signal_cond(&wc, &wc.posted_2);
ASSERT(0 == uv_thread_join(&thread));
uv_mutex_destroy(&wc.mutex);
@@ -126,19 +161,18 @@ TEST_IMPL(condvar_3) {
TEST_IMPL(condvar_4) {
uv_thread_t thread;
worker_config wc;
- int r;
memset(&wc, 0, sizeof(wc));
- wc.delay = 100;
+ wc.signal_delay = 100;
+ wc.signal_cond = condvar_signal;
+ wc.wait_cond = condvar_timedwait;
ASSERT(0 == uv_cond_init(&wc.cond));
ASSERT(0 == uv_mutex_init(&wc.mutex));
ASSERT(0 == uv_thread_create(&thread, worker, &wc));
- uv_mutex_lock(&wc.mutex);
- r = uv_cond_timedwait(&wc.cond, &wc.mutex, (uint64_t)(150 * 1e6));
- ASSERT(r == 0);
- uv_mutex_unlock(&wc.mutex);
+ wc.wait_cond(&wc, &wc.posted_1);
+ wc.signal_cond(&wc, &wc.posted_2);
ASSERT(0 == uv_thread_join(&thread));
uv_mutex_destroy(&wc.mutex);
@@ -154,16 +188,16 @@ TEST_IMPL(condvar_5) {
memset(&wc, 0, sizeof(wc));
wc.use_broadcast = 1;
+ wc.signal_delay = 100;
+ wc.signal_cond = condvar_signal;
+ wc.wait_cond = condvar_wait;
ASSERT(0 == uv_cond_init(&wc.cond));
ASSERT(0 == uv_mutex_init(&wc.mutex));
ASSERT(0 == uv_thread_create(&thread, worker, &wc));
- uv_mutex_lock(&wc.mutex);
- uv_sleep(100);
- uv_cond_wait(&wc.cond, &wc.mutex);
- ASSERT(wc.posted == 1);
- uv_mutex_unlock(&wc.mutex);
+ wc.wait_cond(&wc, &wc.posted_1);
+ wc.signal_cond(&wc, &wc.posted_2);
ASSERT(0 == uv_thread_join(&thread));
uv_mutex_destroy(&wc.mutex);
diff --git a/3rdparty/libuv/test/test-eintr-handling.c b/3rdparty/libuv/test/test-eintr-handling.c
new file mode 100644
index 00000000000..1aaf623b789
--- /dev/null
+++ b/3rdparty/libuv/test/test-eintr-handling.c
@@ -0,0 +1,94 @@
+/* Copyright libuv project contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "uv.h"
+#include "task.h"
+
+#ifdef _WIN32
+
+TEST_IMPL(eintr_handling) {
+ RETURN_SKIP("Test not implemented on Windows.");
+}
+
+#else /* !_WIN32 */
+
+#include <string.h>
+#include <unistd.h>
+
+static uv_loop_t* loop;
+static uv_fs_t read_req;
+static uv_buf_t iov;
+
+static char buf[32];
+static char test_buf[] = "test-buffer\n";
+int pipe_fds[2];
+
+struct thread_ctx {
+ uv_barrier_t barrier;
+ int fd;
+};
+
+static void thread_main(void* arg) {
+ int nwritten;
+ ASSERT(0 == kill(getpid(), SIGUSR1));
+
+ do
+ nwritten = write(pipe_fds[1], test_buf, sizeof(test_buf));
+ while (nwritten == -1 && errno == EINTR);
+
+ ASSERT(nwritten == sizeof(test_buf));
+}
+
+static void sig_func(uv_signal_t* handle, int signum) {
+ uv_signal_stop(handle);
+}
+
+TEST_IMPL(eintr_handling) {
+ struct thread_ctx ctx;
+ uv_thread_t thread;
+ uv_signal_t signal;
+ int nread;
+
+ iov = uv_buf_init(buf, sizeof(buf));
+ loop = uv_default_loop();
+
+ ASSERT(0 == uv_signal_init(loop, &signal));
+ ASSERT(0 == uv_signal_start(&signal, sig_func, SIGUSR1));
+
+ ASSERT(0 == pipe(pipe_fds));
+ ASSERT(0 == uv_thread_create(&thread, thread_main, &ctx));
+
+ nread = uv_fs_read(loop, &read_req, pipe_fds[0], &iov, 1, -1, NULL);
+
+ ASSERT(nread == sizeof(test_buf));
+ ASSERT(0 == strcmp(buf, test_buf));
+
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
+
+ ASSERT(0 == close(pipe_fds[0]));
+ ASSERT(0 == close(pipe_fds[1]));
+ uv_close((uv_handle_t*) &signal, NULL);
+
+ MAKE_VALGRIND_HAPPY();
+ return 0;
+}
+
+#endif /* !_WIN32 */
diff --git a/3rdparty/libuv/test/test-fs-event.c b/3rdparty/libuv/test/test-fs-event.c
index e02ff2fda5e..35583529e57 100644
--- a/3rdparty/libuv/test/test-fs-event.c
+++ b/3rdparty/libuv/test/test-fs-event.c
@@ -531,6 +531,33 @@ TEST_IMPL(fs_event_watch_file_current_dir) {
return 0;
}
+#ifdef _WIN32
+TEST_IMPL(fs_event_watch_file_root_dir) {
+ uv_loop_t* loop;
+ int r;
+
+ const char* sys_drive = getenv("SystemDrive");
+ char path[] = "\\\\?\\X:\\bootsect.bak";
+
+ ASSERT(sys_drive != NULL);
+ strncpy(path + sizeof("\\\\?\\") - 1, sys_drive, 1);
+
+ loop = uv_default_loop();
+
+ r = uv_fs_event_init(loop, &fs_event);
+ ASSERT(r == 0);
+ r = uv_fs_event_start(&fs_event, fail_cb, path, 0);
+ if (r == UV_ENOENT)
+ RETURN_SKIP("bootsect.bak doesn't exist in system root.\n");
+ ASSERT(r == 0);
+
+ uv_close((uv_handle_t*) &fs_event, NULL);
+
+ MAKE_VALGRIND_HAPPY();
+ return 0;
+}
+#endif
+
TEST_IMPL(fs_event_no_callback_after_close) {
uv_loop_t* loop = uv_default_loop();
int r;
@@ -792,6 +819,7 @@ TEST_IMPL(fs_event_getpath) {
r = uv_fs_event_getpath(&fs_event, buf, &len);
ASSERT(r == 0);
ASSERT(buf[len - 1] != 0);
+ ASSERT(buf[len] == '\0');
ASSERT(memcmp(buf, "watch_dir", len) == 0);
r = uv_fs_event_stop(&fs_event);
ASSERT(r == 0);
diff --git a/3rdparty/libuv/test/test-fs-poll.c b/3rdparty/libuv/test/test-fs-poll.c
index dbc1515b0b1..737d50dfd26 100644
--- a/3rdparty/libuv/test/test-fs-poll.c
+++ b/3rdparty/libuv/test/test-fs-poll.c
@@ -173,6 +173,7 @@ TEST_IMPL(fs_poll_getpath) {
len = sizeof buf;
ASSERT(0 == uv_fs_poll_getpath(&poll_handle, buf, &len));
ASSERT(buf[len - 1] != 0);
+ ASSERT(buf[len] == '\0');
ASSERT(0 == memcmp(buf, FIXTURE, len));
uv_close((uv_handle_t*) &poll_handle, close_cb);
diff --git a/3rdparty/libuv/test/test-get-passwd.c b/3rdparty/libuv/test/test-get-passwd.c
new file mode 100644
index 00000000000..58d9c73c691
--- /dev/null
+++ b/3rdparty/libuv/test/test-get-passwd.c
@@ -0,0 +1,80 @@
+/* Copyright libuv contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "uv.h"
+#include "task.h"
+#include <string.h>
+
+TEST_IMPL(get_passwd) {
+ uv_passwd_t pwd;
+ size_t len;
+ int r;
+
+ /* Test the normal case */
+ r = uv_os_get_passwd(&pwd);
+ ASSERT(r == 0);
+ len = strlen(pwd.username);
+ ASSERT(len > 0);
+
+#ifdef _WIN32
+ ASSERT(pwd.shell == NULL);
+#else
+ len = strlen(pwd.shell);
+ ASSERT(len > 0);
+#endif
+
+ len = strlen(pwd.homedir);
+ ASSERT(len > 0);
+
+#ifdef _WIN32
+ ASSERT(pwd.homedir[len - 1] != '\\');
+#else
+ ASSERT(pwd.homedir[len - 1] != '/');
+#endif
+
+#ifdef _WIN32
+ ASSERT(pwd.uid == -1);
+ ASSERT(pwd.gid == -1);
+#else
+ ASSERT(pwd.uid >= 0);
+ ASSERT(pwd.gid >= 0);
+#endif
+
+ /* Test uv_os_free_passwd() */
+ uv_os_free_passwd(&pwd);
+
+ ASSERT(pwd.username == NULL);
+ ASSERT(pwd.shell == NULL);
+ ASSERT(pwd.homedir == NULL);
+
+ /* Test a double free */
+ uv_os_free_passwd(&pwd);
+
+ ASSERT(pwd.username == NULL);
+ ASSERT(pwd.shell == NULL);
+ ASSERT(pwd.homedir == NULL);
+
+ /* Test invalid input */
+ r = uv_os_get_passwd(NULL);
+ ASSERT(r == UV_EINVAL);
+
+ return 0;
+}
diff --git a/3rdparty/libuv/test/test-homedir.c b/3rdparty/libuv/test/test-homedir.c
index cbc47566c55..5027d44c1ea 100644
--- a/3rdparty/libuv/test/test-homedir.c
+++ b/3rdparty/libuv/test/test-homedir.c
@@ -1,3 +1,24 @@
+/* Copyright libuv project contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
#include "uv.h"
#include "task.h"
#include <string.h>
diff --git a/3rdparty/libuv/test/test-list.h b/3rdparty/libuv/test/test-list.h
index 858a20af49c..8b10f1a5f68 100644
--- a/3rdparty/libuv/test/test-list.h
+++ b/3rdparty/libuv/test/test-list.h
@@ -44,6 +44,7 @@ TEST_DECLARE (semaphore_2)
TEST_DECLARE (semaphore_3)
TEST_DECLARE (tty)
TEST_DECLARE (tty_file)
+TEST_DECLARE (tty_pty)
TEST_DECLARE (stdio_over_pipes)
TEST_DECLARE (ip6_pton)
TEST_DECLARE (ipc_listen_before_write)
@@ -154,6 +155,7 @@ TEST_DECLARE (timer_huge_repeat)
TEST_DECLARE (timer_run_once)
TEST_DECLARE (timer_from_check)
TEST_DECLARE (timer_null_callback)
+TEST_DECLARE (timer_early_check)
TEST_DECLARE (idle_starvation)
TEST_DECLARE (loop_handles)
TEST_DECLARE (get_loadavg)
@@ -191,12 +193,15 @@ TEST_DECLARE (active)
TEST_DECLARE (embed)
TEST_DECLARE (async)
TEST_DECLARE (async_null_cb)
+TEST_DECLARE (eintr_handling)
TEST_DECLARE (get_currentexe)
TEST_DECLARE (process_title)
TEST_DECLARE (cwd_and_chdir)
TEST_DECLARE (get_memory)
+TEST_DECLARE (get_passwd)
TEST_DECLARE (handle_fileno)
TEST_DECLARE (homedir)
+TEST_DECLARE (tmpdir)
TEST_DECLARE (hrtime)
TEST_DECLARE (getaddrinfo_fail)
TEST_DECLARE (getaddrinfo_fail_sync)
@@ -267,6 +272,9 @@ TEST_DECLARE (fs_event_watch_dir_recursive)
TEST_DECLARE (fs_event_watch_file)
TEST_DECLARE (fs_event_watch_file_twice)
TEST_DECLARE (fs_event_watch_file_current_dir)
+#ifdef _WIN32
+TEST_DECLARE (fs_event_watch_file_root_dir)
+#endif
TEST_DECLARE (fs_event_no_callback_after_close)
TEST_DECLARE (fs_event_no_callback_on_close)
TEST_DECLARE (fs_event_immediate_close)
@@ -292,6 +300,7 @@ TEST_DECLARE (threadpool_cancel_work)
TEST_DECLARE (threadpool_cancel_fs)
TEST_DECLARE (threadpool_cancel_single)
TEST_DECLARE (thread_local_storage)
+TEST_DECLARE (thread_stack_size)
TEST_DECLARE (thread_mutex)
TEST_DECLARE (thread_rwlock)
TEST_DECLARE (thread_rwlock_trylock)
@@ -301,6 +310,7 @@ TEST_DECLARE (dlerror)
TEST_DECLARE (poll_duplex)
TEST_DECLARE (poll_unidirectional)
TEST_DECLARE (poll_close)
+TEST_DECLARE (poll_bad_fdtype)
TEST_DECLARE (ip4_addr)
TEST_DECLARE (ip6_addr_link_local)
@@ -378,6 +388,7 @@ TASK_LIST_START
TEST_ENTRY (pipe_set_non_blocking)
TEST_ENTRY (tty)
TEST_ENTRY (tty_file)
+ TEST_ENTRY (tty_pty)
TEST_ENTRY (stdio_over_pipes)
TEST_ENTRY (ip6_pton)
TEST_ENTRY (ipc_listen_before_write)
@@ -522,6 +533,7 @@ TASK_LIST_START
TEST_ENTRY (timer_run_once)
TEST_ENTRY (timer_from_check)
TEST_ENTRY (timer_null_callback)
+ TEST_ENTRY (timer_early_check)
TEST_ENTRY (idle_starvation)
@@ -566,6 +578,7 @@ TASK_LIST_START
TEST_ENTRY (async)
TEST_ENTRY (async_null_cb)
+ TEST_ENTRY (eintr_handling)
TEST_ENTRY (get_currentexe)
@@ -575,12 +588,16 @@ TASK_LIST_START
TEST_ENTRY (get_memory)
+ TEST_ENTRY (get_passwd)
+
TEST_ENTRY (get_loadavg)
TEST_ENTRY (handle_fileno)
TEST_ENTRY (homedir)
+ TEST_ENTRY (tmpdir)
+
TEST_ENTRY (hrtime)
TEST_ENTRY_CUSTOM (getaddrinfo_fail, 0, 0, 10000)
@@ -600,6 +617,7 @@ TASK_LIST_START
TEST_ENTRY (poll_duplex)
TEST_ENTRY (poll_unidirectional)
TEST_ENTRY (poll_close)
+ TEST_ENTRY (poll_bad_fdtype)
TEST_ENTRY (socket_buffer_size)
@@ -688,6 +706,9 @@ TASK_LIST_START
TEST_ENTRY (fs_event_watch_file)
TEST_ENTRY (fs_event_watch_file_twice)
TEST_ENTRY (fs_event_watch_file_current_dir)
+#ifdef _WIN32
+ TEST_ENTRY (fs_event_watch_file_root_dir)
+#endif
TEST_ENTRY (fs_event_no_callback_after_close)
TEST_ENTRY (fs_event_no_callback_on_close)
TEST_ENTRY (fs_event_immediate_close)
@@ -706,13 +727,21 @@ TASK_LIST_START
TEST_ENTRY (fs_read_write_null_arguments)
TEST_ENTRY (threadpool_queue_work_simple)
TEST_ENTRY (threadpool_queue_work_einval)
+#if defined(__PPC__) || defined(__PPC64__) /* For linux PPC and AIX */
+ /* pthread_join takes a while, especially on AIX.
+ * Therefore being gratuitous with timeout.
+ */
+ TEST_ENTRY_CUSTOM (threadpool_multiple_event_loops, 0, 0, 120000)
+#else
TEST_ENTRY (threadpool_multiple_event_loops)
+#endif
TEST_ENTRY (threadpool_cancel_getaddrinfo)
TEST_ENTRY (threadpool_cancel_getnameinfo)
TEST_ENTRY (threadpool_cancel_work)
TEST_ENTRY (threadpool_cancel_fs)
TEST_ENTRY (threadpool_cancel_single)
TEST_ENTRY (thread_local_storage)
+ TEST_ENTRY (thread_stack_size)
TEST_ENTRY (thread_mutex)
TEST_ENTRY (thread_rwlock)
TEST_ENTRY (thread_rwlock_trylock)
diff --git a/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c b/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c
index ee8bb2a9a8b..4ab14789a38 100644
--- a/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c
+++ b/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c
@@ -53,6 +53,7 @@ TEST_IMPL(pipe_close_stdout_read_stdin) {
int pid;
int fd[2];
int status;
+ char buf;
uv_pipe_t stdin_pipe;
r = pipe(fd);
@@ -64,6 +65,8 @@ TEST_IMPL(pipe_close_stdout_read_stdin) {
* The write side will be closed by the parent process.
*/
close(fd[1]);
+ /* block until write end of pipe is closed */
+ read(fd[0], &buf, 1);
close(0);
r = dup(fd[0]);
ASSERT(r != -1);
diff --git a/3rdparty/libuv/test/test-pipe-getsockname.c b/3rdparty/libuv/test/test-pipe-getsockname.c
index 5e036f9d528..58041c02668 100644
--- a/3rdparty/libuv/test/test-pipe-getsockname.c
+++ b/3rdparty/libuv/test/test-pipe-getsockname.c
@@ -114,6 +114,7 @@ TEST_IMPL(pipe_getsockname) {
ASSERT(r == 0);
ASSERT(buf[len - 1] != 0);
+ ASSERT(buf[len] == '\0');
ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0);
len = sizeof buf;
diff --git a/3rdparty/libuv/test/test-platform-output.c b/3rdparty/libuv/test/test-platform-output.c
index 76495e14fd8..2c4740550a1 100644
--- a/3rdparty/libuv/test/test-platform-output.c
+++ b/3rdparty/libuv/test/test-platform-output.c
@@ -32,6 +32,7 @@ TEST_IMPL(platform_output) {
uv_rusage_t rusage;
uv_cpu_info_t* cpus;
uv_interface_address_t* interfaces;
+ uv_passwd_t pwd;
int count;
int i;
int err;
@@ -122,5 +123,15 @@ TEST_IMPL(platform_output) {
}
uv_free_interface_addresses(interfaces, count);
+ err = uv_os_get_passwd(&pwd);
+ ASSERT(err == 0);
+
+ printf("uv_os_get_passwd:\n");
+ printf(" euid: %ld\n", pwd.uid);
+ printf(" gid: %ld\n", pwd.gid);
+ printf(" username: %s\n", pwd.username);
+ printf(" shell: %s\n", pwd.shell);
+ printf(" home directory: %s\n", pwd.homedir);
+
return 0;
}
diff --git a/3rdparty/libuv/test/test-poll.c b/3rdparty/libuv/test/test-poll.c
index be8b00c32ca..bfb75af1335 100644
--- a/3rdparty/libuv/test/test-poll.c
+++ b/3rdparty/libuv/test/test-poll.c
@@ -21,7 +21,9 @@
#include <errno.h>
-#ifndef _WIN32
+#ifdef _WIN32
+# include <fcntl.h>
+#else
# include <sys/socket.h>
# include <unistd.h>
#endif
@@ -49,7 +51,7 @@ typedef struct connection_context_s {
size_t read, sent;
int is_server_connection;
int open_handles;
- int got_fin, sent_fin;
+ int got_fin, sent_fin, got_disconnect;
unsigned int events, delayed_events;
} connection_context_t;
@@ -70,6 +72,8 @@ static int closed_connections = 0;
static int valid_writable_wakeups = 0;
static int spurious_writable_wakeups = 0;
+static int disconnects = 0;
+
static int got_eagain(void) {
#ifdef _WIN32
@@ -140,6 +144,7 @@ static connection_context_t* create_connection_context(
context->delayed_events = 0;
context->got_fin = 0;
context->sent_fin = 0;
+ context->got_disconnect = 0;
r = uv_poll_init_socket(uv_default_loop(), &context->poll_handle, sock);
context->open_handles++;
@@ -373,7 +378,13 @@ static void connection_poll_cb(uv_poll_t* handle, int status, int events) {
}
}
- if (context->got_fin && context->sent_fin) {
+ if (events & UV_DISCONNECT) {
+ context->got_disconnect = 1;
+ ++disconnects;
+ new_events &= ~UV_DISCONNECT;
+ }
+
+ if (context->got_fin && context->sent_fin && context->got_disconnect) {
/* Sent and received FIN. Close and destroy context. */
close_socket(context->sock);
destroy_connection_context(context);
@@ -461,9 +472,9 @@ static void server_poll_cb(uv_poll_t* handle, int status, int events) {
#endif
connection_context = create_connection_context(sock, 1);
- connection_context->events = UV_READABLE | UV_WRITABLE;
+ connection_context->events = UV_READABLE | UV_WRITABLE | UV_DISCONNECT;
r = uv_poll_start(&connection_context->poll_handle,
- UV_READABLE | UV_WRITABLE,
+ UV_READABLE | UV_WRITABLE | UV_DISCONNECT,
connection_poll_cb);
ASSERT(r == 0);
@@ -505,9 +516,9 @@ static void start_client(void) {
sock = create_bound_socket(addr);
context = create_connection_context(sock, 0);
- context->events = UV_READABLE | UV_WRITABLE;
+ context->events = UV_READABLE | UV_WRITABLE | UV_DISCONNECT;
r = uv_poll_start(&context->poll_handle,
- UV_READABLE | UV_WRITABLE,
+ UV_READABLE | UV_WRITABLE | UV_DISCONNECT,
connection_poll_cb);
ASSERT(r == 0);
@@ -541,6 +552,7 @@ static void start_poll_test(void) {
spurious_writable_wakeups > 20);
ASSERT(closed_connections == NUM_CLIENTS * 2);
+ ASSERT(disconnects == NUM_CLIENTS * 2);
MAKE_VALGRIND_HAPPY();
}
@@ -558,3 +570,29 @@ TEST_IMPL(poll_unidirectional) {
start_poll_test();
return 0;
}
+
+
+/* Windows won't let you open a directory so we open a file instead.
+ * OS X lets you poll a file so open the $PWD instead. Both fail
+ * on Linux so it doesn't matter which one we pick. Both succeed
+ * on FreeBSD, Solaris and AIX so skip the test on those platforms.
+ */
+TEST_IMPL(poll_bad_fdtype) {
+#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__sun) && \
+ !defined(_AIX)
+ uv_poll_t poll_handle;
+ int fd;
+
+#if defined(_WIN32)
+ fd = open("test/fixtures/empty_file", O_RDONLY);
+#else
+ fd = open(".", O_RDONLY);
+#endif
+ ASSERT(fd != -1);
+ ASSERT(0 != uv_poll_init(uv_default_loop(), &poll_handle, fd));
+ ASSERT(0 == close(fd));
+#endif
+
+ MAKE_VALGRIND_HAPPY();
+ return 0;
+}
diff --git a/3rdparty/libuv/test/test-tcp-close-while-connecting.c b/3rdparty/libuv/test/test-tcp-close-while-connecting.c
index 2c39b652b61..60df7a57440 100644
--- a/3rdparty/libuv/test/test-tcp-close-while-connecting.c
+++ b/3rdparty/libuv/test/test-tcp-close-while-connecting.c
@@ -72,7 +72,7 @@ TEST_IMPL(tcp_close_while_connecting) {
RETURN_SKIP("Network unreachable.");
ASSERT(r == 0);
ASSERT(0 == uv_timer_init(loop, &timer1_handle));
- ASSERT(0 == uv_timer_start(&timer1_handle, timer1_cb, 50, 0));
+ ASSERT(0 == uv_timer_start(&timer1_handle, timer1_cb, 1, 0));
ASSERT(0 == uv_timer_init(loop, &timer2_handle));
ASSERT(0 == uv_timer_start(&timer2_handle, timer2_cb, 86400 * 1000, 0));
ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
diff --git a/3rdparty/libuv/test/test-thread.c b/3rdparty/libuv/test/test-thread.c
index 7f3321aa06d..10bec3fe6c6 100644
--- a/3rdparty/libuv/test/test-thread.c
+++ b/3rdparty/libuv/test/test-thread.c
@@ -209,3 +209,24 @@ TEST_IMPL(thread_local_storage) {
uv_key_delete(&tls_key);
return 0;
}
+
+
+#if defined(__APPLE__)
+static void thread_check_stack(void* arg) {
+ /* 512KB is the default stack size of threads other than the main thread
+ * on OSX. */
+ ASSERT(pthread_get_stacksize_np(pthread_self()) > 512*1024);
+}
+#endif
+
+
+TEST_IMPL(thread_stack_size) {
+#if defined(__APPLE__)
+ uv_thread_t thread;
+ ASSERT(0 == uv_thread_create(&thread, thread_check_stack, NULL));
+ ASSERT(0 == uv_thread_join(&thread));
+ return 0;
+#else
+ RETURN_SKIP("OSX only test");
+#endif
+}
diff --git a/3rdparty/libuv/test/test-timer.c b/3rdparty/libuv/test/test-timer.c
index aba050fd64c..080a73005ee 100644
--- a/3rdparty/libuv/test/test-timer.c
+++ b/3rdparty/libuv/test/test-timer.c
@@ -301,3 +301,30 @@ TEST_IMPL(timer_null_callback) {
MAKE_VALGRIND_HAPPY();
return 0;
}
+
+
+static uint64_t timer_early_check_expected_time;
+
+
+static void timer_early_check_cb(uv_timer_t* handle) {
+ uint64_t hrtime = uv_hrtime() / 1000000;
+ ASSERT(hrtime >= timer_early_check_expected_time);
+}
+
+
+TEST_IMPL(timer_early_check) {
+ uv_timer_t timer_handle;
+ const uint64_t timeout_ms = 10;
+
+ timer_early_check_expected_time = uv_now(uv_default_loop()) + timeout_ms;
+
+ ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle));
+ ASSERT(0 == uv_timer_start(&timer_handle, timer_early_check_cb, timeout_ms, 0));
+ ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
+
+ uv_close((uv_handle_t*) &timer_handle, NULL);
+ ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
+
+ MAKE_VALGRIND_HAPPY();
+ return 0;
+}
diff --git a/3rdparty/libuv/test/test-tmpdir.c b/3rdparty/libuv/test/test-tmpdir.c
new file mode 100644
index 00000000000..29e8055f1d5
--- /dev/null
+++ b/3rdparty/libuv/test/test-tmpdir.c
@@ -0,0 +1,71 @@
+/* Copyright libuv project contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "uv.h"
+#include "task.h"
+#include <string.h>
+
+#define PATHMAX 1024
+#define SMALLPATH 1
+
+TEST_IMPL(tmpdir) {
+ char tmpdir[PATHMAX];
+ size_t len;
+ char last;
+ int r;
+
+ /* Test the normal case */
+ len = sizeof tmpdir;
+ tmpdir[0] = '\0';
+
+ ASSERT(strlen(tmpdir) == 0);
+ r = uv_os_tmpdir(tmpdir, &len);
+ ASSERT(r == 0);
+ ASSERT(strlen(tmpdir) == len);
+ ASSERT(len > 0);
+ ASSERT(tmpdir[len] == '\0');
+
+ if (len > 1) {
+ last = tmpdir[len - 1];
+#ifdef _WIN32
+ ASSERT(last != '\\');
+#else
+ ASSERT(last != '/');
+#endif
+ }
+
+ /* Test the case where the buffer is too small */
+ len = SMALLPATH;
+ r = uv_os_tmpdir(tmpdir, &len);
+ ASSERT(r == UV_ENOBUFS);
+ ASSERT(len > SMALLPATH);
+
+ /* Test invalid inputs */
+ r = uv_os_tmpdir(NULL, &len);
+ ASSERT(r == UV_EINVAL);
+ r = uv_os_tmpdir(tmpdir, NULL);
+ ASSERT(r == UV_EINVAL);
+ len = 0;
+ r = uv_os_tmpdir(tmpdir, &len);
+ ASSERT(r == UV_EINVAL);
+
+ return 0;
+}
diff --git a/3rdparty/libuv/test/test-tty.c b/3rdparty/libuv/test/test-tty.c
index b844959d526..461d1941359 100644
--- a/3rdparty/libuv/test/test-tty.c
+++ b/3rdparty/libuv/test/test-tty.c
@@ -28,6 +28,13 @@
#else /* Unix */
# include <fcntl.h>
# include <unistd.h>
+# if defined(__linux__)
+# include <pty.h>
+# elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
+# include <util.h>
+# elif defined(__FreeBSD__) || defined(__DragonFly__)
+# include <libutil.h>
+# endif
#endif
#include <string.h>
@@ -182,3 +189,35 @@ TEST_IMPL(tty_file) {
#endif
return 0;
}
+
+TEST_IMPL(tty_pty) {
+# if defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__) || \
+ defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__)
+ int master_fd, slave_fd;
+ struct winsize w;
+ uv_loop_t loop;
+ uv_tty_t master_tty, slave_tty;
+
+ ASSERT(0 == uv_loop_init(&loop));
+
+ ASSERT(0 == openpty(&master_fd, &slave_fd, NULL, NULL, &w));
+ ASSERT(0 == uv_tty_init(&loop, &slave_tty, slave_fd, 0));
+ ASSERT(0 == uv_tty_init(&loop, &master_tty, master_fd, 0));
+ /* Check if the file descriptor was reopened. If it is,
+ * UV_STREAM_BLOCKING (value 0x80) isn't set on flags.
+ */
+ ASSERT(0 == (slave_tty.flags & 0x80));
+ /* The master_fd of a pty should never be reopened.
+ */
+ ASSERT(master_tty.flags & 0x80);
+ ASSERT(0 == close(slave_fd));
+ uv_close((uv_handle_t*) &slave_tty, NULL);
+ ASSERT(0 == close(master_fd));
+ uv_close((uv_handle_t*) &master_tty, NULL);
+
+ ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT));
+
+ MAKE_VALGRIND_HAPPY();
+#endif
+ return 0;
+}
diff --git a/3rdparty/libuv/uv.gyp b/3rdparty/libuv/uv.gyp
index 635a234ea6e..757540193dd 100644
--- a/3rdparty/libuv/uv.gyp
+++ b/3rdparty/libuv/uv.gyp
@@ -92,6 +92,7 @@
'src/win/req.c',
'src/win/req-inl.h',
'src/win/signal.c',
+ 'src/win/snprintf.c',
'src/win/stream.c',
'src/win/stream-inl.h',
'src/win/tcp.c',
@@ -104,13 +105,6 @@
'src/win/winsock.c',
'src/win/winsock.h',
],
- 'conditions': [
- ['MSVS_VERSION < "2015"', {
- 'sources': [
- 'src/win/snprintf.c'
- ]
- }]
- ],
'link_settings': {
'libraries': [
'-ladvapi32',
@@ -247,6 +241,7 @@
'_ALL_SOURCE',
'_XOPEN_SOURCE=500',
'_LINUX_SOURCE_COMPAT',
+ '_THREAD_SAFE',
],
'link_settings': {
'libraries': [
@@ -300,6 +295,7 @@
'test/test-cwd-and-chdir.c',
'test/test-default-loop-close.c',
'test/test-delayed-accept.c',
+ 'test/test-eintr-handling.c',
'test/test-error.c',
'test/test-embed.c',
'test/test-emfile.c',
@@ -308,6 +304,7 @@
'test/test-fs-event.c',
'test/test-get-currentexe.c',
'test/test-get-memory.c',
+ 'test/test-get-passwd.c',
'test/test-getaddrinfo.c',
'test/test-getnameinfo.c',
'test/test-getsockname.c',
@@ -386,6 +383,7 @@
'test/test-threadpool.c',
'test/test-threadpool-cancel.c',
'test/test-thread-equal.c',
+ 'test/test-tmpdir.c',
'test/test-mutexes.c',
'test/test-thread.c',
'test/test-barrier.c',
@@ -417,7 +415,8 @@
[ 'OS=="win"', {
'sources': [
'test/runner-win.c',
- 'test/runner-win.h'
+ 'test/runner-win.h',
+ 'src/win/snprintf.c',
],
'libraries': [ '-lws2_32' ]
}, { # POSIX
@@ -427,6 +426,11 @@
'test/runner-unix.h',
],
}],
+ [ 'OS in "mac dragonflybsd freebsd linux netbsd openbsd".split()', {
+ 'link_settings': {
+ 'libraries': [ '-lutil' ],
+ },
+ }],
[ 'OS=="solaris"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
'defines': [
'__EXTENSIONS__',
@@ -485,6 +489,7 @@
'sources': [
'test/runner-win.c',
'test/runner-win.h',
+ 'src/win/snprintf.c',
],
'libraries': [ '-lws2_32' ]
}, { # POSIX
diff --git a/3rdparty/libuv/vcbuild.bat b/3rdparty/libuv/vcbuild.bat
index 696f0db30e1..9a7ed4b8c51 100644
--- a/3rdparty/libuv/vcbuild.bat
+++ b/3rdparty/libuv/vcbuild.bat
@@ -49,6 +49,7 @@ if not defined VS140COMNTOOLS goto vc-set-2013
if not exist "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2013
call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset%
set GYP_MSVS_VERSION=2015
+echo Using Visual Studio 2015
goto select-target
:vc-set-2013
@@ -57,6 +58,7 @@ if not defined VS120COMNTOOLS goto vc-set-2012
if not exist "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2012
call "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset%
set GYP_MSVS_VERSION=2013
+echo Using Visual Studio 2013
goto select-target
:vc-set-2012
@@ -65,6 +67,7 @@ if not defined VS110COMNTOOLS goto vc-set-2010
if not exist "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2010
call "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset%
set GYP_MSVS_VERSION=2012
+echo Using Visual Studio 2012
goto select-target
:vc-set-2010
@@ -73,6 +76,7 @@ if not defined VS100COMNTOOLS goto vc-set-2008
if not exist "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2008
call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset%
set GYP_MSVS_VERSION=2010
+echo Using Visual Studio 2010
goto select-target
:vc-set-2008
@@ -81,6 +85,7 @@ if not defined VS90COMNTOOLS goto vc-set-notfound
if not exist "%VS90COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-notfound
call "%VS90COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset%
set GYP_MSVS_VERSION=2008
+echo Using Visual Studio 2008
goto select-target
:vc-set-notfound
diff --git a/3rdparty/lzma/7zr.exe b/3rdparty/lzma/7zr.exe
deleted file mode 100644
index 1a3a84347dc..00000000000
--- a/3rdparty/lzma/7zr.exe
+++ /dev/null
Binary files differ
diff --git a/3rdparty/lzma/Asm/x86/7zAsm.asm b/3rdparty/lzma/Asm/x86/7zAsm.asm
index 3e42ab454ce..3707e90c566 100644
--- a/3rdparty/lzma/Asm/x86/7zAsm.asm
+++ b/3rdparty/lzma/Asm/x86/7zAsm.asm
@@ -1,5 +1,5 @@
; 7zAsm.asm -- ASM macros
-; 2009-12-12 : Igor Pavlov : Public domain
+; 2012-12-30 : Igor Pavlov : Public domain
MY_ASM_START macro
ifdef x64
@@ -13,30 +13,34 @@ endm
MY_PROC macro name:req, numParams:req
align 16
- proc_numParams equ numParams
+ proc_numParams = numParams
ifdef x64
proc_name equ name
- name PROC
else
- proc_fastcall_name equ @CatStr(@,name,@, %numParams * 4)
- public proc_fastcall_name
- proc_fastcall_name:
+ proc_name equ @CatStr(@,name,@, %numParams * 4)
endif
+ proc_name PROC
endm
MY_ENDP macro
ifdef x64
ret
- proc_name ENDP
else
- ret (proc_numParams - 2) * 4
+ if proc_numParams LT 3
+ ret
+ else
+ ret (proc_numParams - 2) * 4
+ endif
endif
+ proc_name ENDP
endm
ifdef x64
REG_SIZE equ 8
+ REG_LOGAR_SIZE equ 3
else
REG_SIZE equ 4
+ REG_LOGAR_SIZE equ 2
endif
x0 equ EAX
@@ -67,6 +71,14 @@ ifdef x64
r5 equ RBP
r6 equ RSI
r7 equ RDI
+ x8 equ r8d
+ x9 equ r9d
+ x10 equ r10d
+ x11 equ r11d
+ x12 equ r12d
+ x13 equ r13d
+ x14 equ r14d
+ x15 equ r15d
else
r0 equ x0
r1 equ x1
diff --git a/3rdparty/lzma/Asm/x86/XzCrc64Opt.asm b/3rdparty/lzma/Asm/x86/XzCrc64Opt.asm
new file mode 100644
index 00000000000..734ca5c45f4
--- /dev/null
+++ b/3rdparty/lzma/Asm/x86/XzCrc64Opt.asm
@@ -0,0 +1,205 @@
+; XzCrc64Opt.asm -- CRC64 calculation : optimized version
+; 2011-06-28 : Igor Pavlov : Public domain
+
+include 7zAsm.asm
+
+MY_ASM_START
+
+ifdef x64
+
+ rD equ r9
+ rN equ r10
+
+ num_VAR equ r8
+ table_VAR equ r9
+
+ SRCDAT equ rN + rD
+
+CRC_XOR macro dest:req, src:req, t:req
+ xor dest, QWORD PTR [r5 + src * 8 + 0800h * t]
+endm
+
+CRC1b macro
+ movzx x6, BYTE PTR [rD]
+ inc rD
+ movzx x3, x0_L
+ xor x6, x3
+ shr r0, 8
+ CRC_XOR r0, r6, 0
+ dec rN
+endm
+
+MY_PROLOG macro crc_end:req
+ MY_PUSH_4_REGS
+
+ mov r0, r1
+ mov rN, num_VAR
+ mov r5, table_VAR
+ mov rD, r2
+ test rN, rN
+ jz crc_end
+ @@:
+ test rD, 3
+ jz @F
+ CRC1b
+ jnz @B
+ @@:
+ cmp rN, 8
+ jb crc_end
+ add rN, rD
+ mov num_VAR, rN
+ sub rN, 4
+ and rN, NOT 3
+ sub rD, rN
+ mov x1, [SRCDAT]
+ xor r0, r1
+ add rN, 4
+endm
+
+MY_EPILOG macro crc_end:req
+ sub rN, 4
+ mov x1, [SRCDAT]
+ xor r0, r1
+ mov rD, rN
+ mov rN, num_VAR
+ sub rN, rD
+ crc_end:
+ test rN, rN
+ jz @F
+ CRC1b
+ jmp crc_end
+ @@:
+ MY_POP_4_REGS
+endm
+
+MY_PROC XzCrc64UpdateT4, 4
+ MY_PROLOG crc_end_4
+ align 16
+ main_loop_4:
+ mov x1, [SRCDAT]
+ movzx x2, x0_L
+ movzx x3, x0_H
+ shr r0, 16
+ movzx x6, x0_L
+ movzx x7, x0_H
+ shr r0, 16
+ CRC_XOR r1, r2, 3
+ CRC_XOR r0, r3, 2
+ CRC_XOR r1, r6, 1
+ CRC_XOR r0, r7, 0
+ xor r0, r1
+
+ add rD, 4
+ jnz main_loop_4
+
+ MY_EPILOG crc_end_4
+MY_ENDP
+
+else
+
+ rD equ r1
+ rN equ r7
+
+ crc_val equ (REG_SIZE * 5)
+ crc_table equ (8 + crc_val)
+ table_VAR equ [r4 + crc_table]
+ num_VAR equ table_VAR
+
+
+ SRCDAT equ rN + rD
+
+CRC macro op0:req, op1:req, dest0:req, dest1:req, src:req, t:req
+ op0 dest0, DWORD PTR [r5 + src * 8 + 0800h * t]
+ op1 dest1, DWORD PTR [r5 + src * 8 + 0800h * t + 4]
+endm
+
+CRC_XOR macro dest0:req, dest1:req, src:req, t:req
+ CRC xor, xor, dest0, dest1, src, t
+endm
+
+
+CRC1b macro
+ movzx x6, BYTE PTR [rD]
+ inc rD
+ movzx x3, x0_L
+ xor x6, x3
+ shrd r0, r2, 8
+ shr r2, 8
+ CRC_XOR r0, r2, r6, 0
+ dec rN
+endm
+
+MY_PROLOG macro crc_end:req
+ MY_PUSH_4_REGS
+
+ mov rN, r2
+
+ mov x0, [r4 + crc_val]
+ mov x2, [r4 + crc_val + 4]
+ mov r5, table_VAR
+ test rN, rN
+ jz crc_end
+ @@:
+ test rD, 3
+ jz @F
+ CRC1b
+ jnz @B
+ @@:
+ cmp rN, 8
+ jb crc_end
+ add rN, rD
+
+ mov num_VAR, rN
+
+ sub rN, 4
+ and rN, NOT 3
+ sub rD, rN
+ xor r0, [SRCDAT]
+ add rN, 4
+endm
+
+MY_EPILOG macro crc_end:req
+ sub rN, 4
+ xor r0, [SRCDAT]
+
+ mov rD, rN
+ mov rN, num_VAR
+ sub rN, rD
+ crc_end:
+ test rN, rN
+ jz @F
+ CRC1b
+ jmp crc_end
+ @@:
+ MY_POP_4_REGS
+endm
+
+MY_PROC XzCrc64UpdateT4, 5
+ MY_PROLOG crc_end_4
+ movzx x6, x0_L
+ align 16
+ main_loop_4:
+ mov r3, [SRCDAT]
+ xor r3, r2
+
+ CRC xor, mov, r3, r2, r6, 3
+ movzx x6, x0_H
+ shr r0, 16
+ CRC_XOR r3, r2, r6, 2
+
+ movzx x6, x0_L
+ movzx x0, x0_H
+ CRC_XOR r3, r2, r6, 1
+ CRC_XOR r3, r2, r0, 0
+ movzx x6, x3_L
+ mov r0, r3
+
+ add rD, 4
+ jnz main_loop_4
+
+ MY_EPILOG crc_end_4
+MY_ENDP
+
+endif
+
+end
diff --git a/3rdparty/lzma/C/7z.h b/3rdparty/lzma/C/7z.h
index 01c4cac6a7b..4768151948d 100644
--- a/3rdparty/lzma/C/7z.h
+++ b/3rdparty/lzma/C/7z.h
@@ -1,89 +1,57 @@
/* 7z.h -- 7z interface
-2010-03-11 : Igor Pavlov : Public domain */
+2015-11-18 : Igor Pavlov : Public domain */
#ifndef __7Z_H
#define __7Z_H
-#include "7zBuf.h"
+#include "7zTypes.h"
EXTERN_C_BEGIN
#define k7zStartHeaderSize 0x20
#define k7zSignatureSize 6
-extern Byte k7zSignature[k7zSignatureSize];
-#define k7zMajorVersion 0
-enum EIdEnum
+extern const Byte k7zSignature[k7zSignatureSize];
+
+typedef struct
{
- k7zIdEnd,
- k7zIdHeader,
- k7zIdArchiveProperties,
- k7zIdAdditionalStreamsInfo,
- k7zIdMainStreamsInfo,
- k7zIdFilesInfo,
- k7zIdPackInfo,
- k7zIdUnpackInfo,
- k7zIdSubStreamsInfo,
- k7zIdSize,
- k7zIdCRC,
- k7zIdFolder,
- k7zIdCodersUnpackSize,
- k7zIdNumUnpackStream,
- k7zIdEmptyStream,
- k7zIdEmptyFile,
- k7zIdAnti,
- k7zIdName,
- k7zIdCTime,
- k7zIdATime,
- k7zIdMTime,
- k7zIdWinAttributes,
- k7zIdComment,
- k7zIdEncodedHeader,
- k7zIdStartPos,
- k7zIdDummy
-};
+ const Byte *Data;
+ size_t Size;
+} CSzData;
+
+/* CSzCoderInfo & CSzFolder support only default methods */
typedef struct
{
- UInt32 NumInStreams;
- UInt32 NumOutStreams;
- UInt64 MethodID;
- CBuf Props;
+ size_t PropsOffset;
+ UInt32 MethodID;
+ Byte NumStreams;
+ Byte PropsSize;
} CSzCoderInfo;
-void SzCoderInfo_Init(CSzCoderInfo *p);
-void SzCoderInfo_Free(CSzCoderInfo *p, ISzAlloc *alloc);
-
typedef struct
{
UInt32 InIndex;
UInt32 OutIndex;
-} CSzBindPair;
+} CSzBond;
+
+#define SZ_NUM_CODERS_IN_FOLDER_MAX 4
+#define SZ_NUM_BONDS_IN_FOLDER_MAX 3
+#define SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX 4
typedef struct
{
- CSzCoderInfo *Coders;
- CSzBindPair *BindPairs;
- UInt32 *PackStreams;
- UInt64 *UnpackSizes;
UInt32 NumCoders;
- UInt32 NumBindPairs;
+ UInt32 NumBonds;
UInt32 NumPackStreams;
- int UnpackCRCDefined;
- UInt32 UnpackCRC;
-
- UInt32 NumUnpackStreams;
+ UInt32 UnpackStream;
+ UInt32 PackStreams[SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX];
+ CSzBond Bonds[SZ_NUM_BONDS_IN_FOLDER_MAX];
+ CSzCoderInfo Coders[SZ_NUM_CODERS_IN_FOLDER_MAX];
} CSzFolder;
-void SzFolder_Init(CSzFolder *p);
-UInt64 SzFolder_GetUnpackSize(CSzFolder *p);
-int SzFolder_FindBindPairForInStream(CSzFolder *p, UInt32 inStreamIndex);
-UInt32 SzFolder_GetNumOutStreams(CSzFolder *p);
-UInt64 SzFolder_GetUnpackSize(CSzFolder *p);
-SRes SzFolder_Decode(const CSzFolder *folder, const UInt64 *packSizes,
- ILookInStream *stream, UInt64 startPos,
- Byte *outBuffer, size_t outSize, ISzAlloc *allocMain);
+SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd);
typedef struct
{
@@ -93,72 +61,75 @@ typedef struct
typedef struct
{
- CNtfsFileTime MTime;
- UInt64 Size;
- UInt32 Crc;
- UInt32 Attrib;
- Byte HasStream;
- Byte IsDir;
- Byte IsAnti;
- Byte CrcDefined;
- Byte MTimeDefined;
- Byte AttribDefined;
-} CSzFileItem;
-
-void SzFile_Init(CSzFileItem *p);
+ Byte *Defs; /* MSB 0 bit numbering */
+ UInt32 *Vals;
+} CSzBitUi32s;
+
+typedef struct
+{
+ Byte *Defs; /* MSB 0 bit numbering */
+ // UInt64 *Vals;
+ CNtfsFileTime *Vals;
+} CSzBitUi64s;
+
+#define SzBitArray_Check(p, i) (((p)[(i) >> 3] & (0x80 >> ((i) & 7))) != 0)
+
+#define SzBitWithVals_Check(p, i) ((p)->Defs && ((p)->Defs[(i) >> 3] & (0x80 >> ((i) & 7))) != 0)
typedef struct
{
- UInt64 *PackSizes;
- Byte *PackCRCsDefined;
- UInt32 *PackCRCs;
- CSzFolder *Folders;
- CSzFileItem *Files;
UInt32 NumPackStreams;
UInt32 NumFolders;
- UInt32 NumFiles;
-} CSzAr;
-void SzAr_Init(CSzAr *p);
-void SzAr_Free(CSzAr *p, ISzAlloc *alloc);
+ UInt64 *PackPositions; // NumPackStreams + 1
+ CSzBitUi32s FolderCRCs; // NumFolders
+ size_t *FoCodersOffsets; // NumFolders + 1
+ UInt32 *FoStartPackStreamIndex; // NumFolders + 1
+ UInt32 *FoToCoderUnpackSizes; // NumFolders + 1
+ Byte *FoToMainUnpackSizeIndex; // NumFolders
+ UInt64 *CoderUnpackSizes; // for all coders in all folders
-/*
- SzExtract extracts file from archive
+ Byte *CodersData;
+} CSzAr;
- *outBuffer must be 0 before first call for each new archive.
+UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex);
- Extracting cache:
- If you need to decompress more than one file, you can send
- these values from previous call:
- *blockIndex,
- *outBuffer,
- *outBufferSize
- You can consider "*outBuffer" as cache of solid block. If your archive is solid,
- it will increase decompression speed.
-
- If you use external function, you can declare these 3 cache variables
- (blockIndex, outBuffer, outBufferSize) as static in that external function.
-
- Free *outBuffer and set *outBuffer to 0, if you want to flush cache.
-*/
+SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex,
+ ILookInStream *stream, UInt64 startPos,
+ Byte *outBuffer, size_t outSize,
+ ISzAlloc *allocMain);
typedef struct
{
CSzAr db;
-
+
UInt64 startPosAfterHeader;
UInt64 dataPos;
+
+ UInt32 NumFiles;
- UInt32 *FolderStartPackStreamIndex;
- UInt64 *PackStreamStartPositions;
- UInt32 *FolderStartFileIndex;
- UInt32 *FileIndexToFolderIndexMap;
+ UInt64 *UnpackPositions; // NumFiles + 1
+ // Byte *IsEmptyFiles;
+ Byte *IsDirs;
+ CSzBitUi32s CRCs;
+
+ CSzBitUi32s Attribs;
+ // CSzBitUi32s Parents;
+ CSzBitUi64s MTime;
+ CSzBitUi64s CTime;
+
+ UInt32 *FolderToFile; // NumFolders + 1
+ UInt32 *FileToFolder; // NumFiles
size_t *FileNameOffsets; /* in 2-byte steps */
- CBuf FileNames; /* UTF-16-LE */
+ Byte *FileNames; /* UTF-16-LE */
} CSzArEx;
+#define SzArEx_IsDir(p, i) (SzBitArray_Check((p)->IsDirs, i))
+
+#define SzArEx_GetFileSize(p, i) ((p)->UnpackPositions[(i) + 1] - (p)->UnpackPositions[i])
+
void SzArEx_Init(CSzArEx *p);
void SzArEx_Free(CSzArEx *p, ISzAlloc *alloc);
UInt64 SzArEx_GetFolderStreamPos(const CSzArEx *p, UInt32 folderIndex, UInt32 indexInFolder);
@@ -172,6 +143,33 @@ if dest != NULL, the return value specifies the number of 16-bit characters that
size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest);
+/*
+size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex);
+UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest);
+*/
+
+
+
+/*
+ SzArEx_Extract extracts file from archive
+
+ *outBuffer must be 0 before first call for each new archive.
+
+ Extracting cache:
+ If you need to decompress more than one file, you can send
+ these values from previous call:
+ *blockIndex,
+ *outBuffer,
+ *outBufferSize
+ You can consider "*outBuffer" as cache of solid block. If your archive is solid,
+ it will increase decompression speed.
+
+ If you use external function, you can declare these 3 cache variables
+ (blockIndex, outBuffer, outBufferSize) as static in that external function.
+
+ Free *outBuffer and set *outBuffer to 0, if you want to flush cache.
+*/
+
SRes SzArEx_Extract(
const CSzArEx *db,
ILookInStream *inStream,
@@ -196,7 +194,8 @@ SZ_ERROR_INPUT_EOF
SZ_ERROR_FAIL
*/
-SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, ISzAlloc *allocMain, ISzAlloc *allocTemp);
+SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream,
+ ISzAlloc *allocMain, ISzAlloc *allocTemp);
EXTERN_C_END
diff --git a/3rdparty/lzma/C/7zAlloc.c b/3rdparty/lzma/C/7zAlloc.c
index 964b28db38e..3e848c9800d 100644
--- a/3rdparty/lzma/C/7zAlloc.c
+++ b/3rdparty/lzma/C/7zAlloc.c
@@ -1,5 +1,7 @@
/* 7zAlloc.c -- Allocation functions
-2010-10-29 : Igor Pavlov : Public domain */
+2015-11-09 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "7zAlloc.h"
@@ -20,11 +22,11 @@ int g_allocCountTemp = 0;
void *SzAlloc(void *p, size_t size)
{
- p = p;
+ UNUSED_VAR(p);
if (size == 0)
return 0;
#ifdef _SZ_ALLOC_DEBUG
- fprintf(stderr, "\nAlloc %10d bytes; count = %10d", size, g_allocCount);
+ fprintf(stderr, "\nAlloc %10u bytes; count = %10d", (unsigned)size, g_allocCount);
g_allocCount++;
#endif
return malloc(size);
@@ -32,7 +34,7 @@ void *SzAlloc(void *p, size_t size)
void SzFree(void *p, void *address)
{
- p = p;
+ UNUSED_VAR(p);
#ifdef _SZ_ALLOC_DEBUG
if (address != 0)
{
@@ -45,11 +47,11 @@ void SzFree(void *p, void *address)
void *SzAllocTemp(void *p, size_t size)
{
- p = p;
+ UNUSED_VAR(p);
if (size == 0)
return 0;
#ifdef _SZ_ALLOC_DEBUG
- fprintf(stderr, "\nAlloc_temp %10d bytes; count = %10d", size, g_allocCountTemp);
+ fprintf(stderr, "\nAlloc_temp %10u bytes; count = %10d", (unsigned)size, g_allocCountTemp);
g_allocCountTemp++;
#ifdef _WIN32
return HeapAlloc(GetProcessHeap(), 0, size);
@@ -60,7 +62,7 @@ void *SzAllocTemp(void *p, size_t size)
void SzFreeTemp(void *p, void *address)
{
- p = p;
+ UNUSED_VAR(p);
#ifdef _SZ_ALLOC_DEBUG
if (address != 0)
{
diff --git a/3rdparty/lzma/C/7zAlloc.h b/3rdparty/lzma/C/7zAlloc.h
index 3344e9373f7..2fd5bdbc800 100644
--- a/3rdparty/lzma/C/7zAlloc.h
+++ b/3rdparty/lzma/C/7zAlloc.h
@@ -1,15 +1,23 @@
/* 7zAlloc.h -- Allocation functions
-2010-10-29 : Igor Pavlov : Public domain */
+2013-03-25 : Igor Pavlov : Public domain */
#ifndef __7Z_ALLOC_H
#define __7Z_ALLOC_H
#include <stdlib.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void *SzAlloc(void *p, size_t size);
void SzFree(void *p, void *address);
void *SzAllocTemp(void *p, size_t size);
void SzFreeTemp(void *p, void *address);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/3rdparty/lzma/C/7zArcIn.c b/3rdparty/lzma/C/7zArcIn.c
new file mode 100644
index 00000000000..06e35de0d4f
--- /dev/null
+++ b/3rdparty/lzma/C/7zArcIn.c
@@ -0,0 +1,1770 @@
+/* 7zArcIn.c -- 7z Input functions
+2015-11-18 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
+
+#include <string.h>
+
+#include "7z.h"
+#include "7zBuf.h"
+#include "7zCrc.h"
+#include "CpuArch.h"
+
+#define MY_ALLOC(T, p, size, alloc) { \
+ if ((p = (T *)IAlloc_Alloc(alloc, (size) * sizeof(T))) == NULL) return SZ_ERROR_MEM; }
+
+#define MY_ALLOC_ZE(T, p, size, alloc) { if ((size) == 0) p = NULL; else MY_ALLOC(T, p, size, alloc) }
+
+#define MY_ALLOC_AND_CPY(to, size, from, alloc) \
+ { MY_ALLOC(Byte, to, size, alloc); memcpy(to, from, size); }
+
+#define MY_ALLOC_ZE_AND_CPY(to, size, from, alloc) \
+ { if ((size) == 0) p = NULL; else { MY_ALLOC_AND_CPY(to, size, from, alloc) } }
+
+#define k7zMajorVersion 0
+
+enum EIdEnum
+{
+ k7zIdEnd,
+ k7zIdHeader,
+ k7zIdArchiveProperties,
+ k7zIdAdditionalStreamsInfo,
+ k7zIdMainStreamsInfo,
+ k7zIdFilesInfo,
+ k7zIdPackInfo,
+ k7zIdUnpackInfo,
+ k7zIdSubStreamsInfo,
+ k7zIdSize,
+ k7zIdCRC,
+ k7zIdFolder,
+ k7zIdCodersUnpackSize,
+ k7zIdNumUnpackStream,
+ k7zIdEmptyStream,
+ k7zIdEmptyFile,
+ k7zIdAnti,
+ k7zIdName,
+ k7zIdCTime,
+ k7zIdATime,
+ k7zIdMTime,
+ k7zIdWinAttrib,
+ k7zIdComment,
+ k7zIdEncodedHeader,
+ k7zIdStartPos,
+ k7zIdDummy
+ // k7zNtSecure,
+ // k7zParent,
+ // k7zIsReal
+};
+
+const Byte k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C};
+
+#define SzBitUi32s_Init(p) { (p)->Defs = NULL; (p)->Vals = NULL; }
+
+static SRes SzBitUi32s_Alloc(CSzBitUi32s *p, size_t num, ISzAlloc *alloc)
+{
+ if (num == 0)
+ {
+ p->Defs = NULL;
+ p->Vals = NULL;
+ }
+ else
+ {
+ MY_ALLOC(Byte, p->Defs, (num + 7) >> 3, alloc);
+ MY_ALLOC(UInt32, p->Vals, num, alloc);
+ }
+ return SZ_OK;
+}
+
+void SzBitUi32s_Free(CSzBitUi32s *p, ISzAlloc *alloc)
+{
+ IAlloc_Free(alloc, p->Defs); p->Defs = NULL;
+ IAlloc_Free(alloc, p->Vals); p->Vals = NULL;
+}
+
+#define SzBitUi64s_Init(p) { (p)->Defs = NULL; (p)->Vals = NULL; }
+
+void SzBitUi64s_Free(CSzBitUi64s *p, ISzAlloc *alloc)
+{
+ IAlloc_Free(alloc, p->Defs); p->Defs = NULL;
+ IAlloc_Free(alloc, p->Vals); p->Vals = NULL;
+}
+
+
+static void SzAr_Init(CSzAr *p)
+{
+ p->NumPackStreams = 0;
+ p->NumFolders = 0;
+
+ p->PackPositions = NULL;
+ SzBitUi32s_Init(&p->FolderCRCs);
+
+ p->FoCodersOffsets = NULL;
+ p->FoStartPackStreamIndex = NULL;
+ p->FoToCoderUnpackSizes = NULL;
+ p->FoToMainUnpackSizeIndex = NULL;
+ p->CoderUnpackSizes = NULL;
+
+ p->CodersData = NULL;
+}
+
+static void SzAr_Free(CSzAr *p, ISzAlloc *alloc)
+{
+ IAlloc_Free(alloc, p->PackPositions);
+ SzBitUi32s_Free(&p->FolderCRCs, alloc);
+
+ IAlloc_Free(alloc, p->FoCodersOffsets);
+ IAlloc_Free(alloc, p->FoStartPackStreamIndex);
+ IAlloc_Free(alloc, p->FoToCoderUnpackSizes);
+ IAlloc_Free(alloc, p->FoToMainUnpackSizeIndex);
+ IAlloc_Free(alloc, p->CoderUnpackSizes);
+
+ IAlloc_Free(alloc, p->CodersData);
+
+ SzAr_Init(p);
+}
+
+
+void SzArEx_Init(CSzArEx *p)
+{
+ SzAr_Init(&p->db);
+
+ p->NumFiles = 0;
+ p->dataPos = 0;
+
+ p->UnpackPositions = NULL;
+ p->IsDirs = NULL;
+
+ p->FolderToFile = NULL;
+ p->FileToFolder = NULL;
+
+ p->FileNameOffsets = NULL;
+ p->FileNames = NULL;
+
+ SzBitUi32s_Init(&p->CRCs);
+ SzBitUi32s_Init(&p->Attribs);
+ // SzBitUi32s_Init(&p->Parents);
+ SzBitUi64s_Init(&p->MTime);
+ SzBitUi64s_Init(&p->CTime);
+}
+
+void SzArEx_Free(CSzArEx *p, ISzAlloc *alloc)
+{
+ IAlloc_Free(alloc, p->UnpackPositions);
+ IAlloc_Free(alloc, p->IsDirs);
+
+ IAlloc_Free(alloc, p->FolderToFile);
+ IAlloc_Free(alloc, p->FileToFolder);
+
+ IAlloc_Free(alloc, p->FileNameOffsets);
+ IAlloc_Free(alloc, p->FileNames);
+
+ SzBitUi32s_Free(&p->CRCs, alloc);
+ SzBitUi32s_Free(&p->Attribs, alloc);
+ // SzBitUi32s_Free(&p->Parents, alloc);
+ SzBitUi64s_Free(&p->MTime, alloc);
+ SzBitUi64s_Free(&p->CTime, alloc);
+
+ SzAr_Free(&p->db, alloc);
+ SzArEx_Init(p);
+}
+
+
+static int TestSignatureCandidate(const Byte *testBytes)
+{
+ unsigned i;
+ for (i = 0; i < k7zSignatureSize; i++)
+ if (testBytes[i] != k7zSignature[i])
+ return 0;
+ return 1;
+}
+
+#define SzData_Clear(p) { (p)->Data = NULL; (p)->Size = 0; }
+
+#define SZ_READ_BYTE_SD(_sd_, dest) if ((_sd_)->Size == 0) return SZ_ERROR_ARCHIVE; (_sd_)->Size--; dest = *(_sd_)->Data++;
+#define SZ_READ_BYTE(dest) SZ_READ_BYTE_SD(sd, dest)
+#define SZ_READ_BYTE_2(dest) if (sd.Size == 0) return SZ_ERROR_ARCHIVE; sd.Size--; dest = *sd.Data++;
+
+#define SKIP_DATA(sd, size) { sd->Size -= (size_t)(size); sd->Data += (size_t)(size); }
+#define SKIP_DATA2(sd, size) { sd.Size -= (size_t)(size); sd.Data += (size_t)(size); }
+
+#define SZ_READ_32(dest) if (sd.Size < 4) return SZ_ERROR_ARCHIVE; \
+ dest = GetUi32(sd.Data); SKIP_DATA2(sd, 4);
+
+static MY_NO_INLINE SRes ReadNumber(CSzData *sd, UInt64 *value)
+{
+ Byte firstByte, mask;
+ unsigned i;
+ UInt32 v;
+
+ SZ_READ_BYTE(firstByte);
+ if ((firstByte & 0x80) == 0)
+ {
+ *value = firstByte;
+ return SZ_OK;
+ }
+ SZ_READ_BYTE(v);
+ if ((firstByte & 0x40) == 0)
+ {
+ *value = (((UInt32)firstByte & 0x3F) << 8) | v;
+ return SZ_OK;
+ }
+ SZ_READ_BYTE(mask);
+ *value = v | ((UInt32)mask << 8);
+ mask = 0x20;
+ for (i = 2; i < 8; i++)
+ {
+ Byte b;
+ if ((firstByte & mask) == 0)
+ {
+ UInt64 highPart = (unsigned)firstByte & (unsigned)(mask - 1);
+ *value |= (highPart << (8 * i));
+ return SZ_OK;
+ }
+ SZ_READ_BYTE(b);
+ *value |= ((UInt64)b << (8 * i));
+ mask >>= 1;
+ }
+ return SZ_OK;
+}
+
+
+static MY_NO_INLINE SRes SzReadNumber32(CSzData *sd, UInt32 *value)
+{
+ Byte firstByte;
+ UInt64 value64;
+ if (sd->Size == 0)
+ return SZ_ERROR_ARCHIVE;
+ firstByte = *sd->Data;
+ if ((firstByte & 0x80) == 0)
+ {
+ *value = firstByte;
+ sd->Data++;
+ sd->Size--;
+ return SZ_OK;
+ }
+ RINOK(ReadNumber(sd, &value64));
+ if (value64 >= (UInt32)0x80000000 - 1)
+ return SZ_ERROR_UNSUPPORTED;
+ if (value64 >= ((UInt64)(1) << ((sizeof(size_t) - 1) * 8 + 4)))
+ return SZ_ERROR_UNSUPPORTED;
+ *value = (UInt32)value64;
+ return SZ_OK;
+}
+
+#define ReadID(sd, value) ReadNumber(sd, value)
+
+static SRes SkipData(CSzData *sd)
+{
+ UInt64 size;
+ RINOK(ReadNumber(sd, &size));
+ if (size > sd->Size)
+ return SZ_ERROR_ARCHIVE;
+ SKIP_DATA(sd, size);
+ return SZ_OK;
+}
+
+static SRes WaitId(CSzData *sd, UInt32 id)
+{
+ for (;;)
+ {
+ UInt64 type;
+ RINOK(ReadID(sd, &type));
+ if (type == id)
+ return SZ_OK;
+ if (type == k7zIdEnd)
+ return SZ_ERROR_ARCHIVE;
+ RINOK(SkipData(sd));
+ }
+}
+
+static SRes RememberBitVector(CSzData *sd, UInt32 numItems, const Byte **v)
+{
+ UInt32 numBytes = (numItems + 7) >> 3;
+ if (numBytes > sd->Size)
+ return SZ_ERROR_ARCHIVE;
+ *v = sd->Data;
+ SKIP_DATA(sd, numBytes);
+ return SZ_OK;
+}
+
+static UInt32 CountDefinedBits(const Byte *bits, UInt32 numItems)
+{
+ Byte b = 0;
+ unsigned m = 0;
+ UInt32 sum = 0;
+ for (; numItems != 0; numItems--)
+ {
+ if (m == 0)
+ {
+ b = *bits++;
+ m = 8;
+ }
+ m--;
+ sum += ((b >> m) & 1);
+ }
+ return sum;
+}
+
+static MY_NO_INLINE SRes ReadBitVector(CSzData *sd, UInt32 numItems, Byte **v, ISzAlloc *alloc)
+{
+ Byte allAreDefined;
+ Byte *v2;
+ UInt32 numBytes = (numItems + 7) >> 3;
+ *v = NULL;
+ SZ_READ_BYTE(allAreDefined);
+ if (numBytes == 0)
+ return SZ_OK;
+ if (allAreDefined == 0)
+ {
+ if (numBytes > sd->Size)
+ return SZ_ERROR_ARCHIVE;
+ MY_ALLOC_AND_CPY(*v, numBytes, sd->Data, alloc);
+ SKIP_DATA(sd, numBytes);
+ return SZ_OK;
+ }
+ MY_ALLOC(Byte, *v, numBytes, alloc);
+ v2 = *v;
+ memset(v2, 0xFF, (size_t)numBytes);
+ {
+ unsigned numBits = (unsigned)numItems & 7;
+ if (numBits != 0)
+ v2[numBytes - 1] = (Byte)((((UInt32)1 << numBits) - 1) << (8 - numBits));
+ }
+ return SZ_OK;
+}
+
+static MY_NO_INLINE SRes ReadUi32s(CSzData *sd2, UInt32 numItems, CSzBitUi32s *crcs, ISzAlloc *alloc)
+{
+ UInt32 i;
+ CSzData sd;
+ UInt32 *vals;
+ const Byte *defs;
+ MY_ALLOC_ZE(UInt32, crcs->Vals, numItems, alloc);
+ sd = *sd2;
+ defs = crcs->Defs;
+ vals = crcs->Vals;
+ for (i = 0; i < numItems; i++)
+ if (SzBitArray_Check(defs, i))
+ {
+ SZ_READ_32(vals[i]);
+ }
+ else
+ vals[i] = 0;
+ *sd2 = sd;
+ return SZ_OK;
+}
+
+static SRes ReadBitUi32s(CSzData *sd, UInt32 numItems, CSzBitUi32s *crcs, ISzAlloc *alloc)
+{
+ SzBitUi32s_Free(crcs, alloc);
+ RINOK(ReadBitVector(sd, numItems, &crcs->Defs, alloc));
+ return ReadUi32s(sd, numItems, crcs, alloc);
+}
+
+static SRes SkipBitUi32s(CSzData *sd, UInt32 numItems)
+{
+ Byte allAreDefined;
+ UInt32 numDefined = numItems;
+ SZ_READ_BYTE(allAreDefined);
+ if (!allAreDefined)
+ {
+ size_t numBytes = (numItems + 7) >> 3;
+ if (numBytes > sd->Size)
+ return SZ_ERROR_ARCHIVE;
+ numDefined = CountDefinedBits(sd->Data, numItems);
+ SKIP_DATA(sd, numBytes);
+ }
+ if (numDefined > (sd->Size >> 2))
+ return SZ_ERROR_ARCHIVE;
+ SKIP_DATA(sd, (size_t)numDefined * 4);
+ return SZ_OK;
+}
+
+static SRes ReadPackInfo(CSzAr *p, CSzData *sd, ISzAlloc *alloc)
+{
+ RINOK(SzReadNumber32(sd, &p->NumPackStreams));
+
+ RINOK(WaitId(sd, k7zIdSize));
+ MY_ALLOC(UInt64, p->PackPositions, (size_t)p->NumPackStreams + 1, alloc);
+ {
+ UInt64 sum = 0;
+ UInt32 i;
+ UInt32 numPackStreams = p->NumPackStreams;
+ for (i = 0; i < numPackStreams; i++)
+ {
+ UInt64 packSize;
+ p->PackPositions[i] = sum;
+ RINOK(ReadNumber(sd, &packSize));
+ sum += packSize;
+ if (sum < packSize)
+ return SZ_ERROR_ARCHIVE;
+ }
+ p->PackPositions[i] = sum;
+ }
+
+ for (;;)
+ {
+ UInt64 type;
+ RINOK(ReadID(sd, &type));
+ if (type == k7zIdEnd)
+ return SZ_OK;
+ if (type == k7zIdCRC)
+ {
+ /* CRC of packed streams is unused now */
+ RINOK(SkipBitUi32s(sd, p->NumPackStreams));
+ continue;
+ }
+ RINOK(SkipData(sd));
+ }
+}
+
+/*
+static SRes SzReadSwitch(CSzData *sd)
+{
+ Byte external;
+ RINOK(SzReadByte(sd, &external));
+ return (external == 0) ? SZ_OK: SZ_ERROR_UNSUPPORTED;
+}
+*/
+
+#define k_NumCodersStreams_in_Folder_MAX (SZ_NUM_BONDS_IN_FOLDER_MAX + SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX)
+
+SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd)
+{
+ UInt32 numCoders, i;
+ UInt32 numInStreams = 0;
+ const Byte *dataStart = sd->Data;
+
+ f->NumCoders = 0;
+ f->NumBonds = 0;
+ f->NumPackStreams = 0;
+ f->UnpackStream = 0;
+
+ RINOK(SzReadNumber32(sd, &numCoders));
+ if (numCoders == 0 || numCoders > SZ_NUM_CODERS_IN_FOLDER_MAX)
+ return SZ_ERROR_UNSUPPORTED;
+
+ for (i = 0; i < numCoders; i++)
+ {
+ Byte mainByte;
+ CSzCoderInfo *coder = f->Coders + i;
+ unsigned idSize, j;
+ UInt64 id;
+
+ SZ_READ_BYTE(mainByte);
+ if ((mainByte & 0xC0) != 0)
+ return SZ_ERROR_UNSUPPORTED;
+
+ idSize = (unsigned)(mainByte & 0xF);
+ if (idSize > sizeof(id))
+ return SZ_ERROR_UNSUPPORTED;
+ if (idSize > sd->Size)
+ return SZ_ERROR_ARCHIVE;
+ id = 0;
+ for (j = 0; j < idSize; j++)
+ {
+ id = ((id << 8) | *sd->Data);
+ sd->Data++;
+ sd->Size--;
+ }
+ if (id > (UInt32)0xFFFFFFFF)
+ return SZ_ERROR_UNSUPPORTED;
+ coder->MethodID = (UInt32)id;
+
+ coder->NumStreams = 1;
+ coder->PropsOffset = 0;
+ coder->PropsSize = 0;
+
+ if ((mainByte & 0x10) != 0)
+ {
+ UInt32 numStreams;
+
+ RINOK(SzReadNumber32(sd, &numStreams));
+ if (numStreams > k_NumCodersStreams_in_Folder_MAX)
+ return SZ_ERROR_UNSUPPORTED;
+ coder->NumStreams = (Byte)numStreams;
+
+ RINOK(SzReadNumber32(sd, &numStreams));
+ if (numStreams != 1)
+ return SZ_ERROR_UNSUPPORTED;
+ }
+
+ numInStreams += coder->NumStreams;
+
+ if (numInStreams > k_NumCodersStreams_in_Folder_MAX)
+ return SZ_ERROR_UNSUPPORTED;
+
+ if ((mainByte & 0x20) != 0)
+ {
+ UInt32 propsSize = 0;
+ RINOK(SzReadNumber32(sd, &propsSize));
+ if (propsSize > sd->Size)
+ return SZ_ERROR_ARCHIVE;
+ if (propsSize >= 0x80)
+ return SZ_ERROR_UNSUPPORTED;
+ coder->PropsOffset = sd->Data - dataStart;
+ coder->PropsSize = (Byte)propsSize;
+ sd->Data += (size_t)propsSize;
+ sd->Size -= (size_t)propsSize;
+ }
+ }
+
+ /*
+ if (numInStreams == 1 && numCoders == 1)
+ {
+ f->NumPackStreams = 1;
+ f->PackStreams[0] = 0;
+ }
+ else
+ */
+ {
+ Byte streamUsed[k_NumCodersStreams_in_Folder_MAX];
+ UInt32 numBonds, numPackStreams;
+
+ numBonds = numCoders - 1;
+ if (numInStreams < numBonds)
+ return SZ_ERROR_ARCHIVE;
+ if (numBonds > SZ_NUM_BONDS_IN_FOLDER_MAX)
+ return SZ_ERROR_UNSUPPORTED;
+ f->NumBonds = numBonds;
+
+ numPackStreams = numInStreams - numBonds;
+ if (numPackStreams > SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX)
+ return SZ_ERROR_UNSUPPORTED;
+ f->NumPackStreams = numPackStreams;
+
+ for (i = 0; i < numInStreams; i++)
+ streamUsed[i] = False;
+
+ if (numBonds != 0)
+ {
+ Byte coderUsed[SZ_NUM_CODERS_IN_FOLDER_MAX];
+
+ for (i = 0; i < numCoders; i++)
+ coderUsed[i] = False;
+
+ for (i = 0; i < numBonds; i++)
+ {
+ CSzBond *bp = f->Bonds + i;
+
+ RINOK(SzReadNumber32(sd, &bp->InIndex));
+ if (bp->InIndex >= numInStreams || streamUsed[bp->InIndex])
+ return SZ_ERROR_ARCHIVE;
+ streamUsed[bp->InIndex] = True;
+
+ RINOK(SzReadNumber32(sd, &bp->OutIndex));
+ if (bp->OutIndex >= numCoders || coderUsed[bp->OutIndex])
+ return SZ_ERROR_ARCHIVE;
+ coderUsed[bp->OutIndex] = True;
+ }
+
+ for (i = 0; i < numCoders; i++)
+ if (!coderUsed[i])
+ {
+ f->UnpackStream = i;
+ break;
+ }
+
+ if (i == numCoders)
+ return SZ_ERROR_ARCHIVE;
+ }
+
+ if (numPackStreams == 1)
+ {
+ for (i = 0; i < numInStreams; i++)
+ if (!streamUsed[i])
+ break;
+ if (i == numInStreams)
+ return SZ_ERROR_ARCHIVE;
+ f->PackStreams[0] = i;
+ }
+ else
+ for (i = 0; i < numPackStreams; i++)
+ {
+ UInt32 index;
+ RINOK(SzReadNumber32(sd, &index));
+ if (index >= numInStreams || streamUsed[index])
+ return SZ_ERROR_ARCHIVE;
+ streamUsed[index] = True;
+ f->PackStreams[i] = index;
+ }
+ }
+
+ f->NumCoders = numCoders;
+
+ return SZ_OK;
+}
+
+
+static MY_NO_INLINE SRes SkipNumbers(CSzData *sd2, UInt32 num)
+{
+ CSzData sd;
+ sd = *sd2;
+ for (; num != 0; num--)
+ {
+ Byte firstByte, mask;
+ unsigned i;
+ SZ_READ_BYTE_2(firstByte);
+ if ((firstByte & 0x80) == 0)
+ continue;
+ if ((firstByte & 0x40) == 0)
+ {
+ if (sd.Size == 0)
+ return SZ_ERROR_ARCHIVE;
+ sd.Size--;
+ sd.Data++;
+ continue;
+ }
+ mask = 0x20;
+ for (i = 2; i < 8 && (firstByte & mask) != 0; i++)
+ mask >>= 1;
+ if (i > sd.Size)
+ return SZ_ERROR_ARCHIVE;
+ SKIP_DATA2(sd, i);
+ }
+ *sd2 = sd;
+ return SZ_OK;
+}
+
+
+#define k_Scan_NumCoders_MAX 64
+#define k_Scan_NumCodersStreams_in_Folder_MAX 64
+
+
+static SRes ReadUnpackInfo(CSzAr *p,
+ CSzData *sd2,
+ UInt32 numFoldersMax,
+ const CBuf *tempBufs, UInt32 numTempBufs,
+ ISzAlloc *alloc)
+{
+ CSzData sd;
+
+ UInt32 fo, numFolders, numCodersOutStreams, packStreamIndex;
+ const Byte *startBufPtr;
+ Byte external;
+
+ RINOK(WaitId(sd2, k7zIdFolder));
+
+ RINOK(SzReadNumber32(sd2, &numFolders));
+ if (numFolders > numFoldersMax)
+ return SZ_ERROR_UNSUPPORTED;
+ p->NumFolders = numFolders;
+
+ SZ_READ_BYTE_SD(sd2, external);
+ if (external == 0)
+ sd = *sd2;
+ else
+ {
+ UInt32 index;
+ RINOK(SzReadNumber32(sd2, &index));
+ if (index >= numTempBufs)
+ return SZ_ERROR_ARCHIVE;
+ sd.Data = tempBufs[index].data;
+ sd.Size = tempBufs[index].size;
+ }
+
+ MY_ALLOC(size_t, p->FoCodersOffsets, (size_t)numFolders + 1, alloc);
+ MY_ALLOC(UInt32, p->FoStartPackStreamIndex, (size_t)numFolders + 1, alloc);
+ MY_ALLOC(UInt32, p->FoToCoderUnpackSizes, (size_t)numFolders + 1, alloc);
+ MY_ALLOC(Byte, p->FoToMainUnpackSizeIndex, (size_t)numFolders, alloc);
+
+ startBufPtr = sd.Data;
+
+ packStreamIndex = 0;
+ numCodersOutStreams = 0;
+
+ for (fo = 0; fo < numFolders; fo++)
+ {
+ UInt32 numCoders, ci, numInStreams = 0;
+
+ p->FoCodersOffsets[fo] = sd.Data - startBufPtr;
+
+ RINOK(SzReadNumber32(&sd, &numCoders));
+ if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX)
+ return SZ_ERROR_UNSUPPORTED;
+
+ for (ci = 0; ci < numCoders; ci++)
+ {
+ Byte mainByte;
+ unsigned idSize;
+ UInt32 coderInStreams;
+
+ SZ_READ_BYTE_2(mainByte);
+ if ((mainByte & 0xC0) != 0)
+ return SZ_ERROR_UNSUPPORTED;
+ idSize = (mainByte & 0xF);
+ if (idSize > 8)
+ return SZ_ERROR_UNSUPPORTED;
+ if (idSize > sd.Size)
+ return SZ_ERROR_ARCHIVE;
+ SKIP_DATA2(sd, idSize);
+
+ coderInStreams = 1;
+
+ if ((mainByte & 0x10) != 0)
+ {
+ UInt32 coderOutStreams;
+ RINOK(SzReadNumber32(&sd, &coderInStreams));
+ RINOK(SzReadNumber32(&sd, &coderOutStreams));
+ if (coderInStreams > k_Scan_NumCodersStreams_in_Folder_MAX || coderOutStreams != 1)
+ return SZ_ERROR_UNSUPPORTED;
+ }
+
+ numInStreams += coderInStreams;
+
+ if ((mainByte & 0x20) != 0)
+ {
+ UInt32 propsSize;
+ RINOK(SzReadNumber32(&sd, &propsSize));
+ if (propsSize > sd.Size)
+ return SZ_ERROR_ARCHIVE;
+ SKIP_DATA2(sd, propsSize);
+ }
+ }
+
+ {
+ UInt32 indexOfMainStream = 0;
+ UInt32 numPackStreams = 1;
+
+ if (numCoders != 1 || numInStreams != 1)
+ {
+ Byte streamUsed[k_Scan_NumCodersStreams_in_Folder_MAX];
+ Byte coderUsed[k_Scan_NumCoders_MAX];
+
+ UInt32 i;
+ UInt32 numBonds = numCoders - 1;
+ if (numInStreams < numBonds)
+ return SZ_ERROR_ARCHIVE;
+
+ if (numInStreams > k_Scan_NumCodersStreams_in_Folder_MAX)
+ return SZ_ERROR_UNSUPPORTED;
+
+ for (i = 0; i < numInStreams; i++)
+ streamUsed[i] = False;
+ for (i = 0; i < numCoders; i++)
+ coderUsed[i] = False;
+
+ for (i = 0; i < numBonds; i++)
+ {
+ UInt32 index;
+
+ RINOK(SzReadNumber32(&sd, &index));
+ if (index >= numInStreams || streamUsed[index])
+ return SZ_ERROR_ARCHIVE;
+ streamUsed[index] = True;
+
+ RINOK(SzReadNumber32(&sd, &index));
+ if (index >= numCoders || coderUsed[index])
+ return SZ_ERROR_ARCHIVE;
+ coderUsed[index] = True;
+ }
+
+ numPackStreams = numInStreams - numBonds;
+
+ if (numPackStreams != 1)
+ for (i = 0; i < numPackStreams; i++)
+ {
+ UInt32 index;
+ RINOK(SzReadNumber32(&sd, &index));
+ if (index >= numInStreams || streamUsed[index])
+ return SZ_ERROR_ARCHIVE;
+ streamUsed[index] = True;
+ }
+
+ for (i = 0; i < numCoders; i++)
+ if (!coderUsed[i])
+ {
+ indexOfMainStream = i;
+ break;
+ }
+
+ if (i == numCoders)
+ return SZ_ERROR_ARCHIVE;
+ }
+
+ p->FoStartPackStreamIndex[fo] = packStreamIndex;
+ p->FoToCoderUnpackSizes[fo] = numCodersOutStreams;
+ p->FoToMainUnpackSizeIndex[fo] = (Byte)indexOfMainStream;
+ numCodersOutStreams += numCoders;
+ if (numCodersOutStreams < numCoders)
+ return SZ_ERROR_UNSUPPORTED;
+
+ packStreamIndex += numPackStreams;
+ if (packStreamIndex < numPackStreams)
+ return SZ_ERROR_UNSUPPORTED;
+
+ if (packStreamIndex > p->NumPackStreams)
+ return SZ_ERROR_ARCHIVE;
+ }
+ }
+
+ p->FoToCoderUnpackSizes[fo] = numCodersOutStreams;
+
+ {
+ size_t dataSize = sd.Data - startBufPtr;
+ p->FoStartPackStreamIndex[fo] = packStreamIndex;
+ p->FoCodersOffsets[fo] = dataSize;
+ MY_ALLOC_ZE_AND_CPY(p->CodersData, dataSize, startBufPtr, alloc);
+ }
+
+ if (external != 0)
+ {
+ if (sd.Size != 0)
+ return SZ_ERROR_ARCHIVE;
+ sd = *sd2;
+ }
+
+ RINOK(WaitId(&sd, k7zIdCodersUnpackSize));
+
+ MY_ALLOC_ZE(UInt64, p->CoderUnpackSizes, (size_t)numCodersOutStreams, alloc);
+ {
+ UInt32 i;
+ for (i = 0; i < numCodersOutStreams; i++)
+ {
+ RINOK(ReadNumber(&sd, p->CoderUnpackSizes + i));
+ }
+ }
+
+ for (;;)
+ {
+ UInt64 type;
+ RINOK(ReadID(&sd, &type));
+ if (type == k7zIdEnd)
+ {
+ *sd2 = sd;
+ return SZ_OK;
+ }
+ if (type == k7zIdCRC)
+ {
+ RINOK(ReadBitUi32s(&sd, numFolders, &p->FolderCRCs, alloc));
+ continue;
+ }
+ RINOK(SkipData(&sd));
+ }
+}
+
+
+UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex)
+{
+ return p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex] + p->FoToMainUnpackSizeIndex[folderIndex]];
+}
+
+
+typedef struct
+{
+ UInt32 NumTotalSubStreams;
+ UInt32 NumSubDigests;
+ CSzData sdNumSubStreams;
+ CSzData sdSizes;
+ CSzData sdCRCs;
+} CSubStreamInfo;
+
+
+static SRes ReadSubStreamsInfo(CSzAr *p, CSzData *sd, CSubStreamInfo *ssi)
+{
+ UInt64 type = 0;
+ UInt32 numSubDigests = 0;
+ UInt32 numFolders = p->NumFolders;
+ UInt32 numUnpackStreams = numFolders;
+ UInt32 numUnpackSizesInData = 0;
+
+ for (;;)
+ {
+ RINOK(ReadID(sd, &type));
+ if (type == k7zIdNumUnpackStream)
+ {
+ UInt32 i;
+ ssi->sdNumSubStreams.Data = sd->Data;
+ numUnpackStreams = 0;
+ numSubDigests = 0;
+ for (i = 0; i < numFolders; i++)
+ {
+ UInt32 numStreams;
+ RINOK(SzReadNumber32(sd, &numStreams));
+ if (numUnpackStreams > numUnpackStreams + numStreams)
+ return SZ_ERROR_UNSUPPORTED;
+ numUnpackStreams += numStreams;
+ if (numStreams != 0)
+ numUnpackSizesInData += (numStreams - 1);
+ if (numStreams != 1 || !SzBitWithVals_Check(&p->FolderCRCs, i))
+ numSubDigests += numStreams;
+ }
+ ssi->sdNumSubStreams.Size = sd->Data - ssi->sdNumSubStreams.Data;
+ continue;
+ }
+ if (type == k7zIdCRC || type == k7zIdSize || type == k7zIdEnd)
+ break;
+ RINOK(SkipData(sd));
+ }
+
+ if (!ssi->sdNumSubStreams.Data)
+ {
+ numSubDigests = numFolders;
+ if (p->FolderCRCs.Defs)
+ numSubDigests = numFolders - CountDefinedBits(p->FolderCRCs.Defs, numFolders);
+ }
+
+ ssi->NumTotalSubStreams = numUnpackStreams;
+ ssi->NumSubDigests = numSubDigests;
+
+ if (type == k7zIdSize)
+ {
+ ssi->sdSizes.Data = sd->Data;
+ RINOK(SkipNumbers(sd, numUnpackSizesInData));
+ ssi->sdSizes.Size = sd->Data - ssi->sdSizes.Data;
+ RINOK(ReadID(sd, &type));
+ }
+
+ for (;;)
+ {
+ if (type == k7zIdEnd)
+ return SZ_OK;
+ if (type == k7zIdCRC)
+ {
+ ssi->sdCRCs.Data = sd->Data;
+ RINOK(SkipBitUi32s(sd, numSubDigests));
+ ssi->sdCRCs.Size = sd->Data - ssi->sdCRCs.Data;
+ }
+ else
+ {
+ RINOK(SkipData(sd));
+ }
+ RINOK(ReadID(sd, &type));
+ }
+}
+
+static SRes SzReadStreamsInfo(CSzAr *p,
+ CSzData *sd,
+ UInt32 numFoldersMax, const CBuf *tempBufs, UInt32 numTempBufs,
+ UInt64 *dataOffset,
+ CSubStreamInfo *ssi,
+ ISzAlloc *alloc)
+{
+ UInt64 type;
+
+ SzData_Clear(&ssi->sdSizes);
+ SzData_Clear(&ssi->sdCRCs);
+ SzData_Clear(&ssi->sdNumSubStreams);
+
+ *dataOffset = 0;
+ RINOK(ReadID(sd, &type));
+ if (type == k7zIdPackInfo)
+ {
+ RINOK(ReadNumber(sd, dataOffset));
+ RINOK(ReadPackInfo(p, sd, alloc));
+ RINOK(ReadID(sd, &type));
+ }
+ if (type == k7zIdUnpackInfo)
+ {
+ RINOK(ReadUnpackInfo(p, sd, numFoldersMax, tempBufs, numTempBufs, alloc));
+ RINOK(ReadID(sd, &type));
+ }
+ if (type == k7zIdSubStreamsInfo)
+ {
+ RINOK(ReadSubStreamsInfo(p, sd, ssi));
+ RINOK(ReadID(sd, &type));
+ }
+ else
+ {
+ ssi->NumTotalSubStreams = p->NumFolders;
+ // ssi->NumSubDigests = 0;
+ }
+
+ return (type == k7zIdEnd ? SZ_OK : SZ_ERROR_UNSUPPORTED);
+}
+
+static SRes SzReadAndDecodePackedStreams(
+ ILookInStream *inStream,
+ CSzData *sd,
+ CBuf *tempBufs,
+ UInt32 numFoldersMax,
+ UInt64 baseOffset,
+ CSzAr *p,
+ ISzAlloc *allocTemp)
+{
+ UInt64 dataStartPos;
+ UInt32 fo;
+ CSubStreamInfo ssi;
+
+ RINOK(SzReadStreamsInfo(p, sd, numFoldersMax, NULL, 0, &dataStartPos, &ssi, allocTemp));
+
+ dataStartPos += baseOffset;
+ if (p->NumFolders == 0)
+ return SZ_ERROR_ARCHIVE;
+
+ for (fo = 0; fo < p->NumFolders; fo++)
+ Buf_Init(tempBufs + fo);
+
+ for (fo = 0; fo < p->NumFolders; fo++)
+ {
+ CBuf *tempBuf = tempBufs + fo;
+ UInt64 unpackSize = SzAr_GetFolderUnpackSize(p, fo);
+ if ((size_t)unpackSize != unpackSize)
+ return SZ_ERROR_MEM;
+ if (!Buf_Create(tempBuf, (size_t)unpackSize, allocTemp))
+ return SZ_ERROR_MEM;
+ }
+
+ for (fo = 0; fo < p->NumFolders; fo++)
+ {
+ const CBuf *tempBuf = tempBufs + fo;
+ RINOK(LookInStream_SeekTo(inStream, dataStartPos));
+ RINOK(SzAr_DecodeFolder(p, fo, inStream, dataStartPos, tempBuf->data, tempBuf->size, allocTemp));
+ }
+
+ return SZ_OK;
+}
+
+static SRes SzReadFileNames(const Byte *data, size_t size, UInt32 numFiles, size_t *offsets)
+{
+ size_t pos = 0;
+ *offsets++ = 0;
+ if (numFiles == 0)
+ return (size == 0) ? SZ_OK : SZ_ERROR_ARCHIVE;
+ if (size < 2)
+ return SZ_ERROR_ARCHIVE;
+ if (data[size - 2] != 0 || data[size - 1] != 0)
+ return SZ_ERROR_ARCHIVE;
+ do
+ {
+ const Byte *p;
+ if (pos == size)
+ return SZ_ERROR_ARCHIVE;
+ for (p = data + pos;
+ #ifdef _WIN32
+ *(const UInt16 *)p != 0
+ #else
+ p[0] != 0 || p[1] != 0
+ #endif
+ ; p += 2);
+ pos = p - data + 2;
+ *offsets++ = (pos >> 1);
+ }
+ while (--numFiles);
+ return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE;
+}
+
+static MY_NO_INLINE SRes ReadTime(CSzBitUi64s *p, UInt32 num,
+ CSzData *sd2,
+ const CBuf *tempBufs, UInt32 numTempBufs,
+ ISzAlloc *alloc)
+{
+ CSzData sd;
+ UInt32 i;
+ CNtfsFileTime *vals;
+ Byte *defs;
+ Byte external;
+
+ RINOK(ReadBitVector(sd2, num, &p->Defs, alloc));
+
+ SZ_READ_BYTE_SD(sd2, external);
+ if (external == 0)
+ sd = *sd2;
+ else
+ {
+ UInt32 index;
+ RINOK(SzReadNumber32(sd2, &index));
+ if (index >= numTempBufs)
+ return SZ_ERROR_ARCHIVE;
+ sd.Data = tempBufs[index].data;
+ sd.Size = tempBufs[index].size;
+ }
+
+ MY_ALLOC_ZE(CNtfsFileTime, p->Vals, num, alloc);
+ vals = p->Vals;
+ defs = p->Defs;
+ for (i = 0; i < num; i++)
+ if (SzBitArray_Check(defs, i))
+ {
+ if (sd.Size < 8)
+ return SZ_ERROR_ARCHIVE;
+ vals[i].Low = GetUi32(sd.Data);
+ vals[i].High = GetUi32(sd.Data + 4);
+ SKIP_DATA2(sd, 8);
+ }
+ else
+ vals[i].High = vals[i].Low = 0;
+
+ if (external == 0)
+ *sd2 = sd;
+
+ return SZ_OK;
+}
+
+
+#define NUM_ADDITIONAL_STREAMS_MAX 8
+
+
+static SRes SzReadHeader2(
+ CSzArEx *p, /* allocMain */
+ CSzData *sd,
+ ILookInStream *inStream,
+ CBuf *tempBufs, UInt32 *numTempBufs,
+ ISzAlloc *allocMain,
+ ISzAlloc *allocTemp
+ )
+{
+ UInt64 type;
+ UInt32 numFiles = 0;
+ UInt32 numEmptyStreams = 0;
+ CSubStreamInfo ssi;
+ const Byte *emptyStreams = NULL;
+ const Byte *emptyFiles = NULL;
+
+ SzData_Clear(&ssi.sdSizes);
+ SzData_Clear(&ssi.sdCRCs);
+ SzData_Clear(&ssi.sdNumSubStreams);
+
+ ssi.NumSubDigests = 0;
+ ssi.NumTotalSubStreams = 0;
+
+ RINOK(ReadID(sd, &type));
+
+ if (type == k7zIdArchiveProperties)
+ {
+ for (;;)
+ {
+ UInt64 type;
+ RINOK(ReadID(sd, &type));
+ if (type == k7zIdEnd)
+ break;
+ RINOK(SkipData(sd));
+ }
+ RINOK(ReadID(sd, &type));
+ }
+
+ if (type == k7zIdAdditionalStreamsInfo)
+ {
+ CSzAr tempAr;
+ SRes res;
+
+ SzAr_Init(&tempAr);
+ res = SzReadAndDecodePackedStreams(inStream, sd, tempBufs, NUM_ADDITIONAL_STREAMS_MAX,
+ p->startPosAfterHeader, &tempAr, allocTemp);
+ *numTempBufs = tempAr.NumFolders;
+ SzAr_Free(&tempAr, allocTemp);
+
+ if (res != SZ_OK)
+ return res;
+ RINOK(ReadID(sd, &type));
+ }
+
+ if (type == k7zIdMainStreamsInfo)
+ {
+ RINOK(SzReadStreamsInfo(&p->db, sd, (UInt32)1 << 30, tempBufs, *numTempBufs,
+ &p->dataPos, &ssi, allocMain));
+ p->dataPos += p->startPosAfterHeader;
+ RINOK(ReadID(sd, &type));
+ }
+
+ if (type == k7zIdEnd)
+ {
+ return SZ_OK;
+ }
+
+ if (type != k7zIdFilesInfo)
+ return SZ_ERROR_ARCHIVE;
+
+ RINOK(SzReadNumber32(sd, &numFiles));
+ p->NumFiles = numFiles;
+
+ for (;;)
+ {
+ UInt64 type;
+ UInt64 size;
+ RINOK(ReadID(sd, &type));
+ if (type == k7zIdEnd)
+ break;
+ RINOK(ReadNumber(sd, &size));
+ if (size > sd->Size)
+ return SZ_ERROR_ARCHIVE;
+
+ if (type >= ((UInt32)1 << 8))
+ {
+ SKIP_DATA(sd, size);
+ }
+ else switch ((unsigned)type)
+ {
+ case k7zIdName:
+ {
+ size_t namesSize;
+ const Byte *namesData;
+ Byte external;
+
+ SZ_READ_BYTE(external);
+ if (external == 0)
+ {
+ namesSize = (size_t)size - 1;
+ namesData = sd->Data;
+ }
+ else
+ {
+ UInt32 index;
+ RINOK(SzReadNumber32(sd, &index));
+ if (index >= *numTempBufs)
+ return SZ_ERROR_ARCHIVE;
+ namesData = (tempBufs)[index].data;
+ namesSize = (tempBufs)[index].size;
+ }
+
+ if ((namesSize & 1) != 0)
+ return SZ_ERROR_ARCHIVE;
+ MY_ALLOC(size_t, p->FileNameOffsets, numFiles + 1, allocMain);
+ MY_ALLOC_ZE_AND_CPY(p->FileNames, namesSize, namesData, allocMain);
+ RINOK(SzReadFileNames(p->FileNames, namesSize, numFiles, p->FileNameOffsets))
+ if (external == 0)
+ {
+ SKIP_DATA(sd, namesSize);
+ }
+ break;
+ }
+ case k7zIdEmptyStream:
+ {
+ RINOK(RememberBitVector(sd, numFiles, &emptyStreams));
+ numEmptyStreams = CountDefinedBits(emptyStreams, numFiles);
+ emptyFiles = NULL;
+ break;
+ }
+ case k7zIdEmptyFile:
+ {
+ RINOK(RememberBitVector(sd, numEmptyStreams, &emptyFiles));
+ break;
+ }
+ case k7zIdWinAttrib:
+ {
+ Byte external;
+ CSzData sdSwitch;
+ CSzData *sdPtr;
+ SzBitUi32s_Free(&p->Attribs, allocMain);
+ RINOK(ReadBitVector(sd, numFiles, &p->Attribs.Defs, allocMain));
+
+ SZ_READ_BYTE(external);
+ if (external == 0)
+ sdPtr = sd;
+ else
+ {
+ UInt32 index;
+ RINOK(SzReadNumber32(sd, &index));
+ if (index >= *numTempBufs)
+ return SZ_ERROR_ARCHIVE;
+ sdSwitch.Data = (tempBufs)[index].data;
+ sdSwitch.Size = (tempBufs)[index].size;
+ sdPtr = &sdSwitch;
+ }
+ RINOK(ReadUi32s(sdPtr, numFiles, &p->Attribs, allocMain));
+ break;
+ }
+ /*
+ case k7zParent:
+ {
+ SzBitUi32s_Free(&p->Parents, allocMain);
+ RINOK(ReadBitVector(sd, numFiles, &p->Parents.Defs, allocMain));
+ RINOK(SzReadSwitch(sd));
+ RINOK(ReadUi32s(sd, numFiles, &p->Parents, allocMain));
+ break;
+ }
+ */
+ case k7zIdMTime: RINOK(ReadTime(&p->MTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)); break;
+ case k7zIdCTime: RINOK(ReadTime(&p->CTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)); break;
+ default:
+ {
+ SKIP_DATA(sd, size);
+ }
+ }
+ }
+
+ if (numFiles - numEmptyStreams != ssi.NumTotalSubStreams)
+ return SZ_ERROR_ARCHIVE;
+
+ for (;;)
+ {
+ UInt64 type;
+ RINOK(ReadID(sd, &type));
+ if (type == k7zIdEnd)
+ break;
+ RINOK(SkipData(sd));
+ }
+
+ {
+ UInt32 i;
+ UInt32 emptyFileIndex = 0;
+ UInt32 folderIndex = 0;
+ UInt32 remSubStreams = 0;
+ UInt32 numSubStreams = 0;
+ UInt64 unpackPos = 0;
+ const Byte *digestsDefs = NULL;
+ const Byte *digestsVals = NULL;
+ UInt32 digestsValsIndex = 0;
+ UInt32 digestIndex;
+ Byte allDigestsDefined = 0;
+ Byte isDirMask = 0;
+ Byte crcMask = 0;
+ Byte mask = 0x80;
+
+ MY_ALLOC(UInt32, p->FolderToFile, p->db.NumFolders + 1, allocMain);
+ MY_ALLOC_ZE(UInt32, p->FileToFolder, p->NumFiles, allocMain);
+ MY_ALLOC(UInt64, p->UnpackPositions, p->NumFiles + 1, allocMain);
+ MY_ALLOC_ZE(Byte, p->IsDirs, (p->NumFiles + 7) >> 3, allocMain);
+
+ RINOK(SzBitUi32s_Alloc(&p->CRCs, p->NumFiles, allocMain));
+
+ if (ssi.sdCRCs.Size != 0)
+ {
+ SZ_READ_BYTE_SD(&ssi.sdCRCs, allDigestsDefined);
+ if (allDigestsDefined)
+ digestsVals = ssi.sdCRCs.Data;
+ else
+ {
+ size_t numBytes = (ssi.NumSubDigests + 7) >> 3;
+ digestsDefs = ssi.sdCRCs.Data;
+ digestsVals = digestsDefs + numBytes;
+ }
+ }
+
+ digestIndex = 0;
+
+ for (i = 0; i < numFiles; i++, mask >>= 1)
+ {
+ if (mask == 0)
+ {
+ UInt32 byteIndex = (i - 1) >> 3;
+ p->IsDirs[byteIndex] = isDirMask;
+ p->CRCs.Defs[byteIndex] = crcMask;
+ isDirMask = 0;
+ crcMask = 0;
+ mask = 0x80;
+ }
+
+ p->UnpackPositions[i] = unpackPos;
+ p->CRCs.Vals[i] = 0;
+
+ if (emptyStreams && SzBitArray_Check(emptyStreams, i))
+ {
+ if (emptyFiles)
+ {
+ if (!SzBitArray_Check(emptyFiles, emptyFileIndex))
+ isDirMask |= mask;
+ emptyFileIndex++;
+ }
+ else
+ isDirMask |= mask;
+ if (remSubStreams == 0)
+ {
+ p->FileToFolder[i] = (UInt32)-1;
+ continue;
+ }
+ }
+
+ if (remSubStreams == 0)
+ {
+ for (;;)
+ {
+ if (folderIndex >= p->db.NumFolders)
+ return SZ_ERROR_ARCHIVE;
+ p->FolderToFile[folderIndex] = i;
+ numSubStreams = 1;
+ if (ssi.sdNumSubStreams.Data)
+ {
+ RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams));
+ }
+ remSubStreams = numSubStreams;
+ if (numSubStreams != 0)
+ break;
+ {
+ UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
+ unpackPos += folderUnpackSize;
+ if (unpackPos < folderUnpackSize)
+ return SZ_ERROR_ARCHIVE;
+ }
+
+ folderIndex++;
+ }
+ }
+
+ p->FileToFolder[i] = folderIndex;
+
+ if (emptyStreams && SzBitArray_Check(emptyStreams, i))
+ continue;
+
+ if (--remSubStreams == 0)
+ {
+ UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
+ UInt64 startFolderUnpackPos = p->UnpackPositions[p->FolderToFile[folderIndex]];
+ if (folderUnpackSize < unpackPos - startFolderUnpackPos)
+ return SZ_ERROR_ARCHIVE;
+ unpackPos = startFolderUnpackPos + folderUnpackSize;
+ if (unpackPos < folderUnpackSize)
+ return SZ_ERROR_ARCHIVE;
+
+ if (numSubStreams == 1 && SzBitWithVals_Check(&p->db.FolderCRCs, i))
+ {
+ p->CRCs.Vals[i] = p->db.FolderCRCs.Vals[folderIndex];
+ crcMask |= mask;
+ }
+ else if (allDigestsDefined || (digestsDefs && SzBitArray_Check(digestsDefs, digestIndex)))
+ {
+ p->CRCs.Vals[i] = GetUi32(digestsVals + (size_t)digestsValsIndex * 4);
+ digestsValsIndex++;
+ crcMask |= mask;
+ }
+
+ folderIndex++;
+ }
+ else
+ {
+ UInt64 v;
+ RINOK(ReadNumber(&ssi.sdSizes, &v));
+ unpackPos += v;
+ if (unpackPos < v)
+ return SZ_ERROR_ARCHIVE;
+ if (allDigestsDefined || (digestsDefs && SzBitArray_Check(digestsDefs, digestIndex)))
+ {
+ p->CRCs.Vals[i] = GetUi32(digestsVals + (size_t)digestsValsIndex * 4);
+ digestsValsIndex++;
+ crcMask |= mask;
+ }
+ }
+ }
+
+ if (mask != 0x80)
+ {
+ UInt32 byteIndex = (i - 1) >> 3;
+ p->IsDirs[byteIndex] = isDirMask;
+ p->CRCs.Defs[byteIndex] = crcMask;
+ }
+
+ p->UnpackPositions[i] = unpackPos;
+
+ if (remSubStreams != 0)
+ return SZ_ERROR_ARCHIVE;
+
+ for (;;)
+ {
+ p->FolderToFile[folderIndex] = i;
+ if (folderIndex >= p->db.NumFolders)
+ break;
+ if (!ssi.sdNumSubStreams.Data)
+ return SZ_ERROR_ARCHIVE;
+ RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams));
+ if (numSubStreams != 0)
+ return SZ_ERROR_ARCHIVE;
+ /*
+ {
+ UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
+ unpackPos += folderUnpackSize;
+ if (unpackPos < folderUnpackSize)
+ return SZ_ERROR_ARCHIVE;
+ }
+ */
+ folderIndex++;
+ }
+
+ if (ssi.sdNumSubStreams.Data && ssi.sdNumSubStreams.Size != 0)
+ return SZ_ERROR_ARCHIVE;
+ }
+
+ return SZ_OK;
+}
+
+
+static SRes SzReadHeader(
+ CSzArEx *p,
+ CSzData *sd,
+ ILookInStream *inStream,
+ ISzAlloc *allocMain,
+ ISzAlloc *allocTemp)
+{
+ UInt32 i;
+ UInt32 numTempBufs = 0;
+ SRes res;
+ CBuf tempBufs[NUM_ADDITIONAL_STREAMS_MAX];
+
+ for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++)
+ Buf_Init(tempBufs + i);
+
+ res = SzReadHeader2(p, sd, inStream,
+ tempBufs, &numTempBufs,
+ allocMain, allocTemp);
+
+ for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++)
+ Buf_Free(tempBufs + i, allocTemp);
+
+ RINOK(res);
+
+ if (sd->Size != 0)
+ return SZ_ERROR_FAIL;
+
+ return res;
+}
+
+static SRes SzArEx_Open2(
+ CSzArEx *p,
+ ILookInStream *inStream,
+ ISzAlloc *allocMain,
+ ISzAlloc *allocTemp)
+{
+ Byte header[k7zStartHeaderSize];
+ Int64 startArcPos;
+ UInt64 nextHeaderOffset, nextHeaderSize;
+ size_t nextHeaderSizeT;
+ UInt32 nextHeaderCRC;
+ CBuf buf;
+ SRes res;
+
+ startArcPos = 0;
+ RINOK(inStream->Seek(inStream, &startArcPos, SZ_SEEK_CUR));
+
+ RINOK(LookInStream_Read2(inStream, header, k7zStartHeaderSize, SZ_ERROR_NO_ARCHIVE));
+
+ if (!TestSignatureCandidate(header))
+ return SZ_ERROR_NO_ARCHIVE;
+ if (header[6] != k7zMajorVersion)
+ return SZ_ERROR_UNSUPPORTED;
+
+ nextHeaderOffset = GetUi64(header + 12);
+ nextHeaderSize = GetUi64(header + 20);
+ nextHeaderCRC = GetUi32(header + 28);
+
+ p->startPosAfterHeader = startArcPos + k7zStartHeaderSize;
+
+ if (CrcCalc(header + 12, 20) != GetUi32(header + 8))
+ return SZ_ERROR_CRC;
+
+ nextHeaderSizeT = (size_t)nextHeaderSize;
+ if (nextHeaderSizeT != nextHeaderSize)
+ return SZ_ERROR_MEM;
+ if (nextHeaderSizeT == 0)
+ return SZ_OK;
+ if (nextHeaderOffset > nextHeaderOffset + nextHeaderSize ||
+ nextHeaderOffset > nextHeaderOffset + nextHeaderSize + k7zStartHeaderSize)
+ return SZ_ERROR_NO_ARCHIVE;
+
+ {
+ Int64 pos = 0;
+ RINOK(inStream->Seek(inStream, &pos, SZ_SEEK_END));
+ if ((UInt64)pos < startArcPos + nextHeaderOffset ||
+ (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset ||
+ (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset + nextHeaderSize)
+ return SZ_ERROR_INPUT_EOF;
+ }
+
+ RINOK(LookInStream_SeekTo(inStream, startArcPos + k7zStartHeaderSize + nextHeaderOffset));
+
+ if (!Buf_Create(&buf, nextHeaderSizeT, allocTemp))
+ return SZ_ERROR_MEM;
+
+ res = LookInStream_Read(inStream, buf.data, nextHeaderSizeT);
+
+ if (res == SZ_OK)
+ {
+ res = SZ_ERROR_ARCHIVE;
+ if (CrcCalc(buf.data, nextHeaderSizeT) == nextHeaderCRC)
+ {
+ CSzData sd;
+ UInt64 type;
+ sd.Data = buf.data;
+ sd.Size = buf.size;
+
+ res = ReadID(&sd, &type);
+
+ if (res == SZ_OK && type == k7zIdEncodedHeader)
+ {
+ CSzAr tempAr;
+ CBuf tempBuf;
+ Buf_Init(&tempBuf);
+
+ SzAr_Init(&tempAr);
+ res = SzReadAndDecodePackedStreams(inStream, &sd, &tempBuf, 1, p->startPosAfterHeader, &tempAr, allocTemp);
+ SzAr_Free(&tempAr, allocTemp);
+
+ if (res != SZ_OK)
+ {
+ Buf_Free(&tempBuf, allocTemp);
+ }
+ else
+ {
+ Buf_Free(&buf, allocTemp);
+ buf.data = tempBuf.data;
+ buf.size = tempBuf.size;
+ sd.Data = buf.data;
+ sd.Size = buf.size;
+ res = ReadID(&sd, &type);
+ }
+ }
+
+ if (res == SZ_OK)
+ {
+ if (type == k7zIdHeader)
+ {
+ /*
+ CSzData sd2;
+ unsigned ttt;
+ for (ttt = 0; ttt < 40000; ttt++)
+ {
+ SzArEx_Free(p, allocMain);
+ sd2 = sd;
+ res = SzReadHeader(p, &sd2, inStream, allocMain, allocTemp);
+ if (res != SZ_OK)
+ break;
+ }
+ */
+ res = SzReadHeader(p, &sd, inStream, allocMain, allocTemp);
+ }
+ else
+ res = SZ_ERROR_UNSUPPORTED;
+ }
+ }
+ }
+
+ Buf_Free(&buf, allocTemp);
+ return res;
+}
+
+
+SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream,
+ ISzAlloc *allocMain, ISzAlloc *allocTemp)
+{
+ SRes res = SzArEx_Open2(p, inStream, allocMain, allocTemp);
+ if (res != SZ_OK)
+ SzArEx_Free(p, allocMain);
+ return res;
+}
+
+
+SRes SzArEx_Extract(
+ const CSzArEx *p,
+ ILookInStream *inStream,
+ UInt32 fileIndex,
+ UInt32 *blockIndex,
+ Byte **tempBuf,
+ size_t *outBufferSize,
+ size_t *offset,
+ size_t *outSizeProcessed,
+ ISzAlloc *allocMain,
+ ISzAlloc *allocTemp)
+{
+ UInt32 folderIndex = p->FileToFolder[fileIndex];
+ SRes res = SZ_OK;
+
+ *offset = 0;
+ *outSizeProcessed = 0;
+
+ if (folderIndex == (UInt32)-1)
+ {
+ IAlloc_Free(allocMain, *tempBuf);
+ *blockIndex = folderIndex;
+ *tempBuf = NULL;
+ *outBufferSize = 0;
+ return SZ_OK;
+ }
+
+ if (*tempBuf == NULL || *blockIndex != folderIndex)
+ {
+ UInt64 unpackSizeSpec = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
+ /*
+ UInt64 unpackSizeSpec =
+ p->UnpackPositions[p->FolderToFile[folderIndex + 1]] -
+ p->UnpackPositions[p->FolderToFile[folderIndex]];
+ */
+ size_t unpackSize = (size_t)unpackSizeSpec;
+
+ if (unpackSize != unpackSizeSpec)
+ return SZ_ERROR_MEM;
+ *blockIndex = folderIndex;
+ IAlloc_Free(allocMain, *tempBuf);
+ *tempBuf = NULL;
+
+ if (res == SZ_OK)
+ {
+ *outBufferSize = unpackSize;
+ if (unpackSize != 0)
+ {
+ *tempBuf = (Byte *)IAlloc_Alloc(allocMain, unpackSize);
+ if (*tempBuf == NULL)
+ res = SZ_ERROR_MEM;
+ }
+
+ if (res == SZ_OK)
+ {
+ res = SzAr_DecodeFolder(&p->db, folderIndex,
+ inStream, p->dataPos, *tempBuf, unpackSize, allocTemp);
+ }
+ }
+ }
+
+ if (res == SZ_OK)
+ {
+ UInt64 unpackPos = p->UnpackPositions[fileIndex];
+ *offset = (size_t)(unpackPos - p->UnpackPositions[p->FolderToFile[folderIndex]]);
+ *outSizeProcessed = (size_t)(p->UnpackPositions[fileIndex + 1] - unpackPos);
+ if (*offset + *outSizeProcessed > *outBufferSize)
+ return SZ_ERROR_FAIL;
+ if (SzBitWithVals_Check(&p->CRCs, fileIndex))
+ if (CrcCalc(*tempBuf + *offset, *outSizeProcessed) != p->CRCs.Vals[fileIndex])
+ res = SZ_ERROR_CRC;
+ }
+
+ return res;
+}
+
+
+size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest)
+{
+ size_t offs = p->FileNameOffsets[fileIndex];
+ size_t len = p->FileNameOffsets[fileIndex + 1] - offs;
+ if (dest != 0)
+ {
+ size_t i;
+ const Byte *src = p->FileNames + offs * 2;
+ for (i = 0; i < len; i++)
+ dest[i] = GetUi16(src + i * 2);
+ }
+ return len;
+}
+
+/*
+size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex)
+{
+ size_t len;
+ if (!p->FileNameOffsets)
+ return 1;
+ len = 0;
+ for (;;)
+ {
+ UInt32 parent = (UInt32)(Int32)-1;
+ len += p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex];
+ if SzBitWithVals_Check(&p->Parents, fileIndex)
+ parent = p->Parents.Vals[fileIndex];
+ if (parent == (UInt32)(Int32)-1)
+ return len;
+ fileIndex = parent;
+ }
+}
+
+UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest)
+{
+ Bool needSlash;
+ if (!p->FileNameOffsets)
+ {
+ *(--dest) = 0;
+ return dest;
+ }
+ needSlash = False;
+ for (;;)
+ {
+ UInt32 parent = (UInt32)(Int32)-1;
+ size_t curLen = p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex];
+ SzArEx_GetFileNameUtf16(p, fileIndex, dest - curLen);
+ if (needSlash)
+ *(dest - 1) = '/';
+ needSlash = True;
+ dest -= curLen;
+
+ if SzBitWithVals_Check(&p->Parents, fileIndex)
+ parent = p->Parents.Vals[fileIndex];
+ if (parent == (UInt32)(Int32)-1)
+ return dest;
+ fileIndex = parent;
+ }
+}
+*/
diff --git a/3rdparty/lzma/C/7zBuf.c b/3rdparty/lzma/C/7zBuf.c
index 14e7f4e2b92..089a5c4f21f 100644
--- a/3rdparty/lzma/C/7zBuf.c
+++ b/3rdparty/lzma/C/7zBuf.c
@@ -1,7 +1,7 @@
/* 7zBuf.c -- Byte Buffer
-2008-03-28
-Igor Pavlov
-Public domain */
+2013-01-21 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "7zBuf.h"
diff --git a/3rdparty/lzma/C/7zBuf.h b/3rdparty/lzma/C/7zBuf.h
index e9f2f316d0d..65f1d7a716e 100644
--- a/3rdparty/lzma/C/7zBuf.h
+++ b/3rdparty/lzma/C/7zBuf.h
@@ -1,14 +1,12 @@
/* 7zBuf.h -- Byte Buffer
-2009-02-07 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __7Z_BUF_H
#define __7Z_BUF_H
-#include "Types.h"
+#include "7zTypes.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
typedef struct
{
@@ -32,8 +30,6 @@ void DynBuf_SeekToBeg(CDynBuf *p);
int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc);
void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc);
-#ifdef __cplusplus
-}
-#endif
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/7zBuf2.c b/3rdparty/lzma/C/7zBuf2.c
index 8d17e0dcf80..430f76bf830 100644
--- a/3rdparty/lzma/C/7zBuf2.c
+++ b/3rdparty/lzma/C/7zBuf2.c
@@ -1,7 +1,10 @@
/* 7zBuf2.c -- Byte Buffer
-2008-10-04 : Igor Pavlov : Public domain */
+2014-08-22 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include <string.h>
+
#include "7zBuf.h"
void DynBuf_Construct(CDynBuf *p)
@@ -31,8 +34,11 @@ int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc)
alloc->Free(alloc, p->data);
p->data = data;
}
- memcpy(p->data + p->pos, buf, size);
- p->pos += size;
+ if (size != 0)
+ {
+ memcpy(p->data + p->pos, buf, size);
+ p->pos += size;
+ }
return 1;
}
diff --git a/3rdparty/lzma/C/7zCrc.c b/3rdparty/lzma/C/7zCrc.c
index a73b1379bad..dc6d6abdc0a 100644
--- a/3rdparty/lzma/C/7zCrc.c
+++ b/3rdparty/lzma/C/7zCrc.c
@@ -1,26 +1,35 @@
/* 7zCrc.c -- CRC32 init
-2010-12-01 : Igor Pavlov : Public domain */
+2015-03-10 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "7zCrc.h"
#include "CpuArch.h"
#define kCrcPoly 0xEDB88320
-#if defined(MY_CPU_LE)
- #define CRC_NUM_TABLES 4
+#ifdef MY_CPU_LE
+ #define CRC_NUM_TABLES 8
#else
- #define CRC_NUM_TABLES 5
+ #define CRC_NUM_TABLES 9
+
#define CRC_UINT32_SWAP(v) ((v >> 24) | ((v >> 8) & 0xFF00) | ((v << 8) & 0xFF0000) | (v << 24))
+
UInt32 MY_FAST_CALL CrcUpdateT1_BeT4(UInt32 v, const void *data, size_t size, const UInt32 *table);
+ UInt32 MY_FAST_CALL CrcUpdateT1_BeT8(UInt32 v, const void *data, size_t size, const UInt32 *table);
#endif
#ifndef MY_CPU_BE
UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table);
+ UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table);
#endif
typedef UInt32 (MY_FAST_CALL *CRC_FUNC)(UInt32 v, const void *data, size_t size, const UInt32 *table);
-static CRC_FUNC g_CrcUpdate;
+CRC_FUNC g_CrcUpdateT4;
+CRC_FUNC g_CrcUpdateT8;
+CRC_FUNC g_CrcUpdate;
+
UInt32 g_CrcTable[256 * CRC_NUM_TABLES];
UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size)
@@ -33,6 +42,17 @@ UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size)
return g_CrcUpdate(CRC_INIT_VAL, data, size, g_CrcTable) ^ CRC_INIT_VAL;
}
+#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
+
+UInt32 MY_FAST_CALL CrcUpdateT1(UInt32 v, const void *data, size_t size, const UInt32 *table)
+{
+ const Byte *p = (const Byte *)data;
+ const Byte *pEnd = p + size;
+ for (; p != pEnd; p++)
+ v = CRC_UPDATE_BYTE_2(v, *p);
+ return v;
+}
+
void MY_FAST_CALL CrcGenerateTable()
{
UInt32 i;
@@ -49,22 +69,43 @@ void MY_FAST_CALL CrcGenerateTable()
UInt32 r = g_CrcTable[i - 256];
g_CrcTable[i] = g_CrcTable[r & 0xFF] ^ (r >> 8);
}
+
+ #if CRC_NUM_TABLES < 4
+ g_CrcUpdate = CrcUpdateT1;
+
+ #else
+
#ifdef MY_CPU_LE
- g_CrcUpdate = CrcUpdateT4;
+ g_CrcUpdateT4 = CrcUpdateT4;
+ g_CrcUpdate = CrcUpdateT4;
+
+ #if CRC_NUM_TABLES >= 8
+ g_CrcUpdateT8 = CrcUpdateT8;
- #if CRC_NUM_TABLES == 8
- if (!CPU_Is_InOrder())
- g_CrcUpdate = CrcUpdateT8;
- #endif
+ #ifdef MY_CPU_X86_OR_AMD64
+ if (!CPU_Is_InOrder())
+ g_CrcUpdate = CrcUpdateT8;
+ #endif
+ #endif
#else
{
#ifndef MY_CPU_BE
- UInt32 k = 1;
- if (*(const Byte *)&k == 1)
+ UInt32 k = 0x01020304;
+ const Byte *p = (const Byte *)&k;
+ if (p[0] == 4 && p[1] == 3)
+ {
+ g_CrcUpdateT4 = CrcUpdateT4;
g_CrcUpdate = CrcUpdateT4;
+ #if CRC_NUM_TABLES >= 8
+ g_CrcUpdateT8 = CrcUpdateT8;
+ // g_CrcUpdate = CrcUpdateT8;
+ #endif
+ }
+ else if (p[0] != 1 || p[1] != 2)
+ g_CrcUpdate = CrcUpdateT1;
else
#endif
{
@@ -73,8 +114,15 @@ void MY_FAST_CALL CrcGenerateTable()
UInt32 x = g_CrcTable[i - 256];
g_CrcTable[i] = CRC_UINT32_SWAP(x);
}
+ g_CrcUpdateT4 = CrcUpdateT1_BeT4;
g_CrcUpdate = CrcUpdateT1_BeT4;
+ #if CRC_NUM_TABLES >= 8
+ g_CrcUpdateT8 = CrcUpdateT1_BeT8;
+ // g_CrcUpdate = CrcUpdateT1_BeT8;
+ #endif
}
}
#endif
+
+ #endif
}
diff --git a/3rdparty/lzma/C/7zCrc.h b/3rdparty/lzma/C/7zCrc.h
index 38e3e5fbc06..8fd57958715 100644
--- a/3rdparty/lzma/C/7zCrc.h
+++ b/3rdparty/lzma/C/7zCrc.h
@@ -1,10 +1,10 @@
/* 7zCrc.h -- CRC32 calculation
-2009-11-21 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __7Z_CRC_H
#define __7Z_CRC_H
-#include "Types.h"
+#include "7zTypes.h"
EXTERN_C_BEGIN
diff --git a/3rdparty/lzma/C/7zCrcOpt.c b/3rdparty/lzma/C/7zCrcOpt.c
index a8d42a80074..d1e1cd7bae1 100644
--- a/3rdparty/lzma/C/7zCrcOpt.c
+++ b/3rdparty/lzma/C/7zCrcOpt.c
@@ -1,12 +1,14 @@
/* 7zCrcOpt.c -- CRC32 calculation
-2010-12-01 : Igor Pavlov : Public domain */
+2015-03-01 : Igor Pavlov : Public domain */
-#include "CpuArch.h"
+#include "Precomp.h"
-#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
+#include "CpuArch.h"
#ifndef MY_CPU_BE
+#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
+
UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table)
{
const Byte *p = (const Byte *)data;
@@ -16,10 +18,10 @@ UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const U
{
v ^= *(const UInt32 *)p;
v =
- table[0x300 + (v & 0xFF)] ^
- table[0x200 + ((v >> 8) & 0xFF)] ^
- table[0x100 + ((v >> 16) & 0xFF)] ^
- table[0x000 + ((v >> 24))];
+ table[0x300 + ((v ) & 0xFF)]
+ ^ table[0x200 + ((v >> 8) & 0xFF)]
+ ^ table[0x100 + ((v >> 16) & 0xFF)]
+ ^ table[0x000 + ((v >> 24))];
}
for (; size > 0; size--, p++)
v = CRC_UPDATE_BYTE_2(v, *p);
@@ -28,7 +30,28 @@ UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const U
UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table)
{
- return CrcUpdateT4(v, data, size, table);
+ const Byte *p = (const Byte *)data;
+ for (; size > 0 && ((unsigned)(ptrdiff_t)p & 7) != 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2(v, *p);
+ for (; size >= 8; size -= 8, p += 8)
+ {
+ UInt32 d;
+ v ^= *(const UInt32 *)p;
+ v =
+ table[0x700 + ((v ) & 0xFF)]
+ ^ table[0x600 + ((v >> 8) & 0xFF)]
+ ^ table[0x500 + ((v >> 16) & 0xFF)]
+ ^ table[0x400 + ((v >> 24))];
+ d = *((const UInt32 *)p + 1);
+ v ^=
+ table[0x300 + ((d ) & 0xFF)]
+ ^ table[0x200 + ((d >> 8) & 0xFF)]
+ ^ table[0x100 + ((d >> 16) & 0xFF)]
+ ^ table[0x000 + ((d >> 24))];
+ }
+ for (; size > 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2(v, *p);
+ return v;
}
#endif
@@ -38,27 +61,55 @@ UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const U
#define CRC_UINT32_SWAP(v) ((v >> 24) | ((v >> 8) & 0xFF00) | ((v << 8) & 0xFF0000) | (v << 24))
+#define CRC_UPDATE_BYTE_2_BE(crc, b) (table[(((crc) >> 24) ^ (b))] ^ ((crc) << 8))
+
UInt32 MY_FAST_CALL CrcUpdateT1_BeT4(UInt32 v, const void *data, size_t size, const UInt32 *table)
{
const Byte *p = (const Byte *)data;
- for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++)
- v = CRC_UPDATE_BYTE_2(v, *p);
- v = CRC_UINT32_SWAP(v);
table += 0x100;
+ v = CRC_UINT32_SWAP(v);
+ for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2_BE(v, *p);
for (; size >= 4; size -= 4, p += 4)
{
v ^= *(const UInt32 *)p;
v =
- table[0x000 + (v & 0xFF)] ^
- table[0x100 + ((v >> 8) & 0xFF)] ^
- table[0x200 + ((v >> 16) & 0xFF)] ^
- table[0x300 + ((v >> 24))];
+ table[0x000 + ((v ) & 0xFF)]
+ ^ table[0x100 + ((v >> 8) & 0xFF)]
+ ^ table[0x200 + ((v >> 16) & 0xFF)]
+ ^ table[0x300 + ((v >> 24))];
}
- table -= 0x100;
+ for (; size > 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2_BE(v, *p);
+ return CRC_UINT32_SWAP(v);
+}
+
+UInt32 MY_FAST_CALL CrcUpdateT1_BeT8(UInt32 v, const void *data, size_t size, const UInt32 *table)
+{
+ const Byte *p = (const Byte *)data;
+ table += 0x100;
v = CRC_UINT32_SWAP(v);
+ for (; size > 0 && ((unsigned)(ptrdiff_t)p & 7) != 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2_BE(v, *p);
+ for (; size >= 8; size -= 8, p += 8)
+ {
+ UInt32 d;
+ v ^= *(const UInt32 *)p;
+ v =
+ table[0x400 + ((v ) & 0xFF)]
+ ^ table[0x500 + ((v >> 8) & 0xFF)]
+ ^ table[0x600 + ((v >> 16) & 0xFF)]
+ ^ table[0x700 + ((v >> 24))];
+ d = *((const UInt32 *)p + 1);
+ v ^=
+ table[0x000 + ((d ) & 0xFF)]
+ ^ table[0x100 + ((d >> 8) & 0xFF)]
+ ^ table[0x200 + ((d >> 16) & 0xFF)]
+ ^ table[0x300 + ((d >> 24))];
+ }
for (; size > 0; size--, p++)
- v = CRC_UPDATE_BYTE_2(v, *p);
- return v;
+ v = CRC_UPDATE_BYTE_2_BE(v, *p);
+ return CRC_UINT32_SWAP(v);
}
#endif
diff --git a/3rdparty/lzma/C/7zDec.c b/3rdparty/lzma/C/7zDec.c
index b6d809956cd..c45d6bf8d4b 100644
--- a/3rdparty/lzma/C/7zDec.c
+++ b/3rdparty/lzma/C/7zDec.c
@@ -1,15 +1,19 @@
/* 7zDec.c -- Decoding from 7z folder
-2010-11-02 : Igor Pavlov : Public domain */
+2015-11-18 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include <string.h>
/* #define _7ZIP_PPMD_SUPPPORT */
#include "7z.h"
+#include "7zCrc.h"
#include "Bcj2.h"
#include "Bra.h"
#include "CpuArch.h"
+#include "Delta.h"
#include "LzmaDec.h"
#include "Lzma2Dec.h"
#ifdef _7ZIP_PPMD_SUPPPORT
@@ -17,14 +21,17 @@
#endif
#define k_Copy 0
+#define k_Delta 3
#define k_LZMA2 0x21
#define k_LZMA 0x30101
-#define k_BCJ 0x03030103
-#define k_PPC 0x03030205
-#define k_ARM 0x03030501
-#define k_ARMT 0x03030701
-#define k_SPARC 0x03030805
-#define k_BCJ2 0x0303011B
+#define k_BCJ 0x3030103
+#define k_BCJ2 0x303011B
+#define k_PPC 0x3030205
+#define k_IA64 0x3030401
+#define k_ARM 0x3030501
+#define k_ARMT 0x3030701
+#define k_SPARC 0x3030805
+
#ifdef _7ZIP_PPMD_SUPPPORT
@@ -63,7 +70,7 @@ static Byte ReadByte(void *pp)
return 0;
}
-static SRes SzDecodePpmd(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inStream,
+static SRes SzDecodePpmd(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream,
Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain)
{
CPpmd7 ppmd;
@@ -77,12 +84,12 @@ static SRes SzDecodePpmd(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inSt
s.res = SZ_OK;
s.processed = 0;
- if (coder->Props.size != 5)
+ if (propsSize != 5)
return SZ_ERROR_UNSUPPORTED;
{
- unsigned order = coder->Props.data[0];
- UInt32 memSize = GetUi32(coder->Props.data + 1);
+ unsigned order = props[0];
+ UInt32 memSize = GetUi32(props + 1);
if (order < PPMD7_MIN_ORDER ||
order > PPMD7_MAX_ORDER ||
memSize < PPMD7_MIN_MEM_SIZE ||
@@ -124,25 +131,25 @@ static SRes SzDecodePpmd(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inSt
#endif
-static SRes SzDecodeLzma(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inStream,
+static SRes SzDecodeLzma(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream,
Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain)
{
CLzmaDec state;
SRes res = SZ_OK;
LzmaDec_Construct(&state);
- RINOK(LzmaDec_AllocateProbs(&state, coder->Props.data, (unsigned)coder->Props.size, allocMain));
+ RINOK(LzmaDec_AllocateProbs(&state, props, propsSize, allocMain));
state.dic = outBuffer;
state.dicBufSize = outSize;
LzmaDec_Init(&state);
for (;;)
{
- Byte *inBuf = NULL;
+ const void *inBuf = NULL;
size_t lookahead = (1 << 18);
if (lookahead > inSize)
lookahead = (size_t)inSize;
- res = inStream->Look((void *)inStream, (const void **)&inBuf, &lookahead);
+ res = inStream->Look(inStream, &inBuf, &lookahead);
if (res != SZ_OK)
break;
@@ -154,14 +161,23 @@ static SRes SzDecodeLzma(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inSt
inSize -= inProcessed;
if (res != SZ_OK)
break;
- if (state.dicPos == state.dicBufSize || (inProcessed == 0 && dicPos == state.dicPos))
+
+ if (status == LZMA_STATUS_FINISHED_WITH_MARK)
{
- if (state.dicBufSize != outSize || lookahead != 0 ||
- (status != LZMA_STATUS_FINISHED_WITH_MARK &&
- status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK))
+ if (outSize != state.dicPos || inSize != 0)
res = SZ_ERROR_DATA;
break;
}
+
+ if (outSize == state.dicPos && inSize == 0 && status == LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK)
+ break;
+
+ if (inProcessed == 0 && dicPos == state.dicPos)
+ {
+ res = SZ_ERROR_DATA;
+ break;
+ }
+
res = inStream->Skip((void *)inStream, inProcessed);
if (res != SZ_OK)
break;
@@ -172,27 +188,30 @@ static SRes SzDecodeLzma(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inSt
return res;
}
-static SRes SzDecodeLzma2(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inStream,
+
+#ifndef _7Z_NO_METHOD_LZMA2
+
+static SRes SzDecodeLzma2(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream,
Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain)
{
CLzma2Dec state;
SRes res = SZ_OK;
Lzma2Dec_Construct(&state);
- if (coder->Props.size != 1)
+ if (propsSize != 1)
return SZ_ERROR_DATA;
- RINOK(Lzma2Dec_AllocateProbs(&state, coder->Props.data[0], allocMain));
+ RINOK(Lzma2Dec_AllocateProbs(&state, props[0], allocMain));
state.decoder.dic = outBuffer;
state.decoder.dicBufSize = outSize;
Lzma2Dec_Init(&state);
for (;;)
{
- Byte *inBuf = NULL;
+ const void *inBuf = NULL;
size_t lookahead = (1 << 18);
if (lookahead > inSize)
lookahead = (size_t)inSize;
- res = inStream->Look((void *)inStream, (const void **)&inBuf, &lookahead);
+ res = inStream->Look(inStream, &inBuf, &lookahead);
if (res != SZ_OK)
break;
@@ -204,13 +223,20 @@ static SRes SzDecodeLzma2(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inS
inSize -= inProcessed;
if (res != SZ_OK)
break;
- if (state.decoder.dicPos == state.decoder.dicBufSize || (inProcessed == 0 && dicPos == state.decoder.dicPos))
+
+ if (status == LZMA_STATUS_FINISHED_WITH_MARK)
{
- if (state.decoder.dicBufSize != outSize || lookahead != 0 ||
- (status != LZMA_STATUS_FINISHED_WITH_MARK))
+ if (outSize != state.decoder.dicPos || inSize != 0)
res = SZ_ERROR_DATA;
break;
}
+
+ if (inProcessed == 0 && dicPos == state.decoder.dicPos)
+ {
+ res = SZ_ERROR_DATA;
+ break;
+ }
+
res = inStream->Skip((void *)inStream, inProcessed);
if (res != SZ_OK)
break;
@@ -221,15 +247,18 @@ static SRes SzDecodeLzma2(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inS
return res;
}
+#endif
+
+
static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer)
{
while (inSize > 0)
{
- void *inBuf;
+ const void *inBuf;
size_t curSize = (1 << 18);
if (curSize > inSize)
curSize = (size_t)inSize;
- RINOK(inStream->Look((void *)inStream, (const void **)&inBuf, &curSize));
+ RINOK(inStream->Look(inStream, &inBuf, &curSize));
if (curSize == 0)
return SZ_ERROR_INPUT_EOF;
memcpy(outBuffer, inBuf, curSize);
@@ -242,11 +271,13 @@ static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer
static Bool IS_MAIN_METHOD(UInt32 m)
{
- switch(m)
+ switch (m)
{
case k_Copy:
case k_LZMA:
+ #ifndef _7Z_NO_METHOD_LZMA2
case k_LZMA2:
+ #endif
#ifdef _7ZIP_PPMD_SUPPPORT
case k_PPMD:
#endif
@@ -258,13 +289,12 @@ static Bool IS_MAIN_METHOD(UInt32 m)
static Bool IS_SUPPORTED_CODER(const CSzCoderInfo *c)
{
return
- c->NumInStreams == 1 &&
- c->NumOutStreams == 1 &&
- c->MethodID <= (UInt32)0xFFFFFFFF &&
- IS_MAIN_METHOD((UInt32)c->MethodID);
+ c->NumStreams == 1
+ /* && c->MethodID <= (UInt32)0xFFFFFFFF */
+ && IS_MAIN_METHOD((UInt32)c->MethodID);
}
-#define IS_BCJ2(c) ((c)->MethodID == k_BCJ2 && (c)->NumInStreams == 4 && (c)->NumOutStreams == 1)
+#define IS_BCJ2(c) ((c)->MethodID == k_BCJ2 && (c)->NumStreams == 4)
static SRes CheckSupportedFolder(const CSzFolder *f)
{
@@ -274,65 +304,73 @@ static SRes CheckSupportedFolder(const CSzFolder *f)
return SZ_ERROR_UNSUPPORTED;
if (f->NumCoders == 1)
{
- if (f->NumPackStreams != 1 || f->PackStreams[0] != 0 || f->NumBindPairs != 0)
+ if (f->NumPackStreams != 1 || f->PackStreams[0] != 0 || f->NumBonds != 0)
return SZ_ERROR_UNSUPPORTED;
return SZ_OK;
}
+
+
+ #ifndef _7Z_NO_METHODS_FILTERS
+
if (f->NumCoders == 2)
{
- CSzCoderInfo *c = &f->Coders[1];
- if (c->MethodID > (UInt32)0xFFFFFFFF ||
- c->NumInStreams != 1 ||
- c->NumOutStreams != 1 ||
- f->NumPackStreams != 1 ||
- f->PackStreams[0] != 0 ||
- f->NumBindPairs != 1 ||
- f->BindPairs[0].InIndex != 1 ||
- f->BindPairs[0].OutIndex != 0)
+ const CSzCoderInfo *c = &f->Coders[1];
+ if (
+ /* c->MethodID > (UInt32)0xFFFFFFFF || */
+ c->NumStreams != 1
+ || f->NumPackStreams != 1
+ || f->PackStreams[0] != 0
+ || f->NumBonds != 1
+ || f->Bonds[0].InIndex != 1
+ || f->Bonds[0].OutIndex != 0)
return SZ_ERROR_UNSUPPORTED;
switch ((UInt32)c->MethodID)
{
+ case k_Delta:
case k_BCJ:
+ case k_PPC:
+ case k_IA64:
+ case k_SPARC:
case k_ARM:
+ case k_ARMT:
break;
default:
return SZ_ERROR_UNSUPPORTED;
}
return SZ_OK;
}
+
+ #endif
+
+
if (f->NumCoders == 4)
{
- if (!IS_SUPPORTED_CODER(&f->Coders[1]) ||
- !IS_SUPPORTED_CODER(&f->Coders[2]) ||
- !IS_BCJ2(&f->Coders[3]))
+ if (!IS_SUPPORTED_CODER(&f->Coders[1])
+ || !IS_SUPPORTED_CODER(&f->Coders[2])
+ || !IS_BCJ2(&f->Coders[3]))
return SZ_ERROR_UNSUPPORTED;
- if (f->NumPackStreams != 4 ||
- f->PackStreams[0] != 2 ||
- f->PackStreams[1] != 6 ||
- f->PackStreams[2] != 1 ||
- f->PackStreams[3] != 0 ||
- f->NumBindPairs != 3 ||
- f->BindPairs[0].InIndex != 5 || f->BindPairs[0].OutIndex != 0 ||
- f->BindPairs[1].InIndex != 4 || f->BindPairs[1].OutIndex != 1 ||
- f->BindPairs[2].InIndex != 3 || f->BindPairs[2].OutIndex != 2)
+ if (f->NumPackStreams != 4
+ || f->PackStreams[0] != 2
+ || f->PackStreams[1] != 6
+ || f->PackStreams[2] != 1
+ || f->PackStreams[3] != 0
+ || f->NumBonds != 3
+ || f->Bonds[0].InIndex != 5 || f->Bonds[0].OutIndex != 0
+ || f->Bonds[1].InIndex != 4 || f->Bonds[1].OutIndex != 1
+ || f->Bonds[2].InIndex != 3 || f->Bonds[2].OutIndex != 2)
return SZ_ERROR_UNSUPPORTED;
return SZ_OK;
}
+
return SZ_ERROR_UNSUPPORTED;
}
-static UInt64 GetSum(const UInt64 *values, UInt32 index)
-{
- UInt64 sum = 0;
- UInt32 i;
- for (i = 0; i < index; i++)
- sum += values[i];
- return sum;
-}
-
#define CASE_BRA_CONV(isa) case k_ ## isa: isa ## _Convert(outBuffer, outSize, 0, 0); break;
-static SRes SzFolder_Decode2(const CSzFolder *folder, const UInt64 *packSizes,
+static SRes SzFolder_Decode2(const CSzFolder *folder,
+ const Byte *propsData,
+ const UInt64 *unpackSizes,
+ const UInt64 *packPositions,
ILookInStream *inStream, UInt64 startPos,
Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain,
Byte *tempBuf[])
@@ -346,7 +384,7 @@ static SRes SzFolder_Decode2(const CSzFolder *folder, const UInt64 *packSizes,
for (ci = 0; ci < folder->NumCoders; ci++)
{
- CSzCoderInfo *coder = &folder->Coders[ci];
+ const CSzCoderInfo *coder = &folder->Coders[ci];
if (IS_MAIN_METHOD((UInt32)coder->MethodID))
{
@@ -358,7 +396,7 @@ static SRes SzFolder_Decode2(const CSzFolder *folder, const UInt64 *packSizes,
if (folder->NumCoders == 4)
{
UInt32 indices[] = { 3, 2, 0 };
- UInt64 unpackSize = folder->UnpackSizes[ci];
+ UInt64 unpackSize = unpackSizes[ci];
si = indices[ci];
if (ci < 2)
{
@@ -367,7 +405,7 @@ static SRes SzFolder_Decode2(const CSzFolder *folder, const UInt64 *packSizes,
if (outSizeCur != unpackSize)
return SZ_ERROR_MEM;
temp = (Byte *)IAlloc_Alloc(allocMain, outSizeCur);
- if (temp == 0 && outSizeCur != 0)
+ if (!temp && outSizeCur != 0)
return SZ_ERROR_MEM;
outBufCur = tempBuf[1 - ci] = temp;
tempSizes[1 - ci] = outSizeCur;
@@ -382,8 +420,8 @@ static SRes SzFolder_Decode2(const CSzFolder *folder, const UInt64 *packSizes,
else
return SZ_ERROR_UNSUPPORTED;
}
- offset = GetSum(packSizes, si);
- inSize = packSizes[si];
+ offset = packPositions[si];
+ inSize = packPositions[si + 1] - offset;
RINOK(LookInStream_SeekTo(inStream, startPos + offset));
if (coder->MethodID == k_Copy)
@@ -394,77 +432,160 @@ static SRes SzFolder_Decode2(const CSzFolder *folder, const UInt64 *packSizes,
}
else if (coder->MethodID == k_LZMA)
{
- RINOK(SzDecodeLzma(coder, inSize, inStream, outBufCur, outSizeCur, allocMain));
+ RINOK(SzDecodeLzma(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain));
}
+ #ifndef _7Z_NO_METHOD_LZMA2
else if (coder->MethodID == k_LZMA2)
{
- RINOK(SzDecodeLzma2(coder, inSize, inStream, outBufCur, outSizeCur, allocMain));
+ RINOK(SzDecodeLzma2(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain));
}
- else
+ #endif
+ #ifdef _7ZIP_PPMD_SUPPPORT
+ else if (coder->MethodID == k_PPMD)
{
- #ifdef _7ZIP_PPMD_SUPPPORT
- RINOK(SzDecodePpmd(coder, inSize, inStream, outBufCur, outSizeCur, allocMain));
- #else
- return SZ_ERROR_UNSUPPORTED;
- #endif
+ RINOK(SzDecodePpmd(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain));
}
+ #endif
+ else
+ return SZ_ERROR_UNSUPPORTED;
}
else if (coder->MethodID == k_BCJ2)
{
- UInt64 offset = GetSum(packSizes, 1);
- UInt64 s3Size = packSizes[1];
- SRes res;
+ UInt64 offset = packPositions[1];
+ UInt64 s3Size = packPositions[2] - offset;
+
if (ci != 3)
return SZ_ERROR_UNSUPPORTED;
- RINOK(LookInStream_SeekTo(inStream, startPos + offset));
+
tempSizes[2] = (SizeT)s3Size;
if (tempSizes[2] != s3Size)
return SZ_ERROR_MEM;
tempBuf[2] = (Byte *)IAlloc_Alloc(allocMain, tempSizes[2]);
- if (tempBuf[2] == 0 && tempSizes[2] != 0)
+ if (!tempBuf[2] && tempSizes[2] != 0)
return SZ_ERROR_MEM;
- res = SzDecodeCopy(s3Size, inStream, tempBuf[2]);
- RINOK(res)
-
- res = Bcj2_Decode(
- tempBuf3, tempSize3,
- tempBuf[0], tempSizes[0],
- tempBuf[1], tempSizes[1],
- tempBuf[2], tempSizes[2],
- outBuffer, outSize);
- RINOK(res)
+
+ RINOK(LookInStream_SeekTo(inStream, startPos + offset));
+ RINOK(SzDecodeCopy(s3Size, inStream, tempBuf[2]));
+
+ if ((tempSizes[0] & 3) != 0 ||
+ (tempSizes[1] & 3) != 0 ||
+ tempSize3 + tempSizes[0] + tempSizes[1] != outSize)
+ return SZ_ERROR_DATA;
+
+ {
+ CBcj2Dec p;
+
+ p.bufs[0] = tempBuf3; p.lims[0] = tempBuf3 + tempSize3;
+ p.bufs[1] = tempBuf[0]; p.lims[1] = tempBuf[0] + tempSizes[0];
+ p.bufs[2] = tempBuf[1]; p.lims[2] = tempBuf[1] + tempSizes[1];
+ p.bufs[3] = tempBuf[2]; p.lims[3] = tempBuf[2] + tempSizes[2];
+
+ p.dest = outBuffer;
+ p.destLim = outBuffer + outSize;
+
+ Bcj2Dec_Init(&p);
+ RINOK(Bcj2Dec_Decode(&p));
+
+ {
+ unsigned i;
+ for (i = 0; i < 4; i++)
+ if (p.bufs[i] != p.lims[i])
+ return SZ_ERROR_DATA;
+
+ if (!Bcj2Dec_IsFinished(&p))
+ return SZ_ERROR_DATA;
+
+ if (p.dest != p.destLim
+ || p.state != BCJ2_STREAM_MAIN)
+ return SZ_ERROR_DATA;
+ }
+ }
}
- else
+ #ifndef _7Z_NO_METHODS_FILTERS
+ else if (ci == 1)
{
- if (ci != 1)
- return SZ_ERROR_UNSUPPORTED;
- switch(coder->MethodID)
+ if (coder->MethodID == k_Delta)
{
- case k_BCJ:
+ if (coder->PropsSize != 1)
+ return SZ_ERROR_UNSUPPORTED;
{
- UInt32 state;
- x86_Convert_Init(state);
- x86_Convert(outBuffer, outSize, 0, &state, 0);
- break;
+ Byte state[DELTA_STATE_SIZE];
+ Delta_Init(state);
+ Delta_Decode(state, (unsigned)(propsData[coder->PropsOffset]) + 1, outBuffer, outSize);
}
- CASE_BRA_CONV(ARM)
- default:
+ }
+ else
+ {
+ if (coder->PropsSize != 0)
return SZ_ERROR_UNSUPPORTED;
+ switch (coder->MethodID)
+ {
+ case k_BCJ:
+ {
+ UInt32 state;
+ x86_Convert_Init(state);
+ x86_Convert(outBuffer, outSize, 0, &state, 0);
+ break;
+ }
+ CASE_BRA_CONV(PPC)
+ CASE_BRA_CONV(IA64)
+ CASE_BRA_CONV(SPARC)
+ CASE_BRA_CONV(ARM)
+ CASE_BRA_CONV(ARMT)
+ default:
+ return SZ_ERROR_UNSUPPORTED;
+ }
}
}
+ #endif
+ else
+ return SZ_ERROR_UNSUPPORTED;
}
+
return SZ_OK;
}
-SRes SzFolder_Decode(const CSzFolder *folder, const UInt64 *packSizes,
+
+SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex,
ILookInStream *inStream, UInt64 startPos,
- Byte *outBuffer, size_t outSize, ISzAlloc *allocMain)
+ Byte *outBuffer, size_t outSize,
+ ISzAlloc *allocMain)
{
- Byte *tempBuf[3] = { 0, 0, 0};
- int i;
- SRes res = SzFolder_Decode2(folder, packSizes, inStream, startPos,
- outBuffer, (SizeT)outSize, allocMain, tempBuf);
- for (i = 0; i < 3; i++)
- IAlloc_Free(allocMain, tempBuf[i]);
- return res;
+ SRes res;
+ CSzFolder folder;
+ CSzData sd;
+
+ const Byte *data = p->CodersData + p->FoCodersOffsets[folderIndex];
+ sd.Data = data;
+ sd.Size = p->FoCodersOffsets[folderIndex + 1] - p->FoCodersOffsets[folderIndex];
+
+ res = SzGetNextFolderItem(&folder, &sd);
+
+ if (res != SZ_OK)
+ return res;
+
+ if (sd.Size != 0
+ || folder.UnpackStream != p->FoToMainUnpackSizeIndex[folderIndex]
+ || outSize != SzAr_GetFolderUnpackSize(p, folderIndex))
+ return SZ_ERROR_FAIL;
+ {
+ unsigned i;
+ Byte *tempBuf[3] = { 0, 0, 0};
+
+ res = SzFolder_Decode2(&folder, data,
+ &p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex]],
+ p->PackPositions + p->FoStartPackStreamIndex[folderIndex],
+ inStream, startPos,
+ outBuffer, (SizeT)outSize, allocMain, tempBuf);
+
+ for (i = 0; i < 3; i++)
+ IAlloc_Free(allocMain, tempBuf[i]);
+
+ if (res == SZ_OK)
+ if (SzBitWithVals_Check(&p->FolderCRCs, folderIndex))
+ if (CrcCalc(outBuffer, outSize) != p->FolderCRCs.Vals[folderIndex])
+ res = SZ_ERROR_CRC;
+
+ return res;
+ }
}
diff --git a/3rdparty/lzma/C/7zFile.c b/3rdparty/lzma/C/7zFile.c
index a66c9e9d08e..041e5b15465 100644
--- a/3rdparty/lzma/C/7zFile.c
+++ b/3rdparty/lzma/C/7zFile.c
@@ -1,6 +1,8 @@
/* 7zFile.c -- File IO
2009-11-24 : Igor Pavlov : Public domain */
+#include "Precomp.h"
+
#include "7zFile.h"
#ifndef USE_WINDOWS_FILE
diff --git a/3rdparty/lzma/C/7zFile.h b/3rdparty/lzma/C/7zFile.h
index 84538c03fd2..658987ed51a 100644
--- a/3rdparty/lzma/C/7zFile.h
+++ b/3rdparty/lzma/C/7zFile.h
@@ -1,5 +1,5 @@
/* 7zFile.h -- File IO
-2009-11-24 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __7Z_FILE_H
#define __7Z_FILE_H
@@ -14,7 +14,7 @@
#include <stdio.h>
#endif
-#include "Types.h"
+#include "7zTypes.h"
EXTERN_C_BEGIN
diff --git a/3rdparty/lzma/C/7zIn.c b/3rdparty/lzma/C/7zIn.c
deleted file mode 100644
index ec93a43ffec..00000000000
--- a/3rdparty/lzma/C/7zIn.c
+++ /dev/null
@@ -1,1402 +0,0 @@
-/* 7zIn.c -- 7z Input functions
-2010-10-29 : Igor Pavlov : Public domain */
-
-#include <string.h>
-
-#include "7z.h"
-#include "7zCrc.h"
-#include "CpuArch.h"
-
-Byte k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C};
-
-#define RINOM(x) { if ((x) == 0) return SZ_ERROR_MEM; }
-
-#define NUM_FOLDER_CODERS_MAX 32
-#define NUM_CODER_STREAMS_MAX 32
-
-void SzCoderInfo_Init(CSzCoderInfo *p)
-{
- Buf_Init(&p->Props);
-}
-
-void SzCoderInfo_Free(CSzCoderInfo *p, ISzAlloc *alloc)
-{
- Buf_Free(&p->Props, alloc);
- SzCoderInfo_Init(p);
-}
-
-void SzFolder_Init(CSzFolder *p)
-{
- p->Coders = 0;
- p->BindPairs = 0;
- p->PackStreams = 0;
- p->UnpackSizes = 0;
- p->NumCoders = 0;
- p->NumBindPairs = 0;
- p->NumPackStreams = 0;
- p->UnpackCRCDefined = 0;
- p->UnpackCRC = 0;
- p->NumUnpackStreams = 0;
-}
-
-void SzFolder_Free(CSzFolder *p, ISzAlloc *alloc)
-{
- UInt32 i;
- if (p->Coders)
- for (i = 0; i < p->NumCoders; i++)
- SzCoderInfo_Free(&p->Coders[i], alloc);
- IAlloc_Free(alloc, p->Coders);
- IAlloc_Free(alloc, p->BindPairs);
- IAlloc_Free(alloc, p->PackStreams);
- IAlloc_Free(alloc, p->UnpackSizes);
- SzFolder_Init(p);
-}
-
-UInt32 SzFolder_GetNumOutStreams(CSzFolder *p)
-{
- UInt32 result = 0;
- UInt32 i;
- for (i = 0; i < p->NumCoders; i++)
- result += p->Coders[i].NumOutStreams;
- return result;
-}
-
-int SzFolder_FindBindPairForInStream(CSzFolder *p, UInt32 inStreamIndex)
-{
- UInt32 i;
- for (i = 0; i < p->NumBindPairs; i++)
- if (p->BindPairs[i].InIndex == inStreamIndex)
- return i;
- return -1;
-}
-
-
-int SzFolder_FindBindPairForOutStream(CSzFolder *p, UInt32 outStreamIndex)
-{
- UInt32 i;
- for (i = 0; i < p->NumBindPairs; i++)
- if (p->BindPairs[i].OutIndex == outStreamIndex)
- return i;
- return -1;
-}
-
-UInt64 SzFolder_GetUnpackSize(CSzFolder *p)
-{
- int i = (int)SzFolder_GetNumOutStreams(p);
- if (i == 0)
- return 0;
- for (i--; i >= 0; i--)
- if (SzFolder_FindBindPairForOutStream(p, i) < 0)
- return p->UnpackSizes[i];
- /* throw 1; */
- return 0;
-}
-
-void SzFile_Init(CSzFileItem *p)
-{
- p->HasStream = 1;
- p->IsDir = 0;
- p->IsAnti = 0;
- p->CrcDefined = 0;
- p->MTimeDefined = 0;
-}
-
-void SzAr_Init(CSzAr *p)
-{
- p->PackSizes = 0;
- p->PackCRCsDefined = 0;
- p->PackCRCs = 0;
- p->Folders = 0;
- p->Files = 0;
- p->NumPackStreams = 0;
- p->NumFolders = 0;
- p->NumFiles = 0;
-}
-
-void SzAr_Free(CSzAr *p, ISzAlloc *alloc)
-{
- UInt32 i;
- if (p->Folders)
- for (i = 0; i < p->NumFolders; i++)
- SzFolder_Free(&p->Folders[i], alloc);
-
- IAlloc_Free(alloc, p->PackSizes);
- IAlloc_Free(alloc, p->PackCRCsDefined);
- IAlloc_Free(alloc, p->PackCRCs);
- IAlloc_Free(alloc, p->Folders);
- IAlloc_Free(alloc, p->Files);
- SzAr_Init(p);
-}
-
-
-void SzArEx_Init(CSzArEx *p)
-{
- SzAr_Init(&p->db);
- p->FolderStartPackStreamIndex = 0;
- p->PackStreamStartPositions = 0;
- p->FolderStartFileIndex = 0;
- p->FileIndexToFolderIndexMap = 0;
- p->FileNameOffsets = 0;
- Buf_Init(&p->FileNames);
-}
-
-void SzArEx_Free(CSzArEx *p, ISzAlloc *alloc)
-{
- IAlloc_Free(alloc, p->FolderStartPackStreamIndex);
- IAlloc_Free(alloc, p->PackStreamStartPositions);
- IAlloc_Free(alloc, p->FolderStartFileIndex);
- IAlloc_Free(alloc, p->FileIndexToFolderIndexMap);
-
- IAlloc_Free(alloc, p->FileNameOffsets);
- Buf_Free(&p->FileNames, alloc);
-
- SzAr_Free(&p->db, alloc);
- SzArEx_Init(p);
-}
-
-/*
-UInt64 GetFolderPackStreamSize(int folderIndex, int streamIndex) const
-{
- return PackSizes[FolderStartPackStreamIndex[folderIndex] + streamIndex];
-}
-
-UInt64 GetFilePackSize(int fileIndex) const
-{
- int folderIndex = FileIndexToFolderIndexMap[fileIndex];
- if (folderIndex >= 0)
- {
- const CSzFolder &folderInfo = Folders[folderIndex];
- if (FolderStartFileIndex[folderIndex] == fileIndex)
- return GetFolderFullPackSize(folderIndex);
- }
- return 0;
-}
-*/
-
-#define MY_ALLOC(T, p, size, alloc) { if ((size) == 0) p = 0; else \
- if ((p = (T *)IAlloc_Alloc(alloc, (size) * sizeof(T))) == 0) return SZ_ERROR_MEM; }
-
-static SRes SzArEx_Fill(CSzArEx *p, ISzAlloc *alloc)
-{
- UInt32 startPos = 0;
- UInt64 startPosSize = 0;
- UInt32 i;
- UInt32 folderIndex = 0;
- UInt32 indexInFolder = 0;
- MY_ALLOC(UInt32, p->FolderStartPackStreamIndex, p->db.NumFolders, alloc);
- for (i = 0; i < p->db.NumFolders; i++)
- {
- p->FolderStartPackStreamIndex[i] = startPos;
- startPos += p->db.Folders[i].NumPackStreams;
- }
-
- MY_ALLOC(UInt64, p->PackStreamStartPositions, p->db.NumPackStreams, alloc);
-
- for (i = 0; i < p->db.NumPackStreams; i++)
- {
- p->PackStreamStartPositions[i] = startPosSize;
- startPosSize += p->db.PackSizes[i];
- }
-
- MY_ALLOC(UInt32, p->FolderStartFileIndex, p->db.NumFolders, alloc);
- MY_ALLOC(UInt32, p->FileIndexToFolderIndexMap, p->db.NumFiles, alloc);
-
- for (i = 0; i < p->db.NumFiles; i++)
- {
- CSzFileItem *file = p->db.Files + i;
- int emptyStream = !file->HasStream;
- if (emptyStream && indexInFolder == 0)
- {
- p->FileIndexToFolderIndexMap[i] = (UInt32)-1;
- continue;
- }
- if (indexInFolder == 0)
- {
- /*
- v3.13 incorrectly worked with empty folders
- v4.07: Loop for skipping empty folders
- */
- for (;;)
- {
- if (folderIndex >= p->db.NumFolders)
- return SZ_ERROR_ARCHIVE;
- p->FolderStartFileIndex[folderIndex] = i;
- if (p->db.Folders[folderIndex].NumUnpackStreams != 0)
- break;
- folderIndex++;
- }
- }
- p->FileIndexToFolderIndexMap[i] = folderIndex;
- if (emptyStream)
- continue;
- indexInFolder++;
- if (indexInFolder >= p->db.Folders[folderIndex].NumUnpackStreams)
- {
- folderIndex++;
- indexInFolder = 0;
- }
- }
- return SZ_OK;
-}
-
-
-UInt64 SzArEx_GetFolderStreamPos(const CSzArEx *p, UInt32 folderIndex, UInt32 indexInFolder)
-{
- return p->dataPos +
- p->PackStreamStartPositions[p->FolderStartPackStreamIndex[folderIndex] + indexInFolder];
-}
-
-int SzArEx_GetFolderFullPackSize(const CSzArEx *p, UInt32 folderIndex, UInt64 *resSize)
-{
- UInt32 packStreamIndex = p->FolderStartPackStreamIndex[folderIndex];
- CSzFolder *folder = p->db.Folders + folderIndex;
- UInt64 size = 0;
- UInt32 i;
- for (i = 0; i < folder->NumPackStreams; i++)
- {
- UInt64 t = size + p->db.PackSizes[packStreamIndex + i];
- if (t < size) /* check it */
- return SZ_ERROR_FAIL;
- size = t;
- }
- *resSize = size;
- return SZ_OK;
-}
-
-
-/*
-SRes SzReadTime(const CObjectVector<CBuf> &dataVector,
- CObjectVector<CSzFileItem> &files, UInt64 type)
-{
- CBoolVector boolVector;
- RINOK(ReadBoolVector2(files.Size(), boolVector))
-
- CStreamSwitch streamSwitch;
- RINOK(streamSwitch.Set(this, &dataVector));
-
- for (int i = 0; i < files.Size(); i++)
- {
- CSzFileItem &file = files[i];
- CArchiveFileTime fileTime;
- bool defined = boolVector[i];
- if (defined)
- {
- UInt32 low, high;
- RINOK(SzReadUInt32(low));
- RINOK(SzReadUInt32(high));
- fileTime.dwLowDateTime = low;
- fileTime.dwHighDateTime = high;
- }
- switch(type)
- {
- case k7zIdCTime: file.IsCTimeDefined = defined; if (defined) file.CTime = fileTime; break;
- case k7zIdATime: file.IsATimeDefined = defined; if (defined) file.ATime = fileTime; break;
- case k7zIdMTime: file.IsMTimeDefined = defined; if (defined) file.MTime = fileTime; break;
- }
- }
- return SZ_OK;
-}
-*/
-
-static int TestSignatureCandidate(Byte *testBytes)
-{
- size_t i;
- for (i = 0; i < k7zSignatureSize; i++)
- if (testBytes[i] != k7zSignature[i])
- return 0;
- return 1;
-}
-
-typedef struct _CSzState
-{
- Byte *Data;
- size_t Size;
-}CSzData;
-
-static SRes SzReadByte(CSzData *sd, Byte *b)
-{
- if (sd->Size == 0)
- return SZ_ERROR_ARCHIVE;
- sd->Size--;
- *b = *sd->Data++;
- return SZ_OK;
-}
-
-static SRes SzReadBytes(CSzData *sd, Byte *data, size_t size)
-{
- size_t i;
- for (i = 0; i < size; i++)
- {
- RINOK(SzReadByte(sd, data + i));
- }
- return SZ_OK;
-}
-
-static SRes SzReadUInt32(CSzData *sd, UInt32 *value)
-{
- int i;
- *value = 0;
- for (i = 0; i < 4; i++)
- {
- Byte b;
- RINOK(SzReadByte(sd, &b));
- *value |= ((UInt32)(b) << (8 * i));
- }
- return SZ_OK;
-}
-
-static SRes SzReadNumber(CSzData *sd, UInt64 *value)
-{
- Byte firstByte;
- Byte mask = 0x80;
- int i;
- RINOK(SzReadByte(sd, &firstByte));
- *value = 0;
- for (i = 0; i < 8; i++)
- {
- Byte b;
- if ((firstByte & mask) == 0)
- {
- UInt64 highPart = firstByte & (mask - 1);
- *value += (highPart << (8 * i));
- return SZ_OK;
- }
- RINOK(SzReadByte(sd, &b));
- *value |= ((UInt64)b << (8 * i));
- mask >>= 1;
- }
- return SZ_OK;
-}
-
-static SRes SzReadNumber32(CSzData *sd, UInt32 *value)
-{
- UInt64 value64;
- RINOK(SzReadNumber(sd, &value64));
- if (value64 >= 0x80000000)
- return SZ_ERROR_UNSUPPORTED;
- if (value64 >= ((UInt64)(1) << ((sizeof(size_t) - 1) * 8 + 2)))
- return SZ_ERROR_UNSUPPORTED;
- *value = (UInt32)value64;
- return SZ_OK;
-}
-
-static SRes SzReadID(CSzData *sd, UInt64 *value)
-{
- return SzReadNumber(sd, value);
-}
-
-static SRes SzSkeepDataSize(CSzData *sd, UInt64 size)
-{
- if (size > sd->Size)
- return SZ_ERROR_ARCHIVE;
- sd->Size -= (size_t)size;
- sd->Data += (size_t)size;
- return SZ_OK;
-}
-
-static SRes SzSkeepData(CSzData *sd)
-{
- UInt64 size;
- RINOK(SzReadNumber(sd, &size));
- return SzSkeepDataSize(sd, size);
-}
-
-static SRes SzReadArchiveProperties(CSzData *sd)
-{
- for (;;)
- {
- UInt64 type;
- RINOK(SzReadID(sd, &type));
- if (type == k7zIdEnd)
- break;
- SzSkeepData(sd);
- }
- return SZ_OK;
-}
-
-static SRes SzWaitAttribute(CSzData *sd, UInt64 attribute)
-{
- for (;;)
- {
- UInt64 type;
- RINOK(SzReadID(sd, &type));
- if (type == attribute)
- return SZ_OK;
- if (type == k7zIdEnd)
- return SZ_ERROR_ARCHIVE;
- RINOK(SzSkeepData(sd));
- }
-}
-
-static SRes SzReadBoolVector(CSzData *sd, size_t numItems, Byte **v, ISzAlloc *alloc)
-{
- Byte b = 0;
- Byte mask = 0;
- size_t i;
- MY_ALLOC(Byte, *v, numItems, alloc);
- for (i = 0; i < numItems; i++)
- {
- if (mask == 0)
- {
- RINOK(SzReadByte(sd, &b));
- mask = 0x80;
- }
- (*v)[i] = (Byte)(((b & mask) != 0) ? 1 : 0);
- mask >>= 1;
- }
- return SZ_OK;
-}
-
-static SRes SzReadBoolVector2(CSzData *sd, size_t numItems, Byte **v, ISzAlloc *alloc)
-{
- Byte allAreDefined;
- size_t i;
- RINOK(SzReadByte(sd, &allAreDefined));
- if (allAreDefined == 0)
- return SzReadBoolVector(sd, numItems, v, alloc);
- MY_ALLOC(Byte, *v, numItems, alloc);
- for (i = 0; i < numItems; i++)
- (*v)[i] = 1;
- return SZ_OK;
-}
-
-static SRes SzReadHashDigests(
- CSzData *sd,
- size_t numItems,
- Byte **digestsDefined,
- UInt32 **digests,
- ISzAlloc *alloc)
-{
- size_t i;
- RINOK(SzReadBoolVector2(sd, numItems, digestsDefined, alloc));
- MY_ALLOC(UInt32, *digests, numItems, alloc);
- for (i = 0; i < numItems; i++)
- if ((*digestsDefined)[i])
- {
- RINOK(SzReadUInt32(sd, (*digests) + i));
- }
- return SZ_OK;
-}
-
-static SRes SzReadPackInfo(
- CSzData *sd,
- UInt64 *dataOffset,
- UInt32 *numPackStreams,
- UInt64 **packSizes,
- Byte **packCRCsDefined,
- UInt32 **packCRCs,
- ISzAlloc *alloc)
-{
- UInt32 i;
- RINOK(SzReadNumber(sd, dataOffset));
- RINOK(SzReadNumber32(sd, numPackStreams));
-
- RINOK(SzWaitAttribute(sd, k7zIdSize));
-
- MY_ALLOC(UInt64, *packSizes, (size_t)*numPackStreams, alloc);
-
- for (i = 0; i < *numPackStreams; i++)
- {
- RINOK(SzReadNumber(sd, (*packSizes) + i));
- }
-
- for (;;)
- {
- UInt64 type;
- RINOK(SzReadID(sd, &type));
- if (type == k7zIdEnd)
- break;
- if (type == k7zIdCRC)
- {
- RINOK(SzReadHashDigests(sd, (size_t)*numPackStreams, packCRCsDefined, packCRCs, alloc));
- continue;
- }
- RINOK(SzSkeepData(sd));
- }
- if (*packCRCsDefined == 0)
- {
- MY_ALLOC(Byte, *packCRCsDefined, (size_t)*numPackStreams, alloc);
- MY_ALLOC(UInt32, *packCRCs, (size_t)*numPackStreams, alloc);
- for (i = 0; i < *numPackStreams; i++)
- {
- (*packCRCsDefined)[i] = 0;
- (*packCRCs)[i] = 0;
- }
- }
- return SZ_OK;
-}
-
-static SRes SzReadSwitch(CSzData *sd)
-{
- Byte external;
- RINOK(SzReadByte(sd, &external));
- return (external == 0) ? SZ_OK: SZ_ERROR_UNSUPPORTED;
-}
-
-static SRes SzGetNextFolderItem(CSzData *sd, CSzFolder *folder, ISzAlloc *alloc)
-{
- UInt32 numCoders, numBindPairs, numPackStreams, i;
- UInt32 numInStreams = 0, numOutStreams = 0;
-
- RINOK(SzReadNumber32(sd, &numCoders));
- if (numCoders > NUM_FOLDER_CODERS_MAX)
- return SZ_ERROR_UNSUPPORTED;
- folder->NumCoders = numCoders;
-
- MY_ALLOC(CSzCoderInfo, folder->Coders, (size_t)numCoders, alloc);
-
- for (i = 0; i < numCoders; i++)
- SzCoderInfo_Init(folder->Coders + i);
-
- for (i = 0; i < numCoders; i++)
- {
- Byte mainByte;
- CSzCoderInfo *coder = folder->Coders + i;
- {
- unsigned idSize, j;
- Byte longID[15];
- RINOK(SzReadByte(sd, &mainByte));
- idSize = (unsigned)(mainByte & 0xF);
- RINOK(SzReadBytes(sd, longID, idSize));
- if (idSize > sizeof(coder->MethodID))
- return SZ_ERROR_UNSUPPORTED;
- coder->MethodID = 0;
- for (j = 0; j < idSize; j++)
- coder->MethodID |= (UInt64)longID[idSize - 1 - j] << (8 * j);
-
- if ((mainByte & 0x10) != 0)
- {
- RINOK(SzReadNumber32(sd, &coder->NumInStreams));
- RINOK(SzReadNumber32(sd, &coder->NumOutStreams));
- if (coder->NumInStreams > NUM_CODER_STREAMS_MAX ||
- coder->NumOutStreams > NUM_CODER_STREAMS_MAX)
- return SZ_ERROR_UNSUPPORTED;
- }
- else
- {
- coder->NumInStreams = 1;
- coder->NumOutStreams = 1;
- }
- if ((mainByte & 0x20) != 0)
- {
- UInt64 propertiesSize = 0;
- RINOK(SzReadNumber(sd, &propertiesSize));
- if (!Buf_Create(&coder->Props, (size_t)propertiesSize, alloc))
- return SZ_ERROR_MEM;
- RINOK(SzReadBytes(sd, coder->Props.data, (size_t)propertiesSize));
- }
- }
- while ((mainByte & 0x80) != 0)
- {
- RINOK(SzReadByte(sd, &mainByte));
- RINOK(SzSkeepDataSize(sd, (mainByte & 0xF)));
- if ((mainByte & 0x10) != 0)
- {
- UInt32 n;
- RINOK(SzReadNumber32(sd, &n));
- RINOK(SzReadNumber32(sd, &n));
- }
- if ((mainByte & 0x20) != 0)
- {
- UInt64 propertiesSize = 0;
- RINOK(SzReadNumber(sd, &propertiesSize));
- RINOK(SzSkeepDataSize(sd, propertiesSize));
- }
- }
- numInStreams += coder->NumInStreams;
- numOutStreams += coder->NumOutStreams;
- }
-
- if (numOutStreams == 0)
- return SZ_ERROR_UNSUPPORTED;
-
- folder->NumBindPairs = numBindPairs = numOutStreams - 1;
- MY_ALLOC(CSzBindPair, folder->BindPairs, (size_t)numBindPairs, alloc);
-
- for (i = 0; i < numBindPairs; i++)
- {
- CSzBindPair *bp = folder->BindPairs + i;
- RINOK(SzReadNumber32(sd, &bp->InIndex));
- RINOK(SzReadNumber32(sd, &bp->OutIndex));
- }
-
- if (numInStreams < numBindPairs)
- return SZ_ERROR_UNSUPPORTED;
-
- folder->NumPackStreams = numPackStreams = numInStreams - numBindPairs;
- MY_ALLOC(UInt32, folder->PackStreams, (size_t)numPackStreams, alloc);
-
- if (numPackStreams == 1)
- {
- for (i = 0; i < numInStreams ; i++)
- if (SzFolder_FindBindPairForInStream(folder, i) < 0)
- break;
- if (i == numInStreams)
- return SZ_ERROR_UNSUPPORTED;
- folder->PackStreams[0] = i;
- }
- else
- for (i = 0; i < numPackStreams; i++)
- {
- RINOK(SzReadNumber32(sd, folder->PackStreams + i));
- }
- return SZ_OK;
-}
-
-static SRes SzReadUnpackInfo(
- CSzData *sd,
- UInt32 *numFolders,
- CSzFolder **folders, /* for alloc */
- ISzAlloc *alloc,
- ISzAlloc *allocTemp)
-{
- UInt32 i;
- RINOK(SzWaitAttribute(sd, k7zIdFolder));
- RINOK(SzReadNumber32(sd, numFolders));
- {
- RINOK(SzReadSwitch(sd));
-
- MY_ALLOC(CSzFolder, *folders, (size_t)*numFolders, alloc);
-
- for (i = 0; i < *numFolders; i++)
- SzFolder_Init((*folders) + i);
-
- for (i = 0; i < *numFolders; i++)
- {
- RINOK(SzGetNextFolderItem(sd, (*folders) + i, alloc));
- }
- }
-
- RINOK(SzWaitAttribute(sd, k7zIdCodersUnpackSize));
-
- for (i = 0; i < *numFolders; i++)
- {
- UInt32 j;
- CSzFolder *folder = (*folders) + i;
- UInt32 numOutStreams = SzFolder_GetNumOutStreams(folder);
-
- MY_ALLOC(UInt64, folder->UnpackSizes, (size_t)numOutStreams, alloc);
-
- for (j = 0; j < numOutStreams; j++)
- {
- RINOK(SzReadNumber(sd, folder->UnpackSizes + j));
- }
- }
-
- for (;;)
- {
- UInt64 type;
- RINOK(SzReadID(sd, &type));
- if (type == k7zIdEnd)
- return SZ_OK;
- if (type == k7zIdCRC)
- {
- SRes res;
- Byte *crcsDefined = 0;
- UInt32 *crcs = 0;
- res = SzReadHashDigests(sd, *numFolders, &crcsDefined, &crcs, allocTemp);
- if (res == SZ_OK)
- {
- for (i = 0; i < *numFolders; i++)
- {
- CSzFolder *folder = (*folders) + i;
- folder->UnpackCRCDefined = crcsDefined[i];
- folder->UnpackCRC = crcs[i];
- }
- }
- IAlloc_Free(allocTemp, crcs);
- IAlloc_Free(allocTemp, crcsDefined);
- RINOK(res);
- continue;
- }
- RINOK(SzSkeepData(sd));
- }
-}
-
-static SRes SzReadSubStreamsInfo(
- CSzData *sd,
- UInt32 numFolders,
- CSzFolder *folders,
- UInt32 *numUnpackStreams,
- UInt64 **unpackSizes,
- Byte **digestsDefined,
- UInt32 **digests,
- ISzAlloc *allocTemp)
-{
- UInt64 type = 0;
- UInt32 i;
- UInt32 si = 0;
- UInt32 numDigests = 0;
-
- for (i = 0; i < numFolders; i++)
- folders[i].NumUnpackStreams = 1;
- *numUnpackStreams = numFolders;
-
- for (;;)
- {
- RINOK(SzReadID(sd, &type));
- if (type == k7zIdNumUnpackStream)
- {
- *numUnpackStreams = 0;
- for (i = 0; i < numFolders; i++)
- {
- UInt32 numStreams;
- RINOK(SzReadNumber32(sd, &numStreams));
- folders[i].NumUnpackStreams = numStreams;
- *numUnpackStreams += numStreams;
- }
- continue;
- }
- if (type == k7zIdCRC || type == k7zIdSize)
- break;
- if (type == k7zIdEnd)
- break;
- RINOK(SzSkeepData(sd));
- }
-
- if (*numUnpackStreams == 0)
- {
- *unpackSizes = 0;
- *digestsDefined = 0;
- *digests = 0;
- }
- else
- {
- *unpackSizes = (UInt64 *)IAlloc_Alloc(allocTemp, (size_t)*numUnpackStreams * sizeof(UInt64));
- RINOM(*unpackSizes);
- *digestsDefined = (Byte *)IAlloc_Alloc(allocTemp, (size_t)*numUnpackStreams * sizeof(Byte));
- RINOM(*digestsDefined);
- *digests = (UInt32 *)IAlloc_Alloc(allocTemp, (size_t)*numUnpackStreams * sizeof(UInt32));
- RINOM(*digests);
- }
-
- for (i = 0; i < numFolders; i++)
- {
- /*
- v3.13 incorrectly worked with empty folders
- v4.07: we check that folder is empty
- */
- UInt64 sum = 0;
- UInt32 j;
- UInt32 numSubstreams = folders[i].NumUnpackStreams;
- if (numSubstreams == 0)
- continue;
- if (type == k7zIdSize)
- for (j = 1; j < numSubstreams; j++)
- {
- UInt64 size;
- RINOK(SzReadNumber(sd, &size));
- (*unpackSizes)[si++] = size;
- sum += size;
- }
- (*unpackSizes)[si++] = SzFolder_GetUnpackSize(folders + i) - sum;
- }
- if (type == k7zIdSize)
- {
- RINOK(SzReadID(sd, &type));
- }
-
- for (i = 0; i < *numUnpackStreams; i++)
- {
- (*digestsDefined)[i] = 0;
- (*digests)[i] = 0;
- }
-
-
- for (i = 0; i < numFolders; i++)
- {
- UInt32 numSubstreams = folders[i].NumUnpackStreams;
- if (numSubstreams != 1 || !folders[i].UnpackCRCDefined)
- numDigests += numSubstreams;
- }
-
-
- si = 0;
- for (;;)
- {
- if (type == k7zIdCRC)
- {
- int digestIndex = 0;
- Byte *digestsDefined2 = 0;
- UInt32 *digests2 = 0;
- SRes res = SzReadHashDigests(sd, numDigests, &digestsDefined2, &digests2, allocTemp);
- if (res == SZ_OK)
- {
- for (i = 0; i < numFolders; i++)
- {
- CSzFolder *folder = folders + i;
- UInt32 numSubstreams = folder->NumUnpackStreams;
- if (numSubstreams == 1 && folder->UnpackCRCDefined)
- {
- (*digestsDefined)[si] = 1;
- (*digests)[si] = folder->UnpackCRC;
- si++;
- }
- else
- {
- UInt32 j;
- for (j = 0; j < numSubstreams; j++, digestIndex++)
- {
- (*digestsDefined)[si] = digestsDefined2[digestIndex];
- (*digests)[si] = digests2[digestIndex];
- si++;
- }
- }
- }
- }
- IAlloc_Free(allocTemp, digestsDefined2);
- IAlloc_Free(allocTemp, digests2);
- RINOK(res);
- }
- else if (type == k7zIdEnd)
- return SZ_OK;
- else
- {
- RINOK(SzSkeepData(sd));
- }
- RINOK(SzReadID(sd, &type));
- }
-}
-
-
-static SRes SzReadStreamsInfo(
- CSzData *sd,
- UInt64 *dataOffset,
- CSzAr *p,
- UInt32 *numUnpackStreams,
- UInt64 **unpackSizes, /* allocTemp */
- Byte **digestsDefined, /* allocTemp */
- UInt32 **digests, /* allocTemp */
- ISzAlloc *alloc,
- ISzAlloc *allocTemp)
-{
- for (;;)
- {
- UInt64 type;
- RINOK(SzReadID(sd, &type));
- if ((UInt64)(int)type != type)
- return SZ_ERROR_UNSUPPORTED;
- switch((int)type)
- {
- case k7zIdEnd:
- return SZ_OK;
- case k7zIdPackInfo:
- {
- RINOK(SzReadPackInfo(sd, dataOffset, &p->NumPackStreams,
- &p->PackSizes, &p->PackCRCsDefined, &p->PackCRCs, alloc));
- break;
- }
- case k7zIdUnpackInfo:
- {
- RINOK(SzReadUnpackInfo(sd, &p->NumFolders, &p->Folders, alloc, allocTemp));
- break;
- }
- case k7zIdSubStreamsInfo:
- {
- RINOK(SzReadSubStreamsInfo(sd, p->NumFolders, p->Folders,
- numUnpackStreams, unpackSizes, digestsDefined, digests, allocTemp));
- break;
- }
- default:
- return SZ_ERROR_UNSUPPORTED;
- }
- }
-}
-
-size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest)
-{
- size_t len = p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex];
- if (dest != 0)
- {
- size_t i;
- const Byte *src = p->FileNames.data + (p->FileNameOffsets[fileIndex] * 2);
- for (i = 0; i < len; i++)
- dest[i] = GetUi16(src + i * 2);
- }
- return len;
-}
-
-static SRes SzReadFileNames(const Byte *p, size_t size, UInt32 numFiles, size_t *sizes)
-{
- UInt32 i;
- size_t pos = 0;
- for (i = 0; i < numFiles; i++)
- {
- sizes[i] = pos;
- for (;;)
- {
- if (pos >= size)
- return SZ_ERROR_ARCHIVE;
- if (p[pos * 2] == 0 && p[pos * 2 + 1] == 0)
- break;
- pos++;
- }
- pos++;
- }
- sizes[i] = pos;
- return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE;
-}
-
-static SRes SzReadHeader2(
- CSzArEx *p, /* allocMain */
- CSzData *sd,
- UInt64 **unpackSizes, /* allocTemp */
- Byte **digestsDefined, /* allocTemp */
- UInt32 **digests, /* allocTemp */
- Byte **emptyStreamVector, /* allocTemp */
- Byte **emptyFileVector, /* allocTemp */
- Byte **lwtVector, /* allocTemp */
- ISzAlloc *allocMain,
- ISzAlloc *allocTemp)
-{
- UInt64 type;
- UInt32 numUnpackStreams = 0;
- UInt32 numFiles = 0;
- CSzFileItem *files = 0;
- UInt32 numEmptyStreams = 0;
- UInt32 i;
-
- RINOK(SzReadID(sd, &type));
-
- if (type == k7zIdArchiveProperties)
- {
- RINOK(SzReadArchiveProperties(sd));
- RINOK(SzReadID(sd, &type));
- }
-
-
- if (type == k7zIdMainStreamsInfo)
- {
- RINOK(SzReadStreamsInfo(sd,
- &p->dataPos,
- &p->db,
- &numUnpackStreams,
- unpackSizes,
- digestsDefined,
- digests, allocMain, allocTemp));
- p->dataPos += p->startPosAfterHeader;
- RINOK(SzReadID(sd, &type));
- }
-
- if (type == k7zIdEnd)
- return SZ_OK;
- if (type != k7zIdFilesInfo)
- return SZ_ERROR_ARCHIVE;
-
- RINOK(SzReadNumber32(sd, &numFiles));
- p->db.NumFiles = numFiles;
-
- MY_ALLOC(CSzFileItem, files, (size_t)numFiles, allocMain);
-
- p->db.Files = files;
- for (i = 0; i < numFiles; i++)
- SzFile_Init(files + i);
-
- for (;;)
- {
- UInt64 type;
- UInt64 size;
- RINOK(SzReadID(sd, &type));
- if (type == k7zIdEnd)
- break;
- RINOK(SzReadNumber(sd, &size));
- if (size > sd->Size)
- return SZ_ERROR_ARCHIVE;
- if ((UInt64)(int)type != type)
- {
- RINOK(SzSkeepDataSize(sd, size));
- }
- else
- switch((int)type)
- {
- case k7zIdName:
- {
- size_t namesSize;
- RINOK(SzReadSwitch(sd));
- namesSize = (size_t)size - 1;
- if ((namesSize & 1) != 0)
- return SZ_ERROR_ARCHIVE;
- if (!Buf_Create(&p->FileNames, namesSize, allocMain))
- return SZ_ERROR_MEM;
- MY_ALLOC(size_t, p->FileNameOffsets, numFiles + 1, allocMain);
- memcpy(p->FileNames.data, sd->Data, namesSize);
- RINOK(SzReadFileNames(sd->Data, namesSize >> 1, numFiles, p->FileNameOffsets))
- RINOK(SzSkeepDataSize(sd, namesSize));
- break;
- }
- case k7zIdEmptyStream:
- {
- RINOK(SzReadBoolVector(sd, numFiles, emptyStreamVector, allocTemp));
- numEmptyStreams = 0;
- for (i = 0; i < numFiles; i++)
- if ((*emptyStreamVector)[i])
- numEmptyStreams++;
- break;
- }
- case k7zIdEmptyFile:
- {
- RINOK(SzReadBoolVector(sd, numEmptyStreams, emptyFileVector, allocTemp));
- break;
- }
- case k7zIdWinAttributes:
- {
- RINOK(SzReadBoolVector2(sd, numFiles, lwtVector, allocTemp));
- RINOK(SzReadSwitch(sd));
- for (i = 0; i < numFiles; i++)
- {
- CSzFileItem *f = &files[i];
- Byte defined = (*lwtVector)[i];
- f->AttribDefined = defined;
- f->Attrib = 0;
- if (defined)
- {
- RINOK(SzReadUInt32(sd, &f->Attrib));
- }
- }
- IAlloc_Free(allocTemp, *lwtVector);
- *lwtVector = NULL;
- break;
- }
- case k7zIdMTime:
- {
- RINOK(SzReadBoolVector2(sd, numFiles, lwtVector, allocTemp));
- RINOK(SzReadSwitch(sd));
- for (i = 0; i < numFiles; i++)
- {
- CSzFileItem *f = &files[i];
- Byte defined = (*lwtVector)[i];
- f->MTimeDefined = defined;
- f->MTime.Low = f->MTime.High = 0;
- if (defined)
- {
- RINOK(SzReadUInt32(sd, &f->MTime.Low));
- RINOK(SzReadUInt32(sd, &f->MTime.High));
- }
- }
- IAlloc_Free(allocTemp, *lwtVector);
- *lwtVector = NULL;
- break;
- }
- default:
- {
- RINOK(SzSkeepDataSize(sd, size));
- }
- }
- }
-
- {
- UInt32 emptyFileIndex = 0;
- UInt32 sizeIndex = 0;
- for (i = 0; i < numFiles; i++)
- {
- CSzFileItem *file = files + i;
- file->IsAnti = 0;
- if (*emptyStreamVector == 0)
- file->HasStream = 1;
- else
- file->HasStream = (Byte)((*emptyStreamVector)[i] ? 0 : 1);
- if (file->HasStream)
- {
- file->IsDir = 0;
- file->Size = (*unpackSizes)[sizeIndex];
- file->Crc = (*digests)[sizeIndex];
- file->CrcDefined = (Byte)(*digestsDefined)[sizeIndex];
- sizeIndex++;
- }
- else
- {
- if (*emptyFileVector == 0)
- file->IsDir = 1;
- else
- file->IsDir = (Byte)((*emptyFileVector)[emptyFileIndex] ? 0 : 1);
- emptyFileIndex++;
- file->Size = 0;
- file->Crc = 0;
- file->CrcDefined = 0;
- }
- }
- }
- return SzArEx_Fill(p, allocMain);
-}
-
-static SRes SzReadHeader(
- CSzArEx *p,
- CSzData *sd,
- ISzAlloc *allocMain,
- ISzAlloc *allocTemp)
-{
- UInt64 *unpackSizes = 0;
- Byte *digestsDefined = 0;
- UInt32 *digests = 0;
- Byte *emptyStreamVector = 0;
- Byte *emptyFileVector = 0;
- Byte *lwtVector = 0;
- SRes res = SzReadHeader2(p, sd,
- &unpackSizes, &digestsDefined, &digests,
- &emptyStreamVector, &emptyFileVector, &lwtVector,
- allocMain, allocTemp);
- IAlloc_Free(allocTemp, unpackSizes);
- IAlloc_Free(allocTemp, digestsDefined);
- IAlloc_Free(allocTemp, digests);
- IAlloc_Free(allocTemp, emptyStreamVector);
- IAlloc_Free(allocTemp, emptyFileVector);
- IAlloc_Free(allocTemp, lwtVector);
- return res;
-}
-
-static SRes SzReadAndDecodePackedStreams2(
- ILookInStream *inStream,
- CSzData *sd,
- CBuf *outBuffer,
- UInt64 baseOffset,
- CSzAr *p,
- UInt64 **unpackSizes,
- Byte **digestsDefined,
- UInt32 **digests,
- ISzAlloc *allocTemp)
-{
-
- UInt32 numUnpackStreams = 0;
- UInt64 dataStartPos;
- CSzFolder *folder;
- UInt64 unpackSize;
- SRes res;
-
- RINOK(SzReadStreamsInfo(sd, &dataStartPos, p,
- &numUnpackStreams, unpackSizes, digestsDefined, digests,
- allocTemp, allocTemp));
-
- dataStartPos += baseOffset;
- if (p->NumFolders != 1)
- return SZ_ERROR_ARCHIVE;
-
- folder = p->Folders;
- unpackSize = SzFolder_GetUnpackSize(folder);
-
- RINOK(LookInStream_SeekTo(inStream, dataStartPos));
-
- if (!Buf_Create(outBuffer, (size_t)unpackSize, allocTemp))
- return SZ_ERROR_MEM;
-
- res = SzFolder_Decode(folder, p->PackSizes,
- inStream, dataStartPos,
- outBuffer->data, (size_t)unpackSize, allocTemp);
- RINOK(res);
- if (folder->UnpackCRCDefined)
- if (CrcCalc(outBuffer->data, (size_t)unpackSize) != folder->UnpackCRC)
- return SZ_ERROR_CRC;
- return SZ_OK;
-}
-
-static SRes SzReadAndDecodePackedStreams(
- ILookInStream *inStream,
- CSzData *sd,
- CBuf *outBuffer,
- UInt64 baseOffset,
- ISzAlloc *allocTemp)
-{
- CSzAr p;
- UInt64 *unpackSizes = 0;
- Byte *digestsDefined = 0;
- UInt32 *digests = 0;
- SRes res;
- SzAr_Init(&p);
- res = SzReadAndDecodePackedStreams2(inStream, sd, outBuffer, baseOffset,
- &p, &unpackSizes, &digestsDefined, &digests,
- allocTemp);
- SzAr_Free(&p, allocTemp);
- IAlloc_Free(allocTemp, unpackSizes);
- IAlloc_Free(allocTemp, digestsDefined);
- IAlloc_Free(allocTemp, digests);
- return res;
-}
-
-static SRes SzArEx_Open2(
- CSzArEx *p,
- ILookInStream *inStream,
- ISzAlloc *allocMain,
- ISzAlloc *allocTemp)
-{
- Byte header[k7zStartHeaderSize];
- Int64 startArcPos;
- UInt64 nextHeaderOffset, nextHeaderSize;
- size_t nextHeaderSizeT;
- UInt32 nextHeaderCRC;
- CBuf buffer;
- SRes res;
-
- startArcPos = 0;
- RINOK(inStream->Seek(inStream, &startArcPos, SZ_SEEK_CUR));
-
- RINOK(LookInStream_Read2(inStream, header, k7zStartHeaderSize, SZ_ERROR_NO_ARCHIVE));
-
- if (!TestSignatureCandidate(header))
- return SZ_ERROR_NO_ARCHIVE;
- if (header[6] != k7zMajorVersion)
- return SZ_ERROR_UNSUPPORTED;
-
- nextHeaderOffset = GetUi64(header + 12);
- nextHeaderSize = GetUi64(header + 20);
- nextHeaderCRC = GetUi32(header + 28);
-
- p->startPosAfterHeader = startArcPos + k7zStartHeaderSize;
-
- if (CrcCalc(header + 12, 20) != GetUi32(header + 8))
- return SZ_ERROR_CRC;
-
- nextHeaderSizeT = (size_t)nextHeaderSize;
- if (nextHeaderSizeT != nextHeaderSize)
- return SZ_ERROR_MEM;
- if (nextHeaderSizeT == 0)
- return SZ_OK;
- if (nextHeaderOffset > nextHeaderOffset + nextHeaderSize ||
- nextHeaderOffset > nextHeaderOffset + nextHeaderSize + k7zStartHeaderSize)
- return SZ_ERROR_NO_ARCHIVE;
-
- {
- Int64 pos = 0;
- RINOK(inStream->Seek(inStream, &pos, SZ_SEEK_END));
- if ((UInt64)pos < startArcPos + nextHeaderOffset ||
- (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset ||
- (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset + nextHeaderSize)
- return SZ_ERROR_INPUT_EOF;
- }
-
- RINOK(LookInStream_SeekTo(inStream, startArcPos + k7zStartHeaderSize + nextHeaderOffset));
-
- if (!Buf_Create(&buffer, nextHeaderSizeT, allocTemp))
- return SZ_ERROR_MEM;
-
- res = LookInStream_Read(inStream, buffer.data, nextHeaderSizeT);
- if (res == SZ_OK)
- {
- res = SZ_ERROR_ARCHIVE;
- if (CrcCalc(buffer.data, nextHeaderSizeT) == nextHeaderCRC)
- {
- CSzData sd;
- UInt64 type;
- sd.Data = buffer.data;
- sd.Size = buffer.size;
- res = SzReadID(&sd, &type);
- if (res == SZ_OK)
- {
- if (type == k7zIdEncodedHeader)
- {
- CBuf outBuffer;
- Buf_Init(&outBuffer);
- res = SzReadAndDecodePackedStreams(inStream, &sd, &outBuffer, p->startPosAfterHeader, allocTemp);
- if (res != SZ_OK)
- Buf_Free(&outBuffer, allocTemp);
- else
- {
- Buf_Free(&buffer, allocTemp);
- buffer.data = outBuffer.data;
- buffer.size = outBuffer.size;
- sd.Data = buffer.data;
- sd.Size = buffer.size;
- res = SzReadID(&sd, &type);
- }
- }
- }
- if (res == SZ_OK)
- {
- if (type == k7zIdHeader)
- res = SzReadHeader(p, &sd, allocMain, allocTemp);
- else
- res = SZ_ERROR_UNSUPPORTED;
- }
- }
- }
- Buf_Free(&buffer, allocTemp);
- return res;
-}
-
-SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, ISzAlloc *allocMain, ISzAlloc *allocTemp)
-{
- SRes res = SzArEx_Open2(p, inStream, allocMain, allocTemp);
- if (res != SZ_OK)
- SzArEx_Free(p, allocMain);
- return res;
-}
-
-SRes SzArEx_Extract(
- const CSzArEx *p,
- ILookInStream *inStream,
- UInt32 fileIndex,
- UInt32 *blockIndex,
- Byte **outBuffer,
- size_t *outBufferSize,
- size_t *offset,
- size_t *outSizeProcessed,
- ISzAlloc *allocMain,
- ISzAlloc *allocTemp)
-{
- UInt32 folderIndex = p->FileIndexToFolderIndexMap[fileIndex];
- SRes res = SZ_OK;
- *offset = 0;
- *outSizeProcessed = 0;
- if (folderIndex == (UInt32)-1)
- {
- IAlloc_Free(allocMain, *outBuffer);
- *blockIndex = folderIndex;
- *outBuffer = 0;
- *outBufferSize = 0;
- return SZ_OK;
- }
-
- if (*outBuffer == 0 || *blockIndex != folderIndex)
- {
- CSzFolder *folder = p->db.Folders + folderIndex;
- UInt64 unpackSizeSpec = SzFolder_GetUnpackSize(folder);
- size_t unpackSize = (size_t)unpackSizeSpec;
- UInt64 startOffset = SzArEx_GetFolderStreamPos(p, folderIndex, 0);
-
- if (unpackSize != unpackSizeSpec)
- return SZ_ERROR_MEM;
- *blockIndex = folderIndex;
- IAlloc_Free(allocMain, *outBuffer);
- *outBuffer = 0;
-
- RINOK(LookInStream_SeekTo(inStream, startOffset));
-
- if (res == SZ_OK)
- {
- *outBufferSize = unpackSize;
- if (unpackSize != 0)
- {
- *outBuffer = (Byte *)IAlloc_Alloc(allocMain, unpackSize);
- if (*outBuffer == 0)
- res = SZ_ERROR_MEM;
- }
- if (res == SZ_OK)
- {
- res = SzFolder_Decode(folder,
- p->db.PackSizes + p->FolderStartPackStreamIndex[folderIndex],
- inStream, startOffset,
- *outBuffer, unpackSize, allocTemp);
- if (res == SZ_OK)
- {
- if (folder->UnpackCRCDefined)
- {
- if (CrcCalc(*outBuffer, unpackSize) != folder->UnpackCRC)
- res = SZ_ERROR_CRC;
- }
- }
- }
- }
- }
- if (res == SZ_OK)
- {
- UInt32 i;
- CSzFileItem *fileItem = p->db.Files + fileIndex;
- *offset = 0;
- for (i = p->FolderStartFileIndex[folderIndex]; i < fileIndex; i++)
- *offset += (UInt32)p->db.Files[i].Size;
- *outSizeProcessed = (size_t)fileItem->Size;
- if (*offset + *outSizeProcessed > *outBufferSize)
- return SZ_ERROR_FAIL;
- if (fileItem->CrcDefined && CrcCalc(*outBuffer + *offset, *outSizeProcessed) != fileItem->Crc)
- res = SZ_ERROR_CRC;
- }
- return res;
-}
diff --git a/3rdparty/lzma/C/7zStream.c b/3rdparty/lzma/C/7zStream.c
index 0ebb7b5f93c..88f9c42b1dd 100644
--- a/3rdparty/lzma/C/7zStream.c
+++ b/3rdparty/lzma/C/7zStream.c
@@ -1,9 +1,11 @@
/* 7zStream.c -- 7z Stream functions
-2010-03-11 : Igor Pavlov : Public domain */
+2013-11-12 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include <string.h>
-#include "Types.h"
+#include "7zTypes.h"
SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType)
{
diff --git a/3rdparty/lzma/C/Types.h b/3rdparty/lzma/C/7zTypes.h
index 1dfea2fbea4..778413ef424 100644
--- a/3rdparty/lzma/C/Types.h
+++ b/3rdparty/lzma/C/7zTypes.h
@@ -1,15 +1,15 @@
-/* Types.h -- Basic types
-2010-10-09 : Igor Pavlov : Public domain */
+/* 7zTypes.h -- Basic types
+2013-11-12 : Igor Pavlov : Public domain */
#ifndef __7Z_TYPES_H
#define __7Z_TYPES_H
-#include <stddef.h>
-
-#ifdef _WIN32_7Z
-#include <windows.h>
+#ifdef _WIN32
+/* #include <windows.h> */
#endif
+#include <stddef.h>
+
#ifndef EXTERN_C_BEGIN
#ifdef __cplusplus
#define EXTERN_C_BEGIN extern "C" {
@@ -42,8 +42,9 @@ EXTERN_C_BEGIN
typedef int SRes;
-#ifdef _WIN32_7Z
-typedef DWORD WRes;
+#ifdef _WIN32
+/* typedef DWORD WRes; */
+typedef unsigned WRes;
#else
typedef int WRes;
#endif
@@ -97,7 +98,7 @@ typedef int Bool;
#define False 0
-#ifdef _WIN32_7Z
+#ifdef _WIN32
#define MY_STD_CALL __stdcall
#else
#define MY_STD_CALL
@@ -116,6 +117,7 @@ typedef int Bool;
#else
+#define MY_NO_INLINE
#define MY_CDECL
#define MY_FAST_CALL
@@ -233,7 +235,7 @@ typedef struct
#define IAlloc_Alloc(p, size) (p)->Alloc((p), size)
#define IAlloc_Free(p, a) (p)->Free((p), a)
-#ifdef _WIN32_7Z
+#ifdef _WIN32
#define CHAR_PATH_SEPARATOR '\\'
#define WCHAR_PATH_SEPARATOR L'\\'
diff --git a/3rdparty/lzma/C/7zVersion.h b/3rdparty/lzma/C/7zVersion.h
index 5a83e5f74ef..c4f5c8e940c 100644
--- a/3rdparty/lzma/C/7zVersion.h
+++ b/3rdparty/lzma/C/7zVersion.h
@@ -1,8 +1,19 @@
-#define MY_VER_MAJOR 9
-#define MY_VER_MINOR 22
-#define MY_VER_BUILD 00
-#define MY_VERSION "9.22 beta"
-#define MY_7ZIP_VERSION "9.22 beta"
-#define MY_DATE "2011-04-18"
-#define MY_COPYRIGHT ": Igor Pavlov : Public domain"
-#define MY_VERSION_COPYRIGHT_DATE MY_VERSION " " MY_COPYRIGHT " : " MY_DATE
+#define MY_VER_MAJOR 15
+#define MY_VER_MINOR 14
+#define MY_VER_BUILD 0
+#define MY_VERSION_NUMBERS "15.14"
+#define MY_VERSION "15.14"
+#define MY_DATE "2015-12-31"
+#undef MY_COPYRIGHT
+#undef MY_VERSION_COPYRIGHT_DATE
+#define MY_AUTHOR_NAME "Igor Pavlov"
+#define MY_COPYRIGHT_PD "Igor Pavlov : Public domain"
+#define MY_COPYRIGHT_CR "Copyright (c) 1999-2015 Igor Pavlov"
+
+#ifdef USE_COPYRIGHT_CR
+ #define MY_COPYRIGHT MY_COPYRIGHT_CR
+#else
+ #define MY_COPYRIGHT MY_COPYRIGHT_PD
+#endif
+
+#define MY_VERSION_COPYRIGHT_DATE MY_VERSION " : " MY_COPYRIGHT " : " MY_DATE
diff --git a/3rdparty/lzma/C/Aes.c b/3rdparty/lzma/C/Aes.c
new file mode 100644
index 00000000000..7c100c55db8
--- /dev/null
+++ b/3rdparty/lzma/C/Aes.c
@@ -0,0 +1,295 @@
+/* Aes.c -- AES encryption / decryption
+2015-02-23 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
+
+#include "Aes.h"
+#include "CpuArch.h"
+
+static UInt32 T[256 * 4];
+static const Byte Sbox[256] = {
+ 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
+ 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
+ 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
+ 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
+ 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
+ 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
+ 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8,
+ 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2,
+ 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
+ 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,
+ 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79,
+ 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
+ 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a,
+ 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e,
+ 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
+ 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16};
+
+void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks);
+
+void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks);
+
+AES_CODE_FUNC g_AesCbc_Encode;
+AES_CODE_FUNC g_AesCbc_Decode;
+AES_CODE_FUNC g_AesCtr_Code;
+
+static UInt32 D[256 * 4];
+static Byte InvS[256];
+
+static const Byte Rcon[11] = { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36 };
+
+#define xtime(x) ((((x) << 1) ^ (((x) & 0x80) != 0 ? 0x1B : 0)) & 0xFF)
+
+#define Ui32(a0, a1, a2, a3) ((UInt32)(a0) | ((UInt32)(a1) << 8) | ((UInt32)(a2) << 16) | ((UInt32)(a3) << 24))
+
+#define gb0(x) ( (x) & 0xFF)
+#define gb1(x) (((x) >> ( 8)) & 0xFF)
+#define gb2(x) (((x) >> (16)) & 0xFF)
+#define gb3(x) (((x) >> (24)) & 0xFF)
+
+void AesGenTables(void)
+{
+ unsigned i;
+ for (i = 0; i < 256; i++)
+ InvS[Sbox[i]] = (Byte)i;
+
+ for (i = 0; i < 256; i++)
+ {
+ {
+ UInt32 a1 = Sbox[i];
+ UInt32 a2 = xtime(a1);
+ UInt32 a3 = a2 ^ a1;
+ T[ i] = Ui32(a2, a1, a1, a3);
+ T[0x100 + i] = Ui32(a3, a2, a1, a1);
+ T[0x200 + i] = Ui32(a1, a3, a2, a1);
+ T[0x300 + i] = Ui32(a1, a1, a3, a2);
+ }
+ {
+ UInt32 a1 = InvS[i];
+ UInt32 a2 = xtime(a1);
+ UInt32 a4 = xtime(a2);
+ UInt32 a8 = xtime(a4);
+ UInt32 a9 = a8 ^ a1;
+ UInt32 aB = a8 ^ a2 ^ a1;
+ UInt32 aD = a8 ^ a4 ^ a1;
+ UInt32 aE = a8 ^ a4 ^ a2;
+ D[ i] = Ui32(aE, a9, aD, aB);
+ D[0x100 + i] = Ui32(aB, aE, a9, aD);
+ D[0x200 + i] = Ui32(aD, aB, aE, a9);
+ D[0x300 + i] = Ui32(a9, aD, aB, aE);
+ }
+ }
+
+ g_AesCbc_Encode = AesCbc_Encode;
+ g_AesCbc_Decode = AesCbc_Decode;
+ g_AesCtr_Code = AesCtr_Code;
+
+ #ifdef MY_CPU_X86_OR_AMD64
+ if (CPU_Is_Aes_Supported())
+ {
+ g_AesCbc_Encode = AesCbc_Encode_Intel;
+ g_AesCbc_Decode = AesCbc_Decode_Intel;
+ g_AesCtr_Code = AesCtr_Code_Intel;
+ }
+ #endif
+}
+
+
+#define HT(i, x, s) (T + (x << 8))[gb ## x(s[(i + x) & 3])]
+
+#define HT4(m, i, s, p) m[i] = \
+ HT(i, 0, s) ^ \
+ HT(i, 1, s) ^ \
+ HT(i, 2, s) ^ \
+ HT(i, 3, s) ^ w[p + i]
+
+#define HT16(m, s, p) \
+ HT4(m, 0, s, p); \
+ HT4(m, 1, s, p); \
+ HT4(m, 2, s, p); \
+ HT4(m, 3, s, p); \
+
+#define FT(i, x) Sbox[gb ## x(m[(i + x) & 3])]
+#define FT4(i) dest[i] = Ui32(FT(i, 0), FT(i, 1), FT(i, 2), FT(i, 3)) ^ w[i];
+
+
+#define HD(i, x, s) (D + (x << 8))[gb ## x(s[(i - x) & 3])]
+
+#define HD4(m, i, s, p) m[i] = \
+ HD(i, 0, s) ^ \
+ HD(i, 1, s) ^ \
+ HD(i, 2, s) ^ \
+ HD(i, 3, s) ^ w[p + i];
+
+#define HD16(m, s, p) \
+ HD4(m, 0, s, p); \
+ HD4(m, 1, s, p); \
+ HD4(m, 2, s, p); \
+ HD4(m, 3, s, p); \
+
+#define FD(i, x) InvS[gb ## x(m[(i - x) & 3])]
+#define FD4(i) dest[i] = Ui32(FD(i, 0), FD(i, 1), FD(i, 2), FD(i, 3)) ^ w[i];
+
+void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *w, const Byte *key, unsigned keySize)
+{
+ unsigned i, wSize;
+ wSize = keySize + 28;
+ keySize /= 4;
+ w[0] = ((UInt32)keySize / 2) + 3;
+ w += 4;
+
+ for (i = 0; i < keySize; i++, key += 4)
+ w[i] = GetUi32(key);
+
+ for (; i < wSize; i++)
+ {
+ UInt32 t = w[i - 1];
+ unsigned rem = i % keySize;
+ if (rem == 0)
+ t = Ui32(Sbox[gb1(t)] ^ Rcon[i / keySize], Sbox[gb2(t)], Sbox[gb3(t)], Sbox[gb0(t)]);
+ else if (keySize > 6 && rem == 4)
+ t = Ui32(Sbox[gb0(t)], Sbox[gb1(t)], Sbox[gb2(t)], Sbox[gb3(t)]);
+ w[i] = w[i - keySize] ^ t;
+ }
+}
+
+void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *w, const Byte *key, unsigned keySize)
+{
+ unsigned i, num;
+ Aes_SetKey_Enc(w, key, keySize);
+ num = keySize + 20;
+ w += 8;
+ for (i = 0; i < num; i++)
+ {
+ UInt32 r = w[i];
+ w[i] =
+ D[ Sbox[gb0(r)]] ^
+ D[0x100 + Sbox[gb1(r)]] ^
+ D[0x200 + Sbox[gb2(r)]] ^
+ D[0x300 + Sbox[gb3(r)]];
+ }
+}
+
+/* Aes_Encode and Aes_Decode functions work with little-endian words.
+ src and dest are pointers to 4 UInt32 words.
+ src and dest can point to same block */
+
+static void Aes_Encode(const UInt32 *w, UInt32 *dest, const UInt32 *src)
+{
+ UInt32 s[4];
+ UInt32 m[4];
+ UInt32 numRounds2 = w[0];
+ w += 4;
+ s[0] = src[0] ^ w[0];
+ s[1] = src[1] ^ w[1];
+ s[2] = src[2] ^ w[2];
+ s[3] = src[3] ^ w[3];
+ w += 4;
+ for (;;)
+ {
+ HT16(m, s, 0);
+ if (--numRounds2 == 0)
+ break;
+ HT16(s, m, 4);
+ w += 8;
+ }
+ w += 4;
+ FT4(0); FT4(1); FT4(2); FT4(3);
+}
+
+static void Aes_Decode(const UInt32 *w, UInt32 *dest, const UInt32 *src)
+{
+ UInt32 s[4];
+ UInt32 m[4];
+ UInt32 numRounds2 = w[0];
+ w += 4 + numRounds2 * 8;
+ s[0] = src[0] ^ w[0];
+ s[1] = src[1] ^ w[1];
+ s[2] = src[2] ^ w[2];
+ s[3] = src[3] ^ w[3];
+ for (;;)
+ {
+ w -= 8;
+ HD16(m, s, 4);
+ if (--numRounds2 == 0)
+ break;
+ HD16(s, m, 0);
+ }
+ FD4(0); FD4(1); FD4(2); FD4(3);
+}
+
+void AesCbc_Init(UInt32 *p, const Byte *iv)
+{
+ unsigned i;
+ for (i = 0; i < 4; i++)
+ p[i] = GetUi32(iv + i * 4);
+}
+
+void MY_FAST_CALL AesCbc_Encode(UInt32 *p, Byte *data, size_t numBlocks)
+{
+ for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE)
+ {
+ p[0] ^= GetUi32(data);
+ p[1] ^= GetUi32(data + 4);
+ p[2] ^= GetUi32(data + 8);
+ p[3] ^= GetUi32(data + 12);
+
+ Aes_Encode(p + 4, p, p);
+
+ SetUi32(data, p[0]);
+ SetUi32(data + 4, p[1]);
+ SetUi32(data + 8, p[2]);
+ SetUi32(data + 12, p[3]);
+ }
+}
+
+void MY_FAST_CALL AesCbc_Decode(UInt32 *p, Byte *data, size_t numBlocks)
+{
+ UInt32 in[4], out[4];
+ for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE)
+ {
+ in[0] = GetUi32(data);
+ in[1] = GetUi32(data + 4);
+ in[2] = GetUi32(data + 8);
+ in[3] = GetUi32(data + 12);
+
+ Aes_Decode(p + 4, out, in);
+
+ SetUi32(data, p[0] ^ out[0]);
+ SetUi32(data + 4, p[1] ^ out[1]);
+ SetUi32(data + 8, p[2] ^ out[2]);
+ SetUi32(data + 12, p[3] ^ out[3]);
+
+ p[0] = in[0];
+ p[1] = in[1];
+ p[2] = in[2];
+ p[3] = in[3];
+ }
+}
+
+void MY_FAST_CALL AesCtr_Code(UInt32 *p, Byte *data, size_t numBlocks)
+{
+ for (; numBlocks != 0; numBlocks--)
+ {
+ UInt32 temp[4];
+ Byte buf[16];
+ int i;
+
+ if (++p[0] == 0)
+ p[1]++;
+
+ Aes_Encode(p + 4, temp, p);
+
+ SetUi32(buf, temp[0]);
+ SetUi32(buf + 4, temp[1]);
+ SetUi32(buf + 8, temp[2]);
+ SetUi32(buf + 12, temp[3]);
+
+ for (i = 0; i < 16; i++)
+ *data++ ^= buf[i];
+ }
+}
diff --git a/3rdparty/lzma/C/Aes.h b/3rdparty/lzma/C/Aes.h
new file mode 100644
index 00000000000..64979b5bcbf
--- /dev/null
+++ b/3rdparty/lzma/C/Aes.h
@@ -0,0 +1,38 @@
+/* Aes.h -- AES encryption / decryption
+2013-01-18 : Igor Pavlov : Public domain */
+
+#ifndef __AES_H
+#define __AES_H
+
+#include "7zTypes.h"
+
+EXTERN_C_BEGIN
+
+#define AES_BLOCK_SIZE 16
+
+/* Call AesGenTables one time before other AES functions */
+void AesGenTables(void);
+
+/* UInt32 pointers must be 16-byte aligned */
+
+/* 16-byte (4 * 32-bit words) blocks: 1 (IV) + 1 (keyMode) + 15 (AES-256 roundKeys) */
+#define AES_NUM_IVMRK_WORDS ((1 + 1 + 15) * 4)
+
+/* aes - 16-byte aligned pointer to keyMode+roundKeys sequence */
+/* keySize = 16 or 24 or 32 (bytes) */
+typedef void (MY_FAST_CALL *AES_SET_KEY_FUNC)(UInt32 *aes, const Byte *key, unsigned keySize);
+void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *aes, const Byte *key, unsigned keySize);
+void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *aes, const Byte *key, unsigned keySize);
+
+/* ivAes - 16-byte aligned pointer to iv+keyMode+roundKeys sequence: UInt32[AES_NUM_IVMRK_WORDS] */
+void AesCbc_Init(UInt32 *ivAes, const Byte *iv); /* iv size is AES_BLOCK_SIZE */
+/* data - 16-byte aligned pointer to data */
+/* numBlocks - the number of 16-byte blocks in data array */
+typedef void (MY_FAST_CALL *AES_CODE_FUNC)(UInt32 *ivAes, Byte *data, size_t numBlocks);
+extern AES_CODE_FUNC g_AesCbc_Encode;
+extern AES_CODE_FUNC g_AesCbc_Decode;
+extern AES_CODE_FUNC g_AesCtr_Code;
+
+EXTERN_C_END
+
+#endif
diff --git a/3rdparty/lzma/C/AesOpt.c b/3rdparty/lzma/C/AesOpt.c
new file mode 100644
index 00000000000..10a8fb25c51
--- /dev/null
+++ b/3rdparty/lzma/C/AesOpt.c
@@ -0,0 +1,184 @@
+/* AesOpt.c -- Intel's AES
+2013-11-12 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
+
+#include "CpuArch.h"
+
+#ifdef MY_CPU_X86_OR_AMD64
+#if _MSC_VER >= 1500
+#define USE_INTEL_AES
+#endif
+#endif
+
+#ifdef USE_INTEL_AES
+
+#include <wmmintrin.h>
+
+void MY_FAST_CALL AesCbc_Encode_Intel(__m128i *p, __m128i *data, size_t numBlocks)
+{
+ __m128i m = *p;
+ for (; numBlocks != 0; numBlocks--, data++)
+ {
+ UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1;
+ const __m128i *w = p + 3;
+ m = _mm_xor_si128(m, *data);
+ m = _mm_xor_si128(m, p[2]);
+ do
+ {
+ m = _mm_aesenc_si128(m, w[0]);
+ m = _mm_aesenc_si128(m, w[1]);
+ w += 2;
+ }
+ while (--numRounds2 != 0);
+ m = _mm_aesenc_si128(m, w[0]);
+ m = _mm_aesenclast_si128(m, w[1]);
+ *data = m;
+ }
+ *p = m;
+}
+
+#define NUM_WAYS 3
+
+#define AES_OP_W(op, n) { \
+ const __m128i t = w[n]; \
+ m0 = op(m0, t); \
+ m1 = op(m1, t); \
+ m2 = op(m2, t); \
+ }
+
+#define AES_DEC(n) AES_OP_W(_mm_aesdec_si128, n)
+#define AES_DEC_LAST(n) AES_OP_W(_mm_aesdeclast_si128, n)
+#define AES_ENC(n) AES_OP_W(_mm_aesenc_si128, n)
+#define AES_ENC_LAST(n) AES_OP_W(_mm_aesenclast_si128, n)
+
+void MY_FAST_CALL AesCbc_Decode_Intel(__m128i *p, __m128i *data, size_t numBlocks)
+{
+ __m128i iv = *p;
+ for (; numBlocks >= NUM_WAYS; numBlocks -= NUM_WAYS, data += NUM_WAYS)
+ {
+ UInt32 numRounds2 = *(const UInt32 *)(p + 1);
+ const __m128i *w = p + numRounds2 * 2;
+ __m128i m0, m1, m2;
+ {
+ const __m128i t = w[2];
+ m0 = _mm_xor_si128(t, data[0]);
+ m1 = _mm_xor_si128(t, data[1]);
+ m2 = _mm_xor_si128(t, data[2]);
+ }
+ numRounds2--;
+ do
+ {
+ AES_DEC(1)
+ AES_DEC(0)
+ w -= 2;
+ }
+ while (--numRounds2 != 0);
+ AES_DEC(1)
+ AES_DEC_LAST(0)
+
+ {
+ __m128i t;
+ t = _mm_xor_si128(m0, iv); iv = data[0]; data[0] = t;
+ t = _mm_xor_si128(m1, iv); iv = data[1]; data[1] = t;
+ t = _mm_xor_si128(m2, iv); iv = data[2]; data[2] = t;
+ }
+ }
+ for (; numBlocks != 0; numBlocks--, data++)
+ {
+ UInt32 numRounds2 = *(const UInt32 *)(p + 1);
+ const __m128i *w = p + numRounds2 * 2;
+ __m128i m = _mm_xor_si128(w[2], *data);
+ numRounds2--;
+ do
+ {
+ m = _mm_aesdec_si128(m, w[1]);
+ m = _mm_aesdec_si128(m, w[0]);
+ w -= 2;
+ }
+ while (--numRounds2 != 0);
+ m = _mm_aesdec_si128(m, w[1]);
+ m = _mm_aesdeclast_si128(m, w[0]);
+
+ m = _mm_xor_si128(m, iv);
+ iv = *data;
+ *data = m;
+ }
+ *p = iv;
+}
+
+void MY_FAST_CALL AesCtr_Code_Intel(__m128i *p, __m128i *data, size_t numBlocks)
+{
+ __m128i ctr = *p;
+ __m128i one;
+ one.m128i_u64[0] = 1;
+ one.m128i_u64[1] = 0;
+ for (; numBlocks >= NUM_WAYS; numBlocks -= NUM_WAYS, data += NUM_WAYS)
+ {
+ UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1;
+ const __m128i *w = p;
+ __m128i m0, m1, m2;
+ {
+ const __m128i t = w[2];
+ ctr = _mm_add_epi64(ctr, one); m0 = _mm_xor_si128(ctr, t);
+ ctr = _mm_add_epi64(ctr, one); m1 = _mm_xor_si128(ctr, t);
+ ctr = _mm_add_epi64(ctr, one); m2 = _mm_xor_si128(ctr, t);
+ }
+ w += 3;
+ do
+ {
+ AES_ENC(0)
+ AES_ENC(1)
+ w += 2;
+ }
+ while (--numRounds2 != 0);
+ AES_ENC(0)
+ AES_ENC_LAST(1)
+ data[0] = _mm_xor_si128(data[0], m0);
+ data[1] = _mm_xor_si128(data[1], m1);
+ data[2] = _mm_xor_si128(data[2], m2);
+ }
+ for (; numBlocks != 0; numBlocks--, data++)
+ {
+ UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1;
+ const __m128i *w = p;
+ __m128i m;
+ ctr = _mm_add_epi64(ctr, one);
+ m = _mm_xor_si128(ctr, p[2]);
+ w += 3;
+ do
+ {
+ m = _mm_aesenc_si128(m, w[0]);
+ m = _mm_aesenc_si128(m, w[1]);
+ w += 2;
+ }
+ while (--numRounds2 != 0);
+ m = _mm_aesenc_si128(m, w[0]);
+ m = _mm_aesenclast_si128(m, w[1]);
+ *data = _mm_xor_si128(*data, m);
+ }
+ *p = ctr;
+}
+
+#else
+
+void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks);
+
+void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *p, Byte *data, size_t numBlocks)
+{
+ AesCbc_Encode(p, data, numBlocks);
+}
+
+void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *p, Byte *data, size_t numBlocks)
+{
+ AesCbc_Decode(p, data, numBlocks);
+}
+
+void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *p, Byte *data, size_t numBlocks)
+{
+ AesCtr_Code(p, data, numBlocks);
+}
+
+#endif
diff --git a/3rdparty/lzma/C/Alloc.c b/3rdparty/lzma/C/Alloc.c
index df7412afe79..3f6ac41918e 100644
--- a/3rdparty/lzma/C/Alloc.c
+++ b/3rdparty/lzma/C/Alloc.c
@@ -1,9 +1,9 @@
/* Alloc.c -- Memory allocation functions
-2008-09-24
-Igor Pavlov
-Public domain */
+2015-02-21 : Igor Pavlov : Public domain */
-#ifdef _WIN32_7Z
+#include "Precomp.h"
+
+#ifdef _WIN32
#include <windows.h>
#endif
#include <stdlib.h>
@@ -44,7 +44,7 @@ void MyFree(void *address)
free(address);
}
-#ifdef _WIN32_7Z
+#ifdef _WIN32
void *MidAlloc(size_t size)
{
@@ -125,3 +125,12 @@ void BigFree(void *address)
}
#endif
+
+
+static void *SzAlloc(void *p, size_t size) { UNUSED_VAR(p); return MyAlloc(size); }
+static void SzFree(void *p, void *address) { UNUSED_VAR(p); MyFree(address); }
+ISzAlloc g_Alloc = { SzAlloc, SzFree };
+
+static void *SzBigAlloc(void *p, size_t size) { UNUSED_VAR(p); return BigAlloc(size); }
+static void SzBigFree(void *p, void *address) { UNUSED_VAR(p); BigFree(address); }
+ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree };
diff --git a/3rdparty/lzma/C/Alloc.h b/3rdparty/lzma/C/Alloc.h
index 4b73481f4c6..bac0d87e2a0 100644
--- a/3rdparty/lzma/C/Alloc.h
+++ b/3rdparty/lzma/C/Alloc.h
@@ -1,19 +1,17 @@
/* Alloc.h -- Memory allocation functions
-2009-02-07 : Igor Pavlov : Public domain */
+2015-02-21 : Igor Pavlov : Public domain */
#ifndef __COMMON_ALLOC_H
#define __COMMON_ALLOC_H
-#include <stddef.h>
+#include "7zTypes.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
void *MyAlloc(size_t size);
void MyFree(void *address);
-#ifdef _WIN32_7Z
+#ifdef _WIN32
void SetLargePageSize();
@@ -31,8 +29,9 @@ void BigFree(void *address);
#endif
-#ifdef __cplusplus
-}
-#endif
+extern ISzAlloc g_Alloc;
+extern ISzAlloc g_BigAlloc;
+
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/Bcj2.c b/3rdparty/lzma/C/Bcj2.c
index 20199ce5659..3c88e44fc1f 100644
--- a/3rdparty/lzma/C/Bcj2.c
+++ b/3rdparty/lzma/C/Bcj2.c
@@ -1,132 +1,256 @@
-/* Bcj2.c -- Converter for x86 code (BCJ2)
-2008-10-04 : Igor Pavlov : Public domain */
+/* Bcj2.c -- BCJ2 Decoder (Converter for x86 code)
+2015-08-01 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "Bcj2.h"
+#include "CpuArch.h"
-#ifdef _LZMA_PROB32
-#define CProb UInt32
-#else
#define CProb UInt16
-#endif
-
-#define IsJcc(b0, b1) ((b0) == 0x0F && ((b1) & 0xF0) == 0x80)
-#define IsJ(b0, b1) ((b1 & 0xFE) == 0xE8 || IsJcc(b0, b1))
-
-#define kNumTopBits 24
-#define kTopValue ((UInt32)1 << kNumTopBits)
-#define kNumBitModelTotalBits 11
-#define kBitModelTotal (1 << kNumBitModelTotalBits)
+#define kTopValue ((UInt32)1 << 24)
+#define kNumModelBits 11
+#define kBitModelTotal (1 << kNumModelBits)
#define kNumMoveBits 5
-#define RC_READ_BYTE (*buffer++)
-#define RC_TEST { if (buffer == bufferLim) return SZ_ERROR_DATA; }
-#define RC_INIT2 code = 0; range = 0xFFFFFFFF; \
- { int i; for (i = 0; i < 5; i++) { RC_TEST; code = (code << 8) | RC_READ_BYTE; }}
+#define _IF_BIT_0 ttt = *prob; bound = (p->range >> kNumModelBits) * ttt; if (p->code < bound)
+#define _UPDATE_0 p->range = bound; *prob = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
+#define _UPDATE_1 p->range -= bound; p->code -= bound; *prob = (CProb)(ttt - (ttt >> kNumMoveBits));
-#define NORMALIZE if (range < kTopValue) { RC_TEST; range <<= 8; code = (code << 8) | RC_READ_BYTE; }
-
-#define IF_BIT_0(p) ttt = *(p); bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
-#define UPDATE_0(p) range = bound; *(p) = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); NORMALIZE;
-#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CProb)(ttt - (ttt >> kNumMoveBits)); NORMALIZE;
-
-int Bcj2_Decode(
- const Byte *buf0, SizeT size0,
- const Byte *buf1, SizeT size1,
- const Byte *buf2, SizeT size2,
- const Byte *buf3, SizeT size3,
- Byte *outBuf, SizeT outSize)
+void Bcj2Dec_Init(CBcj2Dec *p)
{
- CProb p[256 + 2];
- SizeT inPos = 0, outPos = 0;
-
- const Byte *buffer, *bufferLim;
- UInt32 range, code;
- Byte prevByte = 0;
+ unsigned i;
- unsigned int i;
- for (i = 0; i < sizeof(p) / sizeof(p[0]); i++)
- p[i] = kBitModelTotal >> 1;
-
- buffer = buf3;
- bufferLim = buffer + size3;
- RC_INIT2
+ p->state = BCJ2_DEC_STATE_OK;
+ p->ip = 0;
+ p->temp[3] = 0;
+ p->range = 0;
+ p->code = 0;
+ for (i = 0; i < sizeof(p->probs) / sizeof(p->probs[0]); i++)
+ p->probs[i] = kBitModelTotal >> 1;
+}
- if (outSize == 0)
- return SZ_OK;
+SRes Bcj2Dec_Decode(CBcj2Dec *p)
+{
+ if (p->range <= 5)
+ {
+ p->state = BCJ2_DEC_STATE_OK;
+ for (; p->range != 5; p->range++)
+ {
+ if (p->range == 1 && p->code != 0)
+ return SZ_ERROR_DATA;
+
+ if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC])
+ {
+ p->state = BCJ2_STREAM_RC;
+ return SZ_OK;
+ }
- for (;;)
+ p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++;
+ }
+
+ if (p->code == 0xFFFFFFFF)
+ return SZ_ERROR_DATA;
+
+ p->range = 0xFFFFFFFF;
+ }
+ else if (p->state >= BCJ2_DEC_STATE_ORIG_0)
{
- Byte b;
- CProb *prob;
- UInt32 bound;
- UInt32 ttt;
-
- SizeT limit = size0 - inPos;
- if (outSize - outPos < limit)
- limit = outSize - outPos;
- while (limit != 0)
+ while (p->state <= BCJ2_DEC_STATE_ORIG_3)
{
- Byte b = buf0[inPos];
- outBuf[outPos++] = b;
- if (IsJ(prevByte, b))
- break;
- inPos++;
- prevByte = b;
- limit--;
+ Byte *dest = p->dest;
+ if (dest == p->destLim)
+ return SZ_OK;
+ *dest = p->temp[p->state++ - BCJ2_DEC_STATE_ORIG_0];
+ p->dest = dest + 1;
}
+ }
- if (limit == 0 || outPos == outSize)
- break;
-
- b = buf0[inPos++];
-
- if (b == 0xE8)
- prob = p + prevByte;
- else if (b == 0xE9)
- prob = p + 256;
- else
- prob = p + 257;
-
- IF_BIT_0(prob)
+ /*
+ if (BCJ2_IS_32BIT_STREAM(p->state))
+ {
+ const Byte *cur = p->bufs[p->state];
+ if (cur == p->lims[p->state])
+ return SZ_OK;
+ p->bufs[p->state] = cur + 4;
+
{
- UPDATE_0(prob)
- prevByte = b;
+ UInt32 val;
+ Byte *dest;
+ SizeT rem;
+
+ p->ip += 4;
+ val = GetBe32(cur) - p->ip;
+ dest = p->dest;
+ rem = p->destLim - dest;
+ if (rem < 4)
+ {
+ SizeT i;
+ SetUi32(p->temp, val);
+ for (i = 0; i < rem; i++)
+ dest[i] = p->temp[i];
+ p->dest = dest + rem;
+ p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem;
+ return SZ_OK;
+ }
+ SetUi32(dest, val);
+ p->temp[3] = (Byte)(val >> 24);
+ p->dest = dest + 4;
+ p->state = BCJ2_DEC_STATE_OK;
}
+ }
+ */
+
+ for (;;)
+ {
+ if (BCJ2_IS_32BIT_STREAM(p->state))
+ p->state = BCJ2_DEC_STATE_OK;
else
{
- UInt32 dest;
- const Byte *v;
- UPDATE_1(prob)
- if (b == 0xE8)
+ if (p->range < kTopValue)
{
- v = buf1;
- if (size1 < 4)
- return SZ_ERROR_DATA;
- buf1 += 4;
- size1 -= 4;
+ if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC])
+ {
+ p->state = BCJ2_STREAM_RC;
+ return SZ_OK;
+ }
+ p->range <<= 8;
+ p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++;
}
- else
+
{
- v = buf2;
- if (size2 < 4)
- return SZ_ERROR_DATA;
- buf2 += 4;
- size2 -= 4;
+ const Byte *src = p->bufs[BCJ2_STREAM_MAIN];
+ const Byte *srcLim;
+ Byte *dest;
+ SizeT num = p->lims[BCJ2_STREAM_MAIN] - src;
+
+ if (num == 0)
+ {
+ p->state = BCJ2_STREAM_MAIN;
+ return SZ_OK;
+ }
+
+ dest = p->dest;
+ if (num > (SizeT)(p->destLim - dest))
+ {
+ num = p->destLim - dest;
+ if (num == 0)
+ {
+ p->state = BCJ2_DEC_STATE_ORIG;
+ return SZ_OK;
+ }
+ }
+
+ srcLim = src + num;
+
+ if (p->temp[3] == 0x0F && (src[0] & 0xF0) == 0x80)
+ *dest = src[0];
+ else for (;;)
+ {
+ Byte b = *src;
+ *dest = b;
+ if (b != 0x0F)
+ {
+ if ((b & 0xFE) == 0xE8)
+ break;
+ dest++;
+ if (++src != srcLim)
+ continue;
+ break;
+ }
+ dest++;
+ if (++src == srcLim)
+ break;
+ if ((*src & 0xF0) != 0x80)
+ continue;
+ *dest = *src;
+ break;
+ }
+
+ num = src - p->bufs[BCJ2_STREAM_MAIN];
+
+ if (src == srcLim)
+ {
+ p->temp[3] = src[-1];
+ p->bufs[BCJ2_STREAM_MAIN] = src;
+ p->ip += (UInt32)num;
+ p->dest += num;
+ p->state =
+ p->bufs[BCJ2_STREAM_MAIN] ==
+ p->lims[BCJ2_STREAM_MAIN] ?
+ (unsigned)BCJ2_STREAM_MAIN :
+ (unsigned)BCJ2_DEC_STATE_ORIG;
+ return SZ_OK;
+ }
+
+ {
+ UInt32 bound, ttt;
+ CProb *prob;
+ Byte b = src[0];
+ Byte prev = (Byte)(num == 0 ? p->temp[3] : src[-1]);
+
+ p->temp[3] = b;
+ p->bufs[BCJ2_STREAM_MAIN] = src + 1;
+ num++;
+ p->ip += (UInt32)num;
+ p->dest += num;
+
+ prob = p->probs + (unsigned)(b == 0xE8 ? 2 + (unsigned)prev : (b == 0xE9 ? 1 : 0));
+
+ _IF_BIT_0
+ {
+ _UPDATE_0
+ continue;
+ }
+ _UPDATE_1
+
+ }
}
- dest = (((UInt32)v[0] << 24) | ((UInt32)v[1] << 16) |
- ((UInt32)v[2] << 8) | ((UInt32)v[3])) - ((UInt32)outPos + 4);
- outBuf[outPos++] = (Byte)dest;
- if (outPos == outSize)
- break;
- outBuf[outPos++] = (Byte)(dest >> 8);
- if (outPos == outSize)
+ }
+
+ {
+ UInt32 val;
+ unsigned cj = (p->temp[3] == 0xE8) ? BCJ2_STREAM_CALL : BCJ2_STREAM_JUMP;
+ const Byte *cur = p->bufs[cj];
+ Byte *dest;
+ SizeT rem;
+
+ if (cur == p->lims[cj])
+ {
+ p->state = cj;
break;
- outBuf[outPos++] = (Byte)(dest >> 16);
- if (outPos == outSize)
+ }
+
+ val = GetBe32(cur);
+ p->bufs[cj] = cur + 4;
+
+ p->ip += 4;
+ val -= p->ip;
+ dest = p->dest;
+ rem = p->destLim - dest;
+
+ if (rem < 4)
+ {
+ SizeT i;
+ SetUi32(p->temp, val);
+ for (i = 0; i < rem; i++)
+ dest[i] = p->temp[i];
+ p->dest = dest + rem;
+ p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem;
break;
- outBuf[outPos++] = prevByte = (Byte)(dest >> 24);
+ }
+
+ SetUi32(dest, val);
+ p->temp[3] = (Byte)(val >> 24);
+ p->dest = dest + 4;
}
}
- return (outPos == outSize) ? SZ_OK : SZ_ERROR_DATA;
+
+ if (p->range < kTopValue && p->bufs[BCJ2_STREAM_RC] != p->lims[BCJ2_STREAM_RC])
+ {
+ p->range <<= 8;
+ p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++;
+ }
+
+ return SZ_OK;
}
diff --git a/3rdparty/lzma/C/Bcj2.h b/3rdparty/lzma/C/Bcj2.h
index dbc054148d2..8824080acfb 100644
--- a/3rdparty/lzma/C/Bcj2.h
+++ b/3rdparty/lzma/C/Bcj2.h
@@ -1,38 +1,146 @@
-/* Bcj2.h -- Converter for x86 code (BCJ2)
-2009-02-07 : Igor Pavlov : Public domain */
+/* Bcj2.h -- BCJ2 Converter for x86 code
+2014-11-10 : Igor Pavlov : Public domain */
#ifndef __BCJ2_H
#define __BCJ2_H
-#include "Types.h"
+#include "7zTypes.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
-/*
-Conditions:
- outSize <= FullOutputSize,
- where FullOutputSize is full size of output stream of x86_2 filter.
+#define BCJ2_NUM_STREAMS 4
+
+enum
+{
+ BCJ2_STREAM_MAIN,
+ BCJ2_STREAM_CALL,
+ BCJ2_STREAM_JUMP,
+ BCJ2_STREAM_RC
+};
+
+enum
+{
+ BCJ2_DEC_STATE_ORIG_0 = BCJ2_NUM_STREAMS,
+ BCJ2_DEC_STATE_ORIG_1,
+ BCJ2_DEC_STATE_ORIG_2,
+ BCJ2_DEC_STATE_ORIG_3,
+
+ BCJ2_DEC_STATE_ORIG,
+ BCJ2_DEC_STATE_OK
+};
-If buf0 overlaps outBuf, there are two required conditions:
- 1) (buf0 >= outBuf)
- 2) (buf0 + size0 >= outBuf + FullOutputSize).
+enum
+{
+ BCJ2_ENC_STATE_ORIG = BCJ2_NUM_STREAMS,
+ BCJ2_ENC_STATE_OK
+};
+
+
+#define BCJ2_IS_32BIT_STREAM(s) ((s) == BCJ2_STREAM_CALL || (s) == BCJ2_STREAM_JUMP)
+
+/*
+CBcj2Dec / CBcj2Enc
+bufs sizes:
+ BUF_SIZE(n) = lims[n] - bufs[n]
+bufs sizes for BCJ2_STREAM_CALL and BCJ2_STREAM_JUMP must be mutliply of 4:
+ (BUF_SIZE(BCJ2_STREAM_CALL) & 3) == 0
+ (BUF_SIZE(BCJ2_STREAM_JUMP) & 3) == 0
+*/
-Returns:
- SZ_OK
- SZ_ERROR_DATA - Data error
+/*
+CBcj2Dec:
+dest is allowed to overlap with bufs[BCJ2_STREAM_MAIN], with the following conditions:
+ bufs[BCJ2_STREAM_MAIN] >= dest &&
+ bufs[BCJ2_STREAM_MAIN] - dest >= tempReserv +
+ BUF_SIZE(BCJ2_STREAM_CALL) +
+ BUF_SIZE(BCJ2_STREAM_JUMP)
+ tempReserv = 0 : for first call of Bcj2Dec_Decode
+ tempReserv = 4 : for any other calls of Bcj2Dec_Decode
+ overlap with offset = 1 is not allowed
*/
-int Bcj2_Decode(
- const Byte *buf0, SizeT size0,
- const Byte *buf1, SizeT size1,
- const Byte *buf2, SizeT size2,
- const Byte *buf3, SizeT size3,
- Byte *outBuf, SizeT outSize);
+typedef struct
+{
+ const Byte *bufs[BCJ2_NUM_STREAMS];
+ const Byte *lims[BCJ2_NUM_STREAMS];
+ Byte *dest;
+ const Byte *destLim;
-#ifdef __cplusplus
-}
-#endif
+ unsigned state; /* BCJ2_STREAM_MAIN has more priority than BCJ2_STATE_ORIG */
+
+ UInt32 ip;
+ Byte temp[4];
+ UInt32 range;
+ UInt32 code;
+ UInt16 probs[2 + 256];
+} CBcj2Dec;
+
+void Bcj2Dec_Init(CBcj2Dec *p);
+
+/* Returns: SZ_OK or SZ_ERROR_DATA */
+SRes Bcj2Dec_Decode(CBcj2Dec *p);
+
+#define Bcj2Dec_IsFinished(_p_) ((_p_)->code == 0)
+
+
+
+typedef enum
+{
+ BCJ2_ENC_FINISH_MODE_CONTINUE,
+ BCJ2_ENC_FINISH_MODE_END_BLOCK,
+ BCJ2_ENC_FINISH_MODE_END_STREAM
+} EBcj2Enc_FinishMode;
+
+typedef struct
+{
+ Byte *bufs[BCJ2_NUM_STREAMS];
+ const Byte *lims[BCJ2_NUM_STREAMS];
+ const Byte *src;
+ const Byte *srcLim;
+
+ unsigned state;
+ EBcj2Enc_FinishMode finishMode;
+
+ Byte prevByte;
+
+ Byte cache;
+ UInt32 range;
+ UInt64 low;
+ UInt64 cacheSize;
+
+ UInt32 ip;
+
+ /* 32-bit ralative offset in JUMP/CALL commands is
+ - (mod 4 GB) in 32-bit mode
+ - signed Int32 in 64-bit mode
+ We use (mod 4 GB) check for fileSize.
+ Use fileSize up to 2 GB, if you want to support 32-bit and 64-bit code conversion. */
+ UInt32 fileIp;
+ UInt32 fileSize; /* (fileSize <= ((UInt32)1 << 31)), 0 means no_limit */
+ UInt32 relatLimit; /* (relatLimit <= ((UInt32)1 << 31)), 0 means desable_conversion */
+
+ UInt32 tempTarget;
+ unsigned tempPos;
+ Byte temp[4 * 2];
+
+ unsigned flushPos;
+
+ UInt16 probs[2 + 256];
+} CBcj2Enc;
+
+void Bcj2Enc_Init(CBcj2Enc *p);
+void Bcj2Enc_Encode(CBcj2Enc *p);
+
+#define Bcj2Enc_Get_InputData_Size(p) ((SizeT)((p)->srcLim - (p)->src) + (p)->tempPos)
+#define Bcj2Enc_IsFinished(p) ((p)->flushPos == 5)
+
+
+#define BCJ2_RELAT_LIMIT_NUM_BITS 26
+#define BCJ2_RELAT_LIMIT ((UInt32)1 << BCJ2_RELAT_LIMIT_NUM_BITS)
+
+/* limit for CBcj2Enc::fileSize variable */
+#define BCJ2_FileSize_MAX ((UInt32)1 << 31)
+
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/Bcj2Enc.c b/3rdparty/lzma/C/Bcj2Enc.c
new file mode 100644
index 00000000000..0ea36462cbe
--- /dev/null
+++ b/3rdparty/lzma/C/Bcj2Enc.c
@@ -0,0 +1,312 @@
+/* Bcj2Enc.c -- BCJ2 Encoder (Converter for x86 code)
+2014-11-10 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
+
+/* #define SHOW_STAT */
+
+#ifdef SHOW_STAT
+#include <stdio.h>
+#define PRF(x) x
+#else
+#define PRF(x)
+#endif
+
+#include <windows.h>
+#include <string.h>
+
+#include "Bcj2.h"
+#include "CpuArch.h"
+
+#define CProb UInt16
+
+#define kTopValue ((UInt32)1 << 24)
+#define kNumModelBits 11
+#define kBitModelTotal (1 << kNumModelBits)
+#define kNumMoveBits 5
+
+void Bcj2Enc_Init(CBcj2Enc *p)
+{
+ unsigned i;
+
+ p->state = BCJ2_ENC_STATE_OK;
+ p->finishMode = BCJ2_ENC_FINISH_MODE_CONTINUE;
+
+ p->prevByte = 0;
+
+ p->cache = 0;
+ p->range = 0xFFFFFFFF;
+ p->low = 0;
+ p->cacheSize = 1;
+
+ p->ip = 0;
+
+ p->fileIp = 0;
+ p->fileSize = 0;
+ p->relatLimit = BCJ2_RELAT_LIMIT;
+
+ p->tempPos = 0;
+
+ p->flushPos = 0;
+
+ for (i = 0; i < sizeof(p->probs) / sizeof(p->probs[0]); i++)
+ p->probs[i] = kBitModelTotal >> 1;
+}
+
+static Bool MY_FAST_CALL RangeEnc_ShiftLow(CBcj2Enc *p)
+{
+ if ((UInt32)p->low < (UInt32)0xFF000000 || (UInt32)(p->low >> 32) != 0)
+ {
+ Byte *buf = p->bufs[BCJ2_STREAM_RC];
+ do
+ {
+ if (buf == p->lims[BCJ2_STREAM_RC])
+ {
+ p->state = BCJ2_STREAM_RC;
+ p->bufs[BCJ2_STREAM_RC] = buf;
+ return True;
+ }
+ *buf++ = (Byte)(p->cache + (Byte)(p->low >> 32));
+ p->cache = 0xFF;
+ }
+ while (--p->cacheSize);
+ p->bufs[BCJ2_STREAM_RC] = buf;
+ p->cache = (Byte)((UInt32)p->low >> 24);
+ }
+ p->cacheSize++;
+ p->low = (UInt32)p->low << 8;
+ return False;
+}
+
+static void Bcj2Enc_Encode_2(CBcj2Enc *p)
+{
+ if (BCJ2_IS_32BIT_STREAM(p->state))
+ {
+ Byte *cur = p->bufs[p->state];
+ if (cur == p->lims[p->state])
+ return;
+ SetBe32(cur, p->tempTarget);
+ p->bufs[p->state] = cur + 4;
+ }
+
+ p->state = BCJ2_ENC_STATE_ORIG;
+
+ for (;;)
+ {
+ if (p->range < kTopValue)
+ {
+ if (RangeEnc_ShiftLow(p))
+ return;
+ p->range <<= 8;
+ }
+
+ {
+ {
+ const Byte *src = p->src;
+ const Byte *srcLim;
+ Byte *dest;
+ SizeT num = p->srcLim - src;
+
+ if (p->finishMode == BCJ2_ENC_FINISH_MODE_CONTINUE)
+ {
+ if (num <= 4)
+ return;
+ num -= 4;
+ }
+ else if (num == 0)
+ break;
+
+ dest = p->bufs[BCJ2_STREAM_MAIN];
+ if (num > (SizeT)(p->lims[BCJ2_STREAM_MAIN] - dest))
+ {
+ num = p->lims[BCJ2_STREAM_MAIN] - dest;
+ if (num == 0)
+ {
+ p->state = BCJ2_STREAM_MAIN;
+ return;
+ }
+ }
+
+ srcLim = src + num;
+
+ if (p->prevByte == 0x0F && (src[0] & 0xF0) == 0x80)
+ *dest = src[0];
+ else for (;;)
+ {
+ Byte b = *src;
+ *dest = b;
+ if (b != 0x0F)
+ {
+ if ((b & 0xFE) == 0xE8)
+ break;
+ dest++;
+ if (++src != srcLim)
+ continue;
+ break;
+ }
+ dest++;
+ if (++src == srcLim)
+ break;
+ if ((*src & 0xF0) != 0x80)
+ continue;
+ *dest = *src;
+ break;
+ }
+
+ num = src - p->src;
+
+ if (src == srcLim)
+ {
+ p->prevByte = src[-1];
+ p->bufs[BCJ2_STREAM_MAIN] = dest;
+ p->src = src;
+ p->ip += (UInt32)num;
+ continue;
+ }
+
+ {
+ Byte context = (Byte)(num == 0 ? p->prevByte : src[-1]);
+ Bool needConvert;
+
+ p->bufs[BCJ2_STREAM_MAIN] = dest + 1;
+ p->ip += (UInt32)num + 1;
+ src++;
+
+ needConvert = False;
+
+ if ((SizeT)(p->srcLim - src) >= 4)
+ {
+ UInt32 relatVal = GetUi32(src);
+ if ((p->fileSize == 0 || (UInt32)(p->ip + 4 + relatVal - p->fileIp) < p->fileSize)
+ && ((relatVal + p->relatLimit) >> 1) < p->relatLimit)
+ needConvert = True;
+ }
+
+ {
+ UInt32 bound;
+ unsigned ttt;
+ Byte b = src[-1];
+ CProb *prob = p->probs + (unsigned)(b == 0xE8 ? 2 + (unsigned)context : (b == 0xE9 ? 1 : 0));
+
+ ttt = *prob;
+ bound = (p->range >> kNumModelBits) * ttt;
+
+ if (!needConvert)
+ {
+ p->range = bound;
+ *prob = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
+ p->src = src;
+ p->prevByte = b;
+ continue;
+ }
+
+ p->low += bound;
+ p->range -= bound;
+ *prob = (CProb)(ttt - (ttt >> kNumMoveBits));
+
+ {
+ UInt32 relatVal = GetUi32(src);
+ UInt32 absVal;
+ p->ip += 4;
+ absVal = p->ip + relatVal;
+ p->prevByte = src[3];
+ src += 4;
+ p->src = src;
+ {
+ unsigned cj = (b == 0xE8) ? BCJ2_STREAM_CALL : BCJ2_STREAM_JUMP;
+ Byte *cur = p->bufs[cj];
+ if (cur == p->lims[cj])
+ {
+ p->state = cj;
+ p->tempTarget = absVal;
+ return;
+ }
+ SetBe32(cur, absVal);
+ p->bufs[cj] = cur + 4;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (p->finishMode != BCJ2_ENC_FINISH_MODE_END_STREAM)
+ return;
+
+ for (; p->flushPos < 5; p->flushPos++)
+ if (RangeEnc_ShiftLow(p))
+ return;
+ p->state = BCJ2_ENC_STATE_OK;
+}
+
+
+void Bcj2Enc_Encode(CBcj2Enc *p)
+{
+ PRF(printf("\n"));
+ PRF(printf("---- ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src));
+
+ if (p->tempPos != 0)
+ {
+ unsigned extra = 0;
+
+ for (;;)
+ {
+ const Byte *src = p->src;
+ const Byte *srcLim = p->srcLim;
+ unsigned finishMode = p->finishMode;
+
+ p->src = p->temp;
+ p->srcLim = p->temp + p->tempPos;
+ if (src != srcLim)
+ p->finishMode = BCJ2_ENC_FINISH_MODE_CONTINUE;
+
+ PRF(printf(" ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src));
+
+ Bcj2Enc_Encode_2(p);
+
+ {
+ unsigned num = (unsigned)(p->src - p->temp);
+ unsigned tempPos = p->tempPos - num;
+ unsigned i;
+ p->tempPos = tempPos;
+ for (i = 0; i < tempPos; i++)
+ p->temp[i] = p->temp[i + num];
+
+ p->src = src;
+ p->srcLim = srcLim;
+ p->finishMode = finishMode;
+
+ if (p->state != BCJ2_ENC_STATE_ORIG || src == srcLim)
+ return;
+
+ if (extra >= tempPos)
+ {
+ p->src = src - tempPos;
+ p->tempPos = 0;
+ break;
+ }
+
+ p->temp[tempPos] = src[0];
+ p->tempPos = tempPos + 1;
+ p->src = src + 1;
+ extra++;
+ }
+ }
+ }
+
+ PRF(printf("++++ ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src));
+
+ Bcj2Enc_Encode_2(p);
+
+ if (p->state == BCJ2_ENC_STATE_ORIG)
+ {
+ const Byte *src = p->src;
+ unsigned rem = (unsigned)(p->srcLim - src);
+ unsigned i;
+ for (i = 0; i < rem; i++)
+ p->temp[i] = src[i];
+ p->tempPos = rem;
+ p->src = src + rem;
+ }
+}
diff --git a/3rdparty/lzma/C/Bra.c b/3rdparty/lzma/C/Bra.c
index 2e47b1413c1..cdb94569202 100644
--- a/3rdparty/lzma/C/Bra.c
+++ b/3rdparty/lzma/C/Bra.c
@@ -1,6 +1,8 @@
/* Bra.c -- Converters for RISC code
2010-04-16 : Igor Pavlov : Public domain */
+#include "Precomp.h"
+
#include "Bra.h"
SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
diff --git a/3rdparty/lzma/C/Bra.h b/3rdparty/lzma/C/Bra.h
index 5748c1c051d..855e37a6b50 100644
--- a/3rdparty/lzma/C/Bra.h
+++ b/3rdparty/lzma/C/Bra.h
@@ -1,14 +1,12 @@
/* Bra.h -- Branch converters for executables
-2009-02-07 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __BRA_H
#define __BRA_H
-#include "Types.h"
+#include "7zTypes.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
/*
These functions convert relative addresses to absolute addresses
@@ -61,8 +59,6 @@ SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
-#ifdef __cplusplus
-}
-#endif
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/Bra86.c b/3rdparty/lzma/C/Bra86.c
index 1ee0e709b88..6db15e7ecd3 100644
--- a/3rdparty/lzma/C/Bra86.c
+++ b/3rdparty/lzma/C/Bra86.c
@@ -1,85 +1,82 @@
/* Bra86.c -- Converter for x86 code (BCJ)
-2008-10-04 : Igor Pavlov : Public domain */
+2013-11-12 : Igor Pavlov : Public domain */
-#include "Bra.h"
+#include "Precomp.h"
-#define Test86MSByte(b) ((b) == 0 || (b) == 0xFF)
+#include "Bra.h"
-const Byte kMaskToAllowedStatus[8] = {1, 1, 1, 0, 1, 0, 0, 0};
-const Byte kMaskToBitNumber[8] = {0, 1, 2, 2, 3, 3, 3, 3};
+#define Test86MSByte(b) ((((b) + 1) & 0xFE) == 0)
SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding)
{
- SizeT bufferPos = 0, prevPosT;
- UInt32 prevMask = *state & 0x7;
+ SizeT pos = 0;
+ UInt32 mask = *state & 7;
if (size < 5)
return 0;
+ size -= 4;
ip += 5;
- prevPosT = (SizeT)0 - 1;
for (;;)
{
- Byte *p = data + bufferPos;
- Byte *limit = data + size - 4;
+ Byte *p = data + pos;
+ const Byte *limit = data + size;
for (; p < limit; p++)
if ((*p & 0xFE) == 0xE8)
break;
- bufferPos = (SizeT)(p - data);
- if (p >= limit)
- break;
- prevPosT = bufferPos - prevPosT;
- if (prevPosT > 3)
- prevMask = 0;
- else
+
{
- prevMask = (prevMask << ((int)prevPosT - 1)) & 0x7;
- if (prevMask != 0)
+ SizeT d = (SizeT)(p - data - pos);
+ pos = (SizeT)(p - data);
+ if (p >= limit)
{
- Byte b = p[4 - kMaskToBitNumber[prevMask]];
- if (!kMaskToAllowedStatus[prevMask] || Test86MSByte(b))
+ *state = (d > 2 ? 0 : mask >> (unsigned)d);
+ return pos;
+ }
+ if (d > 2)
+ mask = 0;
+ else
+ {
+ mask >>= (unsigned)d;
+ if (mask != 0 && (mask > 4 || mask == 3 || Test86MSByte(p[(mask >> 1) + 1])))
{
- prevPosT = bufferPos;
- prevMask = ((prevMask << 1) & 0x7) | 1;
- bufferPos++;
+ mask = (mask >> 1) | 4;
+ pos++;
continue;
}
}
}
- prevPosT = bufferPos;
if (Test86MSByte(p[4]))
{
- UInt32 src = ((UInt32)p[4] << 24) | ((UInt32)p[3] << 16) | ((UInt32)p[2] << 8) | ((UInt32)p[1]);
- UInt32 dest;
- for (;;)
+ UInt32 v = ((UInt32)p[4] << 24) | ((UInt32)p[3] << 16) | ((UInt32)p[2] << 8) | ((UInt32)p[1]);
+ UInt32 cur = ip + (UInt32)pos;
+ pos += 5;
+ if (encoding)
+ v += cur;
+ else
+ v -= cur;
+ if (mask != 0)
{
- Byte b;
- int index;
- if (encoding)
- dest = (ip + (UInt32)bufferPos) + src;
- else
- dest = src - (ip + (UInt32)bufferPos);
- if (prevMask == 0)
- break;
- index = kMaskToBitNumber[prevMask] * 8;
- b = (Byte)(dest >> (24 - index));
- if (!Test86MSByte(b))
- break;
- src = dest ^ ((1 << (32 - index)) - 1);
+ unsigned sh = (mask & 6) << 2;
+ if (Test86MSByte((Byte)(v >> sh)))
+ {
+ v ^= (((UInt32)0x100 << sh) - 1);
+ if (encoding)
+ v += cur;
+ else
+ v -= cur;
+ }
+ mask = 0;
}
- p[4] = (Byte)(~(((dest >> 24) & 1) - 1));
- p[3] = (Byte)(dest >> 16);
- p[2] = (Byte)(dest >> 8);
- p[1] = (Byte)dest;
- bufferPos += 5;
+ p[1] = (Byte)v;
+ p[2] = (Byte)(v >> 8);
+ p[3] = (Byte)(v >> 16);
+ p[4] = (Byte)(0 - ((v >> 24) & 1));
}
else
{
- prevMask = ((prevMask << 1) & 0x7) | 1;
- bufferPos++;
+ mask = (mask >> 1) | 4;
+ pos++;
}
}
- prevPosT = bufferPos - prevPosT;
- *state = ((prevPosT > 3) ? 0 : ((prevMask << ((int)prevPosT - 1)) & 0x7));
- return bufferPos;
}
diff --git a/3rdparty/lzma/C/BraIA64.c b/3rdparty/lzma/C/BraIA64.c
index 0b4ee85bc76..fa60356b288 100644
--- a/3rdparty/lzma/C/BraIA64.c
+++ b/3rdparty/lzma/C/BraIA64.c
@@ -1,5 +1,7 @@
/* BraIA64.c -- Converter for IA-64 code
-2008-10-04 : Igor Pavlov : Public domain */
+2013-11-12 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "Bra.h"
diff --git a/3rdparty/lzma/C/Compiler.h b/3rdparty/lzma/C/Compiler.h
new file mode 100644
index 00000000000..5bba7ee5618
--- /dev/null
+++ b/3rdparty/lzma/C/Compiler.h
@@ -0,0 +1,32 @@
+/* Compiler.h
+2015-08-02 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_COMPILER_H
+#define __7Z_COMPILER_H
+
+#ifdef _MSC_VER
+
+ #ifdef UNDER_CE
+ #define RPC_NO_WINDOWS_H
+ /* #pragma warning(disable : 4115) // '_RPC_ASYNC_STATE' : named type definition in parentheses */
+ #pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union
+ #pragma warning(disable : 4214) // nonstandard extension used : bit field types other than int
+ #endif
+
+ #if _MSC_VER >= 1300
+ #pragma warning(disable : 4996) // This function or variable may be unsafe
+ #else
+ #pragma warning(disable : 4511) // copy constructor could not be generated
+ #pragma warning(disable : 4512) // assignment operator could not be generated
+ #pragma warning(disable : 4514) // unreferenced inline function has been removed
+ #pragma warning(disable : 4702) // unreachable code
+ #pragma warning(disable : 4710) // not inlined
+ #pragma warning(disable : 4786) // identifier was truncated to '255' characters in the debug information
+ #endif
+
+#endif
+
+#define UNUSED_VAR(x) (void)x;
+/* #define UNUSED_VAR(x) x=x; */
+
+#endif
diff --git a/3rdparty/lzma/C/CpuArch.c b/3rdparty/lzma/C/CpuArch.c
index caf21643cef..36fc5bb4972 100644
--- a/3rdparty/lzma/C/CpuArch.c
+++ b/3rdparty/lzma/C/CpuArch.c
@@ -1,5 +1,7 @@
/* CpuArch.c -- CPU specific code
-2010-10-26: Igor Pavlov : Public domain */
+2015-03-25: Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "CpuArch.h"
@@ -9,6 +11,10 @@
#define USE_ASM
#endif
+#if !defined(USE_ASM) && _MSC_VER >= 1500
+#include <intrin.h>
+#endif
+
#if defined(USE_ASM) && !defined(MY_CPU_AMD64)
static UInt32 CheckFlag(UInt32 flag)
{
@@ -48,7 +54,7 @@ static UInt32 CheckFlag(UInt32 flag)
#define CHECK_CPUID_IS_SUPPORTED
#endif
-static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)
+void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)
{
#ifdef USE_ASM
@@ -72,28 +78,24 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)
#else
- #ifdef __PIC__
- __asm__ __volatile__ (
- "mov %%ebx, %%edi;"
- "cpuid;"
- "xchgl %%ebx, %%edi;"
- : "=a" (*a) ,
- "=D" (*b) , /* edi */
- "=c" (*c) ,
- "=d" (*d)
- : "0" (function)) ;
- #else // __PIC__
- __asm__ __volatile__ (
- "cpuid"
- : "=a" (*a) ,
- "=b" (*b) ,
- "=c" (*c) ,
- "=d" (*d)
- : "0" (function)) ;
- #endif // __PIC__
-
- #endif
+ __asm__ __volatile__ (
+ #if defined(MY_CPU_X86) && defined(__PIC__)
+ "mov %%ebx, %%edi;"
+ "cpuid;"
+ "xchgl %%ebx, %%edi;"
+ : "=a" (*a) ,
+ "=D" (*b) ,
+ #else
+ "cpuid"
+ : "=a" (*a) ,
+ "=b" (*b) ,
+ #endif
+ "=c" (*c) ,
+ "=d" (*d)
+ : "0" (function)) ;
+ #endif
+
#else
int CPUInfo[4];
@@ -114,7 +116,7 @@ Bool x86cpuid_CheckAndRead(Cx86cpuid *p)
return True;
}
-static UInt32 kVendors[][3] =
+static const UInt32 kVendors[][3] =
{
{ 0x756E6547, 0x49656E69, 0x6C65746E},
{ 0x68747541, 0x69746E65, 0x444D4163},
@@ -135,27 +137,38 @@ int x86cpuid_GetFirm(const Cx86cpuid *p)
return -1;
}
-Bool CPU_Is_InOrder(void)
+Bool CPU_Is_InOrder()
{
Cx86cpuid p;
int firm;
UInt32 family, model;
if (!x86cpuid_CheckAndRead(&p))
return True;
- family = x86cpuid_GetFamily(&p);
- model = x86cpuid_GetModel(&p);
+
+ family = x86cpuid_GetFamily(p.ver);
+ model = x86cpuid_GetModel(p.ver);
+
firm = x86cpuid_GetFirm(&p);
+
switch (firm)
{
- case CPU_FIRM_INTEL: return (family < 6 || (family == 6 && model == 0x100C));
+ case CPU_FIRM_INTEL: return (family < 6 || (family == 6 && (
+ /* In-Order Atom CPU */
+ model == 0x1C /* 45 nm, N4xx, D4xx, N5xx, D5xx, 230, 330 */
+ || model == 0x26 /* 45 nm, Z6xx */
+ || model == 0x27 /* 32 nm, Z2460 */
+ || model == 0x35 /* 32 nm, Z2760 */
+ || model == 0x36 /* 32 nm, N2xxx, D2xxx */
+ )));
case CPU_FIRM_AMD: return (family < 5 || (family == 5 && (model < 6 || model == 0xA)));
case CPU_FIRM_VIA: return (family < 6 || (family == 6 && model < 0xF));
}
return True;
}
-#if !defined(MY_CPU_AMD64) && defined(_WIN32_7Z)
-static Bool CPU_Sys_Is_SSE_Supported(void)
+#if !defined(MY_CPU_AMD64) && defined(_WIN32)
+#include <windows.h>
+static Bool CPU_Sys_Is_SSE_Supported()
{
OSVERSIONINFO vi;
vi.dwOSVersionInfoSize = sizeof(vi);
@@ -168,7 +181,7 @@ static Bool CPU_Sys_Is_SSE_Supported(void)
#define CHECK_SYS_SSE_SUPPORT
#endif
-Bool CPU_Is_Aes_Supported(void)
+Bool CPU_Is_Aes_Supported()
{
Cx86cpuid p;
CHECK_SYS_SSE_SUPPORT
diff --git a/3rdparty/lzma/C/CpuArch.h b/3rdparty/lzma/C/CpuArch.h
index 50a7467f639..f6a28ba7e67 100644
--- a/3rdparty/lzma/C/CpuArch.h
+++ b/3rdparty/lzma/C/CpuArch.h
@@ -1,27 +1,34 @@
/* CpuArch.h -- CPU specific code
-2010-12-01: Igor Pavlov : Public domain */
+2015-12-01: Igor Pavlov : Public domain */
#ifndef __CPU_ARCH_H
#define __CPU_ARCH_H
-#include "Types.h"
+#include "7zTypes.h"
EXTERN_C_BEGIN
/*
MY_CPU_LE means that CPU is LITTLE ENDIAN.
-If MY_CPU_LE is not defined, we don't know about that property of platform (it can be LITTLE ENDIAN).
+MY_CPU_BE means that CPU is BIG ENDIAN.
+If MY_CPU_LE and MY_CPU_BE are not defined, we don't know about ENDIANNESS of platform.
MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned memory accesses.
-If MY_CPU_LE_UNALIGN is not defined, we don't know about these properties of platform.
*/
-#if defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__)
-#define MY_CPU_AMD64
+#if defined(_M_X64) \
+ || defined(_M_AMD64) \
+ || defined(__x86_64__) \
+ || defined(__AMD64__) \
+ || defined(__amd64__)
+ #define MY_CPU_AMD64
#endif
-#ifdef PTR64
-#define MY_CPU_64BIT
+#if defined(MY_CPU_AMD64) \
+ || defined(_M_IA64) \
+ || defined(__AARCH64EL__) \
+ || defined(__AARCH64EB__)
+ #define MY_CPU_64BIT
#endif
#if defined(_M_IX86) || defined(__i386__)
@@ -32,46 +39,80 @@ If MY_CPU_LE_UNALIGN is not defined, we don't know about these properties of pla
#define MY_CPU_X86_OR_AMD64
#endif
-#if defined(MY_CPU_X86) || defined(_M_ARM)
-#define MY_CPU_32BIT
+#if defined(MY_CPU_X86) \
+ || defined(_M_ARM) \
+ || defined(__ARMEL__) \
+ || defined(__THUMBEL__) \
+ || defined(__ARMEB__) \
+ || defined(__THUMBEB__)
+ #define MY_CPU_32BIT
#endif
-#if defined(_WIN32_7Z) && defined(_M_ARM)
+#if defined(_WIN32) && defined(_M_ARM)
#define MY_CPU_ARM_LE
#endif
-#if defined(_WIN32_7Z) && defined(_M_IA64)
+#if defined(_WIN32) && defined(_M_IA64)
#define MY_CPU_IA64_LE
#endif
-#if defined(MY_CPU_X86_OR_AMD64)
-#define MY_CPU_LE_UNALIGN
+#if defined(MY_CPU_X86_OR_AMD64) \
+ || defined(MY_CPU_ARM_LE) \
+ || defined(MY_CPU_IA64_LE) \
+ || defined(__LITTLE_ENDIAN__) \
+ || defined(__ARMEL__) \
+ || defined(__THUMBEL__) \
+ || defined(__AARCH64EL__) \
+ || defined(__MIPSEL__) \
+ || defined(__MIPSEL) \
+ || defined(_MIPSEL) \
+ || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
+ #define MY_CPU_LE
#endif
-#if defined(MY_CPU_X86_OR_AMD64) || defined(MY_CPU_ARM_LE) || defined(MY_CPU_IA64_LE) || defined(__ARMEL__) || defined(__MIPSEL__) || defined(__LITTLE_ENDIAN__)
-#define MY_CPU_LE
-#endif
-
-#ifdef BIGENDIAN
-#define MY_CPU_BE
+#if defined(__BIG_ENDIAN__) \
+ || defined(__ARMEB__) \
+ || defined(__THUMBEB__) \
+ || defined(__AARCH64EB__) \
+ || defined(__MIPSEB__) \
+ || defined(__MIPSEB) \
+ || defined(_MIPSEB) \
+ || defined(__m68k__) \
+ || defined(__s390__) \
+ || defined(__s390x__) \
+ || defined(__zarch__) \
+ || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
+ #define MY_CPU_BE
#endif
#if defined(MY_CPU_LE) && defined(MY_CPU_BE)
Stop_Compiling_Bad_Endian
#endif
+
+#ifdef MY_CPU_LE
+ #if defined(MY_CPU_X86_OR_AMD64) \
+ /* || defined(__AARCH64EL__) */
+ #define MY_CPU_LE_UNALIGN
+ #endif
+#endif
+
+
#ifdef MY_CPU_LE_UNALIGN
-#define GetUi16(p) (*(const UInt16 *)(p))
-#define GetUi32(p) (*(const UInt32 *)(p))
-#define GetUi64(p) (*(const UInt64 *)(p))
-#define SetUi16(p, d) *(UInt16 *)(p) = (d);
-#define SetUi32(p, d) *(UInt32 *)(p) = (d);
-#define SetUi64(p, d) *(UInt64 *)(p) = (d);
+#define GetUi16(p) (*(const UInt16 *)(const void *)(p))
+#define GetUi32(p) (*(const UInt32 *)(const void *)(p))
+#define GetUi64(p) (*(const UInt64 *)(const void *)(p))
+
+#define SetUi16(p, v) { *(UInt16 *)(p) = (v); }
+#define SetUi32(p, v) { *(UInt32 *)(p) = (v); }
+#define SetUi64(p, v) { *(UInt64 *)(p) = (v); }
#else
-#define GetUi16(p) (((const Byte *)(p))[0] | ((UInt16)((const Byte *)(p))[1] << 8))
+#define GetUi16(p) ( (UInt16) ( \
+ ((const Byte *)(p))[0] | \
+ ((UInt16)((const Byte *)(p))[1] << 8) ))
#define GetUi32(p) ( \
((const Byte *)(p))[0] | \
@@ -81,23 +122,27 @@ Stop_Compiling_Bad_Endian
#define GetUi64(p) (GetUi32(p) | ((UInt64)GetUi32(((const Byte *)(p)) + 4) << 32))
-#define SetUi16(p, d) { UInt32 _x_ = (d); \
- ((Byte *)(p))[0] = (Byte)_x_; \
- ((Byte *)(p))[1] = (Byte)(_x_ >> 8); }
+#define SetUi16(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \
+ _ppp_[0] = (Byte)_vvv_; \
+ _ppp_[1] = (Byte)(_vvv_ >> 8); }
-#define SetUi32(p, d) { UInt32 _x_ = (d); \
- ((Byte *)(p))[0] = (Byte)_x_; \
- ((Byte *)(p))[1] = (Byte)(_x_ >> 8); \
- ((Byte *)(p))[2] = (Byte)(_x_ >> 16); \
- ((Byte *)(p))[3] = (Byte)(_x_ >> 24); }
+#define SetUi32(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \
+ _ppp_[0] = (Byte)_vvv_; \
+ _ppp_[1] = (Byte)(_vvv_ >> 8); \
+ _ppp_[2] = (Byte)(_vvv_ >> 16); \
+ _ppp_[3] = (Byte)(_vvv_ >> 24); }
-#define SetUi64(p, d) { UInt64 _x64_ = (d); \
- SetUi32(p, (UInt32)_x64_); \
- SetUi32(((Byte *)(p)) + 4, (UInt32)(_x64_ >> 32)); }
+#define SetUi64(p, v) { Byte *_ppp2_ = (Byte *)(p); UInt64 _vvv2_ = (v); \
+ SetUi32(_ppp2_ , (UInt32)_vvv2_); \
+ SetUi32(_ppp2_ + 4, (UInt32)(_vvv2_ >> 32)); }
#endif
-#if defined(MY_CPU_LE_UNALIGN) && defined(_WIN64) && (defined(_MSC_VER) && (_MSC_VER >= 1300))
+
+#if defined(MY_CPU_LE_UNALIGN) && /* defined(_WIN64) && */ (_MSC_VER >= 1300)
+
+/* Note: we use bswap instruction, that is unsupported in 386 cpu */
+
#include <stdlib.h>
#pragma intrinsic(_byteswap_ulong)
@@ -105,6 +150,15 @@ Stop_Compiling_Bad_Endian
#define GetBe32(p) _byteswap_ulong(*(const UInt32 *)(const Byte *)(p))
#define GetBe64(p) _byteswap_uint64(*(const UInt64 *)(const Byte *)(p))
+#define SetBe32(p, v) (*(UInt32 *)(void *)(p)) = _byteswap_ulong(v)
+
+#elif defined(MY_CPU_LE_UNALIGN) && defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+
+#define GetBe32(p) __builtin_bswap32(*(const UInt32 *)(const Byte *)(p))
+#define GetBe64(p) __builtin_bswap64(*(const UInt64 *)(const Byte *)(p))
+
+#define SetBe32(p, v) (*(UInt32 *)(void *)(p)) = __builtin_bswap32(v)
+
#else
#define GetBe32(p) ( \
@@ -115,9 +169,19 @@ Stop_Compiling_Bad_Endian
#define GetBe64(p) (((UInt64)GetBe32(p) << 32) | GetBe32(((const Byte *)(p)) + 4))
+#define SetBe32(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \
+ _ppp_[0] = (Byte)(_vvv_ >> 24); \
+ _ppp_[1] = (Byte)(_vvv_ >> 16); \
+ _ppp_[2] = (Byte)(_vvv_ >> 8); \
+ _ppp_[3] = (Byte)_vvv_; }
+
#endif
-#define GetBe16(p) (((UInt16)((const Byte *)(p))[0] << 8) | ((const Byte *)(p))[1])
+
+#define GetBe16(p) ( (UInt16) ( \
+ ((UInt16)((const Byte *)(p))[0] << 8) | \
+ ((const Byte *)(p))[1] ))
+
#ifdef MY_CPU_X86_OR_AMD64
@@ -139,15 +203,17 @@ enum
CPU_FIRM_VIA
};
+void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d);
+
Bool x86cpuid_CheckAndRead(Cx86cpuid *p);
int x86cpuid_GetFirm(const Cx86cpuid *p);
-#define x86cpuid_GetFamily(p) (((p)->ver >> 8) & 0xFF00F)
-#define x86cpuid_GetModel(p) (((p)->ver >> 4) & 0xF00F)
-#define x86cpuid_GetStepping(p) ((p)->ver & 0xF)
+#define x86cpuid_GetFamily(ver) (((ver >> 16) & 0xFF0) | ((ver >> 8) & 0xF))
+#define x86cpuid_GetModel(ver) (((ver >> 12) & 0xF0) | ((ver >> 4) & 0xF))
+#define x86cpuid_GetStepping(ver) (ver & 0xF)
-Bool CPU_Is_InOrder(void);
-Bool CPU_Is_Aes_Supported(void);
+Bool CPU_Is_InOrder();
+Bool CPU_Is_Aes_Supported();
#endif
diff --git a/3rdparty/lzma/C/Delta.c b/3rdparty/lzma/C/Delta.c
index 2b327f15f37..e3edd21edbb 100644
--- a/3rdparty/lzma/C/Delta.c
+++ b/3rdparty/lzma/C/Delta.c
@@ -1,6 +1,8 @@
/* Delta.c -- Delta converter
2009-05-26 : Igor Pavlov : Public domain */
+#include "Precomp.h"
+
#include "Delta.h"
void Delta_Init(Byte *state)
diff --git a/3rdparty/lzma/C/Delta.h b/3rdparty/lzma/C/Delta.h
index 0d4cd62746c..2fa54ad67b3 100644
--- a/3rdparty/lzma/C/Delta.h
+++ b/3rdparty/lzma/C/Delta.h
@@ -1,14 +1,12 @@
/* Delta.h -- Delta converter
-2009-04-15 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __DELTA_H
#define __DELTA_H
-#include "Types.h"
+#include "7zTypes.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
#define DELTA_STATE_SIZE 256
@@ -16,8 +14,6 @@ void Delta_Init(Byte *state);
void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size);
void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size);
-#ifdef __cplusplus
-}
-#endif
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/LzFind.c b/3rdparty/lzma/C/LzFind.c
index e3ecb05420e..2d05fa39534 100644
--- a/3rdparty/lzma/C/LzFind.c
+++ b/3rdparty/lzma/C/LzFind.c
@@ -1,5 +1,7 @@
/* LzFind.c -- Match finder for LZ algorithms
-2009-04-22 : Igor Pavlov : Public domain */
+2015-10-15 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include <string.h>
@@ -9,8 +11,8 @@
#define kEmptyHashValue 0
#define kMaxValForNormalize ((UInt32)0xFFFFFFFF)
#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */
-#define kNormalizeMask (~(kNormalizeStepMin - 1))
-#define kMaxHistorySize ((UInt32)3 << 30)
+#define kNormalizeMask (~(UInt32)(kNormalizeStepMin - 1))
+#define kMaxHistorySize ((UInt32)7 << 29)
#define kStartMaxLen 3
@@ -19,7 +21,7 @@ static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc)
if (!p->directInput)
{
alloc->Free(alloc, p->bufferBase);
- p->bufferBase = 0;
+ p->bufferBase = NULL;
}
}
@@ -33,17 +35,16 @@ static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAlloc *a
p->blockSize = blockSize;
return 1;
}
- if (p->bufferBase == 0 || p->blockSize != blockSize)
+ if (!p->bufferBase || p->blockSize != blockSize)
{
LzInWindow_Free(p, alloc);
p->blockSize = blockSize;
p->bufferBase = (Byte *)alloc->Alloc(alloc, (size_t)blockSize);
}
- return (p->bufferBase != 0);
+ return (p->bufferBase != NULL);
}
Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; }
-Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
@@ -58,9 +59,12 @@ static void MatchFinder_ReadBlock(CMatchFinder *p)
{
if (p->streamEndWasReached || p->result != SZ_OK)
return;
+
+ /* We use (p->streamPos - p->pos) value. (p->streamPos < p->pos) is allowed. */
+
if (p->directInput)
{
- UInt32 curSize = 0xFFFFFFFF - p->streamPos;
+ UInt32 curSize = 0xFFFFFFFF - (p->streamPos - p->pos);
if (curSize > p->directInputRem)
curSize = (UInt32)p->directInputRem;
p->directInputRem -= curSize;
@@ -69,12 +73,14 @@ static void MatchFinder_ReadBlock(CMatchFinder *p)
p->streamEndWasReached = 1;
return;
}
+
for (;;)
{
Byte *dest = p->buffer + (p->streamPos - p->pos);
size_t size = (p->bufferBase + p->blockSize - dest);
if (size == 0)
return;
+
p->result = p->stream->Read(p->stream, dest, &size);
if (p->result != SZ_OK)
return;
@@ -92,8 +98,8 @@ static void MatchFinder_ReadBlock(CMatchFinder *p)
void MatchFinder_MoveBlock(CMatchFinder *p)
{
memmove(p->bufferBase,
- p->buffer - p->keepSizeBefore,
- (size_t)(p->streamPos - p->pos + p->keepSizeBefore));
+ p->buffer - p->keepSizeBefore,
+ (size_t)(p->streamPos - p->pos) + p->keepSizeBefore);
p->buffer = p->bufferBase + p->keepSizeBefore;
}
@@ -133,15 +139,15 @@ static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
void MatchFinder_Construct(CMatchFinder *p)
{
UInt32 i;
- p->bufferBase = 0;
+ p->bufferBase = NULL;
p->directInput = 0;
- p->hash = 0;
+ p->hash = NULL;
MatchFinder_SetDefaultSettings(p);
for (i = 0; i < 256; i++)
{
UInt32 r = i;
- int j;
+ unsigned j;
for (j = 0; j < 8; j++)
r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1));
p->crc[i] = r;
@@ -151,7 +157,7 @@ void MatchFinder_Construct(CMatchFinder *p)
static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *alloc)
{
alloc->Free(alloc, p->hash);
- p->hash = 0;
+ p->hash = NULL;
}
void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc)
@@ -160,11 +166,11 @@ void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc)
LzInWindow_Free(p, alloc);
}
-static CLzRef* AllocRefs(UInt32 num, ISzAlloc *alloc)
+static CLzRef* AllocRefs(size_t num, ISzAlloc *alloc)
{
size_t sizeInBytes = (size_t)num * sizeof(CLzRef);
if (sizeInBytes / sizeof(CLzRef) != num)
- return 0;
+ return NULL;
return (CLzRef *)alloc->Alloc(alloc, sizeInBytes);
}
@@ -173,19 +179,24 @@ int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
ISzAlloc *alloc)
{
UInt32 sizeReserv;
+
if (historySize > kMaxHistorySize)
{
MatchFinder_Free(p, alloc);
return 0;
}
+
sizeReserv = historySize >> 1;
- if (historySize > ((UInt32)2 << 30))
- sizeReserv = historySize >> 2;
+ if (historySize >= ((UInt32)3 << 30)) sizeReserv = historySize >> 3;
+ else if (historySize >= ((UInt32)2 << 30)) sizeReserv = historySize >> 2;
+
sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19);
p->keepSizeBefore = historySize + keepAddBufferBefore + 1;
p->keepSizeAfter = matchMaxLen + keepAddBufferAfter;
+
/* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */
+
if (LzInWindow_Create(p, sizeReserv, alloc))
{
UInt32 newCyclicBufferSize = historySize + 1;
@@ -210,6 +221,7 @@ int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
hs = (1 << 24) - 1;
else
hs >>= 1;
+ /* if (bigHash) mode, GetHeads4b() in LzFindMt.c needs (hs >= ((1 << 24) - 1))) */
}
}
p->hashMask = hs;
@@ -221,24 +233,32 @@ int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
}
{
- UInt32 prevSize = p->hashSizeSum + p->numSons;
- UInt32 newSize;
+ size_t newSize;
+ size_t numSons;
p->historySize = historySize;
p->hashSizeSum = hs;
p->cyclicBufferSize = newCyclicBufferSize;
- p->numSons = (p->btMode ? newCyclicBufferSize * 2 : newCyclicBufferSize);
- newSize = p->hashSizeSum + p->numSons;
- if (p->hash != 0 && prevSize == newSize)
+
+ numSons = newCyclicBufferSize;
+ if (p->btMode)
+ numSons <<= 1;
+ newSize = hs + numSons;
+
+ if (p->hash && p->numRefs == newSize)
return 1;
+
MatchFinder_FreeThisClassMemory(p, alloc);
+ p->numRefs = newSize;
p->hash = AllocRefs(newSize, alloc);
- if (p->hash != 0)
+
+ if (p->hash)
{
p->son = p->hash + p->hashSizeSum;
return 1;
}
}
}
+
MatchFinder_Free(p, alloc);
return 0;
}
@@ -247,9 +267,11 @@ static void MatchFinder_SetLimits(CMatchFinder *p)
{
UInt32 limit = kMaxValForNormalize - p->pos;
UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos;
+
if (limit2 < limit)
limit = limit2;
limit2 = p->streamPos - p->pos;
+
if (limit2 <= p->keepSizeAfter)
{
if (limit2 > 0)
@@ -257,8 +279,10 @@ static void MatchFinder_SetLimits(CMatchFinder *p)
}
else
limit2 -= p->keepSizeAfter;
+
if (limit2 < limit)
limit = limit2;
+
{
UInt32 lenLimit = p->streamPos - p->pos;
if (lenLimit > p->matchMaxLen)
@@ -268,28 +292,39 @@ static void MatchFinder_SetLimits(CMatchFinder *p)
p->posLimit = p->pos + limit;
}
-void MatchFinder_Init(CMatchFinder *p)
+void MatchFinder_Init_2(CMatchFinder *p, int readData)
{
UInt32 i;
- for (i = 0; i < p->hashSizeSum; i++)
- p->hash[i] = kEmptyHashValue;
+ UInt32 *hash = p->hash;
+ UInt32 num = p->hashSizeSum;
+ for (i = 0; i < num; i++)
+ hash[i] = kEmptyHashValue;
+
p->cyclicBufferPos = 0;
p->buffer = p->bufferBase;
p->pos = p->streamPos = p->cyclicBufferSize;
p->result = SZ_OK;
p->streamEndWasReached = 0;
- MatchFinder_ReadBlock(p);
+
+ if (readData)
+ MatchFinder_ReadBlock(p);
+
MatchFinder_SetLimits(p);
}
+void MatchFinder_Init(CMatchFinder *p)
+{
+ MatchFinder_Init_2(p, True);
+}
+
static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)
{
return (p->pos - p->historySize - 1) & kNormalizeMask;
}
-void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems)
+void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems)
{
- UInt32 i;
+ size_t i;
for (i = 0; i < numItems; i++)
{
UInt32 value = items[i];
@@ -304,7 +339,7 @@ void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems)
static void MatchFinder_Normalize(CMatchFinder *p)
{
UInt32 subValue = MatchFinder_GetSubValue(p);
- MatchFinder_Normalize3(subValue, p->hash, p->hashSizeSum + p->numSons);
+ MatchFinder_Normalize3(subValue, p->hash, p->numRefs);
MatchFinder_ReduceOffsets(p, subValue);
}
@@ -465,7 +500,7 @@ static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const
static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }
#define GET_MATCHES_HEADER2(minLen, ret_op) \
- UInt32 lenLimit; UInt32 hashValue; const Byte *cur; UInt32 curMatch; \
+ UInt32 lenLimit; UInt32 hv; const Byte *cur; UInt32 curMatch; \
lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \
cur = p->buffer;
@@ -481,13 +516,20 @@ static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }
#define SKIP_FOOTER \
SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS;
+#define UPDATE_maxLen { \
+ ptrdiff_t diff = (ptrdiff_t)0 - d2; \
+ const Byte *c = cur + maxLen; \
+ const Byte *lim = cur + lenLimit; \
+ for (; c != lim; c++) if (*(c + diff) != *c) break; \
+ maxLen = (UInt32)(c - cur); }
+
static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
{
UInt32 offset;
GET_MATCHES_HEADER(2)
HASH2_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
+ curMatch = p->hash[hv];
+ p->hash[hv] = p->pos;
offset = 0;
GET_MATCHES_FOOTER(offset, 1)
}
@@ -497,35 +539,38 @@ UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
UInt32 offset;
GET_MATCHES_HEADER(3)
HASH_ZIP_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
+ curMatch = p->hash[hv];
+ p->hash[hv] = p->pos;
offset = 0;
GET_MATCHES_FOOTER(offset, 2)
}
static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
{
- UInt32 hash2Value, delta2, maxLen, offset;
+ UInt32 h2, d2, maxLen, offset, pos;
+ UInt32 *hash;
GET_MATCHES_HEADER(3)
HASH3_CALC;
- delta2 = p->pos - p->hash[hash2Value];
- curMatch = p->hash[kFix3HashSize + hashValue];
-
- p->hash[hash2Value] =
- p->hash[kFix3HashSize + hashValue] = p->pos;
+ hash = p->hash;
+ pos = p->pos;
+
+ d2 = pos - hash[h2];
+ curMatch = hash[kFix3HashSize + hv];
+
+ hash[h2] = pos;
+ hash[kFix3HashSize + hv] = pos;
maxLen = 2;
offset = 0;
- if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
+
+ if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
{
- for (; maxLen != lenLimit; maxLen++)
- if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
- break;
+ UPDATE_maxLen
distances[0] = maxLen;
- distances[1] = delta2 - 1;
+ distances[1] = d2 - 1;
offset = 2;
if (maxLen == lenLimit)
{
@@ -533,44 +578,51 @@ static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
MOVE_POS_RET;
}
}
+
GET_MATCHES_FOOTER(offset, maxLen)
}
static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
{
- UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset;
+ UInt32 h2, h3, d2, d3, maxLen, offset, pos;
+ UInt32 *hash;
GET_MATCHES_HEADER(4)
HASH4_CALC;
- delta2 = p->pos - p->hash[ hash2Value];
- delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
- curMatch = p->hash[kFix4HashSize + hashValue];
-
- p->hash[ hash2Value] =
- p->hash[kFix3HashSize + hash3Value] =
- p->hash[kFix4HashSize + hashValue] = p->pos;
+ hash = p->hash;
+ pos = p->pos;
+
+ d2 = pos - hash[ h2];
+ d3 = pos - hash[kFix3HashSize + h3];
+
+ curMatch = hash[kFix4HashSize + hv];
+
+ hash[ h2] = pos;
+ hash[kFix3HashSize + h3] = pos;
+ hash[kFix4HashSize + hv] = pos;
- maxLen = 1;
+ maxLen = 0;
offset = 0;
- if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
+
+ if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
{
distances[0] = maxLen = 2;
- distances[1] = delta2 - 1;
+ distances[1] = d2 - 1;
offset = 2;
}
- if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur)
+
+ if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
{
maxLen = 3;
- distances[offset + 1] = delta3 - 1;
+ distances[offset + 1] = d3 - 1;
offset += 2;
- delta2 = delta3;
+ d2 = d3;
}
+
if (offset != 0)
{
- for (; maxLen != lenLimit; maxLen++)
- if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
- break;
+ UPDATE_maxLen
distances[offset - 2] = maxLen;
if (maxLen == lenLimit)
{
@@ -578,46 +630,131 @@ static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
MOVE_POS_RET;
}
}
+
if (maxLen < 3)
maxLen = 3;
+
GET_MATCHES_FOOTER(offset, maxLen)
}
+/*
+static UInt32 Bt5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos;
+ UInt32 *hash;
+ GET_MATCHES_HEADER(5)
+
+ HASH5_CALC;
+
+ hash = p->hash;
+ pos = p->pos;
+
+ d2 = pos - hash[ h2];
+ d3 = pos - hash[kFix3HashSize + h3];
+ d4 = pos - hash[kFix4HashSize + h4];
+
+ curMatch = hash[kFix5HashSize + hv];
+
+ hash[ h2] = pos;
+ hash[kFix3HashSize + h3] = pos;
+ hash[kFix4HashSize + h4] = pos;
+ hash[kFix5HashSize + hv] = pos;
+
+ maxLen = 0;
+ offset = 0;
+
+ if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
+ {
+ distances[0] = maxLen = 2;
+ distances[1] = d2 - 1;
+ offset = 2;
+ if (*(cur - d2 + 2) == cur[2])
+ distances[0] = maxLen = 3;
+ else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
+ {
+ distances[2] = maxLen = 3;
+ distances[3] = d3 - 1;
+ offset = 4;
+ d2 = d3;
+ }
+ }
+ else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
+ {
+ distances[0] = maxLen = 3;
+ distances[1] = d3 - 1;
+ offset = 2;
+ d2 = d3;
+ }
+
+ if (d2 != d4 && d4 < p->cyclicBufferSize
+ && *(cur - d4) == *cur
+ && *(cur - d4 + 3) == *(cur + 3))
+ {
+ maxLen = 4;
+ distances[offset + 1] = d4 - 1;
+ offset += 2;
+ d2 = d4;
+ }
+
+ if (offset != 0)
+ {
+ UPDATE_maxLen
+ distances[offset - 2] = maxLen;
+ if (maxLen == lenLimit)
+ {
+ SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
+ MOVE_POS_RET;
+ }
+ }
+
+ if (maxLen < 4)
+ maxLen = 4;
+
+ GET_MATCHES_FOOTER(offset, maxLen)
+}
+*/
+
static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
{
- UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset;
+ UInt32 h2, h3, d2, d3, maxLen, offset, pos;
+ UInt32 *hash;
GET_MATCHES_HEADER(4)
HASH4_CALC;
- delta2 = p->pos - p->hash[ hash2Value];
- delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
- curMatch = p->hash[kFix4HashSize + hashValue];
+ hash = p->hash;
+ pos = p->pos;
+
+ d2 = pos - hash[ h2];
+ d3 = pos - hash[kFix3HashSize + h3];
+
+ curMatch = hash[kFix4HashSize + hv];
- p->hash[ hash2Value] =
- p->hash[kFix3HashSize + hash3Value] =
- p->hash[kFix4HashSize + hashValue] = p->pos;
+ hash[ h2] = pos;
+ hash[kFix3HashSize + h3] = pos;
+ hash[kFix4HashSize + hv] = pos;
- maxLen = 1;
+ maxLen = 0;
offset = 0;
- if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
+
+ if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
{
distances[0] = maxLen = 2;
- distances[1] = delta2 - 1;
+ distances[1] = d2 - 1;
offset = 2;
}
- if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur)
+
+ if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
{
maxLen = 3;
- distances[offset + 1] = delta3 - 1;
+ distances[offset + 1] = d3 - 1;
offset += 2;
- delta2 = delta3;
+ d2 = d3;
}
+
if (offset != 0)
{
- for (; maxLen != lenLimit; maxLen++)
- if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
- break;
+ UPDATE_maxLen
distances[offset - 2] = maxLen;
if (maxLen == lenLimit)
{
@@ -625,22 +762,103 @@ static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
MOVE_POS_RET;
}
}
+
if (maxLen < 3)
maxLen = 3;
+
offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
- distances + offset, maxLen) - (distances));
+ distances + offset, maxLen) - (distances));
MOVE_POS_RET
}
+/*
+static UInt32 Hc5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos
+ UInt32 *hash;
+ GET_MATCHES_HEADER(5)
+
+ HASH5_CALC;
+
+ hash = p->hash;
+ pos = p->pos;
+
+ d2 = pos - hash[ h2];
+ d3 = pos - hash[kFix3HashSize + h3];
+ d4 = pos - hash[kFix4HashSize + h4];
+
+ curMatch = hash[kFix5HashSize + hv];
+
+ hash[ h2] = pos;
+ hash[kFix3HashSize + h3] = pos;
+ hash[kFix4HashSize + h4] = pos;
+ hash[kFix5HashSize + hv] = pos;
+
+ maxLen = 0;
+ offset = 0;
+
+ if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
+ {
+ distances[0] = maxLen = 2;
+ distances[1] = d2 - 1;
+ offset = 2;
+ if (*(cur - d2 + 2) == cur[2])
+ distances[0] = maxLen = 3;
+ else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
+ {
+ distances[2] = maxLen = 3;
+ distances[3] = d3 - 1;
+ offset = 4;
+ d2 = d3;
+ }
+ }
+ else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
+ {
+ distances[0] = maxLen = 3;
+ distances[1] = d3 - 1;
+ offset = 2;
+ d2 = d3;
+ }
+
+ if (d2 != d4 && d4 < p->cyclicBufferSize
+ && *(cur - d4) == *cur
+ && *(cur - d4 + 3) == *(cur + 3))
+ {
+ maxLen = 4;
+ distances[offset + 1] = d4 - 1;
+ offset += 2;
+ d2 = d4;
+ }
+
+ if (offset != 0)
+ {
+ UPDATE_maxLen
+ distances[offset - 2] = maxLen;
+ if (maxLen == lenLimit)
+ {
+ p->son[p->cyclicBufferPos] = curMatch;
+ MOVE_POS_RET;
+ }
+ }
+
+ if (maxLen < 4)
+ maxLen = 4;
+
+ offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
+ distances + offset, maxLen) - (distances));
+ MOVE_POS_RET
+}
+*/
+
UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
{
UInt32 offset;
GET_MATCHES_HEADER(3)
HASH_ZIP_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
+ curMatch = p->hash[hv];
+ p->hash[hv] = p->pos;
offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
- distances, 2) - (distances));
+ distances, 2) - (distances));
MOVE_POS_RET
}
@@ -650,8 +868,8 @@ static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
{
SKIP_HEADER(2)
HASH2_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
+ curMatch = p->hash[hv];
+ p->hash[hv] = p->pos;
SKIP_FOOTER
}
while (--num != 0);
@@ -663,8 +881,8 @@ void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
{
SKIP_HEADER(3)
HASH_ZIP_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
+ curMatch = p->hash[hv];
+ p->hash[hv] = p->pos;
SKIP_FOOTER
}
while (--num != 0);
@@ -674,12 +892,14 @@ static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
{
do
{
- UInt32 hash2Value;
+ UInt32 h2;
+ UInt32 *hash;
SKIP_HEADER(3)
HASH3_CALC;
- curMatch = p->hash[kFix3HashSize + hashValue];
- p->hash[hash2Value] =
- p->hash[kFix3HashSize + hashValue] = p->pos;
+ hash = p->hash;
+ curMatch = hash[kFix3HashSize + hv];
+ hash[h2] =
+ hash[kFix3HashSize + hv] = p->pos;
SKIP_FOOTER
}
while (--num != 0);
@@ -689,43 +909,90 @@ static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
{
do
{
- UInt32 hash2Value, hash3Value;
+ UInt32 h2, h3;
+ UInt32 *hash;
SKIP_HEADER(4)
HASH4_CALC;
- curMatch = p->hash[kFix4HashSize + hashValue];
- p->hash[ hash2Value] =
- p->hash[kFix3HashSize + hash3Value] = p->pos;
- p->hash[kFix4HashSize + hashValue] = p->pos;
+ hash = p->hash;
+ curMatch = hash[kFix4HashSize + hv];
+ hash[ h2] =
+ hash[kFix3HashSize + h3] =
+ hash[kFix4HashSize + hv] = p->pos;
+ SKIP_FOOTER
+ }
+ while (--num != 0);
+}
+
+/*
+static void Bt5_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ UInt32 h2, h3, h4;
+ UInt32 *hash;
+ SKIP_HEADER(5)
+ HASH5_CALC;
+ hash = p->hash;
+ curMatch = hash[kFix5HashSize + hv];
+ hash[ h2] =
+ hash[kFix3HashSize + h3] =
+ hash[kFix4HashSize + h4] =
+ hash[kFix5HashSize + hv] = p->pos;
SKIP_FOOTER
}
while (--num != 0);
}
+*/
static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
{
do
{
- UInt32 hash2Value, hash3Value;
+ UInt32 h2, h3;
+ UInt32 *hash;
SKIP_HEADER(4)
HASH4_CALC;
- curMatch = p->hash[kFix4HashSize + hashValue];
- p->hash[ hash2Value] =
- p->hash[kFix3HashSize + hash3Value] =
- p->hash[kFix4HashSize + hashValue] = p->pos;
+ hash = p->hash;
+ curMatch = hash[kFix4HashSize + hv];
+ hash[ h2] =
+ hash[kFix3HashSize + h3] =
+ hash[kFix4HashSize + hv] = p->pos;
p->son[p->cyclicBufferPos] = curMatch;
MOVE_POS
}
while (--num != 0);
}
+/*
+static void Hc5_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ UInt32 h2, h3, h4;
+ UInt32 *hash;
+ SKIP_HEADER(5)
+ HASH5_CALC;
+ hash = p->hash;
+ curMatch = p->hash[kFix5HashSize + hv];
+ hash[ h2] =
+ hash[kFix3HashSize + h3] =
+ hash[kFix4HashSize + h4] =
+ hash[kFix5HashSize + hv] = p->pos;
+ p->son[p->cyclicBufferPos] = curMatch;
+ MOVE_POS
+ }
+ while (--num != 0);
+}
+*/
+
void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
{
do
{
SKIP_HEADER(3)
HASH_ZIP_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
+ curMatch = p->hash[hv];
+ p->hash[hv] = p->pos;
p->son[p->cyclicBufferPos] = curMatch;
MOVE_POS
}
@@ -735,13 +1002,22 @@ void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable)
{
vTable->Init = (Mf_Init_Func)MatchFinder_Init;
- vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinder_GetIndexByte;
vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes;
vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos;
if (!p->btMode)
{
- vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches;
- vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip;
+ /* if (p->numHashBytes <= 4) */
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip;
+ }
+ /*
+ else
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Hc5_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Hc5_MatchFinder_Skip;
+ }
+ */
}
else if (p->numHashBytes == 2)
{
@@ -753,9 +1029,16 @@ void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable)
vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches;
vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip;
}
- else
+ else /* if (p->numHashBytes == 4) */
{
vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches;
vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip;
}
+ /*
+ else
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Bt5_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Bt5_MatchFinder_Skip;
+ }
+ */
}
diff --git a/3rdparty/lzma/C/LzFind.h b/3rdparty/lzma/C/LzFind.h
index 010c4b92ba3..d119944f445 100644
--- a/3rdparty/lzma/C/LzFind.h
+++ b/3rdparty/lzma/C/LzFind.h
@@ -1,14 +1,12 @@
/* LzFind.h -- Match finder for LZ algorithms
-2009-04-22 : Igor Pavlov : Public domain */
+2015-10-15 : Igor Pavlov : Public domain */
#ifndef __LZ_FIND_H
#define __LZ_FIND_H
-#include "Types.h"
+#include "7zTypes.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
typedef UInt32 CLzRef;
@@ -23,6 +21,11 @@ typedef struct _CMatchFinder
UInt32 cyclicBufferPos;
UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */
+ Byte streamEndWasReached;
+ Byte btMode;
+ Byte bigHash;
+ Byte directInput;
+
UInt32 matchMaxLen;
CLzRef *hash;
CLzRef *son;
@@ -31,30 +34,30 @@ typedef struct _CMatchFinder
Byte *bufferBase;
ISeqInStream *stream;
- int streamEndWasReached;
-
+
UInt32 blockSize;
UInt32 keepSizeBefore;
UInt32 keepSizeAfter;
UInt32 numHashBytes;
- int directInput;
size_t directInputRem;
- int btMode;
- int bigHash;
UInt32 historySize;
UInt32 fixedHashSize;
UInt32 hashSizeSum;
- UInt32 numSons;
SRes result;
UInt32 crc[256];
+ size_t numRefs;
} CMatchFinder;
#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer)
-#define Inline_MatchFinder_GetIndexByte(p, index) ((p)->buffer[(Int32)(index)])
#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)
+#define Inline_MatchFinder_IsFinishedOK(p) \
+ ((p)->streamEndWasReached \
+ && (p)->streamPos == (p)->pos \
+ && (!(p)->directInput || (p)->directInputRem == 0))
+
int MatchFinder_NeedMove(CMatchFinder *p);
Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p);
void MatchFinder_MoveBlock(CMatchFinder *p);
@@ -70,7 +73,7 @@ int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
ISzAlloc *alloc);
void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc);
-void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems);
+void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems);
void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue);
UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son,
@@ -84,7 +87,6 @@ Conditions:
*/
typedef void (*Mf_Init_Func)(void *object);
-typedef Byte (*Mf_GetIndexByte_Func)(void *object, Int32 index);
typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object);
typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object);
typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances);
@@ -93,7 +95,6 @@ typedef void (*Mf_Skip_Func)(void *object, UInt32);
typedef struct _IMatchFinder
{
Mf_Init_Func Init;
- Mf_GetIndexByte_Func GetIndexByte;
Mf_GetNumAvailableBytes_Func GetNumAvailableBytes;
Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos;
Mf_GetMatches_Func GetMatches;
@@ -102,14 +103,15 @@ typedef struct _IMatchFinder
void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable);
+void MatchFinder_Init_2(CMatchFinder *p, int readData);
void MatchFinder_Init(CMatchFinder *p);
+
UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
+
void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
-#ifdef __cplusplus
-}
-#endif
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/LzFindMt.c b/3rdparty/lzma/C/LzFindMt.c
index aa41ed98a57..a4ffa5ef9c8 100644
--- a/3rdparty/lzma/C/LzFindMt.c
+++ b/3rdparty/lzma/C/LzFindMt.c
@@ -1,11 +1,13 @@
/* LzFindMt.c -- multithreaded Match finder for LZ algorithms
-2009-09-20 : Igor Pavlov : Public domain */
+2015-10-15 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "LzHash.h"
#include "LzFindMt.h"
-void MtSync_Construct(CMtSync *p)
+static void MtSync_Construct(CMtSync *p)
{
p->wasCreated = False;
p->csWasInitialized = False;
@@ -18,7 +20,7 @@ void MtSync_Construct(CMtSync *p)
Semaphore_Construct(&p->filledSemaphore);
}
-void MtSync_GetNextBlock(CMtSync *p)
+static void MtSync_GetNextBlock(CMtSync *p)
{
if (p->needStart)
{
@@ -46,7 +48,7 @@ void MtSync_GetNextBlock(CMtSync *p)
/* MtSync_StopWriting must be called if Writing was started */
-void MtSync_StopWriting(CMtSync *p)
+static void MtSync_StopWriting(CMtSync *p)
{
UInt32 myNumBlocks = p->numProcessedBlocks;
if (!Thread_WasCreated(&p->thread) || p->needStart)
@@ -69,7 +71,7 @@ void MtSync_StopWriting(CMtSync *p)
p->needStart = True;
}
-void MtSync_Destruct(CMtSync *p)
+static void MtSync_Destruct(CMtSync *p)
{
if (Thread_WasCreated(&p->thread))
{
@@ -97,7 +99,7 @@ void MtSync_Destruct(CMtSync *p)
#define RINOK_THREAD(x) { if ((x) != 0) return SZ_ERROR_THREAD; }
-static SRes MtSync_Create2(CMtSync *p, unsigned (MY_STD_CALL *startAddress)(void *), void *obj, UInt32 numBlocks)
+static SRes MtSync_Create2(CMtSync *p, THREAD_FUNC_TYPE startAddress, void *obj, UInt32 numBlocks)
{
if (p->wasCreated)
return SZ_OK;
@@ -119,7 +121,7 @@ static SRes MtSync_Create2(CMtSync *p, unsigned (MY_STD_CALL *startAddress)(void
return SZ_OK;
}
-static SRes MtSync_Create(CMtSync *p, unsigned (MY_STD_CALL *startAddress)(void *), void *obj, UInt32 numBlocks)
+static SRes MtSync_Create(CMtSync *p, THREAD_FUNC_TYPE startAddress, void *obj, UInt32 numBlocks)
{
SRes res = MtSync_Create2(p, startAddress, obj, numBlocks);
if (res != SZ_OK)
@@ -132,20 +134,20 @@ void MtSync_Init(CMtSync *p) { p->needStart = True; }
#define kMtMaxValForNormalize 0xFFFFFFFF
#define DEF_GetHeads2(name, v, action) \
-static void GetHeads ## name(const Byte *p, UInt32 pos, \
-UInt32 *hash, UInt32 hashMask, UInt32 *heads, UInt32 numHeads, const UInt32 *crc) \
-{ action; for (; numHeads != 0; numHeads--) { \
-const UInt32 value = (v); p++; *heads++ = pos - hash[value]; hash[value] = pos++; } }
+ static void GetHeads ## name(const Byte *p, UInt32 pos, \
+ UInt32 *hash, UInt32 hashMask, UInt32 *heads, UInt32 numHeads, const UInt32 *crc) \
+ { action; for (; numHeads != 0; numHeads--) { \
+ const UInt32 value = (v); p++; *heads++ = pos - hash[value]; hash[value] = pos++; } }
#define DEF_GetHeads(name, v) DEF_GetHeads2(name, v, ;)
-DEF_GetHeads2(2, (p[0] | ((UInt32)p[1] << 8)), hashMask = hashMask; crc = crc; )
+DEF_GetHeads2(2, (p[0] | ((UInt32)p[1] << 8)), UNUSED_VAR(hashMask); UNUSED_VAR(crc); )
DEF_GetHeads(3, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8)) & hashMask)
DEF_GetHeads(4, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ (crc[p[3]] << 5)) & hashMask)
DEF_GetHeads(4b, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ ((UInt32)p[3] << 16)) & hashMask)
/* DEF_GetHeads(5, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ (crc[p[3]] << 5) ^ (crc[p[4]] << 3)) & hashMask) */
-void HashThreadFunc(CMatchFinderMt *mt)
+static void HashThreadFunc(CMatchFinderMt *mt)
{
CMtSync *p = &mt->hashSync;
for (;;)
@@ -171,12 +173,12 @@ void HashThreadFunc(CMatchFinderMt *mt)
CriticalSection_Enter(&mt->btSync.cs);
CriticalSection_Enter(&mt->hashSync.cs);
{
- const Byte *beforePtr = MatchFinder_GetPointerToCurrentPos(mf);
- const Byte *afterPtr;
+ const Byte *beforePtr = Inline_MatchFinder_GetPointerToCurrentPos(mf);
+ ptrdiff_t offset;
MatchFinder_MoveBlock(mf);
- afterPtr = MatchFinder_GetPointerToCurrentPos(mf);
- mt->pointerToCurPos -= beforePtr - afterPtr;
- mt->buffer -= beforePtr - afterPtr;
+ offset = beforePtr - Inline_MatchFinder_GetPointerToCurrentPos(mf);
+ mt->pointerToCurPos -= offset;
+ mt->buffer -= offset;
}
CriticalSection_Leave(&mt->btSync.cs);
CriticalSection_Leave(&mt->hashSync.cs);
@@ -190,7 +192,7 @@ void HashThreadFunc(CMatchFinderMt *mt)
{
UInt32 subValue = (mf->pos - mf->historySize - 1);
MatchFinder_ReduceOffsets(mf, subValue);
- MatchFinder_Normalize3(subValue, mf->hash + mf->fixedHashSize, mf->hashMask + 1);
+ MatchFinder_Normalize3(subValue, mf->hash + mf->fixedHashSize, (size_t)mf->hashMask + 1);
}
{
UInt32 *heads = mt->hashBuf + ((numProcessedBlocks++) & kMtHashNumBlocksMask) * kMtHashBlockSize;
@@ -215,7 +217,7 @@ void HashThreadFunc(CMatchFinderMt *mt)
}
}
-void MatchFinderMt_GetNextBlock_Hash(CMatchFinderMt *p)
+static void MatchFinderMt_GetNextBlock_Hash(CMatchFinderMt *p)
{
MtSync_GetNextBlock(&p->hashSync);
p->hashBufPosLimit = p->hashBufPos = ((p->hashSync.numProcessedBlocks - 1) & kMtHashNumBlocksMask) * kMtHashBlockSize;
@@ -231,7 +233,7 @@ void MatchFinderMt_GetNextBlock_Hash(CMatchFinderMt *p)
#define NO_INLINE MY_FAST_CALL
-Int32 NO_INLINE GetMatchesSpecN(UInt32 lenLimit, UInt32 pos, const Byte *cur, CLzRef *son,
+static Int32 NO_INLINE GetMatchesSpecN(UInt32 lenLimit, UInt32 pos, const Byte *cur, CLzRef *son,
UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue,
UInt32 *_distances, UInt32 _maxLen, const UInt32 *hash, Int32 limit, UInt32 size, UInt32 *posRes)
{
@@ -308,12 +310,14 @@ Int32 NO_INLINE GetMatchesSpecN(UInt32 lenLimit, UInt32 pos, const Byte *cur, CL
#endif
-void BtGetMatches(CMatchFinderMt *p, UInt32 *distances)
+static void BtGetMatches(CMatchFinderMt *p, UInt32 *distances)
{
UInt32 numProcessed = 0;
UInt32 curPos = 2;
UInt32 limit = kMtBtBlockSize - (p->matchMaxLen * 2);
+
distances[1] = p->hashNumAvail;
+
while (curPos < limit)
{
if (p->hashBufPos == p->hashBufPosLimit)
@@ -322,9 +326,11 @@ void BtGetMatches(CMatchFinderMt *p, UInt32 *distances)
distances[1] = numProcessed + p->hashNumAvail;
if (p->hashNumAvail >= p->numHashBytes)
continue;
+ distances[0] = curPos + p->hashNumAvail;
+ distances += curPos;
for (; p->hashNumAvail != 0; p->hashNumAvail--)
- distances[curPos++] = 0;
- break;
+ *distances++ = 0;
+ return;
}
{
UInt32 size = p->hashBufPosLimit - p->hashBufPos;
@@ -341,13 +347,14 @@ void BtGetMatches(CMatchFinderMt *p, UInt32 *distances)
if (size2 < size)
size = size2;
}
+
#ifndef MFMT_GM_INLINE
while (curPos < limit && size-- != 0)
{
UInt32 *startDistances = distances + curPos;
UInt32 num = (UInt32)(GetMatchesSpec1(lenLimit, pos - p->hashBuf[p->hashBufPos++],
- pos, p->buffer, p->son, cyclicBufferPos, p->cyclicBufferSize, p->cutValue,
- startDistances + 1, p->numHashBytes - 1) - startDistances);
+ pos, p->buffer, p->son, cyclicBufferPos, p->cyclicBufferSize, p->cutValue,
+ startDistances + 1, p->numHashBytes - 1) - startDistances);
*startDistances = num - 1;
curPos += num;
cyclicBufferPos++;
@@ -358,7 +365,7 @@ void BtGetMatches(CMatchFinderMt *p, UInt32 *distances)
{
UInt32 posRes;
curPos = limit - GetMatchesSpecN(lenLimit, pos, p->buffer, p->son, cyclicBufferPos, p->cyclicBufferSize, p->cutValue,
- distances + curPos, p->numHashBytes - 1, p->hashBuf + p->hashBufPos, (Int32)(limit - curPos) , size, &posRes);
+ distances + curPos, p->numHashBytes - 1, p->hashBuf + p->hashBufPos, (Int32)(limit - curPos), size, &posRes);
p->hashBufPos += posRes - pos;
cyclicBufferPos += posRes - pos;
p->buffer += posRes - pos;
@@ -374,10 +381,11 @@ void BtGetMatches(CMatchFinderMt *p, UInt32 *distances)
p->cyclicBufferPos = cyclicBufferPos;
}
}
+
distances[0] = curPos;
}
-void BtFillBlock(CMatchFinderMt *p, UInt32 globalBlockIndex)
+static void BtFillBlock(CMatchFinderMt *p, UInt32 globalBlockIndex)
{
CMtSync *sync = &p->hashSync;
if (!sync->needStart)
@@ -391,7 +399,7 @@ void BtFillBlock(CMatchFinderMt *p, UInt32 globalBlockIndex)
if (p->pos > kMtMaxValForNormalize - kMtBtBlockSize)
{
UInt32 subValue = p->pos - p->cyclicBufferSize;
- MatchFinder_Normalize3(subValue, p->son, p->cyclicBufferSize * 2);
+ MatchFinder_Normalize3(subValue, p->son, (size_t)p->cyclicBufferSize * 2);
p->pos -= subValue;
}
@@ -430,15 +438,15 @@ void BtThreadFunc(CMatchFinderMt *mt)
void MatchFinderMt_Construct(CMatchFinderMt *p)
{
- p->hashBuf = 0;
+ p->hashBuf = NULL;
MtSync_Construct(&p->hashSync);
MtSync_Construct(&p->btSync);
}
-void MatchFinderMt_FreeMem(CMatchFinderMt *p, ISzAlloc *alloc)
+static void MatchFinderMt_FreeMem(CMatchFinderMt *p, ISzAlloc *alloc)
{
alloc->Free(alloc, p->hashBuf);
- p->hashBuf = 0;
+ p->hashBuf = NULL;
}
void MatchFinderMt_Destruct(CMatchFinderMt *p, ISzAlloc *alloc)
@@ -451,14 +459,15 @@ void MatchFinderMt_Destruct(CMatchFinderMt *p, ISzAlloc *alloc)
#define kHashBufferSize (kMtHashBlockSize * kMtHashNumBlocks)
#define kBtBufferSize (kMtBtBlockSize * kMtBtNumBlocks)
-static unsigned MY_STD_CALL HashThreadFunc2(void *p) { HashThreadFunc((CMatchFinderMt *)p); return 0; }
-static unsigned MY_STD_CALL BtThreadFunc2(void *p)
+static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE HashThreadFunc2(void *p) { HashThreadFunc((CMatchFinderMt *)p); return 0; }
+static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE BtThreadFunc2(void *p)
{
Byte allocaDummy[0x180];
- int i = 0;
+ unsigned i = 0;
for (i = 0; i < 16; i++)
- allocaDummy[i] = (Byte)i;
- BtThreadFunc((CMatchFinderMt *)p);
+ allocaDummy[i] = (Byte)0;
+ if (allocaDummy[0] == 0)
+ BtThreadFunc((CMatchFinderMt *)p);
return 0;
}
@@ -469,10 +478,10 @@ SRes MatchFinderMt_Create(CMatchFinderMt *p, UInt32 historySize, UInt32 keepAddB
p->historySize = historySize;
if (kMtBtBlockSize <= matchMaxLen * 4)
return SZ_ERROR_PARAM;
- if (p->hashBuf == 0)
+ if (!p->hashBuf)
{
p->hashBuf = (UInt32 *)alloc->Alloc(alloc, (kHashBufferSize + kBtBufferSize) * sizeof(UInt32));
- if (p->hashBuf == 0)
+ if (!p->hashBuf)
return SZ_ERROR_MEM;
p->btBuf = p->hashBuf + kHashBufferSize;
}
@@ -492,8 +501,11 @@ void MatchFinderMt_Init(CMatchFinderMt *p)
CMatchFinder *mf = p->MatchFinder;
p->btBufPos = p->btBufPosLimit = 0;
p->hashBufPos = p->hashBufPosLimit = 0;
- MatchFinder_Init(mf);
- p->pointerToCurPos = MatchFinder_GetPointerToCurrentPos(mf);
+
+ /* Init without data reading. We don't want to read data in this thread */
+ MatchFinder_Init_2(mf, False);
+
+ p->pointerToCurPos = Inline_MatchFinder_GetPointerToCurrentPos(mf);
p->btNumAvailBytes = 0;
p->lzPos = p->historySize + 1;
@@ -518,13 +530,13 @@ void MatchFinderMt_ReleaseStream(CMatchFinderMt *p)
/* p->MatchFinder->ReleaseStream(); */
}
-void MatchFinderMt_Normalize(CMatchFinderMt *p)
+static void MatchFinderMt_Normalize(CMatchFinderMt *p)
{
MatchFinder_Normalize3(p->lzPos - p->historySize - 1, p->hash, p->fixedHashSize);
p->lzPos = p->historySize + 1;
}
-void MatchFinderMt_GetNextBlock_Bt(CMatchFinderMt *p)
+static void MatchFinderMt_GetNextBlock_Bt(CMatchFinderMt *p)
{
UInt32 blockIndex;
MtSync_GetNextBlock(&p->btSync);
@@ -536,34 +548,29 @@ void MatchFinderMt_GetNextBlock_Bt(CMatchFinderMt *p)
MatchFinderMt_Normalize(p);
}
-const Byte * MatchFinderMt_GetPointerToCurrentPos(CMatchFinderMt *p)
+static const Byte * MatchFinderMt_GetPointerToCurrentPos(CMatchFinderMt *p)
{
return p->pointerToCurPos;
}
#define GET_NEXT_BLOCK_IF_REQUIRED if (p->btBufPos == p->btBufPosLimit) MatchFinderMt_GetNextBlock_Bt(p);
-UInt32 MatchFinderMt_GetNumAvailableBytes(CMatchFinderMt *p)
+static UInt32 MatchFinderMt_GetNumAvailableBytes(CMatchFinderMt *p)
{
GET_NEXT_BLOCK_IF_REQUIRED;
return p->btNumAvailBytes;
}
-Byte MatchFinderMt_GetIndexByte(CMatchFinderMt *p, Int32 index)
+static UInt32 * MixMatches2(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances)
{
- return p->pointerToCurPos[index];
-}
-
-UInt32 * MixMatches2(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances)
-{
- UInt32 hash2Value, curMatch2;
+ UInt32 h2, curMatch2;
UInt32 *hash = p->hash;
const Byte *cur = p->pointerToCurPos;
UInt32 lzPos = p->lzPos;
MT_HASH2_CALC
- curMatch2 = hash[hash2Value];
- hash[hash2Value] = lzPos;
+ curMatch2 = hash[h2];
+ hash[h2] = lzPos;
if (curMatch2 >= matchMinPos)
if (cur[(ptrdiff_t)curMatch2 - lzPos] == cur[0])
@@ -571,23 +578,23 @@ UInt32 * MixMatches2(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances)
*distances++ = 2;
*distances++ = lzPos - curMatch2 - 1;
}
+
return distances;
}
-UInt32 * MixMatches3(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances)
+static UInt32 * MixMatches3(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances)
{
- UInt32 hash2Value, hash3Value, curMatch2, curMatch3;
+ UInt32 h2, h3, curMatch2, curMatch3;
UInt32 *hash = p->hash;
const Byte *cur = p->pointerToCurPos;
UInt32 lzPos = p->lzPos;
MT_HASH3_CALC
- curMatch2 = hash[ hash2Value];
- curMatch3 = hash[kFix3HashSize + hash3Value];
+ curMatch2 = hash[ h2];
+ curMatch3 = hash[kFix3HashSize + h3];
- hash[ hash2Value] =
- hash[kFix3HashSize + hash3Value] =
- lzPos;
+ hash[ h2] = lzPos;
+ hash[kFix3HashSize + h3] = lzPos;
if (curMatch2 >= matchMinPos && cur[(ptrdiff_t)curMatch2 - lzPos] == cur[0])
{
@@ -600,43 +607,45 @@ UInt32 * MixMatches3(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances)
distances[0] = 2;
distances += 2;
}
+
if (curMatch3 >= matchMinPos && cur[(ptrdiff_t)curMatch3 - lzPos] == cur[0])
{
*distances++ = 3;
*distances++ = lzPos - curMatch3 - 1;
}
+
return distances;
}
/*
-UInt32 *MixMatches4(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances)
+static UInt32 *MixMatches4(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances)
{
- UInt32 hash2Value, hash3Value, hash4Value, curMatch2, curMatch3, curMatch4;
+ UInt32 h2, h3, h4, curMatch2, curMatch3, curMatch4;
UInt32 *hash = p->hash;
const Byte *cur = p->pointerToCurPos;
UInt32 lzPos = p->lzPos;
MT_HASH4_CALC
- curMatch2 = hash[ hash2Value];
- curMatch3 = hash[kFix3HashSize + hash3Value];
- curMatch4 = hash[kFix4HashSize + hash4Value];
+ curMatch2 = hash[ h2];
+ curMatch3 = hash[kFix3HashSize + h3];
+ curMatch4 = hash[kFix4HashSize + h4];
- hash[ hash2Value] =
- hash[kFix3HashSize + hash3Value] =
- hash[kFix4HashSize + hash4Value] =
- lzPos;
+ hash[ h2] = lzPos;
+ hash[kFix3HashSize + h3] = lzPos;
+ hash[kFix4HashSize + h4] = lzPos;
if (curMatch2 >= matchMinPos && cur[(ptrdiff_t)curMatch2 - lzPos] == cur[0])
{
distances[1] = lzPos - curMatch2 - 1;
if (cur[(ptrdiff_t)curMatch2 - lzPos + 2] == cur[2])
{
- distances[0] = (cur[(ptrdiff_t)curMatch2 - lzPos + 3] == cur[3]) ? 4 : 3;
+ distances[0] = (cur[(ptrdiff_t)curMatch2 - lzPos + 3] == cur[3]) ? 4 : 3;
return distances + 2;
}
distances[0] = 2;
distances += 2;
}
+
if (curMatch3 >= matchMinPos && cur[(ptrdiff_t)curMatch3 - lzPos] == cur[0])
{
distances[1] = lzPos - curMatch3 - 1;
@@ -658,13 +667,14 @@ UInt32 *MixMatches4(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances)
*distances++ = 4;
*distances++ = lzPos - curMatch4 - 1;
}
+
return distances;
}
*/
#define INCREASE_LZ_POS p->lzPos++; p->pointerToCurPos++;
-UInt32 MatchFinderMt2_GetMatches(CMatchFinderMt *p, UInt32 *distances)
+static UInt32 MatchFinderMt2_GetMatches(CMatchFinderMt *p, UInt32 *distances)
{
const UInt32 *btBuf = p->btBuf + p->btBufPos;
UInt32 len = *btBuf++;
@@ -682,7 +692,7 @@ UInt32 MatchFinderMt2_GetMatches(CMatchFinderMt *p, UInt32 *distances)
return len;
}
-UInt32 MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *distances)
+static UInt32 MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *distances)
{
const UInt32 *btBuf = p->btBuf + p->btBufPos;
UInt32 len = *btBuf++;
@@ -690,6 +700,7 @@ UInt32 MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *distances)
if (len == 0)
{
+ /* change for bt5 ! */
if (p->btNumAvailBytes-- >= 4)
len = (UInt32)(p->MixMatchesFunc(p, p->lzPos - p->historySize, distances) - (distances));
}
@@ -705,7 +716,7 @@ UInt32 MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *distances)
*distances2++ = *btBuf++;
}
while ((len -= 2) != 0);
- len = (UInt32)(distances2 - (distances));
+ len = (UInt32)(distances2 - (distances));
}
INCREASE_LZ_POS
return len;
@@ -715,41 +726,41 @@ UInt32 MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *distances)
#define SKIP_HEADER_MT(n) SKIP_HEADER2_MT if (p->btNumAvailBytes-- >= (n)) { const Byte *cur = p->pointerToCurPos; UInt32 *hash = p->hash;
#define SKIP_FOOTER_MT } INCREASE_LZ_POS p->btBufPos += p->btBuf[p->btBufPos] + 1; } while (--num != 0);
-void MatchFinderMt0_Skip(CMatchFinderMt *p, UInt32 num)
+static void MatchFinderMt0_Skip(CMatchFinderMt *p, UInt32 num)
{
SKIP_HEADER2_MT { p->btNumAvailBytes--;
SKIP_FOOTER_MT
}
-void MatchFinderMt2_Skip(CMatchFinderMt *p, UInt32 num)
+static void MatchFinderMt2_Skip(CMatchFinderMt *p, UInt32 num)
{
SKIP_HEADER_MT(2)
- UInt32 hash2Value;
+ UInt32 h2;
MT_HASH2_CALC
- hash[hash2Value] = p->lzPos;
+ hash[h2] = p->lzPos;
SKIP_FOOTER_MT
}
-void MatchFinderMt3_Skip(CMatchFinderMt *p, UInt32 num)
+static void MatchFinderMt3_Skip(CMatchFinderMt *p, UInt32 num)
{
SKIP_HEADER_MT(3)
- UInt32 hash2Value, hash3Value;
+ UInt32 h2, h3;
MT_HASH3_CALC
- hash[kFix3HashSize + hash3Value] =
- hash[ hash2Value] =
+ hash[kFix3HashSize + h3] =
+ hash[ h2] =
p->lzPos;
SKIP_FOOTER_MT
}
/*
-void MatchFinderMt4_Skip(CMatchFinderMt *p, UInt32 num)
+static void MatchFinderMt4_Skip(CMatchFinderMt *p, UInt32 num)
{
SKIP_HEADER_MT(4)
- UInt32 hash2Value, hash3Value, hash4Value;
+ UInt32 h2, h3, h4;
MT_HASH4_CALC
- hash[kFix4HashSize + hash4Value] =
- hash[kFix3HashSize + hash3Value] =
- hash[ hash2Value] =
+ hash[kFix4HashSize + h4] =
+ hash[kFix3HashSize + h3] =
+ hash[ h2] =
p->lzPos;
SKIP_FOOTER_MT
}
@@ -758,11 +769,11 @@ void MatchFinderMt4_Skip(CMatchFinderMt *p, UInt32 num)
void MatchFinderMt_CreateVTable(CMatchFinderMt *p, IMatchFinder *vTable)
{
vTable->Init = (Mf_Init_Func)MatchFinderMt_Init;
- vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinderMt_GetIndexByte;
vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinderMt_GetNumAvailableBytes;
vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinderMt_GetPointerToCurrentPos;
vTable->GetMatches = (Mf_GetMatches_Func)MatchFinderMt_GetMatches;
- switch(p->MatchFinder->numHashBytes)
+
+ switch (p->MatchFinder->numHashBytes)
{
case 2:
p->GetHeadsFunc = GetHeads2;
@@ -778,7 +789,6 @@ void MatchFinderMt_CreateVTable(CMatchFinderMt *p, IMatchFinder *vTable)
default:
/* case 4: */
p->GetHeadsFunc = p->MatchFinder->bigHash ? GetHeads4b : GetHeads4;
- /* p->GetHeadsFunc = GetHeads4; */
p->MixMatchesFunc = (Mf_Mix_Matches)MixMatches3;
vTable->Skip = (Mf_Skip_Func)MatchFinderMt3_Skip;
break;
diff --git a/3rdparty/lzma/C/LzFindMt.h b/3rdparty/lzma/C/LzFindMt.h
index b985af5fee2..89b91fefd6e 100644
--- a/3rdparty/lzma/C/LzFindMt.h
+++ b/3rdparty/lzma/C/LzFindMt.h
@@ -1,5 +1,5 @@
/* LzFindMt.h -- multithreaded Match finder for LZ algorithms
-2009-02-07 : Igor Pavlov : Public domain */
+2015-05-03 : Igor Pavlov : Public domain */
#ifndef __LZ_FIND_MT_H
#define __LZ_FIND_MT_H
@@ -7,9 +7,7 @@
#include "LzFind.h"
#include "Threads.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
#define kMtHashBlockSize (1 << 13)
#define kMtHashNumBlocks (1 << 3)
@@ -77,7 +75,7 @@ typedef struct _CMatchFinderMt
UInt32 matchMaxLen;
UInt32 numHashBytes;
UInt32 pos;
- Byte *buffer;
+ const Byte *buffer;
UInt32 cyclicBufferPos;
UInt32 cyclicBufferSize; /* it must be historySize + 1 */
UInt32 cutValue;
@@ -98,8 +96,6 @@ SRes MatchFinderMt_Create(CMatchFinderMt *p, UInt32 historySize, UInt32 keepAddB
void MatchFinderMt_CreateVTable(CMatchFinderMt *p, IMatchFinder *vTable);
void MatchFinderMt_ReleaseStream(CMatchFinderMt *p);
-#ifdef __cplusplus
-}
-#endif
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/LzHash.h b/3rdparty/lzma/C/LzHash.h
index f3e89966cc7..e7c942303dd 100644
--- a/3rdparty/lzma/C/LzHash.h
+++ b/3rdparty/lzma/C/LzHash.h
@@ -1,5 +1,5 @@
/* LzHash.h -- HASH functions for LZ algorithms
-2009-02-07 : Igor Pavlov : Public domain */
+2015-04-12 : Igor Pavlov : Public domain */
#ifndef __LZ_HASH_H
#define __LZ_HASH_H
@@ -12,43 +12,46 @@
#define kFix4HashSize (kHash2Size + kHash3Size)
#define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size)
-#define HASH2_CALC hashValue = cur[0] | ((UInt32)cur[1] << 8);
+#define HASH2_CALC hv = cur[0] | ((UInt32)cur[1] << 8);
#define HASH3_CALC { \
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hashValue = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; }
+ h2 = temp & (kHash2Size - 1); \
+ hv = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; }
#define HASH4_CALC { \
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
- hashValue = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & p->hashMask; }
+ h2 = temp & (kHash2Size - 1); \
+ temp ^= ((UInt32)cur[2] << 8); \
+ h3 = temp & (kHash3Size - 1); \
+ hv = (temp ^ (p->crc[cur[3]] << 5)) & p->hashMask; }
#define HASH5_CALC { \
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
- hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)); \
- hashValue = (hash4Value ^ (p->crc[cur[4]] << 3)) & p->hashMask; \
- hash4Value &= (kHash4Size - 1); }
+ h2 = temp & (kHash2Size - 1); \
+ temp ^= ((UInt32)cur[2] << 8); \
+ h3 = temp & (kHash3Size - 1); \
+ temp ^= (p->crc[cur[3]] << 5); \
+ h4 = temp & (kHash4Size - 1); \
+ hv = (temp ^ (p->crc[cur[4]] << 3)) & p->hashMask; }
-/* #define HASH_ZIP_CALC hashValue = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */
-#define HASH_ZIP_CALC hashValue = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF;
+/* #define HASH_ZIP_CALC hv = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */
+#define HASH_ZIP_CALC hv = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF;
#define MT_HASH2_CALC \
- hash2Value = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1);
+ h2 = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1);
#define MT_HASH3_CALC { \
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); }
+ h2 = temp & (kHash2Size - 1); \
+ h3 = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); }
#define MT_HASH4_CALC { \
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
- hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); }
+ h2 = temp & (kHash2Size - 1); \
+ temp ^= ((UInt32)cur[2] << 8); \
+ h3 = temp & (kHash3Size - 1); \
+ h4 = (temp ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); }
#endif
diff --git a/3rdparty/lzma/C/Lzma2Dec.c b/3rdparty/lzma/C/Lzma2Dec.c
index f3a6b821daf..b84f88a4813 100644
--- a/3rdparty/lzma/C/Lzma2Dec.c
+++ b/3rdparty/lzma/C/Lzma2Dec.c
@@ -1,8 +1,10 @@
/* Lzma2Dec.c -- LZMA2 Decoder
-2010-12-15 : Igor Pavlov : Public domain */
+2015-11-09 : Igor Pavlov : Public domain */
/* #define SHOW_DEBUG_INFO */
+#include "Precomp.h"
+
#ifdef SHOW_DEBUG_INFO
#include <stdio.h>
#endif
@@ -97,12 +99,12 @@ void Lzma2Dec_Init(CLzma2Dec *p)
static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b)
{
- switch(p->state)
+ switch (p->state)
{
case LZMA2_STATE_CONTROL:
p->control = b;
- PRF(printf("\n %4X ", p->decoder.dicPos));
- PRF(printf(" %2X", b));
+ PRF(printf("\n %4X ", (unsigned)p->decoder.dicPos));
+ PRF(printf(" %2X", (unsigned)b));
if (p->control == 0)
return LZMA2_STATE_FINISHED;
if (LZMA2_IS_UNCOMPRESSED_STATE(p))
@@ -122,7 +124,7 @@ static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b)
case LZMA2_STATE_UNPACK1:
p->unpackSize |= (UInt32)b;
p->unpackSize++;
- PRF(printf(" %8d", p->unpackSize));
+ PRF(printf(" %8u", (unsigned)p->unpackSize));
return (LZMA2_IS_UNCOMPRESSED_STATE(p)) ? LZMA2_STATE_DATA : LZMA2_STATE_PACK0;
case LZMA2_STATE_PACK0:
@@ -132,13 +134,13 @@ static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b)
case LZMA2_STATE_PACK1:
p->packSize |= (UInt32)b;
p->packSize++;
- PRF(printf(" %8d", p->packSize));
+ PRF(printf(" %8u", (unsigned)p->packSize));
return LZMA2_IS_THERE_PROP(LZMA2_GET_LZMA_MODE(p)) ? LZMA2_STATE_PROP:
(p->needInitProp ? LZMA2_STATE_ERROR : LZMA2_STATE_DATA);
case LZMA2_STATE_PROP:
{
- int lc, lp;
+ unsigned lc, lp;
if (b >= (9 * 5 * 5))
return LZMA2_STATE_ERROR;
lc = b % 9;
@@ -177,13 +179,16 @@ SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
while (p->state != LZMA2_STATE_FINISHED)
{
SizeT dicPos = p->decoder.dicPos;
+
if (p->state == LZMA2_STATE_ERROR)
return SZ_ERROR_DATA;
+
if (dicPos == dicLimit && finishMode == LZMA_FINISH_ANY)
{
*status = LZMA_STATUS_NOT_FINISHED;
return SZ_OK;
}
+
if (p->state != LZMA2_STATE_DATA && p->state != LZMA2_STATE_DATA_CONT)
{
if (*srcLen == inSize)
@@ -193,8 +198,15 @@ SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
}
(*srcLen)++;
p->state = Lzma2Dec_UpdateState(p, *src++);
+
+ if (dicPos == dicLimit && p->state != LZMA2_STATE_FINISHED)
+ {
+ p->state = LZMA2_STATE_ERROR;
+ return SZ_ERROR_DATA;
+ }
continue;
}
+
{
SizeT destSizeCur = dicLimit - dicPos;
SizeT srcSizeCur = inSize - *srcLen;
@@ -220,7 +232,10 @@ SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
if (initDic)
p->needInitProp = p->needInitState = True;
else if (p->needInitDic)
+ {
+ p->state = LZMA2_STATE_ERROR;
return SZ_ERROR_DATA;
+ }
p->needInitDic = False;
LzmaDec_InitDicAndState(&p->decoder, initDic, False);
}
@@ -229,7 +244,10 @@ SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
srcSizeCur = destSizeCur;
if (srcSizeCur == 0)
+ {
+ p->state = LZMA2_STATE_ERROR;
return SZ_ERROR_DATA;
+ }
LzmaDec_UpdateWithUncompressed(&p->decoder, src, srcSizeCur);
@@ -245,17 +263,21 @@ SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
if (p->state == LZMA2_STATE_DATA)
{
- int mode = LZMA2_GET_LZMA_MODE(p);
+ unsigned mode = LZMA2_GET_LZMA_MODE(p);
Bool initDic = (mode == 3);
- Bool initState = (mode > 0);
+ Bool initState = (mode != 0);
if ((!initDic && p->needInitDic) || (!initState && p->needInitState))
+ {
+ p->state = LZMA2_STATE_ERROR;
return SZ_ERROR_DATA;
+ }
LzmaDec_InitDicAndState(&p->decoder, initDic, initState);
p->needInitDic = False;
p->needInitState = False;
p->state = LZMA2_STATE_DATA_CONT;
}
+
if (srcSizeCur > p->packSize)
srcSizeCur = (SizeT)p->packSize;
@@ -274,16 +296,22 @@ SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
if (srcSizeCur == 0 && outSizeProcessed == 0)
{
- if (*status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK ||
- p->unpackSize != 0 || p->packSize != 0)
+ if (*status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
+ || p->unpackSize != 0
+ || p->packSize != 0)
+ {
+ p->state = LZMA2_STATE_ERROR;
return SZ_ERROR_DATA;
+ }
p->state = LZMA2_STATE_CONTROL;
}
+
if (*status == LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK)
*status = LZMA_STATUS_NOT_FINISHED;
}
}
}
+
*status = LZMA_STATUS_FINISHED_WITH_MARK;
return SZ_OK;
}
diff --git a/3rdparty/lzma/C/Lzma2Dec.h b/3rdparty/lzma/C/Lzma2Dec.h
index 6bc07bbc185..e6a0f6ed6db 100644
--- a/3rdparty/lzma/C/Lzma2Dec.h
+++ b/3rdparty/lzma/C/Lzma2Dec.h
@@ -1,14 +1,12 @@
/* Lzma2Dec.h -- LZMA2 Decoder
-2009-05-03 : Igor Pavlov : Public domain */
+2015-05-13 : Igor Pavlov : Public domain */
#ifndef __LZMA2_DEC_H
#define __LZMA2_DEC_H
#include "LzmaDec.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
/* ---------- State Interface ---------- */
@@ -17,7 +15,7 @@ typedef struct
CLzmaDec decoder;
UInt32 packSize;
UInt32 unpackSize;
- int state;
+ unsigned state;
Byte control;
Bool needInitDic;
Bool needInitState;
@@ -77,8 +75,6 @@ Returns:
SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc);
-#ifdef __cplusplus
-}
-#endif
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/Lzma2Enc.c b/3rdparty/lzma/C/Lzma2Enc.c
index e97597f63d5..1b77a2bbc1c 100644
--- a/3rdparty/lzma/C/Lzma2Enc.c
+++ b/3rdparty/lzma/C/Lzma2Enc.c
@@ -1,5 +1,7 @@
/* Lzma2Enc.c -- LZMA2 Encoder
-2010-09-24 : Igor Pavlov : Public domain */
+2015-10-04 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
/* #include <stdio.h> */
#include <string.h>
@@ -107,6 +109,7 @@ static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf,
{
size_t destPos = 0;
PRF(printf("################# COPY "));
+
while (unpackSize > 0)
{
UInt32 u = (unpackSize < LZMA2_COPY_CHUNK_SIZE) ? unpackSize : LZMA2_COPY_CHUNK_SIZE;
@@ -119,6 +122,7 @@ static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf,
unpackSize -= u;
destPos += u;
p->srcPos += u;
+
if (outStream)
{
*packSizeRes += destPos;
@@ -130,9 +134,11 @@ static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf,
*packSizeRes = destPos;
/* needInitState = True; */
}
+
LzmaEnc_RestoreState(p->enc);
return SZ_OK;
}
+
{
size_t destPos = 0;
UInt32 u = unpackSize - 1;
@@ -158,11 +164,13 @@ static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf,
if (outStream)
if (outStream->Write(outStream, outBuf, destPos) != destPos)
return SZ_ERROR_WRITE;
+
*packSizeRes = destPos;
return SZ_OK;
}
}
+
/* ---------- Lzma2 Props ---------- */
void Lzma2EncProps_Init(CLzma2EncProps *p)
@@ -216,10 +224,11 @@ void Lzma2EncProps_Normalize(CLzma2EncProps *p)
t3 = t1n * t2;
p->lzmaProps.numThreads = t1;
- p->numBlockThreads = t2;
- p->numTotalThreads = t3;
+
LzmaEncProps_Normalize(&p->lzmaProps);
+ t1 = p->lzmaProps.numThreads;
+
if (p->blockSize == 0)
{
UInt32 dictSize = p->lzmaProps.dictSize;
@@ -231,13 +240,34 @@ void Lzma2EncProps_Normalize(CLzma2EncProps *p)
if (blockSize < dictSize) blockSize = dictSize;
p->blockSize = (size_t)blockSize;
}
+
+ if (t2 > 1 && p->lzmaProps.reduceSize != (UInt64)(Int64)-1)
+ {
+ UInt64 temp = p->lzmaProps.reduceSize + p->blockSize - 1;
+ if (temp > p->lzmaProps.reduceSize)
+ {
+ UInt64 numBlocks = temp / p->blockSize;
+ if (numBlocks < (unsigned)t2)
+ {
+ t2 = (unsigned)numBlocks;
+ if (t2 == 0)
+ t2 = 1;
+ t3 = t1 * t2;
+ }
+ }
+ }
+
+ p->numBlockThreads = t2;
+ p->numTotalThreads = t3;
}
+
static SRes Progress(ICompressProgress *p, UInt64 inSize, UInt64 outSize)
{
return (p && p->Progress(p, inSize, outSize) != SZ_OK) ? SZ_ERROR_PROGRESS : SZ_OK;
}
+
/* ---------- Lzma2 ---------- */
typedef struct
@@ -267,15 +297,17 @@ static SRes Lzma2Enc_EncodeMt1(CLzma2EncInt *p, CLzma2Enc *mainEncoder,
UInt64 packTotal = 0;
SRes res = SZ_OK;
- if (mainEncoder->outBuf == 0)
+ if (!mainEncoder->outBuf)
{
mainEncoder->outBuf = (Byte *)IAlloc_Alloc(mainEncoder->alloc, LZMA2_CHUNK_SIZE_COMPRESSED_MAX);
- if (mainEncoder->outBuf == 0)
+ if (!mainEncoder->outBuf)
return SZ_ERROR_MEM;
}
+
RINOK(Lzma2EncInt_Init(p, &mainEncoder->props));
RINOK(LzmaEnc_PrepareForLzma2(p->enc, inStream, LZMA2_KEEP_WINDOW_SIZE,
mainEncoder->alloc, mainEncoder->allocBig));
+
for (;;)
{
size_t packSize = LZMA2_CHUNK_SIZE_COMPRESSED_MAX;
@@ -289,16 +321,20 @@ static SRes Lzma2Enc_EncodeMt1(CLzma2EncInt *p, CLzma2Enc *mainEncoder,
if (packSize == 0)
break;
}
+
LzmaEnc_Finish(p->enc);
+
if (res == SZ_OK)
{
Byte b = 0;
if (outStream->Write(outStream, &b, 1) != 1)
return SZ_ERROR_WRITE;
}
+
return res;
}
+
#ifndef _7ZIP_ST
typedef struct
@@ -346,10 +382,12 @@ static SRes MtCallbackImp_Code(void *pp, unsigned index, Byte *dest, size_t *des
break;
}
}
+
LzmaEnc_Finish(p->enc);
if (res != SZ_OK)
return res;
}
+
if (finished)
{
if (*destSize == destLim)
@@ -362,12 +400,13 @@ static SRes MtCallbackImp_Code(void *pp, unsigned index, Byte *dest, size_t *des
#endif
+
/* ---------- Lzma2Enc ---------- */
CLzma2EncHandle Lzma2Enc_Create(ISzAlloc *alloc, ISzAlloc *allocBig)
{
CLzma2Enc *p = (CLzma2Enc *)alloc->Alloc(alloc, sizeof(CLzma2Enc));
- if (p == 0)
+ if (!p)
return NULL;
Lzma2EncProps_Init(&p->props);
Lzma2EncProps_Normalize(&p->props);
@@ -379,6 +418,7 @@ CLzma2EncHandle Lzma2Enc_Create(ISzAlloc *alloc, ISzAlloc *allocBig)
for (i = 0; i < NUM_MT_CODER_THREADS_MAX; i++)
p->coders[i].enc = 0;
}
+
#ifndef _7ZIP_ST
MtCoder_Construct(&p->mtCoder);
#endif
@@ -439,22 +479,17 @@ SRes Lzma2Enc_Encode(CLzma2EncHandle pp,
for (i = 0; i < p->props.numBlockThreads; i++)
{
- CLzma2EncInt *t = &p->coders[i];
- if (t->enc == NULL)
+ CLzma2EncInt *t = &p->coders[(unsigned)i];
+ if (!t->enc)
{
t->enc = LzmaEnc_Create(p->alloc);
- if (t->enc == NULL)
+ if (!t->enc)
return SZ_ERROR_MEM;
}
}
#ifndef _7ZIP_ST
- if (p->props.numBlockThreads <= 1)
- #endif
- return Lzma2Enc_EncodeMt1(&p->coders[0], p, outStream, inStream, progress);
-
- #ifndef _7ZIP_ST
-
+ if (p->props.numBlockThreads > 1)
{
CMtCallbackImp mtCallback;
@@ -469,9 +504,17 @@ SRes Lzma2Enc_Encode(CLzma2EncHandle pp,
p->mtCoder.blockSize = p->props.blockSize;
p->mtCoder.destBlockSize = p->props.blockSize + (p->props.blockSize >> 10) + 16;
+ if (p->mtCoder.destBlockSize < p->props.blockSize)
+ {
+ p->mtCoder.destBlockSize = (size_t)0 - 1;
+ if (p->mtCoder.destBlockSize < p->props.blockSize)
+ return SZ_ERROR_FAIL;
+ }
p->mtCoder.numThreads = p->props.numBlockThreads;
return MtCoder_Code(&p->mtCoder);
}
#endif
+
+ return Lzma2Enc_EncodeMt1(&p->coders[0], p, outStream, inStream, progress);
}
diff --git a/3rdparty/lzma/C/Lzma2Enc.h b/3rdparty/lzma/C/Lzma2Enc.h
index 283525581e9..f409f184cc3 100644
--- a/3rdparty/lzma/C/Lzma2Enc.h
+++ b/3rdparty/lzma/C/Lzma2Enc.h
@@ -1,14 +1,12 @@
/* Lzma2Enc.h -- LZMA2 Encoder
-2009-02-07 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __LZMA2_ENC_H
#define __LZMA2_ENC_H
#include "LzmaEnc.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
typedef struct
{
@@ -59,8 +57,6 @@ SRes Lzma2Encode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
*/
-#ifdef __cplusplus
-}
-#endif
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/Lzma86.h b/3rdparty/lzma/C/Lzma86.h
index 6acbd888a04..bebed5cb76a 100644
--- a/3rdparty/lzma/C/Lzma86.h
+++ b/3rdparty/lzma/C/Lzma86.h
@@ -1,10 +1,10 @@
/* Lzma86.h -- LZMA + x86 (BCJ) Filter
-2009-08-14 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __LZMA86_H
#define __LZMA86_H
-#include "Types.h"
+#include "7zTypes.h"
EXTERN_C_BEGIN
diff --git a/3rdparty/lzma/C/Lzma86Dec.c b/3rdparty/lzma/C/Lzma86Dec.c
index fe7726097d0..7d89b2fcdec 100644
--- a/3rdparty/lzma/C/Lzma86Dec.c
+++ b/3rdparty/lzma/C/Lzma86Dec.c
@@ -1,5 +1,7 @@
/* Lzma86Dec.c -- LZMA + x86 (BCJ) Filter Decoder
-2009-08-14 : Igor Pavlov : Public domain */
+2015-11-08 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "Lzma86.h"
@@ -7,8 +9,8 @@
#include "Bra.h"
#include "LzmaDec.h"
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
+static void *SzAlloc(void *p, size_t size) { UNUSED_VAR(p); return MyAlloc(size); }
+static void SzFree(void *p, void *address) { UNUSED_VAR(p); MyFree(address); }
SRes Lzma86_GetUnpackSize(const Byte *src, SizeT srcLen, UInt64 *unpackSize)
{
diff --git a/3rdparty/lzma/C/Lzma86Enc.c b/3rdparty/lzma/C/Lzma86Enc.c
index 2ea4ac2da45..bfb7727d50e 100644
--- a/3rdparty/lzma/C/Lzma86Enc.c
+++ b/3rdparty/lzma/C/Lzma86Enc.c
@@ -1,5 +1,7 @@
/* Lzma86Enc.c -- LZMA + x86 (BCJ) Filter Encoder
-2009-08-14 : Igor Pavlov : Public domain */
+2015-11-08 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include <string.h>
@@ -11,8 +13,8 @@
#define SZE_OUT_OVERFLOW SZE_DATA_ERROR
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
+static void *SzAlloc(void *p, size_t size) { UNUSED_VAR(p); return MyAlloc(size); }
+static void SzFree(void *p, void *address) { UNUSED_VAR(p); MyFree(address); }
int Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen,
int level, UInt32 dictSize, int filterMode)
@@ -99,7 +101,7 @@ int Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen,
}
}
}
- dest[0] = (bestIsFiltered ? 1 : 0);
+ dest[0] = (Byte)(bestIsFiltered ? 1 : 0);
*destLen = LZMA86_HEADER_SIZE + minSize;
}
if (useFilter)
diff --git a/3rdparty/lzma/C/LzmaDec.c b/3rdparty/lzma/C/LzmaDec.c
index f7f79bb063d..27efbaba904 100644
--- a/3rdparty/lzma/C/LzmaDec.c
+++ b/3rdparty/lzma/C/LzmaDec.c
@@ -1,5 +1,7 @@
/* LzmaDec.c -- LZMA Decoder
-2010-12-15 : Igor Pavlov : Public domain */
+2015-06-23 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "LzmaDec.h"
@@ -44,6 +46,13 @@
i -= 0x40; }
#endif
+#define NORMAL_LITER_DEC GET_BIT(prob + symbol, symbol)
+#define MATCHED_LITER_DEC \
+ matchByte <<= 1; \
+ bit = (matchByte & offs); \
+ probLit = prob + offs + bit + symbol; \
+ GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit)
+
#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }
#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
@@ -105,14 +114,14 @@
#define Literal (RepLenCoder + kNumLenProbs)
#define LZMA_BASE_SIZE 1846
-#define LZMA_LIT_SIZE 768
-
-#define LzmaProps_GetNumProbs(p) ((UInt32)LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((p)->lc + (p)->lp)))
+#define LZMA_LIT_SIZE 0x300
#if Literal != LZMA_BASE_SIZE
StopCompilingDueBUG
#endif
+#define LzmaProps_GetNumProbs(p) (Literal + ((UInt32)LZMA_LIT_SIZE << ((p)->lc + (p)->lp)))
+
#define LZMA_DIC_MIN (1 << 12)
/* First LZMA-symbol is always decoded.
@@ -124,8 +133,8 @@ Out:
p->remainLen:
< kMatchSpecLenStart : normal remain
= kMatchSpecLenStart : finished
- = kMatchSpecLenStart + 1 : Flush marker
- = kMatchSpecLenStart + 2 : State Init Marker
+ = kMatchSpecLenStart + 1 : Flush marker (unused now)
+ = kMatchSpecLenStart + 2 : State Init Marker (unused now)
*/
static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
@@ -163,38 +172,62 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
unsigned symbol;
UPDATE_0(prob);
prob = probs + Literal;
- if (checkDicSize != 0 || processedPos != 0)
- prob += (LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) +
- (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc))));
+ if (processedPos != 0 || checkDicSize != 0)
+ prob += ((UInt32)LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) +
+ (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc))));
+ processedPos++;
if (state < kNumLitStates)
{
state -= (state < 4) ? state : 3;
symbol = 1;
- do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100);
+ #ifdef _LZMA_SIZE_OPT
+ do { NORMAL_LITER_DEC } while (symbol < 0x100);
+ #else
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ #endif
}
else
{
- unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
+ unsigned matchByte = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
unsigned offs = 0x100;
state -= (state < 10) ? 3 : 6;
symbol = 1;
+ #ifdef _LZMA_SIZE_OPT
do
{
unsigned bit;
CLzmaProb *probLit;
- matchByte <<= 1;
- bit = (matchByte & offs);
- probLit = prob + offs + bit + symbol;
- GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit)
+ MATCHED_LITER_DEC
}
while (symbol < 0x100);
+ #else
+ {
+ unsigned bit;
+ CLzmaProb *probLit;
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ }
+ #endif
}
+
dic[dicPos++] = (Byte)symbol;
- processedPos++;
continue;
}
- else
+
{
UPDATE_1(prob);
prob = probs + IsRep + state;
@@ -217,7 +250,7 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
IF_BIT_0(prob)
{
UPDATE_0(prob);
- dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
+ dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
dicPos++;
processedPos++;
state = state < kNumLitStates ? 9 : 11;
@@ -258,6 +291,8 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
state = state < kNumLitStates ? 8 : 11;
prob = probs + RepLenCoder;
}
+
+ #ifdef _LZMA_SIZE_OPT
{
unsigned limit, offset;
CLzmaProb *probLen = prob + LenChoice;
@@ -290,6 +325,42 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
TREE_DECODE(probLen, limit, len);
len += offset;
}
+ #else
+ {
+ CLzmaProb *probLen = prob + LenChoice;
+ IF_BIT_0(probLen)
+ {
+ UPDATE_0(probLen);
+ probLen = prob + LenLow + (posState << kLenNumLowBits);
+ len = 1;
+ TREE_GET_BIT(probLen, len);
+ TREE_GET_BIT(probLen, len);
+ TREE_GET_BIT(probLen, len);
+ len -= 8;
+ }
+ else
+ {
+ UPDATE_1(probLen);
+ probLen = prob + LenChoice2;
+ IF_BIT_0(probLen)
+ {
+ UPDATE_0(probLen);
+ probLen = prob + LenMid + (posState << kLenNumMidBits);
+ len = 1;
+ TREE_GET_BIT(probLen, len);
+ TREE_GET_BIT(probLen, len);
+ TREE_GET_BIT(probLen, len);
+ }
+ else
+ {
+ UPDATE_1(probLen);
+ probLen = prob + LenHigh;
+ TREE_DECODE(probLen, (1 << kLenNumHighBits), len);
+ len += kLenNumLowSymbols + kLenNumMidSymbols;
+ }
+ }
+ }
+ #endif
if (state >= kNumStates)
{
@@ -300,7 +371,7 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
if (distance >= kStartPosModelIndex)
{
unsigned posSlot = (unsigned)distance;
- int numDirectBits = (int)(((distance >> 1) - 1));
+ unsigned numDirectBits = (unsigned)(((distance >> 1) - 1));
distance = (2 | (distance & 1));
if (posSlot < kEndPosModelIndex)
{
@@ -359,6 +430,7 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
}
}
}
+
rep3 = rep2;
rep2 = rep1;
rep1 = rep0;
@@ -366,26 +438,39 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
if (checkDicSize == 0)
{
if (distance >= processedPos)
+ {
+ p->dicPos = dicPos;
return SZ_ERROR_DATA;
+ }
}
else if (distance >= checkDicSize)
+ {
+ p->dicPos = dicPos;
return SZ_ERROR_DATA;
+ }
state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3;
}
len += kMatchMinLen;
- if (limit == dicPos)
- return SZ_ERROR_DATA;
{
- SizeT rem = limit - dicPos;
- unsigned curLen = ((rem < len) ? (unsigned)rem : len);
- SizeT pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0);
+ SizeT rem;
+ unsigned curLen;
+ SizeT pos;
+
+ if ((rem = limit - dicPos) == 0)
+ {
+ p->dicPos = dicPos;
+ return SZ_ERROR_DATA;
+ }
+
+ curLen = ((rem < len) ? (unsigned)rem : len);
+ pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0);
processedPos += curLen;
len -= curLen;
- if (pos + curLen <= dicBufSize)
+ if (curLen <= dicBufSize - pos)
{
Byte *dest = dic + dicPos;
ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos;
@@ -409,7 +494,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
}
}
while (dicPos < limit && buf < bufLimit);
+
NORMALIZE;
+
p->buf = buf;
p->range = range;
p->code = code;
@@ -433,9 +520,10 @@ static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit)
SizeT dicPos = p->dicPos;
SizeT dicBufSize = p->dicBufSize;
unsigned len = p->remainLen;
- UInt32 rep0 = p->reps[0];
- if (limit - dicPos < len)
- len = (unsigned)(limit - dicPos);
+ SizeT rep0 = p->reps[0]; /* we use SizeT to avoid the BUG of VC14 for AMD64 */
+ SizeT rem = limit - dicPos;
+ if (rem < len)
+ len = (unsigned)(rem);
if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len)
p->checkDicSize = p->prop.dicSize;
@@ -445,7 +533,7 @@ static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit)
while (len != 0)
{
len--;
- dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
+ dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
dicPos++;
}
p->dicPos = dicPos;
@@ -463,17 +551,19 @@ static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte
if (limit - p->dicPos > rem)
limit2 = p->dicPos + rem;
}
+
RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit));
- if (p->processedPos >= p->prop.dicSize)
+
+ if (p->checkDicSize == 0 && p->processedPos >= p->prop.dicSize)
p->checkDicSize = p->prop.dicSize;
+
LzmaDec_WriteRem(p, limit);
}
while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart);
if (p->remainLen > kMatchSpecLenStart)
- {
p->remainLen = kMatchSpecLenStart;
- }
+
return 0;
}
@@ -490,12 +580,12 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inS
UInt32 range = p->range;
UInt32 code = p->code;
const Byte *bufLimit = buf + inSize;
- CLzmaProb *probs = p->probs;
+ const CLzmaProb *probs = p->probs;
unsigned state = p->state;
ELzmaDummy res;
{
- CLzmaProb *prob;
+ const CLzmaProb *prob;
UInt32 bound;
unsigned ttt;
unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1);
@@ -509,9 +599,9 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inS
prob = probs + Literal;
if (p->checkDicSize != 0 || p->processedPos != 0)
- prob += (LZMA_LIT_SIZE *
- ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) +
- (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc))));
+ prob += ((UInt32)LZMA_LIT_SIZE *
+ ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) +
+ (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc))));
if (state < kNumLitStates)
{
@@ -521,13 +611,13 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inS
else
{
unsigned matchByte = p->dic[p->dicPos - p->reps[0] +
- ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)];
+ (p->dicPos < p->reps[0] ? p->dicBufSize : 0)];
unsigned offs = 0x100;
unsigned symbol = 1;
do
{
unsigned bit;
- CLzmaProb *probLit;
+ const CLzmaProb *probLit;
matchByte <<= 1;
bit = (matchByte & offs);
probLit = prob + offs + bit + symbol;
@@ -597,7 +687,7 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inS
}
{
unsigned limit, offset;
- CLzmaProb *probLen = prob + LenChoice;
+ const CLzmaProb *probLen = prob + LenChoice;
IF_BIT_0_CHECK(probLen)
{
UPDATE_0_CHECK;
@@ -637,7 +727,7 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inS
TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot);
if (posSlot >= kStartPosModelIndex)
{
- int numDirectBits = ((posSlot >> 1) - 1);
+ unsigned numDirectBits = ((posSlot >> 1) - 1);
/* if (bufLimit - buf >= 8) return DUMMY_MATCH; */
@@ -676,13 +766,6 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inS
}
-static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data)
-{
- p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]);
- p->range = 0xFFFFFFFF;
- p->needFlush = 0;
-}
-
void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
{
p->needFlush = 1;
@@ -707,8 +790,8 @@ void LzmaDec_Init(CLzmaDec *p)
static void LzmaDec_InitStateReal(CLzmaDec *p)
{
- UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp));
- UInt32 i;
+ SizeT numProbs = LzmaProps_GetNumProbs(&p->prop);
+ SizeT i;
CLzmaProb *probs = p->probs;
for (i = 0; i < numProbs; i++)
probs[i] = kBitModelTotal >> 1;
@@ -730,7 +813,7 @@ SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *sr
{
int checkEndMarkNow;
- if (p->needFlush != 0)
+ if (p->needFlush)
{
for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--)
p->tempBuf[p->tempBufSize++] = *src++;
@@ -741,8 +824,13 @@ SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *sr
}
if (p->tempBuf[0] != 0)
return SZ_ERROR_DATA;
-
- LzmaDec_InitRc(p, p->tempBuf);
+ p->code =
+ ((UInt32)p->tempBuf[1] << 24)
+ | ((UInt32)p->tempBuf[2] << 16)
+ | ((UInt32)p->tempBuf[3] << 8)
+ | ((UInt32)p->tempBuf[4]);
+ p->range = 0xFFFFFFFF;
+ p->needFlush = 0;
p->tempBufSize = 0;
}
@@ -826,7 +914,16 @@ SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *sr
p->buf = p->tempBuf;
if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0)
return SZ_ERROR_DATA;
- lookAhead -= (rem - (unsigned)(p->buf - p->tempBuf));
+
+ {
+ unsigned kkk = (unsigned)(p->buf - p->tempBuf);
+ if (rem < kkk)
+ return SZ_ERROR_FAIL; /* some internal error */
+ rem -= kkk;
+ if (lookAhead < rem)
+ return SZ_ERROR_FAIL; /* some internal error */
+ lookAhead -= rem;
+ }
(*srcLen) += lookAhead;
src += lookAhead;
inSize -= lookAhead;
@@ -881,13 +978,13 @@ SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *sr
void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc)
{
alloc->Free(alloc, p->probs);
- p->probs = 0;
+ p->probs = NULL;
}
static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc)
{
alloc->Free(alloc, p->dic);
- p->dic = 0;
+ p->dic = NULL;
}
void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc)
@@ -925,12 +1022,12 @@ SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc)
{
UInt32 numProbs = LzmaProps_GetNumProbs(propNew);
- if (p->probs == 0 || numProbs != p->numProbs)
+ if (!p->probs || numProbs != p->numProbs)
{
LzmaDec_FreeProbs(p, alloc);
p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb));
p->numProbs = numProbs;
- if (p->probs == 0)
+ if (!p->probs)
return SZ_ERROR_MEM;
}
return SZ_OK;
@@ -951,12 +1048,22 @@ SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAll
SizeT dicBufSize;
RINOK(LzmaProps_Decode(&propNew, props, propsSize));
RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
- dicBufSize = propNew.dicSize;
- if (p->dic == 0 || dicBufSize != p->dicBufSize)
+
+ {
+ UInt32 dictSize = propNew.dicSize;
+ SizeT mask = ((UInt32)1 << 12) - 1;
+ if (dictSize >= ((UInt32)1 << 30)) mask = ((UInt32)1 << 22) - 1;
+ else if (dictSize >= ((UInt32)1 << 22)) mask = ((UInt32)1 << 20) - 1;;
+ dicBufSize = ((SizeT)dictSize + mask) & ~mask;
+ if (dicBufSize < dictSize)
+ dicBufSize = dictSize;
+ }
+
+ if (!p->dic || dicBufSize != p->dicBufSize)
{
LzmaDec_FreeDict(p, alloc);
p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize);
- if (p->dic == 0)
+ if (!p->dic)
{
LzmaDec_FreeProbs(p, alloc);
return SZ_ERROR_MEM;
@@ -967,27 +1074,6 @@ SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAll
return SZ_OK;
}
-// why isn't there an interface to pass in the properties directly????
-SRes LzmaDec_Allocate_MAME(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc)
-{
- SizeT dicBufSize;
- RINOK(LzmaDec_AllocateProbs2(p, propNew, alloc));
- dicBufSize = propNew->dicSize;
- if (p->dic == 0 || dicBufSize != p->dicBufSize)
- {
- LzmaDec_FreeDict(p, alloc);
- p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize);
- if (p->dic == 0)
- {
- LzmaDec_FreeProbs(p, alloc);
- return SZ_ERROR_MEM;
- }
- }
- p->dicBufSize = dicBufSize;
- p->prop = *propNew;
- return SZ_OK;
-}
-
SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
ELzmaStatus *status, ISzAlloc *alloc)
diff --git a/3rdparty/lzma/C/LzmaDec.h b/3rdparty/lzma/C/LzmaDec.h
index e84a01e282e..cc44daef214 100644
--- a/3rdparty/lzma/C/LzmaDec.h
+++ b/3rdparty/lzma/C/LzmaDec.h
@@ -1,14 +1,12 @@
/* LzmaDec.h -- LZMA Decoder
-2009-02-07 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __LZMA_DEC_H
#define __LZMA_DEC_H
-#include "Types.h"
+#include "7zTypes.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
/* #define _LZMA_PROB32 */
/* _LZMA_PROB32 can increase the speed on some CPUs,
@@ -224,13 +222,6 @@ SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
ELzmaStatus *status, ISzAlloc *alloc);
-/*
- * Why isn't there an interface to pass in the properties directly????
- */
-SRes LzmaDec_Allocate_MAME(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc);
-
-#ifdef __cplusplus
-}
-#endif
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/LzmaEnc.c b/3rdparty/lzma/C/LzmaEnc.c
index e1e170b1977..9c164e6f041 100644
--- a/3rdparty/lzma/C/LzmaEnc.c
+++ b/3rdparty/lzma/C/LzmaEnc.c
@@ -1,5 +1,7 @@
/* LzmaEnc.c -- LZMA Encoder
-2011-01-27 : Igor Pavlov : Public domain */
+2015-11-08 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include <string.h>
@@ -18,9 +20,12 @@
#endif
#ifdef SHOW_STAT
-static int ttt = 0;
+static unsigned g_STAT_OFFSET = 0;
#endif
+#define kMaxHistorySize ((UInt32)3 << 29)
+/* #define kMaxHistorySize ((UInt32)7 << 29) */
+
#define kBlockSizeMax ((1 << LZMA_NUM_BLOCK_SIZE_BITS) - 1)
#define kBlockSize (9 << 10)
@@ -46,7 +51,7 @@ void LzmaEncProps_Init(CLzmaEncProps *p)
{
p->level = 5;
p->dictSize = p->mc = 0;
- p->reduceSize = (UInt32)(Int32)-1;
+ p->reduceSize = (UInt64)(Int64)-1;
p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1;
p->writeEndMark = 0;
}
@@ -56,24 +61,28 @@ void LzmaEncProps_Normalize(CLzmaEncProps *p)
int level = p->level;
if (level < 0) level = 5;
p->level = level;
+
if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26)));
if (p->dictSize > p->reduceSize)
{
unsigned i;
- for (i = 15; i <= 30; i++)
+ for (i = 11; i <= 30; i++)
{
- if (p->reduceSize <= ((UInt32)2 << i)) { p->dictSize = ((UInt32)2 << i); break; }
- if (p->reduceSize <= ((UInt32)3 << i)) { p->dictSize = ((UInt32)3 << i); break; }
+ if ((UInt32)p->reduceSize <= ((UInt32)2 << i)) { p->dictSize = ((UInt32)2 << i); break; }
+ if ((UInt32)p->reduceSize <= ((UInt32)3 << i)) { p->dictSize = ((UInt32)3 << i); break; }
}
}
+
if (p->lc < 0) p->lc = 3;
if (p->lp < 0) p->lp = 0;
if (p->pb < 0) p->pb = 2;
+
if (p->algo < 0) p->algo = (level < 5 ? 0 : 1);
if (p->fb < 0) p->fb = (level < 7 ? 32 : 64);
if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1);
if (p->numHashBytes < 0) p->numHashBytes = 4;
- if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1);
+ if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1);
+
if (p->numThreads < 0)
p->numThreads =
#ifndef _7ZIP_ST
@@ -90,17 +99,18 @@ UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2)
return props.dictSize;
}
+#if (_MSC_VER >= 1400)
+/* BSR code is fast for some new CPUs */
/* #define LZMA_LOG_BSR */
-/* Define it for Intel's CPU */
-
+#endif
#ifdef LZMA_LOG_BSR
-#define kDicLogSizeMaxCompress 30
+#define kDicLogSizeMaxCompress 32
#define BSR2_RET(pos, res) { unsigned long i; _BitScanReverse(&i, (pos)); res = (i + i) + ((pos >> (i - 1)) & 1); }
-UInt32 GetPosSlot1(UInt32 pos)
+static UInt32 GetPosSlot1(UInt32 pos)
{
UInt32 res;
BSR2_RET(pos, res);
@@ -111,27 +121,44 @@ UInt32 GetPosSlot1(UInt32 pos)
#else
-#define kNumLogBits (9 + (int)sizeof(size_t) / 2)
+#define kNumLogBits (9 + sizeof(size_t) / 2)
+/* #define kNumLogBits (11 + sizeof(size_t) / 8 * 3) */
+
#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7)
-void LzmaEnc_FastPosInit(Byte *g_FastPos)
+static void LzmaEnc_FastPosInit(Byte *g_FastPos)
{
- int c = 2, slotFast;
+ unsigned slot;
g_FastPos[0] = 0;
g_FastPos[1] = 1;
+ g_FastPos += 2;
- for (slotFast = 2; slotFast < kNumLogBits * 2; slotFast++)
+ for (slot = 2; slot < kNumLogBits * 2; slot++)
{
- UInt32 k = (1 << ((slotFast >> 1) - 1));
- UInt32 j;
- for (j = 0; j < k; j++, c++)
- g_FastPos[c] = (Byte)slotFast;
+ size_t k = ((size_t)1 << ((slot >> 1) - 1));
+ size_t j;
+ for (j = 0; j < k; j++)
+ g_FastPos[j] = (Byte)slot;
+ g_FastPos += k;
}
}
+/* we can use ((limit - pos) >> 31) only if (pos < ((UInt32)1 << 31)) */
+/*
#define BSR2_RET(pos, res) { UInt32 i = 6 + ((kNumLogBits - 1) & \
(0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \
res = p->g_FastPos[pos >> i] + (i * 2); }
+*/
+
+/*
+#define BSR2_RET(pos, res) { UInt32 i = 6 + ((kNumLogBits - 1) & \
+ (0 - (((((UInt32)1 << (kNumLogBits)) - 1) - (pos >> 6)) >> 31))); \
+ res = p->g_FastPos[pos >> i] + (i * 2); }
+*/
+
+#define BSR2_RET(pos, res) { UInt32 i = (pos < (1 << (kNumLogBits + 6))) ? 6 : 6 + kNumLogBits - 1; \
+ res = p->g_FastPos[pos >> i] + (i * 2); }
+
/*
#define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \
p->g_FastPos[pos >> 6] + 12 : \
@@ -211,6 +238,7 @@ typedef struct
#define kNumStates 12
+
typedef struct
{
CLzmaProb choice;
@@ -220,14 +248,16 @@ typedef struct
CLzmaProb high[kLenNumHighSymbols];
} CLenEnc;
+
typedef struct
{
CLenEnc p;
- UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal];
UInt32 tableSize;
+ UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal];
UInt32 counters[LZMA_NUM_PB_STATES_MAX];
} CLenPriceEnc;
+
typedef struct
{
UInt32 range;
@@ -242,10 +272,14 @@ typedef struct
SRes res;
} CRangeEnc;
+
typedef struct
{
CLzmaProb *litProbs;
+ UInt32 state;
+ UInt32 reps[LZMA_NUM_REPS];
+
CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX];
CLzmaProb isRep[kNumStates];
CLzmaProb isRepG0[kNumStates];
@@ -259,15 +293,49 @@ typedef struct
CLenPriceEnc lenEnc;
CLenPriceEnc repLenEnc;
-
- UInt32 reps[LZMA_NUM_REPS];
- UInt32 state;
} CSaveState;
+
typedef struct
{
- IMatchFinder matchFinder;
void *matchFinderObj;
+ IMatchFinder matchFinder;
+
+ UInt32 optimumEndIndex;
+ UInt32 optimumCurrentIndex;
+
+ UInt32 longestMatchLength;
+ UInt32 numPairs;
+ UInt32 numAvail;
+
+ UInt32 numFastBytes;
+ UInt32 additionalOffset;
+ UInt32 reps[LZMA_NUM_REPS];
+ UInt32 state;
+
+ unsigned lc, lp, pb;
+ unsigned lpMask, pbMask;
+ unsigned lclp;
+
+ CLzmaProb *litProbs;
+
+ Bool fastMode;
+ Bool writeEndMark;
+ Bool finished;
+ Bool multiThread;
+ Bool needInit;
+
+ UInt64 nowPos64;
+
+ UInt32 matchPriceCount;
+ UInt32 alignPriceCount;
+
+ UInt32 distTableSize;
+
+ UInt32 dictSize;
+ SRes result;
+
+ CRangeEnc rc;
#ifndef _7ZIP_ST
Bool mtMode;
@@ -280,12 +348,6 @@ typedef struct
Byte pad[128];
#endif
- UInt32 optimumEndIndex;
- UInt32 optimumCurrentIndex;
-
- UInt32 longestMatchLength;
- UInt32 numPairs;
- UInt32 numAvail;
COptimal opt[kNumOpts];
#ifndef LZMA_LOG_BSR
@@ -294,22 +356,10 @@ typedef struct
UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1];
- UInt32 numFastBytes;
- UInt32 additionalOffset;
- UInt32 reps[LZMA_NUM_REPS];
- UInt32 state;
UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax];
UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances];
UInt32 alignPrices[kAlignTableSize];
- UInt32 alignPriceCount;
-
- UInt32 distTableSize;
-
- unsigned lc, lp, pb;
- unsigned lpMask, pbMask;
-
- CLzmaProb *litProbs;
CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX];
CLzmaProb isRep[kNumStates];
@@ -325,26 +375,14 @@ typedef struct
CLenPriceEnc lenEnc;
CLenPriceEnc repLenEnc;
- unsigned lclp;
-
- Bool fastMode;
-
- CRangeEnc rc;
-
- Bool writeEndMark;
- UInt64 nowPos64;
- UInt32 matchPriceCount;
- Bool finished;
- Bool multiThread;
-
- SRes result;
- UInt32 dictSize;
-
- int needInit;
-
CSaveState saveState;
+
+ #ifndef _7ZIP_ST
+ Byte pad2[128];
+ #endif
} CLzmaEnc;
+
void LzmaEnc_SaveState(CLzmaEncHandle pp)
{
CLzmaEnc *p = (CLzmaEnc *)pp;
@@ -368,7 +406,7 @@ void LzmaEnc_SaveState(CLzmaEncHandle pp)
memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders));
memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder));
memcpy(dest->reps, p->reps, sizeof(p->reps));
- memcpy(dest->litProbs, p->litProbs, (0x300 << p->lclp) * sizeof(CLzmaProb));
+ memcpy(dest->litProbs, p->litProbs, ((UInt32)0x300 << p->lclp) * sizeof(CLzmaProb));
}
void LzmaEnc_RestoreState(CLzmaEncHandle pp)
@@ -394,7 +432,7 @@ void LzmaEnc_RestoreState(CLzmaEncHandle pp)
memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders));
memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder));
memcpy(dest->reps, p->reps, sizeof(p->reps));
- memcpy(dest->litProbs, p->litProbs, (0x300 << dest->lclp) * sizeof(CLzmaProb));
+ memcpy(dest->litProbs, p->litProbs, ((UInt32)0x300 << dest->lclp) * sizeof(CLzmaProb));
}
SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
@@ -403,9 +441,13 @@ SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
CLzmaEncProps props = *props2;
LzmaEncProps_Normalize(&props);
- if (props.lc > LZMA_LC_MAX || props.lp > LZMA_LP_MAX || props.pb > LZMA_PB_MAX ||
- props.dictSize > ((UInt32)1 << kDicLogSizeMaxCompress) || props.dictSize > ((UInt32)1 << 30))
+ if (props.lc > LZMA_LC_MAX
+ || props.lp > LZMA_LP_MAX
+ || props.pb > LZMA_PB_MAX
+ || props.dictSize > ((UInt64)1 << kDicLogSizeMaxCompress)
+ || props.dictSize > kMaxHistorySize)
return SZ_ERROR_PARAM;
+
p->dictSize = props.dictSize;
{
unsigned fb = props.fb;
@@ -419,7 +461,7 @@ SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
p->lp = props.lp;
p->pb = props.pb;
p->fastMode = (props.algo == 0);
- p->matchFinderBase.btMode = props.btMode;
+ p->matchFinderBase.btMode = (Byte)(props.btMode ? 1 : 0);
{
UInt32 numHashBytes = 4;
if (props.btMode)
@@ -463,8 +505,8 @@ static const int kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11,
static void RangeEnc_Construct(CRangeEnc *p)
{
- p->outStream = 0;
- p->bufBase = 0;
+ p->outStream = NULL;
+ p->bufBase = NULL;
}
#define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize)
@@ -472,10 +514,10 @@ static void RangeEnc_Construct(CRangeEnc *p)
#define RC_BUF_SIZE (1 << 16)
static int RangeEnc_Alloc(CRangeEnc *p, ISzAlloc *alloc)
{
- if (p->bufBase == 0)
+ if (!p->bufBase)
{
p->bufBase = (Byte *)alloc->Alloc(alloc, RC_BUF_SIZE);
- if (p->bufBase == 0)
+ if (!p->bufBase)
return 0;
p->bufLim = p->bufBase + RC_BUF_SIZE;
}
@@ -516,7 +558,7 @@ static void RangeEnc_FlushStream(CRangeEnc *p)
static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p)
{
- if ((UInt32)p->low < (UInt32)0xFF000000 || (int)(p->low >> 32) != 0)
+ if ((UInt32)p->low < (UInt32)0xFF000000 || (unsigned)(p->low >> 32) != 0)
{
Byte temp = p->cache;
do
@@ -542,7 +584,7 @@ static void RangeEnc_FlushData(CRangeEnc *p)
RangeEnc_ShiftLow(p);
}
-static void RangeEnc_EncodeDirectBits(CRangeEnc *p, UInt32 value, int numBits)
+static void RangeEnc_EncodeDirectBits(CRangeEnc *p, UInt32 value, unsigned numBits)
{
do
{
@@ -605,7 +647,7 @@ static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol,
while (symbol < 0x10000);
}
-void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
+static void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
{
UInt32 i;
for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits))
@@ -641,7 +683,7 @@ void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
#define GET_PRICE_0a(prob) ProbPrices[(prob) >> kNumMoveReducingBits]
#define GET_PRICE_1a(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits]
-static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UInt32 *ProbPrices)
+static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, const UInt32 *ProbPrices)
{
UInt32 price = 0;
symbol |= 0x100;
@@ -654,7 +696,7 @@ static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UInt32 *Pro
return price;
}
-static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, UInt32 *ProbPrices)
+static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, const UInt32 *ProbPrices)
{
UInt32 price = 0;
UInt32 offs = 0x100;
@@ -698,7 +740,7 @@ static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLeve
}
}
-static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices)
+static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, const UInt32 *ProbPrices)
{
UInt32 price = 0;
symbol |= (1 << numBitLevels);
@@ -710,7 +752,7 @@ static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 s
return price;
}
-static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices)
+static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, const UInt32 *ProbPrices)
{
UInt32 price = 0;
UInt32 m = 1;
@@ -761,7 +803,7 @@ static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posSt
}
}
-static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, UInt32 *ProbPrices)
+static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, const UInt32 *ProbPrices)
{
UInt32 a0 = GET_PRICE_0a(p->choice);
UInt32 a1 = GET_PRICE_1a(p->choice);
@@ -784,20 +826,20 @@ static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UIn
prices[i] = b1 + RcTree_GetPrice(p->high, kLenNumHighBits, i - kLenNumLowSymbols - kLenNumMidSymbols, ProbPrices);
}
-static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, UInt32 *ProbPrices)
+static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, const UInt32 *ProbPrices)
{
LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices);
p->counters[posState] = p->tableSize;
}
-static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, UInt32 numPosStates, UInt32 *ProbPrices)
+static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, UInt32 numPosStates, const UInt32 *ProbPrices)
{
UInt32 posState;
for (posState = 0; posState < numPosStates; posState++)
LenPriceEnc_UpdateTable(p, posState, ProbPrices);
}
-static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, UInt32 *ProbPrices)
+static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, const UInt32 *ProbPrices)
{
LenEnc_Encode(&p->p, rc, symbol, posState);
if (updatePrice)
@@ -811,9 +853,10 @@ static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32
static void MovePos(CLzmaEnc *p, UInt32 num)
{
#ifdef SHOW_STAT
- ttt += num;
- printf("\n MovePos %d", num);
+ g_STAT_OFFSET += num;
+ printf("\n MovePos %u", num);
#endif
+
if (num != 0)
{
p->additionalOffset += num;
@@ -826,28 +869,32 @@ static UInt32 ReadMatchDistances(CLzmaEnc *p, UInt32 *numDistancePairsRes)
UInt32 lenRes = 0, numPairs;
p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches);
+
#ifdef SHOW_STAT
- printf("\n i = %d numPairs = %d ", ttt, numPairs / 2);
- ttt++;
+ printf("\n i = %u numPairs = %u ", g_STAT_OFFSET, numPairs / 2);
+ g_STAT_OFFSET++;
{
UInt32 i;
for (i = 0; i < numPairs; i += 2)
- printf("%2d %6d | ", p->matches[i], p->matches[i + 1]);
+ printf("%2u %6u | ", p->matches[i], p->matches[i + 1]);
}
#endif
+
if (numPairs > 0)
{
lenRes = p->matches[numPairs - 2];
if (lenRes == p->numFastBytes)
{
- const Byte *pby = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
- UInt32 distance = p->matches[numPairs - 1] + 1;
UInt32 numAvail = p->numAvail;
if (numAvail > LZMA_MATCH_LEN_MAX)
numAvail = LZMA_MATCH_LEN_MAX;
{
- const Byte *pby2 = pby - distance;
- for (; lenRes < numAvail && pby[lenRes] == pby2[lenRes]; lenRes++);
+ const Byte *pbyCur = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+ const Byte *pby = pbyCur + lenRes;
+ ptrdiff_t dif = (ptrdiff_t)-1 - p->matches[numPairs - 1];
+ const Byte *pbyLim = pbyCur + numAvail;
+ for (; pby != pbyLim && *pby == pby[dif]; pby++);
+ lenRes = (UInt32)(pby - pbyCur);
}
}
}
@@ -932,7 +979,7 @@ static UInt32 Backward(CLzmaEnc *p, UInt32 *backRes, UInt32 cur)
return p->optimumCurrentIndex;
}
-#define LIT_PROBS(pos, prevByte) (p->litProbs + ((((pos) & p->lpMask) << p->lc) + ((prevByte) >> (8 - p->lc))) * 0x300)
+#define LIT_PROBS(pos, prevByte) (p->litProbs + ((((pos) & p->lpMask) << p->lc) + ((prevByte) >> (8 - p->lc))) * (UInt32)0x300)
static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
{
@@ -976,7 +1023,7 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
UInt32 lenTest;
const Byte *data2;
reps[i] = p->reps[i];
- data2 = data - (reps[i] + 1);
+ data2 = data - reps[i] - 1;
if (data[0] != data2[0] || data[1] != data2[1])
{
repLens[i] = 0;
@@ -1120,12 +1167,12 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
cur = 0;
#ifdef SHOW_STAT2
- if (position >= 0)
+ /* if (position >= 0) */
{
unsigned i;
printf("\n pos = %4X", position);
for (i = cur; i <= lenEnd; i++)
- printf("\nprice[%4X] = %d", position - cur + i, p->opt[i].price);
+ printf("\nprice[%4X] = %u", position - cur + i, p->opt[i].price);
}
#endif
@@ -1277,7 +1324,7 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
/* try Literal + rep0 */
UInt32 temp;
UInt32 lenTest2;
- const Byte *data2 = data - (reps[0] + 1);
+ const Byte *data2 = data - reps[0] - 1;
UInt32 limit = p->numFastBytes + 1;
if (limit > numAvailFull)
limit = numAvailFull;
@@ -1320,7 +1367,7 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
UInt32 lenTest;
UInt32 lenTestTemp;
UInt32 price;
- const Byte *data2 = data - (reps[repIndex] + 1);
+ const Byte *data2 = data - reps[repIndex] - 1;
if (data[0] != data2[0] || data[1] != data2[1])
continue;
for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++);
@@ -1350,13 +1397,13 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
{
UInt32 lenTest2 = lenTest + 1;
UInt32 limit = lenTest2 + p->numFastBytes;
- UInt32 nextRepMatchPrice;
if (limit > numAvailFull)
limit = numAvailFull;
for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++);
lenTest2 -= lenTest + 1;
if (lenTest2 >= 2)
{
+ UInt32 nextRepMatchPrice;
UInt32 state2 = kRepNextStates[state];
UInt32 posStateNext = (position + lenTest) & p->pbMask;
UInt32 curAndLenCharPrice =
@@ -1437,16 +1484,16 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
if (/*_maxMode && */lenTest == matches[offs])
{
/* Try Match + Literal + Rep0 */
- const Byte *data2 = data - (curBack + 1);
+ const Byte *data2 = data - curBack - 1;
UInt32 lenTest2 = lenTest + 1;
UInt32 limit = lenTest2 + p->numFastBytes;
- UInt32 nextRepMatchPrice;
if (limit > numAvailFull)
limit = numAvailFull;
for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++);
lenTest2 -= lenTest + 1;
if (lenTest2 >= 2)
{
+ UInt32 nextRepMatchPrice;
UInt32 state2 = kMatchNextStates[state];
UInt32 posStateNext = (position + lenTest) & p->pbMask;
UInt32 curAndLenCharPrice = curAndLenPrice +
@@ -1520,7 +1567,7 @@ static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes)
for (i = 0; i < LZMA_NUM_REPS; i++)
{
UInt32 len;
- const Byte *data2 = data - (p->reps[i] + 1);
+ const Byte *data2 = data - p->reps[i] - 1;
if (data[0] != data2[0] || data[1] != data2[1])
continue;
for (len = 2; len < numAvail && data[len] == data2[len]; len++);
@@ -1589,7 +1636,7 @@ static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes)
for (i = 0; i < LZMA_NUM_REPS; i++)
{
UInt32 len, limit;
- const Byte *data2 = data - (p->reps[i] + 1);
+ const Byte *data2 = data - p->reps[i] - 1;
if (data[0] != data2[0] || data[1] != data2[1])
continue;
limit = mainLen - 1;
@@ -1685,6 +1732,7 @@ void LzmaEnc_Construct(CLzmaEnc *p)
{
RangeEnc_Construct(&p->rc);
MatchFinder_Construct(&p->matchFinderBase);
+
#ifndef _7ZIP_ST
MatchFinderMt_Construct(&p->matchFinderMt);
p->matchFinderMt.MatchFinder = &p->matchFinderBase;
@@ -1701,15 +1749,15 @@ void LzmaEnc_Construct(CLzmaEnc *p)
#endif
LzmaEnc_InitPriceTables(p->ProbPrices);
- p->litProbs = 0;
- p->saveState.litProbs = 0;
+ p->litProbs = NULL;
+ p->saveState.litProbs = NULL;
}
CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc)
{
void *p;
p = alloc->Alloc(alloc, sizeof(CLzmaEnc));
- if (p != 0)
+ if (p)
LzmaEnc_Construct((CLzmaEnc *)p);
return p;
}
@@ -1718,8 +1766,8 @@ void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
{
alloc->Free(alloc, p->litProbs);
alloc->Free(alloc, p->saveState.litProbs);
- p->litProbs = 0;
- p->saveState.litProbs = 0;
+ p->litProbs = NULL;
+ p->saveState.litProbs = NULL;
}
void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig)
@@ -1727,6 +1775,7 @@ void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig)
#ifndef _7ZIP_ST
MatchFinderMt_Destruct(&p->matchFinderMt, allocBig);
#endif
+
MatchFinder_Free(&p->matchFinderBase, allocBig);
LzmaEnc_FreeLits(p, alloc);
RangeEnc_Free(&p->rc, alloc);
@@ -1763,7 +1812,7 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize
ReadMatchDistances(p, &numPairs);
RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][0], 0);
p->state = kLiteralNextStates[p->state];
- curByte = p->matchFinder.GetIndexByte(p->matchFinderObj, 0 - p->additionalOffset);
+ curByte = *(p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset);
LitEnc_Encode(&p->rc, p->litProbs, curByte);
p->additionalOffset--;
nowPos32++;
@@ -1780,7 +1829,7 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize
len = GetOptimum(p, nowPos32, &pos);
#ifdef SHOW_STAT2
- printf("\n pos = %4X, len = %d pos = %d", nowPos32, len, pos);
+ printf("\n pos = %4X, len = %u pos = %u", nowPos32, len, pos);
#endif
posState = nowPos32 & p->pbMask;
@@ -1889,7 +1938,7 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize
RangeEnc_GetProcessed(&p->rc) + kNumOpts * 2 >= maxPackSize)
break;
}
- else if (processed >= (1 << 15))
+ else if (processed >= (1 << 17))
{
p->nowPos64 += nowPos32 - startPos32;
return CheckErrors(p);
@@ -1905,24 +1954,21 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize
static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
{
UInt32 beforeSize = kNumOpts;
- #ifndef _7ZIP_ST
- Bool btMode;
- #endif
if (!RangeEnc_Alloc(&p->rc, alloc))
- return SZ_ERROR_MEM;
+ return SZ_ERROR_MEM;
+
#ifndef _7ZIP_ST
- btMode = (p->matchFinderBase.btMode != 0);
- p->mtMode = (p->multiThread && !p->fastMode && btMode);
+ p->mtMode = (p->multiThread && !p->fastMode && (p->matchFinderBase.btMode != 0));
#endif
{
unsigned lclp = p->lc + p->lp;
- if (p->litProbs == 0 || p->saveState.litProbs == 0 || p->lclp != lclp)
+ if (!p->litProbs || !p->saveState.litProbs || p->lclp != lclp)
{
LzmaEnc_FreeLits(p, alloc);
- p->litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb));
- p->saveState.litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb));
- if (p->litProbs == 0 || p->saveState.litProbs == 0)
+ p->litProbs = (CLzmaProb *)alloc->Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb));
+ p->saveState.litProbs = (CLzmaProb *)alloc->Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb));
+ if (!p->litProbs || !p->saveState.litProbs)
{
LzmaEnc_FreeLits(p, alloc);
return SZ_ERROR_MEM;
@@ -1931,7 +1977,7 @@ static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, I
}
}
- p->matchFinderBase.bigHash = (p->dictSize > kBigHashDicLimit);
+ p->matchFinderBase.bigHash = (Byte)(p->dictSize > kBigHashDicLimit ? 1 : 0);
if (beforeSize + p->dictSize < keepWindowSize)
beforeSize = keepWindowSize - p->dictSize;
@@ -1951,6 +1997,7 @@ static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, I
p->matchFinderObj = &p->matchFinderBase;
MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder);
}
+
return SZ_OK;
}
@@ -1979,9 +2026,10 @@ void LzmaEnc_Init(CLzmaEnc *p)
}
{
- UInt32 num = 0x300 << (p->lp + p->lc);
+ UInt32 num = (UInt32)0x300 << (p->lp + p->lc);
+ CLzmaProb *probs = p->litProbs;
for (i = 0; i < num; i++)
- p->litProbs[i] = kProbInitValue;
+ probs[i] = kProbInitValue;
}
{
@@ -2087,9 +2135,12 @@ void LzmaEnc_Finish(CLzmaEncHandle pp)
CLzmaEnc *p = (CLzmaEnc *)pp;
if (p->mtMode)
MatchFinderMt_ReleaseStream(&p->matchFinderMt);
+ #else
+ UNUSED_VAR(pp);
#endif
}
+
typedef struct
{
ISeqOutStream funcTable;
@@ -2119,12 +2170,14 @@ UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
}
+
const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
{
const CLzmaEnc *p = (CLzmaEnc *)pp;
return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
}
+
SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize)
{
@@ -2159,23 +2212,23 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
return res;
}
+
static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
{
SRes res = SZ_OK;
#ifndef _7ZIP_ST
Byte allocaDummy[0x300];
- int i = 0;
- for (i = 0; i < 16; i++)
- allocaDummy[i] = (Byte)i;
+ allocaDummy[0] = 0;
+ allocaDummy[1] = allocaDummy[0];
#endif
for (;;)
{
res = LzmaEnc_CodeOneBlock(p, False, 0, 0);
- if (res != SZ_OK || p->finished != 0)
+ if (res != SZ_OK || p->finished)
break;
- if (progress != 0)
+ if (progress)
{
res = progress->Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc));
if (res != SZ_OK)
@@ -2185,10 +2238,19 @@ static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
}
}
}
+
LzmaEnc_Finish(p);
+
+ /*
+ if (res == S_OK && !Inline_MatchFinder_IsFinishedOK(&p->matchFinderBase))
+ res = SZ_ERROR_FAIL;
+ }
+ */
+
return res;
}
+
SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress,
ISzAlloc *alloc, ISzAlloc *allocBig)
{
@@ -2196,28 +2258,27 @@ SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *i
return LzmaEnc_Encode2((CLzmaEnc *)pp, progress);
}
+
SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size)
{
CLzmaEnc *p = (CLzmaEnc *)pp;
- int i;
+ unsigned i;
UInt32 dictSize = p->dictSize;
if (*size < LZMA_PROPS_SIZE)
return SZ_ERROR_PARAM;
*size = LZMA_PROPS_SIZE;
props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc);
- for (i = 11; i <= 30; i++)
+ if (dictSize >= ((UInt32)1 << 22))
{
- if (dictSize <= ((UInt32)2 << i))
- {
- dictSize = (2 << i);
- break;
- }
- if (dictSize <= ((UInt32)3 << i))
- {
- dictSize = (3 << i);
- break;
- }
+ UInt32 kDictMask = ((UInt32)1 << 20) - 1;
+ if (dictSize < (UInt32)0xFFFFFFFF - kDictMask)
+ dictSize = (dictSize + kDictMask) & ~kDictMask;
+ }
+ else for (i = 11; i <= 30; i++)
+ {
+ if (dictSize <= ((UInt32)2 << i)) { dictSize = (2 << i); break; }
+ if (dictSize <= ((UInt32)3 << i)) { dictSize = (3 << i); break; }
}
for (i = 0; i < 4; i++)
@@ -2225,6 +2286,7 @@ SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size)
return SZ_OK;
}
+
SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig)
{
@@ -2233,19 +2295,22 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte
CSeqOutStreamBuf outStream;
- LzmaEnc_SetInputBuf(p, src, srcLen);
-
outStream.funcTable.Write = MyWrite;
outStream.data = dest;
outStream.rem = *destLen;
outStream.overflow = False;
p->writeEndMark = writeEndMark;
-
p->rc.outStream = &outStream.funcTable;
+
res = LzmaEnc_MemPrepare(pp, src, srcLen, 0, alloc, allocBig);
+
if (res == SZ_OK)
+ {
res = LzmaEnc_Encode2(p, progress);
+ if (res == SZ_OK && p->nowPos64 != srcLen)
+ res = SZ_ERROR_FAIL;
+ }
*destLen -= outStream.rem;
if (outStream.overflow)
@@ -2253,13 +2318,14 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte
return res;
}
+
SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig)
{
CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc);
SRes res;
- if (p == 0)
+ if (!p)
return SZ_ERROR_MEM;
res = LzmaEnc_SetProps(p, props);
diff --git a/3rdparty/lzma/C/LzmaEnc.h b/3rdparty/lzma/C/LzmaEnc.h
index b8d9ce77230..cffe220bbf6 100644
--- a/3rdparty/lzma/C/LzmaEnc.h
+++ b/3rdparty/lzma/C/LzmaEnc.h
@@ -1,10 +1,10 @@
/* LzmaEnc.h -- LZMA Encoder
-2011-01-27 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __LZMA_ENC_H
#define __LZMA_ENC_H
-#include "Types.h"
+#include "7zTypes.h"
EXTERN_C_BEGIN
@@ -16,7 +16,7 @@ typedef struct _CLzmaEncProps
UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version
(1 << 12) <= dictSize <= (1 << 30) for 64-bit version
default = (1 << 24) */
- UInt32 reduceSize; /* estimated size of data that will be compressed. default = 0xFFFFFFFF.
+ UInt64 reduceSize; /* estimated size of data that will be compressed. default = 0xFFFFFFFF.
Encoder uses this value to reduce dictionary size */
int lc; /* 0 <= lc <= 8, default = 3 */
int lp; /* 0 <= lp <= 4, default = 0 */
diff --git a/3rdparty/lzma/C/LzmaLib.c b/3rdparty/lzma/C/LzmaLib.c
index 02a511857c9..706e9e58cd6 100644
--- a/3rdparty/lzma/C/LzmaLib.c
+++ b/3rdparty/lzma/C/LzmaLib.c
@@ -1,18 +1,12 @@
/* LzmaLib.c -- LZMA library wrapper
-2008-08-05
-Igor Pavlov
-Public domain */
+2015-06-13 : Igor Pavlov : Public domain */
-#include "LzmaEnc.h"
-#include "LzmaDec.h"
#include "Alloc.h"
+#include "LzmaDec.h"
+#include "LzmaEnc.h"
#include "LzmaLib.h"
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
-
-MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen,
+MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen,
unsigned char *outProps, size_t *outPropsSize,
int level, /* 0 <= level <= 9, default = 5 */
unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */
@@ -38,7 +32,7 @@ MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned cha
}
-MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen,
+MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen,
const unsigned char *props, size_t propsSize)
{
ELzmaStatus status;
diff --git a/3rdparty/lzma/C/LzmaLib.h b/3rdparty/lzma/C/LzmaLib.h
index 76c99ce758d..88fa87d350c 100644
--- a/3rdparty/lzma/C/LzmaLib.h
+++ b/3rdparty/lzma/C/LzmaLib.h
@@ -1,14 +1,12 @@
/* LzmaLib.h -- LZMA library interface
-2009-04-07 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __LZMA_LIB_H
#define __LZMA_LIB_H
-#include "Types.h"
+#include "7zTypes.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+EXTERN_C_BEGIN
#define MY_STDAPI int MY_STD_CALL
@@ -128,8 +126,6 @@ Returns:
MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen,
const unsigned char *props, size_t propsSize);
-#ifdef __cplusplus
-}
-#endif
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/MtCoder.c b/3rdparty/lzma/C/MtCoder.c
index 946fbbc7076..8d9731d0a28 100644
--- a/3rdparty/lzma/C/MtCoder.c
+++ b/3rdparty/lzma/C/MtCoder.c
@@ -1,7 +1,7 @@
/* MtCoder.c -- Multi-thread Coder
-2010-09-24 : Igor Pavlov : Public domain */
+2015-10-13 : Igor Pavlov : Public domain */
-#include <stdio.h>
+#include "Precomp.h"
#include "MtCoder.h"
@@ -118,7 +118,7 @@ void CMtThread_Construct(CMtThread *p, CMtCoder *mtCoder)
LoopThread_Construct(&p->thread);
}
-#define RINOK_THREAD(x) { if((x) != 0) return SZ_ERROR_THREAD; }
+#define RINOK_THREAD(x) { if ((x) != 0) return SZ_ERROR_THREAD; }
static void CMtThread_CloseEvents(CMtThread *p)
{
diff --git a/3rdparty/lzma/C/Ppmd.h b/3rdparty/lzma/C/Ppmd.h
index 9cbc46647b8..4356dd1d871 100644
--- a/3rdparty/lzma/C/Ppmd.h
+++ b/3rdparty/lzma/C/Ppmd.h
@@ -1,11 +1,10 @@
/* Ppmd.h -- PPMD codec common code
-2011-01-27 : Igor Pavlov : Public domain
+2013-01-18 : Igor Pavlov : Public domain
This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
#ifndef __PPMD_H
#define __PPMD_H
-#include "Types.h"
#include "CpuArch.h"
EXTERN_C_BEGIN
diff --git a/3rdparty/lzma/C/Ppmd7.c b/3rdparty/lzma/C/Ppmd7.c
index bba4d06f0ab..7ef84d47b3b 100644
--- a/3rdparty/lzma/C/Ppmd7.c
+++ b/3rdparty/lzma/C/Ppmd7.c
@@ -1,7 +1,9 @@
/* Ppmd7.c -- PPMdH codec
-2010-03-12 : Igor Pavlov : Public domain
+2015-09-28 : Igor Pavlov : Public domain
This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
+#include "Precomp.h"
+
#include <string.h>
#include "Ppmd7.h"
@@ -64,7 +66,7 @@ void Ppmd7_Construct(CPpmd7 *p)
for (i = 0, k = 0; i < PPMD_NUM_INDEXES; i++)
{
unsigned step = (i >= 12 ? 4 : (i >> 2) + 1);
- do { p->Units2Indx[k++] = (Byte)i; } while(--step);
+ do { p->Units2Indx[k++] = (Byte)i; } while (--step);
p->Indx2Units[i] = (Byte)k;
}
@@ -255,7 +257,7 @@ static void *AllocUnits(CPpmd7 *p, unsigned indx)
#define MyMem12Cpy(dest, src, num) \
{ UInt32 *d = (UInt32 *)dest; const UInt32 *s = (const UInt32 *)src; UInt32 n = num; \
- do { d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; s += 3; d += 3; } while(--n); }
+ do { d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; s += 3; d += 3; } while (--n); }
static void *ShrinkUnits(CPpmd7 *p, void *oldPtr, unsigned oldNU, unsigned newNU)
{
diff --git a/3rdparty/lzma/C/Ppmd7Dec.c b/3rdparty/lzma/C/Ppmd7Dec.c
index 68438d5ce4e..04b4b09e330 100644
--- a/3rdparty/lzma/C/Ppmd7Dec.c
+++ b/3rdparty/lzma/C/Ppmd7Dec.c
@@ -2,6 +2,8 @@
2010-03-12 : Igor Pavlov : Public domain
This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
+#include "Precomp.h"
+
#include "Ppmd7.h"
#define kTopValue (1 << 24)
diff --git a/3rdparty/lzma/C/Ppmd7Enc.c b/3rdparty/lzma/C/Ppmd7Enc.c
index 8247757d09d..e6dd3d2fc29 100644
--- a/3rdparty/lzma/C/Ppmd7Enc.c
+++ b/3rdparty/lzma/C/Ppmd7Enc.c
@@ -1,7 +1,9 @@
/* Ppmd7Enc.c -- PPMdH Encoder
-2010-03-12 : Igor Pavlov : Public domain
+2015-09-28 : Igor Pavlov : Public domain
This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
+#include "Precomp.h"
+
#include "Ppmd7.h"
#define kTopValue (1 << 24)
@@ -24,7 +26,7 @@ static void RangeEnc_ShiftLow(CPpmd7z_RangeEnc *p)
p->Stream->Write(p->Stream, (Byte)(temp + (Byte)(p->Low >> 32)));
temp = 0xFF;
}
- while(--p->CacheSize != 0);
+ while (--p->CacheSize != 0);
p->Cache = (Byte)((UInt32)p->Low >> 24);
}
p->CacheSize++;
diff --git a/3rdparty/lzma/C/Precomp.h b/3rdparty/lzma/C/Precomp.h
new file mode 100644
index 00000000000..e8ff8b40e81
--- /dev/null
+++ b/3rdparty/lzma/C/Precomp.h
@@ -0,0 +1,10 @@
+/* Precomp.h -- StdAfx
+2013-11-12 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_PRECOMP_H
+#define __7Z_PRECOMP_H
+
+#include "Compiler.h"
+/* #include "7zTypes.h" */
+
+#endif
diff --git a/3rdparty/lzma/C/RotateDefs.h b/3rdparty/lzma/C/RotateDefs.h
index c3a1385ce5a..8f01d1a6c59 100644
--- a/3rdparty/lzma/C/RotateDefs.h
+++ b/3rdparty/lzma/C/RotateDefs.h
@@ -1,5 +1,5 @@
/* RotateDefs.h -- Rotate functions
-2009-02-07 : Igor Pavlov : Public domain */
+2015-03-25 : Igor Pavlov : Public domain */
#ifndef __ROTATE_DEFS_H
#define __ROTATE_DEFS_H
@@ -7,11 +7,21 @@
#ifdef _MSC_VER
#include <stdlib.h>
+
+/* don't use _rotl with MINGW. It can insert slow call to function. */
+
+/* #if (_MSC_VER >= 1200) */
+#pragma intrinsic(_rotl)
+#pragma intrinsic(_rotr)
+/* #endif */
+
#define rotlFixed(x, n) _rotl((x), (n))
#define rotrFixed(x, n) _rotr((x), (n))
#else
+/* new compilers can translate these macros to fast commands. */
+
#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
diff --git a/3rdparty/lzma/C/Sha256.c b/3rdparty/lzma/C/Sha256.c
index eb4fc61fc9d..b5bc19b9602 100644
--- a/3rdparty/lzma/C/Sha256.c
+++ b/3rdparty/lzma/C/Sha256.c
@@ -1,12 +1,21 @@
/* Crypto/Sha256.c -- SHA-256 Hash
-2010-06-11 : Igor Pavlov : Public domain
+2015-11-14 : Igor Pavlov : Public domain
This code is based on public domain code from Wei Dai's Crypto++ library. */
+#include "Precomp.h"
+
+#include <string.h>
+
+#include "CpuArch.h"
#include "RotateDefs.h"
#include "Sha256.h"
/* define it for speed optimization */
-/* #define _SHA256_UNROLL */
+#ifndef _SFX
+#define _SHA256_UNROLL
+#define _SHA256_UNROLL2
+#endif
+
/* #define _SHA256_UNROLL2 */
void Sha256_Init(CSha256 *p)
@@ -27,26 +36,18 @@ void Sha256_Init(CSha256 *p)
#define s0(x) (rotrFixed(x, 7) ^ rotrFixed(x,18) ^ (x >> 3))
#define s1(x) (rotrFixed(x,17) ^ rotrFixed(x,19) ^ (x >> 10))
-#define blk0(i) (W[i] = data[i])
-#define blk2(i) (W[i&15] += s1(W[(i-2)&15]) + W[(i-7)&15] + s0(W[(i-15)&15]))
+#define blk0(i) (W[i])
+#define blk2(i) (W[i] += s1(W[((i)-2)&15]) + W[((i)-7)&15] + s0(W[((i)-15)&15]))
#define Ch(x,y,z) (z^(x&(y^z)))
#define Maj(x,y,z) ((x&y)|(z&(x|y)))
-#define a(i) T[(0-(i))&7]
-#define b(i) T[(1-(i))&7]
-#define c(i) T[(2-(i))&7]
-#define d(i) T[(3-(i))&7]
-#define e(i) T[(4-(i))&7]
-#define f(i) T[(5-(i))&7]
-#define g(i) T[(6-(i))&7]
-#define h(i) T[(7-(i))&7]
-
-
#ifdef _SHA256_UNROLL2
-#define R(a,b,c,d,e,f,g,h, i) h += S1(e) + Ch(e,f,g) + K[i+j] + (j?blk2(i):blk0(i));\
- d += h; h += S0(a) + Maj(a, b, c)
+#define R(a,b,c,d,e,f,g,h, i) \
+ h += S1(e) + Ch(e,f,g) + K[(i)+(j)] + (j ? blk2(i) : blk0(i)); \
+ d += h; \
+ h += S0(a) + Maj(a, b, c)
#define RX_8(i) \
R(a,b,c,d,e,f,g,h, i); \
@@ -58,14 +59,32 @@ void Sha256_Init(CSha256 *p)
R(c,d,e,f,g,h,a,b, i+6); \
R(b,c,d,e,f,g,h,a, i+7)
+#define RX_16 RX_8(0); RX_8(8);
+
#else
-#define R(i) h(i) += S1(e(i)) + Ch(e(i),f(i),g(i)) + K[i+j] + (j?blk2(i):blk0(i));\
- d(i) += h(i); h(i) += S0(a(i)) + Maj(a(i), b(i), c(i))
+#define a(i) T[(0-(i))&7]
+#define b(i) T[(1-(i))&7]
+#define c(i) T[(2-(i))&7]
+#define d(i) T[(3-(i))&7]
+#define e(i) T[(4-(i))&7]
+#define f(i) T[(5-(i))&7]
+#define g(i) T[(6-(i))&7]
+#define h(i) T[(7-(i))&7]
+
+#define R(i) \
+ h(i) += S1(e(i)) + Ch(e(i),f(i),g(i)) + K[(i)+(j)] + (j ? blk2(i) : blk0(i)); \
+ d(i) += h(i); \
+ h(i) += S0(a(i)) + Maj(a(i), b(i), c(i)) \
#ifdef _SHA256_UNROLL
-#define RX_8(i) R(i+0); R(i+1); R(i+2); R(i+3); R(i+4); R(i+5); R(i+6); R(i+7);
+#define RX_8(i) R(i+0); R(i+1); R(i+2); R(i+3); R(i+4); R(i+5); R(i+6); R(i+7);
+#define RX_16 RX_8(0); RX_8(8);
+
+#else
+
+#define RX_16 unsigned i; for (i = 0; i < 16; i++) { R(i); }
#endif
@@ -90,12 +109,30 @@ static const UInt32 K[64] = {
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
};
-static void Sha256_Transform(UInt32 *state, const UInt32 *data)
+static void Sha256_WriteByteBlock(CSha256 *p)
{
UInt32 W[16];
unsigned j;
+ UInt32 *state;
+
#ifdef _SHA256_UNROLL2
UInt32 a,b,c,d,e,f,g,h;
+ #else
+ UInt32 T[8];
+ #endif
+
+ for (j = 0; j < 16; j += 4)
+ {
+ const Byte *ccc = p->buffer + j * 4;
+ W[j ] = GetBe32(ccc);
+ W[j + 1] = GetBe32(ccc + 4);
+ W[j + 2] = GetBe32(ccc + 8);
+ W[j + 3] = GetBe32(ccc + 12);
+ }
+
+ state = p->state;
+
+ #ifdef _SHA256_UNROLL2
a = state[0];
b = state[1];
c = state[2];
@@ -105,19 +142,13 @@ static void Sha256_Transform(UInt32 *state, const UInt32 *data)
g = state[6];
h = state[7];
#else
- UInt32 T[8];
for (j = 0; j < 8; j++)
T[j] = state[j];
#endif
for (j = 0; j < 64; j += 16)
{
- #if defined(_SHA256_UNROLL) || defined(_SHA256_UNROLL2)
- RX_8(0); RX_8(8);
- #else
- unsigned i;
- for (i = 0; i < 16; i++) { R(i); }
- #endif
+ RX_16
}
#ifdef _SHA256_UNROLL2
@@ -144,61 +175,74 @@ static void Sha256_Transform(UInt32 *state, const UInt32 *data)
#undef s0
#undef s1
-static void Sha256_WriteByteBlock(CSha256 *p)
-{
- UInt32 data32[16];
- unsigned i;
- for (i = 0; i < 16; i++)
- data32[i] =
- ((UInt32)(p->buffer[i * 4 ]) << 24) +
- ((UInt32)(p->buffer[i * 4 + 1]) << 16) +
- ((UInt32)(p->buffer[i * 4 + 2]) << 8) +
- ((UInt32)(p->buffer[i * 4 + 3]));
- Sha256_Transform(p->state, data32);
-}
-
void Sha256_Update(CSha256 *p, const Byte *data, size_t size)
{
- UInt32 curBufferPos = (UInt32)p->count & 0x3F;
- while (size > 0)
+ if (size == 0)
+ return;
+
{
- p->buffer[curBufferPos++] = *data++;
- p->count++;
- size--;
- if (curBufferPos == 64)
+ unsigned pos = (unsigned)p->count & 0x3F;
+ unsigned num;
+
+ p->count += size;
+
+ num = 64 - pos;
+ if (num > size)
{
- curBufferPos = 0;
- Sha256_WriteByteBlock(p);
+ memcpy(p->buffer + pos, data, size);
+ return;
}
+
+ size -= num;
+ memcpy(p->buffer + pos, data, num);
+ data += num;
+ }
+
+ for (;;)
+ {
+ Sha256_WriteByteBlock(p);
+ if (size < 64)
+ break;
+ size -= 64;
+ memcpy(p->buffer, data, 64);
+ data += 64;
}
+
+ if (size != 0)
+ memcpy(p->buffer, data, size);
}
void Sha256_Final(CSha256 *p, Byte *digest)
{
- UInt64 lenInBits = (p->count << 3);
- UInt32 curBufferPos = (UInt32)p->count & 0x3F;
+ unsigned pos = (unsigned)p->count & 0x3F;
unsigned i;
- p->buffer[curBufferPos++] = 0x80;
- while (curBufferPos != (64 - 8))
+
+ p->buffer[pos++] = 0x80;
+
+ while (pos != (64 - 8))
{
- curBufferPos &= 0x3F;
- if (curBufferPos == 0)
+ pos &= 0x3F;
+ if (pos == 0)
Sha256_WriteByteBlock(p);
- p->buffer[curBufferPos++] = 0;
+ p->buffer[pos++] = 0;
}
- for (i = 0; i < 8; i++)
+
{
- p->buffer[curBufferPos++] = (Byte)(lenInBits >> 56);
- lenInBits <<= 8;
+ UInt64 numBits = (p->count << 3);
+ SetBe32(p->buffer + 64 - 8, (UInt32)(numBits >> 32));
+ SetBe32(p->buffer + 64 - 4, (UInt32)(numBits));
}
+
Sha256_WriteByteBlock(p);
- for (i = 0; i < 8; i++)
+ for (i = 0; i < 8; i += 2)
{
- *digest++ = (Byte)(p->state[i] >> 24);
- *digest++ = (Byte)(p->state[i] >> 16);
- *digest++ = (Byte)(p->state[i] >> 8);
- *digest++ = (Byte)(p->state[i]);
+ UInt32 v0 = p->state[i];
+ UInt32 v1 = p->state[i + 1];
+ SetBe32(digest , v0);
+ SetBe32(digest + 4, v1);
+ digest += 8;
}
+
Sha256_Init(p);
}
diff --git a/3rdparty/lzma/C/Sha256.h b/3rdparty/lzma/C/Sha256.h
index 530f513ec68..3f455dbc0d8 100644
--- a/3rdparty/lzma/C/Sha256.h
+++ b/3rdparty/lzma/C/Sha256.h
@@ -1,10 +1,10 @@
/* Sha256.h -- SHA-256 Hash
-2010-06-11 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __CRYPTO_SHA256_H
#define __CRYPTO_SHA256_H
-#include "Types.h"
+#include "7zTypes.h"
EXTERN_C_BEGIN
diff --git a/3rdparty/lzma/C/Sort.c b/3rdparty/lzma/C/Sort.c
new file mode 100644
index 00000000000..e1097e38068
--- /dev/null
+++ b/3rdparty/lzma/C/Sort.c
@@ -0,0 +1,141 @@
+/* Sort.c -- Sort functions
+2014-04-05 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
+
+#include "Sort.h"
+
+#define HeapSortDown(p, k, size, temp) \
+ { for (;;) { \
+ size_t s = (k << 1); \
+ if (s > size) break; \
+ if (s < size && p[s + 1] > p[s]) s++; \
+ if (temp >= p[s]) break; \
+ p[k] = p[s]; k = s; \
+ } p[k] = temp; }
+
+void HeapSort(UInt32 *p, size_t size)
+{
+ if (size <= 1)
+ return;
+ p--;
+ {
+ size_t i = size / 2;
+ do
+ {
+ UInt32 temp = p[i];
+ size_t k = i;
+ HeapSortDown(p, k, size, temp)
+ }
+ while (--i != 0);
+ }
+ /*
+ do
+ {
+ size_t k = 1;
+ UInt32 temp = p[size];
+ p[size--] = p[1];
+ HeapSortDown(p, k, size, temp)
+ }
+ while (size > 1);
+ */
+ while (size > 3)
+ {
+ UInt32 temp = p[size];
+ size_t k = (p[3] > p[2]) ? 3 : 2;
+ p[size--] = p[1];
+ p[1] = p[k];
+ HeapSortDown(p, k, size, temp)
+ }
+ {
+ UInt32 temp = p[size];
+ p[size] = p[1];
+ if (size > 2 && p[2] < temp)
+ {
+ p[1] = p[2];
+ p[2] = temp;
+ }
+ else
+ p[1] = temp;
+ }
+}
+
+void HeapSort64(UInt64 *p, size_t size)
+{
+ if (size <= 1)
+ return;
+ p--;
+ {
+ size_t i = size / 2;
+ do
+ {
+ UInt64 temp = p[i];
+ size_t k = i;
+ HeapSortDown(p, k, size, temp)
+ }
+ while (--i != 0);
+ }
+ /*
+ do
+ {
+ size_t k = 1;
+ UInt64 temp = p[size];
+ p[size--] = p[1];
+ HeapSortDown(p, k, size, temp)
+ }
+ while (size > 1);
+ */
+ while (size > 3)
+ {
+ UInt64 temp = p[size];
+ size_t k = (p[3] > p[2]) ? 3 : 2;
+ p[size--] = p[1];
+ p[1] = p[k];
+ HeapSortDown(p, k, size, temp)
+ }
+ {
+ UInt64 temp = p[size];
+ p[size] = p[1];
+ if (size > 2 && p[2] < temp)
+ {
+ p[1] = p[2];
+ p[2] = temp;
+ }
+ else
+ p[1] = temp;
+ }
+}
+
+/*
+#define HeapSortRefDown(p, vals, n, size, temp) \
+ { size_t k = n; UInt32 val = vals[temp]; for (;;) { \
+ size_t s = (k << 1); \
+ if (s > size) break; \
+ if (s < size && vals[p[s + 1]] > vals[p[s]]) s++; \
+ if (val >= vals[p[s]]) break; \
+ p[k] = p[s]; k = s; \
+ } p[k] = temp; }
+
+void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size)
+{
+ if (size <= 1)
+ return;
+ p--;
+ {
+ size_t i = size / 2;
+ do
+ {
+ UInt32 temp = p[i];
+ HeapSortRefDown(p, vals, i, size, temp);
+ }
+ while (--i != 0);
+ }
+ do
+ {
+ UInt32 temp = p[size];
+ p[size--] = p[1];
+ HeapSortRefDown(p, vals, 1, size, temp);
+ }
+ while (size > 1);
+}
+*/
diff --git a/3rdparty/lzma/C/Sort.h b/3rdparty/lzma/C/Sort.h
new file mode 100644
index 00000000000..2e2963a23da
--- /dev/null
+++ b/3rdparty/lzma/C/Sort.h
@@ -0,0 +1,18 @@
+/* Sort.h -- Sort functions
+2014-04-05 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_SORT_H
+#define __7Z_SORT_H
+
+#include "7zTypes.h"
+
+EXTERN_C_BEGIN
+
+void HeapSort(UInt32 *p, size_t size);
+void HeapSort64(UInt64 *p, size_t size);
+
+/* void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size); */
+
+EXTERN_C_END
+
+#endif
diff --git a/3rdparty/lzma/C/Threads.c b/3rdparty/lzma/C/Threads.c
index 68561067fe6..d3d0912da42 100644
--- a/3rdparty/lzma/C/Threads.c
+++ b/3rdparty/lzma/C/Threads.c
@@ -1,7 +1,9 @@
/* Threads.c -- multithreading library
-2009-09-20 : Igor Pavlov : Public domain */
+2014-09-21 : Igor Pavlov : Public domain */
-#ifndef _WIN32_7Z_WCE
+#include "Precomp.h"
+
+#ifndef UNDER_CE
#include <process.h>
#endif
@@ -29,14 +31,21 @@ WRes Handle_WaitObject(HANDLE h) { return (WRes)WaitForSingleObject(h, INFINITE)
WRes Thread_Create(CThread *p, THREAD_FUNC_TYPE func, LPVOID param)
{
- unsigned threadId; /* Windows Me/98/95: threadId parameter may not be NULL in _beginthreadex/CreateThread functions */
- *p =
- #ifdef UNDER_CE
- CreateThread(0, 0, func, param, 0, &threadId);
- #else
- (HANDLE)_beginthreadex(NULL, 0, func, param, 0, &threadId);
- #endif
- /* maybe we must use errno here, but probably GetLastError() is also OK. */
+ /* Windows Me/98/95: threadId parameter may not be NULL in _beginthreadex/CreateThread functions */
+
+ #ifdef UNDER_CE
+
+ DWORD threadId;
+ *p = CreateThread(0, 0, func, param, 0, &threadId);
+
+ #else
+
+ unsigned threadId;
+ *p = (HANDLE)_beginthreadex(NULL, 0, func, param, 0, &threadId);
+
+ #endif
+
+ /* maybe we must use errno here, but probably GetLastError() is also OK. */
return HandleToWRes(*p);
}
diff --git a/3rdparty/lzma/C/Threads.h b/3rdparty/lzma/C/Threads.h
index d0ddd80e227..9b3e1c556d2 100644
--- a/3rdparty/lzma/C/Threads.h
+++ b/3rdparty/lzma/C/Threads.h
@@ -1,15 +1,17 @@
/* Threads.h -- multithreading library
-2009-03-27 : Igor Pavlov : Public domain */
+2013-11-12 : Igor Pavlov : Public domain */
#ifndef __7Z_THREADS_H
#define __7Z_THREADS_H
-#include "Types.h"
-
-#ifdef __cplusplus
-extern "C" {
+#ifdef _WIN32
+#include <windows.h>
#endif
+#include "7zTypes.h"
+
+EXTERN_C_BEGIN
+
WRes HandlePtr_Close(HANDLE *h);
WRes Handle_WaitObject(HANDLE h);
@@ -18,7 +20,15 @@ typedef HANDLE CThread;
#define Thread_WasCreated(p) (*(p) != NULL)
#define Thread_Close(p) HandlePtr_Close(p)
#define Thread_Wait(p) Handle_WaitObject(*(p))
-typedef unsigned THREAD_FUNC_RET_TYPE;
+
+typedef
+#ifdef UNDER_CE
+ DWORD
+#else
+ unsigned
+#endif
+ THREAD_FUNC_RET_TYPE;
+
#define THREAD_FUNC_CALL_TYPE MY_STD_CALL
#define THREAD_FUNC_DECL THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE
typedef THREAD_FUNC_RET_TYPE (THREAD_FUNC_CALL_TYPE * THREAD_FUNC_TYPE)(void *);
@@ -52,8 +62,6 @@ WRes CriticalSection_Init(CCriticalSection *p);
#define CriticalSection_Enter(p) EnterCriticalSection(p)
#define CriticalSection_Leave(p) LeaveCriticalSection(p)
-#ifdef __cplusplus
-}
-#endif
+EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/Util/7z/7z.dsp b/3rdparty/lzma/C/Util/7z/7z.dsp
index 21dd5995f05..be0f0a74376 100644
--- a/3rdparty/lzma/C/Util/7z/7z.dsp
+++ b/3rdparty/lzma/C/Util/7z/7z.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /FAs /YX /FD /c
+# ADD CPP /nologo /MD /W4 /WX /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /FAcs /Yu"Precomp.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"Release/7zDec.exe" /opt:NOWIN98
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"c:\util\7zDec.exe" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
@@ -67,7 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W4 /Gm /GX /ZI /Od /D "_DEBUG" /D "_SZ_ALLOC_DEBUG2" /D "_SZ_NO_INT_64_A" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /YX /FD /GZ /c
+# ADD CPP /nologo /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "_SZ_ALLOC_DEBUG2" /D "_SZ_NO_INT_64_A" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Yu"Precomp.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
@@ -75,7 +75,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/7zDec.exe" /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"c:\util\7zDec.exe" /pdbtype:sept
!ENDIF
@@ -100,6 +100,10 @@ SOURCE=..\..\7zAlloc.h
# End Source File
# Begin Source File
+SOURCE=..\..\7zArcIn.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\7zBuf.c
# End Source File
# Begin Source File
@@ -133,11 +137,11 @@ SOURCE=..\..\7zFile.h
# End Source File
# Begin Source File
-SOURCE=..\..\7zIn.c
+SOURCE=..\..\7zStream.c
# End Source File
# Begin Source File
-SOURCE=..\..\7zStream.c
+SOURCE=..\..\7zTypes.h
# End Source File
# Begin Source File
@@ -161,6 +165,10 @@ SOURCE=..\..\Bra86.c
# End Source File
# Begin Source File
+SOURCE=..\..\BraIA64.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\CpuArch.c
# End Source File
# Begin Source File
@@ -169,6 +177,14 @@ SOURCE=..\..\CpuArch.h
# End Source File
# Begin Source File
+SOURCE=..\..\Delta.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Delta.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Lzma2Dec.c
# End Source File
# Begin Source File
@@ -190,7 +206,6 @@ SOURCE=..\..\Ppmd.h
# Begin Source File
SOURCE=..\..\Ppmd7.c
-# SUBTRACT CPP /YX
# End Source File
# Begin Source File
@@ -199,11 +214,23 @@ SOURCE=..\..\Ppmd7.h
# Begin Source File
SOURCE=..\..\Ppmd7Dec.c
-# SUBTRACT CPP /YX
+# End Source File
+# End Group
+# Begin Group "Spec"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Compiler.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Precomp.c
+# ADD CPP /Yc"Precomp.h"
# End Source File
# Begin Source File
-SOURCE=..\..\Types.h
+SOURCE=.\Precomp.h
# End Source File
# End Group
# Begin Source File
diff --git a/3rdparty/lzma/C/Util/7z/7zMain.c b/3rdparty/lzma/C/Util/7z/7zMain.c
index 9496dc07d4c..ed6bab2a5a4 100644
--- a/3rdparty/lzma/C/Util/7z/7zMain.c
+++ b/3rdparty/lzma/C/Util/7z/7zMain.c
@@ -1,11 +1,14 @@
/* 7zMain.c - Test application for 7z Decoder
-2010-10-28 : Igor Pavlov : Public domain */
+2015-08-02 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include <stdio.h>
#include <string.h>
#include "../../7z.h"
#include "../../7zAlloc.h"
+#include "../../7zBuf.h"
#include "../../7zCrc.h"
#include "../../7zFile.h"
#include "../../7zVersion.h"
@@ -31,106 +34,158 @@ static int Buf_EnsureSize(CBuf *dest, size_t size)
}
#ifndef _WIN32
+#define _USE_UTF8
+#endif
+
+/* #define _USE_UTF8 */
+
+#ifdef _USE_UTF8
+
+#define _UTF8_START(n) (0x100 - (1 << (7 - (n))))
-static Byte kUtf8Limits[5] = { 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
+#define _UTF8_RANGE(n) (((UInt32)1) << ((n) * 5 + 6))
-static Bool Utf16_To_Utf8(Byte *dest, size_t *destLen, const UInt16 *src, size_t srcLen)
+#define _UTF8_HEAD(n, val) ((Byte)(_UTF8_START(n) + (val >> (6 * (n)))))
+#define _UTF8_CHAR(n, val) ((Byte)(0x80 + (((val) >> (6 * (n))) & 0x3F)))
+
+static size_t Utf16_To_Utf8_Calc(const UInt16 *src, const UInt16 *srcLim)
{
- size_t destPos = 0, srcPos = 0;
+ size_t size = 0;
for (;;)
{
- unsigned numAdds;
- UInt32 value;
- if (srcPos == srcLen)
+ UInt32 val;
+ if (src == srcLim)
+ return size;
+
+ size++;
+ val = *src++;
+
+ if (val < 0x80)
+ continue;
+
+ if (val < _UTF8_RANGE(1))
{
- *destLen = destPos;
- return True;
+ size++;
+ continue;
}
- value = src[srcPos++];
- if (value < 0x80)
+
+ if (val >= 0xD800 && val < 0xDC00 && src != srcLim)
{
- if (dest)
- dest[destPos] = (char)value;
- destPos++;
+ UInt32 c2 = *src;
+ if (c2 >= 0xDC00 && c2 < 0xE000)
+ {
+ src++;
+ size += 3;
+ continue;
+ }
+ }
+
+ size += 2;
+ }
+}
+
+static Byte *Utf16_To_Utf8(Byte *dest, const UInt16 *src, const UInt16 *srcLim)
+{
+ for (;;)
+ {
+ UInt32 val;
+ if (src == srcLim)
+ return dest;
+
+ val = *src++;
+
+ if (val < 0x80)
+ {
+ *dest++ = (char)val;
continue;
}
- if (value >= 0xD800 && value < 0xE000)
+
+ if (val < _UTF8_RANGE(1))
{
- UInt32 c2;
- if (value >= 0xDC00 || srcPos == srcLen)
- break;
- c2 = src[srcPos++];
- if (c2 < 0xDC00 || c2 >= 0xE000)
- break;
- value = (((value - 0xD800) << 10) | (c2 - 0xDC00)) + 0x10000;
+ dest[0] = _UTF8_HEAD(1, val);
+ dest[1] = _UTF8_CHAR(0, val);
+ dest += 2;
+ continue;
}
- for (numAdds = 1; numAdds < 5; numAdds++)
- if (value < (((UInt32)1) << (numAdds * 5 + 6)))
- break;
- if (dest)
- dest[destPos] = (char)(kUtf8Limits[numAdds - 1] + (value >> (6 * numAdds)));
- destPos++;
- do
+
+ if (val >= 0xD800 && val < 0xDC00 && src != srcLim)
{
- numAdds--;
- if (dest)
- dest[destPos] = (char)(0x80 + ((value >> (6 * numAdds)) & 0x3F));
- destPos++;
+ UInt32 c2 = *src;
+ if (c2 >= 0xDC00 && c2 < 0xE000)
+ {
+ src++;
+ val = (((val - 0xD800) << 10) | (c2 - 0xDC00)) + 0x10000;
+ dest[0] = _UTF8_HEAD(3, val);
+ dest[1] = _UTF8_CHAR(2, val);
+ dest[2] = _UTF8_CHAR(1, val);
+ dest[3] = _UTF8_CHAR(0, val);
+ dest += 4;
+ continue;
+ }
}
- while (numAdds != 0);
+
+ dest[0] = _UTF8_HEAD(2, val);
+ dest[1] = _UTF8_CHAR(1, val);
+ dest[2] = _UTF8_CHAR(0, val);
+ dest += 3;
}
- *destLen = destPos;
- return False;
}
static SRes Utf16_To_Utf8Buf(CBuf *dest, const UInt16 *src, size_t srcLen)
{
- size_t destLen = 0;
- Bool res;
- Utf16_To_Utf8(NULL, &destLen, src, srcLen);
+ size_t destLen = Utf16_To_Utf8_Calc(src, src + srcLen);
destLen += 1;
if (!Buf_EnsureSize(dest, destLen))
return SZ_ERROR_MEM;
- res = Utf16_To_Utf8(dest->data, &destLen, src, srcLen);
- dest->data[destLen] = 0;
- return res ? SZ_OK : SZ_ERROR_FAIL;
+ *Utf16_To_Utf8(dest->data, src, src + srcLen) = 0;
+ return SZ_OK;
}
+
#endif
-static SRes Utf16_To_Char(CBuf *buf, const UInt16 *s, int fileMode)
+static SRes Utf16_To_Char(CBuf *buf, const UInt16 *s
+ #ifndef _USE_UTF8
+ , UINT codePage
+ #endif
+ )
{
- int len = 0;
- for (len = 0; s[len] != '\0'; len++);
+ unsigned len = 0;
+ for (len = 0; s[len] != 0; len++);
- #ifdef _WIN32
+ #ifndef _USE_UTF8
{
- int size = len * 3 + 100;
+ unsigned size = len * 3 + 100;
if (!Buf_EnsureSize(buf, size))
return SZ_ERROR_MEM;
{
- char defaultChar = '_';
- BOOL defUsed;
- int numChars = WideCharToMultiByte(fileMode ?
- (
- #ifdef UNDER_CE
- CP_ACP
- #else
- AreFileApisANSI() ? CP_ACP : CP_OEMCP
- #endif
- ) : CP_OEMCP,
- 0, s, len, (char *)buf->data, size, &defaultChar, &defUsed);
- if (numChars == 0 || numChars >= size)
- return SZ_ERROR_FAIL;
- buf->data[numChars] = 0;
+ buf->data[0] = 0;
+ if (len != 0)
+ {
+ char defaultChar = '_';
+ BOOL defUsed;
+ unsigned numChars = 0;
+ numChars = WideCharToMultiByte(codePage, 0, s, len, (char *)buf->data, size, &defaultChar, &defUsed);
+ if (numChars == 0 || numChars >= size)
+ return SZ_ERROR_FAIL;
+ buf->data[numChars] = 0;
+ }
return SZ_OK;
}
}
#else
- fileMode = fileMode;
return Utf16_To_Utf8Buf(buf, s, len);
#endif
}
+#ifdef _WIN32
+ #ifndef USE_WINDOWS_FILE
+ static UINT g_FileCodePage = CP_ACP;
+ #endif
+ #define MY_FILE_CODE_PAGE_PARAM ,g_FileCodePage
+#else
+ #define MY_FILE_CODE_PAGE_PARAM
+#endif
+
static WRes MyCreateDir(const UInt16 *name)
{
#ifdef USE_WINDOWS_FILE
@@ -142,7 +197,7 @@ static WRes MyCreateDir(const UInt16 *name)
CBuf buf;
WRes res;
Buf_Init(&buf);
- RINOK(Utf16_To_Char(&buf, name, 1));
+ RINOK(Utf16_To_Char(&buf, name MY_FILE_CODE_PAGE_PARAM));
res =
#ifdef _WIN32
@@ -165,7 +220,7 @@ static WRes OutFile_OpenUtf16(CSzFile *p, const UInt16 *name)
CBuf buf;
WRes res;
Buf_Init(&buf);
- RINOK(Utf16_To_Char(&buf, name, 1));
+ RINOK(Utf16_To_Char(&buf, name MY_FILE_CODE_PAGE_PARAM));
res = OutFile_Open(p, (const char *)buf.data);
Buf_Free(&buf, &g_Alloc);
return res;
@@ -177,7 +232,11 @@ static SRes PrintString(const UInt16 *s)
CBuf buf;
SRes res;
Buf_Init(&buf);
- res = Utf16_To_Char(&buf, s, 0);
+ res = Utf16_To_Char(&buf, s
+ #ifndef _USE_UTF8
+ , CP_OEMCP
+ #endif
+ );
if (res == SZ_OK)
fputs((const char *)buf.data, stdout);
Buf_Free(&buf, &g_Alloc);
@@ -216,17 +275,24 @@ static char *UIntToStr(char *s, unsigned value, int numDigits)
return s;
}
+static void UIntToStr_2(char *s, unsigned value)
+{
+ s[0] = (char)('0' + (value / 10));
+ s[1] = (char)('0' + (value % 10));
+}
+
#define PERIOD_4 (4 * 365 + 1)
#define PERIOD_100 (PERIOD_4 * 25 - 1)
#define PERIOD_400 (PERIOD_100 * 4 + 1)
-static void ConvertFileTimeToString(const CNtfsFileTime *ft, char *s)
+static void ConvertFileTimeToString(const CNtfsFileTime *nt, char *s)
{
- unsigned year, mon, day, hour, min, sec;
- UInt64 v64 = (ft->Low | ((UInt64)ft->High << 32)) / 10000000;
+ unsigned year, mon, hour, min, sec;
Byte ms[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
unsigned t;
UInt32 v;
+ UInt64 v64 = nt->Low | ((UInt64)nt->High << 32);
+ v64 /= 10000000;
sec = (unsigned)(v64 % 60); v64 /= 60;
min = (unsigned)(v64 % 60); v64 /= 60;
hour = (unsigned)(v64 % 24); v64 /= 24;
@@ -242,20 +308,19 @@ static void ConvertFileTimeToString(const CNtfsFileTime *ft, char *s)
if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0))
ms[1] = 29;
- for (mon = 1; mon <= 12; mon++)
+ for (mon = 0;; mon++)
{
- unsigned s = ms[mon - 1];
+ unsigned s = ms[mon];
if (v < s)
break;
v -= s;
}
- day = (unsigned)v + 1;
s = UIntToStr(s, year, 4); *s++ = '-';
- s = UIntToStr(s, mon, 2); *s++ = '-';
- s = UIntToStr(s, day, 2); *s++ = ' ';
- s = UIntToStr(s, hour, 2); *s++ = ':';
- s = UIntToStr(s, min, 2); *s++ = ':';
- s = UIntToStr(s, sec, 2);
+ UIntToStr_2(s, mon + 1); s[2] = '-'; s += 3;
+ UIntToStr_2(s, (unsigned)v + 1); s[2] = ' '; s += 3;
+ UIntToStr_2(s, hour); s[2] = ':'; s += 3;
+ UIntToStr_2(s, min); s[2] = ':'; s += 3;
+ UIntToStr_2(s, sec); s[2] = 0;
}
void PrintError(char *sz)
@@ -263,23 +328,22 @@ void PrintError(char *sz)
printf("\nERROR: %s\n", sz);
}
-#ifdef USE_WINDOWS_FILE
-#define kEmptyAttribChar '.'
static void GetAttribString(UInt32 wa, Bool isDir, char *s)
{
- s[0] = (char)(((wa & FILE_ATTRIBUTE_DIRECTORY) != 0 || isDir) ? 'D' : kEmptyAttribChar);
- s[1] = (char)(((wa & FILE_ATTRIBUTE_READONLY) != 0) ? 'R': kEmptyAttribChar);
- s[2] = (char)(((wa & FILE_ATTRIBUTE_HIDDEN) != 0) ? 'H': kEmptyAttribChar);
- s[3] = (char)(((wa & FILE_ATTRIBUTE_SYSTEM) != 0) ? 'S': kEmptyAttribChar);
- s[4] = (char)(((wa & FILE_ATTRIBUTE_ARCHIVE) != 0) ? 'A': kEmptyAttribChar);
- s[5] = '\0';
-}
-#else
-static void GetAttribString(UInt32, Bool, char *s)
-{
- s[0] = '\0';
+ #ifdef USE_WINDOWS_FILE
+ s[0] = (char)(((wa & FILE_ATTRIBUTE_DIRECTORY) != 0 || isDir) ? 'D' : '.');
+ s[1] = (char)(((wa & FILE_ATTRIBUTE_READONLY ) != 0) ? 'R': '.');
+ s[2] = (char)(((wa & FILE_ATTRIBUTE_HIDDEN ) != 0) ? 'H': '.');
+ s[3] = (char)(((wa & FILE_ATTRIBUTE_SYSTEM ) != 0) ? 'S': '.');
+ s[4] = (char)(((wa & FILE_ATTRIBUTE_ARCHIVE ) != 0) ? 'A': '.');
+ s[5] = 0;
+ #else
+ s[0] = (char)(((wa & (1 << 4)) != 0 || isDir) ? 'D' : '.');
+ s[1] = 0;
+ #endif
}
-#endif
+
+// #define NUM_PARENTS_MAX 128
int MY_CDECL main(int numargs, char *args[])
{
@@ -291,8 +355,10 @@ int MY_CDECL main(int numargs, char *args[])
ISzAlloc allocTempImp;
UInt16 *temp = NULL;
size_t tempSize = 0;
+ // UInt32 parents[NUM_PARENTS_MAX];
printf("\n7z ANSI-C Decoder " MY_VERSION_COPYRIGHT_DATE "\n\n");
+
if (numargs == 1)
{
printf(
@@ -304,19 +370,28 @@ int MY_CDECL main(int numargs, char *args[])
" x: eXtract files with full paths\n");
return 0;
}
+
if (numargs < 3)
{
PrintError("incorrect command");
return 1;
}
+ #if defined(_WIN32) && !defined(USE_WINDOWS_FILE) && !defined(UNDER_CE)
+ g_FileCodePage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
+ #endif
+
allocImp.Alloc = SzAlloc;
allocImp.Free = SzFree;
allocTempImp.Alloc = SzAllocTemp;
allocTempImp.Free = SzFreeTemp;
+ #ifdef UNDER_CE
+ if (InFile_OpenW(&archiveStream.file, L"\test.7z"))
+ #else
if (InFile_Open(&archiveStream.file, args[2]))
+ #endif
{
PrintError("can not open input file");
return 1;
@@ -331,15 +406,18 @@ int MY_CDECL main(int numargs, char *args[])
CrcGenerateTable();
SzArEx_Init(&db);
+
res = SzArEx_Open(&db, &lookStream.s, &allocImp, &allocTempImp);
+
if (res == SZ_OK)
{
char *command = args[1];
- int listCommand = 0, testCommand = 0, extractCommand = 0, fullPaths = 0;
+ int listCommand = 0, testCommand = 0, fullPaths = 0;
+
if (strcmp(command, "l") == 0) listCommand = 1;
else if (strcmp(command, "t") == 0) testCommand = 1;
- else if (strcmp(command, "e") == 0) extractCommand = 1;
- else if (strcmp(command, "x") == 0) { extractCommand = 1; fullPaths = 1; }
+ else if (strcmp(command, "e") == 0) { }
+ else if (strcmp(command, "x") == 0) { fullPaths = 1; }
else
{
PrintError("incorrect command");
@@ -358,22 +436,24 @@ int MY_CDECL main(int numargs, char *args[])
Byte *outBuffer = 0; /* it must be 0 before first call for each new archive. */
size_t outBufferSize = 0; /* it can have any value before first call (if outBuffer = 0) */
- for (i = 0; i < db.db.NumFiles; i++)
+ for (i = 0; i < db.NumFiles; i++)
{
size_t offset = 0;
size_t outSizeProcessed = 0;
- const CSzFileItem *f = db.db.Files + i;
+ // const CSzFileItem *f = db.Files + i;
size_t len;
- if (listCommand == 0 && f->IsDir && !fullPaths)
+ unsigned isDir = SzArEx_IsDir(&db, i);
+ if (listCommand == 0 && isDir && !fullPaths)
continue;
len = SzArEx_GetFileNameUtf16(&db, i, NULL);
+ // len = SzArEx_GetFullNameLen(&db, i);
if (len > tempSize)
{
SzFree(NULL, temp);
tempSize = len;
temp = (UInt16 *)SzAlloc(NULL, tempSize * sizeof(temp[0]));
- if (temp == 0)
+ if (!temp)
{
res = SZ_ERROR_MEM;
break;
@@ -381,15 +461,26 @@ int MY_CDECL main(int numargs, char *args[])
}
SzArEx_GetFileNameUtf16(&db, i, temp);
+ /*
+ if (SzArEx_GetFullNameUtf16_Back(&db, i, temp + len) != temp)
+ {
+ res = SZ_ERROR_FAIL;
+ break;
+ }
+ */
+
if (listCommand)
{
char attr[8], s[32], t[32];
+ UInt64 fileSize;
- GetAttribString(f->AttribDefined ? f->Attrib : 0, f->IsDir, attr);
+ GetAttribString(SzBitWithVals_Check(&db.Attribs, i) ? db.Attribs.Vals[i] : 0, isDir, attr);
- UInt64ToStr(f->Size, s);
- if (f->MTimeDefined)
- ConvertFileTimeToString(&f->MTime, t);
+ fileSize = SzArEx_GetFileSize(&db, i);
+ UInt64ToStr(fileSize, s);
+
+ if (SzBitWithVals_Check(&db.MTime, i))
+ ConvertFileTimeToString(&db.MTime.Vals[i], t);
else
{
size_t j;
@@ -402,11 +493,12 @@ int MY_CDECL main(int numargs, char *args[])
res = PrintString(temp);
if (res != SZ_OK)
break;
- if (f->IsDir)
+ if (isDir)
printf("/");
printf("\n");
continue;
}
+
fputs(testCommand ?
"Testing ":
"Extracting ",
@@ -414,7 +506,8 @@ int MY_CDECL main(int numargs, char *args[])
res = PrintString(temp);
if (res != SZ_OK)
break;
- if (f->IsDir)
+
+ if (isDir)
printf("/");
else
{
@@ -425,6 +518,7 @@ int MY_CDECL main(int numargs, char *args[])
if (res != SZ_OK)
break;
}
+
if (!testCommand)
{
CSzFile outFile;
@@ -432,6 +526,7 @@ int MY_CDECL main(int numargs, char *args[])
size_t j;
UInt16 *name = (UInt16 *)temp;
const UInt16 *destPath = (const UInt16 *)name;
+
for (j = 0; name[j] != 0; j++)
if (name[j] == '/')
{
@@ -445,7 +540,7 @@ int MY_CDECL main(int numargs, char *args[])
destPath = name + j + 1;
}
- if (f->IsDir)
+ if (isDir)
{
MyCreateDir(destPath);
printf("\n");
@@ -457,22 +552,26 @@ int MY_CDECL main(int numargs, char *args[])
res = SZ_ERROR_FAIL;
break;
}
+
processedSize = outSizeProcessed;
+
if (File_Write(&outFile, outBuffer + offset, &processedSize) != 0 || processedSize != outSizeProcessed)
{
PrintError("can not write output file");
res = SZ_ERROR_FAIL;
break;
}
+
if (File_Close(&outFile))
{
PrintError("can not close output file");
res = SZ_ERROR_FAIL;
break;
}
+
#ifdef USE_WINDOWS_FILE
- if (f->AttribDefined)
- SetFileAttributesW(destPath, f->Attrib);
+ if (SzBitWithVals_Check(&db.Attribs, i))
+ SetFileAttributesW(destPath, db.Attribs.Vals[i]);
#endif
}
printf("\n");
@@ -480,15 +579,18 @@ int MY_CDECL main(int numargs, char *args[])
IAlloc_Free(&allocImp, outBuffer);
}
}
+
SzArEx_Free(&db, &allocImp);
SzFree(NULL, temp);
File_Close(&archiveStream.file);
+
if (res == SZ_OK)
{
printf("\nEverything is Ok\n");
return 0;
}
+
if (res == SZ_ERROR_UNSUPPORTED)
PrintError("decoder doesn't support this archive");
else if (res == SZ_ERROR_MEM)
@@ -497,5 +599,6 @@ int MY_CDECL main(int numargs, char *args[])
PrintError("CRC error");
else
printf("\nERROR #%d\n", res);
+
return 1;
}
diff --git a/3rdparty/lzma/C/Util/7z/Precomp.c b/3rdparty/lzma/C/Util/7z/Precomp.c
new file mode 100644
index 00000000000..01605e3c261
--- /dev/null
+++ b/3rdparty/lzma/C/Util/7z/Precomp.c
@@ -0,0 +1,4 @@
+/* Precomp.c -- StdAfx
+2013-01-21 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
diff --git a/3rdparty/lzma/C/Util/7z/Precomp.h b/3rdparty/lzma/C/Util/7z/Precomp.h
new file mode 100644
index 00000000000..588a66f7eb8
--- /dev/null
+++ b/3rdparty/lzma/C/Util/7z/Precomp.h
@@ -0,0 +1,10 @@
+/* Precomp.h -- StdAfx
+2013-06-16 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_PRECOMP_H
+#define __7Z_PRECOMP_H
+
+#include "../../Compiler.h"
+#include "../../7zTypes.h"
+
+#endif
diff --git a/3rdparty/lzma/C/Util/7z/makefile b/3rdparty/lzma/C/Util/7z/makefile
index 96edda42039..9a49fd515a6 100644
--- a/3rdparty/lzma/C/Util/7z/makefile
+++ b/3rdparty/lzma/C/Util/7z/makefile
@@ -1,4 +1,3 @@
-MY_STATIC_LINK=1
CFLAGS = $(CFLAGS) -D_7ZIP_PPMD_SUPPPORT
PROG = 7zDec.exe
@@ -6,17 +5,18 @@ PROG = 7zDec.exe
C_OBJS = \
$O\7zAlloc.obj \
$O\7zBuf.obj \
- $O\7zBuf2.obj \
$O\7zCrc.obj \
$O\7zCrcOpt.obj \
$O\7zFile.obj \
$O\7zDec.obj \
- $O\7zIn.obj \
+ $O\7zArcIn.obj \
$O\7zStream.obj \
$O\Bcj2.obj \
$O\Bra.obj \
$O\Bra86.obj \
+ $O\BraIA64.obj \
$O\CpuArch.obj \
+ $O\Delta.obj \
$O\Lzma2Dec.obj \
$O\LzmaDec.obj \
$O\Ppmd7.obj \
@@ -26,12 +26,15 @@ C_OBJS = \
$O\7zMain.obj \
OBJS = \
+ $O\Precomp.obj \
$(7Z_OBJS) \
$(C_OBJS) \
!include "../../../CPP/Build.mak"
$(7Z_OBJS): $(*B).c
- $(COMPL_O1)
+ $(CCOMPL_USE)
$(C_OBJS): ../../$(*B).c
- $(COMPL_O2)
+ $(CCOMPL_USE)
+$O\Precomp.obj: Precomp.c
+ $(CCOMPL_PCH)
diff --git a/3rdparty/lzma/C/Util/7z/makefile.gcc b/3rdparty/lzma/C/Util/7z/makefile.gcc
index 364c6474a1c..51053bad65c 100644
--- a/3rdparty/lzma/C/Util/7z/makefile.gcc
+++ b/3rdparty/lzma/C/Util/7z/makefile.gcc
@@ -1,10 +1,10 @@
PROG = 7zDec
-CXX = g++
+CXX = gcc
LIB =
RM = rm -f
CFLAGS = -c -O2 -Wall
-OBJS = 7zMain.o 7zAlloc.o 7zBuf.o 7zBuf2.o 7zCrc.o 7zCrcOpt.o 7zDec.o 7zIn.o CpuArch.o LzmaDec.o Lzma2Dec.o Bra.o Bra86.o Bcj2.o Ppmd7.o Ppmd7Dec.o 7zFile.o 7zStream.o
+OBJS = 7zMain.o 7zAlloc.o 7zArcIn.o 7zBuf.o 7zBuf2.o 7zCrc.o 7zCrcOpt.o 7zDec.o CpuArch.o Delta.o LzmaDec.o Lzma2Dec.o Bra.o Bra86.o BraIA64.o Bcj2.o Ppmd7.o Ppmd7Dec.o 7zFile.o 7zStream.o
all: $(PROG)
@@ -14,9 +14,12 @@ $(PROG): $(OBJS)
7zMain.o: 7zMain.c
$(CXX) $(CFLAGS) 7zMain.c
-7zAlloc.o: 7zAlloc.c
+7zAlloc.o: ../../7zAlloc.c
$(CXX) $(CFLAGS) ../../7zAlloc.c
+7zArcIn.o: ../../7zArcIn.c
+ $(CXX) $(CFLAGS) ../../7zArcIn.c
+
7zBuf.o: ../../7zBuf.c
$(CXX) $(CFLAGS) ../../7zBuf.c
@@ -32,12 +35,12 @@ $(PROG): $(OBJS)
7zDec.o: ../../7zDec.c
$(CXX) $(CFLAGS) -D_7ZIP_PPMD_SUPPPORT ../../7zDec.c
-7zIn.o: ../../7zIn.c
- $(CXX) $(CFLAGS) ../../7zIn.c
-
CpuArch.o: ../../CpuArch.c
$(CXX) $(CFLAGS) ../../CpuArch.c
+Delta.o: ../../Delta.c
+ $(CXX) $(CFLAGS) ../../Delta.c
+
LzmaDec.o: ../../LzmaDec.c
$(CXX) $(CFLAGS) ../../LzmaDec.c
@@ -50,6 +53,9 @@ Bra.o: ../../Bra.c
Bra86.o: ../../Bra86.c
$(CXX) $(CFLAGS) ../../Bra86.c
+BraIA64.o: ../../BraIA64.c
+ $(CXX) $(CFLAGS) ../../BraIA64.c
+
Bcj2.o: ../../Bcj2.c
$(CXX) $(CFLAGS) ../../Bcj2.c
@@ -67,4 +73,3 @@ Ppmd7Dec.o: ../../Ppmd7Dec.c
clean:
-$(RM) $(PROG) $(OBJS)
-
diff --git a/3rdparty/lzma/C/Util/Lzma/LzmaUtil.c b/3rdparty/lzma/C/Util/Lzma/LzmaUtil.c
index 09a749afad7..e5857ceff09 100644
--- a/3rdparty/lzma/C/Util/Lzma/LzmaUtil.c
+++ b/3rdparty/lzma/C/Util/Lzma/LzmaUtil.c
@@ -1,7 +1,7 @@
/* LzmaUtil.c -- Test application for LZMA compression
-2010-09-20 : Igor Pavlov : Public domain */
+2015-11-08 : Igor Pavlov : Public domain */
-#define _CRT_SECURE_NO_WARNINGS
+#include "../../Precomp.h"
#include <stdio.h>
#include <stdlib.h>
@@ -18,10 +18,6 @@ const char *kCantWriteMessage = "Can not write output file";
const char *kCantAllocateMessage = "Can not allocate memory";
const char *kDataErrorMessage = "Data error";
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
-
void PrintHelp(char *buffer)
{
strcat(buffer, "\nLZMA Utility " MY_VERSION_COPYRIGHT_DATE "\n"
@@ -92,7 +88,7 @@ static SRes Decode2(CLzmaDec *state, ISeqOutStream *outStream, ISeqInStream *inS
outPos = 0;
- if (res != SZ_OK || thereIsSize && unpackSize == 0)
+ if (res != SZ_OK || (thereIsSize && unpackSize == 0))
return res;
if (inProcessed == 0 && outProcessed == 0)
@@ -137,7 +133,7 @@ static SRes Encode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 file
SRes res;
CLzmaEncProps props;
- rs = rs;
+ UNUSED_VAR(rs);
enc = LzmaEnc_Create(&g_Alloc);
if (enc == 0)
diff --git a/3rdparty/lzma/C/Util/Lzma/LzmaUtil.dsp b/3rdparty/lzma/C/Util/Lzma/LzmaUtil.dsp
index d10af8b41d3..43b8e176b22 100644
--- a/3rdparty/lzma/C/Util/Lzma/LzmaUtil.dsp
+++ b/3rdparty/lzma/C/Util/Lzma/LzmaUtil.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MT /W4 /WX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
@@ -67,7 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /WX /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
diff --git a/3rdparty/lzma/C/Util/Lzma/makefile b/3rdparty/lzma/C/Util/Lzma/makefile
index afac07161bf..4795322786b 100644
--- a/3rdparty/lzma/C/Util/Lzma/makefile
+++ b/3rdparty/lzma/C/Util/Lzma/makefile
@@ -1,4 +1,4 @@
-MY_STATIC_LINK=1
+# MY_STATIC_LINK=1
PROG = LZMAc.exe
CFLAGS = $(CFLAGS) \
diff --git a/3rdparty/lzma/C/Util/LzmaLib/LzmaLib.dsp b/3rdparty/lzma/C/Util/LzmaLib/LzmaLib.dsp
index 7d8d386fcad..3421de83a1d 100644
--- a/3rdparty/lzma/C/Util/LzmaLib/LzmaLib.dsp
+++ b/3rdparty/lzma/C/Util/LzmaLib/LzmaLib.dsp
@@ -104,6 +104,10 @@ SOURCE=.\LzmaLibExports.c
# End Group
# Begin Source File
+SOURCE=..\..\7zTypes.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Alloc.c
# End Source File
# Begin Source File
@@ -170,9 +174,5 @@ SOURCE=..\..\Threads.c
SOURCE=..\..\Threads.h
# End Source File
-# Begin Source File
-
-SOURCE=..\..\Types.h
-# End Source File
# End Target
# End Project
diff --git a/3rdparty/lzma/C/Util/LzmaLib/LzmaLibExports.c b/3rdparty/lzma/C/Util/LzmaLib/LzmaLibExports.c
index 845545db9a9..4a28a9a6b34 100644
--- a/3rdparty/lzma/C/Util/LzmaLib/LzmaLibExports.c
+++ b/3rdparty/lzma/C/Util/LzmaLib/LzmaLibExports.c
@@ -1,12 +1,14 @@
/* LzmaLibExports.c -- LZMA library DLL Entry point
-2008-10-04 : Igor Pavlov : Public domain */
+2015-11-08 : Igor Pavlov : Public domain */
+
+#include "../../Precomp.h"
#include <windows.h>
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
- hInstance = hInstance;
- dwReason = dwReason;
- lpReserved = lpReserved;
+ UNUSED_VAR(hInstance);
+ UNUSED_VAR(dwReason);
+ UNUSED_VAR(lpReserved);
return TRUE;
}
diff --git a/3rdparty/lzma/C/Util/SfxSetup/Precomp.c b/3rdparty/lzma/C/Util/SfxSetup/Precomp.c
new file mode 100644
index 00000000000..01605e3c261
--- /dev/null
+++ b/3rdparty/lzma/C/Util/SfxSetup/Precomp.c
@@ -0,0 +1,4 @@
+/* Precomp.c -- StdAfx
+2013-01-21 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
diff --git a/3rdparty/lzma/C/Util/SfxSetup/Precomp.h b/3rdparty/lzma/C/Util/SfxSetup/Precomp.h
new file mode 100644
index 00000000000..588a66f7eb8
--- /dev/null
+++ b/3rdparty/lzma/C/Util/SfxSetup/Precomp.h
@@ -0,0 +1,10 @@
+/* Precomp.h -- StdAfx
+2013-06-16 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_PRECOMP_H
+#define __7Z_PRECOMP_H
+
+#include "../../Compiler.h"
+#include "../../7zTypes.h"
+
+#endif
diff --git a/3rdparty/lzma/C/Util/SfxSetup/SfxSetup.c b/3rdparty/lzma/C/Util/SfxSetup/SfxSetup.c
index c3c56b1e7f2..0e5152e5907 100644
--- a/3rdparty/lzma/C/Util/SfxSetup/SfxSetup.c
+++ b/3rdparty/lzma/C/Util/SfxSetup/SfxSetup.c
@@ -1,5 +1,7 @@
/* SfxSetup.c - 7z SFX Setup
-2010-12-13 : Igor Pavlov : Public domain */
+2015-11-08 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#ifndef UNICODE
#define UNICODE
@@ -19,28 +21,28 @@
#include "../../7zFile.h"
#include "../../CpuArch.h"
-#define k_EXE_ExtIndex 1
+#define k_EXE_ExtIndex 2
-static const char *kExts[] =
+static const char * const kExts[] =
{
- "bat",
- "cmd",
- "exe",
- "inf",
- "msi",
+ "bat"
+ , "cmd"
+ , "exe"
+ , "inf"
+ , "msi"
#ifdef UNDER_CE
- "cab",
+ , "cab"
#endif
- "html",
- "htm"
+ , "html"
+ , "htm"
};
-static const char *kNames[] =
+static const char * const kNames[] =
{
- "setup",
- "install",
- "run",
- "start"
+ "setup"
+ , "install"
+ , "run"
+ , "start"
};
static unsigned FindExt(const wchar_t *s, unsigned *extLen)
@@ -61,7 +63,7 @@ static unsigned FindExt(const wchar_t *s, unsigned *extLen)
#define MAKE_CHAR_UPPER(c) ((((c) >= 'a' && (c) <= 'z') ? (c) -= 0x20 : (c)))
-static unsigned FindItem(const char **items, unsigned num, const wchar_t *s, unsigned len)
+static unsigned FindItem(const char * const *items, unsigned num, const wchar_t *s, unsigned len)
{
unsigned i;
for (i = 0; i < num; i++)
@@ -73,7 +75,7 @@ static unsigned FindItem(const char **items, unsigned num, const wchar_t *s, uns
continue;
for (j = 0; j < len; j++)
{
- unsigned c = item[j];
+ unsigned c = (Byte)item[j];
if (c != s[j] && MAKE_CHAR_UPPER(c) != s[j])
break;
}
@@ -86,7 +88,7 @@ static unsigned FindItem(const char **items, unsigned num, const wchar_t *s, uns
#ifdef _CONSOLE
static BOOL WINAPI HandlerRoutine(DWORD ctrlType)
{
- ctrlType = ctrlType;
+ UNUSED_VAR(ctrlType);
return TRUE;
}
#endif
@@ -142,7 +144,7 @@ static Bool FindSignature(CSzFile *stream, UInt64 *resPos)
processed -= k7zStartHeaderSize;
for (pos = 0; pos <= processed; pos++)
{
- for (; buf[pos] != '7' && pos <= processed; pos++);
+ for (; pos <= processed && buf[pos] != '7'; pos++);
if (pos > processed)
break;
if (memcmp(buf + pos, k7zSignature, k7zSignatureSize) == 0)
@@ -180,6 +182,7 @@ static WRes RemoveDirWithSubItems(WCHAR *path)
path[len] = L'\0';
if (handle == INVALID_HANDLE_VALUE)
return GetLastError();
+
for (;;)
{
if (wcscmp(fd.cFileName, L".") != 0 &&
@@ -188,7 +191,7 @@ static WRes RemoveDirWithSubItems(WCHAR *path)
wcscpy(path + len, fd.cFileName);
if ((fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0)
{
- wcscat(path, L"\\");
+ wcscat(path, WSTRING_PATH_SEPARATOR);
res = RemoveDirWithSubItems(path);
}
else
@@ -197,9 +200,11 @@ static WRes RemoveDirWithSubItems(WCHAR *path)
if (DeleteFileW(path) == 0)
res = GetLastError();
}
+
if (res != 0)
break;
}
+
if (!FindNextFileW(handle, &fd))
{
res = GetLastError();
@@ -208,6 +213,7 @@ static WRes RemoveDirWithSubItems(WCHAR *path)
break;
}
}
+
path[len] = L'\0';
FindClose(handle);
if (res == 0)
@@ -238,19 +244,23 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
ISzAlloc allocTempImp;
WCHAR sfxPath[MAX_PATH + 2];
WCHAR path[MAX_PATH * 3 + 2];
+ #ifndef UNDER_CE
+ WCHAR workCurDir[MAX_PATH + 32];
+ #endif
size_t pathLen;
DWORD winRes;
const wchar_t *cmdLineParams;
const char *errorMessage = NULL;
Bool useShellExecute = True;
+ DWORD exitCode = 0;
#ifdef _CONSOLE
SetConsoleCtrlHandler(HandlerRoutine, TRUE);
#else
- hInstance = hInstance;
- hPrevInstance = hPrevInstance;
- lpCmdLine = lpCmdLine;
- nCmdShow = nCmdShow;
+ UNUSED_VAR(hInstance);
+ UNUSED_VAR(hPrevInstance);
+ UNUSED_VAR(lpCmdLine);
+ UNUSED_VAR(nCmdShow);
#endif
CrcGenerateTable();
@@ -292,6 +302,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
return 1;
pathLen = wcslen(path);
d = (GetTickCount() << 12) ^ (GetCurrentThreadId() << 14) ^ GetCurrentProcessId();
+
for (i = 0;; i++, d += GetTickCount())
{
if (i >= 100)
@@ -309,7 +320,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
{
unsigned t = value & 0xF;
value >>= 4;
- s[7 - k] = (char)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
+ s[7 - k] = (wchar_t)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
}
s[k] = '\0';
}
@@ -318,7 +329,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
continue;
if (CreateDirectoryW(path, NULL))
{
- wcscat(path, L"\\");
+ wcscat(path, WSTRING_PATH_SEPARATOR);
pathLen = wcslen(path);
break;
}
@@ -328,6 +339,10 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
break;
}
}
+
+ #ifndef UNDER_CE
+ wcscpy(workCurDir, path);
+ #endif
if (res != SZ_OK)
errorMessage = "Can't create temp folder";
}
@@ -367,6 +382,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
{
res = SzArEx_Open(&db, &lookStream.s, &allocImp, &allocTempImp);
}
+
if (res == SZ_OK)
{
UInt32 executeFileIndex = (UInt32)(Int32)-1;
@@ -376,11 +392,10 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
Byte *outBuffer = 0; /* it must be 0 before first call for each new archive. */
size_t outBufferSize = 0; /* it can have any value before first call (if outBuffer = 0) */
- for (i = 0; i < db.db.NumFiles; i++)
+ for (i = 0; i < db.NumFiles; i++)
{
size_t offset = 0;
size_t outSizeProcessed = 0;
- const CSzFileItem *f = db.db.Files + i;
size_t len;
WCHAR *temp;
len = SzArEx_GetFileNameUtf16(&db, i, NULL);
@@ -418,7 +433,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
}
}
- if (f->IsDir)
+ if (SzArEx_IsDir(&db, i))
{
MyCreateDir(path);
continue;
@@ -453,6 +468,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
break;
}
}
+
processedSize = outSizeProcessed;
if (File_Write(&outFile, outBuffer + offset, &processedSize) != 0 || processedSize != outSizeProcessed)
{
@@ -461,11 +477,12 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
}
#ifdef USE_WINDOWS_FILE
- if (f->MTimeDefined)
+ if (SzBitWithVals_Check(&db.MTime, i))
{
+ const CNtfsFileTime *t = db.MTime.Vals + i;
FILETIME mTime;
- mTime.dwLowDateTime = f->MTime.Low;
- mTime.dwHighDateTime = f->MTime.High;
+ mTime.dwLowDateTime = t->Low;
+ mTime.dwHighDateTime = t->High;
SetFileTime(outFile.handle, NULL, NULL, &mTime);
}
#endif
@@ -481,8 +498,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
}
}
#ifdef USE_WINDOWS_FILE
- if (f->AttribDefined)
- SetFileAttributesW(path, f->Attrib);
+ if (SzBitWithVals_Check(&db.Attribs, i))
+ SetFileAttributesW(path, db.Attribs.Vals[i]);
#endif
}
}
@@ -513,6 +530,18 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
if (res == SZ_OK)
{
HANDLE hProcess = 0;
+
+ #ifndef UNDER_CE
+ WCHAR oldCurDir[MAX_PATH + 2];
+ oldCurDir[0] = 0;
+ {
+ DWORD needLen = GetCurrentDirectory(MAX_PATH + 1, oldCurDir);
+ if (needLen == 0 || needLen > MAX_PATH)
+ oldCurDir[0] = 0;
+ SetCurrentDirectory(workCurDir);
+ }
+ #endif
+
if (useShellExecute)
{
SHELLEXECUTEINFO ei;
@@ -556,18 +585,25 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
hProcess = pi.hProcess;
}
}
+
if (hProcess != 0)
{
WaitForSingleObject(hProcess, INFINITE);
+ if (!GetExitCodeProcess(hProcess, &exitCode))
+ exitCode = 1;
CloseHandle(hProcess);
}
+
+ #ifndef UNDER_CE
+ SetCurrentDirectory(oldCurDir);
+ #endif
}
path[pathLen] = L'\0';
RemoveDirWithSubItems(path);
if (res == SZ_OK)
- return 0;
+ return (int)exitCode;
{
if (res == SZ_ERROR_UNSUPPORTED)
@@ -581,6 +617,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
if (!errorMessage)
errorMessage = "ERROR";
}
+
if (errorMessage)
PrintErrorMessage(errorMessage);
}
diff --git a/3rdparty/lzma/C/Util/SfxSetup/SfxSetup.dsp b/3rdparty/lzma/C/Util/SfxSetup/SfxSetup.dsp
index 39f876d4e23..50e012f03ac 100644
--- a/3rdparty/lzma/C/Util/SfxSetup/SfxSetup.dsp
+++ b/3rdparty/lzma/C/Util/SfxSetup/SfxSetup.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /YX /FD /c
+# ADD CPP /nologo /W4 /WX /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /Yu"Precomp.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "NDEBUG"
@@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /YX /FD /GZ /c
+# ADD CPP /nologo /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /Yu"Precomp.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "_DEBUG"
@@ -103,6 +103,10 @@ SOURCE=..\..\7zAlloc.h
# End Source File
# Begin Source File
+SOURCE=..\..\7zArcIn.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\7zBuf.c
# End Source File
# Begin Source File
@@ -135,11 +139,11 @@ SOURCE=..\..\7zFile.h
# End Source File
# Begin Source File
-SOURCE=..\..\7zIn.c
+SOURCE=..\..\7zStream.c
# End Source File
# Begin Source File
-SOURCE=..\..\7zStream.c
+SOURCE=..\..\7zTypes.h
# End Source File
# Begin Source File
@@ -163,6 +167,10 @@ SOURCE=..\..\Bra86.c
# End Source File
# Begin Source File
+SOURCE=..\..\BraIA64.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\CpuArch.c
# End Source File
# Begin Source File
@@ -171,6 +179,14 @@ SOURCE=..\..\CpuArch.h
# End Source File
# Begin Source File
+SOURCE=..\..\Delta.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Delta.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Lzma2Dec.c
# End Source File
# Begin Source File
@@ -185,9 +201,18 @@ SOURCE=..\..\LzmaDec.c
SOURCE=..\..\LzmaDec.h
# End Source File
+# End Group
+# Begin Group "Spec"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\Precomp.c
+# ADD CPP /Yc"Precomp.h"
+# End Source File
# Begin Source File
-SOURCE=..\..\Types.h
+SOURCE=.\Precomp.h
# End Source File
# End Group
# Begin Source File
diff --git a/3rdparty/lzma/C/Util/SfxSetup/makefile b/3rdparty/lzma/C/Util/SfxSetup/makefile
index ce1fbc9d639..b294479305b 100644
--- a/3rdparty/lzma/C/Util/SfxSetup/makefile
+++ b/3rdparty/lzma/C/Util/SfxSetup/makefile
@@ -1,21 +1,21 @@
PROG = 7zS2.sfx
-LIBS = $(LIBS)
-CFLAGS = $(CFLAGS) -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS
C_OBJS = \
$O\7zAlloc.obj \
+ $O\7zArcIn.obj \
$O\7zBuf.obj \
$O\7zBuf2.obj \
$O\7zCrc.obj \
$O\7zCrcOpt.obj \
$O\7zFile.obj \
$O\7zDec.obj \
- $O\7zIn.obj \
$O\7zStream.obj \
$O\Bcj2.obj \
$O\Bra.obj \
$O\Bra86.obj \
+ $O\BraIA64.obj \
$O\CpuArch.obj \
+ $O\Delta.obj \
$O\Lzma2Dec.obj \
$O\LzmaDec.obj \
diff --git a/3rdparty/lzma/C/Util/SfxSetup/makefile_con b/3rdparty/lzma/C/Util/SfxSetup/makefile_con
index 8e1a050d8af..7a96fd36a7c 100644
--- a/3rdparty/lzma/C/Util/SfxSetup/makefile_con
+++ b/3rdparty/lzma/C/Util/SfxSetup/makefile_con
@@ -1,21 +1,22 @@
PROG = 7zS2con.sfx
-LIBS = $(LIBS)
-CFLAGS = $(CFLAGS) -DUNICODE -D_UNICODE -D_CONSOLE
+CFLAGS = $(CFLAGS) -D_CONSOLE
C_OBJS = \
$O\7zAlloc.obj \
+ $O\7zArcIn.obj \
$O\7zBuf.obj \
$O\7zBuf2.obj \
$O\7zCrc.obj \
$O\7zCrcOpt.obj \
$O\7zFile.obj \
$O\7zDec.obj \
- $O\7zIn.obj \
$O\7zStream.obj \
$O\Bcj2.obj \
$O\Bra.obj \
$O\Bra86.obj \
+ $O\BraIA64.obj \
$O\CpuArch.obj \
+ $O\Delta.obj \
$O\Lzma2Dec.obj \
$O\LzmaDec.obj \
diff --git a/3rdparty/lzma/C/Xz.c b/3rdparty/lzma/C/Xz.c
index 18caba2c15b..1ef6878252c 100644
--- a/3rdparty/lzma/C/Xz.c
+++ b/3rdparty/lzma/C/Xz.c
@@ -1,13 +1,15 @@
/* Xz.c - Xz
-2009-04-15 : Igor Pavlov : Public domain */
+2015-05-01 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "7zCrc.h"
#include "CpuArch.h"
#include "Xz.h"
#include "XzCrc64.h"
-Byte XZ_SIG[XZ_SIG_SIZE] = { 0xFD, '7', 'z', 'X', 'Z', 0 };
-Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE] = { 'Y', 'Z' };
+const Byte XZ_SIG[XZ_SIG_SIZE] = { 0xFD, '7', 'z', 'X', 'Z', 0 };
+const Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE] = { 'Y', 'Z' };
unsigned Xz_WriteVarInt(Byte *buf, UInt64 v)
{
@@ -38,11 +40,11 @@ void Xz_Free(CXzStream *p, ISzAlloc *alloc)
unsigned XzFlags_GetCheckSize(CXzStreamFlags f)
{
- int t = XzFlags_GetCheckType(f);
+ unsigned t = XzFlags_GetCheckType(f);
return (t == 0) ? 0 : (4 << ((t - 1) / 3));
}
-void XzCheck_Init(CXzCheck *p, int mode)
+void XzCheck_Init(CXzCheck *p, unsigned mode)
{
p->mode = mode;
switch (mode)
diff --git a/3rdparty/lzma/C/Xz.h b/3rdparty/lzma/C/Xz.h
index 0f7a822c37e..be3a1c36220 100644
--- a/3rdparty/lzma/C/Xz.h
+++ b/3rdparty/lzma/C/Xz.h
@@ -1,5 +1,5 @@
/* Xz.h - Xz interface
-2011-01-09 : Igor Pavlov : Public domain */
+2015-05-01 : Igor Pavlov : Public domain */
#ifndef __XZ_H
#define __XZ_H
@@ -59,8 +59,8 @@ SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, Bool *isIndex, UInt
#define XZ_SIG_SIZE 6
#define XZ_FOOTER_SIG_SIZE 2
-extern Byte XZ_SIG[XZ_SIG_SIZE];
-extern Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE];
+extern const Byte XZ_SIG[XZ_SIG_SIZE];
+extern const Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE];
#define XZ_STREAM_FLAGS_SIZE 2
#define XZ_STREAM_CRC_SIZE 4
@@ -76,13 +76,13 @@ extern Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE];
typedef struct
{
- int mode;
+ unsigned mode;
UInt32 crc;
UInt64 crc64;
CSha256 sha;
} CXzCheck;
-void XzCheck_Init(CXzCheck *p, int mode);
+void XzCheck_Init(CXzCheck *p, unsigned mode);
void XzCheck_Update(CXzCheck *p, const void *data, size_t size);
int XzCheck_Final(CXzCheck *p, Byte *digest);
@@ -163,7 +163,7 @@ typedef struct
{
ISzAlloc *alloc;
Byte *buf;
- int numCoders;
+ unsigned numCoders;
int finished[MIXCODER_NUM_FILTERS_MAX - 1];
size_t pos[MIXCODER_NUM_FILTERS_MAX - 1];
size_t size[MIXCODER_NUM_FILTERS_MAX - 1];
@@ -174,7 +174,7 @@ typedef struct
void MixCoder_Construct(CMixCoder *p, ISzAlloc *alloc);
void MixCoder_Free(CMixCoder *p);
void MixCoder_Init(CMixCoder *p);
-SRes MixCoder_SetFromMethod(CMixCoder *p, int coderIndex, UInt64 methodId);
+SRes MixCoder_SetFromMethod(CMixCoder *p, unsigned coderIndex, UInt64 methodId);
SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen,
const Byte *src, SizeT *srcLen, int srcWasFinished,
ECoderFinishMode finishMode, ECoderStatus *status);
@@ -209,7 +209,9 @@ typedef struct
UInt64 indexPos;
UInt64 padSize;
- UInt64 numStreams;
+ UInt64 numStartedStreams;
+ UInt64 numFinishedStreams;
+ UInt64 numTotalBlocks;
UInt32 crc;
CMixCoder decoder;
@@ -227,8 +229,8 @@ void XzUnpacker_Free(CXzUnpacker *p);
/*
finishMode:
It has meaning only if the decoding reaches output limit (*destLen).
- LZMA_FINISH_ANY - use smallest number of input bytes
- LZMA_FINISH_END - read EndOfStream marker after decoding
+ CODER_FINISH_ANY - use smallest number of input bytes
+ CODER_FINISH_END - read EndOfStream marker after decoding
Returns:
SZ_OK
@@ -236,19 +238,38 @@ Returns:
CODER_STATUS_NOT_FINISHED,
CODER_STATUS_NEEDS_MORE_INPUT - maybe there are more xz streams,
call XzUnpacker_IsStreamWasFinished to check that current stream was finished
- SZ_ERROR_DATA - Data error
SZ_ERROR_MEM - Memory allocation error
- SZ_ERROR_UNSUPPORTED - Unsupported properties
- SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
+ SZ_ERROR_DATA - Data error
+ SZ_ERROR_UNSUPPORTED - Unsupported method or method properties
+ SZ_ERROR_CRC - CRC error
+ // SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
+
+ SZ_ERROR_NO_ARCHIVE - the error with xz Stream Header with one of the following reasons:
+ - xz Stream Signature failure
+ - CRC32 of xz Stream Header is failed
+ - The size of Stream padding is not multiple of four bytes.
+ It's possible to get that error, if xz stream was finished and the stream
+ contains some another data. In that case you can call XzUnpacker_GetExtraSize()
+ function to get real size of xz stream.
*/
SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
- const Byte *src, SizeT *srcLen, /* int srcWasFinished, */ int finishMode,
+ const Byte *src, SizeT *srcLen, ECoderFinishMode finishMode,
ECoderStatus *status);
Bool XzUnpacker_IsStreamWasFinished(CXzUnpacker *p);
+/*
+Call XzUnpacker_GetExtraSize after XzUnpacker_Code function to detect real size of
+xz stream in two cases:
+XzUnpacker_Code() returns:
+ res == SZ_OK && status == CODER_STATUS_NEEDS_MORE_INPUT
+ res == SZ_ERROR_NO_ARCHIVE
+*/
+
+UInt64 XzUnpacker_GetExtraSize(CXzUnpacker *p);
+
EXTERN_C_END
#endif
diff --git a/3rdparty/lzma/C/XzCrc64.c b/3rdparty/lzma/C/XzCrc64.c
index 0369554b736..e2da63b6ebe 100644
--- a/3rdparty/lzma/C/XzCrc64.c
+++ b/3rdparty/lzma/C/XzCrc64.c
@@ -1,33 +1,86 @@
/* XzCrc64.c -- CRC64 calculation
-2010-04-16 : Igor Pavlov : Public domain */
+2015-03-01 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include "XzCrc64.h"
+#include "CpuArch.h"
#define kCrc64Poly UINT64_CONST(0xC96C5795D7870F42)
-UInt64 g_Crc64Table[256];
-void MY_FAST_CALL Crc64GenerateTable(void)
+#ifdef MY_CPU_LE
+ #define CRC_NUM_TABLES 4
+#else
+ #define CRC_NUM_TABLES 5
+ #define CRC_UINT64_SWAP(v) \
+ ((v >> 56) \
+ | ((v >> 40) & ((UInt64)0xFF << 8)) \
+ | ((v >> 24) & ((UInt64)0xFF << 16)) \
+ | ((v >> 8) & ((UInt64)0xFF << 24)) \
+ | ((v << 8) & ((UInt64)0xFF << 32)) \
+ | ((v << 24) & ((UInt64)0xFF << 40)) \
+ | ((v << 40) & ((UInt64)0xFF << 48)) \
+ | ((v << 56)))
+
+ UInt64 MY_FAST_CALL XzCrc64UpdateT1_BeT4(UInt64 v, const void *data, size_t size, const UInt64 *table);
+#endif
+
+#ifndef MY_CPU_BE
+ UInt64 MY_FAST_CALL XzCrc64UpdateT4(UInt64 v, const void *data, size_t size, const UInt64 *table);
+#endif
+
+typedef UInt64 (MY_FAST_CALL *CRC_FUNC)(UInt64 v, const void *data, size_t size, const UInt64 *table);
+
+static CRC_FUNC g_Crc64Update;
+UInt64 g_Crc64Table[256 * CRC_NUM_TABLES];
+
+UInt64 MY_FAST_CALL Crc64Update(UInt64 v, const void *data, size_t size)
+{
+ return g_Crc64Update(v, data, size, g_Crc64Table);
+}
+
+UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size)
+{
+ return g_Crc64Update(CRC64_INIT_VAL, data, size, g_Crc64Table) ^ CRC64_INIT_VAL;
+}
+
+void MY_FAST_CALL Crc64GenerateTable()
{
UInt32 i;
for (i = 0; i < 256; i++)
{
UInt64 r = i;
- int j;
+ unsigned j;
for (j = 0; j < 8; j++)
- r = (r >> 1) ^ ((UInt64)kCrc64Poly & ~((r & 1) - 1));
+ r = (r >> 1) ^ (kCrc64Poly & ~((r & 1) - 1));
g_Crc64Table[i] = r;
}
-}
+ for (; i < 256 * CRC_NUM_TABLES; i++)
+ {
+ UInt64 r = g_Crc64Table[i - 256];
+ g_Crc64Table[i] = g_Crc64Table[r & 0xFF] ^ (r >> 8);
+ }
+
+ #ifdef MY_CPU_LE
-UInt64 MY_FAST_CALL Crc64Update(UInt64 v, const void *data, size_t size)
-{
- const Byte *p = (const Byte *)data;
- for (; size > 0 ; size--, p++)
- v = CRC64_UPDATE_BYTE(v, *p);
- return v;
-}
+ g_Crc64Update = XzCrc64UpdateT4;
-UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size)
-{
- return CRC64_GET_DIGEST(Crc64Update(CRC64_INIT_VAL, data, size));
+ #else
+ {
+ #ifndef MY_CPU_BE
+ UInt32 k = 1;
+ if (*(const Byte *)&k == 1)
+ g_Crc64Update = XzCrc64UpdateT4;
+ else
+ #endif
+ {
+ for (i = 256 * CRC_NUM_TABLES - 1; i >= 256; i--)
+ {
+ UInt64 x = g_Crc64Table[i - 256];
+ g_Crc64Table[i] = CRC_UINT64_SWAP(x);
+ }
+ g_Crc64Update = XzCrc64UpdateT1_BeT4;
+ }
+ }
+ #endif
}
diff --git a/3rdparty/lzma/C/XzCrc64.h b/3rdparty/lzma/C/XzCrc64.h
index 0e8efd7ea67..08dbc330c27 100644
--- a/3rdparty/lzma/C/XzCrc64.h
+++ b/3rdparty/lzma/C/XzCrc64.h
@@ -1,12 +1,12 @@
/* XzCrc64.h -- CRC64 calculation
-2010-04-16 : Igor Pavlov : Public domain */
+2013-01-18 : Igor Pavlov : Public domain */
#ifndef __XZ_CRC64_H
#define __XZ_CRC64_H
#include <stddef.h>
-#include "Types.h"
+#include "7zTypes.h"
EXTERN_C_BEGIN
diff --git a/3rdparty/lzma/C/XzCrc64Opt.c b/3rdparty/lzma/C/XzCrc64Opt.c
new file mode 100644
index 00000000000..c4fde65a10b
--- /dev/null
+++ b/3rdparty/lzma/C/XzCrc64Opt.c
@@ -0,0 +1,69 @@
+/* XzCrc64Opt.c -- CRC64 calculation
+2015-03-01 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
+
+#include "CpuArch.h"
+
+#ifndef MY_CPU_BE
+
+#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
+
+UInt64 MY_FAST_CALL XzCrc64UpdateT4(UInt64 v, const void *data, size_t size, const UInt64 *table)
+{
+ const Byte *p = (const Byte *)data;
+ for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2(v, *p);
+ for (; size >= 4; size -= 4, p += 4)
+ {
+ UInt32 d = (UInt32)v ^ *(const UInt32 *)p;
+ v = (v >> 32)
+ ^ table[0x300 + ((d ) & 0xFF)]
+ ^ table[0x200 + ((d >> 8) & 0xFF)]
+ ^ table[0x100 + ((d >> 16) & 0xFF)]
+ ^ table[0x000 + ((d >> 24))];
+ }
+ for (; size > 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2(v, *p);
+ return v;
+}
+
+#endif
+
+
+#ifndef MY_CPU_LE
+
+#define CRC_UINT64_SWAP(v) \
+ ((v >> 56) \
+ | ((v >> 40) & ((UInt64)0xFF << 8)) \
+ | ((v >> 24) & ((UInt64)0xFF << 16)) \
+ | ((v >> 8) & ((UInt64)0xFF << 24)) \
+ | ((v << 8) & ((UInt64)0xFF << 32)) \
+ | ((v << 24) & ((UInt64)0xFF << 40)) \
+ | ((v << 40) & ((UInt64)0xFF << 48)) \
+ | ((v << 56)))
+
+#define CRC_UPDATE_BYTE_2_BE(crc, b) (table[(Byte)((crc) >> 56) ^ (b)] ^ ((crc) << 8))
+
+UInt64 MY_FAST_CALL XzCrc64UpdateT1_BeT4(UInt64 v, const void *data, size_t size, const UInt64 *table)
+{
+ const Byte *p = (const Byte *)data;
+ table += 0x100;
+ v = CRC_UINT64_SWAP(v);
+ for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2_BE(v, *p);
+ for (; size >= 4; size -= 4, p += 4)
+ {
+ UInt32 d = (UInt32)(v >> 32) ^ *(const UInt32 *)p;
+ v = (v << 32)
+ ^ table[0x000 + ((d ) & 0xFF)]
+ ^ table[0x100 + ((d >> 8) & 0xFF)]
+ ^ table[0x200 + ((d >> 16) & 0xFF)]
+ ^ table[0x300 + ((d >> 24))];
+ }
+ for (; size > 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2_BE(v, *p);
+ return CRC_UINT64_SWAP(v);
+}
+
+#endif
diff --git a/3rdparty/lzma/C/XzDec.c b/3rdparty/lzma/C/XzDec.c
index 113e2cdf0f0..1edc0245637 100644
--- a/3rdparty/lzma/C/XzDec.c
+++ b/3rdparty/lzma/C/XzDec.c
@@ -1,5 +1,7 @@
/* XzDec.c -- Xz Decode
-2011-02-07 : Igor Pavlov : Public domain */
+2015-11-09 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
/* #define XZ_DUMP */
@@ -30,9 +32,9 @@
unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value)
{
- int i, limit;
+ unsigned i, limit;
*value = 0;
- limit = (maxSize > 9) ? 9 : (int)maxSize;
+ limit = (maxSize > 9) ? 9 : (unsigned)maxSize;
for (i = 0; i < limit;)
{
@@ -64,15 +66,15 @@ typedef struct
Byte buf[BRA_BUF_SIZE];
} CBraState;
-void BraState_Free(void *pp, ISzAlloc *alloc)
+static void BraState_Free(void *pp, ISzAlloc *alloc)
{
alloc->Free(alloc, pp);
}
-SRes BraState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *alloc)
+static SRes BraState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *alloc)
{
CBraState *p = ((CBraState *)pp);
- alloc = alloc;
+ UNUSED_VAR(alloc);
p->ip = 0;
if (p->methodId == XZ_ID_Delta)
{
@@ -85,7 +87,7 @@ SRes BraState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *a
if (propSize == 4)
{
UInt32 v = GetUi32(props);
- switch(p->methodId)
+ switch (p->methodId)
{
case XZ_ID_PPC:
case XZ_ID_ARM:
@@ -110,7 +112,7 @@ SRes BraState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *a
return SZ_OK;
}
-void BraState_Init(void *pp)
+static void BraState_Init(void *pp)
{
CBraState *p = ((CBraState *)pp);
p->bufPos = p->bufConv = p->bufTotal = 0;
@@ -127,9 +129,9 @@ static SRes BraState_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *src,
CBraState *p = ((CBraState *)pp);
SizeT destLenOrig = *destLen;
SizeT srcLenOrig = *srcLen;
+ UNUSED_VAR(finishMode);
*destLen = 0;
*srcLen = 0;
- finishMode = finishMode;
*wasFinished = 0;
while (destLenOrig > 0)
{
@@ -161,7 +163,7 @@ static SRes BraState_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *src,
}
if (p->bufTotal == 0)
break;
- switch(p->methodId)
+ switch (p->methodId)
{
case XZ_ID_Delta:
if (p->encodeMode)
@@ -207,7 +209,7 @@ SRes BraState_SetFromMethod(IStateCoder *p, UInt64 id, int encodeMode, ISzAlloc
id != XZ_ID_SPARC)
return SZ_ERROR_UNSUPPORTED;
p->p = 0;
- decoder = alloc->Alloc(alloc, sizeof(CBraState));
+ decoder = (CBraState *)alloc->Alloc(alloc, sizeof(CBraState));
if (decoder == 0)
return SZ_ERROR_MEM;
decoder->methodId = (UInt32)id;
@@ -233,9 +235,9 @@ static void SbState_Free(void *pp, ISzAlloc *alloc)
static SRes SbState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *alloc)
{
- pp = pp;
- props = props;
- alloc = alloc;
+ UNUSED_VAR(pp);
+ UNUSED_VAR(props);
+ UNUSED_VAR(alloc);
return (propSize == 0) ? SZ_OK : SZ_ERROR_UNSUPPORTED;
}
@@ -249,7 +251,7 @@ static SRes SbState_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *src,
{
CSbDec *p = (CSbDec *)pp;
SRes res;
- srcWasFinished = srcWasFinished;
+ UNUSED_VAR(srcWasFinished);
p->dest = dest;
p->destLen = *destLen;
p->src = src;
@@ -305,15 +307,15 @@ static SRes Lzma2State_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *sr
{
ELzmaStatus status;
/* ELzmaFinishMode fm = (finishMode == LZMA_FINISH_ANY) ? LZMA_FINISH_ANY : LZMA_FINISH_END; */
- SRes res = Lzma2Dec_DecodeToBuf((CLzma2Dec *)pp, dest, destLen, src, srcLen, finishMode, &status);
- srcWasFinished = srcWasFinished;
+ SRes res = Lzma2Dec_DecodeToBuf((CLzma2Dec *)pp, dest, destLen, src, srcLen, (ELzmaFinishMode)finishMode, &status);
+ UNUSED_VAR(srcWasFinished);
*wasFinished = (status == LZMA_STATUS_FINISHED_WITH_MARK);
return res;
}
static SRes Lzma2State_SetFromMethod(IStateCoder *p, ISzAlloc *alloc)
{
- CLzma2Dec *decoder = alloc->Alloc(alloc, sizeof(CLzma2Dec));
+ CLzma2Dec *decoder = (CLzma2Dec *)alloc->Alloc(alloc, sizeof(CLzma2Dec));
p->p = decoder;
if (decoder == 0)
return SZ_ERROR_MEM;
@@ -328,9 +330,9 @@ static SRes Lzma2State_SetFromMethod(IStateCoder *p, ISzAlloc *alloc)
void MixCoder_Construct(CMixCoder *p, ISzAlloc *alloc)
{
- int i;
+ unsigned i;
p->alloc = alloc;
- p->buf = 0;
+ p->buf = NULL;
p->numCoders = 0;
for (i = 0; i < MIXCODER_NUM_FILTERS_MAX; i++)
p->coders[i].p = NULL;
@@ -338,7 +340,7 @@ void MixCoder_Construct(CMixCoder *p, ISzAlloc *alloc)
void MixCoder_Free(CMixCoder *p)
{
- int i;
+ unsigned i;
for (i = 0; i < p->numCoders; i++)
{
IStateCoder *sc = &p->coders[i];
@@ -347,13 +349,16 @@ void MixCoder_Free(CMixCoder *p)
}
p->numCoders = 0;
if (p->buf)
+ {
p->alloc->Free(p->alloc, p->buf);
+ p->buf = NULL; /* 9.31: the BUG was fixed */
+ }
}
void MixCoder_Init(CMixCoder *p)
{
- int i;
- for (i = 0; i < p->numCoders - 1; i++)
+ unsigned i;
+ for (i = 0; i < MIXCODER_NUM_FILTERS_MAX - 1; i++)
{
p->size[i] = 0;
p->pos[i] = 0;
@@ -366,11 +371,11 @@ void MixCoder_Init(CMixCoder *p)
}
}
-SRes MixCoder_SetFromMethod(CMixCoder *p, int coderIndex, UInt64 methodId)
+SRes MixCoder_SetFromMethod(CMixCoder *p, unsigned coderIndex, UInt64 methodId)
{
IStateCoder *sc = &p->coders[coderIndex];
p->ids[coderIndex] = methodId;
- switch(methodId)
+ switch (methodId)
{
case XZ_ID_LZMA2: return Lzma2State_SetFromMethod(sc, p->alloc);
#ifdef USE_SUBBLOCK
@@ -393,10 +398,10 @@ SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen,
*srcLen = 0;
*status = CODER_STATUS_NOT_FINISHED;
- if (p->buf == 0)
+ if (!p->buf)
{
- p->buf = p->alloc->Alloc(p->alloc, CODER_BUF_SIZE * (MIXCODER_NUM_FILTERS_MAX - 1));
- if (p->buf == 0)
+ p->buf = (Byte *)p->alloc->Alloc(p->alloc, CODER_BUF_SIZE * (MIXCODER_NUM_FILTERS_MAX - 1));
+ if (!p->buf)
return SZ_ERROR_MEM;
}
@@ -406,7 +411,7 @@ SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen,
for (;;)
{
Bool processed = False;
- int i;
+ unsigned i;
/*
if (p->numCoders == 1 && *destLen == destLenOrig && finishMode == LZMA_FINISH_ANY)
break;
@@ -515,8 +520,8 @@ static Bool Xz_CheckFooter(CXzStreamFlags flags, UInt64 indexSize, const Byte *b
SRes XzBlock_Parse(CXzBlock *p, const Byte *header)
{
unsigned pos;
- int numFilters, i;
- UInt32 headerSize = (UInt32)header[0] << 2;
+ unsigned numFilters, i;
+ unsigned headerSize = (unsigned)header[0] << 2;
if (CrcCalc(header, headerSize) != GetUi32(header + headerSize))
return SZ_ERROR_ARCHIVE;
@@ -550,9 +555,9 @@ SRes XzBlock_Parse(CXzBlock *p, const Byte *header)
pos += (unsigned)size;
#ifdef XZ_DUMP
- printf("\nf[%d] = %2X: ", i, filter->id);
+ printf("\nf[%u] = %2X: ", i, (unsigned)filter->id);
{
- int i;
+ unsigned i;
for (i = 0; i < size; i++)
printf(" %2X", filter->props[i]);
}
@@ -567,9 +572,10 @@ SRes XzBlock_Parse(CXzBlock *p, const Byte *header)
SRes XzDec_Init(CMixCoder *p, const CXzBlock *block)
{
- int i;
+ unsigned i;
Bool needReInit = True;
- int numFilters = XzBlock_GetNumFilters(block);
+ unsigned numFilters = XzBlock_GetNumFilters(block);
+
if (numFilters == p->numCoders)
{
for (i = 0; i < numFilters; i++)
@@ -577,6 +583,7 @@ SRes XzDec_Init(CMixCoder *p, const CXzBlock *block)
break;
needReInit = (i != numFilters);
}
+
if (needReInit)
{
MixCoder_Free(p);
@@ -587,12 +594,14 @@ SRes XzDec_Init(CMixCoder *p, const CXzBlock *block)
RINOK(MixCoder_SetFromMethod(p, i, f->id));
}
}
+
for (i = 0; i < numFilters; i++)
{
const CXzFilter *f = &block->filters[numFilters - 1 - i];
IStateCoder *sc = &p->coders[i];
RINOK(sc->SetProps(sc->p, f->props, f->propsSize, p->alloc));
}
+
MixCoder_Init(p);
return SZ_OK;
}
@@ -601,7 +610,10 @@ void XzUnpacker_Init(CXzUnpacker *p)
{
p->state = XZ_STATE_STREAM_HEADER;
p->pos = 0;
- p->numStreams = 0;
+ p->numStartedStreams = 0;
+ p->numFinishedStreams = 0;
+ p->numTotalBlocks = 0;
+ p->padSize = 0;
}
void XzUnpacker_Construct(CXzUnpacker *p, ISzAlloc *alloc)
@@ -616,7 +628,7 @@ void XzUnpacker_Free(CXzUnpacker *p)
}
SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
- const Byte *src, SizeT *srcLen, int finishMode, ECoderStatus *status)
+ const Byte *src, SizeT *srcLen, ECoderFinishMode finishMode, ECoderStatus *status)
{
SizeT destLenOrig = *destLen;
SizeT srcLenOrig = *srcLen;
@@ -676,7 +688,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
return SZ_OK;
}
- switch(p->state)
+ switch (p->state)
{
case XZ_STATE_STREAM_HEADER:
{
@@ -690,6 +702,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
else
{
RINOK(Xz_ParseHeader(&p->streamFlags, p->buf));
+ p->numStartedStreams++;
p->state = XZ_STATE_BLOCK_HEADER;
Sha256_Init(&p->sha);
p->indexSize = 0;
@@ -730,6 +743,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
else
{
RINOK(XzBlock_Parse(&p->block, p->buf));
+ p->numTotalBlocks++;
p->state = XZ_STATE_BLOCK;
p->packSize = 0;
p->unpackSize = 0;
@@ -847,7 +861,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
if (p->pos == XZ_STREAM_FOOTER_SIZE)
{
p->state = XZ_STATE_STREAM_PADDING;
- p->numStreams++;
+ p->numFinishedStreams++;
p->padSize = 0;
if (!Xz_CheckFooter(p->streamFlags, p->indexSize, p->buf))
return SZ_ERROR_CRC;
@@ -887,3 +901,13 @@ Bool XzUnpacker_IsStreamWasFinished(CXzUnpacker *p)
{
return (p->state == XZ_STATE_STREAM_PADDING) && (((UInt32)p->padSize & 3) == 0);
}
+
+UInt64 XzUnpacker_GetExtraSize(CXzUnpacker *p)
+{
+ UInt64 num = 0;
+ if (p->state == XZ_STATE_STREAM_PADDING)
+ num += p->padSize;
+ else if (p->state == XZ_STATE_STREAM_HEADER)
+ num += p->padSize + p->pos;
+ return num;
+}
diff --git a/3rdparty/lzma/C/XzEnc.c b/3rdparty/lzma/C/XzEnc.c
index 56cfd579c69..ccac7a8ed4b 100644
--- a/3rdparty/lzma/C/XzEnc.c
+++ b/3rdparty/lzma/C/XzEnc.c
@@ -1,5 +1,7 @@
/* XzEnc.c -- Xz Encode
-2011-02-07 : Igor Pavlov : Public domain */
+2015-09-16 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include <stdlib.h>
#include <string.h>
@@ -8,6 +10,7 @@
#include "Alloc.h"
#include "Bra.h"
#include "CpuArch.h"
+
#ifdef USE_SUBBLOCK
#include "Bcj3Enc.c"
#include "SbFind.c"
@@ -16,14 +19,6 @@
#include "XzEnc.h"
-static void *SzBigAlloc(void *p, size_t size) { p = p; return BigAlloc(size); }
-static void SzBigFree(void *p, void *address) { p = p; BigFree(address); }
-static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree };
-
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
-
#define XzBlock_ClearFlags(p) (p)->flags = 0;
#define XzBlock_SetNumFilters(p, n) (p)->flags |= ((n) - 1);
#define XzBlock_SetHasPackSize(p) (p)->flags |= XZ_BF_PACK_SIZE;
@@ -40,7 +35,7 @@ static SRes WriteBytesAndCrc(ISeqOutStream *s, const void *buf, UInt32 size, UIn
return WriteBytes(s, buf, size);
}
-SRes Xz_WriteHeader(CXzStreamFlags f, ISeqOutStream *s)
+static SRes Xz_WriteHeader(CXzStreamFlags f, ISeqOutStream *s)
{
UInt32 crc;
Byte header[XZ_STREAM_HEADER_SIZE];
@@ -52,17 +47,19 @@ SRes Xz_WriteHeader(CXzStreamFlags f, ISeqOutStream *s)
return WriteBytes(s, header, XZ_STREAM_HEADER_SIZE);
}
-SRes XzBlock_WriteHeader(const CXzBlock *p, ISeqOutStream *s)
+
+static SRes XzBlock_WriteHeader(const CXzBlock *p, ISeqOutStream *s)
{
Byte header[XZ_BLOCK_HEADER_SIZE_MAX];
unsigned pos = 1;
- int numFilters, i;
+ unsigned numFilters, i;
header[pos++] = p->flags;
if (XzBlock_HasPackSize(p)) pos += Xz_WriteVarInt(header + pos, p->packSize);
if (XzBlock_HasUnpackSize(p)) pos += Xz_WriteVarInt(header + pos, p->unpackSize);
numFilters = XzBlock_GetNumFilters(p);
+
for (i = 0; i < numFilters; i++)
{
const CXzFilter *f = &p->filters[i];
@@ -71,14 +68,17 @@ SRes XzBlock_WriteHeader(const CXzBlock *p, ISeqOutStream *s)
memcpy(header + pos, f->props, f->propsSize);
pos += f->propsSize;
}
- while((pos & 3) != 0)
+
+ while ((pos & 3) != 0)
header[pos++] = 0;
+
header[0] = (Byte)(pos >> 2);
SetUi32(header + pos, CrcCalc(header, pos));
return WriteBytes(s, header, pos + 4);
}
-SRes Xz_WriteFooter(CXzStream *p, ISeqOutStream *s)
+
+static SRes Xz_WriteFooter(CXzStream *p, ISeqOutStream *s)
{
Byte buf[32];
UInt64 globalPos;
@@ -90,6 +90,7 @@ SRes Xz_WriteFooter(CXzStream *p, ISeqOutStream *s)
globalPos = pos;
buf[0] = 0;
RINOK(WriteBytesAndCrc(s, buf, pos, &crc));
+
for (i = 0; i < p->numBlocks; i++)
{
const CXzBlockSizes *block = &p->blocks[i];
@@ -98,7 +99,9 @@ SRes Xz_WriteFooter(CXzStream *p, ISeqOutStream *s)
globalPos += pos;
RINOK(WriteBytesAndCrc(s, buf, pos, &crc));
}
+
pos = ((unsigned)globalPos & 3);
+
if (pos != 0)
{
buf[0] = buf[1] = buf[2] = 0;
@@ -123,34 +126,36 @@ SRes Xz_WriteFooter(CXzStream *p, ISeqOutStream *s)
}
}
-SRes Xz_AddIndexRecord(CXzStream *p, UInt64 unpackSize, UInt64 totalSize, ISzAlloc *alloc)
+
+static SRes Xz_AddIndexRecord(CXzStream *p, UInt64 unpackSize, UInt64 totalSize, ISzAlloc *alloc)
{
- if (p->blocks == 0 || p->numBlocksAllocated == p->numBlocks)
+ if (!p->blocks || p->numBlocksAllocated == p->numBlocks)
{
- size_t num = (p->numBlocks + 1) * 2;
+ size_t num = p->numBlocks * 2 + 1;
size_t newSize = sizeof(CXzBlockSizes) * num;
CXzBlockSizes *blocks;
if (newSize / sizeof(CXzBlockSizes) != num)
return SZ_ERROR_MEM;
- blocks = alloc->Alloc(alloc, newSize);
- if (blocks == 0)
+ blocks = (CXzBlockSizes *)alloc->Alloc(alloc, newSize);
+ if (!blocks)
return SZ_ERROR_MEM;
if (p->numBlocks != 0)
{
memcpy(blocks, p->blocks, p->numBlocks * sizeof(CXzBlockSizes));
- Xz_Free(p, alloc);
+ alloc->Free(alloc, p->blocks);
}
p->blocks = blocks;
p->numBlocksAllocated = num;
}
{
CXzBlockSizes *block = &p->blocks[p->numBlocks++];
- block->totalSize = totalSize;
block->unpackSize = unpackSize;
+ block->totalSize = totalSize;
}
return SZ_OK;
}
+
/* ---------- CSeqCheckInStream ---------- */
typedef struct
@@ -161,13 +166,13 @@ typedef struct
CXzCheck check;
} CSeqCheckInStream;
-void SeqCheckInStream_Init(CSeqCheckInStream *p, int mode)
+static void SeqCheckInStream_Init(CSeqCheckInStream *p, unsigned mode)
{
p->processed = 0;
XzCheck_Init(&p->check, mode);
}
-void SeqCheckInStream_GetDigest(CSeqCheckInStream *p, Byte *digest)
+static void SeqCheckInStream_GetDigest(CSeqCheckInStream *p, Byte *digest)
{
XzCheck_Final(&p->check, digest);
}
@@ -181,6 +186,7 @@ static SRes SeqCheckInStream_Read(void *pp, void *data, size_t *size)
return res;
}
+
/* ---------- CSeqSizeOutStream ---------- */
typedef struct
@@ -198,6 +204,7 @@ static size_t MyWrite(void *pp, const void *data, size_t size)
return size;
}
+
/* ---------- CSeqInFilter ---------- */
#define FILTER_BUF_SIZE (1 << 20)
@@ -218,8 +225,9 @@ static SRes SeqInFilter_Read(void *pp, void *data, size_t *size)
CSeqInFilter *p = (CSeqInFilter *)pp;
size_t sizeOriginal = *size;
if (sizeOriginal == 0)
- return S_OK;
+ return SZ_OK;
*size = 0;
+
for (;;)
{
if (!p->srcWasFinished && p->curPos == p->endPos)
@@ -274,9 +282,10 @@ static SRes SeqInFilter_Init(CSeqInFilter *p, const CXzFilter *props)
RINOK(BraState_SetFromMethod(&p->StateCoder, props->id, 1, &g_Alloc));
RINOK(p->StateCoder.SetProps(p->StateCoder.p, props->props, props->propsSize, &g_Alloc));
p->StateCoder.Init(p->StateCoder.p);
- return S_OK;
+ return SZ_OK;
}
+
/* ---------- CSbEncInStream ---------- */
#ifdef USE_SUBBLOCK
@@ -294,6 +303,7 @@ static SRes SbEncInStream_Read(void *pp, void *data, size_t *size)
size_t sizeOriginal = *size;
if (sizeOriginal == 0)
return S_OK;
+
for (;;)
{
if (p->enc.needRead && !p->enc.readWasFinished)
@@ -308,6 +318,7 @@ static SRes SbEncInStream_Read(void *pp, void *data, size_t *size)
}
p->enc.needRead = False;
}
+
*size = sizeOriginal;
RINOK(SbEnc_Read(&p->enc, data, size));
if (*size != 0 || !p->enc.needRead)
@@ -360,7 +371,7 @@ static void Lzma2WithFilters_Construct(CLzma2WithFilters *p, ISzAlloc *alloc, IS
static SRes Lzma2WithFilters_Create(CLzma2WithFilters *p)
{
p->lzma2 = Lzma2Enc_Create(p->alloc, p->bigAlloc);
- if (p->lzma2 == 0)
+ if (!p->lzma2)
return SZ_ERROR_MEM;
return SZ_OK;
}
@@ -378,10 +389,11 @@ static void Lzma2WithFilters_Free(CLzma2WithFilters *p)
}
}
+
void XzProps_Init(CXzProps *p)
{
- p->lzma2Props = 0;
- p->filterProps = 0;
+ p->lzma2Props = NULL;
+ p->filterProps = NULL;
p->checkId = XZ_CHECK_CRC32;
}
@@ -389,10 +401,11 @@ void XzFilterProps_Init(CXzFilterProps *p)
{
p->id = 0;
p->delta = 0;
- p->ip= 0;
+ p->ip = 0;
p->ipDefined = False;
}
+
static SRes Xz_Compress(CXzStream *xz, CLzma2WithFilters *lzmaf,
ISeqOutStream *outStream, ISeqInStream *inStream,
const CXzProps *props, ICompressProgress *progress)
@@ -406,7 +419,7 @@ static SRes Xz_Compress(CXzStream *xz, CLzma2WithFilters *lzmaf,
CSeqCheckInStream checkInStream;
CSeqSizeOutStream seqSizeOutStream;
CXzBlock block;
- int filterIndex = 0;
+ unsigned filterIndex = 0;
CXzFilter *filter = NULL;
const CXzFilterProps *fp = props->filterProps;
@@ -418,6 +431,7 @@ static SRes Xz_Compress(CXzStream *xz, CLzma2WithFilters *lzmaf,
filter = &block.filters[filterIndex++];
filter->id = fp->id;
filter->propsSize = 0;
+
if (fp->id == XZ_ID_Delta)
{
filter->props[0] = (Byte)(fp->delta - 1);
@@ -465,14 +479,16 @@ static SRes Xz_Compress(CXzStream *xz, CLzma2WithFilters *lzmaf,
{
UInt64 packPos = seqSizeOutStream.processed;
+
SRes res = Lzma2Enc_Encode(lzmaf->lzma2, &seqSizeOutStream.p,
- fp ?
- #ifdef USE_SUBBLOCK
- (fp->id == XZ_ID_Subblock) ? &lzmaf->sb.p:
- #endif
- &lzmaf->filter.p:
- &checkInStream.p,
- progress);
+ fp ?
+ #ifdef USE_SUBBLOCK
+ (fp->id == XZ_ID_Subblock) ? &lzmaf->sb.p:
+ #endif
+ &lzmaf->filter.p:
+ &checkInStream.p,
+ progress);
+
RINOK(res);
block.unpackSize = checkInStream.processed;
block.packSize = seqSizeOutStream.processed - packPos;
@@ -481,7 +497,7 @@ static SRes Xz_Compress(CXzStream *xz, CLzma2WithFilters *lzmaf,
{
unsigned padSize = 0;
Byte buf[128];
- while((((unsigned)block.packSize + padSize) & 3) != 0)
+ while ((((unsigned)block.packSize + padSize) & 3) != 0)
buf[padSize++] = 0;
SeqCheckInStream_GetDigest(&checkInStream, buf + padSize);
RINOK(WriteBytes(&seqSizeOutStream.p, buf, padSize + XzFlags_GetCheckSize(xz->flags)));
@@ -491,6 +507,7 @@ static SRes Xz_Compress(CXzStream *xz, CLzma2WithFilters *lzmaf,
return Xz_WriteFooter(xz, outStream);
}
+
SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream,
const CXzProps *props, ICompressProgress *progress)
{
@@ -507,6 +524,7 @@ SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream,
return res;
}
+
SRes Xz_EncodeEmpty(ISeqOutStream *outStream)
{
SRes res;
diff --git a/3rdparty/lzma/C/XzIn.c b/3rdparty/lzma/C/XzIn.c
index 4ba87a2cfc6..07b1cc39516 100644
--- a/3rdparty/lzma/C/XzIn.c
+++ b/3rdparty/lzma/C/XzIn.c
@@ -1,5 +1,7 @@
/* XzIn.c - Xz input
-2011-02-01 : Igor Pavlov : Public domain */
+2015-11-08 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
#include <string.h>
@@ -70,7 +72,7 @@ SRes XzBlock_ReadFooter(CXzBlock *p, CXzStreamFlags f, ISeqInStream *inStream)
static SRes Xz_ReadIndex2(CXzStream *p, const Byte *buf, size_t size, ISzAlloc *alloc)
{
- size_t i, numBlocks, crcStartPos, pos = 1;
+ size_t numBlocks, pos = 1;
UInt32 crc;
if (size < 5 || buf[0] != 0)
@@ -89,10 +91,10 @@ static SRes Xz_ReadIndex2(CXzStream *p, const Byte *buf, size_t size, ISzAlloc *
return SZ_ERROR_ARCHIVE;
}
- crcStartPos = pos;
Xz_Free(p, alloc);
if (numBlocks != 0)
{
+ size_t i;
p->numBlocks = numBlocks;
p->numBlocksAllocated = numBlocks;
p->blocks = alloc->Alloc(alloc, sizeof(CXzBlockSizes) * numBlocks);
@@ -133,55 +135,58 @@ static SRes Xz_ReadIndex(CXzStream *p, ILookInStream *stream, UInt64 indexSize,
return res;
}
-static SRes SeekFromCur(ILookInStream *inStream, Int64 *res)
+static SRes LookInStream_SeekRead_ForArc(ILookInStream *stream, UInt64 offset, void *buf, size_t size)
{
- return inStream->Seek(inStream, res, SZ_SEEK_CUR);
+ RINOK(LookInStream_SeekTo(stream, offset));
+ return LookInStream_Read(stream, buf, size);
+ /* return LookInStream_Read2(stream, buf, size, SZ_ERROR_NO_ARCHIVE); */
}
static SRes Xz_ReadBackward(CXzStream *p, ILookInStream *stream, Int64 *startOffset, ISzAlloc *alloc)
{
UInt64 indexSize;
Byte buf[XZ_STREAM_FOOTER_SIZE];
+ UInt64 pos = *startOffset;
- if ((*startOffset & 3) != 0 || *startOffset < XZ_STREAM_FOOTER_SIZE)
+ if ((pos & 3) != 0 || pos < XZ_STREAM_FOOTER_SIZE)
return SZ_ERROR_NO_ARCHIVE;
- *startOffset = -XZ_STREAM_FOOTER_SIZE;
- RINOK(SeekFromCur(stream, startOffset));
- RINOK(LookInStream_Read2(stream, buf, XZ_STREAM_FOOTER_SIZE, SZ_ERROR_NO_ARCHIVE));
+ pos -= XZ_STREAM_FOOTER_SIZE;
+ RINOK(LookInStream_SeekRead_ForArc(stream, pos, buf, XZ_STREAM_FOOTER_SIZE));
if (memcmp(buf + 10, XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) != 0)
{
UInt32 total = 0;
- *startOffset += XZ_STREAM_FOOTER_SIZE;
+ pos += XZ_STREAM_FOOTER_SIZE;
+
for (;;)
{
size_t i;
#define TEMP_BUF_SIZE (1 << 10)
- Byte tempBuf[TEMP_BUF_SIZE];
- if (*startOffset < XZ_STREAM_FOOTER_SIZE || total > (1 << 16))
- return SZ_ERROR_NO_ARCHIVE;
- i = (*startOffset > TEMP_BUF_SIZE) ? TEMP_BUF_SIZE : (size_t)*startOffset;
+ Byte temp[TEMP_BUF_SIZE];
+
+ i = (pos > TEMP_BUF_SIZE) ? TEMP_BUF_SIZE : (size_t)pos;
+ pos -= i;
+ RINOK(LookInStream_SeekRead_ForArc(stream, pos, temp, i));
total += (UInt32)i;
- *startOffset = -(Int64)i;
- RINOK(SeekFromCur(stream, startOffset));
- RINOK(LookInStream_Read2(stream, tempBuf, i, SZ_ERROR_NO_ARCHIVE));
for (; i != 0; i--)
- if (tempBuf[i - 1] != 0)
+ if (temp[i - 1] != 0)
break;
if (i != 0)
{
if ((i & 3) != 0)
return SZ_ERROR_NO_ARCHIVE;
- *startOffset += i;
+ pos += i;
break;
}
+ if (pos < XZ_STREAM_FOOTER_SIZE || total > (1 << 16))
+ return SZ_ERROR_NO_ARCHIVE;
}
- if (*startOffset < XZ_STREAM_FOOTER_SIZE)
+
+ if (pos < XZ_STREAM_FOOTER_SIZE)
return SZ_ERROR_NO_ARCHIVE;
- *startOffset -= XZ_STREAM_FOOTER_SIZE;
- RINOK(stream->Seek(stream, startOffset, SZ_SEEK_SET));
- RINOK(LookInStream_Read2(stream, buf, XZ_STREAM_FOOTER_SIZE, SZ_ERROR_NO_ARCHIVE));
+ pos -= XZ_STREAM_FOOTER_SIZE;
+ RINOK(LookInStream_SeekRead_ForArc(stream, pos, buf, XZ_STREAM_FOOTER_SIZE));
if (memcmp(buf + 10, XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) != 0)
return SZ_ERROR_NO_ARCHIVE;
}
@@ -196,20 +201,22 @@ static SRes Xz_ReadBackward(CXzStream *p, ILookInStream *stream, Int64 *startOff
indexSize = ((UInt64)GetUi32(buf + 4) + 1) << 2;
- *startOffset = -(Int64)(indexSize + XZ_STREAM_FOOTER_SIZE);
- RINOK(SeekFromCur(stream, startOffset));
+ if (pos < indexSize)
+ return SZ_ERROR_ARCHIVE;
+ pos -= indexSize;
+ RINOK(LookInStream_SeekTo(stream, pos));
RINOK(Xz_ReadIndex(p, stream, indexSize, alloc));
{
UInt64 totalSize = Xz_GetPackSize(p);
- UInt64 sum = XZ_STREAM_HEADER_SIZE + totalSize + indexSize;
- if (totalSize == XZ_SIZE_OVERFLOW ||
- sum >= ((UInt64)1 << 63) ||
- totalSize >= ((UInt64)1 << 63))
+ if (totalSize == XZ_SIZE_OVERFLOW
+ || totalSize >= ((UInt64)1 << 63)
+ || pos < totalSize + XZ_STREAM_HEADER_SIZE)
return SZ_ERROR_ARCHIVE;
- *startOffset = -(Int64)sum;
- RINOK(SeekFromCur(stream, startOffset));
+ pos -= (totalSize + XZ_STREAM_HEADER_SIZE);
+ RINOK(LookInStream_SeekTo(stream, pos));
+ *startOffset = pos;
}
{
CXzStreamFlags headerFlags;
@@ -290,14 +297,15 @@ SRes Xzs_ReadBackward(CXzs *p, ILookInStream *stream, Int64 *startOffset, ICompr
if (data == 0)
return SZ_ERROR_MEM;
p->numAllocated = newNum;
- memcpy(data, p->streams, p->num * sizeof(CXzStream));
+ if (p->num != 0)
+ memcpy(data, p->streams, p->num * sizeof(CXzStream));
alloc->Free(alloc, p->streams);
p->streams = (CXzStream *)data;
}
p->streams[p->num++] = st;
if (*startOffset == 0)
break;
- RINOK(stream->Seek(stream, startOffset, SZ_SEEK_SET));
+ RINOK(LookInStream_SeekTo(stream, *startOffset));
if (progress && progress->Progress(progress, endOffset - *startOffset, (UInt64)(Int64)-1) != SZ_OK)
return SZ_ERROR_PROGRESS;
}
diff --git a/3rdparty/lzma/CPP/7zip/7zip.mak b/3rdparty/lzma/CPP/7zip/7zip.mak
new file mode 100644
index 00000000000..7fbe2ada738
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/7zip.mak
@@ -0,0 +1,240 @@
+OBJS = \
+ $O\StdAfx.obj \
+ $(CURRENT_OBJS) \
+ $(COMMON_OBJS) \
+ $(WIN_OBJS) \
+ $(WIN_CTRL_OBJS) \
+ $(7ZIP_COMMON_OBJS) \
+ $(AR_OBJS) \
+ $(AR_COMMON_OBJS) \
+ $(UI_COMMON_OBJS) \
+ $(AGENT_OBJS) \
+ $(CONSOLE_OBJS) \
+ $(EXPLORER_OBJS) \
+ $(FM_OBJS) \
+ $(GUI_OBJS) \
+ $(7Z_OBJS) \
+ $(CAB_OBJS) \
+ $(CHM_OBJS) \
+ $(COM_OBJS) \
+ $(ISO_OBJS) \
+ $(NSIS_OBJS) \
+ $(RAR_OBJS) \
+ $(TAR_OBJS) \
+ $(UDF_OBJS) \
+ $(WIM_OBJS) \
+ $(ZIP_OBJS) \
+ $(COMPRESS_OBJS) \
+ $(CRYPTO_OBJS) \
+ $(C_OBJS) \
+ $(ASM_OBJS) \
+ $O\resource.res \
+
+!include "../../../Build.mak"
+
+# MAK_SINGLE_FILE = 1
+
+!IFDEF MAK_SINGLE_FILE
+
+!IFDEF CURRENT_OBJS
+$(CURRENT_OBJS): ./$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+
+!IFDEF COMMON_OBJS
+$(COMMON_OBJS): ../../../Common/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF WIN_OBJS
+$(WIN_OBJS): ../../../Windows/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF WIN_CTRL_OBJS
+$(WIN_CTRL_OBJS): ../../../Windows/Control/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF 7ZIP_COMMON_OBJS
+$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF AR_OBJS
+$(AR_OBJS): ../../Archive/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF AR_COMMON_OBJS
+$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF 7Z_OBJS
+$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF CAB_OBJS
+$(CAB_OBJS): ../../Archive/Cab/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF CHM_OBJS
+$(CHM_OBJS): ../../Archive/Chm/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF COM_OBJS
+$(COM_OBJS): ../../Archive/Com/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF ISO_OBJS
+$(ISO_OBJS): ../../Archive/Iso/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF NSIS_OBJS
+$(NSIS_OBJS): ../../Archive/Nsis/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF RAR_OBJS
+$(RAR_OBJS): ../../Archive/Rar/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF TAR_OBJS
+$(TAR_OBJS): ../../Archive/Tar/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF UDF_OBJS
+$(UDF_OBJS): ../../Archive/Udf/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF WIM_OBJS
+$(WIM_OBJS): ../../Archive/Wim/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF ZIP_OBJS
+$(ZIP_OBJS): ../../Archive/Zip/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF COMPRESS_OBJS
+$(COMPRESS_OBJS): ../../Compress/$(*B).cpp
+ $(COMPL_O2)
+!ENDIF
+
+!IFDEF CRYPTO_OBJS
+$(CRYPTO_OBJS): ../../Crypto/$(*B).cpp
+ $(COMPL_O2)
+!ENDIF
+
+!IFDEF UI_COMMON_OBJS
+$(UI_COMMON_OBJS): ../../UI/Common/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF AGENT_OBJS
+$(AGENT_OBJS): ../../UI/Agent/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF CONSOLE_OBJS
+$(CONSOLE_OBJS): ../../UI/Console/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF EXPLORER_OBJS
+$(EXPLORER_OBJS): ../../UI/Explorer/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF FM_OBJS
+$(FM_OBJS): ../../UI/FileManager/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF GUI_OBJS
+$(GUI_OBJS): ../../UI/GUI/$(*B).cpp
+ $(COMPL)
+!ENDIF
+
+!IFDEF C_OBJS
+$(C_OBJS): ../../../../C/$(*B).c
+ $(COMPL_O2)
+!ENDIF
+
+
+!ELSE
+
+{.}.cpp{$O}.obj::
+ $(COMPLB)
+{../../../Common}.cpp{$O}.obj::
+ $(COMPLB)
+{../../../Windows}.cpp{$O}.obj::
+ $(COMPLB)
+{../../../Windows/Control}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Common}.cpp{$O}.obj::
+ $(COMPLB)
+
+{../../UI/Common}.cpp{$O}.obj::
+ $(COMPLB)
+{../../UI/Agent}.cpp{$O}.obj::
+ $(COMPLB)
+{../../UI/Console}.cpp{$O}.obj::
+ $(COMPLB)
+{../../UI/Explorer}.cpp{$O}.obj::
+ $(COMPLB)
+{../../UI/FileManager}.cpp{$O}.obj::
+ $(COMPLB)
+{../../UI/GUI}.cpp{$O}.obj::
+ $(COMPLB)
+
+
+{../../Archive}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Common}.cpp{$O}.obj::
+ $(COMPLB)
+
+{../../Archive/7z}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Cab}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Chm}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Com}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Iso}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Nsis}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Rar}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Tar}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Udf}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Wim}.cpp{$O}.obj::
+ $(COMPLB)
+{../../Archive/Zip}.cpp{$O}.obj::
+ $(COMPLB)
+
+{../../Compress}.cpp{$O}.obj::
+ $(COMPLB_O2)
+{../../Crypto}.cpp{$O}.obj::
+ $(COMPLB_O2)
+{../../../../C}.c{$O}.obj::
+ $(CCOMPLB)
+
+!ENDIF
+
+!include "Asm.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h
index 5cde97c38ba..8105ff0413d 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h
@@ -9,37 +9,62 @@
namespace NArchive {
namespace N7z {
-struct CMethodFull: public CProps
+struct CMethodFull: public CMethodProps
{
CMethodId Id;
- UInt32 NumInStreams;
- UInt32 NumOutStreams;
+ UInt32 NumStreams;
- bool IsSimpleCoder() const { return (NumInStreams == 1) && (NumOutStreams == 1); }
+ bool IsSimpleCoder() const { return NumStreams == 1; }
};
-struct CBind
+struct CBond2
{
- UInt32 InCoder;
- UInt32 InStream;
UInt32 OutCoder;
UInt32 OutStream;
+ UInt32 InCoder;
};
struct CCompressionMethodMode
{
+ /*
+ if (Bonds.Empty()), then default bonds must be created
+ if (Filter_was_Inserted)
+ {
+ Methods[0] is filter method
+ Bonds don't contain bonds for filter (these bonds must be created)
+ }
+ */
+
CObjectVector<CMethodFull> Methods;
- CRecordVector<CBind> Binds;
+ CRecordVector<CBond2> Bonds;
+
+ bool IsThereBond_to_Coder(unsigned coderIndex) const
+ {
+ FOR_VECTOR(i, Bonds)
+ if (Bonds[i].InCoder == coderIndex)
+ return true;
+ return false;
+ }
+
+ bool DefaultMethod_was_Inserted;
+ bool Filter_was_Inserted;
+
#ifndef _7ZIP_ST
UInt32 NumThreads;
+ bool MultiThreadMixer;
#endif
+
bool PasswordIsDefined;
UString Password;
bool IsEmpty() const { return (Methods.IsEmpty() && !PasswordIsDefined); }
- CCompressionMethodMode(): PasswordIsDefined(false)
+ CCompressionMethodMode():
+ DefaultMethod_was_Inserted(false),
+ Filter_was_Inserted(false),
+ PasswordIsDefined(false)
#ifndef _7ZIP_ST
, NumThreads(1)
+ , MultiThreadMixer(true)
#endif
{}
};
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zDecode.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zDecode.cpp
index 425a341577d..bfe1b24e923 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zDecode.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zDecode.cpp
@@ -3,7 +3,6 @@
#include "StdAfx.h"
#include "../../Common/LimitedStreams.h"
-#include "../../Common/LockedStream.h"
#include "../../Common/ProgressUtils.h"
#include "../../Common/StreamObjects.h"
@@ -12,230 +11,364 @@
namespace NArchive {
namespace N7z {
-static void ConvertFolderItemInfoToBindInfo(const CFolder &folder,
- CBindInfoEx &bindInfo)
+class CDecProgress:
+ public ICompressProgressInfo,
+ public CMyUnknownImp
{
- bindInfo.Clear();
- int i;
- for (i = 0; i < folder.BindPairs.Size(); i++)
+ CMyComPtr<ICompressProgressInfo> _progress;
+public:
+ CDecProgress(ICompressProgressInfo *progress): _progress(progress) {}
+
+ MY_UNKNOWN_IMP1(ICompressProgressInfo)
+ STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
+};
+
+STDMETHODIMP CDecProgress::SetRatioInfo(const UInt64 * /* inSize */, const UInt64 *outSize)
+{
+ return _progress->SetRatioInfo(NULL, outSize);
+}
+
+static void Convert_FolderInfo_to_BindInfo(const CFolderEx &folder, CBindInfoEx &bi)
+{
+ bi.Clear();
+
+ bi.Bonds.ClearAndSetSize(folder.Bonds.Size());
+ unsigned i;
+ for (i = 0; i < folder.Bonds.Size(); i++)
{
- NCoderMixer::CBindPair bindPair;
- bindPair.InIndex = (UInt32)folder.BindPairs[i].InIndex;
- bindPair.OutIndex = (UInt32)folder.BindPairs[i].OutIndex;
- bindInfo.BindPairs.Add(bindPair);
+ NCoderMixer2::CBond &bond = bi.Bonds[i];
+ const N7z::CBond &folderBond = folder.Bonds[i];
+ bond.PackIndex = folderBond.PackIndex;
+ bond.UnpackIndex = folderBond.UnpackIndex;
}
- UInt32 outStreamIndex = 0;
+
+ bi.Coders.ClearAndSetSize(folder.Coders.Size());
+ bi.CoderMethodIDs.ClearAndSetSize(folder.Coders.Size());
for (i = 0; i < folder.Coders.Size(); i++)
{
- NCoderMixer::CCoderStreamsInfo coderStreamsInfo;
const CCoderInfo &coderInfo = folder.Coders[i];
- coderStreamsInfo.NumInStreams = (UInt32)coderInfo.NumInStreams;
- coderStreamsInfo.NumOutStreams = (UInt32)coderInfo.NumOutStreams;
- bindInfo.Coders.Add(coderStreamsInfo);
- bindInfo.CoderMethodIDs.Add(coderInfo.MethodID);
- for (UInt32 j = 0; j < coderStreamsInfo.NumOutStreams; j++, outStreamIndex++)
- if (folder.FindBindPairForOutStream(outStreamIndex) < 0)
- bindInfo.OutStreams.Add(outStreamIndex);
+ bi.Coders[i].NumStreams = coderInfo.NumStreams;
+ bi.CoderMethodIDs[i] = coderInfo.MethodID;
}
+
+ /*
+ if (!bi.SetUnpackCoder())
+ throw 1112;
+ */
+ bi.UnpackCoder = folder.UnpackCoder;
+ bi.PackStreams.ClearAndSetSize(folder.PackStreams.Size());
for (i = 0; i < folder.PackStreams.Size(); i++)
- bindInfo.InStreams.Add((UInt32)folder.PackStreams[i]);
+ bi.PackStreams[i] = folder.PackStreams[i];
}
-static bool AreCodersEqual(const NCoderMixer::CCoderStreamsInfo &a1,
- const NCoderMixer::CCoderStreamsInfo &a2)
+static inline bool AreCodersEqual(
+ const NCoderMixer2::CCoderStreamsInfo &a1,
+ const NCoderMixer2::CCoderStreamsInfo &a2)
{
- return (a1.NumInStreams == a2.NumInStreams) &&
- (a1.NumOutStreams == a2.NumOutStreams);
+ return (a1.NumStreams == a2.NumStreams);
}
-static bool AreBindPairsEqual(const NCoderMixer::CBindPair &a1, const NCoderMixer::CBindPair &a2)
+static inline bool AreBondsEqual(
+ const NCoderMixer2::CBond &a1,
+ const NCoderMixer2::CBond &a2)
{
- return (a1.InIndex == a2.InIndex) &&
- (a1.OutIndex == a2.OutIndex);
+ return
+ (a1.PackIndex == a2.PackIndex) &&
+ (a1.UnpackIndex == a2.UnpackIndex);
}
static bool AreBindInfoExEqual(const CBindInfoEx &a1, const CBindInfoEx &a2)
{
if (a1.Coders.Size() != a2.Coders.Size())
return false;
- int i;
+ unsigned i;
for (i = 0; i < a1.Coders.Size(); i++)
if (!AreCodersEqual(a1.Coders[i], a2.Coders[i]))
return false;
- if (a1.BindPairs.Size() != a2.BindPairs.Size())
+
+ if (a1.Bonds.Size() != a2.Bonds.Size())
return false;
- for (i = 0; i < a1.BindPairs.Size(); i++)
- if (!AreBindPairsEqual(a1.BindPairs[i], a2.BindPairs[i]))
+ for (i = 0; i < a1.Bonds.Size(); i++)
+ if (!AreBondsEqual(a1.Bonds[i], a2.Bonds[i]))
return false;
+
for (i = 0; i < a1.CoderMethodIDs.Size(); i++)
if (a1.CoderMethodIDs[i] != a2.CoderMethodIDs[i])
return false;
- if (a1.InStreams.Size() != a2.InStreams.Size())
+
+ if (a1.PackStreams.Size() != a2.PackStreams.Size())
return false;
- if (a1.OutStreams.Size() != a2.OutStreams.Size())
+ for (i = 0; i < a1.PackStreams.Size(); i++)
+ if (a1.PackStreams[i] != a2.PackStreams[i])
+ return false;
+
+ /*
+ if (a1.UnpackCoder != a2.UnpackCoder)
return false;
+ */
return true;
}
-CDecoder::CDecoder(bool multiThread)
+CDecoder::CDecoder(bool useMixerMT):
+ _bindInfoPrev_Defined(false),
+ _useMixerMT(useMixerMT)
+{}
+
+
+struct CLockedInStream:
+ public IUnknown,
+ public CMyUnknownImp
{
- #ifndef _ST_MODE
- multiThread = true;
+ CMyComPtr<IInStream> Stream;
+ UInt64 Pos;
+
+ MY_UNKNOWN_IMP
+
+ #ifdef USE_MIXER_MT
+ NWindows::NSynchronization::CCriticalSection CriticalSection;
#endif
- _multiThread = multiThread;
- _bindInfoExPrevIsDefined = false;
+};
+
+
+#ifdef USE_MIXER_MT
+
+class CLockedSequentialInStreamMT:
+ public ISequentialInStream,
+ public CMyUnknownImp
+{
+ CLockedInStream *_glob;
+ UInt64 _pos;
+ CMyComPtr<IUnknown> _globRef;
+public:
+ void Init(CLockedInStream *lockedInStream, UInt64 startPos)
+ {
+ _globRef = lockedInStream;
+ _glob = lockedInStream;
+ _pos = startPos;
+ }
+
+ MY_UNKNOWN_IMP1(ISequentialInStream)
+
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+};
+
+STDMETHODIMP CLockedSequentialInStreamMT::Read(void *data, UInt32 size, UInt32 *processedSize)
+{
+ NWindows::NSynchronization::CCriticalSectionLock lock(_glob->CriticalSection);
+
+ if (_pos != _glob->Pos)
+ {
+ RINOK(_glob->Stream->Seek(_pos, STREAM_SEEK_SET, NULL));
+ _glob->Pos = _pos;
+ }
+
+ UInt32 realProcessedSize = 0;
+ HRESULT res = _glob->Stream->Read(data, size, &realProcessedSize);
+ _pos += realProcessedSize;
+ _glob->Pos = _pos;
+ if (processedSize)
+ *processedSize = realProcessedSize;
+ return res;
}
+#endif
+
+
+#ifdef USE_MIXER_ST
+
+class CLockedSequentialInStreamST:
+ public ISequentialInStream,
+ public CMyUnknownImp
+{
+ CLockedInStream *_glob;
+ UInt64 _pos;
+ CMyComPtr<IUnknown> _globRef;
+public:
+ void Init(CLockedInStream *lockedInStream, UInt64 startPos)
+ {
+ _globRef = lockedInStream;
+ _glob = lockedInStream;
+ _pos = startPos;
+ }
+
+ MY_UNKNOWN_IMP1(ISequentialInStream)
+
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+};
+
+STDMETHODIMP CLockedSequentialInStreamST::Read(void *data, UInt32 size, UInt32 *processedSize)
+{
+ if (_pos != _glob->Pos)
+ {
+ RINOK(_glob->Stream->Seek(_pos, STREAM_SEEK_SET, NULL));
+ _glob->Pos = _pos;
+ }
+
+ UInt32 realProcessedSize = 0;
+ HRESULT res = _glob->Stream->Read(data, size, &realProcessedSize);
+ _pos += realProcessedSize;
+ _glob->Pos = _pos;
+ if (processedSize)
+ *processedSize = realProcessedSize;
+ return res;
+}
+
+#endif
+
+
+
HRESULT CDecoder::Decode(
DECL_EXTERNAL_CODECS_LOC_VARS
IInStream *inStream,
UInt64 startPos,
- const UInt64 *packSizes,
- const CFolder &folderInfo,
- ISequentialOutStream *outStream,
- ICompressProgressInfo *compressProgress
- #ifndef _NO_CRYPTO
- , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
+ const CFolders &folders, unsigned folderIndex,
+ const UInt64 *unpackSize
+
+ , ISequentialOutStream *outStream
+ , ICompressProgressInfo *compressProgress
+ , ISequentialInStream **
+
+ #ifdef USE_MIXER_ST
+ inStreamMainRes
#endif
+
+ _7Z_DECODER_CRYPRO_VARS_DECL
+
#if !defined(_7ZIP_ST) && !defined(_SFX)
, bool mtMode, UInt32 numThreads
#endif
)
{
- if (!folderInfo.CheckStructure())
+ const UInt64 *packPositions = &folders.PackPositions[folders.FoStartPackStreamIndex[folderIndex]];
+ CFolderEx folderInfo;
+ folders.ParseFolderEx(folderIndex, folderInfo);
+
+ if (!folderInfo.IsDecodingSupported())
+ return E_NOTIMPL;
+
+ CBindInfoEx bindInfo;
+ Convert_FolderInfo_to_BindInfo(folderInfo, bindInfo);
+ if (!bindInfo.CalcMapsAndCheck())
return E_NOTIMPL;
- #ifndef _NO_CRYPTO
- passwordIsDefined = false;
- #endif
- CObjectVector< CMyComPtr<ISequentialInStream> > inStreams;
-
- CLockedInStream lockedInStream;
- lockedInStream.Init(inStream);
- for (int j = 0; j < folderInfo.PackStreams.Size(); j++)
+ UInt64 folderUnpackSize = folders.GetFolderUnpackSize(folderIndex);
+ bool fullUnpack = true;
+ if (unpackSize)
{
- CLockedSequentialInStreamImp *lockedStreamImpSpec = new
- CLockedSequentialInStreamImp;
- CMyComPtr<ISequentialInStream> lockedStreamImp = lockedStreamImpSpec;
- lockedStreamImpSpec->Init(&lockedInStream, startPos);
- startPos += packSizes[j];
-
- CLimitedSequentialInStream *streamSpec = new
- CLimitedSequentialInStream;
- CMyComPtr<ISequentialInStream> inStream = streamSpec;
- streamSpec->SetStream(lockedStreamImp);
- streamSpec->Init(packSizes[j]);
- inStreams.Add(inStream);
+ if (*unpackSize > folderUnpackSize)
+ return E_FAIL;
+ fullUnpack = (*unpackSize == folderUnpackSize);
}
+
+ /*
+ We don't need to init isEncrypted and passwordIsDefined
+ We must upgrade them only
- int numCoders = folderInfo.Coders.Size();
+ #ifndef _NO_CRYPTO
+ isEncrypted = false;
+ passwordIsDefined = false;
+ #endif
+ */
- CBindInfoEx bindInfo;
- ConvertFolderItemInfoToBindInfo(folderInfo, bindInfo);
- bool createNewCoders;
- if (!_bindInfoExPrevIsDefined)
- createNewCoders = true;
- else
- createNewCoders = !AreBindInfoExEqual(bindInfo, _bindInfoExPrev);
- if (createNewCoders)
+ if (!_bindInfoPrev_Defined || !AreBindInfoExEqual(bindInfo, _bindInfoPrev))
{
- int i;
- _decoders.Clear();
- // _decoders2.Clear();
-
- _mixerCoder.Release();
+ _mixerRef.Release();
- if (_multiThread)
+ #ifdef USE_MIXER_MT
+ #ifdef USE_MIXER_ST
+ if (_useMixerMT)
+ #endif
{
- _mixerCoderMTSpec = new NCoderMixer::CCoderMixer2MT;
- _mixerCoder = _mixerCoderMTSpec;
- _mixerCoderCommon = _mixerCoderMTSpec;
+ _mixerMT = new NCoderMixer2::CMixerMT(false);
+ _mixerRef = _mixerMT;
+ _mixer = _mixerMT;
}
+ #ifdef USE_MIXER_ST
else
+ #endif
+ #endif
{
- #ifdef _ST_MODE
- _mixerCoderSTSpec = new NCoderMixer::CCoderMixer2ST;
- _mixerCoder = _mixerCoderSTSpec;
- _mixerCoderCommon = _mixerCoderSTSpec;
+ #ifdef USE_MIXER_ST
+ _mixerST = new NCoderMixer2::CMixerST(false);
+ _mixerRef = _mixerST;
+ _mixer = _mixerST;
#endif
}
- RINOK(_mixerCoderCommon->SetBindInfo(bindInfo));
- for (i = 0; i < numCoders; i++)
+ RINOK(_mixer->SetBindInfo(bindInfo));
+
+ FOR_VECTOR(i, folderInfo.Coders)
{
const CCoderInfo &coderInfo = folderInfo.Coders[i];
+ #ifndef _SFX
+ // we don't support RAR codecs here
+ if ((coderInfo.MethodID >> 8) == 0x403)
+ return E_NOTIMPL;
+ #endif
- CMyComPtr<ICompressCoder> decoder;
- CMyComPtr<ICompressCoder2> decoder2;
+ CCreatedCoder cod;
RINOK(CreateCoder(
EXTERNAL_CODECS_LOC_VARS
- coderInfo.MethodID, decoder, decoder2, false));
- CMyComPtr<IUnknown> decoderUnknown;
+ coderInfo.MethodID, false, cod));
+
if (coderInfo.IsSimpleCoder())
{
- if (decoder == 0)
+ if (!cod.Coder)
return E_NOTIMPL;
-
- decoderUnknown = (IUnknown *)decoder;
-
- if (_multiThread)
- _mixerCoderMTSpec->AddCoder(decoder);
- #ifdef _ST_MODE
- else
- _mixerCoderSTSpec->AddCoder(decoder, false);
- #endif
+ // CMethodId m = coderInfo.MethodID;
+ // isFilter = (IsFilterMethod(m) || m == k_AES);
}
else
{
- if (decoder2 == 0)
+ if (!cod.Coder2 || cod.NumStreams != coderInfo.NumStreams)
return E_NOTIMPL;
- decoderUnknown = (IUnknown *)decoder2;
- if (_multiThread)
- _mixerCoderMTSpec->AddCoder2(decoder2);
- #ifdef _ST_MODE
- else
- _mixerCoderSTSpec->AddCoder2(decoder2, false);
- #endif
}
- _decoders.Add(decoderUnknown);
+ _mixer->AddCoder(cod);
+
+ // now there is no codec that uses another external codec
+ /*
#ifdef EXTERNAL_CODECS
CMyComPtr<ISetCompressCodecsInfo> setCompressCodecsInfo;
decoderUnknown.QueryInterface(IID_ISetCompressCodecsInfo, (void **)&setCompressCodecsInfo);
if (setCompressCodecsInfo)
{
- RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(codecsInfo));
+ // we must use g_ExternalCodecs also
+ RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(__externalCodecs->GetCodecs));
}
#endif
+ */
}
- _bindInfoExPrev = bindInfo;
- _bindInfoExPrevIsDefined = true;
+
+ _bindInfoPrev = bindInfo;
+ _bindInfoPrev_Defined = true;
}
- int i;
- _mixerCoderCommon->ReInit();
-
- UInt32 packStreamIndex = 0, unpackStreamIndex = 0;
- UInt32 coderIndex = 0;
- // UInt32 coder2Index = 0;
+
+ _mixer->ReInit();
- for (i = 0; i < numCoders; i++)
+ UInt32 packStreamIndex = 0;
+ UInt32 unpackStreamIndexStart = folders.FoToCoderUnpackSizes[folderIndex];
+
+ unsigned i;
+
+ for (i = 0; i < folderInfo.Coders.Size(); i++)
{
const CCoderInfo &coderInfo = folderInfo.Coders[i];
- CMyComPtr<IUnknown> &decoder = _decoders[coderIndex];
-
+ IUnknown *decoder = _mixer->GetCoder(i).GetUnknown();
+
{
CMyComPtr<ICompressSetDecoderProperties2> setDecoderProperties;
- decoder.QueryInterface(IID_ICompressSetDecoderProperties2, &setDecoderProperties);
+ decoder->QueryInterface(IID_ICompressSetDecoderProperties2, (void **)&setDecoderProperties);
if (setDecoderProperties)
{
const CByteBuffer &props = coderInfo.Props;
- size_t size = props.GetCapacity();
+ size_t size = props.Size();
if (size > 0xFFFFFFFF)
return E_NOTIMPL;
- // if (size > 0)
- {
- RINOK(setDecoderProperties->SetDecoderProperties2((const Byte *)props, (UInt32)size));
- }
+ HRESULT res = setDecoderProperties->SetDecoderProperties2((const Byte *)props, (UInt32)size);
+ if (res == E_INVALIDARG)
+ res = E_NOTIMPL;
+ RINOK(res);
}
}
@@ -243,7 +376,7 @@ HRESULT CDecoder::Decode(
if (mtMode)
{
CMyComPtr<ICompressSetCoderMt> setCoderMt;
- decoder.QueryInterface(IID_ICompressSetCoderMt, &setCoderMt);
+ decoder->QueryInterface(IID_ICompressSetCoderMt, (void **)&setCoderMt);
if (setCoderMt)
{
RINOK(setCoderMt->SetNumberOfThreads(numThreads));
@@ -254,79 +387,157 @@ HRESULT CDecoder::Decode(
#ifndef _NO_CRYPTO
{
CMyComPtr<ICryptoSetPassword> cryptoSetPassword;
- decoder.QueryInterface(IID_ICryptoSetPassword, &cryptoSetPassword);
+ decoder->QueryInterface(IID_ICryptoSetPassword, (void **)&cryptoSetPassword);
if (cryptoSetPassword)
{
- if (getTextPassword == 0)
- return E_FAIL;
+ isEncrypted = true;
+ if (!getTextPassword)
+ return E_NOTIMPL;
CMyComBSTR passwordBSTR;
RINOK(getTextPassword->CryptoGetTextPassword(&passwordBSTR));
- CByteBuffer buffer;
passwordIsDefined = true;
- const UString password(passwordBSTR);
- const UInt32 sizeInBytes = password.Length() * 2;
- buffer.SetCapacity(sizeInBytes);
- for (int i = 0; i < password.Length(); i++)
+ password.Empty();
+ size_t len = 0;
+ if (passwordBSTR)
+ {
+ password = passwordBSTR;
+ len = password.Len();
+ }
+ CByteBuffer buffer(len * 2);
+ for (size_t i = 0; i < len; i++)
{
- wchar_t c = password[i];
+ wchar_t c = passwordBSTR[i];
((Byte *)buffer)[i * 2] = (Byte)c;
((Byte *)buffer)[i * 2 + 1] = (Byte)(c >> 8);
}
- RINOK(cryptoSetPassword->CryptoSetPassword((const Byte *)buffer, sizeInBytes));
+ RINOK(cryptoSetPassword->CryptoSetPassword((const Byte *)buffer, (UInt32)buffer.Size()));
}
}
#endif
- coderIndex++;
+ {
+ CMyComPtr<ICompressSetFinishMode> setFinishMode;
+ decoder->QueryInterface(IID_ICompressSetFinishMode, (void **)&setFinishMode);
+ if (setFinishMode)
+ {
+ RINOK(setFinishMode->SetFinishMode(BoolToInt(fullUnpack)));
+ }
+ }
- UInt32 numInStreams = (UInt32)coderInfo.NumInStreams;
- UInt32 numOutStreams = (UInt32)coderInfo.NumOutStreams;
- CRecordVector<const UInt64 *> packSizesPointers;
- CRecordVector<const UInt64 *> unpackSizesPointers;
- packSizesPointers.Reserve(numInStreams);
- unpackSizesPointers.Reserve(numOutStreams);
- UInt32 j;
- for (j = 0; j < numOutStreams; j++, unpackStreamIndex++)
- unpackSizesPointers.Add(&folderInfo.UnpackSizes[unpackStreamIndex]);
+ UInt32 numStreams = (UInt32)coderInfo.NumStreams;
- for (j = 0; j < numInStreams; j++, packStreamIndex++)
+ CObjArray<UInt64> packSizes(numStreams);
+ CObjArray<const UInt64 *> packSizesPointers(numStreams);
+
+ for (UInt32 j = 0; j < numStreams; j++, packStreamIndex++)
{
- int bindPairIndex = folderInfo.FindBindPairForInStream(packStreamIndex);
- if (bindPairIndex >= 0)
- packSizesPointers.Add(
- &folderInfo.UnpackSizes[(UInt32)folderInfo.BindPairs[bindPairIndex].OutIndex]);
+ int bond = folderInfo.FindBond_for_PackStream(packStreamIndex);
+
+ if (bond >= 0)
+ packSizesPointers[j] = &folders.CoderUnpackSizes[unpackStreamIndexStart + folderInfo.Bonds[(unsigned)bond].UnpackIndex];
else
{
- int index = folderInfo.FindPackStreamArrayIndex(packStreamIndex);
+ int index = folderInfo.Find_in_PackStreams(packStreamIndex);
if (index < 0)
- return E_FAIL;
- packSizesPointers.Add(&packSizes[index]);
+ return E_NOTIMPL;
+ packSizes[j] = packPositions[(unsigned)index + 1] - packPositions[(unsigned)index];
+ packSizesPointers[j] = &packSizes[j];
}
}
+
+ const UInt64 *unpackSizesPointer =
+ (unpackSize && i == bindInfo.UnpackCoder) ?
+ unpackSize :
+ &folders.CoderUnpackSizes[unpackStreamIndexStart + i];
- _mixerCoderCommon->SetCoderInfo(i,
- &packSizesPointers.Front(),
- &unpackSizesPointers.Front());
+ _mixer->SetCoderInfo(i, unpackSizesPointer, packSizesPointers);
}
- UInt32 mainCoder, temp;
- bindInfo.FindOutStream(bindInfo.OutStreams[0], mainCoder, temp);
- if (_multiThread)
- _mixerCoderMTSpec->SetProgressCoderIndex(mainCoder);
- /*
- else
- _mixerCoderSTSpec->SetProgressCoderIndex(mainCoder);;
- */
+ if (outStream)
+ {
+ _mixer->SelectMainCoder(!fullUnpack);
+ }
+
+ CObjectVector< CMyComPtr<ISequentialInStream> > inStreams;
- if (numCoders == 0)
- return 0;
- CRecordVector<ISequentialInStream *> inStreamPointers;
- inStreamPointers.Reserve(inStreams.Size());
- for (i = 0; i < inStreams.Size(); i++)
- inStreamPointers.Add(inStreams[i]);
- ISequentialOutStream *outStreamPointer = outStream;
- return _mixerCoder->Code(&inStreamPointers.Front(), NULL,
- inStreams.Size(), &outStreamPointer, NULL, 1, compressProgress);
+ CLockedInStream *lockedInStreamSpec = new CLockedInStream;
+ CMyComPtr<IUnknown> lockedInStream = lockedInStreamSpec;
+
+ bool needMtLock = false;
+
+ if (folderInfo.PackStreams.Size() > 1)
+ {
+ // lockedInStream.Pos = (UInt64)(Int64)-1;
+ // RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &lockedInStream.Pos));
+ RINOK(inStream->Seek(startPos + packPositions[0], STREAM_SEEK_SET, &lockedInStreamSpec->Pos));
+ lockedInStreamSpec->Stream = inStream;
+
+ #ifdef USE_MIXER_ST
+ if (_mixer->IsThere_ExternalCoder_in_PackTree(_mixer->MainCoderIndex))
+ #endif
+ needMtLock = true;
+ }
+
+ for (unsigned j = 0; j < folderInfo.PackStreams.Size(); j++)
+ {
+ CMyComPtr<ISequentialInStream> packStream;
+ UInt64 packPos = startPos + packPositions[j];
+
+ if (folderInfo.PackStreams.Size() == 1)
+ {
+ RINOK(inStream->Seek(packPos, STREAM_SEEK_SET, NULL));
+ packStream = inStream;
+ }
+ else
+ {
+ #ifdef USE_MIXER_MT
+ #ifdef USE_MIXER_ST
+ if (_useMixerMT || needMtLock)
+ #endif
+ {
+ CLockedSequentialInStreamMT *lockedStreamImpSpec = new CLockedSequentialInStreamMT;
+ packStream = lockedStreamImpSpec;
+ lockedStreamImpSpec->Init(lockedInStreamSpec, packPos);
+ }
+ #ifdef USE_MIXER_ST
+ else
+ #endif
+ #endif
+ {
+ #ifdef USE_MIXER_ST
+ CLockedSequentialInStreamST *lockedStreamImpSpec = new CLockedSequentialInStreamST;
+ packStream = lockedStreamImpSpec;
+ lockedStreamImpSpec->Init(lockedInStreamSpec, packPos);
+ #endif
+ }
+ }
+
+ CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream;
+ inStreams.AddNew() = streamSpec;
+ streamSpec->SetStream(packStream);
+ streamSpec->Init(packPositions[j + 1] - packPositions[j]);
+ }
+
+ unsigned num = inStreams.Size();
+ CObjArray<ISequentialInStream *> inStreamPointers(num);
+ for (i = 0; i < num; i++)
+ inStreamPointers[i] = inStreams[i];
+
+ if (outStream)
+ {
+ CMyComPtr<ICompressProgressInfo> progress2;
+ if (compressProgress && !_mixer->Is_PackSize_Correct_for_Coder(_mixer->MainCoderIndex))
+ progress2 = new CDecProgress(compressProgress);
+
+ ISequentialOutStream *outStreamPointer = outStream;
+ return _mixer->Code(inStreamPointers, &outStreamPointer, progress2 ? (ICompressProgressInfo *)progress2 : compressProgress);
+ }
+
+ #ifdef USE_MIXER_ST
+ return _mixerST->GetMainUnpackStream(inStreamPointers, inStreamMainRes);
+ #else
+ return E_FAIL;
+ #endif
}
}}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zDecode.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zDecode.h
index d8a424a36c9..5b729f6c86d 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zDecode.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zDecode.h
@@ -3,25 +3,17 @@
#ifndef __7Z_DECODE_H
#define __7Z_DECODE_H
-#include "../../IStream.h"
-#include "../../IPassword.h"
-
#include "../Common/CoderMixer2.h"
-#include "../Common/CoderMixer2MT.h"
-#ifdef _ST_MODE
-#include "../Common/CoderMixer2ST.h"
-#endif
-
-#include "../../Common/CreateCoder.h"
-#include "7zItem.h"
+#include "7zIn.h"
namespace NArchive {
namespace N7z {
-struct CBindInfoEx: public NCoderMixer::CBindInfo
+struct CBindInfoEx: public NCoderMixer2::CBindInfo
{
CRecordVector<CMethodId> CoderMethodIDs;
+
void Clear()
{
CBindInfo::Clear();
@@ -31,32 +23,40 @@ struct CBindInfoEx: public NCoderMixer::CBindInfo
class CDecoder
{
- bool _bindInfoExPrevIsDefined;
- CBindInfoEx _bindInfoExPrev;
+ bool _bindInfoPrev_Defined;
+ CBindInfoEx _bindInfoPrev;
+
+ bool _useMixerMT;
+
+ #ifdef USE_MIXER_ST
+ NCoderMixer2::CMixerST *_mixerST;
+ #endif
- bool _multiThread;
- #ifdef _ST_MODE
- NCoderMixer::CCoderMixer2ST *_mixerCoderSTSpec;
+ #ifdef USE_MIXER_MT
+ NCoderMixer2::CMixerMT *_mixerMT;
#endif
- NCoderMixer::CCoderMixer2MT *_mixerCoderMTSpec;
- NCoderMixer::CCoderMixer2 *_mixerCoderCommon;
- CMyComPtr<ICompressCoder2> _mixerCoder;
- CObjectVector<CMyComPtr<IUnknown> > _decoders;
- // CObjectVector<CMyComPtr<ICompressCoder2> > _decoders2;
+ NCoderMixer2::CMixer *_mixer;
+ CMyComPtr<IUnknown> _mixerRef;
+
public:
- CDecoder(bool multiThread);
+
+ CDecoder(bool useMixerMT);
+
HRESULT Decode(
DECL_EXTERNAL_CODECS_LOC_VARS
IInStream *inStream,
UInt64 startPos,
- const UInt64 *packSizes,
- const CFolder &folder,
- ISequentialOutStream *outStream,
- ICompressProgressInfo *compressProgress
- #ifndef _NO_CRYPTO
- , ICryptoGetTextPassword *getTextPasswordSpec, bool &passwordIsDefined
- #endif
+ const CFolders &folders, unsigned folderIndex,
+ const UInt64 *unpackSize // if (!unpackSize), then full folder is required
+ // if (unpackSize), then only *unpackSize bytes from folder are required
+
+ , ISequentialOutStream *outStream
+ , ICompressProgressInfo *compressProgress
+ , ISequentialInStream **inStreamMainRes
+
+ _7Z_DECODER_CRYPRO_VARS_DECL
+
#if !defined(_7ZIP_ST) && !defined(_SFX)
, bool mtMode, UInt32 numThreads
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zEncode.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zEncode.cpp
index 614f9913d15..ab251711fd2 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zEncode.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zEncode.cpp
@@ -12,43 +12,80 @@
#include "7zEncode.h"
#include "7zSpecStream.h"
-static const UInt64 k_Delta = 0x03;
-static const UInt64 k_BCJ = 0x03030103;
-static const UInt64 k_BCJ2 = 0x0303011B;
-
namespace NArchive {
namespace N7z {
-static void ConvertBindInfoToFolderItemInfo(const NCoderMixer::CBindInfo &bindInfo,
- const CRecordVector<CMethodId> decompressionMethods,
- CFolder &folder)
+void CEncoder::InitBindConv()
{
- folder.Coders.Clear();
- // bindInfo.CoderMethodIDs.Clear();
- // folder.OutStreams.Clear();
- folder.PackStreams.Clear();
- folder.BindPairs.Clear();
- int i;
- for (i = 0; i < bindInfo.BindPairs.Size(); i++)
+ unsigned numIn = _bindInfo.Coders.Size();
+
+ _SrcIn_to_DestOut.ClearAndSetSize(numIn);
+ _DestOut_to_SrcIn.ClearAndSetSize(numIn);
+
+ unsigned numOut = _bindInfo.GetNum_Bonds_and_PackStreams();
+ _SrcOut_to_DestIn.ClearAndSetSize(numOut);
+ // _DestIn_to_SrcOut.ClearAndSetSize(numOut);
+
+ UInt32 destIn = 0;
+ UInt32 destOut = 0;
+
+ for (unsigned i = _bindInfo.Coders.Size(); i != 0;)
+ {
+ i--;
+
+ const NCoderMixer2::CCoderStreamsInfo &coder = _bindInfo.Coders[i];
+
+ numIn--;
+ numOut -= coder.NumStreams;
+
+ _SrcIn_to_DestOut[numIn] = destOut;
+ _DestOut_to_SrcIn[destOut] = numIn;
+
+ destOut++;
+
+ for (UInt32 j = 0; j < coder.NumStreams; j++, destIn++)
+ {
+ UInt32 index = numOut + j;
+ _SrcOut_to_DestIn[index] = destIn;
+ // _DestIn_to_SrcOut[destIn] = index;
+ }
+ }
+}
+
+void CEncoder::SetFolder(CFolder &folder)
+{
+ folder.Bonds.SetSize(_bindInfo.Bonds.Size());
+
+ unsigned i;
+
+ for (i = 0; i < _bindInfo.Bonds.Size(); i++)
{
- CBindPair bindPair;
- bindPair.InIndex = bindInfo.BindPairs[i].InIndex;
- bindPair.OutIndex = bindInfo.BindPairs[i].OutIndex;
- folder.BindPairs.Add(bindPair);
+ CBond &fb = folder.Bonds[i];
+ const NCoderMixer2::CBond &mixerBond = _bindInfo.Bonds[_bindInfo.Bonds.Size() - 1 - i];
+ fb.PackIndex = _SrcOut_to_DestIn[mixerBond.PackIndex];
+ fb.UnpackIndex = _SrcIn_to_DestOut[mixerBond.UnpackIndex];
}
- for (i = 0; i < bindInfo.Coders.Size(); i++)
+
+ folder.Coders.SetSize(_bindInfo.Coders.Size());
+
+ for (i = 0; i < _bindInfo.Coders.Size(); i++)
{
- CCoderInfo coderInfo;
- const NCoderMixer::CCoderStreamsInfo &coderStreamsInfo = bindInfo.Coders[i];
- coderInfo.NumInStreams = coderStreamsInfo.NumInStreams;
- coderInfo.NumOutStreams = coderStreamsInfo.NumOutStreams;
- coderInfo.MethodID = decompressionMethods[i];
- folder.Coders.Add(coderInfo);
+ CCoderInfo &coderInfo = folder.Coders[i];
+ const NCoderMixer2::CCoderStreamsInfo &coderStreamsInfo = _bindInfo.Coders[_bindInfo.Coders.Size() - 1 - i];
+
+ coderInfo.NumStreams = coderStreamsInfo.NumStreams;
+ coderInfo.MethodID = _decompressionMethods[i];
+ // we don't free coderInfo.Props here. So coderInfo.Props can be non-empty.
}
- for (i = 0; i < bindInfo.InStreams.Size(); i++)
- folder.PackStreams.Add(bindInfo.InStreams[i]);
+
+ folder.PackStreams.SetSize(_bindInfo.PackStreams.Size());
+
+ for (i = 0; i < _bindInfo.PackStreams.Size(); i++)
+ folder.PackStreams[i] = _SrcOut_to_DestIn[_bindInfo.PackStreams[i]];
}
+
+
static HRESULT SetCoderProps2(const CProps &props, const UInt64 *dataSizeReduce, IUnknown *coder)
{
CMyComPtr<ICompressSetCoderProperties> setCoderProperties;
@@ -58,31 +95,75 @@ static HRESULT SetCoderProps2(const CProps &props, const UInt64 *dataSizeReduce,
return props.AreThereNonOptionalProps() ? E_INVALIDARG : S_OK;
}
+
+
+void CMtEncMultiProgress::Init(ICompressProgressInfo *progress)
+{
+ _progress = progress;
+ OutSize = 0;
+}
+
+STDMETHODIMP CMtEncMultiProgress::SetRatioInfo(const UInt64 *inSize, const UInt64 * /* outSize */)
+{
+ UInt64 outSize2;
+ {
+ #ifndef _7ZIP_ST
+ NWindows::NSynchronization::CCriticalSectionLock lock(CriticalSection);
+ #endif
+ outSize2 = OutSize;
+ }
+
+ if (_progress)
+ return _progress->SetRatioInfo(inSize, &outSize2);
+
+ return S_OK;
+}
+
+
+
HRESULT CEncoder::CreateMixerCoder(
DECL_EXTERNAL_CODECS_LOC_VARS
const UInt64 *inSizeForReduce)
{
- _mixerCoderSpec = new NCoderMixer::CCoderMixer2MT;
- _mixerCoder = _mixerCoderSpec;
- RINOK(_mixerCoderSpec->SetBindInfo(_bindInfo));
- for (int i = 0; i < _options.Methods.Size(); i++)
+ #ifdef USE_MIXER_MT
+ #ifdef USE_MIXER_ST
+ if (_options.MultiThreadMixer)
+ #endif
+ {
+ _mixerMT = new NCoderMixer2::CMixerMT(true);
+ _mixerRef = _mixerMT;
+ _mixer = _mixerMT;
+ }
+ #ifdef USE_MIXER_ST
+ else
+ #endif
+ #endif
+ {
+ #ifdef USE_MIXER_ST
+ _mixerST = new NCoderMixer2::CMixerST(true);
+ _mixerRef = _mixerST;
+ _mixer = _mixerST;
+ #endif
+ }
+
+ RINOK(_mixer->SetBindInfo(_bindInfo));
+
+ FOR_VECTOR (i, _options.Methods)
{
const CMethodFull &methodFull = _options.Methods[i];
- _codersInfo.Add(CCoderInfo());
- CCoderInfo &encodingInfo = _codersInfo.Back();
- encodingInfo.MethodID = methodFull.Id;
- CMyComPtr<ICompressCoder> encoder;
- CMyComPtr<ICompressCoder2> encoder2;
-
+ CCreatedCoder cod;
+
RINOK(CreateCoder(
EXTERNAL_CODECS_LOC_VARS
- methodFull.Id, encoder, encoder2, true));
+ methodFull.Id, true, cod));
- if (!encoder && !encoder2)
+ if (cod.NumStreams != methodFull.NumStreams)
+ return E_FAIL;
+ if (!cod.Coder && !cod.Coder2)
return E_FAIL;
- CMyComPtr<IUnknown> encoderCommon = encoder ? (IUnknown *)encoder : (IUnknown *)encoder2;
+ CMyComPtr<IUnknown> encoderCommon = cod.Coder ? (IUnknown *)cod.Coder : (IUnknown *)cod.Coder2;
#ifndef _7ZIP_ST
{
@@ -100,78 +181,151 @@ HRESULT CEncoder::CreateMixerCoder(
/*
CMyComPtr<ICryptoResetSalt> resetSalt;
encoderCommon.QueryInterface(IID_ICryptoResetSalt, (void **)&resetSalt);
- if (resetSalt != NULL)
+ if (resetSalt)
{
resetSalt->ResetSalt();
}
*/
+ // now there is no codec that uses another external codec
+ /*
#ifdef EXTERNAL_CODECS
CMyComPtr<ISetCompressCodecsInfo> setCompressCodecsInfo;
encoderCommon.QueryInterface(IID_ISetCompressCodecsInfo, (void **)&setCompressCodecsInfo);
if (setCompressCodecsInfo)
{
- RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(codecsInfo));
+ // we must use g_ExternalCodecs also
+ RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(__externalCodecs->GetCodecs));
}
#endif
+ */
CMyComPtr<ICryptoSetPassword> cryptoSetPassword;
encoderCommon.QueryInterface(IID_ICryptoSetPassword, &cryptoSetPassword);
if (cryptoSetPassword)
{
- CByteBuffer buffer;
- const UInt32 sizeInBytes = _options.Password.Length() * 2;
- buffer.SetCapacity(sizeInBytes);
- for (int i = 0; i < _options.Password.Length(); i++)
+ const unsigned sizeInBytes = _options.Password.Len() * 2;
+ CByteBuffer buffer(sizeInBytes);
+ for (unsigned i = 0; i < _options.Password.Len(); i++)
{
wchar_t c = _options.Password[i];
((Byte *)buffer)[i * 2] = (Byte)c;
((Byte *)buffer)[i * 2 + 1] = (Byte)(c >> 8);
}
- RINOK(cryptoSetPassword->CryptoSetPassword((const Byte *)buffer, sizeInBytes));
+ RINOK(cryptoSetPassword->CryptoSetPassword((const Byte *)buffer, (UInt32)sizeInBytes));
}
- if (encoder)
- _mixerCoderSpec->AddCoder(encoder);
- else
- _mixerCoderSpec->AddCoder2(encoder2);
+ _mixer->AddCoder(cod);
}
return S_OK;
}
+
+
+class CSequentialOutTempBufferImp2:
+ public ISequentialOutStream,
+ public CMyUnknownImp
+{
+ CInOutTempBuffer *_buf;
+public:
+ CMtEncMultiProgress *_mtProgresSpec;
+
+ CSequentialOutTempBufferImp2(): _buf(0), _mtProgresSpec(NULL) {}
+ void Init(CInOutTempBuffer *buffer) { _buf = buffer; }
+ MY_UNKNOWN_IMP1(ISequentialOutStream)
+
+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
+};
+
+STDMETHODIMP CSequentialOutTempBufferImp2::Write(const void *data, UInt32 size, UInt32 *processed)
+{
+ if (!_buf->Write(data, size))
+ {
+ if (processed)
+ *processed = 0;
+ return E_FAIL;
+ }
+ if (processed)
+ *processed = size;
+ if (_mtProgresSpec)
+ _mtProgresSpec->AddOutSize(size);
+ return S_OK;
+}
+
+
+class CSequentialOutMtNotify:
+ public ISequentialOutStream,
+ public CMyUnknownImp
+{
+public:
+ CMyComPtr<ISequentialOutStream> _stream;
+ CMtEncMultiProgress *_mtProgresSpec;
+
+ CSequentialOutMtNotify(): _mtProgresSpec(NULL) {}
+ MY_UNKNOWN_IMP1(ISequentialOutStream)
+
+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
+};
+
+STDMETHODIMP CSequentialOutMtNotify::Write(const void *data, UInt32 size, UInt32 *processed)
+{
+ UInt32 realProcessed = 0;
+ HRESULT res = _stream->Write(data, size, &realProcessed);
+ if (processed)
+ *processed = realProcessed;
+ if (_mtProgresSpec)
+ _mtProgresSpec->AddOutSize(size);
+ return res;
+}
+
+
+
HRESULT CEncoder::Encode(
DECL_EXTERNAL_CODECS_LOC_VARS
ISequentialInStream *inStream,
- const UInt64 *inStreamSize, const UInt64 *inSizeForReduce,
+ // const UInt64 *inStreamSize,
+ const UInt64 *inSizeForReduce,
CFolder &folderItem,
+ CRecordVector<UInt64> &coderUnpackSizes,
+ UInt64 &unpackSize,
ISequentialOutStream *outStream,
CRecordVector<UInt64> &packSizes,
ICompressProgressInfo *compressProgress)
{
RINOK(EncoderConstr());
- if (_mixerCoderSpec == NULL)
+ if (!_mixerRef)
{
RINOK(CreateMixerCoder(EXTERNAL_CODECS_LOC_VARS inSizeForReduce));
}
- _mixerCoderSpec->ReInit();
- // _mixerCoderSpec->SetCoderInfo(0, NULL, NULL, progress);
+
+ _mixer->ReInit();
+
+ CMtEncMultiProgress *mtProgressSpec = NULL;
+ CMyComPtr<ICompressProgressInfo> mtProgress;
+
+ CSequentialOutMtNotify *mtOutStreamNotifySpec = NULL;
+ CMyComPtr<ISequentialOutStream> mtOutStreamNotify;
CObjectVector<CInOutTempBuffer> inOutTempBuffers;
- CObjectVector<CSequentialOutTempBufferImp *> tempBufferSpecs;
+ CObjectVector<CSequentialOutTempBufferImp2 *> tempBufferSpecs;
CObjectVector<CMyComPtr<ISequentialOutStream> > tempBuffers;
- int numMethods = _bindInfo.Coders.Size();
- int i;
- for (i = 1; i < _bindInfo.OutStreams.Size(); i++)
+
+ unsigned numMethods = _bindInfo.Coders.Size();
+
+ unsigned i;
+
+ for (i = 1; i < _bindInfo.PackStreams.Size(); i++)
{
- inOutTempBuffers.Add(CInOutTempBuffer());
- inOutTempBuffers.Back().Create();
- inOutTempBuffers.Back().InitWriting();
+ CInOutTempBuffer &iotb = inOutTempBuffers.AddNew();
+ iotb.Create();
+ iotb.InitWriting();
}
- for (i = 1; i < _bindInfo.OutStreams.Size(); i++)
+
+ for (i = 1; i < _bindInfo.PackStreams.Size(); i++)
{
- CSequentialOutTempBufferImp *tempBufferSpec = new CSequentialOutTempBufferImp;
+ CSequentialOutTempBufferImp2 *tempBufferSpec = new CSequentialOutTempBufferImp2;
CMyComPtr<ISequentialOutStream> tempBuffer = tempBufferSpec;
tempBufferSpec->Init(&inOutTempBuffers[i - 1]);
tempBuffers.Add(tempBuffer);
@@ -179,120 +333,157 @@ HRESULT CEncoder::Encode(
}
for (i = 0; i < numMethods; i++)
- _mixerCoderSpec->SetCoderInfo(i, NULL, NULL);
+ _mixer->SetCoderInfo(i, NULL, NULL);
- if (_bindInfo.InStreams.IsEmpty())
- return E_FAIL;
- UInt32 mainCoderIndex, mainStreamIndex;
- _bindInfo.FindInStream(_bindInfo.InStreams[0], mainCoderIndex, mainStreamIndex);
-
- if (inStreamSize != NULL)
- {
- CRecordVector<const UInt64 *> sizePointers;
- for (UInt32 i = 0; i < _bindInfo.Coders[mainCoderIndex].NumInStreams; i++)
- if (i == mainStreamIndex)
- sizePointers.Add(inStreamSize);
- else
- sizePointers.Add(NULL);
- _mixerCoderSpec->SetCoderInfo(mainCoderIndex, &sizePointers.Front(), NULL);
- }
-
- // UInt64 outStreamStartPos;
- // RINOK(stream->Seek(0, STREAM_SEEK_CUR, &outStreamStartPos));
+ /* inStreamSize can be used by BCJ2 to set optimal range of conversion.
+ But current BCJ2 encoder uses also another way to check exact size of current file.
+ So inStreamSize is not required. */
+
+ /*
+ if (inStreamSize)
+ _mixer->SetCoderInfo(_bindInfo.UnpackCoder, inStreamSize, NULL);
+ */
+
CSequentialInStreamSizeCount2 *inStreamSizeCountSpec = new CSequentialInStreamSizeCount2;
CMyComPtr<ISequentialInStream> inStreamSizeCount = inStreamSizeCountSpec;
- CSequentialOutStreamSizeCount *outStreamSizeCountSpec = new CSequentialOutStreamSizeCount;
- CMyComPtr<ISequentialOutStream> outStreamSizeCount = outStreamSizeCountSpec;
+
+ CSequentialOutStreamSizeCount *outStreamSizeCountSpec = NULL;
+ CMyComPtr<ISequentialOutStream> outStreamSizeCount;
inStreamSizeCountSpec->Init(inStream);
- outStreamSizeCountSpec->SetStream(outStream);
- outStreamSizeCountSpec->Init();
- CRecordVector<ISequentialInStream *> inStreamPointers;
+ ISequentialInStream *inStreamPointer = inStreamSizeCount;
CRecordVector<ISequentialOutStream *> outStreamPointers;
- inStreamPointers.Add(inStreamSizeCount);
- outStreamPointers.Add(outStreamSizeCount);
- for (i = 1; i < _bindInfo.OutStreams.Size(); i++)
- outStreamPointers.Add(tempBuffers[i - 1]);
+
+ SetFolder(folderItem);
- for (i = 0; i < _codersInfo.Size(); i++)
+ for (i = 0; i < numMethods; i++)
{
- CCoderInfo &encodingInfo = _codersInfo[i];
-
+ IUnknown *coder = _mixer->GetCoder(i).GetUnknown();
+
CMyComPtr<ICryptoResetInitVector> resetInitVector;
- _mixerCoderSpec->_coders[i].QueryInterface(IID_ICryptoResetInitVector, (void **)&resetInitVector);
- if (resetInitVector != NULL)
+ coder->QueryInterface(IID_ICryptoResetInitVector, (void **)&resetInitVector);
+ if (resetInitVector)
{
resetInitVector->ResetInitVector();
}
CMyComPtr<ICompressWriteCoderProperties> writeCoderProperties;
- _mixerCoderSpec->_coders[i].QueryInterface(IID_ICompressWriteCoderProperties, (void **)&writeCoderProperties);
- if (writeCoderProperties != NULL)
+ coder->QueryInterface(IID_ICompressWriteCoderProperties, (void **)&writeCoderProperties);
+
+ CByteBuffer &props = folderItem.Coders[numMethods - 1 - i].Props;
+
+ if (writeCoderProperties)
{
CDynBufSeqOutStream *outStreamSpec = new CDynBufSeqOutStream;
- CMyComPtr<ISequentialOutStream> outStream(outStreamSpec);
+ CMyComPtr<ISequentialOutStream> dynOutStream(outStreamSpec);
outStreamSpec->Init();
- writeCoderProperties->WriteCoderProperties(outStream);
- outStreamSpec->CopyToBuffer(encodingInfo.Props);
+ writeCoderProperties->WriteCoderProperties(dynOutStream);
+ outStreamSpec->CopyToBuffer(props);
}
+ else
+ props.Free();
}
- UInt32 progressIndex = mainCoderIndex;
+ _mixer->SelectMainCoder(false);
+ UInt32 mainCoder = _mixer->MainCoderIndex;
- for (i = 0; i + 1 < _codersInfo.Size(); i++)
+ bool useMtProgress = false;
+ if (!_mixer->Is_PackSize_Correct_for_Coder(mainCoder))
{
- UInt64 m = _codersInfo[i].MethodID;
- if (m == k_Delta || m == k_BCJ || m == k_BCJ2)
- progressIndex = i + 1;
+ #ifdef _7ZIP_ST
+ if (!_mixer->IsThere_ExternalCoder_in_PackTree(mainCoder))
+ #endif
+ useMtProgress = true;
}
- _mixerCoderSpec->SetProgressCoderIndex(progressIndex);
+ if (useMtProgress)
+ {
+ mtProgressSpec = new CMtEncMultiProgress;
+ mtProgress = mtProgressSpec;
+ mtProgressSpec->Init(compressProgress);
+
+ mtOutStreamNotifySpec = new CSequentialOutMtNotify;
+ mtOutStreamNotify = mtOutStreamNotifySpec;
+ mtOutStreamNotifySpec->_stream = outStream;
+ mtOutStreamNotifySpec->_mtProgresSpec = mtProgressSpec;
+
+ FOR_VECTOR(i, tempBufferSpecs)
+ {
+ tempBufferSpecs[i]->_mtProgresSpec = mtProgressSpec;
+ }
+ }
- RINOK(_mixerCoder->Code(&inStreamPointers.Front(), NULL, 1,
- &outStreamPointers.Front(), NULL, outStreamPointers.Size(), compressProgress));
- ConvertBindInfoToFolderItemInfo(_decompressBindInfo, _decompressionMethods, folderItem);
+ if (_bindInfo.PackStreams.Size() != 0)
+ {
+ outStreamSizeCountSpec = new CSequentialOutStreamSizeCount;
+ outStreamSizeCount = outStreamSizeCountSpec;
+ outStreamSizeCountSpec->SetStream(mtOutStreamNotify ? (ISequentialOutStream *)mtOutStreamNotify : outStream);
+ outStreamSizeCountSpec->Init();
+ outStreamPointers.Add(outStreamSizeCount);
+ }
+
+ for (i = 1; i < _bindInfo.PackStreams.Size(); i++)
+ outStreamPointers.Add(tempBuffers[i - 1]);
+
+ RINOK(_mixer->Code(
+ &inStreamPointer,
+ &outStreamPointers.Front(),
+ mtProgress ? (ICompressProgressInfo *)mtProgress : compressProgress));
- packSizes.Add(outStreamSizeCountSpec->GetSize());
+ if (_bindInfo.PackStreams.Size() != 0)
+ packSizes.Add(outStreamSizeCountSpec->GetSize());
- for (i = 1; i < _bindInfo.OutStreams.Size(); i++)
+ for (i = 1; i < _bindInfo.PackStreams.Size(); i++)
{
CInOutTempBuffer &inOutTempBuffer = inOutTempBuffers[i - 1];
RINOK(inOutTempBuffer.WriteToStream(outStream));
packSizes.Add(inOutTempBuffer.GetDataSize());
}
+
+ unpackSize = 0;
- for (i = 0; i < (int)_bindReverseConverter->NumSrcInStreams; i++)
+ for (i = 0; i < _bindInfo.Coders.Size(); i++)
{
- int binder = _bindInfo.FindBinderForInStream(
- _bindReverseConverter->DestOutToSrcInMap[i]);
+ int bond = _bindInfo.FindBond_for_UnpackStream(_DestOut_to_SrcIn[i]);
UInt64 streamSize;
- if (binder < 0)
+ if (bond < 0)
+ {
streamSize = inStreamSizeCountSpec->GetSize();
+ unpackSize = streamSize;
+ }
else
- streamSize = _mixerCoderSpec->GetWriteProcessedSize(binder);
- folderItem.UnpackSizes.Add(streamSize);
+ streamSize = _mixer->GetBondStreamSize(bond);
+ coderUnpackSizes.Add(streamSize);
}
- for (i = numMethods - 1; i >= 0; i--)
- folderItem.Coders[numMethods - 1 - i].Props = _codersInfo[i].Props;
+
return S_OK;
}
CEncoder::CEncoder(const CCompressionMethodMode &options):
- _bindReverseConverter(0),
- _constructed(false)
+ _constructed(false)
{
if (options.IsEmpty())
throw 1;
_options = options;
- _mixerCoderSpec = NULL;
+
+ #ifdef USE_MIXER_ST
+ _mixerST = NULL;
+ #endif
+
+ #ifdef USE_MIXER_MT
+ _mixerMT = NULL;
+ #endif
+
+ _mixer = NULL;
}
+
HRESULT CEncoder::EncoderConstr()
{
if (_constructed)
@@ -302,112 +493,125 @@ HRESULT CEncoder::EncoderConstr()
// it has only password method;
if (!_options.PasswordIsDefined)
throw 1;
- if (!_options.Binds.IsEmpty())
+ if (!_options.Bonds.IsEmpty())
throw 1;
- NCoderMixer::CCoderStreamsInfo coderStreamsInfo;
+
CMethodFull method;
-
- method.NumInStreams = 1;
- method.NumOutStreams = 1;
- coderStreamsInfo.NumInStreams = 1;
- coderStreamsInfo.NumOutStreams = 1;
method.Id = k_AES;
-
+ method.NumStreams = 1;
_options.Methods.Add(method);
+
+ NCoderMixer2::CCoderStreamsInfo coderStreamsInfo;
+ coderStreamsInfo.NumStreams = 1;
_bindInfo.Coders.Add(coderStreamsInfo);
- _bindInfo.InStreams.Add(0);
- _bindInfo.OutStreams.Add(0);
+ _bindInfo.PackStreams.Add(0);
+ _bindInfo.UnpackCoder = 0;
}
else
{
- UInt32 numInStreams = 0, numOutStreams = 0;
- int i;
+ UInt32 numOutStreams = 0;
+ unsigned i;
+
for (i = 0; i < _options.Methods.Size(); i++)
{
const CMethodFull &methodFull = _options.Methods[i];
- NCoderMixer::CCoderStreamsInfo coderStreamsInfo;
- coderStreamsInfo.NumInStreams = methodFull.NumOutStreams;
- coderStreamsInfo.NumOutStreams = methodFull.NumInStreams;
- if (_options.Binds.IsEmpty())
+ NCoderMixer2::CCoderStreamsInfo cod;
+
+ cod.NumStreams = methodFull.NumStreams;
+
+ if (_options.Bonds.IsEmpty())
{
- if (i < _options.Methods.Size() - 1)
+ // if there are no bonds in options, we create bonds via first streams of coders
+ if (i != _options.Methods.Size() - 1)
{
- NCoderMixer::CBindPair bindPair;
- bindPair.InIndex = numInStreams + coderStreamsInfo.NumInStreams;
- bindPair.OutIndex = numOutStreams;
- _bindInfo.BindPairs.Add(bindPair);
+ NCoderMixer2::CBond bond;
+ bond.PackIndex = numOutStreams;
+ bond.UnpackIndex = i + 1; // it's next coder
+ _bindInfo.Bonds.Add(bond);
}
- else
- _bindInfo.OutStreams.Insert(0, numOutStreams);
- for (UInt32 j = 1; j < coderStreamsInfo.NumOutStreams; j++)
- _bindInfo.OutStreams.Add(numOutStreams + j);
+ else if (cod.NumStreams != 0)
+ _bindInfo.PackStreams.Insert(0, numOutStreams);
+
+ for (UInt32 j = 1; j < cod.NumStreams; j++)
+ _bindInfo.PackStreams.Add(numOutStreams + j);
}
- numInStreams += coderStreamsInfo.NumInStreams;
- numOutStreams += coderStreamsInfo.NumOutStreams;
+ numOutStreams += cod.NumStreams;
- _bindInfo.Coders.Add(coderStreamsInfo);
+ _bindInfo.Coders.Add(cod);
}
- if (!_options.Binds.IsEmpty())
+ if (!_options.Bonds.IsEmpty())
{
- for (i = 0; i < _options.Binds.Size(); i++)
+ for (i = 0; i < _options.Bonds.Size(); i++)
{
- NCoderMixer::CBindPair bindPair;
- const CBind &bind = _options.Binds[i];
- bindPair.InIndex = _bindInfo.GetCoderInStreamIndex(bind.InCoder) + bind.InStream;
- bindPair.OutIndex = _bindInfo.GetCoderOutStreamIndex(bind.OutCoder) + bind.OutStream;
- _bindInfo.BindPairs.Add(bindPair);
+ NCoderMixer2::CBond mixerBond;
+ const CBond2 &bond = _options.Bonds[i];
+ if (bond.InCoder >= _bindInfo.Coders.Size()
+ || bond.OutCoder >= _bindInfo.Coders.Size()
+ || bond.OutStream >= _bindInfo.Coders[bond.OutCoder].NumStreams)
+ return E_INVALIDARG;
+ mixerBond.PackIndex = _bindInfo.GetStream_for_Coder(bond.OutCoder) + bond.OutStream;
+ mixerBond.UnpackIndex = bond.InCoder;
+ _bindInfo.Bonds.Add(mixerBond);
}
- for (i = 0; i < (int)numOutStreams; i++)
- if (_bindInfo.FindBinderForOutStream(i) == -1)
- _bindInfo.OutStreams.Add(i);
+
+ for (i = 0; i < numOutStreams; i++)
+ if (_bindInfo.FindBond_for_PackStream(i) == -1)
+ _bindInfo.PackStreams.Add(i);
}
- for (i = 0; i < (int)numInStreams; i++)
- if (_bindInfo.FindBinderForInStream(i) == -1)
- _bindInfo.InStreams.Add(i);
+ if (!_bindInfo.SetUnpackCoder())
+ return E_INVALIDARG;
- if (_bindInfo.InStreams.IsEmpty())
- throw 1; // this is error
+ if (!_bindInfo.CalcMapsAndCheck())
+ return E_INVALIDARG;
- // Make main stream first in list
- int inIndex = _bindInfo.InStreams[0];
- for (;;)
+ if (_bindInfo.PackStreams.Size() != 1)
{
- UInt32 coderIndex, coderStreamIndex;
- _bindInfo.FindInStream(inIndex, coderIndex, coderStreamIndex);
- UInt32 outIndex = _bindInfo.GetCoderOutStreamIndex(coderIndex);
- int binder = _bindInfo.FindBinderForOutStream(outIndex);
- if (binder >= 0)
+ /* main_PackStream is pack stream of main path of coders tree.
+ We find main_PackStream, and place to start of list of out streams.
+ It allows to use more optimal memory usage for temp buffers,
+ if main_PackStream is largest stream. */
+
+ UInt32 ci = _bindInfo.UnpackCoder;
+
+ for (;;)
{
- inIndex = _bindInfo.BindPairs[binder].InIndex;
- continue;
- }
- for (i = 0; i < _bindInfo.OutStreams.Size(); i++)
- if (_bindInfo.OutStreams[i] == outIndex)
- {
- _bindInfo.OutStreams.Delete(i);
- _bindInfo.OutStreams.Insert(0, outIndex);
+ if (_bindInfo.Coders[ci].NumStreams == 0)
break;
+
+ UInt32 outIndex = _bindInfo.Coder_to_Stream[ci];
+ int bond = _bindInfo.FindBond_for_PackStream(outIndex);
+ if (bond >= 0)
+ {
+ ci = _bindInfo.Bonds[bond].UnpackIndex;
+ continue;
}
- break;
+
+ int i = _bindInfo.FindStream_in_PackStreams(outIndex);
+ if (i >= 0)
+ _bindInfo.PackStreams.MoveToFront(i);
+ break;
+ }
}
if (_options.PasswordIsDefined)
{
- int numCryptoStreams = _bindInfo.OutStreams.Size();
+ unsigned numCryptoStreams = _bindInfo.PackStreams.Size();
+ unsigned numInStreams = _bindInfo.Coders.Size();
+
for (i = 0; i < numCryptoStreams; i++)
{
- NCoderMixer::CBindPair bindPair;
- bindPair.InIndex = numInStreams + i;
- bindPair.OutIndex = _bindInfo.OutStreams[i];
- _bindInfo.BindPairs.Add(bindPair);
+ NCoderMixer2::CBond bond;
+ bond.UnpackIndex = numInStreams + i;
+ bond.PackIndex = _bindInfo.PackStreams[i];
+ _bindInfo.Bonds.Add(bond);
}
- _bindInfo.OutStreams.Clear();
+ _bindInfo.PackStreams.Clear();
/*
if (numCryptoStreams == 0)
@@ -416,37 +620,37 @@ HRESULT CEncoder::EncoderConstr()
for (i = 0; i < numCryptoStreams; i++)
{
- NCoderMixer::CCoderStreamsInfo coderStreamsInfo;
CMethodFull method;
- method.NumInStreams = 1;
- method.NumOutStreams = 1;
- coderStreamsInfo.NumInStreams = method.NumOutStreams;
- coderStreamsInfo.NumOutStreams = method.NumInStreams;
+ method.NumStreams = 1;
method.Id = k_AES;
-
_options.Methods.Add(method);
- _bindInfo.Coders.Add(coderStreamsInfo);
- _bindInfo.OutStreams.Add(numOutStreams + i);
+
+ NCoderMixer2::CCoderStreamsInfo cod;
+ cod.NumStreams = 1;
+ _bindInfo.Coders.Add(cod);
+
+ _bindInfo.PackStreams.Add(numOutStreams++);
}
}
}
- for (int i = _options.Methods.Size() - 1; i >= 0; i--)
- {
- const CMethodFull &methodFull = _options.Methods[i];
- _decompressionMethods.Add(methodFull.Id);
- }
+ for (unsigned i = _options.Methods.Size(); i != 0;)
+ _decompressionMethods.Add(_options.Methods[--i].Id);
- _bindReverseConverter = new NCoderMixer::CBindReverseConverter(_bindInfo);
- _bindReverseConverter->CreateReverseBindInfo(_decompressBindInfo);
+ if (_bindInfo.Coders.Size() > 16)
+ return E_INVALIDARG;
+ if (_bindInfo.GetNum_Bonds_and_PackStreams() > 16)
+ return E_INVALIDARG;
+
+ if (!_bindInfo.CalcMapsAndCheck())
+ return E_INVALIDARG;
+
+ InitBindConv();
_constructed = true;
return S_OK;
}
-CEncoder::~CEncoder()
-{
- delete _bindReverseConverter;
-}
+CEncoder::~CEncoder() {}
}}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zEncode.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zEncode.h
index 4909a6e8972..f1a9b5ad720 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zEncode.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zEncode.h
@@ -3,48 +3,85 @@
#ifndef __7Z_ENCODE_H
#define __7Z_ENCODE_H
-// #include "../../Common/StreamObjects.h"
-
#include "7zCompressionMode.h"
#include "../Common/CoderMixer2.h"
-#include "../Common/CoderMixer2MT.h"
-#ifdef _ST_MODE
-#include "../Common/CoderMixer2ST.h"
-#endif
-#include "7zItem.h"
-#include "../../Common/CreateCoder.h"
+#include "7zItem.h"
namespace NArchive {
namespace N7z {
-class CEncoder
+class CMtEncMultiProgress:
+ public ICompressProgressInfo,
+ public CMyUnknownImp
{
- NCoderMixer::CCoderMixer2MT *_mixerCoderSpec;
- CMyComPtr<ICompressCoder2> _mixerCoder;
+ CMyComPtr<ICompressProgressInfo> _progress;
+ #ifndef _7ZIP_ST
+ NWindows::NSynchronization::CCriticalSection CriticalSection;
+ #endif
+
+public:
+ UInt64 OutSize;
+
+ CMtEncMultiProgress(): OutSize(0) {}
+
+ void Init(ICompressProgressInfo *progress);
- CObjectVector<CCoderInfo> _codersInfo;
+ void AddOutSize(UInt64 addOutSize)
+ {
+ #ifndef _7ZIP_ST
+ NWindows::NSynchronization::CCriticalSectionLock lock(CriticalSection);
+ #endif
+ OutSize += addOutSize;
+ }
+
+ MY_UNKNOWN_IMP1(ICompressProgressInfo)
+
+ STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
+};
+
+class CEncoder
+{
+ #ifdef USE_MIXER_ST
+ NCoderMixer2::CMixerST *_mixerST;
+ #endif
+ #ifdef USE_MIXER_MT
+ NCoderMixer2::CMixerMT *_mixerMT;
+ #endif
+
+ NCoderMixer2::CMixer *_mixer;
+ CMyComPtr<IUnknown> _mixerRef;
CCompressionMethodMode _options;
- NCoderMixer::CBindInfo _bindInfo;
- NCoderMixer::CBindInfo _decompressBindInfo;
- NCoderMixer::CBindReverseConverter *_bindReverseConverter;
+ NCoderMixer2::CBindInfo _bindInfo;
CRecordVector<CMethodId> _decompressionMethods;
+ CRecordVector<UInt32> _SrcIn_to_DestOut;
+ CRecordVector<UInt32> _SrcOut_to_DestIn;
+ // CRecordVector<UInt32> _DestIn_to_SrcOut;
+ CRecordVector<UInt32> _DestOut_to_SrcIn;
+
+ void InitBindConv();
+ void SetFolder(CFolder &folder);
+
HRESULT CreateMixerCoder(DECL_EXTERNAL_CODECS_LOC_VARS
const UInt64 *inSizeForReduce);
bool _constructed;
public:
+
CEncoder(const CCompressionMethodMode &options);
~CEncoder();
HRESULT EncoderConstr();
HRESULT Encode(
DECL_EXTERNAL_CODECS_LOC_VARS
ISequentialInStream *inStream,
- const UInt64 *inStreamSize, const UInt64 *inSizeForReduce,
+ // const UInt64 *inStreamSize,
+ const UInt64 *inSizeForReduce,
CFolder &folderItem,
+ CRecordVector<UInt64> &coderUnpackSizes,
+ UInt64 &unpackSize,
ISequentialOutStream *outStream,
CRecordVector<UInt64> &packSizes,
ICompressProgressInfo *compressProgress);
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zExtract.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zExtract.cpp
index d55f38e131d..8396516423c 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zExtract.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zExtract.cpp
@@ -2,210 +2,334 @@
#include "StdAfx.h"
+#include "../../../../C/7zCrc.h"
+
#include "../../../Common/ComTry.h"
#include "../../Common/ProgressUtils.h"
#include "7zDecode.h"
-// #include "7z1Decode.h"
-#include "7zFolderOutStream.h"
#include "7zHandler.h"
+// EXTERN_g_ExternalCodecs
+
namespace NArchive {
namespace N7z {
-struct CExtractFolderInfo
+class CFolderOutStream:
+ public ISequentialOutStream,
+ public CMyUnknownImp
{
- #ifdef _7Z_VOL
- int VolumeIndex;
- #endif
- CNum FileIndex;
- CNum FolderIndex;
- CBoolVector ExtractStatuses;
- UInt64 UnpackSize;
- CExtractFolderInfo(
- #ifdef _7Z_VOL
- int volumeIndex,
- #endif
- CNum fileIndex, CNum folderIndex):
- #ifdef _7Z_VOL
- VolumeIndex(volumeIndex),
- #endif
- FileIndex(fileIndex),
- FolderIndex(folderIndex),
- UnpackSize(0)
+ CMyComPtr<ISequentialOutStream> _stream;
+public:
+ bool TestMode;
+ bool CheckCrc;
+private:
+ bool _fileIsOpen;
+ bool _calcCrc;
+ UInt32 _crc;
+ UInt64 _rem;
+
+ const UInt32 *_indexes;
+ unsigned _numFiles;
+ unsigned _fileIndex;
+
+ HRESULT OpenFile(bool isCorrupted = false);
+ HRESULT CloseFile_and_SetResult(Int32 res);
+ HRESULT CloseFile();
+ HRESULT ProcessEmptyFiles();
+
+public:
+ MY_UNKNOWN_IMP1(ISequentialOutStream)
+
+ const CDbEx *_db;
+ CMyComPtr<IArchiveExtractCallback> ExtractCallback;
+
+ bool ExtraWriteWasCut;
+
+ CFolderOutStream():
+ TestMode(false),
+ CheckCrc(true)
+ {}
+
+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
+
+ HRESULT Init(unsigned startIndex, const UInt32 *indexes, unsigned numFiles);
+ HRESULT FlushCorrupted(Int32 callbackOperationResult);
+
+ bool WasWritingFinished() const { return _numFiles == 0; }
+};
+
+
+HRESULT CFolderOutStream::Init(unsigned startIndex, const UInt32 *indexes, unsigned numFiles)
+{
+ _fileIndex = startIndex;
+ _indexes = indexes;
+ _numFiles = numFiles;
+
+ _fileIsOpen = false;
+ ExtraWriteWasCut = false;
+
+ return ProcessEmptyFiles();
+}
+
+HRESULT CFolderOutStream::OpenFile(bool isCorrupted)
+{
+ const CFileItem &fi = _db->Files[_fileIndex];
+ UInt32 nextFileIndex = (_indexes ? *_indexes : _fileIndex);
+ Int32 askMode = (_fileIndex == nextFileIndex) ?
+ (TestMode ?
+ NExtract::NAskMode::kTest :
+ NExtract::NAskMode::kExtract) :
+ NExtract::NAskMode::kSkip;
+
+ if (isCorrupted
+ && askMode == NExtract::NAskMode::kExtract
+ && !_db->IsItemAnti(_fileIndex)
+ && !fi.IsDir)
+ askMode = NExtract::NAskMode::kTest;
+
+ CMyComPtr<ISequentialOutStream> realOutStream;
+ RINOK(ExtractCallback->GetStream(_fileIndex, &realOutStream, askMode));
+
+ _stream = realOutStream;
+ _crc = CRC_INIT_VAL;
+ _calcCrc = (CheckCrc && fi.CrcDefined && !fi.IsDir);
+
+ _fileIsOpen = true;
+ _rem = fi.Size;
+
+ if (askMode == NExtract::NAskMode::kExtract
+ && !realOutStream
+ && !_db->IsItemAnti(_fileIndex)
+ && !fi.IsDir)
+ askMode = NExtract::NAskMode::kSkip;
+ return ExtractCallback->PrepareOperation(askMode);
+}
+
+HRESULT CFolderOutStream::CloseFile_and_SetResult(Int32 res)
+{
+ _stream.Release();
+ _fileIsOpen = false;
+
+ if (!_indexes)
+ _numFiles--;
+ else if (*_indexes == _fileIndex)
{
- if (fileIndex != kNumNoIndex)
+ _indexes++;
+ _numFiles--;
+ }
+
+ _fileIndex++;
+ return ExtractCallback->SetOperationResult(res);
+}
+
+HRESULT CFolderOutStream::CloseFile()
+{
+ const CFileItem &fi = _db->Files[_fileIndex];
+ return CloseFile_and_SetResult((!_calcCrc || fi.Crc == CRC_GET_DIGEST(_crc)) ?
+ NExtract::NOperationResult::kOK :
+ NExtract::NOperationResult::kCRCError);
+}
+
+HRESULT CFolderOutStream::ProcessEmptyFiles()
+{
+ while (_numFiles != 0 && _db->Files[_fileIndex].Size == 0)
+ {
+ RINOK(OpenFile());
+ RINOK(CloseFile());
+ }
+ return S_OK;
+}
+
+STDMETHODIMP CFolderOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
+{
+ if (processedSize)
+ *processedSize = 0;
+
+ while (size != 0)
+ {
+ if (_fileIsOpen)
{
- ExtractStatuses.Reserve(1);
- ExtractStatuses.Add(true);
+ UInt32 cur = (size < _rem ? size : (UInt32)_rem);
+ HRESULT result = S_OK;
+ if (_stream)
+ result = _stream->Write(data, cur, &cur);
+ if (_calcCrc)
+ _crc = CrcUpdate(_crc, data, cur);
+ if (processedSize)
+ *processedSize += cur;
+ data = (const Byte *)data + cur;
+ size -= cur;
+ _rem -= cur;
+ if (_rem == 0)
+ {
+ RINOK(CloseFile());
+ RINOK(ProcessEmptyFiles());
+ }
+ RINOK(result);
+ if (cur == 0)
+ break;
+ continue;
}
- };
-};
+
+ RINOK(ProcessEmptyFiles());
+ if (_numFiles == 0)
+ {
+ // we support partial extracting
+ /*
+ if (processedSize)
+ *processedSize += size;
+ break;
+ */
+ ExtraWriteWasCut = true;
+ // return S_FALSE;
+ return k_My_HRESULT_WritingWasCut;
+ }
+ RINOK(OpenFile());
+ }
+
+ return S_OK;
+}
+
+HRESULT CFolderOutStream::FlushCorrupted(Int32 callbackOperationResult)
+{
+ while (_numFiles != 0)
+ {
+ if (_fileIsOpen)
+ {
+ RINOK(CloseFile_and_SetResult(callbackOperationResult));
+ }
+ else
+ {
+ RINOK(OpenFile(true));
+ }
+ }
+ return S_OK;
+}
STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
Int32 testModeSpec, IArchiveExtractCallback *extractCallbackSpec)
{
COM_TRY_BEGIN
- bool testMode = (testModeSpec != 0);
+
CMyComPtr<IArchiveExtractCallback> extractCallback = extractCallbackSpec;
+
UInt64 importantTotalUnpacked = 0;
- bool allFilesMode = (numItems == (UInt32)-1);
+ // numItems = (UInt32)(Int32)-1;
+
+ bool allFilesMode = (numItems == (UInt32)(Int32)-1);
if (allFilesMode)
- numItems =
- #ifdef _7Z_VOL
- _refs.Size();
- #else
- _db.Files.Size();
- #endif
+ numItems = _db.Files.Size();
- if(numItems == 0)
+ if (numItems == 0)
return S_OK;
- /*
- if(_volumes.Size() != 1)
- return E_FAIL;
- const CVolume &volume = _volumes.Front();
- const CArchiveDatabaseEx &_db = volume.Database;
- IInStream *_inStream = volume.Stream;
- */
-
- CObjectVector<CExtractFolderInfo> extractFolderInfoVector;
- for (UInt32 ii = 0; ii < numItems; ii++)
{
- // UInt32 fileIndex = allFilesMode ? indexIndex : indices[indexIndex];
- UInt32 ref2Index = allFilesMode ? ii : indices[ii];
- // const CRef2 &ref2 = _refs[ref2Index];
-
- // for (UInt32 ri = 0; ri < ref2.Refs.Size(); ri++)
+ CNum prevFolder = kNumNoIndex;
+ UInt32 nextFile = 0;
+
+ UInt32 i;
+
+ for (i = 0; i < numItems; i++)
{
- #ifdef _7Z_VOL
- // const CRef &ref = ref2.Refs[ri];
- const CRef &ref = _refs[ref2Index];
-
- int volumeIndex = ref.VolumeIndex;
- const CVolume &volume = _volumes[volumeIndex];
- const CArchiveDatabaseEx &db = volume.Database;
- UInt32 fileIndex = ref.ItemIndex;
- #else
- const CArchiveDatabaseEx &db = _db;
- UInt32 fileIndex = ref2Index;
- #endif
-
- CNum folderIndex = db.FileIndexToFolderIndexMap[fileIndex];
+ UInt32 fileIndex = allFilesMode ? i : indices[i];
+ CNum folderIndex = _db.FileIndexToFolderIndexMap[fileIndex];
if (folderIndex == kNumNoIndex)
- {
- extractFolderInfoVector.Add(CExtractFolderInfo(
- #ifdef _7Z_VOL
- volumeIndex,
- #endif
- fileIndex, kNumNoIndex));
continue;
- }
- if (extractFolderInfoVector.IsEmpty() ||
- folderIndex != extractFolderInfoVector.Back().FolderIndex
- #ifdef _7Z_VOL
- || volumeIndex != extractFolderInfoVector.Back().VolumeIndex
- #endif
- )
- {
- extractFolderInfoVector.Add(CExtractFolderInfo(
- #ifdef _7Z_VOL
- volumeIndex,
- #endif
- kNumNoIndex, folderIndex));
- const CFolder &folderInfo = db.Folders[folderIndex];
- UInt64 unpackSize = folderInfo.GetUnpackSize();
- importantTotalUnpacked += unpackSize;
- extractFolderInfoVector.Back().UnpackSize = unpackSize;
- }
-
- CExtractFolderInfo &efi = extractFolderInfoVector.Back();
-
- // const CFolderInfo &folderInfo = m_dam_Folders[folderIndex];
- CNum startIndex = db.FolderStartFileIndex[folderIndex];
- for (CNum index = efi.ExtractStatuses.Size();
- index <= fileIndex - startIndex; index++)
- {
- // UInt64 unpackSize = _db.Files[startIndex + index].UnpackSize;
- // Count partial_folder_size
- // efi.UnpackSize += unpackSize;
- // importantTotalUnpacked += unpackSize;
- efi.ExtractStatuses.Add(index == fileIndex - startIndex);
- }
+ if (folderIndex != prevFolder || fileIndex < nextFile)
+ nextFile = _db.FolderStartFileIndex[folderIndex];
+ for (CNum index = nextFile; index <= fileIndex; index++)
+ importantTotalUnpacked += _db.Files[index].Size;
+ nextFile = fileIndex + 1;
+ prevFolder = folderIndex;
}
}
RINOK(extractCallback->SetTotal(importantTotalUnpacked));
+ CLocalProgress *lps = new CLocalProgress;
+ CMyComPtr<ICompressProgressInfo> progress = lps;
+ lps->Init(extractCallback, false);
+
CDecoder decoder(
- #ifdef _ST_MODE
- false
+ #if !defined(USE_MIXER_MT)
+ false
+ #elif !defined(USE_MIXER_ST)
+ true
+ #elif !defined(__7Z_SET_PROPERTIES)
+ #ifdef _7ZIP_ST
+ false
+ #else
+ true
+ #endif
#else
- true
+ _useMultiThreadMixer
#endif
);
- // CDecoder1 decoder;
- UInt64 totalPacked = 0;
- UInt64 totalUnpacked = 0;
UInt64 curPacked, curUnpacked;
- CLocalProgress *lps = new CLocalProgress;
- CMyComPtr<ICompressProgressInfo> progress = lps;
- lps->Init(extractCallback, false);
+ CMyComPtr<IArchiveExtractCallbackMessage> callbackMessage;
+ extractCallback.QueryInterface(IID_IArchiveExtractCallbackMessage, &callbackMessage);
+
+ CFolderOutStream *folderOutStream = new CFolderOutStream;
+ CMyComPtr<ISequentialOutStream> outStream(folderOutStream);
- for (int i = 0;; i++, totalUnpacked += curUnpacked, totalPacked += curPacked)
+ folderOutStream->_db = &_db;
+ folderOutStream->ExtractCallback = extractCallback;
+ folderOutStream->TestMode = (testModeSpec != 0);
+ folderOutStream->CheckCrc = (_crcSize != 0);
+
+ for (UInt32 i = 0;; lps->OutSize += curUnpacked, lps->InSize += curPacked)
{
- lps->OutSize = totalUnpacked;
- lps->InSize = totalPacked;
RINOK(lps->SetCur());
- if (i >= extractFolderInfoVector.Size())
+ if (i >= numItems)
break;
-
- const CExtractFolderInfo &efi = extractFolderInfoVector[i];
- curUnpacked = efi.UnpackSize;
+
+ curUnpacked = 0;
curPacked = 0;
- CFolderOutStream *folderOutStream = new CFolderOutStream;
- CMyComPtr<ISequentialOutStream> outStream(folderOutStream);
+ UInt32 fileIndex = allFilesMode ? i : indices[i];
+ CNum folderIndex = _db.FileIndexToFolderIndexMap[fileIndex];
- #ifdef _7Z_VOL
- const CVolume &volume = _volumes[efi.VolumeIndex];
- const CArchiveDatabaseEx &db = volume.Database;
- #else
- const CArchiveDatabaseEx &db = _db;
- #endif
-
- CNum startIndex;
- if (efi.FileIndex != kNumNoIndex)
- startIndex = efi.FileIndex;
- else
- startIndex = db.FolderStartFileIndex[efi.FolderIndex];
+ UInt32 numSolidFiles = 1;
- HRESULT result = folderOutStream->Init(&db,
- #ifdef _7Z_VOL
- volume.StartRef2Index,
- #else
- 0,
- #endif
- startIndex,
- &efi.ExtractStatuses, extractCallback, testMode, _crcSize != 0);
+ if (folderIndex != kNumNoIndex)
+ {
+ curPacked = _db.GetFolderFullPackSize(folderIndex);
+ UInt32 nextFile = fileIndex + 1;
+ fileIndex = _db.FolderStartFileIndex[folderIndex];
+ UInt32 k;
- RINOK(result);
+ for (k = i + 1; k < numItems; k++)
+ {
+ UInt32 fileIndex2 = allFilesMode ? k : indices[k];
+ if (_db.FileIndexToFolderIndexMap[fileIndex2] != folderIndex
+ || fileIndex2 < nextFile)
+ break;
+ nextFile = fileIndex2 + 1;
+ }
+
+ numSolidFiles = k - i;
+
+ for (k = fileIndex; k < nextFile; k++)
+ curUnpacked += _db.Files[k].Size;
+ }
- if (efi.FileIndex != kNumNoIndex)
- continue;
+ HRESULT result = folderOutStream->Init(fileIndex,
+ allFilesMode ? NULL : indices + i,
+ numSolidFiles);
- CNum folderIndex = efi.FolderIndex;
- const CFolder &folderInfo = db.Folders[folderIndex];
+ i += numSolidFiles;
- curPacked = _db.GetFolderFullPackSize(folderIndex);
+ RINOK(result);
- CNum packStreamIndex = db.FolderStartPackStreamIndex[folderIndex];
- UInt64 folderStartPackPos = db.GetFolderStreamPos(folderIndex, 0);
+ // to test solid block with zero unpacked size we disable that code
+ if (folderOutStream->WasWritingFinished())
+ continue;
#ifndef _NO_CRYPTO
CMyComPtr<ICryptoGetTextPassword> getTextPassword;
@@ -216,54 +340,66 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
try
{
#ifndef _NO_CRYPTO
- bool passwordIsDefined;
+ bool isEncrypted = false;
+ bool passwordIsDefined = false;
+ UString password;
#endif
+
HRESULT result = decoder.Decode(
EXTERNAL_CODECS_VARS
- #ifdef _7Z_VOL
- volume.Stream,
- #else
_inStream,
- #endif
- folderStartPackPos,
- &db.PackSizes[packStreamIndex],
- folderInfo,
+ _db.ArcInfo.DataStartPosition,
+ _db, folderIndex,
+ &curUnpacked,
+
outStream,
- progress
- #ifndef _NO_CRYPTO
- , getTextPassword, passwordIsDefined
- #endif
+ progress,
+ NULL // *inStreamMainRes
+
+ _7Z_DECODER_CRYPRO_VARS
#if !defined(_7ZIP_ST) && !defined(_SFX)
- , true, _numThreads
+ , true, _numThreads
#endif
);
- if (result == S_FALSE)
- {
- RINOK(folderOutStream->FlushCorrupted(NExtract::NOperationResult::kDataError));
- continue;
- }
- if (result == E_NOTIMPL)
+ if (result == S_FALSE || result == E_NOTIMPL)
{
- RINOK(folderOutStream->FlushCorrupted(NExtract::NOperationResult::kUnSupportedMethod));
+ bool wasFinished = folderOutStream->WasWritingFinished();
+
+ int resOp = (result == S_FALSE ?
+ NExtract::NOperationResult::kDataError :
+ NExtract::NOperationResult::kUnsupportedMethod);
+
+ RINOK(folderOutStream->FlushCorrupted(resOp));
+
+ if (wasFinished)
+ {
+ // we don't show error, if it's after required files
+ if (/* !folderOutStream->ExtraWriteWasCut && */ callbackMessage)
+ {
+ RINOK(callbackMessage->ReportExtractResult(NEventIndexType::kBlockIndex, folderIndex, resOp));
+ }
+ }
continue;
}
+
if (result != S_OK)
return result;
- if (folderOutStream->WasWritingFinished() != S_OK)
- {
- RINOK(folderOutStream->FlushCorrupted(NExtract::NOperationResult::kDataError));
- continue;
- }
+
+ RINOK(folderOutStream->FlushCorrupted(NExtract::NOperationResult::kDataError));
+ continue;
}
catch(...)
{
RINOK(folderOutStream->FlushCorrupted(NExtract::NOperationResult::kDataError));
- continue;
+ // continue;
+ return E_FAIL;
}
}
+
return S_OK;
+
COM_TRY_END
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp
index edd276bc116..14cdc436452 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp
@@ -7,96 +7,103 @@
namespace NArchive {
namespace N7z {
-CFolderInStream::CFolderInStream()
-{
- _inStreamWithHashSpec = new CSequentialInStreamWithCRC;
- _inStreamWithHash = _inStreamWithHashSpec;
-}
-
void CFolderInStream::Init(IArchiveUpdateCallback *updateCallback,
- const UInt32 *fileIndices, UInt32 numFiles)
+ const UInt32 *indexes, unsigned numFiles)
{
_updateCallback = updateCallback;
+ _indexes = indexes;
_numFiles = numFiles;
- _fileIndex = 0;
- _fileIndices = fileIndices;
- Processed.Clear();
- CRCs.Clear();
- Sizes.Clear();
- _fileIsOpen = false;
- _currentSizeIsDefined = false;
+ _index = 0;
+
+ Processed.ClearAndReserve(numFiles);
+ CRCs.ClearAndReserve(numFiles);
+ Sizes.ClearAndReserve(numFiles);
+
+ _pos = 0;
+ _crc = CRC_INIT_VAL;
+ _size_Defined = false;
+ _size = 0;
+
+ _stream.Release();
}
HRESULT CFolderInStream::OpenStream()
{
- _filePos = 0;
- while (_fileIndex < _numFiles)
+ _pos = 0;
+ _crc = CRC_INIT_VAL;
+ _size_Defined = false;
+ _size = 0;
+
+ while (_index < _numFiles)
{
CMyComPtr<ISequentialInStream> stream;
- HRESULT result = _updateCallback->GetStream(_fileIndices[_fileIndex], &stream);
- if (result != S_OK && result != S_FALSE)
- return result;
- _fileIndex++;
- _inStreamWithHashSpec->SetStream(stream);
- _inStreamWithHashSpec->Init();
+ HRESULT result = _updateCallback->GetStream(_indexes[_index], &stream);
+ if (result != S_OK)
+ {
+ if (result != S_FALSE)
+ return result;
+ }
+
+ _stream = stream;
+
if (stream)
{
- _fileIsOpen = true;
CMyComPtr<IStreamGetSize> streamGetSize;
stream.QueryInterface(IID_IStreamGetSize, &streamGetSize);
if (streamGetSize)
{
- RINOK(streamGetSize->GetSize(&_currentSize));
- _currentSizeIsDefined = true;
+ if (streamGetSize->GetSize(&_size) == S_OK)
+ _size_Defined = true;
}
return S_OK;
}
+
+ _index++;
RINOK(_updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK));
- Sizes.Add(0);
- Processed.Add(result == S_OK);
- AddDigest();
+ AddFileInfo(result == S_OK);
}
return S_OK;
}
-void CFolderInStream::AddDigest()
+void CFolderInStream::AddFileInfo(bool isProcessed)
{
- CRCs.Add(_inStreamWithHashSpec->GetCRC());
-}
-
-HRESULT CFolderInStream::CloseStream()
-{
- RINOK(_updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK));
- _inStreamWithHashSpec->ReleaseStream();
- _fileIsOpen = false;
- _currentSizeIsDefined = false;
- Processed.Add(true);
- Sizes.Add(_filePos);
- AddDigest();
- return S_OK;
+ Processed.Add(isProcessed);
+ Sizes.Add(_pos);
+ CRCs.Add(CRC_GET_DIGEST(_crc));
}
STDMETHODIMP CFolderInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
{
- if (processedSize != 0)
+ if (processedSize)
*processedSize = 0;
- while (size > 0)
+ while (size != 0)
{
- if (_fileIsOpen)
+ if (_stream)
{
UInt32 processed2;
- RINOK(_inStreamWithHash->Read(data, size, &processed2));
- if (processed2 == 0)
+ RINOK(_stream->Read(data, size, &processed2));
+ if (processed2 != 0)
{
- RINOK(CloseStream());
- continue;
+ _crc = CrcUpdate(_crc, data, processed2);
+ _pos += processed2;
+ if (processedSize)
+ *processedSize = processed2;
+ return S_OK;
}
- if (processedSize != 0)
- *processedSize = processed2;
- _filePos += processed2;
- break;
+
+ _stream.Release();
+ _index++;
+ AddFileInfo(true);
+
+ _pos = 0;
+ _crc = CRC_INIT_VAL;
+ _size_Defined = false;
+ _size = 0;
+
+ RINOK(_updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK));
}
- if (_fileIndex >= _numFiles)
+
+ if (_index >= _numFiles)
break;
RINOK(OpenStream());
}
@@ -106,17 +113,23 @@ STDMETHODIMP CFolderInStream::Read(void *data, UInt32 size, UInt32 *processedSiz
STDMETHODIMP CFolderInStream::GetSubStreamSize(UInt64 subStream, UInt64 *value)
{
*value = 0;
- int index2 = (int)subStream;
- if (index2 < 0 || subStream > Sizes.Size())
- return E_FAIL;
- if (index2 < Sizes.Size())
+ if (subStream > Sizes.Size())
+ return S_FALSE; // E_FAIL;
+
+ unsigned index = (unsigned)subStream;
+ if (index < Sizes.Size())
{
- *value = Sizes[index2];
+ *value = Sizes[index];
return S_OK;
}
- if (!_currentSizeIsDefined)
+
+ if (!_size_Defined)
+ {
+ *value = _pos;
return S_FALSE;
- *value = _currentSize;
+ }
+
+ *value = (_pos > _size ? _pos : _size);
return S_OK;
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h
index 6df3672a1ca..805db54e9d3 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h
@@ -3,11 +3,13 @@
#ifndef __7Z_FOLDER_IN_STREAM_H
#define __7Z_FOLDER_IN_STREAM_H
+#include "../../../../C/7zCrc.h"
+
+#include "../../../Common/MyCom.h"
+#include "../../../Common/MyVector.h"
+
#include "../../ICoder.h"
#include "../IArchive.h"
-#include "../Common/InStreamWithCRC.h"
-
-#include "7zItem.h"
namespace NArchive {
namespace N7z {
@@ -17,37 +19,38 @@ class CFolderInStream:
public ICompressGetSubStreamSize,
public CMyUnknownImp
{
- CSequentialInStreamWithCRC *_inStreamWithHashSpec;
- CMyComPtr<ISequentialInStream> _inStreamWithHash;
- CMyComPtr<IArchiveUpdateCallback> _updateCallback;
+ CMyComPtr<ISequentialInStream> _stream;
+ UInt64 _pos;
+ UInt32 _crc;
+ bool _size_Defined;
+ UInt64 _size;
- bool _currentSizeIsDefined;
- bool _fileIsOpen;
- UInt64 _currentSize;
- UInt64 _filePos;
- const UInt32 *_fileIndices;
- UInt32 _numFiles;
- UInt32 _fileIndex;
+ const UInt32 *_indexes;
+ unsigned _numFiles;
+ unsigned _index;
+
+ CMyComPtr<IArchiveUpdateCallback> _updateCallback;
HRESULT OpenStream();
- HRESULT CloseStream();
- void AddDigest();
+ void AddFileInfo(bool isProcessed);
public:
CRecordVector<bool> Processed;
CRecordVector<UInt32> CRCs;
CRecordVector<UInt64> Sizes;
- MY_UNKNOWN_IMP1(ICompressGetSubStreamSize)
+ MY_UNKNOWN_IMP2(ISequentialInStream, ICompressGetSubStreamSize)
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value);
- CFolderInStream();
- void Init(IArchiveUpdateCallback *updateCallback, const UInt32 *fileIndices, UInt32 numFiles);
+ void Init(IArchiveUpdateCallback *updateCallback, const UInt32 *indexes, unsigned numFiles);
+
+ bool WasFinished() const { return _index == _numFiles; }
+
UInt64 GetFullSize() const
{
UInt64 size = 0;
- for (int i = 0; i < Sizes.Size(); i++)
+ FOR_VECTOR (i, Sizes)
size += Sizes[i];
return size;
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderOutStream.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderOutStream.cpp
deleted file mode 100644
index 22c4600ecf4..00000000000
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderOutStream.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// 7zFolderOutStream.cpp
-
-#include "StdAfx.h"
-
-#include "7zFolderOutStream.h"
-
-namespace NArchive {
-namespace N7z {
-
-CFolderOutStream::CFolderOutStream()
-{
- _crcStreamSpec = new COutStreamWithCRC;
- _crcStream = _crcStreamSpec;
-}
-
-HRESULT CFolderOutStream::Init(
- const CArchiveDatabaseEx *db,
- UInt32 ref2Offset, UInt32 startIndex,
- const CBoolVector *extractStatuses,
- IArchiveExtractCallback *extractCallback,
- bool testMode, bool checkCrc)
-{
- _db = db;
- _ref2Offset = ref2Offset;
- _startIndex = startIndex;
-
- _extractStatuses = extractStatuses;
- _extractCallback = extractCallback;
- _testMode = testMode;
- _checkCrc = checkCrc;
-
- _currentIndex = 0;
- _fileIsOpen = false;
- return ProcessEmptyFiles();
-}
-
-HRESULT CFolderOutStream::OpenFile()
-{
- Int32 askMode = ((*_extractStatuses)[_currentIndex]) ? (_testMode ?
- NExtract::NAskMode::kTest :
- NExtract::NAskMode::kExtract) :
- NExtract::NAskMode::kSkip;
- CMyComPtr<ISequentialOutStream> realOutStream;
- UInt32 index = _startIndex + _currentIndex;
- RINOK(_extractCallback->GetStream(_ref2Offset + index, &realOutStream, askMode));
- _crcStreamSpec->SetStream(realOutStream);
- _crcStreamSpec->Init(_checkCrc);
- _fileIsOpen = true;
- const CFileItem &fi = _db->Files[index];
- _rem = fi.Size;
- if (askMode == NExtract::NAskMode::kExtract && !realOutStream &&
- !_db->IsItemAnti(index) && !fi.IsDir)
- askMode = NExtract::NAskMode::kSkip;
- return _extractCallback->PrepareOperation(askMode);
-}
-
-HRESULT CFolderOutStream::CloseFileAndSetResult(Int32 res)
-{
- _crcStreamSpec->ReleaseStream();
- _fileIsOpen = false;
- _currentIndex++;
- return _extractCallback->SetOperationResult(res);
-}
-
-HRESULT CFolderOutStream::CloseFileAndSetResult()
-{
- const CFileItem &fi = _db->Files[_startIndex + _currentIndex];
- return CloseFileAndSetResult(
- (fi.IsDir || !fi.CrcDefined || !_checkCrc || fi.Crc == _crcStreamSpec->GetCRC()) ?
- NExtract::NOperationResult::kOK :
- NExtract::NOperationResult::kCRCError);
-}
-
-HRESULT CFolderOutStream::ProcessEmptyFiles()
-{
- while (_currentIndex < _extractStatuses->Size() && _db->Files[_startIndex + _currentIndex].Size == 0)
- {
- RINOK(OpenFile());
- RINOK(CloseFileAndSetResult());
- }
- return S_OK;
-}
-
-STDMETHODIMP CFolderOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
-{
- if (processedSize != NULL)
- *processedSize = 0;
- while (size != 0)
- {
- if (_fileIsOpen)
- {
- UInt32 cur = size < _rem ? size : (UInt32)_rem;
- RINOK(_crcStream->Write(data, cur, &cur));
- if (cur == 0)
- break;
- data = (const Byte *)data + cur;
- size -= cur;
- _rem -= cur;
- if (processedSize != NULL)
- *processedSize += cur;
- if (_rem == 0)
- {
- RINOK(CloseFileAndSetResult());
- RINOK(ProcessEmptyFiles());
- continue;
- }
- }
- else
- {
- RINOK(ProcessEmptyFiles());
- if (_currentIndex == _extractStatuses->Size())
- {
- // we support partial extracting
- if (processedSize != NULL)
- *processedSize += size;
- break;
- }
- RINOK(OpenFile());
- }
- }
- return S_OK;
-}
-
-STDMETHODIMP CFolderOutStream::GetSubStreamSize(UInt64 subStream, UInt64 *value)
-{
- *value = 0;
- if ((int)subStream >= _extractStatuses->Size())
- return S_FALSE;
- *value = _db->Files[_startIndex + (int)subStream].Size;
- return S_OK;
-}
-
-HRESULT CFolderOutStream::FlushCorrupted(Int32 resultEOperationResult)
-{
- while (_currentIndex < _extractStatuses->Size())
- {
- if (_fileIsOpen)
- {
- RINOK(CloseFileAndSetResult(resultEOperationResult));
- }
- else
- {
- RINOK(OpenFile());
- }
- }
- return S_OK;
-}
-
-}}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderOutStream.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderOutStream.h
deleted file mode 100644
index f9bb1af4273..00000000000
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderOutStream.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// 7zFolderOutStream.h
-
-#ifndef __7Z_FOLDER_OUT_STREAM_H
-#define __7Z_FOLDER_OUT_STREAM_H
-
-#include "../../IStream.h"
-#include "../IArchive.h"
-#include "../Common/OutStreamWithCRC.h"
-
-#include "7zIn.h"
-
-namespace NArchive {
-namespace N7z {
-
-class CFolderOutStream:
- public ISequentialOutStream,
- public ICompressGetSubStreamSize,
- public CMyUnknownImp
-{
- COutStreamWithCRC *_crcStreamSpec;
- CMyComPtr<ISequentialOutStream> _crcStream;
- const CArchiveDatabaseEx *_db;
- const CBoolVector *_extractStatuses;
- CMyComPtr<IArchiveExtractCallback> _extractCallback;
- UInt32 _ref2Offset;
- UInt32 _startIndex;
- int _currentIndex;
- bool _testMode;
- bool _checkCrc;
- bool _fileIsOpen;
- UInt64 _rem;
-
- HRESULT OpenFile();
- HRESULT CloseFileAndSetResult(Int32 res);
- HRESULT CloseFileAndSetResult();
- HRESULT ProcessEmptyFiles();
-public:
- MY_UNKNOWN_IMP1(ICompressGetSubStreamSize)
-
- CFolderOutStream();
-
- STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
- STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value);
-
- HRESULT Init(
- const CArchiveDatabaseEx *db,
- UInt32 ref2Offset, UInt32 startIndex,
- const CBoolVector *extractStatuses,
- IArchiveExtractCallback *extractCallback,
- bool testMode, bool checkCrc);
- HRESULT FlushCorrupted(Int32 resultEOperationResult);
- HRESULT WasWritingFinished() const
- { return (_currentIndex == _extractStatuses->Size()) ? S_OK: E_FAIL; }
-};
-
-}}
-
-#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandler.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandler.cpp
index 93d4f51ee98..a95fc6a0752 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandler.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandler.cpp
@@ -23,6 +23,7 @@
#endif
using namespace NWindows;
+using namespace NCOM;
namespace NArchive {
namespace N7z {
@@ -30,14 +31,19 @@ namespace N7z {
CHandler::CHandler()
{
#ifndef _NO_CRYPTO
+ _isEncrypted = false;
_passwordIsDefined = false;
#endif
#ifdef EXTRACT_ONLY
+
_crcSize = 4;
+
#ifdef __7Z_SET_PROPERTIES
_numThreads = NSystem::GetNumberOfProcessors();
+ _useMultiThreadMixer = true;
#endif
+
#endif
}
@@ -49,11 +55,12 @@ STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems)
#ifdef _SFX
-IMP_IInArchive_ArcProps_NO
+IMP_IInArchive_ArcProps_NO_Table
-STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 * /* numProperties */)
+STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 *numProps)
{
- return E_NOTIMPL;
+ *numProps = 0;
+ return S_OK;
}
STDMETHODIMP CHandler::GetPropertyInfo(UInt32 /* index */,
@@ -62,156 +69,468 @@ STDMETHODIMP CHandler::GetPropertyInfo(UInt32 /* index */,
return E_NOTIMPL;
}
-
#else
-static const STATPROPSTG kArcProps[] =
+static const Byte kArcProps[] =
{
- { NULL, kpidMethod, VT_BSTR},
- { NULL, kpidSolid, VT_BOOL},
- { NULL, kpidNumBlocks, VT_UI4},
- { NULL, kpidPhySize, VT_UI8},
- { NULL, kpidHeadersSize, VT_UI8},
- { NULL, kpidOffset, VT_UI8}
+ kpidHeadersSize,
+ kpidMethod,
+ kpidSolid,
+ kpidNumBlocks
+ // , kpidIsTree
};
-static inline wchar_t GetHex(Byte value)
+IMP_IInArchive_ArcProps
+
+static inline char GetHex(unsigned value)
{
- return (wchar_t)((value < 10) ? ('0' + value) : ('A' + (value - 10)));
+ return (char)((value < 10) ? ('0' + value) : ('A' + (value - 10)));
}
-static UString ConvertMethodIdToString(UInt64 id)
+static unsigned ConvertMethodIdToString_Back(char *s, UInt64 id)
{
- wchar_t s[32];
- int len = 32;
- s[--len] = 0;
+ int len = 0;
do
{
- s[--len] = GetHex((Byte)id & 0xF); id >>= 4;
- s[--len] = GetHex((Byte)id & 0xF); id >>= 4;
+ s[--len] = GetHex((unsigned)id & 0xF); id >>= 4;
+ s[--len] = GetHex((unsigned)id & 0xF); id >>= 4;
}
while (id != 0);
- return s + len;
+ return (unsigned)-len;
+}
+
+static void ConvertMethodIdToString(AString &res, UInt64 id)
+{
+ const unsigned kLen = 32;
+ char s[kLen];
+ unsigned len = kLen - 1;
+ s[len] = 0;
+ res += s + len - ConvertMethodIdToString_Back(s + len, id);
+}
+
+static unsigned GetStringForSizeValue(char *s, UInt32 val)
+{
+ unsigned i;
+ for (i = 0; i <= 31; i++)
+ if (((UInt32)1 << i) == val)
+ {
+ if (i < 10)
+ {
+ s[0] = (char)('0' + i);
+ s[1] = 0;
+ return 1;
+ }
+ if (i < 20) { s[0] = '1'; s[1] = (char)('0' + i - 10); }
+ else if (i < 30) { s[0] = '2'; s[1] = (char)('0' + i - 20); }
+ else { s[0] = '3'; s[1] = (char)('0' + i - 30); }
+ s[2] = 0;
+ return 2;
+ }
+ char c = 'b';
+ if ((val & ((1 << 20) - 1)) == 0) { val >>= 20; c = 'm'; }
+ else if ((val & ((1 << 10) - 1)) == 0) { val >>= 10; c = 'k'; }
+ ::ConvertUInt32ToString(val, s);
+ unsigned pos = MyStringLen(s);
+ s[pos++] = c;
+ s[pos] = 0;
+ return pos;
+}
+
+/*
+static inline void AddHexToString(UString &res, Byte value)
+{
+ res += GetHex((Byte)(value >> 4));
+ res += GetHex((Byte)(value & 0xF));
+}
+*/
+
+static char *AddProp32(char *s, const char *name, UInt32 v)
+{
+ *s++ = ':';
+ s = MyStpCpy(s, name);
+ ::ConvertUInt32ToString(v, s);
+ return s + MyStringLen(s);
}
+
+void CHandler::AddMethodName(AString &s, UInt64 id)
+{
+ AString name;
+ FindMethod(EXTERNAL_CODECS_VARS id, name);
+ if (name.IsEmpty())
+ ConvertMethodIdToString(s, id);
+ else
+ s += name;
+}
+
+#endif
STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)
{
+ #ifndef _SFX
COM_TRY_BEGIN
+ #endif
NCOM::CPropVariant prop;
- switch(propID)
+ switch (propID)
{
+ #ifndef _SFX
case kpidMethod:
{
- UString resString;
- CRecordVector<UInt64> ids;
- int i;
- for (i = 0; i < _db.Folders.Size(); i++)
- {
- const CFolder &f = _db.Folders[i];
- for (int j = f.Coders.Size() - 1; j >= 0; j--)
- ids.AddToUniqueSorted(f.Coders[j].MethodID);
- }
-
- for (i = 0; i < ids.Size(); i++)
+ AString s;
+ const CParsedMethods &pm = _db.ParsedMethods;
+ FOR_VECTOR (i, pm.IDs)
{
- UInt64 id = ids[i];
- UString methodName;
- /* bool methodIsKnown = */ FindMethod(EXTERNAL_CODECS_VARS id, methodName);
- if (methodName.IsEmpty())
- methodName = ConvertMethodIdToString(id);
- if (!resString.IsEmpty())
- resString += L' ';
- resString += methodName;
+ UInt64 id = pm.IDs[i];
+ s.Add_Space_if_NotEmpty();
+ char temp[16];
+ if (id == k_LZMA2)
+ {
+ s += "LZMA2:";
+ if ((pm.Lzma2Prop & 1) == 0)
+ ConvertUInt32ToString((pm.Lzma2Prop >> 1) + 12, temp);
+ else
+ GetStringForSizeValue(temp, 3 << ((pm.Lzma2Prop >> 1) + 11));
+ s += temp;
+ }
+ else if (id == k_LZMA)
+ {
+ s += "LZMA:";
+ GetStringForSizeValue(temp, pm.LzmaDic);
+ s += temp;
+ }
+ else
+ AddMethodName(s, id);
}
- prop = resString;
+ prop = s;
break;
}
case kpidSolid: prop = _db.IsSolid(); break;
- case kpidNumBlocks: prop = (UInt32)_db.Folders.Size(); break;
+ case kpidNumBlocks: prop = (UInt32)_db.NumFolders; break;
case kpidHeadersSize: prop = _db.HeadersSize; break;
case kpidPhySize: prop = _db.PhySize; break;
- case kpidOffset: if (_db.ArchiveInfo.StartPosition != 0) prop = _db.ArchiveInfo.StartPosition; break;
+ case kpidOffset: if (_db.ArcInfo.StartPosition != 0) prop = _db.ArcInfo.StartPosition; break;
+ /*
+ case kpidIsTree: if (_db.IsTree) prop = true; break;
+ case kpidIsAltStream: if (_db.ThereAreAltStreams) prop = true; break;
+ case kpidIsAux: if (_db.IsTree) prop = true; break;
+ */
+ // case kpidError: if (_db.ThereIsHeaderError) prop = "Header error"; break;
+ #endif
+
+ case kpidWarningFlags:
+ {
+ UInt32 v = 0;
+ if (_db.StartHeaderWasRecovered) v |= kpv_ErrorFlags_HeadersError;
+ if (_db.UnsupportedFeatureWarning) v |= kpv_ErrorFlags_UnsupportedFeature;
+ if (v != 0)
+ prop = v;
+ break;
+ }
+
+ case kpidErrorFlags:
+ {
+ UInt32 v = 0;
+ if (!_db.IsArc) v |= kpv_ErrorFlags_IsNotArc;
+ if (_db.ThereIsHeaderError) v |= kpv_ErrorFlags_HeadersError;
+ if (_db.UnexpectedEnd) v |= kpv_ErrorFlags_UnexpectedEnd;
+ // if (_db.UnsupportedVersion) v |= kpv_ErrorFlags_Unsupported;
+ if (_db.UnsupportedFeatureError) v |= kpv_ErrorFlags_UnsupportedFeature;
+ prop = v;
+ break;
+ }
}
prop.Detach(value);
return S_OK;
+ #ifndef _SFX
COM_TRY_END
+ #endif
}
-IMP_IInArchive_ArcProps
-
-#endif
-
-static void SetPropFromUInt64Def(CUInt64DefVector &v, int index, NCOM::CPropVariant &prop)
+static void SetFileTimeProp_From_UInt64Def(PROPVARIANT *prop, const CUInt64DefVector &v, int index)
{
UInt64 value;
if (v.GetItem(index, value))
+ PropVarEm_Set_FileTime64(prop, value);
+}
+
+bool CHandler::IsFolderEncrypted(CNum folderIndex) const
+{
+ if (folderIndex == kNumNoIndex)
+ return false;
+ size_t startPos = _db.FoCodersDataOffset[folderIndex];
+ const Byte *p = _db.CodersData + startPos;
+ size_t size = _db.FoCodersDataOffset[folderIndex + 1] - startPos;
+ CInByte2 inByte;
+ inByte.Init(p, size);
+
+ CNum numCoders = inByte.ReadNum();
+ for (; numCoders != 0; numCoders--)
{
- FILETIME ft;
- ft.dwLowDateTime = (DWORD)value;
- ft.dwHighDateTime = (DWORD)(value >> 32);
- prop = ft;
+ Byte mainByte = inByte.ReadByte();
+ unsigned idSize = (mainByte & 0xF);
+ const Byte *longID = inByte.GetPtr();
+ UInt64 id64 = 0;
+ for (unsigned j = 0; j < idSize; j++)
+ id64 = ((id64 << 8) | longID[j]);
+ inByte.SkipDataNoCheck(idSize);
+ if (id64 == k_AES)
+ return true;
+ if ((mainByte & 0x20) != 0)
+ inByte.SkipDataNoCheck(inByte.ReadNum());
}
+ return false;
}
-#ifndef _SFX
+STDMETHODIMP CHandler::GetNumRawProps(UInt32 *numProps)
+{
+ *numProps = 0;
+ return S_OK;
+}
-static UString ConvertUInt32ToString(UInt32 value)
+STDMETHODIMP CHandler::GetRawPropInfo(UInt32 /* index */, BSTR *name, PROPID *propID)
{
- wchar_t buffer[32];
- ConvertUInt64ToString(value, buffer);
- return buffer;
+ *name = NULL;
+ *propID = kpidNtSecure;
+ return S_OK;
}
-static UString GetStringForSizeValue(UInt32 value)
+STDMETHODIMP CHandler::GetParent(UInt32 /* index */, UInt32 *parent, UInt32 *parentType)
{
- for (int i = 31; i >= 0; i--)
- if ((UInt32(1) << i) == value)
- return ConvertUInt32ToString(i);
- UString result;
- if (value % (1 << 20) == 0)
- {
- result += ConvertUInt32ToString(value >> 20);
- result += L"m";
- }
- else if (value % (1 << 10) == 0)
+ /*
+ const CFileItem &file = _db.Files[index];
+ *parentType = (file.IsAltStream ? NParentType::kAltStream : NParentType::kDir);
+ *parent = (UInt32)(Int32)file.Parent;
+ */
+ *parentType = NParentType::kDir;
+ *parent = (UInt32)(Int32)-1;
+ return S_OK;
+}
+
+STDMETHODIMP CHandler::GetRawProp(UInt32 index, PROPID propID, const void **data, UInt32 *dataSize, UInt32 *propType)
+{
+ *data = NULL;
+ *dataSize = 0;
+ *propType = 0;
+
+ if (/* _db.IsTree && propID == kpidName ||
+ !_db.IsTree && */ propID == kpidPath)
{
- result += ConvertUInt32ToString(value >> 10);
- result += L"k";
+ if (_db.NameOffsets && _db.NamesBuf)
+ {
+ size_t offset = _db.NameOffsets[index];
+ size_t size = (_db.NameOffsets[index + 1] - offset) * 2;
+ if (size < ((UInt32)1 << 31))
+ {
+ *data = (const void *)(_db.NamesBuf + offset * 2);
+ *dataSize = (UInt32)size;
+ *propType = NPropDataType::kUtf16z;
+ }
+ }
+ return S_OK;
}
- else
+ /*
+ if (propID == kpidNtSecure)
{
- result += ConvertUInt32ToString(value);
- result += L"b";
+ if (index < (UInt32)_db.SecureIDs.Size())
+ {
+ int id = _db.SecureIDs[index];
+ size_t offs = _db.SecureOffsets[id];
+ size_t size = _db.SecureOffsets[id + 1] - offs;
+ if (size >= 0)
+ {
+ *data = _db.SecureBuf + offs;
+ *dataSize = (UInt32)size;
+ *propType = NPropDataType::kRaw;
+ }
+ }
}
- return result;
+ */
+ return S_OK;
}
-static inline void AddHexToString(UString &res, Byte value)
-{
- res += GetHex((Byte)(value >> 4));
- res += GetHex((Byte)(value & 0xF));
-}
+#ifndef _SFX
-static void AddProp32(UString &s, const wchar_t *name, UInt32 v)
+HRESULT CHandler::SetMethodToProp(CNum folderIndex, PROPVARIANT *prop) const
{
- s += name;
- s += ConvertUInt32ToString(v);
-}
+ PropVariant_Clear(prop);
+ if (folderIndex == kNumNoIndex)
+ return S_OK;
+ // for (int ttt = 0; ttt < 1; ttt++) {
+ const unsigned kTempSize = 256;
+ char temp[kTempSize];
+ unsigned pos = kTempSize;
+ temp[--pos] = 0;
-#endif
-
-bool CHandler::IsEncrypted(UInt32 index2) const
-{
- CNum folderIndex = _db.FileIndexToFolderIndexMap[index2];
- if (folderIndex != kNumNoIndex)
- return _db.Folders[folderIndex].IsEncrypted();
- return false;
+ size_t startPos = _db.FoCodersDataOffset[folderIndex];
+ const Byte *p = _db.CodersData + startPos;
+ size_t size = _db.FoCodersDataOffset[folderIndex + 1] - startPos;
+ CInByte2 inByte;
+ inByte.Init(p, size);
+
+ // numCoders == 0 ???
+ CNum numCoders = inByte.ReadNum();
+ bool needSpace = false;
+
+ for (; numCoders != 0; numCoders--, needSpace = true)
+ {
+ if (pos < 32) // max size of property
+ break;
+ Byte mainByte = inByte.ReadByte();
+ unsigned idSize = (mainByte & 0xF);
+ const Byte *longID = inByte.GetPtr();
+ UInt64 id64 = 0;
+ for (unsigned j = 0; j < idSize; j++)
+ id64 = ((id64 << 8) | longID[j]);
+ inByte.SkipDataNoCheck(idSize);
+
+ if ((mainByte & 0x10) != 0)
+ {
+ inByte.ReadNum(); // NumInStreams
+ inByte.ReadNum(); // NumOutStreams
+ }
+
+ CNum propsSize = 0;
+ const Byte *props = NULL;
+ if ((mainByte & 0x20) != 0)
+ {
+ propsSize = inByte.ReadNum();
+ props = inByte.GetPtr();
+ inByte.SkipDataNoCheck(propsSize);
+ }
+
+ const char *name = NULL;
+ char s[32];
+ s[0] = 0;
+
+ if (id64 <= (UInt32)0xFFFFFFFF)
+ {
+ UInt32 id = (UInt32)id64;
+ if (id == k_LZMA)
+ {
+ name = "LZMA";
+ if (propsSize == 5)
+ {
+ UInt32 dicSize = GetUi32((const Byte *)props + 1);
+ char *dest = s + GetStringForSizeValue(s, dicSize);
+ UInt32 d = props[0];
+ if (d != 0x5D)
+ {
+ UInt32 lc = d % 9;
+ d /= 9;
+ UInt32 pb = d / 5;
+ UInt32 lp = d % 5;
+ if (lc != 3) dest = AddProp32(dest, "lc", lc);
+ if (lp != 0) dest = AddProp32(dest, "lp", lp);
+ if (pb != 2) dest = AddProp32(dest, "pb", pb);
+ }
+ }
+ }
+ else if (id == k_LZMA2)
+ {
+ name = "LZMA2";
+ if (propsSize == 1)
+ {
+ Byte p = props[0];
+ if ((p & 1) == 0)
+ ConvertUInt32ToString((UInt32)((p >> 1) + 12), s);
+ else
+ GetStringForSizeValue(s, 3 << ((p >> 1) + 11));
+ }
+ }
+ else if (id == k_PPMD)
+ {
+ name = "PPMD";
+ if (propsSize == 5)
+ {
+ Byte order = *props;
+ char *dest = s;
+ *dest++ = 'o';
+ ConvertUInt32ToString(order, dest);
+ dest += MyStringLen(dest);
+ dest = MyStpCpy(dest, ":mem");
+ GetStringForSizeValue(dest, GetUi32(props + 1));
+ }
+ }
+ else if (id == k_Delta)
+ {
+ name = "Delta";
+ if (propsSize == 1)
+ ConvertUInt32ToString((UInt32)props[0] + 1, s);
+ }
+ else if (id == k_BCJ2) name = "BCJ2";
+ else if (id == k_BCJ) name = "BCJ";
+ else if (id == k_AES)
+ {
+ name = "7zAES";
+ if (propsSize >= 1)
+ {
+ Byte firstByte = props[0];
+ UInt32 numCyclesPower = firstByte & 0x3F;
+ ConvertUInt32ToString(numCyclesPower, s);
+ }
+ }
+ }
+
+ if (name)
+ {
+ unsigned nameLen = MyStringLen(name);
+ unsigned propsLen = MyStringLen(s);
+ unsigned totalLen = nameLen + propsLen;
+ if (propsLen != 0)
+ totalLen++;
+ if (needSpace)
+ totalLen++;
+ if (totalLen + 5 >= pos)
+ break;
+ pos -= totalLen;
+ MyStringCopy(temp + pos, name);
+ if (propsLen != 0)
+ {
+ char *dest = temp + pos + nameLen;
+ *dest++ = ':';
+ MyStringCopy(dest, s);
+ }
+ if (needSpace)
+ temp[pos + totalLen - 1] = ' ';
+ }
+ else
+ {
+ AString methodName;
+ FindMethod(EXTERNAL_CODECS_VARS id64, methodName);
+ if (needSpace)
+ temp[--pos] = ' ';
+ if (methodName.IsEmpty())
+ pos -= ConvertMethodIdToString_Back(temp + pos, id64);
+ else
+ {
+ unsigned len = methodName.Len();
+ if (len + 5 > pos)
+ break;
+ pos -= len;
+ for (unsigned i = 0; i < len; i++)
+ temp[pos + i] = methodName[i];
+ }
+ }
+ }
+
+ if (numCoders != 0 && pos >= 4)
+ {
+ temp[--pos] = ' ';
+ temp[--pos] = '.';
+ temp[--pos] = '.';
+ temp[--pos] = '.';
+ }
+
+ return PropVarEm_Set_Str(prop, temp + pos);
+ // }
}
-STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value)
+#endif
+
+STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value)
{
- COM_TRY_BEGIN
- NCOM::CPropVariant prop;
+ PropVariant_Clear(value);
+ // COM_TRY_BEGIN
+ // NCOM::CPropVariant prop;
/*
const CRef2 &ref2 = _refs[index];
@@ -223,16 +542,12 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *va
const CFileItem &item = _db.Files[index];
UInt32 index2 = index;
- switch(propID)
+ switch (propID)
{
- case kpidPath:
- if (!item.Name.IsEmpty())
- prop = NItemName::GetOSName(item.Name);
- break;
- case kpidIsDir: prop = item.IsDir; break;
+ case kpidIsDir: PropVarEm_Set_Bool(value, item.IsDir); break;
case kpidSize:
{
- prop = item.Size;
+ PropVarEm_Set_UInt64(value, item.Size);
// prop = ref2.Size;
break;
}
@@ -244,132 +559,54 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *va
if (folderIndex != kNumNoIndex)
{
if (_db.FolderStartFileIndex[folderIndex] == (CNum)index2)
- prop = _db.GetFolderFullPackSize(folderIndex);
+ PropVarEm_Set_UInt64(value, _db.GetFolderFullPackSize(folderIndex));
/*
else
- prop = (UInt64)0;
+ PropVarEm_Set_UInt64(value, 0);
*/
}
else
- prop = (UInt64)0;
+ PropVarEm_Set_UInt64(value, 0);
}
break;
}
- case kpidPosition: { UInt64 v; if (_db.StartPos.GetItem(index2, v)) prop = v; break; }
- case kpidCTime: SetPropFromUInt64Def(_db.CTime, index2, prop); break;
- case kpidATime: SetPropFromUInt64Def(_db.ATime, index2, prop); break;
- case kpidMTime: SetPropFromUInt64Def(_db.MTime, index2, prop); break;
- case kpidAttrib: if (item.AttribDefined) prop = item.Attrib; break;
- case kpidCRC: if (item.CrcDefined) prop = item.Crc; break;
- case kpidEncrypted: prop = IsEncrypted(index2); break;
- case kpidIsAnti: prop = _db.IsItemAnti(index2); break;
- #ifndef _SFX
- case kpidMethod:
+ // case kpidIsAux: prop = _db.IsItemAux(index2); break;
+ case kpidPosition: { UInt64 v; if (_db.StartPos.GetItem(index2, v)) PropVarEm_Set_UInt64(value, v); break; }
+ case kpidCTime: SetFileTimeProp_From_UInt64Def(value, _db.CTime, index2); break;
+ case kpidATime: SetFileTimeProp_From_UInt64Def(value, _db.ATime, index2); break;
+ case kpidMTime: SetFileTimeProp_From_UInt64Def(value, _db.MTime, index2); break;
+ case kpidAttrib: if (item.AttribDefined) PropVarEm_Set_UInt32(value, item.Attrib); break;
+ case kpidCRC: if (item.CrcDefined) PropVarEm_Set_UInt32(value, item.Crc); break;
+ case kpidEncrypted: PropVarEm_Set_Bool(value, IsFolderEncrypted(_db.FileIndexToFolderIndexMap[index2])); break;
+ case kpidIsAnti: PropVarEm_Set_Bool(value, _db.IsItemAnti(index2)); break;
+ /*
+ case kpidIsAltStream: prop = item.IsAltStream; break;
+ case kpidNtSecure:
{
- CNum folderIndex = _db.FileIndexToFolderIndexMap[index2];
- if (folderIndex != kNumNoIndex)
+ int id = _db.SecureIDs[index];
+ size_t offs = _db.SecureOffsets[id];
+ size_t size = _db.SecureOffsets[id + 1] - offs;
+ if (size >= 0)
{
- const CFolder &folderInfo = _db.Folders[folderIndex];
- UString methodsString;
- for (int i = folderInfo.Coders.Size() - 1; i >= 0; i--)
- {
- const CCoderInfo &coder = folderInfo.Coders[i];
- if (!methodsString.IsEmpty())
- methodsString += L' ';
-
- UString methodName, propsString;
- bool methodIsKnown = FindMethod(
- EXTERNAL_CODECS_VARS
- coder.MethodID, methodName);
-
- if (!methodIsKnown)
- methodsString += ConvertMethodIdToString(coder.MethodID);
- else
- {
- methodsString += methodName;
- if (coder.MethodID == k_Delta && coder.Props.GetCapacity() == 1)
- propsString = ConvertUInt32ToString((UInt32)coder.Props[0] + 1);
- else if (coder.MethodID == k_LZMA && coder.Props.GetCapacity() == 5)
- {
- UInt32 dicSize = GetUi32((const Byte *)coder.Props + 1);
- propsString = GetStringForSizeValue(dicSize);
- UInt32 d = coder.Props[0];
- UInt32 lc = d % 9;
- d /= 9;
- UInt32 pb = d / 5;
- UInt32 lp = d % 5;
- if (lc != 3) AddProp32(propsString, L":lc", lc);
- if (lp != 0) AddProp32(propsString, L":lp", lp);
- if (pb != 2) AddProp32(propsString, L":pb", pb);
- }
- else if (coder.MethodID == k_LZMA2 && coder.Props.GetCapacity() == 1)
- {
- Byte p = coder.Props[0];
- UInt32 dicSize = (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11));
- propsString = GetStringForSizeValue(dicSize);
- }
- else if (coder.MethodID == k_PPMD && coder.Props.GetCapacity() == 5)
- {
- Byte order = *(const Byte *)coder.Props;
- propsString = L'o';
- propsString += ConvertUInt32ToString(order);
- propsString += L":mem";
- UInt32 dicSize = GetUi32((const Byte *)coder.Props + 1);
- propsString += GetStringForSizeValue(dicSize);
- }
- else if (coder.MethodID == k_AES && coder.Props.GetCapacity() >= 1)
- {
- const Byte *data = (const Byte *)coder.Props;
- Byte firstByte = *data++;
- UInt32 numCyclesPower = firstByte & 0x3F;
- propsString = ConvertUInt32ToString(numCyclesPower);
- /*
- if ((firstByte & 0xC0) != 0)
- {
- UInt32 saltSize = (firstByte >> 7) & 1;
- UInt32 ivSize = (firstByte >> 6) & 1;
- if (coder.Props.GetCapacity() >= 2)
- {
- Byte secondByte = *data++;
- saltSize += (secondByte >> 4);
- ivSize += (secondByte & 0x0F);
- }
- }
- */
- }
- }
- if (!propsString.IsEmpty())
- {
- methodsString += L':';
- methodsString += propsString;
- }
- else if (coder.Props.GetCapacity() > 0)
- {
- methodsString += L":[";
- for (size_t bi = 0; bi < coder.Props.GetCapacity(); bi++)
- {
- if (bi > 5 && bi + 1 < coder.Props.GetCapacity())
- {
- methodsString += L"..";
- break;
- }
- else
- AddHexToString(methodsString, coder.Props[bi]);
- }
- methodsString += L']';
- }
- }
- prop = methodsString;
+ prop.SetBlob(_db.SecureBuf + offs, (ULONG)size);
}
+ break;
}
- break;
+ */
+
+ case kpidPath: return _db.GetPath_Prop(index, value);
+
+ #ifndef _SFX
+
+ case kpidMethod: return SetMethodToProp(_db.FileIndexToFolderIndexMap[index2], value);
case kpidBlock:
{
CNum folderIndex = _db.FileIndexToFolderIndexMap[index2];
if (folderIndex != kNumNoIndex)
- prop = (UInt32)folderIndex;
+ PropVarEm_Set_UInt32(value, (UInt32)folderIndex);
}
break;
+ /*
case kpidPackedSize0:
case kpidPackedSize1:
case kpidPackedSize2:
@@ -379,24 +616,24 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *va
CNum folderIndex = _db.FileIndexToFolderIndexMap[index2];
if (folderIndex != kNumNoIndex)
{
- const CFolder &folderInfo = _db.Folders[folderIndex];
if (_db.FolderStartFileIndex[folderIndex] == (CNum)index2 &&
- folderInfo.PackStreams.Size() > (int)(propID - kpidPackedSize0))
+ _db.FoStartPackStreamIndex[folderIndex + 1] -
+ _db.FoStartPackStreamIndex[folderIndex] > (propID - kpidPackedSize0))
{
- prop = _db.GetFolderPackStreamSize(folderIndex, propID - kpidPackedSize0);
+ PropVarEm_Set_UInt64(value, _db.GetFolderPackStreamSize(folderIndex, propID - kpidPackedSize0));
}
- else
- prop = (UInt64)0;
}
else
- prop = (UInt64)0;
+ PropVarEm_Set_UInt64(value, 0);
}
break;
+ */
+
#endif
}
- prop.Detach(value);
+ // prop.Detach(value);
return S_OK;
- COM_TRY_END
+ // COM_TRY_END
}
STDMETHODIMP CHandler::Open(IInStream *stream,
@@ -408,6 +645,7 @@ STDMETHODIMP CHandler::Open(IInStream *stream,
#ifndef _SFX
_fileInfoPopIDs.Clear();
#endif
+
try
{
CMyComPtr<IArchiveOpenCallback> openArchiveCallbackTemp = openArchiveCallback;
@@ -415,32 +653,38 @@ STDMETHODIMP CHandler::Open(IInStream *stream,
#ifndef _NO_CRYPTO
CMyComPtr<ICryptoGetTextPassword> getTextPassword;
if (openArchiveCallback)
- {
- openArchiveCallbackTemp.QueryInterface(
- IID_ICryptoGetTextPassword, &getTextPassword);
- }
+ openArchiveCallbackTemp.QueryInterface(IID_ICryptoGetTextPassword, &getTextPassword);
#endif
- CInArchive archive;
+
+ CInArchive archive(
+ #ifdef __7Z_SET_PROPERTIES
+ _useMultiThreadMixer
+ #else
+ true
+ #endif
+ );
+ _db.IsArc = false;
RINOK(archive.Open(stream, maxCheckStartPosition));
- #ifndef _NO_CRYPTO
- _passwordIsDefined = false;
- UString password;
- #endif
+ _db.IsArc = true;
+
HRESULT result = archive.ReadDatabase(
- EXTERNAL_CODECS_VARS
- _db
- #ifndef _NO_CRYPTO
- , getTextPassword, _passwordIsDefined
- #endif
- );
+ EXTERNAL_CODECS_VARS
+ _db
+ #ifndef _NO_CRYPTO
+ , getTextPassword, _isEncrypted, _passwordIsDefined, _password
+ #endif
+ );
RINOK(result);
- _db.Fill();
+
_inStream = stream;
}
catch(...)
{
Close();
- return S_FALSE;
+ // return E_INVALIDARG;
+ // return S_FALSE;
+ // we must return out_of_memory here
+ return E_OUTOFMEMORY;
}
// _inStream = stream;
#ifndef _SFX
@@ -455,6 +699,11 @@ STDMETHODIMP CHandler::Close()
COM_TRY_BEGIN
_inStream.Release();
_db.Clear();
+ #ifndef _NO_CRYPTO
+ _isEncrypted = false;
+ _passwordIsDefined = false;
+ _password.Empty();
+ #endif
return S_OK;
COM_TRY_END
}
@@ -462,26 +711,32 @@ STDMETHODIMP CHandler::Close()
#ifdef __7Z_SET_PROPERTIES
#ifdef EXTRACT_ONLY
-STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties)
+STDMETHODIMP CHandler::SetProperties(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps)
{
COM_TRY_BEGIN
const UInt32 numProcessors = NSystem::GetNumberOfProcessors();
_numThreads = numProcessors;
+ _useMultiThreadMixer = true;
- for (int i = 0; i < numProperties; i++)
+ for (UInt32 i = 0; i < numProps; i++)
{
UString name = names[i];
- name.MakeUpper();
+ name.MakeLower_Ascii();
if (name.IsEmpty())
return E_INVALIDARG;
const PROPVARIANT &value = values[i];
UInt32 number;
- int index = ParseStringToUInt32(name, number);
+ unsigned index = ParseStringToUInt32(name, number);
if (index == 0)
{
- if(name.Left(2).CompareNoCase(L"MT") == 0)
+ if (name.IsEqualTo("mtf"))
+ {
+ RINOK(PROPVARIANT_to_bool(value, _useMultiThreadMixer));
+ continue;
+ }
+ if (name.IsPrefixedBy_Ascii_NoCase("mt"))
{
- RINOK(ParseMtProp(name.Mid(2), value, numProcessors, _numThreads));
+ RINOK(ParseMtProp(name.Ptr(2), value, numProcessors, _numThreads));
continue;
}
else
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandler.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandler.h
index 247b55f79dc..d46401afe3c 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandler.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandler.h
@@ -18,24 +18,14 @@
namespace NArchive {
namespace N7z {
-const UInt32 k_Copy = 0x0;
-const UInt32 k_Delta = 3;
-const UInt32 k_LZMA2 = 0x21;
-const UInt32 k_LZMA = 0x030101;
-const UInt32 k_PPMD = 0x030401;
-const UInt32 k_BCJ = 0x03030103;
-const UInt32 k_BCJ2 = 0x0303011B;
-const UInt32 k_Deflate = 0x040108;
-const UInt32 k_BZip2 = 0x040202;
-
#ifndef __7Z_SET_PROPERTIES
#ifdef EXTRACT_ONLY
-#if !defined(_7ZIP_ST) && !defined(_SFX)
-#define __7Z_SET_PROPERTIES
-#endif
+ #if !defined(_7ZIP_ST) && !defined(_SFX)
+ #define __7Z_SET_PROPERTIES
+ #endif
#else
-#define __7Z_SET_PROPERTIES
+ #define __7Z_SET_PROPERTIES
#endif
#endif
@@ -54,16 +44,20 @@ public:
UInt64 _numSolidBytes;
bool _numSolidBytesDefined;
bool _solidExtension;
+ bool _useTypeSorting;
bool _compressHeaders;
bool _encryptHeadersSpecified;
bool _encryptHeaders;
+ // bool _useParents; 9.26
- bool WriteCTime;
- bool WriteATime;
- bool WriteMTime;
+ CBoolPair Write_CTime;
+ CBoolPair Write_ATime;
+ CBoolPair Write_MTime;
- bool _volumeMode;
+ bool _useMultiThreadMixer;
+
+ // bool _volumeMode;
void InitSolidFiles() { _numSolidFiles = (UInt64)(Int64)(-1); }
void InitSolidSize() { _numSolidBytes = (UInt64)(Int64)(-1); }
@@ -85,10 +79,8 @@ public:
#endif
class CHandler:
- #ifndef EXTRACT_ONLY
- public COutHandler,
- #endif
public IInArchive,
+ public IArchiveGetRawProps,
#ifdef __7Z_SET_PROPERTIES
public ISetProperties,
#endif
@@ -97,9 +89,13 @@ class CHandler:
#endif
PUBLIC_ISetCompressCodecsInfo
public CMyUnknownImp
+ #ifndef EXTRACT_ONLY
+ , public COutHandler
+ #endif
{
public:
MY_QUERYINTERFACE_BEGIN2(IInArchive)
+ MY_QUERYINTERFACE_ENTRY(IArchiveGetRawProps)
#ifdef __7Z_SET_PROPERTIES
MY_QUERYINTERFACE_ENTRY(ISetProperties)
#endif
@@ -111,9 +107,10 @@ public:
MY_ADDREF_RELEASE
INTERFACE_IInArchive(;)
+ INTERFACE_IArchiveGetRawProps(;)
#ifdef __7Z_SET_PROPERTIES
- STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties);
+ STDMETHOD(SetProperties)(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps);
#endif
#ifndef EXTRACT_ONLY
@@ -126,28 +123,30 @@ public:
private:
CMyComPtr<IInStream> _inStream;
- NArchive::N7z::CArchiveDatabaseEx _db;
+ NArchive::N7z::CDbEx _db;
+
#ifndef _NO_CRYPTO
+ bool _isEncrypted;
bool _passwordIsDefined;
+ UString _password;
#endif
#ifdef EXTRACT_ONLY
#ifdef __7Z_SET_PROPERTIES
UInt32 _numThreads;
+ bool _useMultiThreadMixer;
#endif
UInt32 _crcSize;
#else
- CRecordVector<CBind> _binds;
+ CRecordVector<CBond2> _bonds;
HRESULT PropsMethod_To_FullMethod(CMethodFull &dest, const COneMethodInfo &m);
HRESULT SetHeaderMethod(CCompressionMethodMode &headerMethod);
- void AddDefaultMethod();
- HRESULT SetMainMethod(CCompressionMethodMode &method,
- CObjectVector<COneMethodInfo> &methodsInfo
+ HRESULT SetMainMethod(CCompressionMethodMode &method
#ifndef _7ZIP_ST
, UInt32 numThreads
#endif
@@ -156,11 +155,13 @@ private:
#endif
- bool IsEncrypted(UInt32 index2) const;
+ bool IsFolderEncrypted(CNum folderIndex) const;
#ifndef _SFX
CRecordVector<UInt64> _fileInfoPopIDs;
void FillPopIDs();
+ void AddMethodName(AString &s, UInt64 id);
+ HRESULT SetMethodToProp(CNum folderIndex, PROPVARIANT *prop) const;
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp
index dd73ee842f5..41bd6520c80 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp
@@ -4,6 +4,7 @@
#include "../../../Common/ComTry.h"
#include "../../../Common/StringToInt.h"
+#include "../../../Common/Wildcard.h"
#include "../Common/ItemNameUtils.h"
#include "../Common/ParseProperties.h"
@@ -17,11 +18,11 @@ using namespace NWindows;
namespace NArchive {
namespace N7z {
-static const wchar_t *k_LZMA_Name = L"LZMA";
-static const wchar_t *kDefaultMethodName = k_LZMA_Name;
-static const wchar_t *k_Copy_Name = L"Copy";
+static const char *k_LZMA_Name = "LZMA";
+static const char *kDefaultMethodName = "LZMA2";
+static const char *k_Copy_Name = "Copy";
-static const wchar_t *k_MatchFinder_ForHeaders = L"BT2";
+static const char *k_MatchFinder_ForHeaders = "BT2";
static const UInt32 k_NumFastBytes_ForHeaders = 273;
static const UInt32 k_Level_ForHeaders = 5;
static const UInt32 k_Dictionary_ForHeaders =
@@ -41,7 +42,7 @@ HRESULT CHandler::PropsMethod_To_FullMethod(CMethodFull &dest, const COneMethodI
{
if (!FindMethod(
EXTERNAL_CODECS_VARS
- m.MethodName, dest.Id, dest.NumInStreams, dest.NumOutStreams))
+ m.MethodName, dest.Id, dest.NumStreams))
return E_INVALIDARG;
(CProps &)dest = (CProps &)m;
return S_OK;
@@ -53,49 +54,63 @@ HRESULT CHandler::SetHeaderMethod(CCompressionMethodMode &headerMethod)
return S_OK;
COneMethodInfo m;
m.MethodName = k_LZMA_Name;
- m.AddPropString(NCoderPropID::kMatchFinder, k_MatchFinder_ForHeaders);
- m.AddProp32(NCoderPropID::kLevel, k_Level_ForHeaders);
+ m.AddProp_Ascii(NCoderPropID::kMatchFinder, k_MatchFinder_ForHeaders);
+ m.AddProp_Level(k_Level_ForHeaders);
m.AddProp32(NCoderPropID::kNumFastBytes, k_NumFastBytes_ForHeaders);
m.AddProp32(NCoderPropID::kDictionarySize, k_Dictionary_ForHeaders);
- m.AddNumThreadsProp(1);
+ m.AddProp_NumThreads(1);
- CMethodFull methodFull;
- RINOK(PropsMethod_To_FullMethod(methodFull, m));
- headerMethod.Methods.Add(methodFull);
- return S_OK;
-}
-
-void CHandler::AddDefaultMethod()
-{
- for (int i = 0; i < _methods.Size(); i++)
- {
- UString &methodName = _methods[0].MethodName;
- if (methodName.IsEmpty())
- methodName = kDefaultMethodName;
- }
- if (_methods.IsEmpty())
- {
- COneMethodInfo m;
- m.MethodName = (GetLevel() == 0 ? k_Copy_Name : kDefaultMethodName);
- _methods.Add(m);
- }
+ CMethodFull &methodFull = headerMethod.Methods.AddNew();
+ return PropsMethod_To_FullMethod(methodFull, m);
}
HRESULT CHandler::SetMainMethod(
- CCompressionMethodMode &methodMode,
- CObjectVector<COneMethodInfo> &methods
+ CCompressionMethodMode &methodMode
#ifndef _7ZIP_ST
, UInt32 numThreads
#endif
)
{
- AddDefaultMethod();
+ methodMode.Bonds = _bonds;
+
+ CObjectVector<COneMethodInfo> methods = _methods;
+
+ {
+ FOR_VECTOR (i, methods)
+ {
+ AString &methodName = methods[i].MethodName;
+ if (methodName.IsEmpty())
+ methodName = kDefaultMethodName;
+ }
+ if (methods.IsEmpty())
+ {
+ COneMethodInfo &m = methods.AddNew();
+ m.MethodName = (GetLevel() == 0 ? k_Copy_Name : kDefaultMethodName);
+ methodMode.DefaultMethod_was_Inserted = true;
+ }
+ }
+
+ if (!_filterMethod.MethodName.IsEmpty())
+ {
+ // if (methodMode.Bonds.IsEmpty())
+ {
+ FOR_VECTOR (k, methodMode.Bonds)
+ {
+ CBond2 &bond = methodMode.Bonds[k];
+ bond.InCoder++;
+ bond.OutCoder++;
+ }
+ methods.Insert(0, _filterMethod);
+ methodMode.Filter_was_Inserted = true;
+ }
+ }
const UInt64 kSolidBytes_Min = (1 << 24);
const UInt64 kSolidBytes_Max = ((UInt64)1 << 32) - 1;
bool needSolid = false;
- for (int i = 0; i < methods.Size(); i++)
+
+ FOR_VECTOR (i, methods)
{
COneMethodInfo &oneMethodInfo = methods[i];
SetGlobalLevelAndThreads(oneMethodInfo
@@ -104,9 +119,8 @@ HRESULT CHandler::SetMainMethod(
#endif
);
- CMethodFull methodFull;
+ CMethodFull &methodFull = methodMode.Methods.AddNew();
RINOK(PropsMethod_To_FullMethod(methodFull, oneMethodInfo));
- methodMode.Methods.Add(methodFull);
if (methodFull.Id != k_Copy)
needSolid = true;
@@ -124,6 +138,7 @@ HRESULT CHandler::SetMainMethod(
case k_BZip2: dicSize = oneMethodInfo.Get_BZip2_BlockSize(); break;
default: continue;
}
+
_numSolidBytes = (UInt64)dicSize << 7;
if (_numSolidBytes < kSolidBytes_Min) _numSolidBytes = kSolidBytes_Min;
if (_numSolidBytes > kSolidBytes_Max) _numSolidBytes = kSolidBytes_Max;
@@ -139,12 +154,10 @@ HRESULT CHandler::SetMainMethod(
return S_OK;
}
-static HRESULT GetTime(IArchiveUpdateCallback *updateCallback, int index, bool writeTime, PROPID propID, UInt64 &ft, bool &ftDefined)
+static HRESULT GetTime(IArchiveUpdateCallback *updateCallback, int index, PROPID propID, UInt64 &ft, bool &ftDefined)
{
- ft = 0;
- ftDefined = false;
- if (!writeTime)
- return S_OK;
+ // ft = 0;
+ // ftDefined = false;
NCOM::CPropVariant prop;
RINOK(updateCallback->GetProperty(index, propID, &prop));
if (prop.vt == VT_FILETIME)
@@ -154,15 +167,87 @@ static HRESULT GetTime(IArchiveUpdateCallback *updateCallback, int index, bool w
}
else if (prop.vt != VT_EMPTY)
return E_INVALIDARG;
+ else
+ {
+ ft = 0;
+ ftDefined = false;
+ }
return S_OK;
}
+/*
+
+#ifdef _WIN32
+static const wchar_t kDirDelimiter1 = L'\\';
+#endif
+static const wchar_t kDirDelimiter2 = L'/';
+
+static inline bool IsCharDirLimiter(wchar_t c)
+{
+ return (
+ #ifdef _WIN32
+ c == kDirDelimiter1 ||
+ #endif
+ c == kDirDelimiter2);
+}
+
+static int FillSortIndex(CObjectVector<CTreeFolder> &treeFolders, int cur, int curSortIndex)
+{
+ CTreeFolder &tf = treeFolders[cur];
+ tf.SortIndex = curSortIndex++;
+ for (int i = 0; i < tf.SubFolders.Size(); i++)
+ curSortIndex = FillSortIndex(treeFolders, tf.SubFolders[i], curSortIndex);
+ tf.SortIndexEnd = curSortIndex;
+ return curSortIndex;
+}
+
+static int FindSubFolder(const CObjectVector<CTreeFolder> &treeFolders, int cur, const UString &name, int &insertPos)
+{
+ const CIntVector &subFolders = treeFolders[cur].SubFolders;
+ int left = 0, right = subFolders.Size();
+ insertPos = -1;
+ for (;;)
+ {
+ if (left == right)
+ {
+ insertPos = left;
+ return -1;
+ }
+ int mid = (left + right) / 2;
+ int midFolder = subFolders[mid];
+ int compare = CompareFileNames(name, treeFolders[midFolder].Name);
+ if (compare == 0)
+ return midFolder;
+ if (compare < 0)
+ right = mid;
+ else
+ left = mid + 1;
+ }
+}
+
+static int AddFolder(CObjectVector<CTreeFolder> &treeFolders, int cur, const UString &name)
+{
+ int insertPos;
+ int folderIndex = FindSubFolder(treeFolders, cur, name, insertPos);
+ if (folderIndex < 0)
+ {
+ folderIndex = treeFolders.Size();
+ CTreeFolder &newFolder = treeFolders.AddNew();
+ newFolder.Parent = cur;
+ newFolder.Name = name;
+ treeFolders[cur].SubFolders.Insert(insertPos, folderIndex);
+ }
+ // else if (treeFolders[folderIndex].IsAltStreamFolder != isAltStreamFolder) throw 1123234234;
+ return folderIndex;
+}
+*/
+
STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems,
IArchiveUpdateCallback *updateCallback)
{
COM_TRY_BEGIN
- const CArchiveDatabaseEx *db = 0;
+ const CDbEx *db = 0;
#ifdef _7Z_VOL
if (_volumes.Size() > 1)
return E_FAIL;
@@ -177,8 +262,36 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
db = &_db;
#endif
+ /*
+ CMyComPtr<IArchiveGetRawProps> getRawProps;
+ updateCallback->QueryInterface(IID_IArchiveGetRawProps, (void **)&getRawProps);
+
+ CUniqBlocks secureBlocks;
+ secureBlocks.AddUniq(NULL, 0);
+
+ CObjectVector<CTreeFolder> treeFolders;
+ {
+ CTreeFolder folder;
+ folder.Parent = -1;
+ treeFolders.Add(folder);
+ }
+ */
+
CObjectVector<CUpdateItem> updateItems;
+
+ bool need_CTime = (Write_CTime.Def && Write_CTime.Val);
+ bool need_ATime = (Write_ATime.Def && Write_ATime.Val);
+ bool need_MTime = (Write_MTime.Def && Write_MTime.Val || !Write_MTime.Def);
+ if (db && !db->Files.IsEmpty())
+ {
+ if (!Write_CTime.Def) need_CTime = !db->CTime.Defs.IsEmpty();
+ if (!Write_ATime.Def) need_ATime = !db->ATime.Defs.IsEmpty();
+ if (!Write_MTime.Def) need_MTime = !db->MTime.Defs.IsEmpty();
+ }
+
+ UString s;
+
for (UInt32 i = 0; i < numItems; i++)
{
Int32 newData, newProps;
@@ -194,24 +307,32 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
ui.IsAnti = false;
ui.Size = 0;
+ UString name;
+ // bool isAltStream = false;
if (ui.IndexInArchive != -1)
{
- if (db == 0 || ui.IndexInArchive >= db->Files.Size())
+ if (db == 0 || (unsigned)ui.IndexInArchive >= db->Files.Size())
return E_INVALIDARG;
const CFileItem &fi = db->Files[ui.IndexInArchive];
- ui.Name = fi.Name;
+ if (!ui.NewProps)
+ {
+ _db.GetPath(ui.IndexInArchive, name);
+ }
ui.IsDir = fi.IsDir;
ui.Size = fi.Size;
+ // isAltStream = fi.IsAltStream;
ui.IsAnti = db->IsItemAnti(ui.IndexInArchive);
- ui.CTimeDefined = db->CTime.GetItem(ui.IndexInArchive, ui.CTime);
- ui.ATimeDefined = db->ATime.GetItem(ui.IndexInArchive, ui.ATime);
- ui.MTimeDefined = db->MTime.GetItem(ui.IndexInArchive, ui.MTime);
+ if (!ui.NewProps)
+ {
+ ui.CTimeDefined = db->CTime.GetItem(ui.IndexInArchive, ui.CTime);
+ ui.ATimeDefined = db->ATime.GetItem(ui.IndexInArchive, ui.ATime);
+ ui.MTimeDefined = db->MTime.GetItem(ui.IndexInArchive, ui.MTime);
+ }
}
if (ui.NewProps)
{
- bool nameIsDefined;
bool folderStatusIsDefined;
{
NCOM::CPropVariant prop;
@@ -228,21 +349,35 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
}
// we need MTime to sort files.
- RINOK(GetTime(updateCallback, i, WriteCTime, kpidCTime, ui.CTime, ui.CTimeDefined));
- RINOK(GetTime(updateCallback, i, WriteATime, kpidATime, ui.ATime, ui.ATimeDefined));
- RINOK(GetTime(updateCallback, i, true, kpidMTime, ui.MTime, ui.MTimeDefined));
+ if (need_CTime) RINOK(GetTime(updateCallback, i, kpidCTime, ui.CTime, ui.CTimeDefined));
+ if (need_ATime) RINOK(GetTime(updateCallback, i, kpidATime, ui.ATime, ui.ATimeDefined));
+ if (need_MTime) RINOK(GetTime(updateCallback, i, kpidMTime, ui.MTime, ui.MTimeDefined));
+
+ /*
+ if (getRawProps)
+ {
+ const void *data;
+ UInt32 dataSize;
+ UInt32 propType;
+
+ getRawProps->GetRawProp(i, kpidNtSecure, &data, &dataSize, &propType);
+ if (dataSize != 0 && propType != NPropDataType::kRaw)
+ return E_FAIL;
+ ui.SecureIndex = secureBlocks.AddUniq((const Byte *)data, dataSize);
+ }
+ */
{
NCOM::CPropVariant prop;
RINOK(updateCallback->GetProperty(i, kpidPath, &prop));
if (prop.vt == VT_EMPTY)
- nameIsDefined = false;
+ {
+ }
else if (prop.vt != VT_BSTR)
return E_INVALIDARG;
else
{
- ui.Name = NItemName::MakeLegalName(prop.bstrVal);
- nameIsDefined = true;
+ name = NItemName::MakeLegalName(prop.bstrVal);
}
}
{
@@ -270,6 +405,19 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
ui.IsAnti = (prop.boolVal != VARIANT_FALSE);
}
+ /*
+ {
+ NCOM::CPropVariant prop;
+ RINOK(updateCallback->GetProperty(i, kpidIsAltStream, &prop));
+ if (prop.vt == VT_EMPTY)
+ isAltStream = false;
+ else if (prop.vt != VT_BOOL)
+ return E_INVALIDARG;
+ else
+ isAltStream = (prop.boolVal != VARIANT_FALSE);
+ }
+ */
+
if (ui.IsAnti)
{
ui.AttribDefined = false;
@@ -284,55 +432,155 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
if (!folderStatusIsDefined && ui.AttribDefined)
ui.SetDirStatusFromAttrib();
}
+ else
+ {
+ /*
+ if (_db.SecureIDs.IsEmpty())
+ ui.SecureIndex = secureBlocks.AddUniq(NULL, 0);
+ else
+ {
+ int id = _db.SecureIDs[ui.IndexInArchive];
+ size_t offs = _db.SecureOffsets[id];
+ size_t size = _db.SecureOffsets[id + 1] - offs;
+ ui.SecureIndex = secureBlocks.AddUniq(_db.SecureBuf + offs, size);
+ }
+ */
+ }
+
+ /*
+ {
+ int folderIndex = 0;
+ if (_useParents)
+ {
+ int j;
+ s.Empty();
+ for (j = 0; j < name.Len(); j++)
+ {
+ wchar_t c = name[j];
+ if (IsCharDirLimiter(c))
+ {
+ folderIndex = AddFolder(treeFolders, folderIndex, s);
+ s.Empty();
+ continue;
+ }
+ s += c;
+ }
+ if (isAltStream)
+ {
+ int colonPos = s.Find(':');
+ if (colonPos < 0)
+ {
+ // isAltStream = false;
+ return E_INVALIDARG;
+ }
+ UString mainName = s.Left(colonPos);
+ int newFolderIndex = AddFolder(treeFolders, folderIndex, mainName);
+ if (treeFolders[newFolderIndex].UpdateItemIndex < 0)
+ {
+ for (int j = updateItems.Size() - 1; j >= 0; j--)
+ {
+ CUpdateItem &ui2 = updateItems[j];
+ if (ui2.ParentFolderIndex == folderIndex
+ && ui2.Name == mainName)
+ {
+ ui2.TreeFolderIndex = newFolderIndex;
+ treeFolders[newFolderIndex].UpdateItemIndex = j;
+ }
+ }
+ }
+ folderIndex = newFolderIndex;
+ s.Delete(0, colonPos + 1);
+ }
+ ui.Name = s;
+ }
+ else
+ ui.Name = name;
+ ui.IsAltStream = isAltStream;
+ ui.ParentFolderIndex = folderIndex;
+ ui.TreeFolderIndex = -1;
+ if (ui.IsDir && !s.IsEmpty())
+ {
+ ui.TreeFolderIndex = AddFolder(treeFolders, folderIndex, s);
+ treeFolders[ui.TreeFolderIndex].UpdateItemIndex = updateItems.Size();
+ }
+ }
+ */
+ ui.Name = name;
if (ui.NewData)
{
- NCOM::CPropVariant prop;
- RINOK(updateCallback->GetProperty(i, kpidSize, &prop));
- if (prop.vt != VT_UI8)
- return E_INVALIDARG;
- ui.Size = (UInt64)prop.uhVal.QuadPart;
- if (ui.Size != 0 && ui.IsAnti)
- return E_INVALIDARG;
+ ui.Size = 0;
+ if (!ui.IsDir)
+ {
+ NCOM::CPropVariant prop;
+ RINOK(updateCallback->GetProperty(i, kpidSize, &prop));
+ if (prop.vt != VT_UI8)
+ return E_INVALIDARG;
+ ui.Size = (UInt64)prop.uhVal.QuadPart;
+ if (ui.Size != 0 && ui.IsAnti)
+ return E_INVALIDARG;
+ }
}
+
updateItems.Add(ui);
}
+ /*
+ FillSortIndex(treeFolders, 0, 0);
+ for (i = 0; i < (UInt32)updateItems.Size(); i++)
+ {
+ CUpdateItem &ui = updateItems[i];
+ ui.ParentSortIndex = treeFolders[ui.ParentFolderIndex].SortIndex;
+ ui.ParentSortIndexEnd = treeFolders[ui.ParentFolderIndex].SortIndexEnd;
+ }
+ */
+
CCompressionMethodMode methodMode, headerMethod;
- HRESULT res = SetMainMethod(methodMode, _methods
+ HRESULT res = SetMainMethod(methodMode
#ifndef _7ZIP_ST
, _numThreads
#endif
);
RINOK(res);
- methodMode.Binds = _binds;
RINOK(SetHeaderMethod(headerMethod));
+
#ifndef _7ZIP_ST
methodMode.NumThreads = _numThreads;
+ methodMode.MultiThreadMixer = _useMultiThreadMixer;
headerMethod.NumThreads = 1;
+ headerMethod.MultiThreadMixer = _useMultiThreadMixer;
#endif
CMyComPtr<ICryptoGetTextPassword2> getPassword2;
updateCallback->QueryInterface(IID_ICryptoGetTextPassword2, (void **)&getPassword2);
+ methodMode.PasswordIsDefined = false;
+ methodMode.Password.Empty();
if (getPassword2)
{
CMyComBSTR password;
Int32 passwordIsDefined;
RINOK(getPassword2->CryptoGetTextPassword2(&passwordIsDefined, &password));
methodMode.PasswordIsDefined = IntToBool(passwordIsDefined);
- if (methodMode.PasswordIsDefined)
+ if (methodMode.PasswordIsDefined && password)
methodMode.Password = password;
}
- else
- methodMode.PasswordIsDefined = false;
bool compressMainHeader = _compressHeaders; // check it
bool encryptHeaders = false;
+ #ifndef _NO_CRYPTO
+ if (!methodMode.PasswordIsDefined && _passwordIsDefined)
+ {
+ // if header is compressed, we use that password for updated archive
+ methodMode.PasswordIsDefined = true;
+ methodMode.Password = _password;
+ }
+ #endif
+
if (methodMode.PasswordIsDefined)
{
if (_encryptHeadersSpecified)
@@ -352,30 +600,50 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
if (numItems < 2)
compressMainHeader = false;
+ int level = GetLevel();
+
CUpdateOptions options;
options.Method = &methodMode;
- options.HeaderMethod = (_compressHeaders || encryptHeaders) ? &headerMethod : 0;
- int level = GetLevel();
- options.UseFilters = level != 0 && _autoFilter;
- options.MaxFilter = level >= 8;
+ options.HeaderMethod = (_compressHeaders || encryptHeaders) ? &headerMethod : NULL;
+ options.UseFilters = (level != 0 && _autoFilter && !methodMode.Filter_was_Inserted);
+ options.MaxFilter = (level >= 8);
+ options.AnalysisLevel = GetAnalysisLevel();
options.HeaderOptions.CompressMainHeader = compressMainHeader;
- options.HeaderOptions.WriteCTime = WriteCTime;
- options.HeaderOptions.WriteATime = WriteATime;
- options.HeaderOptions.WriteMTime = WriteMTime;
+ /*
+ options.HeaderOptions.WriteCTime = Write_CTime;
+ options.HeaderOptions.WriteATime = Write_ATime;
+ options.HeaderOptions.WriteMTime = Write_MTime;
+ */
options.NumSolidFiles = _numSolidFiles;
options.NumSolidBytes = _numSolidBytes;
options.SolidExtension = _solidExtension;
+ options.UseTypeSorting = _useTypeSorting;
+
options.RemoveSfxBlock = _removeSfxBlock;
- options.VolumeMode = _volumeMode;
+ // options.VolumeMode = _volumeMode;
+
+ options.MultiThreadMixer = _useMultiThreadMixer;
COutArchive archive;
- CArchiveDatabase newDatabase;
+ CArchiveDatabaseOut newDatabase;
CMyComPtr<ICryptoGetTextPassword> getPassword;
updateCallback->QueryInterface(IID_ICryptoGetTextPassword, (void **)&getPassword);
+ /*
+ if (secureBlocks.Sorted.Size() > 1)
+ {
+ secureBlocks.GetReverseMap();
+ for (int i = 0; i < updateItems.Size(); i++)
+ {
+ int &secureIndex = updateItems[i].SecureIndex;
+ secureIndex = secureBlocks.BufIndexToSortedIndex[secureIndex];
+ }
+ }
+ */
+
res = Update(
EXTERNAL_CODECS_VARS
#ifdef _7Z_VOL
@@ -386,6 +654,8 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
db,
#endif
updateItems,
+ // treeFolders,
+ // secureBlocks,
archive, newDatabase, outStream, updateCallback, options
#ifndef _NO_CRYPTO
, getPassword
@@ -402,20 +672,20 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
COM_TRY_END
}
-static HRESULT GetBindInfoPart(UString &srcString, UInt32 &coder, UInt32 &stream)
+static HRESULT ParseBond(UString &srcString, UInt32 &coder, UInt32 &stream)
{
stream = 0;
int index = ParseStringToUInt32(srcString, coder);
if (index == 0)
return E_INVALIDARG;
- srcString.Delete(0, index);
- if (srcString[0] == 'S')
+ srcString.DeleteFrontal(index);
+ if (srcString[0] == 's')
{
srcString.Delete(0);
int index = ParseStringToUInt32(srcString, stream);
if (index == 0)
return E_INVALIDARG;
- srcString.Delete(0, index);
+ srcString.DeleteFrontal(index);
}
return S_OK;
}
@@ -428,36 +698,41 @@ void COutHandler::InitProps()
_compressHeaders = true;
_encryptHeadersSpecified = false;
_encryptHeaders = false;
+ // _useParents = false;
- WriteCTime = false;
- WriteATime = false;
- WriteMTime = true;
-
- _volumeMode = false;
+ Write_CTime.Init();
+ Write_ATime.Init();
+ Write_MTime.Init();
+
+ _useMultiThreadMixer = true;
+
+ // _volumeMode = false;
+
InitSolid();
+ _useTypeSorting = false;
}
HRESULT COutHandler::SetSolidFromString(const UString &s)
{
UString s2 = s;
- s2.MakeUpper();
- for (int i = 0; i < s2.Length();)
+ s2.MakeLower_Ascii();
+ for (unsigned i = 0; i < s2.Len();)
{
const wchar_t *start = ((const wchar_t *)s2) + i;
const wchar_t *end;
UInt64 v = ConvertStringToUInt64(start, &end);
if (start == end)
{
- if (s2[i++] != 'E')
+ if (s2[i++] != 'e')
return E_INVALIDARG;
_solidExtension = true;
continue;
}
i += (int)(end - start);
- if (i == s2.Length())
+ if (i == s2.Len())
return E_INVALIDARG;
wchar_t c = s2[i++];
- if (c == 'F')
+ if (c == 'f')
{
if (v < 1)
v = 1;
@@ -468,10 +743,11 @@ HRESULT COutHandler::SetSolidFromString(const UString &s)
unsigned numBits;
switch (c)
{
- case 'B': numBits = 0; break;
- case 'K': numBits = 10; break;
- case 'M': numBits = 20; break;
- case 'G': numBits = 30; break;
+ case 'b': numBits = 0; break;
+ case 'k': numBits = 10; break;
+ case 'm': numBits = 20; break;
+ case 'g': numBits = 30; break;
+ case 't': numBits = 40; break;
default: return E_INVALIDARG;
}
_numSolidBytes = (v << numBits);
@@ -501,14 +777,21 @@ HRESULT COutHandler::SetSolidFromPROPVARIANT(const PROPVARIANT &value)
return S_OK;
}
+static HRESULT PROPVARIANT_to_BoolPair(const PROPVARIANT &prop, CBoolPair &dest)
+{
+ RINOK(PROPVARIANT_to_bool(prop, dest.Val));
+ dest.Def = true;
+ return S_OK;
+}
+
HRESULT COutHandler::SetProperty(const wchar_t *nameSpec, const PROPVARIANT &value)
{
UString name = nameSpec;
- name.MakeUpper();
+ name.MakeLower_Ascii();
if (name.IsEmpty())
return E_INVALIDARG;
- if (name[0] == L'S')
+ if (name[0] == L's')
{
name.Delete(0);
if (name.IsEmpty())
@@ -520,104 +803,104 @@ HRESULT COutHandler::SetProperty(const wchar_t *nameSpec, const PROPVARIANT &val
UInt32 number;
int index = ParseStringToUInt32(name, number);
- UString realName = name.Mid(index);
+ // UString realName = name.Ptr(index);
if (index == 0)
{
- if (name.CompareNoCase(L"RSFX") == 0) return PROPVARIANT_to_bool(value, _removeSfxBlock);
- if (name.CompareNoCase(L"HC") == 0) return PROPVARIANT_to_bool(value, _compressHeaders);
- if (name.CompareNoCase(L"HCF") == 0)
+ if (name.IsEqualTo("rsfx")) return PROPVARIANT_to_bool(value, _removeSfxBlock);
+ if (name.IsEqualTo("hc")) return PROPVARIANT_to_bool(value, _compressHeaders);
+ // if (name.IsEqualToNoCase(L"HS")) return PROPVARIANT_to_bool(value, _useParents);
+
+ if (name.IsEqualTo("hcf"))
{
bool compressHeadersFull = true;
RINOK(PROPVARIANT_to_bool(value, compressHeadersFull));
return compressHeadersFull ? S_OK: E_INVALIDARG;
}
- if (name.CompareNoCase(L"HE") == 0)
+
+ if (name.IsEqualTo("he"))
{
RINOK(PROPVARIANT_to_bool(value, _encryptHeaders));
_encryptHeadersSpecified = true;
return S_OK;
}
- if (name.CompareNoCase(L"TC") == 0) return PROPVARIANT_to_bool(value, WriteCTime);
- if (name.CompareNoCase(L"TA") == 0) return PROPVARIANT_to_bool(value, WriteATime);
- if (name.CompareNoCase(L"TM") == 0) return PROPVARIANT_to_bool(value, WriteMTime);
- if (name.CompareNoCase(L"V") == 0) return PROPVARIANT_to_bool(value, _volumeMode);
+
+ if (name.IsEqualTo("tc")) return PROPVARIANT_to_BoolPair(value, Write_CTime);
+ if (name.IsEqualTo("ta")) return PROPVARIANT_to_BoolPair(value, Write_ATime);
+ if (name.IsEqualTo("tm")) return PROPVARIANT_to_BoolPair(value, Write_MTime);
+
+ if (name.IsEqualTo("mtf")) return PROPVARIANT_to_bool(value, _useMultiThreadMixer);
+
+ if (name.IsEqualTo("qs")) return PROPVARIANT_to_bool(value, _useTypeSorting);
+
+ // if (name.IsEqualTo("v")) return PROPVARIANT_to_bool(value, _volumeMode);
}
return CMultiMethodProps::SetProperty(name, value);
}
-STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps)
+STDMETHODIMP CHandler::SetProperties(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps)
{
COM_TRY_BEGIN
- _binds.Clear();
+ _bonds.Clear();
InitProps();
- for (int i = 0; i < numProps; i++)
+ for (UInt32 i = 0; i < numProps; i++)
{
UString name = names[i];
- name.MakeUpper();
+ name.MakeLower_Ascii();
if (name.IsEmpty())
return E_INVALIDARG;
const PROPVARIANT &value = values[i];
- if (name[0] == 'B')
+ if (name[0] == 'b')
{
if (value.vt != VT_EMPTY)
return E_INVALIDARG;
name.Delete(0);
- CBind bind;
- RINOK(GetBindInfoPart(name, bind.OutCoder, bind.OutStream));
+
+ CBond2 bond;
+ RINOK(ParseBond(name, bond.OutCoder, bond.OutStream));
if (name[0] != ':')
return E_INVALIDARG;
name.Delete(0);
- RINOK(GetBindInfoPart(name, bind.InCoder, bind.InStream));
+ UInt32 inStream = 0;
+ RINOK(ParseBond(name, bond.InCoder, inStream));
+ if (inStream != 0)
+ return E_INVALIDARG;
if (!name.IsEmpty())
return E_INVALIDARG;
- _binds.Add(bind);
+ _bonds.Add(bond);
continue;
}
RINOK(SetProperty(name, value));
}
- int numEmptyMethods = GetNumEmptyMethods();
+ unsigned numEmptyMethods = GetNumEmptyMethods();
if (numEmptyMethods > 0)
{
- int k;
- for (k = 0; k < _binds.Size(); k++)
+ unsigned k;
+ for (k = 0; k < _bonds.Size(); k++)
{
- const CBind &bind = _binds[k];
- if (bind.InCoder < (UInt32)numEmptyMethods ||
- bind.OutCoder < (UInt32)numEmptyMethods)
+ const CBond2 &bond = _bonds[k];
+ if (bond.InCoder < (UInt32)numEmptyMethods ||
+ bond.OutCoder < (UInt32)numEmptyMethods)
return E_INVALIDARG;
}
- for (k = 0; k < _binds.Size(); k++)
+ for (k = 0; k < _bonds.Size(); k++)
{
- CBind &bind = _binds[k];
- bind.InCoder -= (UInt32)numEmptyMethods;
- bind.OutCoder -= (UInt32)numEmptyMethods;
+ CBond2 &bond = _bonds[k];
+ bond.InCoder -= (UInt32)numEmptyMethods;
+ bond.OutCoder -= (UInt32)numEmptyMethods;
}
- _methods.Delete(0, numEmptyMethods);
+ _methods.DeleteFrontal(numEmptyMethods);
}
- AddDefaultMethod();
-
- if (!_filterMethod.MethodName.IsEmpty())
- {
- for (int k = 0; k < _binds.Size(); k++)
- {
- CBind &bind = _binds[k];
- bind.InCoder++;
- bind.OutCoder++;
- }
- _methods.Insert(0, _filterMethod);
- }
-
- for (int k = 0; k < _binds.Size(); k++)
+ FOR_VECTOR (k, _bonds)
{
- const CBind &bind = _binds[k];
- if (bind.InCoder >= (UInt32)_methods.Size() ||
- bind.OutCoder >= (UInt32)_methods.Size())
+ const CBond2 &bond = _bonds[k];
+ if (bond.InCoder >= (UInt32)_methods.Size() ||
+ bond.OutCoder >= (UInt32)_methods.Size())
return E_INVALIDARG;
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zHeader.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zHeader.cpp
index 5b5f2fb3755..acff2fdd8d9 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zHeader.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zHeader.cpp
@@ -1,6 +1,7 @@
// 7zHeader.cpp
#include "StdAfx.h"
+
#include "7zHeader.h"
namespace NArchive {
@@ -11,4 +12,8 @@ Byte kSignature[kSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C};
Byte kFinishSignature[kSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C + 1};
#endif
+// We can change signature. So file doesn't contain correct signature.
+// struct SignatureInitializer { SignatureInitializer() { kSignature[0]--; } };
+// static SignatureInitializer g_SignatureInitializer;
+
}}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zHeader.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zHeader.h
index 30622b90e83..d7f0ae365b9 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zHeader.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zHeader.h
@@ -3,12 +3,12 @@
#ifndef __7Z_HEADER_H
#define __7Z_HEADER_H
-#include "../../../Common/Types.h"
+#include "../../../Common/MyTypes.h"
namespace NArchive {
namespace N7z {
-const int kSignatureSize = 6;
+const unsigned kSignatureSize = 6;
extern Byte kSignature[kSignatureSize];
// #define _7Z_VOL
@@ -82,16 +82,67 @@ namespace NID
kCTime,
kATime,
kMTime,
- kWinAttributes,
+ kWinAttrib,
kComment,
kEncodedHeader,
kStartPos,
kDummy
+
+ // kNtSecure,
+ // kParent,
+ // kIsAux
};
}
+
+const UInt32 k_Copy = 0;
+const UInt32 k_Delta = 3;
+
+const UInt32 k_LZMA2 = 0x21;
+
+const UInt32 k_SWAP2 = 0x20302;
+const UInt32 k_SWAP4 = 0x20304;
+
+const UInt32 k_LZMA = 0x30101;
+const UInt32 k_PPMD = 0x30401;
+
+const UInt32 k_Deflate = 0x40108;
+const UInt32 k_BZip2 = 0x40202;
+
+const UInt32 k_BCJ = 0x3030103;
+const UInt32 k_BCJ2 = 0x303011B;
+const UInt32 k_PPC = 0x3030205;
+const UInt32 k_IA64 = 0x3030401;
+const UInt32 k_ARM = 0x3030501;
+const UInt32 k_ARMT = 0x3030701;
+const UInt32 k_SPARC = 0x3030805;
+
+const UInt32 k_AES = 0x6F10701;
+
+
+static inline bool IsFilterMethod(UInt64 m)
+{
+ if (m > (UInt64)0xFFFFFFFF)
+ return false;
+ switch ((UInt32)m)
+ {
+ case k_Delta:
+ case k_BCJ:
+ case k_BCJ2:
+ case k_PPC:
+ case k_IA64:
+ case k_ARM:
+ case k_ARMT:
+ case k_SPARC:
+ case k_SWAP2:
+ case k_SWAP4:
+ return true;
+ }
+ return false;
+}
+
}}
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zIn.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zIn.cpp
index fd751a7483f..fc527be653b 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zIn.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zIn.cpp
@@ -2,6 +2,12 @@
#include "StdAfx.h"
+#ifdef _WIN32
+#include <wchar.h>
+#else
+#include <ctype.h>
+#endif
+
#include "../../../../C/7zCrc.h"
#include "../../../../C/CpuArch.h"
@@ -20,127 +26,38 @@
#define FORMAT_7Z_RECOVERY
#endif
+using namespace NWindows;
+using namespace NCOM;
+
namespace NArchive {
namespace N7z {
-static void BoolVector_Fill_False(CBoolVector &v, int size)
-{
- v.Clear();
- v.Reserve(size);
- for (int i = 0; i < size; i++)
- v.Add(false);
-}
-
-static bool BoolVector_GetAndSet(CBoolVector &v, UInt32 index)
+static void BoolVector_Fill_False(CBoolVector &v, unsigned size)
{
- if (index >= (UInt32)v.Size())
- return true;
- bool res = v[index];
- v[index] = true;
- return res;
-}
-
-bool CFolder::CheckStructure() const
-{
- const int kNumCodersMax = sizeof(UInt32) * 8; // don't change it
- const int kMaskSize = sizeof(UInt32) * 8; // it must be >= kNumCodersMax
- const int kNumBindsMax = 32;
-
- if (Coders.Size() > kNumCodersMax || BindPairs.Size() > kNumBindsMax)
- return false;
-
- {
- CBoolVector v;
- BoolVector_Fill_False(v, BindPairs.Size() + PackStreams.Size());
-
- int i;
- for (i = 0; i < BindPairs.Size(); i++)
- if (BoolVector_GetAndSet(v, BindPairs[i].InIndex))
- return false;
- for (i = 0; i < PackStreams.Size(); i++)
- if (BoolVector_GetAndSet(v, PackStreams[i]))
- return false;
-
- BoolVector_Fill_False(v, UnpackSizes.Size());
- for (i = 0; i < BindPairs.Size(); i++)
- if (BoolVector_GetAndSet(v, BindPairs[i].OutIndex))
- return false;
- }
-
- UInt32 mask[kMaskSize];
- int i;
- for (i = 0; i < kMaskSize; i++)
- mask[i] = 0;
-
- {
- CIntVector inStreamToCoder, outStreamToCoder;
- for (i = 0; i < Coders.Size(); i++)
- {
- CNum j;
- const CCoderInfo &coder = Coders[i];
- for (j = 0; j < coder.NumInStreams; j++)
- inStreamToCoder.Add(i);
- for (j = 0; j < coder.NumOutStreams; j++)
- outStreamToCoder.Add(i);
- }
-
- for (i = 0; i < BindPairs.Size(); i++)
- {
- const CBindPair &bp = BindPairs[i];
- mask[inStreamToCoder[bp.InIndex]] |= (1 << outStreamToCoder[bp.OutIndex]);
- }
- }
-
- for (i = 0; i < kMaskSize; i++)
- for (int j = 0; j < kMaskSize; j++)
- if (((1 << j) & mask[i]) != 0)
- mask[i] |= mask[j];
-
- for (i = 0; i < kMaskSize; i++)
- if (((1 << i) & mask[i]) != 0)
- return false;
-
- return true;
+ v.ClearAndSetSize(size);
+ bool *p = &v[0];
+ for (unsigned i = 0; i < size; i++)
+ p[i] = false;
}
class CInArchiveException {};
+class CUnsupportedFeatureException: public CInArchiveException {};
static void ThrowException() { throw CInArchiveException(); }
static inline void ThrowEndOfData() { ThrowException(); }
-static inline void ThrowUnsupported() { ThrowException(); }
+static inline void ThrowUnsupported() { throw CUnsupportedFeatureException(); }
static inline void ThrowIncorrect() { ThrowException(); }
-static inline void ThrowUnsupportedVersion() { ThrowException(); }
-
-/*
-class CInArchiveException
-{
-public:
- enum CCauseType
- {
- kUnsupportedVersion = 0,
- kUnsupported,
- kIncorrect,
- kEndOfData
- } Cause;
- CInArchiveException(CCauseType cause): Cause(cause) {};
-};
-
-static void ThrowException(CInArchiveException::CCauseType c) { throw CInArchiveException(c); }
-static void ThrowEndOfData() { ThrowException(CInArchiveException::kEndOfData); }
-static void ThrowUnsupported() { ThrowException(CInArchiveException::kUnsupported); }
-static void ThrowIncorrect() { ThrowException(CInArchiveException::kIncorrect); }
-static void ThrowUnsupportedVersion() { ThrowException(CInArchiveException::kUnsupportedVersion); }
-*/
class CStreamSwitch
{
CInArchive *_archive;
bool _needRemove;
+ bool _needUpdatePos;
public:
- CStreamSwitch(): _needRemove(false) {}
+ CStreamSwitch(): _needRemove(false), _needUpdatePos(false) {}
~CStreamSwitch() { Remove(); }
void Remove();
- void Set(CInArchive *archive, const Byte *data, size_t size);
+ void Set(CInArchive *archive, const Byte *data, size_t size, bool needUpdatePos);
void Set(CInArchive *archive, const CByteBuffer &byteBuffer);
void Set(CInArchive *archive, const CObjectVector<CByteBuffer> *dataVector);
};
@@ -149,22 +66,25 @@ void CStreamSwitch::Remove()
{
if (_needRemove)
{
- _archive->DeleteByteStream();
+ if (_archive->_inByteBack->GetRem() != 0)
+ _archive->ThereIsHeaderError = true;
+ _archive->DeleteByteStream(_needUpdatePos);
_needRemove = false;
}
}
-void CStreamSwitch::Set(CInArchive *archive, const Byte *data, size_t size)
+void CStreamSwitch::Set(CInArchive *archive, const Byte *data, size_t size, bool needUpdatePos)
{
Remove();
_archive = archive;
_archive->AddByteStream(data, size);
_needRemove = true;
+ _needUpdatePos = needUpdatePos;
}
void CStreamSwitch::Set(CInArchive *archive, const CByteBuffer &byteBuffer)
{
- Set(archive, byteBuffer, byteBuffer.GetCapacity());
+ Set(archive, byteBuffer, byteBuffer.Size(), false);
}
void CStreamSwitch::Set(CInArchive *archive, const CObjectVector<CByteBuffer> *dataVector)
@@ -173,13 +93,22 @@ void CStreamSwitch::Set(CInArchive *archive, const CObjectVector<CByteBuffer> *d
Byte external = archive->ReadByte();
if (external != 0)
{
- int dataIndex = (int)archive->ReadNum();
- if (dataIndex < 0 || dataIndex >= dataVector->Size())
+ CNum dataIndex = archive->ReadNum();
+ if (dataIndex >= dataVector->Size())
ThrowIncorrect();
Set(archive, (*dataVector)[dataIndex]);
}
}
+void CInArchive::AddByteStream(const Byte *buf, size_t size)
+{
+ if (_numInByteBufs == kNumBufLevelsMax)
+ ThrowIncorrect();
+ _inByteBack = &_inByteVector[_numInByteBufs++];
+ _inByteBack->Init(buf, size);
+}
+
+
Byte CInByte2::ReadByte()
{
if (_pos >= _size)
@@ -189,10 +118,12 @@ Byte CInByte2::ReadByte()
void CInByte2::ReadBytes(Byte *data, size_t size)
{
+ if (size == 0)
+ return;
if (size > _size - _pos)
ThrowEndOfData();
- for (size_t i = 0; i < size; i++)
- data[i] = _buffer[_pos++];
+ memcpy(data, _buffer + _pos, size);
+ _pos += size;
}
void CInByte2::SkipData(UInt64 size)
@@ -207,31 +138,82 @@ void CInByte2::SkipData()
SkipData(ReadNumber());
}
-UInt64 CInByte2::ReadNumber()
+static UInt64 ReadNumberSpec(const Byte *p, size_t size, size_t &processed)
{
- if (_pos >= _size)
- ThrowEndOfData();
- Byte firstByte = _buffer[_pos++];
- Byte mask = 0x80;
- UInt64 value = 0;
- for (int i = 0; i < 8; i++)
+ if (size == 0)
+ {
+ processed = 0;
+ return 0;
+ }
+
+ unsigned b = *p++;
+ size--;
+
+ if ((b & 0x80) == 0)
+ {
+ processed = 1;
+ return b;
+ }
+
+ if (size == 0)
{
- if ((firstByte & mask) == 0)
+ processed = 0;
+ return 0;
+ }
+
+ UInt64 value = (UInt64)*p;
+ p++;
+ size--;
+
+ for (unsigned i = 1; i < 8; i++)
+ {
+ unsigned mask = (unsigned)0x80 >> i;
+ if ((b & mask) == 0)
{
- UInt64 highPart = firstByte & (mask - 1);
- value += (highPart << (i * 8));
+ UInt64 high = b & (mask - 1);
+ value |= (high << (i * 8));
+ processed = i + 1;
return value;
}
- if (_pos >= _size)
- ThrowEndOfData();
- value |= ((UInt64)_buffer[_pos++] << (8 * i));
- mask >>= 1;
+
+ if (size == 0)
+ {
+ processed = 0;
+ return 0;
+ }
+
+ value |= ((UInt64)*p << (i * 8));
+ p++;
+ size--;
}
+
+ processed = 9;
return value;
}
+UInt64 CInByte2::ReadNumber()
+{
+ size_t processed;
+ UInt64 res = ReadNumberSpec(_buffer + _pos, _size - _pos, processed);
+ if (processed == 0)
+ ThrowEndOfData();
+ _pos += processed;
+ return res;
+}
+
CNum CInByte2::ReadNum()
{
+ /*
+ if (_pos < _size)
+ {
+ Byte val = _buffer[_pos];
+ if ((unsigned)val < 0x80)
+ {
+ _pos++;
+ return (unsigned)val;
+ }
+ }
+ */
UInt64 value = ReadNumber();
if (value > kNumMax)
ThrowUnsupported();
@@ -256,48 +238,21 @@ UInt64 CInByte2::ReadUInt64()
return res;
}
-void CInByte2::ReadString(UString &s)
-{
- const Byte *buf = _buffer + _pos;
- size_t rem = (_size - _pos) / 2 * 2;
- {
- size_t i;
- for (i = 0; i < rem; i += 2)
- if (buf[i] == 0 && buf[i + 1] == 0)
- break;
- if (i == rem)
- ThrowEndOfData();
- rem = i;
- }
- int len = (int)(rem / 2);
- if (len < 0 || (size_t)len * 2 != rem)
- ThrowUnsupported();
- wchar_t *p = s.GetBuffer(len);
- int i;
- for (i = 0; i < len; i++, buf += 2)
- p[i] = (wchar_t)Get16(buf);
- s.ReleaseBuffer(len);
- _pos += rem + 2;
-}
+#define CHECK_SIGNATURE if (p[0] != '7' || p[1] != 'z' || p[2] != 0xBC || p[3] != 0xAF || p[4] != 0x27 || p[5] != 0x1C) return false;
static inline bool TestSignature(const Byte *p)
{
- for (int i = 0; i < kSignatureSize; i++)
- if (p[i] != kSignature[i])
- return false;
- return CrcCalc(p + 12, 20) == GetUi32(p + 8);
+ CHECK_SIGNATURE
+ return CrcCalc(p + 12, 20) == Get32(p + 8);
}
#ifdef FORMAT_7Z_RECOVERY
static inline bool TestSignature2(const Byte *p)
{
- int i;
- for (i = 0; i < kSignatureSize; i++)
- if (p[i] != kSignature[i])
- return false;
- if (CrcCalc(p + 12, 20) == GetUi32(p + 8))
+ CHECK_SIGNATURE;
+ if (CrcCalc(p + 12, 20) == Get32(p + 8))
return true;
- for (i = 8; i < kHeaderSize; i++)
+ for (unsigned i = 8; i < kHeaderSize; i++)
if (p[i] != 0)
return false;
return (p[6] != 0 || p[7] != 0);
@@ -312,39 +267,56 @@ HRESULT CInArchive::FindAndReadSignature(IInStream *stream, const UInt64 *search
if (TestSignature2(_header))
return S_OK;
+ if (searchHeaderSizeLimit && *searchHeaderSizeLimit == 0)
+ return S_FALSE;
- CByteBuffer byteBuffer;
- const UInt32 kBufferSize = (1 << 16);
- byteBuffer.SetCapacity(kBufferSize);
- Byte *buffer = byteBuffer;
- memcpy(buffer, _header, kHeaderSize);
- UInt64 curTestPos = _arhiveBeginStreamPosition;
+ const UInt32 kBufSize = 1 << 15;
+ CByteArr buf(kBufSize);
+ memcpy(buf, _header, kHeaderSize);
+ UInt64 offset = 0;
+
for (;;)
{
- if (searchHeaderSizeLimit != NULL)
- if (curTestPos - _arhiveBeginStreamPosition > *searchHeaderSizeLimit)
- break;
- UInt32 processedSize;
- RINOK(stream->Read(buffer + kHeaderSize, kBufferSize - kHeaderSize, &processedSize));
- if (processedSize == 0)
+ UInt32 readSize = kBufSize - kHeaderSize;
+ if (searchHeaderSizeLimit)
+ {
+ UInt64 rem = *searchHeaderSizeLimit - offset;
+ if (readSize > rem)
+ readSize = (UInt32)rem;
+ if (readSize == 0)
+ return S_FALSE;
+ }
+
+ UInt32 processed = 0;
+ RINOK(stream->Read(buf + kHeaderSize, readSize, &processed));
+ if (processed == 0)
return S_FALSE;
- for (UInt32 pos = 1; pos <= processedSize; pos++)
+
+ for (UInt32 pos = 0;;)
{
- for (; buffer[pos] != '7' && pos <= processedSize; pos++);
- if (pos > processedSize)
+ const Byte *p = buf + pos + 1;
+ const Byte *lim = buf + processed;
+ for (; p <= lim; p += 4)
+ {
+ if (p[0] == '7') break;
+ if (p[1] == '7') { p += 1; break; }
+ if (p[2] == '7') { p += 2; break; }
+ if (p[3] == '7') { p += 3; break; }
+ };
+ if (p > lim)
break;
- if (TestSignature(buffer + pos))
+ pos = (UInt32)(p - buf);
+ if (TestSignature(p))
{
- memcpy(_header, buffer + pos, kHeaderSize);
- curTestPos += pos;
- _arhiveBeginStreamPosition = curTestPos;
- return stream->Seek(curTestPos + kHeaderSize, STREAM_SEEK_SET, NULL);
+ memcpy(_header, p, kHeaderSize);
+ _arhiveBeginStreamPosition += offset + pos;
+ return stream->Seek(_arhiveBeginStreamPosition + kHeaderSize, STREAM_SEEK_SET, NULL);
}
}
- curTestPos += processedSize;
- memmove(buffer, buffer + processedSize, kHeaderSize);
+
+ offset += processed;
+ memmove(buf, buf + processed, kHeaderSize);
}
- return S_FALSE;
}
// S_FALSE means that file is not archive
@@ -362,7 +334,9 @@ HRESULT CInArchive::Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit)
void CInArchive::Close()
{
+ _numInByteBufs = 0;
_stream.Release();
+ ThereIsHeaderError = false;
}
void CInArchive::ReadArchiveProperties(CInArchiveInfo & /* archiveInfo */)
@@ -375,92 +349,214 @@ void CInArchive::ReadArchiveProperties(CInArchiveInfo & /* archiveInfo */)
}
}
-void CInArchive::GetNextFolderItem(CFolder &folder)
+// CFolder &folder can be non empty. So we must set all fields
+
+void CInByte2::ParseFolder(CFolder &folder)
{
- CNum numCoders = ReadNum();
+ UInt32 numCoders = ReadNum();
- folder.Coders.Clear();
- folder.Coders.Reserve((int)numCoders);
- CNum numInStreams = 0;
- CNum numOutStreams = 0;
- CNum i;
+ if (numCoders == 0)
+ ThrowUnsupported();
+
+ folder.Coders.SetSize(numCoders);
+
+ UInt32 numInStreams = 0;
+ UInt32 i;
for (i = 0; i < numCoders; i++)
{
- folder.Coders.Add(CCoderInfo());
- CCoderInfo &coder = folder.Coders.Back();
-
+ CCoderInfo &coder = folder.Coders[i];
{
Byte mainByte = ReadByte();
- int idSize = (mainByte & 0xF);
- Byte longID[15];
- ReadBytes(longID, idSize);
- if (idSize > 8)
+ if ((mainByte & 0xC0) != 0)
ThrowUnsupported();
+ unsigned idSize = (mainByte & 0xF);
+ if (idSize > 8 || idSize > GetRem())
+ ThrowUnsupported();
+ const Byte *longID = GetPtr();
UInt64 id = 0;
- for (int j = 0; j < idSize; j++)
- id |= (UInt64)longID[idSize - 1 - j] << (8 * j);
+ for (unsigned j = 0; j < idSize; j++)
+ id = ((id << 8) | longID[j]);
+ SkipDataNoCheck(idSize);
coder.MethodID = id;
if ((mainByte & 0x10) != 0)
{
- coder.NumInStreams = ReadNum();
- coder.NumOutStreams = ReadNum();
+ coder.NumStreams = ReadNum();
+ /* numOutStreams = */ ReadNum();
}
else
{
- coder.NumInStreams = 1;
- coder.NumOutStreams = 1;
+ coder.NumStreams = 1;
}
+
if ((mainByte & 0x20) != 0)
{
CNum propsSize = ReadNum();
- coder.Props.SetCapacity((size_t)propsSize);
+ coder.Props.Alloc((size_t)propsSize);
ReadBytes((Byte *)coder.Props, (size_t)propsSize);
}
- if ((mainByte & 0x80) != 0)
- ThrowUnsupported();
+ else
+ coder.Props.Free();
}
- numInStreams += coder.NumInStreams;
- numOutStreams += coder.NumOutStreams;
+ numInStreams += coder.NumStreams;
}
- CNum numBindPairs = numOutStreams - 1;
- folder.BindPairs.Clear();
- folder.BindPairs.Reserve(numBindPairs);
- for (i = 0; i < numBindPairs; i++)
+ UInt32 numBonds = numCoders - 1;
+ folder.Bonds.SetSize(numBonds);
+ for (i = 0; i < numBonds; i++)
{
- CBindPair bp;
- bp.InIndex = ReadNum();
- bp.OutIndex = ReadNum();
- folder.BindPairs.Add(bp);
+ CBond &bp = folder.Bonds[i];
+ bp.PackIndex = ReadNum();
+ bp.UnpackIndex = ReadNum();
}
- if (numInStreams < numBindPairs)
+ if (numInStreams < numBonds)
ThrowUnsupported();
- CNum numPackStreams = numInStreams - numBindPairs;
- folder.PackStreams.Reserve(numPackStreams);
+ UInt32 numPackStreams = numInStreams - numBonds;
+ folder.PackStreams.SetSize(numPackStreams);
+
if (numPackStreams == 1)
{
for (i = 0; i < numInStreams; i++)
- if (folder.FindBindPairForInStream(i) < 0)
+ if (folder.FindBond_for_PackStream(i) < 0)
{
- folder.PackStreams.Add(i);
+ folder.PackStreams[0] = i;
break;
}
- if (folder.PackStreams.Size() != 1)
+ if (i == numInStreams)
ThrowUnsupported();
}
else
for (i = 0; i < numPackStreams; i++)
- folder.PackStreams.Add(ReadNum());
+ folder.PackStreams[i] = ReadNum();
+}
+
+void CFolders::ParseFolderInfo(unsigned folderIndex, CFolder &folder) const
+{
+ size_t startPos = FoCodersDataOffset[folderIndex];
+ CInByte2 inByte;
+ inByte.Init(CodersData + startPos, FoCodersDataOffset[folderIndex + 1] - startPos);
+ inByte.ParseFolder(folder);
+ if (inByte.GetRem() != 0)
+ throw 20120424;
+}
+
+
+void CDatabase::GetPath(unsigned index, UString &path) const
+{
+ path.Empty();
+ if (!NameOffsets || !NamesBuf)
+ return;
+
+ size_t offset = NameOffsets[index];
+ size_t size = NameOffsets[index + 1] - offset;
+
+ if (size >= (1 << 28))
+ return;
+
+ wchar_t *s = path.GetBuf((unsigned)size - 1);
+
+ const Byte *p = ((const Byte *)NamesBuf + offset * 2);
+
+ #if defined(_WIN32) && defined(MY_CPU_LE)
+
+ wmemcpy(s, (const wchar_t *)p, size);
+
+ #else
+
+ for (size_t i = 0; i < size; i++)
+ {
+ *s = Get16(p);
+ p += 2;
+ s++;
+ }
+
+ #endif
+
+ path.ReleaseBuf_SetLen((unsigned)size - 1);
+}
+
+HRESULT CDatabase::GetPath_Prop(unsigned index, PROPVARIANT *path) const throw()
+{
+ PropVariant_Clear(path);
+ if (!NameOffsets || !NamesBuf)
+ return S_OK;
+
+ size_t offset = NameOffsets[index];
+ size_t size = NameOffsets[index + 1] - offset;
+
+ if (size >= (1 << 14))
+ return S_OK;
+
+ RINOK(PropVarEm_Alloc_Bstr(path, (unsigned)size - 1));
+ wchar_t *s = path->bstrVal;
+
+ const Byte *p = ((const Byte *)NamesBuf + offset * 2);
+
+ for (size_t i = 0; i < size; i++)
+ {
+ wchar_t c = Get16(p);
+ p += 2;
+ #if WCHAR_PATH_SEPARATOR != L'/'
+ if (c == L'/')
+ c = WCHAR_PATH_SEPARATOR;
+ #endif
+ *s++ = c;
+ }
+
+ return S_OK;
+
+ /*
+ unsigned cur = index;
+ unsigned size = 0;
+
+ for (int i = 0;; i++)
+ {
+ size_t len = NameOffsets[cur + 1] - NameOffsets[cur];
+ size += (unsigned)len;
+ if (i > 256 || len > (1 << 14) || size > (1 << 14))
+ return PropVarEm_Set_Str(path, "[TOO-LONG]");
+ cur = Files[cur].Parent;
+ if (cur < 0)
+ break;
+ }
+ size--;
+
+ RINOK(PropVarEm_Alloc_Bstr(path, size));
+ wchar_t *s = path->bstrVal;
+ s += size;
+ *s = 0;
+ cur = index;
+
+ for (;;)
+ {
+ unsigned len = (unsigned)(NameOffsets[cur + 1] - NameOffsets[cur] - 1);
+ const Byte *p = (const Byte *)NamesBuf + (NameOffsets[cur + 1] * 2) - 2;
+ for (; len != 0; len--)
+ {
+ p -= 2;
+ --s;
+ wchar_t c = Get16(p);
+ if (c == '/')
+ c = WCHAR_PATH_SEPARATOR;
+ *s = c;
+ }
+
+ const CFileItem &file = Files[cur];
+ cur = file.Parent;
+ if (cur < 0)
+ return S_OK;
+ *(--s) = (file.IsAltStream ? ':' : WCHAR_PATH_SEPARATOR);
+ }
+ */
}
-void CInArchive::WaitAttribute(UInt64 attribute)
+void CInArchive::WaitId(UInt64 id)
{
for (;;)
{
UInt64 type = ReadID();
- if (type == attribute)
+ if (type == id)
return;
if (type == NID::kEnd)
ThrowIncorrect();
@@ -468,91 +564,219 @@ void CInArchive::WaitAttribute(UInt64 attribute)
}
}
-void CInArchive::ReadHashDigests(int numItems,
- CBoolVector &digestsDefined,
- CRecordVector<UInt32> &digests)
+void CInArchive::ReadHashDigests(unsigned numItems, CUInt32DefVector &crcs)
{
- ReadBoolVector2(numItems, digestsDefined);
- digests.Clear();
- digests.Reserve(numItems);
- for (int i = 0; i < numItems; i++)
+ ReadBoolVector2(numItems, crcs.Defs);
+ crcs.Vals.ClearAndSetSize(numItems);
+ UInt32 *p = &crcs.Vals[0];
+ const bool *defs = &crcs.Defs[0];
+ for (unsigned i = 0; i < numItems; i++)
{
UInt32 crc = 0;
- if (digestsDefined[i])
+ if (defs[i])
crc = ReadUInt32();
- digests.Add(crc);
+ p[i] = crc;
}
}
-void CInArchive::ReadPackInfo(
- UInt64 &dataOffset,
- CRecordVector<UInt64> &packSizes,
- CBoolVector &packCRCsDefined,
- CRecordVector<UInt32> &packCRCs)
+#define k_Scan_NumCoders_MAX 64
+#define k_Scan_NumCodersStreams_in_Folder_MAX 64
+
+void CInArchive::ReadPackInfo(CFolders &f)
{
- dataOffset = ReadNumber();
CNum numPackStreams = ReadNum();
-
- WaitAttribute(NID::kSize);
- packSizes.Clear();
- packSizes.Reserve(numPackStreams);
+
+ WaitId(NID::kSize);
+ f.PackPositions.Alloc(numPackStreams + 1);
+ f.NumPackStreams = numPackStreams;
+ UInt64 sum = 0;
for (CNum i = 0; i < numPackStreams; i++)
- packSizes.Add(ReadNumber());
+ {
+ f.PackPositions[i] = sum;
+ UInt64 packSize = ReadNumber();
+ sum += packSize;
+ if (sum < packSize)
+ ThrowIncorrect();
+ }
+ f.PackPositions[numPackStreams] = sum;
UInt64 type;
for (;;)
{
type = ReadID();
if (type == NID::kEnd)
- break;
+ return;
if (type == NID::kCRC)
{
- ReadHashDigests(numPackStreams, packCRCsDefined, packCRCs);
+ CUInt32DefVector PackCRCs;
+ ReadHashDigests(numPackStreams, PackCRCs);
continue;
}
SkipData();
}
- if (packCRCsDefined.IsEmpty())
- {
- BoolVector_Fill_False(packCRCsDefined, numPackStreams);
- packCRCs.Reserve(numPackStreams);
- packCRCs.Clear();
- for (CNum i = 0; i < numPackStreams; i++)
- packCRCs.Add(0);
- }
}
void CInArchive::ReadUnpackInfo(
const CObjectVector<CByteBuffer> *dataVector,
- CObjectVector<CFolder> &folders)
+ CFolders &folders)
{
- WaitAttribute(NID::kFolder);
+ WaitId(NID::kFolder);
CNum numFolders = ReadNum();
+ CNum numCodersOutStreams = 0;
{
CStreamSwitch streamSwitch;
streamSwitch.Set(this, dataVector);
- folders.Clear();
- folders.Reserve(numFolders);
- for (CNum i = 0; i < numFolders; i++)
+ const Byte *startBufPtr = _inByteBack->GetPtr();
+ folders.NumFolders = numFolders;
+
+ folders.FoStartPackStreamIndex.Alloc(numFolders + 1);
+ folders.FoToMainUnpackSizeIndex.Alloc(numFolders);
+ folders.FoCodersDataOffset.Alloc(numFolders + 1);
+ folders.FoToCoderUnpackSizes.Alloc(numFolders + 1);
+
+ CBoolVector StreamUsed;
+ CBoolVector CoderUsed;
+
+ CNum packStreamIndex = 0;
+ CNum fo;
+ CInByte2 *inByte = _inByteBack;
+
+ for (fo = 0; fo < numFolders; fo++)
{
- folders.Add(CFolder());
- GetNextFolderItem(folders.Back());
- }
- }
+ UInt32 indexOfMainStream = 0;
+ UInt32 numPackStreams = 0;
+ folders.FoCodersDataOffset[fo] = _inByteBack->GetPtr() - startBufPtr;
- WaitAttribute(NID::kCodersUnpackSize);
+ CNum numInStreams = 0;
+ CNum numCoders = inByte->ReadNum();
+
+ if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX)
+ ThrowUnsupported();
- CNum i;
- for (i = 0; i < numFolders; i++)
- {
- CFolder &folder = folders[i];
- CNum numOutStreams = folder.GetNumOutStreams();
- folder.UnpackSizes.Reserve(numOutStreams);
- for (CNum j = 0; j < numOutStreams; j++)
- folder.UnpackSizes.Add(ReadNumber());
+ for (CNum ci = 0; ci < numCoders; ci++)
+ {
+ Byte mainByte = inByte->ReadByte();
+ if ((mainByte & 0xC0) != 0)
+ ThrowUnsupported();
+
+ unsigned idSize = (mainByte & 0xF);
+ if (idSize > 8)
+ ThrowUnsupported();
+ if (idSize > inByte->GetRem())
+ ThrowEndOfData();
+ const Byte *longID = inByte->GetPtr();
+ UInt64 id = 0;
+ for (unsigned j = 0; j < idSize; j++)
+ id = ((id << 8) | longID[j]);
+ inByte->SkipDataNoCheck(idSize);
+ if (folders.ParsedMethods.IDs.Size() < 128)
+ folders.ParsedMethods.IDs.AddToUniqueSorted(id);
+
+ CNum coderInStreams = 1;
+ if ((mainByte & 0x10) != 0)
+ {
+ coderInStreams = inByte->ReadNum();
+ if (coderInStreams > k_Scan_NumCodersStreams_in_Folder_MAX)
+ ThrowUnsupported();
+ if (inByte->ReadNum() != 1)
+ ThrowUnsupported();
+ }
+
+ numInStreams += coderInStreams;
+ if (numInStreams > k_Scan_NumCodersStreams_in_Folder_MAX)
+ ThrowUnsupported();
+
+ if ((mainByte & 0x20) != 0)
+ {
+ CNum propsSize = inByte->ReadNum();
+ if (propsSize > inByte->GetRem())
+ ThrowEndOfData();
+ if (id == k_LZMA2 && propsSize == 1)
+ {
+ Byte v = *_inByteBack->GetPtr();
+ if (folders.ParsedMethods.Lzma2Prop < v)
+ folders.ParsedMethods.Lzma2Prop = v;
+ }
+ else if (id == k_LZMA && propsSize == 5)
+ {
+ UInt32 dicSize = GetUi32(_inByteBack->GetPtr() + 1);
+ if (folders.ParsedMethods.LzmaDic < dicSize)
+ folders.ParsedMethods.LzmaDic = dicSize;
+ }
+ inByte->SkipDataNoCheck((size_t)propsSize);
+ }
+ }
+
+ if (numCoders == 1 && numInStreams == 1)
+ {
+ indexOfMainStream = 0;
+ numPackStreams = 1;
+ }
+ else
+ {
+ UInt32 i;
+ CNum numBonds = numCoders - 1;
+ if (numInStreams < numBonds)
+ ThrowUnsupported();
+
+ BoolVector_Fill_False(StreamUsed, numInStreams);
+ BoolVector_Fill_False(CoderUsed, numCoders);
+
+ for (i = 0; i < numBonds; i++)
+ {
+ CNum index = ReadNum();
+ if (index >= numInStreams || StreamUsed[index])
+ ThrowUnsupported();
+ StreamUsed[index] = true;
+
+ index = ReadNum();
+ if (index >= numCoders || CoderUsed[index])
+ ThrowUnsupported();
+ CoderUsed[index] = true;
+ }
+
+ numPackStreams = numInStreams - numBonds;
+
+ if (numPackStreams != 1)
+ for (i = 0; i < numPackStreams; i++)
+ {
+ CNum index = inByte->ReadNum(); // PackStreams
+ if (index >= numInStreams || StreamUsed[index])
+ ThrowUnsupported();
+ StreamUsed[index] = true;
+ }
+
+ for (i = 0; i < numCoders; i++)
+ if (!CoderUsed[i])
+ {
+ indexOfMainStream = i;
+ break;
+ }
+
+ if (i == numCoders)
+ ThrowUnsupported();
+ }
+
+ folders.FoToCoderUnpackSizes[fo] = numCodersOutStreams;
+ numCodersOutStreams += numCoders;
+ folders.FoStartPackStreamIndex[fo] = packStreamIndex;
+ packStreamIndex += numPackStreams;
+ folders.FoToMainUnpackSizeIndex[fo] = (Byte)indexOfMainStream;
+ }
+
+ size_t dataSize = _inByteBack->GetPtr() - startBufPtr;
+ folders.FoToCoderUnpackSizes[fo] = numCodersOutStreams;
+ folders.FoStartPackStreamIndex[fo] = packStreamIndex;
+ folders.FoCodersDataOffset[fo] = _inByteBack->GetPtr() - startBufPtr;
+ folders.CodersData.CopyFrom(startBufPtr, dataSize);
}
+ WaitId(NID::kCodersUnpackSize);
+ folders.CoderUnpackSizes.Alloc(numCodersOutStreams);
+ for (CNum i = 0; i < numCodersOutStreams; i++)
+ folders.CoderUnpackSizes[i] = ReadNumber();
+
for (;;)
{
UInt64 type = ReadID();
@@ -560,15 +784,7 @@ void CInArchive::ReadUnpackInfo(
return;
if (type == NID::kCRC)
{
- CBoolVector crcsDefined;
- CRecordVector<UInt32> crcs;
- ReadHashDigests(numFolders, crcsDefined, crcs);
- for (i = 0; i < numFolders; i++)
- {
- CFolder &folder = folders[i];
- folder.UnpackCRCDefined = crcsDefined[i];
- folder.UnpackCRC = crcs[i];
- }
+ ReadHashDigests(numFolders, folders.FolderCRCs);
continue;
}
SkipData();
@@ -576,170 +792,217 @@ void CInArchive::ReadUnpackInfo(
}
void CInArchive::ReadSubStreamsInfo(
- const CObjectVector<CFolder> &folders,
- CRecordVector<CNum> &numUnpackStreamsInFolders,
+ CFolders &folders,
CRecordVector<UInt64> &unpackSizes,
- CBoolVector &digestsDefined,
- CRecordVector<UInt32> &digests)
+ CUInt32DefVector &digests)
{
- numUnpackStreamsInFolders.Clear();
- numUnpackStreamsInFolders.Reserve(folders.Size());
+ folders.NumUnpackStreamsVector.Alloc(folders.NumFolders);
+ CNum i;
+ for (i = 0; i < folders.NumFolders; i++)
+ folders.NumUnpackStreamsVector[i] = 1;
+
UInt64 type;
+
for (;;)
{
type = ReadID();
if (type == NID::kNumUnpackStream)
{
- for (int i = 0; i < folders.Size(); i++)
- numUnpackStreamsInFolders.Add(ReadNum());
+ for (i = 0; i < folders.NumFolders; i++)
+ folders.NumUnpackStreamsVector[i] = ReadNum();
continue;
}
- if (type == NID::kCRC || type == NID::kSize)
- break;
- if (type == NID::kEnd)
+ if (type == NID::kCRC || type == NID::kSize || type == NID::kEnd)
break;
SkipData();
}
- if (numUnpackStreamsInFolders.IsEmpty())
- for (int i = 0; i < folders.Size(); i++)
- numUnpackStreamsInFolders.Add(1);
-
- int i;
- for (i = 0; i < numUnpackStreamsInFolders.Size(); i++)
+ if (type == NID::kSize)
{
- // v3.13 incorrectly worked with empty folders
- // v4.07: we check that folder is empty
- CNum numSubstreams = numUnpackStreamsInFolders[i];
- if (numSubstreams == 0)
- continue;
- UInt64 sum = 0;
- for (CNum j = 1; j < numSubstreams; j++)
- if (type == NID::kSize)
+ for (i = 0; i < folders.NumFolders; i++)
+ {
+ // v3.13 incorrectly worked with empty folders
+ // v4.07: we check that folder is empty
+ CNum numSubstreams = folders.NumUnpackStreamsVector[i];
+ if (numSubstreams == 0)
+ continue;
+ UInt64 sum = 0;
+ for (CNum j = 1; j < numSubstreams; j++)
{
UInt64 size = ReadNumber();
unpackSizes.Add(size);
sum += size;
+ if (sum < size)
+ ThrowIncorrect();
}
- unpackSizes.Add(folders[i].GetUnpackSize() - sum);
- }
- if (type == NID::kSize)
+ UInt64 folderUnpackSize = folders.GetFolderUnpackSize(i);
+ if (folderUnpackSize < sum)
+ ThrowIncorrect();
+ unpackSizes.Add(folderUnpackSize - sum);
+ }
type = ReadID();
+ }
+ else
+ {
+ for (i = 0; i < folders.NumFolders; i++)
+ {
+ /* v9.26 - v9.29 incorrectly worked:
+ if (folders.NumUnpackStreamsVector[i] == 0), it threw error */
+ CNum val = folders.NumUnpackStreamsVector[i];
+ if (val > 1)
+ ThrowIncorrect();
+ if (val == 1)
+ unpackSizes.Add(folders.GetFolderUnpackSize(i));
+ }
+ }
- int numDigests = 0;
- int numDigestsTotal = 0;
- for (i = 0; i < folders.Size(); i++)
+ unsigned numDigests = 0;
+ for (i = 0; i < folders.NumFolders; i++)
{
- CNum numSubstreams = numUnpackStreamsInFolders[i];
- if (numSubstreams != 1 || !folders[i].UnpackCRCDefined)
+ CNum numSubstreams = folders.NumUnpackStreamsVector[i];
+ if (numSubstreams != 1 || !folders.FolderCRCs.ValidAndDefined(i))
numDigests += numSubstreams;
- numDigestsTotal += numSubstreams;
}
for (;;)
{
+ if (type == NID::kEnd)
+ break;
if (type == NID::kCRC)
{
- CBoolVector digestsDefined2;
- CRecordVector<UInt32> digests2;
- ReadHashDigests(numDigests, digestsDefined2, digests2);
- int digestIndex = 0;
- for (i = 0; i < folders.Size(); i++)
+ // CUInt32DefVector digests2;
+ // ReadHashDigests(numDigests, digests2);
+ CBoolVector digests2;
+ ReadBoolVector2(numDigests, digests2);
+
+ digests.ClearAndSetSize(unpackSizes.Size());
+
+ unsigned k = 0;
+ unsigned k2 = 0;
+
+ for (i = 0; i < folders.NumFolders; i++)
{
- CNum numSubstreams = numUnpackStreamsInFolders[i];
- const CFolder &folder = folders[i];
- if (numSubstreams == 1 && folder.UnpackCRCDefined)
+ CNum numSubstreams = folders.NumUnpackStreamsVector[i];
+ if (numSubstreams == 1 && folders.FolderCRCs.ValidAndDefined(i))
{
- digestsDefined.Add(true);
- digests.Add(folder.UnpackCRC);
+ digests.Defs[k] = true;
+ digests.Vals[k] = folders.FolderCRCs.Vals[i];
+ k++;
+ }
+ else for (CNum j = 0; j < numSubstreams; j++)
+ {
+ bool defined = digests2[k2++];
+ digests.Defs[k] = defined;
+ UInt32 crc = 0;
+ if (defined)
+ crc = ReadUInt32();
+ digests.Vals[k] = crc;
+ k++;
}
- else
- for (CNum j = 0; j < numSubstreams; j++, digestIndex++)
- {
- digestsDefined.Add(digestsDefined2[digestIndex]);
- digests.Add(digests2[digestIndex]);
- }
}
+ // if (k != unpackSizes.Size()) throw 1234567;
}
- else if (type == NID::kEnd)
+ else
+ SkipData();
+
+ type = ReadID();
+ }
+
+ if (digests.Defs.Size() != unpackSizes.Size())
+ {
+ digests.ClearAndSetSize(unpackSizes.Size());
+ unsigned k = 0;
+ for (i = 0; i < folders.NumFolders; i++)
{
- if (digestsDefined.IsEmpty())
+ CNum numSubstreams = folders.NumUnpackStreamsVector[i];
+ if (numSubstreams == 1 && folders.FolderCRCs.ValidAndDefined(i))
{
- BoolVector_Fill_False(digestsDefined, numDigestsTotal);
- digests.Clear();
- for (int i = 0; i < numDigestsTotal; i++)
- digests.Add(0);
+ digests.Defs[k] = true;
+ digests.Vals[k] = folders.FolderCRCs.Vals[i];
+ k++;
+ }
+ else for (CNum j = 0; j < numSubstreams; j++)
+ {
+ digests.Defs[k] = false;
+ digests.Vals[k] = 0;
+ k++;
}
- return;
}
- else
- SkipData();
- type = ReadID();
}
}
void CInArchive::ReadStreamsInfo(
const CObjectVector<CByteBuffer> *dataVector,
UInt64 &dataOffset,
- CRecordVector<UInt64> &packSizes,
- CBoolVector &packCRCsDefined,
- CRecordVector<UInt32> &packCRCs,
- CObjectVector<CFolder> &folders,
- CRecordVector<CNum> &numUnpackStreamsInFolders,
+ CFolders &folders,
CRecordVector<UInt64> &unpackSizes,
- CBoolVector &digestsDefined,
- CRecordVector<UInt32> &digests)
+ CUInt32DefVector &digests)
{
- for (;;)
+ UInt64 type = ReadID();
+
+ if (type == NID::kPackInfo)
{
- UInt64 type = ReadID();
- if (type > ((UInt32)1 << 30))
- ThrowIncorrect();
- switch((UInt32)type)
+ dataOffset = ReadNumber();
+ ReadPackInfo(folders);
+ type = ReadID();
+ }
+
+ if (type == NID::kUnpackInfo)
+ {
+ ReadUnpackInfo(dataVector, folders);
+ type = ReadID();
+ }
+
+ if (folders.NumFolders != 0 && !folders.PackPositions)
+ {
+ // if there are folders, we need PackPositions also
+ folders.PackPositions.Alloc(1);
+ folders.PackPositions[0] = 0;
+ }
+
+ if (type == NID::kSubStreamsInfo)
+ {
+ ReadSubStreamsInfo(folders, unpackSizes, digests);
+ type = ReadID();
+ }
+ else
+ {
+ folders.NumUnpackStreamsVector.Alloc(folders.NumFolders);
+ /* If digests.Defs.Size() == 0, it means that there are no crcs.
+ So we don't need to fill digests with values. */
+ // digests.Vals.ClearAndSetSize(folders.NumFolders);
+ // BoolVector_Fill_False(digests.Defs, folders.NumFolders);
+ for (CNum i = 0; i < folders.NumFolders; i++)
{
- case NID::kEnd:
- return;
- case NID::kPackInfo:
- {
- ReadPackInfo(dataOffset, packSizes, packCRCsDefined, packCRCs);
- break;
- }
- case NID::kUnpackInfo:
- {
- ReadUnpackInfo(dataVector, folders);
- break;
- }
- case NID::kSubStreamsInfo:
- {
- ReadSubStreamsInfo(folders, numUnpackStreamsInFolders,
- unpackSizes, digestsDefined, digests);
- break;
- }
- default:
- ThrowIncorrect();
+ folders.NumUnpackStreamsVector[i] = 1;
+ unpackSizes.Add(folders.GetFolderUnpackSize(i));
+ // digests.Vals[i] = 0;
}
}
+
+ if (type != NID::kEnd)
+ ThrowIncorrect();
}
-void CInArchive::ReadBoolVector(int numItems, CBoolVector &v)
+void CInArchive::ReadBoolVector(unsigned numItems, CBoolVector &v)
{
- v.Clear();
- v.Reserve(numItems);
+ v.ClearAndSetSize(numItems);
Byte b = 0;
Byte mask = 0;
- for (int i = 0; i < numItems; i++)
+ bool *p = &v[0];
+ for (unsigned i = 0; i < numItems; i++)
{
if (mask == 0)
{
b = ReadByte();
mask = 0x80;
}
- v.Add((b & mask) != 0);
+ p[i] = ((b & mask) != 0);
mask >>= 1;
}
}
-void CInArchive::ReadBoolVector2(int numItems, CBoolVector &v)
+void CInArchive::ReadBoolVector2(unsigned numItems, CBoolVector &v)
{
Byte allAreDefined = ReadByte();
if (allAreDefined == 0)
@@ -747,27 +1010,30 @@ void CInArchive::ReadBoolVector2(int numItems, CBoolVector &v)
ReadBoolVector(numItems, v);
return;
}
- v.Clear();
- v.Reserve(numItems);
- for (int i = 0; i < numItems; i++)
- v.Add(true);
+ v.ClearAndSetSize(numItems);
+ bool *p = &v[0];
+ for (unsigned i = 0; i < numItems; i++)
+ p[i] = true;
}
void CInArchive::ReadUInt64DefVector(const CObjectVector<CByteBuffer> &dataVector,
- CUInt64DefVector &v, int numFiles)
+ CUInt64DefVector &v, unsigned numItems)
{
- ReadBoolVector2(numFiles, v.Defined);
+ ReadBoolVector2(numItems, v.Defs);
CStreamSwitch streamSwitch;
streamSwitch.Set(this, &dataVector);
- v.Values.Reserve(numFiles);
+
+ v.Vals.ClearAndSetSize(numItems);
+ UInt64 *p = &v.Vals[0];
+ const bool *defs = &v.Defs[0];
- for (int i = 0; i < numFiles; i++)
+ for (unsigned i = 0; i < numItems; i++)
{
UInt64 t = 0;
- if (v.Defined[i])
+ if (defs[i])
t = ReadUInt64();
- v.Values.Add(t);
+ p[i] = t;
}
}
@@ -775,97 +1041,71 @@ HRESULT CInArchive::ReadAndDecodePackedStreams(
DECL_EXTERNAL_CODECS_LOC_VARS
UInt64 baseOffset,
UInt64 &dataOffset, CObjectVector<CByteBuffer> &dataVector
- #ifndef _NO_CRYPTO
- , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
- #endif
+ _7Z_DECODER_CRYPRO_VARS_DECL
)
{
- CRecordVector<UInt64> packSizes;
- CBoolVector packCRCsDefined;
- CRecordVector<UInt32> packCRCs;
- CObjectVector<CFolder> folders;
-
- CRecordVector<CNum> numUnpackStreamsInFolders;
+ CFolders folders;
CRecordVector<UInt64> unpackSizes;
- CBoolVector digestsDefined;
- CRecordVector<UInt32> digests;
+ CUInt32DefVector digests;
ReadStreamsInfo(NULL,
dataOffset,
- packSizes,
- packCRCsDefined,
- packCRCs,
folders,
- numUnpackStreamsInFolders,
unpackSizes,
- digestsDefined,
digests);
- // db.ArchiveInfo.DataStartPosition2 += db.ArchiveInfo.StartPositionAfterHeader;
-
- CNum packIndex = 0;
- CDecoder decoder(
- #ifdef _ST_MODE
- false
- #else
- true
- #endif
- );
- UInt64 dataStartPos = baseOffset + dataOffset;
- for (int i = 0; i < folders.Size(); i++)
+ CDecoder decoder(_useMixerMT);
+
+ for (CNum i = 0; i < folders.NumFolders; i++)
{
- const CFolder &folder = folders[i];
- dataVector.Add(CByteBuffer());
- CByteBuffer &data = dataVector.Back();
- UInt64 unpackSize64 = folder.GetUnpackSize();
+ CByteBuffer &data = dataVector.AddNew();
+ UInt64 unpackSize64 = folders.GetFolderUnpackSize(i);
size_t unpackSize = (size_t)unpackSize64;
if (unpackSize != unpackSize64)
ThrowUnsupported();
- data.SetCapacity(unpackSize);
+ data.Alloc(unpackSize);
CBufPtrSeqOutStream *outStreamSpec = new CBufPtrSeqOutStream;
CMyComPtr<ISequentialOutStream> outStream = outStreamSpec;
outStreamSpec->Init(data, unpackSize);
HRESULT result = decoder.Decode(
- EXTERNAL_CODECS_LOC_VARS
- _stream, dataStartPos,
- &packSizes[packIndex], folder, outStream, NULL
- #ifndef _NO_CRYPTO
- , getTextPassword, passwordIsDefined
- #endif
- #if !defined(_7ZIP_ST) && !defined(_SFX)
- , false, 1
- #endif
+ EXTERNAL_CODECS_LOC_VARS
+ _stream, baseOffset + dataOffset,
+ folders, i,
+ NULL, // *unpackSize
+
+ outStream,
+ NULL, // *compressProgress
+ NULL // **inStreamMainRes
+
+ _7Z_DECODER_CRYPRO_VARS
+ #if !defined(_7ZIP_ST) && !defined(_SFX)
+ , false // mtMode
+ , 1 // numThreads
+ #endif
);
RINOK(result);
- if (folder.UnpackCRCDefined)
- if (CrcCalc(data, unpackSize) != folder.UnpackCRC)
+ if (folders.FolderCRCs.ValidAndDefined(i))
+ if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i])
ThrowIncorrect();
- for (int j = 0; j < folder.PackStreams.Size(); j++)
- {
- UInt64 packSize = packSizes[packIndex++];
- dataStartPos += packSize;
- HeadersSize += packSize;
- }
}
+ HeadersSize += folders.PackPositions[folders.NumPackStreams];
return S_OK;
}
HRESULT CInArchive::ReadHeader(
DECL_EXTERNAL_CODECS_LOC_VARS
- CArchiveDatabaseEx &db
- #ifndef _NO_CRYPTO
- , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
- #endif
+ CDbEx &db
+ _7Z_DECODER_CRYPRO_VARS_DECL
)
{
UInt64 type = ReadID();
if (type == NID::kArchiveProperties)
{
- ReadArchiveProperties(db.ArchiveInfo);
+ ReadArchiveProperties(db.ArcInfo);
type = ReadID();
}
@@ -875,70 +1115,53 @@ HRESULT CInArchive::ReadHeader(
{
HRESULT result = ReadAndDecodePackedStreams(
EXTERNAL_CODECS_LOC_VARS
- db.ArchiveInfo.StartPositionAfterHeader,
- db.ArchiveInfo.DataStartPosition2,
+ db.ArcInfo.StartPositionAfterHeader,
+ db.ArcInfo.DataStartPosition2,
dataVector
- #ifndef _NO_CRYPTO
- , getTextPassword, passwordIsDefined
- #endif
+ _7Z_DECODER_CRYPRO_VARS
);
RINOK(result);
- db.ArchiveInfo.DataStartPosition2 += db.ArchiveInfo.StartPositionAfterHeader;
+ db.ArcInfo.DataStartPosition2 += db.ArcInfo.StartPositionAfterHeader;
type = ReadID();
}
CRecordVector<UInt64> unpackSizes;
- CBoolVector digestsDefined;
- CRecordVector<UInt32> digests;
+ CUInt32DefVector digests;
if (type == NID::kMainStreamsInfo)
{
ReadStreamsInfo(&dataVector,
- db.ArchiveInfo.DataStartPosition,
- db.PackSizes,
- db.PackCRCsDefined,
- db.PackCRCs,
- db.Folders,
- db.NumUnpackStreamsVector,
+ db.ArcInfo.DataStartPosition,
+ (CFolders &)db,
unpackSizes,
- digestsDefined,
digests);
- db.ArchiveInfo.DataStartPosition += db.ArchiveInfo.StartPositionAfterHeader;
+ db.ArcInfo.DataStartPosition += db.ArcInfo.StartPositionAfterHeader;
type = ReadID();
}
- else
- {
- for (int i = 0; i < db.Folders.Size(); i++)
- {
- db.NumUnpackStreamsVector.Add(1);
- CFolder &folder = db.Folders[i];
- unpackSizes.Add(folder.GetUnpackSize());
- digestsDefined.Add(folder.UnpackCRCDefined);
- digests.Add(folder.UnpackCRC);
- }
- }
db.Files.Clear();
- if (type == NID::kEnd)
- return S_OK;
- if (type != NID::kFilesInfo)
- ThrowIncorrect();
+ if (type == NID::kFilesInfo)
+ {
CNum numFiles = ReadNum();
+ db.Files.ClearAndSetSize(numFiles);
+ CNum i;
+ /*
db.Files.Reserve(numFiles);
CNum i;
for (i = 0; i < numFiles; i++)
db.Files.Add(CFileItem());
+ */
- db.ArchiveInfo.FileInfoPopIDs.Add(NID::kSize);
- if (!db.PackSizes.IsEmpty())
- db.ArchiveInfo.FileInfoPopIDs.Add(NID::kPackInfo);
- if (numFiles > 0 && !digests.IsEmpty())
- db.ArchiveInfo.FileInfoPopIDs.Add(NID::kCRC);
+ db.ArcInfo.FileInfoPopIDs.Add(NID::kSize);
+ // if (!db.PackSizes.IsEmpty())
+ db.ArcInfo.FileInfoPopIDs.Add(NID::kPackInfo);
+ if (numFiles > 0 && !digests.Defs.IsEmpty())
+ db.ArcInfo.FileInfoPopIDs.Add(NID::kCRC);
CBoolVector emptyStreamVector;
- BoolVector_Fill_False(emptyStreamVector, (int)numFiles);
+ BoolVector_Fill_False(emptyStreamVector, (unsigned)numFiles);
CBoolVector emptyFileVector;
CBoolVector antiFileVector;
CNum numEmptyStreams = 0;
@@ -949,22 +1172,43 @@ HRESULT CInArchive::ReadHeader(
if (type == NID::kEnd)
break;
UInt64 size = ReadNumber();
- size_t ppp = _inByteBack->_pos;
+ if (size > _inByteBack->GetRem())
+ ThrowIncorrect();
+ CStreamSwitch switchProp;
+ switchProp.Set(this, _inByteBack->GetPtr(), (size_t)size, true);
bool addPropIdToList = true;
bool isKnownType = true;
if (type > ((UInt32)1 << 30))
isKnownType = false;
- else switch((UInt32)type)
+ else switch ((UInt32)type)
{
case NID::kName:
{
CStreamSwitch streamSwitch;
streamSwitch.Set(this, &dataVector);
- for (int i = 0; i < db.Files.Size(); i++)
- _inByteBack->ReadString(db.Files[i].Name);
+ size_t rem = _inByteBack->GetRem();
+ db.NamesBuf.Alloc(rem);
+ ReadBytes(db.NamesBuf, rem);
+ db.NameOffsets.Alloc(db.Files.Size() + 1);
+ size_t pos = 0;
+ unsigned i;
+ for (i = 0; i < db.Files.Size(); i++)
+ {
+ size_t curRem = (rem - pos) / 2;
+ const UInt16 *buf = (const UInt16 *)(db.NamesBuf + pos);
+ size_t j;
+ for (j = 0; j < curRem && buf[j] != 0; j++);
+ if (j == curRem)
+ ThrowEndOfData();
+ db.NameOffsets[i] = pos / 2;
+ pos += j * 2 + 2;
+ }
+ db.NameOffsets[i] = pos / 2;
+ if (pos != rem)
+ ThereIsHeaderError = true;
break;
}
- case NID::kWinAttributes:
+ case NID::kWinAttrib:
{
CBoolVector boolVector;
ReadBoolVector2(db.Files.Size(), boolVector);
@@ -979,9 +1223,40 @@ HRESULT CInArchive::ReadHeader(
}
break;
}
+ /*
+ case NID::kIsAux:
+ {
+ ReadBoolVector(db.Files.Size(), db.IsAux);
+ break;
+ }
+ case NID::kParent:
+ {
+ db.IsTree = true;
+ // CBoolVector boolVector;
+ // ReadBoolVector2(db.Files.Size(), boolVector);
+ // CStreamSwitch streamSwitch;
+ // streamSwitch.Set(this, &dataVector);
+ CBoolVector boolVector;
+ ReadBoolVector2(db.Files.Size(), boolVector);
+
+ db.ThereAreAltStreams = false;
+ for (i = 0; i < numFiles; i++)
+ {
+ CFileItem &file = db.Files[i];
+ // file.Parent = -1;
+ // if (boolVector[i])
+ file.Parent = (int)ReadUInt32();
+ file.IsAltStream = !boolVector[i];
+ if (file.IsAltStream)
+ db.ThereAreAltStreams = true;
+ }
+ break;
+ }
+ */
case NID::kEmptyStream:
{
ReadBoolVector(numFiles, emptyStreamVector);
+ numEmptyStreams = 0;
for (i = 0; i < (CNum)emptyStreamVector.Size(); i++)
if (emptyStreamVector[i])
numEmptyStreams++;
@@ -993,34 +1268,86 @@ HRESULT CInArchive::ReadHeader(
}
case NID::kEmptyFile: ReadBoolVector(numEmptyStreams, emptyFileVector); break;
case NID::kAnti: ReadBoolVector(numEmptyStreams, antiFileVector); break;
- case NID::kStartPos: ReadUInt64DefVector(dataVector, db.StartPos, (int)numFiles); break;
- case NID::kCTime: ReadUInt64DefVector(dataVector, db.CTime, (int)numFiles); break;
- case NID::kATime: ReadUInt64DefVector(dataVector, db.ATime, (int)numFiles); break;
- case NID::kMTime: ReadUInt64DefVector(dataVector, db.MTime, (int)numFiles); break;
+ case NID::kStartPos: ReadUInt64DefVector(dataVector, db.StartPos, (unsigned)numFiles); break;
+ case NID::kCTime: ReadUInt64DefVector(dataVector, db.CTime, (unsigned)numFiles); break;
+ case NID::kATime: ReadUInt64DefVector(dataVector, db.ATime, (unsigned)numFiles); break;
+ case NID::kMTime: ReadUInt64DefVector(dataVector, db.MTime, (unsigned)numFiles); break;
case NID::kDummy:
{
for (UInt64 j = 0; j < size; j++)
if (ReadByte() != 0)
- ThrowIncorrect();
+ ThereIsHeaderError = true;
addPropIdToList = false;
break;
}
+ /*
+ case NID::kNtSecure:
+ {
+ try
+ {
+ {
+ CStreamSwitch streamSwitch;
+ streamSwitch.Set(this, &dataVector);
+ UInt32 numDescriptors = ReadUInt32();
+ size_t offset = 0;
+ db.SecureOffsets.Clear();
+ for (i = 0; i < numDescriptors; i++)
+ {
+ UInt32 size = ReadUInt32();
+ db.SecureOffsets.Add(offset);
+ offset += size;
+ }
+ // ThrowIncorrect();;
+ db.SecureOffsets.Add(offset);
+ db.SecureBuf.SetCapacity(offset);
+ for (i = 0; i < numDescriptors; i++)
+ {
+ offset = db.SecureOffsets[i];
+ ReadBytes(db.SecureBuf + offset, db.SecureOffsets[i + 1] - offset);
+ }
+ db.SecureIDs.Clear();
+ for (unsigned i = 0; i < db.Files.Size(); i++)
+ {
+ db.SecureIDs.Add(ReadNum());
+ // db.SecureIDs.Add(ReadUInt32());
+ }
+ // ReadUInt32();
+ if (_inByteBack->GetRem() != 0)
+ ThrowIncorrect();;
+ }
+ }
+ catch(CInArchiveException &)
+ {
+ ThereIsHeaderError = true;
+ addPropIdToList = isKnownType = false;
+ db.ClearSecure();
+ }
+ break;
+ }
+ */
default:
addPropIdToList = isKnownType = false;
}
if (isKnownType)
{
- if(addPropIdToList)
- db.ArchiveInfo.FileInfoPopIDs.Add(type);
+ if (addPropIdToList)
+ db.ArcInfo.FileInfoPopIDs.Add(type);
}
else
- SkipData(size);
- bool checkRecordsSize = (db.ArchiveInfo.Version.Major > 0 ||
- db.ArchiveInfo.Version.Minor > 2);
- if (checkRecordsSize && _inByteBack->_pos - ppp != size)
+ {
+ db.UnsupportedFeatureWarning = true;
+ _inByteBack->SkipRem();
+ }
+ // SkipData worked incorrectly in some versions before v4.59 (7zVer <= 0.02)
+ if (_inByteBack->GetRem() != 0)
ThrowIncorrect();
}
+ type = ReadID(); // Read (NID::kEnd) end of headers
+
+ if (numFiles - numEmptyStreams != unpackSizes.Size())
+ ThrowUnsupported();
+
CNum emptyFileIndex = 0;
CNum sizeIndex = 0;
@@ -1028,19 +1355,21 @@ HRESULT CInArchive::ReadHeader(
for (i = 0; i < numEmptyStreams; i++)
if (antiFileVector[i])
numAntiItems++;
-
+
for (i = 0; i < numFiles; i++)
{
CFileItem &file = db.Files[i];
bool isAnti;
file.HasStream = !emptyStreamVector[i];
+ file.Crc = 0;
if (file.HasStream)
{
file.IsDir = false;
isAnti = false;
file.Size = unpackSizes[sizeIndex];
- file.Crc = digests[sizeIndex];
- file.CrcDefined = digestsDefined[sizeIndex];
+ file.CrcDefined = digests.ValidAndDefined(sizeIndex);
+ if (file.CrcDefined)
+ file.Crc = digests.Vals[sizeIndex];
sizeIndex++;
}
else
@@ -1054,158 +1383,182 @@ HRESULT CInArchive::ReadHeader(
if (numAntiItems != 0)
db.IsAnti.Add(isAnti);
}
- return S_OK;
-}
-
-
-void CArchiveDatabaseEx::FillFolderStartPackStream()
-{
- FolderStartPackStreamIndex.Clear();
- FolderStartPackStreamIndex.Reserve(Folders.Size());
- CNum startPos = 0;
- for (int i = 0; i < Folders.Size(); i++)
- {
- FolderStartPackStreamIndex.Add(startPos);
- startPos += (CNum)Folders[i].PackStreams.Size();
- }
-}
-
-void CArchiveDatabaseEx::FillStartPos()
-{
- PackStreamStartPositions.Clear();
- PackStreamStartPositions.Reserve(PackSizes.Size());
- UInt64 startPos = 0;
- for (int i = 0; i < PackSizes.Size(); i++)
- {
- PackStreamStartPositions.Add(startPos);
- startPos += PackSizes[i];
}
+ db.FillLinks();
+ /*
+ if (type != NID::kEnd)
+ ThrowIncorrect();
+ if (_inByteBack->GetRem() != 0)
+ ThrowIncorrect();
+ */
+ return S_OK;
}
-void CArchiveDatabaseEx::FillFolderStartFileIndex()
+void CDbEx::FillLinks()
{
- FolderStartFileIndex.Clear();
- FolderStartFileIndex.Reserve(Folders.Size());
- FileIndexToFolderIndexMap.Clear();
- FileIndexToFolderIndexMap.Reserve(Files.Size());
+ FolderStartFileIndex.Alloc(NumFolders);
+ FileIndexToFolderIndexMap.Alloc(Files.Size());
- int folderIndex = 0;
+ CNum folderIndex = 0;
CNum indexInFolder = 0;
- for (int i = 0; i < Files.Size(); i++)
+ unsigned i;
+
+ for (i = 0; i < Files.Size(); i++)
{
- const CFileItem &file = Files[i];
- bool emptyStream = !file.HasStream;
- if (emptyStream && indexInFolder == 0)
- {
- FileIndexToFolderIndexMap.Add(kNumNoIndex);
- continue;
- }
+ bool emptyStream = !Files[i].HasStream;
if (indexInFolder == 0)
{
+ if (emptyStream)
+ {
+ FileIndexToFolderIndexMap[i] = kNumNoIndex;
+ continue;
+ }
// v3.13 incorrectly worked with empty folders
- // v4.07: Loop for skipping empty folders
+ // v4.07: we skip empty folders
for (;;)
{
- if (folderIndex >= Folders.Size())
+ if (folderIndex >= NumFolders)
ThrowIncorrect();
- FolderStartFileIndex.Add(i); // check it
+ FolderStartFileIndex[folderIndex] = i;
if (NumUnpackStreamsVector[folderIndex] != 0)
break;
folderIndex++;
}
}
- FileIndexToFolderIndexMap.Add(folderIndex);
+ FileIndexToFolderIndexMap[i] = folderIndex;
if (emptyStream)
continue;
- indexInFolder++;
- if (indexInFolder >= NumUnpackStreamsVector[folderIndex])
+ if (++indexInFolder >= NumUnpackStreamsVector[folderIndex])
{
folderIndex++;
indexInFolder = 0;
}
}
+
+ if (indexInFolder != 0)
+ folderIndex++;
+ /*
+ if (indexInFolder != 0)
+ ThrowIncorrect();
+ */
+
+ for (;;)
+ {
+ if (folderIndex >= NumFolders)
+ return;
+ FolderStartFileIndex[folderIndex] = i;
+ /*
+ if (NumUnpackStreamsVector[folderIndex] != 0)
+ ThrowIncorrect();;
+ */
+ folderIndex++;
+ }
}
HRESULT CInArchive::ReadDatabase2(
DECL_EXTERNAL_CODECS_LOC_VARS
- CArchiveDatabaseEx &db
- #ifndef _NO_CRYPTO
- , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
- #endif
+ CDbEx &db
+ _7Z_DECODER_CRYPRO_VARS_DECL
)
{
db.Clear();
- db.ArchiveInfo.StartPosition = _arhiveBeginStreamPosition;
+ db.ArcInfo.StartPosition = _arhiveBeginStreamPosition;
- db.ArchiveInfo.Version.Major = _header[6];
- db.ArchiveInfo.Version.Minor = _header[7];
+ db.ArcInfo.Version.Major = _header[6];
+ db.ArcInfo.Version.Minor = _header[7];
- if (db.ArchiveInfo.Version.Major != kMajorVersion)
- ThrowUnsupportedVersion();
+ if (db.ArcInfo.Version.Major != kMajorVersion)
+ {
+ // db.UnsupportedVersion = true;
+ return S_FALSE;
+ }
- UInt32 crcFromArchive = Get32(_header + 8);
- UInt64 nextHeaderOffset = Get64(_header + 0xC);
- UInt64 nextHeaderSize = Get64(_header + 0x14);
- UInt32 nextHeaderCRC = Get32(_header + 0x1C);
- UInt32 crc = CrcCalc(_header + 0xC, 20);
+ UInt64 nextHeaderOffset = Get64(_header + 12);
+ UInt64 nextHeaderSize = Get64(_header + 20);
+ UInt32 nextHeaderCRC = Get32(_header + 28);
#ifdef FORMAT_7Z_RECOVERY
- if (crcFromArchive == 0 && nextHeaderOffset == 0 && nextHeaderSize == 0 && nextHeaderCRC == 0)
+ UInt32 crcFromArc = Get32(_header + 8);
+ if (crcFromArc == 0 && nextHeaderOffset == 0 && nextHeaderSize == 0 && nextHeaderCRC == 0)
{
- UInt64 cur, cur2;
+ UInt64 cur, fileSize;
RINOK(_stream->Seek(0, STREAM_SEEK_CUR, &cur));
- const int kCheckSize = 500;
+ const unsigned kCheckSize = 512;
Byte buf[kCheckSize];
- RINOK(_stream->Seek(0, STREAM_SEEK_END, &cur2));
- int checkSize = kCheckSize;
- if (cur2 - cur < kCheckSize)
- checkSize = (int)(cur2 - cur);
- RINOK(_stream->Seek(-checkSize, STREAM_SEEK_END, &cur2));
-
+ RINOK(_stream->Seek(0, STREAM_SEEK_END, &fileSize));
+ UInt64 rem = fileSize - cur;
+ unsigned checkSize = kCheckSize;
+ if (rem < kCheckSize)
+ checkSize = (unsigned)(rem);
+ if (checkSize < 3)
+ return S_FALSE;
+ RINOK(_stream->Seek(fileSize - checkSize, STREAM_SEEK_SET, NULL));
RINOK(ReadStream_FALSE(_stream, buf, (size_t)checkSize));
- int i;
- for (i = (int)checkSize - 2; i >= 0; i--)
- if (buf[i] == 0x17 && buf[i + 1] == 0x6 || buf[i] == 0x01 && buf[i + 1] == 0x04)
- break;
- if (i < 0)
+ if (buf[checkSize - 1] != 0)
return S_FALSE;
+
+ unsigned i;
+ for (i = checkSize - 2;; i--)
+ {
+ if (buf[i] == NID::kEncodedHeader && buf[i + 1] == NID::kPackInfo ||
+ buf[i] == NID::kHeader && buf[i + 1] == NID::kMainStreamsInfo)
+ break;
+ if (i == 0)
+ return S_FALSE;
+ }
nextHeaderSize = checkSize - i;
- nextHeaderOffset = cur2 - cur + i;
+ nextHeaderOffset = rem - nextHeaderSize;
nextHeaderCRC = CrcCalc(buf + i, (size_t)nextHeaderSize);
RINOK(_stream->Seek(cur, STREAM_SEEK_SET, NULL));
+ db.StartHeaderWasRecovered = true;
}
else
#endif
{
- if (crc != crcFromArchive)
- ThrowIncorrect();
+ // Crc was tested already at signature check
+ // if (CrcCalc(_header + 12, 20) != crcFromArchive) ThrowIncorrect();
}
- db.ArchiveInfo.StartPositionAfterHeader = _arhiveBeginStreamPosition + kHeaderSize;
+ db.ArcInfo.StartPositionAfterHeader = _arhiveBeginStreamPosition + kHeaderSize;
+ db.PhySize = kHeaderSize;
+ db.IsArc = false;
+ if ((Int64)nextHeaderOffset < 0 ||
+ nextHeaderSize > ((UInt64)1 << 62))
+ return S_FALSE;
if (nextHeaderSize == 0)
+ {
+ if (nextHeaderOffset != 0)
+ return S_FALSE;
+ db.IsArc = true;
return S_OK;
-
- if (nextHeaderSize > (UInt64)(UInt32)0xFFFFFFFF)
- return S_FALSE;
-
- if ((Int64)nextHeaderOffset < 0)
- return S_FALSE;
-
- if (db.ArchiveInfo.StartPositionAfterHeader + nextHeaderOffset > _fileEndPosition)
+ }
+
+ if (!db.StartHeaderWasRecovered)
+ db.IsArc = true;
+
+ HeadersSize += kHeaderSize + nextHeaderSize;
+ db.PhySize = kHeaderSize + nextHeaderOffset + nextHeaderSize;
+ if (_fileEndPosition - db.ArcInfo.StartPositionAfterHeader < nextHeaderOffset + nextHeaderSize)
+ {
+ db.UnexpectedEnd = true;
return S_FALSE;
+ }
RINOK(_stream->Seek(nextHeaderOffset, STREAM_SEEK_CUR, NULL));
- CByteBuffer buffer2;
- buffer2.SetCapacity((size_t)nextHeaderSize);
+ size_t nextHeaderSize_t = (size_t)nextHeaderSize;
+ if (nextHeaderSize_t != nextHeaderSize)
+ return E_OUTOFMEMORY;
+ CByteBuffer buffer2(nextHeaderSize_t);
- RINOK(ReadStream_FALSE(_stream, buffer2, (size_t)nextHeaderSize));
- HeadersSize += kHeaderSize + nextHeaderSize;
- db.PhySize = kHeaderSize + nextHeaderOffset + nextHeaderSize;
+ RINOK(ReadStream_FALSE(_stream, buffer2, nextHeaderSize_t));
- if (CrcCalc(buffer2, (UInt32)nextHeaderSize) != nextHeaderCRC)
+ if (CrcCalc(buffer2, nextHeaderSize_t) != nextHeaderCRC)
ThrowIncorrect();
+
+ if (!db.StartHeaderWasRecovered)
+ db.PhySizeWasConfirmed = true;
CStreamSwitch streamSwitch;
streamSwitch.Set(this, buffer2);
@@ -1219,12 +1572,10 @@ HRESULT CInArchive::ReadDatabase2(
ThrowIncorrect();
HRESULT result = ReadAndDecodePackedStreams(
EXTERNAL_CODECS_LOC_VARS
- db.ArchiveInfo.StartPositionAfterHeader,
- db.ArchiveInfo.DataStartPosition2,
+ db.ArcInfo.StartPositionAfterHeader,
+ db.ArcInfo.DataStartPosition2,
dataVector
- #ifndef _NO_CRYPTO
- , getTextPassword, passwordIsDefined
- #endif
+ _7Z_DECODER_CRYPRO_VARS
);
RINOK(result);
if (dataVector.Size() == 0)
@@ -1237,35 +1588,45 @@ HRESULT CInArchive::ReadDatabase2(
ThrowIncorrect();
}
+ db.IsArc = true;
+
db.HeadersSize = HeadersSize;
return ReadHeader(
EXTERNAL_CODECS_LOC_VARS
db
- #ifndef _NO_CRYPTO
- , getTextPassword, passwordIsDefined
- #endif
+ _7Z_DECODER_CRYPRO_VARS
);
}
HRESULT CInArchive::ReadDatabase(
DECL_EXTERNAL_CODECS_LOC_VARS
- CArchiveDatabaseEx &db
- #ifndef _NO_CRYPTO
- , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
- #endif
+ CDbEx &db
+ _7Z_DECODER_CRYPRO_VARS_DECL
)
{
try
{
- return ReadDatabase2(
+ HRESULT res = ReadDatabase2(
EXTERNAL_CODECS_LOC_VARS db
- #ifndef _NO_CRYPTO
- , getTextPassword, passwordIsDefined
- #endif
+ _7Z_DECODER_CRYPRO_VARS
);
+ if (ThereIsHeaderError)
+ db.ThereIsHeaderError = true;
+ if (res == E_NOTIMPL)
+ ThrowUnsupported();
+ return res;
+ }
+ catch(CUnsupportedFeatureException &)
+ {
+ db.UnsupportedFeatureError = true;
+ return S_FALSE;
+ }
+ catch(CInArchiveException &)
+ {
+ db.ThereIsHeaderError = true;
+ return S_FALSE;
}
- catch(CInArchiveException &) { return S_FALSE; }
}
}}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zIn.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zIn.h
index 4305a8c5252..3592e99b530 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zIn.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zIn.h
@@ -5,6 +5,8 @@
#include "../../../Common/MyCom.h"
+#include "../../../Windows/PropVariant.h"
+
#include "../../IPassword.h"
#include "../../IStream.h"
@@ -15,7 +17,161 @@
namespace NArchive {
namespace N7z {
+
+/*
+ We don't need to init isEncrypted and passwordIsDefined
+ We must upgrade them only */
+
+#ifdef _NO_CRYPTO
+#define _7Z_DECODER_CRYPRO_VARS_DECL
+#define _7Z_DECODER_CRYPRO_VARS
+#else
+#define _7Z_DECODER_CRYPRO_VARS_DECL , ICryptoGetTextPassword *getTextPassword, bool &isEncrypted, bool &passwordIsDefined, UString &password
+#define _7Z_DECODER_CRYPRO_VARS , getTextPassword, isEncrypted, passwordIsDefined, password
+#endif
+
+struct CParsedMethods
+{
+ Byte Lzma2Prop;
+ UInt32 LzmaDic;
+ CRecordVector<UInt64> IDs;
+
+ CParsedMethods(): Lzma2Prop(0), LzmaDic(0) {}
+};
+
+struct CFolderEx: public CFolder
+{
+ unsigned UnpackCoder;
+};
+
+struct CFolders
+{
+ CNum NumPackStreams;
+ CNum NumFolders;
+
+ CObjArray<UInt64> PackPositions; // NumPackStreams + 1
+ // CUInt32DefVector PackCRCs; // we don't use PackCRCs now
+
+ CUInt32DefVector FolderCRCs; // NumFolders
+ CObjArray<CNum> NumUnpackStreamsVector; // NumFolders
+
+ CObjArray<UInt64> CoderUnpackSizes; // including unpack sizes of bond coders
+ CObjArray<CNum> FoToCoderUnpackSizes; // NumFolders + 1
+ CObjArray<CNum> FoStartPackStreamIndex; // NumFolders + 1
+ CObjArray<Byte> FoToMainUnpackSizeIndex; // NumFolders
+
+ CObjArray<size_t> FoCodersDataOffset; // NumFolders + 1
+ CByteBuffer CodersData;
+
+ CParsedMethods ParsedMethods;
+
+ void ParseFolderInfo(unsigned folderIndex, CFolder &folder) const;
+ void ParseFolderEx(unsigned folderIndex, CFolderEx &folder) const
+ {
+ ParseFolderInfo(folderIndex, folder);
+ folder.UnpackCoder = FoToMainUnpackSizeIndex[folderIndex];
+ }
+ unsigned GetNumFolderUnpackSizes(unsigned folderIndex) const
+ {
+ return (unsigned)(FoToCoderUnpackSizes[folderIndex + 1] - FoToCoderUnpackSizes[folderIndex]);
+ }
+
+ UInt64 GetFolderUnpackSize(unsigned folderIndex) const
+ {
+ return CoderUnpackSizes[FoToCoderUnpackSizes[folderIndex] + FoToMainUnpackSizeIndex[folderIndex]];
+ }
+
+ UInt64 GetStreamPackSize(unsigned index) const
+ {
+ return PackPositions[index + 1] - PackPositions[index];
+ }
+
+ CFolders(): NumPackStreams(0), NumFolders(0) {}
+
+ void Clear()
+ {
+ NumPackStreams = 0;
+ PackPositions.Free();
+ // PackCRCs.Clear();
+
+ NumFolders = 0;
+ FolderCRCs.Clear();
+ NumUnpackStreamsVector.Free();
+ CoderUnpackSizes.Free();
+ FoToCoderUnpackSizes.Free();
+ FoStartPackStreamIndex.Free();
+ FoToMainUnpackSizeIndex.Free();
+ FoCodersDataOffset.Free();
+ CodersData.Free();
+ }
+};
+
+struct CDatabase: public CFolders
+{
+ CRecordVector<CFileItem> Files;
+
+ CUInt64DefVector CTime;
+ CUInt64DefVector ATime;
+ CUInt64DefVector MTime;
+ CUInt64DefVector StartPos;
+ CBoolVector IsAnti;
+ /*
+ CBoolVector IsAux;
+ CByteBuffer SecureBuf;
+ CRecordVector<UInt32> SecureIDs;
+ */
+
+ CByteBuffer NamesBuf;
+ CObjArray<size_t> NameOffsets; // numFiles + 1, offsets of utf-16 symbols
+
+ /*
+ void ClearSecure()
+ {
+ SecureBuf.Free();
+ SecureIDs.Clear();
+ }
+ */
+
+ void Clear()
+ {
+ CFolders::Clear();
+ // ClearSecure();
+
+ NamesBuf.Free();
+ NameOffsets.Free();
+
+ Files.Clear();
+ CTime.Clear();
+ ATime.Clear();
+ MTime.Clear();
+ StartPos.Clear();
+ IsAnti.Clear();
+ // IsAux.Clear();
+ }
+
+ bool IsSolid() const
+ {
+ for (CNum i = 0; i < NumFolders; i++)
+ if (NumUnpackStreamsVector[i] > 1)
+ return true;
+ return false;
+ }
+ bool IsItemAnti(unsigned index) const { return (index < IsAnti.Size() && IsAnti[index]); }
+ // bool IsItemAux(unsigned index) const { return (index < IsAux.Size() && IsAux[index]); }
+
+ /*
+ const void* GetName(unsigned index) const
+ {
+ if (!NameOffsets || !NamesBuf)
+ return NULL;
+ return (void *)((const Byte *)NamesBuf + NameOffsets[index] * 2);
+ };
+ */
+ void GetPath(unsigned index, UString &path) const;
+ HRESULT GetPath_Prop(unsigned index, PROPVARIANT *path) const throw();
+};
+
struct CInArchiveInfo
{
CArchiveVersion Version;
@@ -24,66 +180,100 @@ struct CInArchiveInfo
UInt64 DataStartPosition;
UInt64 DataStartPosition2;
CRecordVector<UInt64> FileInfoPopIDs;
+
void Clear()
{
+ StartPosition = 0;
+ StartPositionAfterHeader = 0;
+ DataStartPosition = 0;
+ DataStartPosition2 = 0;
FileInfoPopIDs.Clear();
}
};
-struct CArchiveDatabaseEx: public CArchiveDatabase
+struct CDbEx: public CDatabase
{
- CInArchiveInfo ArchiveInfo;
- CRecordVector<UInt64> PackStreamStartPositions;
- CRecordVector<CNum> FolderStartPackStreamIndex;
- CRecordVector<CNum> FolderStartFileIndex;
- CRecordVector<CNum> FileIndexToFolderIndexMap;
+ CInArchiveInfo ArcInfo;
+
+ CObjArray<CNum> FolderStartFileIndex;
+ CObjArray<CNum> FileIndexToFolderIndexMap;
UInt64 HeadersSize;
UInt64 PhySize;
+ /*
+ CRecordVector<size_t> SecureOffsets;
+ bool IsTree;
+ bool ThereAreAltStreams;
+ */
+
+ bool IsArc;
+ bool PhySizeWasConfirmed;
+
+ bool ThereIsHeaderError;
+ bool UnexpectedEnd;
+ // bool UnsupportedVersion;
+
+ bool StartHeaderWasRecovered;
+ bool UnsupportedFeatureWarning;
+ bool UnsupportedFeatureError;
+
+ /*
+ void ClearSecureEx()
+ {
+ ClearSecure();
+ SecureOffsets.Clear();
+ }
+ */
+
void Clear()
{
- CArchiveDatabase::Clear();
- ArchiveInfo.Clear();
- PackStreamStartPositions.Clear();
- FolderStartPackStreamIndex.Clear();
- FolderStartFileIndex.Clear();
- FileIndexToFolderIndexMap.Clear();
+ IsArc = false;
+ PhySizeWasConfirmed = false;
+
+ ThereIsHeaderError = false;
+ UnexpectedEnd = false;
+ // UnsupportedVersion = false;
+
+ StartHeaderWasRecovered = false;
+ UnsupportedFeatureError = false;
+ UnsupportedFeatureWarning = false;
+
+ /*
+ IsTree = false;
+ ThereAreAltStreams = false;
+ */
+
+ CDatabase::Clear();
+
+ // SecureOffsets.Clear();
+ ArcInfo.Clear();
+ FolderStartFileIndex.Free();
+ FileIndexToFolderIndexMap.Free();
HeadersSize = 0;
PhySize = 0;
}
- void FillFolderStartPackStream();
- void FillStartPos();
- void FillFolderStartFileIndex();
-
- void Fill()
- {
- FillFolderStartPackStream();
- FillStartPos();
- FillFolderStartFileIndex();
- }
+ void FillLinks();
- UInt64 GetFolderStreamPos(int folderIndex, int indexInFolder) const
+ UInt64 GetFolderStreamPos(CNum folderIndex, unsigned indexInFolder) const
{
- return ArchiveInfo.DataStartPosition +
- PackStreamStartPositions[FolderStartPackStreamIndex[folderIndex] + indexInFolder];
+ return ArcInfo.DataStartPosition +
+ PackPositions[FoStartPackStreamIndex[folderIndex] + indexInFolder];
}
- UInt64 GetFolderFullPackSize(int folderIndex) const
+ UInt64 GetFolderFullPackSize(CNum folderIndex) const
{
- CNum packStreamIndex = FolderStartPackStreamIndex[folderIndex];
- const CFolder &folder = Folders[folderIndex];
- UInt64 size = 0;
- for (int i = 0; i < folder.PackStreams.Size(); i++)
- size += PackSizes[packStreamIndex + i];
- return size;
+ return
+ PackPositions[FoStartPackStreamIndex[folderIndex + 1]] -
+ PackPositions[FoStartPackStreamIndex[folderIndex]];
}
- UInt64 GetFolderPackStreamSize(int folderIndex, int streamIndex) const
+ UInt64 GetFolderPackStreamSize(CNum folderIndex, unsigned streamIndex) const
{
- return PackSizes[FolderStartPackStreamIndex[folderIndex] + streamIndex];
+ size_t i = FoStartPackStreamIndex[folderIndex] + streamIndex;
+ return PackPositions[i + 1] - PackPositions[i];
}
UInt64 GetFilePackSize(CNum fileIndex) const
@@ -96,12 +286,17 @@ struct CArchiveDatabaseEx: public CArchiveDatabase
}
};
-class CInByte2
+const unsigned kNumBufLevelsMax = 4;
+
+struct CInByte2
{
const Byte *_buffer;
- size_t _size;
public:
+ size_t _size;
size_t _pos;
+
+ size_t GetRem() const { return _size - _pos; }
+ const Byte *GetPtr() const { return _buffer + _pos; }
void Init(const Byte *buffer, size_t size)
{
_buffer = buffer;
@@ -110,13 +305,17 @@ public:
}
Byte ReadByte();
void ReadBytes(Byte *data, size_t size);
+ void SkipDataNoCheck(UInt64 size) { _pos += (size_t)size; }
void SkipData(UInt64 size);
+
void SkipData();
+ void SkipRem() { _pos = _size; }
UInt64 ReadNumber();
CNum ReadNum();
UInt32 ReadUInt32();
UInt64 ReadUInt64();
- void ReadString(UString &s);
+
+ void ParseFolder(CFolder &folder);
};
class CStreamSwitch;
@@ -129,8 +328,11 @@ class CInArchive
CMyComPtr<IInStream> _stream;
- CObjectVector<CInByte2> _inByteVector;
+ unsigned _numInByteBufs;
+ CInByte2 _inByteVector[kNumBufLevelsMax];
+
CInByte2 *_inByteBack;
+ bool ThereIsHeaderError;
UInt64 _arhiveBeginStreamPosition;
UInt64 _fileEndPosition;
@@ -139,21 +341,21 @@ class CInArchive
UInt64 HeadersSize;
- void AddByteStream(const Byte *buffer, size_t size)
- {
- _inByteVector.Add(CInByte2());
- _inByteBack = &_inByteVector.Back();
- _inByteBack->Init(buffer, size);
- }
+ bool _useMixerMT;
+
+ void AddByteStream(const Byte *buffer, size_t size);
- void DeleteByteStream()
+ void DeleteByteStream(bool needUpdatePos)
{
- _inByteVector.DeleteBack();
- if (!_inByteVector.IsEmpty())
- _inByteBack = &_inByteVector.Back();
+ _numInByteBufs--;
+ if (_numInByteBufs > 0)
+ {
+ _inByteBack = &_inByteVector[_numInByteBufs - 1];
+ if (needUpdatePos)
+ _inByteBack->_pos += _inByteVector[_numInByteBufs]._pos;
+ }
}
-private:
HRESULT FindAndReadSignature(IInStream *stream, const UInt64 *searchHeaderSizeLimit);
void ReadBytes(Byte *data, size_t size) { _inByteBack->ReadBytes(data, size); }
@@ -165,79 +367,62 @@ private:
UInt64 ReadUInt64() { return _inByteBack->ReadUInt64(); }
void SkipData(UInt64 size) { _inByteBack->SkipData(size); }
void SkipData() { _inByteBack->SkipData(); }
- void WaitAttribute(UInt64 attribute);
+ void WaitId(UInt64 id);
void ReadArchiveProperties(CInArchiveInfo &archiveInfo);
- void GetNextFolderItem(CFolder &itemInfo);
- void ReadHashDigests(int numItems,
- CBoolVector &digestsDefined, CRecordVector<UInt32> &digests);
+ void ReadHashDigests(unsigned numItems, CUInt32DefVector &crcs);
- void ReadPackInfo(
- UInt64 &dataOffset,
- CRecordVector<UInt64> &packSizes,
- CBoolVector &packCRCsDefined,
- CRecordVector<UInt32> &packCRCs);
+ void ReadPackInfo(CFolders &f);
void ReadUnpackInfo(
const CObjectVector<CByteBuffer> *dataVector,
- CObjectVector<CFolder> &folders);
+ CFolders &folders);
void ReadSubStreamsInfo(
- const CObjectVector<CFolder> &folders,
- CRecordVector<CNum> &numUnpackStreamsInFolders,
+ CFolders &folders,
CRecordVector<UInt64> &unpackSizes,
- CBoolVector &digestsDefined,
- CRecordVector<UInt32> &digests);
+ CUInt32DefVector &digests);
void ReadStreamsInfo(
const CObjectVector<CByteBuffer> *dataVector,
UInt64 &dataOffset,
- CRecordVector<UInt64> &packSizes,
- CBoolVector &packCRCsDefined,
- CRecordVector<UInt32> &packCRCs,
- CObjectVector<CFolder> &folders,
- CRecordVector<CNum> &numUnpackStreamsInFolders,
+ CFolders &folders,
CRecordVector<UInt64> &unpackSizes,
- CBoolVector &digestsDefined,
- CRecordVector<UInt32> &digests);
+ CUInt32DefVector &digests);
-
- void ReadBoolVector(int numItems, CBoolVector &v);
- void ReadBoolVector2(int numItems, CBoolVector &v);
+ void ReadBoolVector(unsigned numItems, CBoolVector &v);
+ void ReadBoolVector2(unsigned numItems, CBoolVector &v);
void ReadUInt64DefVector(const CObjectVector<CByteBuffer> &dataVector,
- CUInt64DefVector &v, int numFiles);
+ CUInt64DefVector &v, unsigned numItems);
HRESULT ReadAndDecodePackedStreams(
DECL_EXTERNAL_CODECS_LOC_VARS
UInt64 baseOffset, UInt64 &dataOffset,
CObjectVector<CByteBuffer> &dataVector
- #ifndef _NO_CRYPTO
- , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
- #endif
+ _7Z_DECODER_CRYPRO_VARS_DECL
);
HRESULT ReadHeader(
DECL_EXTERNAL_CODECS_LOC_VARS
- CArchiveDatabaseEx &db
- #ifndef _NO_CRYPTO
- ,ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
- #endif
+ CDbEx &db
+ _7Z_DECODER_CRYPRO_VARS_DECL
);
HRESULT ReadDatabase2(
DECL_EXTERNAL_CODECS_LOC_VARS
- CArchiveDatabaseEx &db
- #ifndef _NO_CRYPTO
- ,ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
- #endif
+ CDbEx &db
+ _7Z_DECODER_CRYPRO_VARS_DECL
);
public:
+ CInArchive(bool useMixerMT):
+ _numInByteBufs(0),
+ _useMixerMT(useMixerMT)
+ {}
+
HRESULT Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit); // S_FALSE means is not archive
void Close();
HRESULT ReadDatabase(
DECL_EXTERNAL_CODECS_LOC_VARS
- CArchiveDatabaseEx &db
- #ifndef _NO_CRYPTO
- ,ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
- #endif
+ CDbEx &db
+ _7Z_DECODER_CRYPRO_VARS_DECL
);
};
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zItem.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zItem.h
index 34f10775cbf..5e2b58f2ef4 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zItem.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zItem.h
@@ -3,7 +3,7 @@
#ifndef __7Z_ITEM_H
#define __7Z_ITEM_H
-#include "../../../Common/Buffer.h"
+#include "../../../Common/MyBuffer.h"
#include "../../../Common/MyString.h"
#include "../../Common/MethodId.h"
@@ -13,8 +13,6 @@
namespace NArchive {
namespace N7z {
-const UInt64 k_AES = 0x06F10701;
-
typedef UInt32 CNum;
const CNum kNumMax = 0x7FFFFFFF;
const CNum kNumNoIndex = 0xFFFFFFFF;
@@ -23,120 +21,129 @@ struct CCoderInfo
{
CMethodId MethodID;
CByteBuffer Props;
- CNum NumInStreams;
- CNum NumOutStreams;
- bool IsSimpleCoder() const { return (NumInStreams == 1) && (NumOutStreams == 1); }
+ UInt32 NumStreams;
+
+ bool IsSimpleCoder() const { return NumStreams == 1; }
};
-struct CBindPair
+struct CBond
{
- CNum InIndex;
- CNum OutIndex;
+ UInt32 PackIndex;
+ UInt32 UnpackIndex;
};
struct CFolder
{
- CObjectVector<CCoderInfo> Coders;
- CRecordVector<CBindPair> BindPairs;
- CRecordVector<CNum> PackStreams;
- CRecordVector<UInt64> UnpackSizes;
- UInt32 UnpackCRC;
- bool UnpackCRCDefined;
+ CLASS_NO_COPY(CFolder)
+public:
+ CObjArray2<CCoderInfo> Coders;
+ CObjArray2<CBond> Bonds;
+ CObjArray2<UInt32> PackStreams;
- CFolder(): UnpackCRCDefined(false) {}
+ CFolder() {}
- UInt64 GetUnpackSize() const // test it
- {
- if (UnpackSizes.IsEmpty())
- return 0;
- for (int i = UnpackSizes.Size() - 1; i >= 0; i--)
- if (FindBindPairForOutStream(i) < 0)
- return UnpackSizes[i];
- throw 1;
- }
+ bool IsDecodingSupported() const { return Coders.Size() <= 32; }
- CNum GetNumOutStreams() const
+ int Find_in_PackStreams(UInt32 packStream) const
{
- CNum result = 0;
- for (int i = 0; i < Coders.Size(); i++)
- result += Coders[i].NumOutStreams;
- return result;
+ FOR_VECTOR(i, PackStreams)
+ if (PackStreams[i] == packStream)
+ return i;
+ return -1;
}
- int FindBindPairForInStream(CNum inStreamIndex) const
+ int FindBond_for_PackStream(UInt32 packStream) const
{
- for(int i = 0; i < BindPairs.Size(); i++)
- if (BindPairs[i].InIndex == inStreamIndex)
+ FOR_VECTOR(i, Bonds)
+ if (Bonds[i].PackIndex == packStream)
return i;
return -1;
}
- int FindBindPairForOutStream(CNum outStreamIndex) const
+
+ /*
+ int FindBond_for_UnpackStream(UInt32 unpackStream) const
{
- for(int i = 0; i < BindPairs.Size(); i++)
- if (BindPairs[i].OutIndex == outStreamIndex)
+ FOR_VECTOR(i, Bonds)
+ if (Bonds[i].UnpackIndex == unpackStream)
return i;
return -1;
}
- int FindPackStreamArrayIndex(CNum inStreamIndex) const
+
+ int FindOutCoder() const
{
- for(int i = 0; i < PackStreams.Size(); i++)
- if (PackStreams[i] == inStreamIndex)
+ for (int i = (int)Coders.Size() - 1; i >= 0; i--)
+ if (FindBond_for_UnpackStream(i) < 0)
return i;
return -1;
}
+ */
bool IsEncrypted() const
{
- for (int i = Coders.Size() - 1; i >= 0; i--)
+ FOR_VECTOR(i, Coders)
if (Coders[i].MethodID == k_AES)
return true;
return false;
}
+};
+
+struct CUInt32DefVector
+{
+ CBoolVector Defs;
+ CRecordVector<UInt32> Vals;
+
+ void ClearAndSetSize(unsigned newSize)
+ {
+ Defs.ClearAndSetSize(newSize);
+ Vals.ClearAndSetSize(newSize);
+ }
- bool CheckStructure() const;
+ void Clear()
+ {
+ Defs.Clear();
+ Vals.Clear();
+ }
+
+ void ReserveDown()
+ {
+ Defs.ReserveDown();
+ Vals.ReserveDown();
+ }
+
+ bool ValidAndDefined(unsigned i) const { return i < Defs.Size() && Defs[i]; }
};
struct CUInt64DefVector
{
- CRecordVector<UInt64> Values;
- CRecordVector<bool> Defined;
+ CBoolVector Defs;
+ CRecordVector<UInt64> Vals;
void Clear()
{
- Values.Clear();
- Defined.Clear();
+ Defs.Clear();
+ Vals.Clear();
}
void ReserveDown()
{
- Values.ReserveDown();
- Values.ReserveDown();
+ Defs.ReserveDown();
+ Vals.ReserveDown();
}
- bool GetItem(int index, UInt64 &value) const
+ bool GetItem(unsigned index, UInt64 &value) const
{
- if (index < Defined.Size() && Defined[index])
+ if (index < Defs.Size() && Defs[index])
{
- value = Values[index];
+ value = Vals[index];
return true;
}
value = 0;
return false;
}
- void SetItem(int index, bool defined, UInt64 value)
- {
- while (index >= Defined.Size())
- Defined.Add(false);
- Defined[index] = defined;
- if (!defined)
- return;
- while (index >= Values.Size())
- Values.Add(0);
- Values[index] = value;
- }
+ void SetItem(unsigned index, bool defined, UInt64 value);
- bool CheckSize(int size) const { return Defined.Size() == size || Defined.Size() == 0; }
+ bool CheckSize(unsigned size) const { return Defs.Size() == size || Defs.Size() == 0; }
};
struct CFileItem
@@ -144,8 +151,10 @@ struct CFileItem
UInt64 Size;
UInt32 Attrib;
UInt32 Crc;
- UString Name;
-
+ /*
+ int Parent;
+ bool IsAltStream;
+ */
bool HasStream; // Test it !!! it means that there is
// stream in some folder. It can be empty stream
bool IsDir;
@@ -153,6 +162,10 @@ struct CFileItem
bool AttribDefined;
CFileItem():
+ /*
+ Parent(-1),
+ IsAltStream(false),
+ */
HasStream(true),
IsDir(false),
CrcDefined(false),
@@ -165,104 +178,6 @@ struct CFileItem
}
};
-struct CFileItem2
-{
- UInt64 CTime;
- UInt64 ATime;
- UInt64 MTime;
- UInt64 StartPos;
- bool CTimeDefined;
- bool ATimeDefined;
- bool MTimeDefined;
- bool StartPosDefined;
- bool IsAnti;
-};
-
-struct CArchiveDatabase
-{
- CRecordVector<UInt64> PackSizes;
- CRecordVector<bool> PackCRCsDefined;
- CRecordVector<UInt32> PackCRCs;
- CObjectVector<CFolder> Folders;
- CRecordVector<CNum> NumUnpackStreamsVector;
- CObjectVector<CFileItem> Files;
-
- CUInt64DefVector CTime;
- CUInt64DefVector ATime;
- CUInt64DefVector MTime;
- CUInt64DefVector StartPos;
- CRecordVector<bool> IsAnti;
-
- void Clear()
- {
- PackSizes.Clear();
- PackCRCsDefined.Clear();
- PackCRCs.Clear();
- Folders.Clear();
- NumUnpackStreamsVector.Clear();
- Files.Clear();
- CTime.Clear();
- ATime.Clear();
- MTime.Clear();
- StartPos.Clear();
- IsAnti.Clear();
- }
-
- void ReserveDown()
- {
- PackSizes.ReserveDown();
- PackCRCsDefined.ReserveDown();
- PackCRCs.ReserveDown();
- Folders.ReserveDown();
- NumUnpackStreamsVector.ReserveDown();
- Files.ReserveDown();
- CTime.ReserveDown();
- ATime.ReserveDown();
- MTime.ReserveDown();
- StartPos.ReserveDown();
- IsAnti.ReserveDown();
- }
-
- bool IsEmpty() const
- {
- return (PackSizes.IsEmpty() &&
- PackCRCsDefined.IsEmpty() &&
- PackCRCs.IsEmpty() &&
- Folders.IsEmpty() &&
- NumUnpackStreamsVector.IsEmpty() &&
- Files.IsEmpty());
- }
-
- bool CheckNumFiles() const
- {
- int size = Files.Size();
- return (
- CTime.CheckSize(size) &&
- ATime.CheckSize(size) &&
- MTime.CheckSize(size) &&
- StartPos.CheckSize(size) &&
- (size == IsAnti.Size() || IsAnti.Size() == 0));
- }
-
- bool IsSolid() const
- {
- for (int i = 0; i < NumUnpackStreamsVector.Size(); i++)
- if (NumUnpackStreamsVector[i] > 1)
- return true;
- return false;
- }
- bool IsItemAnti(int index) const { return (index < IsAnti.Size() && IsAnti[index]); }
- void SetItemAnti(int index, bool isAnti)
- {
- while (index >= IsAnti.Size())
- IsAnti.Add(false);
- IsAnti[index] = isAnti;
- }
-
- void GetFile(int index, CFileItem &file, CFileItem2 &file2) const;
- void AddFile(const CFileItem &file, const CFileItem2 &file2);
-};
-
}}
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zOut.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zOut.cpp
index 0c8aa7e8c66..2f9065884f8 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zOut.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zOut.cpp
@@ -10,35 +10,15 @@
#include "7zOut.h"
-static HRESULT WriteBytes(ISequentialOutStream *stream, const void *data, size_t size)
-{
- while (size > 0)
- {
- UInt32 curSize = (UInt32)MyMin(size, (size_t)0xFFFFFFFF);
- UInt32 processedSize;
- RINOK(stream->Write(data, curSize, &processedSize));
- if (processedSize == 0)
- return E_FAIL;
- data = (const void *)((const Byte *)data + processedSize);
- size -= processedSize;
- }
- return S_OK;
-}
-
namespace NArchive {
namespace N7z {
-HRESULT COutArchive::WriteDirect(const void *data, UInt32 size)
-{
- return ::WriteBytes(SeqStream, data, size);
-}
-
HRESULT COutArchive::WriteSignature()
{
Byte buf[8];
memcpy(buf, kSignature, kSignatureSize);
buf[kSignatureSize] = kMajorVersion;
- buf[kSignatureSize + 1] = 3;
+ buf[kSignatureSize + 1] = 4;
return WriteDirect(buf, 8);
}
@@ -145,7 +125,9 @@ HRESULT COutArchive::SkipPrefixArchiveHeader()
if (_endMarker)
return S_OK;
#endif
- return Stream->Seek(24, STREAM_SEEK_CUR, NULL);
+ Byte buf[24];
+ memset(buf, 0, 24);
+ return WriteDirect(buf, 24);
}
UInt64 COutArchive::GetPos() const
@@ -217,7 +199,7 @@ void COutArchive::WriteNumber(UInt64 value)
mask >>= 1;
}
WriteByte(firstByte);
- for (;i > 0; i--)
+ for (; i > 0; i--)
{
WriteByte((Byte)value);
value >>= 8;
@@ -271,32 +253,34 @@ UInt64 COutArchive::GetVolPureSize(UInt64 volSize, int nameLength, bool props)
void COutArchive::WriteFolder(const CFolder &folder)
{
WriteNumber(folder.Coders.Size());
- int i;
+ unsigned i;
+
for (i = 0; i < folder.Coders.Size(); i++)
{
const CCoderInfo &coder = folder.Coders[i];
{
- size_t propsSize = coder.Props.GetCapacity();
-
UInt64 id = coder.MethodID;
- int idSize;
+ unsigned idSize;
for (idSize = 1; idSize < sizeof(id); idSize++)
if ((id >> (8 * idSize)) == 0)
break;
- BYTE longID[15];
- for (int t = idSize - 1; t >= 0 ; t--, id >>= 8)
- longID[t] = (Byte)(id & 0xFF);
- Byte b;
- b = (Byte)(idSize & 0xF);
+ idSize &= 0xF;
+ Byte temp[16];
+ for (unsigned t = idSize; t != 0; t--, id >>= 8)
+ temp[t] = (Byte)(id & 0xFF);
+
+ Byte b = (Byte)(idSize);
bool isComplex = !coder.IsSimpleCoder();
b |= (isComplex ? 0x10 : 0);
- b |= ((propsSize != 0) ? 0x20 : 0 );
- WriteByte(b);
- WriteBytes(longID, idSize);
+
+ size_t propsSize = coder.Props.Size();
+ b |= ((propsSize != 0) ? 0x20 : 0);
+ temp[0] = b;
+ WriteBytes(temp, idSize + 1);
if (isComplex)
{
- WriteNumber(coder.NumInStreams);
- WriteNumber(coder.NumOutStreams);
+ WriteNumber(coder.NumStreams);
+ WriteNumber(1); // NumOutStreams;
}
if (propsSize == 0)
continue;
@@ -304,24 +288,24 @@ void COutArchive::WriteFolder(const CFolder &folder)
WriteBytes(coder.Props, propsSize);
}
}
- for (i = 0; i < folder.BindPairs.Size(); i++)
+
+ for (i = 0; i < folder.Bonds.Size(); i++)
{
- const CBindPair &bindPair = folder.BindPairs[i];
- WriteNumber(bindPair.InIndex);
- WriteNumber(bindPair.OutIndex);
+ const CBond &bond = folder.Bonds[i];
+ WriteNumber(bond.PackIndex);
+ WriteNumber(bond.UnpackIndex);
}
+
if (folder.PackStreams.Size() > 1)
for (i = 0; i < folder.PackStreams.Size(); i++)
- {
WriteNumber(folder.PackStreams[i]);
- }
}
void COutArchive::WriteBoolVector(const CBoolVector &boolVector)
{
Byte b = 0;
Byte mask = 0x80;
- for (int i = 0; i < boolVector.Size(); i++)
+ FOR_VECTOR (i, boolVector)
{
if (boolVector[i])
b |= mask;
@@ -337,37 +321,42 @@ void COutArchive::WriteBoolVector(const CBoolVector &boolVector)
WriteByte(b);
}
+static inline unsigned Bv_GetSizeInBytes(const CBoolVector &v) { return ((unsigned)v.Size() + 7) / 8; }
-void COutArchive::WriteHashDigests(
- const CRecordVector<bool> &digestsDefined,
- const CRecordVector<UInt32> &digests)
+void COutArchive::WritePropBoolVector(Byte id, const CBoolVector &boolVector)
{
- int numDefined = 0;
- int i;
- for (i = 0; i < digestsDefined.Size(); i++)
- if (digestsDefined[i])
+ WriteByte(id);
+ WriteNumber(Bv_GetSizeInBytes(boolVector));
+ WriteBoolVector(boolVector);
+}
+
+void COutArchive::WriteHashDigests(const CUInt32DefVector &digests)
+{
+ unsigned numDefined = 0;
+ unsigned i;
+ for (i = 0; i < digests.Defs.Size(); i++)
+ if (digests.Defs[i])
numDefined++;
if (numDefined == 0)
return;
WriteByte(NID::kCRC);
- if (numDefined == digestsDefined.Size())
+ if (numDefined == digests.Defs.Size())
WriteByte(1);
else
{
WriteByte(0);
- WriteBoolVector(digestsDefined);
+ WriteBoolVector(digests.Defs);
}
- for (i = 0; i < digests.Size(); i++)
- if (digestsDefined[i])
- WriteUInt32(digests[i]);
+ for (i = 0; i < digests.Defs.Size(); i++)
+ if (digests.Defs[i])
+ WriteUInt32(digests.Vals[i]);
}
void COutArchive::WritePackInfo(
UInt64 dataOffset,
const CRecordVector<UInt64> &packSizes,
- const CRecordVector<bool> &packCRCsDefined,
- const CRecordVector<UInt32> &packCRCs)
+ const CUInt32DefVector &packCRCs)
{
if (packSizes.IsEmpty())
return;
@@ -375,15 +364,15 @@ void COutArchive::WritePackInfo(
WriteNumber(dataOffset);
WriteNumber(packSizes.Size());
WriteByte(NID::kSize);
- for (int i = 0; i < packSizes.Size(); i++)
+ FOR_VECTOR (i, packSizes)
WriteNumber(packSizes[i]);
- WriteHashDigests(packCRCsDefined, packCRCs);
+ WriteHashDigests(packCRCs);
WriteByte(NID::kEnd);
}
-void COutArchive::WriteUnpackInfo(const CObjectVector<CFolder> &folders)
+void COutArchive::WriteUnpackInfo(const CObjectVector<CFolder> &folders, const COutFolders &outFolders)
{
if (folders.IsEmpty())
return;
@@ -394,44 +383,29 @@ void COutArchive::WriteUnpackInfo(const CObjectVector<CFolder> &folders)
WriteNumber(folders.Size());
{
WriteByte(0);
- for (int i = 0; i < folders.Size(); i++)
+ FOR_VECTOR (i, folders)
WriteFolder(folders[i]);
}
WriteByte(NID::kCodersUnpackSize);
- int i;
- for (i = 0; i < folders.Size(); i++)
- {
- const CFolder &folder = folders[i];
- for (int j = 0; j < folder.UnpackSizes.Size(); j++)
- WriteNumber(folder.UnpackSizes[j]);
- }
-
- CRecordVector<bool> unpackCRCsDefined;
- CRecordVector<UInt32> unpackCRCs;
- for (i = 0; i < folders.Size(); i++)
- {
- const CFolder &folder = folders[i];
- unpackCRCsDefined.Add(folder.UnpackCRCDefined);
- unpackCRCs.Add(folder.UnpackCRC);
- }
- WriteHashDigests(unpackCRCsDefined, unpackCRCs);
-
+ FOR_VECTOR (i, outFolders.CoderUnpackSizes)
+ WriteNumber(outFolders.CoderUnpackSizes[i]);
+
+ WriteHashDigests(outFolders.FolderUnpackCRCs);
+
WriteByte(NID::kEnd);
}
-void COutArchive::WriteSubStreamsInfo(
- const CObjectVector<CFolder> &folders,
- const CRecordVector<CNum> &numUnpackStreamsInFolders,
+void COutArchive::WriteSubStreamsInfo(const CObjectVector<CFolder> &folders,
+ const COutFolders &outFolders,
const CRecordVector<UInt64> &unpackSizes,
- const CRecordVector<bool> &digestsDefined,
- const CRecordVector<UInt32> &digests)
+ const CUInt32DefVector &digests)
{
+ const CRecordVector<CNum> &numUnpackStreamsInFolders = outFolders.NumUnpackStreamsVector;
WriteByte(NID::kSubStreamsInfo);
- int i;
+ unsigned i;
for (i = 0; i < numUnpackStreamsInFolders.Size(); i++)
- {
if (numUnpackStreamsInFolders[i] != 1)
{
WriteByte(NID::kNumUnpackStream);
@@ -439,54 +413,50 @@ void COutArchive::WriteSubStreamsInfo(
WriteNumber(numUnpackStreamsInFolders[i]);
break;
}
- }
-
- bool needFlag = true;
- CNum index = 0;
for (i = 0; i < numUnpackStreamsInFolders.Size(); i++)
- for (CNum j = 0; j < numUnpackStreamsInFolders[i]; j++)
+ if (numUnpackStreamsInFolders[i] > 1)
{
- if (j + 1 != numUnpackStreamsInFolders[i])
+ WriteByte(NID::kSize);
+ CNum index = 0;
+ for (i = 0; i < numUnpackStreamsInFolders.Size(); i++)
{
- if (needFlag)
- WriteByte(NID::kSize);
- needFlag = false;
- WriteNumber(unpackSizes[index]);
+ CNum num = numUnpackStreamsInFolders[i];
+ for (CNum j = 0; j < num; j++)
+ {
+ if (j + 1 != num)
+ WriteNumber(unpackSizes[index]);
+ index++;
+ }
}
- index++;
+ break;
}
- CRecordVector<bool> digestsDefined2;
- CRecordVector<UInt32> digests2;
+ CUInt32DefVector digests2;
- int digestIndex = 0;
+ unsigned digestIndex = 0;
for (i = 0; i < folders.Size(); i++)
{
- int numSubStreams = (int)numUnpackStreamsInFolders[i];
- if (numSubStreams == 1 && folders[i].UnpackCRCDefined)
+ unsigned numSubStreams = (unsigned)numUnpackStreamsInFolders[i];
+ if (numSubStreams == 1 && outFolders.FolderUnpackCRCs.ValidAndDefined(i))
digestIndex++;
else
- for (int j = 0; j < numSubStreams; j++, digestIndex++)
+ for (unsigned j = 0; j < numSubStreams; j++, digestIndex++)
{
- digestsDefined2.Add(digestsDefined[digestIndex]);
- digests2.Add(digests[digestIndex]);
+ digests2.Defs.Add(digests.Defs[digestIndex]);
+ digests2.Vals.Add(digests.Vals[digestIndex]);
}
}
- WriteHashDigests(digestsDefined2, digests2);
+ WriteHashDigests(digests2);
WriteByte(NID::kEnd);
}
-void COutArchive::SkipAlign(unsigned /* pos */, unsigned /* alignSize */)
-{
- return;
-}
-
-/*
-7-Zip 4.50 - 4.58 contain BUG, so they do not support .7z archives with Unknown field.
+// 7-Zip 4.50 - 4.58 contain BUG, so they do not support .7z archives with Unknown field.
void COutArchive::SkipAlign(unsigned pos, unsigned alignSize)
{
+ if (!_useAlign)
+ return;
pos += (unsigned)GetPos();
pos &= (alignSize - 1);
if (pos == 0)
@@ -500,11 +470,8 @@ void COutArchive::SkipAlign(unsigned pos, unsigned alignSize)
for (unsigned i = 0; i < skip; i++)
WriteByte(0);
}
-*/
-
-static inline unsigned Bv_GetSizeInBytes(const CBoolVector &v) { return ((unsigned)v.Size() + 7) / 8; }
-void COutArchive::WriteAlignedBoolHeader(const CBoolVector &v, int numDefined, Byte type, unsigned itemSize)
+void COutArchive::WriteAlignedBoolHeader(const CBoolVector &v, unsigned numDefined, Byte type, unsigned itemSize)
{
const unsigned bvSize = (numDefined == v.Size()) ? 0 : Bv_GetSizeInBytes(v);
const UInt64 dataSize = (UInt64)numDefined * itemSize + bvSize + 2;
@@ -524,48 +491,56 @@ void COutArchive::WriteAlignedBoolHeader(const CBoolVector &v, int numDefined, B
void COutArchive::WriteUInt64DefVector(const CUInt64DefVector &v, Byte type)
{
- int numDefined = 0;
+ unsigned numDefined = 0;
- int i;
- for (i = 0; i < v.Defined.Size(); i++)
- if (v.Defined[i])
+ unsigned i;
+ for (i = 0; i < v.Defs.Size(); i++)
+ if (v.Defs[i])
numDefined++;
if (numDefined == 0)
return;
- WriteAlignedBoolHeader(v.Defined, numDefined, type, 8);
+ WriteAlignedBoolHeader(v.Defs, numDefined, type, 8);
- for (i = 0; i < v.Defined.Size(); i++)
- if (v.Defined[i])
- WriteUInt64(v.Values[i]);
+ for (i = 0; i < v.Defs.Size(); i++)
+ if (v.Defs[i])
+ WriteUInt64(v.Vals[i]);
}
HRESULT COutArchive::EncodeStream(
DECL_EXTERNAL_CODECS_LOC_VARS
CEncoder &encoder, const CByteBuffer &data,
- CRecordVector<UInt64> &packSizes, CObjectVector<CFolder> &folders)
+ CRecordVector<UInt64> &packSizes, CObjectVector<CFolder> &folders, COutFolders &outFolders)
{
CBufInStream *streamSpec = new CBufInStream;
CMyComPtr<ISequentialInStream> stream = streamSpec;
- streamSpec->Init(data, data.GetCapacity());
- CFolder folderItem;
- folderItem.UnpackCRCDefined = true;
- folderItem.UnpackCRC = CrcCalc(data, data.GetCapacity());
- UInt64 dataSize64 = data.GetCapacity();
+ streamSpec->Init(data, data.Size());
+ outFolders.FolderUnpackCRCs.Defs.Add(true);
+ outFolders.FolderUnpackCRCs.Vals.Add(CrcCalc(data, data.Size()));
+ // outFolders.NumUnpackStreamsVector.Add(1);
+ UInt64 dataSize64 = data.Size();
+ UInt64 unpackSize;
RINOK(encoder.Encode(
EXTERNAL_CODECS_LOC_VARS
- stream, NULL, &dataSize64, folderItem, SeqStream, packSizes, NULL))
- folders.Add(folderItem);
+ stream,
+ // NULL,
+ &dataSize64,
+ folders.AddNew(), outFolders.CoderUnpackSizes, unpackSize, SeqStream, packSizes, NULL))
return S_OK;
}
void COutArchive::WriteHeader(
- const CArchiveDatabase &db,
- const CHeaderOptions &headerOptions,
+ const CArchiveDatabaseOut &db,
+ // const CHeaderOptions &headerOptions,
UInt64 &headerOffset)
{
- int i;
+ /*
+ bool thereIsSecure = (db.SecureBuf.Size() != 0);
+ */
+ _useAlign = true;
+
+ unsigned i;
UInt64 packedSize = 0;
for (i = 0; i < db.PackSizes.Size(); i++)
@@ -580,31 +555,22 @@ void COutArchive::WriteHeader(
if (db.Folders.Size() > 0)
{
WriteByte(NID::kMainStreamsInfo);
- WritePackInfo(0, db.PackSizes,
- db.PackCRCsDefined,
- db.PackCRCs);
-
- WriteUnpackInfo(db.Folders);
+ WritePackInfo(0, db.PackSizes, db.PackCRCs);
+ WriteUnpackInfo(db.Folders, (const COutFolders &)db);
CRecordVector<UInt64> unpackSizes;
- CRecordVector<bool> digestsDefined;
- CRecordVector<UInt32> digests;
+ CUInt32DefVector digests;
for (i = 0; i < db.Files.Size(); i++)
{
const CFileItem &file = db.Files[i];
if (!file.HasStream)
continue;
unpackSizes.Add(file.Size);
- digestsDefined.Add(file.CrcDefined);
- digests.Add(file.Crc);
+ digests.Defs.Add(file.CrcDefined);
+ digests.Vals.Add(file.Crc);
}
- WriteSubStreamsInfo(
- db.Folders,
- db.NumUnpackStreamsVector,
- unpackSizes,
- digestsDefined,
- digests);
+ WriteSubStreamsInfo(db.Folders, (const COutFolders &)db, unpackSizes, digests);
WriteByte(NID::kEnd);
}
@@ -618,85 +584,75 @@ void COutArchive::WriteHeader(
WriteNumber(db.Files.Size());
{
- /* ---------- Empty Streams ---------- */
- CBoolVector emptyStreamVector;
- emptyStreamVector.Reserve(db.Files.Size());
- int numEmptyStreams = 0;
- for (i = 0; i < db.Files.Size(); i++)
- if (db.Files[i].HasStream)
- emptyStreamVector.Add(false);
- else
- {
- emptyStreamVector.Add(true);
- numEmptyStreams++;
- }
- if (numEmptyStreams > 0)
- {
- WriteByte(NID::kEmptyStream);
- WriteNumber(Bv_GetSizeInBytes(emptyStreamVector));
- WriteBoolVector(emptyStreamVector);
-
- CBoolVector emptyFileVector, antiVector;
- emptyFileVector.Reserve(numEmptyStreams);
- antiVector.Reserve(numEmptyStreams);
- CNum numEmptyFiles = 0, numAntiItems = 0;
+ /* ---------- Empty Streams ---------- */
+ CBoolVector emptyStreamVector;
+ emptyStreamVector.ClearAndSetSize(db.Files.Size());
+ unsigned numEmptyStreams = 0;
for (i = 0; i < db.Files.Size(); i++)
+ if (db.Files[i].HasStream)
+ emptyStreamVector[i] = false;
+ else
+ {
+ emptyStreamVector[i] = true;
+ numEmptyStreams++;
+ }
+ if (numEmptyStreams != 0)
{
- const CFileItem &file = db.Files[i];
- if (!file.HasStream)
+ WritePropBoolVector(NID::kEmptyStream, emptyStreamVector);
+
+ CBoolVector emptyFileVector, antiVector;
+ emptyFileVector.ClearAndSetSize(numEmptyStreams);
+ antiVector.ClearAndSetSize(numEmptyStreams);
+ bool thereAreEmptyFiles = false, thereAreAntiItems = false;
+ unsigned cur = 0;
+ for (i = 0; i < db.Files.Size(); i++)
{
- emptyFileVector.Add(!file.IsDir);
+ const CFileItem &file = db.Files[i];
+ if (file.HasStream)
+ continue;
+ emptyFileVector[cur] = !file.IsDir;
if (!file.IsDir)
- numEmptyFiles++;
+ thereAreEmptyFiles = true;
bool isAnti = db.IsItemAnti(i);
- antiVector.Add(isAnti);
+ antiVector[cur] = isAnti;
if (isAnti)
- numAntiItems++;
+ thereAreAntiItems = true;
+ cur++;
}
- }
-
- if (numEmptyFiles > 0)
- {
- WriteByte(NID::kEmptyFile);
- WriteNumber(Bv_GetSizeInBytes(emptyFileVector));
- WriteBoolVector(emptyFileVector);
- }
-
- if (numAntiItems > 0)
- {
- WriteByte(NID::kAnti);
- WriteNumber(Bv_GetSizeInBytes(antiVector));
- WriteBoolVector(antiVector);
+
+ if (thereAreEmptyFiles)
+ WritePropBoolVector(NID::kEmptyFile, emptyFileVector);
+ if (thereAreAntiItems)
+ WritePropBoolVector(NID::kAnti, antiVector);
}
}
- }
{
/* ---------- Names ---------- */
- int numDefined = 0;
+ unsigned numDefined = 0;
size_t namesDataSize = 0;
- for (int i = 0; i < db.Files.Size(); i++)
+ FOR_VECTOR (i, db.Files)
{
- const UString &name = db.Files[i].Name;
+ const UString &name = db.Names[i];
if (!name.IsEmpty())
numDefined++;
- namesDataSize += (name.Length() + 1) * 2;
+ namesDataSize += (name.Len() + 1) * 2;
}
if (numDefined > 0)
{
namesDataSize++;
- SkipAlign(2 + GetBigNumberSize(namesDataSize), 2);
+ SkipAlign(2 + GetBigNumberSize(namesDataSize), 16);
WriteByte(NID::kName);
WriteNumber(namesDataSize);
WriteByte(0);
- for (int i = 0; i < db.Files.Size(); i++)
+ FOR_VECTOR (i, db.Files)
{
- const UString &name = db.Files[i].Name;
- for (int t = 0; t <= name.Length(); t++)
+ const UString &name = db.Names[i];
+ for (unsigned t = 0; t <= name.Len(); t++)
{
wchar_t c = name[t];
WriteByte((Byte)c);
@@ -706,26 +662,26 @@ void COutArchive::WriteHeader(
}
}
- if (headerOptions.WriteCTime) WriteUInt64DefVector(db.CTime, NID::kCTime);
- if (headerOptions.WriteATime) WriteUInt64DefVector(db.ATime, NID::kATime);
- if (headerOptions.WriteMTime) WriteUInt64DefVector(db.MTime, NID::kMTime);
+ /* if (headerOptions.WriteCTime) */ WriteUInt64DefVector(db.CTime, NID::kCTime);
+ /* if (headerOptions.WriteATime) */ WriteUInt64DefVector(db.ATime, NID::kATime);
+ /* if (headerOptions.WriteMTime) */ WriteUInt64DefVector(db.MTime, NID::kMTime);
WriteUInt64DefVector(db.StartPos, NID::kStartPos);
{
/* ---------- Write Attrib ---------- */
CBoolVector boolVector;
- boolVector.Reserve(db.Files.Size());
- int numDefined = 0;
+ boolVector.ClearAndSetSize(db.Files.Size());
+ unsigned numDefined = 0;
for (i = 0; i < db.Files.Size(); i++)
{
bool defined = db.Files[i].AttribDefined;
- boolVector.Add(defined);
+ boolVector[i] = defined;
if (defined)
numDefined++;
}
- if (numDefined > 0)
+ if (numDefined != 0)
{
- WriteAlignedBoolHeader(boolVector, numDefined, NID::kWinAttributes, 4);
+ WriteAlignedBoolHeader(boolVector, numDefined, NID::kWinAttrib, 4);
for (i = 0; i < db.Files.Size(); i++)
{
const CFileItem &file = db.Files[i];
@@ -735,13 +691,95 @@ void COutArchive::WriteHeader(
}
}
+ /*
+ {
+ // ---------- Write IsAux ----------
+ unsigned numAux = 0;
+ const CBoolVector &isAux = db.IsAux;
+ for (i = 0; i < isAux.Size(); i++)
+ if (isAux[i])
+ numAux++;
+ if (numAux > 0)
+ {
+ const unsigned bvSize = Bv_GetSizeInBytes(isAux);
+ WriteByte(NID::kIsAux);
+ WriteNumber(bvSize);
+ WriteBoolVector(isAux);
+ }
+ }
+
+ {
+ // ---------- Write Parent ----------
+ CBoolVector boolVector;
+ boolVector.Reserve(db.Files.Size());
+ unsigned numIsDir = 0;
+ unsigned numParentLinks = 0;
+ for (i = 0; i < db.Files.Size(); i++)
+ {
+ const CFileItem &file = db.Files[i];
+ bool defined = !file.IsAltStream;
+ boolVector.Add(defined);
+ if (defined)
+ numIsDir++;
+ if (file.Parent >= 0)
+ numParentLinks++;
+ }
+ if (numParentLinks > 0)
+ {
+ // WriteAlignedBoolHeader(boolVector, numDefined, NID::kParent, 4);
+ const unsigned bvSize = (numIsDir == boolVector.Size()) ? 0 : Bv_GetSizeInBytes(boolVector);
+ const UInt64 dataSize = (UInt64)db.Files.Size() * 4 + bvSize + 1;
+ SkipAlign(2 + (unsigned)bvSize + (unsigned)GetBigNumberSize(dataSize), 4);
+
+ WriteByte(NID::kParent);
+ WriteNumber(dataSize);
+ if (numIsDir == boolVector.Size())
+ WriteByte(1);
+ else
+ {
+ WriteByte(0);
+ WriteBoolVector(boolVector);
+ }
+ for (i = 0; i < db.Files.Size(); i++)
+ {
+ const CFileItem &file = db.Files[i];
+ // if (file.Parent >= 0)
+ WriteUInt32(file.Parent);
+ }
+ }
+ }
+
+ if (thereIsSecure)
+ {
+ UInt64 secureDataSize = 1 + 4 +
+ db.SecureBuf.Size() +
+ db.SecureSizes.Size() * 4;
+ // secureDataSize += db.SecureIDs.Size() * 4;
+ for (i = 0; i < db.SecureIDs.Size(); i++)
+ secureDataSize += GetBigNumberSize(db.SecureIDs[i]);
+ SkipAlign(2 + GetBigNumberSize(secureDataSize), 4);
+ WriteByte(NID::kNtSecure);
+ WriteNumber(secureDataSize);
+ WriteByte(0);
+ WriteUInt32(db.SecureSizes.Size());
+ for (i = 0; i < db.SecureSizes.Size(); i++)
+ WriteUInt32(db.SecureSizes[i]);
+ WriteBytes(db.SecureBuf, db.SecureBuf.Size());
+ for (i = 0; i < db.SecureIDs.Size(); i++)
+ {
+ WriteNumber(db.SecureIDs[i]);
+ // WriteUInt32(db.SecureIDs[i]);
+ }
+ }
+ */
+
WriteByte(NID::kEnd); // for files
WriteByte(NID::kEnd); // for headers
}
HRESULT COutArchive::WriteDatabase(
DECL_EXTERNAL_CODECS_LOC_VARS
- const CArchiveDatabase &db,
+ const CArchiveDatabaseOut &db,
const CCompressionMethodMode *options,
const CHeaderOptions &headerOptions)
{
@@ -773,17 +811,16 @@ HRESULT COutArchive::WriteDatabase(
_countMode = encodeHeaders;
_writeToStream = true;
_countSize = 0;
- WriteHeader(db, headerOptions, headerOffset);
+ WriteHeader(db, /* headerOptions, */ headerOffset);
if (encodeHeaders)
{
- CByteBuffer buf;
- buf.SetCapacity(_countSize);
+ CByteBuffer buf(_countSize);
_outByte2.Init((Byte *)buf, _countSize);
_countMode = false;
_writeToStream = false;
- WriteHeader(db, headerOptions, headerOffset);
+ WriteHeader(db, /* headerOptions, */ headerOffset);
if (_countSize != _outByte2.GetPos())
return E_FAIL;
@@ -794,10 +831,12 @@ HRESULT COutArchive::WriteDatabase(
CEncoder encoder(headerOptions.CompressMainHeader ? *options : encryptOptions);
CRecordVector<UInt64> packSizes;
CObjectVector<CFolder> folders;
+ COutFolders outFolders;
+
RINOK(EncodeStream(
EXTERNAL_CODECS_LOC_VARS
encoder, buf,
- packSizes, folders));
+ packSizes, folders, outFolders));
_writeToStream = true;
@@ -805,11 +844,10 @@ HRESULT COutArchive::WriteDatabase(
throw 1;
WriteID(NID::kEncodedHeader);
- WritePackInfo(headerOffset, packSizes,
- CRecordVector<bool>(), CRecordVector<UInt32>());
- WriteUnpackInfo(folders);
+ WritePackInfo(headerOffset, packSizes, CUInt32DefVector());
+ WriteUnpackInfo(folders, outFolders);
WriteByte(NID::kEnd);
- for (int i = 0; i < packSizes.Size(); i++)
+ FOR_VECTOR (i, packSizes)
headerOffset += packSizes[i];
}
RINOK(_outByte.Flush());
@@ -842,24 +880,28 @@ HRESULT COutArchive::WriteDatabase(
}
}
-void CArchiveDatabase::GetFile(int index, CFileItem &file, CFileItem2 &file2) const
+void CUInt64DefVector::SetItem(unsigned index, bool defined, UInt64 value)
{
- file = Files[index];
- file2.CTimeDefined = CTime.GetItem(index, file2.CTime);
- file2.ATimeDefined = ATime.GetItem(index, file2.ATime);
- file2.MTimeDefined = MTime.GetItem(index, file2.MTime);
- file2.StartPosDefined = StartPos.GetItem(index, file2.StartPos);
- file2.IsAnti = IsItemAnti(index);
+ while (index >= Defs.Size())
+ Defs.Add(false);
+ Defs[index] = defined;
+ if (!defined)
+ return;
+ while (index >= Vals.Size())
+ Vals.Add(0);
+ Vals[index] = value;
}
-void CArchiveDatabase::AddFile(const CFileItem &file, const CFileItem2 &file2)
+void CArchiveDatabaseOut::AddFile(const CFileItem &file, const CFileItem2 &file2, const UString &name)
{
- int index = Files.Size();
+ unsigned index = Files.Size();
CTime.SetItem(index, file2.CTimeDefined, file2.CTime);
ATime.SetItem(index, file2.ATimeDefined, file2.ATime);
MTime.SetItem(index, file2.MTimeDefined, file2.MTime);
StartPos.SetItem(index, file2.StartPosDefined, file2.StartPos);
- SetItemAnti(index, file2.IsAnti);
+ SetItem_Anti(index, file2.IsAnti);
+ // SetItem_Aux(index, file2.IsAux);
+ Names.Add(name);
Files.Add(file);
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zOut.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zOut.h
index 7b1b528e6c4..6c902668939 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zOut.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zOut.h
@@ -9,6 +9,7 @@
#include "7zItem.h"
#include "../../Common/OutBuffer.h"
+#include "../../Common/StreamUtils.h"
namespace NArchive {
namespace N7z {
@@ -28,6 +29,8 @@ public:
}
void WriteBytes(const void *data, size_t size)
{
+ if (size == 0)
+ return;
if (size > _size - _pos)
throw 1;
memcpy(_data + _pos, data, size);
@@ -45,27 +48,191 @@ public:
struct CHeaderOptions
{
bool CompressMainHeader;
+ /*
bool WriteCTime;
bool WriteATime;
bool WriteMTime;
+ */
CHeaderOptions():
- CompressMainHeader(true),
- WriteCTime(false),
- WriteATime(false),
- WriteMTime(true)
+ CompressMainHeader(true)
+ /*
+ , WriteCTime(false)
+ , WriteATime(false)
+ , WriteMTime(true)
+ */
{}
};
+
+struct CFileItem2
+{
+ UInt64 CTime;
+ UInt64 ATime;
+ UInt64 MTime;
+ UInt64 StartPos;
+ bool CTimeDefined;
+ bool ATimeDefined;
+ bool MTimeDefined;
+ bool StartPosDefined;
+ bool IsAnti;
+ // bool IsAux;
+
+ void Init()
+ {
+ CTimeDefined = false;
+ ATimeDefined = false;
+ MTimeDefined = false;
+ StartPosDefined = false;
+ IsAnti = false;
+ // IsAux = false;
+ }
+};
+
+struct COutFolders
+{
+ CUInt32DefVector FolderUnpackCRCs; // Now we use it for headers only.
+
+ CRecordVector<CNum> NumUnpackStreamsVector;
+ CRecordVector<UInt64> CoderUnpackSizes; // including unpack sizes of bond coders
+
+ void OutFoldersClear()
+ {
+ FolderUnpackCRCs.Clear();
+ NumUnpackStreamsVector.Clear();
+ CoderUnpackSizes.Clear();
+ }
+
+ void OutFoldersReserveDown()
+ {
+ FolderUnpackCRCs.ReserveDown();
+ NumUnpackStreamsVector.ReserveDown();
+ CoderUnpackSizes.ReserveDown();
+ }
+};
+
+struct CArchiveDatabaseOut: public COutFolders
+{
+ CRecordVector<UInt64> PackSizes;
+ CUInt32DefVector PackCRCs;
+ CObjectVector<CFolder> Folders;
+
+ CRecordVector<CFileItem> Files;
+ UStringVector Names;
+ CUInt64DefVector CTime;
+ CUInt64DefVector ATime;
+ CUInt64DefVector MTime;
+ CUInt64DefVector StartPos;
+ CRecordVector<bool> IsAnti;
+
+ /*
+ CRecordVector<bool> IsAux;
+
+ CByteBuffer SecureBuf;
+ CRecordVector<UInt32> SecureSizes;
+ CRecordVector<UInt32> SecureIDs;
+
+ void ClearSecure()
+ {
+ SecureBuf.Free();
+ SecureSizes.Clear();
+ SecureIDs.Clear();
+ }
+ */
+
+ void Clear()
+ {
+ OutFoldersClear();
+
+ PackSizes.Clear();
+ PackCRCs.Clear();
+ Folders.Clear();
+
+ Files.Clear();
+ Names.Clear();
+ CTime.Clear();
+ ATime.Clear();
+ MTime.Clear();
+ StartPos.Clear();
+ IsAnti.Clear();
+
+ /*
+ IsAux.Clear();
+ ClearSecure();
+ */
+ }
+
+ void ReserveDown()
+ {
+ OutFoldersReserveDown();
+
+ PackSizes.ReserveDown();
+ PackCRCs.ReserveDown();
+ Folders.ReserveDown();
+
+ Files.ReserveDown();
+ Names.ReserveDown();
+ CTime.ReserveDown();
+ ATime.ReserveDown();
+ MTime.ReserveDown();
+ StartPos.ReserveDown();
+ IsAnti.ReserveDown();
+
+ /*
+ IsAux.ReserveDown();
+ */
+ }
+
+ bool IsEmpty() const
+ {
+ return (
+ PackSizes.IsEmpty() &&
+ NumUnpackStreamsVector.IsEmpty() &&
+ Folders.IsEmpty() &&
+ Files.IsEmpty());
+ }
+
+ bool CheckNumFiles() const
+ {
+ unsigned size = Files.Size();
+ return (
+ CTime.CheckSize(size) &&
+ ATime.CheckSize(size) &&
+ MTime.CheckSize(size) &&
+ StartPos.CheckSize(size) &&
+ (size == IsAnti.Size() || IsAnti.Size() == 0));
+ }
+
+ bool IsItemAnti(unsigned index) const { return (index < IsAnti.Size() && IsAnti[index]); }
+ // bool IsItemAux(unsigned index) const { return (index < IsAux.Size() && IsAux[index]); }
+
+ void SetItem_Anti(unsigned index, bool isAnti)
+ {
+ while (index >= IsAnti.Size())
+ IsAnti.Add(false);
+ IsAnti[index] = isAnti;
+ }
+ /*
+ void SetItem_Aux(unsigned index, bool isAux)
+ {
+ while (index >= IsAux.Size())
+ IsAux.Add(false);
+ IsAux[index] = isAux;
+ }
+ */
+
+ void AddFile(const CFileItem &file, const CFileItem2 &file2, const UString &name);
+};
+
class COutArchive
{
UInt64 _prefixHeaderPos;
- HRESULT WriteDirect(const void *data, UInt32 size);
+ HRESULT WriteDirect(const void *data, UInt32 size) { return WriteStream(SeqStream, data, size); }
UInt64 GetPos() const;
void WriteBytes(const void *data, size_t size);
- void WriteBytes(const CByteBuffer &data) { WriteBytes(data, data.GetCapacity()); }
+ void WriteBytes(const CByteBuffer &data) { WriteBytes(data, data.Size()); }
void WriteByte(Byte b);
void WriteUInt32(UInt32 value);
void WriteUInt64(UInt64 value);
@@ -75,36 +242,36 @@ class COutArchive
void WriteFolder(const CFolder &folder);
HRESULT WriteFileHeader(const CFileItem &itemInfo);
void WriteBoolVector(const CBoolVector &boolVector);
- void WriteHashDigests(
- const CRecordVector<bool> &digestsDefined,
- const CRecordVector<UInt32> &hashDigests);
+ void WritePropBoolVector(Byte id, const CBoolVector &boolVector);
+
+ void WriteHashDigests(const CUInt32DefVector &digests);
void WritePackInfo(
UInt64 dataOffset,
const CRecordVector<UInt64> &packSizes,
- const CRecordVector<bool> &packCRCsDefined,
- const CRecordVector<UInt32> &packCRCs);
+ const CUInt32DefVector &packCRCs);
- void WriteUnpackInfo(const CObjectVector<CFolder> &folders);
+ void WriteUnpackInfo(
+ const CObjectVector<CFolder> &folders,
+ const COutFolders &outFolders);
void WriteSubStreamsInfo(
const CObjectVector<CFolder> &folders,
- const CRecordVector<CNum> &numUnpackStreamsInFolders,
+ const COutFolders &outFolders,
const CRecordVector<UInt64> &unpackSizes,
- const CRecordVector<bool> &digestsDefined,
- const CRecordVector<UInt32> &hashDigests);
+ const CUInt32DefVector &digests);
void SkipAlign(unsigned pos, unsigned alignSize);
- void WriteAlignedBoolHeader(const CBoolVector &v, int numDefined, Byte type, unsigned itemSize);
+ void WriteAlignedBoolHeader(const CBoolVector &v, unsigned numDefined, Byte type, unsigned itemSize);
void WriteUInt64DefVector(const CUInt64DefVector &v, Byte type);
HRESULT EncodeStream(
DECL_EXTERNAL_CODECS_LOC_VARS
CEncoder &encoder, const CByteBuffer &data,
- CRecordVector<UInt64> &packSizes, CObjectVector<CFolder> &folders);
+ CRecordVector<UInt64> &packSizes, CObjectVector<CFolder> &folders, COutFolders &outFolders);
void WriteHeader(
- const CArchiveDatabase &db,
- const CHeaderOptions &headerOptions,
+ const CArchiveDatabaseOut &db,
+ // const CHeaderOptions &headerOptions,
UInt64 &headerOffset);
bool _countMode;
@@ -118,6 +285,8 @@ class COutArchive
bool _endMarker;
#endif
+ bool _useAlign;
+
HRESULT WriteSignature();
#ifdef _7Z_VOL
HRESULT WriteFinishSignature();
@@ -136,7 +305,7 @@ public:
HRESULT SkipPrefixArchiveHeader();
HRESULT WriteDatabase(
DECL_EXTERNAL_CODECS_LOC_VARS
- const CArchiveDatabase &db,
+ const CArchiveDatabaseOut &db,
const CCompressionMethodMode *options,
const CHeaderOptions &headerOptions);
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zProperties.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zProperties.cpp
index fd4af49c74e..4cb5a5e6469 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zProperties.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zProperties.cpp
@@ -13,56 +13,47 @@ namespace N7z {
struct CPropMap
{
- UInt64 FilePropID;
- STATPROPSTG StatPROPSTG;
+ UInt32 FilePropID;
+ CStatProp StatProp;
};
-CPropMap kPropMap[] =
+static const CPropMap kPropMap[] =
{
{ NID::kName, { NULL, kpidPath, VT_BSTR } },
{ NID::kSize, { NULL, kpidSize, VT_UI8 } },
{ NID::kPackInfo, { NULL, kpidPackSize, VT_UI8 } },
#ifdef _MULTI_PACK
- { 100, { L"Pack0", kpidPackedSize0, VT_UI8 } },
- { 101, { L"Pack1", kpidPackedSize1, VT_UI8 } },
- { 102, { L"Pack2", kpidPackedSize2, VT_UI8 } },
- { 103, { L"Pack3", kpidPackedSize3, VT_UI8 } },
- { 104, { L"Pack4", kpidPackedSize4, VT_UI8 } },
+ { 100, { "Pack0", kpidPackedSize0, VT_UI8 } },
+ { 101, { "Pack1", kpidPackedSize1, VT_UI8 } },
+ { 102, { "Pack2", kpidPackedSize2, VT_UI8 } },
+ { 103, { "Pack3", kpidPackedSize3, VT_UI8 } },
+ { 104, { "Pack4", kpidPackedSize4, VT_UI8 } },
#endif
{ NID::kCTime, { NULL, kpidCTime, VT_FILETIME } },
{ NID::kMTime, { NULL, kpidMTime, VT_FILETIME } },
{ NID::kATime, { NULL, kpidATime, VT_FILETIME } },
- { NID::kWinAttributes, { NULL, kpidAttrib, VT_UI4 } },
- { NID::kStartPos, { NULL, kpidPosition, VT_UI4 } },
+ { NID::kWinAttrib, { NULL, kpidAttrib, VT_UI4 } },
+ { NID::kStartPos, { NULL, kpidPosition, VT_UI8 } },
{ NID::kCRC, { NULL, kpidCRC, VT_UI4 } },
+// { NID::kIsAux, { NULL, kpidIsAux, VT_BOOL } },
{ NID::kAnti, { NULL, kpidIsAnti, VT_BOOL } }
#ifndef _SFX
,
- { 97, { NULL,kpidEncrypted, VT_BOOL } },
- { 98, { NULL,kpidMethod, VT_BSTR } },
- { 99, { NULL,kpidBlock, VT_UI4 } }
+ { 97, { NULL, kpidEncrypted, VT_BOOL } },
+ { 98, { NULL, kpidMethod, VT_BSTR } },
+ { 99, { NULL, kpidBlock, VT_UI4 } }
#endif
};
-static const int kPropMapSize = sizeof(kPropMap) / sizeof(kPropMap[0]);
-
-static int FindPropInMap(UInt64 filePropID)
-{
- for (int i = 0; i < kPropMapSize; i++)
- if (kPropMap[i].FilePropID == filePropID)
- return i;
- return -1;
-}
-
static void CopyOneItem(CRecordVector<UInt64> &src,
CRecordVector<UInt64> &dest, UInt32 item)
{
- for (int i = 0; i < src.Size(); i++)
+ FOR_VECTOR (i, src)
if (src[i] == item)
{
dest.Add(item);
@@ -73,7 +64,7 @@ static void CopyOneItem(CRecordVector<UInt64> &src,
static void RemoveOneItem(CRecordVector<UInt64> &src, UInt32 item)
{
- for (int i = 0; i < src.Size(); i++)
+ FOR_VECTOR (i, src)
if (src[i] == item)
{
src.Delete(i);
@@ -83,7 +74,7 @@ static void RemoveOneItem(CRecordVector<UInt64> &src, UInt32 item)
static void InsertToHead(CRecordVector<UInt64> &dest, UInt32 item)
{
- for (int i = 0; i < dest.Size(); i++)
+ FOR_VECTOR (i, dest)
if (dest[i] == item)
{
dest.Delete(i);
@@ -92,32 +83,39 @@ static void InsertToHead(CRecordVector<UInt64> &dest, UInt32 item)
dest.Insert(0, item);
}
+#define COPY_ONE_ITEM(id) CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::id);
+
void CHandler::FillPopIDs()
{
_fileInfoPopIDs.Clear();
#ifdef _7Z_VOL
- if(_volumes.Size() < 1)
+ if (_volumes.Size() < 1)
return;
const CVolume &volume = _volumes.Front();
const CArchiveDatabaseEx &_db = volume.Database;
#endif
- CRecordVector<UInt64> fileInfoPopIDs = _db.ArchiveInfo.FileInfoPopIDs;
+ CRecordVector<UInt64> fileInfoPopIDs = _db.ArcInfo.FileInfoPopIDs;
RemoveOneItem(fileInfoPopIDs, NID::kEmptyStream);
RemoveOneItem(fileInfoPopIDs, NID::kEmptyFile);
+ /*
+ RemoveOneItem(fileInfoPopIDs, NID::kParent);
+ RemoveOneItem(fileInfoPopIDs, NID::kNtSecure);
+ */
+
+ COPY_ONE_ITEM(kName);
+ COPY_ONE_ITEM(kAnti);
+ COPY_ONE_ITEM(kSize);
+ COPY_ONE_ITEM(kPackInfo);
+ COPY_ONE_ITEM(kCTime);
+ COPY_ONE_ITEM(kMTime);
+ COPY_ONE_ITEM(kATime);
+ COPY_ONE_ITEM(kWinAttrib);
+ COPY_ONE_ITEM(kCRC);
+ COPY_ONE_ITEM(kComment);
- CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kName);
- CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kAnti);
- CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kSize);
- CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kPackInfo);
- CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kCTime);
- CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kMTime);
- CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kATime);
- CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kWinAttributes);
- CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kCRC);
- CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kComment);
_fileInfoPopIDs += fileInfoPopIDs;
#ifndef _SFX
@@ -125,6 +123,7 @@ void CHandler::FillPopIDs()
_fileInfoPopIDs.Add(98);
_fileInfoPopIDs.Add(99);
#endif
+
#ifdef _MULTI_PACK
_fileInfoPopIDs.Add(100);
_fileInfoPopIDs.Add(101);
@@ -141,24 +140,35 @@ void CHandler::FillPopIDs()
#endif
}
-STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 *numProperties)
+STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 *numProps)
{
- *numProperties = _fileInfoPopIDs.Size();
+ *numProps = _fileInfoPopIDs.Size();
return S_OK;
}
STDMETHODIMP CHandler::GetPropertyInfo(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType)
{
- if ((int)index >= _fileInfoPopIDs.Size())
- return E_INVALIDARG;
- int indexInMap = FindPropInMap(_fileInfoPopIDs[index]);
- if (indexInMap == -1)
+ if (index >= _fileInfoPopIDs.Size())
return E_INVALIDARG;
- const STATPROPSTG &srcItem = kPropMap[indexInMap].StatPROPSTG;
- *propID = srcItem.propid;
- *varType = srcItem.vt;
- *name = 0;
- return S_OK;
+ UInt64 id = _fileInfoPopIDs[index];
+ for (unsigned i = 0; i < ARRAY_SIZE(kPropMap); i++)
+ {
+ const CPropMap &pr = kPropMap[i];
+ if (pr.FilePropID == id)
+ {
+ const CStatProp &st = pr.StatProp;
+ *propID = st.PropID;
+ *varType = st.vt;
+ /*
+ if (st.lpwstrName)
+ *name = ::SysAllocString(st.lpwstrName);
+ else
+ */
+ *name = NULL;
+ return S_OK;
+ }
+ }
+ return E_INVALIDARG;
}
}}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zRegister.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zRegister.cpp
index 6e9bf6b99db..389b54074e4 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zRegister.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zRegister.cpp
@@ -5,14 +5,17 @@
#include "../../Common/RegisterArc.h"
#include "7zHandler.h"
-static IInArchive *CreateArc() { return new NArchive::N7z::CHandler; }
-#ifndef EXTRACT_ONLY
-static IOutArchive *CreateArcOut() { return new NArchive::N7z::CHandler; }
-#else
-#define CreateArcOut 0
-#endif
-static CArcInfo g_ArcInfo =
- { L"7z", L"7z", 0, 7, {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}, 6, false, CreateArc, CreateArcOut };
+namespace NArchive {
+namespace N7z {
-REGISTER_ARC(7z)
+static Byte k_Signature_Dec[kSignatureSize] = {'7' + 1, 'z', 0xBC, 0xAF, 0x27, 0x1C};
+
+REGISTER_ARC_IO_DECREMENT_SIG(
+ "7z", "7z", NULL, 7,
+ k_Signature_Dec,
+ 0,
+ NArcInfoFlags::kFindSignature,
+ NULL);
+
+}}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp
index 06969636da2..8e45d98756c 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp
@@ -9,16 +9,14 @@ STDMETHODIMP CSequentialInStreamSizeCount2::Read(void *data, UInt32 size, UInt32
UInt32 realProcessedSize;
HRESULT result = _stream->Read(data, size, &realProcessedSize);
_size += realProcessedSize;
- if (processedSize != 0)
+ if (processedSize)
*processedSize = realProcessedSize;
return result;
}
-STDMETHODIMP CSequentialInStreamSizeCount2::GetSubStreamSize(
- UInt64 subStream, UInt64 *value)
+STDMETHODIMP CSequentialInStreamSizeCount2::GetSubStreamSize(UInt64 subStream, UInt64 *value)
{
- if (_getSubStreamSize == NULL)
+ if (!_getSubStreamSize)
return E_NOTIMPL;
- return _getSubStreamSize->GetSubStreamSize(subStream, value);
+ return _getSubStreamSize->GetSubStreamSize(subStream, value);
}
-
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zSpecStream.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zSpecStream.h
index 2e26efd5cbd..21155069f2d 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zSpecStream.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zSpecStream.h
@@ -3,10 +3,10 @@
#ifndef __7Z_SPEC_STREAM_H
#define __7Z_SPEC_STREAM_H
-#include "../../IStream.h"
-#include "../../ICoder.h"
#include "../../../Common/MyCom.h"
+#include "../../ICoder.h"
+
class CSequentialInStreamSizeCount2:
public ISequentialInStream,
public ICompressGetSubStreamSize,
@@ -18,14 +18,14 @@ class CSequentialInStreamSizeCount2:
public:
void Init(ISequentialInStream *stream)
{
+ _size = 0;
+ _getSubStreamSize.Release();
_stream = stream;
- _getSubStreamSize = 0;
_stream.QueryInterface(IID_ICompressGetSubStreamSize, &_getSubStreamSize);
- _size = 0;
}
UInt64 GetSize() const { return _size; }
- MY_UNKNOWN_IMP1(ICompressGetSubStreamSize)
+ MY_UNKNOWN_IMP2(ISequentialInStream, ICompressGetSubStreamSize)
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp b/3rdparty/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp
index e63b09d2802..7e9478fc5ac 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp
@@ -4,15 +4,15 @@
#include "../../../../C/CpuArch.h"
-#include "../../Common/LimitedStreams.h"
-#include "../../Common/ProgressUtils.h"
+#include "../../../Common/Wildcard.h"
#include "../../Common/CreateCoder.h"
+#include "../../Common/LimitedStreams.h"
+#include "../../Common/ProgressUtils.h"
#include "../../Compress/CopyCoder.h"
#include "../Common/ItemNameUtils.h"
-#include "../Common/OutStreamWithCRC.h"
#include "7zDecode.h"
#include "7zEncode.h"
@@ -24,9 +24,392 @@
namespace NArchive {
namespace N7z {
-#ifdef MY_CPU_X86_OR_AMD64
-#define USE_86_FILTER
-#endif
+
+#define k_X86 k_BCJ
+
+struct CFilterMode
+{
+ UInt32 Id;
+ UInt32 Delta;
+
+ CFilterMode(): Id(0), Delta(0) {}
+
+ void SetDelta()
+ {
+ if (Id == k_IA64)
+ Delta = 16;
+ else if (Id == k_ARM || Id == k_PPC || Id == k_PPC)
+ Delta = 4;
+ else if (Id == k_ARMT)
+ Delta = 2;
+ else
+ Delta = 0;
+ }
+};
+
+
+/* ---------- PE ---------- */
+
+#define MZ_SIG 0x5A4D
+
+#define PE_SIG 0x00004550
+#define PE_OptHeader_Magic_32 0x10B
+#define PE_OptHeader_Magic_64 0x20B
+#define PE_SectHeaderSize 40
+#define PE_SECT_EXECUTE 0x20000000
+
+static int Parse_EXE(const Byte *buf, size_t size, CFilterMode *filterMode)
+{
+ if (size < 512 || GetUi16(buf) != MZ_SIG)
+ return 0;
+
+ const Byte *p;
+ UInt32 peOffset, optHeaderSize, filterId;
+
+ peOffset = GetUi32(buf + 0x3C);
+ if (peOffset >= 0x1000 || peOffset + 512 > size || (peOffset & 7) != 0)
+ return 0;
+ p = buf + peOffset;
+ if (GetUi32(p) != PE_SIG)
+ return 0;
+ p += 4;
+
+ switch (GetUi16(p))
+ {
+ case 0x014C:
+ case 0x8664: filterId = k_X86; break;
+
+ /*
+ IMAGE_FILE_MACHINE_ARM 0x01C0 // ARM LE
+ IMAGE_FILE_MACHINE_THUMB 0x01C2 // ARM Thumb / Thumb-2 LE
+ IMAGE_FILE_MACHINE_ARMNT 0x01C4 // ARM Thumb-2, LE
+ Note: We use ARM filter for 0x01C2. (WinCE 5 - 0x01C2) files mostly contain ARM code (not Thumb/Thumb-2).
+ */
+
+ case 0x01C0: // WinCE old
+ case 0x01C2: filterId = k_ARM; break; // WinCE new
+ case 0x01C4: filterId = k_ARMT; break; // WinRT
+
+ case 0x0200: filterId = k_IA64; break;
+ default: return 0;
+ }
+
+ optHeaderSize = GetUi16(p + 16);
+ if (optHeaderSize > (1 << 10))
+ return 0;
+
+ p += 20; /* headerSize */
+
+ switch (GetUi16(p))
+ {
+ case PE_OptHeader_Magic_32:
+ case PE_OptHeader_Magic_64:
+ break;
+ default:
+ return 0;
+ }
+
+ filterMode->Id = filterId;
+ return 1;
+}
+
+
+/* ---------- ELF ---------- */
+
+#define ELF_SIG 0x464C457F
+
+#define ELF_CLASS_32 1
+#define ELF_CLASS_64 2
+
+#define ELF_DATA_2LSB 1
+#define ELF_DATA_2MSB 2
+
+static UInt16 Get16(const Byte *p, Bool be) { if (be) return (UInt16)GetBe16(p); return (UInt16)GetUi16(p); }
+static UInt32 Get32(const Byte *p, Bool be) { if (be) return GetBe32(p); return GetUi32(p); }
+// static UInt64 Get64(const Byte *p, Bool be) { if (be) return GetBe64(p); return GetUi64(p); }
+
+static int Parse_ELF(const Byte *buf, size_t size, CFilterMode *filterMode)
+{
+ Bool /* is32, */ be;
+ UInt32 filterId;
+
+ if (size < 512 || buf[6] != 1) /* ver */
+ return 0;
+
+ if (GetUi32(buf) != ELF_SIG)
+ return 0;
+
+ switch (buf[4])
+ {
+ case ELF_CLASS_32: /* is32 = True; */ break;
+ case ELF_CLASS_64: /* is32 = False; */ break;
+ default: return 0;
+ }
+
+ switch (buf[5])
+ {
+ case ELF_DATA_2LSB: be = False; break;
+ case ELF_DATA_2MSB: be = True; break;
+ default: return 0;
+ }
+
+ switch (Get16(buf + 0x12, be))
+ {
+ case 3:
+ case 6:
+ case 62: filterId = k_X86; break;
+ case 2:
+ case 18:
+ case 43: filterId = k_SPARC; break;
+ case 20:
+ case 21: if (!be) return 0; filterId = k_PPC; break;
+ case 40: if ( be) return 0; filterId = k_ARM; break;
+
+ /* Some IA-64 ELF exacutable have size that is not aligned for 16 bytes.
+ So we don't use IA-64 filter for IA-64 ELF */
+ // case 50: if ( be) return 0; filterId = k_IA64; break;
+
+ default: return 0;
+ }
+
+ filterMode->Id = filterId;
+ return 1;
+}
+
+
+
+/* ---------- Mach-O ---------- */
+
+#define MACH_SIG_BE_32 0xCEFAEDFE
+#define MACH_SIG_BE_64 0xCFFAEDFE
+#define MACH_SIG_LE_32 0xFEEDFACE
+#define MACH_SIG_LE_64 0xFEEDFACF
+
+#define MACH_ARCH_ABI64 (1 << 24)
+#define MACH_MACHINE_386 7
+#define MACH_MACHINE_ARM 12
+#define MACH_MACHINE_SPARC 14
+#define MACH_MACHINE_PPC 18
+#define MACH_MACHINE_PPC64 (MACH_ARCH_ABI64 | MACH_MACHINE_PPC)
+#define MACH_MACHINE_AMD64 (MACH_ARCH_ABI64 | MACH_MACHINE_386)
+
+static unsigned Parse_MACH(const Byte *buf, size_t size, CFilterMode *filterMode)
+{
+ UInt32 filterId, numCommands, commandsSize;
+
+ if (size < 512)
+ return 0;
+
+ Bool /* mode64, */ be;
+ switch (GetUi32(buf))
+ {
+ case MACH_SIG_BE_32: /* mode64 = False; */ be = True; break;
+ case MACH_SIG_BE_64: /* mode64 = True; */ be = True; break;
+ case MACH_SIG_LE_32: /* mode64 = False; */ be = False; break;
+ case MACH_SIG_LE_64: /* mode64 = True; */ be = False; break;
+ default: return 0;
+ }
+
+ switch (Get32(buf + 4, be))
+ {
+ case MACH_MACHINE_386:
+ case MACH_MACHINE_AMD64: filterId = k_X86; break;
+ case MACH_MACHINE_ARM: if ( be) return 0; filterId = k_ARM; break;
+ case MACH_MACHINE_SPARC: if (!be) return 0; filterId = k_SPARC; break;
+ case MACH_MACHINE_PPC:
+ case MACH_MACHINE_PPC64: if (!be) return 0; filterId = k_PPC; break;
+ default: return 0;
+ }
+
+ numCommands = Get32(buf + 0x10, be);
+ commandsSize = Get32(buf + 0x14, be);
+
+ if (commandsSize > (1 << 24) || numCommands > (1 << 18))
+ return 0;
+
+ filterMode->Id = filterId;
+ return 1;
+}
+
+
+/* ---------- WAV ---------- */
+
+#define WAV_SUBCHUNK_fmt 0x20746D66
+#define WAV_SUBCHUNK_data 0x61746164
+
+#define RIFF_SIG 0x46464952
+
+static Bool Parse_WAV(const Byte *buf, size_t size, CFilterMode *filterMode)
+{
+ UInt32 subChunkSize, pos;
+ if (size < 0x2C)
+ return False;
+
+ if (GetUi32(buf + 0) != RIFF_SIG ||
+ GetUi32(buf + 8) != 0x45564157 || // WAVE
+ GetUi32(buf + 0xC) != WAV_SUBCHUNK_fmt)
+ return False;
+ subChunkSize = GetUi32(buf + 0x10);
+ /* [0x14 = format] = 1 (PCM) */
+ if (subChunkSize < 0x10 || subChunkSize > 0x12 || GetUi16(buf + 0x14) != 1)
+ return False;
+
+ unsigned numChannels = GetUi16(buf + 0x16);
+ unsigned bitsPerSample = GetUi16(buf + 0x22);
+
+ if ((bitsPerSample & 0x7) != 0 || bitsPerSample >= 256 || numChannels >= 256)
+ return False;
+
+ pos = 0x14 + subChunkSize;
+
+ const int kNumSubChunksTests = 10;
+ // Do we need to scan more than 3 sub-chunks?
+ for (int i = 0; i < kNumSubChunksTests; i++)
+ {
+ if (pos + 8 > size)
+ return False;
+ subChunkSize = GetUi32(buf + pos + 4);
+ if (GetUi32(buf + pos) == WAV_SUBCHUNK_data)
+ {
+ unsigned delta = numChannels * (bitsPerSample >> 3);
+ if (delta >= 256)
+ return False;
+ filterMode->Id = k_Delta;
+ filterMode->Delta = delta;
+ return True;
+ }
+ if (subChunkSize > (1 << 16))
+ return False;
+ pos += subChunkSize + 8;
+ }
+ return False;
+}
+
+static Bool ParseFile(const Byte *buf, size_t size, CFilterMode *filterMode)
+{
+ filterMode->Id = 0;
+ filterMode->Delta = 0;
+
+ if (Parse_EXE(buf, size, filterMode)) return True;
+ if (Parse_ELF(buf, size, filterMode)) return True;
+ if (Parse_MACH(buf, size, filterMode)) return True;
+ return Parse_WAV(buf, size, filterMode);
+}
+
+
+
+
+struct CFilterMode2: public CFilterMode
+{
+ bool Encrypted;
+ unsigned GroupIndex;
+
+ CFilterMode2(): Encrypted(false) {}
+
+ int Compare(const CFilterMode2 &m) const
+ {
+ if (!Encrypted)
+ {
+ if (m.Encrypted)
+ return -1;
+ }
+ else if (!m.Encrypted)
+ return 1;
+
+ if (Id < m.Id) return -1;
+ if (Id > m.Id) return 1;
+
+ if (Delta < m.Delta) return -1;
+ if (Delta > m.Delta) return 1;
+
+ return 0;
+ }
+
+ bool operator ==(const CFilterMode2 &m) const
+ {
+ return Id == m.Id && Delta == m.Delta && Encrypted == m.Encrypted;
+ }
+};
+
+static unsigned GetGroup(CRecordVector<CFilterMode2> &filters, const CFilterMode2 &m)
+{
+ unsigned i;
+ for (i = 0; i < filters.Size(); i++)
+ {
+ const CFilterMode2 &m2 = filters[i];
+ if (m == m2)
+ return i;
+ /*
+ if (m.Encrypted != m2.Encrypted)
+ {
+ if (!m.Encrypted)
+ break;
+ continue;
+ }
+
+ if (m.Id < m2.Id) break;
+ if (m.Id != m2.Id) continue;
+
+ if (m.Delta < m2.Delta) break;
+ if (m.Delta != m2.Delta) continue;
+ */
+ }
+ // filters.Insert(i, m);
+ // return i;
+ return filters.Add(m);
+}
+
+static inline bool Is86Filter(CMethodId m)
+{
+ return (m == k_BCJ || m == k_BCJ2);
+}
+
+static inline bool IsExeFilter(CMethodId m)
+{
+ switch (m)
+ {
+ case k_BCJ:
+ case k_BCJ2:
+ case k_ARM:
+ case k_ARMT:
+ case k_PPC:
+ case k_SPARC:
+ case k_IA64:
+ return true;
+ }
+ return false;
+}
+
+static unsigned Get_FilterGroup_for_Folder(CRecordVector<CFilterMode2> &filters, const CFolderEx &f)
+{
+ CFilterMode2 m;
+ m.Id = 0;
+ m.Delta = 0;
+ m.Encrypted = f.IsEncrypted();
+
+ const CCoderInfo &coder = f.Coders[f.UnpackCoder];
+
+ if (coder.MethodID == k_Delta)
+ {
+ if (coder.Props.Size() == 1)
+ {
+ m.Delta = (unsigned)coder.Props[0] + 1;
+ m.Id = k_Delta;
+ }
+ }
+ else if (IsExeFilter(coder.MethodID))
+ {
+ m.Id = (UInt32)coder.MethodID;
+ if (m.Id == k_BCJ2)
+ m.Id = k_BCJ;
+ m.SetDelta();
+ }
+
+ return GetGroup(filters, m);
+}
+
+
+
static HRESULT WriteRange(IInStream *inStream, ISequentialOutStream *outStream,
UInt64 position, UInt64 size, ICompressProgressInfo *progress)
@@ -43,34 +426,27 @@ static HRESULT WriteRange(IInStream *inStream, ISequentialOutStream *outStream,
return (copyCoderSpec->TotalSize == size ? S_OK : E_FAIL);
}
-static int GetReverseSlashPos(const UString &name)
-{
- int slashPos = name.ReverseFind(L'/');
- #ifdef _WIN32
- int slash1Pos = name.ReverseFind(L'\\');
- slashPos = MyMax(slashPos, slash1Pos);
- #endif
- return slashPos;
-}
-
-int CUpdateItem::GetExtensionPos() const
+/*
+unsigned CUpdateItem::GetExtensionPos() const
{
- int slashPos = GetReverseSlashPos(Name);
- int dotPos = Name.ReverseFind(L'.');
- if (dotPos < 0 || (dotPos < slashPos && slashPos >= 0))
- return Name.Length();
+ int slashPos = Name.ReverseFind_PathSepar();
+ int dotPos = Name.ReverseFind_Dot();
+ if (dotPos <= slashPos)
+ return Name.Len();
return dotPos + 1;
}
UString CUpdateItem::GetExtension() const
{
- return Name.Mid(GetExtensionPos());
+ return Name.Ptr(GetExtensionPos());
}
+*/
#define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; }
#define RINOZ_COMP(a, b) RINOZ(MyCompare(a, b))
+/*
static int CompareBuffers(const CByteBuffer &a1, const CByteBuffer &a2)
{
size_t c1 = a1.GetCapacity();
@@ -89,7 +465,7 @@ static int CompareCoders(const CCoderInfo &c1, const CCoderInfo &c2)
return CompareBuffers(c1.Props, c2.Props);
}
-static int CompareBindPairs(const CBindPair &b1, const CBindPair &b2)
+static int CompareBonds(const CBond &b1, const CBond &b2)
{
RINOZ_COMP(b1.InIndex, b2.InIndex);
return MyCompare(b1.OutIndex, b2.OutIndex);
@@ -103,77 +479,86 @@ static int CompareFolders(const CFolder &f1, const CFolder &f2)
int i;
for (i = 0; i < s1; i++)
RINOZ(CompareCoders(f1.Coders[i], f2.Coders[i]));
- s1 = f1.BindPairs.Size();
- s2 = f2.BindPairs.Size();
+ s1 = f1.Bonds.Size();
+ s2 = f2.Bonds.Size();
RINOZ_COMP(s1, s2);
for (i = 0; i < s1; i++)
- RINOZ(CompareBindPairs(f1.BindPairs[i], f2.BindPairs[i]));
+ RINOZ(CompareBonds(f1.Bonds[i], f2.Bonds[i]));
return 0;
}
+*/
/*
static int CompareFiles(const CFileItem &f1, const CFileItem &f2)
{
- return MyStringCompareNoCase(f1.Name, f2.Name);
+ return CompareFileNames(f1.Name, f2.Name);
}
*/
struct CFolderRepack
{
- int FolderIndex;
- int Group;
+ unsigned FolderIndex;
CNum NumCopyFiles;
};
-static int CompareFolderRepacks(const CFolderRepack *p1, const CFolderRepack *p2, void *param)
+/*
+static int CompareFolderRepacks(const CFolderRepack *p1, const CFolderRepack *p2, void *)
{
- RINOZ_COMP(p1->Group, p2->Group);
int i1 = p1->FolderIndex;
int i2 = p2->FolderIndex;
- const CArchiveDatabaseEx &db = *(const CArchiveDatabaseEx *)param;
- RINOZ(CompareFolders(
- db.Folders[i1],
- db.Folders[i2]));
+ // In that version we don't want to parse folders here, so we don't compare folders
+ // probably it must be improved in future
+ // const CDbEx &db = *(const CDbEx *)param;
+ // RINOZ(CompareFolders(
+ // db.Folders[i1],
+ // db.Folders[i2]));
+
return MyCompare(i1, i2);
- /*
- RINOZ_COMP(
- db.NumUnpackStreamsVector[i1],
- db.NumUnpackStreamsVector[i2]);
- if (db.NumUnpackStreamsVector[i1] == 0)
- return 0;
- return CompareFiles(
- db.Files[db.FolderStartFileIndex[i1]],
- db.Files[db.FolderStartFileIndex[i2]]);
- */
+
+ // RINOZ_COMP(
+ // db.NumUnpackStreamsVector[i1],
+ // db.NumUnpackStreamsVector[i2]);
+ // if (db.NumUnpackStreamsVector[i1] == 0)
+ // return 0;
+ // return CompareFiles(
+ // db.Files[db.FolderStartFileIndex[i1]],
+ // db.Files[db.FolderStartFileIndex[i2]]);
}
+*/
-////////////////////////////////////////////////////////////
+/*
+ we sort empty files and dirs in such order:
+ - Dir.NonAnti (name sorted)
+ - File.NonAnti (name sorted)
+ - File.Anti (name sorted)
+ - Dir.Anti (reverse name sorted)
+*/
-static int CompareEmptyItems(const int *p1, const int *p2, void *param)
+static int CompareEmptyItems(const unsigned *p1, const unsigned *p2, void *param)
{
const CObjectVector<CUpdateItem> &updateItems = *(const CObjectVector<CUpdateItem> *)param;
const CUpdateItem &u1 = updateItems[*p1];
const CUpdateItem &u2 = updateItems[*p2];
+ // NonAnti < Anti
+ if (u1.IsAnti != u2.IsAnti)
+ return (u1.IsAnti ? 1 : -1);
if (u1.IsDir != u2.IsDir)
- return (u1.IsDir) ? 1 : -1;
- if (u1.IsDir)
{
- if (u1.IsAnti != u2.IsAnti)
+ // Dir.NonAnti < File < Dir.Anti
+ if (u1.IsDir)
return (u1.IsAnti ? 1 : -1);
- int n = MyStringCompareNoCase(u1.Name, u2.Name);
- return -n;
+ return (u2.IsAnti ? -1 : 1);
}
- if (u1.IsAnti != u2.IsAnti)
- return (u1.IsAnti ? 1 : -1);
- return MyStringCompareNoCase(u1.Name, u2.Name);
+ int n = CompareFileNames(u1.Name, u2.Name);
+ return (u1.IsDir && u1.IsAnti) ? -n : n;
}
static const char *g_Exts =
- " lzma 7z ace arc arj bz bz2 deb lzo lzx gz pak rpm sit tgz tbz tbz2 tgz cab ha lha lzh rar zoo"
+ " 7z xz lzma ace arc arj bz tbz bz2 tbz2 cab deb gz tgz ha lha lzh lzo lzx pak rar rpm sit zoo"
" zip jar ear war msi"
" 3gp avi mov mpeg mpg mpe wmv"
" aac ape fla flac la mp3 m4a mp4 ofr ogg pac ra rm rka shn swa tta wv wma wav"
- " swf "
+ " swf"
" chm hxi hxs"
" gif jpeg jpg jp2 png tiff bmp ico psd psp"
" awg ps eps cgm dxf svg vrml wmf emf ai md"
@@ -182,25 +567,28 @@ static const char *g_Exts =
" iso bin nrg mdf img pdi tar cpio xpi"
" vfd vhd vud vmc vsv"
" vmdk dsk nvram vmem vmsd vmsn vmss vmtm"
- " inl inc idl acf asa h hpp hxx c cpp cxx rc java cs pas bas vb cls ctl frm dlg def"
+ " inl inc idl acf asa"
+ " h hpp hxx c cpp cxx m mm go swift"
+ " rc java cs rs pas bas vb cls ctl frm dlg def"
" f77 f f90 f95"
- " asm sql manifest dep "
- " mak clw csproj vcproj sln dsp dsw "
- " class "
- " bat cmd"
+ " asm s"
+ " sql manifest dep"
+ " mak clw csproj vcproj sln dsp dsw"
+ " class"
+ " bat cmd bash sh"
" xml xsd xsl xslt hxk hxc htm html xhtml xht mht mhtml htw asp aspx css cgi jsp shtml"
- " awk sed hta js php php3 php4 php5 phptml pl pm py pyo rb sh tcl vbs"
+ " awk sed hta js json php php3 php4 php5 phptml pl pm py pyo rb tcl ts vbs"
" text txt tex ans asc srt reg ini doc docx mcw dot rtf hlp xls xlr xlt xlw ppt pdf"
" sxc sxd sxi sxg sxw stc sti stw stm odt ott odg otg odp otp ods ots odf"
" abw afp cwk lwp wpd wps wpt wrf wri"
" abf afm bdf fon mgf otf pcf pfa snf ttf"
" dbf mdb nsf ntf wdb db fdb gdb"
- " exe dll ocx vbx sfx sys tlb awx com obj lib out o so "
+ " exe dll ocx vbx sfx sys tlb awx com obj lib out o so"
" pdb pch idb ncb opt";
-int GetExtIndex(const char *ext)
+static unsigned GetExtIndex(const char *ext)
{
- int extIndex = 1;
+ unsigned extIndex = 1;
const char *p = g_Exts;
for (;;)
{
@@ -209,7 +597,7 @@ int GetExtIndex(const char *ext)
return extIndex;
if (c == ' ')
continue;
- int pos = 0;
+ unsigned pos = 0;
for (;;)
{
char c2 = ext[pos++];
@@ -235,9 +623,11 @@ struct CRefItem
{
const CUpdateItem *UpdateItem;
UInt32 Index;
- UInt32 ExtensionPos;
- UInt32 NamePos;
- int ExtensionIndex;
+ unsigned ExtensionPos;
+ unsigned NamePos;
+ unsigned ExtensionIndex;
+
+ CRefItem() {};
CRefItem(UInt32 index, const CUpdateItem &ui, bool sortByType):
UpdateItem(&ui),
Index(index),
@@ -247,99 +637,327 @@ struct CRefItem
{
if (sortByType)
{
- int slashPos = GetReverseSlashPos(ui.Name);
- NamePos = ((slashPos >= 0) ? (slashPos + 1) : 0);
- int dotPos = ui.Name.ReverseFind(L'.');
- if (dotPos < 0 || (dotPos < slashPos && slashPos >= 0))
- ExtensionPos = ui.Name.Length();
+ int slashPos = ui.Name.ReverseFind_PathSepar();
+ NamePos = slashPos + 1;
+ int dotPos = ui.Name.ReverseFind_Dot();
+ if (dotPos <= slashPos)
+ ExtensionPos = ui.Name.Len();
else
{
ExtensionPos = dotPos + 1;
- UString us = ui.Name.Mid(ExtensionPos);
- if (!us.IsEmpty())
+ if (ExtensionPos != ui.Name.Len())
{
- us.MakeLower();
- int i;
AString s;
- for (i = 0; i < us.Length(); i++)
+ for (unsigned pos = ExtensionPos;; pos++)
{
- wchar_t c = us[i];
+ wchar_t c = ui.Name[pos];
if (c >= 0x80)
break;
- s += (char)c;
+ if (c == 0)
+ {
+ ExtensionIndex = GetExtIndex(s);
+ break;
+ }
+ s += (char)MyCharLower_Ascii((char)c);
}
- if (i == us.Length())
- ExtensionIndex = GetExtIndex(s);
- else
- ExtensionIndex = 0;
}
}
}
}
};
+struct CSortParam
+{
+ // const CObjectVector<CTreeFolder> *TreeFolders;
+ bool SortByType;
+};
+
+/*
+ we sort files in such order:
+ - Dir.NonAnti (name sorted)
+ - alt streams
+ - Dirs
+ - Dir.Anti (reverse name sorted)
+*/
+
+
static int CompareUpdateItems(const CRefItem *p1, const CRefItem *p2, void *param)
{
const CRefItem &a1 = *p1;
const CRefItem &a2 = *p2;
const CUpdateItem &u1 = *a1.UpdateItem;
const CUpdateItem &u2 = *a2.UpdateItem;
- int n;
+
+ /*
+ if (u1.IsAltStream != u2.IsAltStream)
+ return u1.IsAltStream ? 1 : -1;
+ */
+
+ // Actually there are no dirs that time. They were stored in other steps
+ // So that code is unused?
if (u1.IsDir != u2.IsDir)
- return (u1.IsDir) ? 1 : -1;
+ return u1.IsDir ? 1 : -1;
if (u1.IsDir)
{
if (u1.IsAnti != u2.IsAnti)
return (u1.IsAnti ? 1 : -1);
- n = MyStringCompareNoCase(u1.Name, u2.Name);
+ int n = CompareFileNames(u1.Name, u2.Name);
return -n;
}
- bool sortByType = *(bool *)param;
+
+ // bool sortByType = *(bool *)param;
+ const CSortParam *sortParam = (const CSortParam *)param;
+ bool sortByType = sortParam->SortByType;
if (sortByType)
{
RINOZ_COMP(a1.ExtensionIndex, a2.ExtensionIndex);
- RINOZ(MyStringCompareNoCase(u1.Name + a1.ExtensionPos, u2.Name + a2.ExtensionPos));
- RINOZ(MyStringCompareNoCase(u1.Name + a1.NamePos, u2.Name + a2.NamePos));
+ RINOZ(CompareFileNames(u1.Name.Ptr(a1.ExtensionPos), u2.Name.Ptr(a2.ExtensionPos)));
+ RINOZ(CompareFileNames(u1.Name.Ptr(a1.NamePos), u2.Name.Ptr(a2.NamePos)));
if (!u1.MTimeDefined && u2.MTimeDefined) return 1;
if (u1.MTimeDefined && !u2.MTimeDefined) return -1;
if (u1.MTimeDefined && u2.MTimeDefined) RINOZ_COMP(u1.MTime, u2.MTime);
RINOZ_COMP(u1.Size, u2.Size);
}
- return MyStringCompareNoCase(u1.Name, u2.Name);
+ /*
+ int par1 = a1.UpdateItem->ParentFolderIndex;
+ int par2 = a2.UpdateItem->ParentFolderIndex;
+ const CTreeFolder &tf1 = (*sortParam->TreeFolders)[par1];
+ const CTreeFolder &tf2 = (*sortParam->TreeFolders)[par2];
+
+ int b1 = tf1.SortIndex, e1 = tf1.SortIndexEnd;
+ int b2 = tf2.SortIndex, e2 = tf2.SortIndexEnd;
+ if (b1 < b2)
+ {
+ if (e1 <= b2)
+ return -1;
+ // p2 in p1
+ int par = par2;
+ for (;;)
+ {
+ const CTreeFolder &tf = (*sortParam->TreeFolders)[par];
+ par = tf.Parent;
+ if (par == par1)
+ {
+ RINOZ(CompareFileNames(u1.Name, tf.Name));
+ break;
+ }
+ }
+ }
+ else if (b2 < b1)
+ {
+ if (e2 <= b1)
+ return 1;
+ // p1 in p2
+ int par = par1;
+ for (;;)
+ {
+ const CTreeFolder &tf = (*sortParam->TreeFolders)[par];
+ par = tf.Parent;
+ if (par == par2)
+ {
+ RINOZ(CompareFileNames(tf.Name, u2.Name));
+ break;
+ }
+ }
+ }
+ */
+ // RINOZ_COMP(a1.UpdateItem->ParentSortIndex, a2.UpdateItem->ParentSortIndex);
+ RINOK(CompareFileNames(u1.Name, u2.Name));
+ RINOZ_COMP(a1.UpdateItem->IndexInClient, a2.UpdateItem->IndexInClient);
+ RINOZ_COMP(a1.UpdateItem->IndexInArchive, a2.UpdateItem->IndexInArchive);
+ return 0;
}
struct CSolidGroup
{
CRecordVector<UInt32> Indices;
+
+ CRecordVector<CFolderRepack> folderRefs;
};
-static wchar_t *g_ExeExts[] =
+static const char *g_ExeExts[] =
{
- L"dll",
- L"exe",
- L"ocx",
- L"sfx",
- L"sys"
+ "dll"
+ , "exe"
+ , "ocx"
+ , "sfx"
+ , "sys"
};
-static bool IsExeExt(const UString &ext)
+static bool IsExeExt(const wchar_t *ext)
{
- for (int i = 0; i < sizeof(g_ExeExts) / sizeof(g_ExeExts[0]); i++)
- if (ext.CompareNoCase(g_ExeExts[i]) == 0)
+ for (unsigned i = 0; i < ARRAY_SIZE(g_ExeExts); i++)
+ if (StringsAreEqualNoCase_Ascii(ext, g_ExeExts[i]))
return true;
return false;
}
+struct CAnalysis
+{
+ CMyComPtr<IArchiveUpdateCallbackFile> Callback;
+ CByteBuffer Buffer;
+
+ bool ParseWav;
+ bool ParseExe;
+ bool ParseAll;
+
+ CAnalysis():
+ ParseWav(true),
+ ParseExe(false),
+ ParseAll(false)
+ {}
+
+ HRESULT GetFilterGroup(UInt32 index, const CUpdateItem &ui, CFilterMode &filterMode);
+};
+
+static const size_t kAnalysisBufSize = 1 << 14;
+
+HRESULT CAnalysis::GetFilterGroup(UInt32 index, const CUpdateItem &ui, CFilterMode &filterMode)
+{
+ filterMode.Id = 0;
+ filterMode.Delta = 0;
+
+ CFilterMode filterModeTemp = filterMode;
+
+ int slashPos = ui.Name.ReverseFind_PathSepar();
+ int dotPos = ui.Name.ReverseFind_Dot();
-static inline void GetMethodFull(UInt64 methodID, UInt32 numInStreams, CMethodFull &m)
+ // if (dotPos > slashPos)
+ {
+ bool needReadFile = ParseAll;
+
+ bool probablyIsSameIsa = false;
+
+ if (!needReadFile || !Callback)
+ {
+ const wchar_t *ext;
+ if (dotPos > slashPos)
+ ext = ui.Name.Ptr(dotPos + 1);
+ else
+ ext = ui.Name.RightPtr(0);
+
+ // p7zip uses the trick to store posix attributes in high 16 bits
+ if (ui.Attrib & 0x8000)
+ {
+ unsigned st_mode = ui.Attrib >> 16;
+ // st_mode = 00111;
+ if ((st_mode & 00111) && (ui.Size >= 2048))
+ {
+ #ifndef _WIN32
+ probablyIsSameIsa = true;
+ #endif
+ needReadFile = true;
+ }
+ }
+
+ if (IsExeExt(ext))
+ {
+ needReadFile = true;
+ #ifdef _WIN32
+ probablyIsSameIsa = true;
+ needReadFile = ParseExe;
+ #endif
+ }
+ else if (StringsAreEqualNoCase_Ascii(ext, "wav"))
+ {
+ needReadFile = ParseWav;
+ }
+ /*
+ else if (!needReadFile && ParseUnixExt)
+ {
+ if (StringsAreEqualNoCase_Ascii(ext, "so")
+ || StringsAreEqualNoCase_Ascii(ext, ""))
+
+ needReadFile = true;
+ }
+ */
+ }
+
+ if (needReadFile && Callback)
+ {
+ if (Buffer.Size() != kAnalysisBufSize)
+ {
+ Buffer.Alloc(kAnalysisBufSize);
+ }
+ {
+ CMyComPtr<ISequentialInStream> stream;
+ HRESULT result = Callback->GetStream2(index, &stream, NUpdateNotifyOp::kAnalyze);
+ if (result == S_OK && stream)
+ {
+ size_t size = kAnalysisBufSize;
+ result = ReadStream(stream, Buffer, &size);
+ stream.Release();
+ // RINOK(Callback->SetOperationResult2(index, NUpdate::NOperationResult::kOK));
+ if (result == S_OK)
+ {
+ Bool parseRes = ParseFile(Buffer, size, &filterModeTemp);
+ if (parseRes && filterModeTemp.Delta == 0)
+ {
+ filterModeTemp.SetDelta();
+ if (filterModeTemp.Delta != 0 && filterModeTemp.Id != k_Delta)
+ {
+ if (ui.Size % filterModeTemp.Delta != 0)
+ {
+ parseRes = false;
+ }
+ }
+ }
+ if (!parseRes)
+ {
+ filterModeTemp.Id = 0;
+ filterModeTemp.Delta = 0;
+ }
+ }
+ }
+ }
+ }
+ else if ((needReadFile && !Callback) || probablyIsSameIsa)
+ {
+ #ifdef MY_CPU_X86_OR_AMD64
+ if (probablyIsSameIsa)
+ filterModeTemp.Id = k_X86;
+ #endif
+ }
+ }
+
+ filterMode = filterModeTemp;
+ return S_OK;
+}
+
+static inline void GetMethodFull(UInt64 methodID, UInt32 numStreams, CMethodFull &m)
{
m.Id = methodID;
- m.NumInStreams = numInStreams;
- m.NumOutStreams = 1;
+ m.NumStreams = numStreams;
}
-static void AddBcj2Methods(CCompressionMethodMode &mode)
+static HRESULT AddBondForFilter(CCompressionMethodMode &mode)
{
+ for (unsigned c = 1; c < mode.Methods.Size(); c++)
+ {
+ if (!mode.IsThereBond_to_Coder(c))
+ {
+ CBond2 bond;
+ bond.OutCoder = 0;
+ bond.OutStream = 0;
+ bond.InCoder = c;
+ mode.Bonds.Add(bond);
+ return S_OK;
+ }
+ }
+ return E_INVALIDARG;
+}
+
+static HRESULT AddFilterBond(CCompressionMethodMode &mode)
+{
+ if (!mode.Bonds.IsEmpty())
+ return AddBondForFilter(mode);
+ return S_OK;
+}
+
+static HRESULT AddBcj2Methods(CCompressionMethodMode &mode)
+{
+ // mode.Methods[0] must be k_BCJ2 method !
+
CMethodFull m;
GetMethodFull(k_LZMA, 1, m);
@@ -348,61 +966,127 @@ static void AddBcj2Methods(CCompressionMethodMode &mode)
m.AddProp32(NCoderPropID::kNumThreads, 1);
m.AddProp32(NCoderPropID::kLitPosBits, 2);
m.AddProp32(NCoderPropID::kLitContextBits, 0);
- // m.AddPropString(NCoderPropID::kMatchFinder, L"BT2");
+ // m.AddProp_Ascii(NCoderPropID::kMatchFinder, "BT2");
+
+ unsigned methodIndex = mode.Methods.Size();
+
+ if (mode.Bonds.IsEmpty())
+ {
+ for (unsigned i = 1; i + 1 < mode.Methods.Size(); i++)
+ {
+ CBond2 bond;
+ bond.OutCoder = i;
+ bond.OutStream = 0;
+ bond.InCoder = i + 1;
+ mode.Bonds.Add(bond);
+ }
+ }
mode.Methods.Add(m);
mode.Methods.Add(m);
- CBind bind;
- bind.OutCoder = 0;
- bind.InStream = 0;
- bind.InCoder = 1; bind.OutStream = 0; mode.Binds.Add(bind);
- bind.InCoder = 2; bind.OutStream = 1; mode.Binds.Add(bind);
- bind.InCoder = 3; bind.OutStream = 2; mode.Binds.Add(bind);
+ RINOK(AddBondForFilter(mode));
+ CBond2 bond;
+ bond.OutCoder = 0;
+ bond.InCoder = methodIndex; bond.OutStream = 1; mode.Bonds.Add(bond);
+ bond.InCoder = methodIndex + 1; bond.OutStream = 2; mode.Bonds.Add(bond);
+ return S_OK;
}
-static void MakeExeMethod(CCompressionMethodMode &mode,
- bool useFilters, bool addFilter, bool bcj2Filter)
+static HRESULT MakeExeMethod(CCompressionMethodMode &mode,
+ const CFilterMode &filterMode, /* bool addFilter, */ bool bcj2Filter)
{
- if (!mode.Binds.IsEmpty() || !useFilters || mode.Methods.Size() > 2)
- return;
- if (mode.Methods.Size() == 2)
+ if (mode.Filter_was_Inserted)
+ {
+ const CMethodFull &m = mode.Methods[0];
+ CMethodId id = m.Id;
+ if (id == k_BCJ2)
+ return AddBcj2Methods(mode);
+ if (!m.IsSimpleCoder())
+ return E_NOTIMPL;
+ // if (Bonds.IsEmpty()) we can create bonds later
+ return AddFilterBond(mode);
+ }
+
+ if (filterMode.Id == 0)
+ return S_OK;
+
+ CMethodFull &m = mode.Methods.InsertNew(0);
+
{
- if (mode.Methods[0].Id == k_BCJ2)
- AddBcj2Methods(mode);
- return;
+ FOR_VECTOR(k, mode.Bonds)
+ {
+ CBond2 &bond = mode.Bonds[k];
+ bond.InCoder++;
+ bond.OutCoder++;
+ }
}
- if (!addFilter)
- return;
- bcj2Filter = bcj2Filter;
- #ifdef USE_86_FILTER
- if (bcj2Filter)
+
+ HRESULT res;
+
+ if (bcj2Filter && Is86Filter(filterMode.Id))
{
- CMethodFull m;
GetMethodFull(k_BCJ2, 4, m);
- mode.Methods.Insert(0, m);
- AddBcj2Methods(mode);
+ res = AddBcj2Methods(mode);
}
else
{
- CMethodFull m;
- GetMethodFull(k_BCJ, 1, m);
- mode.Methods.Insert(0, m);
- CBind bind;
- bind.OutCoder = 0;
- bind.InStream = 0;
- bind.InCoder = 1;
- bind.OutStream = 0;
- mode.Binds.Add(bind);
+ GetMethodFull(filterMode.Id, 1, m);
+ if (filterMode.Id == k_Delta)
+ m.AddProp32(NCoderPropID::kDefaultProp, filterMode.Delta);
+ res = AddFilterBond(mode);
+
+ int alignBits = -1;
+ if (filterMode.Id == k_Delta || filterMode.Delta != 0)
+ {
+ if (filterMode.Delta == 1) alignBits = 0;
+ else if (filterMode.Delta == 2) alignBits = 1;
+ else if (filterMode.Delta == 4) alignBits = 2;
+ else if (filterMode.Delta == 8) alignBits = 3;
+ else if (filterMode.Delta == 16) alignBits = 4;
+ }
+ else
+ {
+ // alignBits = GetAlignForFilterMethod(filterMode.Id);
+ }
+
+ if (res == S_OK && alignBits >= 0)
+ {
+ unsigned nextCoder = 1;
+ if (!mode.Bonds.IsEmpty())
+ {
+ nextCoder = mode.Bonds.Back().InCoder;
+ }
+ if (nextCoder < mode.Methods.Size())
+ {
+ CMethodFull &nextMethod = mode.Methods[nextCoder];
+ if (nextMethod.Id == k_LZMA || nextMethod.Id == k_LZMA2)
+ {
+ if (!nextMethod.Are_Lzma_Model_Props_Defined())
+ {
+ if (alignBits != 0)
+ {
+ if (alignBits > 2 || filterMode.Id == k_Delta)
+ nextMethod.AddProp32(NCoderPropID::kPosStateBits, alignBits);
+ unsigned lc = 0;
+ if (alignBits < 3)
+ lc = 3 - alignBits;
+ nextMethod.AddProp32(NCoderPropID::kLitContextBits, lc);
+ nextMethod.AddProp32(NCoderPropID::kLitPosBits, alignBits);
+ }
+ }
+ }
+ }
+ }
}
- #endif
+
+ return res;
}
static void FromUpdateItemToFileItem(const CUpdateItem &ui,
CFileItem &file, CFileItem2 &file2)
{
- file.Name = NItemName::MakeLegalName(ui.Name);
if (ui.AttribDefined)
file.SetAttrib(ui.Attrib);
@@ -410,140 +1094,345 @@ static void FromUpdateItemToFileItem(const CUpdateItem &ui,
file2.ATime = ui.ATime; file2.ATimeDefined = ui.ATimeDefined;
file2.MTime = ui.MTime; file2.MTimeDefined = ui.MTimeDefined;
file2.IsAnti = ui.IsAnti;
+ // file2.IsAux = false;
file2.StartPosDefined = false;
file.Size = ui.Size;
file.IsDir = ui.IsDir;
file.HasStream = ui.HasStream();
+ // file.IsAltStream = ui.IsAltStream;
}
-class CFolderOutStream2:
- public ISequentialOutStream,
+class CRepackInStreamWithSizes:
+ public ISequentialInStream,
+ public ICompressGetSubStreamSize,
public CMyUnknownImp
{
- COutStreamWithCRC *_crcStreamSpec;
- CMyComPtr<ISequentialOutStream> _crcStream;
- const CArchiveDatabaseEx *_db;
+ CMyComPtr<ISequentialInStream> _stream;
+ // UInt64 _size;
const CBoolVector *_extractStatuses;
- CMyComPtr<ISequentialOutStream> _outStream;
UInt32 _startIndex;
- int _currentIndex;
+public:
+ const CDbEx *_db;
+
+ void Init(ISequentialInStream *stream, UInt32 startIndex, const CBoolVector *extractStatuses)
+ {
+ _startIndex = startIndex;
+ _extractStatuses = extractStatuses;
+ // _size = 0;
+ _stream = stream;
+ }
+ // UInt64 GetSize() const { return _size; }
+
+ MY_UNKNOWN_IMP2(ISequentialInStream, ICompressGetSubStreamSize)
+
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+
+ STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value);
+};
+
+STDMETHODIMP CRepackInStreamWithSizes::Read(void *data, UInt32 size, UInt32 *processedSize)
+{
+ return _stream->Read(data, size, processedSize);
+ /*
+ UInt32 realProcessedSize;
+ HRESULT result = _stream->Read(data, size, &realProcessedSize);
+ _size += realProcessedSize;
+ if (processedSize)
+ *processedSize = realProcessedSize;
+ return result;
+ */
+}
+
+STDMETHODIMP CRepackInStreamWithSizes::GetSubStreamSize(UInt64 subStream, UInt64 *value)
+{
+ *value = 0;
+ if (subStream >= _extractStatuses->Size())
+ return S_FALSE; // E_FAIL;
+ unsigned index = (unsigned)subStream;
+ if ((*_extractStatuses)[index])
+ {
+ const CFileItem &fi = _db->Files[_startIndex + index];
+ if (fi.HasStream)
+ *value = fi.Size;
+ }
+ return S_OK;
+}
+
+
+class CRepackStreamBase
+{
+protected:
+ bool _needWrite;
bool _fileIsOpen;
+ bool _calcCrc;
+ UInt32 _crc;
UInt64 _rem;
- void OpenFile();
- void CloseFile();
- HRESULT CloseFileAndSetResult();
+ const CBoolVector *_extractStatuses;
+ UInt32 _startIndex;
+ unsigned _currentIndex;
+
+ HRESULT OpenFile();
+ HRESULT CloseFile();
HRESULT ProcessEmptyFiles();
+
public:
- MY_UNKNOWN_IMP
-
- CFolderOutStream2()
- {
- _crcStreamSpec = new COutStreamWithCRC;
- _crcStream = _crcStreamSpec;
- }
+ const CDbEx *_db;
+ CMyComPtr<IArchiveUpdateCallbackFile> _opCallback;
+ CMyComPtr<IArchiveExtractCallbackMessage> _extractCallback;
- HRESULT Init(const CArchiveDatabaseEx *db, UInt32 startIndex,
- const CBoolVector *extractStatuses, ISequentialOutStream *outStream);
- void ReleaseOutStream();
+ HRESULT Init(UInt32 startIndex, const CBoolVector *extractStatuses);
HRESULT CheckFinishedState() const { return (_currentIndex == _extractStatuses->Size()) ? S_OK: E_FAIL; }
-
- STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
};
-HRESULT CFolderOutStream2::Init(const CArchiveDatabaseEx *db, UInt32 startIndex,
- const CBoolVector *extractStatuses, ISequentialOutStream *outStream)
+HRESULT CRepackStreamBase::Init(UInt32 startIndex, const CBoolVector *extractStatuses)
{
- _db = db;
_startIndex = startIndex;
_extractStatuses = extractStatuses;
- _outStream = outStream;
_currentIndex = 0;
_fileIsOpen = false;
+
return ProcessEmptyFiles();
}
-void CFolderOutStream2::ReleaseOutStream()
+HRESULT CRepackStreamBase::OpenFile()
{
- _outStream.Release();
- _crcStreamSpec->ReleaseStream();
-}
+ UInt32 arcIndex = _startIndex + _currentIndex;
+ const CFileItem &fi = _db->Files[arcIndex];
+
+ _needWrite = (*_extractStatuses)[_currentIndex];
+ if (_opCallback)
+ {
+ RINOK(_opCallback->ReportOperation(
+ NEventIndexType::kInArcIndex, arcIndex,
+ _needWrite ?
+ NUpdateNotifyOp::kRepack :
+ NUpdateNotifyOp::kSkip));
+ }
+
+ _crc = CRC_INIT_VAL;
+ _calcCrc = (fi.CrcDefined && !fi.IsDir);
-void CFolderOutStream2::OpenFile()
-{
- _crcStreamSpec->SetStream((*_extractStatuses)[_currentIndex] ? _outStream : NULL);
- _crcStreamSpec->Init(true);
_fileIsOpen = true;
- _rem = _db->Files[_startIndex + _currentIndex].Size;
+ _rem = fi.Size;
+ return S_OK;
}
-void CFolderOutStream2::CloseFile()
+const HRESULT k_My_HRESULT_CRC_ERROR = 0x20000002;
+
+HRESULT CRepackStreamBase::CloseFile()
{
- _crcStreamSpec->ReleaseStream();
+ UInt32 arcIndex = _startIndex + _currentIndex;
+ const CFileItem &fi = _db->Files[arcIndex];
_fileIsOpen = false;
_currentIndex++;
-}
+ if (!_calcCrc || fi.Crc == CRC_GET_DIGEST(_crc))
+ return S_OK;
-HRESULT CFolderOutStream2::CloseFileAndSetResult()
-{
- const CFileItem &file = _db->Files[_startIndex + _currentIndex];
- CloseFile();
- return (file.IsDir || !file.CrcDefined || file.Crc == _crcStreamSpec->GetCRC()) ? S_OK: S_FALSE;
+ if (_extractCallback)
+ {
+ RINOK(_extractCallback->ReportExtractResult(
+ NEventIndexType::kInArcIndex, arcIndex,
+ NExtract::NOperationResult::kCRCError));
+ }
+ // return S_FALSE;
+ return k_My_HRESULT_CRC_ERROR;
}
-HRESULT CFolderOutStream2::ProcessEmptyFiles()
+HRESULT CRepackStreamBase::ProcessEmptyFiles()
{
while (_currentIndex < _extractStatuses->Size() && _db->Files[_startIndex + _currentIndex].Size == 0)
{
- OpenFile();
- RINOK(CloseFileAndSetResult());
+ RINOK(OpenFile());
+ RINOK(CloseFile());
}
return S_OK;
}
+
+
+
+#ifndef _7ZIP_ST
+
+class CFolderOutStream2:
+ public CRepackStreamBase,
+ public ISequentialOutStream,
+ public CMyUnknownImp
+{
+public:
+ CMyComPtr<ISequentialOutStream> _stream;
+
+ MY_UNKNOWN_IMP
+
+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
+};
STDMETHODIMP CFolderOutStream2::Write(const void *data, UInt32 size, UInt32 *processedSize)
{
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
+
while (size != 0)
{
if (_fileIsOpen)
{
- UInt32 cur = size < _rem ? size : (UInt32)_rem;
- RINOK(_crcStream->Write(data, cur, &cur));
- if (cur == 0)
- break;
+ UInt32 cur = (size < _rem ? size : (UInt32)_rem);
+ HRESULT result = S_OK;
+ if (_needWrite)
+ result = _stream->Write(data, cur, &cur);
+ if (_calcCrc)
+ _crc = CrcUpdate(_crc, data, cur);
+ if (processedSize)
+ *processedSize += cur;
data = (const Byte *)data + cur;
size -= cur;
_rem -= cur;
- if (processedSize != NULL)
- *processedSize += cur;
if (_rem == 0)
{
- RINOK(CloseFileAndSetResult());
+ RINOK(CloseFile());
RINOK(ProcessEmptyFiles());
- continue;
}
+ RINOK(result);
+ if (cur == 0)
+ break;
+ continue;
}
- else
+
+ RINOK(ProcessEmptyFiles());
+ if (_currentIndex == _extractStatuses->Size())
+ {
+ // we don't support write cut here
+ return E_FAIL;
+ }
+ RINOK(OpenFile());
+ }
+
+ return S_OK;
+}
+
+#endif
+
+
+
+static const UInt32 kTempBufSize = 1 << 16;
+
+class CFolderInStream2:
+ public CRepackStreamBase,
+ public ISequentialInStream,
+ public CMyUnknownImp
+{
+ Byte *_buf;
+public:
+ CMyComPtr<ISequentialInStream> _inStream;
+ HRESULT Result;
+
+ MY_UNKNOWN_IMP
+
+ CFolderInStream2():
+ Result(S_OK)
+ {
+ _buf = new Byte[kTempBufSize];
+ }
+
+ ~CFolderInStream2()
+ {
+ delete []_buf;
+ }
+
+ void Init() { Result = S_OK; }
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+};
+
+STDMETHODIMP CFolderInStream2::Read(void *data, UInt32 size, UInt32 *processedSize)
+{
+ if (processedSize)
+ *processedSize = 0;
+
+ while (size != 0)
+ {
+ if (_fileIsOpen)
{
- RINOK(ProcessEmptyFiles());
- if (_currentIndex == _extractStatuses->Size())
+ UInt32 cur = (size < _rem ? size : (UInt32)_rem);
+
+ void *buf;
+ if (_needWrite)
+ buf = data;
+ else
{
- // we don't support partial extracting
- return E_FAIL;
+ buf = _buf;
+ if (cur > kTempBufSize)
+ cur = kTempBufSize;
+ }
+
+ HRESULT result = _inStream->Read(buf, cur, &cur);
+ _crc = CrcUpdate(_crc, buf, cur);
+ _rem -= cur;
+
+ if (_needWrite)
+ {
+ data = (Byte *)data + cur;
+ size -= cur;
+ if (processedSize)
+ *processedSize += cur;
+ }
+
+ if (result != S_OK)
+ Result = result;
+
+ if (_rem == 0)
+ {
+ RINOK(CloseFile());
+ RINOK(ProcessEmptyFiles());
}
- OpenFile();
+
+ RINOK(result);
+
+ if (cur == 0)
+ return E_FAIL;
+
+ continue;
+ }
+
+ RINOK(ProcessEmptyFiles());
+ if (_currentIndex == _extractStatuses->Size())
+ {
+ return S_OK;
}
+ RINOK(OpenFile());
}
+
return S_OK;
}
-class CThreadDecoder: public CVirtThread
+
+class CThreadDecoder
+ #ifndef _7ZIP_ST
+ : public CVirtThread
+ #endif
{
public:
+ CDecoder Decoder;
+
+ CThreadDecoder(bool multiThreadMixer):
+ Decoder(multiThreadMixer)
+ {
+ #ifndef _7ZIP_ST
+ if (multiThreadMixer)
+ {
+ MtMode = false;
+ NumThreads = 1;
+ FosSpec = new CFolderOutStream2;
+ Fos = FosSpec;
+ Result = E_FAIL;
+ }
+ #endif
+ // UnpackSize = 0;
+ // send_UnpackSize = false;
+ }
+
+ #ifndef _7ZIP_ST
+
HRESULT Result;
CMyComPtr<IInStream> InStream;
@@ -551,55 +1440,58 @@ public:
CMyComPtr<ISequentialOutStream> Fos;
UInt64 StartPos;
- const UInt64 *PackSizes;
- const CFolder *Folder;
+ const CFolders *Folders;
+ int FolderIndex;
+
+ // bool send_UnpackSize;
+ // UInt64 UnpackSize;
+
#ifndef _NO_CRYPTO
- CMyComPtr<ICryptoGetTextPassword> GetTextPassword;
+ CMyComPtr<ICryptoGetTextPassword> getTextPassword;
#endif
- DECL_EXTERNAL_CODECS_VARS
- CDecoder Decoder;
+ DECL_EXTERNAL_CODECS_LOC_VARS2;
#ifndef _7ZIP_ST
bool MtMode;
UInt32 NumThreads;
#endif
- CThreadDecoder():
- Decoder(true)
- {
- #ifndef _7ZIP_ST
- MtMode = false;
- NumThreads = 1;
- #endif
- FosSpec = new CFolderOutStream2;
- Fos = FosSpec;
- Result = E_FAIL;
- }
+
~CThreadDecoder() { CVirtThread::WaitThreadFinish(); }
virtual void Execute();
+
+ #endif
};
+#ifndef _7ZIP_ST
+
void CThreadDecoder::Execute()
{
try
{
#ifndef _NO_CRYPTO
- bool passwordIsDefined;
+ bool isEncrypted = false;
+ bool passwordIsDefined = false;
+ UString password;
#endif
+
Result = Decoder.Decode(
- EXTERNAL_CODECS_VARS
+ EXTERNAL_CODECS_LOC_VARS
InStream,
StartPos,
- PackSizes,
- *Folder,
+ *Folders, FolderIndex,
+
+ // send_UnpackSize ? &UnpackSize : NULL,
+ NULL, // unpackSize : FULL unpack
+
Fos,
- NULL
- #ifndef _NO_CRYPTO
- , GetTextPassword, passwordIsDefined
- #endif
+ NULL, // compressProgress
+ NULL // *inStreamMainRes
+
+ _7Z_DECODER_CRYPRO_VARS
#ifndef _7ZIP_ST
- , MtMode, NumThreads
+ , MtMode, NumThreads
#endif
);
}
@@ -607,21 +1499,15 @@ void CThreadDecoder::Execute()
{
Result = E_FAIL;
}
+
+ /*
if (Result == S_OK)
Result = FosSpec->CheckFinishedState();
- FosSpec->ReleaseOutStream();
+ */
+ FosSpec->_stream.Release();
}
-bool static Is86FilteredFolder(const CFolder &f)
-{
- for (int i = 0; i < f.Coders.Size(); i++)
- {
- CMethodId m = f.Coders[i].MethodID;
- if (m == k_BCJ || m == k_BCJ2)
- return true;
- }
- return false;
-}
+#endif
#ifndef _NO_CRYPTO
@@ -643,20 +1529,27 @@ STDMETHODIMP CCryptoGetTextPassword::CryptoGetTextPassword(BSTR *password)
#endif
-static const int kNumGroupsMax = 4;
-static bool Is86Group(int group) { return (group & 1) != 0; }
-static bool IsEncryptedGroup(int group) { return (group & 2) != 0; }
-static int GetGroupIndex(bool encrypted, int bcjFiltered)
- { return (encrypted ? 2 : 0) + (bcjFiltered ? 1 : 0); }
+static void GetFile(const CDatabase &inDb, unsigned index, CFileItem &file, CFileItem2 &file2)
+{
+ file = inDb.Files[index];
+ file2.CTimeDefined = inDb.CTime.GetItem(index, file2.CTime);
+ file2.ATimeDefined = inDb.ATime.GetItem(index, file2.ATime);
+ file2.MTimeDefined = inDb.MTime.GetItem(index, file2.MTime);
+ file2.StartPosDefined = inDb.StartPos.GetItem(index, file2.StartPos);
+ file2.IsAnti = inDb.IsItemAnti(index);
+ // file2.IsAux = inDb.IsItemAux(index);
+}
HRESULT Update(
DECL_EXTERNAL_CODECS_LOC_VARS
IInStream *inStream,
- const CArchiveDatabaseEx *db,
+ const CDbEx *db,
const CObjectVector<CUpdateItem> &updateItems,
+ // const CObjectVector<CTreeFolder> &treeFolders,
+ // const CUniqBlocks &secureBlocks,
COutArchive &archive,
- CArchiveDatabase &newDatabase,
+ CArchiveDatabaseOut &newDatabase,
ISequentialOutStream *seqOutStream,
IArchiveUpdateCallback *updateCallback,
const CUpdateOptions &options
@@ -668,6 +1561,15 @@ HRESULT Update(
UInt64 numSolidFiles = options.NumSolidFiles;
if (numSolidFiles == 0)
numSolidFiles = 1;
+
+ CMyComPtr<IArchiveUpdateCallbackFile> opCallback;
+ updateCallback->QueryInterface(IID_IArchiveUpdateCallbackFile, (void **)&opCallback);
+
+ CMyComPtr<IArchiveExtractCallbackMessage> extractCallback;
+ updateCallback->QueryInterface(IID_IArchiveExtractCallbackMessage, (void **)&extractCallback);
+
+ // size_t totalSecureDataSize = (size_t)secureBlocks.GetTotalSizeInBytes();
+
/*
CMyComPtr<IOutStream> outStream;
RINOK(seqOutStream->QueryInterface(IID_IOutStream, (void **)&outStream));
@@ -675,37 +1577,43 @@ HRESULT Update(
return E_NOTIMPL;
*/
- UInt64 startBlockSize = db != 0 ? db->ArchiveInfo.StartPosition: 0;
+ UInt64 startBlockSize = db != 0 ? db->ArcInfo.StartPosition: 0;
if (startBlockSize > 0 && !options.RemoveSfxBlock)
{
RINOK(WriteRange(inStream, seqOutStream, 0, startBlockSize, NULL));
}
- CRecordVector<int> fileIndexToUpdateIndexMap;
- CRecordVector<CFolderRepack> folderRefs;
+ CIntArr fileIndexToUpdateIndexMap;
UInt64 complexity = 0;
UInt64 inSizeForReduce2 = 0;
bool needEncryptedRepack = false;
+
+ CRecordVector<CFilterMode2> filters;
+ CObjectVector<CSolidGroup> groups;
+ bool thereAreRepacks = false;
+
if (db != 0)
{
- fileIndexToUpdateIndexMap.Reserve(db->Files.Size());
- int i;
+ fileIndexToUpdateIndexMap.Alloc(db->Files.Size());
+ unsigned i;
+
for (i = 0; i < db->Files.Size(); i++)
- fileIndexToUpdateIndexMap.Add(-1);
+ fileIndexToUpdateIndexMap[i] = -1;
for (i = 0; i < updateItems.Size(); i++)
{
int index = updateItems[i].IndexInArchive;
if (index != -1)
- fileIndexToUpdateIndexMap[index] = i;
+ fileIndexToUpdateIndexMap[(unsigned)index] = i;
}
- for (i = 0; i < db->Folders.Size(); i++)
+ for (i = 0; i < db->NumFolders; i++)
{
CNum indexInFolder = 0;
CNum numCopyItems = 0;
CNum numUnpackStreams = db->NumUnpackStreamsVector[i];
UInt64 repackSize = 0;
+
for (CNum fi = db->FolderStartFileIndex[i]; indexInFolder < numUnpackStreams; fi++)
{
const CFileItem &file = db->Files[fi];
@@ -727,26 +1635,34 @@ HRESULT Update(
CFolderRepack rep;
rep.FolderIndex = i;
rep.NumCopyFiles = numCopyItems;
- const CFolder &f = db->Folders[i];
+ CFolderEx f;
+ db->ParseFolderEx(i, f);
+
bool isEncrypted = f.IsEncrypted();
- rep.Group = GetGroupIndex(isEncrypted, Is86FilteredFolder(f));
- folderRefs.Add(rep);
+
+ unsigned groupIndex = Get_FilterGroup_for_Folder(filters, f);
+
+ while (groupIndex >= groups.Size())
+ groups.AddNew();
+
+ groups[groupIndex].folderRefs.Add(rep);
+
if (numCopyItems == numUnpackStreams)
complexity += db->GetFolderFullPackSize(i);
else
{
+ thereAreRepacks = true;
complexity += repackSize;
- if (repackSize > inSizeForReduce2)
+ if (inSizeForReduce2 < repackSize)
inSizeForReduce2 = repackSize;
if (isEncrypted)
needEncryptedRepack = true;
}
}
- folderRefs.Sort(CompareFolderRepacks, (void *)db);
}
UInt64 inSizeForReduce = 0;
- int i;
+ unsigned i;
for (i = 0; i < updateItems.Size(); i++)
{
const CUpdateItem &ui = updateItems[i];
@@ -755,12 +1671,12 @@ HRESULT Update(
complexity += ui.Size;
if (numSolidFiles != 1)
inSizeForReduce += ui.Size;
- else if (ui.Size > inSizeForReduce)
+ else if (inSizeForReduce < ui.Size)
inSizeForReduce = ui.Size;
}
}
- if (inSizeForReduce2 > inSizeForReduce)
+ if (inSizeForReduce < inSizeForReduce2)
inSizeForReduce = inSizeForReduce2;
RINOK(updateCallback->SetTotal(complexity));
@@ -769,53 +1685,102 @@ HRESULT Update(
CMyComPtr<ICompressProgressInfo> progress = lps;
lps->Init(updateCallback, true);
+ #ifndef _7ZIP_ST
+
CStreamBinder sb;
- RINOK(sb.CreateEvents());
+ if (options.MultiThreadMixer)
+ {
+ RINOK(sb.CreateEvents());
+ }
+
+ #endif
- CThreadDecoder threadDecoder;
- if (!folderRefs.IsEmpty())
+ CThreadDecoder threadDecoder(options.MultiThreadMixer);
+
+ #ifndef _7ZIP_ST
+ if (options.MultiThreadMixer && thereAreRepacks)
{
#ifdef EXTERNAL_CODECS
- threadDecoder._codecsInfo = codecsInfo;
- threadDecoder._externalCodecs = *externalCodecs;
+ threadDecoder.__externalCodecs = __externalCodecs;
#endif
RINOK(threadDecoder.Create());
}
-
- CObjectVector<CSolidGroup> groups;
- for (i = 0; i < kNumGroupsMax; i++)
- groups.Add(CSolidGroup());
+ #endif
{
- // ---------- Split files to 2 groups ----------
+ CAnalysis analysis;
+ if (options.AnalysisLevel == 0)
+ {
+ analysis.ParseWav = false;
+ analysis.ParseExe = false;
+ analysis.ParseAll = false;
+ }
+ else
+ {
+ analysis.Callback = opCallback;
+ if (options.AnalysisLevel > 0)
+ {
+ analysis.ParseWav = true;
+ if (options.AnalysisLevel >= 7)
+ {
+ analysis.ParseExe = true;
+ if (options.AnalysisLevel >= 9)
+ analysis.ParseAll = true;
+ }
+ }
+ }
+
+ // ---------- Split files to groups ----------
bool useFilters = options.UseFilters;
const CCompressionMethodMode &method = *options.Method;
- if (method.Methods.Size() != 1 || method.Binds.Size() != 0)
+
+ if (useFilters)
+ for (i = 0; i < method.Methods.Size(); i++)
+ if (IsFilterMethod(method.Methods[i].Id))
+ {
+ useFilters = false;
+ break;
+ }
+
+ /*
+ if (!method.Bonds.IsEmpty())
useFilters = false;
+ */
+
for (i = 0; i < updateItems.Size(); i++)
{
const CUpdateItem &ui = updateItems[i];
if (!ui.NewData || !ui.HasStream())
continue;
- bool filteredGroup = false;
+
+ CFilterMode2 fm;
if (useFilters)
{
- int dotPos = ui.Name.ReverseFind(L'.');
- if (dotPos >= 0)
- filteredGroup = IsExeExt(ui.Name.Mid(dotPos + 1));
+ RINOK(analysis.GetFilterGroup(i, ui, fm));
}
- groups[GetGroupIndex(method.PasswordIsDefined, filteredGroup)].Indices.Add(i);
+ fm.Encrypted = method.PasswordIsDefined;
+
+ unsigned groupIndex = GetGroup(filters, fm);
+ while (groupIndex >= groups.Size())
+ groups.AddNew();
+ groups[groupIndex].Indices.Add(i);
}
}
+
#ifndef _NO_CRYPTO
CCryptoGetTextPassword *getPasswordSpec = NULL;
+ CMyComPtr<ICryptoGetTextPassword> getTextPassword;
if (needEncryptedRepack)
{
getPasswordSpec = new CCryptoGetTextPassword;
- threadDecoder.GetTextPassword = getPasswordSpec;
+ getTextPassword = getPasswordSpec;
+
+ #ifndef _7ZIP_ST
+ threadDecoder.getTextPassword = getPasswordSpec;
+ #endif
if (options.Method->PasswordIsDefined)
getPasswordSpec->Password = options.Method->Password;
@@ -825,28 +1790,141 @@ HRESULT Update(
return E_NOTIMPL;
CMyComBSTR password;
RINOK(getDecoderPassword->CryptoGetTextPassword(&password));
- getPasswordSpec->Password = password;
+ if (password)
+ getPasswordSpec->Password = password;
}
}
#endif
+
// ---------- Compress ----------
RINOK(archive.Create(seqOutStream, false));
RINOK(archive.SkipPrefixArchiveHeader());
- int folderRefIndex = 0;
+ /*
+ CIntVector treeFolderToArcIndex;
+ treeFolderToArcIndex.Reserve(treeFolders.Size());
+ for (i = 0; i < treeFolders.Size(); i++)
+ treeFolderToArcIndex.Add(-1);
+ // ---------- Write Tree (only AUX dirs) ----------
+ for (i = 1; i < treeFolders.Size(); i++)
+ {
+ const CTreeFolder &treeFolder = treeFolders[i];
+ CFileItem file;
+ CFileItem2 file2;
+ file2.Init();
+ int secureID = 0;
+ if (treeFolder.UpdateItemIndex < 0)
+ {
+ // we can store virtual dir item wuthout attrib, but we want all items have attrib.
+ file.SetAttrib(FILE_ATTRIBUTE_DIRECTORY);
+ file2.IsAux = true;
+ }
+ else
+ {
+ const CUpdateItem &ui = updateItems[treeFolder.UpdateItemIndex];
+ // if item is not dir, then it's parent for alt streams.
+ // we will write such items later
+ if (!ui.IsDir)
+ continue;
+ secureID = ui.SecureIndex;
+ if (ui.NewProps)
+ FromUpdateItemToFileItem(ui, file, file2);
+ else
+ GetFile(*db, ui.IndexInArchive, file, file2);
+ }
+ file.Size = 0;
+ file.HasStream = false;
+ file.IsDir = true;
+ file.Parent = treeFolder.Parent;
+
+ treeFolderToArcIndex[i] = newDatabase.Files.Size();
+ newDatabase.AddFile(file, file2, treeFolder.Name);
+
+ if (totalSecureDataSize != 0)
+ newDatabase.SecureIDs.Add(secureID);
+ }
+ */
+
+ {
+ /* ---------- Write non-AUX dirs and Empty files ---------- */
+ CUIntVector emptyRefs;
+
+ for (i = 0; i < updateItems.Size(); i++)
+ {
+ const CUpdateItem &ui = updateItems[i];
+ if (ui.NewData)
+ {
+ if (ui.HasStream())
+ continue;
+ }
+ else if (ui.IndexInArchive != -1 && db->Files[ui.IndexInArchive].HasStream)
+ continue;
+ /*
+ if (ui.TreeFolderIndex >= 0)
+ continue;
+ */
+ emptyRefs.Add(i);
+ }
+
+ emptyRefs.Sort(CompareEmptyItems, (void *)&updateItems);
+
+ for (i = 0; i < emptyRefs.Size(); i++)
+ {
+ const CUpdateItem &ui = updateItems[emptyRefs[i]];
+ CFileItem file;
+ CFileItem2 file2;
+ UString name;
+ if (ui.NewProps)
+ {
+ FromUpdateItemToFileItem(ui, file, file2);
+ name = ui.Name;
+ }
+ else
+ {
+ GetFile(*db, ui.IndexInArchive, file, file2);
+ db->GetPath(ui.IndexInArchive, name);
+ }
+
+ /*
+ if (totalSecureDataSize != 0)
+ newDatabase.SecureIDs.Add(ui.SecureIndex);
+ file.Parent = ui.ParentFolderIndex;
+ */
+ newDatabase.AddFile(file, file2, name);
+ }
+ }
+
lps->ProgressOffset = 0;
- for (int groupIndex = 0; groupIndex < kNumGroupsMax; groupIndex++)
{
- const CSolidGroup &group = groups[groupIndex];
+ // ---------- Sort Filters ----------
+
+ FOR_VECTOR (i, filters)
+ {
+ filters[i].GroupIndex = i;
+ }
+ filters.Sort2();
+ }
+
+ for (unsigned groupIndex = 0; groupIndex < filters.Size(); groupIndex++)
+ {
+ const CFilterMode2 &filterMode = filters[groupIndex];
CCompressionMethodMode method = *options.Method;
- MakeExeMethod(method, options.UseFilters, Is86Group(groupIndex), options.MaxFilter);
+ HRESULT res = MakeExeMethod(method, filterMode,
+ #ifdef _7ZIP_ST
+ false
+ #else
+ options.MaxFilter && options.MultiThreadMixer
+ #endif
+ );
- if (IsEncryptedGroup(groupIndex))
+ RINOK(res);
+
+ if (filterMode.Encrypted)
{
if (!method.PasswordIsDefined)
{
@@ -865,95 +1943,276 @@ HRESULT Update(
CEncoder encoder(method);
- for (; folderRefIndex < folderRefs.Size(); folderRefIndex++)
+ // ---------- Repack and copy old solid blocks ----------
+
+ const CSolidGroup &group = groups[filterMode.GroupIndex];
+
+ FOR_VECTOR(folderRefIndex, group.folderRefs)
{
- const CFolderRepack &rep = folderRefs[folderRefIndex];
- if (rep.Group != groupIndex)
- break;
- int folderIndex = rep.FolderIndex;
+ const CFolderRepack &rep = group.folderRefs[folderRefIndex];
+
+ unsigned folderIndex = rep.FolderIndex;
- if (rep.NumCopyFiles == db->NumUnpackStreamsVector[folderIndex])
+ CNum numUnpackStreams = db->NumUnpackStreamsVector[folderIndex];
+
+ if (rep.NumCopyFiles == numUnpackStreams)
{
+ if (opCallback)
+ {
+ RINOK(opCallback->ReportOperation(
+ NEventIndexType::kBlockIndex, (UInt32)folderIndex,
+ NUpdateNotifyOp::kReplicate));
+
+ // ---------- Copy old solid block ----------
+ {
+ CNum indexInFolder = 0;
+ for (CNum fi = db->FolderStartFileIndex[folderIndex]; indexInFolder < numUnpackStreams; fi++)
+ {
+ if (db->Files[fi].HasStream)
+ {
+ indexInFolder++;
+ RINOK(opCallback->ReportOperation(
+ NEventIndexType::kInArcIndex, (UInt32)fi,
+ NUpdateNotifyOp::kReplicate));
+ }
+ }
+ }
+ }
+
UInt64 packSize = db->GetFolderFullPackSize(folderIndex);
RINOK(WriteRange(inStream, archive.SeqStream,
- db->GetFolderStreamPos(folderIndex, 0), packSize, progress));
+ db->GetFolderStreamPos(folderIndex, 0), packSize, progress));
lps->ProgressOffset += packSize;
- const CFolder &folder = db->Folders[folderIndex];
- CNum startIndex = db->FolderStartPackStreamIndex[folderIndex];
- for (int j = 0; j < folder.PackStreams.Size(); j++)
+ CFolder &folder = newDatabase.Folders.AddNew();
+ db->ParseFolderInfo(folderIndex, folder);
+ CNum startIndex = db->FoStartPackStreamIndex[folderIndex];
+ FOR_VECTOR(j, folder.PackStreams)
{
- newDatabase.PackSizes.Add(db->PackSizes[startIndex + j]);
+ newDatabase.PackSizes.Add(db->GetStreamPackSize(startIndex + j));
// newDatabase.PackCRCsDefined.Add(db.PackCRCsDefined[startIndex + j]);
// newDatabase.PackCRCs.Add(db.PackCRCs[startIndex + j]);
}
- newDatabase.Folders.Add(folder);
+
+ size_t indexStart = db->FoToCoderUnpackSizes[folderIndex];
+ size_t indexEnd = db->FoToCoderUnpackSizes[folderIndex + 1];
+ for (; indexStart < indexEnd; indexStart++)
+ newDatabase.CoderUnpackSizes.Add(db->CoderUnpackSizes[indexStart]);
}
else
{
+ // ---------- Repack old solid block ----------
+
CBoolVector extractStatuses;
- CNum numUnpackStreams = db->NumUnpackStreamsVector[folderIndex];
CNum indexInFolder = 0;
-
+
+ if (opCallback)
+ {
+ RINOK(opCallback->ReportOperation(
+ NEventIndexType::kBlockIndex, (UInt32)folderIndex,
+ NUpdateNotifyOp::kRepack))
+ }
+
+ /* We could reduce data size of decoded folder, if we don't need to repack
+ last files in folder. But the gain in speed is small in most cases.
+ So we unpack full folder. */
+
+ UInt64 sizeToEncode = 0;
+
+ /*
+ UInt64 importantUnpackSize = 0;
+ unsigned numImportantFiles = 0;
+ UInt64 decodeSize = 0;
+ */
+
for (CNum fi = db->FolderStartFileIndex[folderIndex]; indexInFolder < numUnpackStreams; fi++)
{
bool needExtract = false;
- if (db->Files[fi].HasStream)
+ const CFileItem &file = db->Files[fi];
+
+ if (file.HasStream)
{
indexInFolder++;
int updateIndex = fileIndexToUpdateIndexMap[fi];
if (updateIndex >= 0 && !updateItems[updateIndex].NewData)
needExtract = true;
+ // decodeSize += file.Size;
}
+
extractStatuses.Add(needExtract);
+ if (needExtract)
+ {
+ sizeToEncode += file.Size;
+ /*
+ numImportantFiles = extractStatuses.Size();
+ importantUnpackSize = decodeSize;
+ */
+ }
}
- int startPackIndex = newDatabase.PackSizes.Size();
- CFolder newFolder;
+ // extractStatuses.DeleteFrom(numImportantFiles);
+
+ unsigned startPackIndex = newDatabase.PackSizes.Size();
+ UInt64 curUnpackSize;
{
+
CMyComPtr<ISequentialInStream> sbInStream;
+ CRepackStreamBase *repackBase;
+ CFolderInStream2 *FosSpec2 = NULL;
+
+ CRepackInStreamWithSizes *inStreamSizeCountSpec = new CRepackInStreamWithSizes;
+ CMyComPtr<ISequentialInStream> inStreamSizeCount = inStreamSizeCountSpec;
{
- CMyComPtr<ISequentialOutStream> sbOutStream;
- sb.CreateStreams(&sbInStream, &sbOutStream);
- sb.ReInit();
- RINOK(threadDecoder.FosSpec->Init(db, db->FolderStartFileIndex[folderIndex], &extractStatuses, sbOutStream));
- }
-
- threadDecoder.InStream = inStream;
- threadDecoder.Folder = &db->Folders[folderIndex];
- threadDecoder.StartPos = db->GetFolderStreamPos(folderIndex, 0);
- threadDecoder.PackSizes = &db->PackSizes[db->FolderStartPackStreamIndex[folderIndex]];
-
- threadDecoder.Start();
-
- RINOK(encoder.Encode(
- EXTERNAL_CODECS_LOC_VARS
- sbInStream, NULL, &inSizeForReduce, newFolder,
- archive.SeqStream, newDatabase.PackSizes, progress));
+ #ifndef _7ZIP_ST
+ if (options.MultiThreadMixer)
+ {
+ repackBase = threadDecoder.FosSpec;
+ CMyComPtr<ISequentialOutStream> sbOutStream;
+ sb.CreateStreams(&sbInStream, &sbOutStream);
+ sb.ReInit();
+
+ threadDecoder.FosSpec->_stream = sbOutStream;
+
+ threadDecoder.InStream = inStream;
+ threadDecoder.StartPos = db->ArcInfo.DataStartPosition; // db->GetFolderStreamPos(folderIndex, 0);
+ threadDecoder.Folders = (const CFolders *)db;
+ threadDecoder.FolderIndex = folderIndex;
+
+ // threadDecoder.UnpackSize = importantUnpackSize;
+ // threadDecoder.send_UnpackSize = true;
+ }
+ else
+ #endif
+ {
+ FosSpec2 = new CFolderInStream2;
+ FosSpec2->Init();
+ sbInStream = FosSpec2;
+ repackBase = FosSpec2;
+
+ #ifndef _NO_CRYPTO
+ bool isEncrypted = false;
+ bool passwordIsDefined = false;
+ UString password;
+ #endif
+
+ CMyComPtr<ISequentialInStream> decodedStream;
+ HRESULT res = threadDecoder.Decoder.Decode(
+ EXTERNAL_CODECS_LOC_VARS
+ inStream,
+ db->ArcInfo.DataStartPosition, // db->GetFolderStreamPos(folderIndex, 0);,
+ *db, folderIndex,
+ // &importantUnpackSize, // *unpackSize
+ NULL, // *unpackSize : FULL unpack
+
+ NULL, // *outStream
+ NULL, // *compressProgress
+ &decodedStream
+
+ _7Z_DECODER_CRYPRO_VARS
+ #ifndef _7ZIP_ST
+ , false // mtMode
+ , 1 // numThreads
+ #endif
+ );
- threadDecoder.WaitExecuteFinish();
- }
+ RINOK(res);
+ if (!decodedStream)
+ return E_FAIL;
+
+ FosSpec2->_inStream = decodedStream;
+ }
+
+ repackBase->_db = db;
+ repackBase->_opCallback = opCallback;
+ repackBase->_extractCallback = extractCallback;
+
+ UInt32 startIndex = db->FolderStartFileIndex[folderIndex];
+ RINOK(repackBase->Init(startIndex, &extractStatuses));
+
+ inStreamSizeCountSpec->_db = db;
+ inStreamSizeCountSpec->Init(sbInStream, startIndex, &extractStatuses);
+
+ #ifndef _7ZIP_ST
+ if (options.MultiThreadMixer)
+ {
+ threadDecoder.Start();
+ }
+ #endif
+ }
+
+
+ HRESULT encodeRes = encoder.Encode(
+ EXTERNAL_CODECS_LOC_VARS
+ inStreamSizeCount,
+ // NULL,
+ &inSizeForReduce,
+ newDatabase.Folders.AddNew(), newDatabase.CoderUnpackSizes, curUnpackSize,
+ archive.SeqStream, newDatabase.PackSizes, progress);
+
+ if (encodeRes == k_My_HRESULT_CRC_ERROR)
+ return E_FAIL;
+
+ #ifndef _7ZIP_ST
+ if (options.MultiThreadMixer)
+ {
+ threadDecoder.WaitExecuteFinish();
+ HRESULT decodeRes = threadDecoder.Result;
+ // if (res == k_My_HRESULT_CRC_ERROR)
+ if (decodeRes == S_FALSE)
+ {
+ if (extractCallback)
+ {
+ RINOK(extractCallback->ReportExtractResult(
+ NEventIndexType::kInArcIndex, db->FolderStartFileIndex[folderIndex],
+ // NEventIndexType::kBlockIndex, (UInt32)folderIndex,
+ NExtract::NOperationResult::kDataError));
+ }
+ return E_FAIL;
+ }
+ RINOK(decodeRes);
+ if (encodeRes == S_OK)
+ if (sb.ProcessedSize != sizeToEncode)
+ encodeRes = E_FAIL;
+ }
+ else
+ #endif
+ {
+ if (FosSpec2->Result == S_FALSE)
+ {
+ if (extractCallback)
+ {
+ RINOK(extractCallback->ReportExtractResult(
+ NEventIndexType::kBlockIndex, (UInt32)folderIndex,
+ NExtract::NOperationResult::kDataError));
+ }
+ return E_FAIL;
+ }
+ RINOK(FosSpec2->Result);
+ }
- RINOK(threadDecoder.Result);
+ RINOK(encodeRes);
+ RINOK(repackBase->CheckFinishedState());
+
+ if (curUnpackSize != sizeToEncode)
+ return E_FAIL;
+ }
for (; startPackIndex < newDatabase.PackSizes.Size(); startPackIndex++)
lps->OutSize += newDatabase.PackSizes[startPackIndex];
- lps->InSize += newFolder.GetUnpackSize();
-
- newDatabase.Folders.Add(newFolder);
+ lps->InSize += curUnpackSize;
}
newDatabase.NumUnpackStreamsVector.Add(rep.NumCopyFiles);
- CNum numUnpackStreams = db->NumUnpackStreamsVector[folderIndex];
-
CNum indexInFolder = 0;
for (CNum fi = db->FolderStartFileIndex[folderIndex]; indexInFolder < numUnpackStreams; fi++)
{
CFileItem file;
CFileItem2 file2;
- db->GetFile(fi, file, file2);
+ GetFile(*db, fi, file, file2);
+ UString name;
+ db->GetPath(fi, name);
if (file.HasStream)
{
indexInFolder++;
@@ -972,30 +2231,43 @@ HRESULT Update(
uf.CrcDefined = file.CrcDefined;
uf.HasStream = file.HasStream;
file = uf;
+ name = ui.Name;
}
- newDatabase.AddFile(file, file2);
+ /*
+ file.Parent = ui.ParentFolderIndex;
+ if (ui.TreeFolderIndex >= 0)
+ treeFolderToArcIndex[ui.TreeFolderIndex] = newDatabase.Files.Size();
+ if (totalSecureDataSize != 0)
+ newDatabase.SecureIDs.Add(ui.SecureIndex);
+ */
+ newDatabase.AddFile(file, file2, name);
}
}
}
}
- int numFiles = group.Indices.Size();
+
+ // ---------- Compress files to new solid blocks ----------
+
+ unsigned numFiles = group.Indices.Size();
if (numFiles == 0)
continue;
CRecordVector<CRefItem> refItems;
- refItems.Reserve(numFiles);
- bool sortByType = (numSolidFiles > 1);
+ refItems.ClearAndSetSize(numFiles);
+ bool sortByType = (options.UseTypeSorting && numSolidFiles > 1);
for (i = 0; i < numFiles; i++)
- refItems.Add(CRefItem(group.Indices[i], updateItems[group.Indices[i]], sortByType));
- refItems.Sort(CompareUpdateItems, (void *)&sortByType);
+ refItems[i] = CRefItem(group.Indices[i], updateItems[group.Indices[i]], sortByType);
+ CSortParam sortParam;
+ // sortParam.TreeFolders = &treeFolders;
+ sortParam.SortByType = sortByType;
+ refItems.Sort(CompareUpdateItems, (void *)&sortParam);
- CRecordVector<UInt32> indices;
- indices.Reserve(numFiles);
+ CObjArray<UInt32> indices(numFiles);
for (i = 0; i < numFiles; i++)
{
UInt32 index = refItems[i].Index;
- indices.Add(index);
+ indices[i] = index;
/*
const CUpdateItem &ui = updateItems[index];
CFileItem file;
@@ -1012,10 +2284,11 @@ HRESULT Update(
for (i = 0; i < numFiles;)
{
UInt64 totalSize = 0;
- int numSubFiles;
- UString prevExtension;
- for (numSubFiles = 0; i + numSubFiles < numFiles &&
- numSubFiles < numSolidFiles; numSubFiles++)
+ unsigned numSubFiles;
+
+ const wchar_t *prevExtension = NULL;
+
+ for (numSubFiles = 0; i + numSubFiles < numFiles && numSubFiles < numSolidFiles; numSubFiles++)
{
const CUpdateItem &ui = updateItems[indices[i + numSubFiles]];
totalSize += ui.Size;
@@ -1023,49 +2296,65 @@ HRESULT Update(
break;
if (options.SolidExtension)
{
- UString ext = ui.GetExtension();
+ int slashPos = ui.Name.ReverseFind_PathSepar();
+ int dotPos = ui.Name.ReverseFind_Dot();
+ const wchar_t *ext = ui.Name.Ptr(dotPos <= slashPos ? ui.Name.Len() : dotPos + 1);
if (numSubFiles == 0)
prevExtension = ext;
- else
- if (ext.CompareNoCase(prevExtension) != 0)
- break;
+ else if (!StringsAreEqualNoCase(ext, prevExtension))
+ break;
}
}
+
if (numSubFiles < 1)
numSubFiles = 1;
+ RINOK(lps->SetCur());
+
CFolderInStream *inStreamSpec = new CFolderInStream;
CMyComPtr<ISequentialInStream> solidInStream(inStreamSpec);
inStreamSpec->Init(updateCallback, &indices[i], numSubFiles);
- CFolder folderItem;
-
- int startPackIndex = newDatabase.PackSizes.Size();
+ unsigned startPackIndex = newDatabase.PackSizes.Size();
+ UInt64 curFolderUnpackSize;
RINOK(encoder.Encode(
EXTERNAL_CODECS_LOC_VARS
- solidInStream, NULL, &inSizeForReduce, folderItem,
+ solidInStream,
+ // NULL,
+ &inSizeForReduce,
+ newDatabase.Folders.AddNew(), newDatabase.CoderUnpackSizes, curFolderUnpackSize,
archive.SeqStream, newDatabase.PackSizes, progress));
+ if (!inStreamSpec->WasFinished())
+ return E_FAIL;
+
for (; startPackIndex < newDatabase.PackSizes.Size(); startPackIndex++)
lps->OutSize += newDatabase.PackSizes[startPackIndex];
- lps->InSize += folderItem.GetUnpackSize();
+ lps->InSize += curFolderUnpackSize;
// for ()
// newDatabase.PackCRCsDefined.Add(false);
// newDatabase.PackCRCs.Add(0);
-
- newDatabase.Folders.Add(folderItem);
-
+
CNum numUnpackStreams = 0;
- for (int subIndex = 0; subIndex < numSubFiles; subIndex++)
+ UInt64 skippedSize = 0;
+
+ for (unsigned subIndex = 0; subIndex < numSubFiles; subIndex++)
{
const CUpdateItem &ui = updateItems[indices[i + subIndex]];
CFileItem file;
CFileItem2 file2;
+ UString name;
if (ui.NewProps)
+ {
FromUpdateItemToFileItem(ui, file, file2);
+ name = ui.Name;
+ }
else
- db->GetFile(ui.IndexInArchive, file, file2);
+ {
+ GetFile(*db, ui.IndexInArchive, file, file2);
+ db->GetPath(ui.IndexInArchive, name);
+ }
if (file2.IsAnti || file.IsDir)
return E_FAIL;
@@ -1075,12 +2364,15 @@ HRESULT Update(
*/
if (!inStreamSpec->Processed[subIndex])
{
+ skippedSize += ui.Size;
continue;
- // file.Name += L".locked";
+ // file.Name.AddAscii(".locked");
}
file.Crc = inStreamSpec->CRCs[subIndex];
file.Size = inStreamSpec->Sizes[subIndex];
+
+ // if (file.Size >= 0) // test purposes
if (file.Size != 0)
{
file.CrcDefined = true;
@@ -1092,57 +2384,65 @@ HRESULT Update(
file.CrcDefined = false;
file.HasStream = false;
}
- newDatabase.AddFile(file, file2);
+
+ /*
+ file.Parent = ui.ParentFolderIndex;
+ if (ui.TreeFolderIndex >= 0)
+ treeFolderToArcIndex[ui.TreeFolderIndex] = newDatabase.Files.Size();
+ if (totalSecureDataSize != 0)
+ newDatabase.SecureIDs.Add(ui.SecureIndex);
+ */
+ newDatabase.AddFile(file, file2, name);
}
+
// numUnpackStreams = 0 is very bad case for locked files
// v3.13 doesn't understand it.
newDatabase.NumUnpackStreamsVector.Add(numUnpackStreams);
i += numSubFiles;
+
+ if (skippedSize != 0 && complexity >= skippedSize)
+ {
+ complexity -= skippedSize;
+ RINOK(updateCallback->SetTotal(complexity));
+ }
}
}
- if (folderRefIndex != folderRefs.Size())
- return E_FAIL;
-
RINOK(lps->SetCur());
/*
- folderRefs.ClearAndFree();
fileIndexToUpdateIndexMap.ClearAndFree();
groups.ClearAndFree();
*/
+ /*
+ for (i = 0; i < newDatabase.Files.Size(); i++)
{
- // ---------- Write Folders & Empty Files ----------
-
- CRecordVector<int> emptyRefs;
- for (i = 0; i < updateItems.Size(); i++)
- {
- const CUpdateItem &ui = updateItems[i];
- if (ui.NewData)
- {
- if (ui.HasStream())
- continue;
- }
- else if (ui.IndexInArchive != -1 && db->Files[ui.IndexInArchive].HasStream)
- continue;
- emptyRefs.Add(i);
- }
- emptyRefs.Sort(CompareEmptyItems, (void *)&updateItems);
- for (i = 0; i < emptyRefs.Size(); i++)
+ CFileItem &file = newDatabase.Files[i];
+ file.Parent = treeFolderToArcIndex[file.Parent];
+ }
+
+ if (totalSecureDataSize != 0)
+ {
+ newDatabase.SecureBuf.SetCapacity(totalSecureDataSize);
+ size_t pos = 0;
+ newDatabase.SecureSizes.Reserve(secureBlocks.Sorted.Size());
+ for (i = 0; i < secureBlocks.Sorted.Size(); i++)
{
- const CUpdateItem &ui = updateItems[emptyRefs[i]];
- CFileItem file;
- CFileItem2 file2;
- if (ui.NewProps)
- FromUpdateItemToFileItem(ui, file, file2);
- else
- db->GetFile(ui.IndexInArchive, file, file2);
- newDatabase.AddFile(file, file2);
+ const CByteBuffer &buf = secureBlocks.Bufs[secureBlocks.Sorted[i]];
+ size_t size = buf.GetCapacity();
+ if (size != 0)
+ memcpy(newDatabase.SecureBuf + pos, buf, size);
+ newDatabase.SecureSizes.Add((UInt32)size);
+ pos += size;
}
}
-
+ */
newDatabase.ReserveDown();
+
+ if (opCallback)
+ RINOK(opCallback->ReportOperation(NEventIndexType::kNoIndex, (UInt32)(Int32)-1, NUpdateNotifyOp::kHeader));
+
return S_OK;
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zUpdate.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zUpdate.h
index 31e362246d3..a7abf779a61 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zUpdate.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zUpdate.h
@@ -3,15 +3,31 @@
#ifndef __7Z_UPDATE_H
#define __7Z_UPDATE_H
+#include "../IArchive.h"
+
+// #include "../../Common/UniqBlocks.h"
+
#include "7zCompressionMode.h"
#include "7zIn.h"
#include "7zOut.h"
-#include "../IArchive.h"
-
namespace NArchive {
namespace N7z {
+/*
+struct CTreeFolder
+{
+ UString Name;
+ int Parent;
+ CIntVector SubFolders;
+ int UpdateItemIndex;
+ int SortIndex;
+ int SortIndexEnd;
+
+ CTreeFolder(): UpdateItemIndex(-1) {}
+};
+*/
+
struct CUpdateItem
{
int IndexInArchive;
@@ -23,6 +39,15 @@ struct CUpdateItem
UInt64 Size;
UString Name;
+ /*
+ bool IsAltStream;
+ int ParentFolderIndex;
+ int TreeFolderIndex;
+ */
+
+ // that code is not used in 9.26
+ // int ParentSortIndex;
+ // int ParentSortIndexEnd;
UInt32 Attrib;
@@ -37,45 +62,71 @@ struct CUpdateItem
bool ATimeDefined;
bool MTimeDefined;
+ // int SecureIndex; // 0 means (no_security)
+
bool HasStream() const { return !IsDir && !IsAnti && Size != 0; }
+ // bool HasStream() const { return !IsDir && !IsAnti /* && Size != 0 */; } // for test purposes
CUpdateItem():
+ // ParentSortIndex(-1),
+ // IsAltStream(false),
IsAnti(false),
IsDir(false),
AttribDefined(false),
CTimeDefined(false),
ATimeDefined(false),
MTimeDefined(false)
+ // SecureIndex(0)
{}
- void SetDirStatusFromAttrib() { IsDir = ((Attrib & FILE_ATTRIBUTE_DIRECTORY) != 0); };
+ void SetDirStatusFromAttrib() { IsDir = ((Attrib & FILE_ATTRIBUTE_DIRECTORY) != 0); }
- int GetExtensionPos() const;
- UString GetExtension() const;
+ // unsigned GetExtensionPos() const;
+ // UString GetExtension() const;
};
struct CUpdateOptions
{
const CCompressionMethodMode *Method;
const CCompressionMethodMode *HeaderMethod;
- bool UseFilters;
- bool MaxFilter;
+ bool UseFilters; // use additional filters for some files
+ bool MaxFilter; // use BCJ2 filter instead of BCJ
+ int AnalysisLevel;
CHeaderOptions HeaderOptions;
UInt64 NumSolidFiles;
UInt64 NumSolidBytes;
bool SolidExtension;
+
+ bool UseTypeSorting;
+
bool RemoveSfxBlock;
- bool VolumeMode;
+ bool MultiThreadMixer;
+
+ CUpdateOptions():
+ Method(NULL),
+ HeaderMethod(NULL),
+ UseFilters(false),
+ MaxFilter(false),
+ AnalysisLevel(-1),
+ NumSolidFiles((UInt64)(Int64)(-1)),
+ NumSolidBytes((UInt64)(Int64)(-1)),
+ SolidExtension(false),
+ UseTypeSorting(true),
+ RemoveSfxBlock(false),
+ MultiThreadMixer(true)
+ {}
};
HRESULT Update(
DECL_EXTERNAL_CODECS_LOC_VARS
IInStream *inStream,
- const CArchiveDatabaseEx *db,
+ const CDbEx *db,
const CObjectVector<CUpdateItem> &updateItems,
+ // const CObjectVector<CTreeFolder> &treeFolders, // treeFolders[0] is root
+ // const CUniqBlocks &secureBlocks,
COutArchive &archive,
- CArchiveDatabase &newDatabase,
+ CArchiveDatabaseOut &newDatabase,
ISequentialOutStream *seqOutStream,
IArchiveUpdateCallback *updateCallback,
const CUpdateOptions &options
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/StdAfx.h b/3rdparty/lzma/CPP/7zip/Archive/7z/StdAfx.h
index 2e4be10b291..2854ff3e935 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/7z/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/7z/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../../Common/MyWindows.h"
-#include "../../../Common/NewHandler.h"
+#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Archive.def b/3rdparty/lzma/CPP/7zip/Archive/Archive.def
index 55b530b2d6e..145516d7970 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Archive.def
+++ b/3rdparty/lzma/CPP/7zip/Archive/Archive.def
@@ -1,6 +1,12 @@
EXPORTS
CreateObject PRIVATE
+
GetHandlerProperty PRIVATE
GetNumberOfFormats PRIVATE
GetHandlerProperty2 PRIVATE
- CreateObject PRIVATE
+ GetIsArc PRIVATE
+
+ SetCodecs PRIVATE
+
+ SetLargePageMode PRIVATE
+ SetCaseSensitive PRIVATE
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Archive2.def b/3rdparty/lzma/CPP/7zip/Archive/Archive2.def
index 885d39d149d..c7582742198 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Archive2.def
+++ b/3rdparty/lzma/CPP/7zip/Archive/Archive2.def
@@ -1,9 +1,19 @@
EXPORTS
CreateObject PRIVATE
+
GetHandlerProperty PRIVATE
GetNumberOfFormats PRIVATE
GetHandlerProperty2 PRIVATE
- CreateObject PRIVATE
+ GetIsArc PRIVATE
+
GetNumberOfMethods PRIVATE
GetMethodProperty PRIVATE
+ CreateDecoder PRIVATE
+ CreateEncoder PRIVATE
+
+ GetHashers PRIVATE
+
+ SetCodecs PRIVATE
+
SetLargePageMode PRIVATE
+ SetCaseSensitive PRIVATE
diff --git a/3rdparty/lzma/CPP/7zip/Archive/ArchiveExports.cpp b/3rdparty/lzma/CPP/7zip/Archive/ArchiveExports.cpp
index c7908b5917e..28e9946d5f6 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/ArchiveExports.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/ArchiveExports.cpp
@@ -2,21 +2,24 @@
#include "StdAfx.h"
+#include "../../../C/7zVersion.h"
+
#include "../../Common/ComTry.h"
#include "../../Windows/PropVariant.h"
#include "../Common/RegisterArc.h"
-static const unsigned int kNumArcsMax = 48;
-static unsigned int g_NumArcs = 0;
-static unsigned int g_DefaultArcIndex = 0;
+static const unsigned kNumArcsMax = 64;
+static unsigned g_NumArcs = 0;
+static unsigned g_DefaultArcIndex = 0;
static const CArcInfo *g_Arcs[kNumArcsMax];
-void RegisterArc(const CArcInfo *arcInfo)
+
+void RegisterArc(const CArcInfo *arcInfo) throw()
{
if (g_NumArcs < kNumArcsMax)
{
- const wchar_t *p = arcInfo->Name;
+ const char *p = arcInfo->Name;
if (p[0] == '7' && p[1] == 'z' && p[2] == 0)
g_DefaultArcIndex = g_NumArcs;
g_Arcs[g_NumArcs++] = arcInfo;
@@ -24,11 +27,14 @@ void RegisterArc(const CArcInfo *arcInfo)
}
DEFINE_GUID(CLSID_CArchiveHandler,
-0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00);
+ k_7zip_GUID_Data1,
+ k_7zip_GUID_Data2,
+ k_7zip_GUID_Data3_Common,
+ 0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00);
#define CLS_ARC_ID_ITEM(cls) ((cls).Data4[5])
-static inline HRESULT SetPropString(const char *s, unsigned int size, PROPVARIANT *value)
+static inline HRESULT SetPropStrFromBin(const char *s, unsigned size, PROPVARIANT *value)
{
if ((value->bstrVal = ::SysAllocStringByteLen(s, size)) != 0)
value->vt = VT_BSTR;
@@ -37,18 +43,18 @@ static inline HRESULT SetPropString(const char *s, unsigned int size, PROPVARIAN
static inline HRESULT SetPropGUID(const GUID &guid, PROPVARIANT *value)
{
- return SetPropString((const char *)&guid, sizeof(GUID), value);
+ return SetPropStrFromBin((const char *)&guid, sizeof(guid), value);
}
-int FindFormatCalssId(const GUID *clsID)
+int FindFormatCalssId(const GUID *clsid)
{
- GUID cls = *clsID;
+ GUID cls = *clsid;
CLS_ARC_ID_ITEM(cls) = 0;
if (cls != CLSID_CArchiveHandler)
return -1;
- Byte id = CLS_ARC_ID_ITEM(*clsID);
+ Byte id = CLS_ARC_ID_ITEM(*clsid);
for (unsigned i = 0; i < g_NumArcs; i++)
- if (g_Arcs[i]->ClassId == id)
+ if (g_Arcs[i]->Id == id)
return (int)i;
return -1;
}
@@ -86,37 +92,38 @@ STDAPI CreateArchiver(const GUID *clsid, const GUID *iid, void **outObject)
STDAPI GetHandlerProperty2(UInt32 formatIndex, PROPID propID, PROPVARIANT *value)
{
COM_TRY_BEGIN
+ NWindows::NCOM::PropVariant_Clear(value);
if (formatIndex >= g_NumArcs)
return E_INVALIDARG;
const CArcInfo &arc = *g_Arcs[formatIndex];
NWindows::NCOM::CPropVariant prop;
- switch(propID)
+ switch (propID)
{
- case NArchive::kName:
- prop = arc.Name;
- break;
- case NArchive::kClassID:
+ case NArchive::NHandlerPropID::kName: prop = arc.Name; break;
+ case NArchive::NHandlerPropID::kClassID:
{
GUID clsId = CLSID_CArchiveHandler;
- CLS_ARC_ID_ITEM(clsId) = arc.ClassId;
+ CLS_ARC_ID_ITEM(clsId) = arc.Id;
return SetPropGUID(clsId, value);
}
- case NArchive::kExtension:
- if (arc.Ext != 0)
- prop = arc.Ext;
- break;
- case NArchive::kAddExtension:
- if (arc.AddExt != 0)
- prop = arc.AddExt;
- break;
- case NArchive::kUpdate:
- prop = (bool)(arc.CreateOutArchive != 0);
+ case NArchive::NHandlerPropID::kExtension: if (arc.Ext) prop = arc.Ext; break;
+ case NArchive::NHandlerPropID::kAddExtension: if (arc.AddExt) prop = arc.AddExt; break;
+ case NArchive::NHandlerPropID::kUpdate: prop = (bool)(arc.CreateOutArchive != NULL); break;
+ case NArchive::NHandlerPropID::kKeepName: prop = ((arc.Flags & NArcInfoFlags::kKeepName) != 0); break;
+ case NArchive::NHandlerPropID::kAltStreams: prop = ((arc.Flags & NArcInfoFlags::kAltStreams) != 0); break;
+ case NArchive::NHandlerPropID::kNtSecure: prop = ((arc.Flags & NArcInfoFlags::kNtSecure) != 0); break;
+ case NArchive::NHandlerPropID::kFlags: prop = (UInt32)arc.Flags; break;
+ case NArchive::NHandlerPropID::kSignatureOffset: prop = (UInt32)arc.SignatureOffset; break;
+ // case NArchive::NHandlerPropID::kVersion: prop = (UInt32)MY_VER_MIX; break;
+
+ case NArchive::NHandlerPropID::kSignature:
+ if (arc.SignatureSize != 0 && !arc.IsMultiSignature())
+ return SetPropStrFromBin((const char *)arc.Signature, arc.SignatureSize, value);
break;
- case NArchive::kKeepName:
- prop = arc.KeepName;
+ case NArchive::NHandlerPropID::kMultiSignature:
+ if (arc.SignatureSize != 0 && arc.IsMultiSignature())
+ return SetPropStrFromBin((const char *)arc.Signature, arc.SignatureSize, value);
break;
- case NArchive::kStartSignature:
- return SetPropString((const char *)arc.Signature, arc.SignatureSize, value);
}
prop.Detach(value);
return S_OK;
@@ -133,3 +140,12 @@ STDAPI GetNumberOfFormats(UINT32 *numFormats)
*numFormats = g_NumArcs;
return S_OK;
}
+
+STDAPI GetIsArc(UInt32 formatIndex, Func_IsArc *isArc)
+{
+ *isArc = NULL;
+ if (formatIndex >= g_NumArcs)
+ return E_INVALIDARG;
+ *isArc = g_Arcs[formatIndex]->IsArc;
+ return S_OK;
+}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp b/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp
index 0b06a489f7d..41b5805c115 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp
@@ -4,118 +4,1041 @@
#include "CoderMixer2.h"
-namespace NCoderMixer {
+#ifdef USE_MIXER_ST
-CBindReverseConverter::CBindReverseConverter(const CBindInfo &srcBindInfo):
- _srcBindInfo(srcBindInfo)
+STDMETHODIMP CSequentialInStreamCalcSize::Read(void *data, UInt32 size, UInt32 *processedSize)
{
- srcBindInfo.GetNumStreams(NumSrcInStreams, _numSrcOutStreams);
+ UInt32 realProcessed = 0;
+ HRESULT result = S_OK;
+ if (_stream)
+ result = _stream->Read(data, size, &realProcessed);
+ _size += realProcessed;
+ if (size != 0 && realProcessed == 0)
+ _wasFinished = true;
+ if (processedSize)
+ *processedSize = realProcessed;
+ return result;
+}
+
+
+STDMETHODIMP COutStreamCalcSize::Write(const void *data, UInt32 size, UInt32 *processedSize)
+{
+ HRESULT result = S_OK;
+ if (_stream)
+ result = _stream->Write(data, size, &size);
+ _size += size;
+ if (processedSize)
+ *processedSize = size;
+ return result;
+}
+
+STDMETHODIMP COutStreamCalcSize::OutStreamFinish()
+{
+ HRESULT result = S_OK;
+ if (_stream)
+ {
+ CMyComPtr<IOutStreamFinish> outStreamFinish;
+ _stream.QueryInterface(IID_IOutStreamFinish, &outStreamFinish);
+ if (outStreamFinish)
+ result = outStreamFinish->OutStreamFinish();
+ }
+ return result;
+}
+
+#endif
+
+
+
+
+namespace NCoderMixer2 {
+
+static void BoolVector_Fill_False(CBoolVector &v, unsigned size)
+{
+ v.ClearAndSetSize(size);
+ bool *p = &v[0];
+ for (unsigned i = 0; i < size; i++)
+ p[i] = false;
+}
+
+class CBondsChecks
+{
+ CBoolVector _coderUsed;
+
+ bool Init();
+ bool CheckCoder(unsigned coderIndex);
+public:
+ const CBindInfo *BindInfo;
+
+ bool Check();
+};
+
+bool CBondsChecks::CheckCoder(unsigned coderIndex)
+{
+ const CCoderStreamsInfo &coder = BindInfo->Coders[coderIndex];
+
+ if (coderIndex >= _coderUsed.Size() || _coderUsed[coderIndex])
+ return false;
+ _coderUsed[coderIndex] = true;
+
+ UInt32 start = BindInfo->Coder_to_Stream[coderIndex];
+
+ for (unsigned i = 0; i < coder.NumStreams; i++)
+ {
+ UInt32 ind = start + i;
+
+ if (BindInfo->IsStream_in_PackStreams(ind))
+ continue;
+
+ int bond = BindInfo->FindBond_for_PackStream(ind);
+ if (bond < 0)
+ return false;
+ if (!CheckCoder(BindInfo->Bonds[bond].UnpackIndex))
+ return false;
+ }
+
+ return true;
+}
+
+bool CBondsChecks::Check()
+{
+ BoolVector_Fill_False(_coderUsed, BindInfo->Coders.Size());
+
+ if (!CheckCoder(BindInfo->UnpackCoder))
+ return false;
+
+ FOR_VECTOR(i, _coderUsed)
+ if (!_coderUsed[i])
+ return false;
+
+ return true;
+}
+
+void CBindInfo::ClearMaps()
+{
+ Coder_to_Stream.Clear();
+ Stream_to_Coder.Clear();
+}
+
+bool CBindInfo::CalcMapsAndCheck()
+{
+ ClearMaps();
+
+ UInt32 numStreams = 0;
+
+ if (Coders.Size() == 0)
+ return false;
+ if (Coders.Size() - 1 != Bonds.Size())
+ return false;
+
+ FOR_VECTOR(i, Coders)
+ {
+ Coder_to_Stream.Add(numStreams);
+
+ const CCoderStreamsInfo &c = Coders[i];
+
+ for (unsigned j = 0; j < c.NumStreams; j++)
+ Stream_to_Coder.Add(i);
+
+ numStreams += c.NumStreams;
+ }
+
+ if (numStreams != GetNum_Bonds_and_PackStreams())
+ return false;
+
+ CBondsChecks bc;
+ bc.BindInfo = this;
+ return bc.Check();
+}
+
+
+void CCoder::SetCoderInfo(const UInt64 *unpackSize, const UInt64 * const *packSizes)
+{
+ if (unpackSize)
+ {
+ UnpackSize = *unpackSize;
+ UnpackSizePointer = &UnpackSize;
+ }
+ else
+ {
+ UnpackSize = 0;
+ UnpackSizePointer = NULL;
+ }
+
+ PackSizes.ClearAndSetSize((unsigned)NumStreams);
+ PackSizePointers.ClearAndSetSize((unsigned)NumStreams);
+
+ for (unsigned i = 0; i < NumStreams; i++)
+ {
+ if (packSizes && packSizes[i])
+ {
+ PackSizes[i] = *(packSizes[i]);
+ PackSizePointers[i] = &PackSizes[i];
+ }
+ else
+ {
+ PackSizes[i] = 0;
+ PackSizePointers[i] = NULL;
+ }
+ }
+}
+
+bool CMixer::Is_UnpackSize_Correct_for_Coder(UInt32 coderIndex)
+{
+ if (coderIndex == _bi.UnpackCoder)
+ return true;
+
+ int bond = _bi.FindBond_for_UnpackStream(coderIndex);
+ if (bond < 0)
+ throw 20150213;
+
+ /*
+ UInt32 coderIndex, coderStreamIndex;
+ _bi.GetCoder_for_Stream(_bi.Bonds[bond].PackIndex, coderIndex, coderStreamIndex);
+ */
+ UInt32 nextCoder = _bi.Stream_to_Coder[_bi.Bonds[bond].PackIndex];
+
+ if (!IsFilter_Vector[nextCoder])
+ return false;
+
+ return Is_UnpackSize_Correct_for_Coder(nextCoder);
+}
+
+bool CMixer::Is_PackSize_Correct_for_Stream(UInt32 streamIndex)
+{
+ if (_bi.IsStream_in_PackStreams(streamIndex))
+ return true;
+
+ int bond = _bi.FindBond_for_PackStream(streamIndex);
+ if (bond < 0)
+ throw 20150213;
+
+ UInt32 nextCoder = _bi.Bonds[bond].UnpackIndex;
+
+ if (!IsFilter_Vector[nextCoder])
+ return false;
+
+ return Is_PackSize_Correct_for_Coder(nextCoder);
+}
+
+bool CMixer::Is_PackSize_Correct_for_Coder(UInt32 coderIndex)
+{
+ UInt32 startIndex = _bi.Coder_to_Stream[coderIndex];
+ UInt32 numStreams = _bi.Coders[coderIndex].NumStreams;
+ for (UInt32 i = 0; i < numStreams; i++)
+ if (!Is_PackSize_Correct_for_Stream(startIndex + i))
+ return false;
+ return true;
+}
+
+bool CMixer::IsThere_ExternalCoder_in_PackTree(UInt32 coderIndex)
+{
+ if (IsExternal_Vector[coderIndex])
+ return true;
+ UInt32 startIndex = _bi.Coder_to_Stream[coderIndex];
+ UInt32 numStreams = _bi.Coders[coderIndex].NumStreams;
+ for (UInt32 i = 0; i < numStreams; i++)
+ {
+ UInt32 si = startIndex + i;
+ if (_bi.IsStream_in_PackStreams(si))
+ continue;
+
+ int bond = _bi.FindBond_for_PackStream(si);
+ if (bond < 0)
+ throw 20150213;
+
+ if (IsThere_ExternalCoder_in_PackTree(_bi.Bonds[bond].UnpackIndex))
+ return true;
+ }
+ return false;
+}
+
+
+
+
+#ifdef USE_MIXER_ST
+
+CMixerST::CMixerST(bool encodeMode):
+ CMixer(encodeMode)
+ {}
+
+CMixerST::~CMixerST() {}
- UInt32 j;
- for (j = 0; j < NumSrcInStreams; j++)
+void CMixerST::AddCoder(const CCreatedCoder &cod)
+{
+ IsFilter_Vector.Add(cod.IsFilter);
+ IsExternal_Vector.Add(cod.IsExternal);
+ // const CCoderStreamsInfo &c = _bi.Coders[_coders.Size()];
+ CCoderST &c2 = _coders.AddNew();
+ c2.NumStreams = cod.NumStreams;
+ c2.Coder = cod.Coder;
+ c2.Coder2 = cod.Coder2;
+
+ /*
+ if (isFilter)
{
- _srcInToDestOutMap.Add(0);
- DestOutToSrcInMap.Add(0);
+ c2.CanRead = true;
+ c2.CanWrite = true;
}
- for (j = 0; j < _numSrcOutStreams; j++)
+ else
+ */
{
- _srcOutToDestInMap.Add(0);
- _destInToSrcOutMap.Add(0);
+ IUnknown *unk = (cod.Coder ? (IUnknown *)cod.Coder : (IUnknown *)cod.Coder2);
+ {
+ CMyComPtr<ISequentialInStream> s;
+ unk->QueryInterface(IID_ISequentialInStream, (void**)&s);
+ c2.CanRead = (s != NULL);
+ }
+ {
+ CMyComPtr<ISequentialOutStream> s;
+ unk->QueryInterface(IID_ISequentialOutStream, (void**)&s);
+ c2.CanWrite = (s != NULL);
+ }
}
+}
+
+CCoder &CMixerST::GetCoder(unsigned index)
+{
+ return _coders[index];
+}
- UInt32 destInOffset = 0;
- UInt32 destOutOffset = 0;
- UInt32 srcInOffset = NumSrcInStreams;
- UInt32 srcOutOffset = _numSrcOutStreams;
+void CMixerST::ReInit() {}
- for (int i = srcBindInfo.Coders.Size() - 1; i >= 0; i--)
+HRESULT CMixerST::GetInStream2(
+ ISequentialInStream * const *inStreams, /* const UInt64 * const *inSizes, */
+ UInt32 outStreamIndex, ISequentialInStream **inStreamRes)
+{
+ UInt32 coderIndex = outStreamIndex, coderStreamIndex = 0;
+
+ if (EncodeMode)
{
- const CCoderStreamsInfo &srcCoderInfo = srcBindInfo.Coders[i];
+ _bi.GetCoder_for_Stream(outStreamIndex, coderIndex, coderStreamIndex);
+ if (coderStreamIndex != 0)
+ return E_NOTIMPL;
+ }
+
+ const CCoder &coder = _coders[coderIndex];
+
+ CMyComPtr<ISequentialInStream> seqInStream;
+ coder.QueryInterface(IID_ISequentialInStream, (void **)&seqInStream);
+ if (!seqInStream)
+ return E_NOTIMPL;
+
+ UInt32 numInStreams = EncodeMode ? 1 : coder.NumStreams;
+ UInt32 startIndex = EncodeMode ? coderIndex : _bi.Coder_to_Stream[coderIndex];
- srcInOffset -= srcCoderInfo.NumInStreams;
- srcOutOffset -= srcCoderInfo.NumOutStreams;
+ bool isSet = false;
+
+ if (numInStreams == 1)
+ {
+ CMyComPtr<ICompressSetInStream> setStream;
+ coder.QueryInterface(IID_ICompressSetInStream, (void **)&setStream);
+ if (setStream)
+ {
+ CMyComPtr<ISequentialInStream> seqInStream2;
+ RINOK(GetInStream(inStreams, /* inSizes, */ startIndex + 0, &seqInStream2));
+ RINOK(setStream->SetInStream(seqInStream2));
+ isSet = true;
+ }
+ }
+
+ if (!isSet && numInStreams != 0)
+ {
+ CMyComPtr<ICompressSetInStream2> setStream2;
+ coder.QueryInterface(IID_ICompressSetInStream2, (void **)&setStream2);
+ if (!setStream2)
+ return E_NOTIMPL;
- UInt32 j;
- for (j = 0; j < srcCoderInfo.NumInStreams; j++, destOutOffset++)
+ for (UInt32 i = 0; i < numInStreams; i++)
+ {
+ CMyComPtr<ISequentialInStream> seqInStream2;
+ RINOK(GetInStream(inStreams, /* inSizes, */ startIndex + i, &seqInStream2));
+ RINOK(setStream2->SetInStream2(i, seqInStream2));
+ }
+ }
+
+ *inStreamRes = seqInStream.Detach();
+ return S_OK;
+}
+
+
+HRESULT CMixerST::GetInStream(
+ ISequentialInStream * const *inStreams, /* const UInt64 * const *inSizes, */
+ UInt32 inStreamIndex, ISequentialInStream **inStreamRes)
+{
+ CMyComPtr<ISequentialInStream> seqInStream;
+
+ {
+ int index = -1;
+ if (EncodeMode)
+ {
+ if (_bi.UnpackCoder == inStreamIndex)
+ index = 0;
+ }
+ else
+ index = _bi.FindStream_in_PackStreams(inStreamIndex);
+
+ if (index >= 0)
+ {
+ seqInStream = inStreams[(unsigned)index];
+ *inStreamRes = seqInStream.Detach();
+ return S_OK;
+ }
+ }
+
+ int bond = FindBond_for_Stream(
+ true, // forInputStream
+ inStreamIndex);
+ if (bond < 0)
+ return E_INVALIDARG;
+
+ RINOK(GetInStream2(inStreams, /* inSizes, */
+ _bi.Bonds[bond].Get_OutIndex(EncodeMode), &seqInStream));
+
+ while (_binderStreams.Size() <= (unsigned)bond)
+ _binderStreams.AddNew();
+ CStBinderStream &bs = _binderStreams[bond];
+
+ if (bs.StreamRef || bs.InStreamSpec)
+ return E_NOTIMPL;
+
+ CSequentialInStreamCalcSize *spec = new CSequentialInStreamCalcSize;
+ bs.StreamRef = spec;
+ bs.InStreamSpec = spec;
+
+ spec->SetStream(seqInStream);
+ spec->Init();
+
+ seqInStream = bs.InStreamSpec;
+
+ *inStreamRes = seqInStream.Detach();
+ return S_OK;
+}
+
+
+HRESULT CMixerST::GetOutStream(
+ ISequentialOutStream * const *outStreams, /* const UInt64 * const *outSizes, */
+ UInt32 outStreamIndex, ISequentialOutStream **outStreamRes)
+{
+ CMyComPtr<ISequentialOutStream> seqOutStream;
+
+ {
+ int index = -1;
+ if (!EncodeMode)
+ {
+ if (_bi.UnpackCoder == outStreamIndex)
+ index = 0;
+ }
+ else
+ index = _bi.FindStream_in_PackStreams(outStreamIndex);
+
+ if (index >= 0)
+ {
+ seqOutStream = outStreams[(unsigned)index];
+ *outStreamRes = seqOutStream.Detach();
+ return S_OK;
+ }
+ }
+
+ int bond = FindBond_for_Stream(
+ false, // forInputStream
+ outStreamIndex);
+ if (bond < 0)
+ return E_INVALIDARG;
+
+ UInt32 inStreamIndex = _bi.Bonds[bond].Get_InIndex(EncodeMode);
+
+ UInt32 coderIndex = inStreamIndex;
+ UInt32 coderStreamIndex = 0;
+
+ if (!EncodeMode)
+ _bi.GetCoder_for_Stream(inStreamIndex, coderIndex, coderStreamIndex);
+
+ CCoder &coder = _coders[coderIndex];
+
+ /*
+ if (!coder.Coder)
+ return E_NOTIMPL;
+ */
+
+ coder.QueryInterface(IID_ISequentialOutStream, (void **)&seqOutStream);
+ if (!seqOutStream)
+ return E_NOTIMPL;
+
+ UInt32 numOutStreams = EncodeMode ? coder.NumStreams : 1;
+ UInt32 startIndex = EncodeMode ? _bi.Coder_to_Stream[coderIndex]: coderIndex;
+
+ bool isSet = false;
+
+ if (numOutStreams == 1)
+ {
+ CMyComPtr<ICompressSetOutStream> setOutStream;
+ coder.Coder.QueryInterface(IID_ICompressSetOutStream, &setOutStream);
+ if (setOutStream)
+ {
+ CMyComPtr<ISequentialOutStream> seqOutStream2;
+ RINOK(GetOutStream(outStreams, /* outSizes, */ startIndex + 0, &seqOutStream2));
+ RINOK(setOutStream->SetOutStream(seqOutStream2));
+ isSet = true;
+ }
+ }
+
+ if (!isSet && numOutStreams != 0)
+ {
+ return E_NOTIMPL;
+ /*
+ CMyComPtr<ICompressSetOutStream2> setStream2;
+ coder.QueryInterface(IID_ICompressSetOutStream2, (void **)&setStream2);
+ if (!setStream2)
+ return E_NOTIMPL;
+ for (UInt32 i = 0; i < numOutStreams; i++)
+ {
+ CMyComPtr<ISequentialOutStream> seqOutStream2;
+ RINOK(GetOutStream(outStreams, startIndex + i, &seqOutStream2));
+ RINOK(setStream2->SetOutStream2(i, seqOutStream2));
+ }
+ */
+ }
+
+ while (_binderStreams.Size() <= (unsigned)bond)
+ _binderStreams.AddNew();
+ CStBinderStream &bs = _binderStreams[bond];
+
+ if (bs.StreamRef || bs.OutStreamSpec)
+ return E_NOTIMPL;
+
+ COutStreamCalcSize *spec = new COutStreamCalcSize;
+ bs.StreamRef = (ISequentialOutStream *)spec;
+ bs.OutStreamSpec = spec;
+
+ spec->SetStream(seqOutStream);
+ spec->Init();
+
+ seqOutStream = bs.OutStreamSpec;
+
+ *outStreamRes = seqOutStream.Detach();
+ return S_OK;
+}
+
+
+static HRESULT GetError(HRESULT res, HRESULT res2)
+{
+ if (res == res2)
+ return res;
+ if (res == S_OK)
+ return res2;
+ if (res == k_My_HRESULT_WritingWasCut)
+ {
+ if (res2 != S_OK)
+ return res2;
+ }
+ return res;
+}
+
+
+HRESULT CMixerST::FinishStream(UInt32 streamIndex)
+{
+ {
+ int index = -1;
+ if (!EncodeMode)
+ {
+ if (_bi.UnpackCoder == streamIndex)
+ index = 0;
+ }
+ else
+ index = _bi.FindStream_in_PackStreams(streamIndex);
+
+ if (index >= 0)
+ return S_OK;
+ }
+
+ int bond = FindBond_for_Stream(
+ false, // forInputStream
+ streamIndex);
+ if (bond < 0)
+ return E_INVALIDARG;
+
+ UInt32 inStreamIndex = _bi.Bonds[bond].Get_InIndex(EncodeMode);
+
+ UInt32 coderIndex = inStreamIndex;
+ UInt32 coderStreamIndex = 0;
+ if (!EncodeMode)
+ _bi.GetCoder_for_Stream(inStreamIndex, coderIndex, coderStreamIndex);
+
+ CCoder &coder = _coders[coderIndex];
+ CMyComPtr<IOutStreamFinish> finish;
+ coder.QueryInterface(IID_IOutStreamFinish, (void **)&finish);
+ HRESULT res = S_OK;
+ if (finish)
+ {
+ res = finish->OutStreamFinish();
+ }
+ return GetError(res, FinishCoder(coderIndex));
+}
+
+
+HRESULT CMixerST::FinishCoder(UInt32 coderIndex)
+{
+ CCoder &coder = _coders[coderIndex];
+
+ UInt32 numOutStreams = EncodeMode ? coder.NumStreams : 1;
+ UInt32 startIndex = EncodeMode ? _bi.Coder_to_Stream[coderIndex]: coderIndex;
+
+ HRESULT res = S_OK;
+ for (unsigned i = 0; i < numOutStreams; i++)
+ res = GetError(res, FinishStream(startIndex + i));
+ return res;
+}
+
+
+void CMixerST::SelectMainCoder(bool useFirst)
+{
+ unsigned ci = _bi.UnpackCoder;
+
+ int firstNonFilter = -1;
+ int firstAllowed = ci;
+
+ for (;;)
+ {
+ const CCoderST &coder = _coders[ci];
+ // break;
+
+ if (ci != _bi.UnpackCoder)
+ if (EncodeMode ? !coder.CanWrite : !coder.CanRead)
+ {
+ firstAllowed = ci;
+ firstNonFilter = -2;
+ }
+
+ if (coder.NumStreams != 1)
+ break;
+
+ UInt32 st = _bi.Coder_to_Stream[ci];
+ if (_bi.IsStream_in_PackStreams(st))
+ break;
+ int bond = _bi.FindBond_for_PackStream(st);
+ if (bond < 0)
+ throw 20150213;
+
+ if (EncodeMode ? !coder.CanRead : !coder.CanWrite)
+ break;
+
+ if (firstNonFilter == -1 && !IsFilter_Vector[ci])
+ firstNonFilter = ci;
+
+ ci = _bi.Bonds[bond].UnpackIndex;
+ }
+
+ if (useFirst)
+ ci = firstAllowed;
+ else if (firstNonFilter >= 0)
+ ci = firstNonFilter;
+
+ MainCoderIndex = ci;
+}
+
+
+HRESULT CMixerST::Code(
+ ISequentialInStream * const *inStreams,
+ ISequentialOutStream * const *outStreams,
+ ICompressProgressInfo *progress)
+{
+ _binderStreams.Clear();
+ unsigned ci = MainCoderIndex;
+
+ const CCoder &mainCoder = _coders[MainCoderIndex];
+
+ CObjectVector< CMyComPtr<ISequentialInStream> > seqInStreams;
+ CObjectVector< CMyComPtr<ISequentialOutStream> > seqOutStreams;
+
+ UInt32 numInStreams = EncodeMode ? 1 : mainCoder.NumStreams;
+ UInt32 numOutStreams = !EncodeMode ? 1 : mainCoder.NumStreams;
+
+ UInt32 startInIndex = EncodeMode ? ci : _bi.Coder_to_Stream[ci];
+ UInt32 startOutIndex = !EncodeMode ? ci : _bi.Coder_to_Stream[ci];
+
+ UInt32 i;
+
+ for (i = 0; i < numInStreams; i++)
+ {
+ CMyComPtr<ISequentialInStream> seqInStream;
+ RINOK(GetInStream(inStreams, /* inSizes, */ startInIndex + i, &seqInStream));
+ seqInStreams.Add(seqInStream);
+ }
+
+ for (i = 0; i < numOutStreams; i++)
+ {
+ CMyComPtr<ISequentialOutStream> seqOutStream;
+ RINOK(GetOutStream(outStreams, /* outSizes, */ startOutIndex + i, &seqOutStream));
+ seqOutStreams.Add(seqOutStream);
+ }
+
+ CRecordVector< ISequentialInStream * > seqInStreamsSpec;
+ CRecordVector< ISequentialOutStream * > seqOutStreamsSpec;
+
+ for (i = 0; i < numInStreams; i++)
+ seqInStreamsSpec.Add(seqInStreams[i]);
+ for (i = 0; i < numOutStreams; i++)
+ seqOutStreamsSpec.Add(seqOutStreams[i]);
+
+ for (i = 0; i < _coders.Size(); i++)
+ {
+ if (i == ci)
+ continue;
+
+ CCoder &coder = _coders[i];
+
+ if (EncodeMode)
+ {
+ CMyComPtr<ICompressInitEncoder> initEncoder;
+ coder.QueryInterface(IID_ICompressInitEncoder, (void **)&initEncoder);
+ if (initEncoder)
+ RINOK(initEncoder->InitEncoder());
+ }
+ else
{
- UInt32 index = srcInOffset + j;
- _srcInToDestOutMap[index] = destOutOffset;
- DestOutToSrcInMap[destOutOffset] = index;
+ CMyComPtr<ICompressSetOutStreamSize> setOutStreamSize;
+ coder.QueryInterface(IID_ICompressSetOutStreamSize, (void **)&setOutStreamSize);
+ if (setOutStreamSize)
+ RINOK(setOutStreamSize->SetOutStreamSize(
+ EncodeMode ? coder.PackSizePointers[0] : coder.UnpackSizePointer));
}
- for (j = 0; j < srcCoderInfo.NumOutStreams; j++, destInOffset++)
+ }
+
+ const UInt64 * const *isSizes2 = EncodeMode ? &mainCoder.UnpackSizePointer : &mainCoder.PackSizePointers.Front();
+ const UInt64 * const *outSizes2 = EncodeMode ? &mainCoder.PackSizePointers.Front() : &mainCoder.UnpackSizePointer;
+
+ HRESULT res;
+ if (mainCoder.Coder)
+ {
+ res = mainCoder.Coder->Code(
+ seqInStreamsSpec[0], seqOutStreamsSpec[0],
+ isSizes2[0], outSizes2[0],
+ progress);
+ }
+ else
+ {
+ res = mainCoder.Coder2->Code(
+ &seqInStreamsSpec.Front(), isSizes2, numInStreams,
+ &seqOutStreamsSpec.Front(), outSizes2, numOutStreams,
+ progress);
+ }
+
+ if (res == k_My_HRESULT_WritingWasCut)
+ res = S_OK;
+
+ if (res == S_OK || res == S_FALSE)
+ {
+ res = GetError(res, FinishCoder(ci));
+ }
+
+ for (i = 0; i < _binderStreams.Size(); i++)
+ {
+ const CStBinderStream &bs = _binderStreams[i];
+ if (bs.InStreamSpec)
+ bs.InStreamSpec->ReleaseStream();
+ else
+ bs.OutStreamSpec->ReleaseStream();
+ }
+
+ if (res == k_My_HRESULT_WritingWasCut)
+ res = S_OK;
+ return res;
+}
+
+
+HRESULT CMixerST::GetMainUnpackStream(
+ ISequentialInStream * const *inStreams,
+ ISequentialInStream **inStreamRes)
+{
+ CMyComPtr<ISequentialInStream> seqInStream;
+
+ RINOK(GetInStream2(inStreams, /* inSizes, */
+ _bi.UnpackCoder, &seqInStream))
+
+ FOR_VECTOR (i, _coders)
+ {
+ CCoder &coder = _coders[i];
+ CMyComPtr<ICompressSetOutStreamSize> setOutStreamSize;
+ coder.QueryInterface(IID_ICompressSetOutStreamSize, (void **)&setOutStreamSize);
+ if (setOutStreamSize)
{
- UInt32 index = srcOutOffset + j;
- _srcOutToDestInMap[index] = destInOffset;
- _destInToSrcOutMap[destInOffset] = index;
+ RINOK(setOutStreamSize->SetOutStreamSize(coder.UnpackSizePointer));
}
}
+
+ *inStreamRes = seqInStream.Detach();
+ return S_OK;
}
-void CBindReverseConverter::CreateReverseBindInfo(CBindInfo &destBindInfo)
+
+UInt64 CMixerST::GetBondStreamSize(unsigned bondIndex) const
{
- destBindInfo.Coders.Clear();
- destBindInfo.BindPairs.Clear();
- destBindInfo.InStreams.Clear();
- destBindInfo.OutStreams.Clear();
+ const CStBinderStream &bs = _binderStreams[bondIndex];
+ if (bs.InStreamSpec)
+ return bs.InStreamSpec->GetSize();
+ return bs.OutStreamSpec->GetSize();
+}
+
+#endif
+
+
+
+
+
- int i;
- for (i = _srcBindInfo.Coders.Size() - 1; i >= 0; i--)
+#ifdef USE_MIXER_MT
+
+
+void CCoderMT::Execute()
+{
+ try
+ {
+ Code(NULL);
+ }
+ catch(...)
{
- const CCoderStreamsInfo &srcCoderInfo = _srcBindInfo.Coders[i];
- CCoderStreamsInfo destCoderInfo;
- destCoderInfo.NumInStreams = srcCoderInfo.NumOutStreams;
- destCoderInfo.NumOutStreams = srcCoderInfo.NumInStreams;
- destBindInfo.Coders.Add(destCoderInfo);
+ Result = E_FAIL;
}
- for (i = _srcBindInfo.BindPairs.Size() - 1; i >= 0; i--)
+}
+
+void CCoderMT::Code(ICompressProgressInfo *progress)
+{
+ unsigned numInStreams = EncodeMode ? 1 : NumStreams;
+ unsigned numOutStreams = EncodeMode ? NumStreams : 1;
+
+ InStreamPointers.ClearAndReserve(numInStreams);
+ OutStreamPointers.ClearAndReserve(numOutStreams);
+
+ unsigned i;
+
+ for (i = 0; i < numInStreams; i++)
+ InStreamPointers.AddInReserved((ISequentialInStream *)InStreams[i]);
+
+ for (i = 0; i < numOutStreams; i++)
+ OutStreamPointers.AddInReserved((ISequentialOutStream *)OutStreams[i]);
+
+ // we suppose that UnpackSizePointer and PackSizePointers contain correct pointers.
+ /*
+ if (UnpackSizePointer)
+ UnpackSizePointer = &UnpackSize;
+ for (i = 0; i < NumStreams; i++)
+ if (PackSizePointers[i])
+ PackSizePointers[i] = &PackSizes[i];
+ */
+
+ CReleaser releaser(*this);
+
+ if (Coder)
+ Result = Coder->Code(InStreamPointers[0], OutStreamPointers[0],
+ EncodeMode ? UnpackSizePointer : PackSizePointers[0],
+ EncodeMode ? PackSizePointers[0] : UnpackSizePointer,
+ progress);
+ else
+ Result = Coder2->Code(
+ &InStreamPointers.Front(), EncodeMode ? &UnpackSizePointer : &PackSizePointers.Front(), numInStreams,
+ &OutStreamPointers.Front(), EncodeMode ? &PackSizePointers.Front(): &UnpackSizePointer, numOutStreams,
+ progress);
+}
+
+HRESULT CMixerMT::SetBindInfo(const CBindInfo &bindInfo)
+{
+ CMixer::SetBindInfo(bindInfo);
+
+ _streamBinders.Clear();
+ FOR_VECTOR (i, _bi.Bonds)
{
- const CBindPair &srcBindPair = _srcBindInfo.BindPairs[i];
- CBindPair destBindPair;
- destBindPair.InIndex = _srcOutToDestInMap[srcBindPair.OutIndex];
- destBindPair.OutIndex = _srcInToDestOutMap[srcBindPair.InIndex];
- destBindInfo.BindPairs.Add(destBindPair);
+ RINOK(_streamBinders.AddNew().CreateEvents());
}
- for (i = 0; i < _srcBindInfo.InStreams.Size(); i++)
- destBindInfo.OutStreams.Add(_srcInToDestOutMap[_srcBindInfo.InStreams[i]]);
- for (i = 0; i < _srcBindInfo.OutStreams.Size(); i++)
- destBindInfo.InStreams.Add(_srcOutToDestInMap[_srcBindInfo.OutStreams[i]]);
+ return S_OK;
+}
+
+void CMixerMT::AddCoder(const CCreatedCoder &cod)
+{
+ IsFilter_Vector.Add(cod.IsFilter);
+ IsExternal_Vector.Add(cod.IsExternal);
+ // const CCoderStreamsInfo &c = _bi.Coders[_coders.Size()];
+ CCoderMT &c2 = _coders.AddNew();
+ c2.NumStreams = cod.NumStreams;
+ c2.Coder = cod.Coder;
+ c2.Coder2 = cod.Coder2;
+ c2.EncodeMode = EncodeMode;
+}
+
+CCoder &CMixerMT::GetCoder(unsigned index)
+{
+ return _coders[index];
}
-CCoderInfo2::CCoderInfo2(UInt32 numInStreams, UInt32 numOutStreams):
- NumInStreams(numInStreams),
- NumOutStreams(numOutStreams)
+void CMixerMT::ReInit()
{
- InSizes.Reserve(NumInStreams);
- InSizePointers.Reserve(NumInStreams);
- OutSizes.Reserve(NumOutStreams);
- OutSizePointers.Reserve(NumOutStreams);
+ FOR_VECTOR (i, _streamBinders)
+ _streamBinders[i].ReInit();
+}
+
+void CMixerMT::SelectMainCoder(bool useFirst)
+{
+ unsigned ci = _bi.UnpackCoder;
+
+ if (!useFirst)
+ for (;;)
+ {
+ if (_coders[ci].NumStreams != 1)
+ break;
+ if (!IsFilter_Vector[ci])
+ break;
+
+ UInt32 st = _bi.Coder_to_Stream[ci];
+ if (_bi.IsStream_in_PackStreams(st))
+ break;
+ int bond = _bi.FindBond_for_PackStream(st);
+ if (bond < 0)
+ throw 20150213;
+ ci = _bi.Bonds[bond].UnpackIndex;
+ }
+
+ MainCoderIndex = ci;
}
-static void SetSizes(const UInt64 **srcSizes, CRecordVector<UInt64> &sizes,
- CRecordVector<const UInt64 *> &sizePointers, UInt32 numItems)
+HRESULT CMixerMT::Init(ISequentialInStream * const *inStreams, ISequentialOutStream * const *outStreams)
{
- sizes.Clear();
- sizePointers.Clear();
- for(UInt32 i = 0; i < numItems; i++)
+ unsigned i;
+
+ for (i = 0; i < _coders.Size(); i++)
+ {
+ CCoderMT &coderInfo = _coders[i];
+ const CCoderStreamsInfo &csi = _bi.Coders[i];
+
+ UInt32 j;
+
+ unsigned numInStreams = EncodeMode ? 1 : csi.NumStreams;
+ unsigned numOutStreams = EncodeMode ? csi.NumStreams : 1;
+
+ coderInfo.InStreams.Clear();
+ for (j = 0; j < numInStreams; j++)
+ coderInfo.InStreams.AddNew();
+
+ coderInfo.OutStreams.Clear();
+ for (j = 0; j < numOutStreams; j++)
+ coderInfo.OutStreams.AddNew();
+ }
+
+ for (i = 0; i < _bi.Bonds.Size(); i++)
{
- if (srcSizes == 0 || srcSizes[i] == NULL)
+ const CBond &bond = _bi.Bonds[i];
+
+ UInt32 inCoderIndex, inCoderStreamIndex;
+ UInt32 outCoderIndex, outCoderStreamIndex;
+
+ {
+ UInt32 coderIndex, coderStreamIndex;
+ _bi.GetCoder_for_Stream(bond.PackIndex, coderIndex, coderStreamIndex);
+
+ inCoderIndex = EncodeMode ? bond.UnpackIndex : coderIndex;
+ outCoderIndex = EncodeMode ? coderIndex : bond.UnpackIndex;
+
+ inCoderStreamIndex = EncodeMode ? 0 : coderStreamIndex;
+ outCoderStreamIndex = EncodeMode ? coderStreamIndex : 0;
+ }
+
+ _streamBinders[i].CreateStreams(
+ &_coders[inCoderIndex].InStreams[inCoderStreamIndex],
+ &_coders[outCoderIndex].OutStreams[outCoderStreamIndex]);
+
+ CMyComPtr<ICompressSetBufSize> inSetSize, outSetSize;
+ _coders[inCoderIndex].QueryInterface(IID_ICompressSetBufSize, (void **)&inSetSize);
+ _coders[outCoderIndex].QueryInterface(IID_ICompressSetBufSize, (void **)&outSetSize);
+ if (inSetSize && outSetSize)
{
- sizes.Add(0);
- sizePointers.Add(NULL);
+ const UInt32 kBufSize = 1 << 19;
+ inSetSize->SetInBufSize(inCoderStreamIndex, kBufSize);
+ outSetSize->SetOutBufSize(outCoderStreamIndex, kBufSize);
}
+ }
+
+ {
+ CCoderMT &cod = _coders[_bi.UnpackCoder];
+ if (EncodeMode)
+ cod.InStreams[0] = inStreams[0];
+ else
+ cod.OutStreams[0] = outStreams[0];
+ }
+
+ for (i = 0; i < _bi.PackStreams.Size(); i++)
+ {
+ UInt32 coderIndex, coderStreamIndex;
+ _bi.GetCoder_for_Stream(_bi.PackStreams[i], coderIndex, coderStreamIndex);
+ CCoderMT &cod = _coders[coderIndex];
+ if (EncodeMode)
+ cod.OutStreams[coderStreamIndex] = outStreams[i];
else
+ cod.InStreams[coderStreamIndex] = inStreams[i];
+ }
+
+ return S_OK;
+}
+
+HRESULT CMixerMT::ReturnIfError(HRESULT code)
+{
+ FOR_VECTOR (i, _coders)
+ if (_coders[i].Result == code)
+ return code;
+ return S_OK;
+}
+
+HRESULT CMixerMT::Code(
+ ISequentialInStream * const *inStreams,
+ ISequentialOutStream * const *outStreams,
+ ICompressProgressInfo *progress)
+{
+ Init(inStreams, outStreams);
+
+ unsigned i;
+ for (i = 0; i < _coders.Size(); i++)
+ if (i != MainCoderIndex)
{
- sizes.Add(*srcSizes[i]);
- sizePointers.Add(&sizes.Back());
+ RINOK(_coders[i].Create());
}
+
+ for (i = 0; i < _coders.Size(); i++)
+ if (i != MainCoderIndex)
+ _coders[i].Start();
+
+ _coders[MainCoderIndex].Code(progress);
+
+ for (i = 0; i < _coders.Size(); i++)
+ if (i != MainCoderIndex)
+ _coders[i].WaitExecuteFinish();
+
+ RINOK(ReturnIfError(E_ABORT));
+ RINOK(ReturnIfError(E_OUTOFMEMORY));
+
+ for (i = 0; i < _coders.Size(); i++)
+ {
+ HRESULT result = _coders[i].Result;
+ if (result != S_OK
+ && result != k_My_HRESULT_WritingWasCut
+ && result != S_FALSE
+ && result != E_FAIL)
+ return result;
+ }
+
+ RINOK(ReturnIfError(S_FALSE));
+
+ for (i = 0; i < _coders.Size(); i++)
+ {
+ HRESULT result = _coders[i].Result;
+ if (result != S_OK && result != k_My_HRESULT_WritingWasCut)
+ return result;
}
+
+ return S_OK;
}
-void CCoderInfo2::SetCoderInfo(const UInt64 **inSizes,
- const UInt64 **outSizes)
+UInt64 CMixerMT::GetBondStreamSize(unsigned bondIndex) const
{
- SetSizes(inSizes, InSizes, InSizePointers, NumInStreams);
- SetSizes(outSizes, OutSizes, OutSizePointers, NumOutStreams);
+ return _streamBinders[bondIndex].ProcessedSize;
}
+#endif
+
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2.h b/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2.h
index a03722d61f1..e63f2ff0efa 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2.h
@@ -3,172 +3,435 @@
#ifndef __CODER_MIXER2_H
#define __CODER_MIXER2_H
-#include "../../../Common/MyVector.h"
-#include "../../../Common/Types.h"
#include "../../../Common/MyCom.h"
+#include "../../../Common/MyVector.h"
+
#include "../../ICoder.h"
-namespace NCoderMixer {
+#include "../../Common/CreateCoder.h"
+
+#ifdef _7ZIP_ST
+ #define USE_MIXER_ST
+#else
+ #define USE_MIXER_MT
+ #ifndef _SFX
+ #define USE_MIXER_ST
+ #endif
+#endif
+
+#ifdef USE_MIXER_MT
+#include "../../Common/StreamBinder.h"
+#include "../../Common/VirtThread.h"
+#endif
+
+
+
+#ifdef USE_MIXER_ST
+
+class CSequentialInStreamCalcSize:
+ public ISequentialInStream,
+ public CMyUnknownImp
+{
+public:
+ MY_UNKNOWN_IMP1(ISequentialInStream)
+
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+private:
+ CMyComPtr<ISequentialInStream> _stream;
+ UInt64 _size;
+ bool _wasFinished;
+public:
+ void SetStream(ISequentialInStream *stream) { _stream = stream; }
+ void Init()
+ {
+ _size = 0;
+ _wasFinished = false;
+ }
+ void ReleaseStream() { _stream.Release(); }
+ UInt64 GetSize() const { return _size; }
+ bool WasFinished() const { return _wasFinished; }
+};
+
+
+class COutStreamCalcSize:
+ public ISequentialOutStream,
+ public IOutStreamFinish,
+ public CMyUnknownImp
+{
+ CMyComPtr<ISequentialOutStream> _stream;
+ UInt64 _size;
+public:
+ MY_UNKNOWN_IMP2(ISequentialOutStream, IOutStreamFinish)
+
+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
+ STDMETHOD(OutStreamFinish)();
+
+ void SetStream(ISequentialOutStream *stream) { _stream = stream; }
+ void ReleaseStream() { _stream.Release(); }
+ void Init() { _size = 0; }
+ UInt64 GetSize() const { return _size; }
+};
+
+#endif
+
+
+
+namespace NCoderMixer2 {
-struct CBindPair
+struct CBond
{
- UInt32 InIndex;
- UInt32 OutIndex;
+ UInt32 PackIndex;
+ UInt32 UnpackIndex;
+
+ UInt32 Get_InIndex(bool encodeMode) const { return encodeMode ? UnpackIndex : PackIndex; }
+ UInt32 Get_OutIndex(bool encodeMode) const { return encodeMode ? PackIndex : UnpackIndex; }
};
+
struct CCoderStreamsInfo
{
- UInt32 NumInStreams;
- UInt32 NumOutStreams;
+ UInt32 NumStreams;
};
+
struct CBindInfo
{
CRecordVector<CCoderStreamsInfo> Coders;
- CRecordVector<CBindPair> BindPairs;
- CRecordVector<UInt32> InStreams;
- CRecordVector<UInt32> OutStreams;
+ CRecordVector<CBond> Bonds;
+ CRecordVector<UInt32> PackStreams;
+ unsigned UnpackCoder;
- void Clear()
+ unsigned GetNum_Bonds_and_PackStreams() const { return Bonds.Size() + PackStreams.Size(); }
+
+ int FindBond_for_PackStream(UInt32 packStream) const
{
- Coders.Clear();
- BindPairs.Clear();
- InStreams.Clear();
- OutStreams.Clear();
+ FOR_VECTOR (i, Bonds)
+ if (Bonds[i].PackIndex == packStream)
+ return i;
+ return -1;
}
- /*
- UInt32 GetCoderStartOutStream(UInt32 coderIndex) const
+ int FindBond_for_UnpackStream(UInt32 unpackStream) const
{
- UInt32 numOutStreams = 0;
- for (UInt32 i = 0; i < coderIndex; i++)
- numOutStreams += Coders[i].NumOutStreams;
- return numOutStreams;
+ FOR_VECTOR (i, Bonds)
+ if (Bonds[i].UnpackIndex == unpackStream)
+ return i;
+ return -1;
}
- */
-
- void GetNumStreams(UInt32 &numInStreams, UInt32 &numOutStreams) const
+ bool SetUnpackCoder()
{
- numInStreams = 0;
- numOutStreams = 0;
- for (int i = 0; i < Coders.Size(); i++)
+ bool isOk = false;
+ FOR_VECTOR(i, Coders)
{
- const CCoderStreamsInfo &coderStreamsInfo = Coders[i];
- numInStreams += coderStreamsInfo.NumInStreams;
- numOutStreams += coderStreamsInfo.NumOutStreams;
+ if (FindBond_for_UnpackStream(i) < 0)
+ {
+ if (isOk)
+ return false;
+ UnpackCoder = i;
+ isOk = true;
+ }
}
+ return isOk;
}
-
- int FindBinderForInStream(UInt32 inStream) const
+
+ bool IsStream_in_PackStreams(UInt32 streamIndex) const
{
- for (int i = 0; i < BindPairs.Size(); i++)
- if (BindPairs[i].InIndex == inStream)
- return i;
- return -1;
+ return FindStream_in_PackStreams(streamIndex) >= 0;
}
- int FindBinderForOutStream(UInt32 outStream) const
+
+ int FindStream_in_PackStreams(UInt32 streamIndex) const
{
- for (int i = 0; i < BindPairs.Size(); i++)
- if (BindPairs[i].OutIndex == outStream)
+ FOR_VECTOR(i, PackStreams)
+ if (PackStreams[i] == streamIndex)
return i;
return -1;
}
- UInt32 GetCoderInStreamIndex(UInt32 coderIndex) const
+
+ // that function is used before Maps is calculated
+
+ UInt32 GetStream_for_Coder(UInt32 coderIndex) const
{
UInt32 streamIndex = 0;
for (UInt32 i = 0; i < coderIndex; i++)
- streamIndex += Coders[i].NumInStreams;
+ streamIndex += Coders[i].NumStreams;
return streamIndex;
}
+
+ // ---------- Maps Section ----------
+
+ CRecordVector<UInt32> Coder_to_Stream;
+ CRecordVector<UInt32> Stream_to_Coder;
+
+ void ClearMaps();
+ bool CalcMapsAndCheck();
+
+ // ---------- End of Maps Section ----------
- UInt32 GetCoderOutStreamIndex(UInt32 coderIndex) const
+ void Clear()
{
- UInt32 streamIndex = 0;
- for (UInt32 i = 0; i < coderIndex; i++)
- streamIndex += Coders[i].NumOutStreams;
- return streamIndex;
+ Coders.Clear();
+ Bonds.Clear();
+ PackStreams.Clear();
+
+ ClearMaps();
}
+
+ void GetCoder_for_Stream(UInt32 streamIndex, UInt32 &coderIndex, UInt32 &coderStreamIndex) const
+ {
+ coderIndex = Stream_to_Coder[streamIndex];
+ coderStreamIndex = streamIndex - Coder_to_Stream[coderIndex];
+ }
+};
- void FindInStream(UInt32 streamIndex, UInt32 &coderIndex,
- UInt32 &coderStreamIndex) const
+
+class CCoder
+{
+ CLASS_NO_COPY(CCoder);
+public:
+ CMyComPtr<ICompressCoder> Coder;
+ CMyComPtr<ICompressCoder2> Coder2;
+ UInt32 NumStreams;
+
+ UInt64 UnpackSize;
+ const UInt64 *UnpackSizePointer;
+
+ CRecordVector<UInt64> PackSizes;
+ CRecordVector<const UInt64 *> PackSizePointers;
+
+ CCoder() {}
+
+ void SetCoderInfo(const UInt64 *unpackSize, const UInt64 * const *packSizes);
+
+ IUnknown *GetUnknown() const
{
- for (coderIndex = 0; coderIndex < (UInt32)Coders.Size(); coderIndex++)
- {
- UInt32 curSize = Coders[coderIndex].NumInStreams;
- if (streamIndex < curSize)
- {
- coderStreamIndex = streamIndex;
- return;
- }
- streamIndex -= curSize;
- }
- throw 1;
+ return Coder ? (IUnknown *)Coder : (IUnknown *)Coder2;
}
- void FindOutStream(UInt32 streamIndex, UInt32 &coderIndex,
- UInt32 &coderStreamIndex) const
+
+ HRESULT QueryInterface(REFGUID iid, void** pp) const
{
- for (coderIndex = 0; coderIndex < (UInt32)Coders.Size(); coderIndex++)
- {
- UInt32 curSize = Coders[coderIndex].NumOutStreams;
- if (streamIndex < curSize)
+ return GetUnknown()->QueryInterface(iid, pp);
+ }
+};
+
+
+
+class CMixer
+{
+ bool Is_PackSize_Correct_for_Stream(UInt32 streamIndex);
+
+protected:
+ CBindInfo _bi;
+
+ int FindBond_for_Stream(bool forInputStream, UInt32 streamIndex) const
+ {
+ if (EncodeMode == forInputStream)
+ return _bi.FindBond_for_UnpackStream(streamIndex);
+ else
+ return _bi.FindBond_for_PackStream(streamIndex);
+ }
+
+ CBoolVector IsFilter_Vector;
+ CBoolVector IsExternal_Vector;
+ bool EncodeMode;
+public:
+ unsigned MainCoderIndex;
+
+ CMixer(bool encodeMode):
+ EncodeMode(encodeMode),
+ MainCoderIndex(0)
+ {}
+
+ /*
+ Sequence of calling:
+
+ SetBindInfo();
+ for each coder
+ AddCoder();
+ SelectMainCoder();
+
+ for each file
{
- coderStreamIndex = streamIndex;
- return;
+ ReInit()
+ for each coder
+ SetCoderInfo();
+ Code();
}
- streamIndex -= curSize;
- }
- throw 1;
+ */
+
+ virtual HRESULT SetBindInfo(const CBindInfo &bindInfo)
+ {
+ _bi = bindInfo;
+ IsFilter_Vector.Clear();
+ MainCoderIndex = 0;
+ return S_OK;
}
+
+ virtual void AddCoder(const CCreatedCoder &cod) = 0;
+ virtual CCoder &GetCoder(unsigned index) = 0;
+ virtual void SelectMainCoder(bool useFirst) = 0;
+ virtual void ReInit() = 0;
+ virtual void SetCoderInfo(unsigned coderIndex, const UInt64 *unpackSize, const UInt64 * const *packSizes) = 0;
+ virtual HRESULT Code(
+ ISequentialInStream * const *inStreams,
+ ISequentialOutStream * const *outStreams,
+ ICompressProgressInfo *progress) = 0;
+ virtual UInt64 GetBondStreamSize(unsigned bondIndex) const = 0;
+
+ bool Is_UnpackSize_Correct_for_Coder(UInt32 coderIndex);
+ bool Is_PackSize_Correct_for_Coder(UInt32 coderIndex);
+ bool IsThere_ExternalCoder_in_PackTree(UInt32 coderIndex);
};
-class CBindReverseConverter
+
+
+
+#ifdef USE_MIXER_ST
+
+struct CCoderST: public CCoder
{
- UInt32 _numSrcOutStreams;
- NCoderMixer::CBindInfo _srcBindInfo;
- CRecordVector<UInt32> _srcInToDestOutMap;
- CRecordVector<UInt32> _srcOutToDestInMap;
- CRecordVector<UInt32> _destInToSrcOutMap;
-public:
- UInt32 NumSrcInStreams;
- CRecordVector<UInt32> DestOutToSrcInMap;
+ bool CanRead;
+ bool CanWrite;
+
+ CCoderST(): CanRead(false), CanWrite(false) {}
+};
- CBindReverseConverter(const NCoderMixer::CBindInfo &srcBindInfo);
- void CreateReverseBindInfo(NCoderMixer::CBindInfo &destBindInfo);
+
+struct CStBinderStream
+{
+ CSequentialInStreamCalcSize *InStreamSpec;
+ COutStreamCalcSize *OutStreamSpec;
+ CMyComPtr<IUnknown> StreamRef;
+
+ CStBinderStream(): InStreamSpec(NULL), OutStreamSpec(NULL) {}
};
-struct CCoderInfo2
+
+class CMixerST:
+ public IUnknown,
+ public CMixer,
+ public CMyUnknownImp
{
- CMyComPtr<ICompressCoder> Coder;
- CMyComPtr<ICompressCoder2> Coder2;
- UInt32 NumInStreams;
- UInt32 NumOutStreams;
+ HRESULT GetInStream2(ISequentialInStream * const *inStreams, /* const UInt64 * const *inSizes, */
+ UInt32 outStreamIndex, ISequentialInStream **inStreamRes);
+ HRESULT GetInStream(ISequentialInStream * const *inStreams, /* const UInt64 * const *inSizes, */
+ UInt32 inStreamIndex, ISequentialInStream **inStreamRes);
+ HRESULT GetOutStream(ISequentialOutStream * const *outStreams, /* const UInt64 * const *outSizes, */
+ UInt32 outStreamIndex, ISequentialOutStream **outStreamRes);
- CRecordVector<UInt64> InSizes;
- CRecordVector<UInt64> OutSizes;
- CRecordVector<const UInt64 *> InSizePointers;
- CRecordVector<const UInt64 *> OutSizePointers;
+ HRESULT FinishStream(UInt32 streamIndex);
+ HRESULT FinishCoder(UInt32 coderIndex);
- CCoderInfo2(UInt32 numInStreams, UInt32 numOutStreams);
- void SetCoderInfo(const UInt64 **inSizes, const UInt64 **outSizes);
+public:
+ CObjectVector<CCoderST> _coders;
+
+ CObjectVector<CStBinderStream> _binderStreams;
- HRESULT QueryInterface(REFGUID iid, void** pp) const
+ MY_UNKNOWN_IMP
+
+ CMixerST(bool encodeMode);
+ ~CMixerST();
+
+ virtual void AddCoder(const CCreatedCoder &cod);
+ virtual CCoder &GetCoder(unsigned index);
+ virtual void SelectMainCoder(bool useFirst);
+ virtual void ReInit();
+ virtual void SetCoderInfo(unsigned coderIndex, const UInt64 *unpackSize, const UInt64 * const *packSizes)
+ { _coders[coderIndex].SetCoderInfo(unpackSize, packSizes); }
+ virtual HRESULT Code(
+ ISequentialInStream * const *inStreams,
+ ISequentialOutStream * const *outStreams,
+ ICompressProgressInfo *progress);
+ virtual UInt64 GetBondStreamSize(unsigned bondIndex) const;
+
+ HRESULT GetMainUnpackStream(
+ ISequentialInStream * const *inStreams,
+ ISequentialInStream **inStreamRes);
+};
+
+#endif
+
+
+
+
+#ifdef USE_MIXER_MT
+
+class CCoderMT: public CCoder, public CVirtThread
+{
+ CLASS_NO_COPY(CCoderMT)
+ CRecordVector<ISequentialInStream*> InStreamPointers;
+ CRecordVector<ISequentialOutStream*> OutStreamPointers;
+
+private:
+ void Execute();
+public:
+ bool EncodeMode;
+ HRESULT Result;
+ CObjectVector< CMyComPtr<ISequentialInStream> > InStreams;
+ CObjectVector< CMyComPtr<ISequentialOutStream> > OutStreams;
+
+ void Release()
{
- IUnknown *p = Coder ? (IUnknown *)Coder : (IUnknown *)Coder2;
- return p->QueryInterface(iid, pp);
+ InStreamPointers.Clear();
+ OutStreamPointers.Clear();
+ unsigned i;
+ for (i = 0; i < InStreams.Size(); i++)
+ InStreams[i].Release();
+ for (i = 0; i < OutStreams.Size(); i++)
+ OutStreams[i].Release();
}
+
+ class CReleaser
+ {
+ CLASS_NO_COPY(CReleaser)
+ CCoderMT &_c;
+ public:
+ CReleaser(CCoderMT &c): _c(c) {}
+ ~CReleaser() { _c.Release(); }
+ };
+
+ CCoderMT(): EncodeMode(false) {}
+ ~CCoderMT() { CVirtThread::WaitThreadFinish(); }
+
+ void Code(ICompressProgressInfo *progress);
};
-class CCoderMixer2
+
+class CMixerMT:
+ public IUnknown,
+ public CMixer,
+ public CMyUnknownImp
{
+ CObjectVector<CStreamBinder> _streamBinders;
+
+ HRESULT Init(ISequentialInStream * const *inStreams, ISequentialOutStream * const *outStreams);
+ HRESULT ReturnIfError(HRESULT code);
+
public:
- virtual HRESULT SetBindInfo(const CBindInfo &bindInfo) = 0;
- virtual void ReInit() = 0;
- virtual void SetCoderInfo(UInt32 coderIndex, const UInt64 **inSizes, const UInt64 **outSizes) = 0;
+ CObjectVector<CCoderMT> _coders;
+
+ MY_UNKNOWN_IMP
+
+ virtual HRESULT SetBindInfo(const CBindInfo &bindInfo);
+ virtual void AddCoder(const CCreatedCoder &cod);
+ virtual CCoder &GetCoder(unsigned index);
+ virtual void SelectMainCoder(bool useFirst);
+ virtual void ReInit();
+ virtual void SetCoderInfo(unsigned coderIndex, const UInt64 *unpackSize, const UInt64 * const *packSizes)
+ { _coders[coderIndex].SetCoderInfo(unpackSize, packSizes); }
+ virtual HRESULT Code(
+ ISequentialInStream * const *inStreams,
+ ISequentialOutStream * const *outStreams,
+ ICompressProgressInfo *progress);
+ virtual UInt64 GetBondStreamSize(unsigned bondIndex) const;
+
+ CMixerMT(bool encodeMode): CMixer(encodeMode) {}
};
-}
#endif
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2MT.cpp b/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2MT.cpp
deleted file mode 100644
index 87686e858e9..00000000000
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2MT.cpp
+++ /dev/null
@@ -1,240 +0,0 @@
-// CoderMixer2MT.cpp
-
-#include "StdAfx.h"
-
-#include "CoderMixer2MT.h"
-
-namespace NCoderMixer {
-
-CCoder2::CCoder2(UInt32 numInStreams, UInt32 numOutStreams):
- CCoderInfo2(numInStreams, numOutStreams)
-{
- InStreams.Reserve(NumInStreams);
- InStreamPointers.Reserve(NumInStreams);
- OutStreams.Reserve(NumOutStreams);
- OutStreamPointers.Reserve(NumOutStreams);
-}
-
-void CCoder2::Execute() { Code(NULL); }
-
-void CCoder2::Code(ICompressProgressInfo *progress)
-{
- InStreamPointers.Clear();
- OutStreamPointers.Clear();
- UInt32 i;
- for (i = 0; i < NumInStreams; i++)
- {
- if (InSizePointers[i] != NULL)
- InSizePointers[i] = &InSizes[i];
- InStreamPointers.Add((ISequentialInStream *)InStreams[i]);
- }
- for (i = 0; i < NumOutStreams; i++)
- {
- if (OutSizePointers[i] != NULL)
- OutSizePointers[i] = &OutSizes[i];
- OutStreamPointers.Add((ISequentialOutStream *)OutStreams[i]);
- }
- if (Coder)
- Result = Coder->Code(InStreamPointers[0], OutStreamPointers[0],
- InSizePointers[0], OutSizePointers[0], progress);
- else
- Result = Coder2->Code(&InStreamPointers.Front(), &InSizePointers.Front(), NumInStreams,
- &OutStreamPointers.Front(), &OutSizePointers.Front(), NumOutStreams, progress);
- {
- int i;
- for (i = 0; i < InStreams.Size(); i++)
- InStreams[i].Release();
- for (i = 0; i < OutStreams.Size(); i++)
- OutStreams[i].Release();
- }
-}
-
-static void SetSizes(const UInt64 **srcSizes, CRecordVector<UInt64> &sizes,
- CRecordVector<const UInt64 *> &sizePointers, UInt32 numItems)
-{
- sizes.Clear();
- sizePointers.Clear();
- for (UInt32 i = 0; i < numItems; i++)
- {
- if (srcSizes == 0 || srcSizes[i] == NULL)
- {
- sizes.Add(0);
- sizePointers.Add(NULL);
- }
- else
- {
- sizes.Add(*srcSizes[i]);
- sizePointers.Add(&sizes.Back());
- }
- }
-}
-
-
-void CCoder2::SetCoderInfo(const UInt64 **inSizes, const UInt64 **outSizes)
-{
- SetSizes(inSizes, InSizes, InSizePointers, NumInStreams);
- SetSizes(outSizes, OutSizes, OutSizePointers, NumOutStreams);
-}
-
-//////////////////////////////////////
-// CCoderMixer2MT
-
-HRESULT CCoderMixer2MT::SetBindInfo(const CBindInfo &bindInfo)
-{
- _bindInfo = bindInfo;
- _streamBinders.Clear();
- for (int i = 0; i < _bindInfo.BindPairs.Size(); i++)
- {
- _streamBinders.Add(CStreamBinder());
- RINOK(_streamBinders.Back().CreateEvents());
- }
- return S_OK;
-}
-
-void CCoderMixer2MT::AddCoderCommon()
-{
- const CCoderStreamsInfo &c = _bindInfo.Coders[_coders.Size()];
- CCoder2 threadCoderInfo(c.NumInStreams, c.NumOutStreams);
- _coders.Add(threadCoderInfo);
-}
-
-void CCoderMixer2MT::AddCoder(ICompressCoder *coder)
-{
- AddCoderCommon();
- _coders.Back().Coder = coder;
-}
-
-void CCoderMixer2MT::AddCoder2(ICompressCoder2 *coder)
-{
- AddCoderCommon();
- _coders.Back().Coder2 = coder;
-}
-
-
-void CCoderMixer2MT::ReInit()
-{
- for (int i = 0; i < _streamBinders.Size(); i++)
- _streamBinders[i].ReInit();
-}
-
-
-HRESULT CCoderMixer2MT::Init(ISequentialInStream **inStreams, ISequentialOutStream **outStreams)
-{
- /*
- if (_coders.Size() != _bindInfo.Coders.Size())
- throw 0;
- */
- int i;
- for (i = 0; i < _coders.Size(); i++)
- {
- CCoder2 &coderInfo = _coders[i];
- const CCoderStreamsInfo &coderStreamsInfo = _bindInfo.Coders[i];
- coderInfo.InStreams.Clear();
- UInt32 j;
- for (j = 0; j < coderStreamsInfo.NumInStreams; j++)
- coderInfo.InStreams.Add(NULL);
- coderInfo.OutStreams.Clear();
- for (j = 0; j < coderStreamsInfo.NumOutStreams; j++)
- coderInfo.OutStreams.Add(NULL);
- }
-
- for (i = 0; i < _bindInfo.BindPairs.Size(); i++)
- {
- const CBindPair &bindPair = _bindInfo.BindPairs[i];
- UInt32 inCoderIndex, inCoderStreamIndex;
- UInt32 outCoderIndex, outCoderStreamIndex;
- _bindInfo.FindInStream(bindPair.InIndex, inCoderIndex, inCoderStreamIndex);
- _bindInfo.FindOutStream(bindPair.OutIndex, outCoderIndex, outCoderStreamIndex);
-
- _streamBinders[i].CreateStreams(
- &_coders[inCoderIndex].InStreams[inCoderStreamIndex],
- &_coders[outCoderIndex].OutStreams[outCoderStreamIndex]);
-
- CMyComPtr<ICompressSetBufSize> inSetSize, outSetSize;
- _coders[inCoderIndex].QueryInterface(IID_ICompressSetBufSize, (void **)&inSetSize);
- _coders[outCoderIndex].QueryInterface(IID_ICompressSetBufSize, (void **)&outSetSize);
- if (inSetSize && outSetSize)
- {
- const UInt32 kBufSize = 1 << 19;
- inSetSize->SetInBufSize(inCoderStreamIndex, kBufSize);
- outSetSize->SetOutBufSize(outCoderStreamIndex, kBufSize);
- }
- }
-
- for (i = 0; i < _bindInfo.InStreams.Size(); i++)
- {
- UInt32 inCoderIndex, inCoderStreamIndex;
- _bindInfo.FindInStream(_bindInfo.InStreams[i], inCoderIndex, inCoderStreamIndex);
- _coders[inCoderIndex].InStreams[inCoderStreamIndex] = inStreams[i];
- }
-
- for (i = 0; i < _bindInfo.OutStreams.Size(); i++)
- {
- UInt32 outCoderIndex, outCoderStreamIndex;
- _bindInfo.FindOutStream(_bindInfo.OutStreams[i], outCoderIndex, outCoderStreamIndex);
- _coders[outCoderIndex].OutStreams[outCoderStreamIndex] = outStreams[i];
- }
- return S_OK;
-}
-
-HRESULT CCoderMixer2MT::ReturnIfError(HRESULT code)
-{
- for (int i = 0; i < _coders.Size(); i++)
- if (_coders[i].Result == code)
- return code;
- return S_OK;
-}
-
-STDMETHODIMP CCoderMixer2MT::Code(ISequentialInStream **inStreams,
- const UInt64 ** /* inSizes */,
- UInt32 numInStreams,
- ISequentialOutStream **outStreams,
- const UInt64 ** /* outSizes */,
- UInt32 numOutStreams,
- ICompressProgressInfo *progress)
-{
- if (numInStreams != (UInt32)_bindInfo.InStreams.Size() ||
- numOutStreams != (UInt32)_bindInfo.OutStreams.Size())
- return E_INVALIDARG;
-
- Init(inStreams, outStreams);
-
- int i;
- for (i = 0; i < _coders.Size(); i++)
- if (i != _progressCoderIndex)
- {
- RINOK(_coders[i].Create());
- }
-
- for (i = 0; i < _coders.Size(); i++)
- if (i != _progressCoderIndex)
- _coders[i].Start();
-
- _coders[_progressCoderIndex].Code(progress);
-
- for (i = 0; i < _coders.Size(); i++)
- if (i != _progressCoderIndex)
- _coders[i].WaitExecuteFinish();
-
- RINOK(ReturnIfError(E_ABORT));
- RINOK(ReturnIfError(E_OUTOFMEMORY));
-
- for (i = 0; i < _coders.Size(); i++)
- {
- HRESULT result = _coders[i].Result;
- if (result != S_OK && result != E_FAIL && result != S_FALSE)
- return result;
- }
-
- RINOK(ReturnIfError(S_FALSE));
-
- for (i = 0; i < _coders.Size(); i++)
- {
- HRESULT result = _coders[i].Result;
- if (result != S_OK)
- return result;
- }
- return S_OK;
-}
-
-}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2MT.h b/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2MT.h
deleted file mode 100644
index 81bb3f0bba9..00000000000
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/CoderMixer2MT.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// CoderMixer2MT.h
-
-#ifndef __CODER_MIXER2_MT_H
-#define __CODER_MIXER2_MT_H
-
-#include "CoderMixer2.h"
-#include "../../../Common/MyCom.h"
-#include "../../Common/StreamBinder.h"
-#include "../../Common/VirtThread.h"
-
-namespace NCoderMixer {
-
-struct CCoder2: public CCoderInfo2, public CVirtThread
-{
- HRESULT Result;
- CObjectVector< CMyComPtr<ISequentialInStream> > InStreams;
- CObjectVector< CMyComPtr<ISequentialOutStream> > OutStreams;
- CRecordVector<ISequentialInStream*> InStreamPointers;
- CRecordVector<ISequentialOutStream*> OutStreamPointers;
-
- CCoder2(UInt32 numInStreams, UInt32 numOutStreams);
- ~CCoder2() { CVirtThread::WaitThreadFinish(); }
- void SetCoderInfo(const UInt64 **inSizes, const UInt64 **outSizes);
- virtual void Execute();
- void Code(ICompressProgressInfo *progress);
-};
-
-
-/*
- SetBindInfo()
- for each coder
- AddCoder[2]()
- SetProgressIndex(UInt32 coderIndex);
-
- for each file
- {
- ReInit()
- for each coder
- SetCoderInfo
- Code
- }
-*/
-
-class CCoderMixer2MT:
- public ICompressCoder2,
- public CCoderMixer2,
- public CMyUnknownImp
-{
- CBindInfo _bindInfo;
- CObjectVector<CStreamBinder> _streamBinders;
- int _progressCoderIndex;
-
- void AddCoderCommon();
- HRESULT Init(ISequentialInStream **inStreams, ISequentialOutStream **outStreams);
- HRESULT ReturnIfError(HRESULT code);
-public:
- CObjectVector<CCoder2> _coders;
- MY_UNKNOWN_IMP
-
- STDMETHOD(Code)(ISequentialInStream **inStreams,
- const UInt64 **inSizes,
- UInt32 numInStreams,
- ISequentialOutStream **outStreams,
- const UInt64 **outSizes,
- UInt32 numOutStreams,
- ICompressProgressInfo *progress);
-
- HRESULT SetBindInfo(const CBindInfo &bindInfo);
- void AddCoder(ICompressCoder *coder);
- void AddCoder2(ICompressCoder2 *coder);
- void SetProgressCoderIndex(int coderIndex) { _progressCoderIndex = coderIndex; }
-
- void ReInit();
- void SetCoderInfo(UInt32 coderIndex, const UInt64 **inSizes, const UInt64 **outSizes)
- { _coders[coderIndex].SetCoderInfo(inSizes, outSizes); }
- UInt64 GetWriteProcessedSize(UInt32 binderIndex) const
- { return _streamBinders[binderIndex].ProcessedSize; }
-};
-
-}
-#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/CrossThreadProgress.cpp b/3rdparty/lzma/CPP/7zip/Archive/Common/CrossThreadProgress.cpp
deleted file mode 100644
index a974b54c7e6..00000000000
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/CrossThreadProgress.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// CrossThreadProgress.cpp
-
-#include "StdAfx.h"
-
-#include "CrossThreadProgress.h"
-
-STDMETHODIMP CCrossThreadProgress::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize)
-{
- InSize = inSize;
- OutSize = outSize;
- ProgressEvent.Set();
- WaitEvent.Lock();
- return Result;
-}
-
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/CrossThreadProgress.h b/3rdparty/lzma/CPP/7zip/Archive/Common/CrossThreadProgress.h
deleted file mode 100644
index 7e0b10538f3..00000000000
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/CrossThreadProgress.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// CrossThreadProgress.h
-
-#ifndef __CROSSTHREADPROGRESS_H
-#define __CROSSTHREADPROGRESS_H
-
-#include "../../ICoder.h"
-#include "../../../Windows/Synchronization.h"
-#include "../../../Common/MyCom.h"
-
-class CCrossThreadProgress:
- public ICompressProgressInfo,
- public CMyUnknownImp
-{
-public:
- const UInt64 *InSize;
- const UInt64 *OutSize;
- HRESULT Result;
- NWindows::NSynchronization::CAutoResetEvent ProgressEvent;
- NWindows::NSynchronization::CAutoResetEvent WaitEvent;
-
- HRes Create()
- {
- RINOK(ProgressEvent.CreateIfNotCreated());
- return WaitEvent.CreateIfNotCreated();
- }
- void Init()
- {
- ProgressEvent.Reset();
- WaitEvent.Reset();
- }
-
- MY_UNKNOWN_IMP
-
- STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
-};
-
-#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp b/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp
index 54bcfec1108..7c4f54879de 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp
@@ -4,19 +4,14 @@
#include "DummyOutStream.h"
-STDMETHODIMP CDummyOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
+STDMETHODIMP CDummyOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
{
- UInt32 realProcessedSize;
- HRESULT result;
- if(!_stream)
- {
- realProcessedSize = size;
- result = S_OK;
- }
- else
- result = _stream->Write(data, size, &realProcessedSize);
+ UInt32 realProcessedSize = size;
+ HRESULT res = S_OK;
+ if (_stream)
+ res = _stream->Write(data, size, &realProcessedSize);
_size += realProcessedSize;
- if(processedSize != NULL)
+ if (processedSize)
*processedSize = realProcessedSize;
- return result;
+ return res;
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.h b/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.h
index 13d5b62ca78..b5a51fc0755 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.h
@@ -1,10 +1,11 @@
// DummyOutStream.h
-#ifndef __DUMMYOUTSTREAM_H
-#define __DUMMYOUTSTREAM_H
+#ifndef __DUMMY_OUT_STREAM_H
+#define __DUMMY_OUT_STREAM_H
+
+#include "../../../Common/MyCom.h"
#include "../../IStream.h"
-#include "Common/MyCom.h"
class CDummyOutStream:
public ISequentialOutStream,
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp b/3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp
index 7e6f460226a..95381ea31d6 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp
@@ -27,8 +27,9 @@ void CMultiMethodProps::SetGlobalLevelAndThreads(COneMethodInfo &oneMethodInfo
)
{
UInt32 level = _level;
- if (level != (UInt32)(UInt32)-1)
+ if (level != (UInt32)(Int32)-1)
SetMethodProp32(oneMethodInfo, NCoderPropID::kLevel, (UInt32)level);
+
#ifndef _7ZIP_ST
SetMethodProp32(oneMethodInfo, NCoderPropID::kNumThreads, numThreads);
#endif
@@ -40,7 +41,9 @@ void CMultiMethodProps::Init()
_numProcessors = _numThreads = NSystem::GetNumberOfProcessors();
#endif
- _level = (UInt32)(UInt32)-1;
+ _level = (UInt32)(Int32)-1;
+ _analysisLevel = -1;
+
_autoFilter = true;
_crcSize = 4;
_filterMethod.Clear();
@@ -50,18 +53,27 @@ void CMultiMethodProps::Init()
HRESULT CMultiMethodProps::SetProperty(const wchar_t *nameSpec, const PROPVARIANT &value)
{
UString name = nameSpec;
- name.MakeUpper();
+ name.MakeLower_Ascii();
if (name.IsEmpty())
return E_INVALIDARG;
- if (name[0] == 'X')
+ if (name[0] == 'x')
{
name.Delete(0);
_level = 9;
return ParsePropToUInt32(name, value, _level);
}
+
+ if (name.IsPrefixedBy_Ascii_NoCase("yx"))
+ {
+ name.Delete(0, 2);
+ UInt32 v = 9;
+ RINOK(ParsePropToUInt32(name, value, v));
+ _analysisLevel = (int)v;
+ return S_OK;
+ }
- if (name == L"CRC")
+ if (name.IsEqualTo("crc"))
{
name.Delete(0, 3);
_crcSize = 4;
@@ -70,24 +82,25 @@ HRESULT CMultiMethodProps::SetProperty(const wchar_t *nameSpec, const PROPVARIAN
UInt32 number;
int index = ParseStringToUInt32(name, number);
- UString realName = name.Mid(index);
+ UString realName = name.Ptr(index);
if (index == 0)
{
- if (name.Left(2).CompareNoCase(L"MT") == 0)
+ if (name.IsPrefixedBy_Ascii_NoCase("mt"))
{
#ifndef _7ZIP_ST
- RINOK(ParseMtProp(name.Mid(2), value, _numProcessors, _numThreads));
+ RINOK(ParseMtProp(name.Ptr(2), value, _numProcessors, _numThreads));
#endif
+
return S_OK;
}
- if (name.CompareNoCase(L"F") == 0)
+ if (name.IsEqualTo("f"))
{
HRESULT res = PROPVARIANT_to_bool(value, _autoFilter);
if (res == S_OK)
return res;
if (value.vt != VT_BSTR)
return E_INVALIDARG;
- return _filterMethod.ParseMethodFromPROPVARIANT(L"", value);
+ return _filterMethod.ParseMethodFromPROPVARIANT(UString(), value);
}
number = 0;
}
@@ -101,39 +114,42 @@ HRESULT CMultiMethodProps::SetProperty(const wchar_t *nameSpec, const PROPVARIAN
void CSingleMethodProps::Init()
{
Clear();
+ _level = (UInt32)(Int32)-1;
+
#ifndef _7ZIP_ST
_numProcessors = _numThreads = NWindows::NSystem::GetNumberOfProcessors();
- AddNumThreadsProp(_numThreads);
+ AddProp_NumThreads(_numThreads);
#endif
- _level = (UInt32)(UInt32)-1;
}
-HRESULT CSingleMethodProps::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps)
+HRESULT CSingleMethodProps::SetProperties(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps)
{
Init();
- for (int i = 0; i < numProps; i++)
+ for (UInt32 i = 0; i < numProps; i++)
{
UString name = names[i];
- name.MakeUpper();
+ name.MakeLower_Ascii();
if (name.IsEmpty())
return E_INVALIDARG;
const PROPVARIANT &value = values[i];
- if (name[0] == L'X')
+ if (name[0] == L'x')
{
UInt32 a = 9;
- RINOK(ParsePropToUInt32(name.Mid(1), value, a));
+ RINOK(ParsePropToUInt32(name.Ptr(1), value, a));
_level = a;
- AddLevelProp(a);
+ AddProp_Level(a);
}
- else if (name.Left(2).CompareNoCase(L"MT") == 0)
+ else if (name.IsPrefixedBy_Ascii_NoCase("mt"))
{
#ifndef _7ZIP_ST
- RINOK(ParseMtProp(name.Mid(2), value, _numProcessors, _numThreads));
- AddNumThreadsProp(_numThreads);
+ RINOK(ParseMtProp(name.Ptr(2), value, _numProcessors, _numThreads));
+ AddProp_NumThreads(_numThreads);
#endif
}
else
- return ParseParamsFromPROPVARIANT(name, value);
+ {
+ RINOK(ParseMethodFromPROPVARIANT(names[i], value));
+ }
}
return S_OK;
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.h b/3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.h
index d3c9a237ddc..5a18d9802b3 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.h
@@ -10,6 +10,7 @@ namespace NArchive {
class CMultiMethodProps
{
UInt32 _level;
+ int _analysisLevel;
public:
#ifndef _7ZIP_ST
UInt32 _numThreads;
@@ -27,16 +28,17 @@ public:
#endif
);
- int GetNumEmptyMethods() const
+ unsigned GetNumEmptyMethods() const
{
- int i;
+ unsigned i;
for (i = 0; i < _methods.Size(); i++)
if (!_methods[i].IsEmpty())
break;
return i;
}
- int GetLevel() const { return _level == (UInt32)(UInt32)-1 ? 5 : (int)_level; }
+ int GetLevel() const { return _level == (UInt32)(Int32)-1 ? 5 : (int)_level; }
+ int GetAnalysisLevel() const { return _analysisLevel; }
void Init();
@@ -44,20 +46,20 @@ public:
HRESULT SetProperty(const wchar_t *name, const PROPVARIANT &value);
};
-class CSingleMethodProps: public CMethodProps
+class CSingleMethodProps: public COneMethodInfo
{
UInt32 _level;
- void Init();
public:
#ifndef _7ZIP_ST
UInt32 _numThreads;
UInt32 _numProcessors;
#endif
+ void Init();
CSingleMethodProps() { Init(); }
- int GetLevel() const { return _level == (UInt32)(UInt32)-1 ? 5 : (int)_level; }
- HRESULT SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps);
+ int GetLevel() const { return _level == (UInt32)(Int32)-1 ? 5 : (int)_level; }
+ HRESULT SetProperties(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps);
};
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp b/3rdparty/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp
index 569a56f3bee..a2d68832838 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp
@@ -6,29 +6,33 @@
STDMETHODIMP CSequentialInStreamWithCRC::Read(void *data, UInt32 size, UInt32 *processedSize)
{
- UInt32 realProcessedSize;
- HRESULT result = _stream->Read(data, size, &realProcessedSize);
- _size += realProcessedSize;
- if (size > 0 && realProcessedSize == 0)
+ UInt32 realProcessed = 0;
+ HRESULT result = S_OK;
+ if (_stream)
+ result = _stream->Read(data, size, &realProcessed);
+ _size += realProcessed;
+ if (size != 0 && realProcessed == 0)
_wasFinished = true;
- _crc = CrcUpdate(_crc, data, realProcessedSize);
- if(processedSize != NULL)
- *processedSize = realProcessedSize;
+ _crc = CrcUpdate(_crc, data, realProcessed);
+ if (processedSize)
+ *processedSize = realProcessed;
return result;
}
STDMETHODIMP CInStreamWithCRC::Read(void *data, UInt32 size, UInt32 *processedSize)
{
- UInt32 realProcessedSize;
- HRESULT result = _stream->Read(data, size, &realProcessedSize);
+ UInt32 realProcessed = 0;
+ HRESULT result = S_OK;
+ if (_stream)
+ result = _stream->Read(data, size, &realProcessed);
+ _size += realProcessed;
/*
- if (size > 0 && realProcessedSize == 0)
+ if (size != 0 && realProcessed == 0)
_wasFinished = true;
*/
- _size += realProcessedSize;
- _crc = CrcUpdate(_crc, data, realProcessedSize);
- if(processedSize != NULL)
- *processedSize = realProcessedSize;
+ _crc = CrcUpdate(_crc, data, realProcessed);
+ if (processedSize)
+ *processedSize = realProcessed;
return result;
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp b/3rdparty/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp
index cc476fadd9d..7cd3037be50 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp
@@ -2,8 +2,6 @@
#include "StdAfx.h"
-#include "../../../../C/Types.h"
-
#include "ItemNameUtils.h"
namespace NArchive {
@@ -12,6 +10,21 @@ namespace NItemName {
static const wchar_t kOSDirDelimiter = WCHAR_PATH_SEPARATOR;
static const wchar_t kDirDelimiter = L'/';
+void ReplaceToOsPathSeparator(wchar_t *s)
+{
+ #ifdef _WIN32
+ for (;;)
+ {
+ wchar_t c = *s;
+ if (c == 0)
+ break;
+ if (c == kDirDelimiter)
+ *s = kOSDirDelimiter;
+ s++;
+ }
+ #endif
+}
+
UString MakeLegalName(const UString &name)
{
UString zipName = name;
@@ -36,15 +49,29 @@ UString GetOSName2(const UString &name)
return newName;
}
-bool HasTailSlash(const AString &name, UINT codePage)
+void ConvertToOSName2(UString &name)
+{
+ if (!name.IsEmpty())
+ {
+ name.Replace(kDirDelimiter, kOSDirDelimiter);
+ if (name.Back() == kOSDirDelimiter)
+ name.DeleteBack();
+ }
+}
+
+bool HasTailSlash(const AString &name, UINT
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ codePage
+ #endif
+ )
{
if (name.IsEmpty())
return false;
LPCSTR prev =
#if defined(_WIN32) && !defined(UNDER_CE)
- CharPrevExA((WORD)codePage, name, &name[name.Length()], 0);
+ CharPrevExA((WORD)codePage, name, &name[name.Len()], 0);
#else
- (LPCSTR)(name) + (name.Length() - 1);
+ (LPCSTR)(name) + (name.Len() - 1);
#endif
return (*prev == '/');
}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h b/3rdparty/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h
index 5eafacb12e0..d0dc76a4109 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h
@@ -1,16 +1,19 @@
// Archive/Common/ItemNameUtils.h
-#ifndef __ARCHIVE_ITEMNAMEUTILS_H
-#define __ARCHIVE_ITEMNAMEUTILS_H
+#ifndef __ARCHIVE_ITEM_NAME_UTILS_H
+#define __ARCHIVE_ITEM_NAME_UTILS_H
#include "../../../Common/MyString.h"
namespace NArchive {
namespace NItemName {
+ void ReplaceToOsPathSeparator(wchar_t *s);
+
UString MakeLegalName(const UString &name);
UString GetOSName(const UString &name);
UString GetOSName2(const UString &name);
+ void ConvertToOSName2(UString &name);
bool HasTailSlash(const AString &name, UINT codePage);
#ifdef _WIN32
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/MultiStream.cpp b/3rdparty/lzma/CPP/7zip/Archive/Common/MultiStream.cpp
index 04d11cafb43..1de74afe43e 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/MultiStream.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/MultiStream.cpp
@@ -11,10 +11,10 @@ STDMETHODIMP CMultiStream::Read(void *data, UInt32 size, UInt32 *processedSize)
if (size == 0)
return S_OK;
if (_pos >= _totalLength)
- return (_pos == _totalLength) ? S_OK : E_FAIL;
+ return S_OK;
{
- int left = 0, mid = _streamIndex, right = Streams.Size();
+ unsigned left = 0, mid = _streamIndex, right = Streams.Size();
for (;;)
{
CSubStreamInfo &m = Streams[mid];
@@ -51,15 +51,18 @@ STDMETHODIMP CMultiStream::Read(void *data, UInt32 size, UInt32 *processedSize)
STDMETHODIMP CMultiStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
{
- switch(seekOrigin)
+ switch (seekOrigin)
{
- case STREAM_SEEK_SET: _pos = offset; break;
- case STREAM_SEEK_CUR: _pos = _pos + offset; break;
- case STREAM_SEEK_END: _pos = _totalLength + offset; break;
+ case STREAM_SEEK_SET: break;
+ case STREAM_SEEK_CUR: offset += _pos; break;
+ case STREAM_SEEK_END: offset += _totalLength; break;
default: return STG_E_INVALIDFUNCTION;
}
- if (newPosition != 0)
- *newPosition = _pos;
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _pos = offset;
+ if (newPosition)
+ *newPosition = offset;
return S_OK;
}
@@ -69,7 +72,7 @@ class COutVolumeStream:
public ISequentialOutStream,
public CMyUnknownImp
{
- int _volIndex;
+ unsigned _volIndex;
UInt64 _volSize;
UInt64 _curPos;
CMyComPtr<ISequentialOutStream> _volumeStream;
@@ -116,9 +119,9 @@ HRESULT COutVolumeStream::Flush()
/*
STDMETHODIMP COutMultiStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
{
- if(processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
- while(size > 0)
+ while (size > 0)
{
if (_streamIndex >= Streams.Size())
{
@@ -154,7 +157,7 @@ STDMETHODIMP COutMultiStream::Write(const void *data, UInt32 size, UInt32 *proce
_absPos += realProcessed;
if (_absPos > _length)
_length = _absPos;
- if(processedSize != NULL)
+ if (processedSize)
*processedSize += realProcessed;
if (subStream.Pos == subStream.Size)
{
@@ -169,22 +172,20 @@ STDMETHODIMP COutMultiStream::Write(const void *data, UInt32 size, UInt32 *proce
STDMETHODIMP COutMultiStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
{
- if(seekOrigin >= 3)
- return STG_E_INVALIDFUNCTION;
- switch(seekOrigin)
+ switch (seekOrigin)
{
- case STREAM_SEEK_SET:
- _absPos = offset;
- break;
- case STREAM_SEEK_CUR:
- _absPos += offset;
- break;
- case STREAM_SEEK_END:
- _absPos = _length + offset;
- break;
+ case STREAM_SEEK_SET: break;
+ case STREAM_SEEK_CUR: offset += _absPos; break;
+ case STREAM_SEEK_END: offset += _length; break;
+ default: return STG_E_INVALIDFUNCTION;
}
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _absPos = offset;
_offsetPos = _absPos;
_streamIndex = 0;
+ if (newPosition)
+ *newPosition = offset;
return S_OK;
}
*/
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/MultiStream.h b/3rdparty/lzma/CPP/7zip/Archive/Common/MultiStream.h
index 3fceb7ccee5..c10cd455729 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/MultiStream.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/MultiStream.h
@@ -14,21 +14,26 @@ class CMultiStream:
{
UInt64 _pos;
UInt64 _totalLength;
- int _streamIndex;
+ unsigned _streamIndex;
+
public:
+
struct CSubStreamInfo
{
CMyComPtr<IInStream> Stream;
UInt64 Size;
UInt64 GlobalOffset;
UInt64 LocalPos;
+
+ CSubStreamInfo(): Size(0), GlobalOffset(0), LocalPos(0) {}
};
+
CObjectVector<CSubStreamInfo> Streams;
HRESULT Init()
{
UInt64 total = 0;
- for (int i = 0; i < Streams.Size(); i++)
+ FOR_VECTOR (i, Streams)
{
CSubStreamInfo &s = Streams[i];
s.GlobalOffset = total;
@@ -52,7 +57,7 @@ class COutMultiStream:
public IOutStream,
public CMyUnknownImp
{
- int _streamIndex; // required stream
+ unsigned _streamIndex; // required stream
UInt64 _offsetPos; // offset from start of _streamIndex index
UInt64 _absPos;
UInt64 _length;
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h b/3rdparty/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h
index 115b442aa3d..09b899bbd74 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h
@@ -28,6 +28,7 @@ public:
_calculate = calculate;
_crc = CRC_INIT_VAL;
}
+ void EnableCalc(bool calculate) { _calculate = calculate; }
void InitCRC() { _crc = CRC_INIT_VAL; }
UInt64 GetSize() const { return _size; }
UInt32 GetCRC() const { return CRC_GET_DIGEST(_crc); }
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/StdAfx.h b/3rdparty/lzma/CPP/7zip/Archive/Common/StdAfx.h
index 2e4be10b291..2854ff3e935 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/Common/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/Common/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../../Common/MyWindows.h"
-#include "../../../Common/NewHandler.h"
+#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/DllExports2.cpp b/3rdparty/lzma/CPP/7zip/Archive/DllExports2.cpp
index ad14ff06a94..10889e75521 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/DllExports2.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/DllExports2.cpp
@@ -1,10 +1,12 @@
-// DLLExports.cpp
+// DLLExports2.cpp
#include "StdAfx.h"
+#include "../../Common/MyWindows.h"
+
#include "../../Common/MyInitGuid.h"
-#if defined(_WIN32) && defined(_7ZIP_LARGE_PAGES)
+#if defined(_7ZIP_LARGE_PAGES)
#include "../../../C/Alloc.h"
#endif
@@ -16,12 +18,15 @@
#include "../ICoder.h"
#include "../IPassword.h"
+#include "../Common/CreateCoder.h"
+
#include "IArchive.h"
HINSTANCE g_hInstance;
#define NT_CHECK_FAIL_ACTION return FALSE;
+#ifdef _WIN32
extern "C"
BOOL WINAPI DllMain(
#ifdef UNDER_CE
@@ -33,42 +38,85 @@ BOOL WINAPI DllMain(
{
if (dwReason == DLL_PROCESS_ATTACH)
{
+ // OutputDebugStringA("7z.dll DLL_PROCESS_ATTACH");
g_hInstance = (HINSTANCE)hInstance;
NT_CHECK;
}
+ /*
+ if (dwReason == DLL_PROCESS_DETACH)
+ {
+ OutputDebugStringA("7z.dll DLL_PROCESS_DETACH");
+ }
+ */
return TRUE;
}
+#endif
DEFINE_GUID(CLSID_CArchiveHandler,
-0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00);
-
-static const UInt16 kDecodeId = 0x2790;
-
-DEFINE_GUID(CLSID_CCodec,
-0x23170F69, 0x40C1, kDecodeId, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+ k_7zip_GUID_Data1,
+ k_7zip_GUID_Data2,
+ k_7zip_GUID_Data3_Common,
+ 0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00);
STDAPI CreateCoder(const GUID *clsid, const GUID *iid, void **outObject);
-STDAPI CreateArchiver(const GUID *classID, const GUID *iid, void **outObject);
+STDAPI CreateHasher(const GUID *clsid, IHasher **hasher);
+STDAPI CreateArchiver(const GUID *clsid, const GUID *iid, void **outObject);
STDAPI CreateObject(const GUID *clsid, const GUID *iid, void **outObject)
{
// COM_TRY_BEGIN
*outObject = 0;
- if (*iid == IID_ICompressCoder || *iid == IID_ICompressCoder2 || *iid == IID_ICompressFilter)
- {
+ if (*iid == IID_ICompressCoder ||
+ *iid == IID_ICompressCoder2 ||
+ *iid == IID_ICompressFilter)
return CreateCoder(clsid, iid, outObject);
- }
- else
- {
- return CreateArchiver(clsid, iid, outObject);
- }
+ if (*iid == IID_IHasher)
+ return CreateHasher(clsid, (IHasher **)outObject);
+ return CreateArchiver(clsid, iid, outObject);
// COM_TRY_END
}
STDAPI SetLargePageMode()
{
- #if defined(_WIN32) && defined(_7ZIP_LARGE_PAGES)
+ #if defined(_7ZIP_LARGE_PAGES)
SetLargePageSize();
#endif
return S_OK;
}
+
+extern bool g_CaseSensitive;
+
+STDAPI SetCaseSensitive(Int32 caseSensitive)
+{
+ g_CaseSensitive = (caseSensitive != 0);
+ return S_OK;
+}
+
+#ifdef EXTERNAL_CODECS
+
+CExternalCodecs g_ExternalCodecs;
+
+STDAPI SetCodecs(ICompressCodecsInfo *compressCodecsInfo)
+{
+ COM_TRY_BEGIN
+
+ // OutputDebugStringA(compressCodecsInfo ? "SetCodecs" : "SetCodecs NULL");
+ if (compressCodecsInfo)
+ {
+ g_ExternalCodecs.GetCodecs = compressCodecsInfo;
+ return g_ExternalCodecs.Load();
+ }
+ g_ExternalCodecs.ClearAndRelease();
+ return S_OK;
+
+ COM_TRY_END
+}
+
+#else
+
+STDAPI SetCodecs(ICompressCodecsInfo *)
+{
+ return S_OK;
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/IArchive.h b/3rdparty/lzma/CPP/7zip/Archive/IArchive.h
index 853202767e6..0028d76246b 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/IArchive.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/IArchive.h
@@ -20,20 +20,43 @@ namespace NFileTimeType
};
}
+namespace NArcInfoFlags
+{
+ const UInt32 kKeepName = 1 << 0; // keep name of file in archive name
+ const UInt32 kAltStreams = 1 << 1; // the handler supports alt streams
+ const UInt32 kNtSecure = 1 << 2; // the handler supports NT security
+ const UInt32 kFindSignature = 1 << 3; // the handler can find start of archive
+ const UInt32 kMultiSignature = 1 << 4; // there are several signatures
+ const UInt32 kUseGlobalOffset = 1 << 5; // the seek position of stream must be set as global offset
+ const UInt32 kStartOpen = 1 << 6; // call handler for each start position
+ const UInt32 kPureStartOpen = 1 << 7; // call handler only for start of file
+ const UInt32 kBackwardOpen = 1 << 8; // archive can be open backward
+ const UInt32 kPreArc = 1 << 9; // such archive can be stored before real archive (like SFX stub)
+ const UInt32 kSymLinks = 1 << 10; // the handler supports symbolic links
+ const UInt32 kHardLinks = 1 << 11; // the handler supports hard links
+}
+
namespace NArchive
{
- enum
+ namespace NHandlerPropID
{
- kName = 0,
- kClassID,
- kExtension,
- kAddExtension,
- kUpdate,
- kKeepName,
- kStartSignature,
- kFinishSignature,
- kAssociate
- };
+ enum
+ {
+ kName = 0, // VT_BSTR
+ kClassID, // binary GUID in VT_BSTR
+ kExtension, // VT_BSTR
+ kAddExtension, // VT_BSTR
+ kUpdate, // VT_BOOL
+ kKeepName, // VT_BOOL
+ kSignature, // binary in VT_BSTR
+ kMultiSignature, // binary in VT_BSTR
+ kSignatureOffset, // VT_UI4
+ kAltStreams, // VT_BOOL
+ kNtSecure, // VT_BOOL
+ kFlags // VT_UI4
+ // kVersion // VT_UI4 ((VER_MAJOR << 8) | VER_MINOR)
+ };
+ }
namespace NExtract
{
@@ -46,25 +69,44 @@ namespace NArchive
kSkip
};
}
+
namespace NOperationResult
{
enum
{
kOK = 0,
- kUnSupportedMethod,
+ kUnsupportedMethod,
kDataError,
- kCRCError
+ kCRCError,
+ kUnavailable,
+ kUnexpectedEnd,
+ kDataAfterEnd,
+ kIsNotArc,
+ kHeadersError,
+ kWrongPassword
};
}
}
+
+ namespace NEventIndexType
+ {
+ enum
+ {
+ kNoIndex = 0,
+ kInArcIndex,
+ kBlockIndex,
+ kOutArcIndex
+ };
+ }
+
namespace NUpdate
{
namespace NOperationResult
{
enum
{
- kOK = 0,
- kError
+ kOK = 0
+ , // kError
};
}
}
@@ -79,12 +121,60 @@ ARCHIVE_INTERFACE(IArchiveOpenCallback, 0x10)
INTERFACE_IArchiveOpenCallback(PURE);
};
+/*
+IArchiveExtractCallback::
+
+7-Zip doesn't call IArchiveExtractCallback functions
+ GetStream()
+ PrepareOperation()
+ SetOperationResult()
+from different threads simultaneously.
+But 7-Zip can call functions for IProgress or ICompressProgressInfo functions
+from another threads simultaneously with calls for IArchiveExtractCallback interface.
+
+IArchiveExtractCallback::GetStream()
+ UInt32 index - index of item in Archive
+ Int32 askExtractMode (Extract::NAskMode)
+ if (askMode != NExtract::NAskMode::kExtract)
+ {
+ then the callee can not real stream: (*inStream == NULL)
+ }
+
+ Out:
+ (*inStream == NULL) - for directories
+ (*inStream == NULL) - if link (hard link or symbolic link) was created
+ if (*inStream == NULL && askMode == NExtract::NAskMode::kExtract)
+ {
+ then the caller must skip extracting of that file.
+ }
+
+ returns:
+ S_OK : OK
+ S_FALSE : data error (for decoders)
+
+if (IProgress::SetTotal() was called)
+{
+ IProgress::SetCompleted(completeValue) uses
+ packSize - for some stream formats (xz, gz, bz2, lzma, z, ppmd).
+ unpackSize - for another formats.
+}
+else
+{
+ IProgress::SetCompleted(completeValue) uses packSize.
+}
+
+SetOperationResult()
+ 7-Zip calls SetOperationResult at the end of extracting,
+ so the callee can close the file, set attributes, timestamps and security information.
+
+ Int32 opRes (NExtract::NOperationResult)
+*/
#define INTERFACE_IArchiveExtractCallback(x) \
INTERFACE_IProgress(x) \
- STDMETHOD(GetStream)(UInt32 index, ISequentialOutStream **outStream, Int32 askExtractMode) x; \
+ STDMETHOD(GetStream)(UInt32 index, ISequentialOutStream **outStream, Int32 askExtractMode) x; \
STDMETHOD(PrepareOperation)(Int32 askExtractMode) x; \
- STDMETHOD(SetOperationResult)(Int32 resultEOperationResult) x; \
+ STDMETHOD(SetOperationResult)(Int32 opRes) x; \
ARCHIVE_INTERFACE_SUB(IArchiveExtractCallback, IProgress, 0x20)
{
@@ -92,6 +182,25 @@ ARCHIVE_INTERFACE_SUB(IArchiveExtractCallback, IProgress, 0x20)
};
+
+/*
+IArchiveExtractCallbackMessage can be requested from IArchiveExtractCallback object
+ by Extract() or UpdateItems() functions to report about extracting errors
+ReportExtractResult()
+ UInt32 indexType (NEventIndexType)
+ UInt32 index
+ Int32 opRes (NExtract::NOperationResult)
+*/
+
+#define INTERFACE_IArchiveExtractCallbackMessage(x) \
+ STDMETHOD(ReportExtractResult)(UInt32 indexType, UInt32 index, Int32 opRes) x; \
+
+ARCHIVE_INTERFACE_SUB(IArchiveExtractCallbackMessage, IProgress, 0x21)
+{
+ INTERFACE_IArchiveExtractCallbackMessage(PURE)
+};
+
+
#define INTERFACE_IArchiveOpenVolumeCallback(x) \
STDMETHOD(GetProperty)(PROPID propID, PROPVARIANT *value) x; \
STDMETHOD(GetStream)(const wchar_t *name, IInStream **inStream) x; \
@@ -115,41 +224,185 @@ ARCHIVE_INTERFACE(IArchiveOpenSetSubArchiveName, 0x50)
/*
+IInArchive::Open
+ stream
+ if (kUseGlobalOffset), stream current position can be non 0.
+ if (!kUseGlobalOffset), stream current position is 0.
+ if (maxCheckStartPosition == NULL), the handler can try to search archive start in stream
+ if (*maxCheckStartPosition == 0), the handler must check only current position as archive start
+
IInArchive::Extract:
indices must be sorted
- numItems = 0xFFFFFFFF means "all files"
+ numItems = (UInt32)(Int32)-1 = 0xFFFFFFFF means "all files"
testMode != 0 means "test files without writing to outStream"
+
+IInArchive::GetArchiveProperty:
+ kpidOffset - start offset of archive.
+ VT_EMPTY : means offset = 0.
+ VT_UI4, VT_UI8, VT_I8 : result offset; negative values is allowed
+ kpidPhySize - size of archive. VT_EMPTY means unknown size.
+ kpidPhySize is allowed to be larger than file size. In that case it must show
+ supposed size.
+
+ kpidIsDeleted:
+ kpidIsAltStream:
+ kpidIsAux:
+ kpidINode:
+ must return VARIANT_TRUE (VT_BOOL), if archive can support that property in GetProperty.
+
+
+Notes:
+ Don't call IInArchive functions for same IInArchive object from different threads simultaneously.
+ Some IInArchive handlers will work incorrectly in that case.
*/
+#ifdef _MSC_VER
+ #define MY_NO_THROW_DECL_ONLY throw()
+#else
+ #define MY_NO_THROW_DECL_ONLY
+#endif
+
#define INTERFACE_IInArchive(x) \
- STDMETHOD(Open)(IInStream *stream, const UInt64 *maxCheckStartPosition, IArchiveOpenCallback *openArchiveCallback) x; \
- STDMETHOD(Close)() x; \
- STDMETHOD(GetNumberOfItems)(UInt32 *numItems) x; \
- STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) x; \
- STDMETHOD(Extract)(const UInt32* indices, UInt32 numItems, Int32 testMode, IArchiveExtractCallback *extractCallback) x; \
- STDMETHOD(GetArchiveProperty)(PROPID propID, PROPVARIANT *value) x; \
- STDMETHOD(GetNumberOfProperties)(UInt32 *numProperties) x; \
- STDMETHOD(GetPropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x; \
- STDMETHOD(GetNumberOfArchiveProperties)(UInt32 *numProperties) x; \
- STDMETHOD(GetArchivePropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x;
+ STDMETHOD(Open)(IInStream *stream, const UInt64 *maxCheckStartPosition, IArchiveOpenCallback *openCallback) MY_NO_THROW_DECL_ONLY x; \
+ STDMETHOD(Close)() MY_NO_THROW_DECL_ONLY x; \
+ STDMETHOD(GetNumberOfItems)(UInt32 *numItems) MY_NO_THROW_DECL_ONLY x; \
+ STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) MY_NO_THROW_DECL_ONLY x; \
+ STDMETHOD(Extract)(const UInt32* indices, UInt32 numItems, Int32 testMode, IArchiveExtractCallback *extractCallback) MY_NO_THROW_DECL_ONLY x; \
+ STDMETHOD(GetArchiveProperty)(PROPID propID, PROPVARIANT *value) MY_NO_THROW_DECL_ONLY x; \
+ STDMETHOD(GetNumberOfProperties)(UInt32 *numProps) MY_NO_THROW_DECL_ONLY x; \
+ STDMETHOD(GetPropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) MY_NO_THROW_DECL_ONLY x; \
+ STDMETHOD(GetNumberOfArchiveProperties)(UInt32 *numProps) MY_NO_THROW_DECL_ONLY x; \
+ STDMETHOD(GetArchivePropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) MY_NO_THROW_DECL_ONLY x; \
ARCHIVE_INTERFACE(IInArchive, 0x60)
{
INTERFACE_IInArchive(PURE)
};
+namespace NParentType
+{
+ enum
+ {
+ kDir = 0,
+ kAltStream
+ };
+};
+
+namespace NPropDataType
+{
+ const UInt32 kMask_ZeroEnd = 1 << 4;
+ // const UInt32 kMask_BigEndian = 1 << 5;
+ const UInt32 kMask_Utf = 1 << 6;
+ const UInt32 kMask_Utf8 = kMask_Utf | 0;
+ const UInt32 kMask_Utf16 = kMask_Utf | 1;
+ // const UInt32 kMask_Utf32 = kMask_Utf | 2;
+
+ const UInt32 kNotDefined = 0;
+ const UInt32 kRaw = 1;
+
+ const UInt32 kUtf8z = kMask_Utf8 | kMask_ZeroEnd;
+ const UInt32 kUtf16z = kMask_Utf16 | kMask_ZeroEnd;
+};
+
+// UTF string (pointer to wchar_t) with zero end and little-endian.
+#define PROP_DATA_TYPE_wchar_t_PTR_Z_LE ((NPropDataType::kMask_Utf | NPropDataType::kMask_ZeroEnd) + (sizeof(wchar_t) >> 1))
+
+/*
+GetRawProp:
+ Result:
+ S_OK - even if property is not set
+*/
+
+#define INTERFACE_IArchiveGetRawProps(x) \
+ STDMETHOD(GetParent)(UInt32 index, UInt32 *parent, UInt32 *parentType) x; \
+ STDMETHOD(GetRawProp)(UInt32 index, PROPID propID, const void **data, UInt32 *dataSize, UInt32 *propType) x; \
+ STDMETHOD(GetNumRawProps)(UInt32 *numProps) x; \
+ STDMETHOD(GetRawPropInfo)(UInt32 index, BSTR *name, PROPID *propID) x;
+
+ARCHIVE_INTERFACE(IArchiveGetRawProps, 0x70)
+{
+ INTERFACE_IArchiveGetRawProps(PURE)
+};
+
+#define INTERFACE_IArchiveGetRootProps(x) \
+ STDMETHOD(GetRootProp)(PROPID propID, PROPVARIANT *value) x; \
+ STDMETHOD(GetRootRawProp)(PROPID propID, const void **data, UInt32 *dataSize, UInt32 *propType) x; \
+
+ARCHIVE_INTERFACE(IArchiveGetRootProps, 0x71)
+{
+ INTERFACE_IArchiveGetRootProps(PURE)
+};
+
ARCHIVE_INTERFACE(IArchiveOpenSeq, 0x61)
{
STDMETHOD(OpenSeq)(ISequentialInStream *stream) PURE;
};
+/*
+ OpenForSize
+ Result:
+ S_FALSE - is not archive
+ ? - DATA error
+*/
+
+/*
+const UInt32 kOpenFlags_RealPhySize = 1 << 0;
+const UInt32 kOpenFlags_NoSeek = 1 << 1;
+// const UInt32 kOpenFlags_BeforeExtract = 1 << 2;
+*/
+
+/*
+Flags:
+ 0 - opens archive with IInStream, if IInStream interface is supported
+ - if phySize is not available, it doesn't try to make full parse to get phySize
+ kOpenFlags_NoSeek - ArcOpen2 function doesn't use IInStream interface, even if it's available
+ kOpenFlags_RealPhySize - the handler will try to get PhySize, even if it requires full decompression for file
+
+ if handler is not allowed to use IInStream and the flag kOpenFlags_RealPhySize is not specified,
+ the handler can return S_OK, but it doesn't check even Signature.
+ So next Extract can be called for that sequential stream.
+*/
+
+/*
+ARCHIVE_INTERFACE(IArchiveOpen2, 0x62)
+{
+ STDMETHOD(ArcOpen2)(ISequentialInStream *stream, UInt32 flags, IArchiveOpenCallback *openCallback) PURE;
+};
+*/
+
+// ---------- UPDATE ----------
+
+/*
+GetUpdateItemInfo outs:
+*newData *newProps
+ 0 0 - Copy data and properties from archive
+ 0 1 - Copy data from archive, request new properties
+ 1 0 - that combination is unused now
+ 1 1 - Request new data and new properties. It can be used even for folders
+
+ indexInArchive = -1 if there is no item in archive, or if it doesn't matter.
+
+
+GetStream out:
+ Result:
+ S_OK:
+ (*inStream == NULL) - only for directories
+ - the bug was fixed in 9.33: (*Stream == NULL) was in case of anti-file
+ (*inStream != NULL) - for any file, even for empty file or anti-file
+ S_FALSE - skip that file (don't add item to archive) - (client code can't open stream of that file by some reason)
+ (*inStream == NULL)
+
+The order of calling for hard links:
+ - GetStream()
+ - GetProperty(kpidHardLink)
+
+SetOperationResult()
+ Int32 opRes (NExtract::NOperationResult::kOK)
+*/
+
#define INTERFACE_IArchiveUpdateCallback(x) \
INTERFACE_IProgress(x); \
- STDMETHOD(GetUpdateItemInfo)(UInt32 index, \
- Int32 *newData, /*1 - new data, 0 - old data */ \
- Int32 *newProperties, /* 1 - new properties, 0 - old properties */ \
- UInt32 *indexInArchive /* -1 if there is no in archive, or if doesn't matter */ \
- ) x; \
+ STDMETHOD(GetUpdateItemInfo)(UInt32 index, Int32 *newData, Int32 *newProps, UInt32 *indexInArchive) x; \
STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) x; \
STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream) x; \
STDMETHOD(SetOperationResult)(Int32 operationResult) x; \
@@ -169,6 +422,61 @@ ARCHIVE_INTERFACE_SUB(IArchiveUpdateCallback2, IArchiveUpdateCallback, 0x82)
INTERFACE_IArchiveUpdateCallback2(PURE);
};
+namespace NUpdateNotifyOp
+{
+ enum
+ {
+ kAdd = 0,
+ kUpdate,
+ kAnalyze,
+ kReplicate,
+ kRepack,
+ kSkip,
+ kDelete,
+ kHeader
+
+ // kNumDefined
+ };
+};
+
+/*
+IArchiveUpdateCallbackFile::ReportOperation
+ UInt32 indexType (NEventIndexType)
+ UInt32 index
+ UInt32 notifyOp (NUpdateNotifyOp)
+*/
+
+#define INTERFACE_IArchiveUpdateCallbackFile(x) \
+ STDMETHOD(GetStream2)(UInt32 index, ISequentialInStream **inStream, UInt32 notifyOp) x; \
+ STDMETHOD(ReportOperation)(UInt32 indexType, UInt32 index, UInt32 notifyOp) x; \
+
+ARCHIVE_INTERFACE(IArchiveUpdateCallbackFile, 0x83)
+{
+ INTERFACE_IArchiveUpdateCallbackFile(PURE);
+};
+
+
+/*
+UpdateItems()
+-------------
+
+ outStream: output stream. (the handler) MUST support the case when
+ Seek position in outStream is not ZERO.
+ but the caller calls with empty outStream and seek position is ZERO??
+
+ archives with stub:
+
+ If archive is open and the handler and (Offset > 0), then the handler
+ knows about stub size.
+ UpdateItems():
+ 1) the handler MUST copy that stub to outStream
+ 2) the caller MUST NOT copy the stub to outStream, if
+ "rsfx" property is set with SetProperties
+
+ the handler must support the case where
+ ISequentialOutStream *outStream
+*/
+
#define INTERFACE_IOutArchive(x) \
STDMETHOD(UpdateItems)(ISequentialOutStream *outStream, UInt32 numItems, IArchiveUpdateCallback *updateCallback) x; \
@@ -182,47 +490,75 @@ ARCHIVE_INTERFACE(IOutArchive, 0xA0)
ARCHIVE_INTERFACE(ISetProperties, 0x03)
{
- STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties) PURE;
+ STDMETHOD(SetProperties)(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps) PURE;
+};
+
+ARCHIVE_INTERFACE(IArchiveKeepModeForNextOpen, 0x04)
+{
+ STDMETHOD(KeepModeForNextOpen)() PURE;
+};
+
+/* Exe handler: the handler for executable format (PE, ELF, Mach-O).
+ SFX archive: executable stub + some tail data.
+ before 9.31: exe handler didn't parse SFX archives as executable format.
+ for 9.31+: exe handler parses SFX archives as executable format, only if AllowTail(1) was called */
+
+ARCHIVE_INTERFACE(IArchiveAllowTail, 0x05)
+{
+ STDMETHOD(AllowTail)(Int32 allowTail) PURE;
};
#define IMP_IInArchive_GetProp(k) \
(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) \
- { if(index >= sizeof(k) / sizeof(k[0])) return E_INVALIDARG; \
- const STATPROPSTG &srcItem = k[index]; \
- *propID = srcItem.propid; *varType = srcItem.vt; *name = 0; return S_OK; } \
+ { if (index >= ARRAY_SIZE(k)) return E_INVALIDARG; \
+ *propID = k[index]; *varType = k7z_PROPID_To_VARTYPE[(unsigned)*propID]; *name = 0; return S_OK; } \
+
+
+struct CStatProp
+{
+ const char *Name;
+ UInt32 PropID;
+ VARTYPE vt;
+};
+
+namespace NWindows {
+namespace NCOM {
+// PropVariant.cpp
+BSTR AllocBstrFromAscii(const char *s) throw();
+}}
#define IMP_IInArchive_GetProp_WITH_NAME(k) \
(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) \
- { if(index >= sizeof(k) / sizeof(k[0])) return E_INVALIDARG; \
- const STATPROPSTG &srcItem = k[index]; \
- *propID = srcItem.propid; *varType = srcItem.vt; \
- if (srcItem.lpwstrName == 0) *name = 0; else *name = ::SysAllocString(srcItem.lpwstrName); return S_OK; } \
+ { if (index >= ARRAY_SIZE(k)) return E_INVALIDARG; \
+ const CStatProp &prop = k[index]; \
+ *propID = (PROPID)prop.PropID; *varType = prop.vt; \
+ *name = NWindows::NCOM::AllocBstrFromAscii(prop.Name); return S_OK; } \
#define IMP_IInArchive_Props \
- STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 *numProperties) \
- { *numProperties = sizeof(kProps) / sizeof(kProps[0]); return S_OK; } \
+ STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 *numProps) \
+ { *numProps = ARRAY_SIZE(kProps); return S_OK; } \
STDMETHODIMP CHandler::GetPropertyInfo IMP_IInArchive_GetProp(kProps)
#define IMP_IInArchive_Props_WITH_NAME \
- STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 *numProperties) \
- { *numProperties = sizeof(kProps) / sizeof(kProps[0]); return S_OK; } \
+ STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 *numProps) \
+ { *numProps = ARRAY_SIZE(kProps); return S_OK; } \
STDMETHODIMP CHandler::GetPropertyInfo IMP_IInArchive_GetProp_WITH_NAME(kProps)
#define IMP_IInArchive_ArcProps \
- STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProperties) \
- { *numProperties = sizeof(kArcProps) / sizeof(kArcProps[0]); return S_OK; } \
+ STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProps) \
+ { *numProps = ARRAY_SIZE(kArcProps); return S_OK; } \
STDMETHODIMP CHandler::GetArchivePropertyInfo IMP_IInArchive_GetProp(kArcProps)
#define IMP_IInArchive_ArcProps_WITH_NAME \
- STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProperties) \
- { *numProperties = sizeof(kArcProps) / sizeof(kArcProps[0]); return S_OK; } \
+ STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProps) \
+ { *numProps = ARRAY_SIZE(kArcProps); return S_OK; } \
STDMETHODIMP CHandler::GetArchivePropertyInfo IMP_IInArchive_GetProp_WITH_NAME(kArcProps)
#define IMP_IInArchive_ArcProps_NO_Table \
- STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProperties) \
- { *numProperties = 0; return S_OK; } \
+ STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProps) \
+ { *numProps = 0; return S_OK; } \
STDMETHODIMP CHandler::GetArchivePropertyInfo(UInt32, BSTR *, PROPID *, VARTYPE *) \
{ return E_NOTIMPL; } \
@@ -231,4 +567,32 @@ ARCHIVE_INTERFACE(ISetProperties, 0x03)
STDMETHODIMP CHandler::GetArchiveProperty(PROPID, PROPVARIANT *value) \
{ value->vt = VT_EMPTY; return S_OK; }
+
+
+#define k_IsArc_Res_NO 0
+#define k_IsArc_Res_YES 1
+#define k_IsArc_Res_NEED_MORE 2
+// #define k_IsArc_Res_YES_LOW_PROB 3
+
+#define API_FUNC_IsArc EXTERN_C UInt32 WINAPI
+#define API_FUNC_static_IsArc extern "C" { static UInt32 WINAPI
+
+extern "C"
+{
+ typedef HRESULT (WINAPI *Func_CreateObject)(const GUID *clsID, const GUID *iid, void **outObject);
+
+ typedef UInt32 (WINAPI *Func_IsArc)(const Byte *p, size_t size);
+ typedef HRESULT (WINAPI *Func_GetIsArc)(UInt32 formatIndex, Func_IsArc *isArc);
+
+ typedef HRESULT (WINAPI *Func_GetNumberOfFormats)(UInt32 *numFormats);
+ typedef HRESULT (WINAPI *Func_GetHandlerProperty)(PROPID propID, PROPVARIANT *value);
+ typedef HRESULT (WINAPI *Func_GetHandlerProperty2)(UInt32 index, PROPID propID, PROPVARIANT *value);
+
+ typedef HRESULT (WINAPI *Func_SetCaseSensitive)(Int32 caseSensitive);
+ typedef HRESULT (WINAPI *Func_SetLargePageMode)();
+
+ typedef IOutArchive * (*Func_CreateOutArchive)();
+ typedef IInArchive * (*Func_CreateInArchive)();
+}
+
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/LzmaHandler.cpp b/3rdparty/lzma/CPP/7zip/Archive/LzmaHandler.cpp
index 778c2fd8234..e4ac2a42567 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/LzmaHandler.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/LzmaHandler.cpp
@@ -4,16 +4,17 @@
#include "../../../C/CpuArch.h"
-#include "Common/ComTry.h"
-#include "Common/IntToString.h"
+#include "../../Common/ComTry.h"
+#include "../../Common/IntToString.h"
-#include "Windows/PropVariant.h"
+#include "../../Windows/PropVariant.h"
-#include "../Common/CreateCoder.h"
+#include "../Common/FilterCoder.h"
#include "../Common/ProgressUtils.h"
#include "../Common/RegisterArc.h"
#include "../Common/StreamUtils.h"
+#include "../Compress/BcjCoder.h"
#include "../Compress/LzmaDecoder.h"
#include "Common/DummyOutStream.h"
@@ -26,17 +27,24 @@ namespace NLzma {
static bool CheckDicSize(const Byte *p)
{
UInt32 dicSize = GetUi32(p);
- for (int i = 1; i <= 30; i++)
+ if (dicSize == 1)
+ return true;
+ for (unsigned i = 0; i <= 30; i++)
if (dicSize == ((UInt32)2 << i) || dicSize == ((UInt32)3 << i))
return true;
return (dicSize == 0xFFFFFFFF);
}
-STATPROPSTG kProps[] =
+static const Byte kProps[] =
{
- { NULL, kpidSize, VT_UI8},
- { NULL, kpidPackSize, VT_UI8},
- { NULL, kpidMethod, VT_BSTR}
+ kpidSize,
+ kpidPackSize,
+ kpidMethod
+};
+
+static const Byte kArcProps[] =
+{
+ kpidNumStreams
};
struct CHeader
@@ -62,19 +70,20 @@ bool CHeader::Parse(const Byte *buf, bool isThereFilter)
return
LzmaProps[0] < 5 * 5 * 9 &&
FilterID < 2 &&
- (!HasSize() || Size < ((UInt64)1 << 56)) &&
- CheckDicSize(LzmaProps + 1);
+ (!HasSize() || Size < ((UInt64)1 << 56))
+ && CheckDicSize(LzmaProps + 1);
}
class CDecoder
{
- NCompress::NLzma::CDecoder *_lzmaDecoderSpec;
- CMyComPtr<ICompressCoder> _lzmaDecoder;
CMyComPtr<ISequentialOutStream> _bcjStream;
+ CFilterCoder *_filterCoder;
+ CMyComPtr<ICompressCoder> _lzmaDecoder;
public:
+ NCompress::NLzma::CDecoder *_lzmaDecoderSpec;
+
~CDecoder();
- HRESULT Create(DECL_EXTERNAL_CODECS_LOC_VARS
- bool filtered, ISequentialInStream *inStream);
+ HRESULT Create(bool filtered, ISequentialInStream *inStream);
HRESULT Code(const CHeader &header, ISequentialOutStream *outStream, ICompressProgressInfo *progress);
@@ -86,15 +95,12 @@ public:
{ return _lzmaDecoderSpec->ReadFromInputStream(data, size, processedSize); }
};
-static const UInt64 k_BCJ = 0x03030103;
-
-HRESULT CDecoder::Create(
- DECL_EXTERNAL_CODECS_LOC_VARS
- bool filteredMode, ISequentialInStream *inStream)
+HRESULT CDecoder::Create(bool filteredMode, ISequentialInStream *inStream)
{
if (!_lzmaDecoder)
{
_lzmaDecoderSpec = new NCompress::NLzma::CDecoder;
+ _lzmaDecoderSpec->FinishStream = true;
_lzmaDecoder = _lzmaDecoderSpec;
}
@@ -102,13 +108,10 @@ HRESULT CDecoder::Create(
{
if (!_bcjStream)
{
- CMyComPtr<ICompressCoder> coder;
- RINOK(CreateCoder(EXTERNAL_CODECS_LOC_VARS k_BCJ, coder, false));
- if (!coder)
- return E_NOTIMPL;
- coder.QueryInterface(IID_ISequentialOutStream, &_bcjStream);
- if (!_bcjStream)
- return E_NOTIMPL;
+ _filterCoder = new CFilterCoder(false);
+ CMyComPtr<ICompressCoder> coder = _filterCoder;
+ _filterCoder->Filter = new CBcjCoder(false);
+ _bcjStream = _filterCoder;
}
}
@@ -134,17 +137,13 @@ HRESULT CDecoder::Code(const CHeader &header, ISequentialOutStream *outStream,
RINOK(setDecoderProperties->SetDecoderProperties2(header.LzmaProps, 5));
}
- CMyComPtr<ICompressSetOutStream> setOutStream;
-
bool filteredMode = (header.FilterID == 1);
if (filteredMode)
{
- _bcjStream.QueryInterface(IID_ICompressSetOutStream, &setOutStream);
- if (!setOutStream)
- return E_NOTIMPL;
- RINOK(setOutStream->SetOutStream(outStream));
+ RINOK(_filterCoder->SetOutStream(outStream));
outStream = _bcjStream;
+ RINOK(_filterCoder->SetOutStreamSize(NULL));
}
const UInt64 *Size = header.HasSize() ? &header.Size : NULL;
@@ -152,20 +151,22 @@ HRESULT CDecoder::Code(const CHeader &header, ISequentialOutStream *outStream,
if (filteredMode)
{
- CMyComPtr<IOutStreamFlush> flush;
- _bcjStream.QueryInterface(IID_IOutStreamFlush, &flush);
- if (flush)
{
- HRESULT res2 = flush->Flush();
+ HRESULT res2 = _filterCoder->OutStreamFinish();
if (res == S_OK)
res = res2;
}
- HRESULT res2 = setOutStream->ReleaseOutStream();
+ HRESULT res2 = _filterCoder->ReleaseOutStream();
if (res == S_OK)
res = res2;
}
+
RINOK(res);
+ if (header.HasSize())
+ if (_lzmaDecoderSpec->GetOutputProcessedSize() != header.Size)
+ return S_FALSE;
+
return S_OK;
}
@@ -173,26 +174,31 @@ HRESULT CDecoder::Code(const CHeader &header, ISequentialOutStream *outStream,
class CHandler:
public IInArchive,
public IArchiveOpenSeq,
- PUBLIC_ISetCompressCodecsInfo
public CMyUnknownImp
{
CHeader _header;
bool _lzma86;
- UInt64 _startPosition;
- UInt64 _packSize;
- bool _packSizeDefined;
CMyComPtr<IInStream> _stream;
CMyComPtr<ISequentialInStream> _seqStream;
+
+ bool _isArc;
+ bool _needSeekToStart;
+ bool _dataAfterEnd;
+ bool _needMoreInput;
+
+ bool _packSize_Defined;
+ bool _unpackSize_Defined;
+ bool _numStreams_Defined;
- DECL_EXTERNAL_CODECS_VARS
- DECL_ISetCompressCodecsInfo
+ bool _unsupported;
+ bool _dataError;
+
+ UInt64 _packSize;
+ UInt64 _unpackSize;
+ UInt64 _numStreams;
public:
- MY_QUERYINTERFACE_BEGIN2(IInArchive)
- MY_QUERYINTERFACE_ENTRY(IArchiveOpenSeq)
- QUERY_ENTRY_ISetCompressCodecsInfo
- MY_QUERYINTERFACE_END
- MY_ADDREF_RELEASE
+ MY_UNKNOWN_IMP2(IInArchive, IArchiveOpenSeq)
INTERFACE_IInArchive(;)
STDMETHOD(OpenSeq)(ISequentialInStream *stream);
@@ -204,14 +210,26 @@ public:
};
IMP_IInArchive_Props
-IMP_IInArchive_ArcProps_NO_Table
+IMP_IInArchive_ArcProps
STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)
{
NCOM::CPropVariant prop;
- switch(propID)
+ switch (propID)
{
- case kpidPhySize: if (_packSizeDefined) prop = _packSize; break;
+ case kpidPhySize: if (_packSize_Defined) prop = _packSize; break;
+ case kpidNumStreams: if (_numStreams_Defined) prop = _numStreams; break;
+ case kpidUnpackSize: if (_unpackSize_Defined) prop = _unpackSize; break;
+ case kpidErrorFlags:
+ {
+ UInt32 v = 0;
+ if (!_isArc) v |= kpv_ErrorFlags_IsNotArc;;
+ if (_needMoreInput) v |= kpv_ErrorFlags_UnexpectedEnd;
+ if (_dataAfterEnd) v |= kpv_ErrorFlags_DataAfterEnd;
+ if (_unsupported) v |= kpv_ErrorFlags_UnsupportedMethod;
+ if (_dataError) v |= kpv_ErrorFlags_DataError;
+ prop = v;
+ }
}
prop.Detach(value);
return S_OK;
@@ -226,50 +244,37 @@ STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems)
static void DictSizeToString(UInt32 value, char *s)
{
for (int i = 0; i <= 31; i++)
- if ((UInt32(1) << i) == value)
+ if (((UInt32)1 << i) == value)
{
::ConvertUInt32ToString(i, s);
return;
}
char c = 'b';
- if ((value & ((1 << 20) - 1)) == 0)
- {
- value >>= 20;
- c = 'm';
- }
- else if ((value & ((1 << 10) - 1)) == 0)
- {
- value >>= 10;
- c = 'k';
- }
+ if ((value & ((1 << 20) - 1)) == 0) { value >>= 20; c = 'm'; }
+ else if ((value & ((1 << 10) - 1)) == 0) { value >>= 10; c = 'k'; }
::ConvertUInt32ToString(value, s);
- int p = MyStringLen(s);
- s[p++] = c;
- s[p++] = '\0';
-}
-
-static void MyStrCat(char *d, const char *s)
-{
- MyStringCopy(d + MyStringLen(d), s);
+ s += MyStringLen(s);
+ *s++ = c;
+ *s = 0;
}
-STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value)
+STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value)
{
NCOM::CPropVariant prop;
- switch(propID)
+ switch (propID)
{
case kpidSize: if (_stream && _header.HasSize()) prop = _header.Size; break;
- case kpidPackSize: if (_packSizeDefined) prop = _packSize; break;
+ case kpidPackSize: if (_packSize_Defined) prop = _packSize; break;
case kpidMethod:
if (_stream)
{
- char s[64];
- s[0] = '\0';
+ char sz[64];
+ char *s = sz;
if (_header.FilterID != 0)
- MyStrCat(s, "BCJ ");
- MyStrCat(s, "LZMA:");
- DictSizeToString(_header.GetDicSize(), s + MyStringLen(s));
- prop = s;
+ s = MyStpCpy(s, "BCJ ");
+ s = MyStpCpy(s, "LZMA:");
+ DictSizeToString(_header.GetDicSize(), s);
+ prop = sz;
}
break;
}
@@ -277,11 +282,54 @@ STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIA
return S_OK;
}
+API_FUNC_static_IsArc IsArc_Lzma(const Byte *p, size_t size)
+{
+ const UInt32 kHeaderSize = 1 + 4 + 8;
+ if (size < kHeaderSize)
+ return k_IsArc_Res_NEED_MORE;
+ if (p[0] >= 5 * 5 * 9)
+ return k_IsArc_Res_NO;
+ UInt64 unpackSize = GetUi64(p + 1 + 4);
+ if (unpackSize != (UInt64)(Int64)-1)
+ {
+ if (size >= ((UInt64)1 << 56))
+ return k_IsArc_Res_NO;
+ }
+ if (unpackSize != 0)
+ {
+ if (size < kHeaderSize + 2)
+ return k_IsArc_Res_NEED_MORE;
+ if (p[kHeaderSize] != 0)
+ return k_IsArc_Res_NO;
+ if (unpackSize != (UInt64)(Int64)-1)
+ {
+ if ((p[kHeaderSize + 1] & 0x80) != 0)
+ return k_IsArc_Res_NO;
+ }
+ }
+ if (!CheckDicSize(p + 1))
+ // return k_IsArc_Res_YES_LOW_PROB;
+ return k_IsArc_Res_NO;
+ return k_IsArc_Res_YES;
+}
+}
+
+API_FUNC_static_IsArc IsArc_Lzma86(const Byte *p, size_t size)
+{
+ if (size < 1)
+ return k_IsArc_Res_NEED_MORE;
+ Byte filterID = p[0];
+ if (filterID != 0 && filterID != 1)
+ return k_IsArc_Res_NO;
+ return IsArc_Lzma(p + 1, size - 1);
+}
+}
+
STDMETHODIMP CHandler::Open(IInStream *inStream, const UInt64 *, IArchiveOpenCallback *)
{
- RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &_startPosition));
+ Close();
- const UInt32 kBufSize = 1 + 5 + 8 + 1;
+ const UInt32 kBufSize = 1 + 5 + 8 + 2;
Byte buf[kBufSize];
RINOK(ReadStream_FALSE(inStream, buf, kBufSize));
@@ -289,46 +337,83 @@ STDMETHODIMP CHandler::Open(IInStream *inStream, const UInt64 *, IArchiveOpenCal
if (!_header.Parse(buf, _lzma86))
return S_FALSE;
const Byte *start = buf + GetHeaderSize();
- if (start[0] != 0)
+ if (start[0] != 0 /* || (start[1] & 0x80) != 0 */ ) // empty stream with EOS is not 0x80
return S_FALSE;
- UInt64 endPos;
- RINOK(inStream->Seek(0, STREAM_SEEK_END, &endPos));
- _packSize = endPos - _startPosition;
- _packSizeDefined = true;
+ RINOK(inStream->Seek(0, STREAM_SEEK_END, &_packSize));
if (_packSize >= 24 && _header.Size == 0 && _header.FilterID == 0 && _header.LzmaProps[0] == 0)
return S_FALSE;
+ _isArc = true;
_stream = inStream;
_seqStream = inStream;
+ _needSeekToStart = true;
return S_OK;
}
STDMETHODIMP CHandler::OpenSeq(ISequentialInStream *stream)
{
Close();
+ _isArc = true;
_seqStream = stream;
return S_OK;
}
STDMETHODIMP CHandler::Close()
{
- _packSizeDefined = false;
+ _isArc = false;
+ _packSize_Defined = false;
+ _unpackSize_Defined = false;
+ _numStreams_Defined = false;
+
+ _dataAfterEnd = false;
+ _needMoreInput = false;
+ _unsupported = false;
+ _dataError = false;
+
+ _packSize = 0;
+
+ _needSeekToStart = false;
+
_stream.Release();
_seqStream.Release();
return S_OK;
}
+class CCompressProgressInfoImp:
+ public ICompressProgressInfo,
+ public CMyUnknownImp
+{
+ CMyComPtr<IArchiveOpenCallback> Callback;
+public:
+ UInt64 Offset;
+
+ MY_UNKNOWN_IMP1(ICompressProgressInfo)
+ STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
+ void Init(IArchiveOpenCallback *callback) { Callback = callback; }
+};
+
+STDMETHODIMP CCompressProgressInfoImp::SetRatioInfo(const UInt64 *inSize, const UInt64 * /* outSize */)
+{
+ if (Callback)
+ {
+ UInt64 files = 0;
+ UInt64 value = Offset + *inSize;
+ return Callback->SetCompleted(&files, &value);
+ }
+ return S_OK;
+}
STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
Int32 testMode, IArchiveExtractCallback *extractCallback)
{
COM_TRY_BEGIN
+
if (numItems == 0)
return S_OK;
- if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0))
+ if (numItems != (UInt32)(Int32)-1 && (numItems != 1 || indices[0] != 0))
return E_INVALIDARG;
- if (_stream)
+ if (_packSize_Defined)
extractCallback->SetTotal(_packSize);
@@ -352,80 +437,137 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
CMyComPtr<ICompressProgressInfo> progress = lps;
lps->Init(extractCallback, true);
- if (_stream)
+ if (_needSeekToStart)
{
- RINOK(_stream->Seek(_startPosition, STREAM_SEEK_SET, NULL));
+ if (!_stream)
+ return E_FAIL;
+ RINOK(_stream->Seek(0, STREAM_SEEK_SET, NULL));
}
+ else
+ _needSeekToStart = true;
CDecoder decoder;
- HRESULT result = decoder.Create(
- EXTERNAL_CODECS_VARS
- _lzma86, _seqStream);
+ HRESULT result = decoder.Create(_lzma86, _seqStream);
RINOK(result);
- Int32 opRes = NExtract::NOperationResult::kOK;
bool firstItem = true;
+ UInt64 packSize = 0;
+ UInt64 unpackSize = 0;
+ UInt64 numStreams = 0;
+
+ bool dataAfterEnd = false;
+
for (;;)
{
- lps->OutSize = outStreamSpec->GetSize();
- lps->InSize = _packSize = decoder.GetInputProcessedSize();
- _packSizeDefined = true;
+ lps->InSize = packSize;
+ lps->OutSize = unpackSize;
RINOK(lps->SetCur());
- CHeader st;
-
const UInt32 kBufSize = 1 + 5 + 8;
Byte buf[kBufSize];
const UInt32 headerSize = GetHeaderSize();
UInt32 processed;
RINOK(decoder.ReadInput(buf, headerSize, &processed));
if (processed != headerSize)
+ {
+ if (processed != 0)
+ dataAfterEnd = true;
break;
+ }
+ CHeader st;
if (!st.Parse(buf, _lzma86))
+ {
+ dataAfterEnd = true;
break;
+ }
+ numStreams++;
firstItem = false;
result = decoder.Code(st, outStream, progress);
+
+ packSize = decoder.GetInputProcessedSize();
+ unpackSize = outStreamSpec->GetSize();
+
if (result == E_NOTIMPL)
{
- opRes = NExtract::NOperationResult::kUnSupportedMethod;
+ _unsupported = true;
+ result = S_FALSE;
break;
}
if (result == S_FALSE)
- {
- opRes = NExtract::NOperationResult::kDataError;
break;
- }
RINOK(result);
}
+
if (firstItem)
- return E_FAIL;
+ {
+ _isArc = false;
+ result = S_FALSE;
+ }
+ else if (result == S_OK || result == S_FALSE)
+ {
+ if (dataAfterEnd)
+ _dataAfterEnd = true;
+ else if (decoder._lzmaDecoderSpec->NeedMoreInput)
+ _needMoreInput = true;
+
+ _packSize = packSize;
+ _unpackSize = unpackSize;
+ _numStreams = numStreams;
+
+ _packSize_Defined = true;
+ _unpackSize_Defined = true;
+ _numStreams_Defined = true;
+ }
+
+ Int32 opResult = NExtract::NOperationResult::kOK;
+
+ if (!_isArc)
+ opResult = NExtract::NOperationResult::kIsNotArc;
+ else if (_needMoreInput)
+ opResult = NExtract::NOperationResult::kUnexpectedEnd;
+ else if (_unsupported)
+ opResult = NExtract::NOperationResult::kUnsupportedMethod;
+ else if (_dataAfterEnd)
+ opResult = NExtract::NOperationResult::kDataAfterEnd;
+ else if (result == S_FALSE)
+ opResult = NExtract::NOperationResult::kDataError;
+ else if (result == S_OK)
+ opResult = NExtract::NOperationResult::kOK;
+ else
+ return result;
+
outStream.Release();
- return extractCallback->SetOperationResult(opRes);
+ return extractCallback->SetOperationResult(opResult);
+
COM_TRY_END
}
-IMPL_ISetCompressCodecsInfo
-
-static IInArchive *CreateArc() { return new CHandler(false); }
-static IInArchive *CreateArc86() { return new CHandler(true); }
-
namespace NLzmaAr {
-
-static CArcInfo g_ArcInfo =
- { L"lzma", L"lzma", 0, 0xA, { 0 }, 0, true, CreateArc, NULL };
-REGISTER_ARC(Lzma)
+// 2, { 0x5D, 0x00 },
+
+REGISTER_ARC_I_CLS_NO_SIG(
+ CHandler(false),
+ "lzma", "lzma", 0, 0xA,
+ 0,
+ NArcInfoFlags::kStartOpen |
+ NArcInfoFlags::kKeepName,
+ IsArc_Lzma)
+
}
namespace NLzma86Ar {
-static CArcInfo g_ArcInfo =
- { L"lzma86", L"lzma86", 0, 0xB, { 0 }, 0, true, CreateArc86, NULL };
-REGISTER_ARC(Lzma86)
-
+REGISTER_ARC_I_CLS_NO_SIG(
+ CHandler(true),
+ "lzma86", "lzma86", 0, 0xB,
+ 0,
+ NArcInfoFlags::kKeepName,
+ IsArc_Lzma86)
+
}
}}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/SplitHandler.cpp b/3rdparty/lzma/CPP/7zip/Archive/SplitHandler.cpp
index 5d84de4ed9a..23187064fab 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/SplitHandler.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/SplitHandler.cpp
@@ -2,10 +2,10 @@
#include "StdAfx.h"
-#include "Common/ComTry.h"
-#include "Common/MyString.h"
+#include "../../Common/ComTry.h"
+#include "../../Common/MyString.h"
-#include "Windows/PropVariant.h"
+#include "../../Windows/PropVariant.h"
#include "../Common/ProgressUtils.h"
#include "../Common/RegisterArc.h"
@@ -19,15 +19,16 @@ using namespace NWindows;
namespace NArchive {
namespace NSplit {
-STATPROPSTG kProps[] =
+static const Byte kProps[] =
{
- { NULL, kpidPath, VT_BSTR},
- { NULL, kpidSize, VT_UI8}
+ kpidPath,
+ kpidSize
};
-STATPROPSTG kArcProps[] =
+static const Byte kArcProps[] =
{
- { NULL, kpidNumVolumes, VT_UI4}
+ kpidNumVolumes,
+ kpidTotalPhySize
};
class CHandler:
@@ -35,10 +36,12 @@ class CHandler:
public IInArchiveGetStream,
public CMyUnknownImp
{
- UString _subName;
CObjectVector<CMyComPtr<IInStream> > _streams;
CRecordVector<UInt64> _sizes;
+ UString _subName;
UInt64 _totalSize;
+
+ HRESULT Open2(IInStream *stream, IArchiveOpenCallback *callback);
public:
MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream)
INTERFACE_IInArchive(;)
@@ -51,9 +54,11 @@ IMP_IInArchive_ArcProps
STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)
{
NCOM::CPropVariant prop;
- switch(propID)
+ switch (propID)
{
case kpidMainSubfile: prop = (UInt32)0; break;
+ case kpidPhySize: if (!_sizes.IsEmpty()) prop = _sizes[0]; break;
+ case kpidTotalPhySize: prop = _totalSize; break;
case kpidNumVolumes: prop = (UInt32)_streams.Size(); break;
}
prop.Detach(value);
@@ -66,210 +71,191 @@ struct CSeqName
UString _changedPart;
bool _splitStyle;
- UString GetNextName()
+ bool GetNextName(UString &s)
{
- UString newName;
- if (_splitStyle)
{
- int i;
- int numLetters = _changedPart.Length();
- for (i = numLetters - 1; i >= 0; i--)
+ unsigned i = _changedPart.Len();
+ for (;;)
{
- wchar_t c = _changedPart[i];
- if (c == 'z')
+ wchar_t c = _changedPart[--i];
+
+ if (_splitStyle)
{
- c = 'a';
- newName = c + newName;
- continue;
+ if (c == 'z')
+ {
+ _changedPart.ReplaceOneCharAtPos(i, L'a');
+ if (i == 0)
+ return false;
+ continue;
+ }
+ else if (c == 'Z')
+ {
+ _changedPart.ReplaceOneCharAtPos(i, L'A');
+ if (i == 0)
+ return false;
+ continue;
+ }
}
- else if (c == 'Z')
- {
- c = 'A';
- newName = c + newName;
- continue;
- }
- c++;
- if ((c == 'z' || c == 'Z') && i == 0)
+ else
{
- _unchangedPart += c;
- wchar_t newChar = (c == 'z') ? L'a' : L'A';
- newName.Empty();
- numLetters++;
- for (int k = 0; k < numLetters; k++)
- newName += newChar;
- break;
- }
- newName = c + newName;
- i--;
- for (; i >= 0; i--)
- newName = _changedPart[i] + newName;
- break;
- }
- }
- else
- {
- int i;
- int numLetters = _changedPart.Length();
- for (i = numLetters - 1; i >= 0; i--)
- {
- wchar_t c = _changedPart[i];
- if (c == L'9')
- {
- c = L'0';
- newName = c + newName;
- if (i == 0)
- newName = UString(L'1') + newName;
- continue;
+ if (c == '9')
+ {
+ _changedPart.ReplaceOneCharAtPos(i, L'0');
+ if (i == 0)
+ {
+ _changedPart.InsertAtFront(L'1');
+ break;
+ }
+ continue;
+ }
}
+
c++;
- newName = c + newName;
- i--;
- for (; i >= 0; i--)
- newName = _changedPart[i] + newName;
+ _changedPart.ReplaceOneCharAtPos(i, c);
break;
}
}
- _changedPart = newName;
- return _unchangedPart + _changedPart;
+
+ s = _unchangedPart + _changedPart;
+ return true;
}
};
-STDMETHODIMP CHandler::Open(IInStream *stream,
- const UInt64 * /* maxCheckStartPosition */,
- IArchiveOpenCallback *openArchiveCallback)
+HRESULT CHandler::Open2(IInStream *stream, IArchiveOpenCallback *callback)
{
- COM_TRY_BEGIN
Close();
- if (openArchiveCallback == 0)
+ if (!callback)
return S_FALSE;
- // try
+
+ CMyComPtr<IArchiveOpenVolumeCallback> volumeCallback;
+ callback->QueryInterface(IID_IArchiveOpenVolumeCallback, (void **)&volumeCallback);
+ if (!volumeCallback)
+ return S_FALSE;
+
+ UString name;
{
- CMyComPtr<IArchiveOpenVolumeCallback> openVolumeCallback;
- CMyComPtr<IArchiveOpenCallback> openArchiveCallbackWrap = openArchiveCallback;
- if (openArchiveCallbackWrap.QueryInterface(IID_IArchiveOpenVolumeCallback,
- &openVolumeCallback) != S_OK)
+ NCOM::CPropVariant prop;
+ RINOK(volumeCallback->GetProperty(kpidName, &prop));
+ if (prop.vt != VT_BSTR)
return S_FALSE;
-
- UString name;
- {
- NCOM::CPropVariant prop;
- RINOK(openVolumeCallback->GetProperty(kpidName, &prop));
- if (prop.vt != VT_BSTR)
- return S_FALSE;
- name = prop.bstrVal;
- }
-
- int dotPos = name.ReverseFind('.');
- UString prefix, ext;
- if (dotPos >= 0)
- {
- prefix = name.Left(dotPos + 1);
- ext = name.Mid(dotPos + 1);
- }
- else
- ext = name;
- UString extBig = ext;
- extBig.MakeUpper();
-
- CSeqName seqName;
-
- int numLetters = 2;
- bool splitStyle = false;
- if (extBig.Right(2) == L"AA")
+ name = prop.bstrVal;
+ }
+
+ int dotPos = name.ReverseFind_Dot();
+ const UString prefix = name.Left(dotPos + 1);
+ const UString ext = name.Ptr(dotPos + 1);
+ UString ext2 = ext;
+ ext2.MakeLower_Ascii();
+
+ CSeqName seqName;
+
+ unsigned numLetters = 2;
+ bool splitStyle = false;
+
+ if (ext2.Len() >= 2 && StringsAreEqual_Ascii(ext2.RightPtr(2), "aa"))
+ {
+ splitStyle = true;
+ while (numLetters < ext2.Len())
{
- splitStyle = true;
- while (numLetters < extBig.Length())
- {
- if (extBig[extBig.Length() - numLetters - 1] != 'A')
- break;
- numLetters++;
- }
+ if (ext2[ext2.Len() - numLetters - 1] != 'a')
+ break;
+ numLetters++;
}
- else if (ext.Right(2) == L"01")
+ }
+ else if (ext.Len() >= 2 && StringsAreEqual_Ascii(ext2.RightPtr(2), "01"))
+ {
+ while (numLetters < ext2.Len())
{
- while (numLetters < extBig.Length())
- {
- if (extBig[extBig.Length() - numLetters - 1] != '0')
- break;
- numLetters++;
- }
- if (numLetters != ext.Length())
- return S_FALSE;
+ if (ext2[ext2.Len() - numLetters - 1] != '0')
+ break;
+ numLetters++;
}
- else
+ if (numLetters != ext.Len())
return S_FALSE;
-
- _streams.Add(stream);
-
- seqName._unchangedPart = prefix + ext.Left(extBig.Length() - numLetters);
- seqName._changedPart = ext.Right(numLetters);
- seqName._splitStyle = splitStyle;
-
- if (prefix.Length() < 1)
- _subName = L"file";
- else
- _subName = prefix.Left(prefix.Length() - 1);
-
- _totalSize = 0;
- UInt64 size;
+ }
+ else
+ return S_FALSE;
+
+ seqName._unchangedPart = prefix + ext.Left(ext2.Len() - numLetters);
+ seqName._changedPart = ext.RightPtr(numLetters);
+ seqName._splitStyle = splitStyle;
+
+ if (prefix.Len() < 1)
+ _subName.SetFromAscii("file");
+ else
+ _subName.SetFrom(prefix, prefix.Len() - 1);
+
+ UInt64 size;
+ {
+ NCOM::CPropVariant prop;
+ RINOK(volumeCallback->GetProperty(kpidSize, &prop));
+ if (prop.vt != VT_UI8)
+ return E_INVALIDARG;
+ size = prop.uhVal.QuadPart;
+ }
+
+ _totalSize += size;
+ _sizes.Add(size);
+ _streams.Add(stream);
+
+ {
+ UInt64 numFiles = _streams.Size();
+ RINOK(callback->SetCompleted(&numFiles, NULL));
+ }
+
+ for (;;)
+ {
+ UString fullName;
+ if (!seqName.GetNextName(fullName))
+ break;
+ CMyComPtr<IInStream> nextStream;
+ HRESULT result = volumeCallback->GetStream(fullName, &nextStream);
+ if (result == S_FALSE)
+ break;
+ if (result != S_OK)
+ return result;
+ if (!stream)
+ break;
{
NCOM::CPropVariant prop;
- RINOK(openVolumeCallback->GetProperty(kpidSize, &prop));
+ RINOK(volumeCallback->GetProperty(kpidSize, &prop));
if (prop.vt != VT_UI8)
return E_INVALIDARG;
size = prop.uhVal.QuadPart;
}
_totalSize += size;
_sizes.Add(size);
-
- if (openArchiveCallback != NULL)
+ _streams.Add(nextStream);
{
UInt64 numFiles = _streams.Size();
- RINOK(openArchiveCallback->SetCompleted(&numFiles, NULL));
- }
-
- for (;;)
- {
- UString fullName = seqName.GetNextName();
- CMyComPtr<IInStream> nextStream;
- HRESULT result = openVolumeCallback->GetStream(fullName, &nextStream);
- if (result == S_FALSE)
- break;
- if (result != S_OK)
- return result;
- if (!stream)
- break;
- {
- NCOM::CPropVariant prop;
- RINOK(openVolumeCallback->GetProperty(kpidSize, &prop));
- if (prop.vt != VT_UI8)
- return E_INVALIDARG;
- size = prop.uhVal.QuadPart;
- }
- _totalSize += size;
- _sizes.Add(size);
- _streams.Add(nextStream);
- if (openArchiveCallback != NULL)
- {
- UInt64 numFiles = _streams.Size();
- RINOK(openArchiveCallback->SetCompleted(&numFiles, NULL));
- }
+ RINOK(callback->SetCompleted(&numFiles, NULL));
}
}
- /*
- catch(...)
+
+ if (_streams.Size() == 1)
{
- return S_FALSE;
+ if (splitStyle)
+ return S_FALSE;
}
- */
return S_OK;
+}
+
+STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *callback)
+{
+ COM_TRY_BEGIN
+ HRESULT res = Open2(stream, callback);
+ if (res != S_OK)
+ Close();
+ return res;
COM_TRY_END
}
STDMETHODIMP CHandler::Close()
{
- _sizes.Clear();
+ _totalSize = 0;
+ _subName.Empty();
_streams.Clear();
+ _sizes.Clear();
return S_OK;
}
@@ -281,8 +267,8 @@ STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems)
STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value)
{
- NWindows::NCOM::CPropVariant prop;
- switch(propID)
+ NCOM::CPropVariant prop;
+ switch (propID)
{
case kpidPath: prop = _subName; break;
case kpidSize:
@@ -300,7 +286,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
COM_TRY_BEGIN
if (numItems == 0)
return S_OK;
- if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0))
+ if (numItems != (UInt32)(Int32)-1 && (numItems != 1 || indices[0] != 0))
return E_INVALIDARG;
UInt64 currentTotalSize = 0;
@@ -321,7 +307,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
CMyComPtr<ICompressProgressInfo> progress = lps;
lps->Init(extractCallback, false);
- for (int i = 0; i < _streams.Size(); i++)
+ FOR_VECTOR (i, _streams)
{
lps->InSize = lps->OutSize = currentTotalSize;
RINOK(lps->SetCur());
@@ -343,7 +329,7 @@ STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream)
*stream = 0;
CMultiStream *streamSpec = new CMultiStream;
CMyComPtr<ISequentialInStream> streamTemp = streamSpec;
- for (int i = 0; i < _streams.Size(); i++)
+ FOR_VECTOR (i, _streams)
{
CMultiStream::CSubStreamInfo subStreamInfo;
subStreamInfo.Stream = _streams[i];
@@ -356,11 +342,10 @@ STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream)
COM_TRY_END
}
-static IInArchive *CreateArc() { return new CHandler; }
-
-static CArcInfo g_ArcInfo =
-{ L"Split", L"001", 0, 0xEA, { 0 }, 0, false, CreateArc, 0 };
-
-REGISTER_ARC(Split)
+REGISTER_ARC_I_NO_SIG(
+ "Split", "001", 0, 0xEA,
+ 0,
+ 0,
+ NULL)
}}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/StdAfx.h b/3rdparty/lzma/CPP/7zip/Archive/StdAfx.h
index ef555ec12ac..1cbd7feaeec 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Archive/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../Common/MyWindows.h"
-#include "../../Common/NewHandler.h"
+#include "../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Archive/XzHandler.cpp b/3rdparty/lzma/CPP/7zip/Archive/XzHandler.cpp
index 8383488b14f..11f4b44427c 100644
--- a/3rdparty/lzma/CPP/7zip/Archive/XzHandler.cpp
+++ b/3rdparty/lzma/CPP/7zip/Archive/XzHandler.cpp
@@ -7,8 +7,8 @@
#include "../../../C/XzEnc.h"
#include "../../Common/ComTry.h"
+#include "../../Common/Defs.h"
#include "../../Common/IntToString.h"
-#include "../../Common/StringConvert.h"
#include "../ICoder.h"
@@ -23,6 +23,8 @@
#include "Common/HandlerOut.h"
+#include "XzHandler.h"
+
using namespace NWindows;
namespace NCompress {
@@ -32,16 +34,35 @@ HRESULT SetLzma2Prop(PROPID propID, const PROPVARIANT &prop, CLzma2EncProps &lzm
}}
-static void *SzAlloc(void *, size_t size) { return MyAlloc(size); }
-static void SzFree(void *, void *address) { MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
-
namespace NArchive {
namespace NXz {
struct CCrc64Gen { CCrc64Gen() { Crc64GenerateTable(); } } g_Crc64TableInit;
-static const wchar_t *k_LZMA2_Name = L"LZMA2";
+static const char *k_LZMA2_Name = "LZMA2";
+
+void CStatInfo::Clear()
+{
+ InSize = 0;
+ OutSize = 0;
+ PhySize = 0;
+
+ NumStreams = 0;
+ NumBlocks = 0;
+
+ UnpackSize_Defined = false;
+
+ NumStreams_Defined = false;
+ NumBlocks_Defined = false;
+
+ IsArc = false;
+ UnexpectedEnd = false;
+ DataAfterEnd = false;
+ Unsupported = false;
+ HeadersError = false;
+ DataError = false;
+ CrcError = false;
+}
class CHandler:
public IInArchive,
@@ -53,19 +74,17 @@ class CHandler:
#endif
public CMyUnknownImp
{
- Int64 _startPosition;
- UInt64 _packSize;
- UInt64 _unpackSize;
- UInt64 _numBlocks;
- AString _methodsString;
- bool _useSeq;
- UInt64 _unpackSizeDefined;
- UInt64 _packSizeDefined;
+ CStatInfo _stat;
+
+ bool _isArc;
+ bool _needSeekToStart;
+ bool _phySize_Defined;
CMyComPtr<IInStream> _stream;
CMyComPtr<ISequentialInStream> _seqStream;
UInt32 _filterId;
+ AString _methodsString;
void Init()
{
@@ -73,7 +92,16 @@ class CHandler:
CMultiMethodProps::Init();
}
- HRESULT Open2(IInStream *inStream, IArchiveOpenCallback *callback);
+ HRESULT Open2(IInStream *inStream, /* UInt32 flags, */ IArchiveOpenCallback *callback);
+
+ HRESULT Decode2(ISequentialInStream *seqInStream, ISequentialOutStream *outStream,
+ CDecoder &decoder, ICompressProgressInfo *progress)
+ {
+ RINOK(decoder.Decode(seqInStream, outStream, progress));
+ _stat = decoder;
+ _phySize_Defined = true;
+ return S_OK;
+ }
public:
MY_QUERYINTERFACE_BEGIN2(IInArchive)
@@ -90,7 +118,7 @@ public:
#ifndef EXTRACT_ONLY
INTERFACE_IOutArchive(;)
- STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProps);
+ STDMETHOD(SetProperties)(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps);
#endif
CHandler();
@@ -101,60 +129,60 @@ CHandler::CHandler()
Init();
}
-static STATPROPSTG const kProps[] =
+static const Byte kProps[] =
{
- { NULL, kpidSize, VT_UI8},
- { NULL, kpidPackSize, VT_UI8},
- { NULL, kpidMethod, VT_BSTR}
+ kpidSize,
+ kpidPackSize,
+ kpidMethod
};
-static STATPROPSTG const kArcProps[] =
+static const Byte kArcProps[] =
{
- { NULL, kpidMethod, VT_BSTR},
- { NULL, kpidNumBlocks, VT_UI4}
+ kpidMethod,
+ kpidNumStreams,
+ kpidNumBlocks
};
IMP_IInArchive_Props
IMP_IInArchive_ArcProps
-static char GetHex(Byte value)
+static inline char GetHex(unsigned value)
{
return (char)((value < 10) ? ('0' + value) : ('A' + (value - 10)));
}
-static inline void AddHexToString(AString &res, Byte value)
+static inline void AddHexToString(AString &s, Byte value)
{
- res += GetHex((Byte)(value >> 4));
- res += GetHex((Byte)(value & 0xF));
+ s += GetHex(value >> 4);
+ s += GetHex(value & 0xF);
}
-static AString ConvertUInt32ToString(UInt32 value)
+static void AddUInt32ToString(AString &s, UInt32 value)
{
- char temp[32];
- ::ConvertUInt32ToString(value, temp);
- return temp;
+ char temp[16];
+ ConvertUInt32ToString(value, temp);
+ s += temp;
}
-static AString Lzma2PropToString(int prop)
+static void Lzma2PropToString(AString &s, unsigned prop)
{
+ char c = 0;
+ UInt32 size;
if ((prop & 1) == 0)
- return ConvertUInt32ToString(prop / 2 + 12);
- AString res;
- char c;
-
- UInt32 size = (2 | ((prop) & 1)) << ((prop) / 2 + 1);
-
- if (prop > 17)
- {
- res = ConvertUInt32ToString(size >> 10);
- c = 'm';
- }
+ size = prop / 2 + 12;
else
{
- res = ConvertUInt32ToString(size);
c = 'k';
+ size = (UInt32)(2 | (prop & 1)) << (prop / 2 + 1);
+ if (prop > 17)
+ {
+ size >>= 10;
+ c = 'm';
+ }
}
- return res + c;
+ AddUInt32ToString(s, size);
+ if (c != 0)
+ s += c;
}
struct CMethodNamePair
@@ -178,25 +206,29 @@ static const CMethodNamePair g_NamePairs[] =
static AString GetMethodString(const CXzFilter &f)
{
- AString s;
-
- for (int i = 0; i < sizeof(g_NamePairs) / sizeof(g_NamePairs[i]); i++)
+ const char *p = NULL;
+ for (unsigned i = 0; i < ARRAY_SIZE(g_NamePairs); i++)
if (g_NamePairs[i].Id == f.id)
- s = g_NamePairs[i].Name;
- if (s.IsEmpty())
+ {
+ p = g_NamePairs[i].Name;
+ break;
+ }
+ char temp[32];
+ if (!p)
{
- char temp[32];
::ConvertUInt64ToString(f.id, temp);
- s = temp;
+ p = temp;
}
+ AString s = p;
+
if (f.propsSize > 0)
{
s += ':';
if (f.id == XZ_ID_LZMA2 && f.propsSize == 1)
- s += Lzma2PropToString(f.props[0]);
+ Lzma2PropToString(s, f.props[0]);
else if (f.id == XZ_ID_Delta && f.propsSize == 1)
- s += ConvertUInt32ToString((UInt32)f.props[0] + 1);
+ AddUInt32ToString(s, (UInt32)f.props[0] + 1);
else
{
s += '[';
@@ -210,29 +242,28 @@ static AString GetMethodString(const CXzFilter &f)
static void AddString(AString &dest, const AString &src)
{
- if (!dest.IsEmpty())
- dest += ' ';
+ dest.Add_Space_if_NotEmpty();
dest += src;
}
-static const char *kChecks[] =
-{
- "NoCheck",
- "CRC32",
- NULL,
- NULL,
- "CRC64",
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- "SHA256",
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+static const char * const kChecks[] =
+{
+ "NoCheck"
+ , "CRC32"
+ , NULL
+ , NULL
+ , "CRC64"
+ , NULL
+ , NULL
+ , NULL
+ , NULL
+ , NULL
+ , "SHA256"
+ , NULL
+ , NULL
+ , NULL
+ , NULL
+ , NULL
};
static AString GetCheckString(const CXzs &xzs)
@@ -249,7 +280,10 @@ static AString GetCheckString(const CXzs &xzs)
if (kChecks[i])
s2 = kChecks[i];
else
- s2 = "Check-" + ConvertUInt32ToString((UInt32)i);
+ {
+ s2 = "Check-";
+ AddUInt32ToString(s2, (UInt32)i);
+ }
AddString(s, s2);
}
return s;
@@ -258,12 +292,26 @@ static AString GetCheckString(const CXzs &xzs)
STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)
{
COM_TRY_BEGIN
- NWindows::NCOM::CPropVariant prop;
- switch(propID)
+ NCOM::CPropVariant prop;
+ switch (propID)
{
- case kpidNumBlocks: if (!_useSeq) prop = _numBlocks; break;
- case kpidPhySize: if (_packSizeDefined) prop = _packSize; break;
+ case kpidPhySize: if (_phySize_Defined) prop = _stat.PhySize; break;
+ case kpidNumStreams: if (_stat.NumStreams_Defined) prop = _stat.NumStreams; break;
+ case kpidNumBlocks: if (_stat.NumBlocks_Defined) prop = _stat.NumBlocks; break;
+ case kpidUnpackSize: if (_stat.UnpackSize_Defined) prop = _stat.OutSize; break;
case kpidMethod: if (!_methodsString.IsEmpty()) prop = _methodsString; break;
+ case kpidErrorFlags:
+ {
+ UInt32 v = 0;
+ if (!_isArc) v |= kpv_ErrorFlags_IsNotArc;;
+ if (_stat.UnexpectedEnd) v |= kpv_ErrorFlags_UnexpectedEnd;
+ if (_stat.DataAfterEnd) v |= kpv_ErrorFlags_DataAfterEnd;
+ if (_stat.HeadersError) v |= kpv_ErrorFlags_HeadersError;
+ if (_stat.Unsupported) v |= kpv_ErrorFlags_UnsupportedMethod;
+ if (_stat.DataError) v |= kpv_ErrorFlags_DataError;
+ if (_stat.CrcError) v |= kpv_ErrorFlags_CrcError;
+ prop = v;
+ }
}
prop.Detach(value);
return S_OK;
@@ -276,14 +324,14 @@ STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems)
return S_OK;
}
-STDMETHODIMP CHandler::GetProperty(UInt32, PROPID propID, PROPVARIANT *value)
+STDMETHODIMP CHandler::GetProperty(UInt32, PROPID propID, PROPVARIANT *value)
{
COM_TRY_BEGIN
- NWindows::NCOM::CPropVariant prop;
- switch(propID)
+ NCOM::CPropVariant prop;
+ switch (propID)
{
- case kpidSize: if (_unpackSizeDefined) prop = _unpackSize; break;
- case kpidPackSize: if (_packSizeDefined) prop = _packSize; break;
+ case kpidSize: if (_stat.UnpackSize_Defined) prop = _stat.OutSize; break;
+ case kpidPackSize: if (_phySize_Defined) prop = _stat.PhySize; break;
case kpidMethod: if (!_methodsString.IsEmpty()) prop = _methodsString; break;
}
prop.Detach(value);
@@ -303,7 +351,8 @@ struct COpenCallbackWrap
static SRes OpenCallbackProgress(void *pp, UInt64 inSize, UInt64 /* outSize */)
{
COpenCallbackWrap *p = (COpenCallbackWrap *)pp;
- p->Res = p->OpenCallback->SetCompleted(NULL, &inSize);
+ if (p->OpenCallback)
+ p->Res = p->OpenCallback->SetCompleted(NULL, &inSize);
return (SRes)p->Res;
}
@@ -321,82 +370,108 @@ struct CXzsCPP
~CXzsCPP() { Xzs_Free(&p, &g_Alloc); }
};
-HRESULT CHandler::Open2(IInStream *inStream, IArchiveOpenCallback *callback)
+static HRESULT SRes_to_Open_HRESULT(SRes res)
{
- CSeekInStreamWrap inStreamImp(inStream);
-
- CLookToRead lookStream;
- LookToRead_CreateVTable(&lookStream, True);
- lookStream.realStream = &inStreamImp.p;
- LookToRead_Init(&lookStream);
+ switch (res)
+ {
+ case SZ_OK: return S_OK;
+ case SZ_ERROR_MEM: return E_OUTOFMEMORY;
+ case SZ_ERROR_PROGRESS: return E_ABORT;
+ /*
+ case SZ_ERROR_UNSUPPORTED:
+ case SZ_ERROR_CRC:
+ case SZ_ERROR_DATA:
+ case SZ_ERROR_ARCHIVE:
+ case SZ_ERROR_NO_ARCHIVE:
+ return S_FALSE;
+ */
+ }
+ return S_FALSE;
+}
- COpenCallbackWrap openWrap(callback);
- RINOK(inStream->Seek(0, STREAM_SEEK_END, &_packSize));
- RINOK(callback->SetTotal(NULL, &_packSize));
+HRESULT CHandler::Open2(IInStream *inStream, /* UInt32 flags, */ IArchiveOpenCallback *callback)
+{
+ _needSeekToStart = true;
- CXzsCPP xzs;
- SRes res = Xzs_ReadBackward(&xzs.p, &lookStream.s, &_startPosition, &openWrap.p, &g_Alloc);
- if (res == SZ_ERROR_NO_ARCHIVE && xzs.p.num > 0)
- res = SZ_OK;
- if (res == SZ_OK)
{
- _packSize -= _startPosition;
- _unpackSize = Xzs_GetUnpackSize(&xzs.p);
- _unpackSizeDefined = _packSizeDefined = true;
- _numBlocks = (UInt64)Xzs_GetNumBlocks(&xzs.p);
-
- RINOK(inStream->Seek(0, STREAM_SEEK_SET, NULL));
CXzStreamFlags st;
CSeqInStreamWrap inStreamWrap(inStream);
- SRes res2 = Xz_ReadHeader(&st, &inStreamWrap.p);
+ SRes res = Xz_ReadHeader(&st, &inStreamWrap.p);
+ if (res != SZ_OK)
+ return SRes_to_Open_HRESULT(res);
- if (res2 == SZ_OK)
{
CXzBlock block;
Bool isIndex;
UInt32 headerSizeRes;
- res2 = XzBlock_ReadHeader(&block, &inStreamWrap.p, &isIndex, &headerSizeRes);
+ SRes res2 = XzBlock_ReadHeader(&block, &inStreamWrap.p, &isIndex, &headerSizeRes);
if (res2 == SZ_OK && !isIndex)
{
- int numFilters = XzBlock_GetNumFilters(&block);
- for (int i = 0; i < numFilters; i++)
+ unsigned numFilters = XzBlock_GetNumFilters(&block);
+ for (unsigned i = 0; i < numFilters; i++)
AddString(_methodsString, GetMethodString(block.filters[i]));
}
}
- AddString(_methodsString, GetCheckString(xzs.p));
}
- if (res != SZ_OK || _startPosition != 0)
+ RINOK(inStream->Seek(0, STREAM_SEEK_END, &_stat.PhySize));
+ if (callback)
{
- RINOK(inStream->Seek(0, STREAM_SEEK_SET, NULL));
- CXzStreamFlags st;
- CSeqInStreamWrap inStreamWrap(inStream);
- SRes res2 = Xz_ReadHeader(&st, &inStreamWrap.p);
- if (res2 == SZ_OK)
- {
- res = res2;
- _startPosition = 0;
- _useSeq = True;
- _unpackSizeDefined = _packSizeDefined = false;
- }
+ RINOK(callback->SetTotal(NULL, &_stat.PhySize));
}
- if (res == SZ_ERROR_NO_ARCHIVE)
- return S_FALSE;
- RINOK(SResToHRESULT(res));
+
+ CSeekInStreamWrap inStreamImp(inStream);
+
+ CLookToRead lookStream;
+ LookToRead_CreateVTable(&lookStream, True);
+ lookStream.realStream = &inStreamImp.p;
+ LookToRead_Init(&lookStream);
+
+ COpenCallbackWrap openWrap(callback);
+
+ CXzsCPP xzs;
+ Int64 startPosition;
+ SRes res = Xzs_ReadBackward(&xzs.p, &lookStream.s, &startPosition, &openWrap.p, &g_Alloc);
+ if (res == SZ_ERROR_PROGRESS)
+ return (openWrap.Res == S_OK) ? E_FAIL : openWrap.Res;
+ /*
+ if (res == SZ_ERROR_NO_ARCHIVE && xzs.p.num > 0)
+ res = SZ_OK;
+ */
+ if (res == SZ_OK && startPosition == 0)
+ {
+ _phySize_Defined = true;
+
+ _stat.OutSize = Xzs_GetUnpackSize(&xzs.p);
+ _stat.UnpackSize_Defined = true;
+
+ _stat.NumStreams = xzs.p.num;
+ _stat.NumStreams_Defined = true;
+
+ _stat.NumBlocks = Xzs_GetNumBlocks(&xzs.p);
+ _stat.NumBlocks_Defined = true;
+
+ AddString(_methodsString, GetCheckString(xzs.p));
+ }
+ else
+ {
+ res = SZ_OK;
+ }
+
+ RINOK(SRes_to_Open_HRESULT(res));
_stream = inStream;
_seqStream = inStream;
+ _isArc = true;
return S_OK;
}
STDMETHODIMP CHandler::Open(IInStream *inStream, const UInt64 *, IArchiveOpenCallback *callback)
{
COM_TRY_BEGIN
- try
{
Close();
return Open2(inStream, callback);
}
- catch(...) { return S_FALSE; }
COM_TRY_END
}
@@ -404,15 +479,21 @@ STDMETHODIMP CHandler::OpenSeq(ISequentialInStream *stream)
{
Close();
_seqStream = stream;
+ _isArc = true;
+ _needSeekToStart = false;
return S_OK;
}
STDMETHODIMP CHandler::Close()
{
- _numBlocks = 0;
- _useSeq = true;
- _unpackSizeDefined = _packSizeDefined = false;
- _methodsString.Empty();
+ _stat.Clear();
+
+ _isArc = false;
+ _needSeekToStart = false;
+
+ _phySize_Defined = false;
+
+ _methodsString.Empty();
_stream.Release();
_seqStream.Release();
return S_OK;
@@ -437,146 +518,213 @@ STDMETHODIMP CSeekToSeqStream::Read(void *data, UInt32 size, UInt32 *processedSi
STDMETHODIMP CSeekToSeqStream::Seek(Int64, UInt32, UInt64 *) { return E_NOTIMPL; }
-struct CXzUnpackerCPP
+CXzUnpackerCPP::CXzUnpackerCPP(): InBuf(0), OutBuf(0)
{
- Byte *InBuf;
- Byte *OutBuf;
- CXzUnpacker p;
- CXzUnpackerCPP(): InBuf(0), OutBuf(0)
- {
- XzUnpacker_Construct(&p, &g_Alloc);
- }
- ~CXzUnpackerCPP()
- {
- XzUnpacker_Free(&p);
- MyFree(InBuf);
- MyFree(OutBuf);
- }
-};
+ XzUnpacker_Construct(&p, &g_Alloc);
+}
-STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
- Int32 testMode, IArchiveExtractCallback *extractCallback)
+CXzUnpackerCPP::~CXzUnpackerCPP()
{
- COM_TRY_BEGIN
- if (numItems == 0)
- return S_OK;
- if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0))
- return E_INVALIDARG;
-
- extractCallback->SetTotal(_packSize);
- UInt64 currentTotalPacked = 0;
- RINOK(extractCallback->SetCompleted(&currentTotalPacked));
- CMyComPtr<ISequentialOutStream> realOutStream;
- Int32 askMode = testMode ?
- NExtract::NAskMode::kTest :
- NExtract::NAskMode::kExtract;
-
- RINOK(extractCallback->GetStream(0, &realOutStream, askMode));
-
- if (!testMode && !realOutStream)
- return S_OK;
-
- extractCallback->PrepareOperation(askMode);
-
- if (_stream)
- {
- RINOK(_stream->Seek(_startPosition, STREAM_SEEK_SET, NULL));
- }
-
- CLocalProgress *lps = new CLocalProgress;
- CMyComPtr<ICompressProgressInfo> progress = lps;
- lps->Init(extractCallback, true);
-
- CCompressProgressWrap progressWrap(progress);
+ XzUnpacker_Free(&p);
+ MyFree(InBuf);
+ MyFree(OutBuf);
+}
- SRes res = S_OK;
+HRESULT CDecoder::Decode(ISequentialInStream *seqInStream, ISequentialOutStream *outStream, ICompressProgressInfo *progress)
+{
+ const size_t kInBufSize = 1 << 15;
+ const size_t kOutBufSize = 1 << 21;
- const UInt32 kInBufSize = 1 << 15;
- const UInt32 kOutBufSize = 1 << 21;
+ Clear();
+ DecodeRes = SZ_OK;
- UInt32 inPos = 0;
- UInt32 inSize = 0;
- UInt32 outPos = 0;
- CXzUnpackerCPP xzu;
XzUnpacker_Init(&xzu.p);
- {
+ if (!xzu.InBuf)
xzu.InBuf = (Byte *)MyAlloc(kInBufSize);
+ if (!xzu.OutBuf)
xzu.OutBuf = (Byte *)MyAlloc(kOutBufSize);
- if (xzu.InBuf == 0 || xzu.OutBuf == 0)
- res = SZ_ERROR_MEM;
- }
- if (res == SZ_OK)
+
+ UInt32 inSize = 0;
+ SizeT inPos = 0;
+ SizeT outPos = 0;
+
for (;;)
{
if (inPos == inSize)
{
inPos = inSize = 0;
- RINOK(_seqStream->Read(xzu.InBuf, kInBufSize, &inSize));
+ RINOK(seqInStream->Read(xzu.InBuf, kInBufSize, &inSize));
}
SizeT inLen = inSize - inPos;
SizeT outLen = kOutBufSize - outPos;
ECoderStatus status;
- res = XzUnpacker_Code(&xzu.p,
+
+ SRes res = XzUnpacker_Code(&xzu.p,
xzu.OutBuf + outPos, &outLen,
xzu.InBuf + inPos, &inLen,
(inSize == 0 ? CODER_FINISH_END : CODER_FINISH_ANY), &status);
- // printf("\n_inPos = %6d inLen = %5d, outLen = %5d", inPos, inLen, outLen);
+ inPos += inLen;
+ outPos += outLen;
+
+ InSize += inLen;
+ OutSize += outLen;
- inPos += (UInt32)inLen;
- outPos += (UInt32)outLen;
- lps->InSize += inLen;
- lps->OutSize += outLen;
+ DecodeRes = res;
- bool finished = (((inLen == 0) && (outLen == 0)) || res != SZ_OK);
+ bool finished = ((inLen == 0 && outLen == 0) || res != SZ_OK);
- if (outPos == kOutBufSize || finished)
+ if (outStream)
{
- if (realOutStream && outPos > 0)
+ if (outPos == kOutBufSize || finished)
{
- RINOK(WriteStream(realOutStream, xzu.OutBuf, outPos));
+ if (outPos != 0)
+ {
+ RINOK(WriteStream(outStream, xzu.OutBuf, outPos));
+ outPos = 0;
+ }
}
+ }
+ else
outPos = 0;
+
+ if (progress)
+ {
+ RINOK(progress->SetRatioInfo(&InSize, &OutSize));
}
- RINOK(lps->SetCur());
+
if (finished)
{
- _packSize = lps->InSize;
- _unpackSize = lps->OutSize;
- _packSizeDefined = _unpackSizeDefined = true;
+ PhySize = InSize;
+ NumStreams = xzu.p.numStartedStreams;
+ if (NumStreams > 0)
+ IsArc = true;
+ NumBlocks = xzu.p.numTotalBlocks;
+
+ UnpackSize_Defined = true;
+ NumStreams_Defined = true;
+ NumBlocks_Defined = true;
+
+ UInt64 extraSize = XzUnpacker_GetExtraSize(&xzu.p);
+
if (res == SZ_OK)
{
if (status == CODER_STATUS_NEEDS_MORE_INPUT)
{
- if (XzUnpacker_IsStreamWasFinished(&xzu.p))
- _packSize -= xzu.p.padSize;
- else
+ extraSize = 0;
+ if (!XzUnpacker_IsStreamWasFinished(&xzu.p))
+ {
+ // finished at padding bytes, but padding is not aligned for 4
+ UnexpectedEnd = true;
res = SZ_ERROR_DATA;
+ }
}
- else
+ else // status == CODER_STATUS_NOT_FINISHED
res = SZ_ERROR_DATA;
}
+ else if (res == SZ_ERROR_NO_ARCHIVE)
+ {
+ if (InSize == extraSize)
+ IsArc = false;
+ else
+ {
+ if (extraSize != 0 || inPos != inSize)
+ {
+ DataAfterEnd = true;
+ res = SZ_OK;
+ }
+ }
+ }
+
+ DecodeRes = res;
+ PhySize -= extraSize;
+
+ switch (res)
+ {
+ case SZ_OK: break;
+ case SZ_ERROR_NO_ARCHIVE: IsArc = false; break;
+ case SZ_ERROR_ARCHIVE: HeadersError = true; break;
+ case SZ_ERROR_UNSUPPORTED: Unsupported = true; break;
+ case SZ_ERROR_CRC: CrcError = true; break;
+ case SZ_ERROR_DATA: DataError = true; break;
+ default: DataError = true; break;
+ }
+
break;
}
}
+ return S_OK;
+}
+
+Int32 CDecoder::Get_Extract_OperationResult() const
+{
Int32 opRes;
- switch(res)
+ if (!IsArc)
+ opRes = NExtract::NOperationResult::kIsNotArc;
+ else if (UnexpectedEnd)
+ opRes = NExtract::NOperationResult::kUnexpectedEnd;
+ else if (DataAfterEnd)
+ opRes = NExtract::NOperationResult::kDataAfterEnd;
+ else if (CrcError)
+ opRes = NExtract::NOperationResult::kCRCError;
+ else if (Unsupported)
+ opRes = NExtract::NOperationResult::kUnsupportedMethod;
+ else if (HeadersError)
+ opRes = NExtract::NOperationResult::kDataError;
+ else if (DataError)
+ opRes = NExtract::NOperationResult::kDataError;
+ else if (DecodeRes != SZ_OK)
+ opRes = NExtract::NOperationResult::kDataError;
+ else
+ opRes = NExtract::NOperationResult::kOK;
+ return opRes;
+}
+
+STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
+ Int32 testMode, IArchiveExtractCallback *extractCallback)
+{
+ COM_TRY_BEGIN
+ if (numItems == 0)
+ return S_OK;
+ if (numItems != (UInt32)(Int32)-1 && (numItems != 1 || indices[0] != 0))
+ return E_INVALIDARG;
+
+ if (_phySize_Defined)
+ extractCallback->SetTotal(_stat.PhySize);
+
+ UInt64 currentTotalPacked = 0;
+ RINOK(extractCallback->SetCompleted(&currentTotalPacked));
+ CMyComPtr<ISequentialOutStream> realOutStream;
+ Int32 askMode = testMode ?
+ NExtract::NAskMode::kTest :
+ NExtract::NAskMode::kExtract;
+
+ RINOK(extractCallback->GetStream(0, &realOutStream, askMode));
+
+ if (!testMode && !realOutStream)
+ return S_OK;
+
+ extractCallback->PrepareOperation(askMode);
+
+ CLocalProgress *lps = new CLocalProgress;
+ CMyComPtr<ICompressProgressInfo> lpsRef = lps;
+ lps->Init(extractCallback, true);
+
+ if (_needSeekToStart)
{
- case SZ_OK:
- opRes = NExtract::NOperationResult::kOK; break;
- case SZ_ERROR_UNSUPPORTED:
- opRes = NExtract::NOperationResult::kUnSupportedMethod; break;
- case SZ_ERROR_CRC:
- opRes = NExtract::NOperationResult::kCRCError; break;
- case SZ_ERROR_DATA:
- case SZ_ERROR_ARCHIVE:
- case SZ_ERROR_NO_ARCHIVE:
- opRes = NExtract::NOperationResult::kDataError; break;
- default:
- return SResToHRESULT(res);
+ if (!_stream)
+ return E_FAIL;
+ RINOK(_stream->Seek(0, STREAM_SEEK_SET, NULL));
}
+ else
+ _needSeekToStart = true;
+
+ CDecoder decoder;
+ RINOK(Decode2(_seqStream, realOutStream, decoder, lpsRef));
+ Int32 opRes = decoder.Get_Extract_OperationResult();
+
realOutStream.Release();
return extractCallback->SetOperationResult(opRes);
COM_TRY_END
@@ -593,6 +741,8 @@ STDMETHODIMP CHandler::GetFileTimeType(UInt32 *timeType)
STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems,
IArchiveUpdateCallback *updateCallback)
{
+ COM_TRY_BEGIN
+
CSeqOutStreamWrap seqOutStream(outStream);
if (numItems == 0)
@@ -648,7 +798,7 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
RINOK(NCompress::NLzma2::SetLzma2Prop(NCoderPropID::kReduceSize, prop, lzma2Props));
}
- for (int i = 0; i < _methods.Size(); i++)
+ FOR_VECTOR (i, _methods)
{
COneMethodInfo &m = _methods[i];
SetGlobalLevelAndThreads(m
@@ -657,7 +807,7 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
#endif
);
{
- for (int j = 0; j < m.Props.Size(); j++)
+ FOR_VECTOR (j, m.Props)
{
const CProp &prop = m.Props[j];
RINOK(NCompress::NLzma2::SetLzma2Prop(prop.Id, prop.Value, lzma2Props));
@@ -692,7 +842,7 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
if (_filterId == XZ_ID_Delta)
{
bool deltaDefined = false;
- for (int j = 0; j < _filterMethod.Props.Size(); j++)
+ FOR_VECTOR (j, _filterMethod.Props)
{
const CProp &prop = _filterMethod.Props[j];
if (prop.Id == NCoderPropID::kDefaultProp && prop.Value.vt == VT_UI4)
@@ -712,32 +862,50 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
return updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK);
return SResToHRESULT(res);
}
+
if (indexInArchive != 0)
return E_INVALIDARG;
+
+ CMyComPtr<IArchiveUpdateCallbackFile> opCallback;
+ updateCallback->QueryInterface(IID_IArchiveUpdateCallbackFile, (void **)&opCallback);
+ if (opCallback)
+ {
+ RINOK(opCallback->ReportOperation(NEventIndexType::kInArcIndex, 0, NUpdateNotifyOp::kReplicate))
+ }
+
if (_stream)
- RINOK(_stream->Seek(_startPosition, STREAM_SEEK_SET, NULL));
- return NCompress::CopyStream(_stream, outStream, 0);
-}
+ {
+ if (_phySize_Defined)
+ RINOK(updateCallback->SetTotal(_stat.PhySize));
+ RINOK(_stream->Seek(0, STREAM_SEEK_SET, NULL));
+ }
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+ CLocalProgress *lps = new CLocalProgress;
+ CMyComPtr<ICompressProgressInfo> progress = lps;
+ lps->Init(updateCallback, true);
-STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps)
+ return NCompress::CopyStream(_stream, outStream, progress);
+
+ COM_TRY_END
+}
+
+STDMETHODIMP CHandler::SetProperties(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps)
{
COM_TRY_BEGIN
+
Init();
- for (int i = 0; i < numProps; i++)
+ for (UInt32 i = 0; i < numProps; i++)
{
RINOK(SetProperty(names[i], values[i]));
}
if (!_filterMethod.MethodName.IsEmpty())
{
- int k;
+ unsigned k;
for (k = 0; k < ARRAY_SIZE(g_NamePairs); k++)
{
const CMethodNamePair &pair = g_NamePairs[k];
- UString m = GetUnicodeString(pair.Name);
- if (_filterMethod.MethodName.CompareNoCase(m) == 0)
+ if (StringsAreEqualNoCase_Ascii(_filterMethod.MethodName, pair.Name))
{
_filterId = pair.Id;
break;
@@ -747,34 +915,30 @@ STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *v
return E_INVALIDARG;
}
- int numEmptyMethods = GetNumEmptyMethods();
- _methods.Delete(0, numEmptyMethods);
+ _methods.DeleteFrontal(GetNumEmptyMethods());
if (_methods.Size() > 1)
return E_INVALIDARG;
if (_methods.Size() == 1)
{
- UString &methodName = _methods[0].MethodName;
+ AString &methodName = _methods[0].MethodName;
if (methodName.IsEmpty())
methodName = k_LZMA2_Name;
- else if (methodName.CompareNoCase(k_LZMA2_Name) != 0)
+ else if (!methodName.IsEqualTo_Ascii_NoCase(k_LZMA2_Name))
return E_INVALIDARG;
}
+
return S_OK;
+
COM_TRY_END
}
#endif
-static IInArchive *CreateArc() { return new NArchive::NXz::CHandler; }
-#ifndef EXTRACT_ONLY
-static IOutArchive *CreateArcOut() { return new NArchive::NXz::CHandler; }
-#else
-#define CreateArcOut 0
-#endif
-
-static CArcInfo g_ArcInfo =
- { L"xz", L"xz txz", L"* .tar", 0xC, {0xFD, '7' , 'z', 'X', 'Z', '\0'}, 6, true, CreateArc, CreateArcOut };
-
-REGISTER_ARC(xz)
+REGISTER_ARC_IO(
+ "xz", "xz txz", "* .tar", 0xC,
+ XZ_SIG,
+ 0,
+ NArcInfoFlags::kKeepName,
+ NULL)
}}
diff --git a/3rdparty/lzma/CPP/7zip/Archive/XzHandler.h b/3rdparty/lzma/CPP/7zip/Archive/XzHandler.h
new file mode 100644
index 00000000000..4a59e356a85
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Archive/XzHandler.h
@@ -0,0 +1,65 @@
+// XzHandler.h
+
+#ifndef __XZ_HANDLER_H
+#define __XZ_HANDLER_H
+
+#include "../../../C/Xz.h"
+
+#include "../ICoder.h"
+
+namespace NArchive {
+namespace NXz {
+
+struct CXzUnpackerCPP
+{
+ Byte *InBuf;
+ Byte *OutBuf;
+ CXzUnpacker p;
+
+ CXzUnpackerCPP();
+ ~CXzUnpackerCPP();
+};
+
+struct CStatInfo
+{
+ UInt64 InSize;
+ UInt64 OutSize;
+ UInt64 PhySize;
+
+ UInt64 NumStreams;
+ UInt64 NumBlocks;
+
+ bool UnpackSize_Defined;
+
+ bool NumStreams_Defined;
+ bool NumBlocks_Defined;
+
+ bool IsArc;
+ bool UnexpectedEnd;
+ bool DataAfterEnd;
+ bool Unsupported;
+ bool HeadersError;
+ bool DataError;
+ bool CrcError;
+
+ CStatInfo() { Clear(); }
+
+ void Clear();
+};
+
+struct CDecoder: public CStatInfo
+{
+ CXzUnpackerCPP xzu;
+ SRes DecodeRes; // it's not HRESULT
+
+ CDecoder(): DecodeRes(SZ_OK) {}
+
+ /* Decode() can return ERROR code only if there is progress or stream error.
+ Decode() returns S_OK in case of xz decoding error, but DecodeRes and CStatInfo contain error information */
+ HRESULT Decode(ISequentialInStream *seqInStream, ISequentialOutStream *outStream, ICompressProgressInfo *compressProgress);
+ Int32 Get_Extract_OperationResult() const;
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Asm.mak b/3rdparty/lzma/CPP/7zip/Asm.mak
index 4ab94f153f1..4f77dddfad0 100644
--- a/3rdparty/lzma/CPP/7zip/Asm.mak
+++ b/3rdparty/lzma/CPP/7zip/Asm.mak
@@ -1,3 +1,4 @@
+!IFDEF ASM_OBJS
!IF "$(CPU)" == "ARM"
$(ASM_OBJS): ../../../../Asm/Arm/$(*B).asm
$(COMPL_ASM)
@@ -5,3 +6,4 @@ $(ASM_OBJS): ../../../../Asm/Arm/$(*B).asm
$(ASM_OBJS): ../../../../Asm/x86/$(*B).asm
$(COMPL_ASM)
!ENDIF
+!ENDIF
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp
index a89e85170d6..d220b198b37 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp
@@ -44,7 +44,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /Gz /MT /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gr /MT /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /FAc /Yu"StdAfx.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
@@ -52,7 +52,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"c:\UTIL\7zr.exe" /opt:NOWIN98
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"c:\UTIL\7zr.exe" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "Alone - Win32 Debug"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /Gz /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /GZ /c
+# ADD CPP /nologo /Gr /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"c:\UTIL\7zr.exe" /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"c:\UTIL\7zr.exe" /pdbtype:sept
!ELSEIF "$(CFG)" == "Alone - Win32 ReleaseU"
@@ -94,7 +94,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "EXCLUDE_COM" /D "NO_REGISTRY" /Yu"StdAfx.h" /FD /c
-# ADD CPP /nologo /Gz /MD /W4 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "_CONSOLE" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gr /MD /W4 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "_CONSOLE" /Yu"StdAfx.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
@@ -103,7 +103,7 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"c:\UTIL\7za.exe" /opt:NOWIN98
# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"c:\UTIL\7zr.exe" /opt:NOWIN98
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"c:\UTIL\7zr.exe" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "Alone - Win32 DebugU"
@@ -121,7 +121,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "_MBCS" /Yu"StdAfx.h" /FD /GZ /c
-# ADD CPP /nologo /Gz /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_CONSOLE" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /GZ /c
+# ADD CPP /nologo /Gr /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_CONSOLE" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
@@ -129,7 +129,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"c:\UTIL\7za.exe" /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"c:\UTIL\7zr.exe" /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"c:\UTIL\7zr.exe" /pdbtype:sept
!ENDIF
@@ -176,6 +176,14 @@ SOURCE=..\..\UI\Console\ExtractCallbackConsole.h
# End Source File
# Begin Source File
+SOURCE=..\..\UI\Console\HashCon.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\HashCon.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\UI\Console\List.cpp
# End Source File
# Begin Source File
@@ -185,6 +193,7 @@ SOURCE=..\..\UI\Console\List.h
# Begin Source File
SOURCE=..\..\UI\Console\Main.cpp
+# ADD CPP /D "PROG_VARIANT_R"
# End Source File
# Begin Source File
@@ -269,6 +278,10 @@ SOURCE=..\..\..\Common\CRC.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\CrcReg.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\Defs.h
# End Source File
# Begin Source File
@@ -337,6 +350,10 @@ SOURCE=..\..\..\Common\NewHandler.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\Sha256Reg.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\StdInStream.cpp
# End Source File
# Begin Source File
@@ -387,6 +404,10 @@ SOURCE=..\..\..\Common\Wildcard.cpp
SOURCE=..\..\..\Common\Wildcard.h
# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\XzCrc64Reg.cpp
+# End Source File
# End Group
# Begin Group "Windows"
@@ -409,11 +430,11 @@ SOURCE=..\..\..\Windows\DLL.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\Error.cpp
+SOURCE=..\..\..\Windows\ErrorMsg.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\Error.h
+SOURCE=..\..\..\Windows\ErrorMsg.h
# End Source File
# Begin Source File
@@ -441,6 +462,10 @@ SOURCE=..\..\..\Windows\FileIO.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Windows\FileLink.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Windows\FileMapping.h
# End Source File
# Begin Source File
@@ -473,11 +498,11 @@ SOURCE=..\..\..\Windows\PropVariant.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\PropVariantConversions.cpp
+SOURCE=..\..\..\Windows\PropVariantConv.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\PropVariantConversions.h
+SOURCE=..\..\..\Windows\PropVariantConv.h
# End Source File
# Begin Source File
@@ -501,11 +526,11 @@ SOURCE=..\..\..\Windows\Thread.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\Time.cpp
+SOURCE=..\..\..\Windows\TimeUtils.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\Time.h
+SOURCE=..\..\..\Windows\TimeUtils.h
# End Source File
# End Group
# Begin Group "7zip Common"
@@ -521,14 +546,6 @@ SOURCE=..\..\Common\CreateCoder.h
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Common\CrossThreadProgress.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Common\CrossThreadProgress.h
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Common\CWrappers.cpp
# End Source File
# Begin Source File
@@ -633,6 +650,10 @@ SOURCE=..\..\Common\ProgressUtils.h
# End Source File
# Begin Source File
+SOURCE=..\..\Common\PropId.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Common\RegisterArc.h
# End Source File
# Begin Source File
@@ -665,6 +686,14 @@ SOURCE=..\..\Common\StreamUtils.h
# End Source File
# Begin Source File
+SOURCE=..\..\Common\UniqBlocks.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\UniqBlocks.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Common\VirtThread.cpp
# End Source File
# Begin Source File
@@ -701,14 +730,6 @@ SOURCE=..\..\Compress\BcjRegister.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\Compress\BranchCoder.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Compress\BranchCoder.h
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Compress\BranchMisc.cpp
# End Source File
# Begin Source File
@@ -783,22 +804,6 @@ SOURCE=..\..\Compress\LzmaEncoder.h
SOURCE=..\..\Compress\LzmaRegister.cpp
# End Source File
-# Begin Source File
-
-SOURCE=..\..\Compress\RangeCoder.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Compress\RangeCoderBit.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Compress\RangeCoderBitTree.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Compress\RangeCoderOpt.h
-# End Source File
# End Group
# Begin Group "Archive"
@@ -844,14 +849,6 @@ SOURCE=..\..\Archive\7z\7zFolderInStream.h
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\7z\7zFolderOutStream.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\7z\7zFolderOutStream.h
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Archive\7z\7zHandler.cpp
# End Source File
# Begin Source File
@@ -932,14 +929,6 @@ SOURCE=..\..\Archive\Common\CoderMixer2.h
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Common\CoderMixer2MT.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Common\CoderMixer2MT.h
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Archive\Common\DummyOutStream.cpp
# End Source File
# Begin Source File
@@ -997,6 +986,10 @@ SOURCE=..\..\Archive\Common\ParseProperties.h
# End Group
# Begin Source File
+SOURCE=..\..\Archive\IArchive.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Archive\LzmaHandler.cpp
# End Source File
# Begin Source File
@@ -1077,6 +1070,14 @@ SOURCE=..\..\UI\Common\ExtractingFilePath.h
# End Source File
# Begin Source File
+SOURCE=..\..\UI\Common\HashCalc.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\HashCalc.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\UI\Common\LoadCodecs.cpp
# End Source File
# Begin Source File
@@ -1288,6 +1289,30 @@ SOURCE=..\..\..\..\C\XzCrc64.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\XzCrc64Opt.c
+
+!IF "$(CFG)" == "Alone - Win32 Release"
+
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 Debug"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 ReleaseU"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 DebugU"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\XzDec.c
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -1404,6 +1429,58 @@ SOURCE=..\..\..\..\C\7zStream.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\Aes.c
+
+!IF "$(CFG)" == "Alone - Win32 Release"
+
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 Debug"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 ReleaseU"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 DebugU"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Aes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\AesOpt.c
+
+!IF "$(CFG)" == "Alone - Win32 Release"
+
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 Debug"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 ReleaseU"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 DebugU"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Alloc.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -1413,6 +1490,58 @@ SOURCE=..\..\..\..\C\Alloc.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\Bcj2.c
+
+!IF "$(CFG)" == "Alone - Win32 Release"
+
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 Debug"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 ReleaseU"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 DebugU"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bcj2.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bcj2Enc.c
+
+!IF "$(CFG)" == "Alone - Win32 Release"
+
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 Debug"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 ReleaseU"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "Alone - Win32 DebugU"
+
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Bra.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -1652,5 +1781,37 @@ SOURCE=..\..\..\..\C\Threads.h
SOURCE=..\..\..\..\C\Types.h
# End Source File
# End Group
+# Begin Group "Crypto"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Crypto\7zAes.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\7zAes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\7zAesRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\MyAes.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\MyAes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\RandGen.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\RandGen.h
+# End Source File
+# End Group
# End Target
# End Project
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h
index 2e4be10b291..2854ff3e935 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../../Common/MyWindows.h"
-#include "../../../Common/NewHandler.h"
+#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile
index 8de884f7318..15c51f91987 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile
@@ -1,52 +1,43 @@
PROG = 7zr.exe
MY_CONSOLE = 1
-CFLAGS = $(CFLAGS) -I ../../../ \
- -D_NO_CRYPTO \
+CFLAGS = $(CFLAGS) -DPROG_VARIANT_R
!IFNDEF UNDER_CE
CFLAGS = $(CFLAGS) -DWIN_LONG_PATH
!ENDIF
-CONSOLE_OBJS = \
- $O\BenchCon.obj \
- $O\ConsoleClose.obj \
- $O\ExtractCallbackConsole.obj \
- $O\List.obj \
- $O\Main.obj \
- $O\MainAr.obj \
- $O\OpenCallbackConsole.obj \
- $O\PercentPrinter.obj \
- $O\UpdateCallbackConsole.obj \
- $O\UserInputUtils.obj \
-
COMMON_OBJS = \
$O\CommandLineParser.obj \
$O\CRC.obj \
+ $O\CrcReg.obj \
$O\IntToString.obj \
$O\ListFileUtils.obj \
$O\NewHandler.obj \
$O\StdInStream.obj \
$O\StdOutStream.obj \
$O\MyString.obj \
+ $O\Sha256Reg.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\UTFConvert.obj \
$O\MyVector.obj \
$O\Wildcard.obj \
+ $O\XzCrc64Reg.obj \
WIN_OBJS = \
$O\DLL.obj \
- $O\Error.obj \
+ $O\ErrorMsg.obj \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
+ $O\FileLink.obj \
$O\FileName.obj \
$O\MemoryLock.obj \
$O\PropVariant.obj \
- $O\PropVariantConversions.obj \
+ $O\PropVariantConv.obj \
$O\Synchronization.obj \
$O\System.obj \
- $O\Time.obj \
+ $O\TimeUtils.obj \
7ZIP_COMMON_OBJS = \
$O\CreateCoder.obj \
@@ -57,38 +48,18 @@ WIN_OBJS = \
$O\InOutTempBuffer.obj \
$O\FilterCoder.obj \
$O\LimitedStreams.obj \
- $O\LockedStream.obj \
$O\MethodId.obj \
$O\MethodProps.obj \
$O\OffsetStream.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
+ $O\PropId.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
+ $O\UniqBlocks.obj \
$O\VirtThread.obj \
-UI_COMMON_OBJS = \
- $O\ArchiveCommandLine.obj \
- $O\ArchiveExtractCallback.obj \
- $O\ArchiveOpenCallback.obj \
- $O\Bench.obj \
- $O\DefaultName.obj \
- $O\EnumDirItems.obj \
- $O\Extract.obj \
- $O\ExtractingFilePath.obj \
- $O\LoadCodecs.obj \
- $O\OpenArchive.obj \
- $O\PropIDUtils.obj \
- $O\SetProperties.obj \
- $O\SortUtils.obj \
- $O\TempFiles.obj \
- $O\Update.obj \
- $O\UpdateAction.obj \
- $O\UpdateCallback.obj \
- $O\UpdatePair.obj \
- $O\UpdateProduce.obj \
-
AR_OBJS = \
$O\LzmaHandler.obj \
$O\SplitHandler.obj \
@@ -96,8 +67,6 @@ AR_OBJS = \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
- $O\CoderMixer2MT.obj \
- $O\CrossThreadProgress.obj \
$O\DummyOutStream.obj \
$O\HandlerOut.obj \
$O\InStreamWithCRC.obj \
@@ -113,7 +82,6 @@ AR_COMMON_OBJS = \
$O\7zEncode.obj \
$O\7zExtract.obj \
$O\7zFolderInStream.obj \
- $O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHandlerOut.obj \
$O\7zHeader.obj \
@@ -129,7 +97,6 @@ COMPRESS_OBJS = \
$O\Bcj2Register.obj \
$O\BcjCoder.obj \
$O\BcjRegister.obj \
- $O\BranchCoder.obj \
$O\BranchMisc.obj \
$O\BranchRegister.obj \
$O\ByteSwap.obj \
@@ -143,9 +110,18 @@ COMPRESS_OBJS = \
$O\LzmaEncoder.obj \
$O\LzmaRegister.obj \
+CRYPTO_OBJS = \
+ $O\7zAes.obj \
+ $O\7zAesRegister.obj \
+ $O\MyAes.obj \
+ $O\MyAesReg.obj \
+ $O\RandGen.obj \
+
C_OBJS = \
$O\7zStream.obj \
$O\Alloc.obj \
+ $O\Bcj2.obj \
+ $O\Bcj2Enc.obj \
$O\Bra.obj \
$O\Bra86.obj \
$O\BraIA64.obj \
@@ -159,54 +135,17 @@ C_OBJS = \
$O\LzmaEnc.obj \
$O\MtCoder.obj \
$O\Sha256.obj \
+ $O\Sort.obj \
$O\Threads.obj \
$O\Xz.obj \
- $O\XzCrc64.obj \
$O\XzDec.obj \
$O\XzEnc.obj \
$O\XzIn.obj \
-!include "../../Crc.mak"
-
-OBJS = \
- $O\StdAfx.obj \
- $(CONSOLE_OBJS) \
- $(COMMON_OBJS) \
- $(WIN_OBJS) \
- $(7ZIP_COMMON_OBJS) \
- $(UI_COMMON_OBJS) \
- $(AR_OBJS) \
- $(AR_COMMON_OBJS) \
- $(7Z_OBJS) \
- $(COMPRESS_OBJS) \
- $(C_OBJS) \
- $(ASM_OBJS) \
- $O\resource.res
+!include "../../UI/Console/Console.mak"
+!include "../../Aes.mak"
+!include "../../Crc.mak"
+!include "../../Crc64.mak"
-!include "../../../Build.mak"
-
-$(CONSOLE_OBJS): ../../UI/Console/$(*B).cpp
- $(COMPL)
-
-$(COMMON_OBJS): ../../../Common/$(*B).cpp
- $(COMPL)
-$(WIN_OBJS): ../../../Windows/$(*B).cpp
- $(COMPL)
-$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
- $(COMPL)
-$(UI_COMMON_OBJS): ../../UI/Common/$(*B).cpp
- $(COMPL)
-$(AR_OBJS): ../../Archive/$(*B).cpp
- $(COMPL)
-$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
- $(COMPL)
-
-$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
- $(COMPL)
-$(COMPRESS_OBJS): ../../Compress/$(*B).cpp
- $(COMPL_O2)
-$(C_OBJS): ../../../../C/$(*B).c
- $(COMPL_O2)
-
-!include "../../Asm.mak"
+!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h
index 2e4be10b291..2854ff3e935 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../../Common/MyWindows.h"
-#include "../../../Common/NewHandler.h"
+#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile b/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile
index e953af905e7..724477e9493 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile
@@ -1,11 +1,12 @@
PROG = 7zxr.dll
DEF_FILE = ../../Archive/Archive2.def
-CFLAGS = $(CFLAGS) -I ../../../ \
+CFLAGS = $(CFLAGS) \
-DEXTRACT_ONLY \
-D_NO_CRYPTO
COMMON_OBJS = \
$O\CRC.obj \
+ $O\CrcReg.obj \
$O\IntToString.obj \
$O\NewHandler.obj \
$O\MyString.obj \
@@ -25,11 +26,11 @@ WIN_OBJS = \
$O\InBuffer.obj \
$O\FilterCoder.obj \
$O\LimitedStreams.obj \
- $O\LockedStream.obj \
$O\MethodId.obj \
$O\MethodProps.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
+ $O\PropId.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
@@ -41,8 +42,6 @@ AR_OBJS = \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
- $O\CoderMixer2MT.obj \
- $O\CrossThreadProgress.obj \
$O\HandlerOut.obj \
$O\ItemNameUtils.obj \
$O\OutStreamWithCRC.obj \
@@ -53,7 +52,6 @@ AR_COMMON_OBJS = \
$O\7zCompressionMode.obj \
$O\7zDecode.obj \
$O\7zExtract.obj \
- $O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHeader.obj \
$O\7zIn.obj \
@@ -67,7 +65,6 @@ COMPRESS_OBJS = \
$O\Bcj2Register.obj \
$O\BcjCoder.obj \
$O\BcjRegister.obj \
- $O\BranchCoder.obj \
$O\BranchMisc.obj \
$O\BranchRegister.obj \
$O\ByteSwap.obj \
@@ -81,6 +78,7 @@ COMPRESS_OBJS = \
C_OBJS = \
$O\Alloc.obj \
+ $O\Bcj2.obj \
$O\Bra.obj \
$O\Bra86.obj \
$O\BraIA64.obj \
@@ -92,41 +90,4 @@ C_OBJS = \
!include "../../Crc.mak"
-OBJS = \
- $O\StdAfx.obj \
- $(CONSOLE_OBJS) \
- $(COMMON_OBJS) \
- $(WIN_OBJS) \
- $(7ZIP_COMMON_OBJS) \
- $(AR_OBJS) \
- $(AR_COMMON_OBJS) \
- $(7Z_OBJS) \
- $(COMPRESS_OBJS) \
- $(C_OBJS) \
- $(ASM_OBJS) \
- $O\resource.res
-
-
-!include "../../../Build.mak"
-
-$(COMMON_OBJS): ../../../Common/$(*B).cpp
- $(COMPL)
-$(WIN_OBJS): ../../../Windows/$(*B).cpp
- $(COMPL)
-$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
- $(COMPL)
-$(AR_OBJS): ../../Archive/$(*B).cpp
- $(COMPL)
-$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
- $(COMPL)
-
-$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
- $(COMPL)
-
-$(COMPRESS_OBJS): ../../Compress/$(*B).cpp
- $(COMPL_O2)
-
-$(C_OBJS): ../../../../C/$(*B).c
- $(COMPL_O2)
-
-!include "../../Asm.mak"
+!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h
index 2e4be10b291..2854ff3e935 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../../Common/MyWindows.h"
-#include "../../../Common/NewHandler.h"
+#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/makefile b/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/makefile
index d7ffcea1654..916dc568c38 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/makefile
@@ -1,10 +1,11 @@
PROG = 7zra.dll
DEF_FILE = ../../Archive/Archive2.def
-CFLAGS = $(CFLAGS) -I ../../../ \
+CFLAGS = $(CFLAGS) \
-D_NO_CRYPTO
COMMON_OBJS = \
$O\CRC.obj \
+ $O\CrcReg.obj \
$O\IntToString.obj \
$O\NewHandler.obj \
$O\MyString.obj \
@@ -17,6 +18,7 @@ WIN_OBJS = \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
+ $O\FileName.obj \
$O\PropVariant.obj \
$O\Synchronization.obj \
$O\System.obj \
@@ -28,14 +30,15 @@ WIN_OBJS = \
$O\InOutTempBuffer.obj \
$O\FilterCoder.obj \
$O\LimitedStreams.obj \
- $O\LockedStream.obj \
$O\MethodId.obj \
$O\MethodProps.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
+ $O\PropId.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
+ $O\UniqBlocks.obj \
$O\VirtThread.obj \
AR_OBJS = \
@@ -44,8 +47,6 @@ AR_OBJS = \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
- $O\CoderMixer2MT.obj \
- $O\CrossThreadProgress.obj \
$O\HandlerOut.obj \
$O\InStreamWithCRC.obj \
$O\ItemNameUtils.obj \
@@ -59,7 +60,6 @@ AR_COMMON_OBJS = \
$O\7zEncode.obj \
$O\7zExtract.obj \
$O\7zFolderInStream.obj \
- $O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHandlerOut.obj \
$O\7zHeader.obj \
@@ -77,7 +77,6 @@ COMPRESS_OBJS = \
$O\Bcj2Register.obj \
$O\BcjCoder.obj \
$O\BcjRegister.obj \
- $O\BranchCoder.obj \
$O\BranchMisc.obj \
$O\BranchRegister.obj \
$O\ByteSwap.obj \
@@ -93,6 +92,8 @@ COMPRESS_OBJS = \
C_OBJS = \
$O\Alloc.obj \
+ $O\Bcj2.obj \
+ $O\Bcj2Enc.obj \
$O\Bra.obj \
$O\Bra86.obj \
$O\BraIA64.obj \
@@ -109,41 +110,4 @@ C_OBJS = \
!include "../../Crc.mak"
-OBJS = \
- $O\StdAfx.obj \
- $(CONSOLE_OBJS) \
- $(COMMON_OBJS) \
- $(WIN_OBJS) \
- $(7ZIP_COMMON_OBJS) \
- $(AR_OBJS) \
- $(AR_COMMON_OBJS) \
- $(7Z_OBJS) \
- $(COMPRESS_OBJS) \
- $(C_OBJS) \
- $(ASM_OBJS) \
- $O\resource.res
-
-
-!include "../../../Build.mak"
-
-$(COMMON_OBJS): ../../../Common/$(*B).cpp
- $(COMPL)
-$(WIN_OBJS): ../../../Windows/$(*B).cpp
- $(COMPL)
-$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
- $(COMPL)
-$(AR_OBJS): ../../Archive/$(*B).cpp
- $(COMPL)
-$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
- $(COMPL)
-
-$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
- $(COMPL)
-
-$(COMPRESS_OBJS): ../../Compress/$(*B).cpp
- $(COMPL_O2)
-
-$(C_OBJS): ../../../../C/$(*B).c
- $(COMPL_O2)
-
-!include "../../Asm.mak"
+!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp
index e0f4dcba3d4..5ca288f4696 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp
@@ -12,7 +12,7 @@
#define MY_SET_BINARY_MODE(file)
#endif
-// #include "../../../Common/MyWindows.h"
+#include "../../../Common/MyWindows.h"
#include "../../../Common/MyInitGuid.h"
#include "../../../../C/7zVersion.h"
@@ -25,6 +25,7 @@
#include "../../../Windows/System.h"
#endif
+#include "../../../Common/IntToString.h"
#include "../../../Common/CommandLineParser.h"
#include "../../../Common/StringConvert.h"
#include "../../../Common/StringToInt.h"
@@ -36,14 +37,41 @@
#include "../../Compress/LzmaEncoder.h"
#include "../../UI/Console/BenchCon.h"
-
+#include "../../UI/Console/ConsoleClose.h"
using namespace NCommandLineParser;
+static const unsigned kDictSizeLog = 24;
+
+static const char *kCopyrightString = "\nLZMA " MY_VERSION_COPYRIGHT_DATE "\n\n";
+
+static const char *kHelpString =
+ "Usage: LZMA <command> [inputFile] [outputFile] [<switches>...]\n"
+ "\n"
+ "<command>\n"
+ " e : Encode file\n"
+ " d : Decode file\n"
+ " b : Benchmark\n"
+ "<switches>\n"
+ " -a{N} : set compression mode : [0, 1] : default = 1 (max)\n"
+ " -d{N} : set dictionary size : [12, 30] : default = 24 (16 MiB)\n"
+ " -fb{N} : set number of fast bytes : [5, 273] : default = 128\n"
+ " -mc{N} : set number of cycles for match finder\n"
+ " -lc{N} : set number of literal context bits : [0, 8] : default = 3\n"
+ " -lp{N} : set number of literal pos bits : [0, 4] : default = 0\n"
+ " -pb{N} : set number of pos bits : [0, 4] : default = 2\n"
+ " -mf{M} : set match finder: [hc4, bt2, bt3, bt4] : default = bt4\n"
+ " -mt{N} : set number of CPU threads\n"
+ " -eos : write end of stream marker\n"
+ " -si : read data from stdin\n"
+ " -so : write data to stdout\n";
+
+
static const char *kCantAllocate = "Can not allocate memory";
static const char *kReadError = "Read error";
static const char *kWriteError = "Write error";
+
namespace NKey {
enum Enum
{
@@ -69,101 +97,214 @@ enum Enum
static const CSwitchForm kSwitchForms[] =
{
- { L"?", NSwitchType::kSimple, false },
- { L"H", NSwitchType::kSimple, false },
- { L"MM", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"X", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"A", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"D", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"FB", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"MC", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"LC", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"LP", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"PB", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"MF", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"MT", NSwitchType::kUnLimitedPostString, false, 0 },
- { L"EOS", NSwitchType::kSimple, false },
- { L"SI", NSwitchType::kSimple, false },
- { L"SO", NSwitchType::kSimple, false },
- { L"F86", NSwitchType::kPostChar, false, 0, 0, L"+" }
+ { "?", NSwitchType::kSimple, false },
+ { "H", NSwitchType::kSimple, false },
+ { "MM", NSwitchType::kString, false, 1 },
+ { "X", NSwitchType::kString, false, 1 },
+ { "A", NSwitchType::kString, false, 1 },
+ { "D", NSwitchType::kString, false, 1 },
+ { "FB", NSwitchType::kString, false, 1 },
+ { "MC", NSwitchType::kString, false, 1 },
+ { "LC", NSwitchType::kString, false, 1 },
+ { "LP", NSwitchType::kString, false, 1 },
+ { "PB", NSwitchType::kString, false, 1 },
+ { "MF", NSwitchType::kString, false, 1 },
+ { "MT", NSwitchType::kString, false, 0 },
+ { "EOS", NSwitchType::kSimple, false },
+ { "SI", NSwitchType::kSimple, false },
+ { "SO", NSwitchType::kSimple, false },
+ { "F86", NSwitchType::kChar, false, 0, "+" }
};
-static const int kNumSwitches = sizeof(kSwitchForms) / sizeof(kSwitchForms[0]);
-static void PrintMessage(const char *s)
+static void PrintErr(const char *s)
{
fputs(s, stderr);
}
+static void PrintErr_LF(const char *s)
+{
+ PrintErr(s);
+ fputc('\n', stderr);
+}
+
+
+static void PrintError(const char *s)
+{
+ PrintErr("\nERROR: ");
+ PrintErr_LF(s);
+}
+
+static void PrintError2(const char *s1, const wchar_t *s2)
+{
+ PrintError(s1);
+ PrintErr_LF(GetOemString(s2));
+}
+
+static void PrintError_int(const char *s, int code)
+{
+ PrintError(s);
+ char temp[32];
+ ConvertInt64ToString(code, temp);
+ PrintErr("Error code = ");
+ PrintErr_LF(temp);
+}
+
+
+
+static void Print(const char *s)
+{
+ fputs(s, stdout);
+}
+
+static void Print_UInt64(UInt64 v)
+{
+ char temp[32];
+ ConvertUInt64ToString(v, temp);
+ Print(temp);
+}
+
+static void Print_MB(UInt64 v)
+{
+ Print_UInt64(v);
+ Print(" MiB");
+}
+
+static void Print_Size(const char *s, UInt64 v)
+{
+ Print(s);
+ Print_UInt64(v);
+ Print(" (");
+ Print_MB(v >> 20);
+ Print(")\n");
+}
+
+static void PrintTitle()
+{
+ Print(kCopyrightString);
+}
+
static void PrintHelp()
{
- PrintMessage("\nUsage: LZMA <e|d> inputFile outputFile [<switches>...]\n"
- " e: encode file\n"
- " d: decode file\n"
- " b: Benchmark\n"
- "<Switches>\n"
- " -a{N}: set compression mode - [0, 1], default: 1 (max)\n"
- " -d{N}: set dictionary size - [12, 30], default: 23 (8MB)\n"
- " -fb{N}: set number of fast bytes - [5, 273], default: 128\n"
- " -mc{N}: set number of cycles for match finder\n"
- " -lc{N}: set number of literal context bits - [0, 8], default: 3\n"
- " -lp{N}: set number of literal pos bits - [0, 4], default: 0\n"
- " -pb{N}: set number of pos bits - [0, 4], default: 2\n"
- " -mf{MF_ID}: set Match Finder: [bt2, bt3, bt4, hc4], default: bt4\n"
- " -mt{N}: set number of CPU threads\n"
- " -eos: write End Of Stream marker\n"
- " -si: read data from stdin\n"
- " -so: write data to stdout\n"
- );
+ PrintTitle();
+ Print(kHelpString);
}
-static void PrintHelpAndExit(const char *s)
+class CProgressPrint:
+ public ICompressProgressInfo,
+ public CMyUnknownImp
{
- fprintf(stderr, "\nError: %s\n\n", s);
- PrintHelp();
- throw -1;
+ UInt64 _size1;
+ UInt64 _size2;
+public:
+ CProgressPrint(): _size1(0), _size2(0) {}
+
+ void ClosePrint();
+
+ MY_UNKNOWN_IMP1(ICompressProgressInfo)
+
+ STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
+};
+
+#define BACK_STR \
+"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"
+static const char *kBackSpaces =
+BACK_STR
+" "
+BACK_STR;
+
+
+void CProgressPrint::ClosePrint()
+{
+ Print(kBackSpaces);
}
-static void IncorrectCommand()
+STDMETHODIMP CProgressPrint::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize)
{
- PrintHelpAndExit("Incorrect command");
+ if (NConsoleClose::TestBreakSignal())
+ return E_ABORT;
+ if (inSize)
+ {
+ UInt64 v1 = *inSize >> 20;
+ UInt64 v2 = _size2;
+ if (outSize)
+ v2 = *outSize >> 20;
+ if (v1 != _size1 || v2 != _size2)
+ {
+ _size1 = v1;
+ _size2 = v2;
+ ClosePrint();
+ Print_MB(_size1);
+ Print(" -> ");
+ Print_MB(_size2);
+ }
+ }
+ return S_OK;
}
-static void WriteArgumentsToStringList(int numArgs, const char *args[], UStringVector &strings)
+
+static void IncorrectCommand()
{
- for (int i = 1; i < numArgs; i++)
- strings.Add(MultiByteToUnicodeString(args[i]));
+ throw "Incorrect command";
}
-static bool GetNumber(const wchar_t *s, UInt32 &value)
+static UInt32 GetNumber(const wchar_t *s)
{
- value = 0;
- if (MyStringLen(s) == 0)
- return false;
const wchar_t *end;
- UInt64 res = ConvertStringToUInt64(s, &end);
- if (*end != L'\0')
- return false;
- if (res > 0xFFFFFFFF)
- return false;
- value = UInt32(res);
- return true;
+ UInt32 v = ConvertStringToUInt32(s, &end);
+ if (*end != 0)
+ IncorrectCommand();
+ return v;
}
-static void ParseUInt32(const CParser &parser, int index, UInt32 &res)
+static void ParseUInt32(const CParser &parser, unsigned index, UInt32 &res)
{
if (parser[index].ThereIs)
- if (!GetNumber(parser[index].PostStrings[0], res))
- IncorrectCommand();
+ res = GetNumber(parser[index].PostStrings[0]);
}
-#define NT_CHECK_FAIL_ACTION PrintMessage("Unsupported Windows version"); return 1;
-int main2(int numArgs, const char *args[])
+static int Error_HRESULT(const char *s, HRESULT res)
{
- NT_CHECK
+ if (res == E_ABORT)
+ {
+ Print("\n\nBreak signaled\n");
+ return 255;
+ }
+
+ PrintError(s);
+
+ if (res == E_OUTOFMEMORY)
+ {
+ PrintErr_LF(kCantAllocate);
+ return 8;
+ }
+ if (res == E_INVALIDARG)
+ {
+ PrintErr_LF("Ununsupported parameter");
+ }
+ else
+ {
+ char temp[32];
+ ConvertUInt32ToHex(res, temp);
+ PrintErr("Error code = 0x");
+ PrintErr_LF(temp);
+ }
+ return 1;
+}
- PrintMessage("\nLZMA " MY_VERSION_COPYRIGHT_DATE "\n");
+#define NT_CHECK_FAIL_ACTION PrintError("Unsupported Windows version"); return 1;
+
+static void AddProp(CObjectVector<CProperty> &props2, const char *name, const wchar_t *val)
+{
+ CProperty &prop = props2.AddNew();
+ prop.Name.SetFromAscii(name);
+ prop.Value = val;
+}
+
+static int main2(int numArgs, const char *args[])
+{
+ NT_CHECK
if (numArgs == 1)
{
@@ -171,19 +312,24 @@ int main2(int numArgs, const char *args[])
return 0;
}
- bool unsupportedTypes = (sizeof(Byte) != 1 || sizeof(UInt32) < 4 || sizeof(UInt64) < 4);
+ /*
+ bool unsupportedTypes = (sizeof(Byte) != 1 || sizeof(UInt32) < 4 || sizeof(UInt64) < 8);
if (unsupportedTypes)
- {
- PrintMessage("Unsupported base types. Edit Common/Types.h and recompile");
- return 1;
- }
+ throw "Unsupported base types. Edit Common/Types.h and recompile";
+ */
UStringVector commandStrings;
- WriteArgumentsToStringList(numArgs, args, commandStrings);
- CParser parser(kNumSwitches);
+ for (int i = 1; i < numArgs; i++)
+ commandStrings.Add(MultiByteToUnicodeString(args[i]));
+
+ CParser parser(ARRAY_SIZE(kSwitchForms));
try
{
- parser.ParseStrings(kSwitchForms, commandStrings);
+ if (!parser.ParseStrings(kSwitchForms, commandStrings))
+ {
+ PrintError2(parser.ErrorMessage, parser.ErrorLine);
+ return 1;
+ }
}
catch(...)
{
@@ -195,40 +341,41 @@ int main2(int numArgs, const char *args[])
PrintHelp();
return 0;
}
- const UStringVector &nonSwitchStrings = parser.NonSwitchStrings;
- int paramIndex = 0;
- if (paramIndex >= nonSwitchStrings.Size())
+ bool stdInMode = parser[NKey::kStdIn].ThereIs;
+ bool stdOutMode = parser[NKey::kStdOut].ThereIs;
+
+ if (!stdOutMode)
+ PrintTitle();
+
+ const UStringVector &params = parser.NonSwitchStrings;
+
+ unsigned paramIndex = 0;
+ if (paramIndex >= params.Size())
IncorrectCommand();
- const UString &command = nonSwitchStrings[paramIndex++];
+ const UString &command = params[paramIndex++];
- CObjectVector<CProperty> props;
+ CObjectVector<CProperty> props2;
bool dictDefined = false;
UInt32 dict = (UInt32)(Int32)-1;
+
if (parser[NKey::kDict].ThereIs)
{
- UInt32 dicLog;
+ UInt32 dictLog;
const UString &s = parser[NKey::kDict].PostStrings[0];
- if (!GetNumber(s, dicLog))
- IncorrectCommand();
- dict = 1 << dicLog;
+ dictLog = GetNumber(s);
+ dict = 1 << dictLog;
dictDefined = true;
- CProperty prop;
- prop.Name = L"d";
- prop.Value = s;
- props.Add(prop);
+ AddProp(props2, "d", s);
}
+
if (parser[NKey::kLevel].ThereIs)
{
- UInt32 level = 5;
const UString &s = parser[NKey::kLevel].PostStrings[0];
- if (!GetNumber(s, level))
- IncorrectCommand();
- CProperty prop;
- prop.Name = L"x";
- prop.Value = s;
- props.Add(prop);
+ /* UInt32 level = */ GetNumber(s);
+ AddProp(props2, "x", s);
}
+
UString mf = L"BT4";
if (parser[NKey::kMatchFinder].ThereIs)
mf = parser[NKey::kMatchFinder].PostStrings[0];
@@ -236,70 +383,64 @@ int main2(int numArgs, const char *args[])
UInt32 numThreads = (UInt32)(Int32)-1;
#ifndef _7ZIP_ST
+
if (parser[NKey::kMultiThread].ThereIs)
{
- UInt32 numCPUs = NWindows::NSystem::GetNumberOfProcessors();
const UString &s = parser[NKey::kMultiThread].PostStrings[0];
if (s.IsEmpty())
- numThreads = numCPUs;
+ numThreads = NWindows::NSystem::GetNumberOfProcessors();
else
- if (!GetNumber(s, numThreads))
- IncorrectCommand();
- CProperty prop;
- prop.Name = L"mt";
- prop.Value = s;
- props.Add(prop);
+ numThreads = GetNumber(s);
+ AddProp(props2, "mt", s);
}
+
#endif
+
if (parser[NKey::kMethod].ThereIs)
{
- UString s = parser[NKey::kMethod].PostStrings[0];
+ const UString &s = parser[NKey::kMethod].PostStrings[0];
if (s.IsEmpty() || s[0] != '=')
IncorrectCommand();
- CProperty prop;
- prop.Name = L"m";
- prop.Value = s.Mid(1);
- props.Add(prop);
+ AddProp(props2, "m", s.Ptr(1));
}
- if (command.CompareNoCase(L"b") == 0)
+ if (StringsAreEqualNoCase_Ascii(command, "b"))
{
- const UInt32 kNumDefaultItereations = 1;
- UInt32 numIterations = kNumDefaultItereations;
- {
- if (paramIndex < nonSwitchStrings.Size())
- if (!GetNumber(nonSwitchStrings[paramIndex++], numIterations))
- numIterations = kNumDefaultItereations;
- }
- HRESULT res = BenchCon(props, numIterations, stderr);
- if (res != S_OK)
- {
- if (res != E_ABORT)
- {
- PrintMessage("Benchmark Error");
- return 1;
- }
- }
- return 0;
+ UInt32 numIterations = 1;
+ if (paramIndex < params.Size())
+ numIterations = GetNumber(params[paramIndex++]);
+ if (params.Size() != paramIndex)
+ IncorrectCommand();
+
+ HRESULT res = BenchCon(props2, numIterations, stdout);
+
+ if (res == S_OK)
+ return 0;
+ return Error_HRESULT("Benchmark error", res);
+ }
+
+ {
+ UInt32 needParams = 3;
+ if (stdInMode) needParams--;
+ if (stdOutMode) needParams--;
+ if (needParams != params.Size())
+ IncorrectCommand();
}
if (numThreads == (UInt32)(Int32)-1)
numThreads = 1;
bool encodeMode = false;
- if (command.CompareNoCase(L"e") == 0)
+
+ if (StringsAreEqualNoCase_Ascii(command, "e"))
encodeMode = true;
- else if (command.CompareNoCase(L"d") == 0)
- encodeMode = false;
- else
+ else if (!StringsAreEqualNoCase_Ascii(command, "d"))
IncorrectCommand();
- bool stdInMode = parser[NKey::kStdIn].ThereIs;
- bool stdOutMode = parser[NKey::kStdOut].ThereIs;
-
CMyComPtr<ISequentialInStream> inStream;
- CInFileStream *inStreamSpec = 0;
+ CInFileStream *inStreamSpec = NULL;
+
if (stdInMode)
{
inStream = new CStdInFileStream;
@@ -307,21 +448,19 @@ int main2(int numArgs, const char *args[])
}
else
{
- if (paramIndex >= nonSwitchStrings.Size())
- IncorrectCommand();
- const UString &inputName = nonSwitchStrings[paramIndex++];
+ const UString &inputName = params[paramIndex++];
inStreamSpec = new CInFileStream;
inStream = inStreamSpec;
if (!inStreamSpec->Open(us2fs(inputName)))
{
- fprintf(stderr, "\nError: can not open input file %s\n",
- (const char *)GetOemString(inputName));
+ PrintError2("can not open input file", inputName);
return 1;
}
}
CMyComPtr<ISequentialOutStream> outStream;
COutFileStream *outStreamSpec = NULL;
+
if (stdOutMode)
{
outStream = new CStdOutFileStream;
@@ -329,99 +468,148 @@ int main2(int numArgs, const char *args[])
}
else
{
- if (paramIndex >= nonSwitchStrings.Size())
- IncorrectCommand();
- const UString &outputName = nonSwitchStrings[paramIndex++];
+ const UString &outputName = params[paramIndex++];
outStreamSpec = new COutFileStream;
outStream = outStreamSpec;
if (!outStreamSpec->Create(us2fs(outputName), true))
{
- fprintf(stderr, "\nError: can not open output file %s\n",
- (const char *)GetOemString(outputName));
+ PrintError2("can not open output file", outputName);
return 1;
}
}
+ bool fileSizeDefined = false;
+ UInt64 fileSize = 0;
+
+ if (inStreamSpec)
+ {
+ if (!inStreamSpec->File.GetLength(fileSize))
+ throw "Can not get file length";
+ fileSizeDefined = true;
+ if (!stdOutMode)
+ Print_Size("Input size: ", fileSize);
+ }
+
+ if (encodeMode && !dictDefined)
+ {
+ dict = 1 << kDictSizeLog;
+ if (fileSizeDefined)
+ {
+ unsigned i;
+ for (i = 16; i < kDictSizeLog; i++)
+ if ((UInt32)((UInt32)1 << i) >= fileSize)
+ break;
+ dict = (UInt32)1 << i;
+ }
+ }
+
if (parser[NKey::kFilter86].ThereIs)
{
- // -f86 switch is for x86 filtered mode: BCJ + LZMA.
+ /* -f86 switch is for x86 filtered mode: BCJ + LZMA.
+ It uses modified header format.
+ It's not recommended to use -f86 mode now.
+ You can use xz format instead, if you want to use filters */
+
if (parser[NKey::kEOS].ThereIs || stdInMode)
throw "Can not use stdin in this mode";
- UInt64 fileSize;
- inStreamSpec->File.GetLength(fileSize);
- if (fileSize > 0xF0000000)
- throw "File is too big";
+
size_t inSize = (size_t)fileSize;
- Byte *inBuffer = 0;
+
+ if (inSize != fileSize)
+ throw "File is too big";
+
+ Byte *inBuffer = NULL;
+
if (inSize != 0)
{
inBuffer = (Byte *)MyAlloc((size_t)inSize);
- if (inBuffer == 0)
+ if (!inBuffer)
throw kCantAllocate;
}
if (ReadStream_FAIL(inStream, inBuffer, inSize) != S_OK)
throw "Can not read";
- Byte *outBuffer = 0;
+ Byte *outBuffer = NULL;
size_t outSize;
+
if (encodeMode)
{
// we allocate 105% of original size for output buffer
- outSize = (size_t)fileSize / 20 * 21 + (1 << 16);
+ UInt64 outSize64 = fileSize / 20 * 21 + (1 << 16);
+
+ outSize = (size_t)outSize64;
+
+ if (outSize != outSize64)
+ throw "File is too big";
+
if (outSize != 0)
{
outBuffer = (Byte *)MyAlloc((size_t)outSize);
- if (outBuffer == 0)
+ if (!outBuffer)
throw kCantAllocate;
}
- if (!dictDefined)
- dict = 1 << 23;
+
int res = Lzma86_Encode(outBuffer, &outSize, inBuffer, inSize,
5, dict, parser[NKey::kFilter86].PostCharIndex == 0 ? SZ_FILTER_YES : SZ_FILTER_AUTO);
+
if (res != 0)
{
- fprintf(stderr, "\nEncoder error = %d\n", (int)res);
+ PrintError_int("Encode error", (int)res);
return 1;
}
}
else
{
UInt64 outSize64;
+
if (Lzma86_GetUnpackSize(inBuffer, inSize, &outSize64) != 0)
throw "data error";
+
outSize = (size_t)outSize64;
if (outSize != outSize64)
- throw "too big";
+ throw "Unpack size is too big";
if (outSize != 0)
{
outBuffer = (Byte *)MyAlloc(outSize);
- if (outBuffer == 0)
+ if (!outBuffer)
throw kCantAllocate;
}
+
int res = Lzma86_Decode(outBuffer, &outSize, inBuffer, &inSize);
+
if (inSize != (size_t)fileSize)
throw "incorrect processed size";
if (res != 0)
- throw "LzmaDecoder error";
+ {
+ PrintError_int("Decode error", (int)res);
+ return 1;
+ }
}
+
if (WriteStream(outStream, outBuffer, outSize) != S_OK)
throw kWriteError;
+
MyFree(outBuffer);
MyFree(inBuffer);
- return 0;
}
+ else
+ {
+ CProgressPrint *progressSpec = NULL;
+ CMyComPtr<ICompressProgressInfo> progress;
+
+ if (!stdOutMode)
+ {
+ progressSpec = new CProgressPrint;
+ progress = progressSpec;
+ }
- UInt64 fileSize;
if (encodeMode)
{
NCompress::NLzma::CEncoder *encoderSpec = new NCompress::NLzma::CEncoder;
CMyComPtr<ICompressCoder> encoder = encoderSpec;
- if (!dictDefined)
- dict = 1 << 23;
-
UInt32 pb = 2;
UInt32 lc = 3; // = 0; for 32-bit data
UInt32 lp = 0; // = 2; for 32-bit data
@@ -440,8 +628,7 @@ int main2(int numArgs, const char *args[])
mcDefined = parser[NKey::kMc].ThereIs;
if (mcDefined)
- if (!GetNumber(parser[NKey::kMc].PostStrings[0], mc))
- IncorrectCommand();
+ mc = GetNumber(parser[NKey::kMc].PostStrings[0]);
const PROPID propIDs[] =
{
@@ -456,7 +643,8 @@ int main2(int numArgs, const char *args[])
NCoderPropID::kNumThreads,
NCoderPropID::kMatchFinderCycles,
};
- const int kNumPropsMax = sizeof(propIDs) / sizeof(propIDs[0]);
+
+ const unsigned kNumPropsMax = ARRAY_SIZE(propIDs);
PROPVARIANT props[kNumPropsMax];
for (int p = 0; p < 6; p++)
@@ -482,89 +670,110 @@ int main2(int numArgs, const char *args[])
props[9].vt = VT_UI4;
props[9].ulVal = (UInt32)mc;
- int numProps = kNumPropsMax;
+ unsigned numProps = kNumPropsMax;
if (!mcDefined)
numProps--;
- if (encoderSpec->SetCoderProperties(propIDs, props, numProps) != S_OK)
- IncorrectCommand();
- encoderSpec->WriteCoderProperties(outStream);
+ HRESULT res = encoderSpec->SetCoderProperties(propIDs, props, numProps);
+ if (res != S_OK)
+ return Error_HRESULT("incorrect encoder properties", res);
- if (eos || stdInMode)
- fileSize = (UInt64)(Int64)-1;
- else
- inStreamSpec->File.GetLength(fileSize);
+ if (encoderSpec->WriteCoderProperties(outStream) != S_OK)
+ throw kWriteError;
- for (int i = 0; i < 8; i++)
- {
- Byte b = Byte(fileSize >> (8 * i));
- if (outStream->Write(&b, 1, 0) != S_OK)
- {
- PrintMessage(kWriteError);
- return 1;
- }
- }
- HRESULT result = encoder->Code(inStream, outStream, 0, 0, 0);
- if (result == E_OUTOFMEMORY)
+ bool fileSizeWasUsed = true;
+ if (eos || stdInMode)
{
- PrintMessage("\nError: Can not allocate memory\n");
- return 1;
+ fileSize = (UInt64)(Int64)-1;
+ fileSizeWasUsed = false;
}
- else if (result != S_OK)
+
{
- fprintf(stderr, "\nEncoder error = %X\n", (unsigned int)result);
- return 1;
+ Byte temp[8];
+ for (int i = 0; i < 8; i++)
+ temp[i]= (Byte)(fileSize >> (8 * i));
+ if (WriteStream(outStream, temp, 8) != S_OK)
+ throw kWriteError;
}
+
+ res = encoder->Code(inStream, outStream, NULL, NULL, progress);
+ if (progressSpec)
+ progressSpec->ClosePrint();
+
+ if (res != S_OK)
+ return Error_HRESULT("Encoding error", res);
+
+ UInt64 processedSize = encoderSpec->GetInputProcessedSize();
+
+ if (fileSizeWasUsed && processedSize != fileSize)
+ throw "Incorrect size of processed data";
}
else
{
NCompress::NLzma::CDecoder *decoderSpec = new NCompress::NLzma::CDecoder;
CMyComPtr<ICompressCoder> decoder = decoderSpec;
+
decoderSpec->FinishStream = true;
- const UInt32 kPropertiesSize = 5;
+
+ const unsigned kPropertiesSize = 5;
Byte header[kPropertiesSize + 8];
+
if (ReadStream_FALSE(inStream, header, kPropertiesSize + 8) != S_OK)
- {
- PrintMessage(kReadError);
- return 1;
- }
+ throw kReadError;
+
if (decoderSpec->SetDecoderProperties2(header, kPropertiesSize) != S_OK)
- {
- PrintMessage("SetDecoderProperties error");
- return 1;
- }
- fileSize = 0;
+ throw "SetDecoderProperties error";
+
+ UInt64 unpackSize = 0;
for (int i = 0; i < 8; i++)
- fileSize |= ((UInt64)header[kPropertiesSize + i]) << (8 * i);
+ unpackSize |= ((UInt64)header[kPropertiesSize + i]) << (8 * i);
+
+ bool unpackSizeDefined = (unpackSize != (UInt64)(Int64)-1);
+
+ HRESULT res = decoder->Code(inStream, outStream, NULL, unpackSizeDefined ? &unpackSize : NULL, progress);
+ if (progressSpec)
+ progressSpec->ClosePrint();
- if (decoder->Code(inStream, outStream, 0, (fileSize == (UInt64)(Int64)-1) ? 0 : &fileSize, 0) != S_OK)
+ if (res != S_OK)
{
- PrintMessage("Decoder error");
- return 1;
+ if (res == S_FALSE)
+ {
+ PrintError("Decoding error");
+ return 1;
+ }
+ return Error_HRESULT("Decoding error", res);
}
+
+ if (unpackSizeDefined && unpackSize != decoderSpec->GetOutputProcessedSize())
+ throw "incorrect uncompressed size in header";
}
- if (outStreamSpec != NULL)
+ }
+
+ if (!stdOutMode)
+ Print_Size("Output size: ", outStreamSpec->ProcessedSize);
+
+ if (outStreamSpec)
{
if (outStreamSpec->Close() != S_OK)
- {
- PrintMessage("File closing error");
- return 1;
- }
+ throw "File closing error";
}
+
return 0;
}
int MY_CDECL main(int numArgs, const char *args[])
{
+ NConsoleClose::CCtrlHandlerSetter ctrlHandlerSetter;
+
try { return main2(numArgs, args); }
catch (const char *s)
{
- fprintf(stderr, "\nError: %s\n", s);
+ PrintError(s);
return 1;
}
catch(...)
{
- PrintMessage("\nError\n");
+ PrintError("Unknown Error");
return 1;
}
}
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp
index 6111aa7e52c..f8267a11f24 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /Gr /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gr /MD /W4 /WX /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"StdAfx.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"StdAfx.h" /FD /GZ /c
+# ADD CPP /nologo /MDd /W4 /WX /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
@@ -180,6 +180,10 @@ SOURCE=..\..\..\Common\CRC.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\CrcReg.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\Defs.h
# End Source File
# Begin Source File
@@ -362,6 +366,10 @@ SOURCE=..\..\..\..\C\7zCrcOpt.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\7zTypes.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Alloc.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -460,10 +468,6 @@ SOURCE=..\..\..\..\C\Threads.c
SOURCE=..\..\..\..\C\Threads.h
# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\C\Types.h
-# End Source File
# End Group
# Begin Source File
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h
index e7fb6986d2a..2854ff3e935 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h
@@ -3,6 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../../Common/MyWindows.h"
+#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile
index 35d031af9e3..54919f73374 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile
@@ -2,7 +2,7 @@ PROG = lzma.exe
MY_CONSOLE = 1
CFLAGS = $(CFLAGS)
-LZMA_OBJS = \
+CURRENT_OBJS = \
$O\LzmaAlone.obj \
COMPRESS_OBJS = \
@@ -13,8 +13,10 @@ COMPRESS_OBJS = \
COMMON_OBJS = \
$O\CommandLineParser.obj \
$O\CRC.obj \
+ $O\CrcReg.obj \
$O\IntToString.obj \
$O\MyString.obj \
+ $O\NewHandler.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\MyVector.obj
@@ -54,36 +56,4 @@ C_OBJS = \
!include "../../Crc.mak"
-OBJS = \
- $O\StdAfx.obj \
- $(LZMA_OBJS) \
- $(COMPRESS_OBJS) \
- $(COMMON_OBJS) \
- $(WIN_OBJS) \
- $(7ZIP_COMMON_OBJS) \
- $(UI_COMMON_OBJS) \
- $(CONSOLE_OBJS) \
- $(C_OBJS) \
- $(ASM_OBJS) \
-
-!include "../../../Build.mak"
-
-
-$(LZMA_OBJS): $(*B).cpp
- $(COMPL)
-$(COMPRESS_OBJS): ../../Compress/$(*B).cpp
- $(COMPL_O2)
-$(COMMON_OBJS): ../../../Common/$(*B).cpp
- $(COMPL)
-$(WIN_OBJS): ../../../Windows/$(*B).cpp
- $(COMPL)
-$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
- $(COMPL)
-$(UI_COMMON_OBJS): ../../UI/Common/$(*B).cpp
- $(COMPL)
-$(CONSOLE_OBJS): ../../UI/Console/$(*B).cpp
- $(COMPL)
-$(C_OBJS): ../../../../C/$(*B).c
- $(COMPL_O2)
-
-!include "../../Asm.mak"
+!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc
index 0f9f498cb02..97fe450841f 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc
@@ -1,24 +1,41 @@
PROG = lzma
-CXX = g++ -O2 -Wall
-CXX_C = gcc -O2 -Wall
-LIB = -lm
-RM = rm -f
-CFLAGS = -c -D_7ZIP_ST
+CXX = g++ -O2
+# -Wall -Werror -Wno-delete-non-virtual-dtor
+CXX_C = gcc -O2 -Wall -Werror
ifdef SystemDrive
IS_MINGW = 1
endif
ifdef IS_MINGW
+
+RM = del
+CFLAGS = -c
+LIB2 = -loleaut32 -luuid
+LDFLAGS = -s
+
FILE_IO =FileIO
FILE_IO_2 =Windows/$(FILE_IO)
-LIB2 = -luuid
+
+MT_FILES = \
+ LzFindMt.o \
+ Threads.o \
+
else
+
+RM = rm -f
+CFLAGS = -c -D_7ZIP_ST
+
FILE_IO =C_FileIO
FILE_IO_2 =Common/$(FILE_IO)
+
+
endif
+
OBJS = \
+ $(MT_FILES) \
+ $(FILE_IO).o \
LzmaAlone.o \
Bench.o \
BenchCon.o \
@@ -32,9 +49,9 @@ OBJS = \
FilterCoder.o \
MethodProps.o \
StreamUtils.o \
- $(FILE_IO).o \
CommandLineParser.o \
CRC.o \
+ CrcReg.o \
IntToString.o \
MyString.o \
MyVector.o \
@@ -42,6 +59,7 @@ OBJS = \
StringConvert.o \
StringToInt.o \
PropVariant.o \
+ System.o \
7zCrc.o \
7zCrcOpt.o \
Alloc.o \
@@ -57,7 +75,7 @@ OBJS = \
all: $(PROG)
$(PROG): $(OBJS)
- $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) $(LIB2)
+ $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB2)
LzmaAlone.o: LzmaAlone.cpp
$(CXX) $(CFLAGS) LzmaAlone.cpp
@@ -108,6 +126,9 @@ CommandLineParser.o: ../../../Common/CommandLineParser.cpp
CRC.o: ../../../Common/CRC.cpp
$(CXX) $(CFLAGS) ../../../Common/CRC.cpp
+CrcReg.o: ../../../Common/CrcReg.cpp
+ $(CXX) $(CFLAGS) ../../../Common/CrcReg.cpp
+
IntToString.o: ../../../Common/IntToString.cpp
$(CXX) $(CFLAGS) ../../../Common/IntToString.cpp
@@ -129,6 +150,9 @@ StringToInt.o: ../../../Common/StringToInt.cpp
PropVariant.o: ../../../Windows/PropVariant.cpp
$(CXX) $(CFLAGS) ../../../Windows/PropVariant.cpp
+System.o: ../../../Windows/System.cpp
+ $(CXX) $(CFLAGS) ../../../Windows/System.cpp
+
7zCrc.o: ../../../../C/7zCrc.c
$(CXX_C) $(CFLAGS) ../../../../C/7zCrc.c
@@ -147,6 +171,14 @@ CpuArch.o: ../../../../C/CpuArch.c
LzFind.o: ../../../../C/LzFind.c
$(CXX_C) $(CFLAGS) ../../../../C/LzFind.c
+ifdef MT_FILES
+LzFindMt.o: ../../../../C/LzFindMt.c
+ $(CXX_C) $(CFLAGS) ../../../../C/LzFindMt.c
+
+Threads.o: ../../../../C/Threads.c
+ $(CXX_C) $(CFLAGS) ../../../../C/Threads.c
+endif
+
LzmaDec.o: ../../../../C/LzmaDec.c
$(CXX_C) $(CFLAGS) ../../../../C/LzmaDec.c
@@ -161,4 +193,3 @@ Lzma86Enc.o: ../../../../C/Lzma86Enc.c
clean:
-$(RM) $(PROG) $(OBJS)
-
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc
new file mode 100644
index 00000000000..43b50738ef2
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc
@@ -0,0 +1,3 @@
+#include "../../MyVersionInfo.rc"
+
+MY_VERSION_INFO_APP("LZMA", "lzma")
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp b/3rdparty/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp
new file mode 100644
index 00000000000..8e0f9b99b4c
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp
@@ -0,0 +1,715 @@
+/* LzmaSpec.cpp -- LZMA Reference Decoder
+2015-06-14 : Igor Pavlov : Public domain */
+
+// This code implements LZMA file decoding according to LZMA specification.
+// This code is not optimized for speed.
+
+#include <stdio.h>
+
+#ifdef _MSC_VER
+ #pragma warning(disable : 4710) // function not inlined
+ #pragma warning(disable : 4996) // This function or variable may be unsafe
+#endif
+
+typedef unsigned char Byte;
+typedef unsigned short UInt16;
+
+#ifdef _LZMA_UINT32_IS_ULONG
+ typedef unsigned long UInt32;
+#else
+ typedef unsigned int UInt32;
+#endif
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+ typedef unsigned __int64 UInt64;
+#else
+ typedef unsigned long long int UInt64;
+#endif
+
+
+struct CInputStream
+{
+ FILE *File;
+ UInt64 Processed;
+
+ void Init() { Processed = 0; }
+
+ Byte ReadByte()
+ {
+ int c = getc(File);
+ if (c < 0)
+ throw "Unexpected end of file";
+ Processed++;
+ return (Byte)c;
+ }
+};
+
+
+struct COutStream
+{
+ FILE *File;
+ UInt64 Processed;
+
+ void Init() { Processed = 0; }
+
+ void WriteByte(Byte b)
+ {
+ if (putc(b, File) == EOF)
+ throw "File writing error";
+ Processed++;
+ }
+};
+
+
+class COutWindow
+{
+ Byte *Buf;
+ UInt32 Pos;
+ UInt32 Size;
+ bool IsFull;
+
+public:
+ unsigned TotalPos;
+ COutStream OutStream;
+
+ COutWindow(): Buf(NULL) {}
+ ~COutWindow() { delete []Buf; }
+
+ void Create(UInt32 dictSize)
+ {
+ Buf = new Byte[dictSize];
+ Pos = 0;
+ Size = dictSize;
+ IsFull = false;
+ TotalPos = 0;
+ }
+
+ void PutByte(Byte b)
+ {
+ TotalPos++;
+ Buf[Pos++] = b;
+ if (Pos == Size)
+ {
+ Pos = 0;
+ IsFull = true;
+ }
+ OutStream.WriteByte(b);
+ }
+
+ Byte GetByte(UInt32 dist) const
+ {
+ return Buf[dist <= Pos ? Pos - dist : Size - dist + Pos];
+ }
+
+ void CopyMatch(UInt32 dist, unsigned len)
+ {
+ for (; len > 0; len--)
+ PutByte(GetByte(dist));
+ }
+
+ bool CheckDistance(UInt32 dist) const
+ {
+ return dist <= Pos || IsFull;
+ }
+
+ bool IsEmpty() const
+ {
+ return Pos == 0 && !IsFull;
+ }
+};
+
+
+#define kNumBitModelTotalBits 11
+#define kNumMoveBits 5
+
+typedef UInt16 CProb;
+
+#define PROB_INIT_VAL ((1 << kNumBitModelTotalBits) / 2)
+
+#define INIT_PROBS(p) \
+ { for (unsigned i = 0; i < sizeof(p) / sizeof(p[0]); i++) p[i] = PROB_INIT_VAL; }
+
+class CRangeDecoder
+{
+ UInt32 Range;
+ UInt32 Code;
+
+ void Normalize();
+
+public:
+
+ CInputStream *InStream;
+ bool Corrupted;
+
+ bool Init();
+ bool IsFinishedOK() const { return Code == 0; }
+
+ UInt32 DecodeDirectBits(unsigned numBits);
+ unsigned DecodeBit(CProb *prob);
+};
+
+bool CRangeDecoder::Init()
+{
+ Corrupted = false;
+ Range = 0xFFFFFFFF;
+ Code = 0;
+
+ Byte b = InStream->ReadByte();
+
+ for (int i = 0; i < 4; i++)
+ Code = (Code << 8) | InStream->ReadByte();
+
+ if (b != 0 || Code == Range)
+ Corrupted = true;
+ return b == 0;
+}
+
+#define kTopValue ((UInt32)1 << 24)
+
+void CRangeDecoder::Normalize()
+{
+ if (Range < kTopValue)
+ {
+ Range <<= 8;
+ Code = (Code << 8) | InStream->ReadByte();
+ }
+}
+
+UInt32 CRangeDecoder::DecodeDirectBits(unsigned numBits)
+{
+ UInt32 res = 0;
+ do
+ {
+ Range >>= 1;
+ Code -= Range;
+ UInt32 t = 0 - ((UInt32)Code >> 31);
+ Code += Range & t;
+
+ if (Code == Range)
+ Corrupted = true;
+
+ Normalize();
+ res <<= 1;
+ res += t + 1;
+ }
+ while (--numBits);
+ return res;
+}
+
+unsigned CRangeDecoder::DecodeBit(CProb *prob)
+{
+ unsigned v = *prob;
+ UInt32 bound = (Range >> kNumBitModelTotalBits) * v;
+ unsigned symbol;
+ if (Code < bound)
+ {
+ v += ((1 << kNumBitModelTotalBits) - v) >> kNumMoveBits;
+ Range = bound;
+ symbol = 0;
+ }
+ else
+ {
+ v -= v >> kNumMoveBits;
+ Code -= bound;
+ Range -= bound;
+ symbol = 1;
+ }
+ *prob = (CProb)v;
+ Normalize();
+ return symbol;
+}
+
+
+unsigned BitTreeReverseDecode(CProb *probs, unsigned numBits, CRangeDecoder *rc)
+{
+ unsigned m = 1;
+ unsigned symbol = 0;
+ for (unsigned i = 0; i < numBits; i++)
+ {
+ unsigned bit = rc->DecodeBit(&probs[m]);
+ m <<= 1;
+ m += bit;
+ symbol |= (bit << i);
+ }
+ return symbol;
+}
+
+template <unsigned NumBits>
+class CBitTreeDecoder
+{
+ CProb Probs[(unsigned)1 << NumBits];
+
+public:
+
+ void Init()
+ {
+ INIT_PROBS(Probs);
+ }
+
+ unsigned Decode(CRangeDecoder *rc)
+ {
+ unsigned m = 1;
+ for (unsigned i = 0; i < NumBits; i++)
+ m = (m << 1) + rc->DecodeBit(&Probs[m]);
+ return m - ((unsigned)1 << NumBits);
+ }
+
+ unsigned ReverseDecode(CRangeDecoder *rc)
+ {
+ return BitTreeReverseDecode(Probs, NumBits, rc);
+ }
+};
+
+#define kNumPosBitsMax 4
+
+#define kNumStates 12
+#define kNumLenToPosStates 4
+#define kNumAlignBits 4
+#define kStartPosModelIndex 4
+#define kEndPosModelIndex 14
+#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
+#define kMatchMinLen 2
+
+class CLenDecoder
+{
+ CProb Choice;
+ CProb Choice2;
+ CBitTreeDecoder<3> LowCoder[1 << kNumPosBitsMax];
+ CBitTreeDecoder<3> MidCoder[1 << kNumPosBitsMax];
+ CBitTreeDecoder<8> HighCoder;
+
+public:
+
+ void Init()
+ {
+ Choice = PROB_INIT_VAL;
+ Choice2 = PROB_INIT_VAL;
+ HighCoder.Init();
+ for (unsigned i = 0; i < (1 << kNumPosBitsMax); i++)
+ {
+ LowCoder[i].Init();
+ MidCoder[i].Init();
+ }
+ }
+
+ unsigned Decode(CRangeDecoder *rc, unsigned posState)
+ {
+ if (rc->DecodeBit(&Choice) == 0)
+ return LowCoder[posState].Decode(rc);
+ if (rc->DecodeBit(&Choice2) == 0)
+ return 8 + MidCoder[posState].Decode(rc);
+ return 16 + HighCoder.Decode(rc);
+ }
+};
+
+unsigned UpdateState_Literal(unsigned state)
+{
+ if (state < 4) return 0;
+ else if (state < 10) return state - 3;
+ else return state - 6;
+}
+unsigned UpdateState_Match (unsigned state) { return state < 7 ? 7 : 10; }
+unsigned UpdateState_Rep (unsigned state) { return state < 7 ? 8 : 11; }
+unsigned UpdateState_ShortRep(unsigned state) { return state < 7 ? 9 : 11; }
+
+#define LZMA_DIC_MIN (1 << 12)
+
+class CLzmaDecoder
+{
+public:
+ CRangeDecoder RangeDec;
+ COutWindow OutWindow;
+
+ bool markerIsMandatory;
+ unsigned lc, pb, lp;
+ UInt32 dictSize;
+ UInt32 dictSizeInProperties;
+
+ void DecodeProperties(const Byte *properties)
+ {
+ unsigned d = properties[0];
+ if (d >= (9 * 5 * 5))
+ throw "Incorrect LZMA properties";
+ lc = d % 9;
+ d /= 9;
+ pb = d / 5;
+ lp = d % 5;
+ dictSizeInProperties = 0;
+ for (int i = 0; i < 4; i++)
+ dictSizeInProperties |= (UInt32)properties[i + 1] << (8 * i);
+ dictSize = dictSizeInProperties;
+ if (dictSize < LZMA_DIC_MIN)
+ dictSize = LZMA_DIC_MIN;
+ }
+
+ CLzmaDecoder(): LitProbs(NULL) {}
+ ~CLzmaDecoder() { delete []LitProbs; }
+
+ void Create()
+ {
+ OutWindow.Create(dictSize);
+ CreateLiterals();
+ }
+
+ int Decode(bool unpackSizeDefined, UInt64 unpackSize);
+
+private:
+
+ CProb *LitProbs;
+
+ void CreateLiterals()
+ {
+ LitProbs = new CProb[(UInt32)0x300 << (lc + lp)];
+ }
+
+ void InitLiterals()
+ {
+ UInt32 num = (UInt32)0x300 << (lc + lp);
+ for (UInt32 i = 0; i < num; i++)
+ LitProbs[i] = PROB_INIT_VAL;
+ }
+
+ void DecodeLiteral(unsigned state, UInt32 rep0)
+ {
+ unsigned prevByte = 0;
+ if (!OutWindow.IsEmpty())
+ prevByte = OutWindow.GetByte(1);
+
+ unsigned symbol = 1;
+ unsigned litState = ((OutWindow.TotalPos & ((1 << lp) - 1)) << lc) + (prevByte >> (8 - lc));
+ CProb *probs = &LitProbs[(UInt32)0x300 * litState];
+
+ if (state >= 7)
+ {
+ unsigned matchByte = OutWindow.GetByte(rep0 + 1);
+ do
+ {
+ unsigned matchBit = (matchByte >> 7) & 1;
+ matchByte <<= 1;
+ unsigned bit = RangeDec.DecodeBit(&probs[((1 + matchBit) << 8) + symbol]);
+ symbol = (symbol << 1) | bit;
+ if (matchBit != bit)
+ break;
+ }
+ while (symbol < 0x100);
+ }
+ while (symbol < 0x100)
+ symbol = (symbol << 1) | RangeDec.DecodeBit(&probs[symbol]);
+ OutWindow.PutByte((Byte)(symbol - 0x100));
+ }
+
+ CBitTreeDecoder<6> PosSlotDecoder[kNumLenToPosStates];
+ CBitTreeDecoder<kNumAlignBits> AlignDecoder;
+ CProb PosDecoders[1 + kNumFullDistances - kEndPosModelIndex];
+
+ void InitDist()
+ {
+ for (unsigned i = 0; i < kNumLenToPosStates; i++)
+ PosSlotDecoder[i].Init();
+ AlignDecoder.Init();
+ INIT_PROBS(PosDecoders);
+ }
+
+ unsigned DecodeDistance(unsigned len)
+ {
+ unsigned lenState = len;
+ if (lenState > kNumLenToPosStates - 1)
+ lenState = kNumLenToPosStates - 1;
+
+ unsigned posSlot = PosSlotDecoder[lenState].Decode(&RangeDec);
+ if (posSlot < 4)
+ return posSlot;
+
+ unsigned numDirectBits = (unsigned)((posSlot >> 1) - 1);
+ UInt32 dist = ((2 | (posSlot & 1)) << numDirectBits);
+ if (posSlot < kEndPosModelIndex)
+ dist += BitTreeReverseDecode(PosDecoders + dist - posSlot, numDirectBits, &RangeDec);
+ else
+ {
+ dist += RangeDec.DecodeDirectBits(numDirectBits - kNumAlignBits) << kNumAlignBits;
+ dist += AlignDecoder.ReverseDecode(&RangeDec);
+ }
+ return dist;
+ }
+
+ CProb IsMatch[kNumStates << kNumPosBitsMax];
+ CProb IsRep[kNumStates];
+ CProb IsRepG0[kNumStates];
+ CProb IsRepG1[kNumStates];
+ CProb IsRepG2[kNumStates];
+ CProb IsRep0Long[kNumStates << kNumPosBitsMax];
+
+ CLenDecoder LenDecoder;
+ CLenDecoder RepLenDecoder;
+
+ void Init()
+ {
+ InitLiterals();
+ InitDist();
+
+ INIT_PROBS(IsMatch);
+ INIT_PROBS(IsRep);
+ INIT_PROBS(IsRepG0);
+ INIT_PROBS(IsRepG1);
+ INIT_PROBS(IsRepG2);
+ INIT_PROBS(IsRep0Long);
+
+ LenDecoder.Init();
+ RepLenDecoder.Init();
+ }
+};
+
+
+#define LZMA_RES_ERROR 0
+#define LZMA_RES_FINISHED_WITH_MARKER 1
+#define LZMA_RES_FINISHED_WITHOUT_MARKER 2
+
+int CLzmaDecoder::Decode(bool unpackSizeDefined, UInt64 unpackSize)
+{
+ if (!RangeDec.Init())
+ return LZMA_RES_ERROR;
+
+ Init();
+
+ UInt32 rep0 = 0, rep1 = 0, rep2 = 0, rep3 = 0;
+ unsigned state = 0;
+
+ for (;;)
+ {
+ if (unpackSizeDefined && unpackSize == 0 && !markerIsMandatory)
+ if (RangeDec.IsFinishedOK())
+ return LZMA_RES_FINISHED_WITHOUT_MARKER;
+
+ unsigned posState = OutWindow.TotalPos & ((1 << pb) - 1);
+
+ if (RangeDec.DecodeBit(&IsMatch[(state << kNumPosBitsMax) + posState]) == 0)
+ {
+ if (unpackSizeDefined && unpackSize == 0)
+ return LZMA_RES_ERROR;
+ DecodeLiteral(state, rep0);
+ state = UpdateState_Literal(state);
+ unpackSize--;
+ continue;
+ }
+
+ unsigned len;
+
+ if (RangeDec.DecodeBit(&IsRep[state]) != 0)
+ {
+ if (unpackSizeDefined && unpackSize == 0)
+ return LZMA_RES_ERROR;
+ if (OutWindow.IsEmpty())
+ return LZMA_RES_ERROR;
+ if (RangeDec.DecodeBit(&IsRepG0[state]) == 0)
+ {
+ if (RangeDec.DecodeBit(&IsRep0Long[(state << kNumPosBitsMax) + posState]) == 0)
+ {
+ state = UpdateState_ShortRep(state);
+ OutWindow.PutByte(OutWindow.GetByte(rep0 + 1));
+ unpackSize--;
+ continue;
+ }
+ }
+ else
+ {
+ UInt32 dist;
+ if (RangeDec.DecodeBit(&IsRepG1[state]) == 0)
+ dist = rep1;
+ else
+ {
+ if (RangeDec.DecodeBit(&IsRepG2[state]) == 0)
+ dist = rep2;
+ else
+ {
+ dist = rep3;
+ rep3 = rep2;
+ }
+ rep2 = rep1;
+ }
+ rep1 = rep0;
+ rep0 = dist;
+ }
+ len = RepLenDecoder.Decode(&RangeDec, posState);
+ state = UpdateState_Rep(state);
+ }
+ else
+ {
+ rep3 = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+ len = LenDecoder.Decode(&RangeDec, posState);
+ state = UpdateState_Match(state);
+ rep0 = DecodeDistance(len);
+ if (rep0 == 0xFFFFFFFF)
+ return RangeDec.IsFinishedOK() ?
+ LZMA_RES_FINISHED_WITH_MARKER :
+ LZMA_RES_ERROR;
+
+ if (unpackSizeDefined && unpackSize == 0)
+ return LZMA_RES_ERROR;
+ if (rep0 >= dictSize || !OutWindow.CheckDistance(rep0))
+ return LZMA_RES_ERROR;
+ }
+ len += kMatchMinLen;
+ bool isError = false;
+ if (unpackSizeDefined && unpackSize < len)
+ {
+ len = (unsigned)unpackSize;
+ isError = true;
+ }
+ OutWindow.CopyMatch(rep0 + 1, len);
+ unpackSize -= len;
+ if (isError)
+ return LZMA_RES_ERROR;
+ }
+}
+
+static void Print(const char *s)
+{
+ fputs(s, stdout);
+}
+
+static void PrintError(const char *s)
+{
+ fputs(s, stderr);
+}
+
+
+#define CONVERT_INT_TO_STR(charType, tempSize) \
+
+void ConvertUInt64ToString(UInt64 val, char *s)
+{
+ char temp[32];
+ unsigned i = 0;
+ while (val >= 10)
+ {
+ temp[i++] = (char)('0' + (unsigned)(val % 10));
+ val /= 10;
+ }
+ *s++ = (char)('0' + (unsigned)val);
+ while (i != 0)
+ {
+ i--;
+ *s++ = temp[i];
+ }
+ *s = 0;
+}
+
+void PrintUInt64(const char *title, UInt64 v)
+{
+ Print(title);
+ Print(" : ");
+ char s[32];
+ ConvertUInt64ToString(v, s);
+ Print(s);
+ Print(" bytes \n");
+}
+
+int main2(int numArgs, const char *args[])
+{
+ Print("\nLZMA Reference Decoder 15.00 : Igor Pavlov : Public domain : 2015-04-16\n");
+ if (numArgs == 1)
+ Print("\nUse: lzmaSpec a.lzma outFile");
+
+ if (numArgs != 3)
+ throw "you must specify two parameters";
+
+ CInputStream inStream;
+ inStream.File = fopen(args[1], "rb");
+ inStream.Init();
+ if (inStream.File == 0)
+ throw "Can't open input file";
+
+ CLzmaDecoder lzmaDecoder;
+ lzmaDecoder.OutWindow.OutStream.File = fopen(args[2], "wb+");
+ lzmaDecoder.OutWindow.OutStream.Init();
+ if (inStream.File == 0)
+ throw "Can't open output file";
+
+ Byte header[13];
+ int i;
+ for (i = 0; i < 13; i++)
+ header[i] = inStream.ReadByte();
+
+ lzmaDecoder.DecodeProperties(header);
+
+ printf("\nlc=%d, lp=%d, pb=%d", lzmaDecoder.lc, lzmaDecoder.lp, lzmaDecoder.pb);
+ printf("\nDictionary Size in properties = %u", lzmaDecoder.dictSizeInProperties);
+ printf("\nDictionary Size for decoding = %u", lzmaDecoder.dictSize);
+
+ UInt64 unpackSize = 0;
+ bool unpackSizeDefined = false;
+ for (i = 0; i < 8; i++)
+ {
+ Byte b = header[5 + i];
+ if (b != 0xFF)
+ unpackSizeDefined = true;
+ unpackSize |= (UInt64)b << (8 * i);
+ }
+
+ lzmaDecoder.markerIsMandatory = !unpackSizeDefined;
+
+ Print("\n");
+ if (unpackSizeDefined)
+ PrintUInt64("Uncompressed Size", unpackSize);
+ else
+ Print("End marker is expected\n");
+ lzmaDecoder.RangeDec.InStream = &inStream;
+
+ Print("\n");
+
+ lzmaDecoder.Create();
+
+ int res = lzmaDecoder.Decode(unpackSizeDefined, unpackSize);
+
+ PrintUInt64("Read ", inStream.Processed);
+ PrintUInt64("Written ", lzmaDecoder.OutWindow.OutStream.Processed);
+
+ if (res == LZMA_RES_ERROR)
+ throw "LZMA decoding error";
+ else if (res == LZMA_RES_FINISHED_WITHOUT_MARKER)
+ Print("Finished without end marker");
+ else if (res == LZMA_RES_FINISHED_WITH_MARKER)
+ {
+ if (unpackSizeDefined)
+ {
+ if (lzmaDecoder.OutWindow.OutStream.Processed != unpackSize)
+ throw "Finished with end marker before than specified size";
+ Print("Warning: ");
+ }
+ Print("Finished with end marker");
+ }
+ else
+ throw "Internal Error";
+
+ Print("\n");
+
+ if (lzmaDecoder.RangeDec.Corrupted)
+ {
+ Print("\nWarning: LZMA stream is corrupted\n");
+ }
+
+ return 0;
+}
+
+
+int
+ #ifdef _MSC_VER
+ __cdecl
+ #endif
+main(int numArgs, const char *args[])
+{
+ try { return main2(numArgs, args); }
+ catch (const char *s)
+ {
+ PrintError("\nError:\n");
+ PrintError(s);
+ PrintError("\n");
+ return 1;
+ }
+ catch(...)
+ {
+ PrintError("\nError\n");
+ return 1;
+ }
+}
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/7z.ico b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/7z.ico
new file mode 100644
index 00000000000..47ffb781e0b
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/7z.ico
Binary files differ
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp
new file mode 100644
index 00000000000..4f55d013fee
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp
@@ -0,0 +1,869 @@
+# Microsoft Developer Studio Project File - Name="SFXCon" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=SFXCon - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "SFXCon.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "SFXCon.mak" CFG="SFXCon - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "SFXCon - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "SFXCon - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "SFXCon - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "EXTRACT_ONLY" /D "_SFX" /D "NO_READ_FROM_CODER" /Yu"StdAfx.h" /FD /c
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x419 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"C:\Util\7zCon.exe" /opt:NOWIN98
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "SFXCon - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "EXTRACT_ONLY" /D "_SFX" /D "NO_READ_FROM_CODER" /Yu"StdAfx.h" /FD /GZ /c
+# ADD BASE RSC /l 0x419 /d "_DEBUG"
+# ADD RSC /l 0x419 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"C:\Util\7zCon.exe" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "SFXCon - Win32 Release"
+# Name "SFXCon - Win32 Debug"
+# Begin Group "Spec"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\resource.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"StdAfx.h"
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Archive Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\CoderMixer2.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\CoderMixer2.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\ItemNameUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\ItemNameUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\MultiStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\MultiStream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\OutStreamWithCRC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\OutStreamWithCRC.h
+# End Source File
+# End Group
+# Begin Group "Console"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\UI\Console\ConsoleClose.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\ConsoleClose.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\ExtractCallbackConsole.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\ExtractCallbackConsole.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\List.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\List.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\MainAr.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\OpenCallbackConsole.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\OpenCallbackConsole.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\PercentPrinter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\PercentPrinter.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\UserInputUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Console\UserInputUtils.h
+# End Source File
+# End Group
+# Begin Group "7z"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zDecode.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zDecode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zExtract.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zHandler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zHeader.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zIn.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zIn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zItem.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\SplitHandler.cpp
+# End Source File
+# End Group
+# Begin Group "Compress"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Compress\Bcj2Coder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Bcj2Register.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BcjCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BcjRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BranchMisc.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BranchMisc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BranchRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\CopyCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\CopyRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\DeltaFilter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Lzma2Decoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Lzma2Register.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\LzmaDecoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\LzmaRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\PpmdDecoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\PpmdRegister.cpp
+# End Source File
+# End Group
+# Begin Group "Crypto"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Crypto\7zAes.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\7zAes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\7zAesRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\MyAes.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\MyAes.h
+# End Source File
+# End Group
+# Begin Group "Windows"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\Windows\DLL.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\DLL.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\ErrorMsg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\ErrorMsg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileDir.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileDir.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileFind.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileFind.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileIO.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileIO.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileName.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileName.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariant.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariant.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariantConv.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariantConv.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Synchronization.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Synchronization.h
+# End Source File
+# End Group
+# Begin Group "Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\Common\CommandLineParser.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\CommandLineParser.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\CRC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\CRC.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\IntToString.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\IntToString.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyString.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyString.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyVector.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyVector.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\NewHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\NewHandler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\StdInStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\StdInStream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\StdOutStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\StdOutStream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\StringConvert.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\StringConvert.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\UTFConvert.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\UTFConvert.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Wildcard.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Wildcard.h
+# End Source File
+# End Group
+# Begin Group "7zip Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Common\CreateCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\CreateCoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\CWrappers.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\CWrappers.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FilePathAutoRename.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FilePathAutoRename.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FileStreams.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FileStreams.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FilterCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FilterCoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\InBuffer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\InBuffer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\LimitedStreams.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\LimitedStreams.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\LockedStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\LockedStream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\OffsetStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\OffsetStream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\OutBuffer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\OutBuffer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\ProgressUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\ProgressUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\PropId.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\RegisterArc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\RegisterCodec.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamBinder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamBinder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamObjects.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamObjects.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\VirtThread.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\VirtThread.h
+# End Source File
+# End Group
+# Begin Group "UI"
+
+# PROP Default_Filter ""
+# Begin Group "UI Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ArchiveExtractCallback.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ArchiveExtractCallback.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ArchiveOpenCallback.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ArchiveOpenCallback.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\DefaultName.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\DefaultName.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ExitCode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\Extract.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\Extract.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ExtractingFilePath.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ExtractingFilePath.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ExtractMode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\LoadCodecs.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\LoadCodecs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\OpenArchive.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\OpenArchive.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\PropIDUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\PropIDUtils.h
+# End Source File
+# End Group
+# End Group
+# Begin Group "C"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zCrc.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zCrc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zCrcOpt.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Aes.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Aes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\AesOpt.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Alloc.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Alloc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bcj2.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bcj2.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bra.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bra.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bra86.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\BraIA64.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\CpuArch.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Delta.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Delta.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Lzma2Dec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Lzma2Dec.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\LzmaDec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\LzmaDec.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Ppmd7.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Ppmd7.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Ppmd7Dec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Sha256.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Sha256.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Threads.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Threads.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\7z.ico
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\IArchive.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SfxCon.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw
new file mode 100644
index 00000000000..27bf7e6d19b
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "SFXCon"=.\SFXCon.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp
new file mode 100644
index 00000000000..781f810cfd6
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp
@@ -0,0 +1,459 @@
+// Main.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/MyWindows.h"
+
+#include "../../../Common/MyInitGuid.h"
+
+#include "../../../Common/CommandLineParser.h"
+#include "../../../Common/MyException.h"
+
+#ifdef _WIN32
+#include "../../../Windows/DLL.h"
+#include "../../../Windows/FileDir.h"
+#endif
+#include "../../../Windows/FileName.h"
+
+#include "../../UI/Common/ExitCode.h"
+#include "../../UI/Common/Extract.h"
+
+#include "../../UI/Console/ExtractCallbackConsole.h"
+#include "../../UI/Console/List.h"
+#include "../../UI/Console/OpenCallbackConsole.h"
+
+#include "../../MyVersion.h"
+
+using namespace NWindows;
+using namespace NFile;
+using namespace NDir;
+using namespace NCommandLineParser;
+
+#ifdef _WIN32
+HINSTANCE g_hInstance = 0;
+#endif
+int g_CodePage = -1;
+extern CStdOutStream *g_StdStream;
+
+static const char *kCopyrightString =
+"\n7-Zip SFX " MY_VERSION_COPYRIGHT_DATE "\n";
+
+static const int kNumSwitches = 6;
+
+namespace NKey {
+enum Enum
+{
+ kHelp1 = 0,
+ kHelp2,
+ kDisablePercents,
+ kYes,
+ kPassword,
+ kOutputDir
+};
+
+}
+
+namespace NRecursedType {
+enum EEnum
+{
+ kRecursed,
+ kWildcardOnlyRecursed,
+ kNonRecursed
+};
+}
+/*
+static const char kRecursedIDChar = 'R';
+static const wchar_t *kRecursedPostCharSet = L"0-";
+
+namespace NRecursedPostCharIndex {
+ enum EEnum
+ {
+ kWildcardRecursionOnly = 0,
+ kNoRecursion = 1
+ };
+}
+
+static const char kFileListID = '@';
+static const char kImmediateNameID = '!';
+
+static const char kSomeCludePostStringMinSize = 2; // at least <@|!><N>ame must be
+static const char kSomeCludeAfterRecursedPostStringMinSize = 2; // at least <@|!><N>ame must be
+*/
+static const CSwitchForm kSwitchForms[kNumSwitches] =
+{
+ { "?", NSwitchType::kSimple },
+ { "H", NSwitchType::kSimple },
+ { "BD", NSwitchType::kSimple },
+ { "Y", NSwitchType::kSimple },
+ { "P", NSwitchType::kString, false, 1 },
+ { "O", NSwitchType::kString, false, 1 },
+};
+
+static const int kNumCommandForms = 3;
+
+static const NRecursedType::EEnum kCommandRecursedDefault[kNumCommandForms] =
+{
+ NRecursedType::kRecursed
+};
+
+// static const bool kTestExtractRecursedDefault = true;
+// static const bool kAddRecursedDefault = false;
+
+static const wchar_t *kUniversalWildcard = L"*";
+static const int kCommandIndex = 0;
+
+static const char *kHelpString =
+ "\nUsage: 7zSFX [<command>] [<switches>...]\n"
+ "\n"
+ "<Commands>\n"
+ // " l: List contents of archive\n"
+ " t: Test integrity of archive\n"
+ " x: eXtract files with full pathname (default)\n"
+ "<Switches>\n"
+ // " -bd Disable percentage indicator\n"
+ " -o{Directory}: set Output directory\n"
+ " -p{Password}: set Password\n"
+ " -y: assume Yes on all queries\n";
+
+
+// ---------------------------
+// exception messages
+
+static const char *kUserErrorMessage = "Incorrect command line"; // NExitCode::kUserError
+// static const char *kIncorrectListFile = "Incorrect wildcard in listfile";
+static const char *kIncorrectWildcardInCommandLine = "Incorrect wildcard in command line";
+
+// static const CSysString kFileIsNotArchiveMessageBefore = "File \"";
+// static const CSysString kFileIsNotArchiveMessageAfter = "\" is not archive";
+
+// static const char *kProcessArchiveMessage = " archive: ";
+
+static const char *kCantFindSFX = " cannot find sfx";
+
+namespace NCommandType
+{
+ enum EEnum
+ {
+ kTest = 0,
+ kFullExtract,
+ kList
+ };
+}
+
+static const char *g_Commands = "txl";
+
+struct CArchiveCommand
+{
+ NCommandType::EEnum CommandType;
+
+ NRecursedType::EEnum DefaultRecursedType() const;
+};
+
+bool ParseArchiveCommand(const UString &commandString, CArchiveCommand &command)
+{
+ UString s = commandString;
+ s.MakeLower_Ascii();
+ if (s.Len() != 1)
+ return false;
+ if (s[0] >= 0x80)
+ return false;
+ int index = FindCharPosInString(g_Commands, (char)s[0]);
+ if (index < 0)
+ return false;
+ command.CommandType = (NCommandType::EEnum)index;
+ return true;
+}
+
+NRecursedType::EEnum CArchiveCommand::DefaultRecursedType() const
+{
+ return kCommandRecursedDefault[CommandType];
+}
+
+void PrintHelp(void)
+{
+ g_StdOut << kHelpString;
+}
+
+static void ShowMessageAndThrowException(const char *message, NExitCode::EEnum code)
+{
+ g_StdOut << message << endl;
+ throw code;
+}
+
+static void PrintHelpAndExit() // yyy
+{
+ PrintHelp();
+ ShowMessageAndThrowException(kUserErrorMessage, NExitCode::kUserError);
+}
+
+// ------------------------------------------------------------------
+// filenames functions
+
+static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
+ const UString &name, bool include, NRecursedType::EEnum type)
+{
+ /*
+ if (!IsWildcardFilePathLegal(name))
+ return false;
+ */
+ bool isWildcard = DoesNameContainWildcard(name);
+ bool recursed = false;
+
+ switch (type)
+ {
+ case NRecursedType::kWildcardOnlyRecursed:
+ recursed = isWildcard;
+ break;
+ case NRecursedType::kRecursed:
+ recursed = true;
+ break;
+ case NRecursedType::kNonRecursed:
+ recursed = false;
+ break;
+ }
+ wildcardCensor.AddPreItem(include, name, recursed, true);
+ return true;
+}
+
+void AddCommandLineWildcardToCensor(NWildcard::CCensor &wildcardCensor,
+ const UString &name, bool include, NRecursedType::EEnum type)
+{
+ if (!AddNameToCensor(wildcardCensor, name, include, type))
+ ShowMessageAndThrowException(kIncorrectWildcardInCommandLine, NExitCode::kUserError);
+}
+
+void AddToCensorFromNonSwitchesStrings(NWildcard::CCensor &wildcardCensor,
+ const UStringVector & /* nonSwitchStrings */, NRecursedType::EEnum type,
+ bool /* thereAreSwitchIncludeWildcards */)
+{
+ AddCommandLineWildcardToCensor(wildcardCensor, kUniversalWildcard, true, type);
+}
+
+
+#ifndef _WIN32
+static void GetArguments(int numArgs, const char *args[], UStringVector &parts)
+{
+ parts.Clear();
+ for (int i = 0; i < numArgs; i++)
+ {
+ UString s = MultiByteToUnicodeString(args[i]);
+ parts.Add(s);
+ }
+}
+#endif
+
+int Main2(
+ #ifndef _WIN32
+ int numArgs, const char *args[]
+ #endif
+)
+{
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ SetFileApisToOEM();
+ #endif
+
+ g_StdOut << kCopyrightString;
+
+ UStringVector commandStrings;
+ #ifdef _WIN32
+ NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings);
+ #else
+ GetArguments(numArgs, args, commandStrings);
+ #endif
+
+ #ifdef _WIN32
+
+ FString arcPath;
+ {
+ FString path;
+ NDLL::MyGetModuleFileName(path);
+ if (!MyGetFullPathName(path, arcPath))
+ {
+ g_StdOut << "GetFullPathName Error";
+ return NExitCode::kFatalError;
+ }
+ }
+
+ #else
+
+ UString arcPath = commandStrings.Front();
+
+ #endif
+
+ commandStrings.Delete(0);
+
+ NCommandLineParser::CParser parser(kNumSwitches);
+ try
+ {
+ parser.ParseStrings(kSwitchForms, commandStrings);
+ }
+ catch(...)
+ {
+ PrintHelpAndExit();
+ }
+
+ if (parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs)
+ {
+ PrintHelp();
+ return 0;
+ }
+ const UStringVector &nonSwitchStrings = parser.NonSwitchStrings;
+
+ int numNonSwitchStrings = nonSwitchStrings.Size();
+
+ CArchiveCommand command;
+ if (numNonSwitchStrings == 0)
+ command.CommandType = NCommandType::kFullExtract;
+ else
+ {
+ if (numNonSwitchStrings > 1)
+ PrintHelpAndExit();
+ if (!ParseArchiveCommand(nonSwitchStrings[kCommandIndex], command))
+ PrintHelpAndExit();
+ }
+
+
+ NRecursedType::EEnum recursedType;
+ recursedType = command.DefaultRecursedType();
+
+ NWildcard::CCensor wildcardCensor;
+
+ bool thereAreSwitchIncludeWildcards;
+ thereAreSwitchIncludeWildcards = false;
+
+ AddToCensorFromNonSwitchesStrings(wildcardCensor, nonSwitchStrings, recursedType,
+ thereAreSwitchIncludeWildcards);
+
+ bool yesToAll = parser[NKey::kYes].ThereIs;
+
+ // NExtractMode::EEnum extractMode;
+ // bool isExtractGroupCommand = command.IsFromExtractGroup(extractMode);
+
+ bool passwordEnabled = parser[NKey::kPassword].ThereIs;
+
+ UString password;
+ if (passwordEnabled)
+ password = parser[NKey::kPassword].PostStrings[0];
+
+ if (!NFind::DoesFileExist(arcPath))
+ throw kCantFindSFX;
+
+ FString outputDir;
+ if (parser[NKey::kOutputDir].ThereIs)
+ {
+ outputDir = us2fs(parser[NKey::kOutputDir].PostStrings[0]);
+ NName::NormalizeDirPathPrefix(outputDir);
+ }
+
+
+ wildcardCensor.AddPathsToCensor(NWildcard::k_RelatPath);
+
+ {
+ UStringVector v1, v2;
+ v1.Add(fs2us(arcPath));
+ v2.Add(fs2us(arcPath));
+ const NWildcard::CCensorNode &wildcardCensorHead =
+ wildcardCensor.Pairs.Front().Head;
+
+ CCodecs *codecs = new CCodecs;
+ CMyComPtr<
+ #ifdef EXTERNAL_CODECS
+ ICompressCodecsInfo
+ #else
+ IUnknown
+ #endif
+ > compressCodecsInfo = codecs;
+ HRESULT result = codecs->Load();
+ if (result != S_OK)
+ throw CSystemException(result);
+
+ if (command.CommandType != NCommandType::kList)
+ {
+ CExtractCallbackConsole *ecs = new CExtractCallbackConsole;
+ CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
+ ecs->Init(g_StdStream, &g_StdErr, g_StdStream);
+
+ #ifndef _NO_CRYPTO
+ ecs->PasswordIsDefined = passwordEnabled;
+ ecs->Password = password;
+ #endif
+
+ /*
+ COpenCallbackConsole openCallback;
+ openCallback.Init(g_StdStream, g_StdStream);
+
+ #ifndef _NO_CRYPTO
+ openCallback.PasswordIsDefined = passwordEnabled;
+ openCallback.Password = password;
+ #endif
+ */
+
+ CExtractOptions eo;
+ eo.StdOutMode = false;
+ eo.YesToAll = yesToAll;
+ eo.TestMode = command.CommandType == NCommandType::kTest;
+ eo.PathMode = NExtract::NPathMode::kFullPaths;
+ eo.OverwriteMode = yesToAll ?
+ NExtract::NOverwriteMode::kOverwrite :
+ NExtract::NOverwriteMode::kAsk;
+ eo.OutputDir = outputDir;
+
+ UString errorMessage;
+ CDecompressStat stat;
+ HRESULT result = Extract(
+ codecs, CObjectVector<COpenType>(), CIntVector(),
+ v1, v2,
+ wildcardCensorHead,
+ eo, ecs, ecs,
+ // NULL, // hash
+ errorMessage, stat);
+ if (!errorMessage.IsEmpty())
+ {
+ (*g_StdStream) << endl << "Error: " << errorMessage;;
+ if (result == S_OK)
+ result = E_FAIL;
+ }
+
+ if (ecs->NumArcsWithError != 0 || ecs->NumFileErrors != 0)
+ {
+ if (ecs->NumArcsWithError != 0)
+ (*g_StdStream) << endl << "Archive Errors" << endl;
+ if (ecs->NumFileErrors != 0)
+ (*g_StdStream) << endl << "Sub items Errors: " << ecs->NumFileErrors << endl;
+ return NExitCode::kFatalError;
+ }
+ if (result != S_OK)
+ throw CSystemException(result);
+ }
+ else
+ {
+ throw CSystemException(E_NOTIMPL);
+
+ /*
+ UInt64 numErrors = 0;
+ UInt64 numWarnings = 0;
+ HRESULT result = ListArchives(
+ codecs, CObjectVector<COpenType>(), CIntVector(),
+ false, // stdInMode
+ v1, v2,
+ true, // processAltStreams
+ false, // showAltStreams
+ wildcardCensorHead,
+ true, // enableHeaders
+ false, // techMode
+ #ifndef _NO_CRYPTO
+ passwordEnabled, password,
+ #endif
+ numErrors, numWarnings);
+ if (numErrors > 0)
+ {
+ g_StdOut << endl << "Errors: " << numErrors;
+ return NExitCode::kFatalError;
+ }
+ if (result != S_OK)
+ throw CSystemException(result);
+ */
+ }
+ }
+ return 0;
+}
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp
new file mode 100644
index 00000000000..d0feea85c7b
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp
@@ -0,0 +1,3 @@
+// StdAfx.cpp
+
+#include "StdAfx.h"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h
new file mode 100644
index 00000000000..2854ff3e935
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h
@@ -0,0 +1,8 @@
+// StdAfx.h
+
+#ifndef __STDAFX_H
+#define __STDAFX_H
+
+#include "../../../Common/Common.h"
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile
new file mode 100644
index 00000000000..f1cd2f57fd7
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile
@@ -0,0 +1,127 @@
+PROG = 7zCon.sfx
+MY_CONSOLE = 1
+CFLAGS = $(CFLAGS) \
+ -DEXTRACT_ONLY \
+ -DNO_READ_FROM_CODER \
+ -D_SFX \
+
+CURRENT_OBJS = \
+ $O\SfxCon.obj \
+
+CONSOLE_OBJS = \
+ $O\ConsoleClose.obj \
+ $O\ExtractCallbackConsole.obj \
+ $O\List.obj \
+ $O\MainAr.obj \
+ $O\OpenCallbackConsole.obj \
+ $O\PercentPrinter.obj \
+ $O\UserInputUtils.obj \
+
+COMMON_OBJS = \
+ $O\CommandLineParser.obj \
+ $O\CRC.obj \
+ $O\IntToString.obj \
+ $O\MyString.obj \
+ $O\MyVector.obj \
+ $O\NewHandler.obj \
+ $O\StdInStream.obj \
+ $O\StdOutStream.obj \
+ $O\StringConvert.obj \
+ $O\Wildcard.obj \
+ $O\UTFConvert.obj \
+
+WIN_OBJS = \
+ $O\DLL.obj \
+ $O\ErrorMsg.obj \
+ $O\FileDir.obj \
+ $O\FileFind.obj \
+ $O\FileIO.obj \
+ $O\FileName.obj \
+ $O\PropVariant.obj \
+ $O\PropVariantConv.obj \
+ $O\Synchronization.obj \
+
+7ZIP_COMMON_OBJS = \
+ $O\CreateCoder.obj \
+ $O\CWrappers.obj \
+ $O\FilePathAutoRename.obj \
+ $O\FileStreams.obj \
+ $O\InBuffer.obj \
+ $O\FilterCoder.obj \
+ $O\LimitedStreams.obj \
+ $O\OutBuffer.obj \
+ $O\ProgressUtils.obj \
+ $O\PropId.obj \
+ $O\StreamBinder.obj \
+ $O\StreamObjects.obj \
+ $O\StreamUtils.obj \
+ $O\VirtThread.obj \
+
+UI_COMMON_OBJS = \
+ $O\ArchiveExtractCallback.obj \
+ $O\ArchiveOpenCallback.obj \
+ $O\DefaultName.obj \
+ $O\LoadCodecs.obj \
+ $O\Extract.obj \
+ $O\ExtractingFilePath.obj \
+ $O\OpenArchive.obj \
+ $O\PropIDUtils.obj \
+
+AR_OBJS = \
+ $O\SplitHandler.obj \
+
+AR_COMMON_OBJS = \
+ $O\CoderMixer2.obj \
+ $O\ItemNameUtils.obj \
+ $O\MultiStream.obj \
+ $O\OutStreamWithCRC.obj \
+
+
+7Z_OBJS = \
+ $O\7zDecode.obj \
+ $O\7zExtract.obj \
+ $O\7zHandler.obj \
+ $O\7zIn.obj \
+ $O\7zRegister.obj \
+
+COMPRESS_OBJS = \
+ $O\Bcj2Coder.obj \
+ $O\Bcj2Register.obj \
+ $O\BcjCoder.obj \
+ $O\BcjRegister.obj \
+ $O\BranchMisc.obj \
+ $O\BranchRegister.obj \
+ $O\CopyCoder.obj \
+ $O\CopyRegister.obj \
+ $O\DeltaFilter.obj \
+ $O\Lzma2Decoder.obj \
+ $O\Lzma2Register.obj \
+ $O\LzmaDecoder.obj \
+ $O\LzmaRegister.obj \
+ $O\PpmdDecoder.obj \
+ $O\PpmdRegister.obj \
+
+CRYPTO_OBJS = \
+ $O\7zAes.obj \
+ $O\7zAesRegister.obj \
+ $O\MyAes.obj \
+
+C_OBJS = \
+ $O\Alloc.obj \
+ $O\Bcj2.obj \
+ $O\Bra.obj \
+ $O\Bra86.obj \
+ $O\BraIA64.obj \
+ $O\CpuArch.obj \
+ $O\Delta.obj \
+ $O\Lzma2Dec.obj \
+ $O\LzmaDec.obj \
+ $O\Ppmd7.obj \
+ $O\Ppmd7Dec.obj \
+ $O\Sha256.obj \
+ $O\Threads.obj \
+
+!include "../../Aes.mak"
+!include "../../Crc.mak"
+
+!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/resource.rc b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/resource.rc
new file mode 100644
index 00000000000..58331b81f8f
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/resource.rc
@@ -0,0 +1,5 @@
+#include "../../MyVersionInfo.rc"
+
+MY_VERSION_INFO_APP("7z Console SFX", "7z.sfx")
+
+101 ICON "7z.ico" \ No newline at end of file
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp
new file mode 100644
index 00000000000..793306303c5
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp
@@ -0,0 +1,246 @@
+// ExtractCallbackSfx.h
+
+#include "StdAfx.h"
+
+#include "../../../Common/Wildcard.h"
+
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileFind.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/PropVariant.h"
+
+#include "ExtractCallbackSfx.h"
+
+using namespace NWindows;
+using namespace NFile;
+using namespace NDir;
+
+static LPCWSTR kCantDeleteFile = L"Can not delete output file";
+static LPCWSTR kCantOpenFile = L"Can not open output file";
+static LPCWSTR kUnsupportedMethod = L"Unsupported Method";
+
+void CExtractCallbackImp::Init(IInArchive *archiveHandler,
+ const FString &directoryPath,
+ const UString &itemDefaultName,
+ const FILETIME &defaultMTime,
+ UInt32 defaultAttributes)
+{
+ _message.Empty();
+ _isCorrupt = false;
+ _itemDefaultName = itemDefaultName;
+ _defaultMTime = defaultMTime;
+ _defaultAttributes = defaultAttributes;
+ _archiveHandler = archiveHandler;
+ _directoryPath = directoryPath;
+ NName::NormalizeDirPathPrefix(_directoryPath);
+}
+
+HRESULT CExtractCallbackImp::Open_CheckBreak()
+{
+ #ifndef _NO_PROGRESS
+ return ProgressDialog.Sync.ProcessStopAndPause();
+ #else
+ return S_OK;
+ #endif
+}
+
+HRESULT CExtractCallbackImp::Open_SetTotal(const UInt64 * /* numFiles */, const UInt64 * /* numBytes */)
+{
+ return S_OK;
+}
+
+HRESULT CExtractCallbackImp::Open_SetCompleted(const UInt64 * /* numFiles */, const UInt64 * /* numBytes */)
+{
+ #ifndef _NO_PROGRESS
+ return ProgressDialog.Sync.ProcessStopAndPause();
+ #else
+ return S_OK;
+ #endif
+}
+
+HRESULT CExtractCallbackImp::Open_Finished()
+{
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 size)
+{
+ #ifndef _NO_PROGRESS
+ ProgressDialog.Sync.SetProgress(size, 0);
+ #endif
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallbackImp::SetCompleted(const UInt64 *completeValue)
+{
+ #ifndef _NO_PROGRESS
+ RINOK(ProgressDialog.Sync.ProcessStopAndPause());
+ if (completeValue != NULL)
+ ProgressDialog.Sync.SetPos(*completeValue);
+ #endif
+ return S_OK;
+}
+
+void CExtractCallbackImp::CreateComplexDirectory(const UStringVector &dirPathParts)
+{
+ FString fullPath = _directoryPath;
+ FOR_VECTOR (i, dirPathParts)
+ {
+ fullPath += us2fs(dirPathParts[i]);
+ CreateDir(fullPath);
+ fullPath.Add_PathSepar();
+ }
+}
+
+STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
+ ISequentialOutStream **outStream, Int32 askExtractMode)
+{
+ #ifndef _NO_PROGRESS
+ if (ProgressDialog.Sync.GetStopped())
+ return E_ABORT;
+ #endif
+ _outFileStream.Release();
+
+ UString fullPath;
+ {
+ NCOM::CPropVariant prop;
+ RINOK(_archiveHandler->GetProperty(index, kpidPath, &prop));
+ if (prop.vt == VT_EMPTY)
+ fullPath = _itemDefaultName;
+ else
+ {
+ if (prop.vt != VT_BSTR)
+ return E_FAIL;
+ fullPath.SetFromBstr(prop.bstrVal);
+ }
+ _filePath = fullPath;
+ }
+
+ if (askExtractMode == NArchive::NExtract::NAskMode::kExtract)
+ {
+ NCOM::CPropVariant prop;
+ RINOK(_archiveHandler->GetProperty(index, kpidAttrib, &prop));
+ if (prop.vt == VT_EMPTY)
+ _processedFileInfo.Attributes = _defaultAttributes;
+ else
+ {
+ if (prop.vt != VT_UI4)
+ return E_FAIL;
+ _processedFileInfo.Attributes = prop.ulVal;
+ }
+
+ RINOK(_archiveHandler->GetProperty(index, kpidIsDir, &prop));
+ _processedFileInfo.IsDir = VARIANT_BOOLToBool(prop.boolVal);
+
+ bool isAnti = false;
+ {
+ NCOM::CPropVariant propTemp;
+ RINOK(_archiveHandler->GetProperty(index, kpidIsAnti, &propTemp));
+ if (propTemp.vt == VT_BOOL)
+ isAnti = VARIANT_BOOLToBool(propTemp.boolVal);
+ }
+
+ RINOK(_archiveHandler->GetProperty(index, kpidMTime, &prop));
+ switch (prop.vt)
+ {
+ case VT_EMPTY: _processedFileInfo.MTime = _defaultMTime; break;
+ case VT_FILETIME: _processedFileInfo.MTime = prop.filetime; break;
+ default: return E_FAIL;
+ }
+
+ UStringVector pathParts;
+ SplitPathToParts(fullPath, pathParts);
+ if (pathParts.IsEmpty())
+ return E_FAIL;
+
+ UString processedPath = fullPath;
+
+ if (!_processedFileInfo.IsDir)
+ pathParts.DeleteBack();
+ if (!pathParts.IsEmpty())
+ {
+ if (!isAnti)
+ CreateComplexDirectory(pathParts);
+ }
+
+ FString fullProcessedPath = _directoryPath + us2fs(processedPath);
+
+ if (_processedFileInfo.IsDir)
+ {
+ _diskFilePath = fullProcessedPath;
+
+ if (isAnti)
+ RemoveDir(_diskFilePath);
+ else
+ SetDirTime(_diskFilePath, NULL, NULL, &_processedFileInfo.MTime);
+ return S_OK;
+ }
+
+ NFind::CFileInfo fileInfo;
+ if (fileInfo.Find(fullProcessedPath))
+ {
+ if (!DeleteFileAlways(fullProcessedPath))
+ {
+ _message = kCantDeleteFile;
+ return E_FAIL;
+ }
+ }
+
+ if (!isAnti)
+ {
+ _outFileStreamSpec = new COutFileStream;
+ CMyComPtr<ISequentialOutStream> outStreamLoc(_outFileStreamSpec);
+ if (!_outFileStreamSpec->Create(fullProcessedPath, true))
+ {
+ _message = kCantOpenFile;
+ return E_FAIL;
+ }
+ _outFileStream = outStreamLoc;
+ *outStream = outStreamLoc.Detach();
+ }
+ _diskFilePath = fullProcessedPath;
+ }
+ else
+ {
+ *outStream = NULL;
+ }
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallbackImp::PrepareOperation(Int32 askExtractMode)
+{
+ _extractMode = (askExtractMode == NArchive::NExtract::NAskMode::kExtract);
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResult)
+{
+ switch (resultEOperationResult)
+ {
+ case NArchive::NExtract::NOperationResult::kOK:
+ break;
+
+ default:
+ {
+ _outFileStream.Release();
+ switch (resultEOperationResult)
+ {
+ case NArchive::NExtract::NOperationResult::kUnsupportedMethod:
+ _message = kUnsupportedMethod;
+ break;
+ default:
+ _isCorrupt = true;
+ }
+ return E_FAIL;
+ }
+ }
+ if (_outFileStream != NULL)
+ {
+ _outFileStreamSpec->SetMTime(&_processedFileInfo.MTime);
+ RINOK(_outFileStreamSpec->Close());
+ }
+ _outFileStream.Release();
+ if (_extractMode)
+ SetFileAttrib(_diskFilePath, _processedFileInfo.Attributes);
+ return S_OK;
+}
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h
new file mode 100644
index 00000000000..cfbc5c07aa0
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h
@@ -0,0 +1,86 @@
+// ExtractCallbackSfx.h
+
+#ifndef __EXTRACT_CALLBACK_SFX_H
+#define __EXTRACT_CALLBACK_SFX_H
+
+#include "resource.h"
+
+#include "../../../Windows/ResourceString.h"
+
+#include "../../Archive/IArchive.h"
+
+#include "../../Common/FileStreams.h"
+#include "../../ICoder.h"
+
+#include "../../UI/FileManager/LangUtils.h"
+
+#ifndef _NO_PROGRESS
+#include "../../UI/FileManager/ProgressDialog.h"
+#endif
+#include "../../UI/Common/ArchiveOpenCallback.h"
+
+class CExtractCallbackImp:
+ public IArchiveExtractCallback,
+ public IOpenCallbackUI,
+ public CMyUnknownImp
+{
+public:
+
+ MY_UNKNOWN_IMP
+
+ INTERFACE_IArchiveExtractCallback(;)
+ INTERFACE_IOpenCallbackUI(;)
+
+private:
+ CMyComPtr<IInArchive> _archiveHandler;
+ FString _directoryPath;
+ UString _filePath;
+ FString _diskFilePath;
+
+ bool _extractMode;
+ struct CProcessedFileInfo
+ {
+ FILETIME MTime;
+ bool IsDir;
+ UInt32 Attributes;
+ } _processedFileInfo;
+
+ COutFileStream *_outFileStreamSpec;
+ CMyComPtr<ISequentialOutStream> _outFileStream;
+
+ UString _itemDefaultName;
+ FILETIME _defaultMTime;
+ UInt32 _defaultAttributes;
+
+ void CreateComplexDirectory(const UStringVector &dirPathParts);
+public:
+ #ifndef _NO_PROGRESS
+ CProgressDialog ProgressDialog;
+ #endif
+
+ bool _isCorrupt;
+ UString _message;
+
+ void Init(IInArchive *archiveHandler,
+ const FString &directoryPath,
+ const UString &itemDefaultName,
+ const FILETIME &defaultMTime,
+ UInt32 defaultAttributes);
+
+ #ifndef _NO_PROGRESS
+ HRESULT StartProgressDialog(const UString &title, NWindows::CThread &thread)
+ {
+ ProgressDialog.Create(title, thread, 0);
+ {
+ ProgressDialog.SetText(LangString(IDS_PROGRESS_EXTRACTING));
+ }
+
+ ProgressDialog.Show(SW_SHOWNORMAL);
+ return S_OK;
+ }
+ virtual ~CExtractCallbackImp() { ProgressDialog.Destroy(); }
+ #endif
+
+};
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp
new file mode 100644
index 00000000000..ba41fd1add8
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp
@@ -0,0 +1,138 @@
+// ExtractEngine.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/Thread.h"
+
+#include "../../UI/Common/OpenArchive.h"
+
+#include "../../UI/FileManager/FormatUtils.h"
+#include "../../UI/FileManager/LangUtils.h"
+
+#include "ExtractCallbackSfx.h"
+#include "ExtractEngine.h"
+
+using namespace NWindows;
+using namespace NFile;
+using namespace NDir;
+
+static LPCWSTR kCantFindArchive = L"Can not find archive file";
+static LPCWSTR kCantOpenArchive = L"Can not open the file as archive";
+
+struct CThreadExtracting
+{
+ CCodecs *Codecs;
+ FString FileName;
+ FString DestFolder;
+
+ CExtractCallbackImp *ExtractCallbackSpec;
+ CMyComPtr<IArchiveExtractCallback> ExtractCallback;
+
+ CArchiveLink ArchiveLink;
+ HRESULT Result;
+ UString ErrorMessage;
+
+ void Process2()
+ {
+ NFind::CFileInfo fi;
+ if (!fi.Find(FileName))
+ {
+ ErrorMessage = kCantFindArchive;
+ Result = E_FAIL;
+ return;
+ }
+
+ CObjectVector<COpenType> incl;
+ CIntVector excl;
+ COpenOptions options;
+ options.codecs = Codecs;
+ options.types = &incl;
+ options.excludedFormats = &excl;
+ options.filePath = fs2us(FileName);
+
+ Result = ArchiveLink.Open2(options, ExtractCallbackSpec);
+ if (Result != S_OK)
+ {
+ if (Result != S_OK)
+ ErrorMessage = kCantOpenArchive;
+ return;
+ }
+
+ FString dirPath = DestFolder;
+ NName::NormalizeDirPathPrefix(dirPath);
+
+ if (!CreateComplexDir(dirPath))
+ {
+ ErrorMessage = MyFormatNew(IDS_CANNOT_CREATE_FOLDER,
+ #ifdef LANG
+ 0x02000603,
+ #endif
+ fs2us(dirPath));
+ Result = E_FAIL;
+ return;
+ }
+
+ ExtractCallbackSpec->Init(ArchiveLink.GetArchive(), dirPath, L"Default", fi.MTime, 0);
+
+ Result = ArchiveLink.GetArchive()->Extract(0, (UInt32)(Int32)-1 , BoolToInt(false), ExtractCallback);
+ }
+
+ void Process()
+ {
+ try
+ {
+ #ifndef _NO_PROGRESS
+ CProgressCloser closer(ExtractCallbackSpec->ProgressDialog);
+ #endif
+ Process2();
+ }
+ catch(...) { Result = E_FAIL; }
+ }
+
+ static THREAD_FUNC_DECL MyThreadFunction(void *param)
+ {
+ ((CThreadExtracting *)param)->Process();
+ return 0;
+ }
+};
+
+HRESULT ExtractArchive(CCodecs *codecs, const FString &fileName, const FString &destFolder,
+ bool showProgress, bool &isCorrupt, UString &errorMessage)
+{
+ isCorrupt = false;
+ CThreadExtracting t;
+
+ t.Codecs = codecs;
+ t.FileName = fileName;
+ t.DestFolder = destFolder;
+
+ t.ExtractCallbackSpec = new CExtractCallbackImp;
+ t.ExtractCallback = t.ExtractCallbackSpec;
+
+ #ifndef _NO_PROGRESS
+
+ if (showProgress)
+ {
+ t.ExtractCallbackSpec->ProgressDialog.IconID = IDI_ICON;
+ NWindows::CThread thread;
+ RINOK(thread.Create(CThreadExtracting::MyThreadFunction, &t));
+
+ UString title;
+ LangString(IDS_PROGRESS_EXTRACTING, title);
+ t.ExtractCallbackSpec->StartProgressDialog(title, thread);
+ }
+ else
+
+ #endif
+ {
+ t.Process2();
+ }
+
+ errorMessage = t.ErrorMessage;
+ if (errorMessage.IsEmpty())
+ errorMessage = t.ExtractCallbackSpec->_message;
+ isCorrupt = t.ExtractCallbackSpec->_isCorrupt;
+ return t.Result;
+}
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h
new file mode 100644
index 00000000000..295d77b9957
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h
@@ -0,0 +1,11 @@
+// ExtractEngine.h
+
+#ifndef __EXTRACT_ENGINE_H
+#define __EXTRACT_ENGINE_H
+
+#include "../../UI/Common/LoadCodecs.h"
+
+HRESULT ExtractArchive(CCodecs *codecs, const FString &fileName, const FString &destFolder,
+ bool showProgress, bool &isCorrupt, UString &errorMessage);
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp
new file mode 100644
index 00000000000..f2783e028cf
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp
@@ -0,0 +1,760 @@
+# Microsoft Developer Studio Project File - Name="SFXSetup" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=SFXSetup - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "SFXSetup.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "SFXSetup.mak" CFG="SFXSetup - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "SFXSetup - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "SFXSetup - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE "SFXSetup - Win32 ReleaseD" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "SFXSetup - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /Gz /MT /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "_SFX" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x419 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7zS.sfx" /opt:NOWIN98
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "SFXSetup - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "_SFX" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x419 /d "_DEBUG"
+# ADD RSC /l 0x419 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"C:\UTIL\7zSfxS.exe" /pdbtype:sept
+
+!ELSEIF "$(CFG)" == "SFXSetup - Win32 ReleaseD"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ReleaseD"
+# PROP BASE Intermediate_Dir "ReleaseD"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseD"
+# PROP Intermediate_Dir "ReleaseD"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "_SFX" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "_SFX" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x419 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\UTIL\7zWinSR.exe"
+# SUBTRACT BASE LINK32 /debug /nodefaultlib
+# ADD LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7zSD.sfx" /opt:NOWIN98
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "SFXSetup - Win32 Release"
+# Name "SFXSetup - Win32 Debug"
+# Name "SFXSetup - Win32 ReleaseD"
+# Begin Group "Spec"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"StdAfx.h"
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Interface"
+
+# PROP Default_Filter ""
+# End Group
+# Begin Group "7z"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zDecode.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zDecode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zExtract.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zHandler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zHeader.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zIn.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zIn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zItem.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zRegister.cpp
+# End Source File
+# End Group
+# Begin Group "Archive Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\CoderMixer2.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\CoderMixer2.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\ItemNameUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\ItemNameUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\OutStreamWithCRC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\OutStreamWithCRC.h
+# End Source File
+# End Group
+# Begin Group "Compress"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Compress\Bcj2Coder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Bcj2Register.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BcjCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BcjRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BranchMisc.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BranchMisc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BranchRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\CopyCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\CopyRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\DeltaFilter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Lzma2Decoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Lzma2Decoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Lzma2Register.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\LzmaDecoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\LzmaRegister.cpp
+# End Source File
+# End Group
+# Begin Group "Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\Common\CommandLineParser.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\CommandLineParser.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\CRC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\CRC.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\IntToString.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\IntToString.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyString.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyString.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyVector.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyVector.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\NewHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\NewHandler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\StringConvert.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\StringConvert.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\TextConfig.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\TextConfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\UTFConvert.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\UTFConvert.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Wildcard.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Wildcard.h
+# End Source File
+# End Group
+# Begin Group "Windows"
+
+# PROP Default_Filter ""
+# Begin Group "Control"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Control\Dialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Control\Dialog.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\..\Windows\DLL.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\DLL.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\ErrorMsg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\ErrorMsg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileDir.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileDir.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileFind.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileFind.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileIO.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileIO.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileName.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileName.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariant.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariant.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\ResourceString.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\ResourceString.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Synchronization.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Synchronization.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Window.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Window.h
+# End Source File
+# End Group
+# Begin Group "7z Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Common\CreateCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\CreateCoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FileStreams.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FileStreams.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FilterCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FilterCoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\InBuffer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\InBuffer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\LimitedStreams.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\LimitedStreams.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\OutBuffer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\OutBuffer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\ProgressUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\ProgressUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\PropId.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamBinder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamBinder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamObjects.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamObjects.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\VirtThread.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\VirtThread.h
+# End Source File
+# End Group
+# Begin Group "UI"
+
+# PROP Default_Filter ""
+# Begin Group "Explorer"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\UI\Explorer\MyMessages.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Explorer\MyMessages.h
+# End Source File
+# End Group
+# Begin Group "UI Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ArchiveOpenCallback.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ArchiveOpenCallback.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\DefaultName.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\DefaultName.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ExtractMode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\LoadCodecs.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\LoadCodecs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\OpenArchive.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\OpenArchive.h
+# End Source File
+# End Group
+# End Group
+# Begin Group "File Manager"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\FormatUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\FormatUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\LangUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\ProgressDialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\ProgressDialog.h
+# End Source File
+# End Group
+# Begin Group "C"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zCrc.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zCrc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zCrcOpt.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Alloc.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Alloc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bcj2.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bcj2.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bra.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bra.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bra86.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\BraIA64.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\CpuArch.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\CpuArch.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Delta.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Delta.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Lzma2Dec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Lzma2Dec.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\LzmaDec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\LzmaDec.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Threads.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Threads.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\ExtractCallbackSfx.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ExtractCallbackSfx.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ExtractEngine.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ExtractEngine.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\setup.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\SfxSetup.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw
new file mode 100644
index 00000000000..f563b21f254
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "SFXSetup"=.\SFXSetup.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp
new file mode 100644
index 00000000000..d389023574f
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp
@@ -0,0 +1,356 @@
+// Main.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/MyWindows.h"
+
+#include "../../../Common/MyInitGuid.h"
+
+#include "../../../Common/CommandLineParser.h"
+#include "../../../Common/StringConvert.h"
+#include "../../../Common/TextConfig.h"
+
+#include "../../../Windows/DLL.h"
+#include "../../../Windows/ErrorMsg.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileFind.h"
+#include "../../../Windows/FileIO.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/NtCheck.h"
+#include "../../../Windows/ResourceString.h"
+
+#include "../../UI/Explorer/MyMessages.h"
+
+#include "ExtractEngine.h"
+
+#include "resource.h"
+
+using namespace NWindows;
+using namespace NFile;
+using namespace NDir;
+
+HINSTANCE g_hInstance;
+
+static CFSTR kTempDirPrefix = FTEXT("7zS");
+
+#define _SHELL_EXECUTE
+
+static bool ReadDataString(CFSTR fileName, LPCSTR startID,
+ LPCSTR endID, AString &stringResult)
+{
+ stringResult.Empty();
+ NIO::CInFile inFile;
+ if (!inFile.Open(fileName))
+ return false;
+ const int kBufferSize = (1 << 12);
+
+ Byte buffer[kBufferSize];
+ int signatureStartSize = MyStringLen(startID);
+ int signatureEndSize = MyStringLen(endID);
+
+ UInt32 numBytesPrev = 0;
+ bool writeMode = false;
+ UInt64 posTotal = 0;
+ for (;;)
+ {
+ if (posTotal > (1 << 20))
+ return (stringResult.IsEmpty());
+ UInt32 numReadBytes = kBufferSize - numBytesPrev;
+ UInt32 processedSize;
+ if (!inFile.Read(buffer + numBytesPrev, numReadBytes, processedSize))
+ return false;
+ if (processedSize == 0)
+ return true;
+ UInt32 numBytesInBuffer = numBytesPrev + processedSize;
+ UInt32 pos = 0;
+ for (;;)
+ {
+ if (writeMode)
+ {
+ if (pos > numBytesInBuffer - signatureEndSize)
+ break;
+ if (memcmp(buffer + pos, endID, signatureEndSize) == 0)
+ return true;
+ char b = buffer[pos];
+ if (b == 0)
+ return false;
+ stringResult += b;
+ pos++;
+ }
+ else
+ {
+ if (pos > numBytesInBuffer - signatureStartSize)
+ break;
+ if (memcmp(buffer + pos, startID, signatureStartSize) == 0)
+ {
+ writeMode = true;
+ pos += signatureStartSize;
+ }
+ else
+ pos++;
+ }
+ }
+ numBytesPrev = numBytesInBuffer - pos;
+ posTotal += pos;
+ memmove(buffer, buffer + pos, numBytesPrev);
+ }
+}
+
+static char kStartID[] = { ',','!','@','I','n','s','t','a','l','l','@','!','U','T','F','-','8','!', 0 };
+static char kEndID[] = { ',','!','@','I','n','s','t','a','l','l','E','n','d','@','!', 0 };
+
+struct CInstallIDInit
+{
+ CInstallIDInit()
+ {
+ kStartID[0] = ';';
+ kEndID[0] = ';';
+ };
+} g_CInstallIDInit;
+
+
+#define NT_CHECK_FAIL_ACTION ShowErrorMessage(L"Unsupported Windows version"); return 1;
+
+static void ShowErrorMessageSpec(const UString &name)
+{
+ UString message = NError::MyFormatMessage(::GetLastError());
+ int pos = message.Find(L"%1");
+ if (pos >= 0)
+ {
+ message.Delete(pos, 2);
+ message.Insert(pos, name);
+ }
+ ShowErrorMessage(NULL, message);
+}
+
+int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
+ #ifdef UNDER_CE
+ LPWSTR
+ #else
+ LPSTR
+ #endif
+ /* lpCmdLine */,int /* nCmdShow */)
+{
+ g_hInstance = (HINSTANCE)hInstance;
+
+ NT_CHECK
+
+ // InitCommonControls();
+
+ UString archiveName, switches;
+ #ifdef _SHELL_EXECUTE
+ UString executeFile, executeParameters;
+ #endif
+ NCommandLineParser::SplitCommandLine(GetCommandLineW(), archiveName, switches);
+
+ FString fullPath;
+ NDLL::MyGetModuleFileName(fullPath);
+
+ switches.Trim();
+ bool assumeYes = false;
+ if (switches.IsPrefixedBy_Ascii_NoCase("-y"))
+ {
+ assumeYes = true;
+ switches = switches.Ptr(2);
+ switches.Trim();
+ }
+
+ AString config;
+ if (!ReadDataString(fullPath, kStartID, kEndID, config))
+ {
+ if (!assumeYes)
+ ShowErrorMessage(L"Can't load config info");
+ return 1;
+ }
+
+ UString dirPrefix = L"." WSTRING_PATH_SEPARATOR;
+ UString appLaunched;
+ bool showProgress = true;
+ if (!config.IsEmpty())
+ {
+ CObjectVector<CTextConfigPair> pairs;
+ if (!GetTextConfig(config, pairs))
+ {
+ if (!assumeYes)
+ ShowErrorMessage(L"Config failed");
+ return 1;
+ }
+ UString friendlyName = GetTextConfigValue(pairs, L"Title");
+ UString installPrompt = GetTextConfigValue(pairs, L"BeginPrompt");
+ UString progress = GetTextConfigValue(pairs, L"Progress");
+ if (progress.IsEqualTo_Ascii_NoCase("no"))
+ showProgress = false;
+ int index = FindTextConfigItem(pairs, L"Directory");
+ if (index >= 0)
+ dirPrefix = pairs[index].String;
+ if (!installPrompt.IsEmpty() && !assumeYes)
+ {
+ if (MessageBoxW(0, installPrompt, friendlyName, MB_YESNO |
+ MB_ICONQUESTION) != IDYES)
+ return 0;
+ }
+ appLaunched = GetTextConfigValue(pairs, L"RunProgram");
+
+ #ifdef _SHELL_EXECUTE
+ executeFile = GetTextConfigValue(pairs, L"ExecuteFile");
+ executeParameters = GetTextConfigValue(pairs, L"ExecuteParameters");
+ #endif
+ }
+
+ CTempDir tempDir;
+ if (!tempDir.Create(kTempDirPrefix))
+ {
+ if (!assumeYes)
+ ShowErrorMessage(L"Can not create temp folder archive");
+ return 1;
+ }
+
+ CCodecs *codecs = new CCodecs;
+ CMyComPtr<IUnknown> compressCodecsInfo = codecs;
+ HRESULT result = codecs->Load();
+ if (result != S_OK)
+ {
+ ShowErrorMessage(L"Can not load codecs");
+ return 1;
+ }
+
+ const FString tempDirPath = tempDir.GetPath();
+ // tempDirPath = L"M:\\1\\"; // to test low disk space
+ {
+ bool isCorrupt = false;
+ UString errorMessage;
+ HRESULT result = ExtractArchive(codecs, fullPath, tempDirPath, showProgress,
+ isCorrupt, errorMessage);
+
+ if (result != S_OK)
+ {
+ if (!assumeYes)
+ {
+ if (result == S_FALSE || isCorrupt)
+ {
+ NWindows::MyLoadString(IDS_EXTRACTION_ERROR_MESSAGE, errorMessage);
+ result = E_FAIL;
+ }
+ if (result != E_ABORT)
+ {
+ if (errorMessage.IsEmpty())
+ errorMessage = NError::MyFormatMessage(result);
+ ::MessageBoxW(0, errorMessage, NWindows::MyLoadString(IDS_EXTRACTION_ERROR_TITLE), MB_ICONERROR);
+ }
+ }
+ return 1;
+ }
+ }
+
+ #ifndef UNDER_CE
+ CCurrentDirRestorer currentDirRestorer;
+ if (!SetCurrentDir(tempDirPath))
+ return 1;
+ #endif
+
+ HANDLE hProcess = 0;
+#ifdef _SHELL_EXECUTE
+ if (!executeFile.IsEmpty())
+ {
+ CSysString filePath = GetSystemString(executeFile);
+ SHELLEXECUTEINFO execInfo;
+ execInfo.cbSize = sizeof(execInfo);
+ execInfo.fMask = SEE_MASK_NOCLOSEPROCESS
+ #ifndef UNDER_CE
+ | SEE_MASK_FLAG_DDEWAIT
+ #endif
+ ;
+ execInfo.hwnd = NULL;
+ execInfo.lpVerb = NULL;
+ execInfo.lpFile = filePath;
+
+ if (!switches.IsEmpty())
+ {
+ executeParameters.Add_Space_if_NotEmpty();
+ executeParameters += switches;
+ }
+
+ CSysString parametersSys = GetSystemString(executeParameters);
+ if (parametersSys.IsEmpty())
+ execInfo.lpParameters = NULL;
+ else
+ execInfo.lpParameters = parametersSys;
+
+ execInfo.lpDirectory = NULL;
+ execInfo.nShow = SW_SHOWNORMAL;
+ execInfo.hProcess = 0;
+ /* BOOL success = */ ::ShellExecuteEx(&execInfo);
+ UINT32 result = (UINT32)(UINT_PTR)execInfo.hInstApp;
+ if (result <= 32)
+ {
+ if (!assumeYes)
+ ShowErrorMessage(L"Can not open file");
+ return 1;
+ }
+ hProcess = execInfo.hProcess;
+ }
+ else
+#endif
+ {
+ if (appLaunched.IsEmpty())
+ {
+ appLaunched = L"setup.exe";
+ if (!NFind::DoesFileExist(us2fs(appLaunched)))
+ {
+ if (!assumeYes)
+ ShowErrorMessage(L"Can not find setup.exe");
+ return 1;
+ }
+ }
+
+ {
+ FString s2 = tempDirPath;
+ NName::NormalizeDirPathPrefix(s2);
+ appLaunched.Replace(L"%%T" WSTRING_PATH_SEPARATOR, fs2us(s2));
+ }
+
+ UString appNameForError = appLaunched; // actually we need to rtemove parameters also
+
+ appLaunched.Replace(L"%%T", fs2us(tempDirPath));
+
+ if (!switches.IsEmpty())
+ {
+ appLaunched.Add_Space();
+ appLaunched += switches;
+ }
+ STARTUPINFO startupInfo;
+ startupInfo.cb = sizeof(startupInfo);
+ startupInfo.lpReserved = 0;
+ startupInfo.lpDesktop = 0;
+ startupInfo.lpTitle = 0;
+ startupInfo.dwFlags = 0;
+ startupInfo.cbReserved2 = 0;
+ startupInfo.lpReserved2 = 0;
+
+ PROCESS_INFORMATION processInformation;
+
+ CSysString appLaunchedSys = GetSystemString(dirPrefix + appLaunched);
+
+ BOOL createResult = CreateProcess(NULL, (LPTSTR)(LPCTSTR)appLaunchedSys,
+ NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */,
+ &startupInfo, &processInformation);
+ if (createResult == 0)
+ {
+ if (!assumeYes)
+ {
+ // we print name of exe file, if error message is
+ // ERROR_BAD_EXE_FORMAT: "%1 is not a valid Win32 application".
+ ShowErrorMessageSpec(appNameForError);
+ }
+ return 1;
+ }
+ ::CloseHandle(processInformation.hThread);
+ hProcess = processInformation.hProcess;
+ }
+ if (hProcess != 0)
+ {
+ WaitForSingleObject(hProcess, INFINITE);
+ ::CloseHandle(hProcess);
+ }
+ return 0;
+}
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp
new file mode 100644
index 00000000000..d0feea85c7b
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp
@@ -0,0 +1,3 @@
+// StdAfx.cpp
+
+#include "StdAfx.h"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h
new file mode 100644
index 00000000000..37bbd0c33b7
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h
@@ -0,0 +1,13 @@
+// StdAfx.h
+
+#ifndef __STDAFX_H
+#define __STDAFX_H
+
+#include "../../../Common/Common.h"
+
+#include <commctrl.h>
+
+// #define printf(x) NO_PRINTF_(x)
+// #define sprintf(x) NO_SPRINTF_(x)
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/makefile b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/makefile
new file mode 100644
index 00000000000..5f6f6032430
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/makefile
@@ -0,0 +1,109 @@
+PROG = 7zS.sfx
+CFLAGS = $(CFLAGS) \
+ -DNO_REGISTRY \
+ -DEXTRACT_ONLY \
+ -DNO_READ_FROM_CODER \
+ -D_SFX \
+ -D_NO_CRYPTO \
+
+CURRENT_OBJS = \
+ $O\SfxSetup.obj \
+ $O\ExtractCallbackSfx.obj \
+ $O\ExtractEngine.obj \
+
+COMMON_OBJS = \
+ $O\CommandLineParser.obj \
+ $O\CRC.obj \
+ $O\IntToString.obj \
+ $O\NewHandler.obj \
+ $O\MyString.obj \
+ $O\StringConvert.obj \
+ $O\TextConfig.obj \
+ $O\UTFConvert.obj \
+ $O\MyVector.obj \
+ $O\Wildcard.obj \
+
+WIN_OBJS = \
+ $O\DLL.obj \
+ $O\ErrorMsg.obj \
+ $O\FileDir.obj \
+ $O\FileFind.obj \
+ $O\FileIO.obj \
+ $O\FileName.obj \
+ $O\PropVariant.obj \
+ $O\ResourceString.obj \
+ $O\Synchronization.obj \
+ $O\Window.obj \
+
+WIN_CTRL_OBJS = \
+ $O\Dialog.obj \
+
+7ZIP_COMMON_OBJS = \
+ $O\CreateCoder.obj \
+ $O\FileStreams.obj \
+ $O\InBuffer.obj \
+ $O\FilterCoder.obj \
+ $O\LimitedStreams.obj \
+ $O\OutBuffer.obj \
+ $O\ProgressUtils.obj \
+ $O\PropId.obj \
+ $O\StreamBinder.obj \
+ $O\StreamObjects.obj \
+ $O\StreamUtils.obj \
+ $O\VirtThread.obj \
+
+UI_COMMON_OBJS = \
+ $O\ArchiveOpenCallback.obj \
+ $O\DefaultName.obj \
+ $O\LoadCodecs.obj \
+ $O\OpenArchive.obj \
+
+EXPLORER_OBJS = \
+ $O\MyMessages.obj \
+
+FM_OBJS = \
+ $O\FormatUtils.obj \
+ $O\ProgressDialog.obj \
+
+AR_COMMON_OBJS = \
+ $O\CoderMixer2.obj \
+ $O\ItemNameUtils.obj \
+ $O\OutStreamWithCRC.obj \
+
+7Z_OBJS = \
+ $O\7zDecode.obj \
+ $O\7zExtract.obj \
+ $O\7zHandler.obj \
+ $O\7zIn.obj \
+ $O\7zRegister.obj \
+
+COMPRESS_OBJS = \
+ $O\Bcj2Coder.obj \
+ $O\Bcj2Register.obj \
+ $O\BcjCoder.obj \
+ $O\BcjRegister.obj \
+ $O\BranchMisc.obj \
+ $O\BranchRegister.obj \
+ $O\CopyCoder.obj \
+ $O\CopyRegister.obj \
+ $O\DeltaFilter.obj \
+ $O\Lzma2Decoder.obj \
+ $O\Lzma2Register.obj \
+ $O\LzmaDecoder.obj \
+ $O\LzmaRegister.obj \
+
+C_OBJS = \
+ $O\Alloc.obj \
+ $O\Bcj2.obj \
+ $O\Bra.obj \
+ $O\Bra86.obj \
+ $O\BraIA64.obj \
+ $O\CpuArch.obj \
+ $O\Delta.obj \
+ $O\Lzma2Dec.obj \
+ $O\LzmaDec.obj \
+ $O\Threads.obj \
+
+!include "../../Crc.mak"
+
+!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/resource.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/resource.h
new file mode 100644
index 00000000000..d5f440bb8fe
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/resource.h
@@ -0,0 +1,6 @@
+#define IDI_ICON 1
+
+#define IDS_EXTRACTION_ERROR_TITLE 7
+#define IDS_EXTRACTION_ERROR_MESSAGE 8
+#define IDS_CANNOT_CREATE_FOLDER 3003
+#define IDS_PROGRESS_EXTRACTING 3300
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc
new file mode 100644
index 00000000000..47e1b7620e9
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc
@@ -0,0 +1,16 @@
+#include "../../MyVersionInfo.rc"
+#include "resource.h"
+
+MY_VERSION_INFO_APP("7z Setup SFX", "7zS.sfx")
+
+IDI_ICON ICON "setup.ico"
+
+STRINGTABLE
+BEGIN
+ IDS_EXTRACTION_ERROR_TITLE "Extraction Failed"
+ IDS_EXTRACTION_ERROR_MESSAGE "File is corrupt"
+ IDS_CANNOT_CREATE_FOLDER "Cannot create folder '{0}'"
+ IDS_PROGRESS_EXTRACTING "Extracting"
+END
+
+#include "../../UI/FileManager/ProgressDialog.rc"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico
new file mode 100644
index 00000000000..bb455be1e7a
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico
Binary files differ
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/7z.ico b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/7z.ico
new file mode 100644
index 00000000000..47ffb781e0b
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/7z.ico
Binary files differ
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp
new file mode 100644
index 00000000000..1f3d88d13b6
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp
@@ -0,0 +1,953 @@
+# Microsoft Developer Studio Project File - Name="SFXWin" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=SFXWin - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "SFXWin.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "SFXWin.mak" CFG="SFXWin - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "SFXWin - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "SFXWin - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE "SFXWin - Win32 ReleaseD" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "SFXWin - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "_SFXWIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "NO_READ_FROM_CODER" /D "_SFX" /Yu"StdAfx.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x419 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7z.sfx" /opt:NOWIN98
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "SFXWin - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "_SFXWIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "NO_READ_FROM_CODER" /D "_SFX" /Yu"StdAfx.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x419 /d "_DEBUG"
+# ADD RSC /l 0x419 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"C:\Util\7zsfx.exe" /pdbtype:sept
+
+!ELSEIF "$(CFG)" == "SFXWin - Win32 ReleaseD"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "SFXWin___Win32_ReleaseD"
+# PROP BASE Intermediate_Dir "SFXWin___Win32_ReleaseD"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "SFXWin___Win32_ReleaseD"
+# PROP Intermediate_Dir "SFXWin___Win32_ReleaseD"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /Gz /MT /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "_SFX" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "_SFXWIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "NO_READ_FROM_CODER" /D "_SFX" /Yu"StdAfx.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x419 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7z.sfx" /opt:NOWIN98
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7zD.sfx" /opt:NOWIN98
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "SFXWin - Win32 Release"
+# Name "SFXWin - Win32 Debug"
+# Name "SFXWin - Win32 ReleaseD"
+# Begin Group "Spec"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"StdAfx.h"
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "7z"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zDecode.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zDecode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zExtract.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zHandler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zHeader.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zIn.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zIn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\7z\7zRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\SplitHandler.cpp
+# End Source File
+# End Group
+# Begin Group "Archive Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\CoderMixer2.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\CoderMixer2.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\ItemNameUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\ItemNameUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\MultiStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\MultiStream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\OutStreamWithCRC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\OutStreamWithCRC.h
+# End Source File
+# End Group
+# Begin Group "Compress"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Compress\Bcj2Coder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Bcj2Register.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BcjCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BcjRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BranchMisc.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BranchMisc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\BranchRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\CopyCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\CopyRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\DeltaFilter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Lzma2Decoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Lzma2Register.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\LzmaDecoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\LzmaRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\PpmdDecoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\PpmdRegister.cpp
+# End Source File
+# End Group
+# Begin Group "Crypto"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Crypto\7zAes.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\7zAes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\7zAesRegister.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\MyAes.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Crypto\MyAes.h
+# End Source File
+# End Group
+# Begin Group "Dialogs"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\BrowseDialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\BrowseDialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\ComboDialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\ComboDialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\OverwriteDialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\OverwriteDialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\PasswordDialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\PasswordDialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\ProgressDialog2.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\ProgressDialog2.h
+# End Source File
+# End Group
+# Begin Group "7zip Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Common\CreateCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\CreateCoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\CWrappers.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\CWrappers.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FilePathAutoRename.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FilePathAutoRename.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FileStreams.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FileStreams.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FilterCoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\FilterCoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\InBuffer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\InBuffer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\LimitedStreams.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\LimitedStreams.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\LockedStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\LockedStream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\OutBuffer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\OutBuffer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\ProgressUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\ProgressUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\PropId.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamBinder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamBinder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamObjects.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamObjects.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\StreamUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\VirtThread.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\VirtThread.h
+# End Source File
+# End Group
+# Begin Group "File Manager"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\ExtractCallback.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\ExtractCallback.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\FormatUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\FormatUtils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\PropertyName.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\PropertyName.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\SysIconUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\FileManager\SysIconUtils.h
+# End Source File
+# End Group
+# Begin Group "Windows"
+
+# PROP Default_Filter ""
+# Begin Group "Control"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Control\ComboBox.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Control\ComboBox.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Control\Dialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Control\Dialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Control\ListView.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Control\ListView.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\..\Windows\CommonDialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\CommonDialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\DLL.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\DLL.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\ErrorMsg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\ErrorMsg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileDir.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileDir.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileFind.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileFind.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileIO.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileIO.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileName.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileName.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariant.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariant.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariantConv.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariantConv.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\ResourceString.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\ResourceString.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Shell.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Shell.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Synchronization.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Synchronization.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Window.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Window.h
+# End Source File
+# End Group
+# Begin Group "Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\Common\CommandLineParser.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\CommandLineParser.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\CRC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\CRC.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\IntToString.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\IntToString.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyString.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyString.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyVector.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyVector.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\NewHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\NewHandler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\StringConvert.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\StringConvert.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Wildcard.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Wildcard.h
+# End Source File
+# End Group
+# Begin Group "UI"
+
+# PROP Default_Filter ""
+# Begin Group "UI Common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ArchiveExtractCallback.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ArchiveExtractCallback.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ArchiveOpenCallback.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ArchiveOpenCallback.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\DefaultName.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\DefaultName.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\Extract.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\Extract.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ExtractingFilePath.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\ExtractingFilePath.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\LoadCodecs.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\LoadCodecs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\OpenArchive.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Common\OpenArchive.h
+# End Source File
+# End Group
+# Begin Group "GUI"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\UI\GUI\ExtractDialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\GUI\ExtractDialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\GUI\ExtractGUI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\GUI\ExtractGUI.h
+# End Source File
+# End Group
+# Begin Group "Explorer"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\UI\Explorer\MyMessages.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\UI\Explorer\MyMessages.h
+# End Source File
+# End Group
+# End Group
+# Begin Group "C"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zCrc.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zCrc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zCrcOpt.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Aes.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Aes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\AesOpt.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Alloc.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Alloc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bcj2.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bcj2.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bra.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bra.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Bra86.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\BraIA64.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\CpuArch.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Delta.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Delta.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Lzma2Dec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Lzma2Dec.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\LzmaDec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\LzmaDec.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Ppmd7.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Ppmd7.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Ppmd7Dec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Sha256.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Threads.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Threads.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\7z.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\7z1.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\SfxWin.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw
new file mode 100644
index 00000000000..a9926c719bf
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "SFXWin"=.\SFXWin.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp
new file mode 100644
index 00000000000..c301ecf8894
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp
@@ -0,0 +1,235 @@
+// Main.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/MyWindows.h"
+
+#include <Shlwapi.h>
+
+#include "../../../Common/MyInitGuid.h"
+
+#include "../../../Common/CommandLineParser.h"
+#include "../../../Common/StringConvert.h"
+
+#include "../../../Windows/DLL.h"
+#include "../../../Windows/ErrorMsg.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/NtCheck.h"
+#include "../../../Windows/ResourceString.h"
+
+#include "../../ICoder.h"
+#include "../../IPassword.h"
+#include "../../Archive/IArchive.h"
+#include "../../UI/Common/Extract.h"
+#include "../../UI/Common/ExitCode.h"
+#include "../../UI/Explorer/MyMessages.h"
+#include "../../UI/FileManager/MyWindowsNew.h"
+#include "../../UI/GUI/ExtractGUI.h"
+#include "../../UI/GUI/ExtractRes.h"
+
+using namespace NWindows;
+using namespace NFile;
+using namespace NDir;
+
+HINSTANCE g_hInstance;
+
+#ifndef UNDER_CE
+
+DWORD g_ComCtl32Version;
+
+static DWORD GetDllVersion(LPCTSTR dllName)
+{
+ DWORD dwVersion = 0;
+ HINSTANCE hinstDll = LoadLibrary(dllName);
+ if (hinstDll)
+ {
+ DLLGETVERSIONPROC pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hinstDll, "DllGetVersion");
+ if (pDllGetVersion)
+ {
+ DLLVERSIONINFO dvi;
+ ZeroMemory(&dvi, sizeof(dvi));
+ dvi.cbSize = sizeof(dvi);
+ HRESULT hr = (*pDllGetVersion)(&dvi);
+ if (SUCCEEDED(hr))
+ dwVersion = MAKELONG(dvi.dwMinorVersion, dvi.dwMajorVersion);
+ }
+ FreeLibrary(hinstDll);
+ }
+ return dwVersion;
+}
+
+#endif
+
+bool g_LVN_ITEMACTIVATE_Support = true;
+
+static const wchar_t *kUnknownExceptionMessage = L"ERROR: Unknown Error!";
+
+void ErrorMessageForHRESULT(HRESULT res)
+{
+ ShowErrorMessage(HResultToMessage(res));
+}
+
+int APIENTRY WinMain2()
+{
+ // OleInitialize is required for ProgressBar in TaskBar.
+ #ifndef UNDER_CE
+ OleInitialize(NULL);
+ #endif
+
+ #ifndef UNDER_CE
+ g_ComCtl32Version = ::GetDllVersion(TEXT("comctl32.dll"));
+ g_LVN_ITEMACTIVATE_Support = (g_ComCtl32Version >= MAKELONG(71, 4));
+ #endif
+
+ UString password;
+ bool assumeYes = false;
+ bool outputFolderDefined = false;
+ FString outputFolder;
+ UStringVector commandStrings;
+ NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings);
+
+ #ifndef UNDER_CE
+ if (commandStrings.Size() > 0)
+ commandStrings.Delete(0);
+ #endif
+
+ FOR_VECTOR (i, commandStrings)
+ {
+ const UString &s = commandStrings[i];
+ if (s.Len() > 1 && s[0] == '-')
+ {
+ wchar_t c = MyCharLower_Ascii(s[1]);
+ if (c == 'y')
+ {
+ assumeYes = true;
+ if (s.Len() != 2)
+ {
+ ShowErrorMessage(L"Bad command");
+ return 1;
+ }
+ }
+ else if (c == 'o')
+ {
+ outputFolder = us2fs(s.Ptr(2));
+ NName::NormalizeDirPathPrefix(outputFolder);
+ outputFolderDefined = !outputFolder.IsEmpty();
+ }
+ else if (c == 'p')
+ {
+ password = s.Ptr(2);
+ }
+ }
+ }
+
+ FString path;
+ NDLL::MyGetModuleFileName(path);
+
+ FString fullPath;
+ if (!MyGetFullPathName(path, fullPath))
+ {
+ ShowErrorMessage(L"Error 1329484");
+ return 1;
+ }
+
+ CCodecs *codecs = new CCodecs;
+ CMyComPtr<IUnknown> compressCodecsInfo = codecs;
+ HRESULT result = codecs->Load();
+ if (result != S_OK)
+ {
+ ErrorMessageForHRESULT(result);
+ return 1;
+ }
+
+ // COpenCallbackGUI openCallback;
+
+ // openCallback.PasswordIsDefined = !password.IsEmpty();
+ // openCallback.Password = password;
+
+ CExtractCallbackImp *ecs = new CExtractCallbackImp;
+ CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
+ ecs->Init();
+
+ #ifndef _NO_CRYPTO
+ ecs->PasswordIsDefined = !password.IsEmpty();
+ ecs->Password = password;
+ #endif
+
+ CExtractOptions eo;
+
+ FString dirPrefix;
+ if (!GetOnlyDirPrefix(path, dirPrefix))
+ {
+ ShowErrorMessage(L"Error 1329485");
+ return 1;
+ }
+
+ eo.OutputDir = outputFolderDefined ? outputFolder : dirPrefix;
+ eo.YesToAll = assumeYes;
+ eo.OverwriteMode = assumeYes ?
+ NExtract::NOverwriteMode::kOverwrite :
+ NExtract::NOverwriteMode::kAsk;
+ eo.PathMode = NExtract::NPathMode::kFullPaths;
+ eo.TestMode = false;
+
+ UStringVector v1, v2;
+ v1.Add(fs2us(fullPath));
+ v2.Add(fs2us(fullPath));
+ NWildcard::CCensorNode wildcardCensor;
+ wildcardCensor.AddItem(true, L"*", true, true, true, true);
+
+ bool messageWasDisplayed = false;
+ result = ExtractGUI(codecs,
+ CObjectVector<COpenType>(), CIntVector(),
+ v1, v2,
+ wildcardCensor, eo, (assumeYes ? false: true), messageWasDisplayed, ecs);
+
+ if (result == S_OK)
+ {
+ if (!ecs->IsOK())
+ return NExitCode::kFatalError;
+ return 0;
+ }
+ if (result == E_ABORT)
+ return NExitCode::kUserBreak;
+ if (!messageWasDisplayed)
+ {
+ if (result == S_FALSE)
+ ShowErrorMessage(L"Error in archive");
+ else
+ ErrorMessageForHRESULT(result);
+ }
+ if (result == E_OUTOFMEMORY)
+ return NExitCode::kMemoryError;
+ return NExitCode::kFatalError;
+}
+
+#define NT_CHECK_FAIL_ACTION ShowErrorMessage(L"Unsupported Windows version"); return NExitCode::kFatalError;
+
+int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
+ #ifdef UNDER_CE
+ LPWSTR
+ #else
+ LPSTR
+ #endif
+ /* lpCmdLine */, int /* nCmdShow */)
+{
+ g_hInstance = (HINSTANCE)hInstance;
+
+ NT_CHECK
+
+ try
+ {
+ return WinMain2();
+ }
+ catch(const CNewException &)
+ {
+ ErrorMessageForHRESULT(E_OUTOFMEMORY);
+ return NExitCode::kMemoryError;
+ }
+ catch(...)
+ {
+ ShowErrorMessage(kUnknownExceptionMessage);
+ return NExitCode::kFatalError;
+ }
+}
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp
new file mode 100644
index 00000000000..d0feea85c7b
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp
@@ -0,0 +1,3 @@
+// StdAfx.cpp
+
+#include "StdAfx.h"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h
new file mode 100644
index 00000000000..975a17e8bf7
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h
@@ -0,0 +1,14 @@
+// StdAfx.h
+
+#ifndef __STDAFX_H
+#define __STDAFX_H
+
+#include "../../../Common/Common.h"
+
+#include <commctrl.h>
+#include <ShlObj.h>
+
+// #define printf(x) NO_PRINTF_(x)
+// #define sprintf(x) NO_SPRINTF_(x)
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/makefile b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/makefile
new file mode 100644
index 00000000000..0ffec922d58
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/makefile
@@ -0,0 +1,146 @@
+PROG = 7z.sfx
+CFLAGS = $(CFLAGS) \
+ -DNO_REGISTRY \
+ -DEXTRACT_ONLY \
+ -DNO_READ_FROM_CODER \
+ -D_SFX \
+
+!IFDEF UNDER_CE
+LIBS = $(LIBS) ceshell.lib Commctrl.lib
+!ELSE
+LIBS = $(LIBS) comctl32.lib comdlg32.lib
+!ENDIF
+
+CURRENT_OBJS = \
+ $O\SfxWin.obj \
+
+GUI_OBJS = \
+ $O\ExtractDialog.obj \
+ $O\ExtractGUI.obj \
+
+COMMON_OBJS = \
+ $O\CRC.obj \
+ $O\CommandLineParser.obj \
+ $O\IntToString.obj \
+ $O\NewHandler.obj \
+ $O\MyString.obj \
+ $O\StringConvert.obj \
+ $O\MyVector.obj \
+ $O\Wildcard.obj \
+
+WIN_OBJS = \
+ $O\CommonDialog.obj \
+ $O\DLL.obj \
+ $O\ErrorMsg.obj \
+ $O\FileDir.obj \
+ $O\FileFind.obj \
+ $O\FileIO.obj \
+ $O\FileName.obj \
+ $O\PropVariant.obj \
+ $O\PropVariantConv.obj \
+ $O\ResourceString.obj \
+ $O\Shell.obj \
+ $O\Synchronization.obj \
+ $O\Window.obj \
+
+WIN_CTRL_OBJS = \
+ $O\ComboBox.obj \
+ $O\Dialog.obj \
+ $O\ListView.obj \
+
+7ZIP_COMMON_OBJS = \
+ $O\CreateCoder.obj \
+ $O\CWrappers.obj \
+ $O\FilePathAutoRename.obj \
+ $O\FileStreams.obj \
+ $O\InBuffer.obj \
+ $O\FilterCoder.obj \
+ $O\LimitedStreams.obj \
+ $O\OutBuffer.obj \
+ $O\ProgressUtils.obj \
+ $O\PropId.obj \
+ $O\StreamBinder.obj \
+ $O\StreamObjects.obj \
+ $O\StreamUtils.obj \
+ $O\VirtThread.obj \
+
+UI_COMMON_OBJS = \
+ $O\ArchiveExtractCallback.obj \
+ $O\ArchiveOpenCallback.obj \
+ $O\DefaultName.obj \
+ $O\Extract.obj \
+ $O\ExtractingFilePath.obj \
+ $O\LoadCodecs.obj \
+ $O\OpenArchive.obj \
+
+EXPLORER_OBJS = \
+ $O\MyMessages.obj \
+
+FM_OBJS = \
+ $O\BrowseDialog.obj \
+ $O\ComboDialog.obj \
+ $O\ExtractCallback.obj \
+ $O\FormatUtils.obj \
+ $O\OverwriteDialog.obj \
+ $O\PasswordDialog.obj \
+ $O\ProgressDialog2.obj \
+ $O\PropertyName.obj \
+ $O\SysIconUtils.obj \
+
+AR_OBJS = \
+ $O\SplitHandler.obj \
+
+AR_COMMON_OBJS = \
+ $O\CoderMixer2.obj \
+ $O\ItemNameUtils.obj \
+ $O\MultiStream.obj \
+ $O\OutStreamWithCRC.obj \
+
+7Z_OBJS = \
+ $O\7zDecode.obj \
+ $O\7zExtract.obj \
+ $O\7zHandler.obj \
+ $O\7zIn.obj \
+ $O\7zRegister.obj \
+
+COMPRESS_OBJS = \
+ $O\Bcj2Coder.obj \
+ $O\Bcj2Register.obj \
+ $O\BcjCoder.obj \
+ $O\BcjRegister.obj \
+ $O\BranchMisc.obj \
+ $O\BranchRegister.obj \
+ $O\CopyCoder.obj \
+ $O\CopyRegister.obj \
+ $O\DeltaFilter.obj \
+ $O\Lzma2Decoder.obj \
+ $O\Lzma2Register.obj \
+ $O\LzmaDecoder.obj \
+ $O\LzmaRegister.obj \
+ $O\PpmdDecoder.obj \
+ $O\PpmdRegister.obj \
+
+CRYPTO_OBJS = \
+ $O\7zAes.obj \
+ $O\7zAesRegister.obj \
+ $O\MyAes.obj \
+
+C_OBJS = \
+ $O\Alloc.obj \
+ $O\Bcj2.obj \
+ $O\Bra.obj \
+ $O\Bra86.obj \
+ $O\BraIA64.obj \
+ $O\Delta.obj \
+ $O\CpuArch.obj \
+ $O\Lzma2Dec.obj \
+ $O\LzmaDec.obj \
+ $O\Ppmd7.obj \
+ $O\Ppmd7Dec.obj \
+ $O\Sha256.obj \
+ $O\Threads.obj \
+
+!include "../../Aes.mak"
+!include "../../Crc.mak"
+
+!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.h
new file mode 100644
index 00000000000..30fe2030e1d
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.h
@@ -0,0 +1 @@
+#define IDI_ICON 1
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.rc b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.rc
new file mode 100644
index 00000000000..91292b2f11a
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.rc
@@ -0,0 +1,50 @@
+#include "../../MyVersionInfo.rc"
+#include "../../GuiCommon.rc"
+#include "../../UI/GUI/ExtractDialogRes.h"
+#include "../../UI/FileManager/PropertyNameRes.h"
+
+#include "resource.h"
+
+MY_VERSION_INFO_APP("7z SFX", "7z.sfx")
+
+#define xc 240
+#define yc 64
+
+IDI_ICON ICON "7z.ico"
+
+IDD_EXTRACT DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
+CAPTION "7-Zip self-extracting archive"
+BEGIN
+ LTEXT "E&xtract to:", IDT_EXTRACT_EXTRACT_TO, m, m, xc, 8
+ EDITTEXT IDC_EXTRACT_PATH, m, 21, xc - bxsDots - 12, 14, ES_AUTOHSCROLL
+ PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots, 20, bxsDots, bys, WS_GROUP
+ DEFPUSHBUTTON "Extract", IDOK, bx2, by, bxs, bys, WS_GROUP
+ PUSHBUTTON "Cancel", IDCANCEL, bx1, by, bxs, bys
+END
+
+#ifdef UNDER_CE
+
+#undef xc
+#define xc 144
+
+IDD_EXTRACT_2 DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
+CAPTION "7-Zip self-extracting archive"
+BEGIN
+ LTEXT "E&xtract to:", IDT_EXTRACT_EXTRACT_TO, m, m, xc - bxsDots - 12, 8
+ EDITTEXT IDC_EXTRACT_PATH, m, m + bys + 4, xc, 14, ES_AUTOHSCROLL
+ PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots, m, bxsDots, bys, WS_GROUP
+ DEFPUSHBUTTON "Extract", IDOK, bx2, by, bxs, bys, WS_GROUP
+ PUSHBUTTON "Cancel", IDCANCEL, bx1, by, bxs, bys
+END
+
+#endif
+
+#include "../../UI/FileManager/OverwriteDialog.rc"
+#include "../../UI/FileManager/PasswordDialog.rc"
+#include "../../UI/FileManager/ProgressDialog2.rc"
+#include "../../UI/GUI/Extract.rc"
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROP_MTIME "Modified"
+END
diff --git a/3rdparty/lzma/CPP/7zip/Common/CWrappers.cpp b/3rdparty/lzma/CPP/7zip/Common/CWrappers.cpp
index ef21228e45b..a77b67e8664 100644
--- a/3rdparty/lzma/CPP/7zip/Common/CWrappers.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/CWrappers.cpp
@@ -12,14 +12,14 @@
#define CONVERT_PR_VAL(x) (x == PROGRESS_UNKNOWN_VALUE ? NULL : &x)
-static SRes CompressProgress(void *pp, UInt64 inSize, UInt64 outSize)
+static SRes CompressProgress(void *pp, UInt64 inSize, UInt64 outSize) throw()
{
CCompressProgressWrap *p = (CCompressProgressWrap *)pp;
p->Res = p->Progress->SetRatioInfo(CONVERT_PR_VAL(inSize), CONVERT_PR_VAL(outSize));
return (SRes)p->Res;
}
-CCompressProgressWrap::CCompressProgressWrap(ICompressProgressInfo *progress)
+CCompressProgressWrap::CCompressProgressWrap(ICompressProgressInfo *progress) throw()
{
p.Progress = CompressProgress;
Progress = progress;
@@ -30,7 +30,7 @@ static const UInt32 kStreamStepSize = (UInt32)1 << 31;
SRes HRESULT_To_SRes(HRESULT res, SRes defaultRes)
{
- switch(res)
+ switch (res)
{
case S_OK: return SZ_OK;
case E_OUTOFMEMORY: return SZ_ERROR_MEM;
@@ -42,18 +42,19 @@ SRes HRESULT_To_SRes(HRESULT res, SRes defaultRes)
return defaultRes;
}
-static SRes MyRead(void *object, void *data, size_t *size)
+static SRes MyRead(void *object, void *data, size_t *size) throw()
{
CSeqInStreamWrap *p = (CSeqInStreamWrap *)object;
UInt32 curSize = ((*size < kStreamStepSize) ? (UInt32)*size : kStreamStepSize);
p->Res = (p->Stream->Read(data, curSize, &curSize));
*size = curSize;
+ p->Processed += curSize;
if (p->Res == S_OK)
return SZ_OK;
return HRESULT_To_SRes(p->Res, SZ_ERROR_READ);
}
-static size_t MyWrite(void *object, const void *data, size_t size)
+static size_t MyWrite(void *object, const void *data, size_t size) throw()
{
CSeqOutStreamWrap *p = (CSeqOutStreamWrap *)object;
if (p->Stream)
@@ -68,13 +69,14 @@ static size_t MyWrite(void *object, const void *data, size_t size)
return size;
}
-CSeqInStreamWrap::CSeqInStreamWrap(ISequentialInStream *stream)
+CSeqInStreamWrap::CSeqInStreamWrap(ISequentialInStream *stream) throw()
{
p.Read = MyRead;
Stream = stream;
+ Processed = 0;
}
-CSeqOutStreamWrap::CSeqOutStreamWrap(ISequentialOutStream *stream)
+CSeqOutStreamWrap::CSeqOutStreamWrap(ISequentialOutStream *stream) throw()
{
p.Write = MyWrite;
Stream = stream;
@@ -82,9 +84,9 @@ CSeqOutStreamWrap::CSeqOutStreamWrap(ISequentialOutStream *stream)
Processed = 0;
}
-HRESULT SResToHRESULT(SRes res)
+HRESULT SResToHRESULT(SRes res) throw()
{
- switch(res)
+ switch (res)
{
case SZ_OK: return S_OK;
case SZ_ERROR_MEM: return E_OUTOFMEMORY;
@@ -96,7 +98,7 @@ HRESULT SResToHRESULT(SRes res)
return E_FAIL;
}
-static SRes InStreamWrap_Read(void *pp, void *data, size_t *size)
+static SRes InStreamWrap_Read(void *pp, void *data, size_t *size) throw()
{
CSeekInStreamWrap *p = (CSeekInStreamWrap *)pp;
UInt32 curSize = ((*size < kStreamStepSize) ? (UInt32)*size : kStreamStepSize);
@@ -105,11 +107,11 @@ static SRes InStreamWrap_Read(void *pp, void *data, size_t *size)
return (p->Res == S_OK) ? SZ_OK : SZ_ERROR_READ;
}
-static SRes InStreamWrap_Seek(void *pp, Int64 *offset, ESzSeek origin)
+static SRes InStreamWrap_Seek(void *pp, Int64 *offset, ESzSeek origin) throw()
{
CSeekInStreamWrap *p = (CSeekInStreamWrap *)pp;
UInt32 moveMethod;
- switch(origin)
+ switch (origin)
{
case SZ_SEEK_SET: moveMethod = STREAM_SEEK_SET; break;
case SZ_SEEK_CUR: moveMethod = STREAM_SEEK_CUR; break;
@@ -122,7 +124,7 @@ static SRes InStreamWrap_Seek(void *pp, Int64 *offset, ESzSeek origin)
return (p->Res == S_OK) ? SZ_OK : SZ_ERROR_READ;
}
-CSeekInStreamWrap::CSeekInStreamWrap(IInStream *stream)
+CSeekInStreamWrap::CSeekInStreamWrap(IInStream *stream) throw()
{
Stream = stream;
p.Read = InStreamWrap_Read;
@@ -133,13 +135,13 @@ CSeekInStreamWrap::CSeekInStreamWrap(IInStream *stream)
/* ---------- CByteInBufWrap ---------- */
-void CByteInBufWrap::Free()
+void CByteInBufWrap::Free() throw()
{
::MidFree(Buf);
Buf = 0;
}
-bool CByteInBufWrap::Alloc(UInt32 size)
+bool CByteInBufWrap::Alloc(UInt32 size) throw()
{
if (Buf == 0 || size != Size)
{
@@ -150,7 +152,7 @@ bool CByteInBufWrap::Alloc(UInt32 size)
return (Buf != 0);
}
-Byte CByteInBufWrap::ReadByteFromNewBlock()
+Byte CByteInBufWrap::ReadByteFromNewBlock() throw()
{
if (Res == S_OK)
{
@@ -166,7 +168,7 @@ Byte CByteInBufWrap::ReadByteFromNewBlock()
return 0;
}
-static Byte Wrap_ReadByte(void *pp)
+static Byte Wrap_ReadByte(void *pp) throw()
{
CByteInBufWrap *p = (CByteInBufWrap *)pp;
if (p->Cur != p->Lim)
@@ -182,13 +184,13 @@ CByteInBufWrap::CByteInBufWrap(): Buf(0)
/* ---------- CByteOutBufWrap ---------- */
-void CByteOutBufWrap::Free()
+void CByteOutBufWrap::Free() throw()
{
::MidFree(Buf);
Buf = 0;
}
-bool CByteOutBufWrap::Alloc(size_t size)
+bool CByteOutBufWrap::Alloc(size_t size) throw()
{
if (Buf == 0 || size != Size)
{
@@ -199,7 +201,7 @@ bool CByteOutBufWrap::Alloc(size_t size)
return (Buf != 0);
}
-HRESULT CByteOutBufWrap::Flush()
+HRESULT CByteOutBufWrap::Flush() throw()
{
if (Res == S_OK)
{
@@ -212,7 +214,7 @@ HRESULT CByteOutBufWrap::Flush()
return Res;
}
-static void Wrap_WriteByte(void *pp, Byte b)
+static void Wrap_WriteByte(void *pp, Byte b) throw()
{
CByteOutBufWrap *p = (CByteOutBufWrap *)pp;
Byte *dest = p->Cur;
@@ -222,7 +224,7 @@ static void Wrap_WriteByte(void *pp, Byte b)
p->Flush();
}
-CByteOutBufWrap::CByteOutBufWrap(): Buf(0)
+CByteOutBufWrap::CByteOutBufWrap() throw(): Buf(0)
{
p.Write = Wrap_WriteByte;
}
diff --git a/3rdparty/lzma/CPP/7zip/Common/CWrappers.h b/3rdparty/lzma/CPP/7zip/Common/CWrappers.h
index 80a8a1b6113..acadc170edc 100644
--- a/3rdparty/lzma/CPP/7zip/Common/CWrappers.h
+++ b/3rdparty/lzma/CPP/7zip/Common/CWrappers.h
@@ -11,7 +11,8 @@ struct CCompressProgressWrap
ICompressProgress p;
ICompressProgressInfo *Progress;
HRESULT Res;
- CCompressProgressWrap(ICompressProgressInfo *progress);
+
+ CCompressProgressWrap(ICompressProgressInfo *progress) throw();
};
struct CSeqInStreamWrap
@@ -19,7 +20,9 @@ struct CSeqInStreamWrap
ISeqInStream p;
ISequentialInStream *Stream;
HRESULT Res;
- CSeqInStreamWrap(ISequentialInStream *stream);
+ UInt64 Processed;
+
+ CSeqInStreamWrap(ISequentialInStream *stream) throw();
};
struct CSeekInStreamWrap
@@ -27,7 +30,8 @@ struct CSeekInStreamWrap
ISeekInStream p;
IInStream *Stream;
HRESULT Res;
- CSeekInStreamWrap(IInStream *stream);
+
+ CSeekInStreamWrap(IInStream *stream) throw();
};
struct CSeqOutStreamWrap
@@ -36,10 +40,11 @@ struct CSeqOutStreamWrap
ISequentialOutStream *Stream;
HRESULT Res;
UInt64 Processed;
- CSeqOutStreamWrap(ISequentialOutStream *stream);
+
+ CSeqOutStreamWrap(ISequentialOutStream *stream) throw();
};
-HRESULT SResToHRESULT(SRes res);
+HRESULT SResToHRESULT(SRes res) throw();
struct CByteInBufWrap
{
@@ -54,9 +59,9 @@ struct CByteInBufWrap
HRESULT Res;
CByteInBufWrap();
- ~CByteInBufWrap() { Free(); }
- void Free();
- bool Alloc(UInt32 size);
+ ~CByteInBufWrap() { Free(); }
+ void Free() throw();
+ bool Alloc(UInt32 size) throw();
void Init()
{
Lim = Cur = Buf;
@@ -65,7 +70,7 @@ struct CByteInBufWrap
Res = S_OK;
}
UInt64 GetProcessed() const { return Processed + (Cur - Buf); }
- Byte ReadByteFromNewBlock();
+ Byte ReadByteFromNewBlock() throw();
Byte ReadByte()
{
if (Cur != Lim)
@@ -85,10 +90,10 @@ struct CByteOutBufWrap
UInt64 Processed;
HRESULT Res;
- CByteOutBufWrap();
- ~CByteOutBufWrap() { Free(); }
- void Free();
- bool Alloc(size_t size);
+ CByteOutBufWrap() throw();
+ ~CByteOutBufWrap() { Free(); }
+ void Free() throw();
+ bool Alloc(size_t size) throw();
void Init()
{
Cur = Buf;
@@ -97,7 +102,7 @@ struct CByteOutBufWrap
Res = S_OK;
}
UInt64 GetProcessed() const { return Processed + (Cur - Buf); }
- HRESULT Flush();
+ HRESULT Flush() throw();
void WriteByte(Byte b)
{
*Cur++ = b;
diff --git a/3rdparty/lzma/CPP/7zip/Common/CreateCoder.cpp b/3rdparty/lzma/CPP/7zip/Common/CreateCoder.cpp
index cc82a0db531..75074ad891f 100644
--- a/3rdparty/lzma/CPP/7zip/Common/CreateCoder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/CreateCoder.cpp
@@ -10,16 +10,40 @@
#include "FilterCoder.h"
#include "RegisterCodec.h"
-static const unsigned int kNumCodecsMax = 64;
-unsigned int g_NumCodecs = 0;
+static const unsigned kNumCodecsMax = 64;
+unsigned g_NumCodecs = 0;
const CCodecInfo *g_Codecs[kNumCodecsMax];
-void RegisterCodec(const CCodecInfo *codecInfo)
+
+// We use g_ExternalCodecs in other stages.
+/*
+#ifdef EXTERNAL_CODECS
+extern CExternalCodecs g_ExternalCodecs;
+#define CHECK_GLOBAL_CODECS \
+ if (!__externalCodecs || !__externalCodecs->IsSet()) __externalCodecs = &g_ExternalCodecs;
+#endif
+*/
+
+#define CHECK_GLOBAL_CODECS
+
+void RegisterCodec(const CCodecInfo *codecInfo) throw()
{
if (g_NumCodecs < kNumCodecsMax)
g_Codecs[g_NumCodecs++] = codecInfo;
}
+static const unsigned kNumHashersMax = 16;
+unsigned g_NumHashers = 0;
+const CHasherInfo *g_Hashers[kNumHashersMax];
+
+void RegisterHasher(const CHasherInfo *hashInfo) throw()
+{
+ if (g_NumHashers < kNumHashersMax)
+ g_Hashers[g_NumHashers++] = hashInfo;
+}
+
+
#ifdef EXTERNAL_CODECS
+
static HRESULT ReadNumberOfStreams(ICompressCodecsInfo *codecsInfo, UInt32 index, PROPID propID, UInt32 &res)
{
NWindows::NCOM::CPropVariant prop;
@@ -46,87 +70,130 @@ static HRESULT ReadIsAssignedProp(ICompressCodecsInfo *codecsInfo, UInt32 index,
return S_OK;
}
-HRESULT LoadExternalCodecs(ICompressCodecsInfo *codecsInfo, CObjectVector<CCodecInfoEx> &externalCodecs)
+HRESULT CExternalCodecs::Load()
{
- UInt32 num;
- RINOK(codecsInfo->GetNumberOfMethods(&num));
- for (UInt32 i = 0; i < num; i++)
+ Codecs.Clear();
+ Hashers.Clear();
+
+ if (GetCodecs)
{
CCodecInfoEx info;
- NWindows::NCOM::CPropVariant prop;
- RINOK(codecsInfo->GetProperty(i, NMethodPropID::kID, &prop));
- // if (prop.vt != VT_BSTR)
- // info.Id.IDSize = (Byte)SysStringByteLen(prop.bstrVal);
- // memmove(info.Id.ID, prop.bstrVal, info.Id.IDSize);
- if (prop.vt != VT_UI8)
- {
- continue; // old Interface
- // return E_INVALIDARG;
- }
- info.Id = prop.uhVal.QuadPart;
- prop.Clear();
- RINOK(codecsInfo->GetProperty(i, NMethodPropID::kName, &prop));
- if (prop.vt == VT_BSTR)
- info.Name = prop.bstrVal;
- else if (prop.vt != VT_EMPTY)
- return E_INVALIDARG;;
+ UString s;
+ UInt32 num;
+ RINOK(GetCodecs->GetNumMethods(&num));
- RINOK(ReadNumberOfStreams(codecsInfo, i, NMethodPropID::kInStreams, info.NumInStreams));
- RINOK(ReadNumberOfStreams(codecsInfo, i, NMethodPropID::kOutStreams, info.NumOutStreams));
- RINOK(ReadIsAssignedProp(codecsInfo, i, NMethodPropID::kEncoderIsAssigned, info.EncoderIsAssigned));
- RINOK(ReadIsAssignedProp(codecsInfo, i, NMethodPropID::kDecoderIsAssigned, info.DecoderIsAssigned));
+ for (UInt32 i = 0; i < num; i++)
+ {
+ NWindows::NCOM::CPropVariant prop;
+
+ RINOK(GetCodecs->GetProperty(i, NMethodPropID::kID, &prop));
+ if (prop.vt != VT_UI8)
+ continue; // old Interface
+ info.Id = prop.uhVal.QuadPart;
+
+ prop.Clear();
+
+ info.Name.Empty();
+ RINOK(GetCodecs->GetProperty(i, NMethodPropID::kName, &prop));
+ if (prop.vt == VT_BSTR)
+ info.Name.SetFromWStr_if_Ascii(prop.bstrVal);
+ else if (prop.vt != VT_EMPTY)
+ continue;
+
+ RINOK(ReadNumberOfStreams(GetCodecs, i, NMethodPropID::kPackStreams, info.NumStreams));
+ {
+ UInt32 numUnpackStreams = 1;
+ RINOK(ReadNumberOfStreams(GetCodecs, i, NMethodPropID::kUnpackStreams, numUnpackStreams));
+ if (numUnpackStreams != 1)
+ continue;
+ }
+ RINOK(ReadIsAssignedProp(GetCodecs, i, NMethodPropID::kEncoderIsAssigned, info.EncoderIsAssigned));
+ RINOK(ReadIsAssignedProp(GetCodecs, i, NMethodPropID::kDecoderIsAssigned, info.DecoderIsAssigned));
+
+ Codecs.Add(info);
+ }
+ }
+
+ if (GetHashers)
+ {
+ UInt32 num = GetHashers->GetNumHashers();
+ CHasherInfoEx info;
- externalCodecs.Add(info);
+ for (UInt32 i = 0; i < num; i++)
+ {
+ NWindows::NCOM::CPropVariant prop;
+
+ RINOK(GetHashers->GetHasherProp(i, NMethodPropID::kID, &prop));
+ if (prop.vt != VT_UI8)
+ continue;
+ info.Id = prop.uhVal.QuadPart;
+
+ prop.Clear();
+
+ info.Name.Empty();
+ RINOK(GetHashers->GetHasherProp(i, NMethodPropID::kName, &prop));
+ if (prop.vt == VT_BSTR)
+ info.Name.SetFromWStr_if_Ascii(prop.bstrVal);
+ else if (prop.vt != VT_EMPTY)
+ continue;
+
+ Hashers.Add(info);
+ }
}
+
return S_OK;
}
#endif
+
bool FindMethod(
- #ifdef EXTERNAL_CODECS
- ICompressCodecsInfo * /* codecsInfo */, const CObjectVector<CCodecInfoEx> *externalCodecs,
- #endif
- const UString &name,
- CMethodId &methodId, UInt32 &numInStreams, UInt32 &numOutStreams)
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ const AString &name,
+ CMethodId &methodId, UInt32 &numStreams)
{
- UInt32 i;
+ unsigned i;
for (i = 0; i < g_NumCodecs; i++)
{
const CCodecInfo &codec = *g_Codecs[i];
- if (name.CompareNoCase(codec.Name) == 0)
+ if (StringsAreEqualNoCase_Ascii(name, codec.Name))
{
methodId = codec.Id;
- numInStreams = codec.NumInStreams;
- numOutStreams = 1;
+ numStreams = codec.NumStreams;
return true;
}
}
+
#ifdef EXTERNAL_CODECS
- if (externalCodecs)
- for (i = 0; i < (UInt32)externalCodecs->Size(); i++)
+
+ CHECK_GLOBAL_CODECS
+
+ if (__externalCodecs)
+ for (i = 0; i < __externalCodecs->Codecs.Size(); i++)
{
- const CCodecInfoEx &codec = (*externalCodecs)[i];
- if (codec.Name.CompareNoCase(name) == 0)
+ const CCodecInfoEx &codec = __externalCodecs->Codecs[i];
+ if (StringsAreEqualNoCase_Ascii(name, codec.Name))
{
methodId = codec.Id;
- numInStreams = codec.NumInStreams;
- numOutStreams = codec.NumOutStreams;
+ numStreams = codec.NumStreams;
return true;
}
}
+
#endif
+
return false;
}
bool FindMethod(
- #ifdef EXTERNAL_CODECS
- ICompressCodecsInfo * /* codecsInfo */, const CObjectVector<CCodecInfoEx> *externalCodecs,
- #endif
- CMethodId methodId, UString &name)
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId,
+ AString &name)
{
- UInt32 i;
+ name.Empty();
+
+ unsigned i;
for (i = 0; i < g_NumCodecs; i++)
{
const CCodecInfo &codec = *g_Codecs[i];
@@ -136,31 +203,94 @@ bool FindMethod(
return true;
}
}
+
#ifdef EXTERNAL_CODECS
- if (externalCodecs)
- for (i = 0; i < (UInt32)externalCodecs->Size(); i++)
+
+ CHECK_GLOBAL_CODECS
+
+ if (__externalCodecs)
+ for (i = 0; i < __externalCodecs->Codecs.Size(); i++)
{
- const CCodecInfoEx &codec = (*externalCodecs)[i];
+ const CCodecInfoEx &codec = __externalCodecs->Codecs[i];
if (methodId == codec.Id)
{
name = codec.Name;
return true;
}
}
+
#endif
+
return false;
}
+bool FindHashMethod(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ const AString &name,
+ CMethodId &methodId)
+{
+ unsigned i;
+ for (i = 0; i < g_NumHashers; i++)
+ {
+ const CHasherInfo &codec = *g_Hashers[i];
+ if (StringsAreEqualNoCase_Ascii(name, codec.Name))
+ {
+ methodId = codec.Id;
+ return true;
+ }
+ }
+
+ #ifdef EXTERNAL_CODECS
+
+ CHECK_GLOBAL_CODECS
+
+ if (__externalCodecs)
+ for (i = 0; i < __externalCodecs->Hashers.Size(); i++)
+ {
+ const CHasherInfoEx &codec = __externalCodecs->Hashers[i];
+ if (StringsAreEqualNoCase_Ascii(name, codec.Name))
+ {
+ methodId = codec.Id;
+ return true;
+ }
+ }
+
+ #endif
+
+ return false;
+}
+
+void GetHashMethods(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CRecordVector<CMethodId> &methods)
+{
+ methods.ClearAndSetSize(g_NumHashers);
+ unsigned i;
+ for (i = 0; i < g_NumHashers; i++)
+ methods[i] = (*g_Hashers[i]).Id;
+
+ #ifdef EXTERNAL_CODECS
+
+ CHECK_GLOBAL_CODECS
+
+ if (__externalCodecs)
+ for (i = 0; i < __externalCodecs->Hashers.Size(); i++)
+ methods.Add(__externalCodecs->Hashers[i].Id);
+
+ #endif
+}
+
HRESULT CreateCoder(
- DECL_EXTERNAL_CODECS_LOC_VARS
- CMethodId methodId,
- CMyComPtr<ICompressFilter> &filter,
- CMyComPtr<ICompressCoder> &coder,
- CMyComPtr<ICompressCoder2> &coder2,
- bool encode, bool onlyCoder)
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId, bool encode,
+ CMyComPtr<ICompressFilter> &filter,
+ CCreatedCoder &cod)
{
- bool created = false;
- UInt32 i;
+ cod.IsExternal = false;
+ cod.IsFilter = false;
+ cod.NumStreams = 1;
+
+ unsigned i;
for (i = 0; i < g_NumCodecs; i++)
{
const CCodecInfo &codec = *g_Codecs[i];
@@ -172,10 +302,9 @@ HRESULT CreateCoder(
{
void *p = codec.CreateEncoder();
if (codec.IsFilter) filter = (ICompressFilter *)p;
- else if (codec.NumInStreams == 1) coder = (ICompressCoder *)p;
- else coder2 = (ICompressCoder2 *)p;
- created = (p != 0);
- break;
+ else if (codec.NumStreams == 1) cod.Coder = (ICompressCoder *)p;
+ else { cod.Coder2 = (ICompressCoder2 *)p; cod.NumStreams = codec.NumStreams; }
+ return S_OK;
}
}
else
@@ -183,111 +312,150 @@ HRESULT CreateCoder(
{
void *p = codec.CreateDecoder();
if (codec.IsFilter) filter = (ICompressFilter *)p;
- else if (codec.NumInStreams == 1) coder = (ICompressCoder *)p;
- else coder2 = (ICompressCoder2 *)p;
- created = (p != 0);
- break;
+ else if (codec.NumStreams == 1) cod.Coder = (ICompressCoder *)p;
+ else { cod.Coder2 = (ICompressCoder2 *)p; cod.NumStreams = codec.NumStreams; }
+ return S_OK;
}
}
}
#ifdef EXTERNAL_CODECS
- if (!created && externalCodecs)
- for (i = 0; i < (UInt32)externalCodecs->Size(); i++)
+
+ CHECK_GLOBAL_CODECS
+
+ if (__externalCodecs)
+ {
+ cod.IsExternal = true;
+ for (i = 0; i < __externalCodecs->Codecs.Size(); i++)
{
- const CCodecInfoEx &codec = (*externalCodecs)[i];
+ const CCodecInfoEx &codec = __externalCodecs->Codecs[i];
if (codec.Id == methodId)
{
if (encode)
{
if (codec.EncoderIsAssigned)
{
- if (codec.IsSimpleCodec())
+ if (codec.NumStreams == 1)
{
- HRESULT result = codecsInfo->CreateEncoder(i, &IID_ICompressCoder, (void **)&coder);
- if (result != S_OK && result != E_NOINTERFACE && result != CLASS_E_CLASSNOTAVAILABLE)
- return result;
- if (!coder)
- {
- RINOK(codecsInfo->CreateEncoder(i, &IID_ICompressFilter, (void **)&filter));
- }
+ HRESULT res = __externalCodecs->GetCodecs->CreateEncoder(i, &IID_ICompressCoder, (void **)&cod.Coder);
+ if (res != S_OK && res != E_NOINTERFACE && res != CLASS_E_CLASSNOTAVAILABLE)
+ return res;
+ if (cod.Coder)
+ return res;
+ return __externalCodecs->GetCodecs->CreateEncoder(i, &IID_ICompressFilter, (void **)&filter);
}
- else
- {
- RINOK(codecsInfo->CreateEncoder(i, &IID_ICompressCoder2, (void **)&coder2));
- }
- break;
+ cod.NumStreams = codec.NumStreams;
+ return __externalCodecs->GetCodecs->CreateEncoder(i, &IID_ICompressCoder2, (void **)&cod.Coder2);
}
}
else
if (codec.DecoderIsAssigned)
{
- if (codec.IsSimpleCodec())
+ if (codec.NumStreams == 1)
{
- HRESULT result = codecsInfo->CreateDecoder(i, &IID_ICompressCoder, (void **)&coder);
- if (result != S_OK && result != E_NOINTERFACE && result != CLASS_E_CLASSNOTAVAILABLE)
- return result;
- if (!coder)
- {
- RINOK(codecsInfo->CreateDecoder(i, &IID_ICompressFilter, (void **)&filter));
- }
+ HRESULT res = __externalCodecs->GetCodecs->CreateDecoder(i, &IID_ICompressCoder, (void **)&cod.Coder);
+ if (res != S_OK && res != E_NOINTERFACE && res != CLASS_E_CLASSNOTAVAILABLE)
+ return res;
+ if (cod.Coder)
+ return res;
+ return __externalCodecs->GetCodecs->CreateDecoder(i, &IID_ICompressFilter, (void **)&filter);
}
- else
- {
- RINOK(codecsInfo->CreateDecoder(i, &IID_ICompressCoder2, (void **)&coder2));
- }
- break;
+ cod.NumStreams = codec.NumStreams;
+ return __externalCodecs->GetCodecs->CreateDecoder(i, &IID_ICompressCoder2, (void **)&cod.Coder2);
}
}
}
+ }
#endif
- if (onlyCoder && filter)
- {
- CFilterCoder *coderSpec = new CFilterCoder;
- coder = coderSpec;
- coderSpec->Filter = filter;
- }
return S_OK;
}
HRESULT CreateCoder(
- DECL_EXTERNAL_CODECS_LOC_VARS
- CMethodId methodId,
- CMyComPtr<ICompressCoder> &coder,
- CMyComPtr<ICompressCoder2> &coder2,
- bool encode)
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId, bool encode,
+ CCreatedCoder &cod)
{
CMyComPtr<ICompressFilter> filter;
- return CreateCoder(
- EXTERNAL_CODECS_LOC_VARS
- methodId,
- filter, coder, coder2, encode, true);
+ HRESULT res = CreateCoder(
+ EXTERNAL_CODECS_LOC_VARS
+ methodId, encode,
+ filter, cod);
+
+ if (filter)
+ {
+ cod.IsFilter = true;
+ CFilterCoder *coderSpec = new CFilterCoder(encode);
+ cod.Coder = coderSpec;
+ coderSpec->Filter = filter;
+ }
+
+ return res;
}
HRESULT CreateCoder(
- DECL_EXTERNAL_CODECS_LOC_VARS
- CMethodId methodId,
- CMyComPtr<ICompressCoder> &coder, bool encode)
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId, bool encode,
+ CMyComPtr<ICompressCoder> &coder)
{
- CMyComPtr<ICompressFilter> filter;
- CMyComPtr<ICompressCoder2> coder2;
- return CreateCoder(
- EXTERNAL_CODECS_LOC_VARS
- methodId,
- coder, coder2, encode);
+ CCreatedCoder cod;
+ HRESULT res = CreateCoder(
+ EXTERNAL_CODECS_LOC_VARS
+ methodId, encode,
+ cod);
+ coder = cod.Coder;
+ return res;
}
HRESULT CreateFilter(
- DECL_EXTERNAL_CODECS_LOC_VARS
- CMethodId methodId,
- CMyComPtr<ICompressFilter> &filter,
- bool encode)
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId, bool encode,
+ CMyComPtr<ICompressFilter> &filter)
{
- CMyComPtr<ICompressCoder> coder;
- CMyComPtr<ICompressCoder2> coder2;
+ CCreatedCoder cod;
return CreateCoder(
- EXTERNAL_CODECS_LOC_VARS
- methodId,
- filter, coder, coder2, encode, false);
+ EXTERNAL_CODECS_LOC_VARS
+ methodId, encode,
+ filter, cod);
+}
+
+
+HRESULT CreateHasher(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId,
+ AString &name,
+ CMyComPtr<IHasher> &hasher)
+{
+ name.Empty();
+
+ unsigned i;
+ for (i = 0; i < g_NumHashers; i++)
+ {
+ const CHasherInfo &codec = *g_Hashers[i];
+ if (codec.Id == methodId)
+ {
+ hasher = codec.CreateHasher();
+ name = codec.Name;
+ break;
+ }
+ }
+
+ #ifdef EXTERNAL_CODECS
+
+ CHECK_GLOBAL_CODECS
+
+ if (!hasher && __externalCodecs)
+ for (i = 0; i < __externalCodecs->Hashers.Size(); i++)
+ {
+ const CHasherInfoEx &codec = __externalCodecs->Hashers[i];
+ if (codec.Id == methodId)
+ {
+ name = codec.Name;
+ return __externalCodecs->GetHashers->CreateHasher((UInt32)i, &hasher);
+ }
+ }
+
+ #endif
+
+ return S_OK;
}
diff --git a/3rdparty/lzma/CPP/7zip/Common/CreateCoder.h b/3rdparty/lzma/CPP/7zip/Common/CreateCoder.h
index bf0e96a38ad..f06064b6a6f 100644
--- a/3rdparty/lzma/CPP/7zip/Common/CreateCoder.h
+++ b/3rdparty/lzma/CPP/7zip/Common/CreateCoder.h
@@ -5,41 +5,95 @@
#include "../../Common/MyCom.h"
#include "../../Common/MyString.h"
+
#include "../ICoder.h"
#include "MethodId.h"
+/*
+ if EXTERNAL_CODECS is not defined, the code supports only codecs that
+ are statically linked at compile-time and link-time.
+
+ if EXTERNAL_CODECS is defined, the code supports also codecs from another
+ executable modules, that can be linked dynamically at run-time:
+ - EXE module can use codecs from external DLL files.
+ - DLL module can use codecs from external EXE and DLL files.
+
+ CExternalCodecs contains information about codecs and interfaces to create them.
+
+ The order of codecs:
+ 1) Internal codecs
+ 2) External codecs
+*/
+
#ifdef EXTERNAL_CODECS
struct CCodecInfoEx
{
- UString Name;
CMethodId Id;
- UInt32 NumInStreams;
- UInt32 NumOutStreams;
+ AString Name;
+ UInt32 NumStreams;
bool EncoderIsAssigned;
bool DecoderIsAssigned;
- bool IsSimpleCodec() const { return NumOutStreams == 1 && NumInStreams == 1; }
+
CCodecInfoEx(): EncoderIsAssigned(false), DecoderIsAssigned(false) {}
};
-HRESULT LoadExternalCodecs(ICompressCodecsInfo *codecsInfo, CObjectVector<CCodecInfoEx> &externalCodecs);
+struct CHasherInfoEx
+{
+ CMethodId Id;
+ AString Name;
+};
#define PUBLIC_ISetCompressCodecsInfo public ISetCompressCodecsInfo,
#define QUERY_ENTRY_ISetCompressCodecsInfo MY_QUERYINTERFACE_ENTRY(ISetCompressCodecsInfo)
#define DECL_ISetCompressCodecsInfo STDMETHOD(SetCompressCodecsInfo)(ICompressCodecsInfo *compressCodecsInfo);
#define IMPL_ISetCompressCodecsInfo2(x) \
STDMETHODIMP x::SetCompressCodecsInfo(ICompressCodecsInfo *compressCodecsInfo) { \
- COM_TRY_BEGIN _codecsInfo = compressCodecsInfo; return LoadExternalCodecs(_codecsInfo, _externalCodecs); COM_TRY_END }
+ COM_TRY_BEGIN __externalCodecs.GetCodecs = compressCodecsInfo; return __externalCodecs.Load(); COM_TRY_END }
#define IMPL_ISetCompressCodecsInfo IMPL_ISetCompressCodecsInfo2(CHandler)
-#define EXTERNAL_CODECS_VARS2 _codecsInfo, &_externalCodecs
+struct CExternalCodecs
+{
+ CMyComPtr<ICompressCodecsInfo> GetCodecs;
+ CMyComPtr<IHashers> GetHashers;
+
+ CObjectVector<CCodecInfoEx> Codecs;
+ CObjectVector<CHasherInfoEx> Hashers;
+
+ bool IsSet() const { return GetCodecs != NULL || GetHashers != NULL; }
+
+ HRESULT Load();
+
+ void ClearAndRelease()
+ {
+ Hashers.Clear();
+ Codecs.Clear();
+ GetHashers.Release();
+ GetCodecs.Release();
+ }
+
+ ~CExternalCodecs()
+ {
+ GetHashers.Release();
+ GetCodecs.Release();
+ }
+};
+
+extern CExternalCodecs g_ExternalCodecs;
+
+#define EXTERNAL_CODECS_VARS2 (__externalCodecs.IsSet() ? &__externalCodecs : &g_ExternalCodecs)
+#define EXTERNAL_CODECS_VARS2_L (&__externalCodecs)
+#define EXTERNAL_CODECS_VARS2_G (&g_ExternalCodecs)
+
+#define DECL_EXTERNAL_CODECS_VARS CExternalCodecs __externalCodecs;
-#define DECL_EXTERNAL_CODECS_VARS CMyComPtr<ICompressCodecsInfo> _codecsInfo; CObjectVector<CCodecInfoEx> _externalCodecs;
-#define EXTERNAL_CODECS_VARS EXTERNAL_CODECS_VARS2,
+#define EXTERNAL_CODECS_VARS EXTERNAL_CODECS_VARS2,
+#define EXTERNAL_CODECS_VARS_L EXTERNAL_CODECS_VARS2_L,
+#define EXTERNAL_CODECS_VARS_G EXTERNAL_CODECS_VARS2_G,
-#define DECL_EXTERNAL_CODECS_LOC_VARS2 ICompressCodecsInfo *codecsInfo, const CObjectVector<CCodecInfoEx> *externalCodecs
-#define EXTERNAL_CODECS_LOC_VARS2 codecsInfo, externalCodecs
+#define DECL_EXTERNAL_CODECS_LOC_VARS2 const CExternalCodecs *__externalCodecs
+#define EXTERNAL_CODECS_LOC_VARS2 __externalCodecs
#define DECL_EXTERNAL_CODECS_LOC_VARS DECL_EXTERNAL_CODECS_LOC_VARS2,
#define EXTERNAL_CODECS_LOC_VARS EXTERNAL_CODECS_LOC_VARS2,
@@ -52,7 +106,9 @@ STDMETHODIMP x::SetCompressCodecsInfo(ICompressCodecsInfo *compressCodecsInfo) {
#define IMPL_ISetCompressCodecsInfo
#define EXTERNAL_CODECS_VARS2
#define DECL_EXTERNAL_CODECS_VARS
-#define EXTERNAL_CODECS_VARS EXTERNAL_CODECS_VARS2
+#define EXTERNAL_CODECS_VARS
+#define EXTERNAL_CODECS_VARS_L
+#define EXTERNAL_CODECS_VARS_G
#define DECL_EXTERNAL_CODECS_LOC_VARS2
#define EXTERNAL_CODECS_LOC_VARS2
#define DECL_EXTERNAL_CODECS_LOC_VARS
@@ -60,39 +116,67 @@ STDMETHODIMP x::SetCompressCodecsInfo(ICompressCodecsInfo *compressCodecsInfo) {
#endif
+
+
+
bool FindMethod(
- DECL_EXTERNAL_CODECS_LOC_VARS
- const UString &name, CMethodId &methodId, UInt32 &numInStreams, UInt32 &numOutStreams);
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ const AString &name,
+ CMethodId &methodId, UInt32 &numStreams);
bool FindMethod(
- DECL_EXTERNAL_CODECS_LOC_VARS
- CMethodId methodId, UString &name);
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId,
+ AString &name);
+
+bool FindHashMethod(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ const AString &name,
+ CMethodId &methodId);
+
+void GetHashMethods(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CRecordVector<CMethodId> &methods);
+
+
+struct CCreatedCoder
+{
+ CMyComPtr<ICompressCoder> Coder;
+ CMyComPtr<ICompressCoder2> Coder2;
+
+ bool IsExternal;
+ bool IsFilter; // = true, if Coder was created from filter
+ UInt32 NumStreams;
+
+ // CCreatedCoder(): IsExternal(false), IsFilter(false), NumStreams(1) {}
+};
HRESULT CreateCoder(
- DECL_EXTERNAL_CODECS_LOC_VARS
- CMethodId methodId,
- CMyComPtr<ICompressFilter> &filter,
- CMyComPtr<ICompressCoder> &coder,
- CMyComPtr<ICompressCoder2> &coder2,
- bool encode, bool onlyCoder);
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId, bool encode,
+ CMyComPtr<ICompressFilter> &filter,
+ CCreatedCoder &cod);
HRESULT CreateCoder(
- DECL_EXTERNAL_CODECS_LOC_VARS
- CMethodId methodId,
- CMyComPtr<ICompressCoder> &coder,
- CMyComPtr<ICompressCoder2> &coder2,
- bool encode);
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId, bool encode,
+ CCreatedCoder &cod);
HRESULT CreateCoder(
- DECL_EXTERNAL_CODECS_LOC_VARS
- CMethodId methodId,
- CMyComPtr<ICompressCoder> &coder, bool encode);
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId, bool encode,
+ CMyComPtr<ICompressCoder> &coder);
HRESULT CreateFilter(
- DECL_EXTERNAL_CODECS_LOC_VARS
- CMethodId methodId,
- CMyComPtr<ICompressFilter> &filter,
- bool encode);
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId, bool encode,
+ CMyComPtr<ICompressFilter> &filter);
+
+HRESULT CreateHasher(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ CMethodId methodId,
+ AString &name,
+ CMyComPtr<IHasher> &hasher);
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/FilePathAutoRename.cpp b/3rdparty/lzma/CPP/7zip/Common/FilePathAutoRename.cpp
index 495f886b379..d186e599333 100644
--- a/3rdparty/lzma/CPP/7zip/Common/FilePathAutoRename.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/FilePathAutoRename.cpp
@@ -2,54 +2,50 @@
#include "StdAfx.h"
-#include "Common/Defs.h"
-#include "Common/IntToString.h"
+#include "../../Common/Defs.h"
+#include "../../Common/IntToString.h"
-#include "Windows/FileFind.h"
+#include "../../Windows/FileFind.h"
#include "FilePathAutoRename.h"
using namespace NWindows;
static bool MakeAutoName(const FString &name,
- const FString &extension, unsigned value, FString &path)
+ const FString &extension, UInt32 value, FString &path)
{
- FChar number[16];
- ConvertUInt32ToString(value, number);
+ char temp[16];
+ ConvertUInt32ToString(value, temp);
path = name;
- path += number;
+ path.AddAscii(temp);
path += extension;
return NFile::NFind::DoesFileOrDirExist(path);
}
-bool AutoRenamePath(FString &fullProcessedPath)
+bool AutoRenamePath(FString &path)
{
- FString path;
- int dotPos = fullProcessedPath.ReverseFind(FTEXT('.'));
+ int dotPos = path.ReverseFind_Dot();
+ int slashPos = path.ReverseFind_PathSepar();
- int slashPos = fullProcessedPath.ReverseFind(FTEXT('/'));
- #ifdef _WIN32
- int slash1Pos = fullProcessedPath.ReverseFind(FTEXT('\\'));
- slashPos = MyMax(slashPos, slash1Pos);
- #endif
-
- FString name, extension;
- if (dotPos > slashPos && dotPos > 0)
+ FString name = path;
+ FString extension;
+ if (dotPos > slashPos + 1)
{
- name = fullProcessedPath.Left(dotPos);
- extension = fullProcessedPath.Mid(dotPos);
+ name.DeleteFrom(dotPos);
+ extension = path.Ptr(dotPos);
}
- else
- name = fullProcessedPath;
- name += L'_';
- unsigned left = 1, right = (1 << 30);
+ name += FTEXT('_');
+
+ FString temp;
+
+ UInt32 left = 1, right = ((UInt32)1 << 30);
while (left != right)
{
- unsigned mid = (left + right) / 2;
- if (MakeAutoName(name, extension, mid, path))
+ UInt32 mid = (left + right) / 2;
+ if (MakeAutoName(name, extension, mid, temp))
left = mid + 1;
else
right = mid;
}
- return !MakeAutoName(name, extension, right, fullProcessedPath);
+ return !MakeAutoName(name, extension, right, path);
}
diff --git a/3rdparty/lzma/CPP/7zip/Common/FilePathAutoRename.h b/3rdparty/lzma/CPP/7zip/Common/FilePathAutoRename.h
index eee0aba7f89..7b576591c9a 100644
--- a/3rdparty/lzma/CPP/7zip/Common/FilePathAutoRename.h
+++ b/3rdparty/lzma/CPP/7zip/Common/FilePathAutoRename.h
@@ -3,7 +3,7 @@
#ifndef __FILE_PATH_AUTO_RENAME_H
#define __FILE_PATH_AUTO_RENAME_H
-#include "Common/MyString.h"
+#include "../../Common/MyString.h"
bool AutoRenamePath(FString &fullProcessedPath);
diff --git a/3rdparty/lzma/CPP/7zip/Common/FileStreams.cpp b/3rdparty/lzma/CPP/7zip/Common/FileStreams.cpp
index a8be8aa46e3..f3a322fc9be 100644
--- a/3rdparty/lzma/CPP/7zip/Common/FileStreams.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/FileStreams.cpp
@@ -29,24 +29,29 @@ static inline HRESULT ConvertBoolToHRESULT(bool result)
#endif
}
-#ifdef SUPPORT_DEVICE_FILE
static const UInt32 kClusterSize = 1 << 18;
CInFileStream::CInFileStream():
+ #ifdef SUPPORT_DEVICE_FILE
VirtPos(0),
PhyPos(0),
- Buffer(0),
- BufferSize(0)
+ Buf(0),
+ BufSize(0),
+ #endif
+ SupportHardLinks(false),
+ Callback(NULL),
+ CallbackRef(0)
{
}
-#endif
-
CInFileStream::~CInFileStream()
{
#ifdef SUPPORT_DEVICE_FILE
- MidFree(Buffer);
+ MidFree(Buf);
#endif
+
+ if (Callback)
+ Callback->InFileStream_On_Destroy(CallbackRef);
}
STDMETHODIMP CInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize)
@@ -54,41 +59,41 @@ STDMETHODIMP CInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize)
#ifdef USE_WIN_FILE
#ifdef SUPPORT_DEVICE_FILE
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
if (size == 0)
return S_OK;
if (File.IsDeviceFile)
{
- if (File.LengthDefined)
+ if (File.SizeDefined)
{
- if (VirtPos >= File.Length)
- return VirtPos == File.Length ? S_OK : E_FAIL;
- UInt64 rem = File.Length - VirtPos;
+ if (VirtPos >= File.Size)
+ return VirtPos == File.Size ? S_OK : E_FAIL;
+ UInt64 rem = File.Size - VirtPos;
if (size > rem)
size = (UInt32)rem;
}
for (;;)
{
const UInt32 mask = kClusterSize - 1;
- UInt64 mask2 = ~(UInt64)mask;
+ const UInt64 mask2 = ~(UInt64)mask;
UInt64 alignedPos = VirtPos & mask2;
- if (BufferSize > 0 && BufferStartPos == alignedPos)
+ if (BufSize > 0 && BufStartPos == alignedPos)
{
UInt32 pos = (UInt32)VirtPos & mask;
- if (pos >= BufferSize)
+ if (pos >= BufSize)
return S_OK;
- UInt32 rem = MyMin(BufferSize - pos, size);
- memcpy(data, Buffer + pos, rem);
+ UInt32 rem = MyMin(BufSize - pos, size);
+ memcpy(data, Buf + pos, rem);
VirtPos += rem;
- if (processedSize != NULL)
+ if (processedSize)
*processedSize += rem;
return S_OK;
}
- bool useBuffer = false;
+ bool useBuf = false;
if ((VirtPos & mask) != 0 || ((ptrdiff_t)data & mask) != 0 )
- useBuffer = true;
+ useBuf = true;
else
{
UInt64 end = VirtPos + size;
@@ -96,12 +101,12 @@ STDMETHODIMP CInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize)
{
end &= mask2;
if (end <= VirtPos)
- useBuffer = true;
+ useBuf = true;
else
size = (UInt32)(end - VirtPos);
}
}
- if (!useBuffer)
+ if (!useBuf)
break;
if (alignedPos != PhyPos)
{
@@ -112,24 +117,24 @@ STDMETHODIMP CInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize)
PhyPos = realNewPosition;
}
- BufferStartPos = alignedPos;
+ BufStartPos = alignedPos;
UInt32 readSize = kClusterSize;
- if (File.LengthDefined)
- readSize = (UInt32)MyMin(File.Length - PhyPos, (UInt64)kClusterSize);
+ if (File.SizeDefined)
+ readSize = (UInt32)MyMin(File.Size - PhyPos, (UInt64)kClusterSize);
- if (Buffer == 0)
+ if (!Buf)
{
- Buffer = (Byte *)MidAlloc(kClusterSize);
- if (Buffer == 0)
+ Buf = (Byte *)MidAlloc(kClusterSize);
+ if (!Buf)
return E_OUTOFMEMORY;
}
- bool result = File.Read1(Buffer, readSize, BufferSize);
+ bool result = File.Read1(Buf, readSize, BufSize);
if (!result)
return ConvertBoolToHRESULT(result);
- if (BufferSize == 0)
+ if (BufSize == 0)
return S_OK;
- PhyPos += BufferSize;
+ PhyPos += BufSize;
}
if (VirtPos != PhyPos)
@@ -145,22 +150,40 @@ STDMETHODIMP CInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize)
UInt32 realProcessedSize;
bool result = File.ReadPart(data, size, realProcessedSize);
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = realProcessedSize;
+
#ifdef SUPPORT_DEVICE_FILE
VirtPos += realProcessedSize;
PhyPos += realProcessedSize;
#endif
- return ConvertBoolToHRESULT(result);
-
+
+ if (result)
+ return S_OK;
+
+ {
+ DWORD error = ::GetLastError();
+
+ if (Callback)
+ return Callback->InFileStream_On_Error(CallbackRef, error);
+ if (error == 0)
+ return E_FAIL;
+
+ return HRESULT_FROM_WIN32(error);
+ }
+
#else
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
ssize_t res = File.Read(data, (size_t)size);
if (res == -1)
+ {
+ if (Callback)
+ return Callback->InFileStream_On_Error(CallbackRef, E_FAIL);
return E_FAIL;
- if (processedSize != NULL)
+ }
+ if (processedSize)
*processedSize = (UInt32)res;
return S_OK;
@@ -170,10 +193,13 @@ STDMETHODIMP CInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize)
#ifdef UNDER_CE
STDMETHODIMP CStdInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize)
{
- size_t s2 = fread(data, 1, size, stdout);
- if (processedSize != 0)
+ size_t s2 = fread(data, 1, size, stdin);
+ int error = ferror(stdin);
+ if (processedSize)
*processedSize = s2;
- return (s2 = size) ? S_OK : E_FAIL;
+ if (s2 <= size && error == 0)
+ return S_OK;
+ return E_FAIL;
}
#else
STDMETHODIMP CStdInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize)
@@ -185,7 +211,7 @@ STDMETHODIMP CStdInFileStream::Read(void *data, UInt32 size, UInt32 *processedSi
if (sizeTemp > size)
sizeTemp = size;
BOOL res = ::ReadFile(GetStdHandle(STD_INPUT_HANDLE), data, sizeTemp, &realProcessedSize, NULL);
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = realProcessedSize;
if (res == FALSE && GetLastError() == ERROR_BROKEN_PIPE)
return S_OK;
@@ -193,7 +219,7 @@ STDMETHODIMP CStdInFileStream::Read(void *data, UInt32 size, UInt32 *processedSi
#else
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
ssize_t res;
do
@@ -203,7 +229,7 @@ STDMETHODIMP CStdInFileStream::Read(void *data, UInt32 size, UInt32 *processedSi
while (res < 0 && (errno == EINTR));
if (res == -1)
return E_FAIL;
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = (UInt32)res;
return S_OK;
@@ -212,8 +238,7 @@ STDMETHODIMP CStdInFileStream::Read(void *data, UInt32 size, UInt32 *processedSi
#endif
-STDMETHODIMP CInFileStream::Seek(Int64 offset, UInt32 seekOrigin,
- UInt64 *newPosition)
+STDMETHODIMP CInFileStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
{
if (seekOrigin >= 3)
return STG_E_INVALIDFUNCTION;
@@ -221,19 +246,20 @@ STDMETHODIMP CInFileStream::Seek(Int64 offset, UInt32 seekOrigin,
#ifdef USE_WIN_FILE
#ifdef SUPPORT_DEVICE_FILE
- if (File.IsDeviceFile)
+ if (File.IsDeviceFile && (File.SizeDefined || seekOrigin != STREAM_SEEK_END))
{
- UInt64 newVirtPos = offset;
- switch(seekOrigin)
+ switch (seekOrigin)
{
case STREAM_SEEK_SET: break;
- case STREAM_SEEK_CUR: newVirtPos += VirtPos; break;
- case STREAM_SEEK_END: newVirtPos += File.Length; break;
+ case STREAM_SEEK_CUR: offset += VirtPos; break;
+ case STREAM_SEEK_END: offset += File.Size; break;
default: return STG_E_INVALIDFUNCTION;
}
- VirtPos = newVirtPos;
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ VirtPos = offset;
if (newPosition)
- *newPosition = newVirtPos;
+ *newPosition = offset;
return S_OK;
}
#endif
@@ -245,7 +271,7 @@ STDMETHODIMP CInFileStream::Seek(Int64 offset, UInt32 seekOrigin,
PhyPos = VirtPos = realNewPosition;
#endif
- if (newPosition != NULL)
+ if (newPosition)
*newPosition = realNewPosition;
return ConvertBoolToHRESULT(result);
@@ -254,7 +280,7 @@ STDMETHODIMP CInFileStream::Seek(Int64 offset, UInt32 seekOrigin,
off_t res = File.Seek((off_t)offset, seekOrigin);
if (res == -1)
return E_FAIL;
- if (newPosition != NULL)
+ if (newPosition)
*newPosition = (UInt64)res;
return S_OK;
@@ -266,6 +292,43 @@ STDMETHODIMP CInFileStream::GetSize(UInt64 *size)
return ConvertBoolToHRESULT(File.GetLength(*size));
}
+#ifdef USE_WIN_FILE
+
+STDMETHODIMP CInFileStream::GetProps(UInt64 *size, FILETIME *cTime, FILETIME *aTime, FILETIME *mTime, UInt32 *attrib)
+{
+ BY_HANDLE_FILE_INFORMATION info;
+ if (File.GetFileInformation(&info))
+ {
+ if (size) *size = (((UInt64)info.nFileSizeHigh) << 32) + info.nFileSizeLow;
+ if (cTime) *cTime = info.ftCreationTime;
+ if (aTime) *aTime = info.ftLastAccessTime;
+ if (mTime) *mTime = info.ftLastWriteTime;
+ if (attrib) *attrib = info.dwFileAttributes;
+ return S_OK;
+ }
+ return GetLastError();
+}
+
+STDMETHODIMP CInFileStream::GetProps2(CStreamFileProps *props)
+{
+ BY_HANDLE_FILE_INFORMATION info;
+ if (File.GetFileInformation(&info))
+ {
+ props->Size = (((UInt64)info.nFileSizeHigh) << 32) + info.nFileSizeLow;
+ props->VolID = info.dwVolumeSerialNumber;
+ props->FileID_Low = (((UInt64)info.nFileIndexHigh) << 32) + info.nFileIndexLow;
+ props->FileID_High = 0;
+ props->NumLinks = SupportHardLinks ? info.nNumberOfLinks : 1;
+ props->Attrib = info.dwFileAttributes;
+ props->CTime = info.ftCreationTime;
+ props->ATime = info.ftLastAccessTime;
+ props->MTime = info.ftLastWriteTime;
+ return S_OK;
+ }
+ return GetLastError();
+}
+
+#endif
//////////////////////////
// COutFileStream
@@ -280,20 +343,20 @@ STDMETHODIMP COutFileStream::Write(const void *data, UInt32 size, UInt32 *proces
#ifdef USE_WIN_FILE
UInt32 realProcessedSize;
- bool result = File.WritePart(data, size, realProcessedSize);
+ bool result = File.Write(data, size, realProcessedSize);
ProcessedSize += realProcessedSize;
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = realProcessedSize;
return ConvertBoolToHRESULT(result);
#else
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
ssize_t res = File.Write(data, (size_t)size);
if (res == -1)
return E_FAIL;
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = (UInt32)res;
ProcessedSize += res;
return S_OK;
@@ -305,11 +368,12 @@ STDMETHODIMP COutFileStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPo
{
if (seekOrigin >= 3)
return STG_E_INVALIDFUNCTION;
+
#ifdef USE_WIN_FILE
UInt64 realNewPosition;
bool result = File.Seek(offset, seekOrigin, realNewPosition);
- if (newPosition != NULL)
+ if (newPosition)
*newPosition = realNewPosition;
return ConvertBoolToHRESULT(result);
@@ -318,7 +382,7 @@ STDMETHODIMP COutFileStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPo
off_t res = File.Seek((off_t)offset, seekOrigin);
if (res == -1)
return E_FAIL;
- if (newPosition != NULL)
+ if (newPosition)
*newPosition = (UInt64)res;
return S_OK;
@@ -328,6 +392,7 @@ STDMETHODIMP COutFileStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPo
STDMETHODIMP COutFileStream::SetSize(UInt64 newSize)
{
#ifdef USE_WIN_FILE
+
UInt64 currentPos;
if (!File.Seek(0, FILE_CURRENT, currentPos))
return E_FAIL;
@@ -335,26 +400,38 @@ STDMETHODIMP COutFileStream::SetSize(UInt64 newSize)
UInt64 currentPos2;
result = result && File.Seek(currentPos, currentPos2);
return result ? S_OK : E_FAIL;
+
#else
+
return E_FAIL;
+
#endif
}
+HRESULT COutFileStream::GetSize(UInt64 *size)
+{
+ return ConvertBoolToHRESULT(File.GetLength(*size));
+}
+
#ifdef UNDER_CE
+
STDMETHODIMP CStdOutFileStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
{
size_t s2 = fwrite(data, 1, size, stdout);
- if (processedSize != 0)
+ if (processedSize)
*processedSize = s2;
- return (s2 = size) ? S_OK : E_FAIL;
+ return (s2 == size) ? S_OK : E_FAIL;
}
+
#else
+
STDMETHODIMP CStdOutFileStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
{
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
#ifdef _WIN32
+
UInt32 realProcessedSize;
BOOL res = TRUE;
if (size > 0)
@@ -366,9 +443,10 @@ STDMETHODIMP CStdOutFileStream::Write(const void *data, UInt32 size, UInt32 *pro
sizeTemp = size;
res = ::WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),
data, sizeTemp, (DWORD *)&realProcessedSize, NULL);
+ _size += realProcessedSize;
size -= realProcessedSize;
data = (const void *)((const Byte *)data + realProcessedSize);
- if (processedSize != NULL)
+ if (processedSize)
*processedSize += realProcessedSize;
}
return ConvertBoolToHRESULT(res != FALSE);
@@ -376,18 +454,21 @@ STDMETHODIMP CStdOutFileStream::Write(const void *data, UInt32 size, UInt32 *pro
#else
ssize_t res;
+
do
{
res = write(1, data, (size_t)size);
}
while (res < 0 && (errno == EINTR));
+
if (res == -1)
return E_FAIL;
- if (processedSize != NULL)
+
+ _size += (size_t)res;
+ if (processedSize)
*processedSize = (UInt32)res;
return S_OK;
- return S_OK;
#endif
}
diff --git a/3rdparty/lzma/CPP/7zip/Common/FileStreams.h b/3rdparty/lzma/CPP/7zip/Common/FileStreams.h
index bb2b1d41f1d..ef2986fdd88 100644
--- a/3rdparty/lzma/CPP/7zip/Common/FileStreams.h
+++ b/3rdparty/lzma/CPP/7zip/Common/FileStreams.h
@@ -19,29 +19,51 @@
#include "../IStream.h"
+#ifdef _WIN32
+typedef UINT_PTR My_UINT_PTR;
+#else
+typedef UINT My_UINT_PTR;
+#endif
+
+struct IInFileStream_Callback
+{
+ virtual HRESULT InFileStream_On_Error(My_UINT_PTR val, DWORD error) = 0;
+ virtual void InFileStream_On_Destroy(My_UINT_PTR val) = 0;
+};
+
class CInFileStream:
public IInStream,
public IStreamGetSize,
+ #ifdef USE_WIN_FILE
+ public IStreamGetProps,
+ public IStreamGetProps2,
+ #endif
public CMyUnknownImp
{
public:
#ifdef USE_WIN_FILE
NWindows::NFile::NIO::CInFile File;
+
#ifdef SUPPORT_DEVICE_FILE
UInt64 VirtPos;
UInt64 PhyPos;
- UInt64 BufferStartPos;
- Byte *Buffer;
- UInt32 BufferSize;
+ UInt64 BufStartPos;
+ Byte *Buf;
+ UInt32 BufSize;
#endif
+
#else
NC::NFile::NIO::CInFile File;
#endif
+
+ bool SupportHardLinks;
+
+ IInFileStream_Callback *Callback;
+ My_UINT_PTR CallbackRef;
+
virtual ~CInFileStream();
- #ifdef SUPPORT_DEVICE_FILE
CInFileStream();
- #endif
bool Open(CFSTR fileName)
{
@@ -53,12 +75,23 @@ public:
return File.OpenShared(fileName, shareForWrite);
}
- MY_UNKNOWN_IMP2(IInStream, IStreamGetSize)
+ MY_QUERYINTERFACE_BEGIN2(IInStream)
+ MY_QUERYINTERFACE_ENTRY(IStreamGetSize)
+ #ifdef USE_WIN_FILE
+ MY_QUERYINTERFACE_ENTRY(IStreamGetProps)
+ MY_QUERYINTERFACE_ENTRY(IStreamGetProps2)
+ #endif
+ MY_QUERYINTERFACE_END
+ MY_ADDREF_RELEASE
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
STDMETHOD(GetSize)(UInt64 *size);
+ #ifdef USE_WIN_FILE
+ STDMETHOD(GetProps)(UInt64 *size, FILETIME *cTime, FILETIME *aTime, FILETIME *mTime, UInt32 *attrib);
+ STDMETHOD(GetProps2)(CStreamFileProps *props);
+ #endif
};
class CStdInFileStream:
@@ -112,15 +145,20 @@ public:
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
STDMETHOD(SetSize)(UInt64 newSize);
+
+ HRESULT GetSize(UInt64 *size);
};
class CStdOutFileStream:
public ISequentialOutStream,
public CMyUnknownImp
{
+ UInt64 _size;
public:
MY_UNKNOWN_IMP
+ UInt64 GetSize() const { return _size; }
+ CStdOutFileStream(): _size(0) {}
virtual ~CStdOutFileStream() {}
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
};
diff --git a/3rdparty/lzma/CPP/7zip/Common/FilterCoder.cpp b/3rdparty/lzma/CPP/7zip/Common/FilterCoder.cpp
index 6967352789a..4f3ae4e7dcf 100644
--- a/3rdparty/lzma/CPP/7zip/Common/FilterCoder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/FilterCoder.cpp
@@ -2,90 +2,144 @@
#include "StdAfx.h"
-#include "../../../C/Alloc.h"
-
#include "../../Common/Defs.h"
#include "FilterCoder.h"
#include "StreamUtils.h"
-static const UInt32 kBufferSize = 1 << 17;
+/*
+ AES filters need 16-bytes alignment for HARDWARE-AES instructions.
+ So we call IFilter::Filter(, size), where (size != 16 * N) only for last data block.
+
+ AES-CBC filters need data size aligned for 16-bytes.
+ So the encoder can add zeros to the end of original stream.
+
+ Some filters (BCJ and others) don't process data at the end of stream in some cases.
+ So the encoder and decoder write such last bytes without change.
+*/
+
+
+static const UInt32 kBufSize = 1 << 20;
-CFilterCoder::CFilterCoder()
+STDMETHODIMP CFilterCoder::SetInBufSize(UInt32 , UInt32 size) { _inBufSize = size; return S_OK; }
+STDMETHODIMP CFilterCoder::SetOutBufSize(UInt32 , UInt32 size) { _outBufSize = size; return S_OK; }
+
+HRESULT CFilterCoder::Alloc()
{
- _buffer = (Byte *)::MidAlloc(kBufferSize);
- if (_buffer == 0)
- throw 1;
+ UInt32 size = MyMin(_inBufSize, _outBufSize);
+ /* minimal bufSize is 16 bytes for AES and IA64 filter.
+ bufSize for AES must be aligned for 16 bytes.
+ We use (1 << 12) min size to support future aligned filters. */
+ const UInt32 kMinSize = 1 << 12;
+ size &= ~(UInt32)(kMinSize - 1);
+ if (size < kMinSize)
+ size = kMinSize;
+ if (!_buf || _bufSize != size)
+ {
+ AllocAlignedMask(size, 16 - 1);
+ if (!_buf)
+ return E_OUTOFMEMORY;
+ _bufSize = size;
+ }
+ return S_OK;
}
-CFilterCoder::~CFilterCoder()
+HRESULT CFilterCoder::Init_and_Alloc()
{
- ::MidFree(_buffer);
+ RINOK(Filter->Init());
+ return Alloc();
}
-HRESULT CFilterCoder::WriteWithLimit(ISequentialOutStream *outStream, UInt32 size)
+CFilterCoder::CFilterCoder(bool encodeMode):
+ _bufSize(0),
+ _inBufSize(kBufSize),
+ _outBufSize(kBufSize),
+ _encodeMode(encodeMode),
+ _outSizeIsDefined(false),
+ _outSize(0),
+ _nowPos64(0)
+ {}
+
+CFilterCoder::~CFilterCoder()
{
- if (_outSizeIsDefined)
- {
- UInt64 remSize = _outSize - _nowPos64;
- if (size > remSize)
- size = (UInt32)remSize;
- }
- RINOK(WriteStream(outStream, _buffer, size));
- _nowPos64 += size;
- return S_OK;
}
STDMETHODIMP CFilterCoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream,
const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo *progress)
{
- RINOK(Init());
- UInt32 bufferPos = 0;
- _outSizeIsDefined = (outSize != 0);
- if (_outSizeIsDefined)
- _outSize = *outSize;
+ RINOK(Init_and_Alloc());
+
+ UInt64 nowPos64 = 0;
+ bool inputFinished = false;
+ UInt32 pos = 0;
- while (!_outSizeIsDefined || _nowPos64 < _outSize)
+ while (!outSize || nowPos64 < *outSize)
{
- size_t processedSize = kBufferSize - bufferPos;
+ UInt32 endPos = pos;
- // Change it: It can be optimized using ReadPart
- RINOK(ReadStream(inStream, _buffer + bufferPos, &processedSize));
-
- UInt32 endPos = bufferPos + (UInt32)processedSize;
-
- bufferPos = Filter->Filter(_buffer, endPos);
- if (bufferPos > endPos)
+ if (!inputFinished)
{
- for (; endPos < bufferPos; endPos++)
- _buffer[endPos] = 0;
- bufferPos = Filter->Filter(_buffer, endPos);
+ size_t processedSize = _bufSize - pos;
+ RINOK(ReadStream(inStream, _buf + pos, &processedSize));
+ endPos = pos + (UInt32)processedSize;
+ inputFinished = (endPos != _bufSize);
}
- if (bufferPos == 0)
+ pos = Filter->Filter(_buf, endPos);
+
+ if (pos > endPos)
{
- if (endPos == 0)
- return S_OK;
- return WriteWithLimit(outStream, endPos);
+ // AES
+ if (!inputFinished || pos > _bufSize)
+ return E_FAIL;
+ if (!_encodeMode)
+ return S_FALSE;
+
+ do
+ _buf[endPos] = 0;
+ while (++endPos != pos);
+
+ if (pos != Filter->Filter(_buf, pos))
+ return E_FAIL;
}
- RINOK(WriteWithLimit(outStream, bufferPos));
- if (progress != NULL)
+
+ if (endPos == 0)
+ return S_OK;
+
+ UInt32 size = (pos != 0 ? pos : endPos);
+ if (outSize)
{
- RINOK(progress->SetRatioInfo(&_nowPos64, &_nowPos64));
+ UInt64 remSize = *outSize - nowPos64;
+ if (size > remSize)
+ size = (UInt32)remSize;
}
+
+ RINOK(WriteStream(outStream, _buf, size));
+ nowPos64 += size;
+
+ if (pos == 0)
+ return S_OK;
+
+ if (progress)
+ RINOK(progress->SetRatioInfo(&nowPos64, &nowPos64));
+
UInt32 i = 0;
- while (bufferPos < endPos)
- _buffer[i++] = _buffer[bufferPos++];
- bufferPos = i;
+ while (pos < endPos)
+ _buf[i++] = _buf[pos++];
+ pos = i;
}
+
return S_OK;
}
+
+
+// ---------- Write to Filter ----------
+
STDMETHODIMP CFilterCoder::SetOutStream(ISequentialOutStream *outStream)
{
- _bufferPos = 0;
_outStream = outStream;
- return Init();
+ return S_OK;
}
STDMETHODIMP CFilterCoder::ReleaseOutStream()
@@ -94,70 +148,154 @@ STDMETHODIMP CFilterCoder::ReleaseOutStream()
return S_OK;
}
+HRESULT CFilterCoder::Flush2()
+{
+ while (_convSize != 0)
+ {
+ UInt32 num = _convSize;
+ if (_outSizeIsDefined)
+ {
+ UInt64 rem = _outSize - _nowPos64;
+ if (num > rem)
+ num = (UInt32)rem;
+ if (num == 0)
+ return k_My_HRESULT_WritingWasCut;
+ }
+
+ UInt32 processed = 0;
+ HRESULT res = _outStream->Write(_buf + _convPos, num, &processed);
+ if (processed == 0)
+ return res != S_OK ? res : E_FAIL;
+
+ _convPos += processed;
+ _convSize -= processed;
+ _nowPos64 += processed;
+ RINOK(res);
+ }
+
+ if (_convPos != 0)
+ {
+ UInt32 num = _bufPos - _convPos;
+ for (UInt32 i = 0; i < num; i++)
+ _buf[i] = _buf[_convPos + i];
+ _bufPos = num;
+ _convPos = 0;
+ }
+
+ return S_OK;
+}
STDMETHODIMP CFilterCoder::Write(const void *data, UInt32 size, UInt32 *processedSize)
{
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
- while (size > 0)
+
+ while (size != 0)
{
- UInt32 sizeTemp = MyMin(size, kBufferSize - _bufferPos);
- memcpy(_buffer + _bufferPos, data, sizeTemp);
- size -= sizeTemp;
- if (processedSize != NULL)
- *processedSize += sizeTemp;
- data = (const Byte *)data + sizeTemp;
- UInt32 endPos = _bufferPos + sizeTemp;
- _bufferPos = Filter->Filter(_buffer, endPos);
- if (_bufferPos == 0)
+ RINOK(Flush2());
+
+ // _convSize is 0
+ // _convPos is 0
+ // _bufPos is small
+
+ if (_bufPos != _bufSize)
{
- _bufferPos = endPos;
- break;
+ UInt32 num = MyMin(size, _bufSize - _bufPos);
+ memcpy(_buf + _bufPos, data, num);
+ size -= num;
+ data = (const Byte *)data + num;
+ if (processedSize)
+ *processedSize += num;
+ _bufPos += num;
+ if (_bufPos != _bufSize)
+ continue;
}
- if (_bufferPos > endPos)
- {
- if (size != 0)
- return E_FAIL;
+
+ // _bufPos == _bufSize
+ _convSize = Filter->Filter(_buf, _bufPos);
+
+ if (_convSize == 0)
break;
+ if (_convSize > _bufPos)
+ {
+ // that case is not possible.
+ _convSize = 0;
+ return E_FAIL;
}
- RINOK(WriteWithLimit(_outStream, _bufferPos));
- UInt32 i = 0;
- while (_bufferPos < endPos)
- _buffer[i++] = _buffer[_bufferPos++];
- _bufferPos = i;
}
+
return S_OK;
}
-STDMETHODIMP CFilterCoder::Flush()
+STDMETHODIMP CFilterCoder::OutStreamFinish()
{
- if (_bufferPos != 0)
+ for (;;)
{
- // _buffer contains only data refused by previous Filter->Filter call.
- UInt32 endPos = Filter->Filter(_buffer, _bufferPos);
- if (endPos > _bufferPos)
+ RINOK(Flush2());
+ if (_bufPos == 0)
+ break;
+ _convSize = Filter->Filter(_buf, _bufPos);
+ if (_convSize == 0)
+ _convSize = _bufPos;
+ else if (_convSize > _bufPos)
{
- for (; _bufferPos < endPos; _bufferPos++)
- _buffer[_bufferPos] = 0;
- if (Filter->Filter(_buffer, endPos) != endPos)
+ // AES
+ if (_convSize > _bufSize)
+ {
+ _convSize = 0;
+ return E_FAIL;
+ }
+ if (!_encodeMode)
+ {
+ _convSize = 0;
+ return S_FALSE;
+ }
+ for (; _bufPos < _convSize; _bufPos++)
+ _buf[_bufPos] = 0;
+ _convSize = Filter->Filter(_buf, _bufPos);
+ if (_convSize != _bufPos)
return E_FAIL;
}
- RINOK(WriteWithLimit(_outStream, _bufferPos));
- _bufferPos = 0;
}
- CMyComPtr<IOutStreamFlush> flush;
- _outStream.QueryInterface(IID_IOutStreamFlush, &flush);
- if (flush)
- return flush->Flush();
+
+ CMyComPtr<IOutStreamFinish> finish;
+ _outStream.QueryInterface(IID_IOutStreamFinish, &finish);
+ if (finish)
+ return finish->OutStreamFinish();
return S_OK;
}
+// ---------- Init functions ----------
+
+STDMETHODIMP CFilterCoder::InitEncoder()
+{
+ InitSpecVars();
+ return Init_and_Alloc();
+}
+
+HRESULT CFilterCoder::Init_NoSubFilterInit()
+{
+ InitSpecVars();
+ return Alloc();
+}
+
+STDMETHODIMP CFilterCoder::SetOutStreamSize(const UInt64 *outSize)
+{
+ InitSpecVars();
+ if (outSize)
+ {
+ _outSize = *outSize;
+ _outSizeIsDefined = true;
+ }
+ return Init_and_Alloc();
+}
+
+// ---------- Read from Filter ----------
STDMETHODIMP CFilterCoder::SetInStream(ISequentialInStream *inStream)
{
- _convertedPosBegin = _convertedPosEnd = _bufferPos = 0;
_inStream = inStream;
- return Init();
+ return S_OK;
}
STDMETHODIMP CFilterCoder::ReleaseInStream()
@@ -166,82 +304,115 @@ STDMETHODIMP CFilterCoder::ReleaseInStream()
return S_OK;
}
+
STDMETHODIMP CFilterCoder::Read(void *data, UInt32 size, UInt32 *processedSize)
{
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
- while (size > 0)
+
+ while (size != 0)
{
- if (_convertedPosBegin != _convertedPosEnd)
+ if (_convSize != 0)
{
- UInt32 sizeTemp = MyMin(size, _convertedPosEnd - _convertedPosBegin);
- memcpy(data, _buffer + _convertedPosBegin, sizeTemp);
- _convertedPosBegin += sizeTemp;
- data = (void *)((Byte *)data + sizeTemp);
- size -= sizeTemp;
- if (processedSize != NULL)
- *processedSize += sizeTemp;
+ if (size > _convSize)
+ size = _convSize;
+ if (_outSizeIsDefined)
+ {
+ UInt64 rem = _outSize - _nowPos64;
+ if (size > rem)
+ size = (UInt32)rem;
+ }
+ memcpy(data, _buf + _convPos, size);
+ _convPos += size;
+ _convSize -= size;
+ _nowPos64 += size;
+ if (processedSize)
+ *processedSize = size;
break;
}
- UInt32 i;
- for (i = 0; _convertedPosEnd + i < _bufferPos; i++)
- _buffer[i] = _buffer[_convertedPosEnd + i];
- _bufferPos = i;
- _convertedPosBegin = _convertedPosEnd = 0;
- size_t processedSizeTemp = kBufferSize - _bufferPos;
- RINOK(ReadStream(_inStream, _buffer + _bufferPos, &processedSizeTemp));
- _bufferPos += (UInt32)processedSizeTemp;
- _convertedPosEnd = Filter->Filter(_buffer, _bufferPos);
- if (_convertedPosEnd == 0)
+
+ if (_convPos != 0)
+ {
+ UInt32 num = _bufPos - _convPos;
+ for (UInt32 i = 0; i < num; i++)
+ _buf[i] = _buf[_convPos + i];
+ _bufPos = num;
+ _convPos = 0;
+ }
+
+ {
+ size_t readSize = _bufSize - _bufPos;
+ HRESULT res = ReadStream(_inStream, _buf + _bufPos, &readSize);
+ _bufPos += (UInt32)readSize;
+ RINOK(res);
+ }
+
+ _convSize = Filter->Filter(_buf, _bufPos);
+
+ if (_convSize == 0)
{
- if (_bufferPos == 0)
+ if (_bufPos == 0)
break;
- _convertedPosEnd = _bufferPos; // check it
+ // BCJ
+ _convSize = _bufPos;
continue;
}
- if (_convertedPosEnd > _bufferPos)
+
+ if (_convSize > _bufPos)
{
- for (; _bufferPos < _convertedPosEnd; _bufferPos++)
- _buffer[_bufferPos] = 0;
- _convertedPosEnd = Filter->Filter(_buffer, _bufferPos);
+ // AES
+ if (_convSize > _bufSize)
+ return E_FAIL;
+ if (!_encodeMode)
+ return S_FALSE;
+
+ do
+ _buf[_bufPos] = 0;
+ while (++_bufPos != _convSize);
+
+ _convSize = Filter->Filter(_buf, _convSize);
+ if (_convSize != _bufPos)
+ return E_FAIL;
}
}
+
return S_OK;
}
+
#ifndef _NO_CRYPTO
+
STDMETHODIMP CFilterCoder::CryptoSetPassword(const Byte *data, UInt32 size)
-{
- return _setPassword->CryptoSetPassword(data, size);
-}
+ { return _SetPassword->CryptoSetPassword(data, size); }
+
+STDMETHODIMP CFilterCoder::SetKey(const Byte *data, UInt32 size)
+ { return _CryptoProperties->SetKey(data, size); }
+
+STDMETHODIMP CFilterCoder::SetInitVector(const Byte *data, UInt32 size)
+ { return _CryptoProperties->SetInitVector(data, size); }
+
#endif
+
#ifndef EXTRACT_ONLY
+
STDMETHODIMP CFilterCoder::SetCoderProperties(const PROPID *propIDs,
- const PROPVARIANT *properties, UInt32 numProperties)
-{
- return _SetCoderProperties->SetCoderProperties(propIDs, properties, numProperties);
-}
+ const PROPVARIANT *properties, UInt32 numProperties)
+ { return _SetCoderProperties->SetCoderProperties(propIDs, properties, numProperties); }
STDMETHODIMP CFilterCoder::WriteCoderProperties(ISequentialOutStream *outStream)
-{
- return _writeCoderProperties->WriteCoderProperties(outStream);
-}
+ { return _WriteCoderProperties->WriteCoderProperties(outStream); }
/*
STDMETHODIMP CFilterCoder::ResetSalt()
-{
- return _CryptoResetSalt->ResetSalt();
-}
+ { return _CryptoResetSalt->ResetSalt(); }
*/
STDMETHODIMP CFilterCoder::ResetInitVector()
-{
- return _CryptoResetInitVector->ResetInitVector();
-}
+ { return _CryptoResetInitVector->ResetInitVector(); }
+
#endif
+
STDMETHODIMP CFilterCoder::SetDecoderProperties2(const Byte *data, UInt32 size)
-{
- return _setDecoderProperties->SetDecoderProperties2(data, size);
-}
+ { return _SetDecoderProperties2->SetDecoderProperties2(data, size); }
diff --git a/3rdparty/lzma/CPP/7zip/Common/FilterCoder.h b/3rdparty/lzma/CPP/7zip/Common/FilterCoder.h
index 8132a6dd74e..224ff2ca459 100644
--- a/3rdparty/lzma/CPP/7zip/Common/FilterCoder.h
+++ b/3rdparty/lzma/CPP/7zip/Common/FilterCoder.h
@@ -3,102 +3,212 @@
#ifndef __FILTER_CODER_H
#define __FILTER_CODER_H
+#include "../../../C/Alloc.h"
+
#include "../../Common/MyCom.h"
#include "../ICoder.h"
+
+#ifndef _NO_CRYPTO
#include "../IPassword.h"
+#endif
+
+#define MY_QUERYINTERFACE_ENTRY_AG(i, sub0, sub) else if (iid == IID_ ## i) \
+ { if (!sub) RINOK(sub0->QueryInterface(IID_ ## i, (void **)&sub)) \
+ *outObject = (void *)(i *)this; }
+
+
+struct CAlignedMidBuffer
+{
+ #ifdef _WIN32
-#define MY_QUERYINTERFACE_ENTRY_AG(i, sub0, sub) if (iid == IID_ ## i) \
-{ if (!sub) RINOK(sub0->QueryInterface(IID_ ## i, (void **)&sub)) \
-*outObject = (void *)(i *)this; AddRef(); return S_OK; }
+ Byte *_buf;
+
+ CAlignedMidBuffer(): _buf(NULL) {}
+ ~CAlignedMidBuffer() { ::MidFree(_buf); }
+
+ void AllocAlignedMask(size_t size, size_t)
+ {
+ ::MidFree(_buf);
+ _buf = (Byte *)::MidAlloc(size);
+ }
+
+ #else
+
+ Byte *_bufBase;
+ Byte *_buf;
+
+ CAlignedMidBuffer(): _bufBase(NULL), _buf(NULL) {}
+ ~CAlignedMidBuffer() { ::MidFree(_bufBase); }
+
+ void AllocAlignedMask(size_t size, size_t alignMask)
+ {
+ ::MidFree(_bufBase);
+ _buf = NULL;
+ _bufBase = (Byte *)::MidAlloc(size + alignMask);
+
+ if (_bufBase)
+ {
+ // _buf = (Byte *)(((uintptr_t)_bufBase + alignMask) & ~(uintptr_t)alignMask);
+ _buf = (Byte *)(((ptrdiff_t)_bufBase + alignMask) & ~(ptrdiff_t)alignMask);
+ }
+ }
+
+ #endif
+};
class CFilterCoder:
public ICompressCoder,
+
+ public ICompressSetOutStreamSize,
+ public ICompressInitEncoder,
+
public ICompressSetInStream,
public ISequentialInStream,
+
public ICompressSetOutStream,
public ISequentialOutStream,
- public IOutStreamFlush,
+ public IOutStreamFinish,
+
+ public ICompressSetBufSize,
#ifndef _NO_CRYPTO
public ICryptoSetPassword,
+ public ICryptoProperties,
#endif
+
#ifndef EXTRACT_ONLY
public ICompressSetCoderProperties,
public ICompressWriteCoderProperties,
// public ICryptoResetSalt,
public ICryptoResetInitVector,
#endif
+
public ICompressSetDecoderProperties2,
- public CMyUnknownImp
+ public CMyUnknownImp,
+ public CAlignedMidBuffer
{
-protected:
- Byte *_buffer;
- CMyComPtr<ISequentialInStream> _inStream;
- CMyComPtr<ISequentialOutStream> _outStream;
- UInt32 _bufferPos;
- UInt32 _convertedPosBegin;
- UInt32 _convertedPosEnd;
+ UInt32 _bufSize;
+ UInt32 _inBufSize;
+ UInt32 _outBufSize;
+
+ bool _encodeMode;
bool _outSizeIsDefined;
UInt64 _outSize;
UInt64 _nowPos64;
- HRESULT Init()
+ CMyComPtr<ISequentialInStream> _inStream;
+ CMyComPtr<ISequentialOutStream> _outStream;
+ UInt32 _bufPos;
+ UInt32 _convPos; // current pos in buffer for converted data
+ UInt32 _convSize; // size of converted data starting from _convPos
+
+ void InitSpecVars()
{
- _nowPos64 = 0;
+ _bufPos = 0;
+ _convPos = 0;
+ _convSize = 0;
+
_outSizeIsDefined = false;
- return Filter->Init();
+ _outSize = 0;
+ _nowPos64 = 0;
}
- CMyComPtr<ICryptoSetPassword> _setPassword;
+ HRESULT Alloc();
+ HRESULT Init_and_Alloc();
+ HRESULT Flush2();
+
+ #ifndef _NO_CRYPTO
+ CMyComPtr<ICryptoSetPassword> _SetPassword;
+ CMyComPtr<ICryptoProperties> _CryptoProperties;
+ #endif
+
#ifndef EXTRACT_ONLY
CMyComPtr<ICompressSetCoderProperties> _SetCoderProperties;
- CMyComPtr<ICompressWriteCoderProperties> _writeCoderProperties;
+ CMyComPtr<ICompressWriteCoderProperties> _WriteCoderProperties;
// CMyComPtr<ICryptoResetSalt> _CryptoResetSalt;
CMyComPtr<ICryptoResetInitVector> _CryptoResetInitVector;
#endif
- CMyComPtr<ICompressSetDecoderProperties2> _setDecoderProperties;
+
+ CMyComPtr<ICompressSetDecoderProperties2> _SetDecoderProperties2;
+
public:
CMyComPtr<ICompressFilter> Filter;
- CFilterCoder();
+ CFilterCoder(bool encodeMode);
~CFilterCoder();
- HRESULT WriteWithLimit(ISequentialOutStream *outStream, UInt32 size);
-public:
+ class C_InStream_Releaser
+ {
+ public:
+ CFilterCoder *FilterCoder;
+ C_InStream_Releaser(): FilterCoder(NULL) {}
+ ~C_InStream_Releaser() { if (FilterCoder) FilterCoder->ReleaseInStream(); }
+ };
+
+ class C_OutStream_Releaser
+ {
+ public:
+ CFilterCoder *FilterCoder;
+ C_OutStream_Releaser(): FilterCoder(NULL) {}
+ ~C_OutStream_Releaser() { if (FilterCoder) FilterCoder->ReleaseOutStream(); }
+ };
+
MY_QUERYINTERFACE_BEGIN2(ICompressCoder)
+
+ MY_QUERYINTERFACE_ENTRY(ICompressSetOutStreamSize)
+ MY_QUERYINTERFACE_ENTRY(ICompressInitEncoder)
+
MY_QUERYINTERFACE_ENTRY(ICompressSetInStream)
MY_QUERYINTERFACE_ENTRY(ISequentialInStream)
+
MY_QUERYINTERFACE_ENTRY(ICompressSetOutStream)
MY_QUERYINTERFACE_ENTRY(ISequentialOutStream)
- MY_QUERYINTERFACE_ENTRY(IOutStreamFlush)
+ MY_QUERYINTERFACE_ENTRY(IOutStreamFinish)
+
+ MY_QUERYINTERFACE_ENTRY(ICompressSetBufSize)
#ifndef _NO_CRYPTO
- MY_QUERYINTERFACE_ENTRY_AG(ICryptoSetPassword, Filter, _setPassword)
+ MY_QUERYINTERFACE_ENTRY_AG(ICryptoSetPassword, Filter, _SetPassword)
+ MY_QUERYINTERFACE_ENTRY_AG(ICryptoProperties, Filter, _CryptoProperties)
#endif
#ifndef EXTRACT_ONLY
MY_QUERYINTERFACE_ENTRY_AG(ICompressSetCoderProperties, Filter, _SetCoderProperties)
- MY_QUERYINTERFACE_ENTRY_AG(ICompressWriteCoderProperties, Filter, _writeCoderProperties)
+ MY_QUERYINTERFACE_ENTRY_AG(ICompressWriteCoderProperties, Filter, _WriteCoderProperties)
// MY_QUERYINTERFACE_ENTRY_AG(ICryptoResetSalt, Filter, _CryptoResetSalt)
MY_QUERYINTERFACE_ENTRY_AG(ICryptoResetInitVector, Filter, _CryptoResetInitVector)
#endif
- MY_QUERYINTERFACE_ENTRY_AG(ICompressSetDecoderProperties2, Filter, _setDecoderProperties)
+ MY_QUERYINTERFACE_ENTRY_AG(ICompressSetDecoderProperties2, Filter, _SetDecoderProperties2)
MY_QUERYINTERFACE_END
MY_ADDREF_RELEASE
+
+
STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
- STDMETHOD(ReleaseInStream)();
+
+ STDMETHOD(SetOutStreamSize)(const UInt64 *outSize);
+ STDMETHOD(InitEncoder)();
+
STDMETHOD(SetInStream)(ISequentialInStream *inStream);
- STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); \
+ STDMETHOD(ReleaseInStream)();
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+
STDMETHOD(SetOutStream)(ISequentialOutStream *outStream);
STDMETHOD(ReleaseOutStream)();
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
- STDMETHOD(Flush)();
+ STDMETHOD(OutStreamFinish)();
+
+ STDMETHOD(SetInBufSize)(UInt32 streamIndex, UInt32 size);
+ STDMETHOD(SetOutBufSize)(UInt32 streamIndex, UInt32 size);
#ifndef _NO_CRYPTO
STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size);
+
+ STDMETHOD(SetKey)(const Byte *data, UInt32 size);
+ STDMETHOD(SetInitVector)(const Byte *data, UInt32 size);
#endif
+
#ifndef EXTRACT_ONLY
STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
const PROPVARIANT *properties, UInt32 numProperties);
@@ -106,23 +216,11 @@ public:
// STDMETHOD(ResetSalt)();
STDMETHOD(ResetInitVector)();
#endif
+
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
-};
-class CInStreamReleaser
-{
-public:
- CFilterCoder *FilterCoder;
- CInStreamReleaser(): FilterCoder(0) {}
- ~CInStreamReleaser() { if (FilterCoder) FilterCoder->ReleaseInStream(); }
-};
-
-class COutStreamReleaser
-{
-public:
- CFilterCoder *FilterCoder;
- COutStreamReleaser(): FilterCoder(0) {}
- ~COutStreamReleaser() { if (FilterCoder) FilterCoder->ReleaseOutStream(); }
+
+ HRESULT Init_NoSubFilterInit();
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/InBuffer.cpp b/3rdparty/lzma/CPP/7zip/Common/InBuffer.cpp
index ad4f8825e9e..133d95b3885 100644
--- a/3rdparty/lzma/CPP/7zip/Common/InBuffer.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/InBuffer.cpp
@@ -6,50 +6,49 @@
#include "InBuffer.h"
-CInBuffer::CInBuffer():
- _buffer(0),
- _bufferLimit(0),
- _bufferBase(0),
+CInBufferBase::CInBufferBase() throw():
+ _buf(0),
+ _bufLim(0),
+ _bufBase(0),
_stream(0),
- _bufferSize(0)
+ _processedSize(0),
+ _bufSize(0),
+ _wasFinished(false),
+ NumExtraBytes(0)
{}
-bool CInBuffer::Create(UInt32 bufferSize)
+bool CInBuffer::Create(size_t bufSize) throw()
{
- const UInt32 kMinBlockSize = 1;
- if (bufferSize < kMinBlockSize)
- bufferSize = kMinBlockSize;
- if (_bufferBase != 0 && _bufferSize == bufferSize)
+ const unsigned kMinBlockSize = 1;
+ if (bufSize < kMinBlockSize)
+ bufSize = kMinBlockSize;
+ if (_bufBase != 0 && _bufSize == bufSize)
return true;
Free();
- _bufferSize = bufferSize;
- _bufferBase = (Byte *)::MidAlloc(bufferSize);
- return (_bufferBase != 0);
+ _bufSize = bufSize;
+ _bufBase = (Byte *)::MidAlloc(bufSize);
+ return (_bufBase != 0);
}
-void CInBuffer::Free()
+void CInBuffer::Free() throw()
{
- ::MidFree(_bufferBase);
- _bufferBase = 0;
+ ::MidFree(_bufBase);
+ _bufBase = 0;
}
-void CInBuffer::SetStream(ISequentialInStream *stream)
-{
- _stream = stream;
-}
-
-void CInBuffer::Init()
+void CInBufferBase::Init() throw()
{
_processedSize = 0;
- _buffer = _bufferBase;
- _bufferLimit = _buffer;
+ _buf = _bufBase;
+ _bufLim = _buf;
_wasFinished = false;
#ifdef _NO_EXCEPTIONS
ErrorCode = S_OK;
#endif
+ NumExtraBytes = 0;
}
-bool CInBuffer::ReadBlock()
+bool CInBufferBase::ReadBlock()
{
#ifdef _NO_EXCEPTIONS
if (ErrorCode != S_OK)
@@ -57,27 +56,80 @@ bool CInBuffer::ReadBlock()
#endif
if (_wasFinished)
return false;
- _processedSize += (_buffer - _bufferBase);
- UInt32 numProcessedBytes;
- HRESULT result = _stream->Read(_bufferBase, _bufferSize, &numProcessedBytes);
+ _processedSize += (_buf - _bufBase);
+ _buf = _bufBase;
+ _bufLim = _bufBase;
+ UInt32 processed;
+ // FIX_ME: we can improve it to support (_bufSize >= (1 << 32))
+ HRESULT result = _stream->Read(_bufBase, (UInt32)_bufSize, &processed);
#ifdef _NO_EXCEPTIONS
ErrorCode = result;
#else
if (result != S_OK)
throw CInBufferException(result);
#endif
- _buffer = _bufferBase;
- _bufferLimit = _buffer + numProcessedBytes;
- _wasFinished = (numProcessedBytes == 0);
- return (!_wasFinished);
+ _bufLim = _buf + processed;
+ _wasFinished = (processed == 0);
+ return !_wasFinished;
}
-Byte CInBuffer::ReadBlock2()
+bool CInBufferBase::ReadByte_FromNewBlock(Byte &b)
{
if (!ReadBlock())
{
- _processedSize++;
+ NumExtraBytes++;
+ b = 0xFF;
+ return false;
+ }
+ b = *_buf++;
+ return true;
+}
+
+Byte CInBufferBase::ReadByte_FromNewBlock()
+{
+ if (!ReadBlock())
+ {
+ NumExtraBytes++;
return 0xFF;
}
- return *_buffer++;
+ return *_buf++;
+}
+
+size_t CInBufferBase::ReadBytes(Byte *buf, size_t size)
+{
+ if ((size_t)(_bufLim - _buf) >= size)
+ {
+ const Byte *src = _buf;
+ for (size_t i = 0; i < size; i++)
+ buf[i] = src[i];
+ _buf += size;
+ return size;
+ }
+ for (size_t i = 0; i < size; i++)
+ {
+ if (_buf >= _bufLim)
+ if (!ReadBlock())
+ return i;
+ buf[i] = *_buf++;
+ }
+ return size;
+}
+
+size_t CInBufferBase::Skip(size_t size)
+{
+ size_t processed = 0;
+ for (;;)
+ {
+ size_t rem = (_bufLim - _buf);
+ if (rem >= size)
+ {
+ _buf += size;
+ return processed + size;
+ }
+ _buf += rem;
+ processed += rem;
+ size -= rem;
+ if (!ReadBlock())
+ return processed;
+ }
}
diff --git a/3rdparty/lzma/CPP/7zip/Common/InBuffer.h b/3rdparty/lzma/CPP/7zip/Common/InBuffer.h
index 75625bfd936..4b8662bb9d5 100644
--- a/3rdparty/lzma/CPP/7zip/Common/InBuffer.h
+++ b/3rdparty/lzma/CPP/7zip/Common/InBuffer.h
@@ -1,11 +1,10 @@
// InBuffer.h
-#ifndef __INBUFFER_H
-#define __INBUFFER_H
+#ifndef __IN_BUFFER_H
+#define __IN_BUFFER_H
-#include "../IStream.h"
-#include "../../Common/MyCom.h"
#include "../../Common/MyException.h"
+#include "../IStream.h"
#ifndef _NO_EXCEPTIONS
struct CInBufferException: public CSystemException
@@ -14,68 +13,78 @@ struct CInBufferException: public CSystemException
};
#endif
-class CInBuffer
+class CInBufferBase
{
- Byte *_buffer;
- Byte *_bufferLimit;
- Byte *_bufferBase;
- CMyComPtr<ISequentialInStream> _stream;
+protected:
+ Byte *_buf;
+ Byte *_bufLim;
+ Byte *_bufBase;
+
+ ISequentialInStream *_stream;
UInt64 _processedSize;
- UInt32 _bufferSize;
+ size_t _bufSize; // actually it's number of Bytes for next read. The buf can be larger
+ // only up to 32-bits values now are supported!
bool _wasFinished;
bool ReadBlock();
- Byte ReadBlock2();
+ bool ReadByte_FromNewBlock(Byte &b);
+ Byte ReadByte_FromNewBlock();
public:
#ifdef _NO_EXCEPTIONS
HRESULT ErrorCode;
#endif
+ UInt32 NumExtraBytes;
- CInBuffer();
- ~CInBuffer() { Free(); }
+ CInBufferBase() throw();
+
+ UInt64 GetStreamSize() const { return _processedSize + (_buf - _bufBase); }
+ UInt64 GetProcessedSize() const { return _processedSize + NumExtraBytes + (_buf - _bufBase); }
+ bool WasFinished() const { return _wasFinished; }
- bool Create(UInt32 bufferSize);
- void Free();
+ void SetStream(ISequentialInStream *stream) { _stream = stream; }
- void SetStream(ISequentialInStream *stream);
- void Init();
- void ReleaseStream() { _stream.Release(); }
+ void SetBuf(Byte *buf, size_t bufSize, size_t end, size_t pos)
+ {
+ _bufBase = buf;
+ _bufSize = bufSize;
+ _processedSize = 0;
+ _buf = buf + pos;
+ _bufLim = buf + end;
+ _wasFinished = false;
+ #ifdef _NO_EXCEPTIONS
+ ErrorCode = S_OK;
+ #endif
+ NumExtraBytes = 0;
+ }
+
+ void Init() throw();
bool ReadByte(Byte &b)
{
- if (_buffer >= _bufferLimit)
- if (!ReadBlock())
- return false;
- b = *_buffer++;
+ if (_buf >= _bufLim)
+ return ReadByte_FromNewBlock(b);
+ b = *_buf++;
return true;
}
+
Byte ReadByte()
{
- if (_buffer >= _bufferLimit)
- return ReadBlock2();
- return *_buffer++;
+ if (_buf >= _bufLim)
+ return ReadByte_FromNewBlock();
+ return *_buf++;
}
- UInt32 ReadBytes(Byte *buf, UInt32 size)
- {
- if ((UInt32)(_bufferLimit - _buffer) >= size)
- {
- for (UInt32 i = 0; i < size; i++)
- buf[i] = _buffer[i];
- _buffer += size;
- return size;
- }
- for (UInt32 i = 0; i < size; i++)
- {
- if (_buffer >= _bufferLimit)
- if (!ReadBlock())
- return i;
- buf[i] = *_buffer++;
- }
- return size;
- }
- UInt64 GetProcessedSize() const { return _processedSize + (_buffer - _bufferBase); }
- bool WasFinished() const { return _wasFinished; }
+
+ size_t ReadBytes(Byte *buf, size_t size);
+ size_t Skip(size_t size);
+};
+
+class CInBuffer: public CInBufferBase
+{
+public:
+ ~CInBuffer() { Free(); }
+ bool Create(size_t bufSize) throw(); // only up to 32-bits values now are supported!
+ void Free() throw();
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/InOutTempBuffer.cpp b/3rdparty/lzma/CPP/7zip/Common/InOutTempBuffer.cpp
index 442374dab79..85d6a1aa921 100644
--- a/3rdparty/lzma/CPP/7zip/Common/InOutTempBuffer.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/InOutTempBuffer.cpp
@@ -4,14 +4,16 @@
#include "../../../C/7zCrc.h"
+#include "../../Common/Defs.h"
+
#include "InOutTempBuffer.h"
#include "StreamUtils.h"
using namespace NWindows;
using namespace NFile;
-using namespace NDirectory;
+using namespace NDir;
-static const UInt32 kTempBufSize = (1 << 20);
+static const size_t kTempBufSize = (1 << 20);
static CFSTR kTempFilePrefixString = FTEXT("7zt");
@@ -56,15 +58,19 @@ bool CInOutTempBuffer::WriteToFile(const void *data, UInt32 size)
bool CInOutTempBuffer::Write(const void *data, UInt32 size)
{
- if (_bufPos < kTempBufSize)
+ if (size == 0)
+ return true;
+ size_t cur = kTempBufSize - _bufPos;
+ if (cur != 0)
{
- UInt32 cur = MyMin(kTempBufSize - _bufPos, size);
+ if (cur > size)
+ cur = size;
memcpy(_buf + _bufPos, data, cur);
_crc = CrcUpdate(_crc, data, cur);
_bufPos += cur;
- size -= cur;
- data = ((const Byte *)data) + cur;
_size += cur;
+ size -= (UInt32)cur;
+ data = ((const Byte *)data) + cur;
}
return WriteToFile(data, size);
}
@@ -77,12 +83,13 @@ HRESULT CInOutTempBuffer::WriteToStream(ISequentialOutStream *stream)
UInt64 size = 0;
UInt32 crc = CRC_INIT_VAL;
- if (_bufPos > 0)
+ if (_bufPos != 0)
{
RINOK(WriteStream(stream, _buf, _bufPos));
crc = CrcUpdate(crc, _buf, _bufPos);
size += _bufPos;
}
+
if (_tempFileCreated)
{
NIO::CInFile inFile;
@@ -100,18 +107,21 @@ HRESULT CInOutTempBuffer::WriteToStream(ISequentialOutStream *stream)
size += processed;
}
}
+
return (_crc == crc && size == _size) ? S_OK : E_FAIL;
}
+/*
STDMETHODIMP CSequentialOutTempBufferImp::Write(const void *data, UInt32 size, UInt32 *processed)
{
if (!_buf->Write(data, size))
{
- if (processed != NULL)
+ if (processed)
*processed = 0;
return E_FAIL;
}
- if (processed != NULL)
+ if (processed)
*processed = size;
return S_OK;
}
+*/
diff --git a/3rdparty/lzma/CPP/7zip/Common/InOutTempBuffer.h b/3rdparty/lzma/CPP/7zip/Common/InOutTempBuffer.h
index bdf937ded81..204a105f1de 100644
--- a/3rdparty/lzma/CPP/7zip/Common/InOutTempBuffer.h
+++ b/3rdparty/lzma/CPP/7zip/Common/InOutTempBuffer.h
@@ -10,13 +10,13 @@
class CInOutTempBuffer
{
- NWindows::NFile::NDirectory::CTempFile _tempFile;
+ NWindows::NFile::NDir::CTempFile _tempFile;
NWindows::NFile::NIO::COutFile _outFile;
Byte *_buf;
- UInt32 _bufPos;
- bool _tempFileCreated;
+ size_t _bufPos;
UInt64 _size;
UInt32 _crc;
+ bool _tempFileCreated;
bool WriteToFile(const void *data, UInt32 size);
public:
@@ -31,6 +31,7 @@ public:
UInt64 GetDataSize() const { return _size; }
};
+/*
class CSequentialOutTempBufferImp:
public ISequentialOutStream,
public CMyUnknownImp
@@ -42,5 +43,6 @@ public:
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
};
+*/
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/LimitedStreams.cpp b/3rdparty/lzma/CPP/7zip/Common/LimitedStreams.cpp
index 1837e32012a..c7962167ffc 100644
--- a/3rdparty/lzma/CPP/7zip/Common/LimitedStreams.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/LimitedStreams.cpp
@@ -2,6 +2,8 @@
#include "StdAfx.h"
+#include <string.h>
+
#include "LimitedStreams.h"
#include "../../Common/Defs.h"
@@ -17,17 +19,21 @@ STDMETHODIMP CLimitedSequentialInStream::Read(void *data, UInt32 size, UInt32 *p
if (realProcessedSize == 0)
_wasFinished = true;
}
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = realProcessedSize;
return result;
}
STDMETHODIMP CLimitedInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
{
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
if (_virtPos >= _size)
- return (_virtPos == _size) ? S_OK: E_FAIL;
+ {
+ // 9.31: Fixed. Windows doesn't return error in ReadFile and IStream->Read in that case.
+ return S_OK;
+ // return (_virtPos == _size) ? S_OK: E_FAIL; // ERROR_HANDLE_EOF
+ }
UInt64 rem = _size - _virtPos;
if (rem < size)
size = (UInt32)rem;
@@ -38,7 +44,7 @@ STDMETHODIMP CLimitedInStream::Read(void *data, UInt32 size, UInt32 *processedSi
RINOK(SeekToPhys());
}
HRESULT res = _stream->Read(data, size, &size);
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = size;
_physPos += size;
_virtPos += size;
@@ -47,48 +53,71 @@ STDMETHODIMP CLimitedInStream::Read(void *data, UInt32 size, UInt32 *processedSi
STDMETHODIMP CLimitedInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
{
- switch(seekOrigin)
+ switch (seekOrigin)
{
- case STREAM_SEEK_SET: _virtPos = offset; break;
- case STREAM_SEEK_CUR: _virtPos += offset; break;
- case STREAM_SEEK_END: _virtPos = _size + offset; break;
+ case STREAM_SEEK_SET: break;
+ case STREAM_SEEK_CUR: offset += _virtPos; break;
+ case STREAM_SEEK_END: offset += _size; break;
default: return STG_E_INVALIDFUNCTION;
}
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _virtPos = offset;
if (newPosition)
*newPosition = _virtPos;
return S_OK;
}
+HRESULT CreateLimitedInStream(IInStream *inStream, UInt64 pos, UInt64 size, ISequentialInStream **resStream)
+{
+ *resStream = 0;
+ CLimitedInStream *streamSpec = new CLimitedInStream;
+ CMyComPtr<ISequentialInStream> streamTemp = streamSpec;
+ streamSpec->SetStream(inStream);
+ RINOK(streamSpec->InitAndSeek(pos, size));
+ streamSpec->SeekToStart();
+ *resStream = streamTemp.Detach();
+ return S_OK;
+}
+
STDMETHODIMP CClusterInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
{
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
if (_virtPos >= Size)
- return (_virtPos == Size) ? S_OK: E_FAIL;
+ return S_OK;
+ {
+ UInt64 rem = Size - _virtPos;
+ if (size > rem)
+ size = (UInt32)rem;
+ }
+ if (size == 0)
+ return S_OK;
if (_curRem == 0)
{
- UInt32 blockSize = (UInt32)1 << BlockSizeLog;
- UInt32 virtBlock = (UInt32)(_virtPos >> BlockSizeLog);
- UInt32 offsetInBlock = (UInt32)_virtPos & (blockSize - 1);
- UInt32 phyBlock = Vector[virtBlock];
+ const UInt32 blockSize = (UInt32)1 << BlockSizeLog;
+ const UInt32 virtBlock = (UInt32)(_virtPos >> BlockSizeLog);
+ const UInt32 offsetInBlock = (UInt32)_virtPos & (blockSize - 1);
+ const UInt32 phyBlock = Vector[virtBlock];
+
UInt64 newPos = StartOffset + ((UInt64)phyBlock << BlockSizeLog) + offsetInBlock;
if (newPos != _physPos)
{
_physPos = newPos;
RINOK(SeekToPhys());
}
+
_curRem = blockSize - offsetInBlock;
+
for (int i = 1; i < 64 && (virtBlock + i) < (UInt32)Vector.Size() && phyBlock + i == Vector[virtBlock + i]; i++)
_curRem += (UInt32)1 << BlockSizeLog;
- UInt64 rem = Size - _virtPos;
- if (_curRem > rem)
- _curRem = (UInt32)rem;
}
+
if (size > _curRem)
size = _curRem;
HRESULT res = Stream->Read(data, size, &size);
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = size;
_physPos += size;
_virtPos += size;
@@ -98,39 +127,88 @@ STDMETHODIMP CClusterInStream::Read(void *data, UInt32 size, UInt32 *processedSi
STDMETHODIMP CClusterInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
{
- UInt64 newVirtPos = offset;
- switch(seekOrigin)
+ switch (seekOrigin)
{
case STREAM_SEEK_SET: break;
- case STREAM_SEEK_CUR: newVirtPos += _virtPos; break;
- case STREAM_SEEK_END: newVirtPos += Size; break;
+ case STREAM_SEEK_CUR: offset += _virtPos; break;
+ case STREAM_SEEK_END: offset += Size; break;
default: return STG_E_INVALIDFUNCTION;
}
- if (_virtPos != newVirtPos)
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ if (_virtPos != (UInt64)offset)
_curRem = 0;
- _virtPos = newVirtPos;
+ _virtPos = offset;
if (newPosition)
- *newPosition = newVirtPos;
+ *newPosition = offset;
return S_OK;
}
-HRESULT CreateLimitedInStream(IInStream *inStream, UInt64 pos, UInt64 size, ISequentialInStream **resStream)
+STDMETHODIMP CExtentsStream::Read(void *data, UInt32 size, UInt32 *processedSize)
{
- *resStream = 0;
- CLimitedInStream *streamSpec = new CLimitedInStream;
- CMyComPtr<ISequentialInStream> streamTemp = streamSpec;
- streamSpec->SetStream(inStream);
- RINOK(streamSpec->InitAndSeek(pos, size));
- streamSpec->SeekToStart();
- *resStream = streamTemp.Detach();
+ if (processedSize)
+ *processedSize = 0;
+ if (_virtPos >= Extents.Back().Virt)
+ return S_OK;
+ if (size == 0)
+ return S_OK;
+
+ unsigned left = 0, right = Extents.Size() - 1;
+ for (;;)
+ {
+ unsigned mid = (left + right) / 2;
+ if (mid == left)
+ break;
+ if (_virtPos < Extents[mid].Virt)
+ right = mid;
+ else
+ left = mid;
+ }
+
+ const CSeekExtent &extent = Extents[left];
+ UInt64 phyPos = extent.Phy + (_virtPos - extent.Virt);
+ if (_needStartSeek || _phyPos != phyPos)
+ {
+ _needStartSeek = false;
+ _phyPos = phyPos;
+ RINOK(SeekToPhys());
+ }
+
+ UInt64 rem = Extents[left + 1].Virt - _virtPos;
+ if (size > rem)
+ size = (UInt32)rem;
+
+ HRESULT res = Stream->Read(data, size, &size);
+ _phyPos += size;
+ _virtPos += size;
+ if (processedSize)
+ *processedSize = size;
+ return res;
+}
+
+STDMETHODIMP CExtentsStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
+{
+ switch (seekOrigin)
+ {
+ case STREAM_SEEK_SET: break;
+ case STREAM_SEEK_CUR: offset += _virtPos; break;
+ case STREAM_SEEK_END: offset += Extents.Back().Virt; break;
+ default: return STG_E_INVALIDFUNCTION;
+ }
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _virtPos = offset;
+ if (newPosition)
+ *newPosition = _virtPos;
return S_OK;
}
+
STDMETHODIMP CLimitedSequentialOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
{
HRESULT result = S_OK;
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = 0;
if (size > _size)
{
@@ -139,7 +217,7 @@ STDMETHODIMP CLimitedSequentialOutStream::Write(const void *data, UInt32 size, U
_overflow = true;
if (!_overflowIsAllowed)
return E_FAIL;
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = size;
return S_OK;
}
@@ -148,7 +226,137 @@ STDMETHODIMP CLimitedSequentialOutStream::Write(const void *data, UInt32 size, U
if (_stream)
result = _stream->Write(data, size, &size);
_size -= size;
- if (processedSize != NULL)
+ if (processedSize)
*processedSize = size;
return result;
}
+
+
+STDMETHODIMP CTailInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
+{
+ UInt32 cur;
+ HRESULT res = Stream->Read(data, size, &cur);
+ if (processedSize)
+ *processedSize = cur;
+ _virtPos += cur;
+ return res;
+}
+
+STDMETHODIMP CTailInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
+{
+ switch (seekOrigin)
+ {
+ case STREAM_SEEK_SET: break;
+ case STREAM_SEEK_CUR: offset += _virtPos; break;
+ case STREAM_SEEK_END:
+ {
+ UInt64 pos = 0;
+ RINOK(Stream->Seek(offset, STREAM_SEEK_END, &pos));
+ if (pos < Offset)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _virtPos = pos - Offset;
+ if (newPosition)
+ *newPosition = _virtPos;
+ return S_OK;
+ }
+ default: return STG_E_INVALIDFUNCTION;
+ }
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _virtPos = offset;
+ if (newPosition)
+ *newPosition = _virtPos;
+ return Stream->Seek(Offset + _virtPos, STREAM_SEEK_SET, NULL);
+}
+
+STDMETHODIMP CLimitedCachedInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
+{
+ if (processedSize)
+ *processedSize = 0;
+ if (_virtPos >= _size)
+ {
+ // 9.31: Fixed. Windows doesn't return error in ReadFile and IStream->Read in that case.
+ return S_OK;
+ // return (_virtPos == _size) ? S_OK: E_FAIL; // ERROR_HANDLE_EOF
+ }
+ UInt64 rem = _size - _virtPos;
+ if (rem < size)
+ size = (UInt32)rem;
+
+ UInt64 newPos = _startOffset + _virtPos;
+ UInt64 offsetInCache = newPos - _cachePhyPos;
+ HRESULT res = S_OK;
+ if (newPos >= _cachePhyPos &&
+ offsetInCache <= _cacheSize &&
+ size <= _cacheSize - (size_t)offsetInCache)
+ {
+ if (size != 0)
+ memcpy(data, _cache + (size_t)offsetInCache, size);
+ }
+ else
+ {
+ if (newPos != _physPos)
+ {
+ _physPos = newPos;
+ RINOK(SeekToPhys());
+ }
+ res = _stream->Read(data, size, &size);
+ _physPos += size;
+ }
+ if (processedSize)
+ *processedSize = size;
+ _virtPos += size;
+ return res;
+}
+
+STDMETHODIMP CLimitedCachedInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
+{
+ switch (seekOrigin)
+ {
+ case STREAM_SEEK_SET: break;
+ case STREAM_SEEK_CUR: offset += _virtPos; break;
+ case STREAM_SEEK_END: offset += _size; break;
+ default: return STG_E_INVALIDFUNCTION;
+ }
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _virtPos = offset;
+ if (newPosition)
+ *newPosition = _virtPos;
+ return S_OK;
+}
+
+STDMETHODIMP CTailOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
+{
+ UInt32 cur;
+ HRESULT res = Stream->Write(data, size, &cur);
+ if (processedSize)
+ *processedSize = cur;
+ _virtPos += cur;
+ if (_virtSize < _virtPos)
+ _virtSize = _virtPos;
+ return res;
+}
+
+STDMETHODIMP CTailOutStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
+{
+ switch (seekOrigin)
+ {
+ case STREAM_SEEK_SET: break;
+ case STREAM_SEEK_CUR: offset += _virtPos; break;
+ case STREAM_SEEK_END: offset += _virtSize; break;
+ default: return STG_E_INVALIDFUNCTION;
+ }
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _virtPos = offset;
+ if (newPosition)
+ *newPosition = _virtPos;
+ return Stream->Seek(Offset + _virtPos, STREAM_SEEK_SET, NULL);
+}
+
+STDMETHODIMP CTailOutStream::SetSize(UInt64 newSize)
+{
+ _virtSize = newSize;
+ return Stream->SetSize(Offset + newSize);
+}
diff --git a/3rdparty/lzma/CPP/7zip/Common/LimitedStreams.h b/3rdparty/lzma/CPP/7zip/Common/LimitedStreams.h
index 2cbe18e4848..b521eeb933c 100644
--- a/3rdparty/lzma/CPP/7zip/Common/LimitedStreams.h
+++ b/3rdparty/lzma/CPP/7zip/Common/LimitedStreams.h
@@ -3,6 +3,7 @@
#ifndef __LIMITED_STREAMS_H
#define __LIMITED_STREAMS_H
+#include "../../Common/MyBuffer.h"
#include "../../Common/MyCom.h"
#include "../../Common/MyVector.h"
#include "../IStream.h"
@@ -25,7 +26,7 @@ public:
_wasFinished = false;
}
- MY_UNKNOWN_IMP
+ MY_UNKNOWN_IMP1(ISequentialInStream)
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
UInt64 GetSize() const { return _pos; }
@@ -54,7 +55,7 @@ public:
return SeekToPhys();
}
- MY_UNKNOWN_IMP1(IInStream)
+ MY_UNKNOWN_IMP2(ISequentialInStream, IInStream)
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
@@ -62,6 +63,8 @@ public:
HRESULT SeekToStart() { return Seek(0, STREAM_SEEK_SET, NULL); }
};
+HRESULT CreateLimitedInStream(IInStream *inStream, UInt64 pos, UInt64 size, ISequentialInStream **resStream);
+
class CClusterInStream:
public IInStream,
public CMyUnknownImp
@@ -70,11 +73,11 @@ class CClusterInStream:
UInt64 _physPos;
UInt32 _curRem;
public:
- CMyComPtr<IInStream> Stream;
- UInt64 StartOffset;
+ unsigned BlockSizeLog;
UInt64 Size;
- int BlockSizeLog;
+ CMyComPtr<IInStream> Stream;
CRecordVector<UInt32> Vector;
+ UInt64 StartOffset;
HRESULT SeekToPhys() { return Stream->Seek(_physPos, STREAM_SEEK_SET, NULL); }
@@ -91,13 +94,44 @@ public:
return S_OK;
}
- MY_UNKNOWN_IMP1(IInStream)
+ MY_UNKNOWN_IMP2(ISequentialInStream, IInStream)
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
};
-HRESULT CreateLimitedInStream(IInStream *inStream, UInt64 pos, UInt64 size, ISequentialInStream **resStream);
+struct CSeekExtent
+{
+ UInt64 Phy;
+ UInt64 Virt;
+};
+
+class CExtentsStream:
+ public IInStream,
+ public CMyUnknownImp
+{
+ UInt64 _phyPos;
+ UInt64 _virtPos;
+ bool _needStartSeek;
+
+ HRESULT SeekToPhys() { return Stream->Seek(_phyPos, STREAM_SEEK_SET, NULL); }
+
+public:
+ CMyComPtr<IInStream> Stream;
+ CRecordVector<CSeekExtent> Extents;
+
+ MY_UNKNOWN_IMP2(ISequentialInStream, IInStream)
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
+ void ReleaseStream() { Stream.Release(); }
+
+ void Init()
+ {
+ _virtPos = 0;
+ _phyPos = 0;
+ _needStartSeek = true;
+ }
+};
class CLimitedSequentialOutStream:
public ISequentialOutStream,
@@ -108,7 +142,7 @@ class CLimitedSequentialOutStream:
bool _overflow;
bool _overflowIsAllowed;
public:
- MY_UNKNOWN_IMP
+ MY_UNKNOWN_IMP1(ISequentialOutStream)
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
void SetStream(ISequentialOutStream *stream) { _stream = stream; }
void ReleaseStream() { _stream.Release(); }
@@ -122,4 +156,96 @@ public:
UInt64 GetRem() const { return _size; }
};
+
+class CTailInStream:
+ public IInStream,
+ public CMyUnknownImp
+{
+ UInt64 _virtPos;
+public:
+ CMyComPtr<IInStream> Stream;
+ UInt64 Offset;
+
+ void Init()
+ {
+ _virtPos = 0;
+ }
+
+ MY_UNKNOWN_IMP2(ISequentialInStream, IInStream)
+
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
+
+ HRESULT SeekToStart() { return Stream->Seek(Offset, STREAM_SEEK_SET, NULL); }
+};
+
+class CLimitedCachedInStream:
+ public IInStream,
+ public CMyUnknownImp
+{
+ CMyComPtr<IInStream> _stream;
+ UInt64 _virtPos;
+ UInt64 _physPos;
+ UInt64 _size;
+ UInt64 _startOffset;
+
+ const Byte *_cache;
+ size_t _cacheSize;
+ size_t _cachePhyPos;
+
+
+ HRESULT SeekToPhys() { return _stream->Seek(_physPos, STREAM_SEEK_SET, NULL); }
+public:
+ CByteBuffer Buffer;
+
+ void SetStream(IInStream *stream) { _stream = stream; }
+ void SetCache(size_t cacheSize, size_t cachePos)
+ {
+ _cache = Buffer;
+ _cacheSize = cacheSize;
+ _cachePhyPos = cachePos;
+ }
+
+ HRESULT InitAndSeek(UInt64 startOffset, UInt64 size)
+ {
+ _startOffset = startOffset;
+ _physPos = startOffset;
+ _virtPos = 0;
+ _size = size;
+ return SeekToPhys();
+ }
+
+ MY_UNKNOWN_IMP2(ISequentialInStream, IInStream)
+
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
+
+ HRESULT SeekToStart() { return Seek(0, STREAM_SEEK_SET, NULL); }
+};
+
+class CTailOutStream:
+ public IOutStream,
+ public CMyUnknownImp
+{
+ UInt64 _virtPos;
+ UInt64 _virtSize;
+public:
+ CMyComPtr<IOutStream> Stream;
+ UInt64 Offset;
+
+ virtual ~CTailOutStream() {}
+
+ MY_UNKNOWN_IMP2(ISequentialOutStream, IOutStream)
+
+ void Init()
+ {
+ _virtPos = 0;
+ _virtSize = 0;
+ }
+
+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
+ STDMETHOD(SetSize)(UInt64 newSize);
+};
+
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/LockedStream.cpp b/3rdparty/lzma/CPP/7zip/Common/LockedStream.cpp
index f05601cb6dc..ca39fb455d6 100644
--- a/3rdparty/lzma/CPP/7zip/Common/LockedStream.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/LockedStream.cpp
@@ -1,23 +1,3 @@
// LockedStream.cpp
#include "StdAfx.h"
-
-#include "LockedStream.h"
-
-HRESULT CLockedInStream::Read(UInt64 startPos, void *data, UInt32 size,
- UInt32 *processedSize)
-{
- NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
- RINOK(_stream->Seek(startPos, STREAM_SEEK_SET, NULL));
- return _stream->Read(data, size, processedSize);
-}
-
-STDMETHODIMP CLockedSequentialInStreamImp::Read(void *data, UInt32 size, UInt32 *processedSize)
-{
- UInt32 realProcessedSize = 0;
- HRESULT result = _lockedInStream->Read(_pos, data, size, &realProcessedSize);
- _pos += realProcessedSize;
- if (processedSize != NULL)
- *processedSize = realProcessedSize;
- return result;
-}
diff --git a/3rdparty/lzma/CPP/7zip/Common/LockedStream.h b/3rdparty/lzma/CPP/7zip/Common/LockedStream.h
index 486e4220bc3..efebf197553 100644
--- a/3rdparty/lzma/CPP/7zip/Common/LockedStream.h
+++ b/3rdparty/lzma/CPP/7zip/Common/LockedStream.h
@@ -1,38 +1,6 @@
// LockedStream.h
-#ifndef __LOCKEDSTREAM_H
-#define __LOCKEDSTREAM_H
-
-#include "../../Windows/Synchronization.h"
-#include "../../Common/MyCom.h"
-#include "../IStream.h"
-
-class CLockedInStream
-{
- CMyComPtr<IInStream> _stream;
- NWindows::NSynchronization::CCriticalSection _criticalSection;
-public:
- void Init(IInStream *stream)
- { _stream = stream; }
- HRESULT Read(UInt64 startPos, void *data, UInt32 size, UInt32 *processedSize);
-};
-
-class CLockedSequentialInStreamImp:
- public ISequentialInStream,
- public CMyUnknownImp
-{
- CLockedInStream *_lockedInStream;
- UInt64 _pos;
-public:
- void Init(CLockedInStream *lockedInStream, UInt64 startPos)
- {
- _lockedInStream = lockedInStream;
- _pos = startPos;
- }
-
- MY_UNKNOWN_IMP
-
- STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
-};
+#ifndef __LOCKED_STREAM_H
+#define __LOCKED_STREAM_H
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/MethodId.h b/3rdparty/lzma/CPP/7zip/Common/MethodId.h
index 54ebc9f7dae..28b615fcd3e 100644
--- a/3rdparty/lzma/CPP/7zip/Common/MethodId.h
+++ b/3rdparty/lzma/CPP/7zip/Common/MethodId.h
@@ -3,7 +3,7 @@
#ifndef __7Z_METHOD_ID_H
#define __7Z_METHOD_ID_H
-#include "../../Common/Types.h"
+#include "../../Common/MyTypes.h"
typedef UInt64 CMethodId;
diff --git a/3rdparty/lzma/CPP/7zip/Common/MethodProps.cpp b/3rdparty/lzma/CPP/7zip/Common/MethodProps.cpp
index e15a3cc827e..a5149ab5bb5 100644
--- a/3rdparty/lzma/CPP/7zip/Common/MethodProps.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/MethodProps.cpp
@@ -10,12 +10,12 @@ using namespace NWindows;
bool StringToBool(const UString &s, bool &res)
{
- if (s.IsEmpty() || s.CompareNoCase(L"ON") == 0 || s.Compare(L"+") == 0)
+ if (s.IsEmpty() || (s[0] == '+' && s[1] == 0) || StringsAreEqualNoCase_Ascii(s, "ON"))
{
res = true;
return true;
}
- if (s.CompareNoCase(L"OFF") == 0 || s.Compare(L"-") == 0)
+ if ((s[0] == '-' && s[1] == 0) || StringsAreEqualNoCase_Ascii(s, "OFF"))
{
res = false;
return true;
@@ -34,18 +34,12 @@ HRESULT PROPVARIANT_to_bool(const PROPVARIANT &prop, bool &dest)
return E_INVALIDARG;
}
-int ParseStringToUInt32(const UString &srcString, UInt32 &number)
+unsigned ParseStringToUInt32(const UString &srcString, UInt32 &number)
{
const wchar_t *start = srcString;
const wchar_t *end;
- UInt64 number64 = ConvertStringToUInt64(start, &end);
- if (number64 > (UInt32)0xFFFFFFFF)
- {
- number = 0;
- return 0;
- }
- number = (UInt32)number64;
- return (int)(end - start);
+ number = ConvertStringToUInt32(start, &end);
+ return (unsigned)(end - start);
}
HRESULT ParsePropToUInt32(const UString &name, const PROPVARIANT &prop, UInt32 &resValue)
@@ -66,7 +60,7 @@ HRESULT ParsePropToUInt32(const UString &name, const PROPVARIANT &prop, UInt32 &
if (name.IsEmpty())
return S_OK;
UInt32 v;
- if (ParseStringToUInt32(name, v) != name.Length())
+ if (ParseStringToUInt32(name, v) != name.Len())
return E_INVALIDARG;
resValue = v;
return S_OK;
@@ -96,61 +90,71 @@ HRESULT ParseMtProp(const UString &name, const PROPVARIANT &prop, UInt32 default
return ParsePropToUInt32(name, prop, numThreads);
}
-static HRESULT StringToDictSize(const UString &srcStringSpec, UInt32 &dicSize)
+
+static HRESULT StringToDictSize(const UString &s, NCOM::CPropVariant &destProp)
{
- UString srcString = srcStringSpec;
- srcString.MakeUpper();
- const wchar_t *start = srcString;
const wchar_t *end;
- UInt64 number = ConvertStringToUInt64(start, &end);
- int numDigits = (int)(end - start);
- if (numDigits == 0 || srcString.Length() > numDigits + 1)
+ UInt32 number = ConvertStringToUInt32(s, &end);
+ unsigned numDigits = (unsigned)(end - s);
+ if (numDigits == 0 || s.Len() > numDigits + 1)
return E_INVALIDARG;
- const unsigned kLogDictSizeLimit = 32;
- if (srcString.Length() == numDigits)
+
+ if (s.Len() == numDigits)
{
- if (number >= kLogDictSizeLimit)
+ if (number >= 64)
return E_INVALIDARG;
- dicSize = (UInt32)1 << (int)number;
+ if (number < 32)
+ destProp = (UInt32)((UInt32)1 << (unsigned)number);
+ else
+ destProp = (UInt64)((UInt64)1 << (unsigned)number);
return S_OK;
}
+
unsigned numBits;
- switch (srcString[numDigits])
+
+ switch (MyCharLower_Ascii(s[numDigits]))
{
- case 'B': numBits = 0; break;
- case 'K': numBits = 10; break;
- case 'M': numBits = 20; break;
- case 'G': numBits = 30; break;
+ case 'b': destProp = number; return S_OK;
+ case 'k': numBits = 10; break;
+ case 'm': numBits = 20; break;
+ case 'g': numBits = 30; break;
default: return E_INVALIDARG;
}
- if (number >= ((UInt64)1 << (kLogDictSizeLimit - numBits)))
- return E_INVALIDARG;
- dicSize = (UInt32)number << numBits;
+
+ if (number < ((UInt32)1 << (32 - numBits)))
+ destProp = (UInt32)(number << numBits);
+ else
+ destProp = (UInt64)((UInt64)number << numBits);
+
return S_OK;
}
-static HRESULT PROPVARIANT_to_DictSize(const PROPVARIANT &prop, UInt32 &resValue)
+
+static HRESULT PROPVARIANT_to_DictSize(const PROPVARIANT &prop, NCOM::CPropVariant &destProp)
{
if (prop.vt == VT_UI4)
{
UInt32 v = prop.ulVal;
- if (v >= 32)
+ if (v >= 64)
return E_INVALIDARG;
- resValue = (UInt32)1 << v;
+ if (v < 32)
+ destProp = (UInt32)((UInt32)1 << (unsigned)v);
+ else
+ destProp = (UInt64)((UInt64)1 << (unsigned)v);
return S_OK;
}
if (prop.vt == VT_BSTR)
- return StringToDictSize(prop.bstrVal, resValue);
+ return StringToDictSize(prop.bstrVal, destProp);
return E_INVALIDARG;
}
+
void CProps::AddProp32(PROPID propid, UInt32 level)
{
- CProp prop;
+ CProp &prop = Props.AddNew();
prop.IsOptional = true;
prop.Id = propid;
prop.Value = (UInt32)level;
- Props.Add(prop);
}
class CCoderProps
@@ -191,7 +195,7 @@ void CCoderProps::AddProp(const CProp &prop)
HRESULT CProps::SetCoderProps(ICompressSetCoderProperties *scp, const UInt64 *dataSizeReduce) const
{
CCoderProps coderProps(Props.Size() + (dataSizeReduce ? 1 : 0));
- for (int i = 0; i < Props.Size(); i++)
+ FOR_VECTOR (i, Props)
coderProps.AddProp(Props[i]);
if (dataSizeReduce)
{
@@ -226,34 +230,34 @@ int CMethodProps::GetLevel() const
struct CNameToPropID
{
VARTYPE VarType;
- const wchar_t *Name;
+ const char *Name;
};
static const CNameToPropID g_NameToPropID[] =
{
- { VT_UI4, L"" },
- { VT_UI4, L"d" },
- { VT_UI4, L"mem" },
- { VT_UI4, L"o" },
- { VT_UI4, L"c" },
- { VT_UI4, L"pb" },
- { VT_UI4, L"lc" },
- { VT_UI4, L"lp" },
- { VT_UI4, L"fb" },
- { VT_BSTR, L"mf" },
- { VT_UI4, L"mc" },
- { VT_UI4, L"pass" },
- { VT_UI4, L"a" },
- { VT_UI4, L"mt" },
- { VT_BOOL, L"eos" },
- { VT_UI4, L"x" },
- { VT_UI4, L"reduceSize" }
+ { VT_UI4, "" },
+ { VT_UI4, "d" },
+ { VT_UI4, "mem" },
+ { VT_UI4, "o" },
+ { VT_UI4, "c" },
+ { VT_UI4, "pb" },
+ { VT_UI4, "lc" },
+ { VT_UI4, "lp" },
+ { VT_UI4, "fb" },
+ { VT_BSTR, "mf" },
+ { VT_UI4, "mc" },
+ { VT_UI4, "pass" },
+ { VT_UI4, "a" },
+ { VT_UI4, "mt" },
+ { VT_BOOL, "eos" },
+ { VT_UI4, "x" },
+ { VT_UI4, "reduceSize" }
};
static int FindPropIdExact(const UString &name)
{
- for (unsigned i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++)
- if (name.CompareNoCase(g_NameToPropID[i].Name) == 0)
+ for (unsigned i = 0; i < ARRAY_SIZE(g_NameToPropID); i++)
+ if (StringsAreEqualNoCase_Ascii(name, g_NameToPropID[i].Name))
return i;
return -1;
}
@@ -285,10 +289,10 @@ static void SplitParams(const UString &srcString, UStringVector &subStrings)
{
subStrings.Clear();
UString s;
- int len = srcString.Length();
+ unsigned len = srcString.Len();
if (len == 0)
return;
- for (int i = 0; i < len; i++)
+ for (unsigned i = 0; i < len; i++)
{
wchar_t c = srcString[i];
if (c == L':')
@@ -307,19 +311,19 @@ static void SplitParam(const UString &param, UString &name, UString &value)
int eqPos = param.Find(L'=');
if (eqPos >= 0)
{
- name = param.Left(eqPos);
- value = param.Mid(eqPos + 1);
+ name.SetFrom(param, eqPos);
+ value = param.Ptr(eqPos + 1);
return;
}
- int i;
- for (i = 0; i < param.Length(); i++)
+ unsigned i;
+ for (i = 0; i < param.Len(); i++)
{
wchar_t c = param[i];
if (c >= L'0' && c <= L'9')
break;
}
- name = param.Left(i);
- value = param.Mid(i);
+ name.SetFrom(param, i);
+ value = param.Ptr(i);
}
static bool IsLogSizeProp(PROPID propid)
@@ -340,15 +344,13 @@ HRESULT CMethodProps::SetParam(const UString &name, const UString &value)
int index = FindPropIdExact(name);
if (index < 0)
return E_INVALIDARG;
- const CNameToPropID &nameToPropID = g_NameToPropID[index];
+ const CNameToPropID &nameToPropID = g_NameToPropID[(unsigned)index];
CProp prop;
prop.Id = index;
if (IsLogSizeProp(prop.Id))
{
- UInt32 dicSize;
- RINOK(StringToDictSize(value, dicSize));
- prop.Value = dicSize;
+ RINOK(StringToDictSize(value, prop.Value));
}
else
{
@@ -365,7 +367,7 @@ HRESULT CMethodProps::SetParam(const UString &name, const UString &value)
else if (!value.IsEmpty())
{
UInt32 number;
- if (ParseStringToUInt32(value, number) == value.Length())
+ if (ParseStringToUInt32(value, number) == value.Len())
propValue = number;
else
propValue = value;
@@ -381,7 +383,7 @@ HRESULT CMethodProps::ParseParamsFromString(const UString &srcString)
{
UStringVector params;
SplitParams(srcString, params);
- for (int i = 0; i < params.Size(); i++)
+ FOR_VECTOR (i, params)
{
const UString &param = params[i];
UString name, value;
@@ -393,7 +395,7 @@ HRESULT CMethodProps::ParseParamsFromString(const UString &srcString)
HRESULT CMethodProps::ParseParamsFromPROPVARIANT(const UString &realName, const PROPVARIANT &value)
{
- if (realName.Length() == 0)
+ if (realName.Len() == 0)
{
// [empty]=method
return E_INVALIDARG;
@@ -410,15 +412,13 @@ HRESULT CMethodProps::ParseParamsFromPROPVARIANT(const UString &realName, const
int index = FindPropIdExact(realName);
if (index < 0)
return E_INVALIDARG;
- const CNameToPropID &nameToPropID = g_NameToPropID[index];
+ const CNameToPropID &nameToPropID = g_NameToPropID[(unsigned)index];
CProp prop;
prop.Id = index;
if (IsLogSizeProp(prop.Id))
{
- UInt32 dicSize;
- RINOK(PROPVARIANT_to_DictSize(value, dicSize));
- prop.Value = dicSize;
+ RINOK(PROPVARIANT_to_DictSize(value, prop.Value));
}
else
{
@@ -429,20 +429,30 @@ HRESULT CMethodProps::ParseParamsFromPROPVARIANT(const UString &realName, const
return S_OK;
}
+HRESULT COneMethodInfo::ParseMethodFromString(const UString &s)
+{
+ MethodName.Empty();
+ int splitPos = s.Find(L':');
+ {
+ UString temp = s;
+ if (splitPos >= 0)
+ temp.DeleteFrom(splitPos);
+ if (!temp.IsAscii())
+ return E_INVALIDARG;
+ MethodName.SetFromWStr_if_Ascii(temp);
+ }
+ if (splitPos < 0)
+ return S_OK;
+ PropsString = s.Ptr(splitPos + 1);
+ return ParseParamsFromString(PropsString);
+}
+
HRESULT COneMethodInfo::ParseMethodFromPROPVARIANT(const UString &realName, const PROPVARIANT &value)
{
- if (!realName.IsEmpty() && realName.CompareNoCase(L"m") != 0)
+ if (!realName.IsEmpty() && !StringsAreEqualNoCase_Ascii(realName, "m"))
return ParseParamsFromPROPVARIANT(realName, value);
// -m{N}=method
if (value.vt != VT_BSTR)
return E_INVALIDARG;
- const UString s = value.bstrVal;
- int splitPos = s.Find(':');
- if (splitPos < 0)
- {
- MethodName = s;
- return S_OK;
- }
- MethodName = s.Left(splitPos);
- return ParseParamsFromString(s.Mid(splitPos + 1));
+ return ParseMethodFromString(value.bstrVal);
}
diff --git a/3rdparty/lzma/CPP/7zip/Common/MethodProps.h b/3rdparty/lzma/CPP/7zip/Common/MethodProps.h
index 0bdddc6b711..765e425df6d 100644
--- a/3rdparty/lzma/CPP/7zip/Common/MethodProps.h
+++ b/3rdparty/lzma/CPP/7zip/Common/MethodProps.h
@@ -11,7 +11,7 @@
bool StringToBool(const UString &s, bool &res);
HRESULT PROPVARIANT_to_bool(const PROPVARIANT &prop, bool &dest);
-int ParseStringToUInt32(const UString &srcString, UInt32 &number);
+unsigned ParseStringToUInt32(const UString &srcString, UInt32 &number);
HRESULT ParsePropToUInt32(const UString &name, const PROPVARIANT &prop, UInt32 &resValue);
HRESULT ParseMtProp(const UString &name, const PROPVARIANT &prop, UInt32 defaultNumThreads, UInt32 &numThreads);
@@ -32,7 +32,7 @@ struct CProps
bool AreThereNonOptionalProps() const
{
- for (int i = 0; i < Props.Size(); i++)
+ FOR_VECTOR (i, Props)
if (!Props[i].IsOptional)
return true;
return false;
@@ -40,13 +40,12 @@ struct CProps
void AddProp32(PROPID propid, UInt32 level);
- void AddPropString(PROPID propid, const wchar_t *s)
+ void AddProp_Ascii(PROPID propid, const char *s)
{
- CProp prop;
+ CProp &prop = Props.AddNew();
prop.IsOptional = true;
prop.Id = propid;
prop.Value = s;
- Props.Add(prop);
}
HRESULT SetCoderProps(ICompressSetCoderProperties *scp, const UInt64 *dataSizeReduce) const;
@@ -100,6 +99,14 @@ public:
return level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26));
}
+ bool Are_Lzma_Model_Props_Defined() const
+ {
+ if (FindProp(NCoderPropID::kPosStateBits) >= 0) return true;
+ if (FindProp(NCoderPropID::kLitContextBits) >= 0) return true;
+ if (FindProp(NCoderPropID::kLitPosBits) >= 0) return true;
+ return false;
+ }
+
UInt32 Get_Lzma_NumThreads(bool &fixedNumber) const
{
fixedNumber = false;
@@ -153,12 +160,12 @@ public:
return level >= 9 ? (192 << 20) : ((UInt32)1 << (level + 19));
}
- void AddLevelProp(UInt32 level)
+ void AddProp_Level(UInt32 level)
{
AddProp32(NCoderPropID::kLevel, level);
}
- void AddNumThreadsProp(UInt32 numThreads)
+ void AddProp_NumThreads(UInt32 numThreads)
{
AddProp32(NCoderPropID::kNumThreads, numThreads);
}
@@ -170,15 +177,18 @@ public:
class COneMethodInfo: public CMethodProps
{
public:
- UString MethodName;
+ AString MethodName;
+ UString PropsString;
void Clear()
{
CMethodProps::Clear();
MethodName.Empty();
+ PropsString.Empty();
}
bool IsEmpty() const { return MethodName.IsEmpty() && Props.IsEmpty(); }
HRESULT ParseMethodFromPROPVARIANT(const UString &realName, const PROPVARIANT &value);
+ HRESULT ParseMethodFromString(const UString &s);
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/OffsetStream.cpp b/3rdparty/lzma/CPP/7zip/Common/OffsetStream.cpp
index c5e4e6da474..368d39b6514 100644
--- a/3rdparty/lzma/CPP/7zip/Common/OffsetStream.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/OffsetStream.cpp
@@ -2,7 +2,8 @@
#include "StdAfx.h"
-#include "Common/Defs.h"
+#include "../../Common/Defs.h"
+
#include "OffsetStream.h"
HRESULT COffsetOutStream::Init(IOutStream *stream, UInt64 offset)
@@ -17,14 +18,17 @@ STDMETHODIMP COffsetOutStream::Write(const void *data, UInt32 size, UInt32 *proc
return _stream->Write(data, size, processedSize);
}
-STDMETHODIMP COffsetOutStream::Seek(Int64 offset, UInt32 seekOrigin,
- UInt64 *newPosition)
+STDMETHODIMP COffsetOutStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
{
UInt64 absoluteNewPosition;
if (seekOrigin == STREAM_SEEK_SET)
+ {
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
offset += _offset;
+ }
HRESULT result = _stream->Seek(offset, seekOrigin, &absoluteNewPosition);
- if (newPosition != NULL)
+ if (newPosition)
*newPosition = absoluteNewPosition - _offset;
return result;
}
diff --git a/3rdparty/lzma/CPP/7zip/Common/OffsetStream.h b/3rdparty/lzma/CPP/7zip/Common/OffsetStream.h
index de9d06dd028..9074a24e031 100644
--- a/3rdparty/lzma/CPP/7zip/Common/OffsetStream.h
+++ b/3rdparty/lzma/CPP/7zip/Common/OffsetStream.h
@@ -1,9 +1,10 @@
// OffsetStream.h
-#ifndef __OFFSETSTREAM_H
-#define __OFFSETSTREAM_H
+#ifndef __OFFSET_STREAM_H
+#define __OFFSET_STREAM_H
+
+#include "../../Common/MyCom.h"
-#include "Common/MyCom.h"
#include "../IStream.h"
class COffsetOutStream:
diff --git a/3rdparty/lzma/CPP/7zip/Common/OutBuffer.cpp b/3rdparty/lzma/CPP/7zip/Common/OutBuffer.cpp
index 2e5debd8335..4ba34a053b1 100644
--- a/3rdparty/lzma/CPP/7zip/Common/OutBuffer.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/OutBuffer.cpp
@@ -6,34 +6,29 @@
#include "OutBuffer.h"
-bool COutBuffer::Create(UInt32 bufferSize)
+bool COutBuffer::Create(UInt32 bufSize) throw()
{
const UInt32 kMinBlockSize = 1;
- if (bufferSize < kMinBlockSize)
- bufferSize = kMinBlockSize;
- if (_buffer != 0 && _bufferSize == bufferSize)
+ if (bufSize < kMinBlockSize)
+ bufSize = kMinBlockSize;
+ if (_buf != 0 && _bufSize == bufSize)
return true;
Free();
- _bufferSize = bufferSize;
- _buffer = (Byte *)::MidAlloc(bufferSize);
- return (_buffer != 0);
+ _bufSize = bufSize;
+ _buf = (Byte *)::MidAlloc(bufSize);
+ return (_buf != 0);
}
-void COutBuffer::Free()
+void COutBuffer::Free() throw()
{
- ::MidFree(_buffer);
- _buffer = 0;
+ ::MidFree(_buf);
+ _buf = 0;
}
-void COutBuffer::SetStream(ISequentialOutStream *stream)
-{
- _stream = stream;
-}
-
-void COutBuffer::Init()
+void COutBuffer::Init() throw()
{
_streamPos = 0;
- _limitPos = _bufferSize;
+ _limitPos = _bufSize;
_pos = 0;
_processedSize = 0;
_overDict = false;
@@ -42,27 +37,27 @@ void COutBuffer::Init()
#endif
}
-UInt64 COutBuffer::GetProcessedSize() const
+UInt64 COutBuffer::GetProcessedSize() const throw()
{
UInt64 res = _processedSize + _pos - _streamPos;
if (_streamPos > _pos)
- res += _bufferSize;
+ res += _bufSize;
return res;
}
-HRESULT COutBuffer::FlushPart()
+HRESULT COutBuffer::FlushPart() throw()
{
- // _streamPos < _bufferSize
- UInt32 size = (_streamPos >= _pos) ? (_bufferSize - _streamPos) : (_pos - _streamPos);
+ // _streamPos < _bufSize
+ UInt32 size = (_streamPos >= _pos) ? (_bufSize - _streamPos) : (_pos - _streamPos);
HRESULT result = S_OK;
#ifdef _NO_EXCEPTIONS
result = ErrorCode;
#endif
- if (_buffer2 != 0)
+ if (_buf2 != 0)
{
- memmove(_buffer2, _buffer + _streamPos, size);
- _buffer2 += size;
+ memcpy(_buf2, _buf + _streamPos, size);
+ _buf2 += size;
}
if (_stream != 0
@@ -72,30 +67,30 @@ HRESULT COutBuffer::FlushPart()
)
{
UInt32 processedSize = 0;
- result = _stream->Write(_buffer + _streamPos, size, &processedSize);
+ result = _stream->Write(_buf + _streamPos, size, &processedSize);
size = processedSize;
}
_streamPos += size;
- if (_streamPos == _bufferSize)
+ if (_streamPos == _bufSize)
_streamPos = 0;
- if (_pos == _bufferSize)
+ if (_pos == _bufSize)
{
_overDict = true;
_pos = 0;
}
- _limitPos = (_streamPos > _pos) ? _streamPos : _bufferSize;
+ _limitPos = (_streamPos > _pos) ? _streamPos : _bufSize;
_processedSize += size;
return result;
}
-HRESULT COutBuffer::Flush()
+HRESULT COutBuffer::Flush() throw()
{
#ifdef _NO_EXCEPTIONS
if (ErrorCode != S_OK)
return ErrorCode;
#endif
- while(_streamPos != _pos)
+ while (_streamPos != _pos)
{
HRESULT result = FlushPart();
if (result != S_OK)
diff --git a/3rdparty/lzma/CPP/7zip/Common/OutBuffer.h b/3rdparty/lzma/CPP/7zip/Common/OutBuffer.h
index 62e77caae46..3bdfb87c592 100644
--- a/3rdparty/lzma/CPP/7zip/Common/OutBuffer.h
+++ b/3rdparty/lzma/CPP/7zip/Common/OutBuffer.h
@@ -1,7 +1,7 @@
// OutBuffer.h
-#ifndef __OUTBUFFER_H
-#define __OUTBUFFER_H
+#ifndef __OUT_BUFFER_H
+#define __OUT_BUFFER_H
#include "../IStream.h"
#include "../../Common/MyCom.h"
@@ -17,39 +17,38 @@ struct COutBufferException: public CSystemException
class COutBuffer
{
protected:
- Byte *_buffer;
+ Byte *_buf;
UInt32 _pos;
UInt32 _limitPos;
UInt32 _streamPos;
- UInt32 _bufferSize;
- CMyComPtr<ISequentialOutStream> _stream;
+ UInt32 _bufSize;
+ ISequentialOutStream *_stream;
UInt64 _processedSize;
- Byte *_buffer2;
+ Byte *_buf2;
bool _overDict;
- HRESULT FlushPart();
+ HRESULT FlushPart() throw();
public:
#ifdef _NO_EXCEPTIONS
HRESULT ErrorCode;
#endif
- COutBuffer(): _buffer(0), _pos(0), _stream(0), _buffer2(0) {}
+ COutBuffer(): _buf(0), _pos(0), _stream(0), _buf2(0) {}
~COutBuffer() { Free(); }
- bool Create(UInt32 bufferSize);
- void Free();
+ bool Create(UInt32 bufSize) throw();
+ void Free() throw();
- void SetMemStream(Byte *buffer) { _buffer2 = buffer; }
- void SetStream(ISequentialOutStream *stream);
- void Init();
- HRESULT Flush();
+ void SetMemStream(Byte *buf) { _buf2 = buf; }
+ void SetStream(ISequentialOutStream *stream) { _stream = stream; }
+ void Init() throw();
+ HRESULT Flush() throw();
void FlushWithCheck();
- void ReleaseStream() { _stream.Release(); }
void WriteByte(Byte b)
{
- _buffer[_pos++] = b;
- if(_pos == _limitPos)
+ _buf[_pos++] = b;
+ if (_pos == _limitPos)
FlushWithCheck();
}
void WriteBytes(const void *data, size_t size)
@@ -58,7 +57,7 @@ public:
WriteByte(((const Byte *)data)[i]);
}
- UInt64 GetProcessedSize() const;
+ UInt64 GetProcessedSize() const throw();
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/ProgressUtils.cpp b/3rdparty/lzma/CPP/7zip/Common/ProgressUtils.cpp
index f24ff6b6fb8..41385ccb1cc 100644
--- a/3rdparty/lzma/CPP/7zip/Common/ProgressUtils.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/ProgressUtils.cpp
@@ -1,14 +1,16 @@
-// ProgressUtils.h
+// ProgressUtils.cpp
#include "StdAfx.h"
#include "ProgressUtils.h"
-CLocalProgress::CLocalProgress()
-{
- ProgressOffset = InSize = OutSize = 0;
- SendRatio = SendProgress = true;
-}
+CLocalProgress::CLocalProgress():
+ ProgressOffset(0),
+ InSize(0),
+ OutSize(0),
+ SendRatio(true),
+ SendProgress(true)
+ {}
void CLocalProgress::Init(IProgress *progress, bool inSizeIsMain)
{
@@ -20,19 +22,26 @@ void CLocalProgress::Init(IProgress *progress, bool inSizeIsMain)
STDMETHODIMP CLocalProgress::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize)
{
- UInt64 inSizeNew = InSize, outSizeNew = OutSize;
+ UInt64 inSize2 = InSize;
+ UInt64 outSize2 = OutSize;
+
if (inSize)
- inSizeNew += (*inSize);
+ inSize2 += (*inSize);
if (outSize)
- outSizeNew += (*outSize);
+ outSize2 += (*outSize);
+
if (SendRatio && _ratioProgress)
{
- RINOK(_ratioProgress->SetRatioInfo(&inSizeNew, &outSizeNew));
+ RINOK(_ratioProgress->SetRatioInfo(&inSize2, &outSize2));
}
- inSizeNew += ProgressOffset;
- outSizeNew += ProgressOffset;
+
if (SendProgress)
- return _progress->SetCompleted(_inSizeIsMain ? &inSizeNew : &outSizeNew);
+ {
+ inSize2 += ProgressOffset;
+ outSize2 += ProgressOffset;
+ return _progress->SetCompleted(_inSizeIsMain ? &inSize2 : &outSize2);
+ }
+
return S_OK;
}
diff --git a/3rdparty/lzma/CPP/7zip/Common/ProgressUtils.h b/3rdparty/lzma/CPP/7zip/Common/ProgressUtils.h
index bae5395c147..e94265ba715 100644
--- a/3rdparty/lzma/CPP/7zip/Common/ProgressUtils.h
+++ b/3rdparty/lzma/CPP/7zip/Common/ProgressUtils.h
@@ -1,7 +1,7 @@
// ProgressUtils.h
-#ifndef __PROGRESSUTILS_H
-#define __PROGRESSUTILS_H
+#ifndef __PROGRESS_UTILS_H
+#define __PROGRESS_UTILS_H
#include "../../Common/MyCom.h"
@@ -23,10 +23,11 @@ public:
bool SendProgress;
CLocalProgress();
+
void Init(IProgress *progress, bool inSizeIsMain);
HRESULT SetCur();
- MY_UNKNOWN_IMP
+ MY_UNKNOWN_IMP1(ICompressProgressInfo)
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
};
diff --git a/3rdparty/lzma/CPP/7zip/Common/PropId.cpp b/3rdparty/lzma/CPP/7zip/Common/PropId.cpp
new file mode 100644
index 00000000000..11d20d55753
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Common/PropId.cpp
@@ -0,0 +1,108 @@
+// PropId.cpp
+
+#include "StdAfx.h"
+
+#include "../../Common/MyWindows.h"
+
+#include "../PropID.h"
+
+// VARTYPE
+const Byte k7z_PROPID_To_VARTYPE[kpid_NUM_DEFINED] =
+{
+ VT_EMPTY,
+ VT_UI4,
+ VT_UI4,
+ VT_BSTR,
+ VT_BSTR,
+ VT_BSTR,
+ VT_BOOL,
+ VT_UI8,
+ VT_UI8,
+ VT_UI4,
+ VT_FILETIME,
+ VT_FILETIME,
+ VT_FILETIME,
+ VT_BOOL,
+ VT_BOOL,
+ VT_BOOL,
+ VT_BOOL,
+ VT_BOOL,
+ VT_UI4,
+ VT_UI4,
+ VT_BSTR,
+ VT_BOOL,
+ VT_BSTR,
+ VT_BSTR,
+ VT_BSTR,
+ VT_BSTR,
+ VT_BSTR,
+ VT_UI8,
+ VT_BSTR,
+ VT_UI8,
+ VT_BSTR,
+ VT_UI8,
+ VT_UI8,
+ VT_BSTR, // or VT_UI8 kpidUnpackVer
+ VT_UI4, // or VT_UI8 kpidVolume
+ VT_BOOL,
+ VT_UI8,
+ VT_UI8,
+ VT_UI8,
+ VT_UI8,
+ VT_UI4,
+ VT_BOOL,
+ VT_BOOL,
+ VT_BSTR,
+ VT_UI8,
+ VT_UI8,
+ VT_UI4, // kpidChecksum
+ VT_BSTR,
+ VT_UI8,
+ VT_BSTR, // or VT_UI8 kpidId
+ VT_BSTR,
+ VT_BSTR,
+ VT_UI4,
+ VT_UI4,
+ VT_BSTR,
+ VT_BSTR,
+ VT_UI8,
+ VT_UI8,
+ VT_UI4,
+ VT_BSTR,
+ VT_BSTR,
+ VT_BSTR,
+ VT_BSTR, // kpidNtSecure
+ VT_BOOL,
+ VT_BOOL,
+ VT_BOOL,
+ VT_BOOL,
+ VT_BSTR, // SHA-1
+ VT_BSTR, // SHA-256
+ VT_BSTR,
+ VT_UI8,
+ VT_UI4,
+ VT_UI4,
+ VT_BSTR,
+ VT_UI8,
+ VT_UI8,
+ VT_UI8,
+ VT_UI8,
+ VT_UI8,
+ VT_UI8,
+ VT_UI8,
+ VT_BSTR,
+ VT_BSTR,
+ VT_BSTR,
+ VT_BOOL,
+ VT_BOOL,
+ VT_BOOL,
+ VT_UI8,
+ VT_UI8,
+ VT_BSTR, // kpidNtReparse
+ VT_BSTR,
+ VT_UI8,
+ VT_UI8,
+ VT_BOOL,
+ VT_BSTR,
+ VT_BSTR
+};
diff --git a/3rdparty/lzma/CPP/7zip/Common/RegisterArc.h b/3rdparty/lzma/CPP/7zip/Common/RegisterArc.h
index bc2a034fd53..3421ba1b164 100644
--- a/3rdparty/lzma/CPP/7zip/Common/RegisterArc.h
+++ b/3rdparty/lzma/CPP/7zip/Common/RegisterArc.h
@@ -5,28 +5,74 @@
#include "../Archive/IArchive.h"
-typedef IInArchive * (*CreateInArchiveP)();
-typedef IOutArchive * (*CreateOutArchiveP)();
-
struct CArcInfo
{
- const wchar_t *Name;
- const wchar_t *Ext;
- const wchar_t *AddExt;
- Byte ClassId;
- Byte Signature[16];
- int SignatureSize;
- bool KeepName;
- CreateInArchiveP CreateInArchive;
- CreateOutArchiveP CreateOutArchive;
+ UInt16 Flags;
+ Byte Id;
+ Byte SignatureSize;
+ UInt16 SignatureOffset;
+
+ const Byte *Signature;
+ const char *Name;
+ const char *Ext;
+ const char *AddExt;
+
+ Func_CreateInArchive CreateInArchive;
+ Func_CreateOutArchive CreateOutArchive;
+ Func_IsArc IsArc;
+
+ bool IsMultiSignature() const { return (Flags & NArcInfoFlags::kMultiSignature) != 0; }
};
-void RegisterArc(const CArcInfo *arcInfo);
+void RegisterArc(const CArcInfo *arcInfo) throw();
+
+
+#define IMP_CreateArcIn_2(c) \
+ static IInArchive *CreateArc() { return new c; }
+
+#define IMP_CreateArcIn IMP_CreateArcIn_2(CHandler())
+
+#ifdef EXTRACT_ONLY
+ #define IMP_CreateArcOut
+ #define CreateArcOut NULL
+#else
+ #define IMP_CreateArcOut static IOutArchive *CreateArcOut() { return new CHandler(); }
+#endif
+
+#define REGISTER_ARC_V(n, e, ae, id, sigSize, sig, offs, flags, crIn, crOut, isArc) \
+ static const CArcInfo g_ArcInfo = { flags, id, sigSize, offs, sig, n, e, ae, crIn, crOut, isArc } ; \
+
+#define REGISTER_ARC_R(n, e, ae, id, sigSize, sig, offs, flags, crIn, crOut, isArc) \
+ REGISTER_ARC_V(n, e, ae, id, sigSize, sig, offs, flags, crIn, crOut, isArc) \
+ struct CRegisterArc { CRegisterArc() { RegisterArc(&g_ArcInfo); }}; \
+ static CRegisterArc g_RegisterArc;
+
+
+#define REGISTER_ARC_I_CLS(cls, n, e, ae, id, sig, offs, flags, isArc) \
+ IMP_CreateArcIn_2(cls) \
+ REGISTER_ARC_R(n, e, ae, id, ARRAY_SIZE(sig), sig, offs, flags, CreateArc, NULL, isArc)
+
+#define REGISTER_ARC_I_CLS_NO_SIG(cls, n, e, ae, id, offs, flags, isArc) \
+ IMP_CreateArcIn_2(cls) \
+ REGISTER_ARC_R(n, e, ae, id, 0, NULL, offs, flags, CreateArc, NULL, isArc)
+
+#define REGISTER_ARC_I(n, e, ae, id, sig, offs, flags, isArc) \
+ REGISTER_ARC_I_CLS(CHandler(), n, e, ae, id, sig, offs, flags, isArc)
+
+#define REGISTER_ARC_I_NO_SIG(n, e, ae, id, offs, flags, isArc) \
+ REGISTER_ARC_I_CLS_NO_SIG(CHandler(), n, e, ae, id, offs, flags, isArc)
+
-#define REGISTER_ARC_NAME(x) CRegister ## x
+#define REGISTER_ARC_IO(n, e, ae, id, sig, offs, flags, isArc) \
+ IMP_CreateArcIn \
+ IMP_CreateArcOut \
+ REGISTER_ARC_R(n, e, ae, id, ARRAY_SIZE(sig), sig, offs, flags, CreateArc, CreateArcOut, isArc)
-#define REGISTER_ARC(x) struct REGISTER_ARC_NAME(x) { \
- REGISTER_ARC_NAME(x)() { RegisterArc(&g_ArcInfo); }}; \
- static REGISTER_ARC_NAME(x) g_RegisterArc;
+#define REGISTER_ARC_IO_DECREMENT_SIG(n, e, ae, id, sig, offs, flags, isArc) \
+ IMP_CreateArcIn \
+ IMP_CreateArcOut \
+ REGISTER_ARC_V(n, e, ae, id, ARRAY_SIZE(sig), sig, offs, flags, CreateArc, CreateArcOut, isArc) \
+ struct CRegisterArcDecSig { CRegisterArcDecSig() { sig[0]--; RegisterArc(&g_ArcInfo); }}; \
+ static CRegisterArcDecSig g_RegisterArc;
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/RegisterCodec.h b/3rdparty/lzma/CPP/7zip/Common/RegisterCodec.h
index 786b4a4ce90..7ddb7604b9a 100644
--- a/3rdparty/lzma/CPP/7zip/Common/RegisterCodec.h
+++ b/3rdparty/lzma/CPP/7zip/Common/RegisterCodec.h
@@ -1,33 +1,106 @@
// RegisterCodec.h
-#ifndef __REGISTERCODEC_H
-#define __REGISTERCODEC_H
+#ifndef __REGISTER_CODEC_H
+#define __REGISTER_CODEC_H
#include "../Common/MethodId.h"
+#include "../ICoder.h"
+
typedef void * (*CreateCodecP)();
+
struct CCodecInfo
{
CreateCodecP CreateDecoder;
CreateCodecP CreateEncoder;
CMethodId Id;
- const wchar_t *Name;
- UInt32 NumInStreams;
+ const char *Name;
+ UInt32 NumStreams;
bool IsFilter;
};
-void RegisterCodec(const CCodecInfo *codecInfo);
+void RegisterCodec(const CCodecInfo *codecInfo) throw();
+
+
+#define REGISTER_CODEC_CREATE_2(name, cls, i) static void *name() { return (void *)(i *)(new cls); }
+#define REGISTER_CODEC_CREATE(name, cls) REGISTER_CODEC_CREATE_2(name, cls, ICompressCoder)
#define REGISTER_CODEC_NAME(x) CRegisterCodec ## x
+#define REGISTER_CODEC_VAR static const CCodecInfo g_CodecInfo =
#define REGISTER_CODEC(x) struct REGISTER_CODEC_NAME(x) { \
REGISTER_CODEC_NAME(x)() { RegisterCodec(&g_CodecInfo); }}; \
static REGISTER_CODEC_NAME(x) g_RegisterCodec;
+
#define REGISTER_CODECS_NAME(x) CRegisterCodecs ## x
+#define REGISTER_CODECS_VAR static const CCodecInfo g_CodecsInfo[] =
+
#define REGISTER_CODECS(x) struct REGISTER_CODECS_NAME(x) { \
- REGISTER_CODECS_NAME(x)() { for (int i = 0; i < sizeof(g_CodecsInfo) / sizeof(g_CodecsInfo[0]); i++) \
+ REGISTER_CODECS_NAME(x)() { for (unsigned i = 0; i < ARRAY_SIZE(g_CodecsInfo); i++) \
RegisterCodec(&g_CodecsInfo[i]); }}; \
static REGISTER_CODECS_NAME(x) g_RegisterCodecs;
+
+#define REGISTER_CODEC_2(x, crDec, crEnc, id, name) \
+ REGISTER_CODEC_VAR \
+ { crDec, crEnc, id, name, 1, false }; \
+ REGISTER_CODEC(x)
+
+
+#ifdef EXTRACT_ONLY
+ #define REGISTER_CODEC_E(x, clsDec, clsEnc, id, name) \
+ REGISTER_CODEC_CREATE(CreateDec, clsDec) \
+ REGISTER_CODEC_2(x, CreateDec, NULL, id, name)
+#else
+ #define REGISTER_CODEC_E(x, clsDec, clsEnc, id, name) \
+ REGISTER_CODEC_CREATE(CreateDec, clsDec) \
+ REGISTER_CODEC_CREATE(CreateEnc, clsEnc) \
+ REGISTER_CODEC_2(x, CreateDec, CreateEnc, id, name)
+#endif
+
+
+
+#define REGISTER_FILTER_CREATE(name, cls) REGISTER_CODEC_CREATE_2(name, cls, ICompressFilter)
+
+#define REGISTER_FILTER_ITEM(crDec, crEnc, id, name) \
+ { crDec, crEnc, id, name, 1, true }
+
+#define REGISTER_FILTER(x, crDec, crEnc, id, name) \
+ REGISTER_CODEC_VAR \
+ REGISTER_FILTER_ITEM(crDec, crEnc, id, name); \
+ REGISTER_CODEC(x)
+
+#ifdef EXTRACT_ONLY
+ #define REGISTER_FILTER_E(x, clsDec, clsEnc, id, name) \
+ REGISTER_FILTER_CREATE(CreateDec, clsDec) \
+ REGISTER_FILTER(x, CreateDec, NULL, id, name)
+#else
+ #define REGISTER_FILTER_E(x, clsDec, clsEnc, id, name) \
+ REGISTER_FILTER_CREATE(CreateDec, clsDec) \
+ REGISTER_FILTER_CREATE(CreateEnc, clsEnc) \
+ REGISTER_FILTER(x, CreateDec, CreateEnc, id, name)
+#endif
+
+
+
+struct CHasherInfo
+{
+ IHasher * (*CreateHasher)();
+ CMethodId Id;
+ const char *Name;
+ UInt32 DigestSize;
+};
+
+void RegisterHasher(const CHasherInfo *hasher) throw();
+
+#define REGISTER_HASHER_NAME(x) CRegHasher_ ## x
+
+#define REGISTER_HASHER(cls, id, name, size) \
+ STDMETHODIMP_(UInt32) cls::GetDigestSize() throw() { return size; } \
+ static IHasher *CreateHasherSpec() { return new cls(); } \
+ static const CHasherInfo g_HasherInfo = { CreateHasherSpec, id, name, size }; \
+ struct REGISTER_HASHER_NAME(cls) { REGISTER_HASHER_NAME(cls)() { RegisterHasher(&g_HasherInfo); }}; \
+ static REGISTER_HASHER_NAME(cls) g_RegisterHasher;
+
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/StdAfx.h b/3rdparty/lzma/CPP/7zip/Common/StdAfx.h
index ef555ec12ac..1cbd7feaeec 100644
--- a/3rdparty/lzma/CPP/7zip/Common/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Common/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../Common/MyWindows.h"
-#include "../../Common/NewHandler.h"
+#include "../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/StreamBinder.cpp b/3rdparty/lzma/CPP/7zip/Common/StreamBinder.cpp
index 7a4c0ed26ad..435440c6649 100644
--- a/3rdparty/lzma/CPP/7zip/Common/StreamBinder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/StreamBinder.cpp
@@ -12,7 +12,7 @@ class CBinderInStream:
{
CStreamBinder *_binder;
public:
- MY_UNKNOWN_IMP
+ MY_UNKNOWN_IMP1(ISequentialInStream)
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
~CBinderInStream() { _binder->CloseRead(); }
CBinderInStream(CStreamBinder *binder): _binder(binder) {}
@@ -27,7 +27,7 @@ class CBinderOutStream:
{
CStreamBinder *_binder;
public:
- MY_UNKNOWN_IMP
+ MY_UNKNOWN_IMP1(ISequentialOutStream)
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
~CBinderOutStream() { _binder->CloseWrite(); }
CBinderOutStream(CStreamBinder *binder): _binder(binder) {}
@@ -40,26 +40,38 @@ STDMETHODIMP CBinderOutStream::Write(const void *data, UInt32 size, UInt32 *proc
WRes CStreamBinder::CreateEvents()
{
- RINOK(_canWrite_Event.Create(true));
+ RINOK(_canWrite_Event.Create());
RINOK(_canRead_Event.Create());
return _readingWasClosed_Event.Create();
}
void CStreamBinder::ReInit()
{
- _waitWrite = true;
+ _canWrite_Event.Reset();
_canRead_Event.Reset();
_readingWasClosed_Event.Reset();
+
+ // _readingWasClosed = false;
+ _readingWasClosed2 = false;
+
+ _waitWrite = true;
+ _bufSize = 0;
+ _buf = NULL;
ProcessedSize = 0;
+ // WritingWasCut = false;
}
void CStreamBinder::CreateStreams(ISequentialInStream **inStream, ISequentialOutStream **outStream)
{
+ // _readingWasClosed = false;
+ _readingWasClosed2 = false;
+
_waitWrite = true;
_bufSize = 0;
_buf = NULL;
ProcessedSize = 0;
+ // WritingWasCut = false;
CBinderInStream *inStreamSpec = new CBinderInStream(this);
CMyComPtr<ISequentialInStream> inStreamLoc(inStreamSpec);
@@ -108,19 +120,37 @@ HRESULT CStreamBinder::Write(const void *data, UInt32 size, UInt32 *processedSiz
{
if (processedSize)
*processedSize = 0;
- if (size != 0)
+ if (size == 0)
+ return S_OK;
+
+ if (!_readingWasClosed2)
{
_buf = data;
_bufSize = size;
- _canWrite_Event.Reset();
_canRead_Event.Set();
+
+ /*
+ _canWrite_Event.Lock();
+ if (_readingWasClosed)
+ _readingWasClosed2 = true;
+ */
HANDLE events[2] = { _canWrite_Event, _readingWasClosed_Event };
DWORD waitResult = ::WaitForMultipleObjects(2, events, FALSE, INFINITE);
- if (waitResult != WAIT_OBJECT_0 + 0)
- return S_FALSE;
- if (processedSize)
- *processedSize = size;
+ if (waitResult >= WAIT_OBJECT_0 + 2)
+ return E_FAIL;
+
+ size -= _bufSize;
+ if (size != 0)
+ {
+ if (processedSize)
+ *processedSize = size;
+ return S_OK;
+ }
+ // if (waitResult == WAIT_OBJECT_0 + 1)
+ _readingWasClosed2 = true;
}
- return S_OK;
+
+ // WritingWasCut = true;
+ return k_My_HRESULT_WritingWasCut;
}
diff --git a/3rdparty/lzma/CPP/7zip/Common/StreamBinder.h b/3rdparty/lzma/CPP/7zip/Common/StreamBinder.h
index f3fb53228dd..12088a94586 100644
--- a/3rdparty/lzma/CPP/7zip/Common/StreamBinder.h
+++ b/3rdparty/lzma/CPP/7zip/Common/StreamBinder.h
@@ -7,11 +7,27 @@
#include "../IStream.h"
+/*
+We don't use probably UNSAFE version:
+reader thread:
+ _canWrite_Event.Set();
+ _readingWasClosed = true
+ _canWrite_Event.Set();
+writer thread:
+ _canWrite_Event.Wait()
+ if (_readingWasClosed)
+Can second call of _canWrite_Event.Set() be executed without memory barrier, if event is already set?
+*/
+
class CStreamBinder
{
- NWindows::NSynchronization::CManualResetEvent _canWrite_Event;
+ NWindows::NSynchronization::CAutoResetEvent _canWrite_Event;
NWindows::NSynchronization::CManualResetEvent _canRead_Event;
NWindows::NSynchronization::CManualResetEvent _readingWasClosed_Event;
+
+ // bool _readingWasClosed;
+ bool _readingWasClosed2;
+ // bool WritingWasCut;
bool _waitWrite;
UInt32 _bufSize;
const void *_buf;
@@ -20,13 +36,23 @@ public:
WRes CreateEvents();
void CreateStreams(ISequentialInStream **inStream, ISequentialOutStream **outStream);
+
void ReInit();
+
HRESULT Read(void *data, UInt32 size, UInt32 *processedSize);
HRESULT Write(const void *data, UInt32 size, UInt32 *processedSize);
- void CloseRead() { _readingWasClosed_Event.Set(); }
+
+ void CloseRead()
+ {
+ _readingWasClosed_Event.Set();
+ // _readingWasClosed = true;
+ // _canWrite_Event.Set();
+ }
+
void CloseWrite()
{
- // _bufSize must be = 0
+ _buf = NULL;
+ _bufSize = 0;
_canRead_Event.Set();
}
};
diff --git a/3rdparty/lzma/CPP/7zip/Common/StreamObjects.cpp b/3rdparty/lzma/CPP/7zip/Common/StreamObjects.cpp
index 1b6b0af08ba..8136716d66f 100644
--- a/3rdparty/lzma/CPP/7zip/Common/StreamObjects.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/StreamObjects.cpp
@@ -8,14 +8,49 @@
#include "StreamObjects.h"
+STDMETHODIMP CBufferInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
+{
+ if (processedSize)
+ *processedSize = 0;
+ if (size == 0)
+ return S_OK;
+ if (_pos >= Buf.Size())
+ return S_OK;
+ size_t rem = Buf.Size() - (size_t)_pos;
+ if (rem > size)
+ rem = (size_t)size;
+ memcpy(data, (const Byte *)Buf + (size_t)_pos, rem);
+ _pos += rem;
+ if (processedSize)
+ *processedSize = (UInt32)rem;
+ return S_OK;
+}
+
+STDMETHODIMP CBufferInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
+{
+ switch (seekOrigin)
+ {
+ case STREAM_SEEK_SET: break;
+ case STREAM_SEEK_CUR: offset += _pos; break;
+ case STREAM_SEEK_END: offset += Buf.Size(); break;
+ default: return STG_E_INVALIDFUNCTION;
+ }
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _pos = offset;
+ if (newPosition)
+ *newPosition = offset;
+ return S_OK;
+}
+
STDMETHODIMP CBufInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
{
if (processedSize)
*processedSize = 0;
if (size == 0)
return S_OK;
- if (_pos > _size)
- return E_FAIL;
+ if (_pos >= _size)
+ return S_OK;
size_t rem = _size - (size_t)_pos;
if (rem > size)
rem = (size_t)size;
@@ -28,26 +63,48 @@ STDMETHODIMP CBufInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
STDMETHODIMP CBufInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
{
- switch(seekOrigin)
+ switch (seekOrigin)
{
- case STREAM_SEEK_SET: _pos = offset; break;
- case STREAM_SEEK_CUR: _pos += offset; break;
- case STREAM_SEEK_END: _pos = _size + offset; break;
+ case STREAM_SEEK_SET: break;
+ case STREAM_SEEK_CUR: offset += _pos; break;
+ case STREAM_SEEK_END: offset += _size; break;
default: return STG_E_INVALIDFUNCTION;
}
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _pos = offset;
if (newPosition)
- *newPosition = _pos;
+ *newPosition = offset;
return S_OK;
}
-void CByteDynBuffer::Free()
+void Create_BufInStream_WithReference(const void *data, size_t size, IUnknown *ref, ISequentialInStream **stream)
+{
+ *stream = NULL;
+ CBufInStream *inStreamSpec = new CBufInStream;
+ CMyComPtr<ISequentialInStream> streamTemp = inStreamSpec;
+ inStreamSpec->Init((const Byte *)data, size, ref);
+ *stream = streamTemp.Detach();
+}
+
+void Create_BufInStream_WithNewBuffer(const void *data, size_t size, ISequentialInStream **stream)
+{
+ *stream = NULL;
+ CBufferInStream *inStreamSpec = new CBufferInStream;
+ CMyComPtr<ISequentialInStream> streamTemp = inStreamSpec;
+ inStreamSpec->Buf.CopyFrom((const Byte *)data, size);
+ inStreamSpec->Init();
+ *stream = streamTemp.Detach();
+}
+
+void CByteDynBuffer::Free() throw()
{
free(_buf);
_buf = 0;
_capacity = 0;
}
-bool CByteDynBuffer::EnsureCapacity(size_t cap)
+bool CByteDynBuffer::EnsureCapacity(size_t cap) throw()
{
if (cap <= _capacity)
return true;
@@ -79,8 +136,7 @@ Byte *CDynBufSeqOutStream::GetBufPtrForWriting(size_t addSize)
void CDynBufSeqOutStream::CopyToBuffer(CByteBuffer &dest) const
{
- dest.SetCapacity(_size);
- memcpy(dest, (const Byte *)_buffer, _size);
+ dest.CopyFrom((const Byte *)_buffer, _size);
}
STDMETHODIMP CDynBufSeqOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
@@ -104,8 +160,11 @@ STDMETHODIMP CBufPtrSeqOutStream::Write(const void *data, UInt32 size, UInt32 *p
size_t rem = _size - _pos;
if (rem > size)
rem = (size_t)size;
- memcpy(_buffer + _pos, data, rem);
- _pos += rem;
+ if (rem != 0)
+ {
+ memcpy(_buffer + _pos, data, rem);
+ _pos += rem;
+ }
if (processedSize)
*processedSize = (UInt32)rem;
return (rem != 0 || size == 0) ? S_OK : E_FAIL;
@@ -123,7 +182,7 @@ STDMETHODIMP CSequentialOutStreamSizeCount::Write(const void *data, UInt32 size,
static const UInt64 kEmptyTag = (UInt64)(Int64)-1;
-void CCachedInStream::Free()
+void CCachedInStream::Free() throw()
{
MyFree(_tags);
_tags = 0;
@@ -131,7 +190,7 @@ void CCachedInStream::Free()
_data = 0;
}
-bool CCachedInStream::Alloc(unsigned blockSizeLog, unsigned numBlocksLog)
+bool CCachedInStream::Alloc(unsigned blockSizeLog, unsigned numBlocksLog) throw()
{
unsigned sizeLog = blockSizeLog + numBlocksLog;
if (sizeLog >= sizeof(size_t) * 8)
@@ -157,7 +216,7 @@ bool CCachedInStream::Alloc(unsigned blockSizeLog, unsigned numBlocksLog)
return true;
}
-void CCachedInStream::Init(UInt64 size)
+void CCachedInStream::Init(UInt64 size) throw()
{
_size = size;
_pos = 0;
@@ -172,8 +231,8 @@ STDMETHODIMP CCachedInStream::Read(void *data, UInt32 size, UInt32 *processedSiz
*processedSize = 0;
if (size == 0)
return S_OK;
- if (_pos > _size)
- return E_FAIL;
+ if (_pos >= _size)
+ return S_OK;
{
UInt64 rem = _size - _pos;
@@ -210,14 +269,17 @@ STDMETHODIMP CCachedInStream::Read(void *data, UInt32 size, UInt32 *processedSiz
STDMETHODIMP CCachedInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
{
- switch(seekOrigin)
+ switch (seekOrigin)
{
- case STREAM_SEEK_SET: _pos = offset; break;
- case STREAM_SEEK_CUR: _pos = _pos + offset; break;
- case STREAM_SEEK_END: _pos = _size + offset; break;
+ case STREAM_SEEK_SET: break;
+ case STREAM_SEEK_CUR: offset += _pos; break;
+ case STREAM_SEEK_END: offset += _size; break;
default: return STG_E_INVALIDFUNCTION;
}
- if (newPosition != 0)
- *newPosition = _pos;
+ if (offset < 0)
+ return HRESULT_WIN32_ERROR_NEGATIVE_SEEK;
+ _pos = offset;
+ if (newPosition)
+ *newPosition = offset;
return S_OK;
}
diff --git a/3rdparty/lzma/CPP/7zip/Common/StreamObjects.h b/3rdparty/lzma/CPP/7zip/Common/StreamObjects.h
index 8cd95c70075..e20e9bd80de 100644
--- a/3rdparty/lzma/CPP/7zip/Common/StreamObjects.h
+++ b/3rdparty/lzma/CPP/7zip/Common/StreamObjects.h
@@ -3,10 +3,27 @@
#ifndef __STREAM_OBJECTS_H
#define __STREAM_OBJECTS_H
-#include "../../Common/Buffer.h"
+#include "../../Common/MyBuffer.h"
#include "../../Common/MyCom.h"
+#include "../../Common/MyVector.h"
+
#include "../IStream.h"
+class CBufferInStream:
+ public IInStream,
+ public CMyUnknownImp
+{
+ UInt64 _pos;
+public:
+ CByteBuffer Buf;
+ void Init() { _pos = 0; }
+
+ MY_UNKNOWN_IMP2(ISequentialInStream, IInStream)
+
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
+};
+
struct CReferenceBuf:
public IUnknown,
public CMyUnknownImp
@@ -31,13 +48,18 @@ public:
_pos = 0;
_ref = ref;
}
- void Init(CReferenceBuf *ref) { Init(ref->Buf, ref->Buf.GetCapacity(), ref); }
+ void Init(CReferenceBuf *ref) { Init(ref->Buf, ref->Buf.Size(), ref); }
- MY_UNKNOWN_IMP1(IInStream)
+ MY_UNKNOWN_IMP2(ISequentialInStream, IInStream)
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
};
+void Create_BufInStream_WithReference(const void *data, size_t size, IUnknown *ref, ISequentialInStream **stream);
+void Create_BufInStream_WithNewBuffer(const void *data, size_t size, ISequentialInStream **stream);
+inline void Create_BufInStream_WithNewBuffer(const CByteBuffer &buf, ISequentialInStream **stream)
+ { Create_BufInStream_WithNewBuffer(buf, buf.Size(), stream); }
+
class CByteDynBuffer
{
size_t _capacity;
@@ -46,11 +68,11 @@ public:
CByteDynBuffer(): _capacity(0), _buf(0) {};
// there is no copy constructor. So don't copy this object.
~CByteDynBuffer() { Free(); }
- void Free();
- size_t GetCapacity() const { return _capacity; }
- operator Byte*() const { return _buf; };
- operator const Byte*() const { return _buf; };
- bool EnsureCapacity(size_t capacity);
+ void Free() throw();
+ size_t GetCapacity() const { return _capacity; }
+ operator Byte*() const { return _buf; }
+ operator const Byte*() const { return _buf; }
+ bool EnsureCapacity(size_t capacity) throw();
};
class CDynBufSeqOutStream:
@@ -68,7 +90,7 @@ public:
Byte *GetBufPtrForWriting(size_t addSize);
void UpdateSize(size_t addSize) { _size += addSize; }
- MY_UNKNOWN_IMP
+ MY_UNKNOWN_IMP1(ISequentialOutStream)
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
};
@@ -88,7 +110,7 @@ public:
}
size_t GetPos() const { return _pos; }
- MY_UNKNOWN_IMP
+ MY_UNKNOWN_IMP1(ISequentialOutStream)
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
};
@@ -103,7 +125,7 @@ public:
void Init() { _size = 0; }
UInt64 GetSize() const { return _size; }
- MY_UNKNOWN_IMP
+ MY_UNKNOWN_IMP1(ISequentialOutStream)
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
};
@@ -123,9 +145,9 @@ protected:
public:
CCachedInStream(): _tags(0), _data(0) {}
virtual ~CCachedInStream() { Free(); } // the destructor must be virtual (release calls it) !!!
- void Free();
- bool Alloc(unsigned blockSizeLog, unsigned numBlocksLog);
- void Init(UInt64 size);
+ void Free() throw();
+ bool Alloc(unsigned blockSizeLog, unsigned numBlocksLog) throw();
+ void Init(UInt64 size) throw();
MY_UNKNOWN_IMP2(ISequentialInStream, IInStream)
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
diff --git a/3rdparty/lzma/CPP/7zip/Common/StreamUtils.cpp b/3rdparty/lzma/CPP/7zip/Common/StreamUtils.cpp
index 049e4aa1754..1402f420599 100644
--- a/3rdparty/lzma/CPP/7zip/Common/StreamUtils.cpp
+++ b/3rdparty/lzma/CPP/7zip/Common/StreamUtils.cpp
@@ -6,7 +6,7 @@
static const UInt32 kBlockSize = ((UInt32)1 << 31);
-HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *processedSize)
+HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *processedSize) throw()
{
size_t size = *processedSize;
*processedSize = 0;
@@ -25,21 +25,21 @@ HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *processedSiz
return S_OK;
}
-HRESULT ReadStream_FALSE(ISequentialInStream *stream, void *data, size_t size)
+HRESULT ReadStream_FALSE(ISequentialInStream *stream, void *data, size_t size) throw()
{
size_t processedSize = size;
RINOK(ReadStream(stream, data, &processedSize));
return (size == processedSize) ? S_OK : S_FALSE;
}
-HRESULT ReadStream_FAIL(ISequentialInStream *stream, void *data, size_t size)
+HRESULT ReadStream_FAIL(ISequentialInStream *stream, void *data, size_t size) throw()
{
size_t processedSize = size;
RINOK(ReadStream(stream, data, &processedSize));
return (size == processedSize) ? S_OK : E_FAIL;
}
-HRESULT WriteStream(ISequentialOutStream *stream, const void *data, size_t size)
+HRESULT WriteStream(ISequentialOutStream *stream, const void *data, size_t size) throw()
{
while (size != 0)
{
diff --git a/3rdparty/lzma/CPP/7zip/Common/StreamUtils.h b/3rdparty/lzma/CPP/7zip/Common/StreamUtils.h
index f1cfd184842..ae914c004b0 100644
--- a/3rdparty/lzma/CPP/7zip/Common/StreamUtils.h
+++ b/3rdparty/lzma/CPP/7zip/Common/StreamUtils.h
@@ -1,13 +1,13 @@
// StreamUtils.h
-#ifndef __STREAMUTILS_H
-#define __STREAMUTILS_H
+#ifndef __STREAM_UTILS_H
+#define __STREAM_UTILS_H
#include "../IStream.h"
-HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *size);
-HRESULT ReadStream_FALSE(ISequentialInStream *stream, void *data, size_t size);
-HRESULT ReadStream_FAIL(ISequentialInStream *stream, void *data, size_t size);
-HRESULT WriteStream(ISequentialOutStream *stream, const void *data, size_t size);
+HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *size) throw();
+HRESULT ReadStream_FALSE(ISequentialInStream *stream, void *data, size_t size) throw();
+HRESULT ReadStream_FAIL(ISequentialInStream *stream, void *data, size_t size) throw();
+HRESULT WriteStream(ISequentialOutStream *stream, const void *data, size_t size) throw();
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Common/UniqBlocks.cpp b/3rdparty/lzma/CPP/7zip/Common/UniqBlocks.cpp
new file mode 100644
index 00000000000..8f754e177e8
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Common/UniqBlocks.cpp
@@ -0,0 +1,57 @@
+// UniqBlocks.cpp
+
+#include "StdAfx.h"
+
+#include <string.h>
+
+#include "UniqBlocks.h"
+
+unsigned CUniqBlocks::AddUniq(const Byte *data, size_t size)
+{
+ unsigned left = 0, right = Sorted.Size();
+ while (left != right)
+ {
+ unsigned mid = (left + right) / 2;
+ unsigned index = Sorted[mid];
+ const CByteBuffer &buf = Bufs[index];
+ size_t sizeMid = buf.Size();
+ if (size < sizeMid)
+ right = mid;
+ else if (size > sizeMid)
+ left = mid + 1;
+ else
+ {
+ if (size == 0)
+ return index;
+ int cmp = memcmp(data, buf, size);
+ if (cmp == 0)
+ return index;
+ if (cmp < 0)
+ right = mid;
+ else
+ left = mid + 1;
+ }
+ }
+ unsigned index = Bufs.Size();
+ Sorted.Insert(left, index);
+ Bufs.AddNew().CopyFrom(data, size);
+ return index;
+}
+
+UInt64 CUniqBlocks::GetTotalSizeInBytes() const
+{
+ UInt64 size = 0;
+ FOR_VECTOR (i, Bufs)
+ size += Bufs[i].Size();
+ return size;
+}
+
+void CUniqBlocks::GetReverseMap()
+{
+ unsigned num = Sorted.Size();
+ BufIndexToSortedIndex.ClearAndSetSize(num);
+ unsigned *p = &BufIndexToSortedIndex[0];
+ const unsigned *sorted = &Sorted[0];
+ for (unsigned i = 0; i < num; i++)
+ p[sorted[i]] = i;
+}
diff --git a/3rdparty/lzma/CPP/7zip/Common/UniqBlocks.h b/3rdparty/lzma/CPP/7zip/Common/UniqBlocks.h
new file mode 100644
index 00000000000..a376024e3df
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Common/UniqBlocks.h
@@ -0,0 +1,26 @@
+// UniqBlocks.h
+
+#ifndef __UNIQ_BLOCKS_H
+#define __UNIQ_BLOCKS_H
+
+#include "../../Common/MyTypes.h"
+#include "../../Common/MyBuffer.h"
+#include "../../Common/MyVector.h"
+
+struct CUniqBlocks
+{
+ CObjectVector<CByteBuffer> Bufs;
+ CUIntVector Sorted;
+ CUIntVector BufIndexToSortedIndex;
+
+ unsigned AddUniq(const Byte *data, size_t size);
+ UInt64 GetTotalSizeInBytes() const;
+ void GetReverseMap();
+
+ bool IsOnlyEmpty() const
+ {
+ return (Bufs.Size() == 0 || Bufs.Size() == 1 && Bufs[0].Size() == 0);
+ }
+};
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Compress/Bcj2Coder.cpp b/3rdparty/lzma/CPP/7zip/Compress/Bcj2Coder.cpp
index 684da5abfee..fd7ce7ef347 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/Bcj2Coder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/Bcj2Coder.cpp
@@ -4,383 +4,655 @@
#include "../../../C/Alloc.h"
+#include "../Common/StreamUtils.h"
+
#include "Bcj2Coder.h"
namespace NCompress {
namespace NBcj2 {
-inline bool IsJcc(Byte b0, Byte b1) { return (b0 == 0x0F && (b1 & 0xF0) == 0x80); }
-inline bool IsJ(Byte b0, Byte b1) { return ((b1 & 0xFE) == 0xE8 || IsJcc(b0, b1)); }
-inline unsigned GetIndex(Byte b0, Byte b1) { return ((b1 == 0xE8) ? b0 : ((b1 == 0xE9) ? 256 : 257)); }
-
-#ifndef EXTRACT_ONLY
-
-static const int kBufferSize = 1 << 17;
+CBaseCoder::CBaseCoder()
+{
+ for (int i = 0; i < BCJ2_NUM_STREAMS + 1; i++)
+ {
+ _bufs[i] = NULL;
+ _bufsCurSizes[i] = 0;
+ _bufsNewSizes[i] = (1 << 18);
+ }
+}
-static bool inline Test86MSByte(Byte b)
+CBaseCoder::~CBaseCoder()
{
- return (b == 0 || b == 0xFF);
+ for (int i = 0; i < BCJ2_NUM_STREAMS + 1; i++)
+ ::MidFree(_bufs[i]);
}
-bool CEncoder::Create()
+HRESULT CBaseCoder::Alloc(bool allocForOrig)
{
- if (!_mainStream.Create(1 << 18))
- return false;
- if (!_callStream.Create(1 << 18))
- return false;
- if (!_jumpStream.Create(1 << 18))
- return false;
- if (!_rangeEncoder.Create(1 << 20))
- return false;
- if (_buffer == 0)
+ unsigned num = allocForOrig ? BCJ2_NUM_STREAMS + 1 : BCJ2_NUM_STREAMS;
+ for (unsigned i = 0; i < num; i++)
{
- _buffer = (Byte *)MidAlloc(kBufferSize);
- if (_buffer == 0)
- return false;
+ UInt32 newSize = _bufsNewSizes[i];
+ const UInt32 kMinBufSize = 1;
+ if (newSize < kMinBufSize)
+ newSize = kMinBufSize;
+ if (!_bufs[i] || newSize != _bufsCurSizes[i])
+ {
+ if (_bufs[i])
+ {
+ ::MidFree(_bufs[i]);
+ _bufs[i] = 0;
+ }
+ _bufsCurSizes[i] = 0;
+ Byte *buf = (Byte *)::MidAlloc(newSize);
+ _bufs[i] = buf;
+ if (!buf)
+ return E_OUTOFMEMORY;
+ _bufsCurSizes[i] = newSize;
+ }
}
- return true;
+ return S_OK;
}
-CEncoder::~CEncoder()
-{
- ::MidFree(_buffer);
-}
-HRESULT CEncoder::Flush()
+
+#ifndef EXTRACT_ONLY
+
+CEncoder::CEncoder(): _relatLim(BCJ2_RELAT_LIMIT) {}
+CEncoder::~CEncoder() {}
+
+STDMETHODIMP CEncoder::SetInBufSize(UInt32, UInt32 size) { _bufsNewSizes[BCJ2_NUM_STREAMS] = size; return S_OK; }
+STDMETHODIMP CEncoder::SetOutBufSize(UInt32 streamIndex, UInt32 size) { _bufsNewSizes[streamIndex] = size; return S_OK; }
+
+STDMETHODIMP CEncoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps)
{
- RINOK(_mainStream.Flush());
- RINOK(_callStream.Flush());
- RINOK(_jumpStream.Flush());
- _rangeEncoder.FlushData();
- return _rangeEncoder.FlushStream();
+ UInt32 relatLim = BCJ2_RELAT_LIMIT;
+
+ for (UInt32 i = 0; i < numProps; i++)
+ {
+ const PROPVARIANT &prop = props[i];
+ PROPID propID = propIDs[i];
+ if (propID >= NCoderPropID::kReduceSize)
+ continue;
+ switch (propID)
+ {
+ /*
+ case NCoderPropID::kDefaultProp:
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ UInt32 v = prop.ulVal;
+ if (v > 31)
+ return E_INVALIDARG;
+ relatLim = (UInt32)1 << v;
+ break;
+ }
+ */
+ case NCoderPropID::kDictionarySize:
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ relatLim = prop.ulVal;
+ if (relatLim > ((UInt32)1 << 31))
+ return E_INVALIDARG;
+ break;
+ }
+
+ case NCoderPropID::kNumThreads:
+ continue;
+ case NCoderPropID::kLevel:
+ continue;
+
+ default: return E_INVALIDARG;
+ }
+ }
+
+ _relatLim = relatLim;
+
+ return S_OK;
}
-const UInt32 kDefaultLimit = (1 << 24);
-HRESULT CEncoder::CodeReal(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams,
- ISequentialOutStream **outStreams, const UInt64 ** /* outSizes */, UInt32 numOutStreams,
+HRESULT CEncoder::CodeReal(ISequentialInStream * const *inStreams, const UInt64 * const *inSizes, UInt32 numInStreams,
+ ISequentialOutStream * const *outStreams, const UInt64 * const * /* outSizes */, UInt32 numOutStreams,
ICompressProgressInfo *progress)
{
- if (numInStreams != 1 || numOutStreams != 4)
+ if (numInStreams != 1 || numOutStreams != BCJ2_NUM_STREAMS)
return E_INVALIDARG;
- if (!Create())
- return E_OUTOFMEMORY;
+ RINOK(Alloc());
+
+ UInt32 fileSize_for_Conv = 0;
+ if (inSizes && inSizes[0])
+ {
+ UInt64 inSize = *inSizes[0];
+ if (inSize <= BCJ2_FileSize_MAX)
+ fileSize_for_Conv = (UInt32)inSize;
+ }
- bool sizeIsDefined = false;
- UInt64 inSize = 0;
- if (inSizes != NULL)
- if (inSizes[0] != NULL)
+ CMyComPtr<ICompressGetSubStreamSize> getSubStreamSize;
+ inStreams[0]->QueryInterface(IID_ICompressGetSubStreamSize, (void **)&getSubStreamSize);
+
+ CBcj2Enc enc;
+
+ enc.src = _bufs[BCJ2_NUM_STREAMS];
+ enc.srcLim = enc.src;
+
+ {
+ for (int i = 0; i < BCJ2_NUM_STREAMS; i++)
{
- inSize = *inSizes[0];
- if (inSize <= kDefaultLimit)
- sizeIsDefined = true;
+ enc.bufs[i] = _bufs[i];
+ enc.lims[i] = _bufs[i] + _bufsCurSizes[i];
}
+ }
- CCoderReleaser releaser(this);
-
- ISequentialInStream *inStream = inStreams[0];
+ size_t numBytes_in_ReadBuf = 0;
+ UInt64 prevProgress = 0;
+ UInt64 totalStreamRead = 0; // size read from InputStream
+ UInt64 currentInPos = 0; // data that was processed, it doesn't include data in input buffer and data in enc.temp
+ UInt64 outSizeRc = 0;
- _mainStream.SetStream(outStreams[0]);
- _mainStream.Init();
- _callStream.SetStream(outStreams[1]);
- _callStream.Init();
- _jumpStream.SetStream(outStreams[2]);
- _jumpStream.Init();
- _rangeEncoder.SetStream(outStreams[3]);
- _rangeEncoder.Init();
- for (int i = 0; i < 256 + 2; i++)
- _statusEncoder[i].Init();
+ Bcj2Enc_Init(&enc);
- CMyComPtr<ICompressGetSubStreamSize> getSubStreamSize;
- {
- inStream->QueryInterface(IID_ICompressGetSubStreamSize, (void **)&getSubStreamSize);
- }
+ enc.fileIp = 0;
+ enc.fileSize = fileSize_for_Conv;
- UInt32 nowPos = 0;
- UInt64 nowPos64 = 0;
- UInt32 bufferPos = 0;
+ enc.relatLimit = _relatLim;
- Byte prevByte = 0;
+ enc.finishMode = BCJ2_ENC_FINISH_MODE_CONTINUE;
+ bool needSubSize = false;
UInt64 subStreamIndex = 0;
- UInt64 subStreamStartPos = 0;
- UInt64 subStreamEndPos = 0;
+ UInt64 subStreamStartPos = 0;
+ bool readWasFinished = false;
for (;;)
{
- UInt32 processedSize = 0;
- for (;;)
- {
- UInt32 size = kBufferSize - (bufferPos + processedSize);
- UInt32 processedSizeLoc;
- if (size == 0)
- break;
- RINOK(inStream->Read(_buffer + bufferPos + processedSize, size, &processedSizeLoc));
- if (processedSizeLoc == 0)
- break;
- processedSize += processedSizeLoc;
- }
- UInt32 endPos = bufferPos + processedSize;
-
- if (endPos < 5)
- {
- // change it
- for (bufferPos = 0; bufferPos < endPos; bufferPos++)
- {
- Byte b = _buffer[bufferPos];
- _mainStream.WriteByte(b);
- UInt32 index;
- if (b == 0xE8)
- index = prevByte;
- else if (b == 0xE9)
- index = 256;
- else if (IsJcc(prevByte, b))
- index = 257;
- else
- {
- prevByte = b;
- continue;
- }
- _statusEncoder[index].Encode(&_rangeEncoder, 0);
- prevByte = b;
- }
- return Flush();
- }
-
- bufferPos = 0;
-
- UInt32 limit = endPos - 5;
- while(bufferPos <= limit)
+ if (needSubSize && getSubStreamSize)
{
- Byte b = _buffer[bufferPos];
- _mainStream.WriteByte(b);
- if (!IsJ(prevByte, b))
+ enc.fileIp = 0;
+ enc.fileSize = fileSize_for_Conv;
+ enc.finishMode = BCJ2_ENC_FINISH_MODE_CONTINUE;
+
+ for (;;)
{
- bufferPos++;
- prevByte = b;
- continue;
- }
- Byte nextByte = _buffer[bufferPos + 4];
- UInt32 src =
- (UInt32(nextByte) << 24) |
- (UInt32(_buffer[bufferPos + 3]) << 16) |
- (UInt32(_buffer[bufferPos + 2]) << 8) |
- (_buffer[bufferPos + 1]);
- UInt32 dest = (nowPos + bufferPos + 5) + src;
- // if (Test86MSByte(nextByte))
- bool convert;
- if (getSubStreamSize != NULL)
- {
- UInt64 currentPos = (nowPos64 + bufferPos);
- while (subStreamEndPos < currentPos)
+ UInt64 subStreamSize = 0;
+ HRESULT result = getSubStreamSize->GetSubStreamSize(subStreamIndex, &subStreamSize);
+ needSubSize = false;
+
+ if (result == S_OK)
{
- UInt64 subStreamSize;
- HRESULT result = getSubStreamSize->GetSubStreamSize(subStreamIndex, &subStreamSize);
- if (result == S_OK)
+ UInt64 newEndPos = subStreamStartPos + subStreamSize;
+
+ bool isAccurateEnd = (newEndPos < totalStreamRead ||
+ (newEndPos <= totalStreamRead && readWasFinished));
+
+ if (newEndPos <= currentInPos && isAccurateEnd)
{
- subStreamStartPos = subStreamEndPos;
- subStreamEndPos += subStreamSize;
+ subStreamStartPos = newEndPos;
subStreamIndex++;
+ continue;
}
- else if (result == S_FALSE || result == E_NOTIMPL)
+
+ enc.srcLim = _bufs[BCJ2_NUM_STREAMS] + numBytes_in_ReadBuf;
+
+ if (isAccurateEnd)
{
- getSubStreamSize.Release();
- subStreamStartPos = 0;
- subStreamEndPos = subStreamStartPos - 1;
+ // data in enc.temp is possible here
+ size_t rem = (size_t)(totalStreamRead - newEndPos);
+
+ /* Pos_of(enc.src) <= old newEndPos <= newEndPos
+ in another case, it's fail in some code */
+ if ((size_t)(enc.srcLim - enc.src) < rem)
+ return E_FAIL;
+
+ enc.srcLim -= rem;
+ enc.finishMode = BCJ2_ENC_FINISH_MODE_END_BLOCK;
}
- else
- return result;
- }
- if (getSubStreamSize == NULL)
- {
- if (sizeIsDefined)
- convert = (dest < inSize);
- else
- convert = Test86MSByte(nextByte);
+
+ if (subStreamSize <= BCJ2_FileSize_MAX)
+ {
+ enc.fileIp = enc.ip + (UInt32)(subStreamStartPos - currentInPos);
+ enc.fileSize = (UInt32)subStreamSize;
+ }
+ break;
}
- else if (subStreamEndPos - subStreamStartPos > kDefaultLimit)
- convert = Test86MSByte(nextByte);
- else
+
+ if (result == S_FALSE)
+ break;
+ if (result == E_NOTIMPL)
{
- UInt64 dest64 = (currentPos + 5) + Int64(Int32(src));
- convert = (dest64 >= subStreamStartPos && dest64 < subStreamEndPos);
+ getSubStreamSize.Release();
+ break;
}
+ return result;
}
- else if (sizeIsDefined)
- convert = (dest < inSize);
- else
- convert = Test86MSByte(nextByte);
- unsigned index = GetIndex(prevByte, b);
- if (convert)
+ }
+
+ if (readWasFinished && totalStreamRead - currentInPos == Bcj2Enc_Get_InputData_Size(&enc))
+ enc.finishMode = BCJ2_ENC_FINISH_MODE_END_STREAM;
+
+ Bcj2Enc_Encode(&enc);
+
+ currentInPos = totalStreamRead - numBytes_in_ReadBuf + (enc.src - _bufs[BCJ2_NUM_STREAMS]) - enc.tempPos;
+
+ if (Bcj2Enc_IsFinished(&enc))
+ break;
+
+ if (enc.state < BCJ2_NUM_STREAMS)
+ {
+ size_t curSize = enc.bufs[enc.state] - _bufs[enc.state];
+ // printf("Write stream = %2d %6d\n", enc.state, curSize);
+ RINOK(WriteStream(outStreams[enc.state], _bufs[enc.state], curSize));
+ if (enc.state == BCJ2_STREAM_RC)
+ outSizeRc += curSize;
+
+ enc.bufs[enc.state] = _bufs[enc.state];
+ enc.lims[enc.state] = _bufs[enc.state] + _bufsCurSizes[enc.state];
+ }
+ else if (enc.state != BCJ2_ENC_STATE_ORIG)
+ return E_FAIL;
+ else
+ {
+ needSubSize = true;
+
+ if (numBytes_in_ReadBuf != (size_t)(enc.src - _bufs[BCJ2_NUM_STREAMS]))
{
- _statusEncoder[index].Encode(&_rangeEncoder, 1);
- bufferPos += 5;
- COutBuffer &s = (b == 0xE8) ? _callStream : _jumpStream;
- for (int i = 24; i >= 0; i -= 8)
- s.WriteByte((Byte)(dest >> i));
- prevByte = nextByte;
+ enc.srcLim = _bufs[BCJ2_NUM_STREAMS] + numBytes_in_ReadBuf;
+ continue;
}
- else
+
+ if (readWasFinished)
+ continue;
+
+ numBytes_in_ReadBuf = 0;
+ enc.src = _bufs[BCJ2_NUM_STREAMS];
+ enc.srcLim = _bufs[BCJ2_NUM_STREAMS];
+
+ UInt32 curSize = _bufsCurSizes[BCJ2_NUM_STREAMS];
+ RINOK(inStreams[0]->Read(_bufs[BCJ2_NUM_STREAMS], curSize, &curSize));
+
+ // printf("Read %6d bytes\n", curSize);
+ if (curSize == 0)
{
- _statusEncoder[index].Encode(&_rangeEncoder, 0);
- bufferPos++;
- prevByte = b;
+ readWasFinished = true;
+ continue;
}
+
+ numBytes_in_ReadBuf = curSize;
+ totalStreamRead += numBytes_in_ReadBuf;
+ enc.srcLim = _bufs[BCJ2_NUM_STREAMS] + numBytes_in_ReadBuf;
}
- nowPos += bufferPos;
- nowPos64 += bufferPos;
- if (progress != NULL)
+ if (progress && currentInPos - prevProgress >= (1 << 20))
{
- /*
- const UInt64 compressedSize =
- _mainStream.GetProcessedSize() +
- _callStream.GetProcessedSize() +
- _jumpStream.GetProcessedSize() +
- _rangeEncoder.GetProcessedSize();
- */
- RINOK(progress->SetRatioInfo(&nowPos64, NULL));
+ UInt64 outSize2 = currentInPos + outSizeRc + enc.bufs[BCJ2_STREAM_RC] - enc.bufs[BCJ2_STREAM_RC];
+ prevProgress = currentInPos;
+ // printf("progress %8d, %8d\n", (int)inSize2, (int)outSize2);
+ RINOK(progress->SetRatioInfo(&currentInPos, &outSize2));
}
-
- UInt32 i = 0;
- while(bufferPos < endPos)
- _buffer[i++] = _buffer[bufferPos++];
- bufferPos = i;
}
+
+ for (int i = 0; i < BCJ2_NUM_STREAMS; i++)
+ {
+ RINOK(WriteStream(outStreams[i], _bufs[i], enc.bufs[i] - _bufs[i]));
+ }
+
+ // if (currentInPos != subStreamStartPos + subStreamSize) return E_FAIL;
+
+ return S_OK;
}
-STDMETHODIMP CEncoder::Code(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams,
- ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams,
+STDMETHODIMP CEncoder::Code(ISequentialInStream * const *inStreams, const UInt64 * const *inSizes, UInt32 numInStreams,
+ ISequentialOutStream * const *outStreams, const UInt64 * const *outSizes, UInt32 numOutStreams,
ICompressProgressInfo *progress)
{
try
{
return CodeReal(inStreams, inSizes, numInStreams, outStreams, outSizes,numOutStreams, progress);
}
- catch(const COutBufferException &e) { return e.ErrorCode; }
- catch(...) { return S_FALSE; }
+ catch(...) { return E_FAIL; }
}
#endif
-STDMETHODIMP CDecoder::SetInBufSize(UInt32 streamIndex, UInt32 size) { _inBufSizes[streamIndex] = size; return S_OK; }
-STDMETHODIMP CDecoder::SetOutBufSize(UInt32 , UInt32 size) { _outBufSize = size; return S_OK; }
-CDecoder::CDecoder():
- _outBufSize(1 << 16)
+
+
+
+STDMETHODIMP CDecoder::SetInBufSize(UInt32 streamIndex, UInt32 size) { _bufsNewSizes[streamIndex] = size; return S_OK; }
+STDMETHODIMP CDecoder::SetOutBufSize(UInt32 , UInt32 size) { _bufsNewSizes[BCJ2_NUM_STREAMS] = size; return S_OK; }
+
+CDecoder::CDecoder(): _finishMode(false), _outSizeDefined(false), _outSize(0)
+{}
+
+STDMETHODIMP CDecoder::SetFinishMode(UInt32 finishMode)
+{
+ _finishMode = (finishMode != 0);
+ return S_OK;
+}
+
+void CDecoder::InitCommon()
{
- _inBufSizes[0] = 1 << 20;
- _inBufSizes[1] = 1 << 20;
- _inBufSizes[2] = 1 << 20;
- _inBufSizes[3] = 1 << 20;
+ {
+ for (int i = 0; i < BCJ2_NUM_STREAMS; i++)
+ dec.lims[i] = dec.bufs[i] = _bufs[i];
+ }
+
+ {
+ for (int i = 0; i < BCJ2_NUM_STREAMS; i++)
+ {
+ _extraReadSizes[i] = 0;
+ _inStreamsProcessed[i] = 0;
+ _readRes[i] = S_OK;
+ }
+ }
+
+ Bcj2Dec_Init(&dec);
}
-HRESULT CDecoder::CodeReal(ISequentialInStream **inStreams, const UInt64 ** /* inSizes */, UInt32 numInStreams,
- ISequentialOutStream **outStreams, const UInt64 ** /* outSizes */, UInt32 numOutStreams,
+HRESULT CDecoder::Code(ISequentialInStream * const *inStreams, const UInt64 * const *inSizes, UInt32 numInStreams,
+ ISequentialOutStream * const *outStreams, const UInt64 * const *outSizes, UInt32 numOutStreams,
ICompressProgressInfo *progress)
{
- if (numInStreams != 4 || numOutStreams != 1)
+ if (numInStreams != BCJ2_NUM_STREAMS || numOutStreams != 1)
return E_INVALIDARG;
- if (!_mainInStream.Create(_inBufSizes[0]))
- return E_OUTOFMEMORY;
- if (!_callStream.Create(_inBufSizes[1]))
- return E_OUTOFMEMORY;
- if (!_jumpStream.Create(_inBufSizes[2]))
- return E_OUTOFMEMORY;
- if (!_rangeDecoder.Create(_inBufSizes[3]))
- return E_OUTOFMEMORY;
- if (!_outStream.Create(_outBufSize))
- return E_OUTOFMEMORY;
-
- CCoderReleaser releaser(this);
-
- _mainInStream.SetStream(inStreams[0]);
- _callStream.SetStream(inStreams[1]);
- _jumpStream.SetStream(inStreams[2]);
- _rangeDecoder.SetStream(inStreams[3]);
- _outStream.SetStream(outStreams[0]);
-
- _mainInStream.Init();
- _callStream.Init();
- _jumpStream.Init();
- _rangeDecoder.Init();
- _outStream.Init();
-
- for (int i = 0; i < 256 + 2; i++)
- _statusDecoder[i].Init();
-
- Byte prevByte = 0;
- UInt32 processedBytes = 0;
+ RINOK(Alloc());
+
+ InitCommon();
+
+ dec.destLim = dec.dest = _bufs[BCJ2_NUM_STREAMS];
+
+ UInt64 outSizeProcessed = 0;
+ UInt64 prevProgress = 0;
+
+ HRESULT res = S_OK;
+
for (;;)
{
- if (processedBytes >= (1 << 20) && progress != NULL)
+ if (Bcj2Dec_Decode(&dec) != SZ_OK)
+ return S_FALSE;
+
+ if (dec.state < BCJ2_NUM_STREAMS)
{
- /*
- const UInt64 compressedSize =
- _mainInStream.GetProcessedSize() +
- _callStream.GetProcessedSize() +
- _jumpStream.GetProcessedSize() +
- _rangeDecoder.GetProcessedSize();
- */
- const UInt64 nowPos64 = _outStream.GetProcessedSize();
- RINOK(progress->SetRatioInfo(NULL, &nowPos64));
- processedBytes = 0;
+ size_t totalRead = _extraReadSizes[dec.state];
+ {
+ Byte *buf = _bufs[dec.state];
+ for (size_t i = 0; i < totalRead; i++)
+ buf[i] = dec.bufs[dec.state][i];
+ dec.lims[dec.state] =
+ dec.bufs[dec.state] = buf;
+ }
+
+ if (_readRes[dec.state] != S_OK)
+ {
+ res = _readRes[dec.state];
+ break;
+ }
+
+ do
+ {
+ UInt32 curSize = _bufsCurSizes[dec.state] - (UInt32)totalRead;
+ /*
+ we want to call Read even even if size is 0
+ if (inSizes && inSizes[dec.state])
+ {
+ UInt64 rem = *inSizes[dec.state] - _inStreamsProcessed[dec.state];
+ if (curSize > rem)
+ curSize = (UInt32)rem;
+ }
+ */
+
+ HRESULT res2 = inStreams[dec.state]->Read(_bufs[dec.state] + totalRead, curSize, &curSize);
+ _readRes[dec.state] = res2;
+ if (curSize == 0)
+ break;
+ _inStreamsProcessed[dec.state] += curSize;
+ totalRead += curSize;
+ if (res2 != S_OK)
+ break;
+ }
+ while (totalRead < 4 && BCJ2_IS_32BIT_STREAM(dec.state));
+
+ if (_readRes[dec.state] != S_OK)
+ res = _readRes[dec.state];
+
+ if (totalRead == 0)
+ break;
+
+ // res == S_OK;
+
+ if (BCJ2_IS_32BIT_STREAM(dec.state))
+ {
+ unsigned extraSize = ((unsigned)totalRead & 3);
+ _extraReadSizes[dec.state] = extraSize;
+ if (totalRead < 4)
+ {
+ res = (_readRes[dec.state] != S_OK) ? _readRes[dec.state] : S_FALSE;
+ break;
+ }
+ totalRead -= extraSize;
+ }
+
+ dec.lims[dec.state] = _bufs[dec.state] + totalRead;
}
- UInt32 i;
- Byte b = 0;
- const UInt32 kBurstSize = (1 << 18);
- for (i = 0; i < kBurstSize; i++)
+ else // if (dec.state <= BCJ2_STATE_ORIG)
{
- if (!_mainInStream.ReadByte(b))
- return Flush();
- _outStream.WriteByte(b);
- if (IsJ(prevByte, b))
- break;
- prevByte = b;
+ size_t curSize = dec.dest - _bufs[BCJ2_NUM_STREAMS];
+ if (curSize != 0)
+ {
+ outSizeProcessed += curSize;
+ RINOK(WriteStream(outStreams[0], _bufs[BCJ2_NUM_STREAMS], curSize));
+ }
+ dec.dest = _bufs[BCJ2_NUM_STREAMS];
+ {
+ size_t rem = _bufsCurSizes[BCJ2_NUM_STREAMS];
+ if (outSizes && outSizes[0])
+ {
+ UInt64 outSize = *outSizes[0] - outSizeProcessed;
+ if (rem > outSize)
+ rem = (size_t)outSize;
+ }
+ dec.destLim = dec.dest + rem;
+ if (rem == 0)
+ break;
+ }
}
- processedBytes += i;
- if (i == kBurstSize)
- continue;
- unsigned index = GetIndex(prevByte, b);
- if (_statusDecoder[index].Decode(&_rangeDecoder) == 1)
+
+ if (progress)
{
- UInt32 src = 0;
- CInBuffer &s = (b == 0xE8) ? _callStream : _jumpStream;
- for (int i = 0; i < 4; i++)
+ UInt64 outSize2 = outSizeProcessed + (dec.dest - _bufs[BCJ2_NUM_STREAMS]);
+ if (outSize2 - prevProgress >= (1 << 22))
{
- Byte b0;
- if(!s.ReadByte(b0))
+ UInt64 inSize2 = outSize2 + _inStreamsProcessed[BCJ2_STREAM_RC] - (dec.lims[BCJ2_STREAM_RC] - dec.bufs[BCJ2_STREAM_RC]);
+ RINOK(progress->SetRatioInfo(&inSize2, &outSize2));
+ prevProgress = outSize2;
+ }
+ }
+ }
+
+ size_t curSize = dec.dest - _bufs[BCJ2_NUM_STREAMS];
+ if (curSize != 0)
+ {
+ outSizeProcessed += curSize;
+ RINOK(WriteStream(outStreams[0], _bufs[BCJ2_NUM_STREAMS], curSize));
+ }
+
+ if (res != S_OK)
+ return res;
+
+ if (_finishMode)
+ {
+ if (!Bcj2Dec_IsFinished(&dec))
+ return S_FALSE;
+
+ // we still allow the cases when input streams are larger than required for decoding.
+ // so the case (dec.state == BCJ2_STATE_ORIG) is also allowed, if MAIN stream is larger than required.
+ if (dec.state != BCJ2_STREAM_MAIN &&
+ dec.state != BCJ2_DEC_STATE_ORIG)
+ return S_FALSE;
+
+ if (inSizes)
+ {
+ for (int i = 0; i < BCJ2_NUM_STREAMS; i++)
+ {
+ size_t rem = dec.lims[i] - dec.bufs[i] + _extraReadSizes[i];
+ /*
+ if (rem != 0)
+ return S_FALSE;
+ */
+ if (inSizes[i] && *inSizes[i] != _inStreamsProcessed[i] - rem)
return S_FALSE;
- src <<= 8;
- src |= ((UInt32)b0);
}
- UInt32 dest = src - (UInt32(_outStream.GetProcessedSize()) + 4) ;
- _outStream.WriteByte((Byte)(dest));
- _outStream.WriteByte((Byte)(dest >> 8));
- _outStream.WriteByte((Byte)(dest >> 16));
- _outStream.WriteByte((Byte)(dest >> 24));
- prevByte = (Byte)(dest >> 24);
- processedBytes += 4;
}
- else
- prevByte = b;
}
+
+ return S_OK;
}
-STDMETHODIMP CDecoder::Code(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams,
- ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams,
- ICompressProgressInfo *progress)
+STDMETHODIMP CDecoder::SetInStream2(UInt32 streamIndex, ISequentialInStream *inStream)
{
- try
+ inStreams[streamIndex] = inStream;
+ return S_OK;
+}
+
+STDMETHODIMP CDecoder::ReleaseInStream2(UInt32 streamIndex)
+{
+ inStreams[streamIndex].Release();
+ return S_OK;
+}
+
+STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize)
+{
+ _outSizeDefined = (outSize != NULL);
+ _outSize = 0;
+ if (_outSizeDefined)
+ _outSize = *outSize;
+
+ _outSize_Processed = 0;
+
+ HRESULT res = Alloc(false);
+
+ InitCommon();
+ dec.destLim = dec.dest = NULL;
+
+ return res;
+}
+
+
+STDMETHODIMP CDecoder::Read(void *data, UInt32 size, UInt32 *processedSize)
+{
+ if (processedSize)
+ *processedSize = 0;
+
+ if (size == 0)
+ return S_OK;
+
+ UInt32 totalProcessed = 0;
+
+ if (_outSizeDefined)
{
- return CodeReal(inStreams, inSizes, numInStreams, outStreams, outSizes,numOutStreams, progress);
+ UInt64 rem = _outSize - _outSize_Processed;
+ if (size > rem)
+ size = (UInt32)rem;
+ }
+ dec.dest = (Byte *)data;
+ dec.destLim = (const Byte *)data + size;
+
+ HRESULT res = S_OK;
+
+ for (;;)
+ {
+ SRes sres = Bcj2Dec_Decode(&dec);
+ if (sres != SZ_OK)
+ return S_FALSE;
+
+ {
+ UInt32 curSize = (UInt32)(dec.dest - (Byte *)data);
+ if (curSize != 0)
+ {
+ totalProcessed += curSize;
+ if (processedSize)
+ *processedSize = totalProcessed;
+ data = (void *)((Byte *)data + curSize);
+ size -= curSize;
+ _outSize_Processed += curSize;
+ }
+ }
+
+ if (dec.state >= BCJ2_NUM_STREAMS)
+ break;
+
+ {
+ size_t totalRead = _extraReadSizes[dec.state];
+ {
+ Byte *buf = _bufs[dec.state];
+ for (size_t i = 0; i < totalRead; i++)
+ buf[i] = dec.bufs[dec.state][i];
+ dec.lims[dec.state] =
+ dec.bufs[dec.state] = buf;
+ }
+
+ if (_readRes[dec.state] != S_OK)
+ return _readRes[dec.state];
+
+ do
+ {
+ UInt32 curSize = _bufsCurSizes[dec.state] - (UInt32)totalRead;
+ HRESULT res2 = inStreams[dec.state]->Read(_bufs[dec.state] + totalRead, curSize, &curSize);
+ _readRes[dec.state] = res2;
+ if (curSize == 0)
+ break;
+ _inStreamsProcessed[dec.state] += curSize;
+ totalRead += curSize;
+ if (res2 != S_OK)
+ break;
+ }
+ while (totalRead < 4 && BCJ2_IS_32BIT_STREAM(dec.state));
+
+ if (totalRead == 0)
+ {
+ if (totalProcessed == 0)
+ res = _readRes[dec.state];
+ break;
+ }
+
+ if (BCJ2_IS_32BIT_STREAM(dec.state))
+ {
+ unsigned extraSize = ((unsigned)totalRead & 3);
+ _extraReadSizes[dec.state] = extraSize;
+ if (totalRead < 4)
+ {
+ if (totalProcessed != 0)
+ return S_OK;
+ return (_readRes[dec.state] != S_OK) ? _readRes[dec.state] : S_FALSE;
+ }
+ totalRead -= extraSize;
+ }
+
+ dec.lims[dec.state] = _bufs[dec.state] + totalRead;
+ }
+ }
+
+ if (_finishMode && _outSizeDefined && _outSize == _outSize_Processed)
+ {
+ if (!Bcj2Dec_IsFinished(&dec))
+ return S_FALSE;
+
+ if (dec.state != BCJ2_STREAM_MAIN &&
+ dec.state != BCJ2_DEC_STATE_ORIG)
+ return S_FALSE;
+
+ /*
+ for (int i = 0; i < BCJ2_NUM_STREAMS; i++)
+ if (dec.bufs[i] != dec.lims[i] || _extraReadSizes[i] != 0)
+ return S_FALSE;
+ */
}
- catch(const CInBufferException &e) { return e.ErrorCode; }
- catch(const COutBufferException &e) { return e.ErrorCode; }
- catch(...) { return S_FALSE; }
+
+ return res;
}
}}
diff --git a/3rdparty/lzma/CPP/7zip/Compress/Bcj2Coder.h b/3rdparty/lzma/CPP/7zip/Compress/Bcj2Coder.h
index 79a713f1711..627e505d184 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/Bcj2Coder.h
+++ b/3rdparty/lzma/CPP/7zip/Compress/Bcj2Coder.h
@@ -3,60 +3,57 @@
#ifndef __COMPRESS_BCJ2_CODER_H
#define __COMPRESS_BCJ2_CODER_H
+#include "../../../C/Bcj2.h"
+
#include "../../Common/MyCom.h"
#include "../ICoder.h"
-#include "RangeCoderBit.h"
-
namespace NCompress {
namespace NBcj2 {
-const int kNumMoveBits = 5;
+class CBaseCoder
+{
+protected:
+ Byte *_bufs[BCJ2_NUM_STREAMS + 1];
+ UInt32 _bufsCurSizes[BCJ2_NUM_STREAMS + 1];
+ UInt32 _bufsNewSizes[BCJ2_NUM_STREAMS + 1];
+
+ HRESULT Alloc(bool allocForOrig = true);
+public:
+ CBaseCoder();
+ ~CBaseCoder();
+};
+
#ifndef EXTRACT_ONLY
class CEncoder:
public ICompressCoder2,
- public CMyUnknownImp
+ public ICompressSetCoderProperties,
+ public ICompressSetBufSize,
+ public CMyUnknownImp,
+ public CBaseCoder
{
- Byte *_buffer;
- bool Create();
-
- COutBuffer _mainStream;
- COutBuffer _callStream;
- COutBuffer _jumpStream;
- NCompress::NRangeCoder::CEncoder _rangeEncoder;
- NCompress::NRangeCoder::CBitEncoder<kNumMoveBits> _statusEncoder[256 + 2];
+ UInt32 _relatLim;
- HRESULT Flush();
-public:
- void ReleaseStreams()
- {
- _mainStream.ReleaseStream();
- _callStream.ReleaseStream();
- _jumpStream.ReleaseStream();
- _rangeEncoder.ReleaseStream();
- }
-
- class CCoderReleaser
- {
- CEncoder *_coder;
- public:
- CCoderReleaser(CEncoder *coder): _coder(coder) {}
- ~CCoderReleaser() { _coder->ReleaseStreams(); }
- };
+ HRESULT CodeReal(ISequentialInStream * const *inStreams, const UInt64 * const *inSizes, UInt32 numInStreams,
+ ISequentialOutStream * const *outStreams, const UInt64 * const *outSizes, UInt32 numOutStreams,
+ ICompressProgressInfo *progress);
public:
- MY_UNKNOWN_IMP
+ MY_UNKNOWN_IMP3(ICompressCoder2, ICompressSetCoderProperties, ICompressSetBufSize)
- HRESULT CodeReal(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams,
- ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams,
- ICompressProgressInfo *progress);
- STDMETHOD(Code)(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams,
- ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams,
+ STDMETHOD(Code)(ISequentialInStream * const *inStreams, const UInt64 * const *inSizes, UInt32 numInStreams,
+ ISequentialOutStream * const *outStreams, const UInt64 * const *outSizes, UInt32 numOutStreams,
ICompressProgressInfo *progress);
- CEncoder(): _buffer(0) {};
+
+ STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps);
+
+ STDMETHOD(SetInBufSize)(UInt32 streamIndex, UInt32 size);
+ STDMETHOD(SetOutBufSize)(UInt32 streamIndex, UInt32 size);
+
+ CEncoder();
~CEncoder();
};
@@ -64,49 +61,54 @@ public:
class CDecoder:
public ICompressCoder2,
+ public ICompressSetFinishMode,
+ public ICompressSetInStream2,
+ public ISequentialInStream,
+ public ICompressSetOutStreamSize,
public ICompressSetBufSize,
- public CMyUnknownImp
+ public CMyUnknownImp,
+ public CBaseCoder
{
- CInBuffer _mainInStream;
- CInBuffer _callStream;
- CInBuffer _jumpStream;
- NCompress::NRangeCoder::CDecoder _rangeDecoder;
- NCompress::NRangeCoder::CBitDecoder<kNumMoveBits> _statusDecoder[256 + 2];
+ unsigned _extraReadSizes[BCJ2_NUM_STREAMS];
+ UInt64 _inStreamsProcessed[BCJ2_NUM_STREAMS];
+ HRESULT _readRes[BCJ2_NUM_STREAMS];
+ CMyComPtr<ISequentialInStream> inStreams[BCJ2_NUM_STREAMS];
+
+ bool _finishMode;
+ bool _outSizeDefined;
+ UInt64 _outSize;
+ UInt64 _outSize_Processed;
+ CBcj2Dec dec;
+
+ void InitCommon();
+ // HRESULT ReadSpec();
+
+public:
+ MY_UNKNOWN_IMP6(
+ ICompressCoder2,
+ ICompressSetFinishMode,
+ ICompressSetInStream2,
+ ISequentialInStream,
+ ICompressSetOutStreamSize,
+ ICompressSetBufSize
+ );
+
+ STDMETHOD(Code)(ISequentialInStream * const *inStreams, const UInt64 * const *inSizes, UInt32 numInStreams,
+ ISequentialOutStream * const *outStreams, const UInt64 * const *outSizes, UInt32 numOutStreams,
+ ICompressProgressInfo *progress);
- COutBuffer _outStream;
- UInt32 _inBufSizes[4];
- UInt32 _outBufSize;
+ STDMETHOD(SetFinishMode)(UInt32 finishMode);
-public:
- void ReleaseStreams()
- {
- _mainInStream.ReleaseStream();
- _callStream.ReleaseStream();
- _jumpStream.ReleaseStream();
- _rangeDecoder.ReleaseStream();
- _outStream.ReleaseStream();
- }
-
- HRESULT Flush() { return _outStream.Flush(); }
- class CCoderReleaser
- {
- CDecoder *_coder;
- public:
- CCoderReleaser(CDecoder *coder): _coder(coder) {}
- ~CCoderReleaser() { _coder->ReleaseStreams(); }
- };
+ STDMETHOD(SetInStream2)(UInt32 streamIndex, ISequentialInStream *inStream);
+ STDMETHOD(ReleaseInStream2)(UInt32 streamIndex);
-public:
- MY_UNKNOWN_IMP1(ICompressSetBufSize);
- HRESULT CodeReal(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams,
- ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams,
- ICompressProgressInfo *progress);
- STDMETHOD(Code)(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams,
- ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams,
- ICompressProgressInfo *progress);
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+
+ STDMETHOD(SetOutStreamSize)(const UInt64 *outSize);
STDMETHOD(SetInBufSize)(UInt32 streamIndex, UInt32 size);
STDMETHOD(SetOutBufSize)(UInt32 streamIndex, UInt32 size);
+
CDecoder();
};
diff --git a/3rdparty/lzma/CPP/7zip/Compress/Bcj2Register.cpp b/3rdparty/lzma/CPP/7zip/Compress/Bcj2Register.cpp
index 8eb1e73609b..ef37ae0cba4 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/Bcj2Register.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/Bcj2Register.cpp
@@ -6,14 +6,14 @@
#include "Bcj2Coder.h"
-static void *CreateCodec() { return (void *)(ICompressCoder2 *)(new NCompress::NBcj2::CDecoder()); }
+REGISTER_CODEC_CREATE_2(CreateCodec, NCompress::NBcj2::CDecoder(), ICompressCoder2)
#ifndef EXTRACT_ONLY
-static void *CreateCodecOut() { return (void *)(ICompressCoder2 *)(new NCompress::NBcj2::CEncoder()); }
+REGISTER_CODEC_CREATE_2(CreateCodecOut, NCompress::NBcj2::CEncoder(), ICompressCoder2)
#else
-#define CreateCodecOut 0
+#define CreateCodecOut NULL
#endif
-static CCodecInfo g_CodecInfo =
- { CreateCodec, CreateCodecOut, 0x0303011B, L"BCJ2", 4, false };
+REGISTER_CODEC_VAR
+ { CreateCodec, CreateCodecOut, 0x303011B, "BCJ2", 4, false };
REGISTER_CODEC(BCJ2)
diff --git a/3rdparty/lzma/CPP/7zip/Compress/BcjCoder.cpp b/3rdparty/lzma/CPP/7zip/Compress/BcjCoder.cpp
index 0e34ef48880..37815dceb17 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/BcjCoder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/BcjCoder.cpp
@@ -4,12 +4,16 @@
#include "BcjCoder.h"
-UInt32 CBCJ_x86_Encoder::SubFilter(Byte *data, UInt32 size)
+STDMETHODIMP CBcjCoder::Init()
{
- return (UInt32)::x86_Convert(data, size, _bufferPos, &_prevMask, 1);
+ _bufferPos = 0;
+ x86_Convert_Init(_prevMask);
+ return S_OK;
}
-UInt32 CBCJ_x86_Decoder::SubFilter(Byte *data, UInt32 size)
+STDMETHODIMP_(UInt32) CBcjCoder::Filter(Byte *data, UInt32 size)
{
- return (UInt32)::x86_Convert(data, size, _bufferPos, &_prevMask, 0);
+ UInt32 processed = (UInt32)::x86_Convert(data, size, _bufferPos, &_prevMask, _encode);
+ _bufferPos += processed;
+ return processed;
}
diff --git a/3rdparty/lzma/CPP/7zip/Compress/BcjCoder.h b/3rdparty/lzma/CPP/7zip/Compress/BcjCoder.h
index 0754bcd23cf..275fd4f2431 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/BcjCoder.h
+++ b/3rdparty/lzma/CPP/7zip/Compress/BcjCoder.h
@@ -5,15 +5,22 @@
#include "../../../C/Bra.h"
-#include "BranchCoder.h"
+#include "../../Common/MyCom.h"
-struct CBranch86
+#include "../ICoder.h"
+
+class CBcjCoder:
+ public ICompressFilter,
+ public CMyUnknownImp
{
+ UInt32 _bufferPos;
UInt32 _prevMask;
- void x86Init() { x86_Convert_Init(_prevMask); }
-};
+ int _encode;
+public:
+ MY_UNKNOWN_IMP;
+ INTERFACE_ICompressFilter(;)
-MyClassB(BCJ_x86, 0x01, 3, CBranch86 ,
- virtual void SubInit() { x86Init(); })
+ CBcjCoder(int encode): _bufferPos(0), _encode(encode) { x86_Convert_Init(_prevMask); }
+};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Compress/BcjRegister.cpp b/3rdparty/lzma/CPP/7zip/Compress/BcjRegister.cpp
index 648ad8e0363..83c6830fbc9 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/BcjRegister.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/BcjRegister.cpp
@@ -6,14 +6,7 @@
#include "BcjCoder.h"
-static void *CreateCodec() { return (void *)(ICompressFilter *)(new CBCJ_x86_Decoder()); }
-#ifndef EXTRACT_ONLY
-static void *CreateCodecOut() { return (void *)(ICompressFilter *)(new CBCJ_x86_Encoder()); }
-#else
-#define CreateCodecOut 0
-#endif
-
-static CCodecInfo g_CodecInfo =
- { CreateCodec, CreateCodecOut, 0x03030103, L"BCJ", 1, true };
-
-REGISTER_CODEC(BCJ)
+REGISTER_FILTER_E(BCJ,
+ CBcjCoder(false),
+ CBcjCoder(true),
+ 0x3030103, "BCJ")
diff --git a/3rdparty/lzma/CPP/7zip/Compress/BranchCoder.cpp b/3rdparty/lzma/CPP/7zip/Compress/BranchCoder.cpp
deleted file mode 100644
index 431709526a0..00000000000
--- a/3rdparty/lzma/CPP/7zip/Compress/BranchCoder.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// BranchCoder.cpp
-
-#include "StdAfx.h"
-
-#include "BranchCoder.h"
-
-STDMETHODIMP CBranchConverter::Init()
-{
- _bufferPos = 0;
- SubInit();
- return S_OK;
-}
-
-STDMETHODIMP_(UInt32) CBranchConverter::Filter(Byte *data, UInt32 size)
-{
- UInt32 processedSize = SubFilter(data, size);
- _bufferPos += processedSize;
- return processedSize;
-}
diff --git a/3rdparty/lzma/CPP/7zip/Compress/BranchCoder.h b/3rdparty/lzma/CPP/7zip/Compress/BranchCoder.h
deleted file mode 100644
index 0e3a5c4e101..00000000000
--- a/3rdparty/lzma/CPP/7zip/Compress/BranchCoder.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// BranchCoder.h
-
-#ifndef __COMPRESS_BRANCH_CODER_H
-#define __COMPRESS_BRANCH_CODER_H
-
-#include "../../Common/MyCom.h"
-
-#include "../ICoder.h"
-
-class CBranchConverter:
- public ICompressFilter,
- public CMyUnknownImp
-{
-protected:
- UInt32 _bufferPos;
- virtual void SubInit() {}
- virtual UInt32 SubFilter(Byte *data, UInt32 size) = 0;
-public:
- MY_UNKNOWN_IMP;
- STDMETHOD(Init)();
- STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size);
-};
-
-#define MyClassEncoderA(Name) class C ## Name: public CBranchConverter \
- { public: UInt32 SubFilter(Byte *data, UInt32 size); };
-
-#define MyClassDecoderA(Name) class C ## Name: public CBranchConverter \
- { public: UInt32 SubFilter(Byte *data, UInt32 size); };
-
-#define MyClassEncoderB(Name, ADD_ITEMS, ADD_INIT) class C ## Name: public CBranchConverter, public ADD_ITEMS \
- { public: UInt32 SubFilter(Byte *data, UInt32 size); ADD_INIT};
-
-#define MyClassDecoderB(Name, ADD_ITEMS, ADD_INIT) class C ## Name: public CBranchConverter, public ADD_ITEMS \
- { public: UInt32 SubFilter(Byte *data, UInt32 size); ADD_INIT};
-
-#define MyClassA(Name, id, subId) \
-MyClassEncoderA(Name ## _Encoder) \
-MyClassDecoderA(Name ## _Decoder)
-
-#define MyClassB(Name, id, subId, ADD_ITEMS, ADD_INIT) \
-MyClassEncoderB(Name ## _Encoder, ADD_ITEMS, ADD_INIT) \
-MyClassDecoderB(Name ## _Decoder, ADD_ITEMS, ADD_INIT)
-
-#endif
diff --git a/3rdparty/lzma/CPP/7zip/Compress/BranchMisc.cpp b/3rdparty/lzma/CPP/7zip/Compress/BranchMisc.cpp
index 423b723ab0d..0bf39b79ca0 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/BranchMisc.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/BranchMisc.cpp
@@ -2,36 +2,17 @@
#include "StdAfx.h"
-#include "../../../C/Bra.h"
-
#include "BranchMisc.h"
-UInt32 CBC_ARM_Encoder::SubFilter(Byte *data, UInt32 size)
- { return (UInt32)::ARM_Convert(data, size, _bufferPos, 1); }
-
-UInt32 CBC_ARM_Decoder::SubFilter(Byte *data, UInt32 size)
- { return (UInt32)::ARM_Convert(data, size, _bufferPos, 0); }
-
-UInt32 CBC_ARMT_Encoder::SubFilter(Byte *data, UInt32 size)
- { return (UInt32)::ARMT_Convert(data, size, _bufferPos, 1); }
-
-UInt32 CBC_ARMT_Decoder::SubFilter(Byte *data, UInt32 size)
- { return (UInt32)::ARMT_Convert(data, size, _bufferPos, 0); }
-
-UInt32 CBC_PPC_Encoder::SubFilter(Byte *data, UInt32 size)
- { return (UInt32)::PPC_Convert(data, size, _bufferPos, 1); }
-
-UInt32 CBC_PPC_Decoder::SubFilter(Byte *data, UInt32 size)
- { return (UInt32)::PPC_Convert(data, size, _bufferPos, 0); }
-
-UInt32 CBC_SPARC_Encoder::SubFilter(Byte *data, UInt32 size)
- { return (UInt32)::SPARC_Convert(data, size, _bufferPos, 1); }
-
-UInt32 CBC_SPARC_Decoder::SubFilter(Byte *data, UInt32 size)
- { return (UInt32)::SPARC_Convert(data, size, _bufferPos, 0); }
-
-UInt32 CBC_IA64_Encoder::SubFilter(Byte *data, UInt32 size)
- { return (UInt32)::IA64_Convert(data, size, _bufferPos, 1); }
-
-UInt32 CBC_IA64_Decoder::SubFilter(Byte *data, UInt32 size)
- { return (UInt32)::IA64_Convert(data, size, _bufferPos, 0); }
+STDMETHODIMP CBranchCoder::Init()
+{
+ _bufferPos = 0;
+ return S_OK;
+}
+
+STDMETHODIMP_(UInt32) CBranchCoder::Filter(Byte *data, UInt32 size)
+{
+ UInt32 processed = (UInt32)BraFunc(data, size, _bufferPos, _encode);
+ _bufferPos += processed;
+ return processed;
+}
diff --git a/3rdparty/lzma/CPP/7zip/Compress/BranchMisc.h b/3rdparty/lzma/CPP/7zip/Compress/BranchMisc.h
index 81198b21c4f..bbb5add9c5d 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/BranchMisc.h
+++ b/3rdparty/lzma/CPP/7zip/Compress/BranchMisc.h
@@ -3,12 +3,28 @@
#ifndef __COMPRESS_BRANCH_MISC_H
#define __COMPRESS_BRANCH_MISC_H
-#include "BranchCoder.h"
+#include "../../Common/MyCom.h"
-MyClassA(BC_ARM, 0x05, 1)
-MyClassA(BC_ARMT, 0x07, 1)
-MyClassA(BC_PPC, 0x02, 5)
-MyClassA(BC_SPARC, 0x08, 5)
-MyClassA(BC_IA64, 0x04, 1)
+#include "../ICoder.h"
+
+EXTERN_C_BEGIN
+
+typedef SizeT (*Func_Bra)(Byte *data, SizeT size, UInt32 ip, int encoding);
+
+EXTERN_C_END
+
+class CBranchCoder:
+ public ICompressFilter,
+ public CMyUnknownImp
+{
+ UInt32 _bufferPos;
+ int _encode;
+ Func_Bra BraFunc;
+public:
+ MY_UNKNOWN_IMP;
+ INTERFACE_ICompressFilter(;)
+
+ CBranchCoder(Func_Bra bra, int encode): _bufferPos(0), _encode(encode), BraFunc(bra) {}
+};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Compress/BranchRegister.cpp b/3rdparty/lzma/CPP/7zip/Compress/BranchRegister.cpp
index 380828c6d80..e1fcff6dcd4 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/BranchRegister.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/BranchRegister.cpp
@@ -2,29 +2,35 @@
#include "StdAfx.h"
+#include "../../../C/Bra.h"
+
#include "../Common/RegisterCodec.h"
#include "BranchMisc.h"
-#define CREATE_CODEC(x) \
- static void *CreateCodec ## x() { return (void *)(ICompressFilter *)(new C ## x ## _Decoder); } \
- static void *CreateCodec ## x ## Out() { return (void *)(ICompressFilter *)(new C ## x ## _Encoder); }
+#define CREATE_BRA(n) \
+ REGISTER_FILTER_CREATE(CreateBra_Decoder_ ## n, CBranchCoder(n ## _Convert, false)) \
+ REGISTER_FILTER_CREATE(CreateBra_Encoder_ ## n, CBranchCoder(n ## _Convert, true)) \
-CREATE_CODEC(BC_PPC)
-CREATE_CODEC(BC_IA64)
-CREATE_CODEC(BC_ARM)
-CREATE_CODEC(BC_ARMT)
-CREATE_CODEC(BC_SPARC)
+CREATE_BRA(PPC)
+CREATE_BRA(IA64)
+CREATE_BRA(ARM)
+CREATE_BRA(ARMT)
+CREATE_BRA(SPARC)
-#define METHOD_ITEM(x, id1, id2, name) { CreateCodec ## x, CreateCodec ## x ## Out, 0x03030000 + (id1 * 256) + id2, name, 1, true }
+#define METHOD_ITEM(n, id, name) \
+ REGISTER_FILTER_ITEM( \
+ CreateBra_Decoder_ ## n, \
+ CreateBra_Encoder_ ## n, \
+ 0x3030000 + id, name)
-static CCodecInfo g_CodecsInfo[] =
+REGISTER_CODECS_VAR
{
- METHOD_ITEM(BC_PPC, 0x02, 0x05, L"PPC"),
- METHOD_ITEM(BC_IA64, 0x04, 1, L"IA64"),
- METHOD_ITEM(BC_ARM, 0x05, 1, L"ARM"),
- METHOD_ITEM(BC_ARMT, 0x07, 1, L"ARMT"),
- METHOD_ITEM(BC_SPARC, 0x08, 0x05, L"SPARC")
+ METHOD_ITEM(PPC, 0x205, "PPC"),
+ METHOD_ITEM(IA64, 0x401, "IA64"),
+ METHOD_ITEM(ARM, 0x501, "ARM"),
+ METHOD_ITEM(ARMT, 0x701, "ARMT"),
+ METHOD_ITEM(SPARC, 0x805, "SPARC")
};
REGISTER_CODECS(Branch)
diff --git a/3rdparty/lzma/CPP/7zip/Compress/ByteSwap.cpp b/3rdparty/lzma/CPP/7zip/Compress/ByteSwap.cpp
index 645b6ffcda2..f5620d6ce42 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/ByteSwap.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/ByteSwap.cpp
@@ -14,8 +14,7 @@ class CByteSwap2:
{
public:
MY_UNKNOWN_IMP
- STDMETHOD(Init)();
- STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size);
+ INTERFACE_ICompressFilter(;)
};
class CByteSwap4:
@@ -24,8 +23,7 @@ class CByteSwap4:
{
public:
MY_UNKNOWN_IMP
- STDMETHOD(Init)();
- STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size);
+ INTERFACE_ICompressFilter(;)
};
STDMETHODIMP CByteSwap2::Init() { return S_OK; }
@@ -33,14 +31,22 @@ STDMETHODIMP CByteSwap2::Init() { return S_OK; }
STDMETHODIMP_(UInt32) CByteSwap2::Filter(Byte *data, UInt32 size)
{
const UInt32 kStep = 2;
- UInt32 i;
- for (i = 0; i + kStep <= size; i += kStep)
+ if (size < kStep)
+ return 0;
+ size &= ~(kStep - 1);
+
+ const Byte *end = data + (size_t)size;
+
+ do
{
- Byte b = data[i];
- data[i] = data[i + 1];
- data[i + 1] = b;
+ Byte b0 = data[0];
+ data[0] = data[1];
+ data[1] = b0;
+ data += kStep;
}
- return i;
+ while (data != end);
+
+ return size;
}
STDMETHODIMP CByteSwap4::Init() { return S_OK; }
@@ -48,26 +54,34 @@ STDMETHODIMP CByteSwap4::Init() { return S_OK; }
STDMETHODIMP_(UInt32) CByteSwap4::Filter(Byte *data, UInt32 size)
{
const UInt32 kStep = 4;
- UInt32 i;
- for (i = 0; i + kStep <= size; i += kStep)
+ if (size < kStep)
+ return 0;
+ size &= ~(kStep - 1);
+
+ const Byte *end = data + (size_t)size;
+
+ do
{
- Byte b0 = data[i];
- Byte b1 = data[i + 1];
- data[i] = data[i + 3];
- data[i + 1] = data[i + 2];
- data[i + 2] = b1;
- data[i + 3] = b0;
+ Byte b0 = data[0];
+ Byte b1 = data[1];
+ data[0] = data[3];
+ data[1] = data[2];
+ data[2] = b1;
+ data[3] = b0;
+ data += kStep;
}
- return i;
+ while (data != end);
+
+ return size;
}
-static void *CreateCodec2() { return (void *)(ICompressFilter *)(new CByteSwap2); }
-static void *CreateCodec4() { return (void *)(ICompressFilter *)(new CByteSwap4); }
+REGISTER_FILTER_CREATE(CreateFilter2, CByteSwap2())
+REGISTER_FILTER_CREATE(CreateFilter4, CByteSwap4())
-static CCodecInfo g_CodecsInfo[] =
+REGISTER_CODECS_VAR
{
- { CreateCodec2, CreateCodec2, 0x020302, L"Swap2", 1, true },
- { CreateCodec4, CreateCodec4, 0x020304, L"Swap4", 1, true }
+ REGISTER_FILTER_ITEM(CreateFilter2, CreateFilter2, 0x20302, "Swap2"),
+ REGISTER_FILTER_ITEM(CreateFilter4, CreateFilter4, 0x20304, "Swap4")
};
REGISTER_CODECS(ByteSwap)
diff --git a/3rdparty/lzma/CPP/7zip/Compress/CodecExports.cpp b/3rdparty/lzma/CPP/7zip/Compress/CodecExports.cpp
index 4ff1c0fcb0a..99085040d07 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/CodecExports.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/CodecExports.cpp
@@ -2,110 +2,168 @@
#include "StdAfx.h"
+#include "../../../C/CpuArch.h"
+
#include "../../Common/ComTry.h"
+#include "../../Common/MyCom.h"
-#include "../../Windows/PropVariant.h"
+#include "../../Windows/Defs.h"
#include "../ICoder.h"
#include "../Common/RegisterCodec.h"
-extern unsigned int g_NumCodecs;
+extern unsigned g_NumCodecs;
extern const CCodecInfo *g_Codecs[];
-static const UInt16 kDecodeId = 0x2790;
-
-DEFINE_GUID(CLSID_CCodec,
-0x23170F69, 0x40C1, kDecodeId, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+extern unsigned g_NumHashers;
+extern const CHasherInfo *g_Hashers[];
-static inline HRESULT SetPropString(const char *s, unsigned int size, PROPVARIANT *value)
+static void SetPropFromAscii(const char *s, PROPVARIANT *prop) throw()
{
- if ((value->bstrVal = ::SysAllocStringByteLen(s, size)) != 0)
- value->vt = VT_BSTR;
- return S_OK;
+ UINT len = (UINT)strlen(s);
+ BSTR dest = ::SysAllocStringLen(NULL, len);
+ if (dest)
+ {
+ for (UINT i = 0; i <= len; i++)
+ dest[i] = (Byte)s[i];
+ prop->bstrVal = dest;
+ prop->vt = VT_BSTR;
+ }
}
-static inline HRESULT SetPropGUID(const GUID &guid, PROPVARIANT *value)
+static inline HRESULT SetPropGUID(const GUID &guid, PROPVARIANT *value) throw()
{
- return SetPropString((const char *)&guid, sizeof(GUID), value);
+ if ((value->bstrVal = ::SysAllocStringByteLen((const char *)&guid, sizeof(guid))) != NULL)
+ value->vt = VT_BSTR;
+ return S_OK;
}
-static HRESULT SetClassID(CMethodId id, bool encode, PROPVARIANT *value)
+static HRESULT MethodToClassID(UInt16 typeId, CMethodId id, PROPVARIANT *value) throw()
{
- GUID clsId = CLSID_CCodec;
- for (int i = 0; i < sizeof(id); i++, id >>= 8)
- clsId.Data4[i] = (Byte)(id & 0xFF);
- if (encode)
- clsId.Data3++;
+ GUID clsId;
+ clsId.Data1 = k_7zip_GUID_Data1;
+ clsId.Data2 = k_7zip_GUID_Data2;
+ clsId.Data3 = typeId;
+ SetUi64(clsId.Data4, id);
return SetPropGUID(clsId, value);
}
-static HRESULT FindCodecClassId(const GUID *clsID, UInt32 isCoder2, bool isFilter, bool &encode, int &index)
+static HRESULT FindCodecClassId(const GUID *clsid, bool isCoder2, bool isFilter, bool &encode, int &index) throw()
{
index = -1;
- if (clsID->Data1 != CLSID_CCodec.Data1 ||
- clsID->Data2 != CLSID_CCodec.Data2 ||
- (clsID->Data3 & ~1) != kDecodeId)
+ if (clsid->Data1 != k_7zip_GUID_Data1 ||
+ clsid->Data2 != k_7zip_GUID_Data2)
return S_OK;
- encode = (clsID->Data3 != kDecodeId);
- UInt64 id = 0;
- for (int j = 0; j < 8; j++)
- id |= ((UInt64)clsID->Data4[j]) << (8 * j);
+
+ encode = true;
+
+ if (clsid->Data3 == k_7zip_GUID_Data3_Decoder) encode = false;
+ else if (clsid->Data3 != k_7zip_GUID_Data3_Encoder) return S_OK;
+
+ UInt64 id = GetUi64(clsid->Data4);
+
for (unsigned i = 0; i < g_NumCodecs; i++)
{
const CCodecInfo &codec = *g_Codecs[i];
- if (id != codec.Id || encode && !codec.CreateEncoder || !encode && !codec.CreateDecoder)
+
+ if (id != codec.Id
+ || (encode ? !codec.CreateEncoder : !codec.CreateDecoder)
+ || (isFilter ? !codec.IsFilter : codec.IsFilter))
continue;
- if (!isFilter && codec.IsFilter || isFilter && !codec.IsFilter ||
- codec.NumInStreams != 1 && !isCoder2 || codec.NumInStreams == 1 && isCoder2)
+
+ if (codec.NumStreams == 1 ? isCoder2 : !isCoder2)
return E_NOINTERFACE;
+
index = i;
return S_OK;
}
+
return S_OK;
}
-STDAPI CreateCoder2(bool encode, UInt32 index, const GUID *iid, void **outObject)
+static HRESULT CreateCoderMain(unsigned index, bool encode, void **coder)
{
COM_TRY_BEGIN
- *outObject = 0;
- bool isCoder = (*iid == IID_ICompressCoder) != 0;
- bool isCoder2 = (*iid == IID_ICompressCoder2) != 0;
- bool isFilter = (*iid == IID_ICompressFilter) != 0;
+
const CCodecInfo &codec = *g_Codecs[index];
- if (!isFilter && codec.IsFilter || isFilter && !codec.IsFilter ||
- codec.NumInStreams != 1 && !isCoder2 || codec.NumInStreams == 1 && isCoder2)
- return E_NOINTERFACE;
+
+ void *c;
if (encode)
- {
- if (!codec.CreateEncoder)
- return CLASS_E_CLASSNOTAVAILABLE;
- *outObject = codec.CreateEncoder();
- }
+ c = codec.CreateEncoder();
else
+ c = codec.CreateDecoder();
+
+ if (c)
{
- if (!codec.CreateDecoder)
- return CLASS_E_CLASSNOTAVAILABLE;
- *outObject = codec.CreateDecoder();
+ IUnknown *unk;
+ if (codec.IsFilter)
+ unk = (IUnknown *)(ICompressFilter *)c;
+ else if (codec.NumStreams != 1)
+ unk = (IUnknown *)(ICompressCoder2 *)c;
+ else
+ unk = (IUnknown *)(ICompressCoder *)c;
+ unk->AddRef();
+ *coder = c;
}
- if (isCoder)
- ((ICompressCoder *)*outObject)->AddRef();
- else if (isCoder2)
- ((ICompressCoder2 *)*outObject)->AddRef();
- else
- ((ICompressFilter *)*outObject)->AddRef();
return S_OK;
+
COM_TRY_END
}
+static HRESULT CreateCoder2(bool encode, UInt32 index, const GUID *iid, void **outObject)
+{
+ *outObject = NULL;
+
+ const CCodecInfo &codec = *g_Codecs[index];
+
+ if (encode ? !codec.CreateEncoder : !codec.CreateDecoder)
+ return CLASS_E_CLASSNOTAVAILABLE;
+
+ if (codec.IsFilter)
+ {
+ if (*iid != IID_ICompressFilter) return E_NOINTERFACE;
+ }
+ else if (codec.NumStreams != 1)
+ {
+ if (*iid != IID_ICompressCoder2) return E_NOINTERFACE;
+ }
+ else
+ {
+ if (*iid != IID_ICompressCoder) return E_NOINTERFACE;
+ }
+
+ return CreateCoderMain(index, encode, outObject);
+}
+
+STDAPI CreateDecoder(UInt32 index, const GUID *iid, void **outObject)
+{
+ return CreateCoder2(false, index, iid, outObject);
+}
+
+STDAPI CreateEncoder(UInt32 index, const GUID *iid, void **outObject)
+{
+ return CreateCoder2(true, index, iid, outObject);
+}
+
STDAPI CreateCoder(const GUID *clsid, const GUID *iid, void **outObject)
{
- *outObject = 0;
+ *outObject = NULL;
+
+ bool isFilter = false;
+ bool isCoder2 = false;
bool isCoder = (*iid == IID_ICompressCoder) != 0;
- bool isCoder2 = (*iid == IID_ICompressCoder2) != 0;
- bool isFilter = (*iid == IID_ICompressFilter) != 0;
- if (!isCoder && !isCoder2 && !isFilter)
- return E_NOINTERFACE;
+ if (!isCoder)
+ {
+ isFilter = (*iid == IID_ICompressFilter) != 0;
+ if (!isFilter)
+ {
+ isCoder2 = (*iid == IID_ICompressCoder2) != 0;
+ if (!isCoder2)
+ return E_NOINTERFACE;
+ }
+ }
+
bool encode;
int codecIndex;
HRESULT res = FindCodecClassId(clsid, isCoder2, isFilter, encode, codecIndex);
@@ -113,42 +171,69 @@ STDAPI CreateCoder(const GUID *clsid, const GUID *iid, void **outObject)
return res;
if (codecIndex < 0)
return CLASS_E_CLASSNOTAVAILABLE;
- return CreateCoder2(encode, codecIndex, iid, outObject);
-}
+ return CreateCoderMain(codecIndex, encode, outObject);
+}
+
STDAPI GetMethodProperty(UInt32 codecIndex, PROPID propID, PROPVARIANT *value)
{
::VariantClear((VARIANTARG *)value);
const CCodecInfo &codec = *g_Codecs[codecIndex];
- switch(propID)
+ switch (propID)
{
case NMethodPropID::kID:
- {
value->uhVal.QuadPart = (UInt64)codec.Id;
value->vt = VT_UI8;
break;
- }
case NMethodPropID::kName:
- if ((value->bstrVal = ::SysAllocString(codec.Name)) != 0)
- value->vt = VT_BSTR;
+ SetPropFromAscii(codec.Name, value);
break;
case NMethodPropID::kDecoder:
if (codec.CreateDecoder)
- return SetClassID(codec.Id, false, value);
+ return MethodToClassID(k_7zip_GUID_Data3_Decoder, codec.Id, value);
break;
case NMethodPropID::kEncoder:
if (codec.CreateEncoder)
- return SetClassID(codec.Id, true, value);
+ return MethodToClassID(k_7zip_GUID_Data3_Encoder, codec.Id, value);
break;
- case NMethodPropID::kInStreams:
- {
- if (codec.NumInStreams != 1)
+ case NMethodPropID::kDecoderIsAssigned:
+ value->vt = VT_BOOL;
+ value->boolVal = BoolToVARIANT_BOOL(codec.CreateDecoder != NULL);
+ break;
+ case NMethodPropID::kEncoderIsAssigned:
+ value->vt = VT_BOOL;
+ value->boolVal = BoolToVARIANT_BOOL(codec.CreateEncoder != NULL);
+ break;
+ case NMethodPropID::kPackStreams:
+ if (codec.NumStreams != 1)
{
value->vt = VT_UI4;
- value->ulVal = (ULONG)codec.NumInStreams;
+ value->ulVal = (ULONG)codec.NumStreams;
}
break;
- }
+ /*
+ case NMethodPropID::kIsFilter:
+ // if (codec.IsFilter)
+ {
+ value->vt = VT_BOOL;
+ value->boolVal = BoolToVARIANT_BOOL(codec.IsFilter);
+ }
+ break;
+ */
+ /*
+ case NMethodPropID::kDecoderFlags:
+ {
+ value->vt = VT_UI4;
+ value->ulVal = (ULONG)codec.DecoderFlags;
+ }
+ break;
+ case NMethodPropID::kEncoderFlags:
+ {
+ value->vt = VT_UI4;
+ value->ulVal = (ULONG)codec.EncoderFlags;
+ }
+ break;
+ */
}
return S_OK;
}
@@ -158,3 +243,102 @@ STDAPI GetNumberOfMethods(UINT32 *numCodecs)
*numCodecs = g_NumCodecs;
return S_OK;
}
+
+
+// ---------- Hashers ----------
+
+static int FindHasherClassId(const GUID *clsid) throw()
+{
+ if (clsid->Data1 != k_7zip_GUID_Data1 ||
+ clsid->Data2 != k_7zip_GUID_Data2 ||
+ clsid->Data3 != k_7zip_GUID_Data3_Hasher)
+ return -1;
+ UInt64 id = GetUi64(clsid->Data4);
+ for (unsigned i = 0; i < g_NumCodecs; i++)
+ if (id == g_Hashers[i]->Id)
+ return i;
+ return -1;
+}
+
+static HRESULT CreateHasher2(UInt32 index, IHasher **hasher)
+{
+ COM_TRY_BEGIN
+ *hasher = g_Hashers[index]->CreateHasher();
+ if (*hasher)
+ (*hasher)->AddRef();
+ return S_OK;
+ COM_TRY_END
+}
+
+STDAPI CreateHasher(const GUID *clsid, IHasher **outObject)
+{
+ COM_TRY_BEGIN
+ *outObject = 0;
+ int index = FindHasherClassId(clsid);
+ if (index < 0)
+ return CLASS_E_CLASSNOTAVAILABLE;
+ return CreateHasher2(index, outObject);
+ COM_TRY_END
+}
+
+STDAPI GetHasherProp(UInt32 codecIndex, PROPID propID, PROPVARIANT *value)
+{
+ ::VariantClear((VARIANTARG *)value);
+ const CHasherInfo &codec = *g_Hashers[codecIndex];
+ switch (propID)
+ {
+ case NMethodPropID::kID:
+ value->uhVal.QuadPart = (UInt64)codec.Id;
+ value->vt = VT_UI8;
+ break;
+ case NMethodPropID::kName:
+ SetPropFromAscii(codec.Name, value);
+ break;
+ case NMethodPropID::kEncoder:
+ if (codec.CreateHasher)
+ return MethodToClassID(k_7zip_GUID_Data3_Hasher, codec.Id, value);
+ break;
+ case NMethodPropID::kDigestSize:
+ value->ulVal = (ULONG)codec.DigestSize;
+ value->vt = VT_UI4;
+ break;
+ }
+ return S_OK;
+}
+
+class CHashers:
+ public IHashers,
+ public CMyUnknownImp
+{
+public:
+ MY_UNKNOWN_IMP1(IHashers)
+
+ STDMETHOD_(UInt32, GetNumHashers)();
+ STDMETHOD(GetHasherProp)(UInt32 index, PROPID propID, PROPVARIANT *value);
+ STDMETHOD(CreateHasher)(UInt32 index, IHasher **hasher);
+};
+
+STDAPI GetHashers(IHashers **hashers)
+{
+ COM_TRY_BEGIN
+ *hashers = new CHashers;
+ if (*hashers)
+ (*hashers)->AddRef();
+ return S_OK;
+ COM_TRY_END
+}
+
+STDMETHODIMP_(UInt32) CHashers::GetNumHashers()
+{
+ return g_NumHashers;
+}
+
+STDMETHODIMP CHashers::GetHasherProp(UInt32 index, PROPID propID, PROPVARIANT *value)
+{
+ return ::GetHasherProp(index, propID, value);
+}
+
+STDMETHODIMP CHashers::CreateHasher(UInt32 index, IHasher **hasher)
+{
+ return ::CreateHasher2(index, hasher);
+}
diff --git a/3rdparty/lzma/CPP/7zip/Compress/CopyCoder.cpp b/3rdparty/lzma/CPP/7zip/Compress/CopyCoder.cpp
index f71692a7781..ac6ab2e718a 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/CopyCoder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/CopyCoder.cpp
@@ -4,17 +4,15 @@
#include "../../../C/Alloc.h"
-#include "../Common/StreamUtils.h"
-
#include "CopyCoder.h"
namespace NCompress {
-static const UInt32 kBufferSize = 1 << 17;
+static const UInt32 kBufSize = 1 << 17;
CCopyCoder::~CCopyCoder()
{
- ::MidFree(_buffer);
+ ::MidFree(_buf);
}
STDMETHODIMP CCopyCoder::Code(ISequentialInStream *inStream,
@@ -22,36 +20,78 @@ STDMETHODIMP CCopyCoder::Code(ISequentialInStream *inStream,
const UInt64 * /* inSize */, const UInt64 *outSize,
ICompressProgressInfo *progress)
{
- if (_buffer == 0)
+ if (!_buf)
{
- _buffer = (Byte *)::MidAlloc(kBufferSize);
- if (_buffer == 0)
+ _buf = (Byte *)::MidAlloc(kBufSize);
+ if (!_buf)
return E_OUTOFMEMORY;
}
TotalSize = 0;
+
for (;;)
{
- UInt32 size = kBufferSize;
- if (outSize != 0)
- if (size > *outSize - TotalSize)
- size = (UInt32)(*outSize - TotalSize);
- RINOK(inStream->Read(_buffer, size, &size));
+ UInt32 size = kBufSize;
+ if (outSize && size > *outSize - TotalSize)
+ size = (UInt32)(*outSize - TotalSize);
+ if (size == 0)
+ return S_OK;
+
+ HRESULT readRes = inStream->Read(_buf, size, &size);
+
if (size == 0)
- break;
+ return readRes;
+
if (outStream)
{
- RINOK(WriteStream(outStream, _buffer, size));
+ UInt32 pos = 0;
+ do
+ {
+ UInt32 curSize = size - pos;
+ HRESULT res = outStream->Write(_buf + pos, curSize, &curSize);
+ pos += curSize;
+ TotalSize += curSize;
+ RINOK(res);
+ if (curSize == 0)
+ return E_FAIL;
+ }
+ while (pos < size);
}
- TotalSize += size;
- if (progress != NULL)
+ else
+ TotalSize += size;
+
+ RINOK(readRes);
+
+ if (progress)
{
RINOK(progress->SetRatioInfo(&TotalSize, &TotalSize));
}
}
+}
+
+STDMETHODIMP CCopyCoder::SetInStream(ISequentialInStream *inStream)
+{
+ _inStream = inStream;
+ TotalSize = 0;
return S_OK;
}
+STDMETHODIMP CCopyCoder::ReleaseInStream()
+{
+ _inStream.Release();
+ return S_OK;
+}
+
+STDMETHODIMP CCopyCoder::Read(void *data, UInt32 size, UInt32 *processedSize)
+{
+ UInt32 realProcessedSize = 0;
+ HRESULT res = _inStream->Read(data, size, &realProcessedSize);
+ TotalSize += realProcessedSize;
+ if (processedSize)
+ *processedSize = realProcessedSize;
+ return res;
+}
+
STDMETHODIMP CCopyCoder::GetInStreamProcessedSize(UInt64 *value)
{
*value = TotalSize;
@@ -60,8 +100,16 @@ STDMETHODIMP CCopyCoder::GetInStreamProcessedSize(UInt64 *value)
HRESULT CopyStream(ISequentialInStream *inStream, ISequentialOutStream *outStream, ICompressProgressInfo *progress)
{
- CMyComPtr<ICompressCoder> copyCoder = new NCompress::CCopyCoder;
+ CMyComPtr<ICompressCoder> copyCoder = new CCopyCoder;
return copyCoder->Code(inStream, outStream, NULL, NULL, progress);
}
+HRESULT CopyStream_ExactSize(ISequentialInStream *inStream, ISequentialOutStream *outStream, UInt64 size, ICompressProgressInfo *progress)
+{
+ NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder;
+ CMyComPtr<ICompressCoder> copyCoder = copyCoderSpec;
+ RINOK(copyCoder->Code(inStream, outStream, NULL, &size, progress));
+ return copyCoderSpec->TotalSize == size ? S_OK : E_FAIL;
+}
+
}
diff --git a/3rdparty/lzma/CPP/7zip/Compress/CopyCoder.h b/3rdparty/lzma/CPP/7zip/Compress/CopyCoder.h
index c5445ccf8f2..a21c0988a91 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/CopyCoder.h
+++ b/3rdparty/lzma/CPP/7zip/Compress/CopyCoder.h
@@ -11,23 +11,35 @@ namespace NCompress {
class CCopyCoder:
public ICompressCoder,
+ public ICompressSetInStream,
+ public ISequentialInStream,
public ICompressGetInStreamProcessedSize,
public CMyUnknownImp
{
- Byte *_buffer;
+ Byte *_buf;
+ CMyComPtr<ISequentialInStream> _inStream;
public:
UInt64 TotalSize;
- CCopyCoder(): TotalSize(0), _buffer(0) {};
+
+ CCopyCoder(): _buf(0), TotalSize(0) {};
~CCopyCoder();
- MY_UNKNOWN_IMP1(ICompressGetInStreamProcessedSize)
+ MY_UNKNOWN_IMP4(
+ ICompressCoder,
+ ICompressSetInStream,
+ ISequentialInStream,
+ ICompressGetInStreamProcessedSize)
STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
+ STDMETHOD(SetInStream)(ISequentialInStream *inStream);
+ STDMETHOD(ReleaseInStream)();
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
STDMETHOD(GetInStreamProcessedSize)(UInt64 *value);
};
HRESULT CopyStream(ISequentialInStream *inStream, ISequentialOutStream *outStream, ICompressProgressInfo *progress);
+HRESULT CopyStream_ExactSize(ISequentialInStream *inStream, ISequentialOutStream *outStream, UInt64 size, ICompressProgressInfo *progress);
}
diff --git a/3rdparty/lzma/CPP/7zip/Compress/CopyRegister.cpp b/3rdparty/lzma/CPP/7zip/Compress/CopyRegister.cpp
index efb9b9e954f..703c52ca6e0 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/CopyRegister.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/CopyRegister.cpp
@@ -6,9 +6,6 @@
#include "CopyCoder.h"
-static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::CCopyCoder); }
+REGISTER_CODEC_CREATE(CreateCodec, NCompress::CCopyCoder())
-static CCodecInfo g_CodecInfo =
-{ CreateCodec, CreateCodec, 0x00, L"Copy", 1, false };
-
-REGISTER_CODEC(Copy)
+REGISTER_CODEC_2(Copy, CreateCodec, CreateCodec, 0, "Copy")
diff --git a/3rdparty/lzma/CPP/7zip/Compress/DeltaFilter.cpp b/3rdparty/lzma/CPP/7zip/Compress/DeltaFilter.cpp
index d8378a60e41..d90f62f59f4 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/DeltaFilter.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/DeltaFilter.cpp
@@ -4,18 +4,24 @@
#include "../../../C/Delta.h"
-#include "../Common/RegisterCodec.h"
+#include "../../Common/MyCom.h"
+
+#include "../ICoder.h"
-#include "BranchCoder.h"
+#include "../Common/RegisterCodec.h"
struct CDelta
{
unsigned _delta;
Byte _state[DELTA_STATE_SIZE];
+
CDelta(): _delta(1) {}
void DeltaInit() { Delta_Init(_state); }
};
+
+#ifndef EXTRACT_ONLY
+
class CDeltaEncoder:
public ICompressFilter,
public ICompressSetCoderProperties,
@@ -25,25 +31,11 @@ class CDeltaEncoder:
{
public:
MY_UNKNOWN_IMP2(ICompressSetCoderProperties, ICompressWriteCoderProperties)
- STDMETHOD(Init)();
- STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size);
+ INTERFACE_ICompressFilter(;)
STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps);
STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream);
};
-class CDeltaDecoder:
- public ICompressFilter,
- public ICompressSetDecoderProperties2,
- CDelta,
- public CMyUnknownImp
-{
-public:
- MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2)
- STDMETHOD(Init)();
- STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size);
- STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
-};
-
STDMETHODIMP CDeltaEncoder::Init()
{
DeltaInit();
@@ -89,6 +81,21 @@ STDMETHODIMP CDeltaEncoder::WriteCoderProperties(ISequentialOutStream *outStream
return outStream->Write(&prop, 1, NULL);
}
+#endif
+
+
+class CDeltaDecoder:
+ public ICompressFilter,
+ public ICompressSetDecoderProperties2,
+ CDelta,
+ public CMyUnknownImp
+{
+public:
+ MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2)
+ INTERFACE_ICompressFilter(;)
+ STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
+};
+
STDMETHODIMP CDeltaDecoder::Init()
{
DeltaInit();
@@ -109,17 +116,8 @@ STDMETHODIMP CDeltaDecoder::SetDecoderProperties2(const Byte *props, UInt32 size
return S_OK;
}
-#define CREATE_CODEC(x) \
- static void *CreateCodec ## x() { return (void *)(ICompressFilter *)(new C ## x ## Decoder); } \
- static void *CreateCodec ## x ## Out() { return (void *)(ICompressFilter *)(new C ## x ## Encoder); }
-
-CREATE_CODEC(Delta)
-
-#define METHOD_ITEM(x, id, name) { CreateCodec ## x, CreateCodec ## x ## Out, id, name, 1, true }
-
-static CCodecInfo g_CodecsInfo[] =
-{
- METHOD_ITEM(Delta, 3, L"Delta")
-};
-REGISTER_CODECS(Delta)
+REGISTER_FILTER_E(Delta,
+ CDeltaDecoder(),
+ CDeltaEncoder(),
+ 3, "Delta")
diff --git a/3rdparty/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp b/3rdparty/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp
index 322015e294e..1a378bbe3a1 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp
@@ -10,7 +10,7 @@
static HRESULT SResToHRESULT(SRes res)
{
- switch(res)
+ switch (res)
{
case SZ_OK: return S_OK;
case SZ_ERROR_MEM: return E_OUTOFMEMORY;
@@ -24,32 +24,40 @@ static HRESULT SResToHRESULT(SRes res)
namespace NCompress {
namespace NLzma2 {
-static const UInt32 kInBufSize = 1 << 20;
-
-CDecoder::CDecoder(): _inBuf(0), _outSizeDefined(false)
+CDecoder::CDecoder():
+ _inBuf(NULL),
+ _inBufSize(0),
+ _inBufSizeNew(1 << 20),
+ _outStepSize(1 << 22),
+ _outSizeDefined(false),
+ _finishMode(false)
{
Lzma2Dec_Construct(&_state);
}
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
+STDMETHODIMP CDecoder::SetInBufSize(UInt32 , UInt32 size) { _inBufSizeNew = size; return S_OK; }
+STDMETHODIMP CDecoder::SetOutBufSize(UInt32 , UInt32 size) { _outStepSize = size; return S_OK; }
CDecoder::~CDecoder()
{
Lzma2Dec_Free(&_state, &g_Alloc);
- MyFree(_inBuf);
+ MidFree(_inBuf);
}
STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *prop, UInt32 size)
{
- if (size != 1) return SZ_ERROR_UNSUPPORTED;
+ if (size != 1)
+ return E_NOTIMPL;
+
RINOK(SResToHRESULT(Lzma2Dec_Allocate(&_state, prop[0], &g_Alloc)));
- if (_inBuf == 0)
+ if (!_inBuf || _inBufSize != _inBufSizeNew)
{
- _inBuf = (Byte *)MyAlloc(kInBufSize);
- if (_inBuf == 0)
+ MidFree(_inBuf);
+ _inBufSize = 0;
+ _inBuf = (Byte *)MidAlloc(_inBufSizeNew);
+ if (!_inBuf)
return E_OUTOFMEMORY;
+ _inBufSize = _inBufSizeNew;
}
return S_OK;
@@ -62,6 +70,7 @@ STDMETHODIMP CDecoder::ReleaseInStream() { _inStream.Release(); return S_OK; }
STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize)
{
_outSizeDefined = (outSize != NULL);
+ _outSize = 0;
if (_outSizeDefined)
_outSize = *outSize;
@@ -72,39 +81,55 @@ STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize)
return S_OK;
}
+STDMETHODIMP CDecoder::SetFinishMode(UInt32 finishMode)
+{
+ _finishMode = (finishMode != 0);
+ return S_OK;
+}
+
STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream,
- ISequentialOutStream *outStream, const UInt64 * /* inSize */,
+ ISequentialOutStream *outStream, const UInt64 *inSize,
const UInt64 *outSize, ICompressProgressInfo *progress)
{
- if (_inBuf == 0)
+ if (!_inBuf)
return S_FALSE;
SetOutStreamSize(outSize);
+ UInt32 step = _outStepSize;
+ const UInt32 kOutStepSize_Min = 1 << 12;
+ if (step < kOutStepSize_Min)
+ step = kOutStepSize_Min;
+
+ SizeT wrPos = _state.decoder.dicPos;
+
+ SizeT next = (_state.decoder.dicBufSize - _state.decoder.dicPos < step) ?
+ _state.decoder.dicBufSize :
+ _state.decoder.dicPos + step;
+
+ HRESULT hres = S_OK;
+
for (;;)
{
if (_inPos == _inSize)
{
_inPos = _inSize = 0;
- RINOK(inStream->Read(_inBuf, kInBufSize, &_inSize));
+ hres = inStream->Read(_inBuf, _inBufSize, &_inSize);
+ if (hres != S_OK)
+ break;
}
SizeT dicPos = _state.decoder.dicPos;
- SizeT curSize = _state.decoder.dicBufSize - dicPos;
- const UInt32 kStepSize = ((UInt32)1 << 22);
- if (curSize > kStepSize)
- curSize = (SizeT)kStepSize;
-
+ SizeT curSize = next - dicPos;
+
ELzmaFinishMode finishMode = LZMA_FINISH_ANY;
if (_outSizeDefined)
{
const UInt64 rem = _outSize - _outSizeProcessed;
- if (rem < curSize)
+ if (curSize >= rem)
{
curSize = (SizeT)rem;
- /*
- // finishMode = LZMA_FINISH_END;
- we can't use LZMA_FINISH_END here to allow partial decoding
- */
+ if (_finishMode)
+ finishMode = LZMA_FINISH_END;
}
}
@@ -117,71 +142,123 @@ STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream,
SizeT outSizeProcessed = _state.decoder.dicPos - dicPos;
_outSizeProcessed += outSizeProcessed;
- bool finished = (inSizeProcessed == 0 && outSizeProcessed == 0);
- bool stopDecoding = (_outSizeDefined && _outSizeProcessed >= _outSize);
+ bool finished = (inSizeProcessed == 0 && outSizeProcessed == 0
+ || status == LZMA_STATUS_FINISHED_WITH_MARK);
+ bool outFinished = (_outSizeDefined && _outSizeProcessed >= _outSize);
- if (res != 0 || _state.decoder.dicPos == _state.decoder.dicBufSize || finished || stopDecoding)
+ if (res != 0
+ || _state.decoder.dicPos >= next
+ || finished
+ || outFinished)
{
- HRESULT res2 = WriteStream(outStream, _state.decoder.dic, _state.decoder.dicPos);
+ HRESULT res2 = WriteStream(outStream, _state.decoder.dic + wrPos, _state.decoder.dicPos - wrPos);
+
+ if (_state.decoder.dicPos == _state.decoder.dicBufSize)
+ _state.decoder.dicPos = 0;
+
+ wrPos = _state.decoder.dicPos;
+
+ next = (_state.decoder.dicBufSize - _state.decoder.dicPos < step) ?
+ _state.decoder.dicBufSize :
+ _state.decoder.dicPos + step;
+
if (res != 0)
return S_FALSE;
RINOK(res2);
- if (stopDecoding)
- return S_OK;
+
if (finished)
- return (status == LZMA_STATUS_FINISHED_WITH_MARK ? S_OK : S_FALSE);
- }
- if (_state.decoder.dicPos == _state.decoder.dicBufSize)
- _state.decoder.dicPos = 0;
+ {
+ if (status == LZMA_STATUS_FINISHED_WITH_MARK)
+ {
+ if (_finishMode && inSize && *inSize != _inSizeProcessed)
+ return S_FALSE;
+ if (finishMode == LZMA_FINISH_END && !outFinished)
+ return S_FALSE;
+ return S_OK;
+ }
+ return (finishMode == LZMA_FINISH_END) ? S_FALSE : S_OK;
+ }
- if (progress != NULL)
+ if (outFinished && finishMode == LZMA_FINISH_ANY)
+ return S_OK;
+ }
+
+ if (progress)
{
RINOK(progress->SetRatioInfo(&_inSizeProcessed, &_outSizeProcessed));
}
}
+
+ HRESULT res2 = WriteStream(outStream, _state.decoder.dic + wrPos, _state.decoder.dicPos - wrPos);
+ if (hres != S_OK)
+ return hres;
+ return res2;
}
#ifndef NO_READ_FROM_CODER
STDMETHODIMP CDecoder::Read(void *data, UInt32 size, UInt32 *processedSize)
{
+ UInt32 totalProcessed = 0;
+
if (processedSize)
*processedSize = 0;
- do
+
+ for (;;)
{
if (_inPos == _inSize)
{
_inPos = _inSize = 0;
- RINOK(_inStream->Read(_inBuf, kInBufSize, &_inSize));
+ RINOK(_inStream->Read(_inBuf, _inBufSize, &_inSize));
}
{
- SizeT inProcessed = _inSize - _inPos;
-
+ ELzmaFinishMode finishMode = LZMA_FINISH_ANY;
if (_outSizeDefined)
{
const UInt64 rem = _outSize - _outSizeProcessed;
- if (rem < size)
+ if (rem <= size)
+ {
size = (UInt32)rem;
+ if (_finishMode)
+ finishMode = LZMA_FINISH_END;
+ }
}
SizeT outProcessed = size;
+ SizeT inProcessed = _inSize - _inPos;
+
ELzmaStatus status;
SRes res = Lzma2Dec_DecodeToBuf(&_state, (Byte *)data, &outProcessed,
- _inBuf + _inPos, &inProcessed, LZMA_FINISH_ANY, &status);
+ _inBuf + _inPos, &inProcessed, finishMode, &status);
+
_inPos += (UInt32)inProcessed;
_inSizeProcessed += inProcessed;
_outSizeProcessed += outProcessed;
size -= (UInt32)outProcessed;
data = (Byte *)data + outProcessed;
+
+ totalProcessed += (UInt32)outProcessed;
if (processedSize)
- *processedSize += (UInt32)outProcessed;
- RINOK(SResToHRESULT(res));
+ *processedSize = totalProcessed;
+
+ if (res != SZ_OK)
+ {
+ if (totalProcessed != 0)
+ return S_OK;
+ return SResToHRESULT(res);
+ }
+
if (inProcessed == 0 && outProcessed == 0)
return S_OK;
+ if (status == LZMA_STATUS_FINISHED_WITH_MARK)
+ return S_OK;
+ if (outProcessed != 0)
+ {
+ if (finishMode != LZMA_FINISH_END || _outSize != _outSizeProcessed)
+ return S_OK;
+ }
}
}
- while (size != 0);
- return S_OK;
}
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Compress/Lzma2Decoder.h b/3rdparty/lzma/CPP/7zip/Compress/Lzma2Decoder.h
index fd7ca2f3946..a87912fb596 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/Lzma2Decoder.h
+++ b/3rdparty/lzma/CPP/7zip/Compress/Lzma2Decoder.h
@@ -15,7 +15,9 @@ namespace NLzma2 {
class CDecoder:
public ICompressCoder,
public ICompressSetDecoderProperties2,
+ public ICompressSetFinishMode,
public ICompressGetInStreamProcessedSize,
+ public ICompressSetBufSize,
#ifndef NO_READ_FROM_CODER
public ICompressSetInStream,
public ICompressSetOutStreamSize,
@@ -27,36 +29,49 @@ class CDecoder:
Byte *_inBuf;
UInt32 _inPos;
UInt32 _inSize;
- CLzma2Dec _state;
+
+ bool _finishMode;
bool _outSizeDefined;
UInt64 _outSize;
+
UInt64 _inSizeProcessed;
UInt64 _outSizeProcessed;
+
+ UInt32 _inBufSize;
+ UInt32 _inBufSizeNew;
+ UInt32 _outStepSize;
+
+ CLzma2Dec _state;
public:
+ MY_QUERYINTERFACE_BEGIN2(ICompressCoder)
+ MY_QUERYINTERFACE_ENTRY(ICompressSetDecoderProperties2)
+ MY_QUERYINTERFACE_ENTRY(ICompressSetFinishMode)
+ MY_QUERYINTERFACE_ENTRY(ICompressGetInStreamProcessedSize)
+ MY_QUERYINTERFACE_ENTRY(ICompressSetBufSize)
#ifndef NO_READ_FROM_CODER
- MY_UNKNOWN_IMP5(
- ICompressSetDecoderProperties2,
- ICompressGetInStreamProcessedSize,
- ICompressSetInStream,
- ICompressSetOutStreamSize,
- ISequentialInStream)
- #else
- MY_UNKNOWN_IMP2(
- ICompressSetDecoderProperties2,
- ICompressGetInStreamProcessedSize)
+ MY_QUERYINTERFACE_ENTRY(ICompressSetInStream)
+ MY_QUERYINTERFACE_ENTRY(ICompressSetOutStreamSize)
+ MY_QUERYINTERFACE_ENTRY(ISequentialInStream)
#endif
+ MY_QUERYINTERFACE_END
+ MY_ADDREF_RELEASE
- STDMETHOD(Code)(ISequentialInStream *inStream,
- ISequentialOutStream *outStream, const UInt64 *_inSize, const UInt64 *outSize,
- ICompressProgressInfo *progress);
+ STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
+ const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
+ STDMETHOD(SetFinishMode)(UInt32 finishMode);
+
STDMETHOD(GetInStreamProcessedSize)(UInt64 *value);
+ STDMETHOD(SetInBufSize)(UInt32 streamIndex, UInt32 size);
+ STDMETHOD(SetOutBufSize)(UInt32 streamIndex, UInt32 size);
+
STDMETHOD(SetInStream)(ISequentialInStream *inStream);
STDMETHOD(ReleaseInStream)();
+
STDMETHOD(SetOutStreamSize)(const UInt64 *outSize);
#ifndef NO_READ_FROM_CODER
diff --git a/3rdparty/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp b/3rdparty/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp
index 5e4c71bea46..06a11f10eae 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp
@@ -19,14 +19,6 @@ HRESULT SetLzmaProp(PROPID propID, const PROPVARIANT &prop, CLzmaEncProps &ep);
namespace NLzma2 {
-static void *SzBigAlloc(void *, size_t size) { return BigAlloc(size); }
-static void SzBigFree(void *, void *address) { BigFree(address); }
-static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree };
-
-static void *SzAlloc(void *, size_t size) { return MyAlloc(size); }
-static void SzFree(void *, void *address) { MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
-
CEncoder::CEncoder()
{
_encoder = 0;
@@ -46,7 +38,20 @@ HRESULT SetLzma2Prop(PROPID propID, const PROPVARIANT &prop, CLzma2EncProps &lzm
switch (propID)
{
case NCoderPropID::kBlockSize:
- if (prop.vt != VT_UI4) return E_INVALIDARG; lzma2Props.blockSize = prop.ulVal; break;
+ {
+ if (prop.vt == VT_UI4)
+ lzma2Props.blockSize = prop.ulVal;
+ else if (prop.vt == VT_UI8)
+ {
+ size_t v = (size_t)prop.uhVal.QuadPart;
+ if (v != prop.uhVal.QuadPart)
+ return E_INVALIDARG;
+ lzma2Props.blockSize = v;
+ }
+ else
+ return E_INVALIDARG;
+ break;
+ }
case NCoderPropID::kNumThreads:
if (prop.vt != VT_UI4) return E_INVALIDARG; lzma2Props.numTotalThreads = (int)(prop.ulVal); break;
default:
diff --git a/3rdparty/lzma/CPP/7zip/Compress/Lzma2Register.cpp b/3rdparty/lzma/CPP/7zip/Compress/Lzma2Register.cpp
index cace871eff2..d684d9d02f0 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/Lzma2Register.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/Lzma2Register.cpp
@@ -6,15 +6,12 @@
#include "Lzma2Decoder.h"
-static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::NLzma2::CDecoder); }
#ifndef EXTRACT_ONLY
#include "Lzma2Encoder.h"
-static void *CreateCodecOut() { return (void *)(ICompressCoder *)(new NCompress::NLzma2::CEncoder); }
-#else
-#define CreateCodecOut 0
#endif
-static CCodecInfo g_CodecInfo =
- { CreateCodec, CreateCodecOut, 0x21, L"LZMA2", 1, false };
-
-REGISTER_CODEC(LZMA2)
+REGISTER_CODEC_E(LZMA2,
+ NCompress::NLzma2::CDecoder(),
+ NCompress::NLzma2::CEncoder(),
+ 0x21,
+ "LZMA2")
diff --git a/3rdparty/lzma/CPP/7zip/Compress/LzmaDecoder.cpp b/3rdparty/lzma/CPP/7zip/Compress/LzmaDecoder.cpp
index b7c260bd9e0..9002678ae08 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/LzmaDecoder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/LzmaDecoder.cpp
@@ -10,7 +10,7 @@
static HRESULT SResToHRESULT(SRes res)
{
- switch(res)
+ switch (res)
{
case SZ_OK: return S_OK;
case SZ_ERROR_MEM: return E_OUTOFMEMORY;
@@ -25,19 +25,16 @@ namespace NCompress {
namespace NLzma {
CDecoder::CDecoder(): _inBuf(0), _propsWereSet(false), _outSizeDefined(false),
- _inBufSize(1 << 20),
- _outBufSize(1 << 22),
- FinishStream(false)
+ _inBufSize(1 << 20),
+ _outBufSize(1 << 22),
+ FinishStream(false),
+ NeedMoreInput(false)
{
_inSizeProcessed = 0;
_inPos = _inSize = 0;
LzmaDec_Construct(&_state);
}
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
-
CDecoder::~CDecoder()
{
LzmaDec_Free(&_state, &g_Alloc);
@@ -81,10 +78,17 @@ STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize)
{
_inSizeProcessed = 0;
_inPos = _inSize = 0;
+ NeedMoreInput = false;
SetOutStreamSizeResume(outSize);
return S_OK;
}
+STDMETHODIMP CDecoder::SetFinishMode(UInt32 finishMode)
+{
+ FinishStream = (finishMode != 0);
+ return S_OK;
+}
+
HRESULT CDecoder::CodeSpec(ISequentialInStream *inStream, ISequentialOutStream *outStream, ICompressProgressInfo *progress)
{
if (_inBuf == 0 || !_propsWereSet)
@@ -144,9 +148,21 @@ HRESULT CDecoder::CodeSpec(ISequentialInStream *inStream, ISequentialOutStream *
return S_FALSE;
RINOK(res2);
if (stopDecoding)
+ {
+ if (status == LZMA_STATUS_NEEDS_MORE_INPUT)
+ NeedMoreInput = true;
+ if (FinishStream &&
+ status != LZMA_STATUS_FINISHED_WITH_MARK &&
+ status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK)
+ return S_FALSE;
return S_OK;
+ }
if (finished)
+ {
+ if (status == LZMA_STATUS_NEEDS_MORE_INPUT)
+ NeedMoreInput = true;
return (status == LZMA_STATUS_FINISHED_WITH_MARK ? S_OK : S_FALSE);
+ }
}
if (progress)
{
diff --git a/3rdparty/lzma/CPP/7zip/Compress/LzmaDecoder.h b/3rdparty/lzma/CPP/7zip/Compress/LzmaDecoder.h
index d28a4634bc6..f1f839a4f1b 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/LzmaDecoder.h
+++ b/3rdparty/lzma/CPP/7zip/Compress/LzmaDecoder.h
@@ -14,6 +14,7 @@ namespace NLzma {
class CDecoder:
public ICompressCoder,
public ICompressSetDecoderProperties2,
+ public ICompressSetFinishMode,
public ICompressSetBufSize,
#ifndef NO_READ_FROM_CODER
public ICompressSetInStream,
@@ -45,6 +46,7 @@ class CDecoder:
public:
MY_QUERYINTERFACE_BEGIN2(ICompressCoder)
MY_QUERYINTERFACE_ENTRY(ICompressSetDecoderProperties2)
+ MY_QUERYINTERFACE_ENTRY(ICompressSetFinishMode)
MY_QUERYINTERFACE_ENTRY(ICompressSetBufSize)
#ifndef NO_READ_FROM_CODER
MY_QUERYINTERFACE_ENTRY(ICompressSetInStream)
@@ -57,6 +59,7 @@ public:
STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
+ STDMETHOD(SetFinishMode)(UInt32 finishMode);
STDMETHOD(SetOutStreamSize)(const UInt64 *outSize);
STDMETHOD(SetInBufSize)(UInt32 streamIndex, UInt32 size);
STDMETHOD(SetOutBufSize)(UInt32 streamIndex, UInt32 size);
@@ -73,10 +76,14 @@ public:
#endif
- bool FinishStream;
+ bool FinishStream; // set it before decoding, if you need to decode full LZMA stream
+
+ bool NeedMoreInput; // it's set by decoder, if it needs more input data to decode stream
CDecoder();
virtual ~CDecoder();
+
+ UInt64 GetOutputProcessedSize() const { return _outSizeProcessed; }
};
}}
diff --git a/3rdparty/lzma/CPP/7zip/Compress/LzmaEncoder.cpp b/3rdparty/lzma/CPP/7zip/Compress/LzmaEncoder.cpp
index 80e12f181dd..0a7e294d4f9 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/LzmaEncoder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/LzmaEncoder.cpp
@@ -12,29 +12,21 @@
namespace NCompress {
namespace NLzma {
-static void *SzBigAlloc(void *, size_t size) { return BigAlloc(size); }
-static void SzBigFree(void *, void *address) { BigFree(address); }
-static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree };
-
-static void *SzAlloc(void *, size_t size) { return MyAlloc(size); }
-static void SzFree(void *, void *address) { MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
-
CEncoder::CEncoder()
{
- _encoder = 0;
+ _encoder = NULL;
_encoder = LzmaEnc_Create(&g_Alloc);
- if (_encoder == 0)
+ if (!_encoder)
throw 1;
}
CEncoder::~CEncoder()
{
- if (_encoder != 0)
+ if (_encoder)
LzmaEnc_Destroy(_encoder, &g_Alloc, &g_BigAlloc);
}
-inline wchar_t GetUpperChar(wchar_t c)
+static inline wchar_t GetUpperChar(wchar_t c)
{
if (c >= 'a' && c <= 'z')
c -= 0x20;
@@ -51,22 +43,21 @@ static int ParseMatchFinder(const wchar_t *s, int *btMode, int *numHashBytes)
int numHashBytesLoc = (int)(*s++ - L'0');
if (numHashBytesLoc < 4 || numHashBytesLoc > 4)
return 0;
- if (*s++ != 0)
+ if (*s != 0)
return 0;
*btMode = 0;
*numHashBytes = numHashBytesLoc;
return 1;
}
+
if (c != L'B')
return 0;
-
if (GetUpperChar(*s++) != L'T')
return 0;
int numHashBytesLoc = (int)(*s++ - L'0');
if (numHashBytesLoc < 2 || numHashBytesLoc > 4)
return 0;
- c = GetUpperChar(*s++);
- if (c != L'\0')
+ if (*s != 0)
return 0;
*btMode = 1;
*numHashBytes = numHashBytesLoc;
@@ -87,8 +78,8 @@ HRESULT SetLzmaProp(PROPID propID, const PROPVARIANT &prop, CLzmaEncProps &ep)
return S_OK;
if (propID == NCoderPropID::kReduceSize)
{
- if (prop.vt == VT_UI8 && prop.uhVal.QuadPart < (UInt32)(Int32)-1)
- ep.reduceSize = (UInt32)prop.uhVal.QuadPart;
+ if (prop.vt == VT_UI8)
+ ep.reduceSize = prop.uhVal.QuadPart;
return S_OK;
}
if (prop.vt != VT_UI4)
@@ -124,7 +115,7 @@ STDMETHODIMP CEncoder::SetCoderProperties(const PROPID *propIDs,
switch (propID)
{
case NCoderPropID::kEndMarker:
- if (prop.vt != VT_BOOL) return E_INVALIDARG; props.writeEndMark = (prop.boolVal == VARIANT_TRUE); break;
+ if (prop.vt != VT_BOOL) return E_INVALIDARG; props.writeEndMark = (prop.boolVal != VARIANT_FALSE); break;
default:
RINOK(SetLzmaProp(propID, prop, props));
}
@@ -148,6 +139,7 @@ STDMETHODIMP CEncoder::Code(ISequentialInStream *inStream, ISequentialOutStream
CCompressProgressWrap progressWrap(progress);
SRes res = LzmaEnc_Encode(_encoder, &outWrap.p, &inWrap.p, progress ? &progressWrap.p : NULL, &g_Alloc, &g_BigAlloc);
+ _inputProcessed = inWrap.Processed;
if (res == SZ_ERROR_READ && inWrap.Res != S_OK)
return inWrap.Res;
if (res == SZ_ERROR_WRITE && outWrap.Res != S_OK)
@@ -156,5 +148,5 @@ STDMETHODIMP CEncoder::Code(ISequentialInStream *inStream, ISequentialOutStream
return progressWrap.Res;
return SResToHRESULT(res);
}
-
+
}}
diff --git a/3rdparty/lzma/CPP/7zip/Compress/LzmaEncoder.h b/3rdparty/lzma/CPP/7zip/Compress/LzmaEncoder.h
index 904c0002c48..3ed067f14d3 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/LzmaEncoder.h
+++ b/3rdparty/lzma/CPP/7zip/Compress/LzmaEncoder.h
@@ -19,6 +19,7 @@ class CEncoder:
public CMyUnknownImp
{
CLzmaEncHandle _encoder;
+ UInt64 _inputProcessed;
public:
MY_UNKNOWN_IMP2(ICompressSetCoderProperties, ICompressWriteCoderProperties)
@@ -29,6 +30,7 @@ public:
CEncoder();
virtual ~CEncoder();
+ UInt64 GetInputProcessedSize() const { return _inputProcessed; }
};
}}
diff --git a/3rdparty/lzma/CPP/7zip/Compress/LzmaRegister.cpp b/3rdparty/lzma/CPP/7zip/Compress/LzmaRegister.cpp
index 96ed0baed06..c12416f2cd3 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/LzmaRegister.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/LzmaRegister.cpp
@@ -6,15 +6,12 @@
#include "LzmaDecoder.h"
-static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::NLzma::CDecoder); }
#ifndef EXTRACT_ONLY
#include "LzmaEncoder.h"
-static void *CreateCodecOut() { return (void *)(ICompressCoder *)(new NCompress::NLzma::CEncoder); }
-#else
-#define CreateCodecOut 0
#endif
-static CCodecInfo g_CodecInfo =
- { CreateCodec, CreateCodecOut, 0x030101, L"LZMA", 1, false };
-
-REGISTER_CODEC(LZMA)
+REGISTER_CODEC_E(LZMA,
+ NCompress::NLzma::CDecoder(),
+ NCompress::NLzma::CEncoder(),
+ 0x30101,
+ "LZMA")
diff --git a/3rdparty/lzma/CPP/7zip/Compress/PpmdDecoder.cpp b/3rdparty/lzma/CPP/7zip/Compress/PpmdDecoder.cpp
index c02f44f1666..c868730ea00 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/PpmdDecoder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/PpmdDecoder.cpp
@@ -23,10 +23,6 @@ enum
kStatus_Error
};
-static void *SzBigAlloc(void *, size_t size) { return BigAlloc(size); }
-static void SzBigFree(void *, void *address) { BigFree(address); }
-static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree };
-
CDecoder::~CDecoder()
{
::MidFree(_outBuf);
@@ -53,7 +49,7 @@ STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *props, UInt32 size)
HRESULT CDecoder::CodeSpec(Byte *memStream, UInt32 size)
{
- switch(_status)
+ switch (_status)
{
case kStatus_Finished: return S_OK;
case kStatus_Error: return S_FALSE;
diff --git a/3rdparty/lzma/CPP/7zip/Compress/PpmdEncoder.cpp b/3rdparty/lzma/CPP/7zip/Compress/PpmdEncoder.cpp
index 5bf83529383..00ea9668b00 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/PpmdEncoder.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/PpmdEncoder.cpp
@@ -14,10 +14,6 @@ namespace NPpmd {
static const UInt32 kBufSize = (1 << 20);
-static void *SzBigAlloc(void *, size_t size) { return BigAlloc(size); }
-static void SzBigFree(void *, void *address) { BigFree(address); }
-static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree };
-
static const Byte kOrders[10] = { 3, 4, 4, 5, 5, 6, 8, 16, 24, 32 };
void CEncProps::Normalize(int level)
@@ -40,7 +36,7 @@ void CEncProps::Normalize(int level)
}
}
}
- if (Order == -1) Order = kOrders[level];
+ if (Order == -1) Order = kOrders[(unsigned)level];
}
CEncoder::CEncoder():
diff --git a/3rdparty/lzma/CPP/7zip/Compress/PpmdRegister.cpp b/3rdparty/lzma/CPP/7zip/Compress/PpmdRegister.cpp
index 9f59fcdd39a..17f84bd03b9 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/PpmdRegister.cpp
+++ b/3rdparty/lzma/CPP/7zip/Compress/PpmdRegister.cpp
@@ -1,5 +1,4 @@
// PpmdRegister.cpp
-// 2009-05-30 : Igor Pavlov : Public domain
#include "StdAfx.h"
@@ -7,15 +6,12 @@
#include "PpmdDecoder.h"
-static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::NPpmd::CDecoder); }
#ifndef EXTRACT_ONLY
#include "PpmdEncoder.h"
-static void *CreateCodecOut() { return (void *)(ICompressCoder *)(new NCompress::NPpmd::CEncoder); }
-#else
-#define CreateCodecOut 0
#endif
-static CCodecInfo g_CodecInfo =
- { CreateCodec, CreateCodecOut, 0x030401, L"PPMD", 1, false };
-
-REGISTER_CODEC(PPMD)
+REGISTER_CODEC_E(PPMD,
+ NCompress::NPpmd::CDecoder(),
+ NCompress::NPpmd::CEncoder(),
+ 0x30401,
+ "PPMD")
diff --git a/3rdparty/lzma/CPP/7zip/Compress/RangeCoder.h b/3rdparty/lzma/CPP/7zip/Compress/RangeCoder.h
deleted file mode 100644
index 1eb2a6d470e..00000000000
--- a/3rdparty/lzma/CPP/7zip/Compress/RangeCoder.h
+++ /dev/null
@@ -1,205 +0,0 @@
-// Compress/RangeCoder.h
-// 2009-05-30 : Igor Pavlov : Public domain
-
-#ifndef __COMPRESS_RANGE_CODER_H
-#define __COMPRESS_RANGE_CODER_H
-
-#include "../Common/InBuffer.h"
-#include "../Common/OutBuffer.h"
-
-namespace NCompress {
-namespace NRangeCoder {
-
-const int kNumTopBits = 24;
-const UInt32 kTopValue = (1 << kNumTopBits);
-
-class CEncoder
-{
- UInt32 _cacheSize;
- Byte _cache;
-public:
- UInt64 Low;
- UInt32 Range;
- COutBuffer Stream;
- bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); }
-
- void SetStream(ISequentialOutStream *stream) { Stream.SetStream(stream); }
- void Init()
- {
- Stream.Init();
- Low = 0;
- Range = 0xFFFFFFFF;
- _cacheSize = 1;
- _cache = 0;
- }
-
- void FlushData()
- {
- // Low += 1;
- for(int i = 0; i < 5; i++)
- ShiftLow();
- }
-
- HRESULT FlushStream() { return Stream.Flush(); }
-
- void ReleaseStream() { Stream.ReleaseStream(); }
-
- void Encode(UInt32 start, UInt32 size, UInt32 total)
- {
- Low += start * (Range /= total);
- Range *= size;
- while (Range < kTopValue)
- {
- Range <<= 8;
- ShiftLow();
- }
- }
-
- void ShiftLow()
- {
- if ((UInt32)Low < (UInt32)0xFF000000 || (int)(Low >> 32) != 0)
- {
- Byte temp = _cache;
- do
- {
- Stream.WriteByte((Byte)(temp + (Byte)(Low >> 32)));
- temp = 0xFF;
- }
- while(--_cacheSize != 0);
- _cache = (Byte)((UInt32)Low >> 24);
- }
- _cacheSize++;
- Low = (UInt32)Low << 8;
- }
-
- void EncodeDirectBits(UInt32 value, int numBits)
- {
- for (numBits--; numBits >= 0; numBits--)
- {
- Range >>= 1;
- Low += Range & (0 - ((value >> numBits) & 1));
- if (Range < kTopValue)
- {
- Range <<= 8;
- ShiftLow();
- }
- }
- }
-
- void EncodeBit(UInt32 size0, UInt32 numTotalBits, UInt32 symbol)
- {
- UInt32 newBound = (Range >> numTotalBits) * size0;
- if (symbol == 0)
- Range = newBound;
- else
- {
- Low += newBound;
- Range -= newBound;
- }
- while (Range < kTopValue)
- {
- Range <<= 8;
- ShiftLow();
- }
- }
-
- UInt64 GetProcessedSize() { return Stream.GetProcessedSize() + _cacheSize + 4; }
-};
-
-class CDecoder
-{
-public:
- CInBuffer Stream;
- UInt32 Range;
- UInt32 Code;
- bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); }
-
- void Normalize()
- {
- while (Range < kTopValue)
- {
- Code = (Code << 8) | Stream.ReadByte();
- Range <<= 8;
- }
- }
-
- void SetStream(ISequentialInStream *stream) { Stream.SetStream(stream); }
- void Init()
- {
- Stream.Init();
- Code = 0;
- Range = 0xFFFFFFFF;
- for(int i = 0; i < 5; i++)
- Code = (Code << 8) | Stream.ReadByte();
- }
-
- void ReleaseStream() { Stream.ReleaseStream(); }
-
- UInt32 GetThreshold(UInt32 total)
- {
- return (Code) / ( Range /= total);
- }
-
- void Decode(UInt32 start, UInt32 size)
- {
- Code -= start * Range;
- Range *= size;
- Normalize();
- }
-
- UInt32 DecodeDirectBits(int numTotalBits)
- {
- UInt32 range = Range;
- UInt32 code = Code;
- UInt32 result = 0;
- for (int i = numTotalBits; i != 0; i--)
- {
- range >>= 1;
- /*
- result <<= 1;
- if (code >= range)
- {
- code -= range;
- result |= 1;
- }
- */
- UInt32 t = (code - range) >> 31;
- code -= range & (t - 1);
- result = (result << 1) | (1 - t);
-
- if (range < kTopValue)
- {
- code = (code << 8) | Stream.ReadByte();
- range <<= 8;
- }
- }
- Range = range;
- Code = code;
- return result;
- }
-
- UInt32 DecodeBit(UInt32 size0, UInt32 numTotalBits)
- {
- UInt32 newBound = (Range >> numTotalBits) * size0;
- UInt32 symbol;
- if (Code < newBound)
- {
- symbol = 0;
- Range = newBound;
- }
- else
- {
- symbol = 1;
- Code -= newBound;
- Range -= newBound;
- }
- Normalize();
- return symbol;
- }
-
- UInt64 GetProcessedSize() {return Stream.GetProcessedSize(); }
-};
-
-}}
-
-#endif
diff --git a/3rdparty/lzma/CPP/7zip/Compress/RangeCoderBit.h b/3rdparty/lzma/CPP/7zip/Compress/RangeCoderBit.h
deleted file mode 100644
index b5a1830d678..00000000000
--- a/3rdparty/lzma/CPP/7zip/Compress/RangeCoderBit.h
+++ /dev/null
@@ -1,114 +0,0 @@
-// Compress/RangeCoderBit.h
-// 2009-05-30 : Igor Pavlov : Public domain
-
-#ifndef __COMPRESS_RANGE_CODER_BIT_H
-#define __COMPRESS_RANGE_CODER_BIT_H
-
-#include "RangeCoder.h"
-
-namespace NCompress {
-namespace NRangeCoder {
-
-const int kNumBitModelTotalBits = 11;
-const UInt32 kBitModelTotal = (1 << kNumBitModelTotalBits);
-
-const int kNumMoveReducingBits = 4;
-
-const int kNumBitPriceShiftBits = 4;
-const UInt32 kBitPrice = 1 << kNumBitPriceShiftBits;
-
-extern UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
-
-template <int numMoveBits>
-class CBitModel
-{
-public:
- UInt32 Prob;
- void UpdateModel(UInt32 symbol)
- {
- /*
- Prob -= (Prob + ((symbol - 1) & ((1 << numMoveBits) - 1))) >> numMoveBits;
- Prob += (1 - symbol) << (kNumBitModelTotalBits - numMoveBits);
- */
- if (symbol == 0)
- Prob += (kBitModelTotal - Prob) >> numMoveBits;
- else
- Prob -= (Prob) >> numMoveBits;
- }
-public:
- void Init() { Prob = kBitModelTotal / 2; }
-};
-
-template <int numMoveBits>
-class CBitEncoder: public CBitModel<numMoveBits>
-{
-public:
- void Encode(CEncoder *encoder, UInt32 symbol)
- {
- /*
- encoder->EncodeBit(this->Prob, kNumBitModelTotalBits, symbol);
- this->UpdateModel(symbol);
- */
- UInt32 newBound = (encoder->Range >> kNumBitModelTotalBits) * this->Prob;
- if (symbol == 0)
- {
- encoder->Range = newBound;
- this->Prob += (kBitModelTotal - this->Prob) >> numMoveBits;
- }
- else
- {
- encoder->Low += newBound;
- encoder->Range -= newBound;
- this->Prob -= (this->Prob) >> numMoveBits;
- }
- if (encoder->Range < kTopValue)
- {
- encoder->Range <<= 8;
- encoder->ShiftLow();
- }
- }
- UInt32 GetPrice(UInt32 symbol) const
- {
- return ProbPrices[(this->Prob ^ ((-(int)symbol)) & (kBitModelTotal - 1)) >> kNumMoveReducingBits];
- }
- UInt32 GetPrice0() const { return ProbPrices[this->Prob >> kNumMoveReducingBits]; }
- UInt32 GetPrice1() const { return ProbPrices[(this->Prob ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits]; }
-};
-
-
-template <int numMoveBits>
-class CBitDecoder: public CBitModel<numMoveBits>
-{
-public:
- UInt32 Decode(CDecoder *decoder)
- {
- UInt32 newBound = (decoder->Range >> kNumBitModelTotalBits) * this->Prob;
- if (decoder->Code < newBound)
- {
- decoder->Range = newBound;
- this->Prob += (kBitModelTotal - this->Prob) >> numMoveBits;
- if (decoder->Range < kTopValue)
- {
- decoder->Code = (decoder->Code << 8) | decoder->Stream.ReadByte();
- decoder->Range <<= 8;
- }
- return 0;
- }
- else
- {
- decoder->Range -= newBound;
- decoder->Code -= newBound;
- this->Prob -= (this->Prob) >> numMoveBits;
- if (decoder->Range < kTopValue)
- {
- decoder->Code = (decoder->Code << 8) | decoder->Stream.ReadByte();
- decoder->Range <<= 8;
- }
- return 1;
- }
- }
-};
-
-}}
-
-#endif
diff --git a/3rdparty/lzma/CPP/7zip/Compress/StdAfx.h b/3rdparty/lzma/CPP/7zip/Compress/StdAfx.h
index 99a8aa46d36..1cbd7feaeec 100644
--- a/3rdparty/lzma/CPP/7zip/Compress/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Compress/StdAfx.h
@@ -3,6 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../Common/MyWindows.h"
+#include "../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Crc.mak b/3rdparty/lzma/CPP/7zip/Crc.mak
index 7f2552c1708..f2b0874cb45 100644
--- a/3rdparty/lzma/CPP/7zip/Crc.mak
+++ b/3rdparty/lzma/CPP/7zip/Crc.mak
@@ -1,6 +1,6 @@
C_OBJS = $(C_OBJS) \
$O\7zCrc.obj
-!IF "$(CPU)" == "IA64" || "$(CPU)" == "MIPS"
+!IF "$(CPU)" == "IA64" || "$(CPU)" == "MIPS" || "$(CPU)" == "ARM"
C_OBJS = $(C_OBJS) \
!ELSE
ASM_OBJS = $(ASM_OBJS) \
diff --git a/3rdparty/lzma/CPP/7zip/Crc64.mak b/3rdparty/lzma/CPP/7zip/Crc64.mak
new file mode 100644
index 00000000000..57301c22345
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Crc64.mak
@@ -0,0 +1,8 @@
+C_OBJS = $(C_OBJS) \
+ $O\XzCrc64.obj
+!IF "$(CPU)" == "IA64" || "$(CPU)" == "MIPS" || "$(CPU)" == "ARM"
+C_OBJS = $(C_OBJS) \
+!ELSE
+ASM_OBJS = $(ASM_OBJS) \
+!ENDIF
+ $O\XzCrc64Opt.obj
diff --git a/3rdparty/lzma/CPP/7zip/Crypto/7zAes.cpp b/3rdparty/lzma/CPP/7zip/Crypto/7zAes.cpp
new file mode 100644
index 00000000000..d33b562a3f6
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Crypto/7zAes.cpp
@@ -0,0 +1,280 @@
+// 7zAes.cpp
+
+#include "StdAfx.h"
+
+#include "../../../C/Sha256.h"
+
+#include "../../Common/ComTry.h"
+
+#ifndef _7ZIP_ST
+#include "../../Windows/Synchronization.h"
+#endif
+
+#include "../Common/StreamUtils.h"
+
+#include "7zAes.h"
+#include "MyAes.h"
+
+#ifndef EXTRACT_ONLY
+#include "RandGen.h"
+#endif
+
+namespace NCrypto {
+namespace N7z {
+
+static const unsigned k_NumCyclesPower_Supported_MAX = 24;
+
+bool CKeyInfo::IsEqualTo(const CKeyInfo &a) const
+{
+ if (SaltSize != a.SaltSize || NumCyclesPower != a.NumCyclesPower)
+ return false;
+ for (unsigned i = 0; i < SaltSize; i++)
+ if (Salt[i] != a.Salt[i])
+ return false;
+ return (Password == a.Password);
+}
+
+void CKeyInfo::CalcKey()
+{
+ if (NumCyclesPower == 0x3F)
+ {
+ unsigned pos;
+ for (pos = 0; pos < SaltSize; pos++)
+ Key[pos] = Salt[pos];
+ for (unsigned i = 0; i < Password.Size() && pos < kKeySize; i++)
+ Key[pos++] = Password[i];
+ for (; pos < kKeySize; pos++)
+ Key[pos] = 0;
+ }
+ else
+ {
+ size_t bufSize = 8 + SaltSize + Password.Size();
+ CObjArray<Byte> buf(bufSize);
+ memcpy(buf, Salt, SaltSize);
+ memcpy(buf + SaltSize, Password, Password.Size());
+
+ CSha256 sha;
+ Sha256_Init(&sha);
+
+ Byte *ctr = buf + SaltSize + Password.Size();
+
+ for (unsigned i = 0; i < 8; i++)
+ ctr[i] = 0;
+
+ UInt64 numRounds = (UInt64)1 << NumCyclesPower;
+
+ do
+ {
+ Sha256_Update(&sha, buf, bufSize);
+ for (unsigned i = 0; i < 8; i++)
+ if (++(ctr[i]) != 0)
+ break;
+ }
+ while (--numRounds != 0);
+
+ Sha256_Final(&sha, Key);
+ }
+}
+
+bool CKeyInfoCache::GetKey(CKeyInfo &key)
+{
+ FOR_VECTOR (i, Keys)
+ {
+ const CKeyInfo &cached = Keys[i];
+ if (key.IsEqualTo(cached))
+ {
+ for (unsigned j = 0; j < kKeySize; j++)
+ key.Key[j] = cached.Key[j];
+ if (i != 0)
+ Keys.MoveToFront(i);
+ return true;
+ }
+ }
+ return false;
+}
+
+void CKeyInfoCache::FindAndAdd(const CKeyInfo &key)
+{
+ FOR_VECTOR (i, Keys)
+ {
+ const CKeyInfo &cached = Keys[i];
+ if (key.IsEqualTo(cached))
+ {
+ if (i != 0)
+ Keys.MoveToFront(i);
+ return;
+ }
+ }
+ Add(key);
+}
+
+void CKeyInfoCache::Add(const CKeyInfo &key)
+{
+ if (Keys.Size() >= Size)
+ Keys.DeleteBack();
+ Keys.Insert(0, key);
+}
+
+static CKeyInfoCache g_GlobalKeyCache(32);
+
+#ifndef _7ZIP_ST
+ static NWindows::NSynchronization::CCriticalSection g_GlobalKeyCacheCriticalSection;
+ #define MT_LOCK NWindows::NSynchronization::CCriticalSectionLock lock(g_GlobalKeyCacheCriticalSection);
+#else
+ #define MT_LOCK
+#endif
+
+CBase::CBase():
+ _cachedKeys(16),
+ _ivSize(0)
+{
+ for (unsigned i = 0; i < sizeof(_iv); i++)
+ _iv[i] = 0;
+}
+
+void CBase::PrepareKey()
+{
+ // BCJ2 threads use same password. So we use long lock.
+ MT_LOCK
+
+ bool finded = false;
+ if (!_cachedKeys.GetKey(_key))
+ {
+ finded = g_GlobalKeyCache.GetKey(_key);
+ if (!finded)
+ _key.CalcKey();
+ _cachedKeys.Add(_key);
+ }
+ if (!finded)
+ g_GlobalKeyCache.FindAndAdd(_key);
+}
+
+#ifndef EXTRACT_ONLY
+
+/*
+STDMETHODIMP CEncoder::ResetSalt()
+{
+ _key.SaltSize = 4;
+ g_RandomGenerator.Generate(_key.Salt, _key.SaltSize);
+ return S_OK;
+}
+*/
+
+STDMETHODIMP CEncoder::ResetInitVector()
+{
+ for (unsigned i = 0; i < sizeof(_iv); i++)
+ _iv[i] = 0;
+ _ivSize = 8;
+ g_RandomGenerator.Generate(_iv, _ivSize);
+ return S_OK;
+}
+
+STDMETHODIMP CEncoder::WriteCoderProperties(ISequentialOutStream *outStream)
+{
+ Byte props[2 + sizeof(_key.Salt) + sizeof(_iv)];
+ unsigned propsSize = 1;
+
+ props[0] = (Byte)(_key.NumCyclesPower
+ | (_key.SaltSize == 0 ? 0 : (1 << 7))
+ | (_ivSize == 0 ? 0 : (1 << 6)));
+
+ if (_key.SaltSize != 0 || _ivSize != 0)
+ {
+ props[1] = (Byte)(
+ ((_key.SaltSize == 0 ? 0 : _key.SaltSize - 1) << 4)
+ | (_ivSize == 0 ? 0 : _ivSize - 1));
+ memcpy(props + 2, _key.Salt, _key.SaltSize);
+ propsSize = 2 + _key.SaltSize;
+ memcpy(props + propsSize, _iv, _ivSize);
+ propsSize += _ivSize;
+ }
+
+ return WriteStream(outStream, props, propsSize);
+}
+
+CEncoder::CEncoder()
+{
+ // _key.SaltSize = 4; g_RandomGenerator.Generate(_key.Salt, _key.SaltSize);
+ // _key.NumCyclesPower = 0x3F;
+ _key.NumCyclesPower = 19;
+ _aesFilter = new CAesCbcEncoder(kKeySize);
+}
+
+#endif
+
+CDecoder::CDecoder()
+{
+ _aesFilter = new CAesCbcDecoder(kKeySize);
+}
+
+STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size)
+{
+ _key.ClearProps();
+
+ _ivSize = 0;
+ unsigned i;
+ for (i = 0; i < sizeof(_iv); i++)
+ _iv[i] = 0;
+
+ if (size == 0)
+ return S_OK;
+
+ Byte b0 = data[0];
+
+ _key.NumCyclesPower = b0 & 0x3F;
+ if ((b0 & 0xC0) == 0)
+ return size == 1 ? S_OK : E_INVALIDARG;
+
+ if (size <= 1)
+ return E_INVALIDARG;
+
+ Byte b1 = data[1];
+
+ unsigned saltSize = ((b0 >> 7) & 1) + (b1 >> 4);
+ unsigned ivSize = ((b0 >> 6) & 1) + (b1 & 0x0F);
+
+ if (size != 2 + saltSize + ivSize)
+ return E_INVALIDARG;
+ _key.SaltSize = saltSize;
+ data += 2;
+ for (i = 0; i < saltSize; i++)
+ _key.Salt[i] = *data++;
+ for (i = 0; i < ivSize; i++)
+ _iv[i] = *data++;
+ return (_key.NumCyclesPower <= k_NumCyclesPower_Supported_MAX
+ || _key.NumCyclesPower == 0x3F) ? S_OK : E_NOTIMPL;
+}
+
+
+STDMETHODIMP CBaseCoder::CryptoSetPassword(const Byte *data, UInt32 size)
+{
+ COM_TRY_BEGIN
+
+ _key.Password.CopyFrom(data, (size_t)size);
+ return S_OK;
+
+ COM_TRY_END
+}
+
+STDMETHODIMP CBaseCoder::Init()
+{
+ COM_TRY_BEGIN
+
+ PrepareKey();
+ CMyComPtr<ICryptoProperties> cp;
+ RINOK(_aesFilter.QueryInterface(IID_ICryptoProperties, &cp));
+ if (!cp)
+ return E_FAIL;
+ RINOK(cp->SetKey(_key.Key, kKeySize));
+ RINOK(cp->SetInitVector(_iv, sizeof(_iv)));
+ return _aesFilter->Init();
+
+ COM_TRY_END
+}
+
+STDMETHODIMP_(UInt32) CBaseCoder::Filter(Byte *data, UInt32 size)
+{
+ return _aesFilter->Filter(data, size);
+}
+
+}}
diff --git a/3rdparty/lzma/CPP/7zip/Crypto/7zAes.h b/3rdparty/lzma/CPP/7zip/Crypto/7zAes.h
new file mode 100644
index 00000000000..4bd7d2911cc
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Crypto/7zAes.h
@@ -0,0 +1,116 @@
+// 7zAes.h
+
+#ifndef __CRYPTO_7Z_AES_H
+#define __CRYPTO_7Z_AES_H
+
+#include "../../Common/MyBuffer.h"
+#include "../../Common/MyCom.h"
+#include "../../Common/MyVector.h"
+
+#include "../ICoder.h"
+#include "../IPassword.h"
+
+namespace NCrypto {
+namespace N7z {
+
+const unsigned kKeySize = 32;
+const unsigned kSaltSizeMax = 16;
+const unsigned kIvSizeMax = 16; // AES_BLOCK_SIZE;
+
+class CKeyInfo
+{
+public:
+ unsigned NumCyclesPower;
+ unsigned SaltSize;
+ Byte Salt[kSaltSizeMax];
+ CByteBuffer Password;
+ Byte Key[kKeySize];
+
+ bool IsEqualTo(const CKeyInfo &a) const;
+ void CalcKey();
+
+ CKeyInfo() { ClearProps(); }
+ void ClearProps()
+ {
+ NumCyclesPower = 0;
+ SaltSize = 0;
+ for (unsigned i = 0; i < sizeof(Salt); i++)
+ Salt[i] = 0;
+ }
+};
+
+class CKeyInfoCache
+{
+ unsigned Size;
+ CObjectVector<CKeyInfo> Keys;
+public:
+ CKeyInfoCache(unsigned size): Size(size) {}
+ bool GetKey(CKeyInfo &key);
+ void Add(const CKeyInfo &key);
+ void FindAndAdd(const CKeyInfo &key);
+};
+
+class CBase
+{
+ CKeyInfoCache _cachedKeys;
+protected:
+ CKeyInfo _key;
+ Byte _iv[kIvSizeMax];
+ unsigned _ivSize;
+
+ void PrepareKey();
+ CBase();
+};
+
+class CBaseCoder:
+ public ICompressFilter,
+ public ICryptoSetPassword,
+ public CMyUnknownImp,
+ public CBase
+{
+protected:
+ CMyComPtr<ICompressFilter> _aesFilter;
+
+public:
+ INTERFACE_ICompressFilter(;)
+
+ STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size);
+};
+
+#ifndef EXTRACT_ONLY
+
+class CEncoder:
+ public CBaseCoder,
+ public ICompressWriteCoderProperties,
+ // public ICryptoResetSalt,
+ public ICryptoResetInitVector
+{
+public:
+ MY_UNKNOWN_IMP3(
+ ICryptoSetPassword,
+ ICompressWriteCoderProperties,
+ // ICryptoResetSalt,
+ ICryptoResetInitVector)
+ STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream);
+ // STDMETHOD(ResetSalt)();
+ STDMETHOD(ResetInitVector)();
+ CEncoder();
+};
+
+#endif
+
+class CDecoder:
+ public CBaseCoder,
+ public ICompressSetDecoderProperties2
+{
+public:
+ MY_UNKNOWN_IMP2(
+ ICryptoSetPassword,
+ ICompressSetDecoderProperties2)
+ STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
+ CDecoder();
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Crypto/7zAesRegister.cpp b/3rdparty/lzma/CPP/7zip/Crypto/7zAesRegister.cpp
new file mode 100644
index 00000000000..f1916cb15f1
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Crypto/7zAesRegister.cpp
@@ -0,0 +1,12 @@
+// 7zAesRegister.cpp
+
+#include "StdAfx.h"
+
+#include "../Common/RegisterCodec.h"
+
+#include "7zAes.h"
+
+REGISTER_FILTER_E(7zAES,
+ NCrypto::N7z::CDecoder(),
+ NCrypto::N7z::CEncoder(),
+ 0x6F10701, "7zAES")
diff --git a/3rdparty/lzma/CPP/7zip/Crypto/MyAes.cpp b/3rdparty/lzma/CPP/7zip/Crypto/MyAes.cpp
new file mode 100644
index 00000000000..52eaab7ae2c
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Crypto/MyAes.cpp
@@ -0,0 +1,112 @@
+// Crypto/MyAes.cpp
+
+#include "StdAfx.h"
+
+#include "../../../C/CpuArch.h"
+
+#include "MyAes.h"
+
+namespace NCrypto {
+
+static struct CAesTabInit { CAesTabInit() { AesGenTables();} } g_AesTabInit;
+
+CAesCbcCoder::CAesCbcCoder(bool encodeMode, unsigned keySize):
+ _keySize(keySize),
+ _keyIsSet(false),
+ _encodeMode(encodeMode)
+{
+ _offset = ((0 - (unsigned)(ptrdiff_t)_aes) & 0xF) / sizeof(UInt32);
+ memset(_iv, 0, AES_BLOCK_SIZE);
+ SetFunctions(0);
+}
+
+STDMETHODIMP CAesCbcCoder::Init()
+{
+ AesCbc_Init(_aes + _offset, _iv);
+ return _keyIsSet ? S_OK : E_FAIL;
+}
+
+STDMETHODIMP_(UInt32) CAesCbcCoder::Filter(Byte *data, UInt32 size)
+{
+ if (!_keyIsSet)
+ return 0;
+ if (size == 0)
+ return 0;
+ if (size < AES_BLOCK_SIZE)
+ return AES_BLOCK_SIZE;
+ size >>= 4;
+ _codeFunc(_aes + _offset, data, size);
+ return size << 4;
+}
+
+STDMETHODIMP CAesCbcCoder::SetKey(const Byte *data, UInt32 size)
+{
+ if ((size & 0x7) != 0 || size < 16 || size > 32)
+ return E_INVALIDARG;
+ if (_keySize != 0 && size != _keySize)
+ return E_INVALIDARG;
+ AES_SET_KEY_FUNC setKeyFunc = _encodeMode ? Aes_SetKey_Enc : Aes_SetKey_Dec;
+ setKeyFunc(_aes + _offset + 4, data, size);
+ _keyIsSet = true;
+ return S_OK;
+}
+
+STDMETHODIMP CAesCbcCoder::SetInitVector(const Byte *data, UInt32 size)
+{
+ if (size != AES_BLOCK_SIZE)
+ return E_INVALIDARG;
+ memcpy(_iv, data, size);
+ CAesCbcCoder::Init(); // don't call virtual function here !!!
+ return S_OK;
+}
+
+EXTERN_C_BEGIN
+
+void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks);
+
+void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks);
+
+EXTERN_C_END
+
+bool CAesCbcCoder::SetFunctions(UInt32 algo)
+{
+ _codeFunc = _encodeMode ?
+ g_AesCbc_Encode :
+ g_AesCbc_Decode;
+ if (algo == 1)
+ {
+ _codeFunc = _encodeMode ?
+ AesCbc_Encode:
+ AesCbc_Decode;
+ }
+ if (algo == 2)
+ {
+ #ifdef MY_CPU_X86_OR_AMD64
+ if (g_AesCbc_Encode != AesCbc_Encode_Intel)
+ #endif
+ return false;
+ }
+ return true;
+}
+
+STDMETHODIMP CAesCbcCoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *coderProps, UInt32 numProps)
+{
+ for (UInt32 i = 0; i < numProps; i++)
+ {
+ const PROPVARIANT &prop = coderProps[i];
+ if (propIDs[i] == NCoderPropID::kDefaultProp)
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ if (!SetFunctions(prop.ulVal))
+ return E_NOTIMPL;
+ }
+ }
+ return S_OK;
+}
+
+}
diff --git a/3rdparty/lzma/CPP/7zip/Crypto/MyAes.h b/3rdparty/lzma/CPP/7zip/Crypto/MyAes.h
new file mode 100644
index 00000000000..289935ebc36
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Crypto/MyAes.h
@@ -0,0 +1,55 @@
+// Crypto/MyAes.h
+
+#ifndef __CRYPTO_MY_AES_H
+#define __CRYPTO_MY_AES_H
+
+#include "../../../C/Aes.h"
+
+#include "../../Common/MyCom.h"
+
+#include "../ICoder.h"
+
+namespace NCrypto {
+
+class CAesCbcCoder:
+ public ICompressFilter,
+ public ICryptoProperties,
+ public ICompressSetCoderProperties,
+ public CMyUnknownImp
+{
+ AES_CODE_FUNC _codeFunc;
+ unsigned _offset;
+ unsigned _keySize;
+ bool _keyIsSet;
+ bool _encodeMode;
+ UInt32 _aes[AES_NUM_IVMRK_WORDS + 3];
+ Byte _iv[AES_BLOCK_SIZE];
+
+ bool SetFunctions(UInt32 algo);
+
+public:
+ CAesCbcCoder(bool encodeMode, unsigned keySize);
+
+ MY_UNKNOWN_IMP2(ICryptoProperties, ICompressSetCoderProperties)
+
+ INTERFACE_ICompressFilter(;)
+
+ STDMETHOD(SetKey)(const Byte *data, UInt32 size);
+ STDMETHOD(SetInitVector)(const Byte *data, UInt32 size);
+
+ STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps);
+};
+
+struct CAesCbcEncoder: public CAesCbcCoder
+{
+ CAesCbcEncoder(unsigned keySize = 0): CAesCbcCoder(true, keySize) {}
+};
+
+struct CAesCbcDecoder: public CAesCbcCoder
+{
+ CAesCbcDecoder(unsigned keySize = 0): CAesCbcCoder(false, keySize) {}
+};
+
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Crypto/MyAesReg.cpp b/3rdparty/lzma/CPP/7zip/Crypto/MyAesReg.cpp
new file mode 100644
index 00000000000..34035da6888
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Crypto/MyAesReg.cpp
@@ -0,0 +1,12 @@
+// MyAesReg.cpp
+
+#include "StdAfx.h"
+
+#include "../Common/RegisterCodec.h"
+
+#include "MyAes.h"
+
+REGISTER_FILTER_E(AES256CBC,
+ NCrypto::CAesCbcDecoder(32),
+ NCrypto::CAesCbcEncoder(32),
+ 0x6F00181, "AES256CBC")
diff --git a/3rdparty/lzma/CPP/7zip/Crypto/RandGen.cpp b/3rdparty/lzma/CPP/7zip/Crypto/RandGen.cpp
new file mode 100644
index 00000000000..408f73f1686
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Crypto/RandGen.cpp
@@ -0,0 +1,124 @@
+// RandGen.cpp
+
+#include "StdAfx.h"
+
+#ifndef _7ZIP_ST
+#include "../../Windows/Synchronization.h"
+#endif
+
+#include "RandGen.h"
+
+#ifndef _WIN32
+#include <unistd.h>
+#define USE_POSIX_TIME
+#define USE_POSIX_TIME2
+#endif
+
+#ifdef USE_POSIX_TIME
+#include <time.h>
+#ifdef USE_POSIX_TIME2
+#include <sys/time.h>
+#endif
+#endif
+
+// This is not very good random number generator.
+// Please use it only for salt.
+// First generated data block depends from timer and processID.
+// Other generated data blocks depend from previous state
+// Maybe it's possible to restore original timer value from generated value.
+
+#define HASH_UPD(x) Sha256_Update(&hash, (const Byte *)&x, sizeof(x));
+
+void CRandomGenerator::Init()
+{
+ CSha256 hash;
+ Sha256_Init(&hash);
+
+ #ifdef _WIN32
+ DWORD w = ::GetCurrentProcessId();
+ HASH_UPD(w);
+ w = ::GetCurrentThreadId();
+ HASH_UPD(w);
+ #else
+ pid_t pid = getpid();
+ HASH_UPD(pid);
+ pid = getppid();
+ HASH_UPD(pid);
+ #endif
+
+ for (unsigned i = 0; i <
+ #ifdef _DEBUG
+ 2;
+ #else
+ 1000;
+ #endif
+ i++)
+ {
+ #ifdef _WIN32
+ LARGE_INTEGER v;
+ if (::QueryPerformanceCounter(&v))
+ HASH_UPD(v.QuadPart);
+ #endif
+
+ #ifdef USE_POSIX_TIME
+ #ifdef USE_POSIX_TIME2
+ timeval v;
+ if (gettimeofday(&v, 0) == 0)
+ {
+ HASH_UPD(v.tv_sec);
+ HASH_UPD(v.tv_usec);
+ }
+ #endif
+ time_t v2 = time(NULL);
+ HASH_UPD(v2);
+ #endif
+
+ #ifdef _WIN32
+ DWORD tickCount = ::GetTickCount();
+ HASH_UPD(tickCount);
+ #endif
+
+ for (unsigned j = 0; j < 100; j++)
+ {
+ Sha256_Final(&hash, _buff);
+ Sha256_Init(&hash);
+ Sha256_Update(&hash, _buff, SHA256_DIGEST_SIZE);
+ }
+ }
+ Sha256_Final(&hash, _buff);
+ _needInit = false;
+}
+
+#ifndef _7ZIP_ST
+ static NWindows::NSynchronization::CCriticalSection g_CriticalSection;
+ #define MT_LOCK NWindows::NSynchronization::CCriticalSectionLock lock(g_CriticalSection);
+#else
+ #define MT_LOCK
+#endif
+
+void CRandomGenerator::Generate(Byte *data, unsigned size)
+{
+ MT_LOCK
+
+ if (_needInit)
+ Init();
+ while (size != 0)
+ {
+ CSha256 hash;
+
+ Sha256_Init(&hash);
+ Sha256_Update(&hash, _buff, SHA256_DIGEST_SIZE);
+ Sha256_Final(&hash, _buff);
+
+ Sha256_Init(&hash);
+ UInt32 salt = 0xF672ABD1;
+ HASH_UPD(salt);
+ Sha256_Update(&hash, _buff, SHA256_DIGEST_SIZE);
+ Byte buff[SHA256_DIGEST_SIZE];
+ Sha256_Final(&hash, buff);
+ for (unsigned i = 0; i < SHA256_DIGEST_SIZE && size != 0; i++, size--)
+ *data++ = buff[i];
+ }
+}
+
+CRandomGenerator g_RandomGenerator;
diff --git a/3rdparty/lzma/CPP/7zip/Crypto/RandGen.h b/3rdparty/lzma/CPP/7zip/Crypto/RandGen.h
new file mode 100644
index 00000000000..cfdcd60d012
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Crypto/RandGen.h
@@ -0,0 +1,21 @@
+// RandGen.h
+
+#ifndef __CRYPTO_RAND_GEN_H
+#define __CRYPTO_RAND_GEN_H
+
+#include "../../../C/Sha256.h"
+
+class CRandomGenerator
+{
+ Byte _buff[SHA256_DIGEST_SIZE];
+ bool _needInit;
+
+ void Init();
+public:
+ CRandomGenerator(): _needInit(true) {};
+ void Generate(Byte *data, unsigned size);
+};
+
+extern CRandomGenerator g_RandomGenerator;
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Crypto/StdAfx.h b/3rdparty/lzma/CPP/7zip/Crypto/StdAfx.h
new file mode 100644
index 00000000000..1cbd7feaeec
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Crypto/StdAfx.h
@@ -0,0 +1,8 @@
+// StdAfx.h
+
+#ifndef __STDAFX_H
+#define __STDAFX_H
+
+#include "../../Common/Common.h"
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/GuiCommon.rc b/3rdparty/lzma/CPP/7zip/GuiCommon.rc
new file mode 100644
index 00000000000..6b26ddd85c9
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/GuiCommon.rc
@@ -0,0 +1,81 @@
+#include <windows.h>
+
+// #include <winnt.h>
+// #include <WinUser.h>
+
+// for Windows CE:
+#include <CommCtrl.h>
+
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+#undef m
+#undef bxs
+#undef bys
+#undef bxsDots
+#undef y
+#undef xc
+#undef yc
+#undef xs
+#undef ys
+#undef bx
+#undef bx1
+#undef bx2
+#undef bx3
+#undef by
+#undef by1
+#undef by2
+#undef by3
+#undef gSpace
+#undef gSize
+#undef marg2
+#undef marg3
+
+#undef MY_DIALOG
+#undef MY_RESIZE_DIALOG
+#undef MY_PAGE
+
+#define m 8
+#define bxs 64
+#define bys 16
+#define bxsDots 20
+
+#define xs (xc + m + m)
+#define ys (yc + m + m)
+
+#define bx1 (xs - m - bxs)
+#define bx2 (bx1 - m - bxs)
+#define bx3 (bx2 - m - bxs)
+#define bx bx1
+
+#define by1 (ys - m - bys)
+#define by2 (by1 - m - bys)
+#define by by1
+
+
+#define MY_MODAL_DIALOG_STYLE STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+
+#define MY_MODAL_RESIZE_DIALOG_STYLE MY_MODAL_DIALOG_STYLE | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SIZEBOX | WS_THICKFRAME
+
+#define MY_PAGE_STYLE STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
+
+#define MY_FONT FONT 8, "MS Shell Dlg"
+
+#define SMALL_PAGE_SIZE_X 120
+
+// #define MY_DIALOG DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
+// #define MY_RESIZE_DIALOG DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT
+#define MY_PAGE DIALOG 0, 0, xs, ys MY_PAGE_STYLE MY_FONT
+
+#define OK_CANCEL \
+ DEFPUSHBUTTON "OK", IDOK, bx2, by, bxs, bys \
+ PUSHBUTTON "Cancel", IDCANCEL, bx1, by, bxs, bys
+
+
+#define MY_COMBO CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+#define MY_COMBO_SORTED MY_COMBO | CBS_SORT
+#define MY_COMBO_WITH_EDIT CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+
+#define MY_CHECKBOX "Button", BS_AUTOCHECKBOX | WS_TABSTOP
+
+#define MY_TEXT_NOPREFIX 8, SS_NOPREFIX
diff --git a/3rdparty/lzma/CPP/7zip/Guid.txt b/3rdparty/lzma/CPP/7zip/Guid.txt
index 0db316a5d8e..7edab6ead87 100644
--- a/3rdparty/lzma/CPP/7zip/Guid.txt
+++ b/3rdparty/lzma/CPP/7zip/Guid.txt
@@ -3,17 +3,25 @@
00 IProgress.h
05 IProgress
+ // 050002 IProgress2
01 IFolderArchive.h
- 05 IArchiveFolder
+ // 05 IArchiveFolder // old
// 06 IInFolderArchive // old
07 IFileExtractCallback.h::IFolderArchiveExtractCallback
- 0A IOutFolderArchive
+ 08 IFileExtractCallback.h::IFolderArchiveExtractCallback2
+ // 0A IOutFolderArchive
0B IFolderArchiveUpdateCallback
0C Agent.h::IArchiveFolderInternal
- 0D
+ 0D IArchiveFolder
0E IInFolderArchive
+ 0F IOutFolderArchive
+ 10 IFolderArchiveUpdateCallback2
+ 11 IFolderScanProgress
+
+ 20 IFileExtractCallback.h::IGetProp
+ 30 IFileExtractCallback.h::IFolderExtractToStreamCallback
03 IStream.h
@@ -22,7 +30,9 @@
03 IInStream
04 IOutStream
06 IStreamGetSize
- 07 IOutStreamFlush
+ 07 IOutStreamFinish
+ 08 IStreamGetProps
+ 09 IStreamGetProps2
04 ICoder.h
@@ -36,12 +46,20 @@
23 ICompressWriteCoderProperties
24 ICompressGetInStreamProcessedSize
25 ICompressSetCoderMt
+ 26 ICompressSetFinishMode
+
30 ICompressGetSubStreamSize
31 ICompressSetInStream
32 ICompressSetOutStream
- 33 ICompressSetInStreamSize
+// 33 ICompressSetInStreamSize
34 ICompressSetOutStreamSize
35 ICompressSetBufSize
+ 36 ICompressInitEncoder
+ 37 ICompressSetInStream2
+// 38 ICompressSetOutStream2
+// 39 SetInStreamSize2
+// 3A SetOutStreamSize2
+
40 ICompressFilter
60 ICompressCodecsInfo
61 ISetCompressCodecsInfo
@@ -50,6 +68,8 @@
8C ICryptoResetInitVector
90 ICryptoSetPassword
A0 ICryptoSetCRC
+ C0 IHasher
+ C1 IHashers
05 IPassword.h
@@ -61,17 +81,26 @@
06 IArchive.h
03 ISetProperties
+ 04 IArchiveKeepModeForNextOpen
+ 05 IArchiveAllowTail
10 IArchiveOpenCallback
+
20 IArchiveExtractCallback
+ 21 IArchiveExtractCallbackMessage
+
30 IArchiveOpenVolumeCallback
40 IInArchiveGetStream
50 IArchiveOpenSetSubArchiveName
60 IInArchive
61 IArchiveOpenSeq
+ 70 IArchiveGetRawProps
+ 71 IArchiveGetRootProps
80 IArchiveUpdateCallback
82 IArchiveUpdateCallback2
+ 83 IArchiveUpdateCallbackFile
+
A0 IOutArchive
@@ -96,7 +125,12 @@
0F
10 IFolderArcProps
11 IGetFolderArcProps
- 12 IFolderOperations
+ 12 // IFolderOperations
+ 13 IFolderOperations
+ 14 IFolderCalcItemFullSize
+ 15 IFolderCompare
+ 16 IFolderGetItemName
+ 17 IFolderAltStreams
09 IFolder.h :: FOLDER_MANAGER_INTERFACE
@@ -129,6 +163,14 @@ Handler GUIDs:
0C xz
0D ppmd
+ C7 Ext
+ C8 VMDK
+ C9 VDI
+ CA Qcow
+ CB GPT
+ CC Rar5
+ CD IHex
+ CE Hxs
CF TE
D0 UEFIc
D1 UEFIs
@@ -163,12 +205,12 @@ Handler GUIDs:
EE Tar
EF GZip
-{23170F69-40C1-278A-1000-000100030000} CAgentArchiveHandle
{23170F69-40C1-278A-1000-000100020000} ContextMenu.h::CZipContextMenu
-{23170F69-40C1-278B- old codecs clsids
-
-{23170F69-40C1-278D-1000-000100020000} OptionsDialog.h::CLSID_CSevenZipOptions
+// {23170F69-40C1-278A-1000-000100030000} // CAgentArchiveHandler
+// {23170F69-40C1-278B- old codecs clsids
+// {23170F69-40C1-278D-1000-000100020000} OptionsDialog.h::CLSID_CSevenZipOptions
{23170F69-40C1-2790-id} Codec Decoders
{23170F69-40C1-2791-id} Codec Encoders
+{23170F69-40C1-2792-id} Hashers
diff --git a/3rdparty/lzma/CPP/7zip/ICoder.h b/3rdparty/lzma/CPP/7zip/ICoder.h
index b43997d430f..75db9399379 100644
--- a/3rdparty/lzma/CPP/7zip/ICoder.h
+++ b/3rdparty/lzma/CPP/7zip/ICoder.h
@@ -10,6 +10,15 @@
CODER_INTERFACE(ICompressProgressInfo, 0x04)
{
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE;
+
+ /* (inSize) can be NULL, if unknown
+ (outSize) can be NULL, if unknown
+
+ returns:
+ S_OK
+ E_ABORT : Break by user
+ another error codes
+ */
};
CODER_INTERFACE(ICompressCoder, 0x05)
@@ -21,11 +30,75 @@ CODER_INTERFACE(ICompressCoder, 0x05)
CODER_INTERFACE(ICompressCoder2, 0x18)
{
- STDMETHOD(Code)(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams,
- ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams,
+ STDMETHOD(Code)(ISequentialInStream * const *inStreams, const UInt64 * const *inSizes, UInt32 numInStreams,
+ ISequentialOutStream * const *outStreams, const UInt64 * const *outSizes, UInt32 numOutStreams,
ICompressProgressInfo *progress) PURE;
};
+/*
+ ICompressCoder::Code
+ ICompressCoder2::Code
+
+ returns:
+ S_OK : OK
+ S_FALSE : data error (for decoders)
+ E_OUTOFMEMORY : memory allocation error
+ another error code : some error. For example, it can be error code received from inStream or outStream function.
+
+ Parameters:
+ (inStream != NULL)
+ (outStream != NULL)
+
+ if (inSize != NULL)
+ {
+ Encoders in 7-Zip ignore (inSize).
+ Decoder can use (*inSize) to check that stream was decoded correctly.
+ Some decoder in 7-Zip check it, if (full_decoding mode was set via ICompressSetFinishMode)
+ }
+
+ If it's required to limit the reading from input stream (inStream), it can
+ be done with ISequentialInStream implementation.
+
+ if (outSize != NULL)
+ {
+ Encoders in 7-Zip ignore (outSize).
+ Decoder unpacks no more than (*outSize) bytes.
+ }
+
+ (progress == NULL) is allowed.
+
+
+ Decoding with Code() function
+ -----------------------------
+
+ You can request some interfaces before decoding
+ - ICompressSetDecoderProperties2
+ - ICompressSetFinishMode
+
+ If you need to decode full stream:
+ {
+ 1) try to set full_decoding mode with ICompressSetFinishMode::SetFinishMode(1);
+ 2) call the Code() function with specified (inSize) and (outSize), if these sizes are known.
+ }
+
+ If you need to decode only part of stream:
+ {
+ 1) try to set partial_decoding mode with ICompressSetFinishMode::SetFinishMode(0);
+ 2) Call the Code() function with specified (inSize = NULL) and specified (outSize).
+ }
+
+ Encoding with Code() function
+ -----------------------------
+
+ You can request some interfaces :
+ - ICompressSetCoderProperties - use it before encoding to set properties
+ - ICompressWriteCoderProperties - use it before or after encoding to request encoded properties.
+
+ ICompressCoder2 is used when (numInStreams != 1 || numOutStreams != 1)
+ The rules are similar to ICompressCoder rules
+*/
+
+
namespace NCoderPropID
{
enum EEnum
@@ -64,6 +137,12 @@ CODER_INTERFACE(ICompressSetCoderProperties, 0x21)
CODER_INTERFACE(ICompressSetDecoderProperties2, 0x22)
{
+ /* returns:
+ S_OK
+ E_NOTIMP : unsupported properties
+ E_INVALIDARG : incorrect (or unsupported) properties
+ E_OUTOFMEMORY : memory allocation error
+ */
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE;
};
@@ -82,9 +161,34 @@ CODER_INTERFACE(ICompressSetCoderMt, 0x25)
STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE;
};
+CODER_INTERFACE(ICompressSetFinishMode, 0x26)
+{
+ STDMETHOD(SetFinishMode)(UInt32 finishMode) PURE;
+
+ /* finishMode:
+ 0 : partial decoding is allowed. It's default mode for ICompressCoder::Code(), if (outSize) is defined.
+ 1 : full decoding. The stream must be finished at the end of decoding. */
+};
+
+
CODER_INTERFACE(ICompressGetSubStreamSize, 0x30)
{
STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE;
+
+ /* returns:
+ S_OK : (*value) contains the size or estimated size (can be incorrect size)
+ S_FALSE : size is undefined
+ E_NOTIMP : the feature is not implemented
+
+ Let's (read_size) is size of data that was already read by ISequentialInStream::Read().
+ The caller should call GetSubStreamSize() after each Read() and check sizes:
+ if (start_of_subStream + *value < read_size)
+ {
+ // (*value) is correct, and it's allowed to call GetSubStreamSize() for next subStream:
+ start_of_subStream += *value;
+ subStream++;
+ }
+ */
};
CODER_INTERFACE(ICompressSetInStream, 0x31)
@@ -99,14 +203,21 @@ CODER_INTERFACE(ICompressSetOutStream, 0x32)
STDMETHOD(ReleaseOutStream)() PURE;
};
+/*
CODER_INTERFACE(ICompressSetInStreamSize, 0x33)
{
STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE;
};
+*/
CODER_INTERFACE(ICompressSetOutStreamSize, 0x34)
{
STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE;
+
+ /* That function initializes decoder structures.
+ Call this function only for stream version of decoder.
+ if (outSize == NULL), then output size is unknown
+ if (outSize != NULL), then the decoder must stop decoding after (*outSize) bytes. */
};
CODER_INTERFACE(ICompressSetBufSize, 0x35)
@@ -115,25 +226,62 @@ CODER_INTERFACE(ICompressSetBufSize, 0x35)
STDMETHOD(SetOutBufSize)(UInt32 streamIndex, UInt32 size) PURE;
};
+CODER_INTERFACE(ICompressInitEncoder, 0x36)
+{
+ STDMETHOD(InitEncoder)() PURE;
+
+ /* That function initializes encoder structures.
+ Call this function only for stream version of encoder. */
+};
+
+CODER_INTERFACE(ICompressSetInStream2, 0x37)
+{
+ STDMETHOD(SetInStream2)(UInt32 streamIndex, ISequentialInStream *inStream) PURE;
+ STDMETHOD(ReleaseInStream2)(UInt32 streamIndex) PURE;
+};
+
+/*
+CODER_INTERFACE(ICompressSetOutStream2, 0x38)
+{
+ STDMETHOD(SetOutStream2)(UInt32 streamIndex, ISequentialOutStream *outStream) PURE;
+ STDMETHOD(ReleaseOutStream2)(UInt32 streamIndex) PURE;
+};
+
+CODER_INTERFACE(ICompressSetInStreamSize2, 0x39)
+{
+ STDMETHOD(SetInStreamSize2)(UInt32 streamIndex, const UInt64 *inSize) PURE;
+};
+*/
+
+
+/*
+ ICompressFilter
+ Filter() converts as most as possible bytes
+ returns: (outSize):
+ if (outSize <= size) : Filter have converted outSize bytes
+ if (outSize > size) : Filter have not converted anything.
+ and it needs at least outSize bytes to convert one block
+ (it's for crypto block algorithms).
+*/
+
+#define INTERFACE_ICompressFilter(x) \
+ STDMETHOD(Init)() x; \
+ STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) x; \
+
CODER_INTERFACE(ICompressFilter, 0x40)
{
- STDMETHOD(Init)() PURE;
- STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE;
- // Filter converts as most as possible bytes
- // Filter return outSize (UInt32)
- // if (outSize <= size): Filter have converted outSize bytes
- // if (outSize > size): Filter have not converted anything.
- // and it needs at least outSize bytes to convert one block
- // (it's for crypto block algorithms).
+ INTERFACE_ICompressFilter(PURE);
};
+
CODER_INTERFACE(ICompressCodecsInfo, 0x60)
{
- STDMETHOD(GetNumberOfMethods)(UInt32 *numMethods) PURE;
+ STDMETHOD(GetNumMethods)(UInt32 *numMethods) PURE;
STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) PURE;
STDMETHOD(CreateDecoder)(UInt32 index, const GUID *iid, void **coder) PURE;
STDMETHOD(CreateEncoder)(UInt32 index, const GUID *iid, void **coder) PURE;
};
+
CODER_INTERFACE(ISetCompressCodecsInfo, 0x61)
{
STDMETHOD(SetCompressCodecsInfo)(ICompressCodecsInfo *compressCodecsInfo) PURE;
@@ -155,6 +303,10 @@ CODER_INTERFACE(ICryptoResetSalt, 0x88)
CODER_INTERFACE(ICryptoResetInitVector, 0x8C)
{
STDMETHOD(ResetInitVector)() PURE;
+
+ /* Call ResetInitVector() only for encoding.
+ Call ResetInitVector() before encoding and before WriteCoderProperties().
+ Crypto encoder can create random IV in that function. */
};
CODER_INTERFACE(ICryptoSetPassword, 0x90)
@@ -167,8 +319,7 @@ CODER_INTERFACE(ICryptoSetCRC, 0xA0)
STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE;
};
-//////////////////////
-// It's for DLL file
+
namespace NMethodPropID
{
enum EEnum
@@ -177,12 +328,44 @@ namespace NMethodPropID
kName,
kDecoder,
kEncoder,
- kInStreams,
- kOutStreams,
+ kPackStreams,
+ kUnpackStreams,
kDescription,
kDecoderIsAssigned,
- kEncoderIsAssigned
+ kEncoderIsAssigned,
+ kDigestSize
};
}
+
+#define INTERFACE_IHasher(x) \
+ STDMETHOD_(void, Init)() throw() x; \
+ STDMETHOD_(void, Update)(const void *data, UInt32 size) throw() x; \
+ STDMETHOD_(void, Final)(Byte *digest) throw() x; \
+ STDMETHOD_(UInt32, GetDigestSize)() throw() x; \
+
+CODER_INTERFACE(IHasher, 0xC0)
+{
+ INTERFACE_IHasher(PURE)
+};
+
+CODER_INTERFACE(IHashers, 0xC1)
+{
+ STDMETHOD_(UInt32, GetNumHashers)() PURE;
+ STDMETHOD(GetHasherProp)(UInt32 index, PROPID propID, PROPVARIANT *value) PURE;
+ STDMETHOD(CreateHasher)(UInt32 index, IHasher **hasher) PURE;
+};
+
+extern "C"
+{
+ typedef HRESULT (WINAPI *Func_GetNumberOfMethods)(UInt32 *numMethods);
+ typedef HRESULT (WINAPI *Func_GetMethodProperty)(UInt32 index, PROPID propID, PROPVARIANT *value);
+ typedef HRESULT (WINAPI *Func_CreateDecoder)(UInt32 index, const GUID *iid, void **outObject);
+ typedef HRESULT (WINAPI *Func_CreateEncoder)(UInt32 index, const GUID *iid, void **outObject);
+
+ typedef HRESULT (WINAPI *Func_GetHashers)(IHashers **hashers);
+
+ typedef HRESULT (WINAPI *Func_SetCodecs)(ICompressCodecsInfo *compressCodecsInfo);
+}
+
#endif
diff --git a/3rdparty/lzma/CPP/7zip/IDecl.h b/3rdparty/lzma/CPP/7zip/IDecl.h
index 8316eb3ac68..077ef0ee3f5 100644
--- a/3rdparty/lzma/CPP/7zip/IDecl.h
+++ b/3rdparty/lzma/CPP/7zip/IDecl.h
@@ -5,10 +5,23 @@
#include "../Common/MyUnknown.h"
+#define k_7zip_GUID_Data1 0x23170F69
+#define k_7zip_GUID_Data2 0x40C1
+
+#define k_7zip_GUID_Data3_Common 0x278A
+
+#define k_7zip_GUID_Data3_Decoder 0x2790
+#define k_7zip_GUID_Data3_Encoder 0x2791
+#define k_7zip_GUID_Data3_Hasher 0x2792
+
+
#define DECL_INTERFACE_SUB(i, base, groupId, subId) \
-DEFINE_GUID(IID_ ## i, \
-0x23170F69, 0x40C1, 0x278A, 0, 0, 0, (groupId), 0, (subId), 0, 0); \
-struct i: public base
+ DEFINE_GUID(IID_ ## i, \
+ k_7zip_GUID_Data1, \
+ k_7zip_GUID_Data2, \
+ k_7zip_GUID_Data3_Common, \
+ 0, 0, 0, (groupId), 0, (subId), 0, 0); \
+ struct i: public base
#define DECL_INTERFACE(i, groupId, subId) DECL_INTERFACE_SUB(i, IUnknown, groupId, subId)
diff --git a/3rdparty/lzma/CPP/7zip/IPassword.h b/3rdparty/lzma/CPP/7zip/IPassword.h
index 3ca7b090e93..7ea45537e65 100644
--- a/3rdparty/lzma/CPP/7zip/IPassword.h
+++ b/3rdparty/lzma/CPP/7zip/IPassword.h
@@ -3,8 +3,8 @@
#ifndef __IPASSWORD_H
#define __IPASSWORD_H
+#include "../Common/MyTypes.h"
#include "../Common/MyUnknown.h"
-#include "../Common/Types.h"
#include "IDecl.h"
@@ -21,4 +21,3 @@ PASSWORD_INTERFACE(ICryptoGetTextPassword2, 0x11)
};
#endif
-
diff --git a/3rdparty/lzma/CPP/7zip/IProgress.h b/3rdparty/lzma/CPP/7zip/IProgress.h
index d6093f17330..fac951eca48 100644
--- a/3rdparty/lzma/CPP/7zip/IProgress.h
+++ b/3rdparty/lzma/CPP/7zip/IProgress.h
@@ -1,10 +1,9 @@
-// Interface/IProgress.h
+// IProgress.h
#ifndef __IPROGRESS_H
#define __IPROGRESS_H
-#include "../Common/MyUnknown.h"
-#include "../Common/Types.h"
+#include "../Common/MyTypes.h"
#include "IDecl.h"
@@ -17,17 +16,4 @@ DECL_INTERFACE(IProgress, 0, 5)
INTERFACE_IProgress(PURE)
};
-/*
-// {23170F69-40C1-278A-0000-000000050002}
-DEFINE_GUID(IID_IProgress2,
-0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x02);
-MIDL_INTERFACE("23170F69-40C1-278A-0000-000000050002")
-IProgress2: public IUnknown
-{
-public:
- STDMETHOD(SetTotal)(const UInt64 *total) PURE;
- STDMETHOD(SetCompleted)(const UInt64 *completeValue) PURE;
-};
-*/
-
#endif
diff --git a/3rdparty/lzma/CPP/7zip/IStream.h b/3rdparty/lzma/CPP/7zip/IStream.h
index 165e8baadda..9a0bcbf3d72 100644
--- a/3rdparty/lzma/CPP/7zip/IStream.h
+++ b/3rdparty/lzma/CPP/7zip/IStream.h
@@ -3,8 +3,8 @@
#ifndef __ISTREAM_H
#define __ISTREAM_H
-#include "../Common/MyUnknown.h"
-#include "../Common/Types.h"
+#include "../Common/MyTypes.h"
+#include "../Common/MyWindows.h"
#include "IDecl.h"
@@ -14,26 +14,71 @@
STREAM_INTERFACE(ISequentialInStream, 0x01)
{
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) PURE;
+
/*
- Out: if size != 0, return_value = S_OK and (*processedSize == 0),
- then there are no more bytes in stream.
- if (size > 0) && there are bytes in stream,
- this function must read at least 1 byte.
- This function is allowed to read less than number of remaining bytes in stream.
- You must call Read function in loop, if you need exact amount of data
+ The requirement for caller: (processedSize != NULL).
+ The callee can allow (processedSize == NULL) for compatibility reasons.
+
+ if (size == 0), this function returns S_OK and (*processedSize) is set to 0.
+
+ if (size != 0)
+ {
+ Partial read is allowed: (*processedSize <= avail_size && *processedSize <= size),
+ where (avail_size) is the size of remaining bytes in stream.
+ If (avail_size != 0), this function must read at least 1 byte: (*processedSize > 0).
+ You must call Read() in loop, if you need to read exact amount of data.
+ }
+
+ If seek pointer before Read() call was changed to position past the end of stream:
+ if (seek_pointer >= stream_size), this function returns S_OK and (*processedSize) is set to 0.
+
+ ERROR CASES:
+ If the function returns error code, then (*processedSize) is size of
+ data written to (data) buffer (it can be data before error or data with errors).
+ The recommended way for callee to work with reading errors:
+ 1) write part of data before error to (data) buffer and return S_OK.
+ 2) return error code for further calls of Read().
*/
};
STREAM_INTERFACE(ISequentialOutStream, 0x02)
{
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) PURE;
+
/*
- if (size > 0) this function must write at least 1 byte.
- This function is allowed to write less than "size".
- You must call Write function in loop, if you need to write exact amount of data
+ The requirement for caller: (processedSize != NULL).
+ The callee can allow (processedSize == NULL) for compatibility reasons.
+
+ if (size != 0)
+ {
+ Partial write is allowed: (*processedSize <= size),
+ but this function must write at least 1 byte: (*processedSize > 0).
+ You must call Write() in loop, if you need to write exact amount of data.
+ }
+
+ ERROR CASES:
+ If the function returns error code, then (*processedSize) is size of
+ data written from (data) buffer.
*/
};
+#ifdef __HRESULT_FROM_WIN32
+#define HRESULT_WIN32_ERROR_NEGATIVE_SEEK __HRESULT_FROM_WIN32(ERROR_NEGATIVE_SEEK)
+#else
+#define HRESULT_WIN32_ERROR_NEGATIVE_SEEK HRESULT_FROM_WIN32(ERROR_NEGATIVE_SEEK)
+#endif
+
+/* Seek() Function
+ If you seek before the beginning of the stream, Seek() function returns error code:
+ Recommended error code is __HRESULT_FROM_WIN32(ERROR_NEGATIVE_SEEK).
+ or STG_E_INVALIDFUNCTION
+
+ It is allowed to seek past the end of the stream.
+
+
+ if Seek() returns error, then the value of *newPosition is undefined.
+*/
+
STREAM_INTERFACE_SUB(IInStream, ISequentialInStream, 0x03)
{
STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE;
@@ -50,9 +95,33 @@ STREAM_INTERFACE(IStreamGetSize, 0x06)
STDMETHOD(GetSize)(UInt64 *size) PURE;
};
-STREAM_INTERFACE(IOutStreamFlush, 0x07)
+STREAM_INTERFACE(IOutStreamFinish, 0x07)
+{
+ STDMETHOD(OutStreamFinish)() PURE;
+};
+
+
+STREAM_INTERFACE(IStreamGetProps, 0x08)
+{
+ STDMETHOD(GetProps)(UInt64 *size, FILETIME *cTime, FILETIME *aTime, FILETIME *mTime, UInt32 *attrib) PURE;
+};
+
+struct CStreamFileProps
+{
+ UInt64 Size;
+ UInt64 VolID;
+ UInt64 FileID_Low;
+ UInt64 FileID_High;
+ UInt32 NumLinks;
+ UInt32 Attrib;
+ FILETIME CTime;
+ FILETIME ATime;
+ FILETIME MTime;
+};
+
+STREAM_INTERFACE(IStreamGetProps2, 0x09)
{
- STDMETHOD(Flush)() PURE;
+ STDMETHOD(GetProps2)(CStreamFileProps *props) PURE;
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/MyVersion.h b/3rdparty/lzma/CPP/7zip/MyVersion.h
index 2e657393d80..8f52a1261a4 100644
--- a/3rdparty/lzma/CPP/7zip/MyVersion.h
+++ b/3rdparty/lzma/CPP/7zip/MyVersion.h
@@ -1,6 +1,2 @@
-#include "..\..\C\7zVersion.h"
-
-#undef MY_COPYRIGHT
-#undef MY_VERSION_COPYRIGHT_DATE
-#define MY_COPYRIGHT "Copyright (c) 1999-2011 Igor Pavlov"
-#define MY_VERSION_COPYRIGHT_DATE MY_VERSION " " MY_COPYRIGHT " " MY_DATE
+#define USE_COPYRIGHT_CR
+#include "../../C/7zVersion.h"
diff --git a/3rdparty/lzma/CPP/7zip/PropID.h b/3rdparty/lzma/CPP/7zip/PropID.h
index 8f888526311..1822f402b9f 100644
--- a/3rdparty/lzma/CPP/7zip/PropID.h
+++ b/3rdparty/lzma/CPP/7zip/PropID.h
@@ -1,13 +1,15 @@
// PropID.h
-#ifndef __7ZIP_PROPID_H
-#define __7ZIP_PROPID_H
+#ifndef __7ZIP_PROP_ID_H
+#define __7ZIP_PROP_ID_H
+
+#include "../Common/MyTypes.h"
enum
{
kpidNoProperty = 0,
- kpidMainSubfile = 1,
- kpidHandlerItemIndex = 2,
+ kpidMainSubfile,
+ kpidHandlerItemIndex,
kpidPath,
kpidName,
kpidExtension,
@@ -59,18 +61,67 @@ enum
kpidCreatorApp,
kpidSectorSize,
kpidPosixAttrib,
- kpidLink,
+ kpidSymLink,
kpidError,
-
- kpidTotalSize = 0x1100,
+ kpidTotalSize,
kpidFreeSpace,
kpidClusterSize,
kpidVolumeName,
-
- kpidLocalName = 0x1200,
+ kpidLocalName,
kpidProvider,
+ kpidNtSecure,
+ kpidIsAltStream,
+ kpidIsAux,
+ kpidIsDeleted,
+ kpidIsTree,
+ kpidSha1,
+ kpidSha256,
+ kpidErrorType,
+ kpidNumErrors,
+ kpidErrorFlags,
+ kpidWarningFlags,
+ kpidWarning,
+ kpidNumStreams,
+ kpidNumAltStreams,
+ kpidAltStreamsSize,
+ kpidVirtualSize,
+ kpidUnpackSize,
+ kpidTotalPhySize,
+ kpidVolumeIndex,
+ kpidSubType,
+ kpidShortComment,
+ kpidCodePage,
+ kpidIsNotArcType,
+ kpidPhySizeCantBeDetected,
+ kpidZerosTailIsAllowed,
+ kpidTailSize,
+ kpidEmbeddedStubSize,
+ kpidNtReparse,
+ kpidHardLink,
+ kpidINode,
+ kpidStreamId,
+ kpidReadOnly,
+ kpidOutName,
+ kpidCopyLink,
+
+ kpid_NUM_DEFINED,
kpidUserDefined = 0x10000
};
+extern const Byte k7z_PROPID_To_VARTYPE[kpid_NUM_DEFINED]; // VARTYPE
+
+const UInt32 kpv_ErrorFlags_IsNotArc = 1 << 0;
+const UInt32 kpv_ErrorFlags_HeadersError = 1 << 1;
+const UInt32 kpv_ErrorFlags_EncryptedHeadersError = 1 << 2;
+const UInt32 kpv_ErrorFlags_UnavailableStart = 1 << 3;
+const UInt32 kpv_ErrorFlags_UnconfirmedStart = 1 << 4;
+const UInt32 kpv_ErrorFlags_UnexpectedEnd = 1 << 5;
+const UInt32 kpv_ErrorFlags_DataAfterEnd = 1 << 6;
+const UInt32 kpv_ErrorFlags_UnsupportedMethod = 1 << 7;
+const UInt32 kpv_ErrorFlags_UnsupportedFeature = 1 << 8;
+const UInt32 kpv_ErrorFlags_DataError = 1 << 9;
+const UInt32 kpv_ErrorFlags_CrcError = 1 << 10;
+// const UInt32 kpv_ErrorFlags_Unsupported = 1 << 11;
+
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Client7z/Client7z.cpp b/3rdparty/lzma/CPP/7zip/UI/Client7z/Client7z.cpp
index d181843d178..55650cfa0fe 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Client7z/Client7z.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Client7z/Client7z.cpp
@@ -2,39 +2,54 @@
#include "StdAfx.h"
-#include "Common/IntToString.h"
-#include "Common/MyInitGuid.h"
-#include "Common/StringConvert.h"
-
-#include "Windows/DLL.h"
-#include "Windows/FileDir.h"
-#include "Windows/FileFind.h"
-#include "Windows/FileName.h"
-#include "Windows/NtCheck.h"
-#include "Windows/PropVariant.h"
-#include "Windows/PropVariantConversions.h"
+#include <stdio.h>
+
+#include "../../../Common/MyWindows.h"
+
+#include "../../../Common/Defs.h"
+#include "../../../Common/MyInitGuid.h"
+
+#include "../../../Common/IntToString.h"
+#include "../../../Common/StringConvert.h"
+
+#include "../../../Windows/DLL.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileFind.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/NtCheck.h"
+#include "../../../Windows/PropVariant.h"
+#include "../../../Windows/PropVariantConv.h"
#include "../../Common/FileStreams.h"
#include "../../Archive/IArchive.h"
#include "../../IPassword.h"
-#include "../../MyVersion.h"
+#include "../../../../C/7zVersion.h"
#ifdef _WIN32
HINSTANCE g_hInstance = 0;
#endif
+// Tou can find the list of all GUIDs in Guid.txt file.
// use another CLSIDs, if you want to support other formats (zip, rar, ...).
// {23170F69-40C1-278A-1000-000110070000}
+
DEFINE_GUID(CLSID_CFormat7z,
0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00);
+DEFINE_GUID(CLSID_CFormatXz,
+ 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x0C, 0x00, 0x00);
+
+#define CLSID_Format CLSID_CFormat7z
+// #define CLSID_Format CLSID_CFormatXz
using namespace NWindows;
+using namespace NFile;
+using namespace NDir;
#define kDllName "7z.dll"
-static const char *kCopyrightString = "\n" MY_7ZIP_VERSION
+static const char *kCopyrightString = "\n7-Zip " MY_VERSION
" (" kDllName " client) "
MY_COPYRIGHT " " MY_DATE "\n";
@@ -46,12 +61,6 @@ static const char *kHelpString =
" Client7z.exe x archive.7z : eXtract files from archive.7z\n";
-typedef UINT32 (WINAPI * CreateObjectFunc)(
- const GUID *clsID,
- const GUID *interfaceID,
- void **outObject);
-
-
static AString FStringToConsoleString(const FString &s)
{
return GetOemString(fs2us(s));
@@ -177,7 +186,11 @@ static const char *kSkippingString = "Skipping ";
static const char *kUnsupportedMethod = "Unsupported Method";
static const char *kCRCFailed = "CRC Failed";
static const char *kDataError = "Data Error";
-static const char *kUnknownError = "Unknown Error";
+static const char *kUnavailableData = "Unavailable data";
+static const char *kUnexpectedEnd = "Unexpected end of data";
+static const char *kDataAfterEnd = "There are some data after the end of the payload data";
+static const char *kIsNotArc = "Is not archive";
+static const char *kHeadersError = "Headers Error";
class CArchiveExtractCallback:
public IArchiveExtractCallback,
@@ -232,7 +245,7 @@ void CArchiveExtractCallback::Init(IInArchive *archiveHandler, const FString &di
NumErrors = 0;
_archiveHandler = archiveHandler;
_directoryPath = directoryPath;
- NFile::NName::NormalizeDirPathPrefix(_directoryPath);
+ NName::NormalizeDirPathPrefix(_directoryPath);
}
STDMETHODIMP CArchiveExtractCallback::SetTotal(UInt64 /* size */)
@@ -296,7 +309,7 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index,
NCOM::CPropVariant prop;
RINOK(_archiveHandler->GetProperty(index, kpidMTime, &prop));
_processedFileInfo.MTimeDefined = false;
- switch(prop.vt)
+ switch (prop.vt)
{
case VT_EMPTY:
// _processedFileInfo.MTime = _utcMTimeDefault;
@@ -314,18 +327,16 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index,
// Get Size
NCOM::CPropVariant prop;
RINOK(_archiveHandler->GetProperty(index, kpidSize, &prop));
- bool newFileSizeDefined = (prop.vt != VT_EMPTY);
UInt64 newFileSize;
- if (newFileSizeDefined)
- newFileSize = ConvertPropVariantToUInt64(prop);
+ /* bool newFileSizeDefined = */ ConvertPropVariantToUInt64(prop, newFileSize);
}
{
// Create folders for file
- int slashPos = _filePath.ReverseFind(WCHAR_PATH_SEPARATOR);
+ int slashPos = _filePath.ReverseFind_PathSepar();
if (slashPos >= 0)
- NFile::NDirectory::CreateComplexDirectory(_directoryPath + us2fs(_filePath.Left(slashPos)));
+ CreateComplexDir(_directoryPath + us2fs(_filePath.Left(slashPos)));
}
FString fullProcessedPath = _directoryPath + us2fs(_filePath);
@@ -333,14 +344,14 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index,
if (_processedFileInfo.isDir)
{
- NFile::NDirectory::CreateComplexDirectory(fullProcessedPath);
+ CreateComplexDir(fullProcessedPath);
}
else
{
- NFile::NFind::CFileInfo fi;
+ NFind::CFileInfo fi;
if (fi.Find(fullProcessedPath))
{
- if (!NFile::NDirectory::DeleteFileAlways(fullProcessedPath))
+ if (!DeleteFileAlways(fullProcessedPath))
{
PrintError("Can not delete output file", fullProcessedPath);
return E_ABORT;
@@ -379,32 +390,58 @@ STDMETHODIMP CArchiveExtractCallback::PrepareOperation(Int32 askExtractMode)
STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 operationResult)
{
- switch(operationResult)
+ switch (operationResult)
{
case NArchive::NExtract::NOperationResult::kOK:
break;
default:
{
NumErrors++;
- PrintString(" ");
- switch(operationResult)
+ PrintString(" : ");
+ const char *s = NULL;
+ switch (operationResult)
{
- case NArchive::NExtract::NOperationResult::kUnSupportedMethod:
- PrintString(kUnsupportedMethod);
+ case NArchive::NExtract::NOperationResult::kUnsupportedMethod:
+ s = kUnsupportedMethod;
break;
case NArchive::NExtract::NOperationResult::kCRCError:
- PrintString(kCRCFailed);
+ s = kCRCFailed;
break;
case NArchive::NExtract::NOperationResult::kDataError:
- PrintString(kDataError);
+ s = kDataError;
+ break;
+ case NArchive::NExtract::NOperationResult::kUnavailable:
+ s = kUnavailableData;
+ break;
+ case NArchive::NExtract::NOperationResult::kUnexpectedEnd:
+ s = kUnexpectedEnd;
+ break;
+ case NArchive::NExtract::NOperationResult::kDataAfterEnd:
+ s = kDataAfterEnd;
+ break;
+ case NArchive::NExtract::NOperationResult::kIsNotArc:
+ s = kIsNotArc;
+ break;
+ case NArchive::NExtract::NOperationResult::kHeadersError:
+ s = kHeadersError;
break;
- default:
- PrintString(kUnknownError);
+ }
+ if (s)
+ {
+ PrintString("Error : ");
+ PrintString(s);
+ }
+ else
+ {
+ char temp[16];
+ ConvertUInt32ToString(operationResult, temp);
+ PrintString("Error #");
+ PrintString(temp);
}
}
}
- if (_outFileStream != NULL)
+ if (_outFileStream)
{
if (_processedFileInfo.MTimeDefined)
_outFileStreamSpec->SetMTime(&_processedFileInfo.MTime);
@@ -412,7 +449,7 @@ STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 operationResult)
}
_outFileStream.Release();
if (_extractMode && _processedFileInfo.AttribDefined)
- NFile::NDirectory::MySetFileAttributes(_diskFilePath, _processedFileInfo.Attrib);
+ SetFileAttrib(_diskFilePath, _processedFileInfo.Attrib);
PrintNewLine();
return S_OK;
}
@@ -462,7 +499,6 @@ public:
STDMETHOD(SetCompleted)(const UInt64 *completeValue);
// IUpdateCallback2
- STDMETHOD(EnumProperties)(IEnumSTATPROPSTG **enumerator);
STDMETHOD(GetUpdateItemInfo)(UInt32 index,
Int32 *newData, Int32 *newProperties, UInt32 *indexInArchive);
STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value);
@@ -514,21 +550,15 @@ STDMETHODIMP CArchiveUpdateCallback::SetCompleted(const UInt64 * /* completeValu
return S_OK;
}
-
-STDMETHODIMP CArchiveUpdateCallback::EnumProperties(IEnumSTATPROPSTG ** /* enumerator */)
-{
- return E_NOTIMPL;
-}
-
STDMETHODIMP CArchiveUpdateCallback::GetUpdateItemInfo(UInt32 /* index */,
Int32 *newData, Int32 *newProperties, UInt32 *indexInArchive)
{
- if (newData != NULL)
+ if (newData)
*newData = BoolToInt(true);
- if (newProperties != NULL)
+ if (newProperties)
*newProperties = BoolToInt(true);
- if (indexInArchive != NULL)
- *indexInArchive = (UInt32)-1;
+ if (indexInArchive)
+ *indexInArchive = (UInt32)(Int32)-1;
return S_OK;
}
@@ -545,7 +575,7 @@ STDMETHODIMP CArchiveUpdateCallback::GetProperty(UInt32 index, PROPID propID, PR
{
const CDirItem &dirItem = (*DirItems)[index];
- switch(propID)
+ switch (propID)
{
case kpidPath: prop = dirItem.Name; break;
case kpidIsDir: prop = dirItem.isDir(); break;
@@ -632,8 +662,8 @@ STDMETHODIMP CArchiveUpdateCallback::GetVolumeStream(UInt32 index, ISequentialOu
wchar_t temp[16];
ConvertUInt32ToString(index + 1, temp);
UString res = temp;
- while (res.Length() < 2)
- res = UString(L'0') + res;
+ while (res.Len() < 2)
+ res.InsertAtFront(L'0');
UString fileName = VolName;
fileName += L'.';
fileName += res;
@@ -663,7 +693,7 @@ STDMETHODIMP CArchiveUpdateCallback::CryptoGetTextPassword2(Int32 *passwordIsDef
return StringToBstr(Password, password);
}
-//////////////////////////////////////////////////////////////////////////
+
// Main function
#define NT_CHECK_FAIL_ACTION PrintError("Unsupported Windows version"); return 1;
@@ -679,14 +709,16 @@ int MY_CDECL main(int numArgs, const char *args[])
PrintStringLn(kHelpString);
return 1;
}
+
NDLL::CLibrary lib;
if (!lib.Load(NDLL::GetModuleDirPrefix() + FTEXT(kDllName)))
{
PrintError("Can not load 7-zip library");
return 1;
}
- CreateObjectFunc createObjectFunc = (CreateObjectFunc)lib.GetProc("CreateObject");
- if (createObjectFunc == 0)
+
+ Func_CreateObject createObjectFunc = (Func_CreateObject)lib.GetProc("CreateObject");
+ if (!createObjectFunc)
{
PrintError("Can not get CreateObject");
return 1;
@@ -695,15 +727,17 @@ int MY_CDECL main(int numArgs, const char *args[])
char c;
{
AString command = args[1];
- if (command.Length() != 1)
+ if (command.Len() != 1)
{
PrintError("incorrect command");
return 1;
}
- c = (char)MyCharUpper(command[0]);
+ c = (char)MyCharLower_Ascii(command[0]);
}
+
FString archiveName = CmdStringToFString(args[2]);
- if (c == 'A')
+
+ if (c == 'a')
{
// create archive command
if (numArgs < 4)
@@ -712,28 +746,31 @@ int MY_CDECL main(int numArgs, const char *args[])
return 1;
}
CObjectVector<CDirItem> dirItems;
- int i;
- for (i = 3; i < numArgs; i++)
{
- CDirItem di;
- FString name = CmdStringToFString(args[i]);
-
- NFile::NFind::CFileInfo fi;
- if (!fi.Find(name))
+ int i;
+ for (i = 3; i < numArgs; i++)
{
- PrintError("Can't find file", name);
- return 1;
+ CDirItem di;
+ FString name = CmdStringToFString(args[i]);
+
+ NFind::CFileInfo fi;
+ if (!fi.Find(name))
+ {
+ PrintError("Can't find file", name);
+ return 1;
+ }
+
+ di.Attrib = fi.Attrib;
+ di.Size = fi.Size;
+ di.CTime = fi.CTime;
+ di.ATime = fi.ATime;
+ di.MTime = fi.MTime;
+ di.Name = fs2us(name);
+ di.FullPath = name;
+ dirItems.Add(di);
}
-
- di.Attrib = fi.Attrib;
- di.Size = fi.Size;
- di.CTime = fi.CTime;
- di.ATime = fi.ATime;
- di.MTime = fi.MTime;
- di.Name = fs2us(name);
- di.FullPath = name;
- dirItems.Add(di);
}
+
COutFileStream *outFileStreamSpec = new COutFileStream;
CMyComPtr<IOutStream> outFileStream = outFileStreamSpec;
if (!outFileStreamSpec->Create(archiveName, false))
@@ -743,7 +780,7 @@ int MY_CDECL main(int numArgs, const char *args[])
}
CMyComPtr<IOutArchive> outArchive;
- if (createObjectFunc(&CLSID_CFormat7z, &IID_IOutArchive, (void **)&outArchive) != S_OK)
+ if (createObjectFunc(&CLSID_Format, &IID_IOutArchive, (void **)&outArchive) != S_OK)
{
PrintError("Can not get class object");
return 1;
@@ -762,7 +799,7 @@ int MY_CDECL main(int numArgs, const char *args[])
L"s",
L"x"
};
- const int kNumProps = sizeof(names) / sizeof(names[0]);
+ const unsigned kNumProps = ARRAY_SIZE(names);
NCOM::CPropVariant values[kNumProps] =
{
false, // solid mode OFF
@@ -780,17 +817,21 @@ int MY_CDECL main(int numArgs, const char *args[])
*/
HRESULT result = outArchive->UpdateItems(outFileStream, dirItems.Size(), updateCallback);
+
updateCallbackSpec->Finilize();
+
if (result != S_OK)
{
PrintError("Update Error");
return 1;
}
- for (i = 0; i < updateCallbackSpec->FailedFiles.Size(); i++)
+
+ FOR_VECTOR (i, updateCallbackSpec->FailedFiles)
{
PrintNewLine();
PrintError("Error for file", updateCallbackSpec->FailedFiles[i]);
}
+
if (updateCallbackSpec->FailedFiles.Size() != 0)
return 1;
}
@@ -803,9 +844,10 @@ int MY_CDECL main(int numArgs, const char *args[])
}
bool listCommand;
- if (c == 'L')
+
+ if (c == 'l')
listCommand = true;
- else if (c == 'X')
+ else if (c == 'x')
listCommand = false;
else
{
@@ -814,7 +856,7 @@ int MY_CDECL main(int numArgs, const char *args[])
}
CMyComPtr<IInArchive> archive;
- if (createObjectFunc(&CLSID_CFormat7z, &IID_IInArchive, (void **)&archive) != S_OK)
+ if (createObjectFunc(&CLSID_Format, &IID_IInArchive, (void **)&archive) != S_OK)
{
PrintError("Can not get class object");
return 1;
@@ -836,7 +878,8 @@ int MY_CDECL main(int numArgs, const char *args[])
// openCallbackSpec->PasswordIsDefined = true;
// openCallbackSpec->Password = L"1";
- if (archive->Open(file, 0, openCallback) != S_OK)
+ const UInt64 scanSize = 1 << 23;
+ if (archive->Open(file, &scanSize, openCallback) != S_OK)
{
PrintError("Can not open file as archive", archiveName);
return 1;
@@ -854,7 +897,8 @@ int MY_CDECL main(int numArgs, const char *args[])
// Get uncompressed size of file
NCOM::CPropVariant prop;
archive->GetProperty(i, kpidSize, &prop);
- UString s = ConvertPropVariantToString(prop);
+ char s[32];
+ ConvertPropVariantToShortString(prop, s);
PrintString(s);
PrintString(" ");
}
@@ -862,8 +906,10 @@ int MY_CDECL main(int numArgs, const char *args[])
// Get name of file
NCOM::CPropVariant prop;
archive->GetProperty(i, kpidPath, &prop);
- UString s = ConvertPropVariantToString(prop);
- PrintString(s);
+ if (prop.vt == VT_BSTR)
+ PrintString(prop.bstrVal);
+ else if (prop.vt != VT_EMPTY)
+ PrintString("ERROR!");
}
PrintNewLine();
}
@@ -877,7 +923,27 @@ int MY_CDECL main(int numArgs, const char *args[])
extractCallbackSpec->PasswordIsDefined = false;
// extractCallbackSpec->PasswordIsDefined = true;
// extractCallbackSpec->Password = L"1";
+
+ /*
+ const wchar_t *names[] =
+ {
+ L"mt",
+ L"mtf"
+ };
+ const unsigned kNumProps = sizeof(names) / sizeof(names[0]);
+ NCOM::CPropVariant values[kNumProps] =
+ {
+ (UInt32)1,
+ false
+ };
+ CMyComPtr<ISetProperties> setProperties;
+ archive->QueryInterface(IID_ISetProperties, (void **)&setProperties);
+ if (setProperties)
+ setProperties->SetProperties(names, values, kNumProps);
+ */
+
HRESULT result = archive->Extract(NULL, (UInt32)(Int32)(-1), false, extractCallback);
+
if (result != S_OK)
{
PrintError("Extract Error");
@@ -885,5 +951,6 @@ int MY_CDECL main(int numArgs, const char *args[])
}
}
}
+
return 0;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Client7z/Client7z.dsp b/3rdparty/lzma/CPP/7zip/UI/Client7z/Client7z.dsp
index 542e2852534..8ad7fb133dd 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Client7z/Client7z.dsp
+++ b/3rdparty/lzma/CPP/7zip/UI/Client7z/Client7z.dsp
@@ -39,9 +39,10 @@ RSC=rc.exe
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MD /W4 /WX /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
@@ -49,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"Release/7zcl.exe"
!ELSEIF "$(CFG)" == "Client7z - Win32 Debug"
@@ -65,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /W4 /WX /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
@@ -73,7 +74,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/7zcl.exe" /pdbtype:sept
!ENDIF
@@ -86,6 +87,10 @@ LINK32=link.exe
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
+SOURCE=.\resource.rc
+# End Source File
+# Begin Source File
+
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
@@ -147,11 +152,11 @@ SOURCE=..\..\..\Windows\PropVariant.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\PropVariantConversions.cpp
+SOURCE=..\..\..\Windows\PropVariantConv.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\PropVariantConversions.h
+SOURCE=..\..\..\Windows\PropVariantConv.h
# End Source File
# End Group
# Begin Group "Common"
@@ -222,5 +227,9 @@ SOURCE=..\..\Common\FileStreams.h
SOURCE=.\Client7z.cpp
# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Sort.h
+# End Source File
# End Target
# End Project
diff --git a/3rdparty/lzma/CPP/7zip/UI/Client7z/StdAfx.h b/3rdparty/lzma/CPP/7zip/UI/Client7z/StdAfx.h
index b23436e93e4..2854ff3e935 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Client7z/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Client7z/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include <windows.h>
-#include <stdio.h>
+#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Client7z/makefile b/3rdparty/lzma/CPP/7zip/UI/Client7z/makefile
index 0ff8e72f345..99a6d494778 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Client7z/makefile
+++ b/3rdparty/lzma/CPP/7zip/UI/Client7z/makefile
@@ -1,8 +1,7 @@
-PROG = 7z.exe
+PROG = 7zcl.exe
MY_CONSOLE = 1
-CFLAGS = $(CFLAGS) -I ../../../
-CONSOLE_OBJS = \
+CURRENT_OBJS = \
$O\Client7z.obj \
COMMON_OBJS = \
@@ -21,25 +20,9 @@ WIN_OBJS = \
$O\FileIO.obj \
$O\FileName.obj \
$O\PropVariant.obj \
- $O\PropVariantConversions.obj \
+ $O\PropVariantConv.obj \
7ZIP_COMMON_OBJS = \
$O\FileStreams.obj \
-OBJS = \
- $O\StdAfx.obj \
- $(CONSOLE_OBJS) \
- $(COMMON_OBJS) \
- $(WIN_OBJS) \
- $(7ZIP_COMMON_OBJS) \
-
-!include "../../../Build.mak"
-
-$(CONSOLE_OBJS): $(*B).cpp
- $(COMPL)
-$(COMMON_OBJS): ../../../Common/$(*B).cpp
- $(COMPL)
-$(WIN_OBJS): ../../../Windows/$(*B).cpp
- $(COMPL)
-$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
- $(COMPL)
+!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/UI/Client7z/resource.rc b/3rdparty/lzma/CPP/7zip/UI/Client7z/resource.rc
new file mode 100644
index 00000000000..a09bb0441ca
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/Client7z/resource.rc
@@ -0,0 +1,3 @@
+#include "../../MyVersionInfo.rc"
+
+MY_VERSION_INFO_APP("7-Zip client", "7zcl")
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
index 85ec17b42c9..1bd202edbcd 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
@@ -1,6 +1,8 @@
// ArchiveCommandLine.cpp
#include "StdAfx.h"
+#undef printf
+#undef sprintf
#ifdef _WIN32
#ifndef UNDER_CE
@@ -9,15 +11,15 @@
#endif
#include <stdio.h>
-#include "Common/ListFileUtils.h"
-#include "Common/StringConvert.h"
-#include "Common/StringToInt.h"
+#include "../../../Common/ListFileUtils.h"
+#include "../../../Common/StringConvert.h"
+#include "../../../Common/StringToInt.h"
-#include "Windows/FileDir.h"
-#include "Windows/FileName.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileName.h"
#ifdef _WIN32
-#include "Windows/FileMapping.h"
-#include "Windows/Synchronization.h"
+#include "../../../Windows/FileMapping.h"
+#include "../../../Windows/Synchronization.h"
#endif
#include "ArchiveCommandLine.h"
@@ -48,6 +50,25 @@ using namespace NCommandLineParser;
using namespace NWindows;
using namespace NFile;
+static bool StringToUInt32(const wchar_t *s, UInt32 &v)
+{
+ if (*s == 0)
+ return false;
+ const wchar_t *end;
+ v = ConvertStringToUInt32(s, &end);
+ return *end == 0;
+}
+
+CArcCmdLineException::CArcCmdLineException(const char *a, const wchar_t *u)
+{
+ (*this) += MultiByteToUnicodeString(a);
+ if (u)
+ {
+ this->Add_LF();
+ (*this) += u;
+ }
+}
+
int g_CodePage = -1;
namespace NKey {
@@ -56,49 +77,98 @@ enum Enum
kHelp1 = 0,
kHelp2,
kHelp3,
+
kDisableHeaders,
kDisablePercents,
- kArchiveType,
+ kShowTime,
+ kLogLevel,
+
+ kOutStream,
+ kErrStream,
+ kPercentStream,
+
kYes,
- #ifndef _NO_CRYPTO
- kPassword,
- #endif
+
+ kShowDialog,
+ kOverwrite,
+
+ kArchiveType,
+ kExcludedArcType,
+
kProperty,
kOutputDir,
kWorkingDir,
+
kInclude,
kExclude,
kArInclude,
kArExclude,
kNoArName,
+
kUpdate,
kVolume,
kRecursed,
+
+ kAffinity,
kSfx,
+ kEmail,
+ kHash,
+
kStdIn,
kStdOut,
- kOverwrite,
- kEmail,
- kShowDialog,
+
kLargePages,
kListfileCharSet,
kConsoleCharSet,
kTechMode,
+
kShareForWrite,
kCaseSensitive,
- kCalcCrc
+ kArcNameMode,
+
+ kDisableWildcardParsing,
+ kElimDup,
+ kFullPathMode,
+
+ kHardLinks,
+ kSymLinks,
+ kNtSecurity,
+ kAltStreams,
+ kReplaceColonForAltStream,
+ kWriteToAltStreamIfColon,
+
+ kDeleteAfterCompressing,
+ kSetArcMTime
+
+ #ifndef _NO_CRYPTO
+ , kPassword
+ #endif
};
}
-static const wchar_t kRecursedIDChar = 'R';
-static const wchar_t *kRecursedPostCharSet = L"0-";
+static const wchar_t kRecursedIDChar = 'r';
+static const char *kRecursedPostCharSet = "0-";
+
+static const char *k_ArcNameMode_PostCharSet = "sea";
+
+static const char *k_Stream_PostCharSet = "012";
+
+static inline const EArcNameMode ParseArcNameMode(int postCharIndex)
+{
+ switch (postCharIndex)
+ {
+ case 1: return k_ArcNameMode_Exact;
+ case 2: return k_ArcNameMode_Add;
+ default: return k_ArcNameMode_Smart;
+ }
+}
namespace NRecursedPostCharIndex {
enum EEnum
{
- kWildCardRecursionOnly = 0,
+ kWildcardRecursionOnly = 0,
kNoRecursion = 1
};
}
@@ -110,135 +180,143 @@ static const char kFileListID = '@';
static const char kSomeCludePostStringMinSize = 2; // at least <@|!><N>ame must be
static const char kSomeCludeAfterRecursedPostStringMinSize = 2; // at least <@|!><N>ame must be
-static const wchar_t *kOverwritePostCharSet = L"asut";
+static const char *kOverwritePostCharSet = "asut";
-NExtract::NOverwriteMode::EEnum k_OverwriteModes[] =
+static const NExtract::NOverwriteMode::EEnum k_OverwriteModes[] =
{
- NExtract::NOverwriteMode::kWithoutPrompt,
- NExtract::NOverwriteMode::kSkipExisting,
- NExtract::NOverwriteMode::kAutoRename,
- NExtract::NOverwriteMode::kAutoRenameExisting
+ NExtract::NOverwriteMode::kOverwrite,
+ NExtract::NOverwriteMode::kSkip,
+ NExtract::NOverwriteMode::kRename,
+ NExtract::NOverwriteMode::kRenameExisting
};
static const CSwitchForm kSwitchForms[] =
- {
- { L"?", NSwitchType::kSimple, false },
- { L"H", NSwitchType::kSimple, false },
- { L"-HELP", NSwitchType::kSimple, false },
- { L"BA", NSwitchType::kSimple, false },
- { L"BD", NSwitchType::kSimple, false },
- { L"T", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"Y", NSwitchType::kSimple, false },
- #ifndef _NO_CRYPTO
- { L"P", NSwitchType::kUnLimitedPostString, false, 0 },
- #endif
- { L"M", NSwitchType::kUnLimitedPostString, true, 1 },
- { L"O", NSwitchType::kUnLimitedPostString, false, 1 },
- { L"W", NSwitchType::kUnLimitedPostString, false, 0 },
- { L"I", NSwitchType::kUnLimitedPostString, true, kSomeCludePostStringMinSize},
- { L"X", NSwitchType::kUnLimitedPostString, true, kSomeCludePostStringMinSize},
- { L"AI", NSwitchType::kUnLimitedPostString, true, kSomeCludePostStringMinSize},
- { L"AX", NSwitchType::kUnLimitedPostString, true, kSomeCludePostStringMinSize},
- { L"AN", NSwitchType::kSimple, false },
- { L"U", NSwitchType::kUnLimitedPostString, true, 1},
- { L"V", NSwitchType::kUnLimitedPostString, true, 1},
- { L"R", NSwitchType::kPostChar, false, 0, 0, kRecursedPostCharSet },
- { L"SFX", NSwitchType::kUnLimitedPostString, false, 0 },
- { L"SI", NSwitchType::kUnLimitedPostString, false, 0 },
- { L"SO", NSwitchType::kSimple, false, 0 },
- { L"AO", NSwitchType::kPostChar, false, 1, 1, kOverwritePostCharSet},
- { L"SEML", NSwitchType::kUnLimitedPostString, false, 0},
- { L"AD", NSwitchType::kSimple, false },
- { L"SLP", NSwitchType::kUnLimitedPostString, false, 0},
- { L"SCS", NSwitchType::kUnLimitedPostString, false, 0},
- { L"SCC", NSwitchType::kUnLimitedPostString, false, 0},
- { L"SLT", NSwitchType::kSimple, false },
- { L"SSW", NSwitchType::kSimple, false },
- { L"SSC", NSwitchType::kPostChar, false, 0, 0, L"-" },
- { L"SCRC", NSwitchType::kSimple, false }
- };
+{
+ { "?" },
+ { "h" },
+ { "-help" },
+
+ { "ba" },
+ { "bd" },
+ { "bt" },
+ { "bb", NSwitchType::kString, false, 0 },
+
+ { "bso", NSwitchType::kChar, false, 1, k_Stream_PostCharSet },
+ { "bse", NSwitchType::kChar, false, 1, k_Stream_PostCharSet },
+ { "bsp", NSwitchType::kChar, false, 1, k_Stream_PostCharSet },
+
+ { "y" },
+
+ { "ad" },
+ { "ao", NSwitchType::kChar, false, 1, kOverwritePostCharSet},
-static const CCommandForm g_CommandForms[] =
-{
- { L"A", false },
- { L"U", false },
- { L"D", false },
- { L"T", false },
- { L"E", false },
- { L"X", false },
- { L"L", false },
- { L"B", false },
- { L"I", false }
-};
+ { "t", NSwitchType::kString, false, 1 },
+ { "stx", NSwitchType::kString, true, 1 },
+
+ { "m", NSwitchType::kString, true, 1 },
+ { "o", NSwitchType::kString, false, 1 },
+ { "w", NSwitchType::kString },
+
+ { "i", NSwitchType::kString, true, kSomeCludePostStringMinSize},
+ { "x", NSwitchType::kString, true, kSomeCludePostStringMinSize},
+ { "ai", NSwitchType::kString, true, kSomeCludePostStringMinSize},
+ { "ax", NSwitchType::kString, true, kSomeCludePostStringMinSize},
+ { "an" },
+
+ { "u", NSwitchType::kString, true, 1},
+ { "v", NSwitchType::kString, true, 1},
+ { "r", NSwitchType::kChar, false, 0, kRecursedPostCharSet },
+
+ { "stm", NSwitchType::kString },
+ { "sfx", NSwitchType::kString },
+ { "seml", NSwitchType::kString, false, 0},
+ { "scrc", NSwitchType::kString, true, 0 },
+
+ { "si", NSwitchType::kString },
+ { "so" },
-static const int kNumCommandForms = sizeof(g_CommandForms) / sizeof(g_CommandForms[0]);
+ { "slp", NSwitchType::kMinus },
+ { "scs", NSwitchType::kString },
+ { "scc", NSwitchType::kString },
+ { "slt" },
-static const wchar_t *kUniversalWildcard = L"*";
-static const int kMinNonSwitchWords = 1;
-static const int kCommandIndex = 0;
+ { "ssw" },
+ { "ssc", NSwitchType::kMinus },
+ { "sa", NSwitchType::kChar, false, 1, k_ArcNameMode_PostCharSet },
+
+ { "spd" },
+ { "spe", NSwitchType::kMinus },
+ { "spf", NSwitchType::kString, false, 0 },
+
+ { "snh", NSwitchType::kMinus },
+ { "snl", NSwitchType::kMinus },
+ { "sni" },
+ { "sns", NSwitchType::kMinus },
+ { "snr" },
+ { "snc" },
+
+ { "sdel" },
+ { "stl" }
+
+ #ifndef _NO_CRYPTO
+ , { "p", NSwitchType::kString }
+ #endif
+};
-// ---------------------------
-// exception messages
+static const wchar_t *kUniversalWildcard = L"*";
+static const unsigned kMinNonSwitchWords = 1;
+static const unsigned kCommandIndex = 0;
-static const char *kUserErrorMessage = "Incorrect command line";
+// static const char *kUserErrorMessage = "Incorrect command line";
static const char *kCannotFindListFile = "Cannot find listfile";
static const char *kIncorrectListFile = "Incorrect item in listfile.\nCheck charset encoding and -scs switch.";
-static const char *kIncorrectWildCardInListFile = "Incorrect wildcard in listfile";
-static const char *kIncorrectWildCardInCommandLine = "Incorrect wildcard in command line";
static const char *kTerminalOutError = "I won't write compressed data to a terminal";
-static const char *kSameTerminalError = "I won't write data and program's messages to same terminal";
+static const char *kSameTerminalError = "I won't write data and program's messages to same stream";
static const char *kEmptyFilePath = "Empty file path";
+static const char *kCannotFindArchive = "Cannot find archive";
-static void ThrowException(const char *errorMessage)
+bool CArcCommand::IsFromExtractGroup() const
{
- throw CArchiveCommandLineException(errorMessage);
-}
-
-static void ThrowUserErrorException()
-{
- ThrowException(kUserErrorMessage);
-}
-
-// ---------------------------
-
-bool CArchiveCommand::IsFromExtractGroup() const
-{
- switch(CommandType)
+ switch (CommandType)
{
case NCommandType::kTest:
case NCommandType::kExtract:
- case NCommandType::kFullExtract:
+ case NCommandType::kExtractFull:
return true;
- default:
- return false;
}
+ return false;
}
-NExtract::NPathMode::EEnum CArchiveCommand::GetPathMode() const
+NExtract::NPathMode::EEnum CArcCommand::GetPathMode() const
{
- switch(CommandType)
+ switch (CommandType)
{
case NCommandType::kTest:
- case NCommandType::kFullExtract:
- return NExtract::NPathMode::kFullPathnames;
- default:
- return NExtract::NPathMode::kNoPathnames;
+ case NCommandType::kExtractFull:
+ return NExtract::NPathMode::kFullPaths;
}
+ return NExtract::NPathMode::kNoPaths;
}
-bool CArchiveCommand::IsFromUpdateGroup() const
+bool CArcCommand::IsFromUpdateGroup() const
{
- return (CommandType == NCommandType::kAdd ||
- CommandType == NCommandType::kUpdate ||
- CommandType == NCommandType::kDelete);
+ switch (CommandType)
+ {
+ case NCommandType::kAdd:
+ case NCommandType::kUpdate:
+ case NCommandType::kDelete:
+ case NCommandType::kRename:
+ return true;
+ }
+ return false;
}
static NRecursedType::EEnum GetRecursedTypeFromIndex(int index)
{
switch (index)
{
- case NRecursedPostCharIndex::kWildCardRecursionOnly:
- return NRecursedType::kWildCardOnlyRecursed;
+ case NRecursedPostCharIndex::kWildcardRecursionOnly:
+ return NRecursedType::kWildcardOnlyRecursed;
case NRecursedPostCharIndex::kNoRecursion:
return NRecursedType::kNonRecursed;
default:
@@ -246,170 +324,281 @@ static NRecursedType::EEnum GetRecursedTypeFromIndex(int index)
}
}
-static bool ParseArchiveCommand(const UString &commandString, CArchiveCommand &command)
+static const char *g_Commands = "audtexlbih";
+
+static bool ParseArchiveCommand(const UString &commandString, CArcCommand &command)
{
- UString commandStringUpper = commandString;
- commandStringUpper.MakeUpper();
- UString postString;
- int commandIndex = ParseCommand(kNumCommandForms, g_CommandForms, commandStringUpper,
- postString) ;
- if (commandIndex < 0)
- return false;
- command.CommandType = (NCommandType::EEnum)commandIndex;
- return true;
+ UString s = commandString;
+ s.MakeLower_Ascii();
+ if (s.Len() == 1)
+ {
+ if (s[0] > 0x7F)
+ return false;
+ int index = FindCharPosInString(g_Commands, (char)s[0]);
+ if (index < 0)
+ return false;
+ command.CommandType = (NCommandType::EEnum)index;
+ return true;
+ }
+ if (s.Len() == 2 && s[0] == 'r' && s[1] == 'n')
+ {
+ command.CommandType = (NCommandType::kRename);
+ return true;
+ }
+ return false;
}
// ------------------------------------------------------------------
// filenames functions
-static void AddNameToCensor(NWildcard::CCensor &wildcardCensor,
- const UString &name, bool include, NRecursedType::EEnum type)
+static void AddNameToCensor(NWildcard::CCensor &censor,
+ const UString &name, bool include, NRecursedType::EEnum type, bool wildcardMatching)
{
bool recursed = false;
switch (type)
{
- case NRecursedType::kWildCardOnlyRecursed:
- recursed = DoesNameContainWildCard(name);
+ case NRecursedType::kWildcardOnlyRecursed:
+ recursed = DoesNameContainWildcard(name);
break;
case NRecursedType::kRecursed:
recursed = true;
break;
}
- wildcardCensor.AddItem(include, name, recursed);
+ censor.AddPreItem(include, name, recursed, wildcardMatching);
}
-static void AddToCensorFromListFile(NWildcard::CCensor &wildcardCensor,
- LPCWSTR fileName, bool include, NRecursedType::EEnum type, UINT codePage)
+static void AddRenamePair(CObjectVector<CRenamePair> *renamePairs,
+ const UString &oldName, const UString &newName, NRecursedType::EEnum type,
+ bool wildcardMatching)
+{
+ CRenamePair &pair = renamePairs->AddNew();
+ pair.OldName = oldName;
+ pair.NewName = newName;
+ pair.RecursedType = type;
+ pair.WildcardParsing = wildcardMatching;
+
+ if (!pair.Prepare())
+ {
+ UString val;
+ val += pair.OldName;
+ val.Add_LF();
+ val += pair.NewName;
+ val.Add_LF();
+ if (type == NRecursedType::kRecursed)
+ val.AddAscii("-r");
+ else if (type == NRecursedType::kRecursed)
+ val.AddAscii("-r0");
+ throw CArcCmdLineException("Unsupported rename command:", val);
+ }
+}
+
+static void AddToCensorFromListFile(
+ CObjectVector<CRenamePair> *renamePairs,
+ NWildcard::CCensor &censor,
+ LPCWSTR fileName, bool include, NRecursedType::EEnum type, bool wildcardMatching, Int32 codePage)
{
UStringVector names;
if (!NFind::DoesFileExist(us2fs(fileName)))
- throw kCannotFindListFile;
+ throw CArcCmdLineException(kCannotFindListFile, fileName);
if (!ReadNamesFromListFile(us2fs(fileName), names, codePage))
- throw kIncorrectListFile;
- for (int i = 0; i < names.Size(); i++)
- AddNameToCensor(wildcardCensor, names[i], include, type);
+ throw CArcCmdLineException(kIncorrectListFile, fileName);
+ if (renamePairs)
+ {
+ if ((names.Size() & 1) != 0)
+ throw CArcCmdLineException(kIncorrectListFile, fileName);
+ for (unsigned i = 0; i < names.Size(); i += 2)
+ {
+ // change type !!!!
+ AddRenamePair(renamePairs, names[i], names[i + 1], type, wildcardMatching);
+ }
+ }
+ else
+ FOR_VECTOR (i, names)
+ AddNameToCensor(censor, names[i], include, type, wildcardMatching);
}
static void AddToCensorFromNonSwitchesStrings(
- int startIndex,
- NWildcard::CCensor &wildcardCensor,
+ CObjectVector<CRenamePair> *renamePairs,
+ unsigned startIndex,
+ NWildcard::CCensor &censor,
const UStringVector &nonSwitchStrings, NRecursedType::EEnum type,
- bool thereAreSwitchIncludes, UINT codePage)
+ bool wildcardMatching,
+ bool thereAreSwitchIncludes, Int32 codePage)
{
- if (nonSwitchStrings.Size() == startIndex && (!thereAreSwitchIncludes))
- AddNameToCensor(wildcardCensor, kUniversalWildcard, true, type);
- for (int i = startIndex; i < nonSwitchStrings.Size(); i++)
+ if ((renamePairs || nonSwitchStrings.Size() == startIndex) && !thereAreSwitchIncludes)
+ AddNameToCensor(censor, kUniversalWildcard, true, type,
+ true // wildcardMatching
+ );
+
+ int oldIndex = -1;
+
+ for (unsigned i = startIndex; i < nonSwitchStrings.Size(); i++)
{
const UString &s = nonSwitchStrings[i];
if (s.IsEmpty())
- throw kEmptyFilePath;
+ throw CArcCmdLineException(kEmptyFilePath);
if (s[0] == kFileListID)
- AddToCensorFromListFile(wildcardCensor, s.Mid(1), true, type, codePage);
- else
- AddNameToCensor(wildcardCensor, s, true, type);
- }
-}
-
-#ifdef _WIN32
-static void ParseMapWithPaths(NWildcard::CCensor &wildcardCensor,
- const UString &switchParam, bool include,
- NRecursedType::EEnum commonRecursedType)
-{
- int splitPos = switchParam.Find(L':');
- if (splitPos < 0)
- ThrowUserErrorException();
- UString mappingName = switchParam.Left(splitPos);
-
- UString switchParam2 = switchParam.Mid(splitPos + 1);
- splitPos = switchParam2.Find(L':');
- if (splitPos < 0)
- ThrowUserErrorException();
-
- UString mappingSize = switchParam2.Left(splitPos);
- UString eventName = switchParam2.Mid(splitPos + 1);
-
- UInt64 dataSize64 = ConvertStringToUInt64(mappingSize, NULL);
- UInt32 dataSize = (UInt32)dataSize64;
- {
- CFileMapping fileMapping;
- if (fileMapping.Open(FILE_MAP_READ, GetSystemString(mappingName)) != 0)
- ThrowException("Can not open mapping");
- LPVOID data = fileMapping.Map(FILE_MAP_READ, 0, dataSize);
- if (data == NULL)
- ThrowException("MapViewOfFile error");
- try
+ AddToCensorFromListFile(renamePairs, censor, s.Ptr(1), true, type, wildcardMatching, codePage);
+ else if (renamePairs)
{
- const wchar_t *curData = (const wchar_t *)data;
- if (*curData != 0)
- ThrowException("Incorrect mapping data");
- UInt32 numChars = dataSize / sizeof(wchar_t);
- UString name;
- for (UInt32 i = 1; i < numChars; i++)
+ if (oldIndex == -1)
+ oldIndex = i;
+ else
{
- wchar_t c = curData[i];
- if (c == L'\0')
- {
- AddNameToCensor(wildcardCensor, name, include, commonRecursedType);
- name.Empty();
- }
- else
- name += c;
+ // NRecursedType::EEnum type is used for global wildcard (-i! switches)
+ AddRenamePair(renamePairs, nonSwitchStrings[oldIndex], s, NRecursedType::kNonRecursed, wildcardMatching);
+ // AddRenamePair(renamePairs, nonSwitchStrings[oldIndex], s, type);
+ oldIndex = -1;
}
- if (!name.IsEmpty())
- ThrowException("data error");
}
- catch(...)
- {
- UnmapViewOfFile(data);
- throw;
- }
- UnmapViewOfFile(data);
+ else
+ AddNameToCensor(censor, s, true, type, wildcardMatching);
}
+ if (oldIndex != -1)
+ {
+ throw CArcCmdLineException("There is no second file name for rename pair:", nonSwitchStrings[oldIndex]);
+ }
+}
+
+#ifdef _WIN32
+
+struct CEventSetEnd
+{
+ UString Name;
+
+ CEventSetEnd(const wchar_t *name): Name(name) {}
+ ~CEventSetEnd()
{
NSynchronization::CManualResetEvent event;
- if (event.Open(EVENT_MODIFY_STATE, false, GetSystemString(eventName)) == S_OK)
+ if (event.Open(EVENT_MODIFY_STATE, false, GetSystemString(Name)) == 0)
event.Set();
}
+};
+
+const char *k_IncorrectMapCommand = "Incorrect Map command";
+
+static const char *ParseMapWithPaths(
+ NWildcard::CCensor &censor,
+ const UString &s2, bool include,
+ NRecursedType::EEnum commonRecursedType,
+ bool wildcardMatching)
+{
+ UString s = s2;
+ int pos = s.Find(L':');
+ if (pos < 0)
+ return k_IncorrectMapCommand;
+ int pos2 = s.Find(L':', pos + 1);
+ if (pos2 < 0)
+ return k_IncorrectMapCommand;
+
+ CEventSetEnd eventSetEnd((const wchar_t *)s + ((unsigned)pos2 + 1));
+ s.DeleteFrom(pos2);
+ UInt32 size;
+ if (!StringToUInt32(s.Ptr(pos + 1), size)
+ || size < sizeof(wchar_t)
+ || size > ((UInt32)1 << 31)
+ || size % sizeof(wchar_t) != 0)
+ return "Unsupported Map data size";
+
+ s.DeleteFrom(pos);
+ CFileMapping map;
+ if (map.Open(FILE_MAP_READ, GetSystemString(s)) != 0)
+ return "Can not open mapping";
+ LPVOID data = map.Map(FILE_MAP_READ, 0, size);
+ if (!data)
+ return "MapViewOfFile error";
+ CFileUnmapper unmapper(data);
+
+ UString name;
+ const wchar_t *p = (const wchar_t *)data;
+ if (*p != 0) // data format marker
+ return "Unsupported Map data";
+ UInt32 numChars = size / sizeof(wchar_t);
+ for (UInt32 i = 1; i < numChars; i++)
+ {
+ wchar_t c = p[i];
+ if (c == 0)
+ {
+ // MessageBoxW(0, name, L"7-Zip", 0);
+ AddNameToCensor(censor, name, include, commonRecursedType, wildcardMatching);
+ name.Empty();
+ }
+ else
+ name += c;
+ }
+ if (!name.IsEmpty())
+ return "Map data error";
+
+ return NULL;
}
+
#endif
-static void AddSwitchWildCardsToCensor(NWildcard::CCensor &wildcardCensor,
+static void AddSwitchWildcardsToCensor(
+ NWildcard::CCensor &censor,
const UStringVector &strings, bool include,
- NRecursedType::EEnum commonRecursedType, UINT codePage)
+ NRecursedType::EEnum commonRecursedType,
+ bool wildcardMatching,
+ Int32 codePage)
{
- for (int i = 0; i < strings.Size(); i++)
+ const char *errorMessage = NULL;
+ unsigned i;
+ for (i = 0; i < strings.Size(); i++)
{
const UString &name = strings[i];
NRecursedType::EEnum recursedType;
- int pos = 0;
- if (name.Length() < kSomeCludePostStringMinSize)
- ThrowUserErrorException();
- if (::MyCharUpper(name[pos]) == kRecursedIDChar)
+ unsigned pos = 0;
+
+ if (name.Len() < kSomeCludePostStringMinSize)
+ {
+ errorMessage = "Too short switch";
+ break;
+ }
+
+ if (::MyCharLower_Ascii(name[pos]) == kRecursedIDChar)
{
pos++;
- int index = UString(kRecursedPostCharSet).Find(name[pos]);
+ wchar_t c = name[pos];
+ int index = -1;
+ if (c <= 0x7F)
+ index = FindCharPosInString(kRecursedPostCharSet, (char)c);
recursedType = GetRecursedTypeFromIndex(index);
if (index >= 0)
pos++;
}
else
recursedType = commonRecursedType;
- if (name.Length() < pos + kSomeCludeAfterRecursedPostStringMinSize)
- ThrowUserErrorException();
- UString tail = name.Mid(pos + 1);
+
+ if (name.Len() < pos + kSomeCludeAfterRecursedPostStringMinSize)
+ {
+ errorMessage = "Too short switch";
+ break;
+ }
+
+ UString tail = name.Ptr(pos + 1);
+
if (name[pos] == kImmediateNameID)
- AddNameToCensor(wildcardCensor, tail, include, recursedType);
+ AddNameToCensor(censor, tail, include, recursedType, wildcardMatching);
else if (name[pos] == kFileListID)
- AddToCensorFromListFile(wildcardCensor, tail, include, recursedType, codePage);
+ AddToCensorFromListFile(NULL, censor, tail, include, recursedType, wildcardMatching, codePage);
#ifdef _WIN32
else if (name[pos] == kMapNameID)
- ParseMapWithPaths(wildcardCensor, tail, include, recursedType);
+ {
+ errorMessage = ParseMapWithPaths(censor, tail, include, recursedType, wildcardMatching);
+ if (errorMessage)
+ break;
+ }
#endif
else
- ThrowUserErrorException();
+ {
+ errorMessage = "Incorrect wildcard type marker";
+ break;
+ }
}
+ if (i != strings.Size())
+ throw CArcCmdLineException(errorMessage, strings[i]);
}
#ifdef _WIN32
@@ -418,20 +607,27 @@ static void AddSwitchWildCardsToCensor(NWildcard::CCensor &wildcardCensor,
static void ConvertToLongName(const UString &prefix, UString &name)
{
- if (name.IsEmpty() || DoesNameContainWildCard(name))
+ if (name.IsEmpty() || DoesNameContainWildcard(name))
return;
NFind::CFileInfo fi;
- if (fi.Find(us2fs(prefix + name)))
+ const FString path = us2fs(prefix + name);
+ #ifndef UNDER_CE
+ if (NFile::NName::IsDevicePath(path))
+ return;
+ #endif
+ if (fi.Find(path))
name = fs2us(fi.Name);
}
static void ConvertToLongNames(const UString &prefix, CObjectVector<NWildcard::CItem> &items)
{
- for (int i = 0; i < items.Size(); i++)
+ FOR_VECTOR (i, items)
{
NWildcard::CItem &item = items[i];
if (item.Recursive || item.PathParts.Size() != 1)
continue;
+ if (prefix.IsEmpty() && item.IsDriveItem())
+ continue;
ConvertToLongName(prefix, item.PathParts.Front());
}
}
@@ -440,17 +636,22 @@ static void ConvertToLongNames(const UString &prefix, NWildcard::CCensorNode &no
{
ConvertToLongNames(prefix, node.IncludeItems);
ConvertToLongNames(prefix, node.ExcludeItems);
- int i;
+ unsigned i;
for (i = 0; i < node.SubNodes.Size(); i++)
- ConvertToLongName(prefix, node.SubNodes[i].Name);
+ {
+ UString &name = node.SubNodes[i].Name;
+ if (prefix.IsEmpty() && NWildcard::IsDriveColonName(name))
+ continue;
+ ConvertToLongName(prefix, name);
+ }
// mix folders with same name
for (i = 0; i < node.SubNodes.Size(); i++)
{
NWildcard::CCensorNode &nextNode1 = node.SubNodes[i];
- for (int j = i + 1; j < node.SubNodes.Size();)
+ for (unsigned j = i + 1; j < node.SubNodes.Size();)
{
const NWildcard::CCensorNode &nextNode2 = node.SubNodes[j];
- if (nextNode1.Name.CompareNoCase(nextNode2.Name) == 0)
+ if (nextNode1.Name.IsEqualTo_NoCase(nextNode2.Name))
{
nextNode1.IncludeItems += nextNode2.IncludeItems;
nextNode1.ExcludeItems += nextNode2.ExcludeItems;
@@ -467,9 +668,9 @@ static void ConvertToLongNames(const UString &prefix, NWildcard::CCensorNode &no
}
}
-static void ConvertToLongNames(NWildcard::CCensor &censor)
+void ConvertToLongNames(NWildcard::CCensor &censor)
{
- for (int i = 0; i < censor.Pairs.Size(); i++)
+ FOR_VECTOR (i, censor.Pairs)
{
NWildcard::CPair &pair = censor.Pairs[i];
ConvertToLongNames(pair.Prefix, pair.Head);
@@ -478,9 +679,10 @@ static void ConvertToLongNames(NWildcard::CCensor &censor)
#endif
+/*
static NUpdateArchive::NPairAction::EEnum GetUpdatePairActionType(int i)
{
- switch(i)
+ switch (i)
{
case NUpdateArchive::NPairAction::kIgnore: return NUpdateArchive::NPairAction::kIgnore;
case NUpdateArchive::NPairAction::kCopy: return NUpdateArchive::NPairAction::kCopy;
@@ -489,36 +691,37 @@ static NUpdateArchive::NPairAction::EEnum GetUpdatePairActionType(int i)
}
throw 98111603;
}
+*/
-const UString kUpdatePairStateIDSet = L"PQRXYZW";
-const int kUpdatePairStateNotSupportedActions[] = {2, 2, 1, -1, -1, -1, -1};
-
-const UString kUpdatePairActionIDSet = L"0123"; //Ignore, Copy, Compress, Create Anti
+static const wchar_t *kUpdatePairStateIDSet = L"pqrxyzw";
+static const int kUpdatePairStateNotSupportedActions[] = {2, 2, 1, -1, -1, -1, -1};
-const wchar_t *kUpdateIgnoreItselfPostStringID = L"-";
-const wchar_t kUpdateNewArchivePostCharID = '!';
+static const unsigned kNumUpdatePairActions = 4;
+static const char *kUpdateIgnoreItselfPostStringID = "-";
+static const wchar_t kUpdateNewArchivePostCharID = '!';
static bool ParseUpdateCommandString2(const UString &command,
NUpdateArchive::CActionSet &actionSet, UString &postString)
{
- for (int i = 0; i < command.Length();)
+ for (unsigned i = 0; i < command.Len();)
{
- wchar_t c = MyCharUpper(command[i]);
- int statePos = kUpdatePairStateIDSet.Find(c);
+ wchar_t c = MyCharLower_Ascii(command[i]);
+ int statePos = FindCharPosInString(kUpdatePairStateIDSet, c);
if (statePos < 0)
{
- postString = command.Mid(i);
+ postString = command.Ptr(i);
return true;
}
i++;
- if (i >= command.Length())
+ if (i >= command.Len())
return false;
- int actionPos = kUpdatePairActionIDSet.Find(::MyCharUpper(command[i]));
- if (actionPos < 0)
+ c = command[i];
+ if (c < '0' || c >= '0' + kNumUpdatePairActions)
return false;
- actionSet.StateActions[statePos] = GetUpdatePairActionType(actionPos);
- if (kUpdatePairStateNotSupportedActions[statePos] == actionPos)
+ unsigned actionPos = c - '0';
+ actionSet.StateActions[(unsigned)statePos] = (NUpdateArchive::NPairAction::EEnum)(actionPos);
+ if (kUpdatePairStateNotSupportedActions[(unsigned)statePos] == (int)actionPos)
return false;
i++;
}
@@ -530,10 +733,12 @@ static void ParseUpdateCommandString(CUpdateOptions &options,
const UStringVector &updatePostStrings,
const NUpdateArchive::CActionSet &defaultActionSet)
{
- for (int i = 0; i < updatePostStrings.Size(); i++)
+ const char *errorMessage = "incorrect update switch command";
+ unsigned i;
+ for (i = 0; i < updatePostStrings.Size(); i++)
{
const UString &updateString = updatePostStrings[i];
- if (updateString.CompareNoCase(kUpdateIgnoreItselfPostStringID) == 0)
+ if (updateString.IsEqualTo(kUpdateIgnoreItselfPostStringID))
{
if (options.UpdateArchiveItself)
{
@@ -547,7 +752,7 @@ static void ParseUpdateCommandString(CUpdateOptions &options,
UString postString;
if (!ParseUpdateCommandString2(updateString, actionSet, postString))
- ThrowUserErrorException();
+ break;
if (postString.IsEmpty())
{
if (options.UpdateArchiveItself)
@@ -555,64 +760,23 @@ static void ParseUpdateCommandString(CUpdateOptions &options,
}
else
{
- if (MyCharUpper(postString[0]) != kUpdateNewArchivePostCharID)
- ThrowUserErrorException();
+ if (postString[0] != kUpdateNewArchivePostCharID)
+ break;
CUpdateArchiveCommand uc;
- UString archivePath = postString.Mid(1);
+ UString archivePath = postString.Ptr(1);
if (archivePath.IsEmpty())
- ThrowUserErrorException();
+ break;
uc.UserArchivePath = archivePath;
uc.ActionSet = actionSet;
options.Commands.Add(uc);
}
}
}
+ if (i != updatePostStrings.Size())
+ throw CArcCmdLineException(errorMessage, updatePostStrings[i]);
}
-static const char kByteSymbol = 'B';
-static const char kKiloSymbol = 'K';
-static const char kMegaSymbol = 'M';
-static const char kGigaSymbol = 'G';
-
-static bool ParseComplexSize(const UString &src, UInt64 &result)
-{
- UString s = src;
- s.MakeUpper();
-
- const wchar_t *start = s;
- const wchar_t *end;
- UInt64 number = ConvertStringToUInt64(start, &end);
- int numDigits = (int)(end - start);
- if (numDigits == 0 || s.Length() > numDigits + 1)
- return false;
- if (s.Length() == numDigits)
- {
- result = number;
- return true;
- }
- int numBits;
- switch (s[numDigits])
- {
- case kByteSymbol:
- result = number;
- return true;
- case kKiloSymbol:
- numBits = 10;
- break;
- case kMegaSymbol:
- numBits = 20;
- break;
- case kGigaSymbol:
- numBits = 30;
- break;
- default:
- return false;
- }
- if (number >= ((UInt64)1 << (64 - numBits)))
- return false;
- result = number << numBits;
- return true;
-}
+bool ParseComplexSize(const wchar_t *s, UInt64 &result);
static void SetAddCommandOptions(
NCommandType::EEnum commandType,
@@ -620,16 +784,16 @@ static void SetAddCommandOptions(
CUpdateOptions &options)
{
NUpdateArchive::CActionSet defaultActionSet;
- switch(commandType)
+ switch (commandType)
{
case NCommandType::kAdd:
- defaultActionSet = NUpdateArchive::kAddActionSet;
+ defaultActionSet = NUpdateArchive::k_ActionSet_Add;
break;
case NCommandType::kDelete:
- defaultActionSet = NUpdateArchive::kDeleteActionSet;
+ defaultActionSet = NUpdateArchive::k_ActionSet_Delete;
break;
default:
- defaultActionSet = NUpdateArchive::kUpdateActionSet;
+ defaultActionSet = NUpdateArchive::k_ActionSet_Update;
}
options.UpdateArchiveItself = true;
@@ -645,7 +809,7 @@ static void SetAddCommandOptions(
{
const UString &postString = parser[NKey::kWorkingDir].PostStrings[0];
if (postString.IsEmpty())
- NDirectory::MyGetTempPath(options.WorkingDir);
+ NDir::MyGetTempPath(options.WorkingDir);
else
options.WorkingDir = us2fs(postString);
}
@@ -656,11 +820,11 @@ static void SetAddCommandOptions(
if (parser[NKey::kVolume].ThereIs)
{
const UStringVector &sv = parser[NKey::kVolume].PostStrings;
- for (int i = 0; i < sv.Size(); i++)
+ FOR_VECTOR (i, sv)
{
UInt64 size;
- if (!ParseComplexSize(sv[i], size))
- ThrowException("Incorrect volume size");
+ if (!ParseComplexSize(sv[i], size) || size == 0)
+ throw CArcCmdLineException("Incorrect volume size:", sv[i]);
options.VolumesSizes.Add(size);
}
}
@@ -670,116 +834,175 @@ static void SetMethodOptions(const CParser &parser, CObjectVector<CProperty> &pr
{
if (parser[NKey::kProperty].ThereIs)
{
- for (int i = 0; i < parser[NKey::kProperty].PostStrings.Size(); i++)
+ FOR_VECTOR (i, parser[NKey::kProperty].PostStrings)
{
- CProperty property;
- const UString &postString = parser[NKey::kProperty].PostStrings[i];
- int index = postString.Find(L'=');
- if (index < 0)
- property.Name = postString;
- else
+ CProperty prop;
+ prop.Name = parser[NKey::kProperty].PostStrings[i];
+ int index = prop.Name.Find(L'=');
+ if (index >= 0)
{
- property.Name = postString.Left(index);
- property.Value = postString.Mid(index + 1);
+ prop.Value = prop.Name.Ptr(index + 1);
+ prop.Name.DeleteFrom(index);
}
- properties.Add(property);
+ properties.Add(prop);
}
}
}
-CArchiveCommandLineParser::CArchiveCommandLineParser():
- parser(sizeof(kSwitchForms) / sizeof(kSwitchForms[0])) {}
+CArcCmdLineParser::CArcCmdLineParser(): parser(ARRAY_SIZE(kSwitchForms)) {}
-void CArchiveCommandLineParser::Parse1(const UStringVector &commandStrings,
- CArchiveCommandLineOptions &options)
+static inline void SetStreamMode(const CSwitchResult &sw, unsigned &res)
{
- try
- {
- parser.ParseStrings(kSwitchForms, commandStrings);
- }
- catch(...)
- {
- ThrowUserErrorException();
- }
+ if (sw.ThereIs)
+ res = sw.PostCharIndex;
+}
+
+void CArcCmdLineParser::Parse1(const UStringVector &commandStrings,
+ CArcCmdLineOptions &options)
+{
+ if (!parser.ParseStrings(kSwitchForms, commandStrings))
+ throw CArcCmdLineException(parser.ErrorMessage, parser.ErrorLine);
options.IsInTerminal = MY_IS_TERMINAL(stdin);
options.IsStdOutTerminal = MY_IS_TERMINAL(stdout);
options.IsStdErrTerminal = MY_IS_TERMINAL(stderr);
+
+ options.HelpMode = parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs || parser[NKey::kHelp3].ThereIs;
+
options.StdInMode = parser[NKey::kStdIn].ThereIs;
options.StdOutMode = parser[NKey::kStdOut].ThereIs;
options.EnableHeaders = !parser[NKey::kDisableHeaders].ThereIs;
- options.HelpMode = parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs || parser[NKey::kHelp3].ThereIs;
+ options.TechMode = parser[NKey::kTechMode].ThereIs;
+ options.ShowTime = parser[NKey::kShowTime].ThereIs;
+
+ if (parser[NKey::kDisablePercents].ThereIs
+ || options.StdOutMode
+ || !options.IsStdOutTerminal)
+ options.Number_for_Percents = k_OutStream_disabled;
+
+ if (options.StdOutMode)
+ options.Number_for_Out = k_OutStream_disabled;
+
+ SetStreamMode(parser[NKey::kOutStream], options.Number_for_Out);
+ SetStreamMode(parser[NKey::kErrStream], options.Number_for_Errors);
+ SetStreamMode(parser[NKey::kPercentStream], options.Number_for_Percents);
+
+ if (parser[NKey::kLogLevel].ThereIs)
+ {
+ const UString &s = parser[NKey::kLogLevel].PostStrings[0];
+ if (s.IsEmpty())
+ options.LogLevel = 1;
+ else
+ {
+ UInt32 v;
+ if (!StringToUInt32(s, v))
+ throw CArcCmdLineException("Unsupported switch postfix -bb", s);
+ options.LogLevel = (unsigned)v;
+ }
+ }
+
+ if (parser[NKey::kCaseSensitive].ThereIs)
+ {
+ g_CaseSensitive = !parser[NKey::kCaseSensitive].WithMinus;
+ options.CaseSensitiveChange = true;
+ options.CaseSensitive = g_CaseSensitive;
+ }
- #ifdef _WIN32
options.LargePages = false;
if (parser[NKey::kLargePages].ThereIs)
+ options.LargePages = !parser[NKey::kLargePages].WithMinus;
+
+
+ #ifndef UNDER_CE
+
+ if (parser[NKey::kAffinity].ThereIs)
{
- const UString &postString = parser[NKey::kLargePages].PostStrings.Front();
- if (postString.IsEmpty())
- options.LargePages = true;
+ const UString &s = parser[NKey::kAffinity].PostStrings[0];
+ if (!s.IsEmpty())
+ {
+ UInt32 v = 0;
+ AString a;
+ a.SetFromWStr_if_Ascii(s);
+ if (!a.IsEmpty())
+ {
+ const char *end;
+ v = ConvertHexStringToUInt32(a, &end);
+ if (*end != 0)
+ a.Empty();
+ }
+ if (a.IsEmpty())
+ throw CArcCmdLineException("Unsupported switch postfix -stm", s);
+
+ #ifdef _WIN32
+ SetProcessAffinityMask(GetCurrentProcess(), v);
+ #endif
+ }
}
+
#endif
}
struct CCodePagePair
{
- const wchar_t *Name;
- UINT CodePage;
+ const char *Name;
+ Int32 CodePage;
};
-static CCodePagePair g_CodePagePairs[] =
+static const unsigned kNumByteOnlyCodePages = 3;
+
+static const CCodePagePair g_CodePagePairs[] =
{
- { L"UTF-8", CP_UTF8 },
- { L"WIN", CP_ACP },
- { L"DOS", CP_OEMCP }
+ { "utf-8", CP_UTF8 },
+ { "win", CP_ACP },
+ { "dos", CP_OEMCP },
+ { "utf-16le", MY__CP_UTF16 },
+ { "utf-16be", MY__CP_UTF16BE }
};
-static int FindCharset(const NCommandLineParser::CParser &parser, int keyIndex, int defaultVal)
+static Int32 FindCharset(const NCommandLineParser::CParser &parser, unsigned keyIndex,
+ bool byteOnlyCodePages, Int32 defaultVal)
{
if (!parser[keyIndex].ThereIs)
return defaultVal;
UString name = parser[keyIndex].PostStrings.Back();
- name.MakeUpper();
- int i;
- for (i = 0; i < sizeof(g_CodePagePairs) / sizeof(g_CodePagePairs[0]); i++)
+ UInt32 v;
+ if (StringToUInt32(name, v))
+ if (v < ((UInt32)1 << 16))
+ return (Int32)v;
+ name.MakeLower_Ascii();
+ unsigned num = byteOnlyCodePages ? kNumByteOnlyCodePages : ARRAY_SIZE(g_CodePagePairs);
+ for (unsigned i = 0;; i++)
{
+ if (i == num) // to disable warnings from different compilers
+ throw CArcCmdLineException("Unsupported charset:", name);
const CCodePagePair &pair = g_CodePagePairs[i];
- if (name.Compare(pair.Name) == 0)
+ if (name.IsEqualTo(pair.Name))
return pair.CodePage;
}
- if (i == sizeof(g_CodePagePairs) / sizeof(g_CodePagePairs[0]))
- ThrowUserErrorException();
- return -1;
}
-static bool ConvertStringToUInt32(const wchar_t *s, UInt32 &v)
-{
- const wchar_t *end;
- UInt64 number = ConvertStringToUInt64(s, &end);
- if (*end != 0)
- return false;
- if (number > (UInt32)0xFFFFFFFF)
- return false;
- v = (UInt32)number;
- return true;
-}
-
-void EnumerateDirItemsAndSort(NWildcard::CCensor &wildcardCensor,
+HRESULT EnumerateDirItemsAndSort(
+ NWildcard::CCensor &censor,
+ NWildcard::ECensorPathMode censorPathMode,
+ const UString &addPathPrefix,
UStringVector &sortedPaths,
- UStringVector &sortedFullPaths)
+ UStringVector &sortedFullPaths,
+ CDirItemsStat &st,
+ IDirItemsCallback *callback)
{
- UStringVector paths;
+ FStringVector paths;
+
{
CDirItems dirItems;
+ dirItems.Callback = callback;
{
- FStringVector errorPaths;
- CRecordVector<DWORD> errorCodes;
- HRESULT res = EnumerateItems(wildcardCensor, dirItems, NULL, errorPaths, errorCodes);
- if (res != S_OK || errorPaths.Size() > 0)
- throw "cannot find archive";
+ HRESULT res = EnumerateItems(censor, censorPathMode, addPathPrefix, dirItems);
+ st = dirItems.Stat;
+ RINOK(res);
}
- for (int i = 0; i < dirItems.Items.Size(); i++)
+
+ FOR_VECTOR (i, dirItems.Items)
{
const CDirItem &dirItem = dirItems.Items[i];
if (!dirItem.IsDir())
@@ -788,44 +1011,76 @@ void EnumerateDirItemsAndSort(NWildcard::CCensor &wildcardCensor,
}
if (paths.Size() == 0)
- throw "there is no such archive";
+ throw CArcCmdLineException(kCannotFindArchive);
UStringVector fullPaths;
- int i;
+ unsigned i;
+
for (i = 0; i < paths.Size(); i++)
{
FString fullPath;
- NFile::NDirectory::MyGetFullPathName(us2fs(paths[i]), fullPath);
+ NFile::NDir::MyGetFullPathName(paths[i], fullPath);
fullPaths.Add(fs2us(fullPath));
}
- CIntVector indices;
+
+ CUIntVector indices;
SortFileNames(fullPaths, indices);
- sortedPaths.Reserve(indices.Size());
- sortedFullPaths.Reserve(indices.Size());
+ sortedPaths.ClearAndReserve(indices.Size());
+ sortedFullPaths.ClearAndReserve(indices.Size());
+
for (i = 0; i < indices.Size(); i++)
{
- int index = indices[i];
- sortedPaths.Add(paths[index]);
- sortedFullPaths.Add(fullPaths[index]);
+ unsigned index = indices[i];
+ sortedPaths.AddInReserved(fs2us(paths[index]));
+ sortedFullPaths.AddInReserved(fullPaths[index]);
+ if (i > 0 && CompareFileNames(sortedFullPaths[i], sortedFullPaths[i - 1]) == 0)
+ throw CArcCmdLineException("Duplicate archive path:", sortedFullPaths[i]);
}
+
+ return S_OK;
}
-void CArchiveCommandLineParser::Parse2(CArchiveCommandLineOptions &options)
+static void SetBoolPair(NCommandLineParser::CParser &parser, unsigned switchID, CBoolPair &bp)
+{
+ bp.Def = parser[switchID].ThereIs;
+ if (bp.Def)
+ bp.Val = !parser[switchID].WithMinus;
+}
+
+void CArcCmdLineParser::Parse2(CArcCmdLineOptions &options)
{
const UStringVector &nonSwitchStrings = parser.NonSwitchStrings;
- int numNonSwitchStrings = nonSwitchStrings.Size();
+ unsigned numNonSwitchStrings = nonSwitchStrings.Size();
if (numNonSwitchStrings < kMinNonSwitchWords)
- ThrowUserErrorException();
+ throw CArcCmdLineException("The command must be spcified");
if (!ParseArchiveCommand(nonSwitchStrings[kCommandIndex], options.Command))
- ThrowUserErrorException();
+ throw CArcCmdLineException("Unsupported command:", nonSwitchStrings[kCommandIndex]);
- options.TechMode = parser[NKey::kTechMode].ThereIs;
- options.CalcCrc = parser[NKey::kCalcCrc].ThereIs;
-
- if (parser[NKey::kCaseSensitive].ThereIs)
- g_CaseSensitive = (parser[NKey::kCaseSensitive].PostCharIndex < 0);
+ if (parser[NKey::kHash].ThereIs)
+ options.HashMethods = parser[NKey::kHash].PostStrings;
+
+ if (parser[NKey::kElimDup].ThereIs)
+ {
+ options.ExtractOptions.ElimDup.Def = true;
+ options.ExtractOptions.ElimDup.Val = !parser[NKey::kElimDup].WithMinus;
+ }
+
+ NWildcard::ECensorPathMode censorPathMode = NWildcard::k_RelatPath;
+ bool fullPathMode = parser[NKey::kFullPathMode].ThereIs;
+ if (fullPathMode)
+ {
+ censorPathMode = NWildcard::k_AbsPath;
+ const UString &s = parser[NKey::kFullPathMode].PostStrings[0];
+ if (!s.IsEmpty())
+ {
+ if (s == L"2")
+ censorPathMode = NWildcard::k_FullPath;
+ else
+ throw CArcCmdLineException("Unsupported -spf:", s);
+ }
+ }
NRecursedType::EEnum recursedType;
if (parser[NKey::kRecursed].ThereIs)
@@ -833,43 +1088,58 @@ void CArchiveCommandLineParser::Parse2(CArchiveCommandLineOptions &options)
else
recursedType = NRecursedType::kNonRecursed;
- g_CodePage = FindCharset(parser, NKey::kConsoleCharSet, -1);
- UINT codePage = FindCharset(parser, NKey::kListfileCharSet, CP_UTF8);
+ bool wildcardMatching = true;
+ if (parser[NKey::kDisableWildcardParsing].ThereIs)
+ wildcardMatching = false;
+
+ g_CodePage = FindCharset(parser, NKey::kConsoleCharSet, true, -1);
+ Int32 codePage = FindCharset(parser, NKey::kListfileCharSet, false, CP_UTF8);
bool thereAreSwitchIncludes = false;
+
if (parser[NKey::kInclude].ThereIs)
{
thereAreSwitchIncludes = true;
- AddSwitchWildCardsToCensor(options.WildcardCensor,
- parser[NKey::kInclude].PostStrings, true, recursedType, codePage);
+ AddSwitchWildcardsToCensor(options.Censor,
+ parser[NKey::kInclude].PostStrings, true, recursedType, wildcardMatching, codePage);
}
+
if (parser[NKey::kExclude].ThereIs)
- AddSwitchWildCardsToCensor(options.WildcardCensor,
- parser[NKey::kExclude].PostStrings, false, recursedType, codePage);
+ AddSwitchWildcardsToCensor(options.Censor,
+ parser[NKey::kExclude].PostStrings, false, recursedType, wildcardMatching, codePage);
- int curCommandIndex = kCommandIndex + 1;
+ unsigned curCommandIndex = kCommandIndex + 1;
bool thereIsArchiveName = !parser[NKey::kNoArName].ThereIs &&
options.Command.CommandType != NCommandType::kBenchmark &&
- options.Command.CommandType != NCommandType::kInfo;
+ options.Command.CommandType != NCommandType::kInfo &&
+ options.Command.CommandType != NCommandType::kHash;
bool isExtractGroupCommand = options.Command.IsFromExtractGroup();
bool isExtractOrList = isExtractGroupCommand || options.Command.CommandType == NCommandType::kList;
+ bool isRename = options.Command.CommandType == NCommandType::kRename;
- if (isExtractOrList && options.StdInMode)
+ if ((isExtractOrList || isRename) && options.StdInMode)
thereIsArchiveName = false;
+ if (parser[NKey::kArcNameMode].ThereIs)
+ options.UpdateOptions.ArcNameMode = ParseArcNameMode(parser[NKey::kArcNameMode].PostCharIndex);
+
if (thereIsArchiveName)
{
if (curCommandIndex >= numNonSwitchStrings)
- ThrowUserErrorException();
+ throw CArcCmdLineException("Cannot find archive name");
options.ArchiveName = nonSwitchStrings[curCommandIndex++];
if (options.ArchiveName.IsEmpty())
- ThrowUserErrorException();
+ throw CArcCmdLineException("Archive name cannot by empty");
+ #ifdef _WIN32
+ // options.ArchiveName.Replace(L'/', WCHAR_PATH_SEPARATOR);
+ #endif
}
- AddToCensorFromNonSwitchesStrings(
- curCommandIndex, options.WildcardCensor,
- nonSwitchStrings, recursedType, thereAreSwitchIncludes, codePage);
+ AddToCensorFromNonSwitchesStrings(isRename ? &options.UpdateOptions.RenamePairs : NULL,
+ curCommandIndex, options.Censor,
+ nonSwitchStrings, recursedType, wildcardMatching,
+ thereAreSwitchIncludes, codePage);
options.YesToAll = parser[NKey::kYes].ThereIs;
@@ -885,63 +1155,126 @@ void CArchiveCommandLineParser::Parse2(CArchiveCommandLineOptions &options)
if (parser[NKey::kArchiveType].ThereIs)
options.ArcType = parser[NKey::kArchiveType].PostStrings[0];
+ options.ExcludedArcTypes = parser[NKey::kExcludedArcType].PostStrings;
+
SetMethodOptions(parser, options.Properties);
+ if (parser[NKey::kNtSecurity].ThereIs) options.NtSecurity.SetTrueTrue();
+
+ SetBoolPair(parser, NKey::kAltStreams, options.AltStreams);
+ SetBoolPair(parser, NKey::kHardLinks, options.HardLinks);
+ SetBoolPair(parser, NKey::kSymLinks, options.SymLinks);
+
if (isExtractOrList)
{
- if (!options.WildcardCensor.AllAreRelative())
- ThrowException("Cannot use absolute pathnames for this command");
+ CExtractOptionsBase &eo = options.ExtractOptions;
+
+ {
+ CExtractNtOptions &nt = eo.NtOptions;
+ nt.NtSecurity = options.NtSecurity;
+
+ nt.AltStreams = options.AltStreams;
+ if (!options.AltStreams.Def)
+ nt.AltStreams.Val = true;
+
+ nt.HardLinks = options.HardLinks;
+ if (!options.HardLinks.Def)
+ nt.HardLinks.Val = true;
- NWildcard::CCensor archiveWildcardCensor;
+ nt.SymLinks = options.SymLinks;
+ if (!options.SymLinks.Def)
+ nt.SymLinks.Val = true;
+
+ nt.ReplaceColonForAltStream = parser[NKey::kReplaceColonForAltStream].ThereIs;
+ nt.WriteToAltStreamIfColon = parser[NKey::kWriteToAltStreamIfColon].ThereIs;
+ }
+
+ options.Censor.AddPathsToCensor(NWildcard::k_AbsPath);
+ options.Censor.ExtendExclude();
+
+ // are there paths that look as non-relative (!Prefix.IsEmpty())
+ if (!options.Censor.AllAreRelative())
+ throw CArcCmdLineException("Cannot use absolute pathnames for this command");
+
+ NWildcard::CCensor &arcCensor = options.arcCensor;
if (parser[NKey::kArInclude].ThereIs)
- AddSwitchWildCardsToCensor(archiveWildcardCensor,
- parser[NKey::kArInclude].PostStrings, true, NRecursedType::kNonRecursed, codePage);
+ AddSwitchWildcardsToCensor(arcCensor, parser[NKey::kArInclude].PostStrings, true, NRecursedType::kNonRecursed, wildcardMatching, codePage);
if (parser[NKey::kArExclude].ThereIs)
- AddSwitchWildCardsToCensor(archiveWildcardCensor,
- parser[NKey::kArExclude].PostStrings, false, NRecursedType::kNonRecursed, codePage);
+ AddSwitchWildcardsToCensor(arcCensor, parser[NKey::kArExclude].PostStrings, false, NRecursedType::kNonRecursed, wildcardMatching, codePage);
if (thereIsArchiveName)
- AddNameToCensor(archiveWildcardCensor, options.ArchiveName, true, NRecursedType::kNonRecursed);
+ AddNameToCensor(arcCensor, options.ArchiveName, true, NRecursedType::kNonRecursed, wildcardMatching);
+
+ arcCensor.AddPathsToCensor(NWildcard::k_RelatPath);
#ifdef _WIN32
- ConvertToLongNames(archiveWildcardCensor);
+ ConvertToLongNames(arcCensor);
#endif
- archiveWildcardCensor.ExtendExclude();
+ arcCensor.ExtendExclude();
if (options.StdInMode)
- {
- UString arcName = parser[NKey::kStdIn].PostStrings.Front();
- options.ArchivePathsSorted.Add(arcName);
- options.ArchivePathsFullSorted.Add(arcName);
- }
- else
- {
- EnumerateDirItemsAndSort(archiveWildcardCensor,
- options.ArchivePathsSorted,
- options.ArchivePathsFullSorted);
- }
+ options.ArcName_for_StdInMode = parser[NKey::kStdIn].PostStrings.Front();
if (isExtractGroupCommand)
{
- if (options.StdOutMode && options.IsStdOutTerminal && options.IsStdErrTerminal)
- throw kSameTerminalError;
+ if (options.StdOutMode)
+ {
+ if (
+ options.Number_for_Percents == k_OutStream_stdout
+ // || options.Number_for_Out == k_OutStream_stdout
+ // || options.Number_for_Errors == k_OutStream_stdout
+ ||
+ (
+ (options.IsStdOutTerminal && options.IsStdErrTerminal)
+ &&
+ (
+ options.Number_for_Percents != k_OutStream_disabled
+ // || options.Number_for_Out != k_OutStream_disabled
+ // || options.Number_for_Errors != k_OutStream_disabled
+ )
+ )
+ )
+ throw CArcCmdLineException(kSameTerminalError);
+ }
+
if (parser[NKey::kOutputDir].ThereIs)
{
- options.OutputDir = us2fs(parser[NKey::kOutputDir].PostStrings[0]);
- NFile::NName::NormalizeDirPathPrefix(options.OutputDir);
+ eo.OutputDir = us2fs(parser[NKey::kOutputDir].PostStrings[0]);
+ NFile::NName::NormalizeDirPathPrefix(eo.OutputDir);
}
- options.OverwriteMode = NExtract::NOverwriteMode::kAskBefore;
+ eo.OverwriteMode = NExtract::NOverwriteMode::kAsk;
if (parser[NKey::kOverwrite].ThereIs)
- options.OverwriteMode = k_OverwriteModes[parser[NKey::kOverwrite].PostCharIndex];
+ {
+ eo.OverwriteMode = k_OverwriteModes[(unsigned)parser[NKey::kOverwrite].PostCharIndex];
+ eo.OverwriteMode_Force = true;
+ }
else if (options.YesToAll)
- options.OverwriteMode = NExtract::NOverwriteMode::kWithoutPrompt;
+ {
+ eo.OverwriteMode = NExtract::NOverwriteMode::kOverwrite;
+ eo.OverwriteMode_Force = true;
+ }
+ }
+
+ eo.PathMode = options.Command.GetPathMode();
+ if (censorPathMode == NWildcard::k_AbsPath)
+ {
+ eo.PathMode = NExtract::NPathMode::kAbsPaths;
+ eo.PathMode_Force = true;
+ }
+ else if (censorPathMode == NWildcard::k_FullPath)
+ {
+ eo.PathMode = NExtract::NPathMode::kFullPaths;
+ eo.PathMode_Force = true;
}
}
else if (options.Command.IsFromUpdateGroup())
{
+ if (parser[NKey::kArInclude].ThereIs)
+ throw CArcCmdLineException("-ai switch is not supported for this command");
+
CUpdateOptions &updateOptions = options.UpdateOptions;
SetAddCommandOptions(options.Command.CommandType, parser, updateOptions);
@@ -951,20 +1284,18 @@ void CArchiveCommandLineParser::Parse2(CArchiveCommandLineOptions &options)
if (parser[NKey::kShareForWrite].ThereIs)
updateOptions.OpenShareForWrite = true;
- options.EnablePercents = !parser[NKey::kDisablePercents].ThereIs;
+ updateOptions.PathMode = censorPathMode;
- if (options.EnablePercents)
- {
- if ((options.StdOutMode && !options.IsStdErrTerminal) ||
- (!options.StdOutMode && !options.IsStdOutTerminal))
- options.EnablePercents = false;
- }
+ updateOptions.AltStreams = options.AltStreams;
+ updateOptions.NtSecurity = options.NtSecurity;
+ updateOptions.HardLinks = options.HardLinks;
+ updateOptions.SymLinks = options.SymLinks;
updateOptions.EMailMode = parser[NKey::kEmail].ThereIs;
if (updateOptions.EMailMode)
{
updateOptions.EMailAddress = parser[NKey::kEmail].PostStrings.Front();
- if (updateOptions.EMailAddress.Length() > 0)
+ if (updateOptions.EMailAddress.Len() > 0)
if (updateOptions.EMailAddress[0] == L'.')
{
updateOptions.EMailRemoveAfter = true;
@@ -975,30 +1306,56 @@ void CArchiveCommandLineParser::Parse2(CArchiveCommandLineOptions &options)
updateOptions.StdOutMode = options.StdOutMode;
updateOptions.StdInMode = options.StdInMode;
+ updateOptions.DeleteAfterCompressing = parser[NKey::kDeleteAfterCompressing].ThereIs;
+ updateOptions.SetArcMTime = parser[NKey::kSetArcMTime].ThereIs;
+
if (updateOptions.StdOutMode && updateOptions.EMailMode)
- throw "stdout mode and email mode cannot be combined";
- if (updateOptions.StdOutMode && options.IsStdOutTerminal)
- throw kTerminalOutError;
+ throw CArcCmdLineException("stdout mode and email mode cannot be combined");
+
+ if (updateOptions.StdOutMode)
+ {
+ if (options.IsStdOutTerminal)
+ throw CArcCmdLineException(kTerminalOutError);
+
+ if (options.Number_for_Percents == k_OutStream_stdout
+ || options.Number_for_Out == k_OutStream_stdout
+ || options.Number_for_Errors == k_OutStream_stdout)
+ throw CArcCmdLineException(kSameTerminalError);
+ }
+
if (updateOptions.StdInMode)
updateOptions.StdInFileName = parser[NKey::kStdIn].PostStrings.Front();
- #ifdef _WIN32
- ConvertToLongNames(options.WildcardCensor);
- #endif
+ if (options.Command.CommandType == NCommandType::kRename)
+ if (updateOptions.Commands.Size() != 1)
+ throw CArcCmdLineException("Only one archive can be created with rename command");
}
else if (options.Command.CommandType == NCommandType::kBenchmark)
{
options.NumIterations = 1;
if (curCommandIndex < numNonSwitchStrings)
{
- if (!ConvertStringToUInt32(nonSwitchStrings[curCommandIndex++], options.NumIterations))
- ThrowUserErrorException();
+ if (!StringToUInt32(nonSwitchStrings[curCommandIndex], options.NumIterations))
+ throw CArcCmdLineException("Incorrect Number of benmchmark iterations", nonSwitchStrings[curCommandIndex]);
+ curCommandIndex++;
}
}
+ else if (options.Command.CommandType == NCommandType::kHash)
+ {
+ options.Censor.AddPathsToCensor(censorPathMode);
+ options.Censor.ExtendExclude();
+
+ CHashOptions &hashOptions = options.HashOptions;
+ hashOptions.PathMode = censorPathMode;
+ hashOptions.Methods = options.HashMethods;
+ if (parser[NKey::kShareForWrite].ThereIs)
+ hashOptions.OpenShareForWrite = true;
+ hashOptions.StdInMode = options.StdInMode;
+ hashOptions.AltStreamsMode = options.AltStreams.Val;
+ }
else if (options.Command.CommandType == NCommandType::kInfo)
{
}
else
- ThrowUserErrorException();
- options.WildcardCensor.ExtendExclude();
+ throw 20150919;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h
index 96646d605cf..a345505cb84 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h
@@ -3,15 +3,16 @@
#ifndef __ARCHIVE_COMMAND_LINE_H
#define __ARCHIVE_COMMAND_LINE_H
-#include "Common/CommandLineParser.h"
-#include "Common/Wildcard.h"
+#include "../../../Common/CommandLineParser.h"
+#include "../../../Common/Wildcard.h"
#include "Extract.h"
+#include "HashCalc.h"
#include "Update.h"
-struct CArchiveCommandLineException: public AString
+struct CArcCmdLineException: public UString
{
- CArchiveCommandLineException(const char *errorMessage): AString(errorMessage) {}
+ CArcCmdLineException(const char *a, const wchar_t *u = NULL);
};
namespace NCommandType { enum EEnum
@@ -21,35 +22,38 @@ namespace NCommandType { enum EEnum
kDelete,
kTest,
kExtract,
- kFullExtract,
+ kExtractFull,
kList,
kBenchmark,
- kInfo
+ kInfo,
+ kHash,
+ kRename
};}
-namespace NRecursedType { enum EEnum
-{
- kRecursed,
- kWildCardOnlyRecursed,
- kNonRecursed
-};}
-
-struct CArchiveCommand
+struct CArcCommand
{
NCommandType::EEnum CommandType;
+
bool IsFromExtractGroup() const;
bool IsFromUpdateGroup() const;
- bool IsTestMode() const { return CommandType == NCommandType::kTest; }
+ bool IsTestCommand() const { return CommandType == NCommandType::kTest; }
NExtract::NPathMode::EEnum GetPathMode() const;
};
-struct CArchiveCommandLineOptions
+enum
+{
+ k_OutStream_disabled = 0,
+ k_OutStream_stdout = 1,
+ k_OutStream_stderr = 2
+};
+
+struct CArcCmdLineOptions
{
bool HelpMode;
- #ifdef _WIN32
bool LargePages;
- #endif
+ bool CaseSensitiveChange;
+ bool CaseSensitive;
bool IsInTerminal;
bool IsStdOutTerminal;
@@ -60,10 +64,9 @@ struct CArchiveCommandLineOptions
bool YesToAll;
bool ShowDialog;
- // NWildcard::CCensor ArchiveWildcardCensor;
- NWildcard::CCensor WildcardCensor;
+ NWildcard::CCensor Censor;
- CArchiveCommand Command;
+ CArcCommand Command;
UString ArchiveName;
#ifndef _NO_CRYPTO
@@ -72,36 +75,73 @@ struct CArchiveCommandLineOptions
#endif
bool TechMode;
- // Extract
- bool CalcCrc;
+ bool ShowTime;
+
+ UStringVector HashMethods;
+
bool AppendName;
- FString OutputDir;
- NExtract::NOverwriteMode::EEnum OverwriteMode;
- UStringVector ArchivePathsSorted;
- UStringVector ArchivePathsFullSorted;
+ // UStringVector ArchivePathsSorted;
+ // UStringVector ArchivePathsFullSorted;
+ NWildcard::CCensor arcCensor;
+ UString ArcName_for_StdInMode;
+
CObjectVector<CProperty> Properties;
+ CExtractOptionsBase ExtractOptions;
+
+ CBoolPair NtSecurity;
+ CBoolPair AltStreams;
+ CBoolPair HardLinks;
+ CBoolPair SymLinks;
+
CUpdateOptions UpdateOptions;
+ CHashOptions HashOptions;
UString ArcType;
- bool EnablePercents;
+ UStringVector ExcludedArcTypes;
+
+ unsigned Number_for_Out;
+ unsigned Number_for_Errors;
+ unsigned Number_for_Percents;
+ unsigned LogLevel;
+
+ // bool IsOutAllowed() const { return Number_for_Out != k_OutStream_disabled; }
// Benchmark
UInt32 NumIterations;
- CArchiveCommandLineOptions(): StdInMode(false), StdOutMode(false) {};
+ CArcCmdLineOptions():
+ LargePages(false),
+ CaseSensitiveChange(false),
+ CaseSensitive(false),
+
+ StdInMode(false),
+ StdOutMode(false),
+
+ Number_for_Out(k_OutStream_stdout),
+ Number_for_Errors(k_OutStream_stderr),
+ Number_for_Percents(k_OutStream_stdout),
+
+ LogLevel(0)
+ {
+ };
};
-class CArchiveCommandLineParser
+class CArcCmdLineParser
{
NCommandLineParser::CParser parser;
public:
- CArchiveCommandLineParser();
- void Parse1(const UStringVector &commandStrings, CArchiveCommandLineOptions &options);
- void Parse2(CArchiveCommandLineOptions &options);
+ CArcCmdLineParser();
+ void Parse1(const UStringVector &commandStrings, CArcCmdLineOptions &options);
+ void Parse2(CArcCmdLineOptions &options);
};
-void EnumerateDirItemsAndSort(NWildcard::CCensor &wildcardCensor,
+HRESULT EnumerateDirItemsAndSort(
+ NWildcard::CCensor &censor,
+ NWildcard::ECensorPathMode pathMode,
+ const UString &addPathPrefix,
UStringVector &sortedPaths,
- UStringVector &sortedFullPaths);
+ UStringVector &sortedFullPaths,
+ CDirItemsStat &st,
+ IDirItemsCallback *callback);
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
index 9c9c042291d..62da5e9fad4 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
@@ -2,63 +2,273 @@
#include "StdAfx.h"
-#include "Common/ComTry.h"
-#include "Common/StringConvert.h"
-#include "Common/Wildcard.h"
+#undef sprintf
+#undef printf
-#include "Windows/FileDir.h"
-#include "Windows/FileFind.h"
-#include "Windows/FileName.h"
-#include "Windows/PropVariant.h"
-#include "Windows/PropVariantConversions.h"
+#include "../../../../C/Alloc.h"
+
+#include "../../../Common/ComTry.h"
+#include "../../../Common/IntToString.h"
+#include "../../../Common/StringConvert.h"
+#include "../../../Common/Wildcard.h"
+
+#include "../../../Windows/ErrorMsg.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileFind.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/PropVariant.h"
+#include "../../../Windows/PropVariantConv.h"
+
+#if defined(_WIN32) && !defined(UNDER_CE) && !defined(_SFX)
+#define _USE_SECURITY_CODE
+#include "../../../Windows/SecurityUtils.h"
+#endif
#include "../../Common/FilePathAutoRename.h"
+// #include "../../Common/StreamUtils.h"
#include "../Common/ExtractingFilePath.h"
+#include "../Common/PropIDUtils.h"
#include "ArchiveExtractCallback.h"
using namespace NWindows;
+using namespace NFile;
+using namespace NDir;
+
+static const char *kCantAutoRename = "Can not create file with auto name";
+static const char *kCantRenameFile = "Can not rename existing file";
+static const char *kCantDeleteOutputFile = "Can not delete output file";
+static const char *kCantDeleteOutputDir = "Can not delete output folder";
+
+
+#ifndef _SFX
+
+STDMETHODIMP COutStreamWithHash::Write(const void *data, UInt32 size, UInt32 *processedSize)
+{
+ HRESULT result = S_OK;
+ if (_stream)
+ result = _stream->Write(data, size, &size);
+ if (_calculate)
+ _hash->Update(data, size);
+ _size += size;
+ if (processedSize)
+ *processedSize = size;
+ return result;
+}
+
+#endif
+
+#ifdef _USE_SECURITY_CODE
+bool InitLocalPrivileges()
+{
+ NSecurity::CAccessToken token;
+ if (!token.OpenProcessToken(GetCurrentProcess(),
+ TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES))
+ return false;
+
+ TOKEN_PRIVILEGES tp;
+
+ tp.PrivilegeCount = 1;
+ tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+
+ if (!::LookupPrivilegeValue(NULL, SE_SECURITY_NAME, &tp.Privileges[0].Luid))
+ return false;
+ if (!token.AdjustPrivileges(&tp))
+ return false;
+ return (GetLastError() == ERROR_SUCCESS);
+}
+#endif
+
+#ifdef SUPPORT_LINKS
+
+int CHardLinkNode::Compare(const CHardLinkNode &a) const
+{
+ if (StreamId < a.StreamId) return -1;
+ if (StreamId > a.StreamId) return 1;
+ return MyCompare(INode, a.INode);
+}
+
+static HRESULT Archive_Get_HardLinkNode(IInArchive *archive, UInt32 index, CHardLinkNode &h, bool &defined)
+{
+ h.INode = 0;
+ h.StreamId = (UInt64)(Int64)-1;
+ defined = false;
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetProperty(index, kpidINode, &prop));
+ if (!ConvertPropVariantToUInt64(prop, h.INode))
+ return S_OK;
+ }
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetProperty(index, kpidStreamId, &prop));
+ ConvertPropVariantToUInt64(prop, h.StreamId);
+ }
+ defined = true;
+ return S_OK;
+}
+
+
+HRESULT CArchiveExtractCallback::PrepareHardLinks(const CRecordVector<UInt32> *realIndices)
+{
+ _hardLinks.Clear();
+
+ if (!_arc->Ask_INode)
+ return S_OK;
+
+ IInArchive *archive = _arc->Archive;
+ CRecordVector<CHardLinkNode> &hardIDs = _hardLinks.IDs;
+
+ {
+ UInt32 numItems;
+ if (realIndices)
+ numItems = realIndices->Size();
+ else
+ {
+ RINOK(archive->GetNumberOfItems(&numItems));
+ }
+
+ for (UInt32 i = 0; i < numItems; i++)
+ {
+ CHardLinkNode h;
+ bool defined;
+ UInt32 realIndex = realIndices ? (*realIndices)[i] : i;
+
+ RINOK(Archive_Get_HardLinkNode(archive, realIndex, h, defined));
+ if (defined)
+ {
+ bool isAltStream = false;
+ RINOK(Archive_IsItem_AltStream(archive, realIndex, isAltStream));
+ if (!isAltStream)
+ hardIDs.Add(h);
+ }
+ }
+ }
+
+ hardIDs.Sort2();
+
+ {
+ // wee keep only items that have 2 or more items
+ unsigned k = 0;
+ unsigned numSame = 1;
+ for (unsigned i = 1; i < hardIDs.Size(); i++)
+ {
+ if (hardIDs[i].Compare(hardIDs[i - 1]) != 0)
+ numSame = 1;
+ else if (++numSame == 2)
+ {
+ if (i - 1 != k)
+ hardIDs[k] = hardIDs[i - 1];
+ k++;
+ }
+ }
+ hardIDs.DeleteFrom(k);
+ }
+
+ _hardLinks.PrepareLinks();
+ return S_OK;
+}
-static const char *kCantAutoRename = "ERROR: Can not create file with auto name";
-static const char *kCantRenameFile = "ERROR: Can not rename existing file ";
-static const char *kCantDeleteOutputFile = "ERROR: Can not delete output file ";
+#endif
+
+CArchiveExtractCallback::CArchiveExtractCallback():
+ WriteCTime(true),
+ WriteATime(true),
+ WriteMTime(true),
+ _multiArchives(false)
+{
+ LocalProgressSpec = new CLocalProgress();
+ _localProgress = LocalProgressSpec;
+
+ #ifdef _USE_SECURITY_CODE
+ _saclEnabled = InitLocalPrivileges();
+ #endif
+}
void CArchiveExtractCallback::Init(
+ const CExtractNtOptions &ntOptions,
const NWildcard::CCensorNode *wildcardCensor,
const CArc *arc,
IFolderArchiveExtractCallback *extractCallback2,
- bool stdOutMode, bool testMode, bool crcMode,
+ bool stdOutMode, bool testMode,
const FString &directoryPath,
- const UStringVector &removePathParts,
+ const UStringVector &removePathParts, bool removePartsForAltStreams,
UInt64 packSize)
{
+ _extractedFolderPaths.Clear();
+ _extractedFolderIndices.Clear();
+
+ #ifdef SUPPORT_LINKS
+ _hardLinks.Clear();
+ #endif
+
+ #ifdef SUPPORT_ALT_STREAMS
+ _renamedFiles.Clear();
+ #endif
+
+ _ntOptions = ntOptions;
_wildcardCensor = wildcardCensor;
_stdOutMode = stdOutMode;
_testMode = testMode;
- _crcMode = crcMode;
- _unpTotal = 1;
+
+ // _progressTotal = 0;
+ // _progressTotal_Defined = false;
+
_packTotal = packSize;
+ _progressTotal = packSize;
+ _progressTotal_Defined = true;
_extractCallback2 = extractCallback2;
_compressProgress.Release();
_extractCallback2.QueryInterface(IID_ICompressProgressInfo, &_compressProgress);
+ _extractCallback2.QueryInterface(IID_IArchiveExtractCallbackMessage, &_callbackMessage);
+ _extractCallback2.QueryInterface(IID_IFolderArchiveExtractCallback2, &_folderArchiveExtractCallback2);
+
+ #ifndef _SFX
+
+ _extractCallback2.QueryInterface(IID_IFolderExtractToStreamCallback, &ExtractToStreamCallback);
+ if (ExtractToStreamCallback)
+ {
+ Int32 useStreams = 0;
+ if (ExtractToStreamCallback->UseExtractToStream(&useStreams) != S_OK)
+ useStreams = 0;
+ if (useStreams == 0)
+ ExtractToStreamCallback.Release();
+ }
+
+ #endif
LocalProgressSpec->Init(extractCallback2, true);
LocalProgressSpec->SendProgress = false;
-
_removePathParts = removePathParts;
+ _removePartsForAltStreams = removePartsForAltStreams;
+
+ #ifndef _SFX
+ _baseParentFolder = (UInt32)(Int32)-1;
+ _use_baseParentFolder_mode = false;
+ #endif
+
_arc = arc;
- _directoryPath = directoryPath;
- NFile::NName::NormalizeDirPathPrefix(_directoryPath);
+ _dirPathPrefix = directoryPath;
+ _dirPathPrefix_Full = directoryPath;
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (!NName::IsAltPathPrefix(_dirPathPrefix))
+ #endif
+ {
+ NName::NormalizeDirPathPrefix(_dirPathPrefix);
+ NDir::MyGetFullPathName(directoryPath, _dirPathPrefix_Full);
+ NName::NormalizeDirPathPrefix(_dirPathPrefix_Full);
+ }
}
STDMETHODIMP CArchiveExtractCallback::SetTotal(UInt64 size)
{
COM_TRY_BEGIN
- _unpTotal = size;
+ _progressTotal = size;
+ _progressTotal_Defined = true;
if (!_multiArchives && _extractCallback2)
return _extractCallback2->SetTotal(size);
return S_OK;
@@ -87,18 +297,20 @@ static UInt64 MyMultDiv64(UInt64 unpCur, UInt64 unpTotal, UInt64 packTotal)
STDMETHODIMP CArchiveExtractCallback::SetCompleted(const UInt64 *completeValue)
{
COM_TRY_BEGIN
+
if (!_extractCallback2)
return S_OK;
+ UInt64 packCur;
if (_multiArchives)
{
- if (completeValue != NULL)
- {
- UInt64 packCur = LocalProgressSpec->InSize + MyMultDiv64(*completeValue, _unpTotal, _packTotal);
- return _extractCallback2->SetCompleted(&packCur);
- }
+ packCur = LocalProgressSpec->InSize;
+ if (completeValue && _progressTotal_Defined)
+ packCur += MyMultDiv64(*completeValue, _progressTotal, _packTotal);
+ completeValue = &packCur;
}
return _extractCallback2->SetCompleted(completeValue);
+
COM_TRY_END
}
@@ -111,13 +323,39 @@ STDMETHODIMP CArchiveExtractCallback::SetRatioInfo(const UInt64 *inSize, const U
void CArchiveExtractCallback::CreateComplexDirectory(const UStringVector &dirPathParts, FString &fullPath)
{
- fullPath = _directoryPath;
- for (int i = 0; i < dirPathParts.Size(); i++)
+ bool isAbsPath = false;
+
+ if (!dirPathParts.IsEmpty())
+ {
+ const UString &s = dirPathParts[0];
+ if (s.IsEmpty())
+ isAbsPath = true;
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ else
+ {
+ if (NName::IsDrivePath2(s))
+ isAbsPath = true;
+ }
+ #endif
+ }
+
+ if (_pathMode == NExtract::NPathMode::kAbsPaths && isAbsPath)
+ fullPath.Empty();
+ else
+ fullPath = _dirPathPrefix;
+
+ FOR_VECTOR (i, dirPathParts)
{
- if (i > 0)
- fullPath += FCHAR_PATH_SEPARATOR;
- fullPath += us2fs(dirPathParts[i]);
- NFile::NDirectory::MyCreateDirectory(fullPath);
+ if (i != 0)
+ fullPath.Add_PathSepar();
+ const UString &s = dirPathParts[i];
+ fullPath += us2fs(s);
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (_pathMode == NExtract::NPathMode::kAbsPaths)
+ if (i == 0 && s.Len() == 2 && NName::IsDrivePath2(s))
+ continue;
+ #endif
+ CreateDir(fullPath);
}
}
@@ -141,31 +379,272 @@ HRESULT CArchiveExtractCallback::GetUnpackSize()
return _arc->GetItemSize(_index, _curSize, _curSizeDefined);
}
+static void AddPathToMessage(UString &s, const FString &path)
+{
+ s.AddAscii(" : ");
+ s += fs2us(path);
+}
+
HRESULT CArchiveExtractCallback::SendMessageError(const char *message, const FString &path)
{
- return _extractCallback2->MessageError(GetUnicodeString(message) + fs2us(path));
+ UString s;
+ s.AddAscii(message);
+ AddPathToMessage(s, path);
+ return _extractCallback2->MessageError(s);
+}
+
+HRESULT CArchiveExtractCallback::SendMessageError_with_LastError(const char *message, const FString &path)
+{
+ DWORD errorCode = GetLastError();
+ UString s;
+ s.AddAscii(message);
+ if (errorCode != 0)
+ {
+ s.AddAscii(" : ");
+ s += NError::MyFormatMessage(errorCode);
+ }
+ AddPathToMessage(s, path);
+ return _extractCallback2->MessageError(s);
+}
+
+HRESULT CArchiveExtractCallback::SendMessageError2(const char *message, const FString &path1, const FString &path2)
+{
+ UString s;
+ s.AddAscii(message);
+ AddPathToMessage(s, path1);
+ AddPathToMessage(s, path2);
+ return _extractCallback2->MessageError(s);
+}
+
+#ifndef _SFX
+
+STDMETHODIMP CGetProp::GetProp(PROPID propID, PROPVARIANT *value)
+{
+ /*
+ if (propID == kpidName)
+ {
+ COM_TRY_BEGIN
+ NCOM::CPropVariant prop = Name;
+ prop.Detach(value);
+ return S_OK;
+ COM_TRY_END
+ }
+ */
+ return Arc->Archive->GetProperty(IndexInArc, propID, value);
+}
+
+#endif
+
+
+#ifdef SUPPORT_LINKS
+
+static UString GetDirPrefixOf(const UString &src)
+{
+ UString s = src;
+ if (!s.IsEmpty())
+ {
+ if (IsPathSepar(s.Back()))
+ s.DeleteBack();
+ int pos = s.ReverseFind_PathSepar();
+ s.DeleteFrom(pos + 1);
+ }
+ return s;
+}
+
+#endif
+
+
+bool IsSafePath(const UString &path)
+{
+ if (NName::IsAbsolutePath(path))
+ return false;
+
+ UStringVector parts;
+ SplitPathToParts(path, parts);
+ unsigned level = 0;
+
+ FOR_VECTOR (i, parts)
+ {
+ const UString &s = parts[i];
+ if (s.IsEmpty())
+ {
+ if (i == 0)
+ return false;
+ continue;
+ }
+ if (s == L".")
+ continue;
+ if (s == L"..")
+ {
+ if (level == 0)
+ return false;
+ level--;
+ }
+ else
+ level++;
+ }
+
+ return level > 0;
+}
+
+
+bool CensorNode_CheckPath2(const NWildcard::CCensorNode &node, const CReadArcItem &item, bool &include)
+{
+ bool found = false;
+
+ if (node.CheckPathVect(item.PathParts, !item.MainIsDir, include))
+ {
+ if (!include)
+ return true;
+
+ #ifdef SUPPORT_ALT_STREAMS
+ if (!item.IsAltStream)
+ return true;
+ #endif
+
+ found = true;
+ }
+
+ #ifdef SUPPORT_ALT_STREAMS
+
+ if (!item.IsAltStream)
+ return false;
+
+ UStringVector pathParts2 = item.PathParts;
+ if (pathParts2.IsEmpty())
+ pathParts2.AddNew();
+ UString &back = pathParts2.Back();
+ back += L':';
+ back += item.AltStreamName;
+ bool include2;
+
+ if (node.CheckPathVect(pathParts2,
+ true, // isFile,
+ include2))
+ {
+ include = include2;
+ return true;
+ }
+
+ #endif
+
+ return found;
+}
+
+bool CensorNode_CheckPath(const NWildcard::CCensorNode &node, const CReadArcItem &item)
+{
+ bool include;
+ if (CensorNode_CheckPath2(node, item, include))
+ return include;
+ return false;
+}
+
+static FString MakePath_from_2_Parts(const FString &prefix, const FString &path)
+{
+ FString s = prefix;
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (!path.IsEmpty() && path[0] == ':' && !prefix.IsEmpty() && IsPathSepar(prefix.Back()))
+ {
+ if (!NName::IsDriveRootPath_SuperAllowed(prefix))
+ s.DeleteBack();
+ }
+ #endif
+ s += path;
+ return s;
}
+
+/*
+#ifdef SUPPORT_LINKS
+
+struct CTempMidBuffer
+{
+ void *Buf;
+
+ CTempMidBuffer(size_t size): Buf(NULL) { Buf = ::MidAlloc(size); }
+ ~CTempMidBuffer() { ::MidFree(Buf); }
+};
+
+HRESULT CArchiveExtractCallback::MyCopyFile(ISequentialOutStream *outStream)
+{
+ const size_t kBufSize = 1 << 16;
+ CTempMidBuffer buf(kBufSize);
+ if (!buf.Buf)
+ return E_OUTOFMEMORY;
+
+ NIO::CInFile inFile;
+ NIO::COutFile outFile;
+
+ if (!inFile.Open(_CopyFile_Path))
+ return SendMessageError_with_LastError("Open error", _CopyFile_Path);
+
+ for (;;)
+ {
+ UInt32 num;
+
+ if (!inFile.Read(buf.Buf, kBufSize, num))
+ return SendMessageError_with_LastError("Read error", _CopyFile_Path);
+
+ if (num == 0)
+ return S_OK;
+
+
+ RINOK(WriteStream(outStream, buf.Buf, num));
+ }
+}
+
+#endif
+*/
+
STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index, ISequentialOutStream **outStream, Int32 askExtractMode)
{
COM_TRY_BEGIN
- _crcStream.Release();
- *outStream = 0;
+
+ *outStream = NULL;
+
+ #ifndef _SFX
+ if (_hashStream)
+ _hashStreamSpec->ReleaseStream();
+ _hashStreamWasUsed = false;
+ #endif
+
_outFileStream.Release();
_encrypted = false;
+ _position = 0;
_isSplit = false;
+
_curSize = 0;
_curSizeDefined = false;
_index = index;
- UString fullPath;
+ _diskFilePath.Empty();
+
+ // _fi.Clear();
+
+ #ifdef SUPPORT_LINKS
+ // _CopyFile_Path.Empty();
+ linkPath.Empty();
+ #endif
IInArchive *archive = _arc->Archive;
- RINOK(_arc->GetItemPath(index, fullPath));
- RINOK(IsArchiveItemFolder(archive, index, _fi.IsDir));
- _filePath = fullPath;
+ #ifndef _SFX
+ _item._use_baseParentFolder_mode = _use_baseParentFolder_mode;
+ if (_use_baseParentFolder_mode)
+ {
+ _item._baseParentFolder = _baseParentFolder;
+ if (_pathMode == NExtract::NPathMode::kFullPaths ||
+ _pathMode == NExtract::NPathMode::kAbsPaths)
+ _item._baseParentFolder = -1;
+ }
+ #endif
+
+ #ifdef SUPPORT_ALT_STREAMS
+ _item.WriteToAltStreamIfColon = _ntOptions.WriteToAltStreamIfColon;
+ #endif
+
+ RINOK(_arc->GetItem(index, _item));
{
NCOM::CPropVariant prop;
@@ -178,26 +657,303 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index, ISequentialOutStre
_isSplit = true;
}
}
+
+ #ifdef SUPPORT_LINKS
+
+ // bool isCopyLink = false;
+ bool isHardLink = false;
+ bool isJunction = false;
+ bool isRelative = false;
+
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetProperty(index, kpidHardLink, &prop));
+ if (prop.vt == VT_BSTR)
+ {
+ isHardLink = true;
+ // isCopyLink = false;
+ isRelative = false; // RAR5, TAR: hard links are from root folder of archive
+ linkPath.SetFromBstr(prop.bstrVal);
+ }
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+ }
+
+ /*
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetProperty(index, kpidCopyLink, &prop));
+ if (prop.vt == VT_BSTR)
+ {
+ isHardLink = false;
+ isCopyLink = true;
+ isRelative = false; // RAR5: copy links are from root folder of archive
+ linkPath.SetFromBstr(prop.bstrVal);
+ }
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+ }
+ */
+
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetProperty(index, kpidSymLink, &prop));
+ if (prop.vt == VT_BSTR)
+ {
+ isHardLink = false;
+ // isCopyLink = false;
+ isRelative = true; // RAR5, TAR: symbolic links can be relative
+ linkPath.SetFromBstr(prop.bstrVal);
+ }
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+ }
+
+
+ bool isOkReparse = false;
+
+ if (linkPath.IsEmpty() && _arc->GetRawProps)
+ {
+ const void *data;
+ UInt32 dataSize;
+ UInt32 propType;
- RINOK(GetArchiveItemBoolProp(archive, index, kpidEncrypted, _encrypted));
+ _arc->GetRawProps->GetRawProp(_index, kpidNtReparse, &data, &dataSize, &propType);
+
+ if (dataSize != 0)
+ {
+ if (propType != NPropDataType::kRaw)
+ return E_FAIL;
+ UString s;
+ CReparseAttr reparse;
+ isOkReparse = reparse.Parse((const Byte *)data, dataSize);
+ if (isOkReparse)
+ {
+ isHardLink = false;
+ // isCopyLink = false;
+ linkPath = reparse.GetPath();
+ isJunction = reparse.IsMountPoint();
+ isRelative = reparse.IsRelative();
+ #ifndef _WIN32
+ linkPath.Replace(L'\\', WCHAR_PATH_SEPARATOR);
+ #endif
+ }
+ }
+ }
+
+ if (!linkPath.IsEmpty())
+ {
+ #ifdef _WIN32
+ linkPath.Replace(L'/', WCHAR_PATH_SEPARATOR);
+ #endif
+
+ // rar5 uses "\??\" prefix for absolute links
+ if (linkPath.IsPrefixedBy(WSTRING_PATH_SEPARATOR L"??" WSTRING_PATH_SEPARATOR))
+ {
+ isRelative = false;
+ linkPath.DeleteFrontal(4);
+ }
+
+ for (;;)
+ // while (NName::IsAbsolutePath(linkPath))
+ {
+ unsigned n = NName::GetRootPrefixSize(linkPath);
+ if (n == 0)
+ break;
+ isRelative = false;
+ linkPath.DeleteFrontal(n);
+ }
+ }
+
+ if (!linkPath.IsEmpty() && !isRelative && _removePathParts.Size() != 0)
+ {
+ UStringVector pathParts;
+ SplitPathToParts(linkPath, pathParts);
+ bool badPrefix = false;
+ FOR_VECTOR (i, _removePathParts)
+ {
+ if (CompareFileNames(_removePathParts[i], pathParts[i]) != 0)
+ {
+ badPrefix = true;
+ break;
+ }
+ }
+ if (!badPrefix)
+ pathParts.DeleteFrontal(_removePathParts.Size());
+ linkPath = MakePathFromParts(pathParts);
+ }
+
+ #endif
+
+ RINOK(Archive_GetItemBoolProp(archive, index, kpidEncrypted, _encrypted));
RINOK(GetUnpackSize());
+ #ifdef SUPPORT_ALT_STREAMS
+
+ if (!_ntOptions.AltStreams.Val && _item.IsAltStream)
+ return S_OK;
+
+ #endif
+
+
+ UStringVector &pathParts = _item.PathParts;
+
if (_wildcardCensor)
{
- if (!_wildcardCensor->CheckPath(fullPath, !_fi.IsDir))
+ if (!CensorNode_CheckPath(*_wildcardCensor, _item))
return S_OK;
}
- if (askExtractMode == NArchive::NExtract::NAskMode::kExtract && !_testMode)
+ #ifndef _SFX
+ if (_use_baseParentFolder_mode)
{
- if (_stdOutMode)
+ if (!pathParts.IsEmpty())
{
- CMyComPtr<ISequentialOutStream> outStreamLoc = new CStdOutFileStream;
- *outStream = outStreamLoc.Detach();
- return S_OK;
+ unsigned numRemovePathParts = 0;
+
+ #ifdef SUPPORT_ALT_STREAMS
+ if (_pathMode == NExtract::NPathMode::kNoPathsAlt && _item.IsAltStream)
+ numRemovePathParts = pathParts.Size();
+ else
+ #endif
+ if (_pathMode == NExtract::NPathMode::kNoPaths ||
+ _pathMode == NExtract::NPathMode::kNoPathsAlt)
+ numRemovePathParts = pathParts.Size() - 1;
+ pathParts.DeleteFrontal(numRemovePathParts);
+ }
+ }
+ else
+ #endif
+ {
+ if (pathParts.IsEmpty())
+ {
+ if (_item.IsDir)
+ return S_OK;
+ /*
+ #ifdef SUPPORT_ALT_STREAMS
+ if (!_item.IsAltStream)
+ #endif
+ return E_FAIL;
+ */
}
+ unsigned numRemovePathParts = 0;
+
+ switch (_pathMode)
+ {
+ case NExtract::NPathMode::kFullPaths:
+ case NExtract::NPathMode::kCurPaths:
+ {
+ if (_removePathParts.IsEmpty())
+ break;
+ bool badPrefix = false;
+
+ if (pathParts.Size() < _removePathParts.Size())
+ badPrefix = true;
+ else
+ {
+ if (pathParts.Size() == _removePathParts.Size())
+ {
+ if (_removePartsForAltStreams)
+ {
+ #ifdef SUPPORT_ALT_STREAMS
+ if (!_item.IsAltStream)
+ #endif
+ badPrefix = true;
+ }
+ else
+ {
+ if (!_item.MainIsDir)
+ badPrefix = true;
+ }
+ }
+
+ if (!badPrefix)
+ FOR_VECTOR (i, _removePathParts)
+ {
+ if (CompareFileNames(_removePathParts[i], pathParts[i]) != 0)
+ {
+ badPrefix = true;
+ break;
+ }
+ }
+ }
+
+ if (badPrefix)
+ {
+ if (askExtractMode == NArchive::NExtract::NAskMode::kExtract && !_testMode)
+ return E_FAIL;
+ }
+ else
+ numRemovePathParts = _removePathParts.Size();
+ break;
+ }
+
+ case NExtract::NPathMode::kNoPaths:
+ {
+ if (!pathParts.IsEmpty())
+ numRemovePathParts = pathParts.Size() - 1;
+ break;
+ }
+ case NExtract::NPathMode::kNoPathsAlt:
+ {
+ #ifdef SUPPORT_ALT_STREAMS
+ if (_item.IsAltStream)
+ numRemovePathParts = pathParts.Size();
+ else
+ #endif
+ if (!pathParts.IsEmpty())
+ numRemovePathParts = pathParts.Size() - 1;
+ break;
+ }
+ /*
+ case NExtract::NPathMode::kFullPaths:
+ case NExtract::NPathMode::kAbsPaths:
+ break;
+ */
+ }
+
+ pathParts.DeleteFrontal(numRemovePathParts);
+ }
+
+ #ifndef _SFX
+
+ if (ExtractToStreamCallback)
+ {
+ if (!GetProp)
+ {
+ GetProp_Spec = new CGetProp;
+ GetProp = GetProp_Spec;
+ }
+ GetProp_Spec->Arc = _arc;
+ GetProp_Spec->IndexInArc = index;
+ UString name = MakePathFromParts(pathParts);
+
+ #ifdef SUPPORT_ALT_STREAMS
+ if (_item.IsAltStream)
+ {
+ if (!pathParts.IsEmpty() || (!_removePartsForAltStreams && _pathMode != NExtract::NPathMode::kNoPathsAlt))
+ name += L':';
+ name += _item.AltStreamName;
+ }
+ #endif
+
+ return ExtractToStreamCallback->GetStream7(name, BoolToInt(_item.IsDir), outStream, askExtractMode, GetProp);
+ }
+
+ #endif
+
+ CMyComPtr<ISequentialOutStream> outStreamLoc;
+
+if (askExtractMode == NArchive::NExtract::NAskMode::kExtract && !_testMode)
+{
+ if (_stdOutMode)
+ {
+ outStreamLoc = new CStdOutFileStream;
+ }
+ else
+ {
{
NCOM::CPropVariant prop;
RINOK(archive->GetProperty(index, kpidAttrib, &prop));
@@ -219,38 +975,44 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index, ISequentialOutStre
bool isAnti = false;
RINOK(_arc->IsItemAnti(index, isAnti));
- UStringVector pathParts;
- SplitPathToParts(fullPath, pathParts);
+ #ifdef SUPPORT_ALT_STREAMS
+ if (!_item.IsAltStream
+ || !pathParts.IsEmpty()
+ || !(_removePartsForAltStreams || _pathMode == NExtract::NPathMode::kNoPathsAlt))
+ #endif
+ Correct_FsPath(_pathMode == NExtract::NPathMode::kAbsPaths, pathParts, _item.MainIsDir);
+
+ #ifdef SUPPORT_ALT_STREAMS
- if (pathParts.IsEmpty())
- return E_FAIL;
- int numRemovePathParts = 0;
- switch(_pathMode)
+ if (_item.IsAltStream)
{
- case NExtract::NPathMode::kFullPathnames:
- break;
- case NExtract::NPathMode::kCurrentPathnames:
- {
- numRemovePathParts = _removePathParts.Size();
- if (pathParts.Size() <= numRemovePathParts)
- return E_FAIL;
- for (int i = 0; i < numRemovePathParts; i++)
- if (_removePathParts[i].CompareNoCase(pathParts[i]) != 0)
- return E_FAIL;
- break;
- }
- case NExtract::NPathMode::kNoPathnames:
+ UString s = _item.AltStreamName;
+ Correct_AltStream_Name(s);
+ bool needColon = true;
+
+ if (pathParts.IsEmpty())
{
- numRemovePathParts = pathParts.Size() - 1;
- break;
+ pathParts.AddNew();
+ if (_removePartsForAltStreams || _pathMode == NExtract::NPathMode::kNoPathsAlt)
+ needColon = false;
}
+ else if (_pathMode == NExtract::NPathMode::kAbsPaths &&
+ NWildcard::GetNumPrefixParts_if_DrivePath(pathParts) == pathParts.Size())
+ pathParts.AddNew();
+
+ UString &name = pathParts.Back();
+ if (needColon)
+ name += (wchar_t)(_ntOptions.ReplaceColonForAltStream ? L'_' : L':');
+ name += s;
}
- pathParts.Delete(0, numRemovePathParts);
- MakeCorrectPath(pathParts);
- UString processedPath = MakePathNameFromParts(pathParts);
+
+ #endif
+
+ UString processedPath = MakePathFromParts(pathParts);
+
if (!isAnti)
{
- if (!_fi.IsDir)
+ if (!_item.IsDir)
{
if (!pathParts.IsEmpty())
pathParts.DeleteBack();
@@ -260,74 +1022,103 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index, ISequentialOutStre
{
FString fullPathNew;
CreateComplexDirectory(pathParts, fullPathNew);
- if (_fi.IsDir)
- NFile::NDirectory::SetDirTime(fullPathNew,
+ if (_item.IsDir)
+ {
+ _extractedFolderPaths.Add(fullPathNew);
+ _extractedFolderIndices.Add(index);
+ SetDirTime(fullPathNew,
(WriteCTime && _fi.CTimeDefined) ? &_fi.CTime : NULL,
(WriteATime && _fi.ATimeDefined) ? &_fi.ATime : NULL,
(WriteMTime && _fi.MTimeDefined) ? &_fi.MTime : (_arc->MTimeDefined ? &_arc->MTime : NULL));
+ }
}
}
- FString fullProcessedPath = _directoryPath + us2fs(processedPath);
+ FString fullProcessedPath = us2fs(processedPath);
+ if (_pathMode != NExtract::NPathMode::kAbsPaths
+ || !NName::IsAbsolutePath(processedPath))
+ {
+ fullProcessedPath = MakePath_from_2_Parts(_dirPathPrefix, fullProcessedPath);
+ }
- if (_fi.IsDir)
+ #ifdef SUPPORT_ALT_STREAMS
+
+ if (_item.IsAltStream && _item.ParentIndex != (UInt32)(Int32)-1)
+ {
+ CIndexToPathPair pair(_item.ParentIndex);
+ int renIndex = _renamedFiles.FindInSorted(pair);
+ if (renIndex >= 0)
+ {
+ const CIndexToPathPair &pair = _renamedFiles[renIndex];
+ fullProcessedPath = pair.Path;
+ fullProcessedPath += (FChar)':';
+ UString s = _item.AltStreamName;
+ Correct_AltStream_Name(s);
+ fullProcessedPath += us2fs(s);
+ }
+ }
+
+ #endif
+
+ bool isRenamed = false;
+
+ if (_item.IsDir)
{
_diskFilePath = fullProcessedPath;
if (isAnti)
- NFile::NDirectory::MyRemoveDirectory(_diskFilePath);
- return S_OK;
+ RemoveDir(_diskFilePath);
+ #ifdef SUPPORT_LINKS
+ if (linkPath.IsEmpty())
+ #endif
+ return S_OK;
}
-
- if (!_isSplit)
+ else if (!_isSplit)
{
- NFile::NFind::CFileInfo fileInfo;
+
+ // ----- Is file (not split) -----
+ NFind::CFileInfo fileInfo;
if (fileInfo.Find(fullProcessedPath))
{
- switch(_overwriteMode)
+ switch (_overwriteMode)
{
- case NExtract::NOverwriteMode::kSkipExisting:
+ case NExtract::NOverwriteMode::kSkip:
return S_OK;
- case NExtract::NOverwriteMode::kAskBefore:
+ case NExtract::NOverwriteMode::kAsk:
{
- Int32 overwiteResult;
+ int slashPos = fullProcessedPath.ReverseFind_PathSepar();
+ FString realFullProcessedPath = fullProcessedPath.Left(slashPos + 1) + fileInfo.Name;
+
+ Int32 overwriteResult;
RINOK(_extractCallback2->AskOverwrite(
- fs2us(fullProcessedPath), &fileInfo.MTime, &fileInfo.Size, fullPath,
+ fs2us(realFullProcessedPath), &fileInfo.MTime, &fileInfo.Size, _item.Path,
_fi.MTimeDefined ? &_fi.MTime : NULL,
_curSizeDefined ? &_curSize : NULL,
- &overwiteResult))
+ &overwriteResult))
- switch(overwiteResult)
+ switch (overwriteResult)
{
- case NOverwriteAnswer::kCancel:
- return E_ABORT;
- case NOverwriteAnswer::kNo:
- return S_OK;
- case NOverwriteAnswer::kNoToAll:
- _overwriteMode = NExtract::NOverwriteMode::kSkipExisting;
- return S_OK;
- case NOverwriteAnswer::kYesToAll:
- _overwriteMode = NExtract::NOverwriteMode::kWithoutPrompt;
- break;
- case NOverwriteAnswer::kYes:
- break;
- case NOverwriteAnswer::kAutoRename:
- _overwriteMode = NExtract::NOverwriteMode::kAutoRename;
- break;
+ case NOverwriteAnswer::kCancel: return E_ABORT;
+ case NOverwriteAnswer::kNo: return S_OK;
+ case NOverwriteAnswer::kNoToAll: _overwriteMode = NExtract::NOverwriteMode::kSkip; return S_OK;
+ case NOverwriteAnswer::kYes: break;
+ case NOverwriteAnswer::kYesToAll: _overwriteMode = NExtract::NOverwriteMode::kOverwrite; break;
+ case NOverwriteAnswer::kAutoRename: _overwriteMode = NExtract::NOverwriteMode::kRename; break;
default:
return E_FAIL;
}
}
}
- if (_overwriteMode == NExtract::NOverwriteMode::kAutoRename)
+ if (_overwriteMode == NExtract::NOverwriteMode::kRename)
{
if (!AutoRenamePath(fullProcessedPath))
{
RINOK(SendMessageError(kCantAutoRename, fullProcessedPath));
return E_FAIL;
}
+ isRenamed = true;
}
- else if (_overwriteMode == NExtract::NOverwriteMode::kAutoRenameExisting)
+ else if (_overwriteMode == NExtract::NOverwriteMode::kRenameExisting)
{
FString existPath = fullProcessedPath;
if (!AutoRenamePath(existPath))
@@ -335,65 +1126,290 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index, ISequentialOutStre
RINOK(SendMessageError(kCantAutoRename, fullProcessedPath));
return E_FAIL;
}
- if (!NFile::NDirectory::MyMoveFile(fullProcessedPath, existPath))
+ // MyMoveFile can raname folders. So it's OK to use it for folders too
+ if (!MyMoveFile(fullProcessedPath, existPath))
{
- RINOK(SendMessageError(kCantRenameFile, fullProcessedPath));
+ RINOK(SendMessageError2(kCantRenameFile, existPath, fullProcessedPath));
return E_FAIL;
}
}
else
- if (!NFile::NDirectory::DeleteFileAlways(fullProcessedPath))
+ {
+ if (fileInfo.IsDir())
{
- RINOK(SendMessageError(kCantDeleteOutputFile, fullProcessedPath));
- return S_OK;
- // return E_FAIL;
+ // do we need to delete all files in folder?
+ if (!RemoveDir(fullProcessedPath))
+ {
+ RINOK(SendMessageError_with_LastError(kCantDeleteOutputDir, fullProcessedPath));
+ return S_OK;
+ }
}
+ else
+ {
+ bool needDelete = true;
+ if (needDelete)
+ {
+ if (!DeleteFileAlways(fullProcessedPath))
+ {
+ RINOK(SendMessageError_with_LastError(kCantDeleteOutputFile, fullProcessedPath));
+ return S_OK;
+ // return E_FAIL;
+ }
+ }
+ }
+ }
}
+ else // not Find(fullProcessedPath)
+ {
+ // we need to clear READ-ONLY of parent before creating alt stream
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ int colonPos = NName::FindAltStreamColon(fullProcessedPath);
+ if (colonPos >= 0 && fullProcessedPath[(unsigned)colonPos + 1] != 0)
+ {
+ FString parentFsPath = fullProcessedPath;
+ parentFsPath.DeleteFrom(colonPos);
+ NFind::CFileInfo parentFi;
+ if (parentFi.Find(parentFsPath))
+ {
+ if (parentFi.IsReadOnly())
+ SetFileAttrib(parentFsPath, parentFi.Attrib & ~FILE_ATTRIBUTE_READONLY);
+ }
+ }
+ #endif
+ }
+ // ----- END of code for Is file (not split) -----
+
}
+ _diskFilePath = fullProcessedPath;
+
+
if (!isAnti)
{
- _outFileStreamSpec = new COutFileStream;
- CMyComPtr<ISequentialOutStream> outStreamLoc(_outFileStreamSpec);
- if (!_outFileStreamSpec->Open(fullProcessedPath, _isSplit ? OPEN_ALWAYS: CREATE_ALWAYS))
+ #ifdef SUPPORT_LINKS
+
+ if (!linkPath.IsEmpty())
{
- // if (::GetLastError() != ERROR_FILE_EXISTS || !isSplit)
+ #ifndef UNDER_CE
+
+ UString relatPath;
+ if (isRelative)
+ relatPath = GetDirPrefixOf(_item.Path);
+ relatPath += linkPath;
+
+ if (!IsSafePath(relatPath))
{
- RINOK(SendMessageError("can not open output file ", fullProcessedPath));
- return S_OK;
+ RINOK(SendMessageError("Dangerous link path was ignored", us2fs(relatPath)));
+ }
+ else
+ {
+ FString existPath;
+ if (isHardLink /* || isCopyLink */ || !isRelative)
+ {
+ if (!NName::GetFullPath(_dirPathPrefix_Full, us2fs(relatPath), existPath))
+ {
+ RINOK(SendMessageError("Incorrect path", us2fs(relatPath)));
+ }
+ }
+ else
+ {
+ existPath = us2fs(linkPath);
+ }
+
+ if (!existPath.IsEmpty())
+ {
+ if (isHardLink /* || isCopyLink */)
+ {
+ // if (isHardLink)
+ {
+ if (!MyCreateHardLink(fullProcessedPath, existPath))
+ {
+ RINOK(SendMessageError2("Can not create hard link", fullProcessedPath, existPath));
+ // return S_OK;
+ }
+ }
+ /*
+ else
+ {
+ NFind::CFileInfo fi;
+ if (!fi.Find(existPath))
+ {
+ RINOK(SendMessageError2("Can not find the file for copying", existPath, fullProcessedPath));
+ }
+ else
+ {
+ if (_curSizeDefined && _curSize == fi.Size)
+ _CopyFile_Path = existPath;
+ else
+ {
+ RINOK(SendMessageError2("File size collision for file copying", existPath, fullProcessedPath));
+ }
+
+ // RINOK(MyCopyFile(existPath, fullProcessedPath));
+ }
+ }
+ */
+ }
+ else if (_ntOptions.SymLinks.Val)
+ {
+ // bool isSymLink = true; // = false for junction
+ if (_item.IsDir && !isRelative)
+ {
+ // if it's before Vista we use Junction Point
+ // isJunction = true;
+ // convertToAbs = true;
+ }
+
+ CByteBuffer data;
+ if (FillLinkData(data, fs2us(existPath), !isJunction))
+ {
+ CReparseAttr attr;
+ if (!attr.Parse(data, data.Size()))
+ {
+ RINOK(SendMessageError("Internal error for symbolic link file", us2fs(_item.Path)));
+ // return E_FAIL;
+ }
+ else
+ if (!NFile::NIO::SetReparseData(fullProcessedPath, _item.IsDir, data, (DWORD)data.Size()))
+ {
+ RINOK(SendMessageError_with_LastError("Can not create symbolic link", fullProcessedPath));
+ }
+ }
+ }
+ }
}
+
+ #endif
}
- if (_isSplit)
+
+ if (linkPath.IsEmpty() /* || !_CopyFile_Path.IsEmpty() */)
+ #endif // SUPPORT_LINKS
{
- RINOK(_outFileStreamSpec->Seek(_position, STREAM_SEEK_SET, NULL));
+ bool needWriteFile = true;
+
+ #ifdef SUPPORT_LINKS
+ if (!_hardLinks.IDs.IsEmpty() && !_item.IsAltStream)
+ {
+ CHardLinkNode h;
+ bool defined;
+ RINOK(Archive_Get_HardLinkNode(archive, index, h, defined));
+ if (defined)
+ {
+ {
+ int linkIndex = _hardLinks.IDs.FindInSorted2(h);
+ if (linkIndex >= 0)
+ {
+ FString &hl = _hardLinks.Links[linkIndex];
+ if (hl.IsEmpty())
+ hl = fullProcessedPath;
+ else
+ {
+ if (!MyCreateHardLink(fullProcessedPath, hl))
+ {
+ RINOK(SendMessageError2("Can not create hard link", fullProcessedPath, hl));
+ return S_OK;
+ }
+ needWriteFile = false;
+ }
+ }
+ }
+ }
+ }
+ #endif
+
+ if (needWriteFile)
+ {
+ _outFileStreamSpec = new COutFileStream;
+ CMyComPtr<ISequentialOutStream> outStreamLoc(_outFileStreamSpec);
+ if (!_outFileStreamSpec->Open(fullProcessedPath, _isSplit ? OPEN_ALWAYS: CREATE_ALWAYS))
+ {
+ // if (::GetLastError() != ERROR_FILE_EXISTS || !isSplit)
+ {
+ RINOK(SendMessageError_with_LastError("Can not open output file", fullProcessedPath));
+ return S_OK;
+ }
+ }
+
+
+ #ifdef SUPPORT_ALT_STREAMS
+ if (isRenamed && !_item.IsAltStream)
+ {
+ CIndexToPathPair pair(index, fullProcessedPath);
+ unsigned oldSize = _renamedFiles.Size();
+ unsigned insertIndex = _renamedFiles.AddToUniqueSorted(pair);
+ if (oldSize == _renamedFiles.Size())
+ _renamedFiles[insertIndex].Path = fullProcessedPath;
+ }
+ #endif
+
+ if (_isSplit)
+ {
+ RINOK(_outFileStreamSpec->Seek(_position, STREAM_SEEK_SET, NULL));
+ }
+
+ _outFileStream = outStreamLoc;
+ }
}
- _outFileStream = outStreamLoc;
- *outStream = outStreamLoc.Detach();
}
- _diskFilePath = fullProcessedPath;
+
+ outStreamLoc = _outFileStream;
}
- else
+}
+
+ #ifndef _SFX
+
+ if (_hashStream)
{
- *outStream = NULL;
+ if (askExtractMode == NArchive::NExtract::NAskMode::kExtract ||
+ askExtractMode == NArchive::NExtract::NAskMode::kTest)
+ {
+ _hashStreamSpec->SetStream(outStreamLoc);
+ outStreamLoc = _hashStream;
+ _hashStreamSpec->Init(true);
+ _hashStreamWasUsed = true;
+ }
}
- if (_crcMode)
+
+ #endif
+
+
+ if (outStreamLoc)
{
- _crcStreamSpec = new COutStreamWithCRC;
- _crcStream = _crcStreamSpec;
- CMyComPtr<ISequentialOutStream> crcStream = _crcStreamSpec;
- _crcStreamSpec->SetStream(*outStream);
- if (*outStream)
- (*outStream)->Release();
- *outStream = crcStream.Detach();
- _crcStreamSpec->Init(true);
+ /*
+ #ifdef SUPPORT_LINKS
+
+ if (!_CopyFile_Path.IsEmpty())
+ {
+ RINOK(PrepareOperation(askExtractMode));
+ RINOK(MyCopyFile(outStreamLoc));
+ return SetOperationResult(NArchive::NExtract::NOperationResult::kOK);
+ }
+
+ if (isCopyLink && _testMode)
+ return S_OK;
+
+ #endif
+ */
+
+ *outStream = outStreamLoc.Detach();
}
+
return S_OK;
+
COM_TRY_END
}
+
STDMETHODIMP CArchiveExtractCallback::PrepareOperation(Int32 askExtractMode)
{
COM_TRY_BEGIN
+
+ #ifndef _SFX
+ if (ExtractToStreamCallback)
+ return ExtractToStreamCallback->PrepareOperation7(askExtractMode);
+ #endif
+
_extractMode = false;
+
switch (askExtractMode)
{
case NArchive::NExtract::NAskMode::kExtract:
@@ -403,32 +1419,42 @@ STDMETHODIMP CArchiveExtractCallback::PrepareOperation(Int32 askExtractMode)
_extractMode = true;
break;
};
- return _extractCallback2->PrepareOperation(_filePath, _fi.IsDir,
+
+ return _extractCallback2->PrepareOperation(_item.Path, BoolToInt(_item.IsDir),
askExtractMode, _isSplit ? &_position: 0);
+
COM_TRY_END
}
-STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 operationResult)
+
+STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 opRes)
{
COM_TRY_BEGIN
- switch(operationResult)
- {
- case NArchive::NExtract::NOperationResult::kOK:
- case NArchive::NExtract::NOperationResult::kUnSupportedMethod:
- case NArchive::NExtract::NOperationResult::kCRCError:
- case NArchive::NExtract::NOperationResult::kDataError:
- break;
- default:
- _outFileStream.Release();
- return E_FAIL;
- }
- if (_crcStream)
+
+ #ifndef _SFX
+ if (ExtractToStreamCallback)
+ return ExtractToStreamCallback->SetOperationResult7(opRes, BoolToInt(_encrypted));
+ #endif
+
+ #ifndef _SFX
+
+ if (_hashStreamWasUsed)
{
- CrcSum += _crcStreamSpec->GetCRC();
- _curSize = _crcStreamSpec->GetSize();
+ _hashStreamSpec->_hash->Final(_item.IsDir,
+ #ifdef SUPPORT_ALT_STREAMS
+ _item.IsAltStream
+ #else
+ false
+ #endif
+ , _item.Path);
+ _curSize = _hashStreamSpec->GetSize();
_curSizeDefined = true;
- _crcStream.Release();
+ _hashStreamSpec->ReleaseStream();
+ _hashStreamWasUsed = false;
}
+
+ #endif
+
if (_outFileStream)
{
_outFileStreamSpec->SetTime(
@@ -440,36 +1466,92 @@ STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 operationResult)
RINOK(_outFileStreamSpec->Close());
_outFileStream.Release();
}
+
+ #ifdef _USE_SECURITY_CODE
+ if (!_stdOutMode && _extractMode && _ntOptions.NtSecurity.Val && _arc->GetRawProps)
+ {
+ const void *data;
+ UInt32 dataSize;
+ UInt32 propType;
+ _arc->GetRawProps->GetRawProp(_index, kpidNtSecure, &data, &dataSize, &propType);
+ if (dataSize != 0)
+ {
+ if (propType != NPropDataType::kRaw)
+ return E_FAIL;
+ if (CheckNtSecure((const Byte *)data, dataSize))
+ {
+ SECURITY_INFORMATION securInfo = DACL_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION;
+ if (_saclEnabled)
+ securInfo |= SACL_SECURITY_INFORMATION;
+ ::SetFileSecurityW(fs2us(_diskFilePath), securInfo, (PSECURITY_DESCRIPTOR)(void *)data);
+ }
+ }
+ }
+ #endif
+
if (!_curSizeDefined)
GetUnpackSize();
+
if (_curSizeDefined)
- UnpackSize += _curSize;
- if (_fi.IsDir)
+ {
+ #ifdef SUPPORT_ALT_STREAMS
+ if (_item.IsAltStream)
+ AltStreams_UnpackSize += _curSize;
+ else
+ #endif
+ UnpackSize += _curSize;
+ }
+
+ if (_item.IsDir)
NumFolders++;
+ #ifdef SUPPORT_ALT_STREAMS
+ else if (_item.IsAltStream)
+ NumAltStreams++;
+ #endif
else
NumFiles++;
- if (_extractMode && _fi.AttribDefined)
- NFile::NDirectory::MySetFileAttributes(_diskFilePath, _fi.Attrib);
- RINOK(_extractCallback2->SetOperationResult(operationResult, _encrypted));
+ if (!_stdOutMode && _extractMode && _fi.AttribDefined)
+ SetFileAttrib(_diskFilePath, _fi.Attrib);
+
+ RINOK(_extractCallback2->SetOperationResult(opRes, BoolToInt(_encrypted)));
+
return S_OK;
+
COM_TRY_END
}
-/*
-STDMETHODIMP CArchiveExtractCallback::GetInStream(
- const wchar_t *name, ISequentialInStream **inStream)
+STDMETHODIMP CArchiveExtractCallback::ReportExtractResult(UInt32 indexType, UInt32 index, Int32 opRes)
{
- COM_TRY_BEGIN
- CInFileStream *inFile = new CInFileStream;
- CMyComPtr<ISequentialInStream> inStreamTemp = inFile;
- if (!inFile->Open(_srcDirectoryPrefix + name))
- return ::GetLastError();
- *inStream = inStreamTemp.Detach();
+ if (_folderArchiveExtractCallback2)
+ {
+ bool isEncrypted = false;
+ wchar_t temp[16];
+ UString s2;
+ const wchar_t *s = NULL;
+
+ if (indexType == NArchive::NEventIndexType::kInArcIndex && index != (UInt32)(Int32)-1)
+ {
+ CReadArcItem item;
+ RINOK(_arc->GetItem(index, item));
+ s2 = item.Path;
+ s = s2;
+ RINOK(Archive_GetItemBoolProp(_arc->Archive, index, kpidEncrypted, isEncrypted));
+ }
+ else
+ {
+ temp[0] = '#';
+ ConvertUInt32ToString(index, temp + 1);
+ s = temp;
+ // if (indexType == NArchive::NEventIndexType::kBlockIndex) {}
+ }
+
+ return _folderArchiveExtractCallback2->ReportExtractResult(opRes, isEncrypted, s);
+ }
+
return S_OK;
- COM_TRY_END
}
-*/
+
STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password)
{
@@ -482,3 +1564,73 @@ STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password)
return _cryptoGetTextPassword->CryptoGetTextPassword(password);
COM_TRY_END
}
+
+
+struct CExtrRefSortPair
+{
+ unsigned Len;
+ unsigned Index;
+
+ int Compare(const CExtrRefSortPair &a) const;
+};
+
+#define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; }
+
+int CExtrRefSortPair::Compare(const CExtrRefSortPair &a) const
+{
+ RINOZ(-MyCompare(Len, a.Len));
+ return MyCompare(Index, a.Index);
+}
+
+static unsigned GetNumSlashes(const FChar *s)
+{
+ for (unsigned numSlashes = 0;;)
+ {
+ FChar c = *s++;
+ if (c == 0)
+ return numSlashes;
+ if (IS_PATH_SEPAR(c))
+ numSlashes++;
+ }
+}
+
+HRESULT CArchiveExtractCallback::SetDirsTimes()
+{
+ CRecordVector<CExtrRefSortPair> pairs;
+ pairs.ClearAndSetSize(_extractedFolderPaths.Size());
+ unsigned i;
+
+ for (i = 0; i < _extractedFolderPaths.Size(); i++)
+ {
+ CExtrRefSortPair &pair = pairs[i];
+ pair.Index = i;
+ pair.Len = GetNumSlashes(_extractedFolderPaths[i]);
+ }
+
+ pairs.Sort2();
+
+ for (i = 0; i < pairs.Size(); i++)
+ {
+ int pairIndex = pairs[i].Index;
+ int index = _extractedFolderIndices[pairIndex];
+
+ FILETIME CTime;
+ FILETIME ATime;
+ FILETIME MTime;
+
+ bool CTimeDefined;
+ bool ATimeDefined;
+ bool MTimeDefined;
+
+ RINOK(GetTime(index, kpidCTime, CTime, CTimeDefined));
+ RINOK(GetTime(index, kpidATime, ATime, ATimeDefined));
+ RINOK(GetTime(index, kpidMTime, MTime, MTimeDefined));
+
+ // printf("\n%S", _extractedFolderPaths[pairIndex]);
+ SetDirTime(_extractedFolderPaths[pairIndex],
+ (WriteCTime && CTimeDefined) ? &CTime : NULL,
+ (WriteATime && ATimeDefined) ? &ATime : NULL,
+ (WriteMTime && MTimeDefined) ? &MTime : (_arc->MTimeDefined ? &_arc->MTime : NULL));
+ }
+ return S_OK;
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h
index cee7c5b6180..7d4155fe2e7 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h
@@ -3,8 +3,8 @@
#ifndef __ARCHIVE_EXTRACT_CALLBACK_H
#define __ARCHIVE_EXTRACT_CALLBACK_H
-#include "Common/MyCom.h"
-#include "Common/Wildcard.h"
+#include "../../../Common/MyCom.h"
+#include "../../../Common/Wildcard.h"
#include "../../IPassword.h"
@@ -13,30 +13,167 @@
#include "../../Archive/IArchive.h"
-#include "../../Archive/Common/OutStreamWithCRC.h"
-
#include "ExtractMode.h"
#include "IFileExtractCallback.h"
#include "OpenArchive.h"
+#include "HashCalc.h"
+
+#ifndef _SFX
+
+class COutStreamWithHash:
+ public ISequentialOutStream,
+ public CMyUnknownImp
+{
+ CMyComPtr<ISequentialOutStream> _stream;
+ UInt64 _size;
+ bool _calculate;
+public:
+ IHashCalc *_hash;
+
+ MY_UNKNOWN_IMP
+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
+ void SetStream(ISequentialOutStream *stream) { _stream = stream; }
+ void ReleaseStream() { _stream.Release(); }
+ void Init(bool calculate = true)
+ {
+ InitCRC();
+ _size = 0;
+ _calculate = calculate;
+ }
+ void EnableCalc(bool calculate) { _calculate = calculate; }
+ void InitCRC() { _hash->InitForNewFile(); }
+ UInt64 GetSize() const { return _size; }
+};
+
+#endif
+
+struct CExtractNtOptions
+{
+ CBoolPair NtSecurity;
+ CBoolPair SymLinks;
+ CBoolPair HardLinks;
+ CBoolPair AltStreams;
+ bool ReplaceColonForAltStream;
+ bool WriteToAltStreamIfColon;
+
+ CExtractNtOptions():
+ ReplaceColonForAltStream(false),
+ WriteToAltStreamIfColon(false)
+ {
+ SymLinks.Val = true;
+ HardLinks.Val = true;
+ AltStreams.Val = true;
+ }
+};
+
+#ifndef _SFX
+
+class CGetProp:
+ public IGetProp,
+ public CMyUnknownImp
+{
+public:
+ const CArc *Arc;
+ UInt32 IndexInArc;
+ // UString Name; // relative path
+
+ MY_UNKNOWN_IMP1(IGetProp)
+ INTERFACE_IGetProp(;)
+};
+
+#endif
+
+#ifndef _SFX
+#ifndef UNDER_CE
+
+#define SUPPORT_LINKS
+
+#endif
+#endif
+
+
+#ifdef SUPPORT_LINKS
+
+struct CHardLinkNode
+{
+ UInt64 StreamId;
+ UInt64 INode;
+
+ int Compare(const CHardLinkNode &a) const;
+};
+
+class CHardLinks
+{
+public:
+ CRecordVector<CHardLinkNode> IDs;
+ CObjectVector<FString> Links;
+
+ void Clear()
+ {
+ IDs.Clear();
+ Links.Clear();
+ }
+
+ void PrepareLinks()
+ {
+ while (Links.Size() < IDs.Size())
+ Links.AddNew();
+ }
+};
+
+#endif
+
+#ifdef SUPPORT_ALT_STREAMS
+
+struct CIndexToPathPair
+{
+ UInt32 Index;
+ FString Path;
+
+ CIndexToPathPair(UInt32 index): Index(index) {}
+ CIndexToPathPair(UInt32 index, const FString &path): Index(index), Path(path) {}
+
+ int Compare(const CIndexToPathPair &pair) const
+ {
+ return MyCompare(Index, pair.Index);
+ }
+};
+
+#endif
+
class CArchiveExtractCallback:
public IArchiveExtractCallback,
- // public IArchiveVolumeExtractCallback,
+ public IArchiveExtractCallbackMessage,
public ICryptoGetTextPassword,
public ICompressProgressInfo,
public CMyUnknownImp
{
const CArc *_arc;
- const NWildcard::CCensorNode *_wildcardCensor;
+ CExtractNtOptions _ntOptions;
+
+ const NWildcard::CCensorNode *_wildcardCensor; // we need wildcard for single pass mode (stdin)
CMyComPtr<IFolderArchiveExtractCallback> _extractCallback2;
CMyComPtr<ICompressProgressInfo> _compressProgress;
CMyComPtr<ICryptoGetTextPassword> _cryptoGetTextPassword;
- FString _directoryPath;
+ CMyComPtr<IArchiveExtractCallbackMessage> _callbackMessage;
+ CMyComPtr<IFolderArchiveExtractCallback2> _folderArchiveExtractCallback2;
+
+ FString _dirPathPrefix;
+ FString _dirPathPrefix_Full;
NExtract::NPathMode::EEnum _pathMode;
NExtract::NOverwriteMode::EEnum _overwriteMode;
+ #ifndef _SFX
+
+ CMyComPtr<IFolderExtractToStreamCallback> ExtractToStreamCallback;
+ CGetProp *GetProp_Spec;
+ CMyComPtr<IGetProp> GetProp;
+
+ #endif
+
+ CReadArcItem _item;
FString _diskFilePath;
- UString _filePath;
UInt64 _position;
bool _isSplit;
@@ -59,8 +196,6 @@ class CArchiveExtractCallback:
bool ATimeDefined;
bool MTimeDefined;
bool AttribDefined;
-
- bool IsDir;
} _fi;
UInt32 _index;
@@ -69,25 +204,46 @@ class CArchiveExtractCallback:
COutFileStream *_outFileStreamSpec;
CMyComPtr<ISequentialOutStream> _outFileStream;
- COutStreamWithCRC *_crcStreamSpec;
- CMyComPtr<ISequentialOutStream> _crcStream;
+ #ifndef _SFX
+
+ COutStreamWithHash *_hashStreamSpec;
+ CMyComPtr<ISequentialOutStream> _hashStream;
+ bool _hashStreamWasUsed;
+
+ #endif
+ bool _removePartsForAltStreams;
UStringVector _removePathParts;
+
+ #ifndef _SFX
+ bool _use_baseParentFolder_mode;
+ UInt32 _baseParentFolder;
+ #endif
bool _stdOutMode;
bool _testMode;
- bool _crcMode;
bool _multiArchives;
CMyComPtr<ICompressProgressInfo> _localProgress;
UInt64 _packTotal;
- UInt64 _unpTotal;
+
+ UInt64 _progressTotal;
+ bool _progressTotal_Defined;
+
+ FStringVector _extractedFolderPaths;
+ CRecordVector<UInt32> _extractedFolderIndices;
+
+ #if defined(_WIN32) && !defined(UNDER_CE) && !defined(_SFX)
+ bool _saclEnabled;
+ #endif
void CreateComplexDirectory(const UStringVector &dirPathParts, FString &fullPath);
HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined);
HRESULT GetUnpackSize();
HRESULT SendMessageError(const char *message, const FString &path);
+ HRESULT SendMessageError_with_LastError(const char *message, const FString &path);
+ HRESULT SendMessageError2(const char *message, const FString &path1, const FString &path2);
public:
@@ -95,30 +251,20 @@ public:
UInt64 NumFolders;
UInt64 NumFiles;
+ UInt64 NumAltStreams;
UInt64 UnpackSize;
- UInt32 CrcSum;
+ UInt64 AltStreams_UnpackSize;
- MY_UNKNOWN_IMP2(ICryptoGetTextPassword, ICompressProgressInfo)
- // COM_INTERFACE_ENTRY(IArchiveVolumeExtractCallback)
+ MY_UNKNOWN_IMP3(IArchiveExtractCallbackMessage, ICryptoGetTextPassword, ICompressProgressInfo)
INTERFACE_IArchiveExtractCallback(;)
+ INTERFACE_IArchiveExtractCallbackMessage(;)
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
- // IArchiveVolumeExtractCallback
- // STDMETHOD(GetInStream)(const wchar_t *name, ISequentialInStream **inStream);
-
STDMETHOD(CryptoGetTextPassword)(BSTR *password);
- CArchiveExtractCallback():
- WriteCTime(true),
- WriteATime(true),
- WriteMTime(true),
- _multiArchives(false)
- {
- LocalProgressSpec = new CLocalProgress();
- _localProgress = LocalProgressSpec;
- }
+ CArchiveExtractCallback();
void InitForMulti(bool multiArchives,
NExtract::NPathMode::EEnum pathMode,
@@ -127,19 +273,66 @@ public:
_multiArchives = multiArchives;
_pathMode = pathMode;
_overwriteMode = overwriteMode;
- NumFolders = NumFiles = UnpackSize = 0;
- CrcSum = 0;
+ NumFolders = NumFiles = NumAltStreams = UnpackSize = AltStreams_UnpackSize = 0;
+ }
+
+ #ifndef _SFX
+
+ void SetHashMethods(IHashCalc *hash)
+ {
+ if (!hash)
+ return;
+ _hashStreamSpec = new COutStreamWithHash;
+ _hashStream = _hashStreamSpec;
+ _hashStreamSpec->_hash = hash;
}
+ #endif
+
void Init(
+ const CExtractNtOptions &ntOptions,
const NWildcard::CCensorNode *wildcardCensor,
const CArc *arc,
IFolderArchiveExtractCallback *extractCallback2,
- bool stdOutMode, bool testMode, bool crcMode,
+ bool stdOutMode, bool testMode,
const FString &directoryPath,
- const UStringVector &removePathParts,
+ const UStringVector &removePathParts, bool removePartsForAltStreams,
UInt64 packSize);
+
+ #ifdef SUPPORT_LINKS
+
+private:
+ CHardLinks _hardLinks;
+ UString linkPath;
+
+ // FString _CopyFile_Path;
+ // HRESULT MyCopyFile(ISequentialOutStream *outStream);
+
+public:
+ // call PrepareHardLinks() after Init()
+ HRESULT PrepareHardLinks(const CRecordVector<UInt32> *realIndices); // NULL means all items
+
+ #endif
+
+
+ #ifdef SUPPORT_ALT_STREAMS
+ CObjectVector<CIndexToPathPair> _renamedFiles;
+ #endif
+
+ // call it after Init()
+
+ #ifndef _SFX
+ void SetBaseParentFolderIndex(UInt32 indexInArc)
+ {
+ _baseParentFolder = indexInArc;
+ _use_baseParentFolder_mode = true;
+ }
+ #endif
+
+ HRESULT SetDirsTimes();
};
+bool CensorNode_CheckPath(const NWildcard::CCensorNode &node, const CReadArcItem &item);
+
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveName.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveName.cpp
index 17947dcef43..06d2ab80895 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveName.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveName.cpp
@@ -2,53 +2,77 @@
#include "StdAfx.h"
-#include "Windows/FileDir.h"
-#include "Windows/FileFind.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileName.h"
#include "ExtractingFilePath.h"
+#include "ArchiveName.h"
using namespace NWindows;
+using namespace NFile;
-static FString CreateArchiveName2(const FString &srcName, bool fromPrev, bool keepName)
+UString CreateArchiveName(const NFind::CFileInfo &fi, bool keepName)
+{
+ FString resultName = fi.Name;
+ if (!fi.IsDir() && !keepName)
+ {
+ int dotPos = resultName.ReverseFind_Dot();
+ if (dotPos > 0)
+ {
+ FString archiveName2 = resultName.Left(dotPos);
+ if (archiveName2.ReverseFind_Dot() < 0)
+ resultName = archiveName2;
+ }
+ }
+ return Get_Correct_FsFile_Name(fs2us(resultName));
+}
+
+static FString CreateArchiveName2(const FString &path, bool fromPrev, bool keepName)
{
FString resultName = FTEXT("Archive");
if (fromPrev)
{
FString dirPrefix;
- if (NFile::NDirectory::GetOnlyDirPrefix(srcName, dirPrefix))
+ if (NDir::GetOnlyDirPrefix(path, dirPrefix))
{
- if (dirPrefix.Length() > 0)
- if (dirPrefix.Back() == FCHAR_PATH_SEPARATOR)
+ if (!dirPrefix.IsEmpty() && IsPathSepar(dirPrefix.Back()))
+ {
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (NName::IsDriveRootPath_SuperAllowed(dirPrefix))
+ resultName = dirPrefix[dirPrefix.Len() - 3]; // only letter
+ else
+ #endif
{
dirPrefix.DeleteBack();
- NFile::NFind::CFileInfo fileInfo;
- if (fileInfo.Find(dirPrefix))
- resultName = fileInfo.Name;
+ NFind::CFileInfo fi;
+ if (fi.Find(dirPrefix))
+ resultName = fi.Name;
}
+ }
}
}
else
{
- NFile::NFind::CFileInfo fileInfo;
- if (!fileInfo.Find(srcName))
- // return resultName;
- return srcName;
- resultName = fileInfo.Name;
- if (!fileInfo.IsDir() && !keepName)
+ NFind::CFileInfo fi;
+ if (fi.Find(path))
{
- int dotPos = resultName.ReverseFind('.');
- if (dotPos > 0)
+ resultName = fi.Name;
+ if (!fi.IsDir() && !keepName)
{
- FString archiveName2 = resultName.Left(dotPos);
- if (archiveName2.ReverseFind(FTEXT('.')) < 0)
- resultName = archiveName2;
+ int dotPos = resultName.ReverseFind_Dot();
+ if (dotPos > 0)
+ {
+ FString name2 = resultName.Left(dotPos);
+ if (name2.ReverseFind_Dot() < 0)
+ resultName = name2;
+ }
}
}
}
return resultName;
}
-UString CreateArchiveName(const UString &srcName, bool fromPrev, bool keepName)
+UString CreateArchiveName(const UString &path, bool fromPrev, bool keepName)
{
- return GetCorrectFsPath(fs2us(CreateArchiveName2(us2fs(srcName), fromPrev, keepName)));
+ return Get_Correct_FsFile_Name(fs2us(CreateArchiveName2(us2fs(path), fromPrev, keepName)));
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveName.h b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveName.h
index 9513fb2ba8b..ec2f1e8d1d9 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveName.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveName.h
@@ -1,10 +1,13 @@
// ArchiveName.h
-#ifndef __ARCHIVENAME_H
-#define __ARCHIVENAME_H
+#ifndef __ARCHIVE_NAME_H
+#define __ARCHIVE_NAME_H
-#include "Common/MyString.h"
+#include "../../../Common/MyString.h"
-UString CreateArchiveName(const UString &srcName, bool fromPrev, bool keepName);
+#include "../../../Windows/FileFind.h"
+
+UString CreateArchiveName(const UString &path, bool fromPrev, bool keepName);
+UString CreateArchiveName(const NWindows::NFile::NFind::CFileInfo &fileInfo, bool keepName);
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp
index be20940c033..359835d3c2c 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp
@@ -2,9 +2,10 @@
#include "StdAfx.h"
-#include "Common/ComTry.h"
+#include "../../../Common/ComTry.h"
-#include "Windows/PropVariant.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/PropVariant.h"
#include "../../Common/FileStreams.h"
@@ -39,12 +40,12 @@ STDMETHODIMP COpenCallbackImp::GetProperty(PROPID propID, PROPVARIANT *value)
COM_TRY_BEGIN
NCOM::CPropVariant prop;
if (_subArchiveMode)
- switch(propID)
+ switch (propID)
{
case kpidName: prop = _subArchiveName; break;
}
else
- switch(propID)
+ switch (propID)
{
case kpidName: prop = _fileInfo.Name; break;
case kpidIsDir: prop = _fileInfo.IsDir(); break;
@@ -59,41 +60,54 @@ STDMETHODIMP COpenCallbackImp::GetProperty(PROPID propID, PROPVARIANT *value)
COM_TRY_END
}
-int COpenCallbackImp::FindName(const UString &name)
-{
- for (int i = 0; i < FileNames.Size(); i++)
- if (name.CompareNoCase(FileNames[i]) == 0)
- return i;
- return -1;
-}
-
struct CInFileStreamVol: public CInFileStream
{
- UString Name;
+ int FileNameIndex;
COpenCallbackImp *OpenCallbackImp;
CMyComPtr<IArchiveOpenCallback> OpenCallbackRef;
+
~CInFileStreamVol()
{
if (OpenCallbackRef)
- {
- int index = OpenCallbackImp->FindName(Name);
- if (index >= 0)
- OpenCallbackImp->FileNames.Delete(index);
- }
+ OpenCallbackImp->FileNames_WasUsed[FileNameIndex] = false;
}
};
+
+// from ArchiveExtractCallback.cpp
+bool IsSafePath(const UString &path);
+
STDMETHODIMP COpenCallbackImp::GetStream(const wchar_t *name, IInStream **inStream)
{
COM_TRY_BEGIN
+ *inStream = NULL;
+
if (_subArchiveMode)
return S_FALSE;
if (Callback)
{
RINOK(Callback->Open_CheckBreak());
}
- *inStream = NULL;
- FString fullPath = _folderPrefix + us2fs(name);
+
+ UString name2 = name;
+
+
+ #ifndef _SFX
+
+ #ifdef _WIN32
+ name2.Replace(L'/', WCHAR_PATH_SEPARATOR);
+ #endif
+
+ // if (!allowAbsVolPaths)
+ if (!IsSafePath(name2))
+ return S_FALSE;
+
+ #endif
+
+
+ FString fullPath;
+ if (!NFile::NName::GetFullPath(_folderPrefix, us2fs(name2), fullPath))
+ return S_FALSE;
if (!_fileInfo.Find(fullPath))
return S_FALSE;
if (_fileInfo.IsDir())
@@ -101,13 +115,20 @@ STDMETHODIMP COpenCallbackImp::GetStream(const wchar_t *name, IInStream **inStre
CInFileStreamVol *inFile = new CInFileStreamVol;
CMyComPtr<IInStream> inStreamTemp = inFile;
if (!inFile->Open(fullPath))
- return ::GetLastError();
- *inStream = inStreamTemp.Detach();
- inFile->Name = name;
+ {
+ DWORD lastError = ::GetLastError();
+ if (lastError == 0)
+ return E_FAIL;
+ return HRESULT_FROM_WIN32(lastError);
+ }
+
+ FileSizes.Add(_fileInfo.Size);
+ FileNames.Add(name2);
+ inFile->FileNameIndex = FileNames_WasUsed.Add(true);
inFile->OpenCallbackImp = this;
inFile->OpenCallbackRef = this;
- FileNames.Add(name);
- TotalSize += _fileInfo.Size;
+ // TotalSize += _fileInfo.Size;
+ *inStream = inStreamTemp.Detach();
return S_OK;
COM_TRY_END
}
@@ -125,6 +146,7 @@ STDMETHODIMP COpenCallbackImp::CryptoGetTextPassword(BSTR *password)
}
if (!Callback)
return E_NOTIMPL;
+ PasswordWasAsked = true;
return Callback->Open_CryptoGetTextPassword(password);
COM_TRY_END
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h
index afada4a6352..e9575f56123 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h
@@ -3,10 +3,9 @@
#ifndef __ARCHIVE_OPEN_CALLBACK_H
#define __ARCHIVE_OPEN_CALLBACK_H
-#include "Common/MyCom.h"
-#include "Common/MyString.h"
+#include "../../../Common/MyCom.h"
-#include "Windows/FileFind.h"
+#include "../../../Windows/FileFind.h"
#ifndef _NO_CRYPTO
#include "../../IPassword.h"
@@ -21,9 +20,9 @@
#define INTERFACE_IOpenCallbackUI_Crypto(x) \
virtual HRESULT Open_CryptoGetTextPassword(BSTR *password) x; \
- virtual HRESULT Open_GetPasswordIfAny(UString &password) x; \
- virtual bool Open_WasPasswordAsked() x; \
- virtual void Open_ClearPasswordWasAskedFlag() x; \
+ /* virtual HRESULT Open_GetPasswordIfAny(bool &passwordIsDefined, UString &password) x; */ \
+ /* virtual bool Open_WasPasswordAsked() x; */ \
+ /* virtual void Open_Clear_PasswordWasAsked_Flag() x; */ \
#endif
@@ -31,6 +30,7 @@
virtual HRESULT Open_CheckBreak() x; \
virtual HRESULT Open_SetTotal(const UInt64 *files, const UInt64 *bytes) x; \
virtual HRESULT Open_SetCompleted(const UInt64 *files, const UInt64 *bytes) x; \
+ virtual HRESULT Open_Finished() x; \
INTERFACE_IOpenCallbackUI_Crypto(x)
struct IOpenCallbackUI
@@ -48,18 +48,13 @@ class COpenCallbackImp:
public CMyUnknownImp
{
public:
+ MY_QUERYINTERFACE_BEGIN2(IArchiveOpenVolumeCallback)
+ MY_QUERYINTERFACE_ENTRY(IArchiveOpenSetSubArchiveName)
#ifndef _NO_CRYPTO
- MY_UNKNOWN_IMP3(
- IArchiveOpenVolumeCallback,
- ICryptoGetTextPassword,
- IArchiveOpenSetSubArchiveName
- )
- #else
- MY_UNKNOWN_IMP2(
- IArchiveOpenVolumeCallback,
- IArchiveOpenSetSubArchiveName
- )
+ MY_QUERYINTERFACE_ENTRY(ICryptoGetTextPassword)
#endif
+ MY_QUERYINTERFACE_END
+ MY_ADDREF_RELEASE
INTERFACE_IArchiveOpenCallback(;)
INTERFACE_IArchiveOpenVolumeCallback(;)
@@ -72,8 +67,8 @@ public:
{
_subArchiveMode = true;
_subArchiveName = name;
- TotalSize = 0;
- return S_OK;
+ // TotalSize = 0;
+ return S_OK;
}
private:
@@ -81,23 +76,37 @@ private:
NWindows::NFile::NFind::CFileInfo _fileInfo;
bool _subArchiveMode;
UString _subArchiveName;
+
public:
UStringVector FileNames;
+ CBoolVector FileNames_WasUsed;
+ CRecordVector<UInt64> FileSizes;
+
+ bool PasswordWasAsked;
+
IOpenCallbackUI *Callback;
CMyComPtr<IArchiveOpenCallback> ReOpenCallback;
- UInt64 TotalSize;
+ // UInt64 TotalSize;
- COpenCallbackImp(): Callback(NULL) {}
+ COpenCallbackImp(): Callback(NULL), _subArchiveMode(false) {}
+
void Init(const FString &folderPrefix, const FString &fileName)
{
_folderPrefix = folderPrefix;
if (!_fileInfo.Find(_folderPrefix + fileName))
- throw 1;
+ throw 20121118;
FileNames.Clear();
+ FileNames_WasUsed.Clear();
+ FileSizes.Clear();
_subArchiveMode = false;
- TotalSize = 0;
+ // TotalSize = 0;
+ PasswordWasAsked = false;
+ }
+
+ bool SetSecondFileInfo(CFSTR newName)
+ {
+ return _fileInfo.Find(newName) && !_fileInfo.IsDir();
}
- int FindName(const UString &name);
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/Bench.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/Bench.cpp
index 5adfcc20552..fb69b544414 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/Bench.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/Bench.cpp
@@ -2,6 +2,8 @@
#include "StdAfx.h"
+#include <stdio.h>
+
#ifndef _WIN32
#define USE_POSIX_TIME
#define USE_POSIX_TIME2
@@ -28,39 +30,65 @@
#include "../../../../C/7zCrc.h"
#include "../../../../C/Alloc.h"
+#include "../../../../C/CpuArch.h"
-#if !defined(_7ZIP_ST) || defined(_WIN32)
#include "../../../Windows/System.h"
-#endif
#ifndef _7ZIP_ST
#include "../../../Windows/Synchronization.h"
#include "../../../Windows/Thread.h"
#endif
+#if defined(_WIN32) || defined(UNIX_USE_WIN_FILE)
+#define USE_WIN_FILE
+#endif
+
+#ifdef USE_WIN_FILE
+#include "../../../Windows/FileIO.h"
+#endif
+
+
#include "../../../Common/IntToString.h"
#include "../../../Common/StringConvert.h"
#include "../../../Common/StringToInt.h"
#include "../../Common/MethodProps.h"
+#include "../../Common/StreamUtils.h"
#include "Bench.h"
using namespace NWindows;
-static const UInt64 kUncompressMinBlockSize =
-#ifdef UNDER_CE
-(UInt64)1 << 30;
-#else
-(UInt64)1 << 33;
-#endif
+static const UInt32 k_LZMA = 0x030101;
-static const UInt32 kCrcBlockSize =
-#ifdef UNDER_CE
-1 << 25;
-#else
-1 << 30;
-#endif
+static const UInt64 kComplexInCommands = (UInt64)1 <<
+ #ifdef UNDER_CE
+ 31;
+ #else
+ 34;
+ #endif
+
+static const UInt32 kComplexInSeconds = 4;
+
+static void SetComplexCommands(UInt32 complexInSeconds,
+ bool isSpecifiedFreq, UInt64 cpuFreq, UInt64 &complexInCommands)
+{
+ complexInCommands = kComplexInCommands;
+ const UInt64 kMinFreq = (UInt64)1000000 * 4;
+ const UInt64 kMaxFreq = (UInt64)1000000 * 20000;
+ if (cpuFreq < kMinFreq && !isSpecifiedFreq)
+ cpuFreq = kMinFreq;
+ if (cpuFreq < kMaxFreq || isSpecifiedFreq)
+ {
+ if (complexInSeconds != 0)
+ complexInCommands = complexInSeconds * cpuFreq;
+ else
+ complexInCommands = cpuFreq >> 2;
+ }
+}
+
+static const unsigned kNumHashDictBits = 17;
+static const UInt32 kFilterUnpackSize = (48 << 10);
static const unsigned kOldLzmaDictBits = 30;
@@ -83,79 +111,154 @@ public:
}
};
-class CBenchBuffer
+
+static const unsigned kBufferAlignment = 1 << 4;
+
+struct CBenchBuffer
{
-public:
size_t BufferSize;
+
+ #ifdef _WIN32
+
Byte *Buffer;
- CBenchBuffer(): Buffer(0) {}
- virtual ~CBenchBuffer() { Free(); }
- void Free()
+
+ CBenchBuffer(): BufferSize(0), Buffer(NULL) {}
+ ~CBenchBuffer() { ::MidFree(Buffer); }
+
+ void AllocAlignedMask(size_t size, size_t)
{
::MidFree(Buffer);
- Buffer = 0;
+ BufferSize = 0;
+ Buffer = (Byte *)::MidAlloc(size);
+ if (Buffer)
+ BufferSize = size;
}
- bool Alloc(size_t bufferSize)
+
+ #else
+
+ Byte *Buffer;
+ Byte *_bufBase;
+
+ CBenchBuffer(): BufferSize(0), Buffer(NULL), _bufBase(NULL){}
+ ~CBenchBuffer() { ::MidFree(_bufBase); }
+
+ void AllocAlignedMask(size_t size, size_t alignMask)
{
- if (Buffer != 0 && BufferSize == bufferSize)
+ ::MidFree(_bufBase);
+ Buffer = NULL;
+ BufferSize = 0;
+ _bufBase = (Byte *)::MidAlloc(size + alignMask);
+
+ if (_bufBase)
+ {
+ // Buffer = (Byte *)(((uintptr_t)_bufBase + alignMask) & ~(uintptr_t)alignMask);
+ Buffer = (Byte *)(((ptrdiff_t)_bufBase + alignMask) & ~(ptrdiff_t)alignMask);
+ BufferSize = size;
+ }
+ }
+
+ #endif
+
+ bool Alloc(size_t size)
+ {
+ if (Buffer && BufferSize == size)
return true;
- Free();
- Buffer = (Byte *)::MidAlloc(bufferSize);
- BufferSize = bufferSize;
- return (Buffer != 0);
+ AllocAlignedMask(size, kBufferAlignment - 1);
+ return (Buffer != NULL || size == 0);
}
};
+
class CBenchRandomGenerator: public CBenchBuffer
{
- CBaseRandomGenerator *RG;
-public:
- void Set(CBaseRandomGenerator *rg) { RG = rg; }
- UInt32 GetVal(UInt32 &res, unsigned numBits)
+ static UInt32 GetVal(UInt32 &res, unsigned numBits)
{
UInt32 val = res & (((UInt32)1 << numBits) - 1);
res >>= numBits;
return val;
}
- UInt32 GetLen(UInt32 &res)
+
+ static UInt32 GetLen(UInt32 &r)
{
- UInt32 len = GetVal(res, 2);
- return GetVal(res, 1 + len);
+ UInt32 len = GetVal(r, 2);
+ return GetVal(r, 1 + len);
}
- void Generate(unsigned dictBits)
+
+public:
+
+ void GenerateSimpleRandom(CBaseRandomGenerator *_RG_)
+ {
+ CBaseRandomGenerator rg = *_RG_;
+ const size_t bufSize = BufferSize;
+ Byte *buf = Buffer;
+ for (size_t i = 0; i < bufSize; i++)
+ buf[i] = (Byte)rg.GetRnd();
+ *_RG_ = rg;
+ }
+
+ void GenerateLz(unsigned dictBits, CBaseRandomGenerator *_RG_)
{
+ CBaseRandomGenerator rg = *_RG_;
UInt32 pos = 0;
UInt32 rep0 = 1;
- while (pos < BufferSize)
+ const size_t bufSize = BufferSize;
+ Byte *buf = Buffer;
+ unsigned posBits = 1;
+
+ while (pos < bufSize)
{
- UInt32 res = RG->GetRnd();
- res >>= 1;
- if (GetVal(res, 1) == 0 || pos < 1024)
- Buffer[pos++] = (Byte)(res & 0xFF);
+ UInt32 r = rg.GetRnd();
+ if (GetVal(r, 1) == 0 || pos < 1024)
+ buf[pos++] = (Byte)(r & 0xFF);
else
{
UInt32 len;
- len = 1 + GetLen(res);
- if (GetVal(res, 3) != 0)
+ len = 1 + GetLen(r);
+
+ if (GetVal(r, 3) != 0)
{
- len += GetLen(res);
- do
+ len += GetLen(r);
+
+ while (((UInt32)1 << posBits) < pos)
+ posBits++;
+
+ unsigned numBitsMax = dictBits;
+ if (numBitsMax > posBits)
+ numBitsMax = posBits;
+
+ const unsigned kAddBits = 6;
+ unsigned numLogBits = 5;
+ if (numBitsMax <= (1 << 4) - 1 + kAddBits)
+ numLogBits = 4;
+
+ for (;;)
{
- UInt32 ppp = GetVal(res, 5) + 6;
- res = RG->GetRnd();
- if (ppp > dictBits)
+ UInt32 ppp = GetVal(r, numLogBits) + kAddBits;
+ r = rg.GetRnd();
+ if (ppp > numBitsMax)
continue;
- rep0 = /* (1 << ppp) +*/ GetVal(res, ppp);
- res = RG->GetRnd();
+ rep0 = GetVal(r, ppp);
+ if (rep0 < pos)
+ break;
+ r = rg.GetRnd();
}
- while (rep0 >= pos);
rep0++;
}
- for (UInt32 i = 0; i < len && pos < BufferSize; i++, pos++)
- Buffer[pos] = Buffer[pos - rep0];
+ {
+ UInt32 rem = (UInt32)bufSize - pos;
+ if (len > rem)
+ len = rem;
+ }
+ Byte *dest = buf + pos;
+ const Byte *src = dest - rep0;
+ pos += len;
+ for (UInt32 i = 0; i < len; i++)
+ *dest++ = *src++;
}
}
+
+ *_RG_ = rg;
}
};
@@ -189,7 +292,7 @@ STDMETHODIMP CBenchmarkInStream::Read(void *data, UInt32 size, UInt32 *processed
for (UInt32 i = 0; i < size; i++)
((Byte *)data)[i] = Data[Pos + i];
Pos += size;
- if(processedSize != NULL)
+ if (processedSize)
*processedSize = size;
return S_OK;
}
@@ -201,13 +304,23 @@ class CBenchmarkOutStream:
{
// bool _overflow;
public:
- UInt32 Pos;
+ size_t Pos;
+ bool RealCopy;
+ bool CalcCrc;
+ UInt32 Crc;
+
// CBenchmarkOutStream(): _overflow(false) {}
- void Init()
+ void Init(bool realCopy, bool calcCrc)
{
+ Crc = CRC_INIT_VAL;
+ RealCopy = realCopy;
+ CalcCrc = calcCrc;
// _overflow = false;
Pos = 0;
}
+
+ // void Print() { printf("\n%8d %8d\n", (unsigned)BufferSize, (unsigned)Pos); }
+
MY_UNKNOWN_IMP
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
};
@@ -217,9 +330,15 @@ STDMETHODIMP CBenchmarkOutStream::Write(const void *data, UInt32 size, UInt32 *p
size_t curSize = BufferSize - Pos;
if (curSize > size)
curSize = size;
- memcpy(Buffer + Pos, data, curSize);
- Pos += (UInt32)curSize;
- if(processedSize != NULL)
+ if (curSize != 0)
+ {
+ if (RealCopy)
+ memcpy(Buffer + Pos, data, curSize);
+ if (CalcCrc)
+ Crc = CrcUpdate(Crc, data, curSize);
+ Pos += curSize;
+ }
+ if (processedSize)
*processedSize = (UInt32)curSize;
if (curSize != size)
{
@@ -234,16 +353,20 @@ class CCrcOutStream:
public CMyUnknownImp
{
public:
+ bool CalcCrc;
UInt32 Crc;
MY_UNKNOWN_IMP
+
+ CCrcOutStream(): CalcCrc(true) {};
void Init() { Crc = CRC_INIT_VAL; }
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
};
STDMETHODIMP CCrcOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
{
- Crc = CrcUpdate(Crc, data, size);
- if (processedSize != NULL)
+ if (CalcCrc)
+ Crc = CrcUpdate(Crc, data, size);
+ if (processedSize)
*processedSize = size;
return S_OK;
}
@@ -369,25 +492,16 @@ public:
}
};
-class CBenchProgressInfo:
- public ICompressProgressInfo,
- public CMyUnknownImp
+struct CBenchInfoCalc
{
-public:
- CBenchProgressStatus *Status;
CBenchInfo BenchInfo;
CUserTime UserTime;
- HRESULT Res;
- IBenchCallback *Callback;
- CBenchProgressInfo(): Callback(0) {}
void SetStartTime();
void SetFinishTime(CBenchInfo &dest);
- MY_UNKNOWN_IMP
- STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
};
-void CBenchProgressInfo::SetStartTime()
+void CBenchInfoCalc::SetStartTime()
{
BenchInfo.GlobalFreq = GetFreq();
BenchInfo.UserFreq = GetUserFreq();
@@ -396,13 +510,28 @@ void CBenchProgressInfo::SetStartTime()
UserTime.Init();
}
-void CBenchProgressInfo::SetFinishTime(CBenchInfo &dest)
+void CBenchInfoCalc::SetFinishTime(CBenchInfo &dest)
{
dest = BenchInfo;
dest.GlobalTime = ::GetTimeCount() - BenchInfo.GlobalTime;
dest.UserTime = UserTime.GetUserTime();
}
+class CBenchProgressInfo:
+ public ICompressProgressInfo,
+ public CMyUnknownImp,
+ public CBenchInfoCalc
+{
+public:
+ CBenchProgressStatus *Status;
+ HRESULT Res;
+ IBenchCallback *Callback;
+
+ CBenchProgressInfo(): Callback(0) {}
+ MY_UNKNOWN_IMP
+ STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
+};
+
STDMETHODIMP CBenchProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize)
{
HRESULT res = Status->GetResult();
@@ -414,8 +543,8 @@ STDMETHODIMP CBenchProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64
SetFinishTime(info);
if (Status->EncodeMode)
{
- info.UnpackSize = *inSize;
- info.PackSize = *outSize;
+ info.UnpackSize = BenchInfo.UnpackSize + *inSize;
+ info.PackSize = BenchInfo.PackSize + *outSize;
res = Callback->SetEncodeResult(info, false);
}
else
@@ -429,11 +558,11 @@ STDMETHODIMP CBenchProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64
return res;
}
-static const int kSubBits = 8;
+static const unsigned kSubBits = 8;
static UInt32 GetLogSize(UInt32 size)
{
- for (int i = kSubBits; i < 32; i++)
+ for (unsigned i = kSubBits; i < 32; i++)
for (UInt32 j = 0; j < (1 << kSubBits); j++)
if (size <= (((UInt32)1) << i) + (j << (i - kSubBits)))
return (i << kSubBits) + j;
@@ -488,6 +617,11 @@ static UInt64 MyMultDiv64(UInt64 value, UInt64 elapsedTime, UInt64 freq)
return value * freq / elTime;
}
+UInt64 CBenchInfo::GetSpeed(UInt64 numCommands) const
+{
+ return MyMultDiv64(numCommands, GlobalTime, GlobalFreq);
+}
+
struct CBenchProps
{
bool LzmaRatingMode;
@@ -499,19 +633,25 @@ struct CBenchProps
CBenchProps(): LzmaRatingMode(false) {}
void SetLzmaCompexity();
+ UInt64 GeComprCommands(UInt64 unpackSize)
+ {
+ return unpackSize * EncComplex;
+ }
+
UInt64 GeDecomprCommands(UInt64 packSize, UInt64 unpackSize)
{
return (packSize * DecComplexCompr + unpackSize * DecComplexUnc);
}
UInt64 GetCompressRating(UInt32 dictSize, UInt64 elapsedTime, UInt64 freq, UInt64 size);
- UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt32 numIterations);
+ UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt64 numIterations);
};
void CBenchProps::SetLzmaCompexity()
{
+ EncComplex = 1200;
DecComplexUnc = 4;
- DecComplexCompr = 200;
+ DecComplexCompr = 190;
LzmaRatingMode = true;
}
@@ -529,7 +669,7 @@ UInt64 CBenchProps::GetCompressRating(UInt32 dictSize, UInt64 elapsedTime, UInt6
return MyMultDiv64(numCommands, elapsedTime, freq);
}
-UInt64 CBenchProps::GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt32 numIterations)
+UInt64 CBenchProps::GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt64 numIterations)
{
UInt64 numCommands = (inSize * DecComplexCompr + outSize * DecComplexUnc) * numIterations;
return MyMultDiv64(numCommands, elapsedTime, freq);
@@ -542,7 +682,7 @@ UInt64 GetCompressRating(UInt32 dictSize, UInt64 elapsedTime, UInt64 freq, UInt6
return props.GetCompressRating(dictSize, elapsedTime, freq, size);
}
-UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt32 numIterations)
+UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt64 numIterations)
{
CBenchProps props;
props.SetLzmaCompexity();
@@ -557,67 +697,103 @@ struct CEncoderInfo
NWindows::CThread thread[2];
UInt32 NumDecoderSubThreads;
#endif
- CMyComPtr<ICompressCoder> encoder;
+ CMyComPtr<ICompressCoder> _encoder;
+ CMyComPtr<ICompressFilter> _encoderFilter;
CBenchProgressInfo *progressInfoSpec[2];
CMyComPtr<ICompressProgressInfo> progressInfo[2];
- UInt32 NumIterations;
+ UInt64 NumIterations;
+
#ifdef USE_ALLOCA
size_t AllocaSize;
#endif
+ Byte _key[32];
+ Byte _iv[16];
+ Byte _psw[16];
+ bool CheckCrc_Enc;
+ bool CheckCrc_Dec;
+
struct CDecoderInfo
{
CEncoderInfo *Encoder;
UInt32 DecoderIndex;
+ bool CallbackMode;
+
#ifdef USE_ALLOCA
size_t AllocaSize;
#endif
- bool CallbackMode;
};
CDecoderInfo decodersInfo[2];
- CMyComPtr<ICompressCoder> decoders[2];
+ CMyComPtr<ICompressCoder> _decoders[2];
+ CMyComPtr<ICompressFilter> _decoderFilter;
+
HRESULT Results[2];
CBenchmarkOutStream *outStreamSpec;
CMyComPtr<ISequentialOutStream> outStream;
IBenchCallback *callback;
IBenchPrintCallback *printCallback;
UInt32 crc;
- UInt32 kBufferSize;
- UInt32 compressedSize;
+ size_t kBufferSize;
+ size_t compressedSize;
+ const Byte *uncompressedDataPtr;
+
+ const Byte *fileData;
CBenchRandomGenerator rg;
+
+ CBenchBuffer rgCopy; // it must be 16-byte aligned !!!
CBenchmarkOutStream *propStreamSpec;
CMyComPtr<ISequentialOutStream> propStream;
+
+ // for decode
+ COneMethodInfo _method;
+ size_t _uncompressedDataSize;
+
HRESULT Init(
const COneMethodInfo &method,
- UInt32 uncompressedDataSize,
unsigned generateDictBits,
CBaseRandomGenerator *rg);
HRESULT Encode();
HRESULT Decode(UInt32 decoderIndex);
- CEncoderInfo(): outStreamSpec(0), callback(0), printCallback(0), propStreamSpec(0) {}
+ CEncoderInfo():
+ fileData(NULL),
+ CheckCrc_Enc(true),
+ CheckCrc_Dec(true),
+ outStreamSpec(0), callback(0), printCallback(0), propStreamSpec(0) {}
#ifndef _7ZIP_ST
+
static THREAD_FUNC_DECL EncodeThreadFunction(void *param)
{
+ HRESULT res;
CEncoderInfo *encoder = (CEncoderInfo *)param;
- #ifdef USE_ALLOCA
- alloca(encoder->AllocaSize);
- #endif
- HRESULT res = encoder->Encode();
- encoder->Results[0] = res;
+ try
+ {
+ #ifdef USE_ALLOCA
+ alloca(encoder->AllocaSize);
+ #endif
+
+ res = encoder->Encode();
+ encoder->Results[0] = res;
+ }
+ catch(...)
+ {
+ res = E_FAIL;
+ }
if (res != S_OK)
encoder->progressInfoSpec[0]->Status->SetResult(res);
-
return 0;
}
+
static THREAD_FUNC_DECL DecodeThreadFunction(void *param)
{
CDecoderInfo *decoder = (CDecoderInfo *)param;
+
#ifdef USE_ALLOCA
alloca(decoder->AllocaSize);
#endif
+
CEncoderInfo *encoder = decoder->Encoder;
encoder->Results[decoder->DecoderIndex] = encoder->Decode(decoder->DecoderIndex);
return 0;
@@ -628,7 +804,7 @@ struct CEncoderInfo
return thread[0].Create(EncodeThreadFunction, this);
}
- HRESULT CreateDecoderThread(int index, bool callbackMode
+ HRESULT CreateDecoderThread(unsigned index, bool callbackMode
#ifdef USE_ALLOCA
, size_t allocaSize
#endif
@@ -637,30 +813,57 @@ struct CEncoderInfo
CDecoderInfo &decoder = decodersInfo[index];
decoder.DecoderIndex = index;
decoder.Encoder = this;
+
#ifdef USE_ALLOCA
decoder.AllocaSize = allocaSize;
#endif
+
decoder.CallbackMode = callbackMode;
return thread[index].Create(DecodeThreadFunction, &decoder);
}
+
#endif
};
-static const UInt32 k_LZMA = 0x030101;
HRESULT CEncoderInfo::Init(
const COneMethodInfo &method,
- UInt32 uncompressedDataSize,
unsigned generateDictBits,
CBaseRandomGenerator *rgLoc)
{
- rg.Set(rgLoc);
- kBufferSize = uncompressedDataSize;
- UInt32 kCompressedBufferSize = (kBufferSize - kBufferSize / 4) + kCompressedAdditionalSize;
- if (!rg.Alloc(kBufferSize))
- return E_OUTOFMEMORY;
- rg.Generate(generateDictBits);
- crc = CrcCalc(rg.Buffer, rg.BufferSize);
+ // we need extra space, if input data is already compressed
+ const size_t kCompressedBufferSize =
+ kCompressedAdditionalSize +
+ kBufferSize + kBufferSize / 16;
+ // kBufferSize / 2;
+
+ if (kCompressedBufferSize < kBufferSize)
+ return E_FAIL;
+
+ uncompressedDataPtr = fileData;
+
+ if (!fileData)
+ {
+ if (!rg.Alloc(kBufferSize))
+ return E_OUTOFMEMORY;
+
+ // DWORD ttt = GetTickCount();
+ if (generateDictBits == 0)
+ rg.GenerateSimpleRandom(rgLoc);
+ else
+ rg.GenerateLz(generateDictBits, rgLoc);
+ // printf("\n%d\n ", GetTickCount() - ttt);
+
+ crc = CrcCalc(rg.Buffer, rg.BufferSize);
+ uncompressedDataPtr = rg.Buffer;
+ }
+
+ if (_encoderFilter)
+ {
+ if (!rgCopy.Alloc(kBufferSize))
+ return E_OUTOFMEMORY;
+ }
+
outStreamSpec = new CBenchmarkOutStream;
if (!outStreamSpec->Alloc(kCompressedBufferSize))
@@ -676,54 +879,174 @@ HRESULT CEncoderInfo::Init(
}
if (!propStreamSpec->Alloc(kMaxLzmaPropSize))
return E_OUTOFMEMORY;
- propStreamSpec->Init();
+ propStreamSpec->Init(true, false);
+ CMyComPtr<IUnknown> coder;
+ if (_encoderFilter)
+ coder = _encoderFilter;
+ else
+ coder = _encoder;
{
CMyComPtr<ICompressSetCoderProperties> scp;
- encoder.QueryInterface(IID_ICompressSetCoderProperties, &scp);
+ coder.QueryInterface(IID_ICompressSetCoderProperties, &scp);
if (scp)
{
- UInt64 reduceSize = uncompressedDataSize;
+ UInt64 reduceSize = kBufferSize;
RINOK(method.SetCoderProps(scp, &reduceSize));
}
else
{
if (method.AreThereNonOptionalProps())
- return E_FAIL;
+ return E_INVALIDARG;
}
CMyComPtr<ICompressWriteCoderProperties> writeCoderProps;
- encoder.QueryInterface(IID_ICompressWriteCoderProperties, &writeCoderProps);
+ coder.QueryInterface(IID_ICompressWriteCoderProperties, &writeCoderProps);
if (writeCoderProps)
{
RINOK(writeCoderProps->WriteCoderProperties(propStream));
}
+
+ {
+ CMyComPtr<ICryptoSetPassword> sp;
+ coder.QueryInterface(IID_ICryptoSetPassword, &sp);
+ if (sp)
+ {
+ RINOK(sp->CryptoSetPassword(_psw, sizeof(_psw)));
+
+ // we must call encoding one time to calculate password key for key cache.
+ // it must be after WriteCoderProperties!
+ CBenchmarkInStream *inStreamSpec = new CBenchmarkInStream;
+ CMyComPtr<ISequentialInStream> inStream = inStreamSpec;
+ Byte temp[16];
+ memset(temp, 0, sizeof(temp));
+ inStreamSpec->Init(temp, sizeof(temp));
+
+ CCrcOutStream *outStreamSpec = new CCrcOutStream;
+ CMyComPtr<ISequentialOutStream> outStream = outStreamSpec;
+ outStreamSpec->Init();
+
+ if (_encoderFilter)
+ {
+ _encoderFilter->Init();
+ _encoderFilter->Filter(temp, sizeof(temp));
+ }
+ else
+ {
+ RINOK(_encoder->Code(inStream, outStream, 0, 0, NULL));
+ }
+ }
+ }
}
+
return S_OK;
}
+
+static void My_FilterBench(ICompressFilter *filter, Byte *data, size_t size)
+{
+ while (size != 0)
+ {
+ UInt32 cur = (UInt32)1 << 31;
+ if (cur > size)
+ cur = (UInt32)size;
+ UInt32 processed = filter->Filter(data, cur);
+ data += processed;
+ // if (processed > size) (in AES filter), we must fill last block with zeros.
+ // but it is not important for benchmark. So we just copy that data without filtering.
+ if (processed > size || processed == 0)
+ break;
+ size -= processed;
+ }
+}
+
+
HRESULT CEncoderInfo::Encode()
{
+ CBenchInfo &bi = progressInfoSpec[0]->BenchInfo;
+ bi.UnpackSize = 0;
+ bi.PackSize = 0;
+ CMyComPtr<ICryptoProperties> cp;
+ CMyComPtr<IUnknown> coder;
+ if (_encoderFilter)
+ coder = _encoderFilter;
+ else
+ coder = _encoder;
+ coder.QueryInterface(IID_ICryptoProperties, &cp);
CBenchmarkInStream *inStreamSpec = new CBenchmarkInStream;
CMyComPtr<ISequentialInStream> inStream = inStreamSpec;
- inStreamSpec->Init(rg.Buffer, rg.BufferSize);
- outStreamSpec->Init();
+ UInt64 prev = 0;
- RINOK(encoder->Code(inStream, outStream, 0, 0, progressInfo[0]));
- compressedSize = outStreamSpec->Pos;
- encoder.Release();
+ UInt32 crcPrev = 0;
+
+ if (cp)
+ {
+ RINOK(cp->SetKey(_key, sizeof(_key)));
+ RINOK(cp->SetInitVector(_iv, sizeof(_iv)));
+ }
+
+ for (UInt64 i = 0; i < NumIterations; i++)
+ {
+ if (printCallback && bi.UnpackSize - prev > (1 << 20))
+ {
+ RINOK(printCallback->CheckBreak());
+ prev = bi.UnpackSize;
+ }
+
+ bool isLast = (i == NumIterations - 1);
+ bool calcCrc = ((isLast || (i & 0x7F) == 0 || CheckCrc_Enc) && NumIterations != 1);
+ outStreamSpec->Init(isLast, calcCrc);
+
+ if (_encoderFilter)
+ {
+ memcpy(rgCopy.Buffer, uncompressedDataPtr, kBufferSize);
+ _encoderFilter->Init();
+ My_FilterBench(_encoderFilter, rgCopy.Buffer, kBufferSize);
+ RINOK(WriteStream(outStream, rgCopy.Buffer, kBufferSize));
+ }
+ else
+ {
+ inStreamSpec->Init(uncompressedDataPtr, kBufferSize);
+ RINOK(_encoder->Code(inStream, outStream, NULL, NULL, progressInfo[0]));
+ }
+
+ // outStreamSpec->Print();
+
+ UInt32 crcNew = CRC_GET_DIGEST(outStreamSpec->Crc);
+ if (i == 0)
+ crcPrev = crcNew;
+ else if (calcCrc && crcPrev != crcNew)
+ return E_FAIL;
+
+ compressedSize = outStreamSpec->Pos;
+ bi.UnpackSize += kBufferSize;
+ bi.PackSize += compressedSize;
+ }
+
+ _encoder.Release();
+ _encoderFilter.Release();
return S_OK;
}
+
HRESULT CEncoderInfo::Decode(UInt32 decoderIndex)
{
CBenchmarkInStream *inStreamSpec = new CBenchmarkInStream;
CMyComPtr<ISequentialInStream> inStream = inStreamSpec;
- CMyComPtr<ICompressCoder> &decoder = decoders[decoderIndex];
+ CMyComPtr<ICompressCoder> &decoder = _decoders[decoderIndex];
+ CMyComPtr<IUnknown> coder;
+ if (_decoderFilter)
+ {
+ if (decoderIndex != 0)
+ return E_FAIL;
+ coder = _decoderFilter;
+ }
+ else
+ coder = decoder;
CMyComPtr<ICompressSetDecoderProperties2> setDecProps;
- decoder.QueryInterface(IID_ICompressSetDecoderProperties2, &setDecProps);
+ coder.QueryInterface(IID_ICompressSetDecoderProperties2, &setDecProps);
if (!setDecProps && propStreamSpec->Pos != 0)
return E_FAIL;
@@ -737,7 +1060,7 @@ HRESULT CEncoderInfo::Decode(UInt32 decoderIndex)
#ifndef _7ZIP_ST
{
CMyComPtr<ICompressSetCoderMt> setCoderMt;
- decoder.QueryInterface(IID_ICompressSetCoderMt, &setCoderMt);
+ coder.QueryInterface(IID_ICompressSetCoderMt, &setCoderMt);
if (setCoderMt)
{
RINOK(setCoderMt->SetNumberOfThreads(NumDecoderSubThreads));
@@ -745,30 +1068,79 @@ HRESULT CEncoderInfo::Decode(UInt32 decoderIndex)
}
#endif
- for (UInt32 j = 0; j < NumIterations; j++)
+ CMyComPtr<ICompressSetCoderProperties> scp;
+ coder.QueryInterface(IID_ICompressSetCoderProperties, &scp);
+ if (scp)
{
- if (printCallback)
+ UInt64 reduceSize = _uncompressedDataSize;
+ RINOK(_method.SetCoderProps(scp, &reduceSize));
+ }
+
+ CMyComPtr<ICryptoProperties> cp;
+ coder.QueryInterface(IID_ICryptoProperties, &cp);
+
+ if (setDecProps)
+ {
+ RINOK(setDecProps->SetDecoderProperties2(propStreamSpec->Buffer, (UInt32)propStreamSpec->Pos));
+ }
+
+ {
+ CMyComPtr<ICryptoSetPassword> sp;
+ coder.QueryInterface(IID_ICryptoSetPassword, &sp);
+ if (sp)
+ {
+ RINOK(sp->CryptoSetPassword(_psw, sizeof(_psw)));
+ }
+ }
+
+ UInt64 prev = 0;
+
+ if (cp)
+ {
+ RINOK(cp->SetKey(_key, sizeof(_key)));
+ RINOK(cp->SetInitVector(_iv, sizeof(_iv)));
+ }
+
+ for (UInt64 i = 0; i < NumIterations; i++)
+ {
+ if (printCallback && pi->BenchInfo.UnpackSize - prev > (1 << 20))
{
RINOK(printCallback->CheckBreak());
+ prev = pi->BenchInfo.UnpackSize;
}
+
inStreamSpec->Init(outStreamSpec->Buffer, compressedSize);
crcOutStreamSpec->Init();
- if (setDecProps)
+ UInt64 outSize = kBufferSize;
+ crcOutStreamSpec->CalcCrc = ((i & 0x7F) == 0 || CheckCrc_Dec);
+
+ if (_decoderFilter)
{
- RINOK(setDecProps->SetDecoderProperties2(propStreamSpec->Buffer, propStreamSpec->Pos));
+ if (compressedSize > rgCopy.BufferSize)
+ return E_FAIL;
+ memcpy(rgCopy.Buffer, outStreamSpec->Buffer, compressedSize);
+ _decoderFilter->Init();
+ My_FilterBench(_decoderFilter, rgCopy.Buffer, compressedSize);
+ RINOK(WriteStream(crcOutStream, rgCopy.Buffer, compressedSize));
}
- UInt64 outSize = kBufferSize;
- RINOK(decoder->Code(inStream, crcOutStream, 0, &outSize, progressInfo[decoderIndex]));
- if (CRC_GET_DIGEST(crcOutStreamSpec->Crc) != crc)
+ else
+ {
+ RINOK(decoder->Code(inStream, crcOutStream, 0, &outSize, progressInfo[decoderIndex]));
+ }
+
+ if (crcOutStreamSpec->CalcCrc && CRC_GET_DIGEST(crcOutStreamSpec->Crc) != crc)
return S_FALSE;
pi->BenchInfo.UnpackSize += kBufferSize;
pi->BenchInfo.PackSize += compressedSize;
}
+
decoder.Release();
+ _decoderFilter.Release();
return S_OK;
}
+
static const UInt32 kNumThreadsMax = (1 << 12);
struct CBenchEncoders
@@ -778,25 +1150,46 @@ struct CBenchEncoders
~CBenchEncoders() { delete []encoders; }
};
+
+static UInt64 GetNumIterations(UInt64 numCommands, UInt64 complexInCommands)
+{
+ if (numCommands < (1 << 4))
+ numCommands = (1 << 4);
+ UInt64 res = complexInCommands / numCommands;
+ return (res == 0 ? 1 : res);
+}
+
+
static HRESULT MethodBench(
DECL_EXTERNAL_CODECS_LOC_VARS
- bool oldLzmaBenchMode,
- UInt32 numThreads,
+ UInt64 complexInCommands,
+ bool
+ #ifndef _7ZIP_ST
+ oldLzmaBenchMode
+ #endif
+ ,
+ UInt32
+ #ifndef _7ZIP_ST
+ numThreads
+ #endif
+ ,
const COneMethodInfo &method2,
- UInt32 uncompressedDataSize,
+ size_t uncompressedDataSize,
+ const Byte *fileData,
unsigned generateDictBits,
+
IBenchPrintCallback *printCallback,
IBenchCallback *callback,
CBenchProps *benchProps)
{
COneMethodInfo method = method2;
UInt64 methodId;
- UInt32 numInStreams, numOutStreams;
+ UInt32 numStreams;
if (!FindMethod(
EXTERNAL_CODECS_LOC_VARS
- method.MethodName, methodId, numInStreams, numOutStreams))
+ method.MethodName, methodId, numStreams))
return E_NOTIMPL;
- if (numInStreams != 1 || numOutStreams != 1)
+ if (numStreams != 1)
return E_INVALIDARG;
UInt32 numEncoderThreads = 1;
@@ -810,7 +1203,7 @@ static HRESULT MethodBench(
bool fixedNumber;
UInt32 numLzmaThreads = method.Get_Lzma_NumThreads(fixedNumber);
if (!fixedNumber && numThreads == 1)
- method.AddNumThreadsProp(1);
+ method.AddProp_NumThreads(1);
if (numThreads > 1 && numLzmaThreads > 1)
{
numEncoderThreads = numThreads / 2;
@@ -819,35 +1212,60 @@ static HRESULT MethodBench(
}
#endif
- if (numThreads < 1 || numEncoderThreads > kNumThreadsMax)
- return E_INVALIDARG;
-
CBenchEncoders encodersSpec(numEncoderThreads);
CEncoderInfo *encoders = encodersSpec.encoders;
UInt32 i;
+
for (i = 0; i < numEncoderThreads; i++)
{
CEncoderInfo &encoder = encoders[i];
encoder.callback = (i == 0) ? callback : 0;
encoder.printCallback = printCallback;
- RINOK(CreateCoder(EXTERNAL_CODECS_LOC_VARS methodId, encoder.encoder, true));
- if (!encoder.encoder)
- return E_NOTIMPL;
+ {
+ CCreatedCoder cod;
+ RINOK(CreateCoder(EXTERNAL_CODECS_LOC_VARS methodId, true, encoder._encoderFilter, cod));
+ encoder._encoder = cod.Coder;
+ if (!encoder._encoder && !encoder._encoderFilter)
+ return E_NOTIMPL;
+ }
+
+ encoder.CheckCrc_Enc = (benchProps->EncComplex) > 30 ;
+ encoder.CheckCrc_Dec = (benchProps->DecComplexCompr + benchProps->DecComplexUnc) > 30 ;
+
+ memset(encoder._iv, 0, sizeof(encoder._iv));
+ memset(encoder._key, 0, sizeof(encoder._key));
+ memset(encoder._psw, 0, sizeof(encoder._psw));
+
for (UInt32 j = 0; j < numSubDecoderThreads; j++)
{
- RINOK(CreateCoder(EXTERNAL_CODECS_LOC_VARS methodId, encoder.decoders[j], false));
- if (!encoder.decoders[j])
+ CCreatedCoder cod;
+ CMyComPtr<ICompressCoder> &decoder = encoder._decoders[j];
+ RINOK(CreateCoder(EXTERNAL_CODECS_LOC_VARS methodId, false, encoder._decoderFilter, cod));
+ decoder = cod.Coder;
+ if (!encoder._decoderFilter && !decoder)
return E_NOTIMPL;
}
}
CBaseRandomGenerator rg;
rg.Init();
+
+ UInt32 crc = 0;
+ if (fileData)
+ crc = CrcCalc(fileData, uncompressedDataSize);
+
for (i = 0; i < numEncoderThreads; i++)
{
- RINOK(encoders[i].Init(method, uncompressedDataSize, generateDictBits, &rg));
+ CEncoderInfo &encoder = encoders[i];
+ encoder._method = method;
+ encoder._uncompressedDataSize = uncompressedDataSize;
+ encoder.kBufferSize = uncompressedDataSize;
+ encoder.fileData = fileData;
+ encoder.crc = crc;
+
+ RINOK(encoders[i].Init(method, generateDictBits, &rg));
}
CBenchProgressStatus status;
@@ -857,11 +1275,16 @@ static HRESULT MethodBench(
for (i = 0; i < numEncoderThreads; i++)
{
CEncoderInfo &encoder = encoders[i];
+ encoder.NumIterations = GetNumIterations(benchProps->GeComprCommands(uncompressedDataSize), complexInCommands);
+
for (int j = 0; j < 2; j++)
{
- encoder.progressInfo[j] = encoder.progressInfoSpec[j] = new CBenchProgressInfo;
- encoder.progressInfoSpec[j]->Status = &status;
+ CBenchProgressInfo *spec = new CBenchProgressInfo;
+ encoder.progressInfoSpec[j] = spec;
+ encoder.progressInfo[j] = spec;
+ spec->Status = &status;
}
+
if (i == 0)
{
CBenchProgressInfo *bpi = encoder.progressInfoSpec[0];
@@ -876,6 +1299,7 @@ static HRESULT MethodBench(
#ifdef USE_ALLOCA
encoder.AllocaSize = (i * 16 * 21) & 0x7FF;
#endif
+
RINOK(encoder.CreateEncoderThread())
}
else
@@ -884,6 +1308,7 @@ static HRESULT MethodBench(
RINOK(encoder.Encode());
}
}
+
#ifndef _7ZIP_ST
if (numEncoderThreads > 1)
for (i = 0; i < numEncoderThreads; i++)
@@ -897,13 +1322,15 @@ static HRESULT MethodBench(
encoders[0].progressInfoSpec[0]->SetFinishTime(info);
info.UnpackSize = 0;
info.PackSize = 0;
- info.NumIterations = 1; // progressInfoSpec->NumIterations;
+ info.NumIterations = encoders[0].NumIterations;
+
for (i = 0; i < numEncoderThreads; i++)
{
CEncoderInfo &encoder = encoders[i];
info.UnpackSize += encoder.kBufferSize;
info.PackSize += encoder.compressedSize;
}
+
RINOK(callback->SetEncodeResult(info, true));
@@ -911,14 +1338,14 @@ static HRESULT MethodBench(
status.EncodeMode = false;
UInt32 numDecoderThreads = numEncoderThreads * numSubDecoderThreads;
+
for (i = 0; i < numEncoderThreads; i++)
{
CEncoderInfo &encoder = encoders[i];
if (i == 0)
{
- encoder.NumIterations = (UInt32)(1 + kUncompressMinBlockSize /
- benchProps->GeDecomprCommands(encoder.compressedSize, encoder.kBufferSize));
+ encoder.NumIterations = GetNumIterations(benchProps->GeDecomprCommands(encoder.compressedSize, encoder.kBufferSize), complexInCommands);
CBenchProgressInfo *bpi = encoder.progressInfoSpec[0];
bpi->Callback = callback;
bpi->BenchInfo.NumIterations = numDecoderThreads;
@@ -950,6 +1377,7 @@ static HRESULT MethodBench(
RINOK(encoder.Decode(0));
}
}
+
#ifndef _7ZIP_ST
HRESULT res = S_OK;
if (numDecoderThreads > 1)
@@ -963,8 +1391,10 @@ static HRESULT MethodBench(
}
RINOK(res);
#endif
+
RINOK(status.Res);
encoders[0].progressInfoSpec[0]->SetFinishTime(info);
+
#ifndef _7ZIP_ST
#ifdef UNDER_CE
if (numDecoderThreads > 1)
@@ -977,22 +1407,26 @@ static HRESULT MethodBench(
}
#endif
#endif
+
info.UnpackSize = 0;
info.PackSize = 0;
info.NumIterations = numSubDecoderThreads * encoders[0].NumIterations;
+
for (i = 0; i < numEncoderThreads; i++)
{
CEncoderInfo &encoder = encoders[i];
info.UnpackSize += encoder.kBufferSize;
info.PackSize += encoder.compressedSize;
}
+
RINOK(callback->SetDecodeResult(info, false));
RINOK(callback->SetDecodeResult(info, true));
+
return S_OK;
}
-inline UInt64 GetLZMAUsage(bool multiThread, UInt32 dictionary)
+static inline UInt64 GetLZMAUsage(bool multiThread, UInt32 dictionary)
{
UInt32 hs = dictionary - 1;
hs |= (hs >> 1);
@@ -1008,33 +1442,142 @@ inline UInt64 GetLZMAUsage(bool multiThread, UInt32 dictionary)
(1 << 20) + (multiThread ? (6 << 20) : 0);
}
-UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary)
+UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary, bool totalBench)
{
const UInt32 kBufferSize = dictionary;
- const UInt32 kCompressedBufferSize = (kBufferSize / 2);
- UInt32 numSubThreads = (numThreads > 1) ? 2 : 1;
- UInt32 numBigThreads = numThreads / numSubThreads;
- return (kBufferSize + kCompressedBufferSize +
- GetLZMAUsage((numThreads > 1), dictionary) + (2 << 20)) * numBigThreads;
+ const UInt32 kCompressedBufferSize = kBufferSize; // / 2;
+ bool lzmaMt = (totalBench || numThreads > 1);
+ UInt32 numBigThreads = numThreads;
+ if (!totalBench && lzmaMt)
+ numBigThreads /= 2;
+ return ((UInt64)kBufferSize + kCompressedBufferSize +
+ GetLZMAUsage(lzmaMt, dictionary) + (2 << 20)) * numBigThreads;
}
-static bool CrcBig(const void *data, UInt32 size, UInt32 numCycles, UInt32 crcBase)
+static HRESULT CrcBig(const void *data, UInt32 size, UInt64 numIterations,
+ const UInt32 *checkSum, IHasher *hf,
+ IBenchPrintCallback *callback)
{
- for (UInt32 i = 0; i < numCycles; i++)
- if (CrcCalc(data, size) != crcBase)
- return false;
- return true;
+ Byte hash[64];
+ UInt64 i;
+ for (i = 0; i < sizeof(hash); i++)
+ hash[i] = 0;
+ for (i = 0; i < numIterations; i++)
+ {
+ if (callback && (i & 0xFF) == 0)
+ {
+ RINOK(callback->CheckBreak());
+ }
+ hf->Init();
+ hf->Update(data, size);
+ hf->Final(hash);
+ UInt32 hashSize = hf->GetDigestSize();
+ if (hashSize > sizeof(hash))
+ return S_FALSE;
+ UInt32 sum = 0;
+ for (UInt32 j = 0; j < hashSize; j += 4)
+ sum ^= GetUi32(hash + j);
+ if (checkSum && sum != *checkSum)
+ {
+ return S_FALSE;
+ }
+ }
+ return S_OK;
+}
+
+UInt32 g_BenchCpuFreqTemp = 1;
+
+#define YY1 sum += val; sum ^= val;
+#define YY3 YY1 YY1 YY1 YY1
+#define YY5 YY3 YY3 YY3 YY3
+#define YY7 YY5 YY5 YY5 YY5
+static const UInt32 kNumFreqCommands = 128;
+
+EXTERN_C_BEGIN
+
+static UInt32 CountCpuFreq(UInt32 sum, UInt32 num, UInt32 val)
+{
+ for (UInt32 i = 0; i < num; i++)
+ {
+ YY7
+ }
+ return sum;
}
+EXTERN_C_END
+
+
#ifndef _7ZIP_ST
+
+struct CFreqInfo
+{
+ NWindows::CThread Thread;
+ IBenchPrintCallback *Callback;
+ HRESULT CallbackRes;
+ UInt32 ValRes;
+ UInt32 Size;
+ UInt64 NumIterations;
+
+ void Wait()
+ {
+ Thread.Wait();
+ Thread.Close();
+ }
+};
+
+static THREAD_FUNC_DECL FreqThreadFunction(void *param)
+{
+ CFreqInfo *p = (CFreqInfo *)param;
+
+ UInt32 sum = g_BenchCpuFreqTemp;
+ for (UInt64 k = p->NumIterations; k > 0; k--)
+ {
+ p->CallbackRes = p->Callback->CheckBreak();
+ if (p->CallbackRes != S_OK)
+ return 0;
+ sum = CountCpuFreq(sum, p->Size, g_BenchCpuFreqTemp);
+ }
+ p->ValRes = sum;
+ return 0;
+}
+
+struct CFreqThreads
+{
+ CFreqInfo *Items;
+ UInt32 NumThreads;
+
+ CFreqThreads(): Items(0), NumThreads(0) {}
+ void WaitAll()
+ {
+ for (UInt32 i = 0; i < NumThreads; i++)
+ Items[i].Wait();
+ NumThreads = 0;
+ }
+ ~CFreqThreads()
+ {
+ WaitAll();
+ delete []Items;
+ }
+};
+
struct CCrcInfo
{
NWindows::CThread Thread;
+ IBenchPrintCallback *Callback;
+ HRESULT CallbackRes;
+
const Byte *Data;
UInt32 Size;
- UInt32 NumCycles;
- UInt32 Crc;
- bool Res;
+ UInt64 NumIterations;
+ bool CheckSumDefined;
+ UInt32 CheckSum;
+ CMyComPtr<IHasher> Hasher;
+ HRESULT Res;
+
+ #ifdef USE_ALLOCA
+ size_t AllocaSize;
+ #endif
+
void Wait()
{
Thread.Wait();
@@ -1045,14 +1588,22 @@ struct CCrcInfo
static THREAD_FUNC_DECL CrcThreadFunction(void *param)
{
CCrcInfo *p = (CCrcInfo *)param;
- p->Res = CrcBig(p->Data, p->Size, p->NumCycles, p->Crc);
+
+ #ifdef USE_ALLOCA
+ alloca(p->AllocaSize);
+ #endif
+
+ p->Res = CrcBig(p->Data, p->Size, p->NumIterations,
+ p->CheckSumDefined ? &p->CheckSum : NULL, p->Hasher,
+ p->Callback);
return 0;
}
struct CCrcThreads
{
- UInt32 NumThreads;
CCrcInfo *Items;
+ UInt32 NumThreads;
+
CCrcThreads(): Items(0), NumThreads(0) {}
void WaitAll()
{
@@ -1066,6 +1617,7 @@ struct CCrcThreads
delete []Items;
}
};
+
#endif
static UInt32 CrcCalc1(const Byte *buf, UInt32 size)
@@ -1112,127 +1664,89 @@ bool CrcInternalTest()
return true;
}
-static HRESULT CrcBench(UInt32 numThreads, UInt32 bufferSize, UInt64 &speed)
+struct CBenchMethod
{
- if (numThreads == 0)
- numThreads = 1;
+ unsigned Weight;
+ unsigned DictBits;
+ UInt32 EncComplex;
+ UInt32 DecComplexCompr;
+ UInt32 DecComplexUnc;
+ const char *Name;
+};
- CBenchBuffer buffer;
- size_t totalSize = (size_t)bufferSize * numThreads;
- if (totalSize / numThreads != bufferSize)
- return E_OUTOFMEMORY;
- if (!buffer.Alloc(totalSize))
- return E_OUTOFMEMORY;
+static const CBenchMethod g_Bench[] =
+{
+ { 40, 17, 357, 145, 20, "LZMA:x1" },
+ { 80, 24, 1220, 145, 20, "LZMA:x5:mt1" },
+ { 80, 24, 1220, 145, 20, "LZMA:x5:mt2" },
- Byte *buf = buffer.Buffer;
- CBaseRandomGenerator RG;
- UInt32 numCycles = (kCrcBlockSize) / ((bufferSize >> 2) + 1) + 1;
+ { 10, 16, 124, 40, 14, "Deflate:x1" },
+ { 20, 16, 376, 40, 14, "Deflate:x5" },
+ { 10, 16, 1082, 40, 14, "Deflate:x7" },
+ { 10, 17, 422, 40, 14, "Deflate64:x5" },
- UInt64 timeVal;
- #ifndef _7ZIP_ST
- CCrcThreads threads;
- if (numThreads > 1)
- {
- threads.Items = new CCrcInfo[numThreads];
- UInt32 i;
- for (i = 0; i < numThreads; i++)
- {
- CCrcInfo &info = threads.Items[i];
- Byte *data = buf + (size_t)bufferSize * i;
- info.Data = data;
- info.NumCycles = numCycles;
- info.Size = bufferSize;
- info.Crc = RandGenCrc(data, bufferSize, RG);
- }
- timeVal = GetTimeCount();
- for (i = 0; i < numThreads; i++)
- {
- CCrcInfo &info = threads.Items[i];
- RINOK(info.Thread.Create(CrcThreadFunction, &info));
- threads.NumThreads++;
- }
- threads.WaitAll();
- for (i = 0; i < numThreads; i++)
- if (!threads.Items[i].Res)
- return S_FALSE;
- }
- else
- #endif
- {
- UInt32 crc = RandGenCrc(buf, bufferSize, RG);
- timeVal = GetTimeCount();
- if (!CrcBig(buf, bufferSize, numCycles, crc))
- return S_FALSE;
- }
- timeVal = GetTimeCount() - timeVal;
- if (timeVal == 0)
- timeVal = 1;
+ { 10, 15, 590, 69, 69, "BZip2:x1" },
+ { 20, 19, 815, 122, 122, "BZip2:x5" },
+ { 10, 19, 815, 122, 122, "BZip2:x5:mt2" },
+ { 10, 19, 2530, 122, 122, "BZip2:x7" },
- UInt64 size = (UInt64)numCycles * totalSize;
- speed = MyMultDiv64(size, timeVal, GetFreq());
- return S_OK;
-}
+ { 10, 18, 1010, 0, 1150, "PPMD:x1" },
+ { 10, 22, 1655, 0, 1830, "PPMD:x5" },
-struct CBenchMethod
+ { 2, 0, 6, 0, 6, "Delta:4" },
+ { 2, 0, 4, 0, 4, "BCJ" },
+
+ { 10, 0, 24, 0, 24, "AES256CBC:1" },
+ { 2, 0, 8, 0, 2, "AES256CBC:2" }
+};
+
+struct CBenchHash
{
- unsigned dictBits;
- UInt32 EncComplex;
- UInt32 DecComplexCompr;
- UInt32 DecComplexUnc;
+ unsigned Weight;
+ UInt32 Complex;
+ UInt32 CheckSum;
const char *Name;
};
-static const CBenchMethod g_Bench[] =
+static const CBenchHash g_Hash[] =
{
- { 17, 340, 155, 20, "LZMA:x1" },
- { 24, 1182, 155, 20, "LZMA:x5:mt1" },
- { 24, 1182, 155, 20, "LZMA:x5:mt2" },
- { 16, 124, 47, 14, "Deflate:x1" },
- { 16, 376, 47, 14, "Deflate:x5" },
- { 16, 1084, 47, 14, "Deflate:x7" },
- { 17, 420, 47, 14, "Deflate64:x5" },
- { 15, 590, 69, 70, "BZip2:x1" },
- { 19, 792, 119, 119, "BZip2:x5" },
- #ifndef UNDER_CE
- { 19, 792, 119, 119, "BZip2:x5:mt2" },
- #endif
- { 19, 2500, 118, 118, "BZip2:x7" },
- { 18, 1010, 0, 1155, "PPMD:x1" },
- { 22, 1650, 0, 1830, "PPMD:x5" }
+ { 1, 1820, 0x8F8FEDAB, "CRC32:1" },
+ { 10, 558, 0x8F8FEDAB, "CRC32:4" },
+ { 10, 339, 0x8F8FEDAB, "CRC32:8" },
+ { 10, 512, 0xDF1C17CC, "CRC64" },
+ { 10, 5100, 0x2D79FF2E, "SHA256" },
+ { 10, 2340, 0x4C25132B, "SHA1" },
+ { 2, 5500, 0xE084E913, "BLAKE2sp" }
};
struct CTotalBenchRes
{
- UInt64 NumIterations;
+ // UInt64 NumIterations1; // for Usage
+ UInt64 NumIterations2; // for Rating / RPU
+
UInt64 Rating;
UInt64 Usage;
UInt64 RPU;
- void Init() { NumIterations = 0; Rating = 0; Usage = 0; RPU = 0; }
- void Normalize()
- {
- if (NumIterations == 0)
- return;
- Rating /= NumIterations;
- Usage /= NumIterations;
- RPU /= NumIterations;
- NumIterations = 1;
- }
- void SetMid(const CTotalBenchRes &r1, const CTotalBenchRes &r2)
+
+ void Init() { /* NumIterations1 = 0; */ NumIterations2 = 0; Rating = 0; Usage = 0; RPU = 0; }
+
+ void SetSum(const CTotalBenchRes &r1, const CTotalBenchRes &r2)
{
- Rating = (r1.Rating + r2.Rating) / 2;
- Usage = (r1.Usage + r2.Usage) / 2;
- RPU = (r1.RPU + r2.RPU) / 2;
- NumIterations = (r1.NumIterations + r2.NumIterations) / 2;
+ Rating = (r1.Rating + r2.Rating);
+ Usage = (r1.Usage + r2.Usage);
+ RPU = (r1.RPU + r2.RPU);
+ // NumIterations1 = (r1.NumIterations1 + r2.NumIterations1);
+ NumIterations2 = (r1.NumIterations2 + r2.NumIterations2);
}
};
-static void PrintNumber(IBenchPrintCallback &f, UInt64 value, int size, bool withSpace = true)
+static void PrintNumber(IBenchPrintCallback &f, UInt64 value, int size)
{
char s[128];
int startPos = (int)sizeof(s) - 32;
memset(s, ' ', startPos);
ConvertUInt64ToString(value, s + startPos);
- if (withSpace)
+ // if (withSpace)
{
startPos--;
size++;
@@ -1247,45 +1761,115 @@ static void PrintNumber(IBenchPrintCallback &f, UInt64 value, int size, bool wit
f.Print(s + startPos);
}
-static void PrintRating(IBenchPrintCallback &f, UInt64 rating)
+static const int kFieldSize_Name = 12;
+static const int kFieldSize_SmallName = 4;
+static const int kFieldSize_Speed = 9;
+static const int kFieldSize_Usage = 5;
+static const int kFieldSize_RU = 6;
+static const int kFieldSize_Rating = 6;
+static const int kFieldSize_EU = 5;
+static const int kFieldSize_Effec = 5;
+
+static const int kFieldSize_TotalSize = 4 + kFieldSize_Speed + kFieldSize_Usage + kFieldSize_RU + kFieldSize_Rating;
+static const int kFieldSize_EUAndEffec = 2 + kFieldSize_EU + kFieldSize_Effec;
+
+
+static void PrintRating(IBenchPrintCallback &f, UInt64 rating, int size)
{
- PrintNumber(f, rating / 1000000, 6);
+ PrintNumber(f, (rating + 500000) / 1000000, size);
}
-static void PrintResults(IBenchPrintCallback &f, UInt64 usage, UInt64 rpu, UInt64 rating)
+
+static void PrintPercents(IBenchPrintCallback &f, UInt64 val, UInt64 divider, int size)
{
- PrintNumber(f, (usage + 5000) / 10000, 5);
- PrintRating(f, rpu);
- PrintRating(f, rating);
+ PrintNumber(f, (val * 100 + divider / 2) / divider, size);
}
-static void PrintResults(IBenchPrintCallback &f, const CBenchInfo &info, UInt64 rating, CTotalBenchRes &res)
+static void PrintChars(IBenchPrintCallback &f, char c, unsigned size)
{
- UInt64 speed = MyMultDiv64(info.UnpackSize, info.GlobalTime, info.GlobalFreq);
- PrintNumber(f, speed / 1024, 7);
+ char s[256];
+ memset(s, (Byte)c, size);
+ s[size] = 0;
+ f.Print(s);
+}
+
+static void PrintSpaces(IBenchPrintCallback &f, unsigned size)
+{
+ PrintChars(f, ' ', size);
+}
+
+static void PrintResults(IBenchPrintCallback &f, UInt64 usage, UInt64 rpu, UInt64 rating, bool showFreq, UInt64 cpuFreq)
+{
+ PrintNumber(f, (usage + 5000) / 10000, kFieldSize_Usage);
+ PrintRating(f, rpu, kFieldSize_RU);
+ PrintRating(f, rating, kFieldSize_Rating);
+ if (showFreq)
+ {
+ if (cpuFreq == 0)
+ PrintSpaces(f, kFieldSize_EUAndEffec);
+ else
+ {
+ UInt64 ddd = cpuFreq * usage / 100;
+ if (ddd == 0)
+ ddd = 1;
+ PrintPercents(f, (rating * 10000), ddd, kFieldSize_EU);
+ PrintPercents(f, rating, cpuFreq, kFieldSize_Effec);
+ }
+ }
+}
+
+static void PrintResults(IBenchPrintCallback *f,
+ const CBenchInfo &info,
+ unsigned weight,
+ UInt64 rating,
+ bool showFreq, UInt64 cpuFreq,
+ CTotalBenchRes *res)
+{
+ UInt64 speed = info.GetSpeed(info.UnpackSize * info.NumIterations);
+ if (f)
+ {
+ if (speed != 0)
+ PrintNumber(*f, speed / 1024, kFieldSize_Speed);
+ else
+ PrintSpaces(*f, 1 + kFieldSize_Speed);
+ }
UInt64 usage = info.GetUsage();
UInt64 rpu = info.GetRatingPerUsage(rating);
- PrintResults(f, usage, rpu, rating);
- res.NumIterations++;
- res.RPU += rpu;
- res.Rating += rating;
- res.Usage += usage;
+ if (f)
+ {
+ PrintResults(*f, usage, rpu, rating, showFreq, cpuFreq);
+ }
+
+ if (res)
+ {
+ // res->NumIterations1++;
+ res->NumIterations2 += weight;
+ res->RPU += (rpu * weight);
+ res->Rating += (rating * weight);
+ res->Usage += (usage * weight);
+ }
}
-static void PrintTotals(IBenchPrintCallback &f, const CTotalBenchRes &res)
+static void PrintTotals(IBenchPrintCallback &f, bool showFreq, UInt64 cpuFreq, const CTotalBenchRes &res)
{
- f.Print(" ");
- PrintResults(f, res.Usage, res.RPU, res.Rating);
+ PrintSpaces(f, 1 + kFieldSize_Speed);
+ // UInt64 numIterations1 = res.NumIterations1; if (numIterations1 == 0) numIterations1 = 1;
+ UInt64 numIterations2 = res.NumIterations2; if (numIterations2 == 0) numIterations2 = 1;
+ PrintResults(f, res.Usage / numIterations2, res.RPU / numIterations2, res.Rating / numIterations2, showFreq, cpuFreq);
}
-static void PrintRequirements(IBenchPrintCallback &f, const char *sizeString, UInt64 size, const char *threadsString, UInt32 numThreads)
+static void PrintRequirements(IBenchPrintCallback &f, const char *sizeString,
+ bool size_Defined, UInt64 size, const char *threadsString, UInt32 numThreads)
{
f.Print("RAM ");
f.Print(sizeString);
- PrintNumber(f, (size >> 20), 5, true);
+ if (size_Defined)
+ PrintNumber(f, (size >> 20), 6);
+ else
+ f.Print(" ?");
f.Print(" MB, # ");
f.Print(threadsString);
- PrintNumber(f, numThreads, 3, true);
+ PrintNumber(f, numThreads, 3);
f.NewLine();
}
@@ -1297,41 +1881,74 @@ struct CBenchCallbackToPrint: public IBenchCallback
IBenchPrintCallback *_file;
UInt32 DictSize;
+ bool Use2Columns;
+ int NameFieldSize;
+
+ bool ShowFreq;
+ UInt64 CpuFreq;
+
+ unsigned EncodeWeight;
+ unsigned DecodeWeight;
+
+ CBenchCallbackToPrint():
+ Use2Columns(false),
+ NameFieldSize(0),
+ ShowFreq(false),
+ CpuFreq(0),
+ EncodeWeight(1),
+ DecodeWeight(1)
+ {}
+
void Init() { EncodeRes.Init(); DecodeRes.Init(); }
- void Normalize() { EncodeRes.Normalize(); DecodeRes.Normalize(); }
+ void Print(const char *s);
+ void NewLine();
+
+ HRESULT SetFreq(bool showFreq, UInt64 cpuFreq);
HRESULT SetEncodeResult(const CBenchInfo &info, bool final);
HRESULT SetDecodeResult(const CBenchInfo &info, bool final);
- void Print(const char *string);
- void NewLine();
- void PrintLeftAligned(const char *string, unsigned size);
};
+HRESULT CBenchCallbackToPrint::SetFreq(bool showFreq, UInt64 cpuFreq)
+{
+ ShowFreq = showFreq;
+ CpuFreq = cpuFreq;
+ return S_OK;
+}
+
HRESULT CBenchCallbackToPrint::SetEncodeResult(const CBenchInfo &info, bool final)
{
RINOK(_file->CheckBreak());
if (final)
{
- UInt64 rating = BenchProps.GetCompressRating(DictSize, info.GlobalTime, info.GlobalFreq, info.UnpackSize);
- PrintResults(*_file, info, rating, EncodeRes);
+ UInt64 rating = BenchProps.GetCompressRating(DictSize, info.GlobalTime, info.GlobalFreq, info.UnpackSize * info.NumIterations);
+ PrintResults(_file, info,
+ EncodeWeight, rating,
+ ShowFreq, CpuFreq, &EncodeRes);
+ if (!Use2Columns)
+ _file->NewLine();
}
return S_OK;
}
static const char *kSep = " | ";
-
HRESULT CBenchCallbackToPrint::SetDecodeResult(const CBenchInfo &info, bool final)
{
RINOK(_file->CheckBreak());
if (final)
{
UInt64 rating = BenchProps.GetDecompressRating(info.GlobalTime, info.GlobalFreq, info.UnpackSize, info.PackSize, info.NumIterations);
- _file->Print(kSep);
+ if (Use2Columns)
+ _file->Print(kSep);
+ else
+ PrintSpaces(*_file, NameFieldSize);
CBenchInfo info2 = info;
info2.UnpackSize *= info2.NumIterations;
info2.PackSize *= info2.NumIterations;
info2.NumIterations = 1;
- PrintResults(*_file, info2, rating, DecodeRes);
+ PrintResults(_file, info2,
+ DecodeWeight, rating,
+ ShowFreq, CpuFreq, &DecodeRes);
}
return S_OK;
}
@@ -1346,43 +1963,355 @@ void CBenchCallbackToPrint::NewLine()
_file->NewLine();
}
-void CBenchCallbackToPrint::PrintLeftAligned(const char *s, unsigned size)
+void PrintLeft(IBenchPrintCallback &f, const char *s, unsigned size)
{
- AString s2 = s;
- for (unsigned len = (unsigned)strlen(s); len < size; len++)
- s2 += ' ';
- Print(s2);
+ f.Print(s);
+ int numSpaces = size - MyStringLen(s);
+ if (numSpaces > 0)
+ PrintSpaces(f, numSpaces);
+}
+
+void PrintRight(IBenchPrintCallback &f, const char *s, unsigned size)
+{
+ int numSpaces = size - MyStringLen(s);
+ if (numSpaces > 0)
+ PrintSpaces(f, numSpaces);
+ f.Print(s);
}
static HRESULT TotalBench(
- DECL_EXTERNAL_CODECS_LOC_VARS
- UInt32 numThreads, UInt32 unpackSize, IBenchPrintCallback *printCallback, CBenchCallbackToPrint *callback)
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ UInt64 complexInCommands,
+ UInt32 numThreads,
+ bool forceUnpackSize,
+ size_t unpackSize,
+ const Byte *fileData,
+ IBenchPrintCallback *printCallback, CBenchCallbackToPrint *callback)
{
- for (unsigned i = 0; i < sizeof(g_Bench) / sizeof(g_Bench[0]); i++)
+ for (unsigned i = 0; i < ARRAY_SIZE(g_Bench); i++)
{
- CBenchMethod bench = g_Bench[i];
- callback->PrintLeftAligned(bench.Name, 12);
+ const CBenchMethod &bench = g_Bench[i];
+ PrintLeft(*callback->_file, bench.Name, kFieldSize_Name);
callback->BenchProps.DecComplexUnc = bench.DecComplexUnc;
callback->BenchProps.DecComplexCompr = bench.DecComplexCompr;
callback->BenchProps.EncComplex = bench.EncComplex;
+
COneMethodInfo method;
NCOM::CPropVariant propVariant;
propVariant = bench.Name;
- RINOK(method.ParseMethodFromPROPVARIANT(L"", propVariant));
+ RINOK(method.ParseMethodFromPROPVARIANT(UString(), propVariant));
+
+ size_t unpackSize2 = unpackSize;
+ if (!forceUnpackSize && bench.DictBits == 0)
+ unpackSize2 = kFilterUnpackSize;
+
+ callback->EncodeWeight = bench.Weight;
+ callback->DecodeWeight = bench.Weight;
HRESULT res = MethodBench(
EXTERNAL_CODECS_LOC_VARS
- false, numThreads, method, unpackSize, bench.dictBits,
+ complexInCommands,
+ false, numThreads, method,
+ unpackSize2, fileData,
+ bench.DictBits,
printCallback, callback, &callback->BenchProps);
+
if (res == E_NOTIMPL)
- callback->Print(" ---");
+ {
+ // callback->Print(" ---");
+ // we need additional empty line as line for decompression results
+ if (!callback->Use2Columns)
+ callback->NewLine();
+ }
else
{
RINOK(res);
}
+
callback->NewLine();
}
- return S_OK;
+ return S_OK;
+}
+
+
+static HRESULT FreqBench(
+ UInt64 complexInCommands,
+ UInt32 numThreads,
+ IBenchPrintCallback *_file,
+ bool showFreq,
+ UInt64 specifiedFreq,
+ UInt64 &cpuFreq,
+ UInt32 &res)
+{
+ res = 0;
+ cpuFreq = 0;
+
+ UInt32 bufferSize = 1 << 20;
+ UInt32 complexity = kNumFreqCommands;
+ if (numThreads == 0)
+ numThreads = 1;
+
+ #ifdef _7ZIP_ST
+ numThreads = 1;
+ #endif
+
+ UInt32 bsize = (bufferSize == 0 ? 1 : bufferSize);
+ UInt64 numIterations = complexInCommands / complexity / bsize;
+ if (numIterations == 0)
+ numIterations = 1;
+
+ CBenchInfoCalc progressInfoSpec;
+
+ #ifndef _7ZIP_ST
+ CFreqThreads threads;
+ if (numThreads > 1)
+ {
+ threads.Items = new CFreqInfo[numThreads];
+ UInt32 i;
+ for (i = 0; i < numThreads; i++)
+ {
+ CFreqInfo &info = threads.Items[i];
+ info.Callback = _file;
+ info.CallbackRes = S_OK;
+ info.NumIterations = numIterations;
+ info.Size = bufferSize;
+ }
+ progressInfoSpec.SetStartTime();
+ for (i = 0; i < numThreads; i++)
+ {
+ CFreqInfo &info = threads.Items[i];
+ RINOK(info.Thread.Create(FreqThreadFunction, &info));
+ threads.NumThreads++;
+ }
+ threads.WaitAll();
+ for (i = 0; i < numThreads; i++)
+ {
+ RINOK(threads.Items[i].CallbackRes);
+ }
+ }
+ else
+ #endif
+ {
+ progressInfoSpec.SetStartTime();
+ UInt32 sum = g_BenchCpuFreqTemp;
+ for (UInt64 k = numIterations; k > 0; k--)
+ {
+ RINOK(_file->CheckBreak());
+ sum = CountCpuFreq(sum, bufferSize, g_BenchCpuFreqTemp);
+ }
+ res += sum;
+ }
+
+ CBenchInfo info;
+ progressInfoSpec.SetFinishTime(info);
+
+ info.UnpackSize = 0;
+ info.PackSize = 0;
+ info.NumIterations = 1;
+
+ if (_file)
+ {
+ {
+ UInt64 numCommands = (UInt64)numIterations * bufferSize * numThreads * complexity;
+ UInt64 rating = info.GetSpeed(numCommands);
+ cpuFreq = rating / numThreads;
+ PrintResults(_file, info,
+ 0, // weight
+ rating,
+ showFreq, showFreq ? (specifiedFreq != 0 ? specifiedFreq : cpuFreq) : 0, NULL);
+ }
+ RINOK(_file->CheckBreak());
+ }
+
+ return S_OK;
+}
+
+
+
+static HRESULT CrcBench(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ UInt64 complexInCommands,
+ UInt32 numThreads, UInt32 bufferSize,
+ UInt64 &speed,
+ UInt32 complexity, unsigned benchWeight,
+ const UInt32 *checkSum,
+ const COneMethodInfo &method,
+ IBenchPrintCallback *_file,
+ CTotalBenchRes *encodeRes,
+ bool showFreq, UInt64 cpuFreq)
+{
+ if (numThreads == 0)
+ numThreads = 1;
+
+ #ifdef _7ZIP_ST
+ numThreads = 1;
+ #endif
+
+ AString methodName = method.MethodName;
+ // methodName.RemoveChar(L'-');
+ CMethodId hashID;
+ if (!FindHashMethod(
+ EXTERNAL_CODECS_LOC_VARS
+ methodName, hashID))
+ return E_NOTIMPL;
+
+ CBenchBuffer buffer;
+ size_t totalSize = (size_t)bufferSize * numThreads;
+ if (totalSize / numThreads != bufferSize)
+ return E_OUTOFMEMORY;
+ if (!buffer.Alloc(totalSize))
+ return E_OUTOFMEMORY;
+
+ Byte *buf = buffer.Buffer;
+ CBaseRandomGenerator RG;
+ UInt32 bsize = (bufferSize == 0 ? 1 : bufferSize);
+ UInt64 numIterations = complexInCommands * 256 / complexity / bsize;
+ if (numIterations == 0)
+ numIterations = 1;
+
+ CBenchInfoCalc progressInfoSpec;
+
+ #ifndef _7ZIP_ST
+ CCrcThreads threads;
+ if (numThreads > 1)
+ {
+ threads.Items = new CCrcInfo[numThreads];
+
+ UInt32 i;
+ for (i = 0; i < numThreads; i++)
+ {
+ CCrcInfo &info = threads.Items[i];
+ AString name;
+ RINOK(CreateHasher(EXTERNAL_CODECS_LOC_VARS hashID, name, info.Hasher));
+ if (!info.Hasher)
+ return E_NOTIMPL;
+ CMyComPtr<ICompressSetCoderProperties> scp;
+ info.Hasher.QueryInterface(IID_ICompressSetCoderProperties, &scp);
+ if (scp)
+ {
+ UInt64 reduceSize = 1;
+ RINOK(method.SetCoderProps(scp, &reduceSize));
+ }
+
+ Byte *data = buf + (size_t)bufferSize * i;
+ info.Callback = _file;
+ info.Data = data;
+ info.NumIterations = numIterations;
+ info.Size = bufferSize;
+ /* info.Crc = */ RandGenCrc(data, bufferSize, RG);
+ info.CheckSumDefined = false;
+ if (checkSum)
+ {
+ info.CheckSum = *checkSum;
+ info.CheckSumDefined = (checkSum && (i == 0));
+ }
+
+ #ifdef USE_ALLOCA
+ info.AllocaSize = (i * 16 * 21) & 0x7FF;
+ #endif
+ }
+
+ progressInfoSpec.SetStartTime();
+
+ for (i = 0; i < numThreads; i++)
+ {
+ CCrcInfo &info = threads.Items[i];
+ RINOK(info.Thread.Create(CrcThreadFunction, &info));
+ threads.NumThreads++;
+ }
+ threads.WaitAll();
+ for (i = 0; i < numThreads; i++)
+ {
+ RINOK(threads.Items[i].Res);
+ }
+ }
+ else
+ #endif
+ {
+ /* UInt32 crc = */ RandGenCrc(buf, bufferSize, RG);
+ progressInfoSpec.SetStartTime();
+ CMyComPtr<IHasher> hasher;
+ AString name;
+ RINOK(CreateHasher(EXTERNAL_CODECS_LOC_VARS hashID, name, hasher));
+ if (!hasher)
+ return E_NOTIMPL;
+ CMyComPtr<ICompressSetCoderProperties> scp;
+ hasher.QueryInterface(IID_ICompressSetCoderProperties, &scp);
+ if (scp)
+ {
+ UInt64 reduceSize = 1;
+ RINOK(method.SetCoderProps(scp, &reduceSize));
+ }
+ RINOK(CrcBig(buf, bufferSize, numIterations, checkSum, hasher, _file));
+ }
+
+ CBenchInfo info;
+ progressInfoSpec.SetFinishTime(info);
+
+ UInt64 unpSize = numIterations * bufferSize;
+ UInt64 unpSizeThreads = unpSize * numThreads;
+ info.UnpackSize = unpSizeThreads;
+ info.PackSize = unpSizeThreads;
+ info.NumIterations = 1;
+
+ if (_file)
+ {
+ {
+ UInt64 numCommands = unpSizeThreads * complexity / 256;
+ UInt64 rating = info.GetSpeed(numCommands);
+ PrintResults(_file, info,
+ benchWeight, rating,
+ showFreq, cpuFreq, encodeRes);
+ }
+ RINOK(_file->CheckBreak());
+ }
+
+ speed = info.GetSpeed(unpSizeThreads);
+
+ return S_OK;
+}
+
+static HRESULT TotalBench_Hash(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ UInt64 complexInCommands,
+ UInt32 numThreads, UInt32 bufSize,
+ IBenchPrintCallback *printCallback, CBenchCallbackToPrint *callback,
+ CTotalBenchRes *encodeRes,
+ bool showFreq, UInt64 cpuFreq)
+{
+ for (unsigned i = 0; i < ARRAY_SIZE(g_Hash); i++)
+ {
+ const CBenchHash &bench = g_Hash[i];
+ PrintLeft(*callback->_file, bench.Name, kFieldSize_Name);
+ // callback->BenchProps.DecComplexUnc = bench.DecComplexUnc;
+ // callback->BenchProps.DecComplexCompr = bench.DecComplexCompr;
+ // callback->BenchProps.EncComplex = bench.EncComplex;
+
+ COneMethodInfo method;
+ NCOM::CPropVariant propVariant;
+ propVariant = bench.Name;
+ RINOK(method.ParseMethodFromPROPVARIANT(UString(), propVariant));
+
+ UInt64 speed;
+ HRESULT res = CrcBench(
+ EXTERNAL_CODECS_LOC_VARS
+ complexInCommands,
+ numThreads, bufSize,
+ speed,
+ bench.Complex, bench.Weight,
+ &bench.CheckSum, method,
+ printCallback, encodeRes, showFreq, cpuFreq);
+ if (res == E_NOTIMPL)
+ {
+ // callback->Print(" ---");
+ }
+ else
+ {
+ RINOK(res);
+ }
+ callback->NewLine();
+ }
+ return S_OK;
}
struct CTempValues
@@ -1392,23 +2321,130 @@ struct CTempValues
~CTempValues() { delete []Values; }
};
-static void String_to_PropVariant(const UString &s, NCOM::CPropVariant &prop)
+static void ParseNumberString(const UString &s, NCOM::CPropVariant &prop)
{
- const wchar_t *endPtr;
- UInt64 result = ConvertStringToUInt64(s, &endPtr);
- if (endPtr - (const wchar_t *)s != s.Length())
+ const wchar_t *end;
+ UInt64 result = ConvertStringToUInt64(s, &end);
+ if (*end != 0 || s.IsEmpty())
prop = s;
- else if (result <= 0xFFFFFFFF)
+ else if (result <= (UInt32)0xFFFFFFFF)
prop = (UInt32)result;
else
prop = result;
}
+static UInt32 GetNumThreadsNext(unsigned i, UInt32 numThreads)
+{
+ if (i < 2)
+ return i + 1;
+ i -= 1;
+ UInt32 num = (UInt32)(2 + (i & 1)) << (i >> 1);
+ return (num <= numThreads) ? num : numThreads;
+}
+
+static bool AreSameMethodNames(const char *fullName, const char *shortName)
+{
+ for (;;)
+ {
+ char c2 = *shortName++;
+ if (c2 == 0)
+ return true;
+ char c1 = *fullName++;
+ if (MyCharLower_Ascii(c1) != MyCharLower_Ascii(c2))
+ return false;
+ }
+}
+
+
+#ifdef MY_CPU_X86_OR_AMD64
+
+static void PrintCpuChars(AString &s, UInt32 v)
+{
+ for (int j = 0; j < 4; j++)
+ {
+ Byte b = (Byte)(v & 0xFF);
+ v >>= 8;
+ if (b == 0)
+ break;
+ s += (char)b;
+ }
+}
+
+static void x86cpuid_to_String(const Cx86cpuid &c, AString &s)
+{
+ s.Empty();
+
+ UInt32 maxFunc2 = 0;
+ UInt32 t[3];
+
+ MyCPUID(0x80000000, &maxFunc2, &t[0], &t[1], &t[2]);
+
+ bool fullNameIsAvail = (maxFunc2 >= 0x80000004);
+
+ if (!fullNameIsAvail)
+ {
+ for (int i = 0; i < 3; i++)
+ PrintCpuChars(s, c.vendor[i]);
+ }
+ else
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ UInt32 c[4] = { 0 };
+ MyCPUID(0x80000002 + i, &c[0], &c[1], &c[2], &c[3]);
+ for (int j = 0; j < 4; j++)
+ PrintCpuChars(s, c[j]);
+ }
+ }
+
+ s.Add_Space_if_NotEmpty();
+ {
+ char temp[32];
+ ConvertUInt32ToHex(c.ver, temp);
+ s += '(';
+ s += temp;
+ s += ')';
+ }
+}
+
+#endif
+
+
+void GetCpuName(AString &s)
+{
+ s.Empty();
+
+ #ifdef MY_CPU_X86_OR_AMD64
+ {
+ Cx86cpuid cpuid;
+ if (x86cpuid_CheckAndRead(&cpuid))
+ {
+ x86cpuid_to_String(cpuid, s);
+ return;
+ }
+ #ifdef MY_CPU_AMD64
+ s = "x64";
+ #else
+ s = "x86";
+ #endif
+ }
+ #else
+
+ #ifdef MY_CPU_LE
+ s = "LE";
+ #elif defined(MY_CPU_BE)
+ s = "BE";
+ #endif
+
+ #endif
+}
+
+
HRESULT Bench(
DECL_EXTERNAL_CODECS_LOC_VARS
IBenchPrintCallback *printCallback,
IBenchCallback *benchCallback,
- const CObjectVector<CProperty> props,
+ const CObjectVector<CProperty> &props,
UInt32 numIterations,
bool multiDict)
{
@@ -1416,43 +2452,205 @@ HRESULT Bench(
return S_FALSE;
UInt32 numCPUs = 1;
- UInt64 ramSize = (UInt64)512 << 20;
+ UInt64 ramSize = (UInt64)(sizeof(size_t)) << 29;
+
#ifndef _7ZIP_ST
numCPUs = NSystem::GetNumberOfProcessors();
#endif
- #if !defined(_7ZIP_ST) || defined(_WIN32)
- ramSize = NSystem::GetRamSize();
- #endif
- UInt32 numThreads = numCPUs;
+
+ bool ramSize_Defined = NSystem::GetRamSize(ramSize);
- if (printCallback)
- PrintRequirements(*printCallback, "size: ", ramSize, "CPU hardware threads:", numCPUs);
+ UInt32 numThreadsSpecified = numCPUs;
+
+ UInt32 testTime = kComplexInSeconds;
+
+ UInt64 specifiedFreq = 0;
+
+ bool multiThreadTests = false;
COneMethodInfo method;
- int i;
+ unsigned i;
+
+ CBenchBuffer fileDataBuffer;
+
for (i = 0; i < props.Size(); i++)
{
const CProperty &property = props[i];
- NCOM::CPropVariant propVariant;
UString name = property.Name;
- name.MakeUpper();
+ name.MakeLower_Ascii();
+
+ if (name.IsEqualTo("file"))
+ {
+ if (property.Value.IsEmpty())
+ return E_INVALIDARG;
+
+ #ifdef USE_WIN_FILE
+
+ NFile::NIO::CInFile file;
+ if (!file.Open(us2fs(property.Value)))
+ return E_INVALIDARG;
+ UInt64 len;
+ if (!file.GetLength(len))
+ return E_FAIL;
+ if (len >= ((UInt32)1 << 31) || len == 0)
+ return E_INVALIDARG;
+ if (!fileDataBuffer.Alloc((size_t)len))
+ return E_OUTOFMEMORY;
+ UInt32 processedSize;
+ file.Read(fileDataBuffer.Buffer, (UInt32)len, processedSize);
+ if (processedSize != len)
+ return E_FAIL;
+ if (printCallback)
+ {
+ printCallback->Print("file size =");
+ // printCallback->Print(GetOemString(property.Value));
+ PrintNumber(*printCallback, len, 0);
+ printCallback->NewLine();
+ }
+ continue;
+
+ #else
+
+ return E_NOTIMPL;
+
+ #endif
+ }
+
+ NCOM::CPropVariant propVariant;
if (!property.Value.IsEmpty())
- String_to_PropVariant(property.Value, propVariant);
- if (name.Left(2).CompareNoCase(L"MT") == 0)
+ ParseNumberString(property.Value, propVariant);
+
+ if (name.IsEqualTo("time"))
+ {
+ RINOK(ParsePropToUInt32(L"", propVariant, testTime));
+ continue;
+ }
+
+ if (name.IsEqualTo("freq"))
+ {
+ UInt32 freq32 = 0;
+ RINOK(ParsePropToUInt32(L"", propVariant, freq32));
+ if (freq32 == 0)
+ return E_INVALIDARG;
+ specifiedFreq = (UInt64)freq32 * 1000000;
+
+ if (printCallback)
+ {
+ printCallback->Print("freq=");
+ PrintNumber(*printCallback, freq32, 0);
+ printCallback->NewLine();
+ }
+
+ continue;
+ }
+
+ if (name.IsPrefixedBy_Ascii_NoCase("mt"))
{
+ UString s = name.Ptr(2);
+ if (s == L"*")
+ {
+ multiThreadTests = true;
+ continue;
+ }
+ if (s.IsEmpty() && propVariant.vt == VT_BSTR)
+ {
+ if (wcscmp(propVariant.bstrVal, L"*") == 0)
+ {
+ multiThreadTests = true;
+ continue;
+ }
+ }
#ifndef _7ZIP_ST
- RINOK(ParseMtProp(name.Mid(2), propVariant, numCPUs, numThreads));
+ RINOK(ParseMtProp(s, propVariant, numCPUs, numThreadsSpecified));
#endif
continue;
}
+
RINOK(method.ParseMethodFromPROPVARIANT(name, propVariant));
}
+ if (printCallback)
+ {
+ AString s;
+ GetCpuName(s);
+ printCallback->Print(s);
+ printCallback->NewLine();
+ }
+
+ if (printCallback)
+ {
+ printCallback->Print("CPU Freq:");
+ }
+
+ UInt64 complexInCommands = kComplexInCommands;
+
+ if (printCallback /* || benchCallback */)
+ {
+ UInt64 numMilCommands = 1 << 6;
+ if (specifiedFreq != 0)
+ {
+ while (numMilCommands > 1 && specifiedFreq < (numMilCommands * 1000000))
+ numMilCommands >>= 1;
+ }
+
+ for (int jj = 0;; jj++)
+ {
+ if (printCallback)
+ RINOK(printCallback->CheckBreak());
+
+ UInt64 start = ::GetTimeCount();
+ UInt32 sum = (UInt32)start;
+ sum = CountCpuFreq(sum, (UInt32)(numMilCommands * 1000000 / kNumFreqCommands), g_BenchCpuFreqTemp);
+ const UInt64 realDelta = ::GetTimeCount() - start;
+ start = realDelta;
+ if (start == 0)
+ start = 1;
+ UInt64 freq = GetFreq();
+ // mips is constant in some compilers
+ const UInt64 mipsVal = numMilCommands * freq / start;
+ if (printCallback)
+ {
+ if (realDelta == 0)
+ {
+ printCallback->Print(" -");
+ }
+ else
+ {
+ // PrintNumber(*printCallback, start, 0);
+ PrintNumber(*printCallback, mipsVal, 5 + ((sum == 0xF1541213) ? 1 : 0));
+ }
+ }
+ /*
+ if (benchCallback)
+ benchCallback->AddCpuFreq(mipsVal);
+ */
+
+ if (jj >= 3)
+ {
+ SetComplexCommands(testTime, false, mipsVal * 1000000, complexInCommands);
+ if (jj >= 8 || start >= freq)
+ break;
+ // break; // change it
+ numMilCommands <<= 1;
+ }
+ }
+ }
+
+ if (printCallback)
+ {
+ printCallback->NewLine();
+ printCallback->NewLine();
+ PrintRequirements(*printCallback, "size: ", ramSize_Defined, ramSize, "CPU hardware threads:", numCPUs);
+ }
+
+ if (numThreadsSpecified < 1 || numThreadsSpecified > kNumThreadsMax)
+ return E_INVALIDARG;
+
UInt32 dict;
bool dictIsDefined = method.Get_DicSize(dict);
if (method.MethodName.IsEmpty())
- method.MethodName = L"LZMA";
+ method.MethodName = "LZMA";
if (benchCallback)
{
@@ -1462,12 +2660,20 @@ HRESULT Bench(
UInt32 uncompressedDataSize = kAdditionalSize + dictSize;
return MethodBench(
EXTERNAL_CODECS_LOC_VARS
- true, numThreads,
- method, uncompressedDataSize,
+ complexInCommands,
+ true, numThreadsSpecified,
+ method,
+ uncompressedDataSize, fileDataBuffer.Buffer,
kOldLzmaDictBits, printCallback, benchCallback, &benchProps);
}
- if (method.MethodName.CompareNoCase(L"CRC") == 0)
+ AString methodName = method.MethodName;
+ if (methodName.IsEqualTo_Ascii_NoCase("CRC"))
+ methodName = "crc32";
+ method.MethodName = methodName;
+ CMethodId hashID;
+
+ if (FindHashMethod(EXTERNAL_CODECS_LOC_VARS methodName, hashID))
{
if (!printCallback)
return S_FALSE;
@@ -1475,33 +2681,80 @@ HRESULT Bench(
if (!dictIsDefined)
dict = (1 << 24);
- CTempValues speedTotals(numThreads);
+
+ // methhodName.RemoveChar(L'-');
+ UInt32 complexity = 10000;
+ const UInt32 *checkSum = NULL;
+ {
+ for (unsigned i = 0; i < ARRAY_SIZE(g_Hash); i++)
+ {
+ const CBenchHash &h = g_Hash[i];
+ AString s = h.Name;
+ AString hProp;
+ int propPos = s.Find(':');
+ if (propPos >= 0)
+ {
+ hProp = s.Ptr(propPos + 1);
+ s.DeleteFrom(propPos);
+ }
+
+ if (AreSameMethodNames(s, methodName))
+ {
+ complexity = h.Complex;
+ checkSum = &h.CheckSum;
+ if (method.PropsString.IsEqualTo_Ascii_NoCase(hProp))
+ break;
+ }
+ }
+ }
+
f.NewLine();
f.Print("Size");
- for (UInt32 ti = 0; ti < numThreads; ti++)
+ const int kFieldSize_CrcSpeed = 6;
+ unsigned numThreadsTests = 0;
+ for (;;)
{
- PrintNumber(f, ti + 1, 5);
- speedTotals.Values[ti] = 0;
+ UInt32 t = GetNumThreadsNext(numThreadsTests, numThreadsSpecified);
+ PrintNumber(f, t, kFieldSize_CrcSpeed);
+ numThreadsTests++;
+ if (t >= numThreadsSpecified)
+ break;
}
f.NewLine();
f.NewLine();
+ CTempValues speedTotals(numThreadsTests);
+ {
+ for (unsigned ti = 0; ti < numThreadsTests; ti++)
+ speedTotals.Values[ti] = 0;
+ }
UInt64 numSteps = 0;
for (UInt32 i = 0; i < numIterations; i++)
{
- for (int pow = 10; pow < 32; pow++)
+ for (unsigned pow = 10; pow < 32; pow++)
{
UInt32 bufSize = (UInt32)1 << pow;
if (bufSize > dict)
break;
- PrintNumber(f, pow, 2, false);
- f.Print(": ");
- for (UInt32 ti = 0; ti < numThreads; ti++)
+ char s[16];
+ ConvertUInt32ToString(pow, s);
+ unsigned pos = MyStringLen(s);
+ s[pos++] = ':';
+ s[pos++] = ' ';
+ s[pos] = 0;
+ f.Print(s);
+
+ for (unsigned ti = 0; ti < numThreadsTests; ti++)
{
RINOK(f.CheckBreak());
- UInt64 speed;
- RINOK(CrcBench(ti + 1, bufSize, speed));
- PrintNumber(f, (speed >> 20), 5);
+ UInt32 t = GetNumThreadsNext(ti, numThreadsSpecified);
+ UInt64 speed = 0;
+ RINOK(CrcBench(EXTERNAL_CODECS_LOC_VARS complexInCommands,
+ t, bufSize, speed,
+ complexity,
+ 1, // benchWeight,
+ (pow == kNumHashDictBits) ? checkSum : NULL, method, NULL, NULL, false, 0));
+ PrintNumber(f, (speed >> 20), kFieldSize_CrcSpeed);
speedTotals.Values[ti] += speed;
}
f.NewLine();
@@ -1512,100 +2765,302 @@ HRESULT Bench(
{
f.NewLine();
f.Print("Avg:");
- for (UInt32 ti = 0; ti < numThreads; ti++)
- PrintNumber(f, ((speedTotals.Values[ti] / numSteps) >> 20), 5);
+ for (unsigned ti = 0; ti < numThreadsTests; ti++)
+ {
+ PrintNumber(f, ((speedTotals.Values[ti] / numSteps) >> 20), kFieldSize_CrcSpeed);
+ }
f.NewLine();
}
return S_OK;
}
+ bool use2Columns = false;
+
+ bool totalBenchMode = (method.MethodName.IsEqualTo_Ascii_NoCase("*"));
+ bool onlyHashBench = false;
+ if (method.MethodName.IsEqualTo_Ascii_NoCase("hash"))
+ {
+ onlyHashBench = true;
+ totalBenchMode = true;
+ }
+
+ // ---------- Threads loop ----------
+ for (unsigned threadsPassIndex = 0; threadsPassIndex < 3; threadsPassIndex++)
+ {
+
+ UInt32 numThreads = numThreadsSpecified;
+
+ if (!multiThreadTests)
+ {
+ if (threadsPassIndex != 0)
+ break;
+ }
+ else
+ {
+ numThreads = 1;
+ if (threadsPassIndex != 0)
+ {
+ if (numCPUs < 2)
+ break;
+ numThreads = numCPUs;
+ if (threadsPassIndex == 1)
+ {
+ if (numCPUs >= 4)
+ numThreads = numCPUs / 2;
+ }
+ else if (numCPUs < 4)
+ break;
+ }
+ }
+
CBenchCallbackToPrint callback;
callback.Init();
callback._file = printCallback;
+
+ IBenchPrintCallback &f = *printCallback;
+
+ if (threadsPassIndex > 0)
+ {
+ f.NewLine();
+ f.NewLine();
+ }
if (!dictIsDefined)
{
- int dicSizeLog;
- for (dicSizeLog = 25; dicSizeLog > kBenchMinDicLogSize; dicSizeLog--)
- if (GetBenchMemoryUsage(numThreads, ((UInt32)1 << dicSizeLog)) + (8 << 20) <= ramSize)
+ const unsigned dicSizeLog_Main = (totalBenchMode ? 24 : 25);
+ unsigned dicSizeLog = dicSizeLog_Main;
+
+ #ifdef UNDER_CE
+ dicSizeLog = (UInt64)1 << 20;
+ #endif
+
+ if (ramSize_Defined)
+ for (; dicSizeLog > kBenchMinDicLogSize; dicSizeLog--)
+ if (GetBenchMemoryUsage(numThreads, ((UInt32)1 << dicSizeLog), totalBenchMode) + (8 << 20) <= ramSize)
break;
- dict = (1 << dicSizeLog);
+
+ dict = (UInt32)1 << dicSizeLog;
+
+ if (totalBenchMode && dicSizeLog != dicSizeLog_Main)
+ {
+ f.Print("Dictionary reduced to: ");
+ PrintNumber(f, dicSizeLog, 1);
+ f.NewLine();
+ }
}
- IBenchPrintCallback &f = *printCallback;
- PrintRequirements(f, "usage:", GetBenchMemoryUsage(numThreads, dict), "Benchmark threads: ", numThreads);
+ PrintRequirements(f, "usage:", true, GetBenchMemoryUsage(numThreads, dict, totalBenchMode), "Benchmark threads: ", numThreads);
- bool totalBenchMode = (method.MethodName == L"*");
f.NewLine();
- f.Print(totalBenchMode ? "Method " : "Dict");
- f.Print(" Compressing | Decompressing");
+
+ if (totalBenchMode)
+ {
+ callback.NameFieldSize = kFieldSize_Name;
+ use2Columns = false;
+ }
+ else
+ {
+ callback.NameFieldSize = kFieldSize_SmallName;
+ use2Columns = true;
+ }
+ callback.Use2Columns = use2Columns;
+
+ bool showFreq = false;
+ UInt64 cpuFreq = 0;
+
+ if (totalBenchMode)
+ {
+ showFreq = true;
+ }
+
+ int fileldSize = kFieldSize_TotalSize;
+ if (showFreq)
+ fileldSize += kFieldSize_EUAndEffec;
+
+ if (use2Columns)
+ {
+ PrintSpaces(f, callback.NameFieldSize);
+ PrintRight(f, "Compressing", fileldSize);
+ f.Print(kSep);
+ PrintRight(f, "Decompressing", fileldSize);
+ }
f.NewLine();
- const char *kSpaces = totalBenchMode ? " " : " ";
- f.Print(kSpaces);
+ PrintLeft(f, totalBenchMode ? "Method" : "Dict", callback.NameFieldSize);
+
int j;
-
+
for (j = 0; j < 2; j++)
{
- f.Print(" Speed Usage R/U Rating");
+ PrintRight(f, "Speed", kFieldSize_Speed + 1);
+ PrintRight(f, "Usage", kFieldSize_Usage + 1);
+ PrintRight(f, "R/U", kFieldSize_RU + 1);
+ PrintRight(f, "Rating", kFieldSize_Rating + 1);
+ if (showFreq)
+ {
+ PrintRight(f, "E/U", kFieldSize_EU + 1);
+ PrintRight(f, "Effec", kFieldSize_Effec + 1);
+ }
+ if (!use2Columns)
+ break;
if (j == 0)
f.Print(kSep);
}
+
f.NewLine();
- f.Print(kSpaces);
+ PrintSpaces(f, callback.NameFieldSize);
+
for (j = 0; j < 2; j++)
{
- f.Print(" KB/s % MIPS MIPS");
+ PrintRight(f, "KiB/s", kFieldSize_Speed + 1);
+ PrintRight(f, "%", kFieldSize_Usage + 1);
+ PrintRight(f, "MIPS", kFieldSize_RU + 1);
+ PrintRight(f, "MIPS", kFieldSize_Rating + 1);
+ if (showFreq)
+ {
+ PrintRight(f, "%", kFieldSize_EU + 1);
+ PrintRight(f, "%", kFieldSize_Effec + 1);
+ }
+ if (!use2Columns)
+ break;
if (j == 0)
f.Print(kSep);
}
+
f.NewLine();
f.NewLine();
+ if (specifiedFreq != 0)
+ cpuFreq = specifiedFreq;
+
+
if (totalBenchMode)
{
- if (!dictIsDefined)
- dict =
- #ifdef UNDER_CE
- (UInt64)1 << 20;
- #else
- (UInt64)1 << 24;
- #endif
for (UInt32 i = 0; i < numIterations; i++)
{
if (i != 0)
printCallback->NewLine();
- HRESULT res = TotalBench(
- EXTERNAL_CODECS_LOC_VARS
- numThreads, dict, printCallback, &callback);
+ HRESULT res;
+
+ int freqTest;
+ const int kNumCpuTests = 3;
+ for (freqTest = 0; freqTest < kNumCpuTests; freqTest++)
+ {
+ PrintLeft(f, "CPU", kFieldSize_Name);
+ UInt32 resVal;
+ RINOK(FreqBench(complexInCommands, numThreads, printCallback,
+ (freqTest == kNumCpuTests - 1 || specifiedFreq != 0), // showFreq
+ specifiedFreq,
+ cpuFreq, resVal));
+ callback.NewLine();
+
+ if (specifiedFreq != 0)
+ cpuFreq = specifiedFreq;
+
+ if (freqTest == kNumCpuTests - 1)
+ SetComplexCommands(testTime, specifiedFreq != 0, cpuFreq, complexInCommands);
+ }
+ callback.NewLine();
+
+ callback.SetFreq(true, cpuFreq);
+
+ if (!onlyHashBench)
+ {
+ res = TotalBench(EXTERNAL_CODECS_LOC_VARS
+ complexInCommands, numThreads,
+ dictIsDefined || fileDataBuffer.Buffer, // forceUnpackSize
+ fileDataBuffer.Buffer ? fileDataBuffer.BufferSize : dict,
+ fileDataBuffer.Buffer,
+ printCallback, &callback);
+ RINOK(res);
+ }
+
+ res = TotalBench_Hash(EXTERNAL_CODECS_LOC_VARS complexInCommands, numThreads,
+ 1 << kNumHashDictBits, printCallback, &callback, &callback.EncodeRes, true, cpuFreq);
RINOK(res);
+
+ callback.NewLine();
+ {
+ PrintLeft(f, "CPU", kFieldSize_Name);
+ UInt32 resVal;
+ UInt64 cpuFreqLastTemp = cpuFreq;
+ RINOK(FreqBench(complexInCommands, numThreads, printCallback,
+ specifiedFreq != 0, // showFreq
+ specifiedFreq,
+ cpuFreqLastTemp, resVal));
+ callback.NewLine();
+ }
}
}
else
{
+ bool needSetComplexity = true;
+ if (!methodName.IsEqualTo_Ascii_NoCase("LZMA"))
+ {
+ for (unsigned i = 0; i < ARRAY_SIZE(g_Bench); i++)
+ {
+ const CBenchMethod &h = g_Bench[i];
+ AString s = h.Name;
+ if (AreSameMethodNames(h.Name, methodName))
+ {
+ callback.BenchProps.EncComplex = h.EncComplex;
+ callback.BenchProps.DecComplexCompr = h.DecComplexCompr;
+ callback.BenchProps.DecComplexUnc = h.DecComplexUnc;;
+ needSetComplexity = false;
+ break;
+ }
+ }
+ }
+ if (needSetComplexity)
+ callback.BenchProps.SetLzmaCompexity();
- callback.BenchProps.SetLzmaCompexity();
-
- for (i = 0; i < (int)numIterations; i++)
+ for (i = 0; i < numIterations; i++)
{
- const int kStartDicLog = 22;
- int pow = (dict < ((UInt32)1 << kStartDicLog)) ? kBenchMinDicLogSize : kStartDicLog;
+ const unsigned kStartDicLog = 22;
+ unsigned pow = (dict < ((UInt32)1 << kStartDicLog)) ? kBenchMinDicLogSize : kStartDicLog;
if (!multiDict)
pow = 31;
- while (((UInt32)1 << pow) > dict)
+ while (((UInt32)1 << pow) > dict && pow > 0)
pow--;
for (; ((UInt32)1 << pow) <= dict; pow++)
{
- PrintNumber(f, pow, 2, false);
- f.Print(":");
+ char s[16];
+ ConvertUInt32ToString(pow, s);
+ unsigned pos = MyStringLen(s);
+ s[pos++] = ':';
+ s[pos] = 0;
+ PrintLeft(f, s, kFieldSize_SmallName);
callback.DictSize = (UInt32)1 << pow;
- UInt32 uncompressedDataSize = kAdditionalSize + callback.DictSize;
+ COneMethodInfo method2 = method;
+
+ if (StringsAreEqualNoCase_Ascii(method2.MethodName, "LZMA"))
+ {
+ // We add dictionary size property.
+ // method2 can have two different dictionary size properties.
+ // And last property is main.
+ NCOM::CPropVariant propVariant = (UInt32)pow;
+ RINOK(method2.ParseMethodFromPROPVARIANT(L"d", propVariant));
+ }
+
+ size_t uncompressedDataSize;
+ if (fileDataBuffer.Buffer)
+ {
+ uncompressedDataSize = fileDataBuffer.BufferSize;
+ }
+ else
+ {
+ uncompressedDataSize = callback.DictSize;
+ if (uncompressedDataSize >= (1 << 18))
+ uncompressedDataSize += kAdditionalSize;
+ }
HRESULT res = MethodBench(
- EXTERNAL_CODECS_LOC_VARS
- true, numThreads,
- method, uncompressedDataSize,
- kOldLzmaDictBits, printCallback, &callback, &callback.BenchProps);
+ EXTERNAL_CODECS_LOC_VARS
+ complexInCommands,
+ true, numThreads,
+ method2,
+ uncompressedDataSize, fileDataBuffer.Buffer,
+ kOldLzmaDictBits, printCallback, &callback, &callback.BenchProps);
f.NewLine();
RINOK(res);
if (!multiDict)
@@ -1613,21 +3068,32 @@ HRESULT Bench(
}
}
}
- callback.Normalize();
- f.Print("----------------------------------------------------------------");
- f.NewLine();
- f.Print("Avr:");
- const char *kSpaces2 = totalBenchMode ? " " : "";
- f.Print(kSpaces2);
- PrintTotals(f, callback.EncodeRes);
- f.Print(" ");
- PrintTotals(f, callback.DecodeRes);
+
+ PrintChars(f, '-', callback.NameFieldSize + fileldSize);
+
+ if (use2Columns)
+ {
+ f.Print(kSep);
+ PrintChars(f, '-', fileldSize);
+ }
+
f.NewLine();
- f.Print("Tot:");
- f.Print(kSpaces2);
+
+ if (use2Columns)
+ {
+ PrintLeft(f, "Avr:", callback.NameFieldSize);
+ PrintTotals(f, showFreq, cpuFreq, callback.EncodeRes);
+ f.Print(kSep);
+ PrintTotals(f, showFreq, cpuFreq, callback.DecodeRes);
+ f.NewLine();
+ }
+
+ PrintLeft(f, "Tot:", callback.NameFieldSize);
CTotalBenchRes midRes;
- midRes.SetMid(callback.EncodeRes, callback.DecodeRes);
- PrintTotals(f, midRes);
+ midRes.SetSum(callback.EncodeRes, callback.DecodeRes);
+ PrintTotals(f, showFreq, cpuFreq, midRes);
f.NewLine();
+
+ }
return S_OK;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/Bench.h b/3rdparty/lzma/CPP/7zip/UI/Common/Bench.h
index 46146e24e1a..841250ef2cc 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/Bench.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/Bench.h
@@ -14,25 +14,27 @@ struct CBenchInfo
UInt64 UserFreq;
UInt64 UnpackSize;
UInt64 PackSize;
- UInt32 NumIterations;
+ UInt64 NumIterations;
CBenchInfo(): NumIterations(0) {}
UInt64 GetUsage() const;
UInt64 GetRatingPerUsage(UInt64 rating) const;
+ UInt64 GetSpeed(UInt64 numCommands) const;
};
struct IBenchCallback
{
+ virtual HRESULT SetFreq(bool showFreq, UInt64 cpuFreq) = 0;
virtual HRESULT SetEncodeResult(const CBenchInfo &info, bool final) = 0;
virtual HRESULT SetDecodeResult(const CBenchInfo &info, bool final) = 0;
};
UInt64 GetCompressRating(UInt32 dictSize, UInt64 elapsedTime, UInt64 freq, UInt64 size);
-UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt32 numIterations);
+UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt64 numIterations);
-const int kBenchMinDicLogSize = 18;
+const unsigned kBenchMinDicLogSize = 18;
-UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary);
+UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary, bool totalBench = false);
struct IBenchPrintCallback
{
@@ -45,7 +47,7 @@ HRESULT Bench(
DECL_EXTERNAL_CODECS_LOC_VARS
IBenchPrintCallback *printCallback,
IBenchCallback *benchCallback,
- const CObjectVector<CProperty> props,
+ const CObjectVector<CProperty> &props,
UInt32 numIterations,
bool multiDict
);
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/DefaultName.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/DefaultName.cpp
index 4335e273154..02f611c3d18 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/DefaultName.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/DefaultName.cpp
@@ -7,21 +7,23 @@
static UString GetDefaultName3(const UString &fileName,
const UString &extension, const UString &addSubExtension)
{
- int extLength = extension.Length();
- int fileNameLength = fileName.Length();
- if (fileNameLength > extLength + 1)
+ const unsigned extLen = extension.Len();
+ const unsigned fileNameLen = fileName.Len();
+
+ if (fileNameLen > extLen + 1)
{
- int dotPos = fileNameLength - (extLength + 1);
+ const unsigned dotPos = fileNameLen - (extLen + 1);
if (fileName[dotPos] == '.')
- if (extension.CompareNoCase(fileName.Mid(dotPos + 1)) == 0)
+ if (extension.IsEqualTo_NoCase(fileName.Ptr(dotPos + 1)))
return fileName.Left(dotPos) + addSubExtension;
}
- int dotPos = fileName.ReverseFind(L'.');
+
+ int dotPos = fileName.ReverseFind_Dot();
if (dotPos > 0)
return fileName.Left(dotPos) + addSubExtension;
if (addSubExtension.IsEmpty())
- return fileName + L"~";
+ return fileName + L'~';
else
return fileName + addSubExtension;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/DefaultName.h b/3rdparty/lzma/CPP/7zip/UI/Common/DefaultName.h
index 9764ff8716b..df164560275 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/DefaultName.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/DefaultName.h
@@ -1,9 +1,9 @@
// DefaultName.h
-#ifndef __DEFAULTNAME_H
-#define __DEFAULTNAME_H
+#ifndef __DEFAULT_NAME_H
+#define __DEFAULT_NAME_H
-#include "Common/MyString.h"
+#include "../../../Common/MyString.h"
UString GetDefaultName2(const UString &fileName,
const UString &extension, const UString &addSubExtension);
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/DirItem.h b/3rdparty/lzma/CPP/7zip/UI/Common/DirItem.h
index 6d6dc673465..4286b4e8db0 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/DirItem.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/DirItem.h
@@ -3,10 +3,46 @@
#ifndef __DIR_ITEM_H
#define __DIR_ITEM_H
-#include "Common/MyString.h"
-#include "Common/Types.h"
+#include "../../../Common/MyString.h"
+
+#include "../../../Windows/FileFind.h"
+
+#include "../../Common/UniqBlocks.h"
+
#include "../../Archive/IArchive.h"
+struct CDirItemsStat
+{
+ UInt64 NumDirs;
+ UInt64 NumFiles;
+ UInt64 NumAltStreams;
+ UInt64 FilesSize;
+ UInt64 AltStreamsSize;
+
+ UInt64 NumErrors;
+ // UInt64 GetTotalItems() const { return NumDirs + NumFiles + NumAltStreams; }
+
+ UInt64 GetTotalBytes() const { return FilesSize + AltStreamsSize; }
+
+ CDirItemsStat():
+ NumDirs(0),
+ NumFiles(0),
+ NumAltStreams(0),
+ FilesSize(0),
+ AltStreamsSize(0),
+ NumErrors(0)
+ {}
+};
+
+#define INTERFACE_IDirItemsCallback(x) \
+ virtual HRESULT ScanError(const FString &path, DWORD systemError) x; \
+ virtual HRESULT ScanProgress(const CDirItemsStat &st, const FString &path, bool isDir) x; \
+
+struct IDirItemsCallback
+{
+ INTERFACE_IDirItemsCallback(=0)
+};
+
struct CDirItem
{
UInt64 Size;
@@ -14,11 +50,23 @@ struct CDirItem
FILETIME ATime;
FILETIME MTime;
UString Name;
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ // UString ShortName;
+ CByteBuffer ReparseData;
+ CByteBuffer ReparseData2; // fixed (reduced) absolute links
+
+ bool AreReparseData() const { return ReparseData.Size() != 0 || ReparseData2.Size() != 0; }
+ #endif
+
UInt32 Attrib;
int PhyParent;
int LogParent;
+ int SecureIndex;
+
+ bool IsAltStream;
- CDirItem(): PhyParent(-1), LogParent(-1) {}
+ CDirItem(): PhyParent(-1), LogParent(-1), SecureIndex(-1), IsAltStream(false) {}
bool IsDir() const { return (Attrib & FILE_ATTRIBUTE_DIRECTORY) != 0 ; }
};
@@ -29,24 +77,63 @@ class CDirItems
CIntVector LogParents;
UString GetPrefixesPath(const CIntVector &parents, int index, const UString &name) const;
+
+ HRESULT EnumerateDir(int phyParent, int logParent, const FString &phyPrefix);
+
public:
CObjectVector<CDirItem> Items;
- int GetNumFolders() const { return Prefixes.Size(); }
- UString GetPhyPath(int index) const;
- UString GetLogPath(int index) const;
+ bool SymLinks;
- int AddPrefix(int phyParent, int logParent, const UString &prefix);
- void DeleteLastPrefix();
+ bool ScanAltStreams;
+
+ CDirItemsStat Stat;
+
+ #ifndef UNDER_CE
+ HRESULT SetLinkInfo(CDirItem &dirItem, const NWindows::NFile::NFind::CFileInfo &fi,
+ const FString &phyPrefix);
+ #endif
+
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
+
+ CUniqBlocks SecureBlocks;
+ CByteBuffer TempSecureBuf;
+ bool _saclEnabled;
+ bool ReadSecure;
+
+ HRESULT AddSecurityItem(const FString &path, int &secureIndex);
+
+ #endif
- void EnumerateDirectory(int phyParent, int logParent, const FString &phyPrefix,
- FStringVector &errorPaths, CRecordVector<DWORD> &errorCodes);
+ IDirItemsCallback *Callback;
- void EnumerateDirItems2(
+ CDirItems();
+
+ void AddDirFileInfo(int phyParent, int logParent, int secureIndex,
+ const NWindows::NFile::NFind::CFileInfo &fi);
+
+ HRESULT AddError(const FString &path, DWORD errorCode);
+ HRESULT AddError(const FString &path);
+
+ HRESULT ScanProgress(const FString &path);
+
+ // unsigned GetNumFolders() const { return Prefixes.Size(); }
+ FString GetPhyPath(unsigned index) const;
+ UString GetLogPath(unsigned index) const;
+
+ unsigned AddPrefix(int phyParent, int logParent, const UString &prefix);
+ void DeleteLastPrefix();
+
+ HRESULT EnumerateItems2(
const FString &phyPrefix,
const UString &logPrefix,
const FStringVector &filePaths,
- FStringVector &errorPaths, CRecordVector<DWORD> &errorCodes);
+ FStringVector *requestedPaths);
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ void FillFixedReparse();
+ #endif
void ReserveDown();
};
@@ -57,13 +144,14 @@ struct CArcItem
FILETIME MTime;
UString Name;
bool IsDir;
+ bool IsAltStream;
bool SizeDefined;
bool MTimeDefined;
bool Censored;
UInt32 IndexInServer;
int TimeType;
- CArcItem(): IsDir(false), SizeDefined(false), MTimeDefined(false), Censored(false), TimeType(-1) {}
+ CArcItem(): IsDir(false), IsAltStream(false), SizeDefined(false), MTimeDefined(false), Censored(false), TimeType(-1) {}
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp
index 8c83a9fbdc0..3ebf25aad8f 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp
@@ -2,7 +2,18 @@
#include "StdAfx.h"
-#include "Windows/FileName.h"
+#include <wchar.h>
+
+#include "../../../Common/Wildcard.h"
+
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileIO.h"
+#include "../../../Windows/FileName.h"
+
+#if defined(_WIN32) && !defined(UNDER_CE)
+#define _USE_SECURITY_CODE
+#include "../../../Windows/SecurityUtils.h"
+#endif
#include "EnumDirItems.h"
@@ -10,8 +21,8 @@ using namespace NWindows;
using namespace NFile;
using namespace NName;
-void AddDirFileInfo(int phyParent, int logParent,
- const NFind::CFileInfo &fi, CObjectVector<CDirItem> &dirItems)
+void CDirItems::AddDirFileInfo(int phyParent, int logParent, int secureIndex,
+ const NFind::CFileInfo &fi)
{
CDirItem di;
di.Size = fi.Size;
@@ -19,41 +30,83 @@ void AddDirFileInfo(int phyParent, int logParent,
di.ATime = fi.ATime;
di.MTime = fi.MTime;
di.Attrib = fi.Attrib;
+ di.IsAltStream = fi.IsAltStream;
di.PhyParent = phyParent;
di.LogParent = logParent;
+ di.SecureIndex = secureIndex;
di.Name = fs2us(fi.Name);
- dirItems.Add(di);
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ // di.ShortName = fs2us(fi.ShortName);
+ #endif
+ Items.Add(di);
+
+ if (fi.IsDir())
+ Stat.NumDirs++;
+ else if (fi.IsAltStream)
+ {
+ Stat.NumAltStreams++;
+ Stat.AltStreamsSize += fi.Size;
+ }
+ else
+ {
+ Stat.NumFiles++;
+ Stat.FilesSize += fi.Size;
+ }
+}
+
+HRESULT CDirItems::AddError(const FString &path, DWORD errorCode)
+{
+ Stat.NumErrors++;
+ if (Callback)
+ return Callback->ScanError(path, errorCode);
+ return S_OK;
+}
+
+HRESULT CDirItems::AddError(const FString &path)
+{
+ return AddError(path, ::GetLastError());
+}
+
+static const unsigned kScanProgressStepMask = (1 << 12) - 1;
+
+HRESULT CDirItems::ScanProgress(const FString &dirPath)
+{
+ if (Callback)
+ return Callback->ScanProgress(Stat, dirPath, true);
+ return S_OK;
}
UString CDirItems::GetPrefixesPath(const CIntVector &parents, int index, const UString &name) const
{
UString path;
- int len = name.Length();
+ unsigned len = name.Len();
+
int i;
for (i = index; i >= 0; i = parents[i])
- len += Prefixes[i].Length();
- int totalLen = len;
- wchar_t *p = path.GetBuffer(len);
- p[len] = 0;
- len -= name.Length();
- memcpy(p + len, (const wchar_t *)name, name.Length() * sizeof(wchar_t));
+ len += Prefixes[i].Len();
+
+ wchar_t *p = path.GetBuf_SetEnd(len) + len;
+
+ p -= name.Len();
+ wmemcpy(p, (const wchar_t *)name, name.Len());
+
for (i = index; i >= 0; i = parents[i])
{
const UString &s = Prefixes[i];
- len -= s.Length();
- memcpy(p + len, (const wchar_t *)s, s.Length() * sizeof(wchar_t));
+ p -= s.Len();
+ wmemcpy(p, (const wchar_t *)s, s.Len());
}
- path.ReleaseBuffer(totalLen);
+
return path;
}
-UString CDirItems::GetPhyPath(int index) const
+FString CDirItems::GetPhyPath(unsigned index) const
{
const CDirItem &di = Items[index];
- return GetPrefixesPath(PhyParents, di.PhyParent, di.Name);
+ return us2fs(GetPrefixesPath(PhyParents, di.PhyParent, di.Name));
}
-UString CDirItems::GetLogPath(int index) const
+UString CDirItems::GetLogPath(unsigned index) const
{
const CDirItem &di = Items[index];
return GetPrefixesPath(LogParents, di.LogParent, di.Name);
@@ -67,7 +120,7 @@ void CDirItems::ReserveDown()
Items.ReserveDown();
}
-int CDirItems::AddPrefix(int phyParent, int logParent, const UString &prefix)
+unsigned CDirItems::AddPrefix(int phyParent, int logParent, const UString &prefix)
{
PhyParents.Add(phyParent);
LogParents.Add(logParent);
@@ -81,150 +134,473 @@ void CDirItems::DeleteLastPrefix()
Prefixes.DeleteBack();
}
-void CDirItems::EnumerateDirectory(int phyParent, int logParent, const FString &phyPrefix,
- FStringVector &errorPaths, CRecordVector<DWORD> &errorCodes)
+bool InitLocalPrivileges();
+
+CDirItems::CDirItems():
+ SymLinks(false),
+ ScanAltStreams(false)
+ #ifdef _USE_SECURITY_CODE
+ , ReadSecure(false)
+ #endif
+ , Callback(NULL)
{
+ #ifdef _USE_SECURITY_CODE
+ _saclEnabled = InitLocalPrivileges();
+ #endif
+}
+
+#ifdef _USE_SECURITY_CODE
+
+HRESULT CDirItems::AddSecurityItem(const FString &path, int &secureIndex)
+{
+ secureIndex = -1;
+
+ SECURITY_INFORMATION securInfo =
+ DACL_SECURITY_INFORMATION |
+ GROUP_SECURITY_INFORMATION |
+ OWNER_SECURITY_INFORMATION;
+ if (_saclEnabled)
+ securInfo |= SACL_SECURITY_INFORMATION;
+
+ DWORD errorCode = 0;
+ DWORD secureSize;
+
+ BOOL res = ::GetFileSecurityW(fs2us(path), securInfo, (PSECURITY_DESCRIPTOR)(Byte *)TempSecureBuf, (DWORD)TempSecureBuf.Size(), &secureSize);
+
+ if (res)
+ {
+ if (secureSize == 0)
+ return S_OK;
+ if (secureSize > TempSecureBuf.Size())
+ errorCode = ERROR_INVALID_FUNCTION;
+ }
+ else
+ {
+ errorCode = GetLastError();
+ if (errorCode == ERROR_INSUFFICIENT_BUFFER)
+ {
+ if (secureSize <= TempSecureBuf.Size())
+ errorCode = ERROR_INVALID_FUNCTION;
+ else
+ {
+ TempSecureBuf.Alloc(secureSize);
+ res = ::GetFileSecurityW(fs2us(path), securInfo, (PSECURITY_DESCRIPTOR)(Byte *)TempSecureBuf, (DWORD)TempSecureBuf.Size(), &secureSize);
+ if (res)
+ {
+ if (secureSize != TempSecureBuf.Size())
+ errorCode = ERROR_INVALID_FUNCTION;;
+ }
+ else
+ errorCode = GetLastError();
+ }
+ }
+ }
+
+ if (res)
+ {
+ secureIndex = SecureBlocks.AddUniq(TempSecureBuf, secureSize);
+ return S_OK;
+ }
+
+ if (errorCode == 0)
+ errorCode = ERROR_INVALID_FUNCTION;
+ return AddError(path, errorCode);
+}
+
+#endif
+
+HRESULT CDirItems::EnumerateDir(int phyParent, int logParent, const FString &phyPrefix)
+{
+ RINOK(ScanProgress(phyPrefix));
+
NFind::CEnumerator enumerator(phyPrefix + FCHAR_ANY_MASK);
- for (;;)
+ for (unsigned ttt = 0; ; ttt++)
{
NFind::CFileInfo fi;
bool found;
if (!enumerator.Next(fi, found))
{
- errorCodes.Add(::GetLastError());
- errorPaths.Add(phyPrefix);
- return;
+ return AddError(phyPrefix);
}
if (!found)
- break;
- AddDirFileInfo(phyParent, logParent, fi, Items);
+ return S_OK;
+
+ int secureIndex = -1;
+ #ifdef _USE_SECURITY_CODE
+ if (ReadSecure)
+ {
+ RINOK(AddSecurityItem(phyPrefix + fi.Name, secureIndex));
+ }
+ #endif
+
+ AddDirFileInfo(phyParent, logParent, secureIndex, fi);
+
+ if (Callback && (ttt & kScanProgressStepMask) == kScanProgressStepMask)
+ {
+ RINOK(ScanProgress(phyPrefix));
+ }
+
if (fi.IsDir())
{
const FString name2 = fi.Name + FCHAR_PATH_SEPARATOR;
- int parent = AddPrefix(phyParent, logParent, fs2us(name2));
- EnumerateDirectory(parent, parent, phyPrefix + name2, errorPaths, errorCodes);
+ unsigned parent = AddPrefix(phyParent, logParent, fs2us(name2));
+ RINOK(EnumerateDir(parent, parent, phyPrefix + name2));
}
}
}
-void CDirItems::EnumerateDirItems2(const FString &phyPrefix, const UString &logPrefix,
- const FStringVector &filePaths, FStringVector &errorPaths, CRecordVector<DWORD> &errorCodes)
+HRESULT CDirItems::EnumerateItems2(
+ const FString &phyPrefix,
+ const UString &logPrefix,
+ const FStringVector &filePaths,
+ FStringVector *requestedPaths)
{
int phyParent = phyPrefix.IsEmpty() ? -1 : AddPrefix(-1, -1, fs2us(phyPrefix));
int logParent = logPrefix.IsEmpty() ? -1 : AddPrefix(-1, -1, logPrefix);
- for (int i = 0; i < filePaths.Size(); i++)
+ FOR_VECTOR (i, filePaths)
{
const FString &filePath = filePaths[i];
NFind::CFileInfo fi;
const FString phyPath = phyPrefix + filePath;
if (!fi.Find(phyPath))
{
- errorCodes.Add(::GetLastError());
- errorPaths.Add(phyPath);
+ RINOK(AddError(phyPath));
continue;
}
- int delimiter = filePath.ReverseFind(FCHAR_PATH_SEPARATOR);
+ if (requestedPaths)
+ requestedPaths->Add(phyPath);
+
+ int delimiter = filePath.ReverseFind_PathSepar();
FString phyPrefixCur;
int phyParentCur = phyParent;
if (delimiter >= 0)
{
- phyPrefixCur = filePath.Left(delimiter + 1);
+ phyPrefixCur.SetFrom(filePath, delimiter + 1);
phyParentCur = AddPrefix(phyParent, logParent, fs2us(phyPrefixCur));
}
- AddDirFileInfo(phyParentCur, logParent, fi, Items);
+
+ int secureIndex = -1;
+ #ifdef _USE_SECURITY_CODE
+ if (ReadSecure)
+ {
+ RINOK(AddSecurityItem(phyPath, secureIndex));
+ }
+ #endif
+
+ AddDirFileInfo(phyParentCur, logParent, secureIndex, fi);
+
if (fi.IsDir())
{
const FString name2 = fi.Name + FCHAR_PATH_SEPARATOR;
- int parent = AddPrefix(phyParentCur, logParent, fs2us(name2));
- EnumerateDirectory(parent, parent, phyPrefix + phyPrefixCur + name2, errorPaths, errorCodes);
+ unsigned parent = AddPrefix(phyParentCur, logParent, fs2us(name2));
+ RINOK(EnumerateDir(parent, parent, phyPrefix + phyPrefixCur + name2));
}
}
+
ReserveDown();
+ return S_OK;
}
-static HRESULT EnumerateDirItems(const NWildcard::CCensorNode &curNode,
+
+
+
+
+
+static HRESULT EnumerateDirItems(
+ const NWildcard::CCensorNode &curNode,
int phyParent, int logParent, const FString &phyPrefix,
const UStringVector &addArchivePrefix,
CDirItems &dirItems,
- bool enterToSubFolders,
- IEnumDirItemCallback *callback,
- FStringVector &errorPaths,
- CRecordVector<DWORD> &errorCodes);
+ bool enterToSubFolders);
-static HRESULT EnumerateDirItems_Spec(const NWildcard::CCensorNode &curNode,
+static HRESULT EnumerateDirItems_Spec(
+ const NWildcard::CCensorNode &curNode,
int phyParent, int logParent, const FString &curFolderName,
const FString &phyPrefix,
const UStringVector &addArchivePrefix,
CDirItems &dirItems,
- bool enterToSubFolders,
- IEnumDirItemCallback *callback,
- FStringVector &errorPaths,
- CRecordVector<DWORD> &errorCodes)
-
+ bool enterToSubFolders)
{
const FString name2 = curFolderName + FCHAR_PATH_SEPARATOR;
- int parent = dirItems.AddPrefix(phyParent, logParent, fs2us(name2));
- int numItems = dirItems.Items.Size();
- HRESULT res = EnumerateDirItems(curNode, parent, parent, phyPrefix + name2,
- addArchivePrefix, dirItems, enterToSubFolders, callback, errorPaths, errorCodes);
+ unsigned parent = dirItems.AddPrefix(phyParent, logParent, fs2us(name2));
+ unsigned numItems = dirItems.Items.Size();
+ HRESULT res = EnumerateDirItems(
+ curNode, parent, parent, phyPrefix + name2,
+ addArchivePrefix, dirItems, enterToSubFolders);
if (numItems == dirItems.Items.Size())
dirItems.DeleteLastPrefix();
return res;
}
+#ifndef UNDER_CE
+
+#ifdef _WIN32
+
+static HRESULT EnumerateAltStreams(
+ const NFind::CFileInfo &fi,
+ const NWildcard::CCensorNode &curNode,
+ int phyParent, int logParent, const FString &fullPath,
+ const UStringVector &addArchivePrefix, // prefix from curNode
+ CDirItems &dirItems)
+{
+ NFind::CStreamEnumerator enumerator(fullPath);
+ for (;;)
+ {
+ NFind::CStreamInfo si;
+ bool found;
+ if (!enumerator.Next(si, found))
+ {
+ return dirItems.AddError(fullPath + FTEXT(":*")); // , (DWORD)E_FAIL
+ }
+ if (!found)
+ return S_OK;
+ if (si.IsMainStream())
+ continue;
+ UStringVector addArchivePrefixNew = addArchivePrefix;
+ UString reducedName = si.GetReducedName();
+ addArchivePrefixNew.Back() += reducedName;
+ if (curNode.CheckPathToRoot(false, addArchivePrefixNew, true))
+ continue;
+ NFind::CFileInfo fi2 = fi;
+ fi2.Name += us2fs(reducedName);
+ fi2.Size = si.Size;
+ fi2.Attrib &= ~FILE_ATTRIBUTE_DIRECTORY;
+ fi2.IsAltStream = true;
+ dirItems.AddDirFileInfo(phyParent, logParent, -1, fi2);
+ }
+}
+
+#endif
+
+HRESULT CDirItems::SetLinkInfo(CDirItem &dirItem, const NFind::CFileInfo &fi,
+ const FString &phyPrefix)
+{
+ if (!SymLinks || !fi.HasReparsePoint())
+ return S_OK;
+ const FString path = phyPrefix + fi.Name;
+ CByteBuffer &buf = dirItem.ReparseData;
+ if (NIO::GetReparseData(path, buf))
+ {
+ CReparseAttr attr;
+ if (attr.Parse(buf, buf.Size()))
+ return S_OK;
+ }
+ DWORD res = ::GetLastError();
+ buf.Free();
+ return AddError(path , res);
+}
+
+#endif
-static HRESULT EnumerateDirItems(const NWildcard::CCensorNode &curNode,
+static HRESULT EnumerateForItem(
+ NFind::CFileInfo &fi,
+ const NWildcard::CCensorNode &curNode,
int phyParent, int logParent, const FString &phyPrefix,
const UStringVector &addArchivePrefix, // prefix from curNode
CDirItems &dirItems,
- bool enterToSubFolders,
- IEnumDirItemCallback *callback,
- FStringVector &errorPaths,
- CRecordVector<DWORD> &errorCodes)
+ bool enterToSubFolders)
+{
+ const UString name = fs2us(fi.Name);
+ bool enterToSubFolders2 = enterToSubFolders;
+ UStringVector addArchivePrefixNew = addArchivePrefix;
+ addArchivePrefixNew.Add(name);
+ {
+ UStringVector addArchivePrefixNewTemp(addArchivePrefixNew);
+ if (curNode.CheckPathToRoot(false, addArchivePrefixNewTemp, !fi.IsDir()))
+ return S_OK;
+ }
+ int dirItemIndex = -1;
+
+ if (curNode.CheckPathToRoot(true, addArchivePrefixNew, !fi.IsDir()))
+ {
+ int secureIndex = -1;
+ #ifdef _USE_SECURITY_CODE
+ if (dirItems.ReadSecure)
+ {
+ RINOK(dirItems.AddSecurityItem(phyPrefix + fi.Name, secureIndex));
+ }
+ #endif
+
+ dirItemIndex = dirItems.Items.Size();
+ dirItems.AddDirFileInfo(phyParent, logParent, secureIndex, fi);
+ if (fi.IsDir())
+ enterToSubFolders2 = true;
+ }
+
+ #ifndef UNDER_CE
+ if (dirItems.ScanAltStreams)
+ {
+ RINOK(EnumerateAltStreams(fi, curNode, phyParent, logParent,
+ phyPrefix + fi.Name,
+ addArchivePrefixNew, dirItems));
+ }
+
+ if (dirItemIndex >= 0)
+ {
+ CDirItem &dirItem = dirItems.Items[dirItemIndex];
+ RINOK(dirItems.SetLinkInfo(dirItem, fi, phyPrefix));
+ if (dirItem.ReparseData.Size() != 0)
+ return S_OK;
+ }
+ #endif
+
+ if (!fi.IsDir())
+ return S_OK;
+
+ const NWildcard::CCensorNode *nextNode = 0;
+ if (addArchivePrefix.IsEmpty())
+ {
+ int index = curNode.FindSubNode(name);
+ if (index >= 0)
+ nextNode = &curNode.SubNodes[index];
+ }
+ if (!enterToSubFolders2 && nextNode == 0)
+ return S_OK;
+
+ addArchivePrefixNew = addArchivePrefix;
+ if (nextNode == 0)
+ {
+ nextNode = &curNode;
+ addArchivePrefixNew.Add(name);
+ }
+
+ return EnumerateDirItems_Spec(
+ *nextNode, phyParent, logParent, fi.Name, phyPrefix,
+ addArchivePrefixNew,
+ dirItems,
+ enterToSubFolders2);
+}
+
+
+static bool CanUseFsDirect(const NWildcard::CCensorNode &curNode)
+{
+ FOR_VECTOR (i, curNode.IncludeItems)
+ {
+ const NWildcard::CItem &item = curNode.IncludeItems[i];
+ if (item.Recursive || item.PathParts.Size() != 1)
+ return false;
+ const UString &name = item.PathParts.Front();
+ /*
+ if (name.IsEmpty())
+ return false;
+ */
+
+ /* Windows doesn't support file name with wildcard
+ But if another system supports file name with wildcard,
+ and wildcard mode is disabled, we can ignore wildcard in name */
+ /*
+ if (!item.WildcardParsing)
+ continue;
+ */
+ if (DoesNameContainWildcard(name))
+ return false;
+ }
+ return true;
+}
+
+
+#if defined(_WIN32) && !defined(UNDER_CE)
+
+static bool IsVirtualFsFolder(const FString &prefix, const UString &name)
+{
+ UString s = fs2us(prefix);
+ s += name;
+ s.Add_PathSepar();
+ return IsPathSepar(s[0]) && GetRootPrefixSize(s) == 0;
+}
+
+#endif
+
+static HRESULT EnumerateDirItems(
+ const NWildcard::CCensorNode &curNode,
+ int phyParent, int logParent, const FString &phyPrefix,
+ const UStringVector &addArchivePrefix, // prefix from curNode
+ CDirItems &dirItems,
+ bool enterToSubFolders)
{
if (!enterToSubFolders)
if (curNode.NeedCheckSubDirs())
enterToSubFolders = true;
- if (callback)
- RINOK(callback->ScanProgress(dirItems.GetNumFolders(), dirItems.Items.Size(), fs2us(phyPrefix)));
+
+ RINOK(dirItems.ScanProgress(phyPrefix));
// try direct_names case at first
if (addArchivePrefix.IsEmpty() && !enterToSubFolders)
{
- // check that all names are direct
- int i;
- for (i = 0; i < curNode.IncludeItems.Size(); i++)
- {
- const NWildcard::CItem &item = curNode.IncludeItems[i];
- if (item.Recursive || item.PathParts.Size() != 1)
- break;
- const UString &name = item.PathParts.Front();
- if (name.IsEmpty() || DoesNameContainWildCard(name))
- break;
- }
- if (i == curNode.IncludeItems.Size())
+ if (CanUseFsDirect(curNode))
{
// all names are direct (no wildcards)
// so we don't need file_system's dir enumerator
CRecordVector<bool> needEnterVector;
+ unsigned i;
+
for (i = 0; i < curNode.IncludeItems.Size(); i++)
{
const NWildcard::CItem &item = curNode.IncludeItems[i];
const UString &name = item.PathParts.Front();
- const FString fullPath = phyPrefix + us2fs(name);
+ FString fullPath = phyPrefix + us2fs(name);
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ bool needAltStreams = true;
+ #endif
+
+ #ifdef _USE_SECURITY_CODE
+ bool needSecurity = true;
+ #endif
+
+ if (phyPrefix.IsEmpty())
+ {
+ if (!item.ForFile)
+ {
+ /* we don't like some names for alt streams inside archive:
+ ":sname" for "\"
+ "c:::sname" for "C:\"
+ So we ignore alt streams for these cases */
+ if (name.IsEmpty())
+ {
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ needAltStreams = false;
+ #endif
+
+ /*
+ // do we need to ignore security info for "\\" folder ?
+ #ifdef _USE_SECURITY_CODE
+ needSecurity = false;
+ #endif
+ */
+
+ fullPath = FCHAR_PATH_SEPARATOR;
+ }
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ else if (item.IsDriveItem())
+ {
+ needAltStreams = false;
+ fullPath.Add_PathSepar();
+ }
+ #endif
+ }
+ }
+
NFind::CFileInfo fi;
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (IsVirtualFsFolder(phyPrefix, name))
+ {
+ fi.SetAsDir();
+ fi.Name = us2fs(name);
+ }
+ else
+ #endif
if (!fi.Find(fullPath))
{
- errorCodes.Add(::GetLastError());
- errorPaths.Add(fullPath);
+ RINOK(dirItems.AddError(fullPath));
continue;
}
+
bool isDir = fi.IsDir();
if (isDir && !item.ForDir || !isDir && !item.ForFile)
{
- errorCodes.Add((DWORD)E_FAIL);
- errorPaths.Add(fullPath);
+ RINOK(dirItems.AddError(fullPath, (DWORD)E_FAIL));
continue;
}
{
@@ -233,7 +609,43 @@ static HRESULT EnumerateDirItems(const NWildcard::CCensorNode &curNode,
if (curNode.CheckPathToRoot(false, pathParts, !isDir))
continue;
}
- AddDirFileInfo(phyParent, logParent, fi, dirItems.Items);
+
+ int secureIndex = -1;
+ #ifdef _USE_SECURITY_CODE
+ if (needSecurity && dirItems.ReadSecure)
+ {
+ RINOK(dirItems.AddSecurityItem(fullPath, secureIndex));
+ }
+ #endif
+
+ dirItems.AddDirFileInfo(phyParent, logParent, secureIndex, fi);
+
+ #ifndef UNDER_CE
+ {
+ CDirItem &dirItem = dirItems.Items.Back();
+ RINOK(dirItems.SetLinkInfo(dirItem, fi, phyPrefix));
+ if (dirItem.ReparseData.Size() != 0)
+ {
+ if (fi.IsAltStream)
+ dirItems.Stat.AltStreamsSize -= fi.Size;
+ else
+ dirItems.Stat.FilesSize -= fi.Size;
+ continue;
+ }
+ }
+ #endif
+
+
+ #ifndef UNDER_CE
+ if (needAltStreams && dirItems.ScanAltStreams)
+ {
+ UStringVector pathParts;
+ pathParts.Add(fs2us(fi.Name));
+ RINOK(EnumerateAltStreams(fi, curNode, phyParent, logParent,
+ fullPath, pathParts, dirItems));
+ }
+ #endif
+
if (!isDir)
continue;
@@ -254,110 +666,233 @@ static HRESULT EnumerateDirItems(const NWildcard::CCensorNode &curNode,
}
RINOK(EnumerateDirItems_Spec(*nextNode, phyParent, logParent, fi.Name, phyPrefix,
- addArchivePrefixNew, dirItems, true, callback, errorPaths, errorCodes));
+ addArchivePrefixNew, dirItems, true));
}
+
for (i = 0; i < curNode.SubNodes.Size(); i++)
{
if (i < needEnterVector.Size())
if (!needEnterVector[i])
continue;
const NWildcard::CCensorNode &nextNode = curNode.SubNodes[i];
- const FString fullPath = phyPrefix + us2fs(nextNode.Name);
+ FString fullPath = phyPrefix + us2fs(nextNode.Name);
NFind::CFileInfo fi;
- if (!fi.Find(fullPath))
+
+ if (phyPrefix.IsEmpty())
{
- if (!nextNode.AreThereIncludeItems())
- continue;
- errorCodes.Add(::GetLastError());
- errorPaths.Add(fullPath);
- continue;
+ {
+ if (nextNode.Name.IsEmpty())
+ fullPath = FCHAR_PATH_SEPARATOR;
+ #ifdef _WIN32
+ else if (NWildcard::IsDriveColonName(nextNode.Name))
+ fullPath.Add_PathSepar();
+ #endif
+ }
}
- if (!fi.IsDir())
+
+ // we don't want to call fi.Find() for root folder or virtual folder
+ if (phyPrefix.IsEmpty() && nextNode.Name.IsEmpty()
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ || IsVirtualFsFolder(phyPrefix, nextNode.Name)
+ #endif
+ )
{
- errorCodes.Add((DWORD)E_FAIL);
- errorPaths.Add(fullPath);
- continue;
+ fi.SetAsDir();
+ fi.Name = us2fs(nextNode.Name);
+ }
+ else
+ {
+ if (!fi.Find(fullPath))
+ {
+ if (!nextNode.AreThereIncludeItems())
+ continue;
+ RINOK(dirItems.AddError(fullPath));
+ continue;
+ }
+
+ if (!fi.IsDir())
+ {
+ RINOK(dirItems.AddError(fullPath, (DWORD)E_FAIL));
+ continue;
+ }
}
RINOK(EnumerateDirItems_Spec(nextNode, phyParent, logParent, fi.Name, phyPrefix,
- UStringVector(), dirItems, false, callback, errorPaths, errorCodes));
+ UStringVector(), dirItems, false));
}
+
return S_OK;
}
}
+ #ifdef _WIN32
+ #ifndef UNDER_CE
+
+ // scan drives, if wildcard is "*:\"
+
+ if (phyPrefix.IsEmpty() && curNode.IncludeItems.Size() > 0)
+ {
+ unsigned i;
+ for (i = 0; i < curNode.IncludeItems.Size(); i++)
+ {
+ const NWildcard::CItem &item = curNode.IncludeItems[i];
+ if (item.PathParts.Size() < 1)
+ break;
+ const UString &name = item.PathParts.Front();
+ if (name.Len() != 2 || name[1] != ':')
+ break;
+ if (item.PathParts.Size() == 1)
+ if (item.ForFile || !item.ForDir)
+ break;
+ if (NWildcard::IsDriveColonName(name))
+ continue;
+ if (name[0] != '*' && name[0] != '?')
+ break;
+ }
+ if (i == curNode.IncludeItems.Size())
+ {
+ FStringVector driveStrings;
+ NFind::MyGetLogicalDriveStrings(driveStrings);
+ for (i = 0; i < driveStrings.Size(); i++)
+ {
+ FString driveName = driveStrings[i];
+ if (driveName.Len() < 3 || driveName.Back() != '\\')
+ return E_FAIL;
+ driveName.DeleteBack();
+ NFind::CFileInfo fi;
+ fi.SetAsDir();
+ fi.Name = driveName;
+
+ RINOK(EnumerateForItem(fi, curNode, phyParent, logParent, phyPrefix,
+ addArchivePrefix, dirItems, enterToSubFolders));
+ }
+ return S_OK;
+ }
+ }
+
+ #endif
+ #endif
NFind::CEnumerator enumerator(phyPrefix + FCHAR_ANY_MASK);
- for (int ttt = 0; ; ttt++)
+ for (unsigned ttt = 0; ; ttt++)
{
NFind::CFileInfo fi;
bool found;
if (!enumerator.Next(fi, found))
{
- errorCodes.Add(::GetLastError());
- errorPaths.Add(phyPrefix);
+ RINOK(dirItems.AddError(phyPrefix));
break;
}
if (!found)
break;
- if (callback && (ttt & 0xFF) == 0xFF)
- RINOK(callback->ScanProgress(dirItems.GetNumFolders(), dirItems.Items.Size(), fs2us(phyPrefix)));
- const UString &name = fs2us(fi.Name);
- bool enterToSubFolders2 = enterToSubFolders;
- UStringVector addArchivePrefixNew = addArchivePrefix;
- addArchivePrefixNew.Add(name);
- {
- UStringVector addArchivePrefixNewTemp(addArchivePrefixNew);
- if (curNode.CheckPathToRoot(false, addArchivePrefixNewTemp, !fi.IsDir()))
- continue;
- }
- if (curNode.CheckPathToRoot(true, addArchivePrefixNew, !fi.IsDir()))
- {
- AddDirFileInfo(phyParent, logParent, fi, dirItems.Items);
- if (fi.IsDir())
- enterToSubFolders2 = true;
- }
- if (!fi.IsDir())
- continue;
-
- const NWildcard::CCensorNode *nextNode = 0;
- if (addArchivePrefix.IsEmpty())
- {
- int index = curNode.FindSubNode(name);
- if (index >= 0)
- nextNode = &curNode.SubNodes[index];
- }
- if (!enterToSubFolders2 && nextNode == 0)
- continue;
-
- addArchivePrefixNew = addArchivePrefix;
- if (nextNode == 0)
+ if (dirItems.Callback && (ttt & kScanProgressStepMask) == kScanProgressStepMask)
{
- nextNode = &curNode;
- addArchivePrefixNew.Add(name);
+ RINOK(dirItems.ScanProgress(phyPrefix));
}
- RINOK(EnumerateDirItems_Spec(*nextNode, phyParent, logParent, fi.Name, phyPrefix,
- addArchivePrefixNew, dirItems, enterToSubFolders2, callback, errorPaths, errorCodes));
+ RINOK(EnumerateForItem(fi, curNode, phyParent, logParent, phyPrefix,
+ addArchivePrefix, dirItems, enterToSubFolders));
}
+
return S_OK;
}
HRESULT EnumerateItems(
const NWildcard::CCensor &censor,
- CDirItems &dirItems,
- IEnumDirItemCallback *callback,
- FStringVector &errorPaths,
- CRecordVector<DWORD> &errorCodes)
+ const NWildcard::ECensorPathMode pathMode,
+ const UString &addPathPrefix,
+ CDirItems &dirItems)
{
- for (int i = 0; i < censor.Pairs.Size(); i++)
+ FOR_VECTOR (i, censor.Pairs)
{
const NWildcard::CPair &pair = censor.Pairs[i];
int phyParent = pair.Prefix.IsEmpty() ? -1 : dirItems.AddPrefix(-1, -1, pair.Prefix);
- RINOK(EnumerateDirItems(pair.Head, phyParent, -1, us2fs(pair.Prefix), UStringVector(), dirItems, false,
- callback, errorPaths, errorCodes));
+ int logParent = -1;
+
+ if (pathMode == NWildcard::k_AbsPath)
+ logParent = phyParent;
+ else
+ {
+ if (!addPathPrefix.IsEmpty())
+ logParent = dirItems.AddPrefix(-1, -1, addPathPrefix);
+ }
+
+ RINOK(EnumerateDirItems(pair.Head, phyParent, logParent, us2fs(pair.Prefix), UStringVector(),
+ dirItems,
+ false // enterToSubFolders
+ ));
}
dirItems.ReserveDown();
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ dirItems.FillFixedReparse();
+ #endif
+
return S_OK;
}
+
+#if defined(_WIN32) && !defined(UNDER_CE)
+
+void CDirItems::FillFixedReparse()
+{
+ /* imagex/WIM reduces absolute pathes in links (raparse data),
+ if we archive non root folder. We do same thing here */
+
+ if (!SymLinks)
+ return;
+
+ FOR_VECTOR(i, Items)
+ {
+ CDirItem &item = Items[i];
+ if (item.ReparseData.Size() == 0)
+ continue;
+
+ CReparseAttr attr;
+ if (!attr.Parse(item.ReparseData, item.ReparseData.Size()))
+ continue;
+ if (attr.IsRelative())
+ continue;
+
+ const UString &link = attr.GetPath();
+ if (!IsDrivePath(link))
+ continue;
+ // maybe we need to support networks paths also ?
+
+ FString fullPathF;
+ if (!NDir::MyGetFullPathName(GetPhyPath(i), fullPathF))
+ continue;
+ UString fullPath = fs2us(fullPathF);
+ const UString logPath = GetLogPath(i);
+ if (logPath.Len() >= fullPath.Len())
+ continue;
+ if (CompareFileNames(logPath, fullPath.RightPtr(logPath.Len())) != 0)
+ continue;
+
+ const UString prefix = fullPath.Left(fullPath.Len() - logPath.Len());
+ if (!IsPathSepar(prefix.Back()))
+ continue;
+
+ unsigned rootPrefixSize = GetRootPrefixSize(prefix);
+ if (rootPrefixSize == 0)
+ continue;
+ if (rootPrefixSize == prefix.Len())
+ continue; // simple case: paths are from root
+
+ if (link.Len() <= prefix.Len())
+ continue;
+
+ if (CompareFileNames(link.Left(prefix.Len()), prefix) != 0)
+ continue;
+
+ UString newLink = prefix.Left(rootPrefixSize);
+ newLink += link.Ptr(prefix.Len());
+
+ CByteBuffer data;
+ if (!FillLinkData(data, newLink, attr.IsSymLink()))
+ continue;
+ item.ReparseData2 = data;
+ }
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/EnumDirItems.h b/3rdparty/lzma/CPP/7zip/UI/Common/EnumDirItems.h
index c96c7b9e83e..7afb800a033 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/EnumDirItems.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/EnumDirItems.h
@@ -3,23 +3,19 @@
#ifndef __ENUM_DIR_ITEMS_H
#define __ENUM_DIR_ITEMS_H
-#include "Common/Wildcard.h"
-#include "Windows/FileFind.h"
+#include "../../../Common/Wildcard.h"
+
+#include "../../../Windows/FileFind.h"
+
#include "DirItem.h"
-void AddDirFileInfo(int phyParent, int logParent,
+void AddDirFileInfo(int phyParent, int logParent, int secureIndex,
const NWindows::NFile::NFind::CFileInfo &fi, CObjectVector<CDirItem> &dirItems);
-struct IEnumDirItemCallback
-{
- virtual HRESULT ScanProgress(UInt64 numFolders, UInt64 numFiles, const wchar_t *path) = 0;
-};
-
HRESULT EnumerateItems(
const NWildcard::CCensor &censor,
- CDirItems &dirItems,
- IEnumDirItemCallback *callback,
- FStringVector &errorPaths,
- CRecordVector<DWORD> &errorCodes);
+ NWildcard::ECensorPathMode pathMode,
+ const UString &addPathPrefix,
+ CDirItems &dirItems);
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/Extract.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/Extract.cpp
index 81186772a62..14aa74072bc 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/Extract.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/Extract.cpp
@@ -2,11 +2,13 @@
#include "StdAfx.h"
-#include <stdio.h>
+#include "../../../../C/Sort.h"
-#include "Windows/FileDir.h"
-#include "Windows/PropVariant.h"
-#include "Windows/PropVariantConversions.h"
+#include "../../../Common/StringConvert.h"
+
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/PropVariant.h"
+#include "../../../Windows/PropVariantConv.h"
#include "../Common/ExtractingFilePath.h"
@@ -14,111 +16,249 @@
#include "SetProperties.h"
using namespace NWindows;
+using namespace NFile;
+using namespace NDir;
static HRESULT DecompressArchive(
- const CArc &arc,
+ CCodecs *codecs,
+ const CArchiveLink &arcLink,
UInt64 packSize,
const NWildcard::CCensorNode &wildcardCensor,
const CExtractOptions &options,
+ bool calcCrc,
IExtractCallbackUI *callback,
- CArchiveExtractCallback *extractCallbackSpec,
+ CArchiveExtractCallback *ecs,
UString &errorMessage,
UInt64 &stdInProcessed)
{
+ const CArc &arc = arcLink.Arcs.Back();
stdInProcessed = 0;
IInArchive *archive = arc.Archive;
CRecordVector<UInt32> realIndices;
+
+ UStringVector removePathParts;
+
+ FString outDir = options.OutputDir;
+ UString replaceName = arc.DefaultName;
+
+ if (arcLink.Arcs.Size() > 1)
+ {
+ // Most "pe" archives have same name of archive subfile "[0]" or ".rsrc_1".
+ // So it extracts different archives to one folder.
+ // We will use top level archive name
+ const CArc &arc0 = arcLink.Arcs[0];
+ if (StringsAreEqualNoCase_Ascii(codecs->Formats[arc0.FormatIndex].Name, "pe"))
+ replaceName = arc0.DefaultName;
+ }
+
+ outDir.Replace(FSTRING_ANY_MASK, us2fs(Get_Correct_FsFile_Name(replaceName)));
+
+ bool elimIsPossible = false;
+ UString elimPrefix; // only pure name without dir delimiter
+ FString outDirReduced = outDir;
+
+ if (options.ElimDup.Val && options.PathMode != NExtract::NPathMode::kAbsPaths)
+ {
+ UString dirPrefix;
+ SplitPathToParts_Smart(fs2us(outDir), dirPrefix, elimPrefix);
+ if (!elimPrefix.IsEmpty())
+ {
+ if (IsPathSepar(elimPrefix.Back()))
+ elimPrefix.DeleteBack();
+ if (!elimPrefix.IsEmpty())
+ {
+ outDirReduced = us2fs(dirPrefix);
+ elimIsPossible = true;
+ }
+ }
+ }
+
+ bool allFilesAreAllowed = wildcardCensor.AreAllAllowed();
+
if (!options.StdInMode)
{
UInt32 numItems;
RINOK(archive->GetNumberOfItems(&numItems));
+ CReadArcItem item;
+
for (UInt32 i = 0; i < numItems; i++)
{
- UString filePath;
- RINOK(arc.GetItemPath(i, filePath));
- bool isFolder;
- RINOK(IsArchiveItemFolder(archive, i, isFolder));
- if (!wildcardCensor.CheckPath(filePath, !isFolder))
+ if (elimIsPossible || !allFilesAreAllowed)
+ {
+ RINOK(arc.GetItem(i, item));
+ }
+ else
+ {
+ #ifdef SUPPORT_ALT_STREAMS
+ item.IsAltStream = false;
+ if (!options.NtOptions.AltStreams.Val && arc.Ask_AltStream)
+ {
+ RINOK(Archive_IsItem_AltStream(arc.Archive, i, item.IsAltStream));
+ }
+ #endif
+ }
+
+ #ifdef SUPPORT_ALT_STREAMS
+ if (!options.NtOptions.AltStreams.Val && item.IsAltStream)
continue;
+ #endif
+
+ if (elimIsPossible)
+ {
+ const UString &s =
+ #ifdef SUPPORT_ALT_STREAMS
+ item.MainPath;
+ #else
+ item.Path;
+ #endif
+ if (!IsPath1PrefixedByPath2(s, elimPrefix))
+ elimIsPossible = false;
+ else
+ {
+ wchar_t c = s[elimPrefix.Len()];
+ if (c == 0)
+ {
+ if (!item.MainIsDir)
+ elimIsPossible = false;
+ }
+ else if (!IsPathSepar(c))
+ elimIsPossible = false;
+ }
+ }
+
+ if (!allFilesAreAllowed)
+ {
+ if (!CensorNode_CheckPath(wildcardCensor, item))
+ continue;
+ }
+
realIndices.Add(i);
}
+
if (realIndices.Size() == 0)
{
callback->ThereAreNoFiles();
- return S_OK;
+ return callback->ExtractResult(S_OK);
}
}
- UStringVector removePathParts;
+ if (elimIsPossible)
+ {
+ removePathParts.Add(elimPrefix);
+ // outDir = outDirReduced;
+ }
- FString outDir = options.OutputDir;
- outDir.Replace(FSTRING_ANY_MASK, us2fs(GetCorrectFsPath(arc.DefaultName)));
#ifdef _WIN32
// GetCorrectFullFsPath doesn't like "..".
// outDir.TrimRight();
// outDir = GetCorrectFullFsPath(outDir);
#endif
- if (!outDir.IsEmpty())
- if (!NFile::NDirectory::CreateComplexDirectory(outDir))
- {
- HRESULT res = ::GetLastError();
- if (res == S_OK)
- res = E_FAIL;
- errorMessage = ((UString)L"Can not create output directory ") + fs2us(outDir);
- return res;
- }
+ if (outDir.IsEmpty())
+ outDir = FTEXT(".") FSTRING_PATH_SEPARATOR;
+ /*
+ #ifdef _WIN32
+ else if (NName::IsAltPathPrefix(outDir)) {}
+ #endif
+ */
+ else if (!CreateComplexDir(outDir))
+ {
+ HRESULT res = ::GetLastError();
+ if (res == S_OK)
+ res = E_FAIL;
+ errorMessage.SetFromAscii("Can not create output directory: ");
+ errorMessage += fs2us(outDir);
+ return res;
+ }
- extractCallbackSpec->Init(
+ ecs->Init(
+ options.NtOptions,
options.StdInMode ? &wildcardCensor : NULL,
&arc,
callback,
- options.StdOutMode, options.TestMode, options.CalcCrc,
+ options.StdOutMode, options.TestMode,
outDir,
- removePathParts,
+ removePathParts, false,
packSize);
- #if !defined(_7ZIP_ST) && !defined(_SFX)
- RINOK(SetProperties(archive, options.Properties));
+
+ #ifdef SUPPORT_LINKS
+
+ if (!options.StdInMode &&
+ !options.TestMode &&
+ options.NtOptions.HardLinks.Val)
+ {
+ RINOK(ecs->PrepareHardLinks(&realIndices));
+ }
+
#endif
+
HRESULT result;
- Int32 testMode = (options.TestMode && !options.CalcCrc) ? 1: 0;
+ Int32 testMode = (options.TestMode && !calcCrc) ? 1: 0;
if (options.StdInMode)
{
- result = archive->Extract(NULL, (UInt32)(Int32)-1, testMode, extractCallbackSpec);
+ result = archive->Extract(NULL, (UInt32)(Int32)-1, testMode, ecs);
NCOM::CPropVariant prop;
if (archive->GetArchiveProperty(kpidPhySize, &prop) == S_OK)
- if (prop.vt == VT_UI8 || prop.vt == VT_UI4)
- stdInProcessed = ConvertPropVariantToUInt64(prop);
+ ConvertPropVariantToUInt64(prop, stdInProcessed);
}
else
- result = archive->Extract(&realIndices.Front(), realIndices.Size(), testMode, extractCallbackSpec);
-
+ result = archive->Extract(&realIndices.Front(), realIndices.Size(), testMode, ecs);
+ if (result == S_OK && !options.StdInMode)
+ result = ecs->SetDirsTimes();
return callback->ExtractResult(result);
}
-HRESULT DecompressArchives(
- CCodecs *codecs, const CIntVector &formatIndices,
+/* v9.31: BUG was fixed:
+ Sorted list for file paths was sorted with case insensitive compare function.
+ But FindInSorted function did binary search via case sensitive compare function */
+
+int Find_FileName_InSortedVector(const UStringVector &fileName, const UString &name)
+{
+ unsigned left = 0, right = fileName.Size();
+ while (left != right)
+ {
+ unsigned mid = (left + right) / 2;
+ const UString &midValue = fileName[mid];
+ int compare = CompareFileNames(name, midValue);
+ if (compare == 0)
+ return mid;
+ if (compare < 0)
+ right = mid;
+ else
+ left = mid + 1;
+ }
+ return -1;
+}
+
+HRESULT Extract(
+ CCodecs *codecs,
+ const CObjectVector<COpenType> &types,
+ const CIntVector &excludedFormats,
UStringVector &arcPaths, UStringVector &arcPathsFull,
const NWildcard::CCensorNode &wildcardCensor,
const CExtractOptions &options,
IOpenCallbackUI *openCallback,
IExtractCallbackUI *extractCallback,
+ #ifndef _SFX
+ IHashCalc *hash,
+ #endif
UString &errorMessage,
- CDecompressStat &stat)
+ CDecompressStat &st)
{
- stat.Clear();
- int i;
+ st.Clear();
UInt64 totalPackSize = 0;
- CRecordVector<UInt64> archiveSizes;
+ CRecordVector<UInt64> arcSizes;
- int numArcs = options.StdInMode ? 1 : arcPaths.Size();
+ unsigned numArcs = options.StdInMode ? 1 : arcPaths.Size();
+ unsigned i;
+
for (i = 0; i < numArcs; i++)
{
- NFile::NFind::CFileInfo fi;
+ NFind::CFileInfo fi;
fi.Size = 0;
if (!options.StdInMode)
{
@@ -128,21 +268,37 @@ HRESULT DecompressArchives(
if (fi.IsDir())
throw "can't decompress folder";
}
- archiveSizes.Add(fi.Size);
+ arcSizes.Add(fi.Size);
totalPackSize += fi.Size;
}
- CArchiveExtractCallback *extractCallbackSpec = new CArchiveExtractCallback;
- CMyComPtr<IArchiveExtractCallback> ec(extractCallbackSpec);
+
+ CBoolArr skipArcs(numArcs);
+ for (i = 0; i < numArcs; i++)
+ skipArcs[i] = false;
+
+ CArchiveExtractCallback *ecs = new CArchiveExtractCallback;
+ CMyComPtr<IArchiveExtractCallback> ec(ecs);
bool multi = (numArcs > 1);
- extractCallbackSpec->InitForMulti(multi, options.PathMode, options.OverwriteMode);
+ ecs->InitForMulti(multi, options.PathMode, options.OverwriteMode);
+ #ifndef _SFX
+ ecs->SetHashMethods(hash);
+ #endif
+
if (multi)
{
RINOK(extractCallback->SetTotal(totalPackSize));
}
+
+ UInt64 totalPackProcessed = 0;
+ bool thereAreNotOpenArcs = false;
+
for (i = 0; i < numArcs; i++)
{
+ if (skipArcs[i])
+ continue;
+
const UString &arcPath = arcPaths[i];
- NFile::NFind::CFileInfo fi;
+ NFind::CFileInfo fi;
if (options.StdInMode)
{
fi.Size = 0;
@@ -154,21 +310,24 @@ HRESULT DecompressArchives(
throw "there is no such archive";
}
+ /*
#ifndef _NO_CRYPTO
- openCallback->Open_ClearPasswordWasAskedFlag();
+ openCallback->Open_Clear_PasswordWasAsked_Flag();
#endif
+ */
- RINOK(extractCallback->BeforeOpen(arcPath));
- CArchiveLink archiveLink;
+ RINOK(extractCallback->BeforeOpen(arcPath, options.TestMode));
+ CArchiveLink arcLink;
- CIntVector formatIndices2 = formatIndices;
+ CObjectVector<COpenType> types2 = types;
+ /*
#ifndef _SFX
- if (formatIndices.IsEmpty())
+ if (types.IsEmpty())
{
int pos = arcPath.ReverseFind(L'.');
if (pos >= 0)
{
- UString s = arcPath.Mid(pos + 1);
+ UString s = arcPath.Ptr(pos + 1);
int index = codecs->FindFormatForExtension(s);
if (index >= 0 && s == L"001")
{
@@ -176,88 +335,143 @@ HRESULT DecompressArchives(
pos = s.ReverseFind(L'.');
if (pos >= 0)
{
- int index2 = codecs->FindFormatForExtension(s.Mid(pos + 1));
- if (index2 >= 0 && s.CompareNoCase(L"rar") != 0)
+ int index2 = codecs->FindFormatForExtension(s.Ptr(pos + 1));
+ if (index2 >= 0) // && s.CompareNoCase(L"rar") != 0
{
- formatIndices2.Add(index2);
- formatIndices2.Add(index);
+ types2.Add(index2);
+ types2.Add(index);
}
}
}
}
}
#endif
- HRESULT result = archiveLink.Open2(codecs, formatIndices2, options.StdInMode, NULL, arcPath, openCallback);
+ */
+
+ COpenOptions op;
+ #ifndef _SFX
+ op.props = &options.Properties;
+ #endif
+ op.codecs = codecs;
+ op.types = &types2;
+ op.excludedFormats = &excludedFormats;
+ op.stdInMode = options.StdInMode;
+ op.stream = NULL;
+ op.filePath = arcPath;
+
+ HRESULT result = arcLink.Open3(op, openCallback);
+
if (result == E_ABORT)
return result;
- bool crypted = false;
- #ifndef _NO_CRYPTO
- crypted = openCallback->Open_WasPasswordAsked();
- #endif
+ if (result == S_OK && arcLink.NonOpen_ErrorInfo.ErrorFormatIndex >= 0)
+ result = S_FALSE;
+
+ // arcLink.Set_ErrorsText();
+ RINOK(extractCallback->OpenResult(codecs, arcLink, arcPath, result));
- RINOK(extractCallback->OpenResult(arcPath, result, crypted));
if (result != S_OK)
+ {
+ thereAreNotOpenArcs = true;
+ if (!options.StdInMode)
+ {
+ NFind::CFileInfo fi;
+ if (fi.Find(us2fs(arcPath)))
+ if (!fi.IsDir())
+ totalPackProcessed += fi.Size;
+ }
continue;
+ }
if (!options.StdInMode)
- for (int v = 0; v < archiveLink.VolumePaths.Size(); v++)
{
- int index = arcPathsFull.FindInSorted(archiveLink.VolumePaths[v]);
- if (index >= 0 && index > i)
+ // numVolumes += arcLink.VolumePaths.Size();
+ // arcLink.VolumesSize;
+
+ // totalPackSize -= DeleteUsedFileNamesFromList(arcLink, i + 1, arcPaths, arcPathsFull, &arcSizes);
+ // numArcs = arcPaths.Size();
+ if (arcLink.VolumePaths.Size() != 0)
{
- arcPaths.Delete(index);
- arcPathsFull.Delete(index);
- totalPackSize -= archiveSizes[index];
- archiveSizes.Delete(index);
- numArcs = arcPaths.Size();
+ Int64 correctionSize = arcLink.VolumesSize;
+ FOR_VECTOR (v, arcLink.VolumePaths)
+ {
+ int index = Find_FileName_InSortedVector(arcPathsFull, arcLink.VolumePaths[v]);
+ if (index >= 0)
+ {
+ if ((unsigned)index > i)
+ {
+ skipArcs[(unsigned)index] = true;
+ correctionSize -= arcSizes[(unsigned)index];
+ }
+ }
+ }
+ if (correctionSize != 0)
+ {
+ Int64 newPackSize = (Int64)totalPackSize + correctionSize;
+ if (newPackSize < 0)
+ newPackSize = 0;
+ totalPackSize = newPackSize;
+ RINOK(extractCallback->SetTotal(totalPackSize));
+ }
}
}
- if (archiveLink.VolumePaths.Size() != 0)
- {
- totalPackSize += archiveLink.VolumesSize;
- RINOK(extractCallback->SetTotal(totalPackSize));
- }
+
+ /*
+ // Now openCallback and extractCallback use same object. So we don't need to send password.
#ifndef _NO_CRYPTO
+ bool passwordIsDefined;
UString password;
- RINOK(openCallback->Open_GetPasswordIfAny(password));
- if (!password.IsEmpty())
+ RINOK(openCallback->Open_GetPasswordIfAny(passwordIsDefined, password));
+ if (passwordIsDefined)
{
RINOK(extractCallback->SetPassword(password));
}
#endif
+ */
- for (int v = 0; v < archiveLink.Arcs.Size(); v++)
- {
- const UString &s = archiveLink.Arcs[v].ErrorMessage;
- if (!s.IsEmpty())
- {
- RINOK(extractCallback->MessageError(s));
- }
- }
-
- CArc &arc = archiveLink.Arcs.Back();
+ CArc &arc = arcLink.Arcs.Back();
arc.MTimeDefined = (!options.StdInMode && !fi.IsDevice);
arc.MTime = fi.MTime;
UInt64 packProcessed;
- RINOK(DecompressArchive(arc,
- fi.Size + archiveLink.VolumesSize,
- wildcardCensor, options, extractCallback, extractCallbackSpec, errorMessage, packProcessed));
+ bool calcCrc =
+ #ifndef _SFX
+ (hash != NULL);
+ #else
+ false;
+ #endif
+
+ RINOK(DecompressArchive(
+ codecs,
+ arcLink,
+ fi.Size + arcLink.VolumesSize,
+ wildcardCensor,
+ options,
+ calcCrc,
+ extractCallback, ecs, errorMessage, packProcessed));
+
if (!options.StdInMode)
- packProcessed = fi.Size + archiveLink.VolumesSize;
- extractCallbackSpec->LocalProgressSpec->InSize += packProcessed;
- extractCallbackSpec->LocalProgressSpec->OutSize = extractCallbackSpec->UnpackSize;
+ packProcessed = fi.Size + arcLink.VolumesSize;
+ totalPackProcessed += packProcessed;
+ ecs->LocalProgressSpec->InSize += packProcessed;
+ ecs->LocalProgressSpec->OutSize = ecs->UnpackSize;
if (!errorMessage.IsEmpty())
return E_FAIL;
}
- stat.NumFolders = extractCallbackSpec->NumFolders;
- stat.NumFiles = extractCallbackSpec->NumFiles;
- stat.UnpackSize = extractCallbackSpec->UnpackSize;
- stat.CrcSum = extractCallbackSpec->CrcSum;
- stat.NumArchives = arcPaths.Size();
- stat.PackSize = extractCallbackSpec->LocalProgressSpec->InSize;
+ if (multi || thereAreNotOpenArcs)
+ {
+ RINOK(extractCallback->SetTotal(totalPackSize));
+ RINOK(extractCallback->SetCompleted(&totalPackProcessed));
+ }
+
+ st.NumFolders = ecs->NumFolders;
+ st.NumFiles = ecs->NumFiles;
+ st.NumAltStreams = ecs->NumAltStreams;
+ st.UnpackSize = ecs->UnpackSize;
+ st.AltStreams_UnpackSize = ecs->AltStreams_UnpackSize;
+ st.NumArchives = arcPaths.Size();
+ st.PackSize = ecs->LocalProgressSpec->InSize;
return S_OK;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/Extract.h b/3rdparty/lzma/CPP/7zip/UI/Common/Extract.h
index 2904a0aba7f..03ac74b2d0b 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/Extract.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/Extract.h
@@ -3,7 +3,7 @@
#ifndef __EXTRACT_H
#define __EXTRACT_H
-#include "Windows/FileFind.h"
+#include "../../../Windows/FileFind.h"
#include "../../Archive/IArchive.h"
@@ -14,21 +14,37 @@
#include "../Common/LoadCodecs.h"
-struct CExtractOptions
+struct CExtractOptionsBase
+{
+ CBoolPair ElimDup;
+
+ bool PathMode_Force;
+ bool OverwriteMode_Force;
+ NExtract::NPathMode::EEnum PathMode;
+ NExtract::NOverwriteMode::EEnum OverwriteMode;
+
+ FString OutputDir;
+ CExtractNtOptions NtOptions;
+
+ CExtractOptionsBase():
+ PathMode_Force(false),
+ OverwriteMode_Force(false),
+ PathMode(NExtract::NPathMode::kFullPaths),
+ OverwriteMode(NExtract::NOverwriteMode::kAsk)
+ {}
+};
+
+struct CExtractOptions: public CExtractOptionsBase
{
bool StdInMode;
bool StdOutMode;
bool YesToAll;
bool TestMode;
- bool CalcCrc;
- NExtract::NPathMode::EEnum PathMode;
- NExtract::NOverwriteMode::EEnum OverwriteMode;
- FString OutputDir;
// bool ShowDialog;
// bool PasswordEnabled;
// UString Password;
- #if !defined(_7ZIP_ST) && !defined(_SFX)
+ #ifndef _SFX
CObjectVector<CProperty> Properties;
#endif
@@ -37,13 +53,10 @@ struct CExtractOptions
#endif
CExtractOptions():
+ TestMode(false),
StdInMode(false),
StdOutMode(false),
- YesToAll(false),
- TestMode(false),
- CalcCrc(false),
- PathMode(NExtract::NPathMode::kFullPathnames),
- OverwriteMode(NExtract::NOverwriteMode::kAskBefore)
+ YesToAll(false)
{}
};
@@ -51,26 +64,31 @@ struct CDecompressStat
{
UInt64 NumArchives;
UInt64 UnpackSize;
+ UInt64 AltStreams_UnpackSize;
UInt64 PackSize;
UInt64 NumFolders;
UInt64 NumFiles;
- UInt32 CrcSum;
+ UInt64 NumAltStreams;
void Clear()
{
- NumArchives = UnpackSize = PackSize = NumFolders = NumFiles = 0;
- CrcSum = 0;
+ NumArchives = UnpackSize = AltStreams_UnpackSize = PackSize = NumFolders = NumFiles = NumAltStreams = 0;
}
};
-HRESULT DecompressArchives(
- CCodecs *codecs, const CIntVector &formatIndices,
+HRESULT Extract(
+ CCodecs *codecs,
+ const CObjectVector<COpenType> &types,
+ const CIntVector &excludedFormats,
UStringVector &archivePaths, UStringVector &archivePathsFull,
const NWildcard::CCensorNode &wildcardCensor,
const CExtractOptions &options,
IOpenCallbackUI *openCallback,
IExtractCallbackUI *extractCallback,
+ #ifndef _SFX
+ IHashCalc *hash,
+ #endif
UString &errorMessage,
- CDecompressStat &stat);
+ CDecompressStat &st);
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ExtractMode.h b/3rdparty/lzma/CPP/7zip/UI/Common/ExtractMode.h
index b448fb30a6e..3b2b9a02e81 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ExtractMode.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ExtractMode.h
@@ -5,27 +5,30 @@
namespace NExtract {
- namespace NPathMode
+namespace NPathMode
+{
+ enum EEnum
{
- enum EEnum
- {
- kFullPathnames,
- kCurrentPathnames,
- kNoPathnames
- };
- }
-
- namespace NOverwriteMode
+ kFullPaths,
+ kCurPaths,
+ kNoPaths,
+ kAbsPaths,
+ kNoPathsAlt // alt streams must be extracted without name of base file
+ };
+}
+
+namespace NOverwriteMode
+{
+ enum EEnum
{
- enum EEnum
- {
- kAskBefore,
- kWithoutPrompt,
- kSkipExisting,
- kAutoRename,
- kAutoRenameExisting
- };
- }
+ kAsk,
+ kOverwrite,
+ kSkip,
+ kRename,
+ kRenameExisting
+ };
+}
+
}
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp
index 25494d0e642..39e67b7f2ed 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp
@@ -2,141 +2,236 @@
#include "StdAfx.h"
-#include "../../../../C/Types.h"
+#include "../../../Common/Wildcard.h"
-#include "Common/Wildcard.h"
+#include "../../../Windows/FileName.h"
#include "ExtractingFilePath.h"
-static UString ReplaceIncorrectChars(const UString &s)
+static void ReplaceIncorrectChars(UString &s)
{
+ {
+ for (unsigned i = 0; i < s.Len(); i++)
+ {
+ wchar_t c = s[i];
+ if (
+ #ifdef _WIN32
+ c == ':' || c == '*' || c == '?' || c < 0x20 || c == '<' || c == '>' || c == '|' || c == '"'
+ || c == '/'
+ // || c == 0x202E // RLO
+ ||
+ #endif
+ c == WCHAR_PATH_SEPARATOR)
+ s.ReplaceOneCharAtPos(i, '_');
+ }
+ }
+
#ifdef _WIN32
- UString res;
- for (int i = 0; i < s.Length(); i++)
{
- wchar_t c = s[i];
- if (c < 0x20 || c == '*' || c == '?' || c == '<' || c == '>' || c == '|' || c == ':' || c == '"')
- c = '_';
- res += c;
+ for (unsigned i = s.Len(); i != 0;)
+ {
+ wchar_t c = s[--i];
+ if (c != '.' && c != ' ')
+ break;
+ s.ReplaceOneCharAtPos(i, '_');
+ }
}
- res.TrimRight();
- while (!res.IsEmpty() && res.Back() == '.')
- res.DeleteBack();
- return res;
- #else
- return s;
#endif
}
#ifdef _WIN32
-static const wchar_t *g_ReservedNames[] =
-{
- L"CON", L"PRN", L"AUX", L"NUL"
-};
-static bool CheckTail(const UString &name, int len)
+/* WinXP-64 doesn't support ':', '\\' and '/' symbols in name of alt stream.
+ But colon in postfix ":$DATA" is allowed.
+ WIN32 functions don't allow empty alt stream name "name:" */
+
+void Correct_AltStream_Name(UString &s)
{
- int dotPos = name.Find(L'.');
- if (dotPos < 0)
- dotPos = name.Length();
- UString s = name.Left(dotPos);
- s.TrimRight();
- return (s.Length() != len);
+ unsigned len = s.Len();
+ const unsigned kPostfixSize = 6;
+ if (s.Len() >= kPostfixSize
+ && StringsAreEqualNoCase_Ascii(s.RightPtr(kPostfixSize), ":$DATA"))
+ len -= kPostfixSize;
+ for (unsigned i = 0; i < len; i++)
+ {
+ wchar_t c = s[i];
+ if (c == ':' || c == '\\' || c == '/'
+ || c == 0x202E // RLO
+ )
+ s.ReplaceOneCharAtPos(i, '_');
+ }
+ if (s.IsEmpty())
+ s = L'_';
}
-static bool CheckNameNum(const UString &name, const wchar_t *reservedName)
+static const unsigned g_ReservedWithNum_Index = 4;
+
+static const char * const g_ReservedNames[] =
{
- int len = MyStringLen(reservedName);
- if (name.Length() <= len)
- return true;
- if (name.Left(len).CompareNoCase(reservedName) != 0)
- return true;
- wchar_t c = name[len];
- if (c < L'0' || c > L'9')
- return true;
- return CheckTail(name, len + 1);
-}
+ "CON", "PRN", "AUX", "NUL",
+ "COM", "LPT"
+};
static bool IsSupportedName(const UString &name)
{
- for (int i = 0; i < sizeof(g_ReservedNames) / sizeof(g_ReservedNames[0]); i++)
+ for (unsigned i = 0; i < ARRAY_SIZE(g_ReservedNames); i++)
{
- const wchar_t *reservedName = g_ReservedNames[i];
- int len = MyStringLen(reservedName);
- if (name.Length() < len)
+ const char *reservedName = g_ReservedNames[i];
+ unsigned len = MyStringLen(reservedName);
+ if (name.Len() < len)
continue;
- if (name.Left(len).CompareNoCase(reservedName) != 0)
+ if (!name.IsPrefixedBy_Ascii_NoCase(reservedName))
continue;
- if (!CheckTail(name, len))
- return false;
+ if (i >= g_ReservedWithNum_Index)
+ {
+ wchar_t c = name[len];
+ if (c < L'0' || c > L'9')
+ continue;
+ len++;
+ }
+ for (;;)
+ {
+ wchar_t c = name[len++];
+ if (c == 0 || c == '.')
+ return false;
+ if (c != ' ')
+ break;
+ }
}
- if (!CheckNameNum(name, L"COM"))
- return false;
- return CheckNameNum(name, L"LPT");
+ return true;
}
+
+static void CorrectUnsupportedName(UString &name)
+{
+ if (!IsSupportedName(name))
+ name.InsertAtFront(L'_');
+}
+
#endif
-static UString GetCorrectFileName(const UString &path)
+static void Correct_PathPart(UString &s)
+{
+ // "." and ".."
+ if (s[0] == '.' && (s[1] == 0 || s[1] == '.' && s[2] == 0))
+ s.Empty();
+ #ifdef _WIN32
+ else
+ ReplaceIncorrectChars(s);
+ #endif
+}
+
+// static const wchar_t *k_EmptyReplaceName = L"[]";
+static const wchar_t k_EmptyReplaceName = L'_';
+
+UString Get_Correct_FsFile_Name(const UString &name)
{
- if (path == L".." || path == L".")
- return UString();
- return ReplaceIncorrectChars(path);
+ UString res = name;
+ Correct_PathPart(res);
+
+ #ifdef _WIN32
+ CorrectUnsupportedName(res);
+ #endif
+
+ if (res.IsEmpty())
+ res = k_EmptyReplaceName;
+ return res;
}
-void MakeCorrectPath(UStringVector &pathParts)
+
+void Correct_FsPath(bool absIsAllowed, UStringVector &parts, bool isDir)
{
- for (int i = 0; i < pathParts.Size();)
+ unsigned i = 0;
+
+ if (absIsAllowed)
{
- UString &s = pathParts[i];
- s = GetCorrectFileName(s);
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ bool isDrive = false;
+ #endif
+ if (parts[0].IsEmpty())
+ {
+ i = 1;
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (parts.Size() > 1 && parts[1].IsEmpty())
+ {
+ i = 2;
+ if (parts.Size() > 2 && parts[2] == L"?")
+ {
+ i = 3;
+ if (parts.Size() > 3 && NWindows::NFile::NName::IsDrivePath2(parts[3]))
+ {
+ isDrive = true;
+ i = 4;
+ }
+ }
+ }
+ #endif
+ }
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ else if (NWindows::NFile::NName::IsDrivePath2(parts[0]))
+ {
+ isDrive = true;
+ i = 1;
+ }
+
+ if (isDrive)
+ {
+ // we convert "c:name" to "c:\name", if absIsAllowed path.
+ const UString &ds = parts[i - 1];
+ if (ds.Len() != 2)
+ {
+ UString s = ds.Ptr(2);
+ parts.Insert(i, s);
+ }
+ }
+ #endif
+ }
+
+ for (; i < parts.Size();)
+ {
+ UString &s = parts[i];
+
+ Correct_PathPart(s);
+
if (s.IsEmpty())
- pathParts.Delete(i);
+ {
+ if (isDir || i != parts.Size() - 1)
+ {
+ parts.Delete(i);
+ continue;
+ }
+ s = k_EmptyReplaceName;
+ }
else
{
#ifdef _WIN32
- if (!IsSupportedName(s))
- s = (UString)L"_" + s;
+ CorrectUnsupportedName(s);
#endif
- i++;
}
+
+ i++;
}
-}
-UString MakePathNameFromParts(const UStringVector &parts)
-{
- UString result;
- for (int i = 0; i < parts.Size(); i++)
+ if (!isDir)
{
- if (i != 0)
- result += WCHAR_PATH_SEPARATOR;
- result += parts[i];
+ if (parts.IsEmpty())
+ parts.Add(k_EmptyReplaceName);
+ else
+ {
+ UString &s = parts.Back();
+ if (s.IsEmpty())
+ s = k_EmptyReplaceName;
+ }
}
- return result;
}
-UString GetCorrectFsPath(const UString &path)
-{
- UString res = GetCorrectFileName(path);
- #ifdef _WIN32
- if (!IsSupportedName(res))
- res = (UString)L"_" + res;
- #endif
- return res;
-}
-
-UString GetCorrectFullFsPath(const UString &path)
+UString MakePathFromParts(const UStringVector &parts)
{
- UStringVector parts;
- SplitPathToParts(path, parts);
- for (int i = 0; i < parts.Size(); i++)
+ UString s;
+ FOR_VECTOR (i, parts)
{
- UString &s = parts[i];
- #ifdef _WIN32
- while (!s.IsEmpty() && s.Back() == '.')
- s.DeleteBack();
- if (!IsSupportedName(s))
- s = (UString)L"_" + s;
- #endif
+ if (i != 0)
+ s.Add_PathSepar();
+ s += parts[i];
}
- return MakePathNameFromParts(parts);
+ return s;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h b/3rdparty/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h
index da28bfc23b7..a52a1f4a5b4 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h
@@ -3,11 +3,17 @@
#ifndef __EXTRACTING_FILE_PATH_H
#define __EXTRACTING_FILE_PATH_H
-#include "Common/MyString.h"
+#include "../../../Common/MyString.h"
-UString MakePathNameFromParts(const UStringVector &parts);
-void MakeCorrectPath(UStringVector &pathParts);
-UString GetCorrectFsPath(const UString &path);
-UString GetCorrectFullFsPath(const UString &path);
+#ifdef _WIN32
+void Correct_AltStream_Name(UString &s);
+#endif
+
+// replaces unsuported characters, and replaces "." , ".." and "" to "[]"
+UString Get_Correct_FsFile_Name(const UString &name);
+
+void Correct_FsPath(bool absIsAllowed, UStringVector &parts, bool isDir);
+
+UString MakePathFromParts(const UStringVector &parts);
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/HashCalc.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/HashCalc.cpp
new file mode 100644
index 00000000000..c33f837fe77
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/HashCalc.cpp
@@ -0,0 +1,351 @@
+// HashCalc.cpp
+
+#include "StdAfx.h"
+
+#include "../../../../C/Alloc.h"
+
+#include "../../../Common/StringToInt.h"
+
+#include "../../Common/FileStreams.h"
+#include "../../Common/StreamUtils.h"
+
+#include "EnumDirItems.h"
+#include "HashCalc.h"
+
+using namespace NWindows;
+
+class CHashMidBuf
+{
+ void *_data;
+public:
+ CHashMidBuf(): _data(0) {}
+ operator void *() { return _data; }
+ bool Alloc(size_t size)
+ {
+ if (_data != 0)
+ return false;
+ _data = ::MidAlloc(size);
+ return _data != 0;
+ }
+ ~CHashMidBuf() { ::MidFree(_data); }
+};
+
+static const char *k_DefaultHashMethod = "CRC32";
+
+HRESULT CHashBundle::SetMethods(DECL_EXTERNAL_CODECS_LOC_VARS const UStringVector &hashMethods)
+{
+ UStringVector names = hashMethods;
+ if (names.IsEmpty())
+ {
+ UString s;
+ s.SetFromAscii(k_DefaultHashMethod);
+ names.Add(s);
+ }
+
+ CRecordVector<CMethodId> ids;
+ CObjectVector<COneMethodInfo> methods;
+
+ unsigned i;
+ for (i = 0; i < names.Size(); i++)
+ {
+ COneMethodInfo m;
+ RINOK(m.ParseMethodFromString(names[i]));
+
+ if (m.MethodName.IsEmpty())
+ m.MethodName = k_DefaultHashMethod;
+
+ if (m.MethodName == "*")
+ {
+ CRecordVector<CMethodId> tempMethods;
+ GetHashMethods(EXTERNAL_CODECS_LOC_VARS tempMethods);
+ methods.Clear();
+ ids.Clear();
+ FOR_VECTOR (t, tempMethods)
+ {
+ unsigned index = ids.AddToUniqueSorted(tempMethods[t]);
+ if (ids.Size() != methods.Size())
+ methods.Insert(index, m);
+ }
+ break;
+ }
+ else
+ {
+ // m.MethodName.RemoveChar(L'-');
+ CMethodId id;
+ if (!FindHashMethod(EXTERNAL_CODECS_LOC_VARS m.MethodName, id))
+ return E_NOTIMPL;
+ unsigned index = ids.AddToUniqueSorted(id);
+ if (ids.Size() != methods.Size())
+ methods.Insert(index, m);
+ }
+ }
+
+ for (i = 0; i < ids.Size(); i++)
+ {
+ CMyComPtr<IHasher> hasher;
+ AString name;
+ RINOK(CreateHasher(EXTERNAL_CODECS_LOC_VARS ids[i], name, hasher));
+ if (!hasher)
+ throw "Can't create hasher";
+ const COneMethodInfo &m = methods[i];
+ {
+ CMyComPtr<ICompressSetCoderProperties> scp;
+ hasher.QueryInterface(IID_ICompressSetCoderProperties, &scp);
+ if (scp)
+ RINOK(m.SetCoderProps(scp, NULL));
+ }
+ UInt32 digestSize = hasher->GetDigestSize();
+ if (digestSize > k_HashCalc_DigestSize_Max)
+ return E_NOTIMPL;
+ CHasherState &h = Hashers.AddNew();
+ h.Hasher = hasher;
+ h.Name = name;
+ h.DigestSize = digestSize;
+ for (unsigned i = 0; i < k_HashCalc_NumGroups; i++)
+ memset(h.Digests[i], 0, digestSize);
+ }
+
+ return S_OK;
+}
+
+void CHashBundle::InitForNewFile()
+{
+ CurSize = 0;
+ FOR_VECTOR (i, Hashers)
+ {
+ CHasherState &h = Hashers[i];
+ h.Hasher->Init();
+ memset(h.Digests[k_HashCalc_Index_Current], 0, h.DigestSize);
+ }
+}
+
+void CHashBundle::Update(const void *data, UInt32 size)
+{
+ CurSize += size;
+ FOR_VECTOR (i, Hashers)
+ Hashers[i].Hasher->Update(data, size);
+}
+
+void CHashBundle::SetSize(UInt64 size)
+{
+ CurSize = size;
+}
+
+static void AddDigests(Byte *dest, const Byte *src, UInt32 size)
+{
+ unsigned next = 0;
+ for (UInt32 i = 0; i < size; i++)
+ {
+ next += (unsigned)dest[i] + (unsigned)src[i];
+ dest[i] = (Byte)next;
+ next >>= 8;
+ }
+}
+
+void CHashBundle::Final(bool isDir, bool isAltStream, const UString &path)
+{
+ if (isDir)
+ NumDirs++;
+ else if (isAltStream)
+ {
+ NumAltStreams++;
+ AltStreamsSize += CurSize;
+ }
+ else
+ {
+ NumFiles++;
+ FilesSize += CurSize;
+ }
+
+ Byte pre[16];
+ memset(pre, 0, sizeof(pre));
+ if (isDir)
+ pre[0] = 1;
+
+ FOR_VECTOR (i, Hashers)
+ {
+ CHasherState &h = Hashers[i];
+ if (!isDir)
+ {
+ h.Hasher->Final(h.Digests[0]);
+ if (!isAltStream)
+ AddDigests(h.Digests[k_HashCalc_Index_DataSum], h.Digests[0], h.DigestSize);
+ }
+
+ h.Hasher->Init();
+ h.Hasher->Update(pre, sizeof(pre));
+ h.Hasher->Update(h.Digests[0], h.DigestSize);
+
+ for (unsigned k = 0; k < path.Len(); k++)
+ {
+ wchar_t c = path[k];
+ Byte temp[2] = { (Byte)(c & 0xFF), (Byte)((c >> 8) & 0xFF) };
+ h.Hasher->Update(temp, 2);
+ }
+
+ Byte tempDigest[k_HashCalc_DigestSize_Max];
+ h.Hasher->Final(tempDigest);
+ if (!isAltStream)
+ AddDigests(h.Digests[k_HashCalc_Index_NamesSum], tempDigest, h.DigestSize);
+ AddDigests(h.Digests[k_HashCalc_Index_StreamsSum], tempDigest, h.DigestSize);
+ }
+}
+
+
+HRESULT HashCalc(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ const NWildcard::CCensor &censor,
+ const CHashOptions &options,
+ AString &errorInfo,
+ IHashCallbackUI *callback)
+{
+ CDirItems dirItems;
+ dirItems.Callback = callback;
+
+ if (options.StdInMode)
+ {
+ CDirItem di;
+ di.Size = (UInt64)(Int64)-1;
+ di.Attrib = 0;
+ di.MTime.dwLowDateTime = 0;
+ di.MTime.dwHighDateTime = 0;
+ di.CTime = di.ATime = di.MTime;
+ dirItems.Items.Add(di);
+ }
+ else
+ {
+ RINOK(callback->StartScanning());
+ dirItems.ScanAltStreams = options.AltStreamsMode;
+
+ HRESULT res = EnumerateItems(censor,
+ options.PathMode,
+ UString(),
+ dirItems);
+
+ if (res != S_OK)
+ {
+ if (res != E_ABORT)
+ errorInfo = "Scanning error";
+ return res;
+ }
+ RINOK(callback->FinishScanning(dirItems.Stat));
+ }
+
+ unsigned i;
+ CHashBundle hb;
+ RINOK(hb.SetMethods(EXTERNAL_CODECS_LOC_VARS options.Methods));
+ hb.Init();
+
+ hb.NumErrors = dirItems.Stat.NumErrors;
+
+ if (options.StdInMode)
+ {
+ RINOK(callback->SetNumFiles(1));
+ }
+ else
+ {
+ RINOK(callback->SetTotal(dirItems.Stat.GetTotalBytes()));
+ }
+
+ const UInt32 kBufSize = 1 << 15;
+ CHashMidBuf buf;
+ if (!buf.Alloc(kBufSize))
+ return E_OUTOFMEMORY;
+
+ UInt64 completeValue = 0;
+
+ RINOK(callback->BeforeFirstFile(hb));
+
+ for (i = 0; i < dirItems.Items.Size(); i++)
+ {
+ CMyComPtr<ISequentialInStream> inStream;
+ UString path;
+ bool isDir = false;
+ bool isAltStream = false;
+ if (options.StdInMode)
+ {
+ inStream = new CStdInFileStream;
+ }
+ else
+ {
+ CInFileStream *inStreamSpec = new CInFileStream;
+ inStream = inStreamSpec;
+ const CDirItem &dirItem = dirItems.Items[i];
+ isDir = dirItem.IsDir();
+ isAltStream = dirItem.IsAltStream;
+ path = dirItems.GetLogPath(i);
+ if (!isDir)
+ {
+ FString phyPath = dirItems.GetPhyPath(i);
+ if (!inStreamSpec->OpenShared(phyPath, options.OpenShareForWrite))
+ {
+ HRESULT res = callback->OpenFileError(phyPath, ::GetLastError());
+ hb.NumErrors++;
+ if (res != S_FALSE)
+ return res;
+ continue;
+ }
+ }
+ }
+ RINOK(callback->GetStream(path, isDir));
+ UInt64 fileSize = 0;
+
+ hb.InitForNewFile();
+ if (!isDir)
+ {
+ for (UInt32 step = 0;; step++)
+ {
+ if ((step & 0xFF) == 0)
+ RINOK(callback->SetCompleted(&completeValue));
+ UInt32 size;
+ RINOK(inStream->Read(buf, kBufSize, &size));
+ if (size == 0)
+ break;
+ hb.Update(buf, size);
+ fileSize += size;
+ completeValue += size;
+ }
+ }
+ hb.Final(isDir, isAltStream, path);
+ RINOK(callback->SetOperationResult(fileSize, hb, !isDir));
+ RINOK(callback->SetCompleted(&completeValue));
+ }
+ return callback->AfterLastFile(hb);
+}
+
+
+static inline char GetHex(unsigned v)
+{
+ return (char)((v < 10) ? ('0' + v) : ('A' + (v - 10)));
+}
+
+void AddHashHexToString(char *dest, const Byte *data, UInt32 size)
+{
+ dest[size * 2] = 0;
+
+ if (!data)
+ {
+ for (UInt32 i = 0; i < size; i++)
+ {
+ dest[0] = ' ';
+ dest[1] = ' ';
+ dest += 2;
+ }
+ return;
+ }
+
+ int step = 2;
+ if (size <= 8)
+ {
+ step = -2;
+ dest += size * 2 - 2;
+ }
+
+ for (UInt32 i = 0; i < size; i++)
+ {
+ unsigned b = data[i];
+ dest[0] = GetHex((b >> 4) & 0xF);
+ dest[1] = GetHex(b & 0xF);
+ dest += step;
+ }
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/HashCalc.h b/3rdparty/lzma/CPP/7zip/UI/Common/HashCalc.h
new file mode 100644
index 00000000000..38908e2e8b3
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/HashCalc.h
@@ -0,0 +1,107 @@
+// HashCalc.h
+
+#ifndef __HASH_CALC_H
+#define __HASH_CALC_H
+
+#include "../../../Common/Wildcard.h"
+
+#include "../../Common/CreateCoder.h"
+#include "../../Common/MethodProps.h"
+
+#include "DirItem.h"
+#include "Property.h"
+
+const unsigned k_HashCalc_DigestSize_Max = 64;
+
+const unsigned k_HashCalc_NumGroups = 4;
+
+enum
+{
+ k_HashCalc_Index_Current,
+ k_HashCalc_Index_DataSum,
+ k_HashCalc_Index_NamesSum,
+ k_HashCalc_Index_StreamsSum
+};
+
+struct CHasherState
+{
+ CMyComPtr<IHasher> Hasher;
+ AString Name;
+ UInt32 DigestSize;
+ Byte Digests[k_HashCalc_NumGroups][k_HashCalc_DigestSize_Max];
+};
+
+struct IHashCalc
+{
+ virtual void InitForNewFile() = 0;
+ virtual void Update(const void *data, UInt32 size) = 0;
+ virtual void SetSize(UInt64 size) = 0;
+ virtual void Final(bool isDir, bool isAltStream, const UString &path) = 0;
+};
+
+struct CHashBundle: public IHashCalc
+{
+ CObjectVector<CHasherState> Hashers;
+
+ UInt64 NumDirs;
+ UInt64 NumFiles;
+ UInt64 NumAltStreams;
+ UInt64 FilesSize;
+ UInt64 AltStreamsSize;
+ UInt64 NumErrors;
+
+ UInt64 CurSize;
+
+ HRESULT SetMethods(DECL_EXTERNAL_CODECS_LOC_VARS const UStringVector &methods);
+
+ void Init()
+ {
+ NumDirs = NumFiles = NumAltStreams = FilesSize = AltStreamsSize = NumErrors = 0;
+ }
+
+ void InitForNewFile();
+ void Update(const void *data, UInt32 size);
+ void SetSize(UInt64 size);
+ void Final(bool isDir, bool isAltStream, const UString &path);
+};
+
+#define INTERFACE_IHashCallbackUI(x) \
+ INTERFACE_IDirItemsCallback(x) \
+ virtual HRESULT StartScanning() x; \
+ virtual HRESULT FinishScanning(const CDirItemsStat &st) x; \
+ virtual HRESULT SetNumFiles(UInt64 numFiles) x; \
+ virtual HRESULT SetTotal(UInt64 size) x; \
+ virtual HRESULT SetCompleted(const UInt64 *completeValue) x; \
+ virtual HRESULT CheckBreak() x; \
+ virtual HRESULT BeforeFirstFile(const CHashBundle &hb) x; \
+ virtual HRESULT GetStream(const wchar_t *name, bool isFolder) x; \
+ virtual HRESULT OpenFileError(const FString &path, DWORD systemError) x; \
+ virtual HRESULT SetOperationResult(UInt64 fileSize, const CHashBundle &hb, bool showHash) x; \
+ virtual HRESULT AfterLastFile(const CHashBundle &hb) x; \
+
+struct IHashCallbackUI: public IDirItemsCallback
+{
+ INTERFACE_IHashCallbackUI(=0)
+};
+
+struct CHashOptions
+{
+ UStringVector Methods;
+ bool OpenShareForWrite;
+ bool StdInMode;
+ bool AltStreamsMode;
+ NWildcard::ECensorPathMode PathMode;
+
+ CHashOptions(): StdInMode(false), OpenShareForWrite(false), AltStreamsMode(false), PathMode(NWildcard::k_RelatPath) {};
+};
+
+HRESULT HashCalc(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ const NWildcard::CCensor &censor,
+ const CHashOptions &options,
+ AString &errorInfo,
+ IHashCallbackUI *callback);
+
+void AddHashHexToString(char *dest, const Byte *data, UInt32 size);
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h b/3rdparty/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h
index e8dcdce5fa5..c456c862737 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h
@@ -1,11 +1,15 @@
// IFileExtractCallback.h
-#ifndef __IFILEEXTRACTCALLBACK_H
-#define __IFILEEXTRACTCALLBACK_H
+#ifndef __I_FILE_EXTRACT_CALLBACK_H
+#define __I_FILE_EXTRACT_CALLBACK_H
+
+#include "../../../Common/MyString.h"
-#include "Common/MyString.h"
#include "../../IDecl.h"
+#include "LoadCodecs.h"
+#include "OpenArchive.h"
+
namespace NOverwriteAnswer
{
enum EEnum
@@ -19,28 +23,92 @@ namespace NOverwriteAnswer
};
}
+
+/* ---------- IFolderArchiveExtractCallback ----------
+is implemented by
+ Console/ExtractCallbackConsole.h CExtractCallbackConsole
+ FileManager/ExtractCallback.h CExtractCallbackImp
+ FAR/ExtractEngine.cpp CExtractCallBackImp: (QueryInterface is not supported)
+
+IID_IFolderArchiveExtractCallback is requested by:
+ - Agent/ArchiveFolder.cpp
+ CAgentFolder::CopyTo(..., IFolderOperationsExtractCallback *callback)
+ is sent to IArchiveFolder::Extract()
+
+ - FileManager/PanelCopy.cpp
+ CPanel::CopyTo(), if (options->testMode)
+ is sent to IArchiveFolder::Extract()
+
+ IFolderArchiveExtractCallback is used by Common/ArchiveExtractCallback.cpp
+*/
+
+#define INTERFACE_IFolderArchiveExtractCallback(x) \
+ STDMETHOD(AskOverwrite)( \
+ const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize, \
+ const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize, \
+ Int32 *answer) x; \
+ STDMETHOD(PrepareOperation)(const wchar_t *name, Int32 isFolder, Int32 askExtractMode, const UInt64 *position) x; \
+ STDMETHOD(MessageError)(const wchar_t *message) x; \
+ STDMETHOD(SetOperationResult)(Int32 opRes, Int32 encrypted) x; \
+
DECL_INTERFACE_SUB(IFolderArchiveExtractCallback, IProgress, 0x01, 0x07)
{
-public:
- STDMETHOD(AskOverwrite)(
- const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize,
- const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize,
- Int32 *answer) PURE;
- STDMETHOD(PrepareOperation)(const wchar_t *name, bool isFolder, Int32 askExtractMode, const UInt64 *position) PURE;
- STDMETHOD(MessageError)(const wchar_t *message) PURE;
- STDMETHOD(SetOperationResult)(Int32 operationResult, bool encrypted) PURE;
+ INTERFACE_IFolderArchiveExtractCallback(PURE)
};
+#define INTERFACE_IFolderArchiveExtractCallback2(x) \
+ STDMETHOD(ReportExtractResult)(Int32 opRes, Int32 encrypted, const wchar_t *name) x; \
+
+DECL_INTERFACE_SUB(IFolderArchiveExtractCallback2, IUnknown, 0x01, 0x08)
+{
+ INTERFACE_IFolderArchiveExtractCallback2(PURE)
+};
+
+/* ---------- IExtractCallbackUI ----------
+is implemented by
+ Console/ExtractCallbackConsole.h CExtractCallbackConsole
+ FileManager/ExtractCallback.h CExtractCallbackImp
+*/
+
+#ifdef _NO_CRYPTO
+ #define INTERFACE_IExtractCallbackUI_Crypto(x)
+#else
+ #define INTERFACE_IExtractCallbackUI_Crypto(x) \
+ virtual HRESULT SetPassword(const UString &password) x;
+#endif
+
+#define INTERFACE_IExtractCallbackUI(x) \
+ virtual HRESULT BeforeOpen(const wchar_t *name, bool testMode) x; \
+ virtual HRESULT OpenResult(const CCodecs *codecs, const CArchiveLink &arcLink, const wchar_t *name, HRESULT result) x; \
+ virtual HRESULT ThereAreNoFiles() x; \
+ virtual HRESULT ExtractResult(HRESULT result) x; \
+ INTERFACE_IExtractCallbackUI_Crypto(x)
+
struct IExtractCallbackUI: IFolderArchiveExtractCallback
{
- virtual HRESULT BeforeOpen(const wchar_t *name) = 0;
- virtual HRESULT OpenResult(const wchar_t *name, HRESULT result, bool encrypted) = 0;
- virtual HRESULT ThereAreNoFiles() = 0;
- virtual HRESULT ExtractResult(HRESULT result) = 0;
-
- #ifndef _NO_CRYPTO
- virtual HRESULT SetPassword(const UString &password) = 0;
- #endif
+ INTERFACE_IExtractCallbackUI(PURE)
};
+
+
+#define INTERFACE_IGetProp(x) \
+ STDMETHOD(GetProp)(PROPID propID, PROPVARIANT *value) x; \
+
+DECL_INTERFACE_SUB(IGetProp, IUnknown, 0x01, 0x20)
+{
+ INTERFACE_IGetProp(PURE)
+};
+
+#define INTERFACE_IFolderExtractToStreamCallback(x) \
+ STDMETHOD(UseExtractToStream)(Int32 *res) x; \
+ STDMETHOD(GetStream7)(const wchar_t *name, Int32 isDir, ISequentialOutStream **outStream, Int32 askExtractMode, IGetProp *getProp) x; \
+ STDMETHOD(PrepareOperation7)(Int32 askExtractMode) x; \
+ STDMETHOD(SetOperationResult7)(Int32 resultEOperationResult, Int32 encrypted) x; \
+
+DECL_INTERFACE_SUB(IFolderExtractToStreamCallback, IUnknown, 0x01, 0x30)
+{
+ INTERFACE_IFolderExtractToStreamCallback(PURE)
+};
+
+
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp
index cb4f83ee7a1..5435499baa8 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp
@@ -1,41 +1,93 @@
// LoadCodecs.cpp
+/*
+EXTERNAL_CODECS
+---------------
+ CCodecs::Load() tries to detect the directory with plugins.
+ It stops the checking, if it can find any of the following items:
+ - 7z.dll file
+ - "Formats" subdir
+ - "Codecs" subdir
+ The order of check:
+ 1) directory of client executable
+ 2) WIN32: directory for REGISTRY item [HKEY_*\Software\7-Zip\Path**]
+ The order for HKEY_* : Path** :
+ - HKEY_CURRENT_USER : PathXX
+ - HKEY_LOCAL_MACHINE : PathXX
+ - HKEY_CURRENT_USER : Path
+ - HKEY_LOCAL_MACHINE : Path
+ PathXX is Path32 in 32-bit code
+ PathXX is Path64 in 64-bit code
+
+
+EXPORT_CODECS
+-------------
+ if (EXTERNAL_CODECS) is defined, then the code exports internal
+ codecs of client from CCodecs object to external plugins.
+ 7-Zip doesn't use that feature. 7-Zip uses the scheme:
+ - client application without internal plugins.
+ - 7z.dll module contains all (or almost all) plugins.
+ 7z.dll can use codecs from another plugins, if required.
+*/
+
+
#include "StdAfx.h"
-#include "LoadCodecs.h"
+#include "../../../../C/7zVersion.h"
#include "../../../Common/MyCom.h"
+#include "../../../Common/StringToInt.h"
+#include "../../../Common/StringConvert.h"
+
+#include "../../../Windows/PropVariant.h"
+
+#include "LoadCodecs.h"
+
+using namespace NWindows;
+
#ifdef NEW_FOLDER_INTERFACE
#include "../../../Common/StringToInt.h"
#endif
-#include "../../../Windows/PropVariant.h"
#include "../../ICoder.h"
#include "../../Common/RegisterArc.h"
#ifdef EXTERNAL_CODECS
-#include "../../../Windows/FileFind.h"
-#include "../../../Windows/DLL.h"
+
+// #define EXPORT_CODECS
+
+#endif
+
#ifdef NEW_FOLDER_INTERFACE
+extern HINSTANCE g_hInstance;
#include "../../../Windows/ResourceString.h"
static const UINT kIconTypesResId = 100;
#endif
+#ifdef EXTERNAL_CODECS
+
+#include "../../../Windows/FileFind.h"
+#include "../../../Windows/DLL.h"
+
#ifdef _WIN32
-#include "Windows/FileName.h"
-#include "Windows/Registry.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/Registry.h"
#endif
-using namespace NWindows;
using namespace NFile;
-#ifdef _WIN32
-extern HINSTANCE g_hInstance;
-#endif
#define kCodecsFolderName FTEXT("Codecs")
#define kFormatsFolderName FTEXT("Formats")
-static CFSTR kMainDll = FTEXT("7z.dll");
+
+
+static CFSTR kMainDll =
+ // #ifdef _WIN32
+ FTEXT("7z.dll");
+ // #else
+ // FTEXT("7z.so");
+ // #endif
+
#ifdef _WIN32
@@ -64,7 +116,97 @@ static bool ReadPathFromRegistry(HKEY baseKey, LPCWSTR value, FString &path)
return false;
}
-#endif
+#endif // _WIN32
+
+#endif // EXTERNAL_CODECS
+
+
+static const unsigned kNumArcsMax = 64;
+static unsigned g_NumArcs = 0;
+static const CArcInfo *g_Arcs[kNumArcsMax];
+
+void RegisterArc(const CArcInfo *arcInfo) throw()
+{
+ if (g_NumArcs < kNumArcsMax)
+ {
+ g_Arcs[g_NumArcs] = arcInfo;
+ g_NumArcs++;
+ }
+}
+
+static void SplitString(const UString &srcString, UStringVector &destStrings)
+{
+ destStrings.Clear();
+ UString s;
+ unsigned len = srcString.Len();
+ if (len == 0)
+ return;
+ for (unsigned i = 0; i < len; i++)
+ {
+ wchar_t c = srcString[i];
+ if (c == L' ')
+ {
+ if (!s.IsEmpty())
+ {
+ destStrings.Add(s);
+ s.Empty();
+ }
+ }
+ else
+ s += c;
+ }
+ if (!s.IsEmpty())
+ destStrings.Add(s);
+}
+
+int CArcInfoEx::FindExtension(const UString &ext) const
+{
+ FOR_VECTOR (i, Exts)
+ if (ext.IsEqualTo_NoCase(Exts[i].Ext))
+ return i;
+ return -1;
+}
+
+void CArcInfoEx::AddExts(const UString &ext, const UString &addExt)
+{
+ UStringVector exts, addExts;
+ SplitString(ext, exts);
+ SplitString(addExt, addExts);
+ FOR_VECTOR (i, exts)
+ {
+ CArcExtInfo extInfo;
+ extInfo.Ext = exts[i];
+ if (i < addExts.Size())
+ {
+ extInfo.AddExt = addExts[i];
+ if (extInfo.AddExt == L"*")
+ extInfo.AddExt.Empty();
+ }
+ Exts.Add(extInfo);
+ }
+}
+
+#ifndef _SFX
+
+static bool ParseSignatures(const Byte *data, unsigned size, CObjectVector<CByteBuffer> &signatures)
+{
+ signatures.Clear();
+ while (size > 0)
+ {
+ unsigned len = *data++;
+ size--;
+ if (len > size)
+ return false;
+ signatures.AddNew().CopyFrom(data, len);
+ data += len;
+ size -= len;
+ }
+ return true;
+}
+
+#endif // _SFX
+
+#ifdef EXTERNAL_CODECS
static FString GetBaseFolderPrefixFromRegistry()
{
@@ -84,22 +226,17 @@ static FString GetBaseFolderPrefixFromRegistry()
return moduleFolderPrefix;
}
-typedef UInt32 (WINAPI *GetNumberOfMethodsFunc)(UInt32 *numMethods);
-typedef UInt32 (WINAPI *GetNumberOfFormatsFunc)(UInt32 *numFormats);
-typedef UInt32 (WINAPI *GetHandlerPropertyFunc)(PROPID propID, PROPVARIANT *value);
-typedef UInt32 (WINAPI *GetHandlerPropertyFunc2)(UInt32 index, PROPID propID, PROPVARIANT *value);
-typedef UInt32 (WINAPI *CreateObjectFunc)(const GUID *clsID, const GUID *iid, void **outObject);
-typedef UInt32 (WINAPI *SetLargePageModeFunc)();
-
-static HRESULT GetCoderClass(GetMethodPropertyFunc getMethodProperty, UInt32 index,
+static HRESULT GetCoderClass(Func_GetMethodProperty getMethodProperty, UInt32 index,
PROPID propId, CLSID &clsId, bool &isAssigned)
{
- NWindows::NCOM::CPropVariant prop;
+ NCOM::CPropVariant prop;
isAssigned = false;
RINOK(getMethodProperty(index, propId, &prop));
if (prop.vt == VT_BSTR)
{
+ if (::SysStringByteLen(prop.bstrVal) != sizeof(GUID))
+ return E_FAIL;
isAssigned = true;
clsId = *(const GUID *)prop.bstrVal;
}
@@ -111,34 +248,53 @@ static HRESULT GetCoderClass(GetMethodPropertyFunc getMethodProperty, UInt32 ind
HRESULT CCodecs::LoadCodecs()
{
CCodecLib &lib = Libs.Back();
- lib.GetMethodProperty = (GetMethodPropertyFunc)lib.Lib.GetProc("GetMethodProperty");
- if (lib.GetMethodProperty == NULL)
- return S_OK;
- UInt32 numMethods = 1;
- GetNumberOfMethodsFunc getNumberOfMethodsFunc = (GetNumberOfMethodsFunc)lib.Lib.GetProc("GetNumberOfMethods");
- if (getNumberOfMethodsFunc != NULL)
+ lib.CreateDecoder = (Func_CreateDecoder)lib.Lib.GetProc("CreateDecoder");
+ lib.CreateEncoder = (Func_CreateEncoder)lib.Lib.GetProc("CreateEncoder");
+ lib.GetMethodProperty = (Func_GetMethodProperty)lib.Lib.GetProc("GetMethodProperty");
+
+ if (lib.GetMethodProperty)
{
- RINOK(getNumberOfMethodsFunc(&numMethods));
+ UInt32 numMethods = 1;
+ Func_GetNumberOfMethods getNumberOfMethods = (Func_GetNumberOfMethods)lib.Lib.GetProc("GetNumberOfMethods");
+ if (getNumberOfMethods)
+ {
+ RINOK(getNumberOfMethods(&numMethods));
+ }
+ for (UInt32 i = 0; i < numMethods; i++)
+ {
+ CDllCodecInfo info;
+ info.LibIndex = Libs.Size() - 1;
+ info.CodecIndex = i;
+ RINOK(GetCoderClass(lib.GetMethodProperty, i, NMethodPropID::kEncoder, info.Encoder, info.EncoderIsAssigned));
+ RINOK(GetCoderClass(lib.GetMethodProperty, i, NMethodPropID::kDecoder, info.Decoder, info.DecoderIsAssigned));
+ Codecs.Add(info);
+ }
}
- for(UInt32 i = 0; i < numMethods; i++)
+ Func_GetHashers getHashers = (Func_GetHashers)lib.Lib.GetProc("GetHashers");
+ if (getHashers)
{
- CDllCodecInfo info;
- info.LibIndex = Libs.Size() - 1;
- info.CodecIndex = i;
-
- RINOK(GetCoderClass(lib.GetMethodProperty, i, NMethodPropID::kEncoder, info.Encoder, info.EncoderIsAssigned));
- RINOK(GetCoderClass(lib.GetMethodProperty, i, NMethodPropID::kDecoder, info.Decoder, info.DecoderIsAssigned));
-
- Codecs.Add(info);
+ RINOK(getHashers(&lib.ComHashers));
+ if (lib.ComHashers)
+ {
+ UInt32 numMethods = lib.ComHashers->GetNumHashers();
+ for (UInt32 i = 0; i < numMethods; i++)
+ {
+ CDllHasherInfo info;
+ info.LibIndex = Libs.Size() - 1;
+ info.HasherIndex = i;
+ Hashers.Add(info);
+ }
+ }
}
+
return S_OK;
}
-static HRESULT ReadProp(
- GetHandlerPropertyFunc getProp,
- GetHandlerPropertyFunc2 getProp2,
+static HRESULT GetProp(
+ Func_GetHandlerProperty getProp,
+ Func_GetHandlerProperty2 getProp2,
UInt32 index, PROPID propID, NCOM::CPropVariant &prop)
{
if (getProp2)
@@ -146,13 +302,14 @@ static HRESULT ReadProp(
return getProp(propID, &prop);
}
-static HRESULT ReadBoolProp(
- GetHandlerPropertyFunc getProp,
- GetHandlerPropertyFunc2 getProp2,
+static HRESULT GetProp_Bool(
+ Func_GetHandlerProperty getProp,
+ Func_GetHandlerProperty2 getProp2,
UInt32 index, PROPID propID, bool &res)
{
+ res = false;
NCOM::CPropVariant prop;
- RINOK(ReadProp(getProp, getProp2, index, propID, prop));
+ RINOK(GetProp(getProp, getProp2, index, propID, prop));
if (prop.vt == VT_BOOL)
res = VARIANT_BOOLToBool(prop.boolVal);
else if (prop.vt != VT_EMPTY)
@@ -160,190 +317,154 @@ static HRESULT ReadBoolProp(
return S_OK;
}
-static HRESULT ReadStringProp(
- GetHandlerPropertyFunc getProp,
- GetHandlerPropertyFunc2 getProp2,
- UInt32 index, PROPID propID, UString &res)
+static HRESULT GetProp_UInt32(
+ Func_GetHandlerProperty getProp,
+ Func_GetHandlerProperty2 getProp2,
+ UInt32 index, PROPID propID, UInt32 &res, bool &defined)
{
+ res = 0;
+ defined = false;
NCOM::CPropVariant prop;
- RINOK(ReadProp(getProp, getProp2, index, propID, prop));
- if (prop.vt == VT_BSTR)
- res = prop.bstrVal;
+ RINOK(GetProp(getProp, getProp2, index, propID, prop));
+ if (prop.vt == VT_UI4)
+ {
+ res = prop.ulVal;
+ defined = true;
+ }
else if (prop.vt != VT_EMPTY)
return E_FAIL;
return S_OK;
}
-#endif
-
-static const unsigned int kNumArcsMax = 48;
-static unsigned int g_NumArcs = 0;
-static const CArcInfo *g_Arcs[kNumArcsMax];
-void RegisterArc(const CArcInfo *arcInfo)
+static HRESULT GetProp_String(
+ Func_GetHandlerProperty getProp,
+ Func_GetHandlerProperty2 getProp2,
+ UInt32 index, PROPID propID, UString &res)
{
- if (g_NumArcs < kNumArcsMax)
- g_Arcs[g_NumArcs++] = arcInfo;
+ res.Empty();
+ NCOM::CPropVariant prop;
+ RINOK(GetProp(getProp, getProp2, index, propID, prop));
+ if (prop.vt == VT_BSTR)
+ res.SetFromBstr(prop.bstrVal);
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+ return S_OK;
}
-static void SplitString(const UString &srcString, UStringVector &destStrings)
+static HRESULT GetProp_RawData(
+ Func_GetHandlerProperty getProp,
+ Func_GetHandlerProperty2 getProp2,
+ UInt32 index, PROPID propID, CByteBuffer &bb)
{
- destStrings.Clear();
- UString s;
- int len = srcString.Length();
- if (len == 0)
- return;
- for (int i = 0; i < len; i++)
+ bb.Free();
+ NCOM::CPropVariant prop;
+ RINOK(GetProp(getProp, getProp2, index, propID, prop));
+ if (prop.vt == VT_BSTR)
{
- wchar_t c = srcString[i];
- if (c == L' ')
- {
- if (!s.IsEmpty())
- {
- destStrings.Add(s);
- s.Empty();
- }
- }
- else
- s += c;
+ UINT len = ::SysStringByteLen(prop.bstrVal);
+ bb.CopyFrom((const Byte *)prop.bstrVal, len);
}
- if (!s.IsEmpty())
- destStrings.Add(s);
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+ return S_OK;
}
-int CArcInfoEx::FindExtension(const UString &ext) const
+static const UInt32 kArcFlagsPars[] =
{
- for (int i = 0; i < Exts.Size(); i++)
- if (ext.CompareNoCase(Exts[i].Ext) == 0)
- return i;
- return -1;
-}
+ NArchive::NHandlerPropID::kKeepName, NArcInfoFlags::kKeepName,
+ NArchive::NHandlerPropID::kAltStreams, NArcInfoFlags::kAltStreams,
+ NArchive::NHandlerPropID::kNtSecure, NArcInfoFlags::kNtSecure
+};
-void CArcInfoEx::AddExts(const wchar_t *ext, const wchar_t *addExt)
+HRESULT CCodecs::LoadFormats()
{
- UStringVector exts, addExts;
- if (ext != 0)
- SplitString(ext, exts);
- if (addExt != 0)
- SplitString(addExt, addExts);
- for (int i = 0; i < exts.Size(); i++)
+ const NDLL::CLibrary &lib = Libs.Back().Lib;
+
+ Func_GetHandlerProperty getProp = NULL;
+ Func_GetHandlerProperty2 getProp2 = (Func_GetHandlerProperty2)lib.GetProc("GetHandlerProperty2");
+ Func_GetIsArc getIsArc = (Func_GetIsArc)lib.GetProc("GetIsArc");
+
+ UInt32 numFormats = 1;
+
+ if (getProp2)
{
- CArcExtInfo extInfo;
- extInfo.Ext = exts[i];
- if (i < addExts.Size())
+ Func_GetNumberOfFormats getNumberOfFormats = (Func_GetNumberOfFormats)lib.GetProc("GetNumberOfFormats");
+ if (getNumberOfFormats)
{
- extInfo.AddExt = addExts[i];
- if (extInfo.AddExt == L"*")
- extInfo.AddExt.Empty();
+ RINOK(getNumberOfFormats(&numFormats));
}
- Exts.Add(extInfo);
}
-}
-
-#ifdef EXTERNAL_CODECS
-
-HRESULT CCodecs::LoadFormats()
-{
- const NDLL::CLibrary &lib = Libs.Back().Lib;
- GetHandlerPropertyFunc getProp = 0;
- GetHandlerPropertyFunc2 getProp2 = (GetHandlerPropertyFunc2)lib.GetProc("GetHandlerProperty2");
- if (getProp2 == NULL)
+ else
{
- getProp = (GetHandlerPropertyFunc)lib.GetProc("GetHandlerProperty");
- if (getProp == NULL)
+ getProp = (Func_GetHandlerProperty)lib.GetProc("GetHandlerProperty");
+ if (!getProp)
return S_OK;
}
-
- UInt32 numFormats = 1;
- GetNumberOfFormatsFunc getNumberOfFormats = (GetNumberOfFormatsFunc)lib.GetProc("GetNumberOfFormats");
- if (getNumberOfFormats != NULL)
- {
- RINOK(getNumberOfFormats(&numFormats));
- }
- if (getProp2 == NULL)
- numFormats = 1;
-
- for(UInt32 i = 0; i < numFormats; i++)
+
+ for (UInt32 i = 0; i < numFormats; i++)
{
CArcInfoEx item;
item.LibIndex = Libs.Size() - 1;
item.FormatIndex = i;
- RINOK(ReadStringProp(getProp, getProp2, i, NArchive::kName, item.Name));
+ RINOK(GetProp_String(getProp, getProp2, i, NArchive::NHandlerPropID::kName, item.Name));
- NCOM::CPropVariant prop;
- if (ReadProp(getProp, getProp2, i, NArchive::kClassID, prop) != S_OK)
- continue;
- if (prop.vt != VT_BSTR)
- continue;
- item.ClassID = *(const GUID *)prop.bstrVal;
- prop.Clear();
+ {
+ NCOM::CPropVariant prop;
+ if (GetProp(getProp, getProp2, i, NArchive::NHandlerPropID::kClassID, prop) != S_OK)
+ continue;
+ if (prop.vt != VT_BSTR)
+ continue;
+ if (::SysStringByteLen(prop.bstrVal) != sizeof(GUID))
+ return E_FAIL;
+ item.ClassID = *(const GUID *)prop.bstrVal;
+ prop.Clear();
+ }
UString ext, addExt;
- RINOK(ReadStringProp(getProp, getProp2, i, NArchive::kExtension, ext));
- RINOK(ReadStringProp(getProp, getProp2, i, NArchive::kAddExtension, addExt));
+ RINOK(GetProp_String(getProp, getProp2, i, NArchive::NHandlerPropID::kExtension, ext));
+ RINOK(GetProp_String(getProp, getProp2, i, NArchive::NHandlerPropID::kAddExtension, addExt));
item.AddExts(ext, addExt);
- ReadBoolProp(getProp, getProp2, i, NArchive::kUpdate, item.UpdateEnabled);
- if (item.UpdateEnabled)
- ReadBoolProp(getProp, getProp2, i, NArchive::kKeepName, item.KeepName);
-
- if (ReadProp(getProp, getProp2, i, NArchive::kStartSignature, prop) == S_OK)
- if (prop.vt == VT_BSTR)
- {
- UINT len = ::SysStringByteLen(prop.bstrVal);
- item.StartSignature.SetCapacity(len);
- memmove(item.StartSignature, prop.bstrVal, len);
- }
- Formats.Add(item);
- }
- return S_OK;
-}
-
-#ifdef NEW_FOLDER_INTERFACE
-void CCodecIcons::LoadIcons(HMODULE m)
-{
- UString iconTypes = MyLoadStringW(m, kIconTypesResId);
- UStringVector pairs;
- SplitString(iconTypes, pairs);
- for (int i = 0; i < pairs.Size(); i++)
- {
- const UString &s = pairs[i];
- int pos = s.Find(L':');
- CIconPair iconPair;
- iconPair.IconIndex = -1;
- if (pos < 0)
- pos = s.Length();
- else
+ GetProp_Bool(getProp, getProp2, i, NArchive::NHandlerPropID::kUpdate, item.UpdateEnabled);
+ bool flags_Defined = false;
+ RINOK(GetProp_UInt32(getProp, getProp2, i, NArchive::NHandlerPropID::kFlags, item.Flags, flags_Defined));
+ item.NewInterface = flags_Defined;
+ if (!flags_Defined) // && item.UpdateEnabled
{
- UString num = s.Mid(pos + 1);
- if (!num.IsEmpty())
+ // support for DLL version before 9.31:
+ for (unsigned j = 0; j < ARRAY_SIZE(kArcFlagsPars); j += 2)
{
- const wchar_t *end;
- iconPair.IconIndex = (UInt32)ConvertStringToUInt64(num, &end);
- if (*end != L'\0')
- continue;
+ bool val = false;
+ GetProp_Bool(getProp, getProp2, i, kArcFlagsPars[j], val);
+ if (val)
+ item.Flags |= kArcFlagsPars[j + 1];
}
}
- iconPair.Ext = s.Left(pos);
- IconPairs.Add(iconPair);
- }
-}
-
-bool CCodecIcons::FindIconIndex(const UString &ext, int &iconIndex) const
-{
- iconIndex = -1;
- for (int i = 0; i < IconPairs.Size(); i++)
- {
- const CIconPair &pair = IconPairs[i];
- if (ext.CompareNoCase(pair.Ext) == 0)
+
+ CByteBuffer sig;
+ RINOK(GetProp_RawData(getProp, getProp2, i, NArchive::NHandlerPropID::kSignature, sig));
+ if (sig.Size() != 0)
+ item.Signatures.Add(sig);
+ else
{
- iconIndex = pair.IconIndex;
- return true;
+ RINOK(GetProp_RawData(getProp, getProp2, i, NArchive::NHandlerPropID::kMultiSignature, sig));
+ ParseSignatures(sig, (unsigned)sig.Size(), item.Signatures);
}
+
+ bool signatureOffset_Defined;
+ RINOK(GetProp_UInt32(getProp, getProp2, i, NArchive::NHandlerPropID::kSignatureOffset, item.SignatureOffset, signatureOffset_Defined));
+
+ // bool version_Defined;
+ // RINOK(GetProp_UInt32(getProp, getProp2, i, NArchive::NHandlerPropID::kVersion, item.Version, version_Defined));
+
+ if (getIsArc)
+ getIsArc(i, &item.IsArcFunc);
+
+ Formats.Add(item);
}
- return false;
+ return S_OK;
}
-#endif
#ifdef _7ZIP_LARGE_PAGES
extern "C"
@@ -352,23 +473,28 @@ extern "C"
}
#endif
-HRESULT CCodecs::LoadDll(const FString &dllPath, bool needCheckDll)
+HRESULT CCodecs::LoadDll(const FString &dllPath, bool needCheckDll, bool *loadedOK)
{
+ if (loadedOK)
+ *loadedOK = false;
+
if (needCheckDll)
{
- NDLL::CLibrary library;
- if (!library.LoadEx(dllPath, LOAD_LIBRARY_AS_DATAFILE))
+ NDLL::CLibrary lib;
+ if (!lib.LoadEx(dllPath, LOAD_LIBRARY_AS_DATAFILE))
return S_OK;
}
- Libs.Add(CCodecLib());
+
+ Libs.AddNew();
CCodecLib &lib = Libs.Back();
- #ifdef NEW_FOLDER_INTERFACE
lib.Path = dllPath;
- #endif
bool used = false;
HRESULT res = S_OK;
+
if (lib.Lib.Load(dllPath))
{
+ if (loadedOK)
+ *loadedOK = true;
#ifdef NEW_FOLDER_INTERFACE
lib.LoadIcons();
#endif
@@ -376,28 +502,38 @@ HRESULT CCodecs::LoadDll(const FString &dllPath, bool needCheckDll)
#ifdef _7ZIP_LARGE_PAGES
if (g_LargePageSize != 0)
{
- SetLargePageModeFunc setLargePageMode = (SetLargePageModeFunc)lib.Lib.GetProc("SetLargePageMode");
- if (setLargePageMode != 0)
+ Func_SetLargePageMode setLargePageMode = (Func_SetLargePageMode)lib.Lib.GetProc("SetLargePageMode");
+ if (setLargePageMode)
setLargePageMode();
}
#endif
- lib.CreateObject = (CreateObjectFunc)lib.Lib.GetProc("CreateObject");
- if (lib.CreateObject != 0)
+ if (CaseSensitiveChange)
{
- int startSize = Codecs.Size();
+ Func_SetCaseSensitive setCaseSensitive = (Func_SetCaseSensitive)lib.Lib.GetProc("SetCaseSensitive");
+ if (setCaseSensitive)
+ setCaseSensitive(CaseSensitive ? 1 : 0);
+ }
+
+ lib.CreateObject = (Func_CreateObject)lib.Lib.GetProc("CreateObject");
+ if (lib.CreateObject)
+ {
+ unsigned startSize = Codecs.Size() + Hashers.Size();
res = LoadCodecs();
- used = (Codecs.Size() != startSize);
+ used = (startSize != Codecs.Size() + Hashers.Size());
if (res == S_OK)
{
startSize = Formats.Size();
res = LoadFormats();
- used = used || (Formats.Size() != startSize);
+ if (startSize != Formats.Size())
+ used = true;
}
}
}
+
if (!used)
Libs.DeleteBack();
+
return res;
}
@@ -414,15 +550,31 @@ HRESULT CCodecs::LoadDllsFromFolder(const FString &folderPrefix)
return S_OK;
}
-#endif
-
-#ifndef _SFX
-static inline void SetBuffer(CByteBuffer &bb, const Byte *data, int size)
+void CCodecs::CloseLibs()
{
- bb.SetCapacity(size);
- memmove((Byte *)bb, data, size);
+ // OutputDebugStringA("~CloseLibs start");
+ /*
+ WIN32: FreeLibrary() (CLibrary::Free()) function doesn't work as expected,
+ if it's called from another FreeLibrary() call.
+ So we need to call FreeLibrary() before global destructors.
+
+ Also we free global links from DLLs to object of this module before CLibrary::Free() call.
+ */
+
+ FOR_VECTOR(i, Libs)
+ {
+ const CCodecLib &lib = Libs[i];
+ if (lib.SetCodecs)
+ lib.SetCodecs(NULL);
+ }
+
+ // OutputDebugStringA("~CloseLibs after SetCodecs");
+ Libs.Clear();
+ // OutputDebugStringA("~CloseLibs end");
}
-#endif
+
+#endif // EXTERNAL_CODECS
+
HRESULT CCodecs::Load()
{
@@ -431,31 +583,92 @@ HRESULT CCodecs::Load()
#endif
Formats.Clear();
+
#ifdef EXTERNAL_CODECS
- Codecs.Clear();
+ MainDll_ErrorPath.Empty();
+ Codecs.Clear();
+ Hashers.Clear();
#endif
+
for (UInt32 i = 0; i < g_NumArcs; i++)
{
const CArcInfo &arc = *g_Arcs[i];
CArcInfoEx item;
- item.Name = arc.Name;
+
+ item.Name.SetFromAscii(arc.Name);
item.CreateInArchive = arc.CreateInArchive;
- item.CreateOutArchive = arc.CreateOutArchive;
- item.AddExts(arc.Ext, arc.AddExt);
- item.UpdateEnabled = (arc.CreateOutArchive != 0);
- item.KeepName = arc.KeepName;
+ item.IsArcFunc = arc.IsArc;
+ item.Flags = arc.Flags;
+
+ {
+ UString e, ae;
+ if (arc.Ext)
+ e.SetFromAscii(arc.Ext);
+ if (arc.AddExt)
+ ae.SetFromAscii(arc.AddExt);
+ item.AddExts(e, ae);
+ }
#ifndef _SFX
- SetBuffer(item.StartSignature, arc.Signature, arc.SignatureSize);
+
+ item.CreateOutArchive = arc.CreateOutArchive;
+ item.UpdateEnabled = (arc.CreateOutArchive != NULL);
+ item.SignatureOffset = arc.SignatureOffset;
+ // item.Version = MY_VER_MIX;
+ item.NewInterface = true;
+
+ if (arc.IsMultiSignature())
+ ParseSignatures(arc.Signature, arc.SignatureSize, item.Signatures);
+ else
+ item.Signatures.AddNew().CopyFrom(arc.Signature, arc.SignatureSize);
+
#endif
+
Formats.Add(item);
}
+
#ifdef EXTERNAL_CODECS
- const FString baseFolder = GetBaseFolderPrefixFromRegistry();
- RINOK(LoadDll(baseFolder + kMainDll, false));
- RINOK(LoadDllsFromFolder(baseFolder + kCodecsFolderName FSTRING_PATH_SEPARATOR));
- RINOK(LoadDllsFromFolder(baseFolder + kFormatsFolderName FSTRING_PATH_SEPARATOR));
+ const FString baseFolder = GetBaseFolderPrefixFromRegistry();
+ {
+ bool loadedOK;
+ RINOK(LoadDll(baseFolder + kMainDll, false, &loadedOK));
+ if (!loadedOK)
+ MainDll_ErrorPath = kMainDll;
+ }
+ RINOK(LoadDllsFromFolder(baseFolder + kCodecsFolderName FSTRING_PATH_SEPARATOR));
+ RINOK(LoadDllsFromFolder(baseFolder + kFormatsFolderName FSTRING_PATH_SEPARATOR));
+
+ NeedSetLibCodecs = true;
+
+ if (Libs.Size() == 0)
+ NeedSetLibCodecs = false;
+ else if (Libs.Size() == 1)
+ {
+ // we don't need to set ISetCompressCodecsInfo, if all arcs and codecs are in one external module.
+ #ifndef EXPORT_CODECS
+ if (g_NumArcs == 0)
+ NeedSetLibCodecs = false;
+ #endif
+ }
+
+ if (NeedSetLibCodecs)
+ {
+ /* 15.00: now we call global function in DLL: SetCompressCodecsInfo(c)
+ old versions called only ISetCompressCodecsInfo::SetCompressCodecsInfo(c) for each archive handler */
+
+ FOR_VECTOR(i, Libs)
+ {
+ CCodecLib &lib = Libs[i];
+ lib.SetCodecs = (Func_SetCodecs)lib.Lib.GetProc("SetCodecs");
+ if (lib.SetCodecs)
+ {
+ RINOK(lib.SetCodecs(this));
+ }
+ }
+ }
+
#endif
+
return S_OK;
}
@@ -463,16 +676,21 @@ HRESULT CCodecs::Load()
int CCodecs::FindFormatForArchiveName(const UString &arcPath) const
{
- int slashPos = arcPath.ReverseFind(WCHAR_PATH_SEPARATOR);
- int dotPos = arcPath.ReverseFind(L'.');
- if (dotPos < 0 || dotPos < slashPos)
+ int dotPos = arcPath.ReverseFind_Dot();
+ if (dotPos <= arcPath.ReverseFind_PathSepar())
return -1;
- const UString ext = arcPath.Mid(dotPos + 1);
- for (int i = 0; i < Formats.Size(); i++)
+ const UString ext = arcPath.Ptr(dotPos + 1);
+ if (ext.IsEmpty())
+ return -1;
+ if (ext.IsEqualTo_Ascii_NoCase("exe"))
+ return -1;
+ FOR_VECTOR (i, Formats)
{
const CArcInfoEx &arc = Formats[i];
+ /*
if (!arc.UpdateEnabled)
continue;
+ */
if (arc.FindExtension(ext) >= 0)
return i;
}
@@ -483,7 +701,7 @@ int CCodecs::FindFormatForExtension(const UString &ext) const
{
if (ext.IsEmpty())
return -1;
- for (int i = 0; i < Formats.Size(); i++)
+ FOR_VECTOR (i, Formats)
if (Formats[i].FindExtension(ext) >= 0)
return i;
return -1;
@@ -491,8 +709,8 @@ int CCodecs::FindFormatForExtension(const UString &ext) const
int CCodecs::FindFormatForArchiveType(const UString &arcType) const
{
- for (int i = 0; i < Formats.Size(); i++)
- if (Formats[i].Name.CompareNoCase(arcType) == 0)
+ FOR_VECTOR (i, Formats)
+ if (Formats[i].Name.IsEqualTo_NoCase(arcType))
return i;
return -1;
}
@@ -500,12 +718,14 @@ int CCodecs::FindFormatForArchiveType(const UString &arcType) const
bool CCodecs::FindFormatForArchiveType(const UString &arcType, CIntVector &formatIndices) const
{
formatIndices.Clear();
- for (int pos = 0; pos < arcType.Length();)
+ for (unsigned pos = 0; pos < arcType.Len();)
{
- int pos2 = arcType.Find('.', pos);
+ int pos2 = arcType.Find(L'.', pos);
if (pos2 < 0)
- pos2 = arcType.Length();
+ pos2 = arcType.Len();
const UString name = arcType.Mid(pos, pos2 - pos);
+ if (name.IsEmpty())
+ return false;
int index = FindFormatForArchiveType(name);
if (index < 0 && name != L"*")
{
@@ -518,24 +738,90 @@ bool CCodecs::FindFormatForArchiveType(const UString &arcType, CIntVector &forma
return true;
}
-#endif
+#endif // _SFX
+
+
+#ifdef NEW_FOLDER_INTERFACE
+
+void CCodecIcons::LoadIcons(HMODULE m)
+{
+ UString iconTypes;
+ MyLoadString(m, kIconTypesResId, iconTypes);
+ UStringVector pairs;
+ SplitString(iconTypes, pairs);
+ FOR_VECTOR (i, pairs)
+ {
+ const UString &s = pairs[i];
+ int pos = s.Find(L':');
+ CIconPair iconPair;
+ iconPair.IconIndex = -1;
+ if (pos < 0)
+ pos = s.Len();
+ else
+ {
+ UString num = s.Ptr(pos + 1);
+ if (!num.IsEmpty())
+ {
+ const wchar_t *end;
+ iconPair.IconIndex = ConvertStringToUInt32(num, &end);
+ if (*end != 0)
+ continue;
+ }
+ }
+ iconPair.Ext = s.Left(pos);
+ IconPairs.Add(iconPair);
+ }
+}
+
+bool CCodecIcons::FindIconIndex(const UString &ext, int &iconIndex) const
+{
+ iconIndex = -1;
+ FOR_VECTOR (i, IconPairs)
+ {
+ const CIconPair &pair = IconPairs[i];
+ if (ext.IsEqualTo_NoCase(pair.Ext))
+ {
+ iconIndex = pair.IconIndex;
+ return true;
+ }
+ }
+ return false;
+}
+
+#endif // NEW_FOLDER_INTERFACE
+
#ifdef EXTERNAL_CODECS
+// #define EXPORT_CODECS
+
#ifdef EXPORT_CODECS
-extern unsigned int g_NumCodecs;
-STDAPI CreateCoder2(bool encode, UInt32 index, const GUID *iid, void **outObject);
+
+extern unsigned g_NumCodecs;
+STDAPI CreateDecoder(UInt32 index, const GUID *iid, void **outObject);
+STDAPI CreateEncoder(UInt32 index, const GUID *iid, void **outObject);
STDAPI GetMethodProperty(UInt32 codecIndex, PROPID propID, PROPVARIANT *value);
-// STDAPI GetNumberOfMethods(UInt32 *numCodecs);
-#endif
+#define NUM_EXPORT_CODECS g_NumCodecs
+
+extern unsigned g_NumHashers;
+STDAPI CreateHasher(UInt32 index, IHasher **hasher);
+STDAPI GetHasherProp(UInt32 codecIndex, PROPID propID, PROPVARIANT *value);
+#define NUM_EXPORT_HASHERS g_NumHashers
+
+#else // EXPORT_CODECS
+
+#define NUM_EXPORT_CODECS 0
+#define NUM_EXPORT_HASHERS 0
-STDMETHODIMP CCodecs::GetNumberOfMethods(UInt32 *numMethods)
+#endif // EXPORT_CODECS
+
+STDMETHODIMP CCodecs::GetNumMethods(UInt32 *numMethods)
{
- *numMethods =
- #ifdef EXPORT_CODECS
- g_NumCodecs +
- #endif
- Codecs.Size();
+ *numMethods = NUM_EXPORT_CODECS
+ #ifdef EXTERNAL_CODECS
+ + Codecs.Size()
+ #endif
+ ;
return S_OK;
}
@@ -546,128 +832,197 @@ STDMETHODIMP CCodecs::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *valu
return GetMethodProperty(index, propID, value);
#endif
- const CDllCodecInfo &ci = Codecs[index
- #ifdef EXPORT_CODECS
- - g_NumCodecs
- #endif
- ];
+ #ifdef EXTERNAL_CODECS
+ const CDllCodecInfo &ci = Codecs[index - NUM_EXPORT_CODECS];
- if (propID == NMethodPropID::kDecoderIsAssigned)
+ if (propID == NMethodPropID::kDecoderIsAssigned ||
+ propID == NMethodPropID::kEncoderIsAssigned)
{
- NWindows::NCOM::CPropVariant propVariant;
- propVariant = ci.DecoderIsAssigned;
- propVariant.Detach(value);
- return S_OK;
- }
- if (propID == NMethodPropID::kEncoderIsAssigned)
- {
- NWindows::NCOM::CPropVariant propVariant;
- propVariant = ci.EncoderIsAssigned;
- propVariant.Detach(value);
+ NCOM::CPropVariant prop;
+ prop = (bool)((propID == NMethodPropID::kDecoderIsAssigned) ?
+ ci.DecoderIsAssigned :
+ ci.EncoderIsAssigned);
+ prop.Detach(value);
return S_OK;
}
- return Libs[ci.LibIndex].GetMethodProperty(ci.CodecIndex, propID, value);
+ const CCodecLib &lib = Libs[ci.LibIndex];
+ return lib.GetMethodProperty(ci.CodecIndex, propID, value);
+ #else
+ return E_FAIL;
+ #endif
}
STDMETHODIMP CCodecs::CreateDecoder(UInt32 index, const GUID *iid, void **coder)
{
#ifdef EXPORT_CODECS
if (index < g_NumCodecs)
- return CreateCoder2(false, index, iid, coder);
+ return CreateDecoder(index, iid, coder);
#endif
- const CDllCodecInfo &ci = Codecs[index
- #ifdef EXPORT_CODECS
- - g_NumCodecs
- #endif
- ];
+
+ #ifdef EXTERNAL_CODECS
+ const CDllCodecInfo &ci = Codecs[index - NUM_EXPORT_CODECS];
if (ci.DecoderIsAssigned)
- return Libs[ci.LibIndex].CreateObject(&ci.Decoder, iid, (void **)coder);
+ {
+ const CCodecLib &lib = Libs[ci.LibIndex];
+ if (lib.CreateDecoder)
+ return lib.CreateDecoder(ci.CodecIndex, iid, (void **)coder);
+ return lib.CreateObject(&ci.Decoder, iid, (void **)coder);
+ }
return S_OK;
+ #else
+ return E_FAIL;
+ #endif
}
STDMETHODIMP CCodecs::CreateEncoder(UInt32 index, const GUID *iid, void **coder)
{
#ifdef EXPORT_CODECS
if (index < g_NumCodecs)
- return CreateCoder2(true, index, iid, coder);
+ return CreateEncoder(index, iid, coder);
#endif
- const CDllCodecInfo &ci = Codecs[index
- #ifdef EXPORT_CODECS
- - g_NumCodecs
- #endif
- ];
+
+ #ifdef EXTERNAL_CODECS
+ const CDllCodecInfo &ci = Codecs[index - NUM_EXPORT_CODECS];
if (ci.EncoderIsAssigned)
- return Libs[ci.LibIndex].CreateObject(&ci.Encoder, iid, (void **)coder);
+ {
+ const CCodecLib &lib = Libs[ci.LibIndex];
+ if (lib.CreateEncoder)
+ return lib.CreateEncoder(ci.CodecIndex, iid, (void **)coder);
+ return lib.CreateObject(&ci.Encoder, iid, (void **)coder);
+ }
return S_OK;
+ #else
+ return E_FAIL;
+ #endif
}
-HRESULT CCodecs::CreateCoder(const UString &name, bool encode, CMyComPtr<ICompressCoder> &coder) const
+
+STDMETHODIMP_(UInt32) CCodecs::GetNumHashers()
{
- for (int i = 0; i < Codecs.Size(); i++)
- {
- const CDllCodecInfo &codec = Codecs[i];
- if (encode && !codec.EncoderIsAssigned || !encode && !codec.DecoderIsAssigned)
- continue;
- const CCodecLib &lib = Libs[codec.LibIndex];
- UString res;
- NWindows::NCOM::CPropVariant prop;
- RINOK(lib.GetMethodProperty(codec.CodecIndex, NMethodPropID::kName, &prop));
- if (prop.vt == VT_BSTR)
- res = prop.bstrVal;
- else if (prop.vt != VT_EMPTY)
- continue;
- if (name.CompareNoCase(res) == 0)
- return lib.CreateObject(encode ? &codec.Encoder : &codec.Decoder, &IID_ICompressCoder, (void **)&coder);
- }
- return CLASS_E_CLASSNOTAVAILABLE;
+ return NUM_EXPORT_HASHERS
+ #ifdef EXTERNAL_CODECS
+ + Hashers.Size()
+ #endif
+ ;
+}
+
+STDMETHODIMP CCodecs::GetHasherProp(UInt32 index, PROPID propID, PROPVARIANT *value)
+{
+ #ifdef EXPORT_CODECS
+ if (index < g_NumHashers)
+ return ::GetHasherProp(index, propID, value);
+ #endif
+
+ #ifdef EXTERNAL_CODECS
+ const CDllHasherInfo &ci = Hashers[index - NUM_EXPORT_HASHERS];
+ return Libs[ci.LibIndex].ComHashers->GetHasherProp(ci.HasherIndex, propID, value);
+ #else
+ return E_FAIL;
+ #endif
}
-int CCodecs::GetCodecLibIndex(UInt32 index)
+STDMETHODIMP CCodecs::CreateHasher(UInt32 index, IHasher **hasher)
+{
+ #ifdef EXPORT_CODECS
+ if (index < g_NumHashers)
+ return CreateHasher(index, hasher);
+ #endif
+ #ifdef EXTERNAL_CODECS
+ const CDllHasherInfo &ci = Hashers[index - NUM_EXPORT_HASHERS];
+ return Libs[ci.LibIndex].ComHashers->CreateHasher(ci.HasherIndex, hasher);
+ #else
+ return E_FAIL;
+ #endif
+}
+
+int CCodecs::GetCodec_LibIndex(UInt32 index) const
{
#ifdef EXPORT_CODECS
if (index < g_NumCodecs)
return -1;
#endif
+
#ifdef EXTERNAL_CODECS
- const CDllCodecInfo &ci = Codecs[index
- #ifdef EXPORT_CODECS
- - g_NumCodecs
- #endif
- ];
+ const CDllCodecInfo &ci = Codecs[index - NUM_EXPORT_CODECS];
return ci.LibIndex;
#else
return -1;
#endif
}
-bool CCodecs::GetCodecEncoderIsAssigned(UInt32 index)
+int CCodecs::GetHasherLibIndex(UInt32 index)
+{
+ #ifdef EXPORT_CODECS
+ if (index < g_NumHashers)
+ return -1;
+ #endif
+
+ #ifdef EXTERNAL_CODECS
+ const CDllHasherInfo &ci = Hashers[index - NUM_EXPORT_HASHERS];
+ return ci.LibIndex;
+ #else
+ return -1;
+ #endif
+}
+
+bool CCodecs::GetCodec_DecoderIsAssigned(UInt32 index) const
{
#ifdef EXPORT_CODECS
if (index < g_NumCodecs)
{
- NWindows::NCOM::CPropVariant prop;
- if (GetProperty(index, NMethodPropID::kEncoder, &prop) == S_OK)
- if (prop.vt != VT_EMPTY)
- return true;
+ NCOM::CPropVariant prop;
+ if (GetProperty(index, NMethodPropID::kDecoderIsAssigned, &prop) == S_OK)
+ {
+ if (prop.vt == VT_BOOL)
+ return VARIANT_BOOLToBool(prop.boolVal);
+ }
return false;
}
#endif
+
#ifdef EXTERNAL_CODECS
- const CDllCodecInfo &ci = Codecs[index
- #ifdef EXPORT_CODECS
- - g_NumCodecs
- #endif
- ];
- return ci.EncoderIsAssigned;
+ return Codecs[index - NUM_EXPORT_CODECS].DecoderIsAssigned;
#else
return false;
#endif
}
-HRESULT CCodecs::GetCodecId(UInt32 index, UInt64 &id)
+bool CCodecs::GetCodec_EncoderIsAssigned(UInt32 index) const
{
- UString s;
- NWindows::NCOM::CPropVariant prop;
+ #ifdef EXPORT_CODECS
+ if (index < g_NumCodecs)
+ {
+ NCOM::CPropVariant prop;
+ if (GetProperty(index, NMethodPropID::kEncoderIsAssigned, &prop) == S_OK)
+ {
+ if (prop.vt == VT_BOOL)
+ return VARIANT_BOOLToBool(prop.boolVal);
+ }
+ return false;
+ }
+ #endif
+
+ #ifdef EXTERNAL_CODECS
+ return Codecs[index - NUM_EXPORT_CODECS].EncoderIsAssigned;
+ #else
+ return false;
+ #endif
+}
+
+UInt32 CCodecs::GetCodec_NumStreams(UInt32 index)
+{
+ NCOM::CPropVariant prop;
+ RINOK(GetProperty(index, NMethodPropID::kPackStreams, &prop));
+ if (prop.vt == VT_UI4)
+ return (UInt32)prop.ulVal;
+ if (prop.vt == VT_EMPTY)
+ return 1;
+ return 0;
+}
+
+HRESULT CCodecs::GetCodec_Id(UInt32 index, UInt64 &id)
+{
+ NCOM::CPropVariant prop;
RINOK(GetProperty(index, NMethodPropID::kID, &prop));
if (prop.vt != VT_UI8)
return E_INVALIDARG;
@@ -675,14 +1030,43 @@ HRESULT CCodecs::GetCodecId(UInt32 index, UInt64 &id)
return S_OK;
}
-UString CCodecs::GetCodecName(UInt32 index)
+AString CCodecs::GetCodec_Name(UInt32 index)
{
- UString s;
- NWindows::NCOM::CPropVariant prop;
+ AString s;
+ NCOM::CPropVariant prop;
if (GetProperty(index, NMethodPropID::kName, &prop) == S_OK)
if (prop.vt == VT_BSTR)
- s = prop.bstrVal;
+ s.SetFromWStr_if_Ascii(prop.bstrVal);
return s;
}
-#endif
+UInt64 CCodecs::GetHasherId(UInt32 index)
+{
+ NCOM::CPropVariant prop;
+ if (GetHasherProp(index, NMethodPropID::kID, &prop) != S_OK)
+ return 0;
+ if (prop.vt != VT_UI8)
+ return 0;
+ return prop.uhVal.QuadPart;
+}
+
+AString CCodecs::GetHasherName(UInt32 index)
+{
+ AString s;
+ NCOM::CPropVariant prop;
+ if (GetHasherProp(index, NMethodPropID::kName, &prop) == S_OK)
+ if (prop.vt == VT_BSTR)
+ s.SetFromWStr_if_Ascii(prop.bstrVal);
+ return s;
+}
+
+UInt32 CCodecs::GetHasherDigestSize(UInt32 index)
+{
+ NCOM::CPropVariant prop;
+ RINOK(GetHasherProp(index, NMethodPropID::kDigestSize, &prop));
+ if (prop.vt != VT_UI4)
+ return 0;
+ return prop.ulVal;
+}
+
+#endif // EXTERNAL_CODECS
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/LoadCodecs.h b/3rdparty/lzma/CPP/7zip/UI/Common/LoadCodecs.h
index f5963ed60ee..ac9eeac71dd 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/LoadCodecs.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/LoadCodecs.h
@@ -3,34 +3,88 @@
#ifndef __LOAD_CODECS_H
#define __LOAD_CODECS_H
+/*
+Client application uses LoadCodecs.* to load plugins to
+CCodecs object, that contains 3 lists of plugins:
+ 1) Formats - internal and external archive handlers
+ 2) Codecs - external codecs
+ 3) Hashers - external hashers
+
+EXTERNAL_CODECS
+---------------
+
+ if EXTERNAL_CODECS is defined, then the code tries to load external
+ plugins from DLL files (shared libraries).
+
+ There are two types of executables in 7-Zip:
+
+ 1) Executable that uses external plugins must be compiled
+ with EXTERNAL_CODECS defined:
+ - 7z.exe, 7zG.exe, 7zFM.exe
+
+ Note: EXTERNAL_CODECS is used also in CPP/7zip/Common/CreateCoder.h
+ that code is used in plugin module (7z.dll).
+
+ 2) Standalone modules are compiled without EXTERNAL_CODECS:
+ - SFX modules: 7z.sfx, 7zCon.sfx
+ - standalone versions of console 7-Zip: 7za.exe, 7zr.exe
+
+ if EXTERNAL_CODECS is defined, CCodecs class implements interfaces:
+ - ICompressCodecsInfo : for Codecs
+ - IHashers : for Hashers
+
+ The client application can send CCodecs object to each plugin module.
+ And plugin module can use ICompressCodecsInfo or IHashers interface to access
+ another plugins.
+
+ There are 2 ways to send (ICompressCodecsInfo * compressCodecsInfo) to plugin
+ 1) for old versions:
+ a) request ISetCompressCodecsInfo from created archive handler.
+ b) call ISetCompressCodecsInfo::SetCompressCodecsInfo(compressCodecsInfo)
+ 2) for new versions:
+ a) request "SetCodecs" function from DLL file
+ b) call SetCodecs(compressCodecsInfo) function from DLL file
+*/
+
+#include "../../../Common/MyBuffer.h"
#include "../../../Common/MyCom.h"
#include "../../../Common/MyString.h"
-#include "../../../Common/Buffer.h"
-#include "../../ICoder.h"
+#include "../../../Common/ComTry.h"
#ifdef EXTERNAL_CODECS
#include "../../../Windows/DLL.h"
#endif
+#include "../../ICoder.h"
+
+#include "../../Archive/IArchive.h"
+
+
+#ifdef EXTERNAL_CODECS
+
struct CDllCodecInfo
{
- CLSID Encoder;
- CLSID Decoder;
+ unsigned LibIndex;
+ UInt32 CodecIndex;
bool EncoderIsAssigned;
bool DecoderIsAssigned;
- int LibIndex;
- UInt32 CodecIndex;
+ CLSID Encoder;
+ CLSID Decoder;
};
-#include "../../Archive/IArchive.h"
+struct CDllHasherInfo
+{
+ unsigned LibIndex;
+ UInt32 HasherIndex;
+};
-typedef IInArchive * (*CreateInArchiveP)();
-typedef IOutArchive * (*CreateOutArchiveP)();
+#endif
struct CArcExtInfo
{
UString Ext;
UString AddExt;
+
CArcExtInfo() {}
CArcExtInfo(const UString &ext): Ext(ext) {}
CArcExtInfo(const UString &ext, const UString &addExt): Ext(ext), AddExt(addExt) {}
@@ -39,24 +93,45 @@ struct CArcExtInfo
struct CArcInfoEx
{
- #ifdef EXTERNAL_CODECS
- int LibIndex;
- UInt32 FormatIndex;
- CLSID ClassID;
- #endif
- bool UpdateEnabled;
- CreateInArchiveP CreateInArchive;
- CreateOutArchiveP CreateOutArchive;
+ UInt32 Flags;
+
+ Func_CreateInArchive CreateInArchive;
+ Func_IsArc IsArcFunc;
+
UString Name;
CObjectVector<CArcExtInfo> Exts;
+
#ifndef _SFX
- CByteBuffer StartSignature;
- // CByteBuffer FinishSignature;
- #ifdef NEW_FOLDER_INTERFACE
- UStringVector AssociateExts;
+ Func_CreateOutArchive CreateOutArchive;
+ bool UpdateEnabled;
+ bool NewInterface;
+ // UInt32 Version;
+ UInt32 SignatureOffset;
+ CObjectVector<CByteBuffer> Signatures;
+ #ifdef NEW_FOLDER_INTERFACE
+ UStringVector AssociateExts;
+ #endif
#endif
+
+ #ifdef EXTERNAL_CODECS
+ int LibIndex;
+ UInt32 FormatIndex;
+ CLSID ClassID;
#endif
- bool KeepName;
+
+ bool Flags_KeepName() const { return (Flags & NArcInfoFlags::kKeepName) != 0; }
+ bool Flags_FindSignature() const { return (Flags & NArcInfoFlags::kFindSignature) != 0; }
+
+ bool Flags_AltStreams() const { return (Flags & NArcInfoFlags::kAltStreams) != 0; }
+ bool Flags_NtSecure() const { return (Flags & NArcInfoFlags::kNtSecure) != 0; }
+ bool Flags_SymLinks() const { return (Flags & NArcInfoFlags::kSymLinks) != 0; }
+ bool Flags_HardLinks() const { return (Flags & NArcInfoFlags::kHardLinks) != 0; }
+
+ bool Flags_UseGlobalOffset() const { return (Flags & NArcInfoFlags::kUseGlobalOffset) != 0; }
+ bool Flags_StartOpen() const { return (Flags & NArcInfoFlags::kStartOpen) != 0; }
+ bool Flags_BackwardOpen() const { return (Flags & NArcInfoFlags::kBackwardOpen) != 0; }
+ bool Flags_PreArc() const { return (Flags & NArcInfoFlags::kPreArc) != 0; }
+ bool Flags_PureStartOpen() const { return (Flags & NArcInfoFlags::kPureStartOpen) != 0; }
UString GetMainExt() const
{
@@ -80,26 +155,30 @@ struct CArcInfoEx
}
*/
- void AddExts(const wchar_t* ext, const wchar_t* addExt);
+ void AddExts(const UString &ext, const UString &addExt);
+
+ bool IsSplit() const { return StringsAreEqualNoCase_Ascii(Name, "Split"); }
+ // bool IsRar() const { return StringsAreEqualNoCase_Ascii(Name, "Rar"); }
CArcInfoEx():
- #ifdef EXTERNAL_CODECS
- LibIndex(-1),
- #endif
- UpdateEnabled(false),
- CreateInArchive(0), CreateOutArchive(0),
- KeepName(false)
- #ifndef _SFX
- #endif
+ Flags(0),
+ CreateInArchive(NULL),
+ IsArcFunc(NULL)
+ #ifndef _SFX
+ , CreateOutArchive(NULL)
+ , UpdateEnabled(false)
+ , NewInterface(false)
+ // , Version(0)
+ , SignatureOffset(0)
+ #endif
+ #ifdef EXTERNAL_CODECS
+ , LibIndex(-1)
+ #endif
{}
};
-#ifdef EXTERNAL_CODECS
-typedef UInt32 (WINAPI *GetMethodPropertyFunc)(UInt32 index, PROPID propID, PROPVARIANT *value);
-typedef UInt32 (WINAPI *CreateObjectFunc)(const GUID *clsID, const GUID *interfaceID, void **outObject);
-
-
#ifdef NEW_FOLDER_INTERFACE
+
struct CCodecIcons
{
struct CIconPair
@@ -108,57 +187,128 @@ struct CCodecIcons
int IconIndex;
};
CObjectVector<CIconPair> IconPairs;
+
void LoadIcons(HMODULE m);
bool FindIconIndex(const UString &ext, int &iconIndex) const;
};
+
#endif
+#ifdef EXTERNAL_CODECS
+
struct CCodecLib
-#ifdef NEW_FOLDER_INTERFACE
-: public CCodecIcons
-#endif
+ #ifdef NEW_FOLDER_INTERFACE
+ : public CCodecIcons
+ #endif
{
NWindows::NDLL::CLibrary Lib;
- GetMethodPropertyFunc GetMethodProperty;
- CreateObjectFunc CreateObject;
- #ifdef NEW_FOLDER_INTERFACE
FString Path;
+
+ Func_CreateObject CreateObject;
+ Func_GetMethodProperty GetMethodProperty;
+ Func_CreateDecoder CreateDecoder;
+ Func_CreateEncoder CreateEncoder;
+ Func_SetCodecs SetCodecs;
+
+ CMyComPtr<IHashers> ComHashers;
+
+ #ifdef NEW_FOLDER_INTERFACE
void LoadIcons() { CCodecIcons::LoadIcons((HMODULE)Lib); }
#endif
- CCodecLib(): GetMethodProperty(0) {}
+
+ CCodecLib():
+ CreateObject(NULL),
+ GetMethodProperty(NULL),
+ CreateDecoder(NULL),
+ CreateEncoder(NULL),
+ SetCodecs(NULL)
+ {}
};
+
#endif
+
class CCodecs:
#ifdef EXTERNAL_CODECS
- public ICompressCodecsInfo,
+ public ICompressCodecsInfo,
+ public IHashers,
#else
- public IUnknown,
+ public IUnknown,
#endif
public CMyUnknownImp
{
+ CLASS_NO_COPY(CCodecs);
public:
#ifdef EXTERNAL_CODECS
+
CObjectVector<CCodecLib> Libs;
- CObjectVector<CDllCodecInfo> Codecs;
+ FString MainDll_ErrorPath;
- #ifdef NEW_FOLDER_INTERFACE
- CCodecIcons InternalIcons;
- #endif
+ void CloseLibs();
+
+ class CReleaser
+ {
+ CLASS_NO_COPY(CReleaser);
+
+ /* CCodecsReleaser object releases CCodecs links.
+ 1) CCodecs is COM object that is deleted when all links to that object will be released/
+ 2) CCodecs::Libs[i] can hold (ICompressCodecsInfo *) link to CCodecs object itself.
+ To break that reference loop, we must close all CCodecs::Libs in CCodecsReleaser desttructor. */
+
+ CCodecs *_codecs;
+
+ public:
+ CReleaser(): _codecs(NULL) {}
+ void Set(CCodecs *codecs) { _codecs = codecs; }
+ ~CReleaser() { if (_codecs) _codecs->CloseLibs(); }
+ };
+
+ bool NeedSetLibCodecs; // = false, if we don't need to set codecs for archive handler via ISetCompressCodecsInfo
HRESULT LoadCodecs();
HRESULT LoadFormats();
- HRESULT LoadDll(const FString &path, bool needCheckDll);
+ HRESULT LoadDll(const FString &path, bool needCheckDll, bool *loadedOK = NULL);
HRESULT LoadDllsFromFolder(const FString &folderPrefix);
- HRESULT CreateArchiveHandler(const CArcInfoEx &ai, void **archive, bool outHandler) const
+ HRESULT CreateArchiveHandler(const CArcInfoEx &ai, bool outHandler, void **archive) const
{
return Libs[ai.LibIndex].CreateObject(&ai.ClassID, outHandler ? &IID_IOutArchive : &IID_IInArchive, (void **)archive);
}
+
+ #endif
+
+ #ifdef NEW_FOLDER_INTERFACE
+ CCodecIcons InternalIcons;
#endif
-public:
CObjectVector<CArcInfoEx> Formats;
+
+ #ifdef EXTERNAL_CODECS
+ CRecordVector<CDllCodecInfo> Codecs;
+ CRecordVector<CDllHasherInfo> Hashers;
+ #endif
+
+ bool CaseSensitiveChange;
+ bool CaseSensitive;
+
+ CCodecs():
+ #ifdef EXTERNAL_CODECS
+ NeedSetLibCodecs(true),
+ #endif
+ CaseSensitiveChange(false),
+ CaseSensitive(false)
+ {}
+
+ ~CCodecs()
+ {
+ // OutputDebugStringA("~CCodecs");
+ }
+
+ const wchar_t *GetFormatNamePtr(int formatIndex) const
+ {
+ return formatIndex < 0 ? L"#" : (const wchar_t *)Formats[formatIndex].Name;
+ }
+
HRESULT Load();
#ifndef _SFX
@@ -168,65 +318,107 @@ public:
bool FindFormatForArchiveType(const UString &arcType, CIntVector &formatIndices) const;
#endif
+ #ifdef EXTERNAL_CODECS
+
+ MY_UNKNOWN_IMP2(ICompressCodecsInfo, IHashers)
+
+ STDMETHOD(GetNumMethods)(UInt32 *numMethods);
+ STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value);
+ STDMETHOD(CreateDecoder)(UInt32 index, const GUID *iid, void **coder);
+ STDMETHOD(CreateEncoder)(UInt32 index, const GUID *iid, void **coder);
+
+ STDMETHOD_(UInt32, GetNumHashers)();
+ STDMETHOD(GetHasherProp)(UInt32 index, PROPID propID, PROPVARIANT *value);
+ STDMETHOD(CreateHasher)(UInt32 index, IHasher **hasher);
+
+ #else
+
MY_UNKNOWN_IMP
+ #endif // EXTERNAL_CODECS
+
+
#ifdef EXTERNAL_CODECS
- STDMETHOD(GetNumberOfMethods)(UInt32 *numMethods);
- STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value);
- STDMETHOD(CreateDecoder)(UInt32 index, const GUID *interfaceID, void **coder);
- STDMETHOD(CreateEncoder)(UInt32 index, const GUID *interfaceID, void **coder);
- #endif
- int GetCodecLibIndex(UInt32 index);
- bool GetCodecEncoderIsAssigned(UInt32 index);
- HRESULT GetCodecId(UInt32 index, UInt64 &id);
- UString GetCodecName(UInt32 index);
+ int GetCodec_LibIndex(UInt32 index) const;
+ bool GetCodec_DecoderIsAssigned(UInt32 index) const;
+ bool GetCodec_EncoderIsAssigned(UInt32 index) const;
+ UInt32 GetCodec_NumStreams(UInt32 index);
+ HRESULT GetCodec_Id(UInt32 index, UInt64 &id);
+ AString GetCodec_Name(UInt32 index);
+
+ int GetHasherLibIndex(UInt32 index);
+ UInt64 GetHasherId(UInt32 index);
+ AString GetHasherName(UInt32 index);
+ UInt32 GetHasherDigestSize(UInt32 index);
+
+ #endif
- HRESULT CreateInArchive(int formatIndex, CMyComPtr<IInArchive> &archive) const
+ HRESULT CreateInArchive(unsigned formatIndex, CMyComPtr<IInArchive> &archive) const
{
const CArcInfoEx &ai = Formats[formatIndex];
#ifdef EXTERNAL_CODECS
if (ai.LibIndex < 0)
#endif
{
+ COM_TRY_BEGIN
archive = ai.CreateInArchive();
return S_OK;
+ COM_TRY_END
}
#ifdef EXTERNAL_CODECS
- return CreateArchiveHandler(ai, (void **)&archive, false);
+ return CreateArchiveHandler(ai, false, (void **)&archive);
#endif
}
- HRESULT CreateOutArchive(int formatIndex, CMyComPtr<IOutArchive> &archive) const
+
+ #ifndef _SFX
+
+ HRESULT CreateOutArchive(unsigned formatIndex, CMyComPtr<IOutArchive> &archive) const
{
const CArcInfoEx &ai = Formats[formatIndex];
#ifdef EXTERNAL_CODECS
if (ai.LibIndex < 0)
#endif
{
+ COM_TRY_BEGIN
archive = ai.CreateOutArchive();
return S_OK;
+ COM_TRY_END
}
+
#ifdef EXTERNAL_CODECS
- return CreateArchiveHandler(ai, (void **)&archive, true);
+ return CreateArchiveHandler(ai, true, (void **)&archive);
#endif
}
+
int FindOutFormatFromName(const UString &name) const
{
- for (int i = 0; i < Formats.Size(); i++)
+ FOR_VECTOR (i, Formats)
{
const CArcInfoEx &arc = Formats[i];
if (!arc.UpdateEnabled)
continue;
- if (arc.Name.CompareNoCase(name) == 0)
+ if (arc.Name.IsEqualTo_NoCase(name))
return i;
}
return -1;
}
- #ifdef EXTERNAL_CODECS
- HRESULT CreateCoder(const UString &name, bool encode, CMyComPtr<ICompressCoder> &coder) const;
- #endif
-
+ #endif // _SFX
};
+#ifdef EXTERNAL_CODECS
+ #define CREATE_CODECS_OBJECT \
+ CCodecs *codecs = new CCodecs; \
+ CExternalCodecs __externalCodecs; \
+ __externalCodecs.GetCodecs = codecs; \
+ __externalCodecs.GetHashers = codecs; \
+ CCodecs::CReleaser codecsReleaser; \
+ codecsReleaser.Set(codecs);
+#else
+ #define CREATE_CODECS_OBJECT \
+ CCodecs *codecs = new CCodecs; \
+ CMyComPtr<IUnknown> __codecsRef = codecs;
+#endif
+
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/OpenArchive.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/OpenArchive.cpp
index 60d2f6f5ad1..e323abd2197 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/OpenArchive.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/OpenArchive.cpp
@@ -2,27 +2,454 @@
#include "StdAfx.h"
-#include "Common/Wildcard.h"
+// #define SHOW_DEBUG_INFO
-#include "Windows/FileDir.h"
-#include "Windows/PropVariant.h"
+#ifdef SHOW_DEBUG_INFO
+#include <stdio.h>
+#endif
+
+#include "../../../../C/CpuArch.h"
+
+#include "../../../Common/ComTry.h"
+#include "../../../Common/IntToString.h"
+#include "../../../Common/StringConvert.h"
+#include "../../../Common/StringToInt.h"
+#include "../../../Common/Wildcard.h"
+
+#include "../../../Windows/FileDir.h"
#include "../../Common/FileStreams.h"
+#include "../../Common/LimitedStreams.h"
+#include "../../Common/ProgressUtils.h"
#include "../../Common/StreamUtils.h"
+#include "../../Compress/CopyCoder.h"
+
#include "DefaultName.h"
#include "OpenArchive.h"
+#ifndef _SFX
+#include "SetProperties.h"
+#endif
+
+#ifdef SHOW_DEBUG_INFO
+#define PRF(x) x
+#else
+#define PRF(x)
+#endif
+
+// increase it, if you need to support larger SFX stubs
+static const UInt64 kMaxCheckStartPosition = 1 << 23;
+
+/*
+Open:
+ - formatIndex >= 0 (exact Format)
+ 1) Open with main type. Archive handler is allowed to use archive start finder.
+ Warning, if there is tail.
+
+ - formatIndex = -1 (Parser:0) (default)
+ - same as #1 but doesn't return Parser
+
+ - formatIndex = -2 (#1)
+ - file has supported extension (like a.7z)
+ Open with that main type (only starting from start of file).
+ - open OK:
+ - if there is no tail - return OK
+ - if there is tail:
+ - archive is not "Self Exe" - return OK with Warning, that there is tail
+ - archive is "Self Exe"
+ ignore "Self Exe" stub, and tries to open tail
+ - tail can be open as archive - shows that archive and stub size property.
+ - tail can't be open as archive - shows Parser ???
+ - open FAIL:
+ Try to open with all other types from offset 0 only.
+ If some open type is OK and physical archive size is uequal or larger
+ than file size, then return that archive with warning that can not be open as [extension type].
+ If extension was EXE, it will try to open as unknown_extension case
+ - file has unknown extension (like a.hhh)
+ It tries to open via parser code.
+ - if there is full archive or tail archive and unknown block or "Self Exe"
+ at front, it shows tail archive and stub size property.
+ - in another cases, if there is some archive inside file, it returns parser/
+ - in another cases, it retuens S_FALSE
+
+
+ - formatIndex = -3 (#2)
+ - same as #1, but
+ - stub (EXE) + archive is open in Parser
+
+ - formatIndex = -4 (#3)
+ - returns only Parser. skip full file archive. And show other sub-archives
+
+ - formatIndex = -5 (#4)
+ - returns only Parser. skip full file archive. And show other sub-archives for each byte pos
+
+*/
+
+
+
+
using namespace NWindows;
-// Static-SFX (for Linux) can be big.
-const UInt64 kMaxCheckStartPosition = 1 << 22;
+/*
+#ifdef _SFX
+#define OPEN_PROPS_PARAM
+#else
+#define OPEN_PROPS_PARAM , props
+#endif
+*/
+
+/*
+CArc::~CArc()
+{
+ GetRawProps.Release();
+ Archive.Release();
+ printf("\nCArc::~CArc()\n");
+}
+*/
+
+#ifndef _SFX
+
+namespace NArchive {
+namespace NParser {
+
+struct CParseItem
+{
+ UInt64 Offset;
+ UInt64 Size;
+ // UInt64 OkSize;
+ UString Name;
+ UString Extension;
+ FILETIME FileTime;
+ UString Comment;
+ UString ArcType;
+
+ bool FileTime_Defined;
+ bool UnpackSize_Defined;
+ bool NumSubDirs_Defined;
+ bool NumSubFiles_Defined;
+
+ bool IsSelfExe;
+ bool IsNotArcType;
+
+ UInt64 UnpackSize;
+ UInt64 NumSubDirs;
+ UInt64 NumSubFiles;
+
+ int FormatIndex;
+
+ bool LenIsUnknown;
+
+ CParseItem():
+ LenIsUnknown(false),
+ FileTime_Defined(false),
+ UnpackSize_Defined(false),
+ NumSubFiles_Defined(false),
+ NumSubDirs_Defined(false),
+ IsSelfExe(false),
+ IsNotArcType(false)
+ // OkSize(0)
+ {}
+
+ /*
+ bool IsEqualTo(const CParseItem &item) const
+ {
+ return Offset == item.Offset && Size == item.Size;
+ }
+ */
+
+ void NormalizeOffset()
+ {
+ if ((Int64)Offset < 0)
+ {
+ Size += Offset;
+ // OkSize += Offset;
+ Offset = 0;
+ }
+ }
+};
+
+class CHandler:
+ public IInArchive,
+ public IInArchiveGetStream,
+ public CMyUnknownImp
+{
+public:
+ CObjectVector<CParseItem> _items;
+ UInt64 _maxEndOffset;
+ CMyComPtr<IInStream> _stream;
+
+ MY_UNKNOWN_IMP2(
+ IInArchive,
+ IInArchiveGetStream)
+
+ INTERFACE_IInArchive(;)
+ STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream);
+
+ UInt64 GetLastEnd() const
+ {
+ if (_items.IsEmpty())
+ return 0;
+ const CParseItem &back = _items.Back();
+ return back.Offset + back.Size;
+ }
+
+ void AddUnknownItem(UInt64 next);
+ int FindInsertPos(const CParseItem &item) const;
+ void AddItem(const CParseItem &item);
+
+ CHandler(): _maxEndOffset(0) {}
+};
+
+int CHandler::FindInsertPos(const CParseItem &item) const
+{
+ unsigned left = 0, right = _items.Size();
+ while (left != right)
+ {
+ unsigned mid = (left + right) / 2;
+ const CParseItem & midItem = _items[mid];
+ if (item.Offset < midItem.Offset)
+ right = mid;
+ else if (item.Offset > midItem.Offset)
+ left = mid + 1;
+ else if (item.Size < midItem.Size)
+ right = mid;
+ else if (item.Size > midItem.Size)
+ left = mid + 1;
+ else
+ {
+ left = mid + 1;
+ // return -1;
+ }
+ }
+ return left;
+}
+
+void CHandler::AddUnknownItem(UInt64 next)
+{
+ /*
+ UInt64 prevEnd = 0;
+ if (!_items.IsEmpty())
+ {
+ const CParseItem &back = _items.Back();
+ prevEnd = back.Offset + back.Size;
+ }
+ */
+ if (_maxEndOffset < next)
+ {
+ CParseItem item2;
+ item2.Offset = _maxEndOffset;
+ item2.Size = next - _maxEndOffset;
+ _maxEndOffset = next;
+ _items.Add(item2);
+ }
+ else if (_maxEndOffset > next && !_items.IsEmpty())
+ {
+ CParseItem &back = _items.Back();
+ if (back.LenIsUnknown)
+ {
+ back.Size = next - back.Offset;
+ _maxEndOffset = next;
+ }
+ }
+}
+
+void CHandler::AddItem(const CParseItem &item)
+{
+ AddUnknownItem(item.Offset);
+ int pos = FindInsertPos(item);
+ if (pos >= 0)
+ {
+ _items.Insert(pos, item);
+ UInt64 next = item.Offset + item.Size;
+ if (_maxEndOffset < next)
+ _maxEndOffset = next;
+ }
+}
+
+/*
+static const CStatProp kProps[] =
+{
+ { NULL, kpidPath, VT_BSTR},
+ { NULL, kpidSize, VT_UI8},
+ { NULL, kpidMTime, VT_FILETIME},
+ { NULL, kpidType, VT_BSTR},
+ { NULL, kpidComment, VT_BSTR},
+ { NULL, kpidOffset, VT_UI8},
+ { NULL, kpidUnpackSize, VT_UI8},
+// { NULL, kpidNumSubDirs, VT_UI8},
+};
+*/
+
+static const Byte kProps[] =
+{
+ kpidPath,
+ kpidSize,
+ kpidMTime,
+ kpidType,
+ kpidComment,
+ kpidOffset,
+ kpidUnpackSize
+};
+
+IMP_IInArchive_Props
+IMP_IInArchive_ArcProps_NO
+
+STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback * /* openArchiveCallback */)
+{
+ COM_TRY_BEGIN
+ {
+ Close();
+ _stream = stream;
+ }
+ return S_OK;
+ COM_TRY_END
+}
+
+STDMETHODIMP CHandler::Close()
+{
+ _items.Clear();
+ _stream.Release();
+ return S_OK;
+}
+
+STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems)
+{
+ *numItems = _items.Size();
+ return S_OK;
+}
-HRESULT GetArchiveItemBoolProp(IInArchive *archive, UInt32 index, PROPID propID, bool &result)
+STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value)
+{
+ COM_TRY_BEGIN
+ NCOM::CPropVariant prop;
+
+ const CParseItem &item = _items[index];
+
+ switch (propID)
+ {
+ case kpidPath:
+ {
+ wchar_t sz[32];
+ ConvertUInt32ToString(index + 1, sz);
+ UString s = sz;
+ if (!item.Name.IsEmpty())
+ {
+ s += L'.';
+ s += item.Name;
+ }
+ if (!item.Extension.IsEmpty())
+ {
+ s += L'.';
+ s += item.Extension;
+ }
+ prop = s; break;
+ }
+ case kpidSize:
+ case kpidPackSize: prop = item.Size; break;
+ case kpidOffset: prop = item.Offset; break;
+ case kpidUnpackSize: if (item.UnpackSize_Defined) prop = item.UnpackSize; break;
+ case kpidNumSubFiles: if (item.NumSubFiles_Defined) prop = item.NumSubFiles; break;
+ case kpidNumSubDirs: if (item.NumSubDirs_Defined) prop = item.NumSubDirs; break;
+ case kpidMTime: if (item.FileTime_Defined) prop = item.FileTime; break;
+ case kpidComment: if (!item.Comment.IsEmpty()) prop = item.Comment; break;
+ case kpidType: if (!item.ArcType.IsEmpty()) prop = item.ArcType; break;
+ }
+ prop.Detach(value);
+ return S_OK;
+ COM_TRY_END
+}
+
+HRESULT CHandler::Extract(const UInt32 *indices, UInt32 numItems,
+ Int32 testMode, IArchiveExtractCallback *extractCallback)
+{
+ COM_TRY_BEGIN
+
+ bool allFilesMode = (numItems == (UInt32)(Int32)-1);
+ if (allFilesMode)
+ numItems = _items.Size();
+ if (_stream && numItems == 0)
+ return S_OK;
+ UInt64 totalSize = 0;
+ UInt32 i;
+ for (i = 0; i < numItems; i++)
+ totalSize += _items[allFilesMode ? i : indices[i]].Size;
+ extractCallback->SetTotal(totalSize);
+
+ totalSize = 0;
+
+ CLocalProgress *lps = new CLocalProgress;
+ CMyComPtr<ICompressProgressInfo> progress = lps;
+ lps->Init(extractCallback, false);
+
+ CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream;
+ CMyComPtr<ISequentialInStream> inStream(streamSpec);
+ streamSpec->SetStream(_stream);
+
+ CLimitedSequentialOutStream *outStreamSpec = new CLimitedSequentialOutStream;
+ CMyComPtr<ISequentialOutStream> outStream(outStreamSpec);
+
+ NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder();
+ CMyComPtr<ICompressCoder> copyCoder = copyCoderSpec;
+
+ for (i = 0; i < numItems; i++)
+ {
+ lps->InSize = totalSize;
+ lps->OutSize = totalSize;
+ RINOK(lps->SetCur());
+ CMyComPtr<ISequentialOutStream> realOutStream;
+ Int32 askMode = testMode ?
+ NExtract::NAskMode::kTest :
+ NExtract::NAskMode::kExtract;
+ Int32 index = allFilesMode ? i : indices[i];
+ const CParseItem &item = _items[index];
+
+ RINOK(extractCallback->GetStream(index, &realOutStream, askMode));
+ UInt64 unpackSize = item.Size;
+ totalSize += unpackSize;
+ bool skipMode = false;
+ if (!testMode && !realOutStream)
+ continue;
+ RINOK(extractCallback->PrepareOperation(askMode));
+
+ outStreamSpec->SetStream(realOutStream);
+ realOutStream.Release();
+ outStreamSpec->Init(skipMode ? 0 : unpackSize, true);
+
+ Int32 opRes = NExtract::NOperationResult::kOK;
+ RINOK(_stream->Seek(item.Offset, STREAM_SEEK_SET, NULL));
+ streamSpec->Init(unpackSize);
+ RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress));
+
+ if (outStreamSpec->GetRem() != 0)
+ opRes = NExtract::NOperationResult::kDataError;
+ outStreamSpec->ReleaseStream();
+ RINOK(extractCallback->SetOperationResult(opRes));
+ }
+
+ return S_OK;
+
+ COM_TRY_END
+}
+
+
+STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream)
+{
+ COM_TRY_BEGIN
+ const CParseItem &item = _items[index];
+ return CreateLimitedInStream(_stream, item.Offset, item.Size, stream);
+ COM_TRY_END
+}
+
+}}
+
+#endif
+
+HRESULT Archive_GetItemBoolProp(IInArchive *arc, UInt32 index, PROPID propID, bool &result) throw()
{
NCOM::CPropVariant prop;
result = false;
- RINOK(archive->GetProperty(index, propID, &prop));
+ RINOK(arc->GetProperty(index, propID, &prop));
if (prop.vt == VT_BOOL)
result = VARIANT_BOOLToBool(prop.boolVal);
else if (prop.vt != VT_EMPTY)
@@ -30,24 +457,276 @@ HRESULT GetArchiveItemBoolProp(IInArchive *archive, UInt32 index, PROPID propID,
return S_OK;
}
-HRESULT IsArchiveItemFolder(IInArchive *archive, UInt32 index, bool &result)
+HRESULT Archive_IsItem_Dir(IInArchive *arc, UInt32 index, bool &result) throw()
{
- return GetArchiveItemBoolProp(archive, index, kpidIsDir, result);
+ return Archive_GetItemBoolProp(arc, index, kpidIsDir, result);
}
+HRESULT Archive_IsItem_Aux(IInArchive *arc, UInt32 index, bool &result) throw()
+{
+ return Archive_GetItemBoolProp(arc, index, kpidIsAux, result);
+}
+
+HRESULT Archive_IsItem_AltStream(IInArchive *arc, UInt32 index, bool &result) throw()
+{
+ return Archive_GetItemBoolProp(arc, index, kpidIsAltStream, result);
+}
+
+HRESULT Archive_IsItem_Deleted(IInArchive *arc, UInt32 index, bool &result) throw()
+{
+ return Archive_GetItemBoolProp(arc, index, kpidIsDeleted, result);
+}
+
+static HRESULT Archive_GetArcBoolProp(IInArchive *arc, PROPID propid, bool &result) throw()
+{
+ NCOM::CPropVariant prop;
+ result = false;
+ RINOK(arc->GetArchiveProperty(propid, &prop));
+ if (prop.vt == VT_BOOL)
+ result = VARIANT_BOOLToBool(prop.boolVal);
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+ return S_OK;
+}
+
+static HRESULT Archive_GetArcProp_UInt(IInArchive *arc, PROPID propid, UInt64 &result, bool &defined)
+{
+ defined = false;
+ NCOM::CPropVariant prop;
+ RINOK(arc->GetArchiveProperty(propid, &prop));
+ switch (prop.vt)
+ {
+ case VT_UI4: result = prop.ulVal; defined = true; break;
+ case VT_I4: result = prop.lVal; defined = true; break;
+ case VT_UI8: result = (UInt64)prop.uhVal.QuadPart; defined = true; break;
+ case VT_I8: result = (UInt64)prop.hVal.QuadPart; defined = true; break;
+ case VT_EMPTY: break;
+ default: return E_FAIL;
+ }
+ return S_OK;
+}
+
+static HRESULT Archive_GetArcProp_Int(IInArchive *arc, PROPID propid, Int64 &result, bool &defined)
+{
+ defined = false;
+ NCOM::CPropVariant prop;
+ RINOK(arc->GetArchiveProperty(propid, &prop));
+ switch (prop.vt)
+ {
+ case VT_UI4: result = prop.ulVal; defined = true; break;
+ case VT_I4: result = prop.lVal; defined = true; break;
+ case VT_UI8: result = (Int64)prop.uhVal.QuadPart; defined = true; break;
+ case VT_I8: result = (Int64)prop.hVal.QuadPart; defined = true; break;
+ case VT_EMPTY: break;
+ default: return E_FAIL;
+ }
+ return S_OK;
+}
+
+#ifndef _SFX
+
+HRESULT CArc::GetItemPathToParent(UInt32 index, UInt32 parent, UStringVector &parts) const
+{
+ if (!GetRawProps)
+ return E_FAIL;
+ if (index == parent)
+ return S_OK;
+ UInt32 curIndex = index;
+
+ UString s;
+
+ bool prevWasAltStream = false;
+
+ for (;;)
+ {
+ #ifdef MY_CPU_LE
+ const void *p;
+ UInt32 size;
+ UInt32 propType;
+ RINOK(GetRawProps->GetRawProp(curIndex, kpidName, &p, &size, &propType));
+ if (p && propType == PROP_DATA_TYPE_wchar_t_PTR_Z_LE)
+ s = (const wchar_t *)p;
+ else
+ #endif
+ {
+ NCOM::CPropVariant prop;
+ RINOK(Archive->GetProperty(curIndex, kpidName, &prop));
+ if (prop.vt == VT_BSTR && prop.bstrVal)
+ s.SetFromBstr(prop.bstrVal);
+ else if (prop.vt == VT_EMPTY)
+ s.Empty();
+ else
+ return E_FAIL;
+ }
+
+ UInt32 curParent = (UInt32)(Int32)-1;
+ UInt32 parentType = 0;
+ RINOK(GetRawProps->GetParent(curIndex, &curParent, &parentType));
+
+ if (parentType != NParentType::kAltStream)
+ {
+ for (;;)
+ {
+ int pos = s.ReverseFind_PathSepar();
+ if (pos < 0)
+ {
+ break;
+ }
+ parts.Insert(0, s.Ptr(pos + 1));
+ s.DeleteFrom(pos);
+ }
+ }
+
+ parts.Insert(0, s);
+
+ if (prevWasAltStream)
+ {
+ {
+ UString &s = parts[parts.Size() - 2];
+ s += L':';
+ s += parts.Back();
+ }
+ parts.DeleteBack();
+ }
+
+ if (parent == curParent)
+ return S_OK;
+
+ prevWasAltStream = false;
+ if (parentType == NParentType::kAltStream)
+ prevWasAltStream = true;
+
+ if (curParent == (UInt32)(Int32)-1)
+ return E_FAIL;
+ curIndex = curParent;
+ }
+}
+
+#endif
+
HRESULT CArc::GetItemPath(UInt32 index, UString &result) const
{
+ #ifdef MY_CPU_LE
+ if (GetRawProps)
+ {
+ const void *p;
+ UInt32 size;
+ UInt32 propType;
+ if (!IsTree)
+ {
+ if (GetRawProps->GetRawProp(index, kpidPath, &p, &size, &propType) == S_OK &&
+ propType == NPropDataType::kUtf16z)
+ {
+ unsigned len = size / 2 - 1;
+ wchar_t *s = result.GetBuf(len);
+ for (unsigned i = 0; i < len; i++)
+ {
+ wchar_t c = GetUi16(p);
+ p = (const void *)((const Byte *)p + 2);
+ #if WCHAR_PATH_SEPARATOR != L'/'
+ if (c == L'/')
+ c = WCHAR_PATH_SEPARATOR;
+ #endif
+ *s++ = c;
+ }
+ *s = 0;
+ result.ReleaseBuf_SetLen(len);
+ if (len != 0)
+ return S_OK;
+ }
+ }
+ /*
+ else if (GetRawProps->GetRawProp(index, kpidName, &p, &size, &propType) == S_OK &&
+ p && propType == NPropDataType::kUtf16z)
+ {
+ size -= 2;
+ UInt32 totalSize = size;
+ bool isOK = false;
+
+ {
+ UInt32 index2 = index;
+ for (;;)
+ {
+ UInt32 parent = (UInt32)(Int32)-1;
+ UInt32 parentType = 0;
+ if (GetRawProps->GetParent(index2, &parent, &parentType) != S_OK)
+ break;
+ if (parent == (UInt32)(Int32)-1)
+ {
+ if (parentType != 0)
+ totalSize += 2;
+ isOK = true;
+ break;
+ }
+ index2 = parent;
+ UInt32 size2;
+ const void *p2;
+ if (GetRawProps->GetRawProp(index2, kpidName, &p2, &size2, &propType) != S_OK &&
+ p2 && propType == NPropDataType::kUtf16z)
+ break;
+ totalSize += size2;
+ }
+ }
+
+ if (isOK)
+ {
+ wchar_t *sz = result.GetBuf_SetEnd(totalSize / 2);
+ UInt32 pos = totalSize - size;
+ memcpy((Byte *)sz + pos, p, size);
+ UInt32 index2 = index;
+ for (;;)
+ {
+ UInt32 parent = (UInt32)(Int32)-1;
+ UInt32 parentType = 0;
+ if (GetRawProps->GetParent(index2, &parent, &parentType) != S_OK)
+ break;
+ if (parent == (UInt32)(Int32)-1)
+ {
+ if (parentType != 0)
+ sz[pos / 2 - 1] = L':';
+ break;
+ }
+ index2 = parent;
+ UInt32 size2;
+ const void *p2;
+ if (GetRawProps->GetRawProp(index2, kpidName, &p2, &size2, &propType) != S_OK)
+ break;
+ pos -= size2;
+ memcpy((Byte *)sz + pos, p2, size2);
+ sz[(pos + size2 - 2) / 2] = (parentType == 0) ? WCHAR_PATH_SEPARATOR : L':';
+ }
+ #ifdef _WIN32
+ // result.Replace(L'/', WCHAR_PATH_SEPARATOR);
+ #endif
+ return S_OK;
+ }
+ }
+ */
+ }
+ #endif
+
{
NCOM::CPropVariant prop;
RINOK(Archive->GetProperty(index, kpidPath, &prop));
- if (prop.vt == VT_BSTR)
- result = prop.bstrVal;
+ if (prop.vt == VT_BSTR && prop.bstrVal)
+ result.SetFromBstr(prop.bstrVal);
else if (prop.vt == VT_EMPTY)
result.Empty();
else
return E_FAIL;
}
+
if (result.IsEmpty())
+ return GetDefaultItemPath(index, result);
+ return S_OK;
+}
+
+HRESULT CArc::GetDefaultItemPath(UInt32 index, UString &result) const
+{
+ result.Empty();
+ bool isDir;
+ RINOK(Archive_IsItem_Dir(Archive, index, isDir));
+ if (!isDir)
{
result = DefaultName;
NCOM::CPropVariant prop;
@@ -63,6 +742,197 @@ HRESULT CArc::GetItemPath(UInt32 index, UString &result) const
return S_OK;
}
+HRESULT CArc::GetItemPath2(UInt32 index, UString &result) const
+{
+ RINOK(GetItemPath(index, result));
+ if (Ask_Deleted)
+ {
+ bool isDeleted = false;
+ RINOK(Archive_IsItem_Deleted(Archive, index, isDeleted));
+ if (isDeleted)
+ result.Insert(0, L"[DELETED]" WSTRING_PATH_SEPARATOR);
+ }
+ return S_OK;
+}
+
+#ifdef SUPPORT_ALT_STREAMS
+
+int FindAltStreamColon_in_Path(const wchar_t *path)
+{
+ unsigned i = 0;
+ int colonPos = -1;
+ for (;; i++)
+ {
+ wchar_t c = path[i];
+ if (c == 0)
+ return colonPos;
+ if (c == ':')
+ {
+ if (colonPos < 0)
+ colonPos = i;
+ continue;
+ }
+ if (c == WCHAR_PATH_SEPARATOR)
+ colonPos = -1;
+ }
+}
+
+#endif
+
+HRESULT CArc::GetItem(UInt32 index, CReadArcItem &item) const
+{
+ #ifdef SUPPORT_ALT_STREAMS
+ item.IsAltStream = false;
+ item.AltStreamName.Empty();
+ item.MainPath.Empty();
+ #endif
+
+ item.IsDir = false;
+ item.Path.Empty();
+ item.ParentIndex = (UInt32)(Int32)-1;
+
+ item.PathParts.Clear();
+
+ RINOK(Archive_IsItem_Dir(Archive, index, item.IsDir));
+ item.MainIsDir = item.IsDir;
+
+ RINOK(GetItemPath2(index, item.Path));
+
+ #ifndef _SFX
+ UInt32 mainIndex = index;
+ #endif
+
+ #ifdef SUPPORT_ALT_STREAMS
+
+ item.MainPath = item.Path;
+ if (Ask_AltStream)
+ {
+ RINOK(Archive_IsItem_AltStream(Archive, index, item.IsAltStream));
+ }
+
+ bool needFindAltStream = false;
+
+ if (item.IsAltStream)
+ {
+ needFindAltStream = true;
+ if (GetRawProps)
+ {
+ UInt32 parentType = 0;
+ UInt32 parentIndex;
+ RINOK(GetRawProps->GetParent(index, &parentIndex, &parentType));
+ if (parentType == NParentType::kAltStream)
+ {
+ NCOM::CPropVariant prop;
+ RINOK(Archive->GetProperty(index, kpidName, &prop));
+ if (prop.vt == VT_BSTR && prop.bstrVal)
+ item.AltStreamName.SetFromBstr(prop.bstrVal);
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+ else
+ {
+ // item.IsAltStream = false;
+ }
+ /*
+ if (item.AltStreamName.IsEmpty())
+ item.IsAltStream = false;
+ */
+
+ needFindAltStream = false;
+ item.ParentIndex = parentIndex;
+ mainIndex = parentIndex;
+
+ if (parentIndex == (UInt32)(Int32)-1)
+ {
+ item.MainPath.Empty();
+ item.MainIsDir = true;
+ }
+ else
+ {
+ RINOK(GetItemPath2(parentIndex, item.MainPath));
+ RINOK(Archive_IsItem_Dir(Archive, parentIndex, item.MainIsDir));
+ }
+ }
+ }
+ }
+
+ if (item.WriteToAltStreamIfColon || needFindAltStream)
+ {
+ /* Good handler must support GetRawProps::GetParent for alt streams./
+ So the following code currently is not used */
+ int colon = FindAltStreamColon_in_Path(item.Path);
+ if (colon >= 0)
+ {
+ item.MainPath.DeleteFrom(colon);
+ item.AltStreamName = item.Path.Ptr(colon + 1);
+ item.MainIsDir = (colon == 0 || IsPathSepar(item.Path[colon - 1]));
+ item.IsAltStream = true;
+ }
+ }
+
+ #endif
+
+ #ifndef _SFX
+ if (item._use_baseParentFolder_mode)
+ {
+ RINOK(GetItemPathToParent(mainIndex, item._baseParentFolder, item.PathParts));
+
+ #ifdef SUPPORT_ALT_STREAMS
+ if ((item.WriteToAltStreamIfColon || needFindAltStream) && !item.PathParts.IsEmpty())
+ {
+ int colon;
+ {
+ UString &s = item.PathParts.Back();
+ colon = FindAltStreamColon_in_Path(s);
+ if (colon >= 0)
+ {
+ item.AltStreamName = s.Ptr(colon + 1);
+ item.MainIsDir = (colon == 0 || IsPathSepar(s[(unsigned)colon - 1]));
+ item.IsAltStream = true;
+ s.DeleteFrom(colon);
+ }
+ }
+ if (colon == 0)
+ item.PathParts.DeleteBack();
+ }
+ #endif
+
+ }
+ else
+ #endif
+ SplitPathToParts(
+ #ifdef SUPPORT_ALT_STREAMS
+ item.MainPath
+ #else
+ item.Path
+ #endif
+ , item.PathParts);
+
+ return S_OK;
+}
+
+#ifndef _SFX
+
+static HRESULT Archive_GetItem_Size(IInArchive *archive, UInt32 index, UInt64 &size, bool &defined)
+{
+ NCOM::CPropVariant prop;
+ defined = false;
+ size = 0;
+ RINOK(archive->GetProperty(index, kpidSize, &prop));
+ switch (prop.vt)
+ {
+ case VT_UI1: size = prop.bVal; break;
+ case VT_UI2: size = prop.uiVal; break;
+ case VT_UI4: size = prop.ulVal; break;
+ case VT_UI8: size = (UInt64)prop.uhVal.QuadPart; break;
+ case VT_EMPTY: return S_OK;
+ default: return E_FAIL;
+ }
+ defined = true;
+ return S_OK;
+}
+
+#endif
+
HRESULT CArc::GetItemSize(UInt32 index, UInt64 &size, bool &defined) const
{
NCOM::CPropVariant prop;
@@ -104,6 +974,7 @@ HRESULT CArc::GetItemMTime(UInt32 index, FILETIME &ft, bool &defined) const
}
#ifndef _SFX
+
static inline bool TestSignature(const Byte *p1, const Byte *p2, size_t size)
{
for (size_t i = 0; i < size; i++)
@@ -111,296 +982,2097 @@ static inline bool TestSignature(const Byte *p1, const Byte *p2, size_t size)
return false;
return true;
}
+
+static void MakeCheckOrder(CCodecs *codecs,
+ CIntVector &orderIndices, unsigned numTypes, CIntVector &orderIndices2,
+ const Byte *data, size_t dataSize)
+{
+ for (unsigned i = 0; i < numTypes; i++)
+ {
+ int index = orderIndices[i];
+ if (index < 0)
+ continue;
+ const CArcInfoEx &ai = codecs->Formats[index];
+ if (ai.SignatureOffset != 0)
+ {
+ orderIndices2.Add(index);
+ orderIndices[i] = -1;
+ continue;
+ }
+
+ const CObjectVector<CByteBuffer> &sigs = ai.Signatures;
+ FOR_VECTOR (k, sigs)
+ {
+ const CByteBuffer &sig = sigs[k];
+ if (sig.Size() == 0 && dataSize == 0 ||
+ sig.Size() != 0 && sig.Size() <= dataSize &&
+ TestSignature(data, sig, sig.Size()))
+ {
+ orderIndices2.Add(index);
+ orderIndices[i] = -1;
+ break;
+ }
+ }
+ }
+}
+
#endif
#ifdef UNDER_CE
-static const int kNumHashBytes = 1;
-#define HASH_VAL(buf, pos) ((buf)[pos])
+ static const unsigned kNumHashBytes = 1;
+ #define HASH_VAL(buf, pos) ((buf)[pos])
#else
-static const int kNumHashBytes = 2;
-#define HASH_VAL(buf, pos) ((buf)[pos] | ((UInt32)(buf)[pos + 1] << 8))
+ static const unsigned kNumHashBytes = 2;
+ #define HASH_VAL(buf, pos) ((buf)[pos] | ((UInt32)(buf)[pos + 1] << 8))
#endif
-HRESULT CArc::OpenStream(
- CCodecs *codecs,
- int formatIndex,
- IInStream *stream,
- ISequentialInStream *seqStream,
- IArchiveOpenCallback *callback)
+#ifndef _SFX
+
+static bool IsExeExt(const UString &ext)
{
- Archive.Release();
+ return ext.IsEqualTo_Ascii_NoCase("exe");
+}
+
+static const char * const k_PreArcFormats[] =
+{
+ "pe"
+ , "elf"
+ , "macho"
+ , "mub"
+ , "te"
+};
+
+static bool IsNameFromList(const UString &s, const char * const names[], size_t num)
+{
+ for (unsigned i = 0; i < num; i++)
+ if (StringsAreEqualNoCase_Ascii(s, names[i]))
+ return true;
+ return false;
+}
+
+
+static bool IsPreArcFormat(const CArcInfoEx &ai)
+{
+ if (ai.Flags_PreArc())
+ return true;
+ return IsNameFromList(ai.Name, k_PreArcFormats, ARRAY_SIZE(k_PreArcFormats));
+}
+
+static const char * const k_Formats_with_simple_signuature[] =
+{
+ "7z"
+ , "xz"
+ , "rar"
+ , "bzip2"
+ , "gzip"
+ , "cab"
+ , "wim"
+ , "rpm"
+ , "vhd"
+ , "xar"
+};
+
+static bool IsNewStyleSignature(const CArcInfoEx &ai)
+{
+ // if (ai.Version >= 0x91F)
+ if (ai.NewInterface)
+ return true;
+ return IsNameFromList(ai.Name, k_Formats_with_simple_signuature, ARRAY_SIZE(k_Formats_with_simple_signuature));
+}
+
+class CArchiveOpenCallback_Offset:
+ public IArchiveOpenCallback,
+ public IArchiveOpenVolumeCallback,
+ #ifndef _NO_CRYPTO
+ public ICryptoGetTextPassword,
+ #endif
+ public CMyUnknownImp
+{
+public:
+ CMyComPtr<IArchiveOpenCallback> Callback;
+ CMyComPtr<IArchiveOpenVolumeCallback> OpenVolumeCallback;
+ UInt64 Files;
+ UInt64 Offset;
+
+ #ifndef _NO_CRYPTO
+ CMyComPtr<ICryptoGetTextPassword> GetTextPassword;
+ #endif
+
+ MY_QUERYINTERFACE_BEGIN2(IArchiveOpenCallback)
+ MY_QUERYINTERFACE_ENTRY(IArchiveOpenVolumeCallback)
+ #ifndef _NO_CRYPTO
+ MY_QUERYINTERFACE_ENTRY(ICryptoGetTextPassword)
+ #endif
+ MY_QUERYINTERFACE_END
+ MY_ADDREF_RELEASE
+
+ INTERFACE_IArchiveOpenCallback(;)
+ INTERFACE_IArchiveOpenVolumeCallback(;)
+ #ifndef _NO_CRYPTO
+ STDMETHOD(CryptoGetTextPassword)(BSTR *password);
+ #endif
+};
+
+#ifndef _NO_CRYPTO
+STDMETHODIMP CArchiveOpenCallback_Offset::CryptoGetTextPassword(BSTR *password)
+{
+ COM_TRY_BEGIN
+ if (GetTextPassword)
+ return GetTextPassword->CryptoGetTextPassword(password);
+ return E_NOTIMPL;
+ COM_TRY_END
+}
+#endif
+
+STDMETHODIMP CArchiveOpenCallback_Offset::SetTotal(const UInt64 *, const UInt64 *)
+{
+ return S_OK;
+}
+
+STDMETHODIMP CArchiveOpenCallback_Offset::SetCompleted(const UInt64 *, const UInt64 *bytes)
+{
+ if (!Callback)
+ return S_OK;
+ UInt64 value = Offset;
+ if (bytes)
+ value += *bytes;
+ return Callback->SetCompleted(&Files, &value);
+}
+
+STDMETHODIMP CArchiveOpenCallback_Offset::GetProperty(PROPID propID, PROPVARIANT *value)
+{
+ if (OpenVolumeCallback)
+ return OpenVolumeCallback->GetProperty(propID, value);
+ NCOM::PropVariant_Clear(value);
+ return S_OK;
+ // return E_NOTIMPL;
+}
+
+STDMETHODIMP CArchiveOpenCallback_Offset::GetStream(const wchar_t *name, IInStream **inStream)
+{
+ if (OpenVolumeCallback)
+ return OpenVolumeCallback->GetStream(name, inStream);
+ return S_FALSE;
+}
+
+#endif
+
+
+UInt32 GetOpenArcErrorFlags(const NCOM::CPropVariant &prop, bool *isDefinedProp)
+{
+ if (isDefinedProp != NULL)
+ *isDefinedProp = false;
+
+ switch (prop.vt)
+ {
+ case VT_UI8: if (isDefinedProp) *isDefinedProp = true; return (UInt32)prop.uhVal.QuadPart;
+ case VT_UI4: if (isDefinedProp) *isDefinedProp = true; return prop.ulVal;
+ case VT_EMPTY: return 0;
+ default: throw 151199;
+ }
+}
+
+void CArcErrorInfo::ClearErrors()
+{
+ // ErrorFormatIndex = -1; // we don't need to clear ErrorFormatIndex here !!!
+
+ ThereIsTail = false;
+ UnexpecedEnd = false;
+ IgnoreTail = false;
+ // NonZerosTail = false;
+ ErrorFlags_Defined = false;
+ ErrorFlags = 0;
+ WarningFlags = 0;
+ TailSize = 0;
+
ErrorMessage.Empty();
+ WarningMessage.Empty();
+}
+
+HRESULT CArc::ReadBasicProps(IInArchive *archive, UInt64 startPos, HRESULT openRes)
+{
+ // OkPhySize_Defined = false;
+ PhySizeDefined = false;
+ PhySize = 0;
+ Offset = 0;
+ AvailPhySize = FileSize - startPos;
+
+ ErrorInfo.ClearErrors();
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetArchiveProperty(kpidErrorFlags, &prop));
+ ErrorInfo.ErrorFlags = GetOpenArcErrorFlags(prop, &ErrorInfo.ErrorFlags_Defined);
+ }
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetArchiveProperty(kpidWarningFlags, &prop));
+ ErrorInfo.WarningFlags = GetOpenArcErrorFlags(prop);
+ }
+
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetArchiveProperty(kpidError, &prop));
+ if (prop.vt != VT_EMPTY)
+ ErrorInfo.ErrorMessage = (prop.vt == VT_BSTR ? prop.bstrVal : L"Unknown error");
+ }
+
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetArchiveProperty(kpidWarning, &prop));
+ if (prop.vt != VT_EMPTY)
+ ErrorInfo.WarningMessage = (prop.vt == VT_BSTR ? prop.bstrVal : L"Unknown warning");
+ }
+
+ if (openRes == S_OK || ErrorInfo.IsArc_After_NonOpen())
+ {
+ RINOK(Archive_GetArcProp_UInt(archive, kpidPhySize, PhySize, PhySizeDefined));
+ /*
+ RINOK(Archive_GetArcProp_UInt(archive, kpidOkPhySize, OkPhySize, OkPhySize_Defined));
+ if (!OkPhySize_Defined)
+ {
+ OkPhySize_Defined = PhySizeDefined;
+ OkPhySize = PhySize;
+ }
+ */
+
+ bool offsetDefined;
+ RINOK(Archive_GetArcProp_Int(archive, kpidOffset, Offset, offsetDefined));
+
+ Int64 globalOffset = startPos + Offset;
+ AvailPhySize = FileSize - globalOffset;
+ if (PhySizeDefined)
+ {
+ UInt64 endPos = globalOffset + PhySize;
+ if (endPos < FileSize)
+ {
+ AvailPhySize = PhySize;
+ ErrorInfo.ThereIsTail = true;
+ ErrorInfo.TailSize = FileSize - endPos;
+ }
+ else if (endPos > FileSize)
+ ErrorInfo.UnexpecedEnd = true;
+ }
+ }
+
+ return S_OK;
+}
+
+/*
+static PrintNumber(const char *s, int n)
+{
+ char temp[100];
+ sprintf(temp, "%s %d", s, n);
+ OutputDebugStringA(temp);
+}
+*/
+
+HRESULT CArc::PrepareToOpen(const COpenOptions &op, unsigned formatIndex, CMyComPtr<IInArchive> &archive)
+{
+ // OutputDebugStringA("a1");
+ // PrintNumber("formatIndex", formatIndex);
+
+ RINOK(op.codecs->CreateInArchive(formatIndex, archive));
+ // OutputDebugStringA("a2");
+ if (!archive)
+ return S_OK;
+
+ #ifdef EXTERNAL_CODECS
+ if (op.codecs->NeedSetLibCodecs)
+ {
+ const CArcInfoEx &ai = op.codecs->Formats[formatIndex];
+ if (ai.LibIndex >= 0 ?
+ !op.codecs->Libs[ai.LibIndex].SetCodecs :
+ !op.codecs->Libs.IsEmpty())
+ {
+ CMyComPtr<ISetCompressCodecsInfo> setCompressCodecsInfo;
+ archive.QueryInterface(IID_ISetCompressCodecsInfo, (void **)&setCompressCodecsInfo);
+ if (setCompressCodecsInfo)
+ {
+ RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(op.codecs));
+ }
+ }
+ }
+ #endif
+
+
+ #ifndef _SFX
+
+ const CArcInfoEx &ai = op.codecs->Formats[formatIndex];
+
+ // OutputDebugStringW(ai.Name);
+ // OutputDebugStringA("a3");
+
+ if (ai.Flags_PreArc())
+ {
+ /* we notify parsers that extract executables, that they don't need
+ to open archive, if there is tail after executable (for SFX cases) */
+ CMyComPtr<IArchiveAllowTail> allowTail;
+ archive.QueryInterface(IID_IArchiveAllowTail, (void **)&allowTail);
+ if (allowTail)
+ allowTail->AllowTail(BoolToInt(true));
+ }
+
+ if (op.props)
+ {
+ /*
+ FOR_VECTOR (y, op.props)
+ {
+ const COptionalOpenProperties &optProps = (*op.props)[y];
+ if (optProps.FormatName.IsEmpty() || optProps.FormatName.CompareNoCase(ai.Name) == 0)
+ {
+ RINOK(SetProperties(archive, optProps.Props));
+ break;
+ }
+ }
+ */
+ RINOK(SetProperties(archive, *op.props));
+ }
+
+ #endif
+ return S_OK;
+}
+
+#ifndef _SFX
+
+static HRESULT ReadParseItemProps(IInArchive *archive, const CArcInfoEx &ai, NArchive::NParser::CParseItem &pi)
+{
+ pi.Extension = ai.GetMainExt();
+ pi.FileTime_Defined = false;
+ pi.ArcType = ai.Name;
+
+ RINOK(Archive_GetArcBoolProp(archive, kpidIsNotArcType, pi.IsNotArcType));
+
+ // RINOK(Archive_GetArcBoolProp(archive, kpidIsSelfExe, pi.IsSelfExe));
+ pi.IsSelfExe = ai.Flags_PreArc();
+
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetArchiveProperty(kpidMTime, &prop));
+ if (prop.vt == VT_FILETIME)
+ {
+ pi.FileTime_Defined = true;
+ pi.FileTime = prop.filetime;
+ }
+ }
+
+ if (!pi.FileTime_Defined)
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetArchiveProperty(kpidCTime, &prop));
+ if (prop.vt == VT_FILETIME)
+ {
+ pi.FileTime_Defined = true;
+ pi.FileTime = prop.filetime;
+ }
+ }
+
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetArchiveProperty(kpidName, &prop));
+ if (prop.vt == VT_BSTR)
+ {
+ pi.Name.SetFromBstr(prop.bstrVal);
+ pi.Extension.Empty();
+ }
+ else
+ {
+ RINOK(archive->GetArchiveProperty(kpidExtension, &prop));
+ if (prop.vt == VT_BSTR)
+ pi.Extension.SetFromBstr(prop.bstrVal);
+ }
+ }
+
+ {
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetArchiveProperty(kpidShortComment, &prop));
+ if (prop.vt == VT_BSTR)
+ pi.Comment.SetFromBstr(prop.bstrVal);
+ }
+
+
+ UInt32 numItems;
+ RINOK(archive->GetNumberOfItems(&numItems));
+
+ // pi.NumSubFiles = numItems;
+ // RINOK(Archive_GetArcProp_UInt(archive, kpidUnpackSize, pi.UnpackSize, pi.UnpackSize_Defined));
+ // if (!pi.UnpackSize_Defined)
+ {
+ pi.NumSubFiles = 0;
+ pi.NumSubDirs = 0;
+ pi.UnpackSize = 0;
+ for (UInt32 i = 0; i < numItems; i++)
+ {
+ UInt64 size = 0;
+ bool defined = false;
+ Archive_GetItem_Size(archive, i, size, defined);
+ if (defined)
+ {
+ pi.UnpackSize_Defined = true;
+ pi.UnpackSize += size;
+ }
+
+ bool isDir = false;
+ Archive_IsItem_Dir(archive, i, isDir);
+ if (isDir)
+ pi.NumSubDirs++;
+ else
+ pi.NumSubFiles++;
+ }
+ if (pi.NumSubDirs != 0)
+ pi.NumSubDirs_Defined = true;
+ pi.NumSubFiles_Defined = true;
+ }
+
+ return S_OK;
+}
+
+#endif
+
+HRESULT CArc::CheckZerosTail(const COpenOptions &op, UInt64 offset)
+{
+ if (!op.stream)
+ return S_OK;
+ RINOK(op.stream->Seek(offset, STREAM_SEEK_SET, NULL));
+ const UInt32 kBufSize = 1 << 11;
+ Byte buf[kBufSize];
+
+ for (;;)
+ {
+ UInt32 processed = 0;
+ RINOK(op.stream->Read(buf, kBufSize, &processed));
+ if (processed == 0)
+ {
+ // ErrorInfo.NonZerosTail = false;
+ ErrorInfo.IgnoreTail = true;
+ return S_OK;
+ }
+ for (size_t i = 0; i < processed; i++)
+ {
+ if (buf[i] != 0)
+ {
+ // ErrorInfo.IgnoreTail = false;
+ // ErrorInfo.NonZerosTail = true;
+ return S_OK;
+ }
+ }
+ }
+}
+
+#ifndef _SFX
+
+class CExtractCallback_To_OpenCallback:
+ public IArchiveExtractCallback,
+ public ICompressProgressInfo,
+ public CMyUnknownImp
+{
+public:
+ CMyComPtr<IArchiveOpenCallback> Callback;
+ UInt64 Files;
+ UInt64 Offset;
+
+ MY_UNKNOWN_IMP2(IArchiveExtractCallback, ICompressProgressInfo)
+ INTERFACE_IArchiveExtractCallback(;)
+ STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
+ void Init(IArchiveOpenCallback *callback)
+ {
+ Callback = callback;
+ Files = 0;
+ Offset = 0;
+ }
+};
+
+STDMETHODIMP CExtractCallback_To_OpenCallback::SetTotal(UInt64 /* size */)
+{
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallback_To_OpenCallback::SetCompleted(const UInt64 * /* completeValue */)
+{
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallback_To_OpenCallback::SetRatioInfo(const UInt64 *inSize, const UInt64 * /* outSize */)
+{
+ if (Callback)
+ {
+ UInt64 value = Offset;
+ if (inSize)
+ value += *inSize;
+ return Callback->SetCompleted(&Files, &value);
+ }
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallback_To_OpenCallback::GetStream(UInt32 /* index */, ISequentialOutStream **outStream, Int32 /* askExtractMode */)
+{
+ *outStream = 0;
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallback_To_OpenCallback::PrepareOperation(Int32 /* askExtractMode */)
+{
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallback_To_OpenCallback::SetOperationResult(Int32 /* operationResult */)
+{
+ return S_OK;
+}
+
+static HRESULT OpenArchiveSpec(IInArchive *archive, bool needPhySize,
+ IInStream *stream, const UInt64 *maxCheckStartPosition,
+ IArchiveOpenCallback *openCallback,
+ IArchiveExtractCallback *extractCallback)
+{
+ /*
+ if (needPhySize)
+ {
+ CMyComPtr<IArchiveOpen2> open2;
+ archive->QueryInterface(IID_IArchiveOpen2, (void **)&open2);
+ if (open2)
+ return open2->ArcOpen2(stream, kOpenFlags_RealPhySize, openCallback);
+ }
+ */
+ RINOK(archive->Open(stream, maxCheckStartPosition, openCallback));
+ if (needPhySize)
+ {
+ bool phySize_Defined = false;
+ UInt64 phySize = 0;
+ RINOK(Archive_GetArcProp_UInt(archive, kpidPhySize, phySize, phySize_Defined));
+ if (phySize_Defined)
+ return S_OK;
+
+ bool phySizeCantBeDetected = false;;
+ RINOK(Archive_GetArcBoolProp(archive, kpidPhySizeCantBeDetected, phySizeCantBeDetected));
+
+ if (!phySizeCantBeDetected)
+ {
+ RINOK(archive->Extract(0, (UInt32)(Int32)-1, BoolToInt(true), extractCallback));
+ }
+ }
+ return S_OK;
+}
+
+static int FindFormatForArchiveType(CCodecs *codecs, CIntVector orderIndices, const char *name)
+{
+ FOR_VECTOR (i, orderIndices)
+ if (StringsAreEqualNoCase_Ascii(codecs->Formats[orderIndices[i]].Name, name))
+ return i;
+ return -1;
+}
+
+#endif
+
+HRESULT CArc::OpenStream2(const COpenOptions &op)
+{
+ // fprintf(stdout, "\nOpen: %S", Path); fflush(stdout);
+
+ Archive.Release();
+ GetRawProps.Release();
+ GetRootProps.Release();
+
+ ErrorInfo.ClearErrors();
+ ErrorInfo.ErrorFormatIndex = -1;
+
+ IsParseArc = false;
+ ArcStreamOffset = 0;
+
+ // OutputDebugStringA("1");
+ // OutputDebugStringW(Path);
+
const UString fileName = ExtractFileNameFromPath(Path);
UString extension;
{
- int dotPos = fileName.ReverseFind(L'.');
+ int dotPos = fileName.ReverseFind_Dot();
if (dotPos >= 0)
- extension = fileName.Mid(dotPos + 1);
+ extension = fileName.Ptr(dotPos + 1);
}
+
CIntVector orderIndices;
+
+ bool searchMarkerInHandler = false;
+ #ifdef _SFX
+ searchMarkerInHandler = true;
+ #endif
+
+ CBoolArr isMainFormatArr(op.codecs->Formats.Size());
+ {
+ FOR_VECTOR(i, op.codecs->Formats)
+ isMainFormatArr[i] = false;
+ }
+
+ UInt64 maxStartOffset =
+ op.openType.MaxStartOffset_Defined ?
+ op.openType.MaxStartOffset :
+ kMaxCheckStartPosition;
+
+ #ifndef _SFX
+ bool isUnknownExt = false;
+ #endif
+
+ bool isForced = false;
+ unsigned numMainTypes = 0;
+ int formatIndex = op.openType.FormatIndex;
+
if (formatIndex >= 0)
+ {
+ isForced = true;
orderIndices.Add(formatIndex);
+ numMainTypes = 1;
+ isMainFormatArr[(unsigned)formatIndex] = true;
+
+ searchMarkerInHandler = true;
+ }
else
{
+ unsigned numFinded = 0;
+ #ifndef _SFX
+ bool isPrearcExt = false;
+ #endif
+
+ {
+ FOR_VECTOR (i, op.codecs->Formats)
+ {
+ const CArcInfoEx &ai = op.codecs->Formats[i];
+
+ if (IgnoreSplit || !op.openType.CanReturnArc)
+ if (ai.IsSplit())
+ continue;
+ if (op.excludedFormats->FindInSorted(i) >= 0)
+ continue;
+
+ #ifndef _SFX
+ if (IsPreArcFormat(ai))
+ isPrearcExt = true;
+ #endif
+
+ if (ai.FindExtension(extension) >= 0)
+ {
+ // PrintNumber("orderIndices.Insert", i);
+ orderIndices.Insert(numFinded++, i);
+ isMainFormatArr[i] = true;
+ }
+ else
+ orderIndices.Add(i);
+ }
+ }
+
+ if (!op.stream)
+ {
+ if (numFinded != 1)
+ return E_NOTIMPL;
+ orderIndices.DeleteFrom(1);
+ }
+ // PrintNumber("numFinded", numFinded );
+
+ /*
+ if (op.openOnlySpecifiedByExtension)
+ {
+ if (numFinded != 0 && !IsExeExt(extension))
+ orderIndices.DeleteFrom(numFinded);
+ }
+ */
+
+ #ifndef _SFX
+
+ if (op.stream && orderIndices.Size() >= 2)
+ {
+ RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
+ CByteBuffer byteBuffer;
+ CIntVector orderIndices2;
+ if (numFinded == 0 || IsExeExt(extension))
+ {
+ // signature search was here
+ }
+ else if (extension.IsEqualTo("000") || extension.IsEqualTo("001"))
+ {
+ int i = FindFormatForArchiveType(op.codecs, orderIndices, "rar");
+ if (i >= 0)
+ {
+ const size_t kBufSize = (1 << 10);
+ byteBuffer.Alloc(kBufSize);
+ size_t processedSize = kBufSize;
+ RINOK(ReadStream(op.stream, byteBuffer, &processedSize));
+ if (processedSize >= 16)
+ {
+ const Byte *buf = byteBuffer;
+ const Byte kRarHeader[] = { 0x52 , 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00 };
+ if (TestSignature(buf, kRarHeader, 7) && buf[9] == 0x73 && (buf[10] & 1) != 0)
+ {
+ orderIndices2.Add(orderIndices[i]);
+ orderIndices[i] = -1;
+ if (i >= (int)numFinded)
+ numFinded++;
+ }
+ }
+ }
+ }
+ else
+ {
+ const size_t kBufSize = (1 << 10);
+ byteBuffer.Alloc(kBufSize);
+ size_t processedSize = kBufSize;
+ RINOK(ReadStream(op.stream, byteBuffer, &processedSize));
+ if (processedSize == 0)
+ return S_FALSE;
+
+ /*
+ check type order:
+ 1) matched extension, no signuature
+ 2) matched extension, matched signuature
+ // 3) no signuature
+ // 4) matched signuature
+ */
+
+ MakeCheckOrder(op.codecs, orderIndices, numFinded, orderIndices2, NULL, 0);
+ MakeCheckOrder(op.codecs, orderIndices, numFinded, orderIndices2, byteBuffer, processedSize);
+ // MakeCheckOrder(op.codecs, orderIndices, orderIndices.Size(), orderIndices2, NULL, 0);
+ // MakeCheckOrder(op.codecs, orderIndices, orderIndices.Size(), orderIndices2, byteBuffer, processedSize);
+ }
+
+ FOR_VECTOR (i, orderIndices)
+ {
+ int val = orderIndices[i];
+ if (val != -1)
+ orderIndices2.Add(val);
+ }
+ orderIndices = orderIndices2;
+ }
+
+ if (orderIndices.Size() >= 2)
+ {
+ int iIso = FindFormatForArchiveType(op.codecs, orderIndices, "iso");
+ int iUdf = FindFormatForArchiveType(op.codecs, orderIndices, "udf");
+ if (iUdf > iIso && iIso >= 0)
+ {
+ int isoIndex = orderIndices[iIso];
+ int udfIndex = orderIndices[iUdf];
+ orderIndices[iUdf] = isoIndex;
+ orderIndices[iIso] = udfIndex;
+ }
+ }
+
+ numMainTypes = numFinded;
+ isUnknownExt = (numMainTypes == 0) || isPrearcExt;
+
+ #else // _SFX
+
+ numMainTypes = orderIndices.Size();
+
+ // we need correct numMainTypes for mutlivolume SFX (if some volume is missing)
+ if (numFinded != 0)
+ numMainTypes = numFinded;
+
+ #endif
+ }
+
+ UInt64 fileSize = 0;
+ if (op.stream)
+ {
+ RINOK(op.stream->Seek(0, STREAM_SEEK_END, &fileSize));
+ RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
+ }
+ FileSize = fileSize;
+
+
+ #ifndef _SFX
+
+ CBoolArr skipFrontalFormat(op.codecs->Formats.Size());
+ {
+ FOR_VECTOR(i, op.codecs->Formats)
+ skipFrontalFormat[i] = false;
+ }
+
+ #endif
+
+ const COpenType &mode = op.openType;
+
+
+
- int i;
- int numFinded = 0;
- for (i = 0; i < codecs->Formats.Size(); i++)
- if (codecs->Formats[i].FindExtension(extension) >= 0)
- orderIndices.Insert(numFinded++, i);
- else
- orderIndices.Add(i);
- if (!stream)
+ if (mode.CanReturnArc)
{
- if (numFinded != 1)
- return E_NOTIMPL;
- orderIndices.DeleteFrom(1);
+ // ---------- OPEN main type by extenssion ----------
+
+ unsigned numCheckTypes = orderIndices.Size();
+ if (formatIndex >= 0)
+ numCheckTypes = numMainTypes;
+
+ for (unsigned i = 0; i < numCheckTypes; i++)
+ {
+ FormatIndex = orderIndices[i];
+
+ bool exactOnly = false;
+
+ #ifndef _SFX
+
+ const CArcInfoEx &ai = op.codecs->Formats[FormatIndex];
+ // OutputDebugStringW(ai.Name);
+ if (i >= numMainTypes)
+ {
+ if (!ai.Flags_BackwardOpen()
+ // && !ai.Flags_PureStartOpen()
+ )
+ continue;
+ exactOnly = true;
+ }
+
+ #endif
+
+ // Some handlers do not set total bytes. So we set it here
+ if (op.callback)
+ RINOK(op.callback->SetTotal(NULL, &fileSize));
+
+ if (op.stream)
+ {
+ RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
+ }
+
+ CMyComPtr<IInArchive> archive;
+
+ RINOK(PrepareToOpen(op, FormatIndex, archive));
+ if (!archive)
+ continue;
+
+ HRESULT result;
+ if (op.stream)
+ {
+ UInt64 searchLimit = (!exactOnly && searchMarkerInHandler) ? maxStartOffset: 0;
+ result = archive->Open(op.stream, &searchLimit, op.callback);
+ }
+ else
+ {
+ CMyComPtr<IArchiveOpenSeq> openSeq;
+ archive.QueryInterface(IID_IArchiveOpenSeq, (void **)&openSeq);
+ if (!openSeq)
+ return E_NOTIMPL;
+ result = openSeq->OpenSeq(op.seqStream);
+ }
+
+ RINOK(ReadBasicProps(archive, 0, result));
+
+ if (result == S_FALSE)
+ {
+ bool isArc = ErrorInfo.IsArc_After_NonOpen();
+
+ #ifndef _SFX
+ // if it's archive, we allow another open attempt for parser
+ if (!mode.CanReturnParser || !isArc)
+ skipFrontalFormat[(unsigned)FormatIndex] = true;
+ #endif
+
+ if (exactOnly)
+ continue;
+
+ if (i == 0 && numMainTypes == 1)
+ {
+ // we set NonOpenErrorInfo, only if there is only one main format (defined by extension).
+ ErrorInfo.ErrorFormatIndex = FormatIndex;
+ NonOpen_ErrorInfo = ErrorInfo;
+
+ if (!mode.CanReturnParser && isArc)
+ {
+ // if (formatIndex < 0 && !searchMarkerInHandler)
+ {
+ // if bad archive was detected, we don't need additional open attempts
+ #ifndef _SFX
+ if (!IsPreArcFormat(ai) /* || !mode.SkipSfxStub */)
+ #endif
+ return S_FALSE;
+ }
+ }
+ }
+
+ /*
+ #ifndef _SFX
+ if (IsExeExt(extension) || ai.Flags_PreArc())
+ {
+ // openOnlyFullArc = false;
+ // canReturnTailArc = true;
+ // limitSignatureSearch = true;
+ }
+ #endif
+ */
+
+ continue;
+ }
+
+ RINOK(result);
+
+ #ifndef _SFX
+
+ bool isMainFormat = isMainFormatArr[(unsigned)FormatIndex];
+ const COpenSpecFlags &specFlags = mode.GetSpec(isForced, isMainFormat, isUnknownExt);
+
+ bool thereIsTail = ErrorInfo.ThereIsTail;
+ if (thereIsTail && mode.ZerosTailIsAllowed)
+ {
+ RINOK(CheckZerosTail(op, Offset + PhySize));
+ if (ErrorInfo.IgnoreTail)
+ thereIsTail = false;
+ }
+
+ if (Offset > 0)
+ {
+ if (exactOnly
+ || !searchMarkerInHandler
+ || !specFlags.CanReturn_NonStart()
+ || (mode.MaxStartOffset_Defined && (UInt64)Offset > mode.MaxStartOffset))
+ continue;
+ }
+ if (thereIsTail)
+ {
+ if (Offset > 0)
+ {
+ if (!specFlags.CanReturnMid)
+ continue;
+ }
+ else if (!specFlags.CanReturnFrontal)
+ continue;
+ }
+
+ if (Offset > 0 || thereIsTail)
+ {
+ if (formatIndex < 0)
+ {
+ if (IsPreArcFormat(ai))
+ {
+ // openOnlyFullArc = false;
+ // canReturnTailArc = true;
+ /*
+ if (mode.SkipSfxStub)
+ limitSignatureSearch = true;
+ */
+ // if (mode.SkipSfxStub)
+ {
+ // skipFrontalFormat[FormatIndex] = true;
+ continue;
+ }
+ }
+ }
+ }
+
+ #endif
+
+ Archive = archive;
+ return S_OK;
+ }
}
+
+
#ifndef _SFX
- if (orderIndices.Size() >= 2 && (numFinded == 0 || extension.CompareNoCase(L"exe") == 0))
+
+ if (!op.stream)
+ return S_FALSE;
+
+ if (formatIndex >= 0 && !mode.CanReturnParser)
{
- CIntVector orderIndices2;
+ if (mode.MaxStartOffset_Defined)
+ {
+ if (mode.MaxStartOffset == 0)
+ return S_FALSE;
+ }
+ else
+ {
+ const CArcInfoEx &ai = op.codecs->Formats[formatIndex];
+ if (ai.FindExtension(extension) >= 0)
+ {
+ const CArcInfoEx &ai = op.codecs->Formats[formatIndex];
+ if (ai.Flags_FindSignature() && searchMarkerInHandler)
+ return S_FALSE;
+ }
+ }
+ }
+
+ NArchive::NParser::CHandler *handlerSpec = new NArchive::NParser::CHandler;
+ CMyComPtr<IInArchive> handler = handlerSpec;
+
+ CExtractCallback_To_OpenCallback *extractCallback_To_OpenCallback_Spec = new CExtractCallback_To_OpenCallback;
+ CMyComPtr<IArchiveExtractCallback> extractCallback_To_OpenCallback = extractCallback_To_OpenCallback_Spec;
+ extractCallback_To_OpenCallback_Spec->Init(op.callback);
+
+ {
+ // ---------- Check all possible START archives ----------
+ // this code is better for full file archives than Parser's code.
+
CByteBuffer byteBuffer;
- const size_t kBufferSize = (1 << 21);
- byteBuffer.SetCapacity(kBufferSize);
- RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL));
- size_t processedSize = kBufferSize;
- RINOK(ReadStream(stream, byteBuffer, &processedSize));
- if (processedSize == 0)
- return S_FALSE;
+ bool endOfFile = false;
+ size_t processedSize;
+ {
+ size_t bufSize = 1 << 20; // it must be larger than max signature offset or IsArcFunc offset ((1 << 19) + x for UDF)
+ if (bufSize > fileSize)
+ {
+ bufSize = (size_t)fileSize;
+ endOfFile = true;
+ }
+ byteBuffer.Alloc(bufSize);
+ RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
+ processedSize = bufSize;
+ RINOK(ReadStream(op.stream, byteBuffer, &processedSize));
+ if (processedSize == 0)
+ return S_FALSE;
+ if (processedSize < bufSize)
+ endOfFile = true;
+ }
+ CUIntVector sortedFormats;
+
+ unsigned i;
+
+ int splitIndex = -1;
- const Byte *buf = byteBuffer;
- CByteBuffer hashBuffer;
- const UInt32 kNumVals = 1 << (kNumHashBytes * 8);
- hashBuffer.SetCapacity(kNumVals);
- Byte *hash = hashBuffer;
- memset(hash, 0xFF, kNumVals);
- Byte prevs[256];
- if (orderIndices.Size() >= 256)
- return S_FALSE;
- int i;
for (i = 0; i < orderIndices.Size(); i++)
{
- const CArcInfoEx &ai = codecs->Formats[orderIndices[i]];
- const CByteBuffer &sig = ai.StartSignature;
- if (sig.GetCapacity() < kNumHashBytes)
+ unsigned form = orderIndices[i];
+ if (skipFrontalFormat[form])
+ continue;
+ const CArcInfoEx &ai = op.codecs->Formats[form];
+ if (ai.IsSplit())
+ {
+ splitIndex = form;
continue;
- UInt32 v = HASH_VAL(sig, 0);
- prevs[i] = hash[v];
- hash[v] = (Byte)i;
+ }
+
+ if (ai.IsArcFunc)
+ {
+ UInt32 isArcRes = ai.IsArcFunc(byteBuffer, processedSize);
+ if (isArcRes == k_IsArc_Res_NO)
+ continue;
+ if (isArcRes == k_IsArc_Res_NEED_MORE && endOfFile)
+ continue;
+ // if (isArcRes == k_IsArc_Res_YES_LOW_PROB) continue;
+ sortedFormats.Insert(0, form);
+ continue;
+ }
+
+ bool isNewStyleSignature = IsNewStyleSignature(ai);
+ bool needCheck = !isNewStyleSignature
+ || ai.Signatures.IsEmpty()
+ || ai.Flags_PureStartOpen()
+ || ai.Flags_StartOpen()
+ || ai.Flags_BackwardOpen();
+
+ if (isNewStyleSignature && !ai.Signatures.IsEmpty())
+ {
+ unsigned k;
+ for (k = 0; k < ai.Signatures.Size(); k++)
+ {
+ const CByteBuffer &sig = ai.Signatures[k];
+ UInt32 signatureEnd = ai.SignatureOffset + (UInt32)sig.Size();
+ if (processedSize < signatureEnd)
+ {
+ if (!endOfFile)
+ needCheck = true;
+ }
+ else if (memcmp(sig, byteBuffer + ai.SignatureOffset, sig.Size()) == 0)
+ break;
+ }
+ if (k != ai.Signatures.Size())
+ {
+ sortedFormats.Insert(0, form);
+ continue;
+ }
+ }
+ if (needCheck)
+ sortedFormats.Add(form);
}
- processedSize -= (kNumHashBytes - 1);
- for (UInt32 pos = 0; pos < processedSize; pos++)
+ if (splitIndex >= 0)
+ sortedFormats.Insert(0, splitIndex);
+
+ for (i = 0; i < sortedFormats.Size(); i++)
{
- for (; pos < processedSize && hash[HASH_VAL(buf, pos)] == 0xFF; pos++);
- if (pos == processedSize)
- break;
- UInt32 v = HASH_VAL(buf, pos);
- Byte *ptr = &hash[v];
- int i = *ptr;
- do
+ FormatIndex = sortedFormats[i];
+ const CArcInfoEx &ai = op.codecs->Formats[FormatIndex];
+
+ if (op.callback)
+ RINOK(op.callback->SetTotal(NULL, &fileSize));
+
+ RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
+
+ CMyComPtr<IInArchive> archive;
+ RINOK(PrepareToOpen(op, FormatIndex, archive));
+ if (!archive)
+ continue;
+
+ PRF(printf("\nSorted Open %S", (const wchar_t *)ai.Name));
+ HRESULT result;
{
- int index = orderIndices[i];
- const CArcInfoEx &ai = codecs->Formats[index];
- const CByteBuffer &sig = ai.StartSignature;
- if (sig.GetCapacity() != 0 && pos + sig.GetCapacity() <= processedSize + (kNumHashBytes - 1) &&
- TestSignature(buf + pos, sig, sig.GetCapacity()))
+ UInt64 searchLimit = 0;
+ /*
+ if (mode.CanReturnArc)
+ result = archive->Open(op.stream, &searchLimit, op.callback);
+ else
+ */
+ result = OpenArchiveSpec(archive, !mode.CanReturnArc, op.stream, &searchLimit, op.callback, extractCallback_To_OpenCallback);
+ }
+
+ if (result == S_FALSE)
+ {
+ skipFrontalFormat[(unsigned)FormatIndex] = true;
+ // FIXME: maybe we must use LenIsUnknown.
+ // printf(" OpenForSize Error");
+ continue;
+ }
+ RINOK(result);
+
+ RINOK(ReadBasicProps(archive, 0, result));
+
+ if (Offset > 0)
+ {
+ continue; // good handler doesn't return such Offset > 0
+ // but there are some cases like false prefixed PK00 archive, when
+ // we can support it?
+ }
+
+ NArchive::NParser::CParseItem pi;
+ pi.Offset = Offset;
+ pi.Size = AvailPhySize;
+
+ // bool needScan = false;
+
+ if (!PhySizeDefined)
+ {
+ // it's for Z format
+ pi.LenIsUnknown = true;
+ // needScan = true;
+ // phySize = arcRem;
+ // nextNeedCheckStartOpen = false;
+ }
+
+ /*
+ if (OkPhySize_Defined)
+ pi.OkSize = pi.OkPhySize;
+ else
+ pi.OkSize = pi.Size;
+ */
+
+ pi.NormalizeOffset();
+ // printf(" phySize = %8d", (unsigned)phySize);
+
+
+ if (mode.CanReturnArc)
+ {
+ bool isMainFormat = isMainFormatArr[(unsigned)FormatIndex];
+ const COpenSpecFlags &specFlags = mode.GetSpec(isForced, isMainFormat, isUnknownExt);
+ bool openCur = false;
+
+ if (!ErrorInfo.ThereIsTail)
+ openCur = true;
+ else
{
- orderIndices2.Add(index);
- orderIndices[i] = 0xFF;
- *ptr = prevs[i];
+ if (mode.ZerosTailIsAllowed)
+ {
+ RINOK(CheckZerosTail(op, Offset + PhySize));
+ if (ErrorInfo.IgnoreTail)
+ openCur = true;
+ }
+ if (!openCur)
+ {
+ openCur = specFlags.CanReturnFrontal;
+ if (formatIndex < 0) // format is not forced
+ {
+ if (IsPreArcFormat(ai))
+ {
+ // if (mode.SkipSfxStub)
+ {
+ openCur = false;
+ }
+ }
+ }
+ }
+ }
+
+ if (openCur)
+ {
+ InStream = op.stream;
+ Archive = archive;
+ return S_OK;
}
- else
- ptr = &prevs[i];
- i = *ptr;
}
- while (i != 0xFF);
+
+ skipFrontalFormat[(unsigned)FormatIndex] = true;
+
+
+ // if (!mode.CanReturnArc)
+ /*
+ if (!ErrorInfo.ThereIsTail)
+ continue;
+ */
+ if (pi.Offset == 0 && !pi.LenIsUnknown && pi.Size >= FileSize)
+ continue;
+
+ // printf("\nAdd offset = %d", (int)pi.Offset);
+ RINOK(ReadParseItemProps(archive, ai, pi));
+ handlerSpec->AddItem(pi);
}
-
- for (i = 0; i < orderIndices.Size(); i++)
+ }
+
+
+
+
+
+ // ---------- PARSER ----------
+
+ CUIntVector arc2sig; // formatIndex to signatureIndex
+ CUIntVector sig2arc; // signatureIndex to formatIndex;
+ {
+ unsigned sum = 0;
+ FOR_VECTOR (i, op.codecs->Formats)
{
- int val = orderIndices[i];
- if (val != 0xFF)
- orderIndices2.Add(val);
+ arc2sig.Add(sum);
+ const CObjectVector<CByteBuffer> &sigs = op.codecs->Formats[i].Signatures;
+ sum += sigs.Size();
+ FOR_VECTOR (k, sigs)
+ sig2arc.Add(i);
}
- orderIndices = orderIndices2;
}
- else if (extension == L"000" || extension == L"001")
+
{
- CByteBuffer byteBuffer;
- const size_t kBufferSize = (1 << 10);
- byteBuffer.SetCapacity(kBufferSize);
- Byte *buffer = byteBuffer;
- RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL));
- size_t processedSize = kBufferSize;
- RINOK(ReadStream(stream, buffer, &processedSize));
- if (processedSize >= 16)
- {
- Byte kRarHeader[] = {0x52 , 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00};
- if (TestSignature(buffer, kRarHeader, 7) && buffer[9] == 0x73 && (buffer[10] & 1) != 0)
- {
- for (int i = 0; i < orderIndices.Size(); i++)
- {
- int index = orderIndices[i];
- const CArcInfoEx &ai = codecs->Formats[index];
- if (ai.Name.CompareNoCase(L"rar") != 0)
+ const size_t kBeforeSize = 1 << 16;
+ const size_t kAfterSize = 1 << 20;
+ const size_t kBufSize = 1 << 22; // it must be more than kBeforeSize + kAfterSize
+
+ const UInt32 kNumVals = (UInt32)1 << (kNumHashBytes * 8);
+ CByteArr hashBuffer(kNumVals);
+ Byte *hash = hashBuffer;
+ memset(hash, 0xFF, kNumVals);
+ Byte prevs[256];
+ memset(prevs, 0xFF, sizeof(prevs));
+ if (sig2arc.Size() >= 0xFF)
+ return S_FALSE;
+
+ CUIntVector difficultFormats;
+ CBoolArr difficultBools(256);
+ {
+ for (unsigned i = 0; i < 256; i++)
+ difficultBools[i] = false;
+ }
+
+ bool thereAreHandlersForSearch = false;
+
+ // UInt32 maxSignatureEnd = 0;
+
+ FOR_VECTOR (i, orderIndices)
+ {
+ int index = orderIndices[i];
+ if (index < 0)
+ continue;
+ const CArcInfoEx &ai = op.codecs->Formats[index];
+ bool isDifficult = false;
+ // if (ai.Version < 0x91F) // we don't use parser with old DLL (before 9.31)
+ if (!ai.NewInterface)
+ isDifficult = true;
+ else
+ {
+ if (ai.Flags_StartOpen())
+ isDifficult = true;
+ FOR_VECTOR (k, ai.Signatures)
+ {
+ const CByteBuffer &sig = ai.Signatures[k];
+ /*
+ UInt32 signatureEnd = ai.SignatureOffset + (UInt32)sig.Size();
+ if (maxSignatureEnd < signatureEnd)
+ maxSignatureEnd = signatureEnd;
+ */
+ if (sig.Size() < kNumHashBytes)
+ {
+ isDifficult = true;
continue;
- orderIndices.Delete(i--);
- orderIndices.Insert(0, index);
- break;
+ }
+ thereAreHandlersForSearch = true;
+ UInt32 v = HASH_VAL(sig, 0);
+ unsigned sigIndex = arc2sig[(unsigned)index] + k;
+ prevs[sigIndex] = hash[v];
+ hash[v] = (Byte)sigIndex;
}
}
+ if (isDifficult)
+ {
+ difficultFormats.Add(index);
+ difficultBools[index] = true;
+ }
}
- }
- if (orderIndices.Size() >= 2)
- {
- int isoIndex = codecs->FindFormatForArchiveType(L"iso");
- int udfIndex = codecs->FindFormatForArchiveType(L"udf");
- int iIso = -1;
- int iUdf = -1;
- for (int i = 0; i < orderIndices.Size(); i++)
+
+ if (!thereAreHandlersForSearch)
{
- if (orderIndices[i] == isoIndex) iIso = i;
- if (orderIndices[i] == udfIndex) iUdf = i;
+ // openOnlyFullArc = true;
+ // canReturnTailArc = true;
}
- if (iUdf > iIso && iIso >= 0)
+
+ RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
+
+ CLimitedCachedInStream *limitedStreamSpec = new CLimitedCachedInStream;
+ CMyComPtr<IInStream> limitedStream = limitedStreamSpec;
+ limitedStreamSpec->SetStream(op.stream);
+
+ CArchiveOpenCallback_Offset *openCallback_Offset_Spec = NULL;
+ CMyComPtr<IArchiveOpenCallback> openCallback_Offset;
+ if (op.callback)
{
- orderIndices[iUdf] = isoIndex;
- orderIndices[iIso] = udfIndex;
+ openCallback_Offset_Spec = new CArchiveOpenCallback_Offset;
+ openCallback_Offset = openCallback_Offset_Spec;
+ openCallback_Offset_Spec->Callback = op.callback;
+ openCallback_Offset_Spec->Callback.QueryInterface(IID_IArchiveOpenVolumeCallback, &openCallback_Offset_Spec->OpenVolumeCallback);
+ #ifndef _NO_CRYPTO
+ openCallback_Offset_Spec->Callback.QueryInterface(IID_ICryptoGetTextPassword, &openCallback_Offset_Spec->GetTextPassword);
+ #endif
}
- }
- #endif
- }
+ if (op.callback)
+ RINOK(op.callback->SetTotal(NULL, &fileSize));
+
+ CByteBuffer &byteBuffer = limitedStreamSpec->Buffer;
+ byteBuffer.Alloc(kBufSize);
- for (int i = 0; i < orderIndices.Size(); i++)
- {
- if (stream)
+ UInt64 callbackPrev = 0;
+ bool needCheckStartOpen = true; // = true, if we need to test all archives types for current pos.
+
+ bool endOfFile = false;
+ UInt64 bufPhyPos = 0;
+ size_t bytesInBuf = 0;
+ // UInt64 prevPos = 0;
+
+ // ---------- Main Scan Loop ----------
+
+ UInt64 pos = 0;
+
+ if (!mode.EachPos && handlerSpec->_items.Size() == 1)
{
- RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL));
+ NArchive::NParser::CParseItem &pi = handlerSpec->_items[0];
+ if (!pi.LenIsUnknown && pi.Offset == 0)
+ pos = pi.Size;
}
- CMyComPtr<IInArchive> archive;
- FormatIndex = orderIndices[i];
- RINOK(codecs->CreateInArchive(FormatIndex, archive));
- if (!archive)
- continue;
-
- #ifdef EXTERNAL_CODECS
+ for (;;)
{
- CMyComPtr<ISetCompressCodecsInfo> setCompressCodecsInfo;
- archive.QueryInterface(IID_ISetCompressCodecsInfo, (void **)&setCompressCodecsInfo);
- if (setCompressCodecsInfo)
+ // printf("\nPos = %d", (int)pos);
+ UInt64 posInBuf = pos - bufPhyPos;
+
+ // if (pos > ((UInt64)1 << 35)) break;
+
+ if (!endOfFile)
{
- RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(codecs));
+ if (bytesInBuf < kBufSize)
+ {
+ size_t processedSize = kBufSize - bytesInBuf;
+ // printf("\nRead ask = %d", (unsigned)processedSize);
+ UInt64 seekPos = bufPhyPos + bytesInBuf;
+ RINOK(op.stream->Seek(bufPhyPos + bytesInBuf, STREAM_SEEK_SET, NULL));
+ RINOK(ReadStream(op.stream, byteBuffer + bytesInBuf, &processedSize));
+ // printf(" processed = %d", (unsigned)processedSize);
+ if (processedSize == 0)
+ {
+ fileSize = seekPos;
+ endOfFile = true;
+ }
+ else
+ {
+ bytesInBuf += processedSize;
+ limitedStreamSpec->SetCache(processedSize, (size_t)bufPhyPos);
+ }
+ continue;
+ }
+
+ if (bytesInBuf < posInBuf)
+ {
+ UInt64 skipSize = posInBuf - bytesInBuf;
+ if (skipSize <= kBeforeSize)
+ {
+ size_t keepSize = (size_t)(kBeforeSize - skipSize);
+ // printf("\nmemmove skip = %d", (int)keepSize);
+ memmove(byteBuffer, byteBuffer + bytesInBuf - keepSize, keepSize);
+ bytesInBuf = keepSize;
+ bufPhyPos = pos - keepSize;
+ continue;
+ }
+ // printf("\nSkip %d", (int)(skipSize - kBeforeSize));
+ // RINOK(op.stream->Seek(skipSize - kBeforeSize, STREAM_SEEK_CUR, NULL));
+ bytesInBuf = 0;
+ bufPhyPos = pos - kBeforeSize;
+ continue;
+ }
+
+ if (bytesInBuf - posInBuf < kAfterSize)
+ {
+ size_t beg = (size_t)posInBuf - kBeforeSize;
+ // printf("\nmemmove for after beg = %d", (int)beg);
+ memmove(byteBuffer, byteBuffer + beg, bytesInBuf - beg);
+ bufPhyPos += beg;
+ bytesInBuf -= beg;
+ continue;
+ }
}
+
+ bool useOffsetCallback = false;
+ if (openCallback_Offset)
+ {
+ openCallback_Offset_Spec->Files = handlerSpec->_items.Size();
+ openCallback_Offset_Spec->Offset = pos;
+
+ useOffsetCallback = (!op.openType.CanReturnArc || handlerSpec->_items.Size() > 1);
+
+ if (pos >= callbackPrev + (1 << 23))
+ {
+ RINOK(openCallback_Offset_Spec->SetCompleted(NULL, NULL));
+ callbackPrev = pos;
+ }
+ }
+
+ {
+ UInt64 endPos = bufPhyPos + bytesInBuf;
+ if (fileSize < endPos)
+ {
+ FileSize = fileSize; // why ????
+ fileSize = endPos;
+ }
+ }
+
+ size_t availSize = bytesInBuf - (size_t)posInBuf;
+ if (availSize < kNumHashBytes)
+ break;
+ size_t scanSize = availSize -
+ ((availSize >= kAfterSize) ? kAfterSize : kNumHashBytes);
+
+ {
+ /*
+ UInt64 scanLimit = openOnlyFullArc ?
+ maxSignatureEnd :
+ op.openType.ScanSize + maxSignatureEnd;
+ */
+ if (!mode.CanReturnParser)
+ {
+ if (pos > maxStartOffset)
+ break;
+ UInt64 remScan = maxStartOffset - pos;
+ if (scanSize > remScan)
+ scanSize = (size_t)remScan;
+ }
+ }
+
+ scanSize++;
+
+ const Byte *buf = byteBuffer + (size_t)posInBuf;
+ size_t ppp = 0;
+
+ if (!needCheckStartOpen)
+ {
+ for (; ppp < scanSize && hash[HASH_VAL(buf, ppp)] == 0xFF; ppp++);
+ pos += ppp;
+ if (ppp == scanSize)
+ continue;
+ }
+
+ UInt32 v = HASH_VAL(buf, ppp);
+ bool nextNeedCheckStartOpen = true;
+ unsigned i = hash[v];
+ unsigned indexOfDifficult = 0;
+
+ // ---------- Open Loop for Current Pos ----------
+ bool wasOpen = false;
+
+ for (;;)
+ {
+ unsigned index;
+ bool isDifficult;
+ if (needCheckStartOpen && indexOfDifficult < difficultFormats.Size())
+ {
+ index = difficultFormats[indexOfDifficult++];
+ isDifficult = true;
+ }
+ else
+ {
+ if (i == 0xFF)
+ break;
+ index = sig2arc[i];
+ unsigned sigIndex = i - arc2sig[index];
+ i = prevs[i];
+ if (needCheckStartOpen && difficultBools[index])
+ continue;
+ const CArcInfoEx &ai = op.codecs->Formats[index];
+
+ if (pos < ai.SignatureOffset)
+ continue;
+
+ /*
+ if (openOnlyFullArc)
+ if (pos != ai.SignatureOffset)
+ continue;
+ */
+
+ const CByteBuffer &sig = ai.Signatures[sigIndex];
+
+ if (ppp + sig.Size() > availSize
+ || !TestSignature(buf + ppp, sig, sig.Size()))
+ continue;
+ // printf("\nSignature OK: %10S %8x %5d", (const wchar_t *)ai.Name, (int)pos, (int)(pos - prevPos));
+ // prevPos = pos;
+ isDifficult = false;
+ }
+
+ const CArcInfoEx &ai = op.codecs->Formats[index];
+
+
+ if ((isDifficult && pos == 0) || ai.SignatureOffset == pos)
+ {
+ // we don't check same archive second time */
+ if (skipFrontalFormat[index])
+ continue;
+ }
+
+ UInt64 startArcPos = pos;
+ if (!isDifficult)
+ {
+ if (pos < ai.SignatureOffset)
+ continue;
+ startArcPos = pos - ai.SignatureOffset;
+ /*
+ // we don't need the check for Z files
+ if (startArcPos < handlerSpec->GetLastEnd())
+ continue;
+ */
+ }
+
+ if (ai.IsArcFunc && startArcPos >= bufPhyPos)
+ {
+ size_t offsetInBuf = (size_t)(startArcPos - bufPhyPos);
+ if (offsetInBuf < bytesInBuf)
+ {
+ UInt32 isArcRes = ai.IsArcFunc(byteBuffer + offsetInBuf, bytesInBuf - offsetInBuf);
+ if (isArcRes == k_IsArc_Res_NO)
+ continue;
+ if (isArcRes == k_IsArc_Res_NEED_MORE && endOfFile)
+ continue;
+ /*
+ if (isArcRes == k_IsArc_Res_YES_LOW_PROB)
+ {
+ // if (pos != ai.SignatureOffset)
+ continue;
+ }
+ */
+ }
+ // printf("\nIsArc OK: %S", (const wchar_t *)ai.Name);
+ }
+
+ /*
+ if (pos == 67109888)
+ pos = pos;
+ */
+ PRF(printf("\npos = %9I64d : %S", pos, (const wchar_t *)ai.Name));
+
+ bool isMainFormat = isMainFormatArr[index];
+ const COpenSpecFlags &specFlags = mode.GetSpec(isForced, isMainFormat, isUnknownExt);
+
+ CMyComPtr<IInArchive> archive;
+ RINOK(PrepareToOpen(op, index, archive));
+ if (!archive)
+ return E_FAIL;
+
+ // OutputDebugStringW(ai.Name);
+
+ UInt64 rem = fileSize - startArcPos;
+
+ UInt64 arcStreamOffset = 0;
+
+ if (ai.Flags_UseGlobalOffset())
+ {
+ limitedStreamSpec->InitAndSeek(0, fileSize);
+ limitedStream->Seek(startArcPos, STREAM_SEEK_SET, NULL);
+ }
+ else
+ {
+ limitedStreamSpec->InitAndSeek(startArcPos, rem);
+ arcStreamOffset = startArcPos;
+ }
+
+ UInt64 maxCheckStartPosition = 0;
+
+ if (openCallback_Offset)
+ {
+ openCallback_Offset_Spec->Files = handlerSpec->_items.Size();
+ openCallback_Offset_Spec->Offset = startArcPos;
+ }
+
+ // HRESULT result = archive->Open(limitedStream, &maxCheckStartPosition, openCallback_Offset);
+ extractCallback_To_OpenCallback_Spec->Files = 0;
+ extractCallback_To_OpenCallback_Spec->Offset = startArcPos;
+
+ HRESULT result = OpenArchiveSpec(archive, true, limitedStream, &maxCheckStartPosition,
+ useOffsetCallback ? (IArchiveOpenCallback *)openCallback_Offset : (IArchiveOpenCallback *)op.callback,
+ extractCallback_To_OpenCallback);
+
+ RINOK(ReadBasicProps(archive, ai.Flags_UseGlobalOffset() ? 0 : startArcPos, result));
+
+ bool isOpen = false;
+ if (result == S_FALSE)
+ {
+ if (!mode.CanReturnParser)
+ {
+ if (formatIndex < 0 && ErrorInfo.IsArc_After_NonOpen())
+ {
+ ErrorInfo.ErrorFormatIndex = index;
+ NonOpen_ErrorInfo = ErrorInfo;
+ // if archive was detected, we don't need additional open attempts
+ return S_FALSE;
+ }
+ continue;
+ }
+ if (!ErrorInfo.IsArc_After_NonOpen() || !PhySizeDefined || PhySize == 0)
+ continue;
+ }
+ else
+ {
+ isOpen = true;
+ RINOK(result);
+ PRF(printf(" OK "));
+ }
+
+ // fprintf(stderr, "\n %8X %S", startArcPos, Path);
+ // printf("\nOpen OK: %S", ai.Name);
+
+
+ NArchive::NParser::CParseItem pi;
+ pi.Offset = startArcPos;
+
+ if (ai.Flags_UseGlobalOffset())
+ pi.Offset = Offset;
+ else if (Offset != 0)
+ return E_FAIL;
+ UInt64 arcRem = FileSize - pi.Offset;
+ UInt64 phySize = arcRem;
+ bool phySizeDefined = PhySizeDefined;
+ if (phySizeDefined)
+ {
+ if (pi.Offset + PhySize > FileSize)
+ {
+ // ErrorInfo.ThereIsTail = true;
+ PhySize = FileSize - pi.Offset;
+ }
+ phySize = PhySize;
+ }
+ if (phySize == 0 || (UInt64)phySize > ((UInt64)1 << 63))
+ return E_FAIL;
+
+ /*
+ if (!ai.UseGlobalOffset)
+ {
+ if (phySize > arcRem)
+ {
+ ThereIsTail = true;
+ phySize = arcRem;
+ }
+ }
+ */
+
+ bool needScan = false;
+
+
+ if (isOpen && !phySizeDefined)
+ {
+ // it's for Z format
+ pi.LenIsUnknown = true;
+ needScan = true;
+ phySize = arcRem;
+ nextNeedCheckStartOpen = false;
+ }
+
+ pi.Size = phySize;
+ /*
+ if (OkPhySize_Defined)
+ pi.OkSize = OkPhySize;
+ */
+ pi.NormalizeOffset();
+ // printf(" phySize = %8d", (unsigned)phySize);
+
+ /*
+ if (needSkipFullArc)
+ if (pi.Offset == 0 && phySizeDefined && pi.Size >= fileSize)
+ continue;
+ */
+ if (pi.Offset == 0 && !pi.LenIsUnknown && pi.Size >= FileSize)
+ {
+ // it's possible for dmg archives
+ if (!mode.CanReturnArc)
+ continue;
+ }
+
+ if (mode.EachPos)
+ pos++;
+ else if (needScan)
+ {
+ pos++;
+ /*
+ if (!OkPhySize_Defined)
+ pos++;
+ else
+ pos = pi.Offset + pi.OkSize;
+ */
+ }
+ else
+ pos = pi.Offset + pi.Size;
+
+
+ RINOK(ReadParseItemProps(archive, ai, pi));
+
+ if (pi.Offset < startArcPos && !mode.EachPos /* && phySizeDefined */)
+ {
+ /* It's for DMG format.
+ This code deletes all previous items that are included to current item */
+
+ while (!handlerSpec->_items.IsEmpty())
+ {
+ {
+ const NArchive::NParser::CParseItem &back = handlerSpec->_items.Back();
+ if (back.Offset < pi.Offset)
+ break;
+ if (back.Offset + back.Size > pi.Offset + pi.Size)
+ break;
+ }
+ handlerSpec->_items.DeleteBack();
+ }
+ }
+
+
+ if (isOpen && mode.CanReturnArc && phySizeDefined)
+ {
+ // if (pi.Offset + pi.Size >= fileSize)
+ bool openCur = false;
+
+ bool thereIsTail = ErrorInfo.ThereIsTail;
+ if (thereIsTail && mode.ZerosTailIsAllowed)
+ {
+ RINOK(CheckZerosTail(op, arcStreamOffset + Offset + PhySize));
+ if (ErrorInfo.IgnoreTail)
+ thereIsTail = false;
+ }
+
+ if (pi.Offset != 0)
+ {
+ if (!pi.IsNotArcType)
+ if (thereIsTail)
+ openCur = specFlags.CanReturnMid;
+ else
+ openCur = specFlags.CanReturnTail;
+ }
+ else
+ {
+ if (!thereIsTail)
+ openCur = true;
+ else
+ openCur = specFlags.CanReturnFrontal;
+
+
+ if (formatIndex >= -2)
+ openCur = true;
+ }
+ if (formatIndex < 0 && pi.IsSelfExe /* && mode.SkipSfxStub */)
+ openCur = false;
+
+ // We open file as SFX, if there is front archive or first archive is "Self Executable"
+ if (!openCur && !pi.IsSelfExe && !thereIsTail &&
+ (!pi.IsNotArcType || pi.Offset == 0))
+ {
+ if (handlerSpec->_items.IsEmpty())
+ {
+ if (specFlags.CanReturnTail)
+ openCur = true;
+ }
+ else if (handlerSpec->_items.Size() == 1)
+ {
+ if (handlerSpec->_items[0].IsSelfExe)
+ {
+ if (mode.SpecUnknownExt.CanReturnTail)
+ openCur = true;
+ }
+ }
+ }
+
+ if (openCur)
+ {
+ InStream = op.stream;
+ Archive = archive;
+ FormatIndex = index;
+ ArcStreamOffset = arcStreamOffset;
+ return S_OK;
+ }
+ }
+
+ /*
+ if (openOnlyFullArc)
+ {
+ ErrorInfo.ClearErrors();
+ return S_FALSE;
+ }
+ */
+
+ pi.FormatIndex = index;
+
+ // printf("\nAdd offset = %d", (int)pi.Offset);
+ handlerSpec->AddItem(pi);
+ wasOpen = true;
+ break;
+ }
+ // ---------- End of Open Loop for Current Pos ----------
+
+ if (!wasOpen)
+ pos++;
+ needCheckStartOpen = (nextNeedCheckStartOpen && wasOpen);
}
- #endif
+ // ---------- End of Main Scan Loop ----------
- // OutputDebugStringW(codecs->Formats[FormatIndex].Name);
+ /*
+ if (handlerSpec->_items.Size() == 1)
+ {
+ const NArchive::NParser::CParseItem &pi = handlerSpec->_items[0];
+ if (pi.Size == fileSize && pi.Offset == 0)
+ {
+ Archive = archive;
+ FormatIndex2 = pi.FormatIndex;
+ return S_OK;
+ }
+ }
+ */
- HRESULT result;
- if (stream)
- result = archive->Open(stream, &kMaxCheckStartPosition, callback);
- else
+ if (mode.CanReturnParser)
{
- CMyComPtr<IArchiveOpenSeq> openSeq;
- archive.QueryInterface(IID_IArchiveOpenSeq, (void **)&openSeq);
- if (!openSeq)
- return E_NOTIMPL;
- result = openSeq->OpenSeq(seqStream);
+ bool returnParser = (handlerSpec->_items.Size() == 1); // it's possible if fileSize was not correct at start of parsing
+ handlerSpec->AddUnknownItem(fileSize);
+ if (handlerSpec->_items.Size() == 0)
+ return S_FALSE;
+ if (returnParser || handlerSpec->_items.Size() != 1)
+ {
+ // return S_FALSE;
+ handlerSpec->_stream = op.stream;
+ Archive = handler;
+ ErrorInfo.ClearErrors();
+ IsParseArc = true;
+ FormatIndex = -1; // It's parser
+ Offset = 0;
+ return S_OK;
+ }
}
+ }
- if (result == S_FALSE)
- continue;
- RINOK(result);
+ #endif
+
+ if (!Archive)
+ return S_FALSE;
+ return S_OK;
+}
+
+HRESULT CArc::OpenStream(const COpenOptions &op)
+{
+ RINOK(OpenStream2(op));
+ // PrintNumber("op.formatIndex 3", op.formatIndex);
+
+ if (Archive)
+ {
+ GetRawProps.Release();
+ GetRootProps.Release();
+ Archive->QueryInterface(IID_IArchiveGetRawProps, (void **)&GetRawProps);
+ Archive->QueryInterface(IID_IArchiveGetRootProps, (void **)&GetRootProps);
+
+ RINOK(Archive_GetArcBoolProp(Archive, kpidIsTree, IsTree));
+ RINOK(Archive_GetArcBoolProp(Archive, kpidIsDeleted, Ask_Deleted));
+ RINOK(Archive_GetArcBoolProp(Archive, kpidIsAltStream, Ask_AltStream));
+ RINOK(Archive_GetArcBoolProp(Archive, kpidIsAux, Ask_Aux));
+ RINOK(Archive_GetArcBoolProp(Archive, kpidINode, Ask_INode));
+ RINOK(Archive_GetArcBoolProp(Archive, kpidReadOnly, IsReadOnly));
+ const UString fileName = ExtractFileNameFromPath(Path);
+ UString extension;
{
- NCOM::CPropVariant prop;
- archive->GetArchiveProperty(kpidError, &prop);
- if (prop.vt != VT_EMPTY)
- ErrorMessage = (prop.vt == VT_BSTR) ? prop.bstrVal : L"Unknown error";
+ int dotPos = fileName.ReverseFind_Dot();
+ if (dotPos >= 0)
+ extension = fileName.Ptr(dotPos + 1);
}
- Archive = archive;
- const CArcInfoEx &format = codecs->Formats[FormatIndex];
- if (format.Exts.Size() == 0)
- DefaultName = GetDefaultName2(fileName, L"", L"");
- else
+ DefaultName.Empty();
+ if (FormatIndex >= 0)
{
- int subExtIndex = format.FindExtension(extension);
- if (subExtIndex < 0)
- subExtIndex = 0;
- const CArcExtInfo &extInfo = format.Exts[subExtIndex];
- DefaultName = GetDefaultName2(fileName, extInfo.Ext, extInfo.AddExt);
+ const CArcInfoEx &ai = op.codecs->Formats[FormatIndex];
+ if (ai.Exts.Size() == 0)
+ DefaultName = GetDefaultName2(fileName, UString(), UString());
+ else
+ {
+ int subExtIndex = ai.FindExtension(extension);
+ if (subExtIndex < 0)
+ subExtIndex = 0;
+ const CArcExtInfo &extInfo = ai.Exts[subExtIndex];
+ DefaultName = GetDefaultName2(fileName, extInfo.Ext, extInfo.AddExt);
+ }
}
- return S_OK;
}
- return S_FALSE;
+
+ return S_OK;
}
-HRESULT CArc::OpenStreamOrFile(
- CCodecs *codecs,
- int formatIndex,
- bool stdInMode,
- IInStream *stream,
- IArchiveOpenCallback *callback)
+#ifdef _SFX
+
+#ifdef _WIN32
+ static const char *k_ExeExt = ".exe";
+ static const unsigned k_ExeExt_Len = 4;
+#else
+ static const char *k_ExeExt = "";
+ static const unsigned k_ExeExt_Len = 0;
+#endif
+
+#endif
+
+HRESULT CArc::OpenStreamOrFile(COpenOptions &op)
{
CMyComPtr<IInStream> fileStream;
CMyComPtr<ISequentialInStream> seqStream;
- if (stdInMode)
+ CInFileStream *fileStreamSpec = NULL;
+
+ if (op.stdInMode)
+ {
seqStream = new CStdInFileStream;
- else if (!stream)
+ op.seqStream = seqStream;
+ }
+ else if (!op.stream)
{
- CInFileStream *fileStreamSpec = new CInFileStream;
+ fileStreamSpec = new CInFileStream;
fileStream = fileStreamSpec;
+ Path = filePath;
if (!fileStreamSpec->Open(us2fs(Path)))
+ {
return GetLastError();
- stream = fileStream;
+ }
+ op.stream = fileStream;
+ #ifdef _SFX
+ IgnoreSplit = true;
+ #endif
}
/*
if (callback)
{
UInt64 fileSize;
- RINOK(stream->Seek(0, STREAM_SEEK_END, &fileSize));
- RINOK(callback->SetTotal(NULL, &fileSize))
+ RINOK(op.stream->Seek(0, STREAM_SEEK_END, &fileSize));
+ RINOK(op.callback->SetTotal(NULL, &fileSize))
}
*/
- return OpenStream(codecs, formatIndex, stream, seqStream, callback);
+ HRESULT res = OpenStream(op);
+ IgnoreSplit = false;
+
+ #ifdef _SFX
+
+ if (res != S_FALSE
+ || !fileStreamSpec
+ || !op.callbackSpec
+ || NonOpen_ErrorInfo.IsArc_After_NonOpen())
+ return res;
+
+ {
+ if (filePath.Len() > k_ExeExt_Len
+ && StringsAreEqualNoCase_Ascii(filePath.RightPtr(k_ExeExt_Len), k_ExeExt))
+ {
+ const UString path2 = filePath.Left(filePath.Len() - k_ExeExt_Len);
+ FOR_VECTOR (i, op.codecs->Formats)
+ {
+ const CArcInfoEx &ai = op.codecs->Formats[i];
+ if (ai.IsSplit())
+ continue;
+ UString path3 = path2;
+ path3 += L'.';
+ path3 += ai.GetMainExt(); // "7z" for SFX.
+ Path = path3;
+ Path.AddAscii(".001");
+ bool isOk = op.callbackSpec->SetSecondFileInfo(us2fs(Path));
+ if (!isOk)
+ {
+ Path = path3;
+ isOk = op.callbackSpec->SetSecondFileInfo(us2fs(Path));
+ }
+ if (isOk)
+ {
+ if (fileStreamSpec->Open(us2fs(Path)))
+ {
+ op.stream = fileStream;
+ NonOpen_ErrorInfo.ClearErrors_Full();
+ if (OpenStream(op) == S_OK)
+ return S_OK;
+ }
+ }
+ }
+ }
+ }
+
+ #endif
+
+ return res;
+}
+
+void CArchiveLink::KeepModeForNextOpen()
+{
+ for (unsigned i = Arcs.Size(); i != 0;)
+ {
+ i--;
+ CMyComPtr<IArchiveKeepModeForNextOpen> keep;
+ Arcs[i].Archive->QueryInterface(IID_IArchiveKeepModeForNextOpen, (void **)&keep);
+ if (keep)
+ keep->KeepModeForNextOpen();
+ }
}
HRESULT CArchiveLink::Close()
{
- for (int i = Arcs.Size() - 1; i >= 0; i--)
+ for (unsigned i = Arcs.Size(); i != 0;)
{
- RINOK(Arcs[i].Archive->Close());
+ i--;
+ RINOK(Arcs[i].Close());
}
IsOpen = false;
+ // ErrorsText.Empty();
return S_OK;
}
void CArchiveLink::Release()
{
+ // NonOpenErrorFormatIndex = -1;
+ NonOpen_ErrorInfo.ClearErrors();
+ NonOpen_ArcPath.Empty();
while (!Arcs.IsEmpty())
Arcs.DeleteBack();
}
-HRESULT CArchiveLink::Open(
- CCodecs *codecs,
- const CIntVector &formatIndices,
- bool stdInMode,
- IInStream *stream,
- const UString &filePath,
- IArchiveOpenCallback *callback)
+/*
+void CArchiveLink::Set_ErrorsText()
+{
+ FOR_VECTOR(i, Arcs)
+ {
+ const CArc &arc = Arcs[i];
+ if (!arc.ErrorFlagsText.IsEmpty())
+ {
+ if (!ErrorsText.IsEmpty())
+ ErrorsText.Add_LF();
+ ErrorsText += GetUnicodeString(arc.ErrorFlagsText);
+ }
+ if (!arc.ErrorMessage.IsEmpty())
+ {
+ if (!ErrorsText.IsEmpty())
+ ErrorsText.Add_LF();
+ ErrorsText += arc.ErrorMessage;
+ }
+
+ if (!arc.WarningMessage.IsEmpty())
+ {
+ if (!ErrorsText.IsEmpty())
+ ErrorsText.Add_LF();
+ ErrorsText += arc.WarningMessage;
+ }
+ }
+}
+*/
+
+HRESULT CArchiveLink::Open(COpenOptions &op)
{
Release();
- if (formatIndices.Size() >= 32)
+ if (op.types->Size() >= 32)
return E_NOTIMPL;
HRESULT resSpec;
@@ -408,29 +3080,79 @@ HRESULT CArchiveLink::Open(
for (;;)
{
resSpec = S_OK;
- int formatIndex = -1;
- if (formatIndices.Size() >= 1)
+
+ op.openType = COpenType();
+ if (op.types->Size() >= 1)
{
- if (Arcs.Size() >= formatIndices.Size())
- break;
- formatIndex = formatIndices[formatIndices.Size() - Arcs.Size() - 1];
+ COpenType latest;
+ if (Arcs.Size() < op.types->Size())
+ latest = (*op.types)[op.types->Size() - Arcs.Size() - 1];
+ else
+ {
+ latest = (*op.types)[0];
+ if (!latest.Recursive)
+ break;
+ }
+ op.openType = latest;
+ }
+ else if (Arcs.Size() >= 32)
+ break;
+
+ /*
+ op.formatIndex = -1;
+ if (op.types->Size() >= 1)
+ {
+ int latest;
+ if (Arcs.Size() < op.types->Size())
+ latest = (*op.types)[op.types->Size() - Arcs.Size() - 1];
+ else
+ {
+ latest = (*op.types)[0];
+ if (latest != -2 && latest != -3)
+ break;
+ }
+ if (latest >= 0)
+ op.formatIndex = latest;
+ else if (latest == -1 || latest == -2)
+ {
+ // default
+ }
+ else if (latest == -3)
+ op.formatIndex = -2;
+ else
+ op.formatIndex = latest + 2;
}
else if (Arcs.Size() >= 32)
break;
+ */
if (Arcs.IsEmpty())
{
CArc arc;
- arc.Path = filePath;
+ arc.filePath = op.filePath;
+ arc.Path = op.filePath;
arc.SubfileIndex = (UInt32)(Int32)-1;
- RINOK(arc.OpenStreamOrFile(codecs, formatIndex, stdInMode, stream, callback));
+ HRESULT result = arc.OpenStreamOrFile(op);
+ if (result != S_OK)
+ {
+ if (result == S_FALSE)
+ {
+ NonOpen_ErrorInfo = arc.NonOpen_ErrorInfo;
+ // NonOpenErrorFormatIndex = arc.ErrorFormatIndex;
+ NonOpen_ArcPath = arc.Path;
+ }
+ return result;
+ }
Arcs.Add(arc);
continue;
}
+ // PrintNumber("op.formatIndex 11", op.formatIndex);
+
const CArc &arc = Arcs.Back();
- resSpec = (formatIndices.Size() == 0 ? S_OK : E_NOTIMPL);
+ if (op.types->Size() > Arcs.Size())
+ resSpec = E_NOTIMPL;
UInt32 mainSubfile;
{
@@ -461,46 +3183,57 @@ HRESULT CArchiveLink::Open(
CArc arc2;
RINOK(arc.GetItemPath(mainSubfile, arc2.Path));
-
- CMyComPtr<IArchiveOpenSetSubArchiveName> setSubArchiveName;
- callback->QueryInterface(IID_IArchiveOpenSetSubArchiveName, (void **)&setSubArchiveName);
- if (setSubArchiveName)
- setSubArchiveName->SetSubArchiveName(arc2.Path);
+
+ bool zerosTailIsAllowed;
+ RINOK(Archive_GetItemBoolProp(arc.Archive, mainSubfile, kpidZerosTailIsAllowed, zerosTailIsAllowed));
+
+
+ if (op.callback)
+ {
+ CMyComPtr<IArchiveOpenSetSubArchiveName> setSubArchiveName;
+ op.callback->QueryInterface(IID_IArchiveOpenSetSubArchiveName, (void **)&setSubArchiveName);
+ if (setSubArchiveName)
+ setSubArchiveName->SetSubArchiveName(arc2.Path);
+ }
arc2.SubfileIndex = mainSubfile;
- HRESULT result = arc2.OpenStream(codecs, formatIndex, subStream, NULL, callback);
- resSpec = (formatIndices.Size() == 0 ? S_OK : S_FALSE);
+
+ // CIntVector incl;
+ CIntVector excl;
+
+ COpenOptions op2;
+ #ifndef _SFX
+ op2.props = op.props;
+ #endif
+ op2.codecs = op.codecs;
+ // op2.types = &incl;
+ op2.openType = op.openType;
+ op2.openType.ZerosTailIsAllowed = zerosTailIsAllowed;
+ op2.excludedFormats = &excl;
+ op2.stdInMode = false;
+ op2.stream = subStream;
+ op2.filePath = arc2.Path;
+ op2.callback = op.callback;
+ op2.callbackSpec = op.callbackSpec;
+
+
+ HRESULT result = arc2.OpenStream(op2);
+ resSpec = (op.types->Size() == 0 ? S_OK : S_FALSE);
if (result == S_FALSE)
+ {
+ NonOpen_ErrorInfo = arc2.ErrorInfo;
+ NonOpen_ArcPath = arc2.Path;
break;
+ }
RINOK(result);
RINOK(arc.GetItemMTime(mainSubfile, arc2.MTime, arc2.MTimeDefined));
Arcs.Add(arc2);
}
IsOpen = !Arcs.IsEmpty();
- return S_OK;
+ return resSpec;
}
-static void SetCallback(const FString &filePath,
- IOpenCallbackUI *callbackUI,
- IArchiveOpenCallback *reOpenCallback,
- CMyComPtr<IArchiveOpenCallback> &callback)
-{
- COpenCallbackImp *openCallbackSpec = new COpenCallbackImp;
- callback = openCallbackSpec;
- openCallbackSpec->Callback = callbackUI;
- openCallbackSpec->ReOpenCallback = reOpenCallback;
-
- FString dirPrefix, fileName;
- NFile::NDirectory::GetFullPathAndSplit(filePath, dirPrefix, fileName);
- openCallbackSpec->Init(dirPrefix, fileName);
-}
-
-HRESULT CArchiveLink::Open2(CCodecs *codecs,
- const CIntVector &formatIndices,
- bool stdInMode,
- IInStream *stream,
- const UString &filePath,
- IOpenCallbackUI *callbackUI)
+HRESULT CArchiveLink::Open2(COpenOptions &op, IOpenCallbackUI *callbackUI)
{
VolumesSize = 0;
COpenCallbackImp *openCallbackSpec = new COpenCallbackImp;
@@ -508,41 +3241,266 @@ HRESULT CArchiveLink::Open2(CCodecs *codecs,
openCallbackSpec->Callback = callbackUI;
FString prefix, name;
- if (!stream && !stdInMode)
+
+ if (!op.stream && !op.stdInMode)
{
- NFile::NDirectory::GetFullPathAndSplit(us2fs(filePath), prefix, name);
+ NFile::NDir::GetFullPathAndSplit(us2fs(op.filePath), prefix, name);
openCallbackSpec->Init(prefix, name);
}
else
{
- openCallbackSpec->SetSubArchiveName(filePath);
+ openCallbackSpec->SetSubArchiveName(op.filePath);
}
- RINOK(Open(codecs, formatIndices, stdInMode, stream, filePath, callback));
- VolumePaths.Add(fs2us(prefix + name));
- for (int i = 0; i < openCallbackSpec->FileNames.Size(); i++)
- VolumePaths.Add(fs2us(prefix) + openCallbackSpec->FileNames[i]);
- VolumesSize = openCallbackSpec->TotalSize;
+ op.callback = callback;
+ op.callbackSpec = openCallbackSpec;
+
+ HRESULT res = Open(op);
+
+ PasswordWasAsked = openCallbackSpec->PasswordWasAsked;
+ // Password = openCallbackSpec->Password;
+
+ RINOK(res);
+ // VolumePaths.Add(fs2us(prefix + name));
+
+ FOR_VECTOR (i, openCallbackSpec->FileNames_WasUsed)
+ {
+ if (openCallbackSpec->FileNames_WasUsed[i])
+ {
+ VolumePaths.Add(fs2us(prefix) + openCallbackSpec->FileNames[i]);
+ VolumesSize += openCallbackSpec->FileSizes[i];
+ }
+ }
+ // VolumesSize = openCallbackSpec->TotalSize;
return S_OK;
}
-HRESULT CArchiveLink::ReOpen(CCodecs *codecs, const UString &filePath,
- IArchiveOpenCallback *callback)
+HRESULT CArc::ReOpen(const COpenOptions &op)
+{
+ ErrorInfo.ClearErrors();
+ ErrorInfo.ErrorFormatIndex = -1;
+
+ UInt64 fileSize = 0;
+ if (op.stream)
+ {
+ RINOK(op.stream->Seek(0, STREAM_SEEK_END, &fileSize));
+ RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
+ }
+ FileSize = fileSize;
+
+ CMyComPtr<IInStream> stream2;
+ Int64 globalOffset = GetGlobalOffset();
+ if (globalOffset <= 0)
+ stream2 = op.stream;
+ else
+ {
+ CTailInStream *tailStreamSpec = new CTailInStream;
+ stream2 = tailStreamSpec;
+ tailStreamSpec->Stream = op.stream;
+ tailStreamSpec->Offset = globalOffset;
+ tailStreamSpec->Init();
+ RINOK(tailStreamSpec->SeekToStart());
+ }
+
+ // There are archives with embedded STUBs (like ZIP), so we must support signature scanning
+ // But for another archives we can use 0 here. So the code can be fixed !!!
+ UInt64 maxStartPosition = kMaxCheckStartPosition;
+ HRESULT res = Archive->Open(stream2, &maxStartPosition, op.callback);
+
+ if (res == S_OK)
+ {
+ RINOK(ReadBasicProps(Archive, globalOffset, res));
+ ArcStreamOffset = globalOffset;
+ if (ArcStreamOffset != 0)
+ InStream = op.stream;
+ }
+ return res;
+}
+
+HRESULT CArchiveLink::Open3(COpenOptions &op, IOpenCallbackUI *callbackUI)
+{
+ HRESULT res = Open2(op, callbackUI);
+ if (callbackUI)
+ {
+ RINOK(callbackUI->Open_Finished());
+ }
+ return res;
+}
+
+HRESULT CArchiveLink::ReOpen(COpenOptions &op)
{
if (Arcs.Size() > 1)
return E_NOTIMPL;
- if (Arcs.Size() == 0)
- return Open2(codecs, CIntVector(), false, NULL, filePath, 0);
+ CObjectVector<COpenType> inc;
+ CIntVector excl;
+
+ op.types = &inc;
+ op.excludedFormats = &excl;
+ op.stdInMode = false;
+ op.stream = NULL;
+ if (Arcs.Size() == 0) // ???
+ return Open2(op, NULL);
+
+ COpenCallbackImp *openCallbackSpec = new COpenCallbackImp;
+ CMyComPtr<IArchiveOpenCallback> openCallbackNew = openCallbackSpec;
+
+ openCallbackSpec->Callback = NULL;
+ openCallbackSpec->ReOpenCallback = op.callback;
+ {
+ FString dirPrefix, fileName;
+ NFile::NDir::GetFullPathAndSplit(us2fs(op.filePath), dirPrefix, fileName);
+ openCallbackSpec->Init(dirPrefix, fileName);
+ }
- CMyComPtr<IArchiveOpenCallback> openCallbackNew;
- SetCallback(us2fs(filePath), NULL, callback, openCallbackNew);
CInFileStream *fileStreamSpec = new CInFileStream;
CMyComPtr<IInStream> stream(fileStreamSpec);
- if (!fileStreamSpec->Open(us2fs(filePath)))
+ if (!fileStreamSpec->Open(us2fs(op.filePath)))
return GetLastError();
- HRESULT res = GetArchive()->Open(stream, &kMaxCheckStartPosition, callback);
+ op.stream = stream;
+
+ CArc &arc = Arcs[0];
+ HRESULT res = arc.ReOpen(op);
+
+ PasswordWasAsked = openCallbackSpec->PasswordWasAsked;
+ // Password = openCallbackSpec->Password;
+
IsOpen = (res == S_OK);
return res;
}
+
+#ifndef _SFX
+
+bool ParseComplexSize(const wchar_t *s, UInt64 &result)
+{
+ result = 0;
+ const wchar_t *end;
+ UInt64 number = ConvertStringToUInt64(s, &end);
+ if (end == s)
+ return false;
+ if (*end == 0)
+ {
+ result = number;
+ return true;
+ }
+ if (end[1] != 0)
+ return false;
+ unsigned numBits;
+ switch (MyCharLower_Ascii(*end))
+ {
+ case 'b': result = number; return true;
+ case 'k': numBits = 10; break;
+ case 'm': numBits = 20; break;
+ case 'g': numBits = 30; break;
+ case 't': numBits = 40; break;
+ default: return false;
+ }
+ if (number >= ((UInt64)1 << (64 - numBits)))
+ return false;
+ result = number << numBits;
+ return true;
+}
+
+static bool ParseTypeParams(const UString &s, COpenType &type)
+{
+ if (s[0] == 0)
+ return true;
+ if (s[1] == 0)
+ {
+ switch ((unsigned)(Byte)s[0])
+ {
+ case 'e': type.EachPos = true; return true;
+ case 'a': type.CanReturnArc = true; return true;
+ case 'r': type.Recursive = true; return true;
+ }
+ return false;
+ }
+ if (s[0] == 's')
+ {
+ UInt64 result;
+ if (!ParseComplexSize(s.Ptr(1), result))
+ return false;
+ type.MaxStartOffset = result;
+ type.MaxStartOffset_Defined = true;
+ return true;
+ }
+
+ return false;
+}
+
+bool ParseType(CCodecs &codecs, const UString &s, COpenType &type)
+{
+ int pos2 = s.Find(L':');
+ UString name;
+ if (pos2 < 0)
+ {
+ name = s;
+ pos2 = s.Len();
+ }
+ else
+ {
+ name = s.Left(pos2);
+ pos2++;
+ }
+
+ int index = codecs.FindFormatForArchiveType(name);
+ type.Recursive = false;
+
+ if (index < 0)
+ {
+ if (name[0] == '*')
+ {
+ if (name[1] != 0)
+ return false;
+ }
+ else if (name[0] == '#')
+ {
+ if (name[1] != 0)
+ return false;
+ type.CanReturnArc = false;
+ type.CanReturnParser = true;
+ }
+ else
+ return false;
+ }
+
+ type.FormatIndex = index;
+
+ for (unsigned i = pos2; i < s.Len();)
+ {
+ int next = s.Find(L':', i);
+ if (next < 0)
+ next = s.Len();
+ UString name = s.Mid(i, next - i);
+ if (name.IsEmpty())
+ return false;
+ if (!ParseTypeParams(name, type))
+ return false;
+ i = next + 1;
+ }
+
+ return true;
+}
+
+bool ParseOpenTypes(CCodecs &codecs, const UString &s, CObjectVector<COpenType> &types)
+{
+ types.Clear();
+ for (unsigned pos = 0; pos < s.Len();)
+ {
+ int pos2 = s.Find(L'.', pos);
+ if (pos2 < 0)
+ pos2 = s.Len();
+ UString name = s.Mid(pos, pos2 - pos);
+ if (name.IsEmpty())
+ return false;
+ COpenType type;
+ if (!ParseType(codecs, name, type))
+ return false;
+ types.Add(type);
+ pos = pos2 + 1;
+ }
+ return true;
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/OpenArchive.h b/3rdparty/lzma/CPP/7zip/UI/Common/OpenArchive.h
index 25f739e3035..10514ec4000 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/OpenArchive.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/OpenArchive.h
@@ -3,50 +3,364 @@
#ifndef __OPEN_ARCHIVE_H
#define __OPEN_ARCHIVE_H
-#include "Common/MyString.h"
-
-#include "Windows/FileFind.h"
-
-#include "../../Archive/IArchive.h"
+#include "../../../Windows/PropVariant.h"
#include "ArchiveOpenCallback.h"
#include "LoadCodecs.h"
+#include "Property.h"
+
+#ifndef _SFX
+
+#define SUPPORT_ALT_STREAMS
+
+#endif
+
+HRESULT Archive_GetItemBoolProp(IInArchive *arc, UInt32 index, PROPID propID, bool &result) throw();
+HRESULT Archive_IsItem_Dir(IInArchive *arc, UInt32 index, bool &result) throw();
+HRESULT Archive_IsItem_Aux(IInArchive *arc, UInt32 index, bool &result) throw();
+HRESULT Archive_IsItem_AltStream(IInArchive *arc, UInt32 index, bool &result) throw();
+HRESULT Archive_IsItem_Deleted(IInArchive *arc, UInt32 index, bool &deleted) throw();
+
+#ifdef SUPPORT_ALT_STREAMS
+int FindAltStreamColon_in_Path(const wchar_t *path);
+#endif
+
+/*
+struct COptionalOpenProperties
+{
+ UString FormatName;
+ CObjectVector<CProperty> Props;
+};
+*/
+
+#ifdef _SFX
+#define OPEN_PROPS_DECL
+#else
+#define OPEN_PROPS_DECL const CObjectVector<CProperty> *props;
+// #define OPEN_PROPS_DECL , const CObjectVector<COptionalOpenProperties> *props
+#endif
+
+struct COpenSpecFlags
+{
+ // bool CanReturnFull;
+ bool CanReturnFrontal;
+ bool CanReturnTail;
+ bool CanReturnMid;
+
+ bool CanReturn_NonStart() const { return CanReturnTail || CanReturnMid; }
+
+ COpenSpecFlags():
+ // CanReturnFull(true),
+ CanReturnFrontal(false),
+ CanReturnTail(false),
+ CanReturnMid(false)
+ {}
+};
+
+struct COpenType
+{
+ int FormatIndex;
+
+ COpenSpecFlags SpecForcedType;
+ COpenSpecFlags SpecMainType;
+ COpenSpecFlags SpecWrongExt;
+ COpenSpecFlags SpecUnknownExt;
-HRESULT GetArchiveItemBoolProp(IInArchive *archive, UInt32 index, PROPID propID, bool &result);
-HRESULT IsArchiveItemFolder(IInArchive *archive, UInt32 index, bool &result);
+ bool Recursive;
-struct CArc
+ bool CanReturnArc;
+ bool CanReturnParser;
+ bool EachPos;
+
+ // bool SkipSfxStub;
+ // bool ExeAsUnknown;
+
+ bool ZerosTailIsAllowed;
+
+ bool MaxStartOffset_Defined;
+ UInt64 MaxStartOffset;
+
+ const COpenSpecFlags &GetSpec(bool isForced, bool isMain, bool isUnknown) const
+ {
+ return isForced ? SpecForcedType : (isMain ? SpecMainType : (isUnknown ? SpecUnknownExt : SpecWrongExt));
+ }
+
+ COpenType():
+ FormatIndex(-1),
+ Recursive(true),
+ EachPos(false),
+ CanReturnArc(true),
+ CanReturnParser(false),
+ // SkipSfxStub(true),
+ // ExeAsUnknown(true),
+ ZerosTailIsAllowed(false),
+ MaxStartOffset_Defined(false),
+ MaxStartOffset(0)
+ {
+ SpecForcedType.CanReturnFrontal = true;
+ SpecForcedType.CanReturnTail = true;
+ SpecForcedType.CanReturnMid = true;
+
+ SpecMainType.CanReturnFrontal = true;
+
+ SpecUnknownExt.CanReturnTail = true; // for sfx
+ SpecUnknownExt.CanReturnMid = true;
+ SpecUnknownExt.CanReturnFrontal = true; // for alt streams of sfx with pad
+
+ // ZerosTailIsAllowed = true;
+ }
+};
+
+struct COpenOptions
{
+ CCodecs *codecs;
+ COpenType openType;
+ const CObjectVector<COpenType> *types;
+ const CIntVector *excludedFormats;
+
+ IInStream *stream;
+ ISequentialInStream *seqStream;
+ IArchiveOpenCallback *callback;
+ COpenCallbackImp *callbackSpec;
+ OPEN_PROPS_DECL
+ // bool openOnlySpecifiedByExtension,
+
+ bool stdInMode;
+ UString filePath;
+
+ COpenOptions():
+ codecs(NULL),
+ types(NULL),
+ excludedFormats(NULL),
+ stream(NULL),
+ seqStream(NULL),
+ callback(NULL),
+ callbackSpec(NULL),
+ stdInMode(false)
+ {}
+
+};
+
+UInt32 GetOpenArcErrorFlags(const NWindows::NCOM::CPropVariant &prop, bool *isDefinedProp = NULL);
+
+struct CArcErrorInfo
+{
+ bool ThereIsTail;
+ bool UnexpecedEnd;
+ bool IgnoreTail; // all are zeros
+ // bool NonZerosTail;
+ bool ErrorFlags_Defined;
+ UInt32 ErrorFlags;
+ UInt32 WarningFlags;
+ int ErrorFormatIndex; // - 1 means no Error.
+ // if FormatIndex == ErrorFormatIndex, the archive is open with offset
+ UInt64 TailSize;
+
+ /* if CArc is Open OK with some format:
+ - ErrorFormatIndex shows error format index, if extension is incorrect
+ - other variables show message and warnings of archive that is open */
+
+ UString ErrorMessage;
+ UString WarningMessage;
+
+ // call IsArc_After_NonOpen only if Open returns S_FALSE
+ bool IsArc_After_NonOpen() const
+ {
+ return (ErrorFlags_Defined && (ErrorFlags & kpv_ErrorFlags_IsNotArc) == 0);
+ }
+
+
+ CArcErrorInfo():
+ ThereIsTail(false),
+ UnexpecedEnd(false),
+ IgnoreTail(false),
+ // NonZerosTail(false),
+ ErrorFlags_Defined(false),
+ ErrorFlags(0),
+ WarningFlags(0),
+ ErrorFormatIndex(-1),
+ TailSize(0)
+ {}
+
+ void ClearErrors();
+
+ void ClearErrors_Full()
+ {
+ ErrorFormatIndex = -1;
+ ClearErrors();
+ }
+
+ bool IsThereErrorOrWarning() const
+ {
+ return ErrorFlags != 0
+ || WarningFlags != 0
+ || NeedTailWarning()
+ || UnexpecedEnd
+ || !ErrorMessage.IsEmpty()
+ || !WarningMessage.IsEmpty();
+ }
+
+ bool AreThereErrors() const { return ErrorFlags != 0 || UnexpecedEnd; }
+ bool AreThereWarnings() const { return WarningFlags != 0 || NeedTailWarning(); }
+
+ bool NeedTailWarning() const { return !IgnoreTail && ThereIsTail; }
+
+ UInt32 GetWarningFlags() const
+ {
+ UInt32 a = WarningFlags;
+ if (NeedTailWarning() && (ErrorFlags & kpv_ErrorFlags_DataAfterEnd) == 0)
+ a |= kpv_ErrorFlags_DataAfterEnd;
+ return a;
+ }
+
+ UInt32 GetErrorFlags() const
+ {
+ UInt32 a = ErrorFlags;
+ if (UnexpecedEnd)
+ a |= kpv_ErrorFlags_UnexpectedEnd;
+ return a;
+ }
+};
+
+struct CReadArcItem
+{
+ UString Path; // Path from root (including alt stream name, if alt stream)
+ UStringVector PathParts; // without altStream name, path from root or from _baseParentFolder, if _use_baseParentFolder_mode
+
+ #ifdef SUPPORT_ALT_STREAMS
+ UString MainPath;
+ /* MainPath = Path for non-AltStream,
+ MainPath = Path of parent, if there is parent for AltStream. */
+ UString AltStreamName;
+ bool IsAltStream;
+ bool WriteToAltStreamIfColon;
+ #endif
+
+ bool IsDir;
+ bool MainIsDir;
+ UInt32 ParentIndex; // use it, if IsAltStream
+
+ #ifndef _SFX
+ bool _use_baseParentFolder_mode;
+ int _baseParentFolder;
+ #endif
+
+ CReadArcItem()
+ {
+ #ifdef SUPPORT_ALT_STREAMS
+ WriteToAltStreamIfColon = false;
+ #endif
+
+ #ifndef _SFX
+ _use_baseParentFolder_mode = false;
+ _baseParentFolder = -1;
+ #endif
+ }
+};
+
+class CArc
+{
+ HRESULT PrepareToOpen(const COpenOptions &op, unsigned formatIndex, CMyComPtr<IInArchive> &archive);
+ HRESULT CheckZerosTail(const COpenOptions &op, UInt64 offset);
+ HRESULT OpenStream2(const COpenOptions &options);
+
+ #ifndef _SFX
+ // parts.Back() can contain alt stream name "nams:AltName"
+ HRESULT GetItemPathToParent(UInt32 index, UInt32 parent, UStringVector &parts) const;
+ #endif
+
+public:
CMyComPtr<IInArchive> Archive;
+ CMyComPtr<IInStream> InStream;
+ // we use InStream in 2 cases (ArcStreamOffset != 0):
+ // 1) if we use additional cache stream
+ // 2) we reopen sfx archive with CTailInStream
+
+ CMyComPtr<IArchiveGetRawProps> GetRawProps;
+ CMyComPtr<IArchiveGetRootProps> GetRootProps;
+
+ CArcErrorInfo ErrorInfo; // for OK archives
+ CArcErrorInfo NonOpen_ErrorInfo; // ErrorInfo for mainArchive (false OPEN)
+
UString Path;
+ UString filePath;
UString DefaultName;
- int FormatIndex;
+ int FormatIndex; // - 1 means Parser.
int SubfileIndex;
FILETIME MTime;
bool MTimeDefined;
- UString ErrorMessage;
+
+ Int64 Offset; // it's offset of start of archive inside stream that is open by Archive Handler
+ UInt64 PhySize;
+ // UInt64 OkPhySize;
+ bool PhySizeDefined;
+ // bool OkPhySize_Defined;
+ UInt64 FileSize;
+ UInt64 AvailPhySize; // PhySize, but it's reduced if exceed end of file
+ // bool offsetDefined;
+
+ UInt64 GetEstmatedPhySize() const { return PhySizeDefined ? PhySize : FileSize; }
+
+ UInt64 ArcStreamOffset; // offset of stream that is open by Archive Handler
+ Int64 GetGlobalOffset() const { return ArcStreamOffset + Offset; } // it's global offset of archive
+
+ // AString ErrorFlagsText;
+
+ bool IsParseArc;
+
+ bool IsTree;
+ bool IsReadOnly;
+
+ bool Ask_Deleted;
+ bool Ask_AltStream;
+ bool Ask_Aux;
+ bool Ask_INode;
+
+ bool IgnoreSplit; // don't try split handler
+
+ // void Set_ErrorFlagsText();
+
+ CArc():
+ MTimeDefined(false),
+ IsTree(false),
+ IsReadOnly(false),
+ Ask_Deleted(false),
+ Ask_AltStream(false),
+ Ask_Aux(false),
+ Ask_INode(false),
+ IgnoreSplit(false)
+ {}
+
+ HRESULT ReadBasicProps(IInArchive *archive, UInt64 startPos, HRESULT openRes);
+
+ // ~CArc();
- CArc(): MTimeDefined(false) {}
+ HRESULT Close()
+ {
+ InStream.Release();
+ return Archive->Close();
+ }
HRESULT GetItemPath(UInt32 index, UString &result) const;
+ HRESULT GetDefaultItemPath(UInt32 index, UString &result) const;
+
+ // GetItemPath2 adds [DELETED] dir prefix for deleted items.
+ HRESULT GetItemPath2(UInt32 index, UString &result) const;
+
+ HRESULT GetItem(UInt32 index, CReadArcItem &item) const;
+
HRESULT GetItemSize(UInt32 index, UInt64 &size, bool &defined) const;
HRESULT GetItemMTime(UInt32 index, FILETIME &ft, bool &defined) const;
HRESULT IsItemAnti(UInt32 index, bool &result) const
- { return GetArchiveItemBoolProp(Archive, index, kpidIsAnti, result); }
-
- HRESULT OpenStream(
- CCodecs *codecs,
- int formatIndex,
- IInStream *stream,
- ISequentialInStream *seqStream,
- IArchiveOpenCallback *callback);
-
- HRESULT OpenStreamOrFile(
- CCodecs *codecs,
- int formatIndex,
- bool stdInMode,
- IInStream *stream,
- IArchiveOpenCallback *callback);
+ { return Archive_GetItemBoolProp(Archive, index, kpidIsAnti, result); }
+
+
+ HRESULT OpenStream(const COpenOptions &options);
+ HRESULT OpenStreamOrFile(COpenOptions &options);
+
+ HRESULT ReOpen(const COpenOptions &options);
+
+ HRESULT CreateNewTailStream(CMyComPtr<IInStream> &stream);
};
struct CArchiveLink
@@ -56,33 +370,40 @@ struct CArchiveLink
UInt64 VolumesSize;
bool IsOpen;
- CArchiveLink(): VolumesSize(0), IsOpen(false) {}
+ bool PasswordWasAsked;
+ // UString Password;
+
+ // int NonOpenErrorFormatIndex; // - 1 means no Error.
+ UString NonOpen_ArcPath;
+
+ CArcErrorInfo NonOpen_ErrorInfo;
+
+ // UString ErrorsText;
+ // void Set_ErrorsText();
+
+ CArchiveLink():
+ VolumesSize(0),
+ IsOpen(false),
+ PasswordWasAsked(false)
+ {}
+
+ void KeepModeForNextOpen();
HRESULT Close();
void Release();
~CArchiveLink() { Release(); }
+ const CArc *GetArc() const { return &Arcs.Back(); }
IInArchive *GetArchive() const { return Arcs.Back().Archive; }
+ IArchiveGetRawProps *GetArchiveGetRawProps() const { return Arcs.Back().GetRawProps; }
+ IArchiveGetRootProps *GetArchiveGetRootProps() const { return Arcs.Back().GetRootProps; }
- HRESULT Open(
- CCodecs *codecs,
- const CIntVector &formatIndices,
- bool stdInMode,
- IInStream *stream,
- const UString &filePath,
- IArchiveOpenCallback *callback);
-
- HRESULT Open2(
- CCodecs *codecs,
- const CIntVector &formatIndices,
- bool stdInMode,
- IInStream *stream,
- const UString &filePath,
- IOpenCallbackUI *callbackUI);
-
- HRESULT ReOpen(
- CCodecs *codecs,
- const UString &filePath,
- IArchiveOpenCallback *callback);
+ HRESULT Open(COpenOptions &options);
+ HRESULT Open2(COpenOptions &options, IOpenCallbackUI *callbackUI);
+ HRESULT Open3(COpenOptions &options, IOpenCallbackUI *callbackUI);
+
+ HRESULT ReOpen(COpenOptions &options);
};
+bool ParseOpenTypes(CCodecs &codecs, const UString &s, CObjectVector<COpenType> &types);
+
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp
index dacaca5f988..dccc08b171e 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp
@@ -2,33 +2,28 @@
#include "StdAfx.h"
-#include "Common/IntToString.h"
+#include "../../../../C/CpuArch.h"
-#include "Windows/FileFind.h"
-#include "Windows/PropVariantConversions.h"
+#include "../../../Common/IntToString.h"
+#include "../../../Common/StringConvert.h"
+
+#include "../../../Windows/FileIO.h"
+#include "../../../Windows/PropVariantConv.h"
#include "../../PropID.h"
#include "PropIDUtils.h"
-using namespace NWindows;
+#define Get16(x) GetUi16(x)
+#define Get32(x) GetUi32(x)
-void ConvertUInt32ToHex(UInt32 value, wchar_t *s)
-{
- for (int i = 0; i < 8; i++)
- {
- int t = value & 0xF;
- value >>= 4;
- s[7 - i] = (wchar_t)((t < 10) ? (L'0' + t) : (L'A' + (t - 10)));
- }
- s[8] = L'\0';
-}
+using namespace NWindows;
-static const char g_WinAttrib[17] = "RHS8DAdNTsrCOnE_";
+static const char g_WinAttribChars[16 + 1] = "RHS8DAdNTsLCOnE_";
/*
0 READONLY
1 HIDDEN
-3 SYSTEM
+2 SYSTEM
4 DIRECTORY
5 ARCHIVE
@@ -46,75 +41,534 @@ static const char g_WinAttrib[17] = "RHS8DAdNTsrCOnE_";
*/
static const char kPosixTypes[16] = { '0', 'p', 'c', '3', 'd', '5', 'b', '7', '-', '9', 'l', 'B', 's', 'D', 'E', 'F' };
-#define MY_ATTR_CHAR(a, n, c) ((a )& (1 << (n))) ? c : L'-';
+#define MY_ATTR_CHAR(a, n, c) ((a) & (1 << (n))) ? c : '-';
-UString ConvertPropertyToString(const PROPVARIANT &prop, PROPID propID, bool full)
+static void ConvertPosixAttribToString(char *s, UInt32 a) throw()
{
- switch(propID)
+ s[0] = kPosixTypes[(a >> 12) & 0xF];
+ for (int i = 6; i >= 0; i -= 3)
+ {
+ s[7 - i] = MY_ATTR_CHAR(a, i + 2, 'r');
+ s[8 - i] = MY_ATTR_CHAR(a, i + 1, 'w');
+ s[9 - i] = MY_ATTR_CHAR(a, i + 0, 'x');
+ }
+ if ((a & 0x800) != 0) s[3] = ((a & (1 << 6)) ? 's' : 'S');
+ if ((a & 0x400) != 0) s[6] = ((a & (1 << 3)) ? 's' : 'S');
+ if ((a & 0x200) != 0) s[9] = ((a & (1 << 0)) ? 't' : 'T');
+ s[10] = 0;
+
+ a &= ~(UInt32)0xFFFF;
+ if (a != 0)
+ {
+ s[10] = ' ';
+ ConvertUInt32ToHex8Digits(a, s + 11);
+ }
+}
+
+void ConvertWinAttribToString(char *s, UInt32 wa) throw()
+{
+ for (int i = 0; i < 16; i++)
+ if ((wa & (1 << i)) && i != 7)
+ *s++ = g_WinAttribChars[i];
+ *s = 0;
+
+ // we support p7zip trick that stores posix attributes in high 16 bits, and 0x8000 flag
+ // we also support ZIP archives created in Unix, that store posix attributes in high 16 bits without 0x8000 flag
+
+ // if (wa & 0x8000)
+ if ((wa >> 16) != 0)
+ {
+ *s++ = ' ';
+ ConvertPosixAttribToString(s, wa >> 16);
+ }
+}
+
+void ConvertPropertyToShortString(char *dest, const PROPVARIANT &prop, PROPID propID, bool full) throw()
+{
+ *dest = 0;
+
+ if (prop.vt == VT_FILETIME)
+ {
+ FILETIME localFileTime;
+ if ((prop.filetime.dwHighDateTime == 0 &&
+ prop.filetime.dwLowDateTime == 0) ||
+ !::FileTimeToLocalFileTime(&prop.filetime, &localFileTime))
+ return;
+ ConvertFileTimeToString(localFileTime, dest, true, full);
+ return;
+ }
+
+ switch (propID)
{
- case kpidCTime:
- case kpidATime:
- case kpidMTime:
- {
- if (prop.vt != VT_FILETIME)
- break;
- FILETIME localFileTime;
- if ((prop.filetime.dwHighDateTime == 0 &&
- prop.filetime.dwLowDateTime == 0) ||
- !::FileTimeToLocalFileTime(&prop.filetime, &localFileTime))
- return UString();
- return ConvertFileTimeToString(localFileTime, true, full);
- }
case kpidCRC:
{
if (prop.vt != VT_UI4)
break;
- wchar_t temp[12];
- ConvertUInt32ToHex(prop.ulVal, temp);
- return temp;
+ ConvertUInt32ToHex8Digits(prop.ulVal, dest);
+ return;
}
case kpidAttrib:
{
if (prop.vt != VT_UI4)
break;
UInt32 a = prop.ulVal;
- wchar_t sz[32];
- int pos = 0;
- for (int i = 0; i < 16; i++)
- if (a & (1 << i) && i != 7)
- sz[pos++] = g_WinAttrib[i];
- sz[pos] = '\0';
- return sz;
+
+ /*
+ if ((a & 0x8000) && (a & 0x7FFF) == 0)
+ ConvertPosixAttribToString(dest, a >> 16);
+ else
+ */
+ ConvertWinAttribToString(dest, a);
+ return;
}
case kpidPosixAttrib:
{
if (prop.vt != VT_UI4)
break;
- UString res;
- UInt32 a = prop.ulVal;
- wchar_t temp[16];
+ ConvertPosixAttribToString(dest, prop.ulVal);
+ return;
+ }
+ case kpidINode:
+ {
+ if (prop.vt != VT_UI8)
+ break;
+ ConvertUInt32ToString((UInt32)(prop.uhVal.QuadPart >> 48), dest);
+ dest += strlen(dest);
+ *dest++ = '-';
+ UInt64 low = prop.uhVal.QuadPart & (((UInt64)1 << 48) - 1);
+ ConvertUInt64ToString(low, dest);
+ return;
+ }
+ case kpidVa:
+ {
+ UInt64 v = 0;
+ if (prop.vt == VT_UI4)
+ v = prop.ulVal;
+ else if (prop.vt == VT_UI8)
+ v = (UInt64)prop.uhVal.QuadPart;
+ else
+ break;
+ dest[0] = '0';
+ dest[1] = 'x';
+ ConvertUInt64ToHex(v, dest + 2);
+ return;
+ }
+ }
+
+ ConvertPropVariantToShortString(prop, dest);
+}
- temp[0] = kPosixTypes[(a >> 12) & 0xF];
- for (int i = 6; i >= 0; i -= 3)
- {
- temp[7 - i] = MY_ATTR_CHAR(a, i + 2, L'r');
- temp[8 - i] = MY_ATTR_CHAR(a, i + 1, L'w');
- temp[9 - i] = MY_ATTR_CHAR(a, i + 0, L'x');
- }
- if ((a & 0x800) != 0) temp[3] = ((a & (1 << 6)) ? 's' : 'S');
- if ((a & 0x400) != 0) temp[6] = ((a & (1 << 3)) ? 's' : 'S');
- if ((a & 0x200) != 0) temp[9] = ((a & (1 << 0)) ? 't' : 'T');
- temp[10] = 0;
- res = temp;
-
- a &= ~(UInt32)0xFFFF;
- if (a != 0)
+void ConvertPropertyToString(UString &dest, const PROPVARIANT &prop, PROPID propID, bool full)
+{
+ if (prop.vt == VT_BSTR)
+ {
+ dest.SetFromBstr(prop.bstrVal);
+ return;
+ }
+ char temp[64];
+ ConvertPropertyToShortString(temp, prop, propID, full);
+ dest.SetFromAscii(temp);
+}
+
+static inline unsigned GetHex(unsigned v)
+{
+ return (v < 10) ? ('0' + v) : ('A' + (v - 10));
+}
+
+#ifndef _SFX
+
+static inline void AddHexToString(AString &res, unsigned v)
+{
+ res += (char)GetHex(v >> 4);
+ res += (char)GetHex(v & 0xF);
+ res += ' ';
+}
+
+/*
+static AString Data_To_Hex(const Byte *data, size_t size)
+{
+ AString s;
+ for (size_t i = 0; i < size; i++)
+ AddHexToString(s, data[i]);
+ return s;
+}
+*/
+
+static const char * const sidNames[] =
+{
+ "0"
+ , "Dialup"
+ , "Network"
+ , "Batch"
+ , "Interactive"
+ , "Logon" // S-1-5-5-X-Y
+ , "Service"
+ , "Anonymous"
+ , "Proxy"
+ , "EnterpriseDC"
+ , "Self"
+ , "AuthenticatedUsers"
+ , "RestrictedCode"
+ , "TerminalServer"
+ , "RemoteInteractiveLogon"
+ , "ThisOrganization"
+ , "16"
+ , "IUserIIS"
+ , "LocalSystem"
+ , "LocalService"
+ , "NetworkService"
+ , "Domains"
+};
+
+struct CSecID2Name
+{
+ UInt32 n;
+ const char *sz;
+};
+
+static const CSecID2Name sid_32_Names[] =
+{
+ { 544, "Administrators" },
+ { 545, "Users" },
+ { 546, "Guests" },
+ { 547, "PowerUsers" },
+ { 548, "AccountOperators" },
+ { 549, "ServerOperators" },
+ { 550, "PrintOperators" },
+ { 551, "BackupOperators" },
+ { 552, "Replicators" },
+ { 553, "Backup Operators" },
+ { 554, "PreWindows2000CompatibleAccess" },
+ { 555, "RemoteDesktopUsers" },
+ { 556, "NetworkConfigurationOperators" },
+ { 557, "IncomingForestTrustBuilders" },
+ { 558, "PerformanceMonitorUsers" },
+ { 559, "PerformanceLogUsers" },
+ { 560, "WindowsAuthorizationAccessGroup" },
+ { 561, "TerminalServerLicenseServers" },
+ { 562, "DistributedCOMUsers" },
+ { 569, "CryptographicOperators" },
+ { 573, "EventLogReaders" },
+ { 574, "CertificateServiceDCOMAccess" }
+};
+
+static const CSecID2Name sid_21_Names[] =
+{
+ { 500, "Administrator" },
+ { 501, "Guest" },
+ { 502, "KRBTGT" },
+ { 512, "DomainAdmins" },
+ { 513, "DomainUsers" },
+ { 515, "DomainComputers" },
+ { 516, "DomainControllers" },
+ { 517, "CertPublishers" },
+ { 518, "SchemaAdmins" },
+ { 519, "EnterpriseAdmins" },
+ { 520, "GroupPolicyCreatorOwners" },
+ { 553, "RASandIASServers" },
+ { 553, "RASandIASServers" },
+ { 571, "AllowedRODCPasswordReplicationGroup" },
+ { 572, "DeniedRODCPasswordReplicationGroup" }
+};
+
+struct CServicesToName
+{
+ UInt32 n[5];
+ const char *sz;
+};
+
+static const CServicesToName services_to_name[] =
+{
+ { { 0x38FB89B5, 0xCBC28419, 0x6D236C5C, 0x6E770057, 0x876402C0 } , "TrustedInstaller" }
+};
+
+static void ParseSid(AString &s, const Byte *p, UInt32 lim, UInt32 &sidSize)
+{
+ sidSize = 0;
+ if (lim < 8)
+ {
+ s += "ERROR";
+ return;
+ }
+ UInt32 rev = p[0];
+ if (rev != 1)
+ {
+ s += "UNSUPPORTED";
+ return;
+ }
+ UInt32 num = p[1];
+ if (8 + num * 4 > lim)
+ {
+ s += "ERROR";
+ return;
+ }
+ sidSize = 8 + num * 4;
+ UInt32 authority = GetBe32(p + 4);
+
+ if (p[2] == 0 && p[3] == 0 && authority == 5 && num >= 1)
+ {
+ UInt32 v0 = Get32(p + 8);
+ if (v0 < ARRAY_SIZE(sidNames))
+ {
+ s += sidNames[v0];
+ return;
+ }
+ if (v0 == 32 && num == 2)
+ {
+ UInt32 v1 = Get32(p + 12);
+ for (unsigned i = 0; i < ARRAY_SIZE(sid_32_Names); i++)
+ if (sid_32_Names[i].n == v1)
+ {
+ s += sid_32_Names[i].sz;
+ return;
+ }
+ }
+ if (v0 == 21 && num == 5)
+ {
+ UInt32 v4 = Get32(p + 8 + 4 * 4);
+ for (unsigned i = 0; i < ARRAY_SIZE(sid_21_Names); i++)
+ if (sid_21_Names[i].n == v4)
+ {
+ s += sid_21_Names[i].sz;
+ return;
+ }
+ }
+ if (v0 == 80 && num == 6)
+ {
+ for (unsigned i = 0; i < ARRAY_SIZE(services_to_name); i++)
{
- ConvertUInt32ToHex(a, temp);
- res = UString(temp) + L' ' + res;
+ const CServicesToName &sn = services_to_name[i];
+ int j;
+ for (j = 0; j < 5 && sn.n[j] == Get32(p + 8 + 4 + j * 4); j++);
+ if (j == 5)
+ {
+ s += sn.sz;
+ return;
+ }
}
- return res;
}
}
- return ConvertPropVariantToString(prop);
+
+ char sz[16];
+ s += "S-1-";
+ if (p[2] == 0 && p[3] == 0)
+ {
+ ConvertUInt32ToString(authority, sz);
+ s += sz;
+ }
+ else
+ {
+ s += "0x";
+ for (int i = 2; i < 8; i++)
+ AddHexToString(s, p[i]);
+ }
+ for (UInt32 i = 0; i < num; i++)
+ {
+ s += '-';
+ ConvertUInt32ToString(Get32(p + 8 + i * 4), sz);
+ s += sz;
+ }
}
+
+static void ParseOwner(AString &s, const Byte *p, UInt32 size, UInt32 pos)
+{
+ if (pos > size)
+ {
+ s += "ERROR";
+ return;
+ }
+ UInt32 sidSize = 0;
+ ParseSid(s, p + pos, size - pos, sidSize);
+}
+
+static void AddUInt32ToString(AString &s, UInt32 val)
+{
+ char sz[16];
+ ConvertUInt32ToString(val, sz);
+ s += sz;
+}
+
+static void ParseAcl(AString &s, const Byte *p, UInt32 size, const char *strName, UInt32 flags, UInt32 offset)
+{
+ UInt32 control = Get16(p + 2);
+ if ((flags & control) == 0)
+ return;
+ UInt32 pos = Get32(p + offset);
+ s += ' ';
+ s += strName;
+ if (pos >= size)
+ return;
+ p += pos;
+ size -= pos;
+ if (size < 8)
+ return;
+ if (Get16(p) != 2) // revision
+ return;
+ UInt32 num = Get32(p + 4);
+ AddUInt32ToString(s, num);
+
+ /*
+ UInt32 aclSize = Get16(p + 2);
+ if (num >= (1 << 16))
+ return;
+ if (aclSize > size)
+ return;
+ size = aclSize;
+ size -= 8;
+ p += 8;
+ for (UInt32 i = 0 ; i < num; i++)
+ {
+ if (size <= 8)
+ return;
+ // Byte type = p[0];
+ // Byte flags = p[1];
+ // UInt32 aceSize = Get16(p + 2);
+ // UInt32 mask = Get32(p + 4);
+ p += 8;
+ size -= 8;
+
+ UInt32 sidSize = 0;
+ s += ' ';
+ ParseSid(s, p, size, sidSize);
+ if (sidSize == 0)
+ return;
+ p += sidSize;
+ size -= sidSize;
+ }
+
+ // the tail can contain zeros. So (size != 0) is not ERROR
+ // if (size != 0) s += " ERROR";
+ */
+}
+
+#define MY_SE_OWNER_DEFAULTED (0x0001)
+#define MY_SE_GROUP_DEFAULTED (0x0002)
+#define MY_SE_DACL_PRESENT (0x0004)
+#define MY_SE_DACL_DEFAULTED (0x0008)
+#define MY_SE_SACL_PRESENT (0x0010)
+#define MY_SE_SACL_DEFAULTED (0x0020)
+#define MY_SE_DACL_AUTO_INHERIT_REQ (0x0100)
+#define MY_SE_SACL_AUTO_INHERIT_REQ (0x0200)
+#define MY_SE_DACL_AUTO_INHERITED (0x0400)
+#define MY_SE_SACL_AUTO_INHERITED (0x0800)
+#define MY_SE_DACL_PROTECTED (0x1000)
+#define MY_SE_SACL_PROTECTED (0x2000)
+#define MY_SE_RM_CONTROL_VALID (0x4000)
+#define MY_SE_SELF_RELATIVE (0x8000)
+
+void ConvertNtSecureToString(const Byte *data, UInt32 size, AString &s)
+{
+ s.Empty();
+ if (size < 20 || size > (1 << 18))
+ {
+ s += "ERROR";
+ return;
+ }
+ if (Get16(data) != 1) // revision
+ {
+ s += "UNSUPPORTED";
+ return;
+ }
+ ParseOwner(s, data, size, Get32(data + 4));
+ s += ' ';
+ ParseOwner(s, data, size, Get32(data + 8));
+ ParseAcl(s, data, size, "s:", MY_SE_SACL_PRESENT, 12);
+ ParseAcl(s, data, size, "d:", MY_SE_DACL_PRESENT, 16);
+ s += ' ';
+ AddUInt32ToString(s, size);
+ // s += '\n';
+ // s += Data_To_Hex(data, size);
+}
+
+#ifdef _WIN32
+
+static bool CheckSid(const Byte *data, UInt32 size, UInt32 pos) throw()
+{
+ if (pos >= size)
+ return false;
+ size -= pos;
+ if (size < 8)
+ return false;
+ UInt32 rev = data[pos];
+ if (rev != 1)
+ return false;
+ UInt32 num = data[pos + 1];
+ return (8 + num * 4 <= size);
+}
+
+static bool CheckAcl(const Byte *p, UInt32 size, UInt32 flags, UInt32 offset) throw()
+{
+ UInt32 control = Get16(p + 2);
+ if ((flags & control) == 0)
+ return true;
+ UInt32 pos = Get32(p + offset);
+ if (pos >= size)
+ return false;
+ p += pos;
+ size -= pos;
+ if (size < 8)
+ return false;
+ UInt32 aclSize = Get16(p + 2);
+ return (aclSize <= size);
+}
+
+bool CheckNtSecure(const Byte *data, UInt32 size) throw()
+{
+ if (size < 20)
+ return false;
+ if (Get16(data) != 1) // revision
+ return true; // windows function can handle such error, so we allow it
+ if (size > (1 << 18))
+ return false;
+ if (!CheckSid(data, size, Get32(data + 4))) return false;
+ if (!CheckSid(data, size, Get32(data + 8))) return false;
+ if (!CheckAcl(data, size, MY_SE_SACL_PRESENT, 12)) return false;
+ if (!CheckAcl(data, size, MY_SE_DACL_PRESENT, 16)) return false;
+ return true;
+}
+
+#endif
+
+bool ConvertNtReparseToString(const Byte *data, UInt32 size, UString &s)
+{
+ s.Empty();
+ NFile::CReparseAttr attr;
+ if (attr.Parse(data, size))
+ {
+ if (!attr.IsSymLink())
+ s.AddAscii("Junction: ");
+ s += attr.GetPath();
+ if (!attr.IsOkNamePair())
+ {
+ s.AddAscii(" : ");
+ s += attr.PrintName;
+ }
+ return true;
+ }
+
+ if (size < 8)
+ return false;
+ UInt32 tag = Get32(data);
+ UInt32 len = Get16(data + 4);
+ if (len + 8 > size)
+ return false;
+ if (Get16(data + 6) != 0) // padding
+ return false;
+
+ char hex[16];
+ ConvertUInt32ToHex8Digits(tag, hex);
+ s.AddAscii(hex);
+ s.Add_Space();
+
+ data += 8;
+
+ for (UInt32 i = 0; i < len; i++)
+ {
+ unsigned b = ((const Byte *)data)[i];
+ s += (wchar_t)GetHex((b >> 4) & 0xF);
+ s += (wchar_t)GetHex(b & 0xF);
+ }
+ return true;
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/PropIDUtils.h b/3rdparty/lzma/CPP/7zip/UI/Common/PropIDUtils.h
index ca14d091da3..1dea321e9ac 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/PropIDUtils.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/PropIDUtils.h
@@ -3,10 +3,16 @@
#ifndef __PROPID_UTILS_H
#define __PROPID_UTILS_H
-#include "Common/MyString.h"
-#include "Common/Types.h"
+#include "../../../Common/MyString.h"
-void ConvertUInt32ToHex(UInt32 value, wchar_t *s);
-UString ConvertPropertyToString(const PROPVARIANT &propVariant, PROPID propID, bool full = true);
+// provide at least 64 bytes for buffer including zero-end
+void ConvertPropertyToShortString(char *dest, const PROPVARIANT &propVariant, PROPID propID, bool full = true) throw();
+void ConvertPropertyToString(UString &dest, const PROPVARIANT &propVariant, PROPID propID, bool full = true);
+
+bool ConvertNtReparseToString(const Byte *data, UInt32 size, UString &s);
+void ConvertNtSecureToString(const Byte *data, UInt32 size, AString &s);
+bool CheckNtSecure(const Byte *data, UInt32 size) throw();;
+
+void ConvertWinAttribToString(char *s, UInt32 wa) throw();
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/SetProperties.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/SetProperties.cpp
index ac9b59a381d..c3de5d5a323 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/SetProperties.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/SetProperties.cpp
@@ -2,25 +2,26 @@
#include "StdAfx.h"
-#include "SetProperties.h"
+#include "../../../Common/MyCom.h"
+#include "../../../Common/MyString.h"
+#include "../../../Common/StringToInt.h"
-#include "Windows/PropVariant.h"
-#include "Common/MyString.h"
-#include "Common/StringToInt.h"
-#include "Common/MyCom.h"
+#include "../../../Windows/PropVariant.h"
#include "../../Archive/IArchive.h"
+#include "SetProperties.h"
+
using namespace NWindows;
using namespace NCOM;
static void ParseNumberString(const UString &s, NCOM::CPropVariant &prop)
{
- const wchar_t *endPtr;
- UInt64 result = ConvertStringToUInt64(s, &endPtr);
- if (endPtr - (const wchar_t *)s != s.Length())
+ const wchar_t *end;
+ UInt64 result = ConvertStringToUInt64(s, &end);
+ if (*end != 0 || s.IsEmpty())
prop = s;
- else if (result <= 0xFFFFFFFF)
+ else if (result <= (UInt32)0xFFFFFFFF)
prop = (UInt32)result;
else
prop = result;
@@ -39,8 +40,8 @@ HRESULT SetProperties(IUnknown *unknown, const CObjectVector<CProperty> &propert
CPropVariant *values = new CPropVariant[properties.Size()];
try
{
- int i;
- for(i = 0; i < properties.Size(); i++)
+ unsigned i;
+ for (i = 0; i < properties.Size(); i++)
{
const CProperty &property = properties[i];
NCOM::CPropVariant propVariant;
@@ -64,7 +65,7 @@ HRESULT SetProperties(IUnknown *unknown, const CObjectVector<CProperty> &propert
values[i] = propVariant;
}
CRecordVector<const wchar_t *> names;
- for(i = 0; i < realNames.Size(); i++)
+ for (i = 0; i < realNames.Size(); i++)
names.Add((const wchar_t *)realNames[i]);
RINOK(setProperties->SetProperties(&names.Front(), values, names.Size()));
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/SortUtils.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/SortUtils.cpp
index 061e7773079..5f29249bdeb 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/SortUtils.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/SortUtils.cpp
@@ -2,21 +2,24 @@
#include "StdAfx.h"
+#include "../../../Common/Wildcard.h"
+
#include "SortUtils.h"
-#include "Common/Wildcard.h"
-static int CompareStrings(const int *p1, const int *p2, void *param)
+static int CompareStrings(const unsigned *p1, const unsigned *p2, void *param)
{
const UStringVector &strings = *(const UStringVector *)param;
return CompareFileNames(strings[*p1], strings[*p2]);
}
-void SortFileNames(const UStringVector &strings, CIntVector &indices)
+void SortFileNames(const UStringVector &strings, CUIntVector &indices)
{
- indices.Clear();
- int numItems = strings.Size();
- indices.Reserve(numItems);
- for(int i = 0; i < numItems; i++)
- indices.Add(i);
+ const unsigned numItems = strings.Size();
+ indices.ClearAndSetSize(numItems);
+ if (numItems == 0)
+ return;
+ unsigned *vals = &indices[0];
+ for (unsigned i = 0; i < numItems; i++)
+ vals[i] = i;
indices.Sort(CompareStrings, (void *)&strings);
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/SortUtils.h b/3rdparty/lzma/CPP/7zip/UI/Common/SortUtils.h
index e15224611b7..8e42e06827a 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/SortUtils.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/SortUtils.h
@@ -1,10 +1,10 @@
// SortUtils.h
-#ifndef __SORTUTLS_H
-#define __SORTUTLS_H
+#ifndef __SORT_UTLS_H
+#define __SORT_UTLS_H
-#include "Common/MyString.h"
+#include "../../../Common/MyString.h"
-void SortFileNames(const UStringVector &strings, CIntVector &indices);
+void SortFileNames(const UStringVector &strings, CUIntVector &indices);
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/StdAfx.h b/3rdparty/lzma/CPP/7zip/UI/Common/StdAfx.h
index 9a8e7d21a28..2854ff3e935 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/StdAfx.h
@@ -1,9 +1,8 @@
-// stdafx.h
+// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../../Common/MyWindows.h"
-#include "../../../Common/NewHandler.h"
+#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/TempFiles.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/TempFiles.cpp
index c799c7bfa4f..2f868381f9b 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/TempFiles.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/TempFiles.cpp
@@ -2,9 +2,9 @@
#include "StdAfx.h"
-#include "TempFiles.h"
+#include "../../../Windows/FileDir.h"
-#include "Windows/FileDir.h"
+#include "TempFiles.h"
using namespace NWindows;
using namespace NFile;
@@ -13,9 +13,7 @@ void CTempFiles::Clear()
{
while (!Paths.IsEmpty())
{
- NDirectory::DeleteFileAlways(Paths.Back());
+ NDir::DeleteFileAlways(Paths.Back());
Paths.DeleteBack();
}
}
-
-
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/TempFiles.h b/3rdparty/lzma/CPP/7zip/UI/Common/TempFiles.h
index 5dcda5b63ee..4099e655898 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/TempFiles.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/TempFiles.h
@@ -3,7 +3,7 @@
#ifndef __TEMP_FILES_H
#define __TEMP_FILES_H
-#include "Common/MyString.h"
+#include "../../../Common/MyString.h"
class CTempFiles
{
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/Update.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/Update.cpp
index e740e8a70f7..2dfb210458d 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/Update.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/Update.cpp
@@ -4,18 +4,19 @@
#include "Update.h"
-#include "Common/IntToString.h"
-#include "Common/StringConvert.h"
+#include "../../../Common/IntToString.h"
+#include "../../../Common/StringConvert.h"
-#include "Windows/DLL.h"
-#include "Windows/FileDir.h"
-#include "Windows/FileFind.h"
-#include "Windows/FileName.h"
-#include "Windows/PropVariant.h"
-#include "Windows/PropVariantConversions.h"
-#include "Windows/Time.h"
+#include "../../../Windows/DLL.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileFind.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/PropVariant.h"
+#include "../../../Windows/PropVariantConv.h"
+#include "../../../Windows/TimeUtils.h"
#include "../../Common/FileStreams.h"
+#include "../../Common/LimitedStreams.h"
#include "../../Compress/CopyCoder.h"
@@ -35,22 +36,59 @@ static const char *kUpdateIsNotSupoorted =
using namespace NWindows;
using namespace NCOM;
using namespace NFile;
+using namespace NDir;
using namespace NName;
static CFSTR kTempFolderPrefix = FTEXT("7zE");
+
+void CUpdateErrorInfo::SetFromLastError(const char *message)
+{
+ SystemError = ::GetLastError();
+ Message = message;
+}
+
+HRESULT CUpdateErrorInfo::SetFromLastError(const char *message, const FString &fileName)
+{
+ SetFromLastError(message);
+ FileNames.Add(fileName);
+ return Get_HRESULT_Error();
+}
+
+static bool DeleteEmptyFolderAndEmptySubFolders(const FString &path)
+{
+ NFind::CFileInfo fileInfo;
+ FString pathPrefix = path + FCHAR_PATH_SEPARATOR;
+ {
+ NFind::CEnumerator enumerator(pathPrefix + FCHAR_ANY_MASK);
+ while (enumerator.Next(fileInfo))
+ {
+ if (fileInfo.IsDir())
+ if (!DeleteEmptyFolderAndEmptySubFolders(pathPrefix + fileInfo.Name))
+ return false;
+ }
+ }
+ /*
+ // we don't need clear read-only for folders
+ if (!MySetFileAttributes(path, 0))
+ return false;
+ */
+ return RemoveDir(path);
+}
+
+
using namespace NUpdateArchive;
class COutMultiVolStream:
public IOutStream,
public CMyUnknownImp
{
- int _streamIndex; // required stream
+ unsigned _streamIndex; // required stream
UInt64 _offsetPos; // offset from start of _streamIndex index
UInt64 _absPos;
UInt64 _length;
- struct CSubStreamInfo
+ struct CAltStreamInfo
{
COutFileStream *StreamSpec;
CMyComPtr<IOutStream> Stream;
@@ -58,7 +96,7 @@ class COutMultiVolStream:
UInt64 Pos;
UInt64 RealSize;
};
- CObjectVector<CSubStreamInfo> Streams;
+ CObjectVector<CAltStreamInfo> Streams;
public:
// CMyComPtr<IArchiveUpdateCallback2> VolumeCallback;
CRecordVector<UInt64> Sizes;
@@ -73,8 +111,11 @@ public:
_length = 0;
}
+ bool SetMTime(const FILETIME *mTime);
HRESULT Close();
+ UInt64 GetSize() const { return _length; }
+
MY_UNKNOWN_IMP1(IOutStream)
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
@@ -87,12 +128,12 @@ public:
HRESULT COutMultiVolStream::Close()
{
HRESULT res = S_OK;
- for (int i = 0; i < Streams.Size(); i++)
+ FOR_VECTOR (i, Streams)
{
- CSubStreamInfo &s = Streams[i];
- if (s.StreamSpec)
+ COutFileStream *s = Streams[i].StreamSpec;
+ if (s)
{
- HRESULT res2 = s.StreamSpec->Close();
+ HRESULT res2 = s->Close();
if (res2 != S_OK)
res = res2;
}
@@ -100,6 +141,19 @@ HRESULT COutMultiVolStream::Close()
return res;
}
+bool COutMultiVolStream::SetMTime(const FILETIME *mTime)
+{
+ bool res = true;
+ FOR_VECTOR (i, Streams)
+ {
+ COutFileStream *s = Streams[i].StreamSpec;
+ if (s)
+ if (!s->SetMTime(mTime))
+ res = false;
+ }
+ return res;
+}
+
STDMETHODIMP COutMultiVolStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
{
if (processedSize != NULL)
@@ -108,32 +162,32 @@ STDMETHODIMP COutMultiVolStream::Write(const void *data, UInt32 size, UInt32 *pr
{
if (_streamIndex >= Streams.Size())
{
- CSubStreamInfo subStream;
+ CAltStreamInfo altStream;
FChar temp[16];
ConvertUInt32ToString(_streamIndex + 1, temp);
- FString res = temp;
- while (res.Length() < 3)
- res = FString(FTEXT('0')) + res;
- FString name = Prefix + res;
- subStream.StreamSpec = new COutFileStream;
- subStream.Stream = subStream.StreamSpec;
- if (!subStream.StreamSpec->Create(name, false))
+ FString name = temp;
+ while (name.Len() < 3)
+ name.InsertAtFront(FTEXT('0'));
+ name.Insert(0, Prefix);
+ altStream.StreamSpec = new COutFileStream;
+ altStream.Stream = altStream.StreamSpec;
+ if (!altStream.StreamSpec->Create(name, false))
return ::GetLastError();
{
// NSynchronization::CCriticalSectionLock lock(g_TempPathsCS);
TempFiles->Paths.Add(name);
}
- subStream.Pos = 0;
- subStream.RealSize = 0;
- subStream.Name = name;
- Streams.Add(subStream);
+ altStream.Pos = 0;
+ altStream.RealSize = 0;
+ altStream.Name = name;
+ Streams.Add(altStream);
continue;
}
- CSubStreamInfo &subStream = Streams[_streamIndex];
+ CAltStreamInfo &altStream = Streams[_streamIndex];
- int index = _streamIndex;
+ unsigned index = _streamIndex;
if (index >= Sizes.Size())
index = Sizes.Size() - 1;
UInt64 volSize = Sizes[index];
@@ -144,29 +198,29 @@ STDMETHODIMP COutMultiVolStream::Write(const void *data, UInt32 size, UInt32 *pr
_streamIndex++;
continue;
}
- if (_offsetPos != subStream.Pos)
+ if (_offsetPos != altStream.Pos)
{
// CMyComPtr<IOutStream> outStream;
- // RINOK(subStream.Stream.QueryInterface(IID_IOutStream, &outStream));
- RINOK(subStream.Stream->Seek(_offsetPos, STREAM_SEEK_SET, NULL));
- subStream.Pos = _offsetPos;
+ // RINOK(altStream.Stream.QueryInterface(IID_IOutStream, &outStream));
+ RINOK(altStream.Stream->Seek(_offsetPos, STREAM_SEEK_SET, NULL));
+ altStream.Pos = _offsetPos;
}
- UInt32 curSize = (UInt32)MyMin((UInt64)size, volSize - subStream.Pos);
+ UInt32 curSize = (UInt32)MyMin((UInt64)size, volSize - altStream.Pos);
UInt32 realProcessed;
- RINOK(subStream.Stream->Write(data, curSize, &realProcessed));
+ RINOK(altStream.Stream->Write(data, curSize, &realProcessed));
data = (void *)((Byte *)data + realProcessed);
size -= realProcessed;
- subStream.Pos += realProcessed;
+ altStream.Pos += realProcessed;
_offsetPos += realProcessed;
_absPos += realProcessed;
if (_absPos > _length)
_length = _absPos;
- if (_offsetPos > subStream.RealSize)
- subStream.RealSize = _offsetPos;
+ if (_offsetPos > altStream.RealSize)
+ altStream.RealSize = _offsetPos;
if (processedSize != NULL)
*processedSize += realProcessed;
- if (subStream.Pos == volSize)
+ if (altStream.Pos == volSize)
{
_streamIndex++;
_offsetPos = 0;
@@ -182,17 +236,11 @@ STDMETHODIMP COutMultiVolStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *n
{
if (seekOrigin >= 3)
return STG_E_INVALIDFUNCTION;
- switch(seekOrigin)
+ switch (seekOrigin)
{
- case STREAM_SEEK_SET:
- _absPos = offset;
- break;
- case STREAM_SEEK_CUR:
- _absPos += offset;
- break;
- case STREAM_SEEK_END:
- _absPos = _length + offset;
- break;
+ case STREAM_SEEK_SET: _absPos = offset; break;
+ case STREAM_SEEK_CUR: _absPos += offset; break;
+ case STREAM_SEEK_END: _absPos = _length + offset; break;
}
_offsetPos = _absPos;
if (newPosition != NULL)
@@ -205,24 +253,24 @@ STDMETHODIMP COutMultiVolStream::SetSize(UInt64 newSize)
{
if (newSize < 0)
return E_INVALIDARG;
- int i = 0;
+ unsigned i = 0;
while (i < Streams.Size())
{
- CSubStreamInfo &subStream = Streams[i++];
- if ((UInt64)newSize < subStream.RealSize)
+ CAltStreamInfo &altStream = Streams[i++];
+ if ((UInt64)newSize < altStream.RealSize)
{
- RINOK(subStream.Stream->SetSize(newSize));
- subStream.RealSize = newSize;
+ RINOK(altStream.Stream->SetSize(newSize));
+ altStream.RealSize = newSize;
break;
}
- newSize -= subStream.RealSize;
+ newSize -= altStream.RealSize;
}
while (i < Streams.Size())
{
{
- CSubStreamInfo &subStream = Streams.Back();
- subStream.Stream.Release();
- NDirectory::DeleteFileAlways(subStream.Name);
+ CAltStreamInfo &altStream = Streams.Back();
+ altStream.Stream.Release();
+ DeleteFileAlways(altStream.Name);
}
Streams.DeleteBack();
}
@@ -232,53 +280,140 @@ STDMETHODIMP COutMultiVolStream::SetSize(UInt64 newSize)
return S_OK;
}
-static const wchar_t *kDefaultArchiveType = L"7z";
-static const wchar_t *kSFXExtension =
+void CArchivePath::ParseFromPath(const UString &path, EArcNameMode mode)
+{
+ OriginalPath = path;
+
+ SplitPathToParts_2(path, Prefix, Name);
+
+ if (mode == k_ArcNameMode_Add)
+ return;
+ if (mode == k_ArcNameMode_Exact)
+ {
+ BaseExtension.Empty();
+ return;
+ }
+
+ int dotPos = Name.ReverseFind_Dot();
+ if (dotPos < 0)
+ return;
+ if ((unsigned)dotPos == Name.Len() - 1)
+ {
+ Name.DeleteBack();
+ BaseExtension.Empty();
+ return;
+ }
+ const UString ext = Name.Ptr(dotPos + 1);
+ if (BaseExtension.IsEqualTo_NoCase(ext))
+ {
+ BaseExtension = ext;
+ Name.DeleteFrom(dotPos);
+ }
+ else
+ BaseExtension.Empty();
+}
+
+UString CArchivePath::GetFinalPath() const
+{
+ UString path = GetPathWithoutExt();
+ if (!BaseExtension.IsEmpty())
+ {
+ path += L'.';
+ path += BaseExtension;
+ }
+ return path;
+}
+
+UString CArchivePath::GetFinalVolPath() const
+{
+ UString path = GetPathWithoutExt();
+ if (!BaseExtension.IsEmpty())
+ {
+ path += L'.';
+ path += VolExtension;
+ }
+ return path;
+}
+
+FString CArchivePath::GetTempPath() const
+{
+ FString path = TempPrefix;
+ path += us2fs(Name);
+ if (!BaseExtension.IsEmpty())
+ {
+ path += FTEXT('.');
+ path += us2fs(BaseExtension);
+ }
+ path.AddAscii(".tmp");
+ path += TempPostfix;
+ return path;
+}
+
+static const wchar_t *kDefaultArcType = L"7z";
+static const wchar_t *kDefaultArcExt = L"7z";
+static const char *kSFXExtension =
#ifdef _WIN32
- L"exe";
+ "exe";
#else
- L"";
+ "";
#endif
-bool CUpdateOptions::Init(const CCodecs *codecs, const CIntVector &formatIndices, const UString &arcPath)
+bool CUpdateOptions::InitFormatIndex(const CCodecs *codecs,
+ const CObjectVector<COpenType> &types, const UString &arcPath)
{
- if (formatIndices.Size() > 1)
+ if (types.Size() > 1)
return false;
- int arcTypeIndex = -1;
- if (formatIndices.Size() != 0)
- arcTypeIndex = formatIndices[0];
- if (arcTypeIndex >= 0)
- MethodMode.FormatIndex = arcTypeIndex;
+ // int arcTypeIndex = -1;
+ if (types.Size() != 0)
+ {
+ MethodMode.Type = types[0];
+ MethodMode.Type_Defined = true;
+ }
+ if (MethodMode.Type.FormatIndex < 0)
+ {
+ // MethodMode.Type = -1;
+ MethodMode.Type = COpenType();
+ if (ArcNameMode != k_ArcNameMode_Add)
+ {
+ MethodMode.Type.FormatIndex = codecs->FindFormatForArchiveName(arcPath);
+ if (MethodMode.Type.FormatIndex >= 0)
+ MethodMode.Type_Defined = true;
+ }
+ }
+ return true;
+}
+
+bool CUpdateOptions::SetArcPath(const CCodecs *codecs, const UString &arcPath)
+{
+ UString typeExt;
+ int formatIndex = MethodMode.Type.FormatIndex;
+ if (formatIndex < 0)
+ {
+ typeExt = kDefaultArcExt;
+ }
else
{
- MethodMode.FormatIndex = codecs->FindFormatForArchiveName(arcPath);
- // It works incorrectly for update command if archive has some non-default extension!
- if (MethodMode.FormatIndex < 0)
- MethodMode.FormatIndex = codecs->FindFormatForArchiveType(kDefaultArchiveType);
+ const CArcInfoEx &arcInfo = codecs->Formats[formatIndex];
+ if (!arcInfo.UpdateEnabled)
+ return false;
+ typeExt = arcInfo.GetMainExt();
}
- if (MethodMode.FormatIndex < 0)
- return false;
- const CArcInfoEx &arcInfo = codecs->Formats[MethodMode.FormatIndex];
- if (!arcInfo.UpdateEnabled)
- return false;
- UString typeExt = arcInfo.GetMainExt();
UString ext = typeExt;
if (SfxMode)
- ext = kSFXExtension;
+ ext.SetFromAscii(kSFXExtension);
ArchivePath.BaseExtension = ext;
ArchivePath.VolExtension = typeExt;
- ArchivePath.ParseFromPath(arcPath);
- for (int i = 0; i < Commands.Size(); i++)
+ ArchivePath.ParseFromPath(arcPath, ArcNameMode);
+ FOR_VECTOR (i, Commands)
{
CUpdateArchiveCommand &uc = Commands[i];
uc.ArchivePath.BaseExtension = ext;
uc.ArchivePath.VolExtension = typeExt;
- uc.ArchivePath.ParseFromPath(uc.UserArchivePath);
+ uc.ArchivePath.ParseFromPath(uc.UserArchivePath, ArcNameMode);
}
return true;
}
-/*
struct CUpdateProduceCallbackImp: public IUpdateProduceCallback
{
const CObjectVector<CArcItem> *_arcItems;
@@ -286,45 +421,104 @@ struct CUpdateProduceCallbackImp: public IUpdateProduceCallback
CUpdateProduceCallbackImp(const CObjectVector<CArcItem> *a,
IUpdateCallbackUI *callback): _arcItems(a), _callback(callback) {}
- virtual HRESULT ShowDeleteFile(int arcIndex);
+ virtual HRESULT ShowDeleteFile(unsigned arcIndex);
};
-HRESULT CUpdateProduceCallbackImp::ShowDeleteFile(int arcIndex)
+HRESULT CUpdateProduceCallbackImp::ShowDeleteFile(unsigned arcIndex)
+{
+ const CArcItem &ai = (*_arcItems)[arcIndex];
+ return _callback->ShowDeleteFile(ai.Name, ai.IsDir);
+}
+
+bool CRenamePair::Prepare()
+{
+ if (RecursedType != NRecursedType::kNonRecursed)
+ return false;
+ if (!WildcardParsing)
+ return true;
+ return !DoesNameContainWildcard(OldName);
+}
+
+extern bool g_CaseSensitive;
+
+static unsigned CompareTwoNames(const wchar_t *s1, const wchar_t *s2)
+{
+ for (unsigned i = 0;; i++)
+ {
+ wchar_t c1 = s1[i];
+ wchar_t c2 = s2[i];
+ if (c1 == 0 || c2 == 0)
+ return i;
+ if (c1 == c2)
+ continue;
+ if (!g_CaseSensitive && (MyCharUpper(c1) == MyCharUpper(c2)))
+ continue;
+ if (IsPathSepar(c1) && IsPathSepar(c2))
+ continue;
+ return i;
+ }
+}
+
+bool CRenamePair::GetNewPath(bool isFolder, const UString &src, UString &dest) const
{
- return _callback->ShowDeleteFile((*_arcItems)[arcIndex].Name);
+ unsigned num = CompareTwoNames(OldName, src);
+ if (OldName[num] == 0)
+ {
+ if (src[num] != 0 && !IsPathSepar(src[num]) && num != 0 && !IsPathSepar(src[num - 1]))
+ return false;
+ }
+ else
+ {
+ // OldName[num] != 0
+ // OldName = "1\1a.txt"
+ // src = "1"
+
+ if (!isFolder
+ || src[num] != 0
+ || !IsPathSepar(OldName[num])
+ || OldName[num + 1] != 0)
+ return false;
+ }
+ dest = NewName + src.Ptr(num);
+ return true;
}
-*/
+
+#ifdef SUPPORT_ALT_STREAMS
+int FindAltStreamColon_in_Path(const wchar_t *path);
+#endif
static HRESULT Compress(
+ const CUpdateOptions &options,
+ bool isUpdatingItself,
CCodecs *codecs,
const CActionSet &actionSet,
- IInArchive *archive,
- const CCompressionMethodMode &compressionMethod,
+ const CArc *arc,
CArchivePath &archivePath,
const CObjectVector<CArcItem> &arcItems,
- bool shareForWrite,
- bool stdInMode,
- /* const UString & stdInFileName, */
- bool stdOutMode,
+ Byte *processedItemsStatuses,
const CDirItems &dirItems,
- bool sfxMode,
- const FString &sfxModule,
- const CRecordVector<UInt64> &volumesSizes,
+ const CDirItem *parentDirItem,
CTempFiles &tempFiles,
CUpdateErrorInfo &errorInfo,
- IUpdateCallbackUI *callback)
+ IUpdateCallbackUI *callback,
+ CFinishArchiveStat &st)
{
CMyComPtr<IOutArchive> outArchive;
- if (archive != NULL)
+ int formatIndex = options.MethodMode.Type.FormatIndex;
+
+ if (arc)
{
- CMyComPtr<IInArchive> archive2 = archive;
+ formatIndex = arc->FormatIndex;
+ if (formatIndex < 0)
+ return E_NOTIMPL;
+ CMyComPtr<IInArchive> archive2 = arc->Archive;
HRESULT result = archive2.QueryInterface(IID_IOutArchive, &outArchive);
if (result != S_OK)
throw kUpdateIsNotSupoorted;
}
else
{
- RINOK(codecs->CreateOutArchive(compressionMethod.FormatIndex, outArchive));
+ RINOK(codecs->CreateOutArchive(formatIndex, outArchive));
#ifdef EXTERNAL_CODECS
{
@@ -337,75 +531,170 @@ static HRESULT Compress(
}
#endif
}
+
if (outArchive == 0)
throw kUpdateIsNotSupoorted;
NFileTimeType::EEnum fileTimeType;
- UInt32 value;
- RINOK(outArchive->GetFileTimeType(&value));
+ {
+ UInt32 value;
+ RINOK(outArchive->GetFileTimeType(&value));
+
+ switch (value)
+ {
+ case NFileTimeType::kWindows:
+ case NFileTimeType::kUnix:
+ case NFileTimeType::kDOS:
+ fileTimeType = (NFileTimeType::EEnum)value;
+ break;
+ default:
+ return E_FAIL;
+ }
+ }
- switch(value)
{
- case NFileTimeType::kWindows:
- case NFileTimeType::kUnix:
- case NFileTimeType::kDOS:
- fileTimeType = (NFileTimeType::EEnum)value;
- break;
- default:
- return E_FAIL;
+ const CArcInfoEx &arcInfo = codecs->Formats[formatIndex];
+ if (options.AltStreams.Val && !arcInfo.Flags_AltStreams())
+ return E_NOTIMPL;
+ if (options.NtSecurity.Val && !arcInfo.Flags_NtSecure())
+ return E_NOTIMPL;
}
CRecordVector<CUpdatePair2> updatePairs2;
+ UStringVector newNames;
+
+ if (options.RenamePairs.Size() != 0)
+ {
+ FOR_VECTOR (i, arcItems)
+ {
+ const CArcItem &ai = arcItems[i];
+ bool needRename = false;
+ UString dest;
+
+ if (ai.Censored)
+ {
+ FOR_VECTOR (j, options.RenamePairs)
+ {
+ const CRenamePair &rp = options.RenamePairs[j];
+ if (rp.GetNewPath(ai.IsDir, ai.Name, dest))
+ {
+ needRename = true;
+ break;
+ }
+
+ #ifdef SUPPORT_ALT_STREAMS
+ if (ai.IsAltStream)
+ {
+ int colonPos = FindAltStreamColon_in_Path(ai.Name);
+ if (colonPos >= 0)
+ {
+ UString mainName = ai.Name.Left(colonPos);
+ /*
+ actually we must improve that code to support cases
+ with folder renaming like: rn arc dir1\ dir2\
+ */
+ if (rp.GetNewPath(false, mainName, dest))
+ {
+ needRename = true;
+ dest += L':';
+ dest += ai.Name.Ptr(colonPos + 1);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+ }
+
+ CUpdatePair2 up2;
+ up2.SetAs_NoChangeArcItem(ai.IndexInServer);
+ if (needRename)
+ {
+ up2.NewProps = true;
+ RINOK(arc->IsItemAnti(i, up2.IsAnti));
+ up2.NewNameIndex = newNames.Add(dest);
+ }
+ updatePairs2.Add(up2);
+ }
+ }
+ else
{
CRecordVector<CUpdatePair> updatePairs;
GetUpdatePairInfoList(dirItems, arcItems, fileTimeType, updatePairs); // must be done only once!!!
- // CUpdateProduceCallbackImp upCallback(&arcItems, callback);
- UpdateProduce(updatePairs, actionSet, updatePairs2, NULL /* &upCallback */);
+ CUpdateProduceCallbackImp upCallback(&arcItems, callback);
+
+ UpdateProduce(updatePairs, actionSet, updatePairs2, isUpdatingItself ? &upCallback : NULL);
}
- UInt32 numFiles = 0;
- for (int i = 0; i < updatePairs2.Size(); i++)
- if (updatePairs2[i].NewData)
- numFiles++;
-
- RINOK(callback->SetNumFiles(numFiles));
-
+ {
+ UInt32 numItems = 0;
+ FOR_VECTOR (i, updatePairs2)
+ if (updatePairs2[i].NewData)
+ numItems++;
+ RINOK(callback->SetNumItems(numItems));
+ }
CArchiveUpdateCallback *updateCallbackSpec = new CArchiveUpdateCallback;
CMyComPtr<IArchiveUpdateCallback> updateCallback(updateCallbackSpec);
- updateCallbackSpec->ShareForWrite = shareForWrite;
- updateCallbackSpec->StdInMode = stdInMode;
+ updateCallbackSpec->ShareForWrite = options.OpenShareForWrite;
+ updateCallbackSpec->StdInMode = options.StdInMode;
updateCallbackSpec->Callback = callback;
+
+ if (arc)
+ {
+ // we set Archive to allow to transfer GetProperty requests back to DLL.
+ updateCallbackSpec->Archive = arc->Archive;
+ }
+
updateCallbackSpec->DirItems = &dirItems;
+ updateCallbackSpec->ParentDirItem = parentDirItem;
+
+ updateCallbackSpec->StoreNtSecurity = options.NtSecurity.Val;
+ updateCallbackSpec->StoreHardLinks = options.HardLinks.Val;
+ updateCallbackSpec->StoreSymLinks = options.SymLinks.Val;
+
+ updateCallbackSpec->Arc = arc;
updateCallbackSpec->ArcItems = &arcItems;
updateCallbackSpec->UpdatePairs = &updatePairs2;
+ updateCallbackSpec->ProcessedItemsStatuses = processedItemsStatuses;
+
+ if (options.RenamePairs.Size() != 0)
+ updateCallbackSpec->NewNames = &newNames;
+
+ CMyComPtr<IOutStream> outSeekStream;
CMyComPtr<ISequentialOutStream> outStream;
- if (!stdOutMode)
+ if (!options.StdOutMode)
{
FString dirPrefix;
- if (!NFile::NDirectory::GetOnlyDirPrefix(us2fs(archivePath.GetFinalPath()), dirPrefix))
+ if (!GetOnlyDirPrefix(us2fs(archivePath.GetFinalPath()), dirPrefix))
throw 1417161;
- NFile::NDirectory::CreateComplexDirectory(dirPrefix);
+ CreateComplexDir(dirPrefix);
}
COutFileStream *outStreamSpec = NULL;
+ CStdOutFileStream *stdOutFileStreamSpec = NULL;
COutMultiVolStream *volStreamSpec = NULL;
- if (volumesSizes.Size() == 0)
+ if (options.VolumesSizes.Size() == 0)
{
- if (stdOutMode)
- outStream = new CStdOutFileStream;
+ if (options.StdOutMode)
+ {
+ stdOutFileStreamSpec = new CStdOutFileStream;
+ outStream = stdOutFileStreamSpec;
+ }
else
{
outStreamSpec = new COutFileStream;
- outStream = outStreamSpec;
+ outSeekStream = outStreamSpec;
+ outStream = outSeekStream;
bool isOK = false;
FString realPath;
- for (int i = 0; i < (1 << 16); i++)
+
+ for (unsigned i = 0; i < (1 << 16); i++)
{
if (archivePath.Temp)
{
@@ -430,23 +719,24 @@ static HRESULT Compress(
if (!archivePath.Temp)
break;
}
+
if (!isOK)
- {
- errorInfo.SystemError = ::GetLastError();
- errorInfo.FileName = realPath;
- errorInfo.Message = L"7-Zip cannot open file";
- return E_FAIL;
- }
+ return errorInfo.SetFromLastError("cannot open file", realPath);
}
}
else
{
- if (stdOutMode)
+ if (options.StdOutMode)
return E_FAIL;
+ if (arc && arc->GetGlobalOffset() > 0)
+ return E_NOTIMPL;
+
volStreamSpec = new COutMultiVolStream;
- outStream = volStreamSpec;
- volStreamSpec->Sizes = volumesSizes;
- volStreamSpec->Prefix = us2fs(archivePath.GetFinalPath() + L".");
+ outSeekStream = volStreamSpec;
+ outStream = outSeekStream;
+ volStreamSpec->Sizes = options.VolumesSizes;
+ volStreamSpec->Prefix = us2fs(archivePath.GetFinalVolPath());
+ volStreamSpec->Prefix += FTEXT('.');
volStreamSpec->TempFiles = &tempFiles;
volStreamSpec->Init();
@@ -458,23 +748,18 @@ static HRESULT Compress(
*/
}
- RINOK(SetProperties(outArchive, compressionMethod.Properties));
+ RINOK(SetProperties(outArchive, options.MethodMode.Properties));
- if (sfxMode)
+ if (options.SfxMode)
{
CInFileStream *sfxStreamSpec = new CInFileStream;
CMyComPtr<IInStream> sfxStream(sfxStreamSpec);
- if (!sfxStreamSpec->Open(sfxModule))
- {
- errorInfo.SystemError = ::GetLastError();
- errorInfo.Message = L"7-Zip cannot open SFX module";
- errorInfo.FileName = sfxModule;
- return E_FAIL;
- }
+ if (!sfxStreamSpec->Open(options.SfxModule))
+ return errorInfo.SetFromLastError("cannot open SFX module", options.SfxModule);
CMyComPtr<ISequentialOutStream> sfxOutStream;
COutFileStream *outStreamSpec = NULL;
- if (volumesSizes.Size() == 0)
+ if (options.VolumesSizes.Size() == 0)
sfxOutStream = outStream;
else
{
@@ -482,23 +767,97 @@ static HRESULT Compress(
sfxOutStream = outStreamSpec;
FString realPath = us2fs(archivePath.GetFinalPath());
if (!outStreamSpec->Create(realPath, false))
- {
- errorInfo.SystemError = ::GetLastError();
- errorInfo.FileName = realPath;
- errorInfo.Message = L"7-Zip cannot open file";
- return E_FAIL;
- }
+ return errorInfo.SetFromLastError("cannot open file", realPath);
+ }
+
+ {
+ UInt64 sfxSize;
+ RINOK(sfxStreamSpec->GetSize(&sfxSize));
+ RINOK(callback->WriteSfx(fs2us(options.SfxModule), sfxSize));
}
+
RINOK(NCompress::CopyStream(sfxStream, sfxOutStream, NULL));
+
if (outStreamSpec)
{
RINOK(outStreamSpec->Close());
}
}
- HRESULT result = outArchive->UpdateItems(outStream, updatePairs2.Size(), updateCallback);
- callback->Finilize();
+ CMyComPtr<ISequentialOutStream> tailStream;
+
+ if (options.SfxMode || !arc || arc->ArcStreamOffset == 0)
+ tailStream = outStream;
+ else
+ {
+ // Int64 globalOffset = arc->GetGlobalOffset();
+ RINOK(arc->InStream->Seek(0, STREAM_SEEK_SET, NULL));
+ RINOK(NCompress::CopyStream_ExactSize(arc->InStream, outStream, arc->ArcStreamOffset, NULL));
+ if (options.StdOutMode)
+ tailStream = outStream;
+ else
+ {
+ CTailOutStream *tailStreamSpec = new CTailOutStream;
+ tailStream = tailStreamSpec;
+ tailStreamSpec->Stream = outSeekStream;
+ tailStreamSpec->Offset = arc->ArcStreamOffset;
+ tailStreamSpec->Init();
+ }
+ }
+
+
+ HRESULT result = outArchive->UpdateItems(tailStream, updatePairs2.Size(), updateCallback);
+ // callback->Finalize();
RINOK(result);
+
+ if (!updateCallbackSpec->AreAllFilesClosed())
+ {
+ errorInfo.Message = "There are unclosed input file:";
+ errorInfo.FileNames = updateCallbackSpec->_openFiles_Paths;
+ return E_FAIL;
+ }
+
+ if (options.SetArcMTime)
+ {
+ FILETIME ft;
+ ft.dwLowDateTime = 0;
+ ft.dwHighDateTime = 0;
+ FOR_VECTOR (i, updatePairs2)
+ {
+ CUpdatePair2 &pair2 = updatePairs2[i];
+ const FILETIME *ft2 = NULL;
+ if (pair2.NewProps && pair2.DirIndex >= 0)
+ ft2 = &dirItems.Items[pair2.DirIndex].MTime;
+ else if (pair2.UseArcProps && pair2.ArcIndex >= 0)
+ ft2 = &arcItems[pair2.ArcIndex].MTime;
+ if (ft2)
+ {
+ if (::CompareFileTime(&ft, ft2) < 0)
+ ft = *ft2;
+ }
+ }
+ if (ft.dwLowDateTime != 0 || ft.dwHighDateTime != 0)
+ {
+ if (outStreamSpec)
+ outStreamSpec->SetMTime(&ft);
+ else if (volStreamSpec)
+ volStreamSpec->SetMTime(&ft);;
+ }
+ }
+
+ if (callback)
+ {
+ UInt64 size = 0;
+ if (outStreamSpec)
+ outStreamSpec->GetSize(&size);
+ else if (stdOutFileStreamSpec)
+ size = stdOutFileStreamSpec->GetSize();
+ else
+ size = volStreamSpec->GetSize();
+
+ st.OutArcFileSize = size;
+ }
+
if (outStreamSpec)
result = outStreamSpec->Close();
else if (volStreamSpec)
@@ -506,7 +865,27 @@ static HRESULT Compress(
return result;
}
-HRESULT EnumerateInArchiveItems(const NWildcard::CCensor &censor,
+bool CensorNode_CheckPath2(const NWildcard::CCensorNode &node, const CReadArcItem &item, bool &include);
+
+static bool Censor_CheckPath(const NWildcard::CCensor &censor, const CReadArcItem &item)
+{
+ bool finded = false;
+ FOR_VECTOR (i, censor.Pairs)
+ {
+ bool include;
+ if (CensorNode_CheckPath2(censor.Pairs[i].Head, item, include))
+ {
+ if (!include)
+ return false;
+ finded = true;
+ }
+ }
+ return finded;
+}
+
+static HRESULT EnumerateInArchiveItems(
+ // bool storeStreamsMode,
+ const NWildcard::CCensor &censor,
const CArc &arc,
CObjectVector<CArcItem> &arcItems)
{
@@ -514,14 +893,30 @@ HRESULT EnumerateInArchiveItems(const NWildcard::CCensor &censor,
UInt32 numItems;
IInArchive *archive = arc.Archive;
RINOK(archive->GetNumberOfItems(&numItems));
- arcItems.Reserve(numItems);
+ arcItems.ClearAndReserve(numItems);
+
+ CReadArcItem item;
+
for (UInt32 i = 0; i < numItems; i++)
{
CArcItem ai;
- RINOK(arc.GetItemPath(i, ai.Name));
- RINOK(IsArchiveItemFolder(archive, i, ai.IsDir));
- ai.Censored = censor.CheckPath(ai.Name, !ai.IsDir);
+ RINOK(arc.GetItem(i, item));
+ ai.Name = item.Path;
+ ai.IsDir = item.IsDir;
+ ai.IsAltStream =
+ #ifdef SUPPORT_ALT_STREAMS
+ item.IsAltStream;
+ #else
+ false;
+ #endif
+
+ /*
+ if (!storeStreamsMode && ai.IsAltStream)
+ continue;
+ */
+ ai.Censored = Censor_CheckPath(censor, item);
+
RINOK(arc.GetItemMTime(i, ai.MTime, ai.MTimeDefined));
RINOK(arc.GetItemSize(i, ai.Size, ai.SizeDefined));
@@ -531,7 +926,7 @@ HRESULT EnumerateInArchiveItems(const NWildcard::CCensor &censor,
if (prop.vt == VT_UI4)
{
ai.TimeType = (int)(NFileTimeType::EEnum)prop.ulVal;
- switch(ai.TimeType)
+ switch (ai.TimeType)
{
case NFileTimeType::kWindows:
case NFileTimeType::kUnix:
@@ -544,110 +939,99 @@ HRESULT EnumerateInArchiveItems(const NWildcard::CCensor &censor,
}
ai.IndexInServer = i;
- arcItems.Add(ai);
+ arcItems.AddInReserved(ai);
}
return S_OK;
}
+#if defined(_WIN32) && !defined(UNDER_CE)
-static HRESULT UpdateWithItemLists(
- CCodecs *codecs,
- CUpdateOptions &options,
- IInArchive *archive,
- const CObjectVector<CArcItem> &arcItems,
- CDirItems &dirItems,
- CTempFiles &tempFiles,
- CUpdateErrorInfo &errorInfo,
- IUpdateCallbackUI2 *callback)
-{
- for(int i = 0; i < options.Commands.Size(); i++)
- {
- CUpdateArchiveCommand &command = options.Commands[i];
- if (options.StdOutMode)
- {
- RINOK(callback->StartArchive(L"stdout", archive != 0));
- }
- else
- {
- RINOK(callback->StartArchive(command.ArchivePath.GetFinalPath(),
- i == 0 && options.UpdateArchiveItself && archive != 0));
- }
+#include <mapi.h>
- RINOK(Compress(
- codecs,
- command.ActionSet, archive,
- options.MethodMode,
- command.ArchivePath,
- arcItems,
- options.OpenShareForWrite,
- options.StdInMode,
- /* options.StdInFileName, */
- options.StdOutMode,
- dirItems,
- options.SfxMode, options.SfxModule,
- options.VolumesSizes,
- tempFiles,
- errorInfo, callback));
-
- RINOK(callback->FinishArchive());
- }
- return S_OK;
-}
+#endif
-#if defined(_WIN32) && !defined(UNDER_CE)
-class CCurrentDirRestorer
+struct CRefSortPair
{
- FString _path;
-public:
- CCurrentDirRestorer() { NFile::NDirectory::MyGetCurrentDirectory(_path); }
- ~CCurrentDirRestorer() { RestoreDirectory();}
- bool RestoreDirectory() const { return BOOLToBool(NFile::NDirectory::MySetCurrentDirectory(_path)); }
+ unsigned Len;
+ unsigned Index;
};
-#endif
-struct CEnumDirItemUpdateCallback: public IEnumDirItemCallback
+#define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; }
+
+static int CompareRefSortPair(const CRefSortPair *a1, const CRefSortPair *a2, void *)
+{
+ RINOZ(-MyCompare(a1->Len, a2->Len));
+ return MyCompare(a1->Index, a2->Index);
+}
+
+static unsigned GetNumSlashes(const FChar *s)
{
- IUpdateCallbackUI2 *Callback;
- HRESULT ScanProgress(UInt64 numFolders, UInt64 numFiles, const wchar_t *path)
+ for (unsigned numSlashes = 0;;)
{
- return Callback->ScanProgress(numFolders, numFiles, path);
+ FChar c = *s++;
+ if (c == 0)
+ return numSlashes;
+ if (IS_PATH_SEPAR(c))
+ numSlashes++;
}
-};
+}
#ifdef _WIN32
-typedef ULONG (FAR PASCAL MY_MAPISENDDOCUMENTS)(
- ULONG_PTR ulUIParam,
- LPSTR lpszDelimChar,
- LPSTR lpszFilePaths,
- LPSTR lpszFileNames,
- ULONG ulReserved
-);
-typedef MY_MAPISENDDOCUMENTS FAR *MY_LPMAPISENDDOCUMENTS;
+void ConvertToLongNames(NWildcard::CCensor &censor);
#endif
HRESULT UpdateArchive(
CCodecs *codecs,
- const NWildcard::CCensor &censor,
+ const CObjectVector<COpenType> &types,
+ const UString &cmdArcPath2,
+ NWildcard::CCensor &censor,
CUpdateOptions &options,
CUpdateErrorInfo &errorInfo,
IOpenCallbackUI *openCallback,
- IUpdateCallbackUI2 *callback)
+ IUpdateCallbackUI2 *callback,
+ bool needSetPath)
{
if (options.StdOutMode && options.EMailMode)
return E_FAIL;
- if (options.VolumesSizes.Size() > 0 && (options.EMailMode || options.SfxMode))
+ if (types.Size() > 1)
+ return E_NOTIMPL;
+
+ bool renameMode = !options.RenamePairs.IsEmpty();
+ if (renameMode)
+ {
+ if (options.Commands.Size() != 1)
+ return E_FAIL;
+ }
+
+ if (options.DeleteAfterCompressing)
+ {
+ if (options.Commands.Size() != 1)
+ return E_NOTIMPL;
+ const CActionSet &as = options.Commands[0].ActionSet;
+ for (int i = 2; i < NPairState::kNumValues; i++)
+ if (as.StateActions[i] != NPairAction::kCompress)
+ return E_NOTIMPL;
+ }
+
+ censor.AddPathsToCensor(options.PathMode);
+ #ifdef _WIN32
+ ConvertToLongNames(censor);
+ #endif
+ censor.ExtendExclude();
+
+
+ if (options.VolumesSizes.Size() > 0 && (options.EMailMode /* || options.SfxMode */))
return E_NOTIMPL;
if (options.SfxMode)
{
CProperty property;
- property.Name = L"rsfx";
- property.Value = L"on";
+ property.Name.SetFromAscii("rsfx");
options.MethodMode.Properties.Add(property);
if (options.SfxModule.IsEmpty())
{
- errorInfo.Message = L"SFX file is not specified";
+ errorInfo.Message = "SFX file is not specified";
return E_FAIL;
}
bool found = false;
@@ -663,57 +1047,133 @@ HRESULT UpdateArchive(
if (!found)
{
if (!NFind::DoesFileExist(options.SfxModule))
- {
- errorInfo.SystemError = ::GetLastError();
- errorInfo.Message = L"7-Zip cannot find specified SFX module";
- errorInfo.FileName = options.SfxModule;
- return E_FAIL;
- }
+ return errorInfo.SetFromLastError("cannot find specified SFX module", options.SfxModule);
}
}
-
CArchiveLink arcLink;
- const UString arcPath = options.ArchivePath.GetFinalPath();
- if (!options.ArchivePath.OriginalPath.IsEmpty())
+
+ if (needSetPath)
+ {
+ if (!options.InitFormatIndex(codecs, types, cmdArcPath2) ||
+ !options.SetArcPath(codecs, cmdArcPath2))
+ return E_NOTIMPL;
+ }
+ UString arcPath = options.ArchivePath.GetFinalPath();
+
+ if (cmdArcPath2.IsEmpty())
+ {
+ if (options.MethodMode.Type.FormatIndex < 0)
+ throw "type of archive is not specified";
+ }
+ else
{
NFind::CFileInfo fi;
- if (fi.Find(us2fs(arcPath)))
+ if (!fi.Find(us2fs(arcPath)))
+ {
+ if (renameMode)
+ throw "can't find archive";;
+ if (options.MethodMode.Type.FormatIndex < 0)
+ {
+ if (!options.SetArcPath(codecs, cmdArcPath2))
+ return E_NOTIMPL;
+ }
+ }
+ else
{
if (fi.IsDir())
throw "there is no such archive";
+ if (fi.IsDevice)
+ return E_NOTIMPL;
if (options.VolumesSizes.Size() > 0)
return E_NOTIMPL;
- CIntVector formatIndices;
- if (options.MethodMode.FormatIndex >= 0)
- formatIndices.Add(options.MethodMode.FormatIndex);
- HRESULT result = arcLink.Open2(codecs, formatIndices, false, NULL, arcPath, openCallback);
+ CObjectVector<COpenType> types;
+ // change it.
+ if (options.MethodMode.Type_Defined)
+ types.Add(options.MethodMode.Type);
+ // We need to set Properties to open archive only in some cases (WIM archives).
+
+ CIntVector excl;
+ COpenOptions op;
+ #ifndef _SFX
+ op.props = &options.MethodMode.Properties;
+ #endif
+ op.codecs = codecs;
+ op.types = &types;
+ op.excludedFormats = &excl;
+ op.stdInMode = false;
+ op.stream = NULL;
+ op.filePath = arcPath;
+
+ RINOK(callback->StartOpenArchive(arcPath));
+
+ HRESULT result = arcLink.Open3(op, openCallback);
+
if (result == E_ABORT)
return result;
- RINOK(callback->OpenResult(arcPath, result));
+
+ if (result == S_OK && arcLink.NonOpen_ErrorInfo.ErrorFormatIndex >= 0)
+ result = S_FALSE;
+
+ HRESULT res2 = callback->OpenResult(codecs, arcLink, arcPath, result);
+ /*
+ if (result == S_FALSE)
+ return E_FAIL;
+ */
+ RINOK(res2);
RINOK(result);
+
if (arcLink.VolumePaths.Size() > 1)
{
errorInfo.SystemError = (DWORD)E_NOTIMPL;
- errorInfo.Message = L"Updating for multivolume archives is not implemented";
+ errorInfo.Message = "Updating for multivolume archives is not implemented";
return E_NOTIMPL;
}
CArc &arc = arcLink.Arcs.Back();
arc.MTimeDefined = !fi.IsDevice;
arc.MTime = fi.MTime;
+
+ if (arc.ErrorInfo.ThereIsTail)
+ {
+ errorInfo.SystemError = (DWORD)E_NOTIMPL;
+ errorInfo.Message = "There is some data block after the end of the archive";
+ return E_NOTIMPL;
+ }
+ if (options.MethodMode.Type.FormatIndex < 0)
+ {
+ options.MethodMode.Type.FormatIndex = arcLink.GetArc()->FormatIndex;
+ if (!options.SetArcPath(codecs, cmdArcPath2))
+ return E_NOTIMPL;
+ }
}
}
- else
+
+ if (options.MethodMode.Type.FormatIndex < 0)
{
- /*
- if (archiveType.IsEmpty())
- throw "type of archive is not specified";
- */
+ options.MethodMode.Type.FormatIndex = codecs->FindFormatForArchiveType(kDefaultArcType);
+ if (options.MethodMode.Type.FormatIndex < 0)
+ return E_NOTIMPL;
}
+ bool thereIsInArchive = arcLink.IsOpen;
+ if (!thereIsInArchive && renameMode)
+ return E_FAIL;
+
CDirItems dirItems;
+ dirItems.Callback = callback;
+
+ CDirItem parentDirItem;
+ CDirItem *parentDirItem_Ptr = NULL;
+
+ /*
+ FStringVector requestedPaths;
+ FStringVector *requestedPaths_Ptr = NULL;
+ if (options.DeleteAfterCompressing)
+ requestedPaths_Ptr = &requestedPaths;
+ */
+
if (options.StdInMode)
{
CDirItem di;
@@ -727,28 +1187,70 @@ HRESULT UpdateArchive(
else
{
bool needScanning = false;
- for(int i = 0; i < options.Commands.Size(); i++)
+
+ if (!renameMode)
+ FOR_VECTOR (i, options.Commands)
if (options.Commands[i].ActionSet.NeedScanning())
needScanning = true;
+
if (needScanning)
{
- CEnumDirItemUpdateCallback enumCallback;
- enumCallback.Callback = callback;
RINOK(callback->StartScanning());
- FStringVector errorPaths;
- CRecordVector<DWORD> errorCodes;
- HRESULT res = EnumerateItems(censor, dirItems, &enumCallback, errorPaths, errorCodes);
- for (int i = 0; i < errorPaths.Size(); i++)
- {
- RINOK(callback->CanNotFindError(fs2us(errorPaths[i]), errorCodes[i]));
- }
+
+ dirItems.SymLinks = options.SymLinks.Val;
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ dirItems.ReadSecure = options.NtSecurity.Val;
+ #endif
+
+ dirItems.ScanAltStreams = options.AltStreams.Val;
+
+ HRESULT res = EnumerateItems(censor,
+ options.PathMode,
+ options.AddPathPrefix,
+ dirItems);
+
if (res != S_OK)
{
if (res != E_ABORT)
- errorInfo.Message = L"Scanning error";
+ errorInfo.Message = "Scanning error";
return res;
}
- RINOK(callback->FinishScanning());
+
+ RINOK(callback->FinishScanning(dirItems.Stat));
+
+ if (censor.Pairs.Size() == 1)
+ {
+ NFind::CFileInfo fi;
+ FString prefix = us2fs(censor.Pairs[0].Prefix);
+ prefix += FTEXT('.');
+ // UString prefix = censor.Pairs[0].Prefix;
+ /*
+ if (prefix.Back() == WCHAR_PATH_SEPARATOR)
+ {
+ prefix.DeleteBack();
+ }
+ */
+ if (fi.Find(prefix))
+ if (fi.IsDir())
+ {
+ parentDirItem.Size = fi.Size;
+ parentDirItem.CTime = fi.CTime;
+ parentDirItem.ATime = fi.ATime;
+ parentDirItem.MTime = fi.MTime;
+ parentDirItem.Attrib = fi.Attrib;
+ parentDirItem_Ptr = &parentDirItem;
+
+ int secureIndex = -1;
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (options.NtSecurity.Val)
+ dirItems.AddSecurityItem(prefix, secureIndex);
+ #endif
+ parentDirItem.SecureIndex = secureIndex;
+
+ parentDirItem_Ptr = &parentDirItem;
+ }
+ }
}
}
@@ -756,7 +1258,7 @@ HRESULT UpdateArchive(
bool usesTempDir = false;
#ifdef _WIN32
- NDirectory::CTempDir tempDirectory;
+ CTempDir tempDirectory;
if (options.EMailMode && options.EMailRemoveAfter)
{
tempDirectory.Create(kTempFolderPrefix);
@@ -770,8 +1272,6 @@ HRESULT UpdateArchive(
bool createTempFile = false;
- bool thereIsInArchive = arcLink.IsOpen;
-
if (!options.StdOutMode && options.UpdateArchiveItself)
{
CArchivePath &ap = options.Commands[0].ArchivePath;
@@ -782,14 +1282,15 @@ HRESULT UpdateArchive(
createTempFile = true;
ap.Temp = true;
if (!options.WorkingDir.IsEmpty())
- {
ap.TempPrefix = options.WorkingDir;
- NormalizeDirPathPrefix(ap.TempPrefix);
- }
+ else
+ ap.TempPrefix = us2fs(ap.Prefix);
+ NormalizeDirPathPrefix(ap.TempPrefix);
}
}
- for (int i = 0; i < options.Commands.Size(); i++)
+ unsigned i;
+ for (i = 0; i < options.Commands.Size(); i++)
{
CArchivePath &ap = options.Commands[i].ArchivePath;
if (usesTempDir)
@@ -805,10 +1306,10 @@ HRESULT UpdateArchive(
const FString path = us2fs(ap.GetFinalPath());
if (NFind::DoesFileOrDirExist(path))
{
- errorInfo.SystemError = 0;
- errorInfo.Message = L"The file already exists";
- errorInfo.FileName = path;
- return E_FAIL;
+ errorInfo.SystemError = ERROR_FILE_EXISTS;
+ errorInfo.Message = "The file already exists";
+ errorInfo.FileNames.Add(path);
+ return errorInfo.Get_HRESULT_Error();
}
}
}
@@ -816,13 +1317,77 @@ HRESULT UpdateArchive(
CObjectVector<CArcItem> arcItems;
if (thereIsInArchive)
{
- RINOK(EnumerateInArchiveItems(censor, arcLink.Arcs.Back(), arcItems));
+ RINOK(EnumerateInArchiveItems(
+ // options.StoreAltStreams,
+ censor, arcLink.Arcs.Back(), arcItems));
+ }
+
+ /*
+ FStringVector processedFilePaths;
+ FStringVector *processedFilePaths_Ptr = NULL;
+ if (options.DeleteAfterCompressing)
+ processedFilePaths_Ptr = &processedFilePaths;
+ */
+
+ CByteBuffer processedItems;
+ if (options.DeleteAfterCompressing)
+ {
+ unsigned num = dirItems.Items.Size();
+ processedItems.Alloc(num);
+ for (i = 0; i < num; i++)
+ processedItems[i] = 0;
+ }
+
+ /*
+ #ifndef _NO_CRYPTO
+ if (arcLink.PasswordWasAsked)
+ {
+ // We set password, if open have requested password
+ RINOK(callback->SetPassword(arcLink.Password));
+ }
+ #endif
+ */
+
+ for (i = 0; i < options.Commands.Size(); i++)
+ {
+ const CArc *arc = thereIsInArchive ? arcLink.GetArc() : NULL;
+ CUpdateArchiveCommand &command = options.Commands[i];
+ UString name;
+ bool isUpdating;
+
+ if (options.StdOutMode)
+ {
+ name.SetFromAscii("stdout");
+ isUpdating = thereIsInArchive;
+ }
+ else
+ {
+ name = command.ArchivePath.GetFinalPath();
+ isUpdating = (i == 0 && options.UpdateArchiveItself && thereIsInArchive);
+ }
+
+ RINOK(callback->StartArchive(name, isUpdating))
+
+ CFinishArchiveStat st;
+
+ RINOK(Compress(options,
+ isUpdating,
+ codecs,
+ command.ActionSet,
+ arc,
+ command.ArchivePath,
+ arcItems,
+ options.DeleteAfterCompressing ? (Byte *)processedItems : NULL,
+
+ dirItems,
+ parentDirItem_Ptr,
+
+ tempFiles,
+ errorInfo, callback, st));
+
+ RINOK(callback->FinishArchive(st));
}
- RINOK(UpdateWithItemLists(codecs, options,
- thereIsInArchive ? arcLink.GetArchive() : 0,
- arcItems, dirItems,
- tempFiles, errorInfo, callback));
if (thereIsInArchive)
{
@@ -837,21 +1402,16 @@ HRESULT UpdateArchive(
{
CArchivePath &ap = options.Commands[0].ArchivePath;
const FString &tempPath = ap.GetTempPath();
+
if (thereIsInArchive)
- if (!NDirectory::DeleteFileAlways(us2fs(arcPath)))
- {
- errorInfo.SystemError = ::GetLastError();
- errorInfo.Message = L"7-Zip cannot delete the file";
- errorInfo.FileName = us2fs(arcPath);
- return E_FAIL;
- }
- if (!NDirectory::MyMoveFile(tempPath, us2fs(arcPath)))
+ if (!DeleteFileAlways(us2fs(arcPath)))
+ return errorInfo.SetFromLastError("cannot delete the file", us2fs(arcPath));
+
+ if (!MyMoveFile(tempPath, us2fs(arcPath)))
{
- errorInfo.SystemError = ::GetLastError();
- errorInfo.Message = L"7-Zip cannot move the file";
- errorInfo.FileName = tempPath;
- errorInfo.FileName2 = us2fs(arcPath);
- return E_FAIL;
+ errorInfo.SetFromLastError("cannot move the file", tempPath);
+ errorInfo.FileNames.Add(us2fs(arcPath));
+ return errorInfo.Get_HRESULT_Error();
}
}
catch(...)
@@ -860,38 +1420,49 @@ HRESULT UpdateArchive(
}
}
+
#if defined(_WIN32) && !defined(UNDER_CE)
+
if (options.EMailMode)
{
NDLL::CLibrary mapiLib;
if (!mapiLib.Load(FTEXT("Mapi32.dll")))
{
- errorInfo.SystemError = ::GetLastError();
- errorInfo.Message = L"7-Zip cannot load Mapi32.dll";
- return E_FAIL;
+ errorInfo.SetFromLastError("cannot load Mapi32.dll");
+ return errorInfo.Get_HRESULT_Error();
}
- MY_LPMAPISENDDOCUMENTS fnSend = (MY_LPMAPISENDDOCUMENTS)mapiLib.GetProc("MAPISendDocuments");
+
+ /*
+ LPMAPISENDDOCUMENTS fnSend = (LPMAPISENDDOCUMENTS)mapiLib.GetProc("MAPISendDocuments");
if (fnSend == 0)
{
- errorInfo.SystemError = ::GetLastError();
- errorInfo.Message = L"7-Zip cannot find MAPISendDocuments function";
- return E_FAIL;
+ errorInfo.SetFromLastError)("7-Zip cannot find MAPISendDocuments function");
+ return errorInfo.Get_HRESULT_Error();
+ }
+ */
+
+ LPMAPISENDMAIL sendMail = (LPMAPISENDMAIL)mapiLib.GetProc("MAPISendMail");
+ if (sendMail == 0)
+ {
+ errorInfo.SetFromLastError("7-Zip cannot find MAPISendMail function");
+ return errorInfo.Get_HRESULT_Error();;
}
+
FStringVector fullPaths;
- int i;
+ unsigned i;
+
for (i = 0; i < options.Commands.Size(); i++)
{
CArchivePath &ap = options.Commands[i].ArchivePath;
+ FString finalPath = us2fs(ap.GetFinalPath());
FString arcPath;
- if (!NFile::NDirectory::MyGetFullPathName(us2fs(ap.GetFinalPath()), arcPath))
- {
- errorInfo.SystemError = ::GetLastError();
- errorInfo.Message = L"GetFullPathName error";
- return E_FAIL;
- }
+ if (!MyGetFullPathName(finalPath, arcPath))
+ return errorInfo.SetFromLastError("GetFullPathName error", finalPath);
fullPaths.Add(arcPath);
}
+
CCurrentDirRestorer curDirRestorer;
+
for (i = 0; i < fullPaths.Size(); i++)
{
UString arcPath = fs2us(fullPaths[i]);
@@ -899,9 +1470,86 @@ HRESULT UpdateArchive(
AString path = GetAnsiString(arcPath);
AString name = GetAnsiString(fileName);
// Warning!!! MAPISendDocuments function changes Current directory
- fnSend(0, ";", (LPSTR)(LPCSTR)path, (LPSTR)(LPCSTR)name, 0);
+ // fnSend(0, ";", (LPSTR)(LPCSTR)path, (LPSTR)(LPCSTR)name, 0);
+
+ MapiFileDesc f;
+ memset(&f, 0, sizeof(f));
+ f.nPosition = 0xFFFFFFFF;
+ f.lpszPathName = (char *)(const char *)path;
+ f.lpszFileName = (char *)(const char *)name;
+
+ MapiMessage m;
+ memset(&m, 0, sizeof(m));
+ m.nFileCount = 1;
+ m.lpFiles = &f;
+
+ const AString addr = GetAnsiString(options.EMailAddress);
+ MapiRecipDesc rec;
+ if (!addr.IsEmpty())
+ {
+ memset(&rec, 0, sizeof(rec));
+ rec.ulRecipClass = MAPI_TO;
+ rec.lpszAddress = (char *)(const char *)addr;
+ m.nRecipCount = 1;
+ m.lpRecips = &rec;
+ }
+
+ sendMail((LHANDLE)0, 0, &m, MAPI_DIALOG, 0);
}
}
+
#endif
+
+ if (options.DeleteAfterCompressing)
+ {
+ CRecordVector<CRefSortPair> pairs;
+ FStringVector foldersNames;
+
+ for (i = 0; i < dirItems.Items.Size(); i++)
+ {
+ const CDirItem &dirItem = dirItems.Items[i];
+ FString phyPath = dirItems.GetPhyPath(i);
+ if (dirItem.IsDir())
+ {
+ CRefSortPair pair;
+ pair.Index = i;
+ pair.Len = GetNumSlashes(phyPath);
+ pairs.Add(pair);
+ }
+ else
+ {
+ if (processedItems[i] != 0 || dirItem.Size == 0)
+ {
+ RINOK(callback->DeletingAfterArchiving(phyPath, false));
+ DeleteFileAlways(phyPath);
+ }
+ else
+ {
+ // file was skipped
+ /*
+ errorInfo.SystemError = 0;
+ errorInfo.Message = "file was not processed";
+ errorInfo.FileName = phyPath;
+ return E_FAIL;
+ */
+ }
+ }
+ }
+
+ pairs.Sort(CompareRefSortPair, NULL);
+
+ for (i = 0; i < pairs.Size(); i++)
+ {
+ FString phyPath = dirItems.GetPhyPath(pairs[i].Index);
+ if (NFind::DoesDirExist(phyPath))
+ {
+ RINOK(callback->DeletingAfterArchiving(phyPath, true));
+ RemoveDir(phyPath);
+ }
+ }
+
+ RINOK(callback->FinishDeletingAfterArchiving());
+ }
+
return S_OK;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/Update.h b/3rdparty/lzma/CPP/7zip/UI/Common/Update.h
index 43a3c0fdb83..0301ae7660e 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/Update.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/Update.h
@@ -3,14 +3,24 @@
#ifndef __COMMON_UPDATE_H
#define __COMMON_UPDATE_H
-#include "Common/Wildcard.h"
+#include "../../../Common/Wildcard.h"
#include "ArchiveOpenCallback.h"
#include "LoadCodecs.h"
+#include "OpenArchive.h"
#include "Property.h"
#include "UpdateAction.h"
#include "UpdateCallback.h"
+#include "DirItem.h"
+
+enum EArcNameMode
+{
+ k_ArcNameMode_Smart,
+ k_ArcNameMode_Exact,
+ k_ArcNameMode_Add,
+};
+
struct CArchivePath
{
UString OriginalPath;
@@ -26,52 +36,11 @@ struct CArchivePath
CArchivePath(): Temp(false) {};
- void ParseFromPath(const UString &path)
- {
- OriginalPath = path;
-
- SplitPathToParts(path, Prefix, Name);
- int dotPos = Name.ReverseFind(L'.');
- if (dotPos < 0)
- return;
- if (dotPos == Name.Length() - 1)
- {
- Name = Name.Left(dotPos);
- BaseExtension.Empty();
- return;
- }
- if (BaseExtension.CompareNoCase(Name.Mid(dotPos + 1)) == 0)
- {
- BaseExtension = Name.Mid(dotPos + 1);
- Name = Name.Left(dotPos);
- }
- else
- BaseExtension.Empty();
- }
-
- UString GetPathWithoutExt() const
- {
- return Prefix + Name;
- }
-
- UString GetFinalPath() const
- {
- UString path = GetPathWithoutExt();
- if (!BaseExtension.IsEmpty())
- path += UString(L'.') + BaseExtension;
- return path;
- }
-
-
- FString GetTempPath() const
- {
- FString path = TempPrefix + us2fs(Name);
- if (!BaseExtension.IsEmpty())
- path += FString(FTEXT('.')) + us2fs(BaseExtension);
- path += FTEXT(".tmp");
- path += TempPostfix;
- return path;
- }
+ void ParseFromPath(const UString &path, EArcNameMode mode);
+ UString GetPathWithoutExt() const { return Prefix + Name; }
+ UString GetFinalPath() const;
+ UString GetFinalVolPath() const;
+ FString GetTempPath() const;
};
struct CUpdateArchiveCommand
@@ -83,9 +52,31 @@ struct CUpdateArchiveCommand
struct CCompressionMethodMode
{
- int FormatIndex;
+ bool Type_Defined;
+ COpenType Type;
CObjectVector<CProperty> Properties;
- CCompressionMethodMode(): FormatIndex(-1) {}
+
+ CCompressionMethodMode(): Type_Defined(false) {}
+};
+
+namespace NRecursedType { enum EEnum
+{
+ kRecursed,
+ kWildcardOnlyRecursed,
+ kNonRecursed
+};}
+
+struct CRenamePair
+{
+ UString OldName;
+ UString NewName;
+ bool WildcardParsing;
+ NRecursedType::EEnum RecursedType;
+
+ CRenamePair(): WildcardParsing(true), RecursedType(NRecursedType::kNonRecursed) {}
+
+ bool Prepare();
+ bool GetNewPath(bool isFolder, const UString &src, UString &dest) const;
};
struct CUpdateOptions
@@ -95,7 +86,8 @@ struct CUpdateOptions
CObjectVector<CUpdateArchiveCommand> Commands;
bool UpdateArchiveItself;
CArchivePath ArchivePath;
-
+ EArcNameMode ArcNameMode;
+
bool SfxMode;
FString SfxModule;
@@ -110,8 +102,22 @@ struct CUpdateOptions
UString EMailAddress;
FString WorkingDir;
+ NWildcard::ECensorPathMode PathMode;
+ UString AddPathPrefix;
- bool Init(const CCodecs *codecs, const CIntVector &formatIndices, const UString &arcPath);
+ CBoolPair NtSecurity;
+ CBoolPair AltStreams;
+ CBoolPair HardLinks;
+ CBoolPair SymLinks;
+
+ bool DeleteAfterCompressing;
+
+ bool SetArcMTime;
+
+ CObjectVector<CRenamePair> RenamePairs;
+
+ bool InitFormatIndex(const CCodecs *codecs, const CObjectVector<COpenType> &types, const UString &arcPath);
+ bool SetArcPath(const CCodecs *codecs, const UString &arcPath);
CUpdateOptions():
UpdateArchiveItself(true),
@@ -120,56 +126,73 @@ struct CUpdateOptions
StdOutMode(false),
EMailMode(false),
EMailRemoveAfter(false),
- OpenShareForWrite(false)
+ OpenShareForWrite(false),
+ ArcNameMode(k_ArcNameMode_Smart),
+ PathMode(NWildcard::k_RelatPath),
+
+ DeleteAfterCompressing(false),
+ SetArcMTime(false)
+
{};
- void SetAddActionCommand()
+ void SetActionCommand_Add()
{
Commands.Clear();
CUpdateArchiveCommand c;
- c.ActionSet = NUpdateArchive::kAddActionSet;
+ c.ActionSet = NUpdateArchive::k_ActionSet_Add;
Commands.Add(c);
}
CRecordVector<UInt64> VolumesSizes;
};
-struct CErrorInfo
+struct CUpdateErrorInfo
{
DWORD SystemError;
- FString FileName;
- FString FileName2;
- UString Message;
- // UStringVector ErrorPaths;
- // CRecordVector<DWORD> ErrorCodes;
- CErrorInfo(): SystemError(0) {};
+ AString Message;
+ FStringVector FileNames;
+
+ bool ThereIsError() const { return SystemError != 0 || !Message.IsEmpty() || !FileNames.IsEmpty(); }
+ HRESULT Get_HRESULT_Error() const { return SystemError == 0 ? E_FAIL : HRESULT_FROM_WIN32(SystemError); }
+ void SetFromLastError(const char *message);
+ HRESULT SetFromLastError(const char *message, const FString &fileName);
+
+ CUpdateErrorInfo(): SystemError(0) {};
};
-struct CUpdateErrorInfo: public CErrorInfo
+struct CFinishArchiveStat
{
+ UInt64 OutArcFileSize;
+
+ CFinishArchiveStat(): OutArcFileSize(0) {}
};
#define INTERFACE_IUpdateCallbackUI2(x) \
INTERFACE_IUpdateCallbackUI(x) \
- virtual HRESULT OpenResult(const wchar_t *name, HRESULT result) x; \
+ INTERFACE_IDirItemsCallback(x) \
+ virtual HRESULT OpenResult(const CCodecs *codecs, const CArchiveLink &arcLink, const wchar_t *name, HRESULT result) x; \
virtual HRESULT StartScanning() x; \
- virtual HRESULT ScanProgress(UInt64 numFolders, UInt64 numFiles, const wchar_t *path) x; \
- virtual HRESULT CanNotFindError(const wchar_t *name, DWORD systemError) x; \
- virtual HRESULT FinishScanning() x; \
+ virtual HRESULT FinishScanning(const CDirItemsStat &st) x; \
+ virtual HRESULT StartOpenArchive(const wchar_t *name) x; \
virtual HRESULT StartArchive(const wchar_t *name, bool updating) x; \
- virtual HRESULT FinishArchive() x; \
+ virtual HRESULT FinishArchive(const CFinishArchiveStat &st) x; \
+ virtual HRESULT DeletingAfterArchiving(const FString &path, bool isDir) x; \
+ virtual HRESULT FinishDeletingAfterArchiving() x; \
-struct IUpdateCallbackUI2: public IUpdateCallbackUI
+struct IUpdateCallbackUI2: public IUpdateCallbackUI, public IDirItemsCallback
{
INTERFACE_IUpdateCallbackUI2(=0)
};
HRESULT UpdateArchive(
CCodecs *codecs,
- const NWildcard::CCensor &censor,
+ const CObjectVector<COpenType> &types,
+ const UString &cmdArcPath2,
+ NWildcard::CCensor &censor,
CUpdateOptions &options,
CUpdateErrorInfo &errorInfo,
IOpenCallbackUI *openCallback,
- IUpdateCallbackUI2 *callback);
+ IUpdateCallbackUI2 *callback,
+ bool needSetPath);
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateAction.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateAction.cpp
index 879a49c57db..a80db7212e1 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateAction.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateAction.cpp
@@ -6,7 +6,7 @@
namespace NUpdateArchive {
-const CActionSet kAddActionSet =
+const CActionSet k_ActionSet_Add =
{{
NPairAction::kCopy,
NPairAction::kCopy,
@@ -17,7 +17,7 @@ const CActionSet kAddActionSet =
NPairAction::kCompress
}};
-const CActionSet kUpdateActionSet =
+const CActionSet k_ActionSet_Update =
{{
NPairAction::kCopy,
NPairAction::kCopy,
@@ -28,7 +28,7 @@ const CActionSet kUpdateActionSet =
NPairAction::kCompress
}};
-const CActionSet kFreshActionSet =
+const CActionSet k_ActionSet_Fresh =
{{
NPairAction::kCopy,
NPairAction::kCopy,
@@ -39,7 +39,7 @@ const CActionSet kFreshActionSet =
NPairAction::kCompress
}};
-const CActionSet kSynchronizeActionSet =
+const CActionSet k_ActionSet_Sync =
{{
NPairAction::kCopy,
NPairAction::kIgnore,
@@ -50,7 +50,7 @@ const CActionSet kSynchronizeActionSet =
NPairAction::kCompress,
}};
-const CActionSet kDeleteActionSet =
+const CActionSet k_ActionSet_Delete =
{{
NPairAction::kCopy,
NPairAction::kIgnore,
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateAction.h b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateAction.h
index 0ac1c1080e7..bc53fcdbbb1 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateAction.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateAction.h
@@ -7,7 +7,7 @@ namespace NUpdateArchive {
namespace NPairState
{
- const int kNumValues = 7;
+ const unsigned kNumValues = 7;
enum EEnum
{
kNotMasked = 0,
@@ -34,9 +34,18 @@ namespace NUpdateArchive {
struct CActionSet
{
NPairAction::EEnum StateActions[NPairState::kNumValues];
+
+ bool IsEqualTo(const CActionSet &a) const
+ {
+ for (unsigned i = 0; i < NPairState::kNumValues; i++)
+ if (StateActions[i] != a.StateActions[i])
+ return false;
+ return true;
+ }
+
bool NeedScanning() const
{
- int i;
+ unsigned i;
for (i = 0; i < NPairState::kNumValues; i++)
if (StateActions[i] == NPairAction::kCompress)
return true;
@@ -47,11 +56,11 @@ namespace NUpdateArchive {
}
};
- extern const CActionSet kAddActionSet;
- extern const CActionSet kUpdateActionSet;
- extern const CActionSet kFreshActionSet;
- extern const CActionSet kSynchronizeActionSet;
- extern const CActionSet kDeleteActionSet;
+ extern const CActionSet k_ActionSet_Add;
+ extern const CActionSet k_ActionSet_Update;
+ extern const CActionSet k_ActionSet_Fresh;
+ extern const CActionSet k_ActionSet_Sync;
+ extern const CActionSet k_ActionSet_Delete;
}
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp
index 21146bb0a2d..6c439cfd78d 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp
@@ -2,29 +2,70 @@
#include "StdAfx.h"
-#include "Common/ComTry.h"
-#include "Common/Defs.h"
-#include "Common/IntToString.h"
-#include "Common/StringConvert.h"
+#ifndef _7ZIP_ST
+#include "../../../Windows/Synchronization.h"
+#endif
-#include "Windows/PropVariant.h"
+#include "../../../Common/ComTry.h"
+#include "../../../Common/IntToString.h"
+#include "../../../Common/StringConvert.h"
+#include "../../../Common/Wildcard.h"
-#include "../../Common/FileStreams.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/PropVariant.h"
+
+#include "../../Common/StreamObjects.h"
#include "UpdateCallback.h"
+#if defined(_WIN32) && !defined(UNDER_CE)
+#define _USE_SECURITY_CODE
+#include "../../../Windows/SecurityUtils.h"
+#endif
+
using namespace NWindows;
+using namespace NFile;
+
+#ifndef _7ZIP_ST
+static NSynchronization::CCriticalSection g_CriticalSection;
+#define MT_LOCK NSynchronization::CCriticalSectionLock lock(g_CriticalSection);
+#else
+#define MT_LOCK
+#endif
+
+
+#ifdef _USE_SECURITY_CODE
+bool InitLocalPrivileges();
+#endif
CArchiveUpdateCallback::CArchiveUpdateCallback():
- Callback(0),
- ShareForWrite(false),
- StdInMode(false),
- DirItems(0),
- ArcItems(0),
- UpdatePairs(0),
- NewNames(0),
- KeepOriginalItemNames(0)
- {}
+ _hardIndex_From((UInt32)(Int32)-1),
+
+ Callback(NULL),
+
+ DirItems(NULL),
+ ParentDirItem(NULL),
+
+ Arc(NULL),
+ ArcItems(NULL),
+ UpdatePairs(NULL),
+ NewNames(NULL),
+
+ ShareForWrite(false),
+ StdInMode(false),
+
+ KeepOriginalItemNames(false),
+ StoreNtSecurity(false),
+ StoreHardLinks(false),
+ StoreSymLinks(false),
+
+ ProcessedItemsStatuses(NULL)
+{
+ #ifdef _USE_SECURITY_CODE
+ _saclEnabled = InitLocalPrivileges();
+ #endif
+}
STDMETHODIMP CArchiveUpdateCallback::SetTotal(UInt64 size)
@@ -50,7 +91,7 @@ STDMETHODIMP CArchiveUpdateCallback::SetRatioInfo(const UInt64 *inSize, const UI
/*
-STATPROPSTG kProperties[] =
+static const CStatProp kProps[] =
{
{ NULL, kpidPath, VT_BSTR},
{ NULL, kpidIsDir, VT_BOOL},
@@ -64,7 +105,7 @@ STATPROPSTG kProperties[] =
STDMETHODIMP CArchiveUpdateCallback::EnumProperties(IEnumSTATPROPSTG **)
{
- return CStatPropEnumerator::CreateEnumerator(kProperties, sizeof(kProperties) / sizeof(kProperties[0]), enumerator);
+ return CStatPropEnumerator::CreateEnumerator(kProps, ARRAY_SIZE(kProps), enumerator);
}
*/
@@ -74,11 +115,11 @@ STDMETHODIMP CArchiveUpdateCallback::GetUpdateItemInfo(UInt32 index,
COM_TRY_BEGIN
RINOK(Callback->CheckBreak());
const CUpdatePair2 &up = (*UpdatePairs)[index];
- if (newData != NULL) *newData = BoolToInt(up.NewData);
- if (newProps != NULL) *newProps = BoolToInt(up.NewProps);
- if (indexInArchive != NULL)
+ if (newData) *newData = BoolToInt(up.NewData);
+ if (newProps) *newProps = BoolToInt(up.NewProps);
+ if (indexInArchive)
{
- *indexInArchive = (UInt32)-1;
+ *indexInArchive = (UInt32)(Int32)-1;
if (up.ExistInArchive())
*indexInArchive = (ArcItems == 0) ? up.ArcIndex : (*ArcItems)[up.ArcIndex].IndexInServer;
}
@@ -86,84 +127,300 @@ STDMETHODIMP CArchiveUpdateCallback::GetUpdateItemInfo(UInt32 index,
COM_TRY_END
}
-STDMETHODIMP CArchiveUpdateCallback::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value)
+STDMETHODIMP CArchiveUpdateCallback::GetRootProp(PROPID propID, PROPVARIANT *value)
{
- COM_TRY_BEGIN
- const CUpdatePair2 &up = (*UpdatePairs)[index];
- NWindows::NCOM::CPropVariant prop;
-
- if (propID == kpidIsAnti)
+ NCOM::CPropVariant prop;
+ switch (propID)
{
- prop = up.IsAnti;
- prop.Detach(value);
- return S_OK;
+ case kpidIsDir: prop = true; break;
+ case kpidAttrib: if (ParentDirItem) prop = ParentDirItem->Attrib; break;
+ case kpidCTime: if (ParentDirItem) prop = ParentDirItem->CTime; break;
+ case kpidATime: if (ParentDirItem) prop = ParentDirItem->ATime; break;
+ case kpidMTime: if (ParentDirItem) prop = ParentDirItem->MTime; break;
}
+ prop.Detach(value);
+ return S_OK;
+}
- if (up.IsAnti)
+STDMETHODIMP CArchiveUpdateCallback::GetParent(UInt32 /* index */, UInt32 *parent, UInt32 *parentType)
+{
+ *parentType = NParentType::kDir;
+ *parent = (UInt32)(Int32)-1;
+ return S_OK;
+}
+
+STDMETHODIMP CArchiveUpdateCallback::GetNumRawProps(UInt32 *numProps)
+{
+ *numProps = 0;
+ if (StoreNtSecurity)
+ *numProps = 1;
+ return S_OK;
+}
+
+STDMETHODIMP CArchiveUpdateCallback::GetRawPropInfo(UInt32 /* index */, BSTR *name, PROPID *propID)
+{
+ *name = NULL;
+ *propID = kpidNtSecure;
+ return S_OK;
+}
+
+STDMETHODIMP CArchiveUpdateCallback::GetRootRawProp(PROPID
+ #ifdef _USE_SECURITY_CODE
+ propID
+ #endif
+ , const void **data, UInt32 *dataSize, UInt32 *propType)
+{
+ *data = 0;
+ *dataSize = 0;
+ *propType = 0;
+ if (!StoreNtSecurity)
+ return S_OK;
+ #ifdef _USE_SECURITY_CODE
+ if (propID == kpidNtSecure)
{
- switch(propID)
+ if (StdInMode)
+ return S_OK;
+
+ if (ParentDirItem)
{
- case kpidIsDir:
- case kpidPath:
- break;
- case kpidSize:
- prop = (UInt64)0;
- prop.Detach(value);
+ if (ParentDirItem->SecureIndex < 0)
return S_OK;
- default:
- prop.Detach(value);
+ const CByteBuffer &buf = DirItems->SecureBlocks.Bufs[ParentDirItem->SecureIndex];
+ *data = buf;
+ *dataSize = (UInt32)buf.Size();
+ *propType = NPropDataType::kRaw;
+ return S_OK;
+ }
+
+ if (Arc && Arc->GetRootProps)
+ return Arc->GetRootProps->GetRootRawProp(propID, data, dataSize, propType);
+ }
+ #endif
+ return S_OK;
+}
+
+// #ifdef _USE_SECURITY_CODE
+// #endif
+
+STDMETHODIMP CArchiveUpdateCallback::GetRawProp(UInt32 index, PROPID propID, const void **data, UInt32 *dataSize, UInt32 *propType)
+{
+ *data = 0;
+ *dataSize = 0;
+ *propType = 0;
+
+ if (propID == kpidNtSecure ||
+ propID == kpidNtReparse)
+ {
+ if (StdInMode)
+ return S_OK;
+
+ const CUpdatePair2 &up = (*UpdatePairs)[index];
+ if (up.UseArcProps && up.ExistInArchive() && Arc->GetRawProps)
+ return Arc->GetRawProps->GetRawProp(
+ ArcItems ? (*ArcItems)[up.ArcIndex].IndexInServer : up.ArcIndex,
+ propID, data, dataSize, propType);
+
+ {
+ const CUpdatePair2 &up = (*UpdatePairs)[index];
+ /*
+ if (!up.NewData)
+ return E_FAIL;
+ */
+ if (up.IsAnti)
return S_OK;
+
+ #ifndef UNDER_CE
+ const CDirItem &di = DirItems->Items[up.DirIndex];
+ #endif
+
+ #ifdef _USE_SECURITY_CODE
+ if (propID == kpidNtSecure)
+ {
+ if (!StoreNtSecurity)
+ return S_OK;
+ if (di.SecureIndex < 0)
+ return S_OK;
+ const CByteBuffer &buf = DirItems->SecureBlocks.Bufs[di.SecureIndex];
+ *data = buf;
+ *dataSize = (UInt32)buf.Size();
+ *propType = NPropDataType::kRaw;
+ }
+ else
+ #endif
+ {
+ // propID == kpidNtReparse
+ if (!StoreSymLinks)
+ return S_OK;
+ #ifndef UNDER_CE
+ const CByteBuffer *buf = &di.ReparseData2;
+ if (buf->Size() == 0)
+ buf = &di.ReparseData;
+ if (buf->Size() != 0)
+ {
+ *data = *buf;
+ *dataSize = (UInt32)buf->Size();
+ *propType = NPropDataType::kRaw;
+ }
+ #endif
+ }
+
+ return S_OK;
}
}
+
+ return S_OK;
+}
+
+#ifndef UNDER_CE
+
+static UString GetRelativePath(const UString &to, const UString &from)
+{
+ UStringVector partsTo, partsFrom;
+ SplitPathToParts(to, partsTo);
+ SplitPathToParts(from, partsFrom);
+
+ unsigned i;
+ for (i = 0;; i++)
+ {
+ if (i + 1 >= partsFrom.Size() ||
+ i + 1 >= partsTo.Size())
+ break;
+ if (CompareFileNames(partsFrom[i], partsTo[i]) != 0)
+ break;
+ }
+
+ if (i == 0)
+ {
+ #ifdef _WIN32
+ if (NName::IsDrivePath(to) ||
+ NName::IsDrivePath(from))
+ return to;
+ #endif
+ }
+
+ UString s;
+ unsigned k;
+
+ for (k = i + 1; k < partsFrom.Size(); k++)
+ s += L".." WSTRING_PATH_SEPARATOR;
- if (up.ExistOnDisk())
+ for (k = i; k < partsTo.Size(); k++)
{
- const CDirItem &di = DirItems->Items[up.DirIndex];
- switch(propID)
+ if (k != i)
+ s.Add_PathSepar();
+ s += partsTo[k];
+ }
+
+ return s;
+}
+
+#endif
+
+STDMETHODIMP CArchiveUpdateCallback::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value)
+{
+ COM_TRY_BEGIN
+ const CUpdatePair2 &up = (*UpdatePairs)[index];
+ NCOM::CPropVariant prop;
+
+ if (up.NewData)
+ {
+ /*
+ if (propID == kpidIsHardLink)
+ {
+ prop = _isHardLink;
+ prop.Detach(value);
+ return S_OK;
+ }
+ */
+ if (propID == kpidSymLink)
{
- case kpidPath:
+ if (index == _hardIndex_From)
+ {
+ prop.Detach(value);
+ return S_OK;
+ }
+ if (up.DirIndex >= 0)
+ {
+ #ifndef UNDER_CE
+ const CDirItem &di = DirItems->Items[up.DirIndex];
+ // if (di.IsDir())
{
- if (KeepOriginalItemNames)
+ CReparseAttr attr;
+ if (attr.Parse(di.ReparseData, di.ReparseData.Size()))
{
- if (up.ExistInArchive() && Archive)
+ UString simpleName = attr.GetPath();
+ if (attr.IsRelative())
+ prop = simpleName;
+ else
{
- UInt32 indexInArchive;
- if (ArcItems == 0)
- indexInArchive = up.ArcIndex;
- else
- indexInArchive = (*ArcItems)[up.ArcIndex].IndexInServer;
- return Archive->GetProperty(indexInArchive, propID, value);
+ const FString phyPath = DirItems->GetPhyPath(up.DirIndex);
+ FString fullPath;
+ if (NDir::MyGetFullPathName(phyPath, fullPath))
+ {
+ prop = GetRelativePath(simpleName, fs2us(fullPath));
+ }
}
+ prop.Detach(value);
+ return S_OK;
}
- prop = DirItems->GetLogPath(up.DirIndex); break;
}
- case kpidIsDir: prop = di.IsDir(); break;
- case kpidSize: prop = di.Size; break;
- case kpidAttrib: prop = di.Attrib; break;
- case kpidCTime: prop = di.CTime; break;
- case kpidATime: prop = di.ATime; break;
- case kpidMTime: prop = di.MTime; break;
+ #endif
+ }
}
- }
- else
- {
- if (propID == kpidPath)
+ else if (propID == kpidHardLink)
{
- if (up.NewNameIndex >= 0)
+ if (index == _hardIndex_From)
+ {
+ const CKeyKeyValPair &pair = _map[_hardIndex_To];
+ const CUpdatePair2 &up2 = (*UpdatePairs)[pair.Value];
+ prop = DirItems->GetLogPath(up2.DirIndex);
+ prop.Detach(value);
+ return S_OK;
+ }
+ if (up.DirIndex >= 0)
{
- prop = (*NewNames)[up.NewNameIndex];
prop.Detach(value);
return S_OK;
}
}
- if (up.ExistInArchive() && Archive)
+ }
+
+ if (up.IsAnti
+ && propID != kpidIsDir
+ && propID != kpidPath
+ && propID != kpidIsAltStream)
+ {
+ switch (propID)
{
- UInt32 indexInArchive;
- if (ArcItems == 0)
- indexInArchive = up.ArcIndex;
- else
- indexInArchive = (*ArcItems)[up.ArcIndex].IndexInServer;
- return Archive->GetProperty(indexInArchive, propID, value);
+ case kpidSize: prop = (UInt64)0; break;
+ case kpidIsAnti: prop = true; break;
+ }
+ }
+ else if (propID == kpidPath && up.NewNameIndex >= 0)
+ prop = (*NewNames)[up.NewNameIndex];
+ else if (propID == kpidShortName && up.NewNameIndex >= 0 && up.IsMainRenameItem)
+ {
+ // we can generate new ShortName here;
+ }
+ else if ((up.UseArcProps || (KeepOriginalItemNames && (propID == kpidPath || propID == kpidIsAltStream)))
+ && up.ExistInArchive() && Archive)
+ return Archive->GetProperty(ArcItems ? (*ArcItems)[up.ArcIndex].IndexInServer : up.ArcIndex, propID, value);
+ else if (up.ExistOnDisk())
+ {
+ const CDirItem &di = DirItems->Items[up.DirIndex];
+ switch (propID)
+ {
+ case kpidPath: prop = DirItems->GetLogPath(up.DirIndex); break;
+ case kpidIsDir: prop = di.IsDir(); break;
+ case kpidSize: prop = di.IsDir() ? (UInt64)0 : di.Size; break;
+ case kpidAttrib: prop = di.Attrib; break;
+ case kpidCTime: prop = di.CTime; break;
+ case kpidATime: prop = di.ATime; break;
+ case kpidMTime: prop = di.MTime; break;
+ case kpidIsAltStream: prop = di.IsAltStream; break;
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ // case kpidShortName: prop = di.ShortName; break;
+ #endif
}
}
prop.Detach(value);
@@ -171,28 +428,56 @@ STDMETHODIMP CArchiveUpdateCallback::GetProperty(UInt32 index, PROPID propID, PR
COM_TRY_END
}
-STDMETHODIMP CArchiveUpdateCallback::GetStream(UInt32 index, ISequentialInStream **inStream)
+#ifndef _7ZIP_ST
+static NSynchronization::CCriticalSection CS;
+#endif
+
+STDMETHODIMP CArchiveUpdateCallback::GetStream2(UInt32 index, ISequentialInStream **inStream, UInt32 mode)
{
COM_TRY_BEGIN
+ *inStream = NULL;
const CUpdatePair2 &up = (*UpdatePairs)[index];
if (!up.NewData)
return E_FAIL;
RINOK(Callback->CheckBreak());
- RINOK(Callback->Finilize());
+ // RINOK(Callback->Finalize());
+
+ bool isDir = IsDir(up);
if (up.IsAnti)
{
- return Callback->GetStream((*ArcItems)[up.ArcIndex].Name, true);
+ UString name;
+ if (up.ArcIndex >= 0)
+ name = (*ArcItems)[up.ArcIndex].Name;
+ else if (up.DirIndex >= 0)
+ name = DirItems->GetLogPath(up.DirIndex);
+ RINOK(Callback->GetStream(name, isDir, true, mode));
+
+ /* 9.33: fixed. Handlers expect real stream object for files, even for anti-file.
+ so we return empty stream */
+
+ if (!isDir)
+ {
+ CBufInStream *inStreamSpec = new CBufInStream();
+ CMyComPtr<ISequentialInStream> inStreamLoc = inStreamSpec;
+ inStreamSpec->Init(NULL, 0);
+ *inStream = inStreamLoc.Detach();
+ }
+ return S_OK;
}
- const CDirItem &di = DirItems->Items[up.DirIndex];
- RINOK(Callback->GetStream(DirItems->GetLogPath(up.DirIndex), false));
+
+ RINOK(Callback->GetStream(DirItems->GetLogPath(up.DirIndex), isDir, false, mode));
- if (di.IsDir())
+ if (isDir)
return S_OK;
if (StdInMode)
{
+ if (mode != NUpdateNotifyOp::kAdd &&
+ mode != NUpdateNotifyOp::kUpdate)
+ return S_OK;
+
CStdInFileStream *inStreamSpec = new CStdInFileStream;
CMyComPtr<ISequentialInStream> inStreamLoc(inStreamSpec);
*inStream = inStreamLoc.Detach();
@@ -201,21 +486,196 @@ STDMETHODIMP CArchiveUpdateCallback::GetStream(UInt32 index, ISequentialInStream
{
CInFileStream *inStreamSpec = new CInFileStream;
CMyComPtr<ISequentialInStream> inStreamLoc(inStreamSpec);
- const UString path = DirItems->GetPhyPath(up.DirIndex);
- if (!inStreamSpec->OpenShared(us2fs(path), ShareForWrite))
+
+ inStreamSpec->SupportHardLinks = StoreHardLinks;
+ inStreamSpec->Callback = this;
+ inStreamSpec->CallbackRef = index;
+
+ const FString path = DirItems->GetPhyPath(up.DirIndex);
+ _openFiles_Indexes.Add(index);
+ _openFiles_Paths.Add(path);
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (DirItems->Items[up.DirIndex].AreReparseData())
+ {
+ if (!inStreamSpec->File.OpenReparse(path))
+ {
+ return Callback->OpenFileError(path, ::GetLastError());
+ }
+ }
+ else
+ #endif
+ if (!inStreamSpec->OpenShared(path, ShareForWrite))
{
return Callback->OpenFileError(path, ::GetLastError());
}
+
+ if (StoreHardLinks)
+ {
+ CStreamFileProps props;
+ if (inStreamSpec->GetProps2(&props) == S_OK)
+ {
+ if (props.NumLinks > 1)
+ {
+ CKeyKeyValPair pair;
+ pair.Key1 = props.VolID;
+ pair.Key2 = props.FileID_Low;
+ pair.Value = index;
+ unsigned numItems = _map.Size();
+ unsigned pairIndex = _map.AddToUniqueSorted2(pair);
+ if (numItems == _map.Size())
+ {
+ // const CKeyKeyValPair &pair2 = _map.Pairs[pairIndex];
+ _hardIndex_From = index;
+ _hardIndex_To = pairIndex;
+ // we could return NULL as stream, but it's better to return real stream
+ // return S_OK;
+ }
+ }
+ }
+ }
+
+ if (ProcessedItemsStatuses)
+ {
+ #ifndef _7ZIP_ST
+ NSynchronization::CCriticalSectionLock lock(CS);
+ #endif
+ ProcessedItemsStatuses[(unsigned)up.DirIndex] = 1;
+ }
*inStream = inStreamLoc.Detach();
}
+
return S_OK;
COM_TRY_END
}
-STDMETHODIMP CArchiveUpdateCallback::SetOperationResult(Int32 operationResult)
+STDMETHODIMP CArchiveUpdateCallback::SetOperationResult(Int32 opRes)
+{
+ COM_TRY_BEGIN
+ return Callback->SetOperationResult(opRes);
+ COM_TRY_END
+}
+
+STDMETHODIMP CArchiveUpdateCallback::GetStream(UInt32 index, ISequentialInStream **inStream)
{
COM_TRY_BEGIN
- return Callback->SetOperationResult(operationResult);
+ return GetStream2(index, inStream,
+ (*UpdatePairs)[index].ArcIndex < 0 ?
+ NUpdateNotifyOp::kAdd :
+ NUpdateNotifyOp::kUpdate);
+ COM_TRY_END
+}
+
+STDMETHODIMP CArchiveUpdateCallback::ReportOperation(UInt32 indexType, UInt32 index, UInt32 op)
+{
+ COM_TRY_BEGIN
+
+ bool isDir = false;
+
+ if (indexType == NArchive::NEventIndexType::kOutArcIndex)
+ {
+ UString name;
+ if (index != (UInt32)(Int32)-1)
+ {
+ const CUpdatePair2 &up = (*UpdatePairs)[index];
+ if (up.ExistOnDisk())
+ {
+ name = DirItems->GetLogPath(up.DirIndex);
+ isDir = DirItems->Items[up.DirIndex].IsDir();
+ }
+ }
+ return Callback->ReportUpdateOpeartion(op, name.IsEmpty() ? NULL : name.Ptr(), isDir);
+ }
+
+ wchar_t temp[16];
+ UString s2;
+ const wchar_t *s = NULL;
+
+ if (indexType == NArchive::NEventIndexType::kInArcIndex)
+ {
+ if (index != (UInt32)(Int32)-1)
+ {
+ if (ArcItems)
+ {
+ const CArcItem &ai = (*ArcItems)[index];
+ s = ai.Name;
+ isDir = ai.IsDir;
+ }
+ else if (Arc)
+ {
+ RINOK(Arc->GetItemPath(index, s2));
+ s = s2;
+ RINOK(Archive_IsItem_Dir(Arc->Archive, index, isDir));
+ }
+ }
+ }
+ else if (indexType == NArchive::NEventIndexType::kBlockIndex)
+ {
+ temp[0] = '#';
+ ConvertUInt32ToString(index, temp + 1);
+ s = temp;
+ }
+
+ if (!s)
+ s = L"";
+
+ return Callback->ReportUpdateOpeartion(op, s, isDir);
+
+ COM_TRY_END
+}
+
+STDMETHODIMP CArchiveUpdateCallback::ReportExtractResult(UInt32 indexType, UInt32 index, Int32 opRes)
+{
+ COM_TRY_BEGIN
+
+ bool isEncrypted = false;
+ wchar_t temp[16];
+ UString s2;
+ const wchar_t *s = NULL;
+
+ if (indexType == NArchive::NEventIndexType::kOutArcIndex)
+ {
+ /*
+ UString name;
+ if (index != (UInt32)(Int32)-1)
+ {
+ const CUpdatePair2 &up = (*UpdatePairs)[index];
+ if (up.ExistOnDisk())
+ {
+ s2 = DirItems->GetLogPath(up.DirIndex);
+ s = s2;
+ }
+ }
+ */
+ return E_FAIL;
+ }
+
+ if (indexType == NArchive::NEventIndexType::kInArcIndex)
+ {
+ if (index != (UInt32)(Int32)-1)
+ {
+ if (ArcItems)
+ s = (*ArcItems)[index].Name;
+ else if (Arc)
+ {
+ RINOK(Arc->GetItemPath(index, s2));
+ s = s2;
+ }
+ if (Archive)
+ {
+ RINOK(Archive_GetItemBoolProp(Archive, index, kpidEncrypted, isEncrypted));
+ }
+ }
+ }
+ else if (indexType == NArchive::NEventIndexType::kBlockIndex)
+ {
+ temp[0] = '#';
+ ConvertUInt32ToString(index, temp + 1);
+ s = temp;
+ }
+
+ return Callback->ReportExtractResult(opRes, BoolToInt(isEncrypted), s);
+
COM_TRY_END
}
@@ -235,10 +695,10 @@ STDMETHODIMP CArchiveUpdateCallback::GetVolumeStream(UInt32 index, ISequentialOu
FChar temp[16];
ConvertUInt32ToString(index + 1, temp);
FString res = temp;
- while (res.Length() < 2)
- res = FString(FTEXT('0')) + res;
+ while (res.Len() < 2)
+ res.InsertAtFront(FTEXT('0'));
FString fileName = VolName;
- fileName += L'.';
+ fileName += FTEXT('.');
fileName += res;
fileName += VolExt;
COutFileStream *streamSpec = new COutFileStream;
@@ -263,3 +723,37 @@ STDMETHODIMP CArchiveUpdateCallback::CryptoGetTextPassword(BSTR *password)
return Callback->CryptoGetTextPassword(password);
COM_TRY_END
}
+
+HRESULT CArchiveUpdateCallback::InFileStream_On_Error(UINT_PTR val, DWORD error)
+{
+ if (error == ERROR_LOCK_VIOLATION)
+ {
+ MT_LOCK
+ UInt32 index = (UInt32)val;
+ FOR_VECTOR(i, _openFiles_Indexes)
+ {
+ if (_openFiles_Indexes[i] == index)
+ {
+ RINOK(Callback->ReadingFileError(_openFiles_Paths[i], error));
+ break;
+ }
+ }
+ }
+ return HRESULT_FROM_WIN32(error);
+}
+
+void CArchiveUpdateCallback::InFileStream_On_Destroy(UINT_PTR val)
+{
+ MT_LOCK
+ UInt32 index = (UInt32)val;
+ FOR_VECTOR(i, _openFiles_Indexes)
+ {
+ if (_openFiles_Indexes[i] == index)
+ {
+ _openFiles_Indexes.Delete(i);
+ _openFiles_Paths.Delete(i);
+ return;
+ }
+ }
+ throw 20141125;
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateCallback.h b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateCallback.h
index 09f1c0d3705..4ff4a7ebe1d 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateCallback.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateCallback.h
@@ -1,10 +1,11 @@
// UpdateCallback.h
-#ifndef __UPDATECALLBACK_H
-#define __UPDATECALLBACK_H
+#ifndef __UPDATE_CALLBACK_H
+#define __UPDATE_CALLBACK_H
-#include "Common/MyCom.h"
-#include "Common/MyString.h"
+#include "../../../Common/MyCom.h"
+
+#include "../../Common/FileStreams.h"
#include "../../IPassword.h"
#include "../../ICoder.h"
@@ -12,64 +13,135 @@
#include "../Common/UpdatePair.h"
#include "../Common/UpdateProduce.h"
+#include "OpenArchive.h"
+
#define INTERFACE_IUpdateCallbackUI(x) \
+ virtual HRESULT WriteSfx(const wchar_t *name, UInt64 size) x; \
virtual HRESULT SetTotal(UInt64 size) x; \
virtual HRESULT SetCompleted(const UInt64 *completeValue) x; \
virtual HRESULT SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) x; \
virtual HRESULT CheckBreak() x; \
- virtual HRESULT Finilize() x; \
- virtual HRESULT SetNumFiles(UInt64 numFiles) x; \
- virtual HRESULT GetStream(const wchar_t *name, bool isAnti) x; \
- virtual HRESULT OpenFileError(const wchar_t *name, DWORD systemError) x; \
- virtual HRESULT SetOperationResult(Int32 operationResult) x; \
+ /* virtual HRESULT Finalize() x; */ \
+ virtual HRESULT SetNumItems(UInt64 numItems) x; \
+ virtual HRESULT GetStream(const wchar_t *name, bool isDir, bool isAnti, UInt32 mode) x; \
+ virtual HRESULT OpenFileError(const FString &path, DWORD systemError) x; \
+ virtual HRESULT ReadingFileError(const FString &path, DWORD systemError) x; \
+ virtual HRESULT SetOperationResult(Int32 opRes) x; \
+ virtual HRESULT ReportExtractResult(Int32 opRes, Int32 isEncrypted, const wchar_t *name) x; \
+ virtual HRESULT ReportUpdateOpeartion(UInt32 op, const wchar_t *name, bool isDir) x; \
+ /* virtual HRESULT SetPassword(const UString &password) x; */ \
virtual HRESULT CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) x; \
virtual HRESULT CryptoGetTextPassword(BSTR *password) x; \
- /* virtual HRESULT ShowDeleteFile(const wchar_t *name) x; */ \
- /* virtual HRESULT CloseProgress() { return S_OK; }; */
+ virtual HRESULT ShowDeleteFile(const wchar_t *name, bool isDir) x; \
+ /* virtual HRESULT CloseProgress() { return S_OK; } */
struct IUpdateCallbackUI
{
INTERFACE_IUpdateCallbackUI(=0)
};
+struct CKeyKeyValPair
+{
+ UInt64 Key1;
+ UInt64 Key2;
+ unsigned Value;
+
+ int Compare(const CKeyKeyValPair &a) const
+ {
+ if (Key1 < a.Key1) return -1;
+ if (Key1 > a.Key1) return 1;
+ return MyCompare(Key2, a.Key2);
+ }
+};
+
+
class CArchiveUpdateCallback:
public IArchiveUpdateCallback2,
+ public IArchiveUpdateCallbackFile,
+ public IArchiveExtractCallbackMessage,
+ public IArchiveGetRawProps,
+ public IArchiveGetRootProps,
public ICryptoGetTextPassword2,
public ICryptoGetTextPassword,
public ICompressProgressInfo,
+ public IInFileStream_Callback,
public CMyUnknownImp
{
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ bool _saclEnabled;
+ #endif
+ CRecordVector<CKeyKeyValPair> _map;
+
+ UInt32 _hardIndex_From;
+ UInt32 _hardIndex_To;
+
public:
- MY_UNKNOWN_IMP4(
- IArchiveUpdateCallback2,
- ICryptoGetTextPassword2,
- ICryptoGetTextPassword,
- ICompressProgressInfo)
+ MY_QUERYINTERFACE_BEGIN2(IArchiveUpdateCallback2)
+ MY_QUERYINTERFACE_ENTRY(IArchiveUpdateCallbackFile)
+ MY_QUERYINTERFACE_ENTRY(IArchiveExtractCallbackMessage)
+ MY_QUERYINTERFACE_ENTRY(IArchiveGetRawProps)
+ MY_QUERYINTERFACE_ENTRY(IArchiveGetRootProps)
+ MY_QUERYINTERFACE_ENTRY(ICryptoGetTextPassword2)
+ MY_QUERYINTERFACE_ENTRY(ICryptoGetTextPassword)
+ MY_QUERYINTERFACE_ENTRY(ICompressProgressInfo)
+ MY_QUERYINTERFACE_END
+ MY_ADDREF_RELEASE
+
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
INTERFACE_IArchiveUpdateCallback2(;)
+ INTERFACE_IArchiveUpdateCallbackFile(;)
+ INTERFACE_IArchiveExtractCallbackMessage(;)
+ INTERFACE_IArchiveGetRawProps(;)
+ INTERFACE_IArchiveGetRootProps(;)
STDMETHOD(CryptoGetTextPassword2)(Int32 *passwordIsDefined, BSTR *password);
STDMETHOD(CryptoGetTextPassword)(BSTR *password);
-public:
+ CRecordVector<UInt32> _openFiles_Indexes;
+ FStringVector _openFiles_Paths;
+
+ bool AreAllFilesClosed() const { return _openFiles_Indexes.IsEmpty(); }
+ virtual HRESULT InFileStream_On_Error(UINT_PTR val, DWORD error);
+ virtual void InFileStream_On_Destroy(UINT_PTR val);
+
CRecordVector<UInt64> VolumesSizes;
FString VolName;
FString VolExt;
IUpdateCallbackUI *Callback;
- bool ShareForWrite;
- bool StdInMode;
const CDirItems *DirItems;
+ const CDirItem *ParentDirItem;
+
+ const CArc *Arc;
+ CMyComPtr<IInArchive> Archive;
const CObjectVector<CArcItem> *ArcItems;
const CRecordVector<CUpdatePair2> *UpdatePairs;
const UStringVector *NewNames;
- CMyComPtr<IInArchive> Archive;
+
+ bool ShareForWrite;
+ bool StdInMode;
+
bool KeepOriginalItemNames;
+ bool StoreNtSecurity;
+ bool StoreHardLinks;
+ bool StoreSymLinks;
+
+ Byte *ProcessedItemsStatuses;
+
CArchiveUpdateCallback();
+
+ bool IsDir(const CUpdatePair2 &up) const
+ {
+ if (up.DirIndex >= 0)
+ return DirItems->Items[up.DirIndex].IsDir();
+ else if (up.ArcIndex >= 0)
+ return (*ArcItems)[up.ArcIndex].IsDir;
+ return false;
+ }
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/UpdatePair.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/UpdatePair.cpp
index a43a9e77055..e21151974be 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/UpdatePair.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/UpdatePair.cpp
@@ -4,10 +4,9 @@
#include <time.h>
-#include "Common/Defs.h"
-#include "Common/Wildcard.h"
+#include "../../../Common/Wildcard.h"
-#include "Windows/Time.h"
+#include "../../../Windows/TimeUtils.h"
#include "SortUtils.h"
#include "UpdatePair.h"
@@ -17,7 +16,7 @@ using namespace NTime;
static int MyCompareTime(NFileTimeType::EEnum fileTimeType, const FILETIME &time1, const FILETIME &time2)
{
- switch(fileTimeType)
+ switch (fileTimeType)
{
case NFileTimeType::kWindows:
return ::CompareFileTime(&time1, &time2);
@@ -39,24 +38,38 @@ static int MyCompareTime(NFileTimeType::EEnum fileTimeType, const FILETIME &time
throw 4191618;
}
-static const wchar_t *kDuplicateFileNameMessage = L"Duplicate filename:";
-static const wchar_t *kNotCensoredCollisionMessaged = L"Internal file name collision (file on disk, file in archive):";
+static const char *k_Duplicate_inArc_Message = "Duplicate filename in archive:";
+static const char *k_Duplicate_inDir_Message = "Duplicate filename on disk:";
+static const char *k_NotCensoredCollision_Message = "Internal file name collision (file on disk, file in archive):";
-static void ThrowError(const UString &message, const UString &s1, const UString &s2)
+static void ThrowError(const char *message, const UString &s1, const UString &s2)
{
- UString m = message;
- m += L'\n';
- m += s1;
- m += L'\n';
- m += s2;
+ UString m;
+ m.SetFromAscii(message);
+ m.Add_LF(); m += s1;
+ m.Add_LF(); m += s2;
throw m;
}
-static void TestDuplicateString(const UStringVector &strings, const CIntVector &indices)
+static int CompareArcItemsBase(const CArcItem &ai1, const CArcItem &ai2)
{
- for(int i = 0; i + 1 < indices.Size(); i++)
- if (CompareFileNames(strings[indices[i]], strings[indices[i + 1]]) == 0)
- ThrowError(kDuplicateFileNameMessage, strings[indices[i]], strings[indices[i + 1]]);
+ int res = CompareFileNames(ai1.Name, ai2.Name);
+ if (res != 0)
+ return res;
+ if (ai1.IsDir != ai2.IsDir)
+ return ai1.IsDir ? -1 : 1;
+ return 0;
+}
+
+static int CompareArcItems(const unsigned *p1, const unsigned *p2, void *param)
+{
+ unsigned i1 = *p1;
+ unsigned i2 = *p2;
+ const CObjectVector<CArcItem> &arcItems = *(const CObjectVector<CArcItem> *)param;
+ int res = CompareArcItemsBase(arcItems[i1], arcItems[i2]);
+ if (res != 0)
+ return res;
+ return MyCompare(i1, i2);
}
void GetUpdatePairInfoList(
@@ -65,48 +78,104 @@ void GetUpdatePairInfoList(
NFileTimeType::EEnum fileTimeType,
CRecordVector<CUpdatePair> &updatePairs)
{
- CIntVector dirIndices, arcIndices;
-
- int numDirItems = dirItems.Items.Size();
- int numArcItems = arcItems.Size();
+ CUIntVector dirIndices, arcIndices;
+ unsigned numDirItems = dirItems.Items.Size();
+ unsigned numArcItems = arcItems.Size();
+ CIntArr duplicatedArcItem(numArcItems);
{
- UStringVector arcNames;
- arcNames.Reserve(numArcItems);
- for (int i = 0; i < numArcItems; i++)
- arcNames.Add(arcItems[i].Name);
- SortFileNames(arcNames, arcIndices);
- TestDuplicateString(arcNames, arcIndices);
+ int *vals = &duplicatedArcItem[0];
+ for (unsigned i = 0; i < numArcItems; i++)
+ vals[i] = 0;
+ }
+
+ {
+ arcIndices.ClearAndSetSize(numArcItems);
+ if (numArcItems != 0)
+ {
+ unsigned *vals = &arcIndices[0];
+ for (unsigned i = 0; i < numArcItems; i++)
+ vals[i] = i;
+ }
+ arcIndices.Sort(CompareArcItems, (void *)&arcItems);
+ for (unsigned i = 0; i + 1 < numArcItems; i++)
+ if (CompareArcItemsBase(
+ arcItems[arcIndices[i]],
+ arcItems[arcIndices[i + 1]]) == 0)
+ {
+ duplicatedArcItem[i] = 1;
+ duplicatedArcItem[i + 1] = -1;
+ }
}
UStringVector dirNames;
{
- dirNames.Reserve(numDirItems);
- for (int i = 0; i < numDirItems; i++)
- dirNames.Add(dirItems.GetLogPath(i));
+ dirNames.ClearAndReserve(numDirItems);
+ unsigned i;
+ for (i = 0; i < numDirItems; i++)
+ dirNames.AddInReserved(dirItems.GetLogPath(i));
SortFileNames(dirNames, dirIndices);
- TestDuplicateString(dirNames, dirIndices);
+ for (i = 0; i + 1 < numDirItems; i++)
+ {
+ const UString &s1 = dirNames[dirIndices[i]];
+ const UString &s2 = dirNames[dirIndices[i + 1]];
+ if (CompareFileNames(s1, s2) == 0)
+ ThrowError(k_Duplicate_inDir_Message, s1, s2);
+ }
}
- int dirIndex = 0, arcIndex = 0;
- while (dirIndex < numDirItems && arcIndex < numArcItems)
+ unsigned dirIndex = 0;
+ unsigned arcIndex = 0;
+
+ int prevHostFile = -1;
+ const UString *prevHostName = NULL;
+
+ while (dirIndex < numDirItems || arcIndex < numArcItems)
{
CUpdatePair pair;
- int dirIndex2 = dirIndices[dirIndex];
- int arcIndex2 = arcIndices[arcIndex];
- const CDirItem &di = dirItems.Items[dirIndex2];
- const CArcItem &ai = arcItems[arcIndex2];
- int compareResult = CompareFileNames(dirNames[dirIndex2], ai.Name);
+
+ int dirIndex2 = -1;
+ int arcIndex2 = -1;
+ const CDirItem *di = NULL;
+ const CArcItem *ai = NULL;
+
+ int compareResult = -1;
+ const UString *name = NULL;
+
+ if (dirIndex < numDirItems)
+ {
+ dirIndex2 = dirIndices[dirIndex];
+ di = &dirItems.Items[dirIndex2];
+ }
+
+ if (arcIndex < numArcItems)
+ {
+ arcIndex2 = arcIndices[arcIndex];
+ ai = &arcItems[arcIndex2];
+ compareResult = 1;
+ if (dirIndex < numDirItems)
+ {
+ compareResult = CompareFileNames(dirNames[dirIndex2], ai->Name);
+ if (compareResult == 0)
+ {
+ if (di->IsDir() != ai->IsDir)
+ compareResult = (ai->IsDir ? 1 : -1);
+ }
+ }
+ }
+
if (compareResult < 0)
{
+ name = &dirNames[dirIndex2];
pair.State = NUpdateArchive::NPairState::kOnlyOnDisk;
pair.DirIndex = dirIndex2;
dirIndex++;
}
else if (compareResult > 0)
{
- pair.State = ai.Censored ?
+ name = &ai->Name;
+ pair.State = ai->Censored ?
NUpdateArchive::NPairState::kOnlyInArchive:
NUpdateArchive::NPairState::kNotMasked;
pair.ArcIndex = arcIndex2;
@@ -114,43 +183,50 @@ void GetUpdatePairInfoList(
}
else
{
- if (!ai.Censored)
- ThrowError(kNotCensoredCollisionMessaged, dirNames[dirIndex2], ai.Name);
+ int dupl = duplicatedArcItem[arcIndex];
+ if (dupl != 0)
+ ThrowError(k_Duplicate_inArc_Message, ai->Name, arcItems[arcIndices[arcIndex + dupl]].Name);
+
+ name = &dirNames[dirIndex2];
+ if (!ai->Censored)
+ ThrowError(k_NotCensoredCollision_Message, *name, ai->Name);
+
pair.DirIndex = dirIndex2;
pair.ArcIndex = arcIndex2;
- switch (ai.MTimeDefined ? MyCompareTime(
- ai.TimeType != - 1 ? (NFileTimeType::EEnum)ai.TimeType : fileTimeType,
- di.MTime, ai.MTime): 0)
+
+ switch (ai->MTimeDefined ? MyCompareTime(
+ ai->TimeType != - 1 ? (NFileTimeType::EEnum)ai->TimeType : fileTimeType,
+ di->MTime, ai->MTime): 0)
{
case -1: pair.State = NUpdateArchive::NPairState::kNewInArchive; break;
- case 1: pair.State = NUpdateArchive::NPairState::kOldInArchive; break;
+ case 1: pair.State = NUpdateArchive::NPairState::kOldInArchive; break;
default:
- pair.State = (ai.SizeDefined && di.Size == ai.Size) ?
+ pair.State = (ai->SizeDefined && di->Size == ai->Size) ?
NUpdateArchive::NPairState::kSameFiles :
NUpdateArchive::NPairState::kUnknowNewerFiles;
}
+
dirIndex++;
arcIndex++;
}
- updatePairs.Add(pair);
- }
-
- for (; dirIndex < numDirItems; dirIndex++)
- {
- CUpdatePair pair;
- pair.State = NUpdateArchive::NPairState::kOnlyOnDisk;
- pair.DirIndex = dirIndices[dirIndex];
- updatePairs.Add(pair);
- }
-
- for (; arcIndex < numArcItems; arcIndex++)
- {
- CUpdatePair pair;
- int arcIndex2 = arcIndices[arcIndex];
- pair.State = arcItems[arcIndex2].Censored ?
- NUpdateArchive::NPairState::kOnlyInArchive:
- NUpdateArchive::NPairState::kNotMasked;
- pair.ArcIndex = arcIndex2;
+
+ if ((di && di->IsAltStream) ||
+ (ai && ai->IsAltStream))
+ {
+ if (prevHostName)
+ {
+ unsigned hostLen = prevHostName->Len();
+ if (name->Len() > hostLen)
+ if ((*name)[hostLen] == ':' && CompareFileNames(*prevHostName, name->Left(hostLen)) == 0)
+ pair.HostIndex = prevHostFile;
+ }
+ }
+ else
+ {
+ prevHostFile = updatePairs.Size();
+ prevHostName = name;
+ }
+
updatePairs.Add(pair);
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/UpdatePair.h b/3rdparty/lzma/CPP/7zip/UI/Common/UpdatePair.h
index 3a332649c91..296d3b09745 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/UpdatePair.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/UpdatePair.h
@@ -13,7 +13,9 @@ struct CUpdatePair
NUpdateArchive::NPairState::EEnum State;
int ArcIndex;
int DirIndex;
- CUpdatePair(): ArcIndex(-1), DirIndex(-1) {}
+ int HostIndex; // >= 0 for alt streams only, contains index of host pair
+
+ CUpdatePair(): ArcIndex(-1), DirIndex(-1), HostIndex(-1) {}
};
void GetUpdatePairInfoList(
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp
index c21db3b2a63..e6eabcf148e 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp
@@ -14,32 +14,41 @@ void UpdateProduce(
CRecordVector<CUpdatePair2> &operationChain,
IUpdateProduceCallback *callback)
{
- for (int i = 0; i < updatePairs.Size(); i++)
+ FOR_VECTOR (i, updatePairs)
{
const CUpdatePair &pair = updatePairs[i];
CUpdatePair2 up2;
- up2.IsAnti = false;
up2.DirIndex = pair.DirIndex;
up2.ArcIndex = pair.ArcIndex;
up2.NewData = up2.NewProps = true;
+ up2.UseArcProps = false;
- switch(actionSet.StateActions[pair.State])
+ switch (actionSet.StateActions[(unsigned)pair.State])
{
case NPairAction::kIgnore:
- /*
- if (pair.State != NPairState::kOnlyOnDisk)
- IgnoreArchiveItem(m_ArchiveItems[pair.ArcIndex]);
- // cout << "deleting";
- */
- if (callback)
+ if (pair.ArcIndex >= 0 && callback)
callback->ShowDeleteFile(pair.ArcIndex);
continue;
case NPairAction::kCopy:
if (pair.State == NPairState::kOnlyOnDisk)
throw kUpdateActionSetCollision;
+ if (pair.State == NPairState::kOnlyInArchive)
+ {
+ if (pair.HostIndex >= 0)
+ {
+ /*
+ ignore alt stream if
+ 1) no such alt stream in Disk
+ 2) there is Host file in disk
+ */
+ if (updatePairs[pair.HostIndex].DirIndex >= 0)
+ continue;
+ }
+ }
up2.NewData = up2.NewProps = false;
+ up2.UseArcProps = true;
break;
case NPairAction::kCompress:
@@ -50,9 +59,12 @@ void UpdateProduce(
case NPairAction::kCompressAsAnti:
up2.IsAnti = true;
+ up2.UseArcProps = (pair.ArcIndex >= 0);
break;
}
+
operationChain.Add(up2);
}
+
operationChain.ReserveDown();
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateProduce.h b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateProduce.h
index e18648cd9bd..64c58cc5772 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/UpdateProduce.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/UpdateProduce.h
@@ -9,21 +9,41 @@ struct CUpdatePair2
{
bool NewData;
bool NewProps;
- bool IsAnti;
+ bool UseArcProps; // if (UseArcProps && NewProps), we want to change only some properties.
+ bool IsAnti; // if (!IsAnti) we use other ways to detect Anti status
int DirIndex;
int ArcIndex;
int NewNameIndex;
+ bool IsMainRenameItem;
+
+ void SetAs_NoChangeArcItem(int arcIndex)
+ {
+ NewData = NewProps = false;
+ UseArcProps = true;
+ IsAnti = false;
+ ArcIndex = arcIndex;
+ }
+
bool ExistOnDisk() const { return DirIndex != -1; }
bool ExistInArchive() const { return ArcIndex != -1; }
- CUpdatePair2(): IsAnti(false), DirIndex(-1), ArcIndex(-1), NewNameIndex(-1) {}
+ CUpdatePair2():
+ NewData(false),
+ NewProps(false),
+ UseArcProps(false),
+ IsAnti(false),
+ DirIndex(-1),
+ ArcIndex(-1),
+ NewNameIndex(-1),
+ IsMainRenameItem(false)
+ {}
};
struct IUpdateProduceCallback
{
- virtual HRESULT ShowDeleteFile(int arcIndex) = 0;
+ virtual HRESULT ShowDeleteFile(unsigned arcIndex) = 0;
};
void UpdateProduce(
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/WorkDir.cpp b/3rdparty/lzma/CPP/7zip/UI/Common/WorkDir.cpp
index 1ecb5b54066..284eaa16ac3 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/WorkDir.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/WorkDir.cpp
@@ -2,21 +2,22 @@
#include "StdAfx.h"
-#include "Common/StringConvert.h"
-#include "Common/Wildcard.h"
+#include "../../../Common/StringConvert.h"
+#include "../../../Common/Wildcard.h"
-#include "Windows/FileName.h"
+#include "../../../Windows/FileName.h"
#include "WorkDir.h"
using namespace NWindows;
using namespace NFile;
-using namespace NDirectory;
+using namespace NDir;
FString GetWorkDir(const NWorkDir::CInfo &workDirInfo, const FString &path, FString &fileName)
{
NWorkDir::NMode::EEnum mode = workDirInfo.Mode;
- #ifndef UNDER_CE
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
if (workDirInfo.ForRemovableOnly)
{
mode = NWorkDir::NMode::kCurrent;
@@ -36,13 +37,15 @@ FString GetWorkDir(const NWorkDir::CInfo &workDirInfo, const FString &path, FStr
*/
}
#endif
- int pos = path.ReverseFind(FCHAR_PATH_SEPARATOR) + 1;
- fileName = path.Mid(pos);
+
+ int pos = path.ReverseFind_PathSepar() + 1;
+ fileName = path.Ptr(pos);
+
switch (mode)
{
case NWorkDir::NMode::kCurrent:
{
- return path.Left(pos);;
+ return path.Left(pos);
}
case NWorkDir::NMode::kSpecified:
{
@@ -66,7 +69,7 @@ HRESULT CWorkDirTempFile::CreateTempFile(const FString &originalPath)
workDirInfo.Load();
FString namePart;
FString workDir = GetWorkDir(workDirInfo, originalPath, namePart);
- CreateComplexDirectory(workDir);
+ CreateComplexDir(workDir);
CTempFile tempFile;
_outStreamSpec = new COutFileStream;
OutStream = _outStreamSpec;
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/WorkDir.h b/3rdparty/lzma/CPP/7zip/UI/Common/WorkDir.h
index 79ea2b9d856..75850a92b1c 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/WorkDir.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/WorkDir.h
@@ -3,18 +3,18 @@
#ifndef __WORK_DIR_H
#define __WORK_DIR_H
-#include "Windows/FileDir.h"
-
-#include "ZipRegistry.h"
+#include "../../../Windows/FileDir.h"
#include "../../Common/FileStreams.h"
+#include "ZipRegistry.h"
+
FString GetWorkDir(const NWorkDir::CInfo &workDirInfo, const FString &path, FString &fileName);
class CWorkDirTempFile
{
FString _originalPath;
- NWindows::NFile::NDirectory::CTempFile _tempFile;
+ NWindows::NFile::NDir::CTempFile _tempFile;
COutFileStream *_outStreamSpec;
public:
CMyComPtr<IOutStream> OutStream;
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h b/3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h
index 6d8b7c1337d..935f97bbaa4 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h
@@ -3,8 +3,8 @@
#ifndef __ZIP_REGISTRY_H
#define __ZIP_REGISTRY_H
-#include "Common/MyString.h"
-#include "Common/Types.h"
+#include "../../../Common/MyTypes.h"
+#include "../../../Common/MyString.h"
#include "ExtractMode.h"
@@ -14,12 +14,21 @@ namespace NExtract
{
NPathMode::EEnum PathMode;
NOverwriteMode::EEnum OverwriteMode;
- bool ShowPassword;
+ bool PathMode_Force;
+ bool OverwriteMode_Force;
+
+ CBoolPair SplitDest;
+ CBoolPair ElimDup;
+ // CBoolPair AltStreams;
+ CBoolPair NtSecurity;
+ CBoolPair ShowPassword;
+
UStringVector Paths;
void Save() const;
void Load();
};
+
void Save_ShowPassword(bool showPassword);
bool Read_ShowPassword();
}
@@ -59,6 +68,11 @@ namespace NCompression
CObjectVector<CFormatOptions> Formats;
+ CBoolPair NtSecurity;
+ CBoolPair AltStreams;
+ CBoolPair HardLinks;
+ CBoolPair SymLinks;
+
void Save() const;
void Load();
};
@@ -97,7 +111,11 @@ namespace NWorkDir
struct CContextMenuInfo
{
- bool Cascaded;
+ CBoolPair Cascaded;
+ CBoolPair MenuIcons;
+ CBoolPair ElimDup;
+
+ bool Flags_Def;
UInt32 Flags;
void Save() const;
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/BenchCon.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/BenchCon.cpp
index d0e432226a6..a7c9e6762c8 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/BenchCon.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/BenchCon.cpp
@@ -23,7 +23,7 @@ void CPrintBenchCallback::Print(const char *s)
void CPrintBenchCallback::NewLine()
{
- Print("\n");
+ fputc('\n', _file);
}
HRESULT CPrintBenchCallback::CheckBreak()
@@ -32,11 +32,10 @@ HRESULT CPrintBenchCallback::CheckBreak()
}
HRESULT BenchCon(DECL_EXTERNAL_CODECS_LOC_VARS
- const CObjectVector<CProperty> props, UInt32 numIterations, FILE *f)
+ const CObjectVector<CProperty> &props, UInt32 numIterations, FILE *f)
{
CPrintBenchCallback callback;
callback._file = f;
- callback.NewLine();
return Bench(EXTERNAL_CODECS_LOC_VARS
&callback, NULL, props, numIterations, true);
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/BenchCon.h b/3rdparty/lzma/CPP/7zip/UI/Console/BenchCon.h
index 739721864bb..c9da1de399c 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/BenchCon.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/BenchCon.h
@@ -9,6 +9,6 @@
#include "../../UI/Common/Property.h"
HRESULT BenchCon(DECL_EXTERNAL_CODECS_LOC_VARS
- const CObjectVector<CProperty> props, UInt32 numIterations, FILE *f);
+ const CObjectVector<CProperty> &props, UInt32 numIterations, FILE *f);
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/Console.mak b/3rdparty/lzma/CPP/7zip/UI/Console/Console.mak
new file mode 100644
index 00000000000..05a07e5ad8a
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/Console.mak
@@ -0,0 +1,36 @@
+CONSOLE_OBJS = \
+ $O\BenchCon.obj \
+ $O\ConsoleClose.obj \
+ $O\ExtractCallbackConsole.obj \
+ $O\HashCon.obj \
+ $O\List.obj \
+ $O\Main.obj \
+ $O\MainAr.obj \
+ $O\OpenCallbackConsole.obj \
+ $O\PercentPrinter.obj \
+ $O\UpdateCallbackConsole.obj \
+ $O\UserInputUtils.obj \
+
+UI_COMMON_OBJS = \
+ $O\ArchiveCommandLine.obj \
+ $O\ArchiveExtractCallback.obj \
+ $O\ArchiveOpenCallback.obj \
+ $O\Bench.obj \
+ $O\DefaultName.obj \
+ $O\EnumDirItems.obj \
+ $O\Extract.obj \
+ $O\ExtractingFilePath.obj \
+ $O\HashCalc.obj \
+ $O\LoadCodecs.obj \
+ $O\OpenArchive.obj \
+ $O\PropIDUtils.obj \
+ $O\SetProperties.obj \
+ $O\SortUtils.obj \
+ $O\TempFiles.obj \
+ $O\Update.obj \
+ $O\UpdateAction.obj \
+ $O\UpdateCallback.obj \
+ $O\UpdatePair.obj \
+ $O\UpdateProduce.obj \
+
+#
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp
index 5acae942dd8..734981886d0 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp
@@ -4,11 +4,15 @@
#include "ConsoleClose.h"
-static int g_BreakCounter = 0;
-static const int kBreakAbortThreshold = 2;
+#if !defined(UNDER_CE) && defined(_WIN32)
+#include "../../../Common/MyWindows.h"
+#endif
namespace NConsoleClose {
+unsigned g_BreakCounter = 0;
+static const unsigned kBreakAbortThreshold = 2;
+
#if !defined(UNDER_CE) && defined(_WIN32)
static BOOL WINAPI HandlerRoutine(DWORD ctrlType)
{
@@ -23,7 +27,7 @@ static BOOL WINAPI HandlerRoutine(DWORD ctrlType)
return TRUE;
return FALSE;
/*
- switch(ctrlType)
+ switch (ctrlType)
{
case CTRL_C_EVENT:
case CTRL_BREAK_EVENT:
@@ -35,29 +39,18 @@ static BOOL WINAPI HandlerRoutine(DWORD ctrlType)
}
#endif
-bool TestBreakSignal()
-{
- #ifdef UNDER_CE
- return false;
- #else
- /*
- if (g_BreakCounter > 0)
- return true;
- */
- return (g_BreakCounter > 0);
- #endif
-}
-
+/*
void CheckCtrlBreak()
{
if (TestBreakSignal())
throw CCtrlBreakException();
}
+*/
CCtrlHandlerSetter::CCtrlHandlerSetter()
{
#if !defined(UNDER_CE) && defined(_WIN32)
- if(!SetConsoleCtrlHandler(HandlerRoutine, TRUE))
+ if (!SetConsoleCtrlHandler(HandlerRoutine, TRUE))
throw "SetConsoleCtrlHandler fails";
#endif
}
@@ -65,7 +58,7 @@ CCtrlHandlerSetter::CCtrlHandlerSetter()
CCtrlHandlerSetter::~CCtrlHandlerSetter()
{
#if !defined(UNDER_CE) && defined(_WIN32)
- if(!SetConsoleCtrlHandler(HandlerRoutine, FALSE))
+ if (!SetConsoleCtrlHandler(HandlerRoutine, FALSE))
throw "SetConsoleCtrlHandler fails";
#endif
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/ConsoleClose.h b/3rdparty/lzma/CPP/7zip/UI/Console/ConsoleClose.h
index 9019c4ce2bd..11c1631ca71 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/ConsoleClose.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/ConsoleClose.h
@@ -1,11 +1,20 @@
-// ConsoleCloseUtils.h
+// ConsoleClose.h
-#ifndef __CONSOLECLOSEUTILS_H
-#define __CONSOLECLOSEUTILS_H
+#ifndef __CONSOLE_CLOSE_H
+#define __CONSOLE_CLOSE_H
namespace NConsoleClose {
-bool TestBreakSignal();
+extern unsigned g_BreakCounter;
+
+inline bool TestBreakSignal()
+{
+ #ifdef UNDER_CE
+ return false;
+ #else
+ return (g_BreakCounter != 0);
+ #endif
+}
class CCtrlHandlerSetter
{
@@ -17,7 +26,7 @@ public:
class CCtrlBreakException
{};
-void CheckCtrlBreak();
+// void CheckCtrlBreak();
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp
index af379861737..8dac7fbc3e9 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp
@@ -1,40 +1,156 @@
-// ExtractCallbackConsole.h
+// ExtractCallbackConsole.cpp
#include "StdAfx.h"
-#include "ExtractCallbackConsole.h"
-#include "UserInputUtils.h"
-#include "ConsoleClose.h"
+#include "../../../Common/IntToString.h"
+#include "../../../Common/Wildcard.h"
-#include "Common/Wildcard.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileFind.h"
+#include "../../../Windows/TimeUtils.h"
+#include "../../../Windows/ErrorMsg.h"
+#include "../../../Windows/PropVariantConv.h"
-#include "Windows/FileDir.h"
-#include "Windows/FileFind.h"
-#include "Windows/Time.h"
-#include "Windows/Defs.h"
-#include "Windows/PropVariant.h"
-#include "Windows/Error.h"
-#include "Windows/PropVariantConversions.h"
+#ifndef _7ZIP_ST
+#include "../../../Windows/Synchronization.h"
+#endif
#include "../../Common/FilePathAutoRename.h"
#include "../Common/ExtractingFilePath.h"
+#include "ConsoleClose.h"
+#include "ExtractCallbackConsole.h"
+#include "UserInputUtils.h"
+
using namespace NWindows;
using namespace NFile;
-using namespace NDirectory;
+using namespace NDir;
-static const char *kTestString = "Testing ";
-static const char *kExtractString = "Extracting ";
-static const char *kSkipString = "Skipping ";
+static HRESULT CheckBreak2()
+{
+ return NConsoleClose::TestBreakSignal() ? E_ABORT : S_OK;
+}
+
+static const char *kError = "ERROR: ";
+
+
+void CExtractScanConsole::StartScanning()
+{
+ if (NeedPercents())
+ _percent.Command = "Scan";
+}
+
+HRESULT CExtractScanConsole::ScanProgress(const CDirItemsStat &st, const FString &path, bool /* isDir */)
+{
+ if (NeedPercents())
+ {
+ _percent.Files = st.NumDirs + st.NumFiles;
+ _percent.Completed = st.GetTotalBytes();
+ _percent.FileName = fs2us(path);
+ _percent.Print();
+ }
+
+ return CheckBreak2();
+}
+
+HRESULT CExtractScanConsole::ScanError(const FString &path, DWORD systemError)
+{
+ ClosePercentsAndFlush();
+
+ if (_se)
+ {
+ *_se << endl << kError << NError::MyFormatMessage(systemError) << endl <<
+ fs2us(path) << endl << endl;
+ _se->Flush();
+ }
+ return HRESULT_FROM_WIN32(systemError);
+}
+
+
+void Print_UInt64_and_String(AString &s, UInt64 val, const char *name)
+{
+ char temp[32];
+ ConvertUInt64ToString(val, temp);
+ s += temp;
+ s.Add_Space();
+ s += name;
+}
+
+void PrintSize_bytes_Smart(AString &s, UInt64 val)
+{
+ Print_UInt64_and_String(s, val, "bytes");
+
+ if (val == 0)
+ return;
+
+ unsigned numBits = 10;
+ char c = 'K';
+ char temp[4] = { 'K', 'i', 'B', 0 };
+ if (val >= ((UInt64)10 << 30)) { numBits = 30; c = 'G'; }
+ else if (val >= ((UInt64)10 << 20)) { numBits = 20; c = 'M'; }
+ temp[0] = c;
+ s += " (";
+ Print_UInt64_and_String(s, ((val + ((UInt64)1 << numBits) - 1) >> numBits), temp);
+ s += ')';
+}
+
+void Print_DirItemsStat(AString &s, const CDirItemsStat &st)
+{
+ if (st.NumDirs != 0)
+ {
+ Print_UInt64_and_String(s, st.NumDirs, st.NumDirs == 1 ? "folder" : "folders");
+ s += ", ";
+ }
+ Print_UInt64_and_String(s, st.NumFiles, st.NumFiles == 1 ? "file" : "files");
+ s += ", ";
+ PrintSize_bytes_Smart(s, st.FilesSize);
+ if (st.NumAltStreams != 0)
+ {
+ s.Add_LF();
+ Print_UInt64_and_String(s, st.NumAltStreams, "alternate streams");
+ s += ", ";
+ PrintSize_bytes_Smart(s, st.AltStreamsSize);
+ }
+}
+
+void CExtractScanConsole::PrintStat(const CDirItemsStat &st)
+{
+ if (_so)
+ {
+ AString s;
+ Print_DirItemsStat(s, st);
+ *_so << s << endl;
+ }
+}
+
+
+
+
+
+
+
+#ifndef _7ZIP_ST
+static NSynchronization::CCriticalSection g_CriticalSection;
+#define MT_LOCK NSynchronization::CCriticalSectionLock lock(g_CriticalSection);
+#else
+#define MT_LOCK
+#endif
+
+
+static const char *kTestString = "T";
+static const char *kExtractString = "-";
+static const char *kSkipString = ".";
// static const char *kCantAutoRename = "can not create file with auto name\n";
// static const char *kCantRenameFile = "can not rename existing file\n";
// static const char *kCantDeleteOutputFile = "can not delete output file ";
-static const char *kError = "ERROR: ";
+
static const char *kMemoryExceptionMessage = "Can't allocate required memory!";
-static const char *kProcessing = "Processing archive: ";
+static const char *kExtracting = "Extracting archive: ";
+static const char *kTesting = "Testing archive: ";
+
static const char *kEverythingIsOk = "Everything is Ok";
static const char *kNoFiles = "No files to process";
@@ -43,34 +159,96 @@ static const char *kCrcFailed = "CRC Failed";
static const char *kCrcFailedEncrypted = "CRC Failed in encrypted file. Wrong password?";
static const char *kDataError = "Data Error";
static const char *kDataErrorEncrypted = "Data Error in encrypted file. Wrong password?";
-static const char *kUnknownError = "Unknown Error";
+static const char *kUnavailableData = "Unavailable data";
+static const char *kUnexpectedEnd = "Unexpected end of data";
+static const char *kDataAfterEnd = "There are some data after the end of the payload data";
+static const char *kIsNotArc = "Is not archive";
+static const char *kHeadersError = "Headers Error";
+static const char *kWrongPassword = "Wrong password";
-STDMETHODIMP CExtractCallbackConsole::SetTotal(UInt64)
+static const char * const k_ErrorFlagsMessages[] =
{
- if (NConsoleClose::TestBreakSignal())
- return E_ABORT;
- return S_OK;
+ "Is not archive"
+ , "Headers Error"
+ , "Headers Error in encrypted archive. Wrong password?"
+ , "Unavailable start of archive"
+ , "Unconfirmed start of archive"
+ , "Unexpected end of archive"
+ , "There are data after the end of archive"
+ , "Unsupported method"
+ , "Unsupported feature"
+ , "Data Error"
+ , "CRC Error"
+};
+
+STDMETHODIMP CExtractCallbackConsole::SetTotal(UInt64 size)
+{
+ MT_LOCK
+
+ if (NeedPercents())
+ {
+ _percent.Total = size;
+ _percent.Print();
+ }
+ return CheckBreak2();
}
-STDMETHODIMP CExtractCallbackConsole::SetCompleted(const UInt64 *)
+STDMETHODIMP CExtractCallbackConsole::SetCompleted(const UInt64 *completeValue)
{
- if (NConsoleClose::TestBreakSignal())
- return E_ABORT;
- return S_OK;
+ MT_LOCK
+
+ if (NeedPercents())
+ {
+ if (completeValue)
+ _percent.Completed = *completeValue;
+ _percent.Print();
+ }
+ return CheckBreak2();
+}
+
+static const char *kTab = " ";
+
+static void PrintFileInfo(CStdOutStream *_so, const wchar_t *path, const FILETIME *ft, const UInt64 *size)
+{
+ *_so << kTab << "Path: " << path << endl;
+ if (size)
+ {
+ AString s;
+ PrintSize_bytes_Smart(s, *size);
+ *_so << kTab << "Size: " << s << endl;
+ }
+ if (ft)
+ {
+ char temp[64];
+ FILETIME locTime;
+ if (FileTimeToLocalFileTime(ft, &locTime))
+ if (ConvertFileTimeToString(locTime, temp, true, true))
+ *_so << kTab << "Modified: " << temp << endl;
+ }
}
STDMETHODIMP CExtractCallbackConsole::AskOverwrite(
- const wchar_t *existName, const FILETIME *, const UInt64 *,
- const wchar_t *newName, const FILETIME *, const UInt64 *,
+ const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize,
+ const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize,
Int32 *answer)
{
- (*OutStream) << "file " << existName <<
- "\nalready exists. Overwrite with " << endl;
- (*OutStream) << newName;
+ MT_LOCK
+
+ RINOK(CheckBreak2());
+
+ ClosePercentsAndFlush();
+
+ if (_so)
+ {
+ *_so << endl << "Would you like to replace the existing file:\n";
+ PrintFileInfo(_so, existName, existTime, existSize);
+ *_so << "with the file from archive:\n";
+ PrintFileInfo(_so, newName, newTime, newSize);
+ }
- NUserAnswerMode::EEnum overwriteAnswer = ScanUserYesNoAllQuit(OutStream);
+ NUserAnswerMode::EEnum overwriteAnswer = ScanUserYesNoAllQuit(_so);
- switch(overwriteAnswer)
+ switch (overwriteAnswer)
{
case NUserAnswerMode::kQuit: return E_ABORT;
case NUserAnswerMode::kNo: *answer = NOverwriteAnswer::kNo; break;
@@ -80,62 +258,192 @@ STDMETHODIMP CExtractCallbackConsole::AskOverwrite(
case NUserAnswerMode::kAutoRenameAll: *answer = NOverwriteAnswer::kAutoRename; break;
default: return E_FAIL;
}
- return S_OK;
+
+ if (_so)
+ {
+ *_so << endl;
+ if (NeedFlush)
+ _so->Flush();
+ }
+
+ return CheckBreak2();
}
-STDMETHODIMP CExtractCallbackConsole::PrepareOperation(const wchar_t *name, bool /* isFolder */, Int32 askExtractMode, const UInt64 *position)
+STDMETHODIMP CExtractCallbackConsole::PrepareOperation(const wchar_t *name, Int32 /* isFolder */, Int32 askExtractMode, const UInt64 *position)
{
+ MT_LOCK
+
+ _currentName = name;
+
+ const char *s;
+ unsigned requiredLevel = 1;
+
switch (askExtractMode)
{
- case NArchive::NExtract::NAskMode::kExtract: (*OutStream) << kExtractString; break;
- case NArchive::NExtract::NAskMode::kTest: (*OutStream) << kTestString; break;
- case NArchive::NExtract::NAskMode::kSkip: (*OutStream) << kSkipString; break;
+ case NArchive::NExtract::NAskMode::kExtract: s = kExtractString; break;
+ case NArchive::NExtract::NAskMode::kTest: s = kTestString; break;
+ case NArchive::NExtract::NAskMode::kSkip: s = kSkipString; requiredLevel = 2; break;
+ default: s = "???"; requiredLevel = 2;
};
- (*OutStream) << name;
- if (position != 0)
- (*OutStream) << " <" << *position << ">";
- return S_OK;
+
+ bool show2 = (LogLevel >= requiredLevel && _so);
+
+ if (show2)
+ {
+ ClosePercents_for_so();
+
+ _tempA = s;
+ if (name)
+ _tempA.Add_Space();
+ *_so << _tempA;
+
+ _tempU.Empty();
+ if (name)
+ _tempU = name;
+ _so->PrintUString(_tempU, _tempA);
+ if (position)
+ *_so << " <" << *position << ">";
+ *_so << endl;
+
+ if (NeedFlush)
+ _so->Flush();
+ }
+
+ if (NeedPercents())
+ {
+ if (PercentsNameLevel >= 1)
+ {
+ _percent.FileName.Empty();
+ _percent.Command.Empty();
+ if (PercentsNameLevel > 1 || !show2)
+ {
+ _percent.Command = s;
+ if (name)
+ _percent.FileName = name;
+ }
+ }
+ _percent.Print();
+ }
+
+ return CheckBreak2();
}
STDMETHODIMP CExtractCallbackConsole::MessageError(const wchar_t *message)
{
- (*OutStream) << message << endl;
- NumFileErrorsInCurrentArchive++;
+ MT_LOCK
+
+ RINOK(CheckBreak2());
+
+ NumFileErrors_in_Current++;
NumFileErrors++;
- return S_OK;
+
+ ClosePercentsAndFlush();
+ if (_se)
+ {
+ *_se << kError << message << endl;
+ _se->Flush();
+ }
+
+ return CheckBreak2();
+}
+
+void SetExtractErrorMessage(Int32 opRes, Int32 encrypted, AString &dest)
+{
+ dest.Empty();
+ const char *s = NULL;
+
+ switch (opRes)
+ {
+ case NArchive::NExtract::NOperationResult::kUnsupportedMethod:
+ s = kUnsupportedMethod;
+ break;
+ case NArchive::NExtract::NOperationResult::kCRCError:
+ s = (encrypted ? kCrcFailedEncrypted : kCrcFailed);
+ break;
+ case NArchive::NExtract::NOperationResult::kDataError:
+ s = (encrypted ? kDataErrorEncrypted : kDataError);
+ break;
+ case NArchive::NExtract::NOperationResult::kUnavailable:
+ s = kUnavailableData;
+ break;
+ case NArchive::NExtract::NOperationResult::kUnexpectedEnd:
+ s = kUnexpectedEnd;
+ break;
+ case NArchive::NExtract::NOperationResult::kDataAfterEnd:
+ s = kDataAfterEnd;
+ break;
+ case NArchive::NExtract::NOperationResult::kIsNotArc:
+ s = kIsNotArc;
+ break;
+ case NArchive::NExtract::NOperationResult::kHeadersError:
+ s = kHeadersError;
+ break;
+ case NArchive::NExtract::NOperationResult::kWrongPassword:
+ s = kWrongPassword;
+ break;
+ }
+
+ dest += kError;
+ if (s)
+ dest += s;
+ else
+ {
+ char temp[16];
+ ConvertUInt32ToString(opRes, temp);
+ dest += "Error #";
+ dest += temp;
+ }
}
-STDMETHODIMP CExtractCallbackConsole::SetOperationResult(Int32 operationResult, bool encrypted)
+STDMETHODIMP CExtractCallbackConsole::SetOperationResult(Int32 opRes, Int32 encrypted)
{
- switch(operationResult)
+ MT_LOCK
+
+ if (opRes == NArchive::NExtract::NOperationResult::kOK)
{
- case NArchive::NExtract::NOperationResult::kOK:
- break;
- default:
+ if (NeedPercents())
{
- NumFileErrorsInCurrentArchive++;
- NumFileErrors++;
- (*OutStream) << " ";
- switch(operationResult)
- {
- case NArchive::NExtract::NOperationResult::kUnSupportedMethod:
- (*OutStream) << kUnsupportedMethod;
- break;
- case NArchive::NExtract::NOperationResult::kCRCError:
- (*OutStream) << (encrypted ? kCrcFailedEncrypted: kCrcFailed);
- break;
- case NArchive::NExtract::NOperationResult::kDataError:
- (*OutStream) << (encrypted ? kDataErrorEncrypted : kDataError);
- break;
- default:
- (*OutStream) << kUnknownError;
- }
+ _percent.Command.Empty();
+ _percent.FileName.Empty();
+ _percent.Files++;
}
}
- (*OutStream) << endl;
- return S_OK;
+ else
+ {
+ NumFileErrors_in_Current++;
+ NumFileErrors++;
+
+ if (_se)
+ {
+ ClosePercentsAndFlush();
+
+ AString s;
+ SetExtractErrorMessage(opRes, encrypted, s);
+
+ *_se << s;
+ if (!_currentName.IsEmpty())
+ *_se << " : " << _currentName;
+ *_se << endl;
+ _se->Flush();
+ }
+ }
+
+ return CheckBreak2();
+}
+
+STDMETHODIMP CExtractCallbackConsole::ReportExtractResult(Int32 opRes, Int32 encrypted, const wchar_t *name)
+{
+ if (opRes != NArchive::NExtract::NOperationResult::kOK)
+ {
+ _currentName = name;
+ return SetOperationResult(opRes, encrypted);
+ }
+
+ return CheckBreak2();
}
+
+
#ifndef _NO_CRYPTO
HRESULT CExtractCallbackConsole::SetPassword(const UString &password)
@@ -147,78 +455,310 @@ HRESULT CExtractCallbackConsole::SetPassword(const UString &password)
STDMETHODIMP CExtractCallbackConsole::CryptoGetTextPassword(BSTR *password)
{
- if (!PasswordIsDefined)
- {
- Password = GetPassword(OutStream);
- PasswordIsDefined = true;
- }
- return StringToBstr(Password, password);
+ COM_TRY_BEGIN
+ MT_LOCK
+ return Open_CryptoGetTextPassword(password);
+ COM_TRY_END
}
#endif
-HRESULT CExtractCallbackConsole::BeforeOpen(const wchar_t *name)
+HRESULT CExtractCallbackConsole::BeforeOpen(const wchar_t *name, bool testMode)
{
- NumArchives++;
- NumFileErrorsInCurrentArchive = 0;
- (*OutStream) << endl << kProcessing << name << endl;
+ RINOK(CheckBreak2());
+
+ NumTryArcs++;
+ ThereIsError_in_Current = false;
+ ThereIsWarning_in_Current = false;
+ NumFileErrors_in_Current = 0;
+
+ ClosePercents_for_so();
+ if (_so)
+ *_so << endl << (testMode ? kTesting : kExtracting) << name << endl;
+
+ if (NeedPercents())
+ _percent.Command = "Open";
return S_OK;
}
-HRESULT CExtractCallbackConsole::OpenResult(const wchar_t * /* name */, HRESULT result, bool encrypted)
+HRESULT Print_OpenArchive_Props(CStdOutStream &so, const CCodecs *codecs, const CArchiveLink &arcLink);
+HRESULT Print_OpenArchive_Error(CStdOutStream &so, const CCodecs *codecs, const CArchiveLink &arcLink);
+
+static AString GetOpenArcErrorMessage(UInt32 errorFlags)
{
- (*OutStream) << endl;
- if (result != S_OK)
+ AString s;
+
+ for (unsigned i = 0; i < ARRAY_SIZE(k_ErrorFlagsMessages); i++)
+ {
+ UInt32 f = (1 << i);
+ if ((errorFlags & f) == 0)
+ continue;
+ const char *m = k_ErrorFlagsMessages[i];
+ if (!s.IsEmpty())
+ s.Add_LF();
+ s += m;
+ errorFlags &= ~f;
+ }
+
+ if (errorFlags != 0)
{
- (*OutStream) << "Error: ";
- if (result == S_FALSE)
+ char sz[16];
+ sz[0] = '0';
+ sz[1] = 'x';
+ ConvertUInt32ToHex(errorFlags, sz + 2);
+ if (!s.IsEmpty())
+ s.Add_LF();
+ s += sz;
+ }
+
+ return s;
+}
+
+void PrintErrorFlags(CStdOutStream &so, const char *s, UInt32 errorFlags)
+{
+ if (errorFlags == 0)
+ return;
+ so << s << endl << GetOpenArcErrorMessage(errorFlags) << endl;
+}
+
+void Add_Messsage_Pre_ArcType(UString &s, const char *pre, const wchar_t *arcType)
+{
+ s.Add_LF();
+ s.AddAscii(pre);
+ s.AddAscii(" as [");
+ s += arcType;
+ s.AddAscii("] archive");
+}
+
+void Print_ErrorFormatIndex_Warning(CStdOutStream *_so, const CCodecs *codecs, const CArc &arc)
+{
+ const CArcErrorInfo &er = arc.ErrorInfo;
+
+ UString s = L"WARNING:\n";
+ s += arc.Path;
+ if (arc.FormatIndex == er.ErrorFormatIndex)
+ {
+ s.Add_LF();
+ s.AddAscii("The archive is open with offset");
+ }
+ else
+ {
+ Add_Messsage_Pre_ArcType(s, "Can not open the file", codecs->GetFormatNamePtr(er.ErrorFormatIndex));
+ Add_Messsage_Pre_ArcType(s, "The file is open", codecs->GetFormatNamePtr(arc.FormatIndex));
+ }
+
+ *_so << s << endl << endl;
+}
+
+
+HRESULT CExtractCallbackConsole::OpenResult(
+ const CCodecs *codecs, const CArchiveLink &arcLink,
+ const wchar_t *name, HRESULT result)
+{
+ ClosePercents();
+
+ if (NeedPercents())
+ {
+ _percent.Files = 0;
+ _percent.Command.Empty();
+ _percent.FileName.Empty();
+ }
+
+
+ ClosePercentsAndFlush();
+
+ FOR_VECTOR (level, arcLink.Arcs)
+ {
+ const CArc &arc = arcLink.Arcs[level];
+ const CArcErrorInfo &er = arc.ErrorInfo;
+
+ UInt32 errorFlags = er.GetErrorFlags();
+
+ if (errorFlags != 0 || !er.ErrorMessage.IsEmpty())
{
- (*OutStream) << (encrypted ?
- "Can not open encrypted archive. Wrong password?" :
- "Can not open file as archive");
+ if (_se)
+ {
+ *_se << endl;
+ if (level != 0)
+ *_se << arc.Path << endl;
+ }
+
+ if (errorFlags != 0)
+ {
+ if (_se)
+ PrintErrorFlags(*_se, "ERRORS:", errorFlags);
+ NumOpenArcErrors++;
+ ThereIsError_in_Current = true;
+ }
+
+ if (!er.ErrorMessage.IsEmpty())
+ {
+ if (_se)
+ *_se << "ERRORS:" << endl << er.ErrorMessage << endl;
+ NumOpenArcErrors++;
+ ThereIsError_in_Current = true;
+ }
+
+ if (_se)
+ {
+ *_se << endl;
+ _se->Flush();
+ }
}
- else
+
+ UInt32 warningFlags = er.GetWarningFlags();
+
+ if (warningFlags != 0 || !er.WarningMessage.IsEmpty())
{
- if (result == E_OUTOFMEMORY)
- (*OutStream) << "Can't allocate required memory";
+ if (_so)
+ {
+ *_so << endl;
+ if (level != 0)
+ *_so << arc.Path << endl;
+ }
+
+ if (warningFlags != 0)
+ {
+ if (_so)
+ PrintErrorFlags(*_so, "WARNINGS:", warningFlags);
+ NumOpenArcWarnings++;
+ ThereIsWarning_in_Current = true;
+ }
+
+ if (!er.WarningMessage.IsEmpty())
+ {
+ if (_so)
+ *_so << "WARNINGS:" << endl << er.WarningMessage << endl;
+ NumOpenArcWarnings++;
+ ThereIsWarning_in_Current = true;
+ }
+
+ if (_so)
+ {
+ *_so << endl;
+ if (NeedFlush)
+ _so->Flush();
+ }
+ }
+
+
+ if (er.ErrorFormatIndex >= 0)
+ {
+ if (_so)
+ {
+ Print_ErrorFormatIndex_Warning(_so, codecs, arc);
+ if (NeedFlush)
+ _so->Flush();
+ }
+ ThereIsWarning_in_Current = true;
+ }
+ }
+
+ if (result == S_OK)
+ {
+ if (_so)
+ {
+ RINOK(Print_OpenArchive_Props(*_so, codecs, arcLink));
+ *_so << endl;
+ }
+ }
+ else
+ {
+ NumCantOpenArcs++;
+ if (_so)
+ _so->Flush();
+ if (_se)
+ {
+ *_se << kError << name << endl;
+ HRESULT res = Print_OpenArchive_Error(*_se, codecs, arcLink);
+ RINOK(res);
+ if (result == S_FALSE)
+ {
+ }
else
- (*OutStream) << NError::MyFormatMessageW(result);
+ {
+ if (result == E_OUTOFMEMORY)
+ *_se << "Can't allocate required memory";
+ else
+ *_se << NError::MyFormatMessage(result);
+ *_se << endl;
+ }
+ _se->Flush();
}
- (*OutStream) << endl;
- NumArchiveErrors++;
}
- return S_OK;
+
+
+ return CheckBreak2();
}
HRESULT CExtractCallbackConsole::ThereAreNoFiles()
{
- (*OutStream) << endl << kNoFiles << endl;
- return S_OK;
+ ClosePercents_for_so();
+
+ if (_so)
+ {
+ *_so << endl << kNoFiles << endl;
+ if (NeedFlush)
+ _so->Flush();
+ }
+ return CheckBreak2();
}
HRESULT CExtractCallbackConsole::ExtractResult(HRESULT result)
{
+ MT_LOCK
+
+ if (NeedPercents())
+ {
+ _percent.ClosePrint(true);
+ _percent.Command.Empty();
+ _percent.FileName.Empty();
+ }
+
+ if (_so)
+ _so->Flush();
+
if (result == S_OK)
{
- (*OutStream) << endl;
- if (NumFileErrorsInCurrentArchive == 0)
- (*OutStream) << kEverythingIsOk << endl;
+ if (NumFileErrors_in_Current == 0 && !ThereIsError_in_Current)
+ {
+ if (ThereIsWarning_in_Current)
+ NumArcsWithWarnings++;
+ else
+ NumOkArcs++;
+ if (_so)
+ *_so << kEverythingIsOk << endl;
+ }
else
{
- NumArchiveErrors++;
- (*OutStream) << "Sub items Errors: " << NumFileErrorsInCurrentArchive << endl;
+ NumArcsWithError++;
+ if (_so)
+ {
+ *_so << endl;
+ if (NumFileErrors_in_Current != 0)
+ *_so << "Sub items Errors: " << NumFileErrors_in_Current << endl;
+ }
}
+ if (_so && NeedFlush)
+ _so->Flush();
}
- if (result == S_OK)
- return result;
- NumArchiveErrors++;
- if (result == E_ABORT || result == ERROR_DISK_FULL)
- return result;
- (*OutStream) << endl << kError;
- if (result == E_OUTOFMEMORY)
- (*OutStream) << kMemoryExceptionMessage;
else
- (*OutStream) << NError::MyFormatMessageW(result);
- (*OutStream) << endl;
- return S_OK;
+ {
+ NumArcsWithError++;
+ if (result == E_ABORT || result == ERROR_DISK_FULL)
+ return result;
+
+ if (_se)
+ {
+ *_se << endl << kError;
+ if (result == E_OUTOFMEMORY)
+ *_se << kMemoryExceptionMessage;
+ else
+ *_se << NError::MyFormatMessage(result);
+ *_se << endl;
+ _se->Flush();
+ }
+ }
+
+ return CheckBreak2();
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h b/3rdparty/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h
index e42ca6f403b..dc659521e03 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h
@@ -1,24 +1,95 @@
// ExtractCallbackConsole.h
-#ifndef __EXTRACTCALLBACKCONSOLE_H
-#define __EXTRACTCALLBACKCONSOLE_H
+#ifndef __EXTRACT_CALLBACK_CONSOLE_H
+#define __EXTRACT_CALLBACK_CONSOLE_H
+
+#include "../../../Common/StdOutStream.h"
-#include "Common/MyString.h"
-#include "Common/StdOutStream.h"
-#include "../../Common/FileStreams.h"
#include "../../IPassword.h"
+
#include "../../Archive/IArchive.h"
+
#include "../Common/ArchiveExtractCallback.h"
+#include "PercentPrinter.h"
+
+#include "OpenCallbackConsole.h"
+
+class CExtractScanConsole: public IDirItemsCallback
+{
+ CStdOutStream *_so;
+ CStdOutStream *_se;
+ CPercentPrinter _percent;
+
+ bool NeedPercents() const { return _percent._so != NULL; }
+
+ void ClosePercentsAndFlush()
+ {
+ if (NeedPercents())
+ _percent.ClosePrint(true);
+ if (_so)
+ _so->Flush();
+ }
+
+public:
+ void Init(CStdOutStream *outStream, CStdOutStream *errorStream, CStdOutStream *percentStream)
+ {
+ _so = outStream;
+ _se = errorStream;
+ _percent._so = percentStream;
+ }
+
+ void SetWindowWidth(unsigned width) { _percent.MaxLen = width - 1; }
+
+ void StartScanning();
+
+ INTERFACE_IDirItemsCallback(;)
+
+ void CloseScanning()
+ {
+ if (NeedPercents())
+ _percent.ClosePrint(true);
+ }
+
+ void PrintStat(const CDirItemsStat &st);
+};
+
+
+
+
class CExtractCallbackConsole:
public IExtractCallbackUI,
+ // public IArchiveExtractCallbackMessage,
+ public IFolderArchiveExtractCallback2,
#ifndef _NO_CRYPTO
public ICryptoGetTextPassword,
#endif
+ public COpenCallbackConsole,
public CMyUnknownImp
{
+ AString _tempA;
+ UString _tempU;
+
+ UString _currentName;
+
+ void ClosePercents_for_so()
+ {
+ if (NeedPercents() && _so == _percent._so)
+ _percent.ClosePrint(false);
+ }
+
+ void ClosePercentsAndFlush()
+ {
+ if (NeedPercents())
+ _percent.ClosePrint(true);
+ if (_so)
+ _so->Flush();
+ }
+
public:
MY_QUERYINTERFACE_BEGIN2(IFolderArchiveExtractCallback)
+ // MY_QUERYINTERFACE_ENTRY(IArchiveExtractCallbackMessage)
+ MY_QUERYINTERFACE_ENTRY(IFolderArchiveExtractCallback2)
#ifndef _NO_CRYPTO
MY_QUERYINTERFACE_ENTRY(ICryptoGetTextPassword)
#endif
@@ -28,46 +99,66 @@ public:
STDMETHOD(SetTotal)(UInt64 total);
STDMETHOD(SetCompleted)(const UInt64 *completeValue);
- // IFolderArchiveExtractCallback
- STDMETHOD(AskOverwrite)(
- const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize,
- const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize,
- Int32 *answer);
- STDMETHOD (PrepareOperation)(const wchar_t *name, bool isFolder, Int32 askExtractMode, const UInt64 *position);
-
- STDMETHOD(MessageError)(const wchar_t *message);
- STDMETHOD(SetOperationResult)(Int32 operationResult, bool encrypted);
+ INTERFACE_IFolderArchiveExtractCallback(;)
- HRESULT BeforeOpen(const wchar_t *name);
- HRESULT OpenResult(const wchar_t *name, HRESULT result, bool encrypted);
- HRESULT ThereAreNoFiles();
- HRESULT ExtractResult(HRESULT result);
+ INTERFACE_IExtractCallbackUI(;)
+ // INTERFACE_IArchiveExtractCallbackMessage(;)
+ INTERFACE_IFolderArchiveExtractCallback2(;)
-
#ifndef _NO_CRYPTO
- HRESULT SetPassword(const UString &password);
- STDMETHOD(CryptoGetTextPassword)(BSTR *password);
- bool PasswordIsDefined;
- UString Password;
+ STDMETHOD(CryptoGetTextPassword)(BSTR *password);
#endif
- UInt64 NumArchives;
- UInt64 NumArchiveErrors;
+ UInt64 NumTryArcs;
+
+ bool ThereIsError_in_Current;
+ bool ThereIsWarning_in_Current;
+
+ UInt64 NumOkArcs;
+ UInt64 NumCantOpenArcs;
+ UInt64 NumArcsWithError;
+ UInt64 NumArcsWithWarnings;
+
+ UInt64 NumOpenArcErrors;
+ UInt64 NumOpenArcWarnings;
+
UInt64 NumFileErrors;
- UInt64 NumFileErrorsInCurrentArchive;
+ UInt64 NumFileErrors_in_Current;
+
+ bool NeedFlush;
+ unsigned PercentsNameLevel;
+ unsigned LogLevel;
- CStdOutStream *OutStream;
+ CExtractCallbackConsole():
+ NeedFlush(false),
+ PercentsNameLevel(1),
+ LogLevel(0)
+ {}
- void Init()
+ void SetWindowWidth(unsigned width) { _percent.MaxLen = width - 1; }
+
+ void Init(CStdOutStream *outStream, CStdOutStream *errorStream, CStdOutStream *percentStream)
{
- NumArchives = 0;
- NumArchiveErrors = 0;
+ COpenCallbackConsole::Init(outStream, errorStream, percentStream);
+
+ NumTryArcs = 0;
+
+ ThereIsError_in_Current = false;
+ ThereIsWarning_in_Current = false;
+
+ NumOkArcs = 0;
+ NumCantOpenArcs = 0;
+ NumArcsWithError = 0;
+ NumArcsWithWarnings = 0;
+
+ NumOpenArcErrors = 0;
+ NumOpenArcWarnings = 0;
+
NumFileErrors = 0;
- NumFileErrorsInCurrentArchive = 0;
+ NumFileErrors_in_Current = 0;
}
-
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/HashCon.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/HashCon.cpp
new file mode 100644
index 00000000000..a71e4b50d21
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/HashCon.cpp
@@ -0,0 +1,367 @@
+// HashCon.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/IntToString.h"
+
+#include "ConsoleClose.h"
+#include "HashCon.h"
+
+static const wchar_t *kEmptyFileAlias = L"[Content]";
+
+static const char *kScanningMessage = "Scanning";
+
+static HRESULT CheckBreak2()
+{
+ return NConsoleClose::TestBreakSignal() ? E_ABORT : S_OK;
+}
+
+HRESULT CHashCallbackConsole::CheckBreak()
+{
+ return CheckBreak2();
+}
+
+HRESULT CHashCallbackConsole::StartScanning()
+{
+ if (PrintHeaders && _so)
+ *_so << kScanningMessage << endl;
+ if (NeedPercents())
+ {
+ _percent.ClearCurState();
+ _percent.Command = "Scan";
+ }
+ return CheckBreak2();
+}
+
+HRESULT CHashCallbackConsole::ScanProgress(const CDirItemsStat &st, const FString &path, bool /* isDir */)
+{
+ if (NeedPercents())
+ {
+ _percent.Files = st.NumDirs + st.NumFiles + st.NumAltStreams;
+ _percent.Completed = st.GetTotalBytes();
+ _percent.FileName = fs2us(path);
+ _percent.Print();
+ }
+ return CheckBreak2();
+}
+
+HRESULT CHashCallbackConsole::ScanError(const FString &path, DWORD systemError)
+{
+ return ScanError_Base(path, systemError);
+}
+
+void Print_DirItemsStat(AString &s, const CDirItemsStat &st);
+
+HRESULT CHashCallbackConsole::FinishScanning(const CDirItemsStat &st)
+{
+ if (NeedPercents())
+ {
+ _percent.ClosePrint(true);
+ _percent.ClearCurState();
+ }
+ if (PrintHeaders && _so)
+ {
+ Print_DirItemsStat(_s, st);
+ *_so << _s << endl << endl;
+ }
+ return CheckBreak2();
+}
+
+HRESULT CHashCallbackConsole::SetNumFiles(UInt64 /* numFiles */)
+{
+ return CheckBreak2();
+}
+
+HRESULT CHashCallbackConsole::SetTotal(UInt64 size)
+{
+ if (NeedPercents())
+ {
+ _percent.Total = size;
+ _percent.Print();
+ }
+ return CheckBreak2();
+}
+
+HRESULT CHashCallbackConsole::SetCompleted(const UInt64 *completeValue)
+{
+ if (completeValue && NeedPercents())
+ {
+ _percent.Completed = *completeValue;
+ _percent.Print();
+ }
+ return CheckBreak2();
+}
+
+static void AddMinuses(AString &s, unsigned num)
+{
+ for (unsigned i = 0; i < num; i++)
+ s += '-';
+}
+
+static void AddSpaces_if_Positive(AString &s, int num)
+{
+ for (int i = 0; i < num; i++)
+ s.Add_Space();
+}
+
+static void SetSpacesAndNul(char *s, unsigned num)
+{
+ for (unsigned i = 0; i < num; i++)
+ s[i] = ' ';
+ s[num] = 0;
+}
+
+static const unsigned kSizeField_Len = 13;
+static const unsigned kNameField_Len = 12;
+
+static const unsigned kHashColumnWidth_Min = 4 * 2;
+
+static unsigned GetColumnWidth(unsigned digestSize)
+{
+ unsigned width = digestSize * 2;
+ return width < kHashColumnWidth_Min ? kHashColumnWidth_Min: width;
+}
+
+void CHashCallbackConsole::PrintSeparatorLine(const CObjectVector<CHasherState> &hashers)
+{
+ _s.Empty();
+
+ for (unsigned i = 0; i < hashers.Size(); i++)
+ {
+ if (i != 0)
+ _s.Add_Space();
+ const CHasherState &h = hashers[i];
+ AddMinuses(_s, GetColumnWidth(h.DigestSize));
+ }
+
+ if (PrintSize)
+ {
+ _s.Add_Space();
+ AddMinuses(_s, kSizeField_Len);
+ }
+
+ if (PrintName)
+ {
+ AddSpacesBeforeName();
+ AddMinuses(_s, kNameField_Len);
+ }
+
+ *_so << _s << endl;
+}
+
+HRESULT CHashCallbackConsole::BeforeFirstFile(const CHashBundle &hb)
+{
+ if (PrintHeaders && _so)
+ {
+ _s.Empty();
+ ClosePercents_for_so();
+
+ FOR_VECTOR (i, hb.Hashers)
+ {
+ if (i != 0)
+ _s.Add_Space();
+ const CHasherState &h = hb.Hashers[i];
+ _s += h.Name;
+ AddSpaces_if_Positive(_s, (int)GetColumnWidth(h.DigestSize) - (int)h.Name.Len());
+ }
+
+ if (PrintSize)
+ {
+ _s.Add_Space();
+ const AString s2 = "Size";
+ AddSpaces_if_Positive(_s, (int)kSizeField_Len - (int)s2.Len());
+ _s += s2;
+ }
+
+ if (PrintName)
+ {
+ AddSpacesBeforeName();
+ _s += "Name";
+ }
+
+ *_so << _s << endl;
+ PrintSeparatorLine(hb.Hashers);
+ }
+
+ return CheckBreak2();
+}
+
+HRESULT CHashCallbackConsole::OpenFileError(const FString &path, DWORD systemError)
+{
+ return OpenFileError_Base(path, systemError);
+}
+
+HRESULT CHashCallbackConsole::GetStream(const wchar_t *name, bool /* isFolder */)
+{
+ _fileName = name;
+
+ if (NeedPercents())
+ {
+ if (PrintNameInPercents)
+ {
+ _percent.FileName.Empty();
+ if (name)
+ _percent.FileName = name;
+ }
+ _percent.Print();
+ }
+ return CheckBreak2();
+}
+
+void CHashCallbackConsole::PrintResultLine(UInt64 fileSize,
+ const CObjectVector<CHasherState> &hashers, unsigned digestIndex, bool showHash)
+{
+ ClosePercents_for_so();
+
+ _s.Empty();
+
+ FOR_VECTOR (i, hashers)
+ {
+ const CHasherState &h = hashers[i];
+ char s[k_HashCalc_DigestSize_Max * 2 + 64];
+ s[0] = 0;
+ if (showHash)
+ AddHashHexToString(s, h.Digests[digestIndex], h.DigestSize);
+ SetSpacesAndNul(s + strlen(s), (int)GetColumnWidth(h.DigestSize) - (int)strlen(s));
+ if (i != 0)
+ _s.Add_Space();
+ _s += s;
+ }
+
+ if (PrintSize)
+ {
+ _s.Add_Space();
+
+ char s[kSizeField_Len + 32];
+ char *p = s;
+
+ if (showHash)
+ {
+ p = s + kSizeField_Len;
+ ConvertUInt64ToString(fileSize, p);
+ int numSpaces = kSizeField_Len - (int)strlen(p);
+ if (numSpaces > 0)
+ {
+ p -= (unsigned)numSpaces;
+ for (unsigned i = 0; i < (unsigned)numSpaces; i++)
+ p[i] = ' ';
+ }
+ }
+ else
+ SetSpacesAndNul(s, kSizeField_Len);
+
+ _s += p;
+ }
+
+ if (PrintName)
+ AddSpacesBeforeName();
+
+ *_so << _s;
+}
+
+HRESULT CHashCallbackConsole::SetOperationResult(UInt64 fileSize, const CHashBundle &hb, bool showHash)
+{
+ if (_so)
+ {
+ PrintResultLine(fileSize, hb.Hashers, k_HashCalc_Index_Current, showHash);
+ if (PrintName)
+ {
+ if (_fileName.IsEmpty())
+ *_so << kEmptyFileAlias;
+ else
+ *_so << _fileName;
+ }
+ *_so << endl;
+ }
+
+ if (NeedPercents())
+ {
+ _percent.Files++;
+ _percent.Print();
+ }
+
+ return CheckBreak2();
+}
+
+static const char *k_DigestTitles[] =
+{
+ " : "
+ , " for data: "
+ , " for data and names: "
+ , " for streams and names: "
+};
+
+static void PrintSum(CStdOutStream &so, const CHasherState &h, unsigned digestIndex)
+{
+ so << h.Name;
+
+ {
+ AString temp;
+ AddSpaces_if_Positive(temp, 6 - (int)h.Name.Len());
+ so << temp;
+ }
+
+ so << k_DigestTitles[digestIndex];
+
+ char s[k_HashCalc_DigestSize_Max * 2 + 64];
+ s[0] = 0;
+ AddHashHexToString(s, h.Digests[digestIndex], h.DigestSize);
+ so << s << endl;
+}
+
+void PrintHashStat(CStdOutStream &so, const CHashBundle &hb)
+{
+ FOR_VECTOR (i, hb.Hashers)
+ {
+ const CHasherState &h = hb.Hashers[i];
+ PrintSum(so, h, k_HashCalc_Index_DataSum);
+ if (hb.NumFiles != 1 || hb.NumDirs != 0)
+ PrintSum(so, h, k_HashCalc_Index_NamesSum);
+ if (hb.NumAltStreams != 0)
+ PrintSum(so, h, k_HashCalc_Index_StreamsSum);
+ so << endl;
+ }
+}
+
+void CHashCallbackConsole::PrintProperty(const char *name, UInt64 value)
+{
+ char s[32];
+ s[0] = ':';
+ s[1] = ' ';
+ ConvertUInt64ToString(value, s + 2);
+ *_so << name << s << endl;
+}
+
+HRESULT CHashCallbackConsole::AfterLastFile(const CHashBundle &hb)
+{
+ ClosePercents2();
+
+ if (PrintHeaders && _so)
+ {
+ PrintSeparatorLine(hb.Hashers);
+
+ PrintResultLine(hb.FilesSize, hb.Hashers, k_HashCalc_Index_DataSum, true);
+
+ *_so << endl << endl;
+
+ if (hb.NumFiles != 1 || hb.NumDirs != 0)
+ {
+ if (hb.NumDirs != 0)
+ PrintProperty("Folders", hb.NumDirs);
+ PrintProperty("Files", hb.NumFiles);
+ }
+
+ PrintProperty("Size", hb.FilesSize);
+
+ if (hb.NumAltStreams != 0)
+ {
+ PrintProperty("Alternate streams", hb.NumAltStreams);
+ PrintProperty("Alternate streams size", hb.AltStreamsSize);
+ }
+
+ *_so << endl;
+ PrintHashStat(*_so, hb);
+ }
+
+ return S_OK;
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/HashCon.h b/3rdparty/lzma/CPP/7zip/UI/Console/HashCon.h
new file mode 100644
index 00000000000..5b30b69a058
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/HashCon.h
@@ -0,0 +1,48 @@
+// HashCon.h
+
+#ifndef __HASH_CON_H
+#define __HASH_CON_H
+
+#include "../Common/HashCalc.h"
+
+#include "UpdateCallbackConsole.h"
+
+class CHashCallbackConsole: public IHashCallbackUI, public CCallbackConsoleBase
+{
+ UString _fileName;
+ AString _s;
+
+ void AddSpacesBeforeName()
+ {
+ _s.Add_Space();
+ _s.Add_Space();
+ }
+
+ void PrintSeparatorLine(const CObjectVector<CHasherState> &hashers);
+ void PrintResultLine(UInt64 fileSize,
+ const CObjectVector<CHasherState> &hashers, unsigned digestIndex, bool showHash);
+ void PrintProperty(const char *name, UInt64 value);
+
+public:
+ bool PrintNameInPercents;
+
+ bool PrintHeaders;
+
+ bool PrintSize;
+ bool PrintName;
+
+ CHashCallbackConsole():
+ PrintNameInPercents(true),
+ PrintHeaders(false),
+ PrintSize(true),
+ PrintName(true)
+ {}
+
+ ~CHashCallbackConsole() { }
+
+ INTERFACE_IHashCallbackUI(;)
+};
+
+void PrintHashStat(CStdOutStream &so, const CHashBundle &hb);
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/List.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/List.cpp
index 7de2379ad11..e70f1b67ed2 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/List.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/List.cpp
@@ -2,17 +2,16 @@
#include "StdAfx.h"
-#include "Common/IntToString.h"
-#include "Common/MyCom.h"
-#include "Common/StdOutStream.h"
-#include "Common/StringConvert.h"
+#include "../../../Common/IntToString.h"
+#include "../../../Common/MyCom.h"
+#include "../../../Common/StdOutStream.h"
+#include "../../../Common/StringConvert.h"
+#include "../../../Common/UTFConvert.h"
-#include "Windows/Error.h"
-#include "Windows/FileDir.h"
-#include "Windows/PropVariant.h"
-#include "Windows/PropVariantConversions.h"
-
-#include "../../Archive/IArchive.h"
+#include "../../../Windows/ErrorMsg.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/PropVariant.h"
+#include "../../../Windows/PropVariantConv.h"
#include "../Common/OpenArchive.h"
#include "../Common/PropIDUtils.h"
@@ -22,88 +21,137 @@
#include "OpenCallbackConsole.h"
using namespace NWindows;
+using namespace NCOM;
-struct CPropIdToName
-{
- PROPID PropID;
- const wchar_t *Name;
-};
+extern CStdOutStream *g_StdStream;
+extern CStdOutStream *g_ErrStream;
-static const CPropIdToName kPropIdToName[] =
-{
- { kpidPath, L"Path" },
- { kpidName, L"Name" },
- { kpidIsDir, L"Folder" },
- { kpidSize, L"Size" },
- { kpidPackSize, L"Packed Size" },
- { kpidAttrib, L"Attributes" },
- { kpidCTime, L"Created" },
- { kpidATime, L"Accessed" },
- { kpidMTime, L"Modified" },
- { kpidSolid, L"Solid" },
- { kpidCommented, L"Commented" },
- { kpidEncrypted, L"Encrypted" },
- { kpidSplitBefore, L"Split Before" },
- { kpidSplitAfter, L"Split After" },
- { kpidDictionarySize, L"Dictionary Size" },
- { kpidCRC, L"CRC" },
- { kpidType, L"Type" },
- { kpidIsAnti, L"Anti" },
- { kpidMethod, L"Method" },
- { kpidHostOS, L"Host OS" },
- { kpidFileSystem, L"File System" },
- { kpidUser, L"User" },
- { kpidGroup, L"Group" },
- { kpidBlock, L"Block" },
- { kpidComment, L"Comment" },
- { kpidPosition, L"Position" },
- { kpidPrefix, L"Prefix" },
- { kpidNumSubDirs, L"Folders" },
- { kpidNumSubFiles, L"Files" },
- { kpidUnpackVer, L"Version" },
- { kpidVolume, L"Volume" },
- { kpidIsVolume, L"Multivolume" },
- { kpidOffset, L"Offset" },
- { kpidLinks, L"Links" },
- { kpidNumBlocks, L"Blocks" },
- { kpidNumVolumes, L"Volumes" },
-
- { kpidBit64, L"64-bit" },
- { kpidBigEndian, L"Big-endian" },
- { kpidCpu, L"CPU" },
- { kpidPhySize, L"Physical Size" },
- { kpidHeadersSize, L"Headers Size" },
- { kpidChecksum, L"Checksum" },
- { kpidCharacts, L"Characteristics" },
- { kpidVa, L"Virtual Address" },
- { kpidId, L"ID" },
- { kpidShortName, L"Short Name" },
- { kpidCreatorApp, L"Creator Application"},
- { kpidSectorSize, L"Sector Size" },
- { kpidPosixAttrib, L"Mode" },
- { kpidLink, L"Link" },
- { kpidError, L"Error" },
-
- { kpidTotalSize, L"Total Size" },
- { kpidFreeSpace, L"Free Space" },
- { kpidClusterSize, L"Cluster Size" },
- { kpidVolumeName, L"Label" }
+static const char * const kPropIdToName[] =
+{
+ "0"
+ , "1"
+ , "2"
+ , "Path"
+ , "Name"
+ , "Extension"
+ , "Folder"
+ , "Size"
+ , "Packed Size"
+ , "Attributes"
+ , "Created"
+ , "Accessed"
+ , "Modified"
+ , "Solid"
+ , "Commented"
+ , "Encrypted"
+ , "Split Before"
+ , "Split After"
+ , "Dictionary Size"
+ , "CRC"
+ , "Type"
+ , "Anti"
+ , "Method"
+ , "Host OS"
+ , "File System"
+ , "User"
+ , "Group"
+ , "Block"
+ , "Comment"
+ , "Position"
+ , "Path Prefix"
+ , "Folders"
+ , "Files"
+ , "Version"
+ , "Volume"
+ , "Multivolume"
+ , "Offset"
+ , "Links"
+ , "Blocks"
+ , "Volumes"
+ , "Time Type"
+ , "64-bit"
+ , "Big-endian"
+ , "CPU"
+ , "Physical Size"
+ , "Headers Size"
+ , "Checksum"
+ , "Characteristics"
+ , "Virtual Address"
+ , "ID"
+ , "Short Name"
+ , "Creator Application"
+ , "Sector Size"
+ , "Mode"
+ , "Symbolic Link"
+ , "Error"
+ , "Total Size"
+ , "Free Space"
+ , "Cluster Size"
+ , "Label"
+ , "Local Name"
+ , "Provider"
+ , "NT Security"
+ , "Alternate Stream"
+ , "Aux"
+ , "Deleted"
+ , "Tree"
+ , "SHA-1"
+ , "SHA-256"
+ , "Error Type"
+ , "Errors"
+ , "Errors"
+ , "Warnings"
+ , "Warning"
+ , "Streams"
+ , "Alternate Streams"
+ , "Alternate Streams Size"
+ , "Virtual Size"
+ , "Unpack Size"
+ , "Total Physical Size"
+ , "Volume Index"
+ , "SubType"
+ , "Short Comment"
+ , "Code Page"
+ , "Is not archive type"
+ , "Physical Size can't be detected"
+ , "Zeros Tail Is Allowed"
+ , "Tail Size"
+ , "Embedded Stub Size"
+ , "Link"
+ , "Hard Link"
+ , "iNode"
+ , "Stream ID"
+ , "Read-only"
+ , "Out Name"
+ , "Copy Link"
};
static const char kEmptyAttribChar = '.';
static const char *kListing = "Listing archive: ";
-static const wchar_t *kFilesMessage = L"files";
-static const wchar_t *kDirsMessage = L"folders";
-static void GetAttribString(DWORD wa, bool isDir, char *s)
+static const char *kString_Files = "files";
+static const char *kString_Dirs = "folders";
+static const char *kString_AltStreams = "alternate streams";
+static const char *kString_Streams = "streams";
+
+static const char *kError = "ERROR: ";
+
+static void GetAttribString(UInt32 wa, bool isDir, bool allAttribs, char *s)
{
- s[0] = ((wa & FILE_ATTRIBUTE_DIRECTORY) != 0 || isDir) ? 'D' : kEmptyAttribChar;
- s[1] = ((wa & FILE_ATTRIBUTE_READONLY) != 0) ? 'R': kEmptyAttribChar;
- s[2] = ((wa & FILE_ATTRIBUTE_HIDDEN) != 0) ? 'H': kEmptyAttribChar;
- s[3] = ((wa & FILE_ATTRIBUTE_SYSTEM) != 0) ? 'S': kEmptyAttribChar;
- s[4] = ((wa & FILE_ATTRIBUTE_ARCHIVE) != 0) ? 'A': kEmptyAttribChar;
- s[5] = '\0';
+ if (isDir)
+ wa |= FILE_ATTRIBUTE_DIRECTORY;
+ if (allAttribs)
+ {
+ ConvertWinAttribToString(s, wa);
+ return;
+ }
+ s[0] = ((wa & FILE_ATTRIBUTE_DIRECTORY) != 0) ? 'D': kEmptyAttribChar;
+ s[1] = ((wa & FILE_ATTRIBUTE_READONLY) != 0) ? 'R': kEmptyAttribChar;
+ s[2] = ((wa & FILE_ATTRIBUTE_HIDDEN) != 0) ? 'H': kEmptyAttribChar;
+ s[3] = ((wa & FILE_ATTRIBUTE_SYSTEM) != 0) ? 'S': kEmptyAttribChar;
+ s[4] = ((wa & FILE_ATTRIBUTE_ARCHIVE) != 0) ? 'A': kEmptyAttribChar;
+ s[5] = 0;
}
enum EAdjustment
@@ -116,108 +164,294 @@ enum EAdjustment
struct CFieldInfo
{
PROPID PropID;
- UString Name;
+ bool IsRawProp;
+ UString NameU;
+ AString NameA;
EAdjustment TitleAdjustment;
EAdjustment TextAdjustment;
- int PrefixSpacesWidth;
- int Width;
+ unsigned PrefixSpacesWidth;
+ unsigned Width;
};
struct CFieldInfoInit
{
PROPID PropID;
- const wchar_t *Name;
+ const char *Name;
EAdjustment TitleAdjustment;
EAdjustment TextAdjustment;
- int PrefixSpacesWidth;
- int Width;
+ unsigned PrefixSpacesWidth;
+ unsigned Width;
};
-static CFieldInfoInit kStandardFieldTable[] =
+static const CFieldInfoInit kStandardFieldTable[] =
{
- { kpidMTime, L" Date Time", kLeft, kLeft, 0, 19 },
- { kpidAttrib, L"Attr", kRight, kCenter, 1, 5 },
- { kpidSize, L"Size", kRight, kRight, 1, 12 },
- { kpidPackSize, L"Compressed", kRight, kRight, 1, 12 },
- { kpidPath, L"Name", kLeft, kLeft, 2, 24 }
+ { kpidMTime, " Date Time", kLeft, kLeft, 0, 19 },
+ { kpidAttrib, "Attr", kRight, kCenter, 1, 5 },
+ { kpidSize, "Size", kRight, kRight, 1, 12 },
+ { kpidPackSize, "Compressed", kRight, kRight, 1, 12 },
+ { kpidPath, "Name", kLeft, kLeft, 2, 24 }
};
-static void PrintSpaces(int numSpaces)
+const unsigned kNumSpacesMax = 32; // it must be larger than max CFieldInfoInit.Width
+static const char *g_Spaces =
+" " ;
+
+static void PrintSpaces(unsigned numSpaces)
{
- for (int i = 0; i < numSpaces; i++)
- g_StdOut << ' ';
+ if (numSpaces > 0 && numSpaces <= kNumSpacesMax)
+ g_StdOut << g_Spaces + (kNumSpacesMax - numSpaces);
}
-static void PrintString(EAdjustment adjustment, int width, const UString &textString)
+static void PrintSpacesToString(char *dest, unsigned numSpaces)
{
- const int numSpaces = width - textString.Length();
- int numLeftSpaces = 0;
- switch (adjustment)
+ unsigned i;
+ for (i = 0; i < numSpaces; i++)
+ dest[i] = ' ';
+ dest[i] = 0;
+}
+
+// extern int g_CodePage;
+
+static void PrintUString(EAdjustment adj, unsigned width, const UString &s, AString &temp)
+{
+ /*
+ // we don't need multibyte align.
+ int codePage = g_CodePage;
+ if (codePage == -1)
+ codePage = CP_OEMCP;
+ if (codePage == CP_UTF8)
+ ConvertUnicodeToUTF8(s, temp);
+ else
+ UnicodeStringToMultiByte2(temp, s, (UINT)codePage);
+ */
+
+ unsigned numSpaces = 0;
+
+ if (width > s.Len())
{
- case kLeft:
- numLeftSpaces = 0;
- break;
- case kCenter:
- numLeftSpaces = numSpaces / 2;
- break;
- case kRight:
- numLeftSpaces = numSpaces;
- break;
+ numSpaces = width - s.Len();
+ unsigned numLeftSpaces = 0;
+ switch (adj)
+ {
+ case kLeft: numLeftSpaces = 0; break;
+ case kCenter: numLeftSpaces = numSpaces / 2; break;
+ case kRight: numLeftSpaces = numSpaces; break;
+ }
+ PrintSpaces(numLeftSpaces);
+ numSpaces -= numLeftSpaces;
}
- PrintSpaces(numLeftSpaces);
- g_StdOut << textString;
- PrintSpaces(numSpaces - numLeftSpaces);
+
+ g_StdOut.PrintUString(s, temp);
+ PrintSpaces(numSpaces);
}
+static void PrintString(EAdjustment adj, unsigned width, const char *s)
+{
+ unsigned numSpaces = 0;
+ unsigned len = (unsigned)strlen(s);
+
+ if (width > len)
+ {
+ numSpaces = width - len;
+ unsigned numLeftSpaces = 0;
+ switch (adj)
+ {
+ case kLeft: numLeftSpaces = 0; break;
+ case kCenter: numLeftSpaces = numSpaces / 2; break;
+ case kRight: numLeftSpaces = numSpaces; break;
+ }
+ PrintSpaces(numLeftSpaces);
+ numSpaces -= numLeftSpaces;
+ }
+
+ g_StdOut << s;
+ PrintSpaces(numSpaces);
+}
+
+static void PrintStringToString(char *dest, EAdjustment adj, unsigned width, const char *textString)
+{
+ unsigned numSpaces = 0;
+ unsigned len = (unsigned)strlen(textString);
+
+ if (width > len)
+ {
+ numSpaces = width - len;
+ unsigned numLeftSpaces = 0;
+ switch (adj)
+ {
+ case kLeft: numLeftSpaces = 0; break;
+ case kCenter: numLeftSpaces = numSpaces / 2; break;
+ case kRight: numLeftSpaces = numSpaces; break;
+ }
+ PrintSpacesToString(dest, numLeftSpaces);
+ dest += numLeftSpaces;
+ numSpaces -= numLeftSpaces;
+ }
+
+ memcpy(dest, textString, len);
+ dest += len;
+ PrintSpacesToString(dest, numSpaces);
+}
+
+struct CListUInt64Def
+{
+ UInt64 Val;
+ bool Def;
+
+ CListUInt64Def(): Val(0), Def(false) {}
+ void Add(UInt64 v) { Val += v; Def = true; }
+ void Add(const CListUInt64Def &v) { if (v.Def) Add(v.Val); }
+};
+
+struct CListFileTimeDef
+{
+ FILETIME Val;
+ bool Def;
+
+ CListFileTimeDef(): Def(false) { Val.dwLowDateTime = 0; Val.dwHighDateTime = 0; }
+ void Update(const CListFileTimeDef &t)
+ {
+ if (t.Def && (!Def || CompareFileTime(&Val, &t.Val) < 0))
+ {
+ Val = t.Val;
+ Def = true;
+ }
+ }
+};
+
+struct CListStat
+{
+ CListUInt64Def Size;
+ CListUInt64Def PackSize;
+ CListFileTimeDef MTime;
+ UInt64 NumFiles;
+
+ CListStat(): NumFiles(0) {}
+ void Update(const CListStat &st)
+ {
+ Size.Add(st.Size);
+ PackSize.Add(st.PackSize);
+ MTime.Update(st.MTime);
+ NumFiles += st.NumFiles;
+ }
+ void SetSizeDefIfNoFiles() { if (NumFiles == 0) Size.Def = true; }
+};
+
+struct CListStat2
+{
+ CListStat MainFiles;
+ CListStat AltStreams;
+ UInt64 NumDirs;
+
+ CListStat2(): NumDirs(0) {}
+
+ void Update(const CListStat2 &st)
+ {
+ MainFiles.Update(st.MainFiles);
+ AltStreams.Update(st.AltStreams);
+ NumDirs += st.NumDirs;
+ }
+ const UInt64 GetNumStreams() const { return MainFiles.NumFiles + AltStreams.NumFiles; }
+ CListStat &GetStat(bool altStreamsMode) { return altStreamsMode ? AltStreams : MainFiles; }
+};
+
class CFieldPrinter
{
CObjectVector<CFieldInfo> _fields;
+
+ void AddProp(const wchar_t *name, PROPID propID, bool isRawProp);
public:
- void Clear() { _fields.Clear(); }
- void Init(const CFieldInfoInit *standardFieldTable, int numItems);
- HRESULT Init(IInArchive *archive);
+ const CArc *Arc;
+ bool TechMode;
+ UString FilePath;
+ AString TempAString;
+ UString TempWString;
+ bool IsDir;
+
+ AString LinesString;
+
+ void Clear() { _fields.Clear(); LinesString.Empty(); }
+ void Init(const CFieldInfoInit *standardFieldTable, unsigned numItems);
+
+ HRESULT AddMainProps(IInArchive *archive);
+ HRESULT AddRawProps(IArchiveGetRawProps *getRawProps);
+
void PrintTitle();
void PrintTitleLines();
- HRESULT PrintItemInfo(const CArc &arc, UInt32 index, bool techMode);
- HRESULT PrintSummaryInfo(UInt64 numFiles, UInt64 numDirs,
- const UInt64 *size, const UInt64 *compressedSize);
+ HRESULT PrintItemInfo(UInt32 index, const CListStat &st);
+ void PrintSum(const CListStat &st, UInt64 numDirs, const char *str);
+ void PrintSum(const CListStat2 &stat2);
};
-void CFieldPrinter::Init(const CFieldInfoInit *standardFieldTable, int numItems)
+void CFieldPrinter::Init(const CFieldInfoInit *standardFieldTable, unsigned numItems)
{
Clear();
- for (int i = 0; i < numItems; i++)
+ for (unsigned i = 0; i < numItems; i++)
{
- CFieldInfo fieldInfo;
- const CFieldInfoInit &fieldInfoInit = standardFieldTable[i];
- fieldInfo.PropID = fieldInfoInit.PropID;
- fieldInfo.Name = fieldInfoInit.Name;
- fieldInfo.TitleAdjustment = fieldInfoInit.TitleAdjustment;
- fieldInfo.TextAdjustment = fieldInfoInit.TextAdjustment;
- fieldInfo.PrefixSpacesWidth = fieldInfoInit.PrefixSpacesWidth;
- fieldInfo.Width = fieldInfoInit.Width;
- _fields.Add(fieldInfo);
+ CFieldInfo &f = _fields.AddNew();
+ const CFieldInfoInit &fii = standardFieldTable[i];
+ f.PropID = fii.PropID;
+ f.IsRawProp = false;
+ f.NameA = fii.Name;
+ f.TitleAdjustment = fii.TitleAdjustment;
+ f.TextAdjustment = fii.TextAdjustment;
+ f.PrefixSpacesWidth = fii.PrefixSpacesWidth;
+ f.Width = fii.Width;
+
+ unsigned k;
+ for (k = 0; k < fii.PrefixSpacesWidth; k++)
+ LinesString.Add_Space();
+ for (k = 0; k < fii.Width; k++)
+ LinesString += '-';
}
}
-static UString GetPropName(PROPID propID, BSTR name)
+static void GetPropName(PROPID propID, const wchar_t *name, AString &nameA, UString &nameU)
{
- for (int i = 0; i < sizeof(kPropIdToName) / sizeof(kPropIdToName[0]); i++)
+ if (propID < ARRAY_SIZE(kPropIdToName))
{
- const CPropIdToName &propIdToName = kPropIdToName[i];
- if (propIdToName.PropID == propID)
- return propIdToName.Name;
+ nameA = kPropIdToName[propID];
+ return;
}
if (name)
- return name;
- wchar_t s[16];
- ConvertUInt32ToString(propID, s);
- return s;
+ nameU = name;
+ else
+ {
+ char s[16];
+ ConvertUInt32ToString(propID, s);
+ nameA = s;
+ }
}
-HRESULT CFieldPrinter::Init(IInArchive *archive)
+void CFieldPrinter::AddProp(const wchar_t *name, PROPID propID, bool isRawProp)
+{
+ CFieldInfo f;
+ f.PropID = propID;
+ f.IsRawProp = isRawProp;
+ GetPropName(propID, name, f.NameA, f.NameU);
+ f.NameU.AddAscii(" = ");
+ if (!f.NameA.IsEmpty())
+ f.NameA += " = ";
+ else
+ {
+ const UString &s = f.NameU;
+ AString sA;
+ unsigned i;
+ for (i = 0; i < s.Len(); i++)
+ {
+ wchar_t c = s[i];
+ if (c >= 0x80)
+ break;
+ sA += (char)c;
+ }
+ if (i == s.Len())
+ f.NameA = sA;
+ }
+ _fields.Add(f);
+}
+
+HRESULT CFieldPrinter::AddMainProps(IInArchive *archive)
{
- Clear();
UInt32 numProps;
RINOK(archive->GetNumberOfProperties(&numProps));
for (UInt32 i = 0; i < numProps; i++)
@@ -226,64 +460,80 @@ HRESULT CFieldPrinter::Init(IInArchive *archive)
PROPID propID;
VARTYPE vt;
RINOK(archive->GetPropertyInfo(i, &name, &propID, &vt));
- CFieldInfo fieldInfo;
- fieldInfo.PropID = propID;
- fieldInfo.Name = GetPropName(propID, name);
- _fields.Add(fieldInfo);
+ AddProp(name, propID, false);
}
return S_OK;
}
-void CFieldPrinter::PrintTitle()
+HRESULT CFieldPrinter::AddRawProps(IArchiveGetRawProps *getRawProps)
{
- for (int i = 0; i < _fields.Size(); i++)
+ UInt32 numProps;
+ RINOK(getRawProps->GetNumRawProps(&numProps));
+ for (UInt32 i = 0; i < numProps; i++)
{
- const CFieldInfo &fieldInfo = _fields[i];
- PrintSpaces(fieldInfo.PrefixSpacesWidth);
- PrintString(fieldInfo.TitleAdjustment,
- ((fieldInfo.PropID == kpidPath) ? 0: fieldInfo.Width), fieldInfo.Name);
+ CMyComBSTR name;
+ PROPID propID;
+ RINOK(getRawProps->GetRawPropInfo(i, &name, &propID));
+ AddProp(name, propID, true);
}
+ return S_OK;
}
-void CFieldPrinter::PrintTitleLines()
+void CFieldPrinter::PrintTitle()
{
- for (int i = 0; i < _fields.Size(); i++)
+ FOR_VECTOR (i, _fields)
{
- const CFieldInfo &fieldInfo = _fields[i];
- PrintSpaces(fieldInfo.PrefixSpacesWidth);
- for (int i = 0; i < fieldInfo.Width; i++)
- g_StdOut << '-';
+ const CFieldInfo &f = _fields[i];
+ PrintSpaces(f.PrefixSpacesWidth);
+ PrintString(f.TitleAdjustment, ((f.PropID == kpidPath) ? 0: f.Width), f.NameA);
}
}
+void CFieldPrinter::PrintTitleLines()
+{
+ g_StdOut << LinesString;
+}
-static BOOL IsFileTimeZero(CONST FILETIME *lpFileTime)
+static void PrintTime(char *dest, const FILETIME *ft)
{
- return (lpFileTime->dwLowDateTime == 0) && (lpFileTime->dwHighDateTime == 0);
+ *dest = 0;
+ if (ft->dwLowDateTime == 0 && ft->dwHighDateTime == 0)
+ return;
+ FILETIME locTime;
+ if (!FileTimeToLocalFileTime(ft, &locTime))
+ throw 20121211;
+ ConvertFileTimeToString(locTime, dest, true, true);
}
-static const char *kEmptyTimeString = " ";
-static void PrintTime(const NCOM::CPropVariant &prop)
+#ifndef _SFX
+
+static inline char GetHex(Byte value)
{
- if (prop.vt != VT_FILETIME)
- throw "incorrect item";
- if (IsFileTimeZero(&prop.filetime))
- g_StdOut << kEmptyTimeString;
- else
+ return (char)((value < 10) ? ('0' + value) : ('A' + (value - 10)));
+}
+
+static void HexToString(char *dest, const Byte *data, UInt32 size)
+{
+ for (UInt32 i = 0; i < size; i++)
{
- FILETIME localFileTime;
- if (!FileTimeToLocalFileTime(&prop.filetime, &localFileTime))
- throw "FileTimeToLocalFileTime error";
- char s[32];
- if (ConvertFileTimeToString(localFileTime, s, true, true))
- g_StdOut << s;
- else
- g_StdOut << kEmptyTimeString;
+ Byte b = data[i];
+ dest[0] = GetHex((Byte)((b >> 4) & 0xF));
+ dest[1] = GetHex((Byte)(b & 0xF));
+ dest += 2;
}
+ *dest = 0;
}
-HRESULT CFieldPrinter::PrintItemInfo(const CArc &arc, UInt32 index, bool techMode)
+#endif
+
+#define MY_ENDL endl
+
+HRESULT CFieldPrinter::PrintItemInfo(UInt32 index, const CListStat &st)
{
+ char temp[128];
+ size_t tempPos = 0;
+
+ bool techMode = this->TechMode;
/*
if (techMode)
{
@@ -292,165 +542,502 @@ HRESULT CFieldPrinter::PrintItemInfo(const CArc &arc, UInt32 index, bool techMod
g_StdOut << endl;
}
*/
- for (int i = 0; i < _fields.Size(); i++)
+ FOR_VECTOR (i, _fields)
{
- const CFieldInfo &fieldInfo = _fields[i];
- if (!techMode)
- PrintSpaces(fieldInfo.PrefixSpacesWidth);
+ const CFieldInfo &f = _fields[i];
- NCOM::CPropVariant prop;
- if (fieldInfo.PropID == kpidPath)
- {
- UString s;
- RINOK(arc.GetItemPath(index, s));
- prop = s;
- }
- else
+ if (!techMode)
{
- RINOK(arc.Archive->GetProperty(index, fieldInfo.PropID, &prop));
+ PrintSpacesToString(temp + tempPos, f.PrefixSpacesWidth);
+ tempPos += f.PrefixSpacesWidth;
}
+
if (techMode)
{
- g_StdOut << fieldInfo.Name << " = ";
- }
- int width = (fieldInfo.PropID == kpidPath) ? 0: fieldInfo.Width;
- if (fieldInfo.PropID == kpidAttrib && (prop.vt == VT_EMPTY || prop.vt == VT_UI4))
- {
- UInt32 attrib = (prop.vt == VT_EMPTY) ? 0 : prop.ulVal;
- bool isFolder;
- RINOK(IsArchiveItemFolder(arc.Archive, index, isFolder));
- char s[8];
- GetAttribString(attrib, isFolder, s);
- g_StdOut << s;
+ if (!f.NameA.IsEmpty())
+ g_StdOut << f.NameA;
+ else
+ g_StdOut << f.NameU;
}
- else if (prop.vt == VT_EMPTY)
+
+ if (f.PropID == kpidPath)
{
if (!techMode)
- PrintSpaces(width);
- }
- else if (fieldInfo.PropID == kpidMTime)
- {
- PrintTime(prop);
+ g_StdOut << temp;
+ g_StdOut.PrintUString(FilePath, TempAString);
+ if (techMode)
+ g_StdOut << MY_ENDL;
+ continue;
}
- else if (prop.vt == VT_BSTR)
+
+ const unsigned width = f.Width;
+
+ if (f.IsRawProp)
{
- if (techMode)
- g_StdOut << prop.bstrVal;
- else
- PrintString(fieldInfo.TextAdjustment, width, prop.bstrVal);
+ #ifndef _SFX
+
+ const void *data;
+ UInt32 dataSize;
+ UInt32 propType;
+ RINOK(Arc->GetRawProps->GetRawProp(index, f.PropID, &data, &dataSize, &propType));
+
+ if (dataSize != 0)
+ {
+ bool needPrint = true;
+
+ if (f.PropID == kpidNtSecure)
+ {
+ if (propType != NPropDataType::kRaw)
+ return E_FAIL;
+ #ifndef _SFX
+ ConvertNtSecureToString((const Byte *)data, dataSize, TempAString);
+ g_StdOut << TempAString;
+ needPrint = false;
+ #endif
+ }
+ else if (f.PropID == kpidNtReparse)
+ {
+ UString s;
+ if (ConvertNtReparseToString((const Byte *)data, dataSize, s))
+ {
+ needPrint = false;
+ g_StdOut.PrintUString(s, TempAString);
+ }
+ }
+
+ if (needPrint)
+ {
+ if (propType != NPropDataType::kRaw)
+ return E_FAIL;
+
+ const UInt32 kMaxDataSize = 64;
+
+ if (dataSize > kMaxDataSize)
+ {
+ g_StdOut << "data:";
+ g_StdOut << dataSize;
+ }
+ else
+ {
+ char hexStr[kMaxDataSize * 2 + 4];
+ HexToString(hexStr, (const Byte *)data, dataSize);
+ g_StdOut << hexStr;
+ }
+ }
+ }
+
+ #endif
}
else
{
- UString s = ConvertPropertyToString(prop, fieldInfo.PropID);
- s.Replace(wchar_t(0xA), L' ');
- s.Replace(wchar_t(0xD), L' ');
-
- if (techMode)
- g_StdOut << s;
+ CPropVariant prop;
+ switch (f.PropID)
+ {
+ case kpidSize: if (st.Size.Def) prop = st.Size.Val; break;
+ case kpidPackSize: if (st.PackSize.Def) prop = st.PackSize.Val; break;
+ case kpidMTime: if (st.MTime.Def) prop = st.MTime.Val; break;
+ default:
+ RINOK(Arc->Archive->GetProperty(index, f.PropID, &prop));
+ }
+ if (f.PropID == kpidAttrib && (prop.vt == VT_EMPTY || prop.vt == VT_UI4))
+ {
+ GetAttribString((prop.vt == VT_EMPTY) ? 0 : prop.ulVal, IsDir, techMode, temp + tempPos);
+ if (techMode)
+ g_StdOut << temp + tempPos;
+ else
+ tempPos += strlen(temp + tempPos);
+ }
+ else if (prop.vt == VT_EMPTY)
+ {
+ if (!techMode)
+ {
+ PrintSpacesToString(temp + tempPos, width);
+ tempPos += width;
+ }
+ }
+ else if (prop.vt == VT_FILETIME)
+ {
+ PrintTime(temp + tempPos, &prop.filetime);
+ if (techMode)
+ g_StdOut << temp + tempPos;
+ else
+ {
+ size_t len = strlen(temp + tempPos);
+ tempPos += len;
+ if (len < (unsigned)f.Width)
+ {
+ len = f.Width - len;
+ PrintSpacesToString(temp + tempPos, (unsigned)len);
+ tempPos += len;
+ }
+ }
+ }
+ else if (prop.vt == VT_BSTR)
+ {
+ TempWString.SetFromBstr(prop.bstrVal);
+ if (techMode)
+ {
+ // replace CR/LF here.
+ g_StdOut.PrintUString(TempWString, TempAString);
+ }
+ else
+ PrintUString(f.TextAdjustment, width, TempWString, TempAString);
+ }
else
- PrintString(fieldInfo.TextAdjustment, width, s);
+ {
+ char s[64];
+ ConvertPropertyToShortString(s, prop, f.PropID);
+ if (techMode)
+ g_StdOut << s;
+ else
+ {
+ PrintStringToString(temp + tempPos, f.TextAdjustment, width, s);
+ tempPos += strlen(temp + tempPos);
+ }
+ }
}
if (techMode)
- g_StdOut << endl;
+ g_StdOut << MY_ENDL;
}
+ g_StdOut << MY_ENDL;
return S_OK;
}
-static void PrintNumberString(EAdjustment adjustment, int width, const UInt64 *value)
+static void PrintNumber(EAdjustment adj, unsigned width, const CListUInt64Def &value)
{
- wchar_t textString[32] = { 0 };
- if (value != NULL)
- ConvertUInt64ToString(*value, textString);
- PrintString(adjustment, width, textString);
+ char s[32];
+ s[0] = 0;
+ if (value.Def)
+ ConvertUInt64ToString(value.Val, s);
+ PrintString(adj, width, s);
}
+void Print_UInt64_and_String(AString &s, UInt64 val, const char *name);
-HRESULT CFieldPrinter::PrintSummaryInfo(UInt64 numFiles, UInt64 numDirs,
- const UInt64 *size, const UInt64 *compressedSize)
+void CFieldPrinter::PrintSum(const CListStat &st, UInt64 numDirs, const char *str)
{
- for (int i = 0; i < _fields.Size(); i++)
+ FOR_VECTOR (i, _fields)
{
- const CFieldInfo &fieldInfo = _fields[i];
- PrintSpaces(fieldInfo.PrefixSpacesWidth);
- NCOM::CPropVariant prop;
- if (fieldInfo.PropID == kpidSize)
- PrintNumberString(fieldInfo.TextAdjustment, fieldInfo.Width, size);
- else if (fieldInfo.PropID == kpidPackSize)
- PrintNumberString(fieldInfo.TextAdjustment, fieldInfo.Width, compressedSize);
- else if (fieldInfo.PropID == kpidPath)
+ const CFieldInfo &f = _fields[i];
+ PrintSpaces(f.PrefixSpacesWidth);
+ if (f.PropID == kpidSize)
+ PrintNumber(f.TextAdjustment, f.Width, st.Size);
+ else if (f.PropID == kpidPackSize)
+ PrintNumber(f.TextAdjustment, f.Width, st.PackSize);
+ else if (f.PropID == kpidMTime)
{
- wchar_t textString[32];
- ConvertUInt64ToString(numFiles, textString);
- UString temp = textString;
- temp += L" ";
- temp += kFilesMessage;
- temp += L", ";
- ConvertUInt64ToString(numDirs, textString);
- temp += textString;
- temp += L" ";
- temp += kDirsMessage;
- PrintString(fieldInfo.TextAdjustment, 0, temp);
+ char s[64];
+ s[0] = 0;
+ if (st.MTime.Def)
+ PrintTime(s, &st.MTime.Val);
+ PrintString(f.TextAdjustment, f.Width, s);
}
+ else if (f.PropID == kpidPath)
+ {
+ AString s;
+ Print_UInt64_and_String(s, st.NumFiles, str);
+ if (numDirs != 0)
+ {
+ s += ", ";
+ Print_UInt64_and_String(s, numDirs, kString_Dirs);
+ }
+ PrintString(f.TextAdjustment, 0, s);
+ }
+ else
+ PrintString(f.TextAdjustment, f.Width, "");
+ }
+ g_StdOut << endl;
+}
+
+void CFieldPrinter::PrintSum(const CListStat2 &stat2)
+{
+ PrintSum(stat2.MainFiles, stat2.NumDirs, kString_Files);
+ if (stat2.AltStreams.NumFiles != 0)
+ {
+ PrintSum(stat2.AltStreams, 0, kString_AltStreams);;
+ CListStat st = stat2.MainFiles;
+ st.Update(stat2.AltStreams);
+ PrintSum(st, 0, kString_Streams);
+ }
+}
+
+static HRESULT GetUInt64Value(IInArchive *archive, UInt32 index, PROPID propID, CListUInt64Def &value)
+{
+ value.Val = 0;
+ value.Def = false;
+ CPropVariant prop;
+ RINOK(archive->GetProperty(index, propID, &prop));
+ value.Def = ConvertPropVariantToUInt64(prop, value.Val);
+ return S_OK;
+}
+
+static HRESULT GetItemMTime(IInArchive *archive, UInt32 index, CListFileTimeDef &t)
+{
+ t.Val.dwLowDateTime = 0;
+ t.Val.dwHighDateTime = 0;
+ t.Def = false;
+ CPropVariant prop;
+ RINOK(archive->GetProperty(index, kpidMTime, &prop));
+ if (prop.vt == VT_FILETIME)
+ {
+ t.Val = prop.filetime;
+ t.Def = true;
+ }
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+ return S_OK;
+}
+
+static void PrintPropNameAndNumber(CStdOutStream &so, const char *name, UInt64 val)
+{
+ so << name << ": " << val << endl;
+}
+
+static void PrintPropName_and_Eq(CStdOutStream &so, PROPID propID)
+{
+ const char *s;
+ char temp[16];
+ if (propID < ARRAY_SIZE(kPropIdToName))
+ s = kPropIdToName[propID];
+ else
+ {
+ ConvertUInt32ToString(propID, temp);
+ s = temp;
+ }
+ so << s << " = ";
+}
+
+static void PrintPropNameAndNumber(CStdOutStream &so, PROPID propID, UInt64 val)
+{
+ PrintPropName_and_Eq(so, propID);
+ so << val << endl;
+}
+
+static void PrintPropNameAndNumber_Signed(CStdOutStream &so, PROPID propID, Int64 val)
+{
+ PrintPropName_and_Eq(so, propID);
+ so << val << endl;
+}
+
+static void PrintPropPair(CStdOutStream &so, const char *name, const wchar_t *val)
+{
+ so << name << " = " << val << endl;
+}
+
+
+static void PrintPropertyPair2(CStdOutStream &so, PROPID propID, const wchar_t *name, const CPropVariant &prop)
+{
+ UString s;
+ ConvertPropertyToString(s, prop, propID);
+ if (!s.IsEmpty())
+ {
+ AString nameA;
+ UString nameU;
+ GetPropName(propID, name, nameA, nameU);
+ if (!nameA.IsEmpty())
+ PrintPropPair(so, nameA, s);
else
- PrintString(fieldInfo.TextAdjustment, fieldInfo.Width, L"");
+ so << nameU << " = " << s << endl;
}
+}
+
+static HRESULT PrintArcProp(CStdOutStream &so, IInArchive *archive, PROPID propID, const wchar_t *name)
+{
+ CPropVariant prop;
+ RINOK(archive->GetArchiveProperty(propID, &prop));
+ PrintPropertyPair2(so, propID, name, prop);
return S_OK;
}
-bool GetUInt64Value(IInArchive *archive, UInt32 index, PROPID propID, UInt64 &value)
+static void PrintArcTypeError(CStdOutStream &so, const UString &type, bool isWarning)
{
- NCOM::CPropVariant prop;
- if (archive->GetProperty(index, propID, &prop) != S_OK)
- throw "GetPropertyValue error";
- if (prop.vt == VT_EMPTY)
- return false;
- value = ConvertPropVariantToUInt64(prop);
- return true;
+ so << "Open " << (isWarning ? "WARNING" : "ERROR")
+ << ": Can not open the file as ["
+ << type
+ << "] archive"
+ << endl;
}
-static void PrintPropPair(const wchar_t *name, const wchar_t *value)
+int Find_FileName_InSortedVector(const UStringVector &fileName, const UString& name);
+
+void PrintErrorFlags(CStdOutStream &so, const char *s, UInt32 errorFlags);
+
+static void ErrorInfo_Print(CStdOutStream &so, const CArcErrorInfo &er)
{
- g_StdOut << name << " = " << value << endl;
+ PrintErrorFlags(so, "ERRORS:", er.GetErrorFlags());
+ if (!er.ErrorMessage.IsEmpty())
+ PrintPropPair(so, "ERROR", er.ErrorMessage);
+
+ PrintErrorFlags(so, "WARNINGS:", er.GetWarningFlags());
+ if (!er.WarningMessage.IsEmpty())
+ PrintPropPair(so, "WARNING", er.WarningMessage);
}
-HRESULT ListArchives(CCodecs *codecs, const CIntVector &formatIndices,
+HRESULT Print_OpenArchive_Props(CStdOutStream &so, const CCodecs *codecs, const CArchiveLink &arcLink)
+{
+ FOR_VECTOR (r, arcLink.Arcs)
+ {
+ const CArc &arc = arcLink.Arcs[r];
+ const CArcErrorInfo &er = arc.ErrorInfo;
+
+ so << "--\n";
+ PrintPropPair(so, "Path", arc.Path);
+ if (er.ErrorFormatIndex >= 0)
+ {
+ if (er.ErrorFormatIndex == arc.FormatIndex)
+ so << "Warning: The archive is open with offset" << endl;
+ else
+ PrintArcTypeError(so, codecs->GetFormatNamePtr(er.ErrorFormatIndex), true);
+ }
+ PrintPropPair(so, "Type", codecs->GetFormatNamePtr(arc.FormatIndex));
+
+ ErrorInfo_Print(so, er);
+
+ Int64 offset = arc.GetGlobalOffset();
+ if (offset != 0)
+ PrintPropNameAndNumber_Signed(so, kpidOffset, offset);
+ IInArchive *archive = arc.Archive;
+ RINOK(PrintArcProp(so, archive, kpidPhySize, NULL));
+ if (er.TailSize != 0)
+ PrintPropNameAndNumber(so, kpidTailSize, er.TailSize);
+ UInt32 numProps;
+ RINOK(archive->GetNumberOfArchiveProperties(&numProps));
+
+ {
+ for (UInt32 j = 0; j < numProps; j++)
+ {
+ CMyComBSTR name;
+ PROPID propID;
+ VARTYPE vt;
+ RINOK(archive->GetArchivePropertyInfo(j, &name, &propID, &vt));
+ RINOK(PrintArcProp(so, archive, propID, name));
+ }
+ }
+
+ if (r != arcLink.Arcs.Size() - 1)
+ {
+ UInt32 numProps;
+ so << "----\n";
+ if (archive->GetNumberOfProperties(&numProps) == S_OK)
+ {
+ UInt32 mainIndex = arcLink.Arcs[r + 1].SubfileIndex;
+ for (UInt32 j = 0; j < numProps; j++)
+ {
+ CMyComBSTR name;
+ PROPID propID;
+ VARTYPE vt;
+ RINOK(archive->GetPropertyInfo(j, &name, &propID, &vt));
+ CPropVariant prop;
+ RINOK(archive->GetProperty(mainIndex, propID, &prop));
+ PrintPropertyPair2(so, propID, name, prop);
+ }
+ }
+ }
+ }
+ return S_OK;
+}
+
+HRESULT Print_OpenArchive_Error(CStdOutStream &so, const CCodecs *codecs, const CArchiveLink &arcLink)
+{
+ #ifndef _NO_CRYPTO
+ if (arcLink.PasswordWasAsked)
+ so << "Can not open encrypted archive. Wrong password?";
+ else
+ #endif
+ {
+ if (arcLink.NonOpen_ErrorInfo.ErrorFormatIndex >= 0)
+ {
+ so << arcLink.NonOpen_ArcPath << endl;
+ PrintArcTypeError(so, codecs->Formats[arcLink.NonOpen_ErrorInfo.ErrorFormatIndex].Name, false);
+ }
+ else
+ so << "Can not open the file as archive";
+ }
+
+ so << endl;
+ so << endl;
+ ErrorInfo_Print(so, arcLink.NonOpen_ErrorInfo);
+
+ return S_OK;
+}
+
+bool CensorNode_CheckPath(const NWildcard::CCensorNode &node, const CReadArcItem &item);
+
+HRESULT ListArchives(CCodecs *codecs,
+ const CObjectVector<COpenType> &types,
+ const CIntVector &excludedFormats,
bool stdInMode,
UStringVector &arcPaths, UStringVector &arcPathsFull,
+ bool processAltStreams, bool showAltStreams,
const NWildcard::CCensorNode &wildcardCensor,
bool enableHeaders, bool techMode,
#ifndef _NO_CRYPTO
bool &passwordEnabled, UString &password,
#endif
- UInt64 &numErrors)
+ #ifndef _SFX
+ const CObjectVector<CProperty> *props,
+ #endif
+ UInt64 &numErrors,
+ UInt64 &numWarnings)
{
+ bool allFilesAreAllowed = wildcardCensor.AreAllAllowed();
+
numErrors = 0;
- CFieldPrinter fieldPrinter;
+ numWarnings = 0;
+
+ CFieldPrinter fp;
if (!techMode)
- fieldPrinter.Init(kStandardFieldTable, sizeof(kStandardFieldTable) / sizeof(kStandardFieldTable[0]));
+ fp.Init(kStandardFieldTable, ARRAY_SIZE(kStandardFieldTable));
- UInt64 numFiles2 = 0, numDirs2 = 0, totalPackSize2 = 0, totalUnPackSize2 = 0;
- UInt64 *totalPackSizePointer2 = 0, *totalUnPackSizePointer2 = 0;
- int numArcs = /* stdInMode ? 1 : */ arcPaths.Size();
- for (int i = 0; i < numArcs; i++)
+ CListStat2 stat2total;
+
+ CBoolArr skipArcs(arcPaths.Size());
+ unsigned arcIndex;
+ for (arcIndex = 0; arcIndex < arcPaths.Size(); arcIndex++)
+ skipArcs[arcIndex] = false;
+ UInt64 numVolumes = 0;
+ UInt64 numArcs = 0;
+ UInt64 totalArcSizes = 0;
+
+ HRESULT lastError = 0;
+
+ for (arcIndex = 0; arcIndex < arcPaths.Size(); arcIndex++)
{
- const UString &archiveName = arcPaths[i];
+ if (skipArcs[arcIndex])
+ continue;
+ const UString &arcPath = arcPaths[arcIndex];
UInt64 arcPackSize = 0;
+
if (!stdInMode)
{
NFile::NFind::CFileInfo fi;
- if (!fi.Find(us2fs(archiveName)) || fi.IsDir())
+ if (!fi.Find(us2fs(arcPath)))
{
- g_StdOut << endl << "Error: " << archiveName << " is not file" << endl;
+ DWORD errorCode = GetLastError();
+ if (errorCode == 0)
+ errorCode = ERROR_FILE_NOT_FOUND;
+ lastError = HRESULT_FROM_WIN32(lastError);;
+ g_StdOut.Flush();
+ *g_ErrStream << endl << kError << NError::MyFormatMessage(errorCode) <<
+ endl << arcPath << endl << endl;
+ numErrors++;
+ continue;
+ }
+ if (fi.IsDir())
+ {
+ g_StdOut.Flush();
+ *g_ErrStream << endl << kError << arcPath << " is not a file" << endl << endl;
numErrors++;
continue;
}
arcPackSize = fi.Size;
+ totalArcSizes += arcPackSize;
}
- CArchiveLink archiveLink;
+ CArchiveLink arcLink;
COpenCallbackConsole openCallback;
- openCallback.OutStream = &g_StdOut;
+ openCallback.Init(&g_StdOut, g_ErrStream, NULL);
#ifndef _NO_CRYPTO
@@ -459,95 +1046,97 @@ HRESULT ListArchives(CCodecs *codecs, const CIntVector &formatIndices,
#endif
- HRESULT result = archiveLink.Open2(codecs, formatIndices, stdInMode, NULL, archiveName, &openCallback);
+ /*
+ CObjectVector<COptionalOpenProperties> optPropsVector;
+ COptionalOpenProperties &optProps = optPropsVector.AddNew();
+ optProps.Props = *props;
+ */
+
+ COpenOptions options;
+ #ifndef _SFX
+ options.props = props;
+ #endif
+ options.codecs = codecs;
+ options.types = &types;
+ options.excludedFormats = &excludedFormats;
+ options.stdInMode = stdInMode;
+ options.stream = NULL;
+ options.filePath = arcPath;
+
+ if (enableHeaders)
+ {
+ g_StdOut << endl << kListing << arcPath << endl << endl;
+ }
+
+ HRESULT result = arcLink.Open3(options, &openCallback);
+
if (result != S_OK)
{
if (result == E_ABORT)
return result;
- g_StdOut << endl << "Error: " << archiveName << ": ";
+ g_StdOut.Flush();
+ *g_ErrStream << endl << kError << arcPath << " : ";
if (result == S_FALSE)
{
- #ifndef _NO_CRYPTO
- if (openCallback.Open_WasPasswordAsked())
- g_StdOut << "Can not open encrypted archive. Wrong password?";
- else
- #endif
- g_StdOut << "Can not open file as archive";
+ Print_OpenArchive_Error(*g_ErrStream, codecs, arcLink);
}
- else if (result == E_OUTOFMEMORY)
- g_StdOut << "Can't allocate required memory";
else
- g_StdOut << NError::MyFormatMessageW(result);
- g_StdOut << endl;
+ {
+ lastError = result;
+ *g_ErrStream << "opening : ";
+ if (result == E_OUTOFMEMORY)
+ *g_ErrStream << "Can't allocate required memory";
+ else
+ *g_ErrStream << NError::MyFormatMessage(result);
+ }
+ *g_ErrStream << endl;
numErrors++;
continue;
}
+
+ {
+ if (arcLink.NonOpen_ErrorInfo.ErrorFormatIndex >= 0)
+ numErrors++;
+
+ FOR_VECTOR (r, arcLink.Arcs)
+ {
+ const CArcErrorInfo &arc = arcLink.Arcs[r].ErrorInfo;
+ if (!arc.WarningMessage.IsEmpty())
+ numWarnings++;
+ if (arc.AreThereWarnings())
+ numWarnings++;
+ if (arc.ErrorFormatIndex >= 0)
+ numWarnings++;
+ if (arc.AreThereErrors())
+ {
+ numErrors++;
+ // break;
+ }
+ if (!arc.ErrorMessage.IsEmpty())
+ numErrors++;
+ }
+ }
+
+ numArcs++;
+ numVolumes++;
if (!stdInMode)
- for (int v = 0; v < archiveLink.VolumePaths.Size(); v++)
{
- int index = arcPathsFull.FindInSorted(archiveLink.VolumePaths[v]);
- if (index >= 0 && index > i)
+ numVolumes += arcLink.VolumePaths.Size();
+ totalArcSizes += arcLink.VolumesSize;
+ FOR_VECTOR (v, arcLink.VolumePaths)
{
- arcPaths.Delete(index);
- arcPathsFull.Delete(index);
- numArcs = arcPaths.Size();
+ int index = Find_FileName_InSortedVector(arcPathsFull, arcLink.VolumePaths[v]);
+ if (index >= 0 && (unsigned)index > arcIndex)
+ skipArcs[(unsigned)index] = true;
}
}
+
if (enableHeaders)
{
- g_StdOut << endl << kListing << archiveName << endl << endl;
+ RINOK(Print_OpenArchive_Props(g_StdOut, codecs, arcLink));
- for (int i = 0; i < archiveLink.Arcs.Size(); i++)
- {
- const CArc &arc = archiveLink.Arcs[i];
-
- g_StdOut << "--\n";
- PrintPropPair(L"Path", arc.Path);
- PrintPropPair(L"Type", codecs->Formats[arc.FormatIndex].Name);
- if (!arc.ErrorMessage.IsEmpty())
- PrintPropPair(L"Error", arc.ErrorMessage);
- UInt32 numProps;
- IInArchive *archive = arc.Archive;
- if (archive->GetNumberOfArchiveProperties(&numProps) == S_OK)
- {
- for (UInt32 j = 0; j < numProps; j++)
- {
- CMyComBSTR name;
- PROPID propID;
- VARTYPE vt;
- RINOK(archive->GetArchivePropertyInfo(j, &name, &propID, &vt));
- NCOM::CPropVariant prop;
- RINOK(archive->GetArchiveProperty(propID, &prop));
- UString s = ConvertPropertyToString(prop, propID);
- if (!s.IsEmpty())
- PrintPropPair(GetPropName(propID, name), s);
- }
- }
- if (i != archiveLink.Arcs.Size() - 1)
- {
- UInt32 numProps;
- g_StdOut << "----\n";
- if (archive->GetNumberOfProperties(&numProps) == S_OK)
- {
- UInt32 mainIndex = archiveLink.Arcs[i + 1].SubfileIndex;
- for (UInt32 j = 0; j < numProps; j++)
- {
- CMyComBSTR name;
- PROPID propID;
- VARTYPE vt;
- RINOK(archive->GetPropertyInfo(j, &name, &propID, &vt));
- NCOM::CPropVariant prop;
- RINOK(archive->GetProperty(mainIndex, propID, &prop));
- UString s = ConvertPropertyToString(prop, propID);
- if (!s.IsEmpty())
- PrintPropPair(GetPropName(propID, name), s);
- }
- }
- }
-
- }
g_StdOut << endl;
if (techMode)
g_StdOut << "----------\n";
@@ -555,100 +1144,148 @@ HRESULT ListArchives(CCodecs *codecs, const CIntVector &formatIndices,
if (enableHeaders && !techMode)
{
- fieldPrinter.PrintTitle();
+ fp.PrintTitle();
g_StdOut << endl;
- fieldPrinter.PrintTitleLines();
+ fp.PrintTitleLines();
g_StdOut << endl;
}
- const CArc &arc = archiveLink.Arcs.Back();
+ const CArc &arc = arcLink.Arcs.Back();
+ fp.Arc = &arc;
+ fp.TechMode = techMode;
IInArchive *archive = arc.Archive;
if (techMode)
{
- RINOK(fieldPrinter.Init(archive));
+ fp.Clear();
+ RINOK(fp.AddMainProps(archive));
+ if (arc.GetRawProps)
+ {
+ RINOK(fp.AddRawProps(arc.GetRawProps));
+ }
}
- UInt64 numFiles = 0, numDirs = 0, totalPackSize = 0, totalUnPackSize = 0;
- UInt64 *totalPackSizePointer = 0, *totalUnPackSizePointer = 0;
+
+ CListStat2 stat2;
+
UInt32 numItems;
RINOK(archive->GetNumberOfItems(&numItems));
+
+ CReadArcItem item;
+ UStringVector pathParts;
+
for (UInt32 i = 0; i < numItems; i++)
{
if (NConsoleClose::TestBreakSignal())
return E_ABORT;
- UString filePath;
- HRESULT res = arc.GetItemPath(i, filePath);
+ HRESULT res = arc.GetItemPath2(i, fp.FilePath);
+
if (stdInMode && res == E_INVALIDARG)
break;
RINOK(res);
- bool isFolder;
- RINOK(IsArchiveItemFolder(archive, i, isFolder));
- if (!wildcardCensor.CheckPath(filePath, !isFolder))
- continue;
-
- fieldPrinter.PrintItemInfo(arc, i, techMode);
+ if (arc.Ask_Aux)
+ {
+ bool isAux;
+ RINOK(Archive_IsItem_Aux(archive, i, isAux));
+ if (isAux)
+ continue;
+ }
+
+ bool isAltStream = false;
+ if (arc.Ask_AltStream)
+ {
+ RINOK(Archive_IsItem_AltStream(archive, i, isAltStream));
+ if (isAltStream && !processAltStreams)
+ continue;
+ }
+
+ RINOK(Archive_IsItem_Dir(archive, i, fp.IsDir));
+
+ if (!allFilesAreAllowed)
+ {
+ if (isAltStream)
+ {
+ RINOK(arc.GetItem(i, item));
+ if (!CensorNode_CheckPath(wildcardCensor, item))
+ continue;
+ }
+ else
+ {
+ SplitPathToParts(fp.FilePath, pathParts);;
+ bool include;
+ if (!wildcardCensor.CheckPathVect(pathParts, !fp.IsDir, include))
+ continue;
+ if (!include)
+ continue;
+ }
+ }
- UInt64 packSize, unpackSize;
- if (!GetUInt64Value(archive, i, kpidSize, unpackSize))
- unpackSize = 0;
- else
- totalUnPackSizePointer = &totalUnPackSize;
- if (!GetUInt64Value(archive, i, kpidPackSize, packSize))
- packSize = 0;
- else
- totalPackSizePointer = &totalPackSize;
+ CListStat st;
- g_StdOut << endl;
+ RINOK(GetUInt64Value(archive, i, kpidSize, st.Size));
+ RINOK(GetUInt64Value(archive, i, kpidPackSize, st.PackSize));
+ RINOK(GetItemMTime(archive, i, st.MTime));
- if (isFolder)
- numDirs++;
+ if (fp.IsDir)
+ stat2.NumDirs++;
else
- numFiles++;
- totalPackSize += packSize;
- totalUnPackSize += unpackSize;
- }
+ st.NumFiles = 1;
+ stat2.GetStat(isAltStream).Update(st);
- if (!stdInMode && totalPackSizePointer == 0)
- {
- if (archiveLink.VolumePaths.Size() != 0)
- arcPackSize += archiveLink.VolumesSize;
- totalPackSize = (numFiles == 0) ? 0 : arcPackSize;
- totalPackSizePointer = &totalPackSize;
+ if (isAltStream && !showAltStreams)
+ continue;
+ RINOK(fp.PrintItemInfo(i, st));
}
- if (totalUnPackSizePointer == 0 && numFiles == 0)
+
+ UInt64 numStreams = stat2.GetNumStreams();
+ if (!stdInMode
+ && !stat2.MainFiles.PackSize.Def
+ && !stat2.AltStreams.PackSize.Def)
{
- totalUnPackSize = 0;
- totalUnPackSizePointer = &totalUnPackSize;
+ if (arcLink.VolumePaths.Size() != 0)
+ arcPackSize += arcLink.VolumesSize;
+ stat2.MainFiles.PackSize.Add((numStreams == 0) ? 0 : arcPackSize);
}
+
+ stat2.MainFiles.SetSizeDefIfNoFiles();
+ stat2.AltStreams.SetSizeDefIfNoFiles();
+
if (enableHeaders && !techMode)
{
- fieldPrinter.PrintTitleLines();
+ fp.PrintTitleLines();
g_StdOut << endl;
- fieldPrinter.PrintSummaryInfo(numFiles, numDirs, totalUnPackSizePointer, totalPackSizePointer);
- g_StdOut << endl;
- }
- if (totalPackSizePointer != 0)
- {
- totalPackSizePointer2 = &totalPackSize2;
- totalPackSize2 += totalPackSize;
+ fp.PrintSum(stat2);
}
- if (totalUnPackSizePointer != 0)
+
+ if (enableHeaders)
{
- totalUnPackSizePointer2 = &totalUnPackSize2;
- totalUnPackSize2 += totalUnPackSize;
+ if (arcLink.NonOpen_ErrorInfo.ErrorFormatIndex >= 0)
+ {
+ g_StdOut << "----------\n";
+ PrintPropPair(g_StdOut, "Path", arcLink.NonOpen_ArcPath);
+ PrintArcTypeError(g_StdOut, codecs->Formats[arcLink.NonOpen_ErrorInfo.ErrorFormatIndex].Name, false);
+ }
}
- numFiles2 += numFiles;
- numDirs2 += numDirs;
+
+ stat2total.Update(stat2);
+
+ g_StdOut.Flush();
}
- if (enableHeaders && !techMode && numArcs > 1)
+
+ if (enableHeaders && !techMode && (arcPaths.Size() > 1 || numVolumes > 1))
{
g_StdOut << endl;
- fieldPrinter.PrintTitleLines();
+ fp.PrintTitleLines();
g_StdOut << endl;
- fieldPrinter.PrintSummaryInfo(numFiles2, numDirs2, totalUnPackSizePointer2, totalPackSizePointer2);
+ fp.PrintSum(stat2total);
g_StdOut << endl;
- g_StdOut << "Archives: " << numArcs << endl;
+ PrintPropNameAndNumber(g_StdOut, "Archives", numArcs);
+ PrintPropNameAndNumber(g_StdOut, "Volumes", numVolumes);
+ PrintPropNameAndNumber(g_StdOut, "Total archives size", totalArcSizes);
}
+
+ if (numErrors == 1 && lastError != 0)
+ return lastError;
+
return S_OK;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/List.h b/3rdparty/lzma/CPP/7zip/UI/Console/List.h
index 97d9fb15ab3..462c4710375 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/List.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/List.h
@@ -3,18 +3,25 @@
#ifndef __LIST_H
#define __LIST_H
-#include "Common/Wildcard.h"
+#include "../../../Common/Wildcard.h"
+
#include "../Common/LoadCodecs.h"
-HRESULT ListArchives(CCodecs *codecs, const CIntVector &formatIndices,
+HRESULT ListArchives(CCodecs *codecs,
+ const CObjectVector<COpenType> &types,
+ const CIntVector &excludedFormats,
bool stdInMode,
UStringVector &archivePaths, UStringVector &archivePathsFull,
+ bool processAltStreams, bool showAltStreams,
const NWildcard::CCensorNode &wildcardCensor,
bool enableHeaders, bool techMode,
#ifndef _NO_CRYPTO
bool &passwordEnabled, UString &password,
#endif
- UInt64 &errors);
+ #ifndef _SFX
+ const CObjectVector<CProperty> *props,
+ #endif
+ UInt64 &errors,
+ UInt64 &numWarnings);
#endif
-
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/Main.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/Main.cpp
index f5a703979eb..50652555de7 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/Main.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/Main.cpp
@@ -2,42 +2,55 @@
#include "StdAfx.h"
-#if defined( _WIN32) && defined( _7ZIP_LARGE_PAGES)
+#include "../../../Common/MyWindows.h"
+
+#ifdef _WIN32
+#include <Psapi.h>
+#endif
+
+#include "../../../../C/CpuArch.h"
+
+#if defined( _7ZIP_LARGE_PAGES)
#include "../../../../C/Alloc.h"
#endif
-#include "Common/MyInitGuid.h"
+#include "../../../Common/MyInitGuid.h"
-#include "Common/CommandLineParser.h"
-#include "Common/IntToString.h"
-#include "Common/MyException.h"
-#include "Common/StdOutStream.h"
-#include "Common/StringConvert.h"
-#include "Common/StringToInt.h"
+#include "../../../Common/CommandLineParser.h"
+#include "../../../Common/IntToString.h"
+#include "../../../Common/MyException.h"
+#include "../../../Common/StringConvert.h"
+#include "../../../Common/StringToInt.h"
+#include "../../../Common/UTFConvert.h"
+
+#include "../../../Windows/ErrorMsg.h"
-#include "Windows/Error.h"
#ifdef _WIN32
-#include "Windows/MemoryLock.h"
+#include "../../../Windows/MemoryLock.h"
#endif
+#include "../../../Windows/TimeUtils.h"
+
#include "../Common/ArchiveCommandLine.h"
#include "../Common/ExitCode.h"
#include "../Common/Extract.h"
+
#ifdef EXTERNAL_CODECS
#include "../Common/LoadCodecs.h"
#endif
+#include "../../Common/RegisterCodec.h"
+
#include "BenchCon.h"
+#include "ConsoleClose.h"
#include "ExtractCallbackConsole.h"
#include "List.h"
#include "OpenCallbackConsole.h"
#include "UpdateCallbackConsole.h"
-#if !defined(EXTERNAL_CODECS) && defined(_NO_CRYPTO)
-#define IT_IS_REDUCED_VERSION
-#endif
+#include "HashCon.h"
-#ifdef IT_IS_REDUCED_VERSION
+#ifdef PROG_VARIANT_R
#include "../../../../C/7zVersion.h"
#else
#include "../../MyVersion.h"
@@ -50,27 +63,37 @@ using namespace NCommandLineParser;
#ifdef _WIN32
HINSTANCE g_hInstance = 0;
#endif
+
extern CStdOutStream *g_StdStream;
+extern CStdOutStream *g_ErrStream;
+
+extern unsigned g_NumCodecs;
+extern const CCodecInfo *g_Codecs[];
+
+extern unsigned g_NumHashers;
+extern const CHasherInfo *g_Hashers[];
static const char *kCopyrightString = "\n7-Zip"
#ifndef EXTERNAL_CODECS
-#ifdef IT_IS_REDUCED_VERSION
+#ifdef PROG_VARIANT_R
" (r)"
#else
" (a)"
#endif
#endif
-#ifdef _WIN64
+#ifdef MY_CPU_64BIT
" [64]"
+#elif defined MY_CPU_32BIT
+" [32]"
#endif
-" " MY_VERSION_COPYRIGHT_DATE "\n";
+" " MY_VERSION_COPYRIGHT_DATE "\n\n";
static const char *kHelpString =
- "\nUsage: 7z"
+ "Usage: 7z"
#ifndef EXTERNAL_CODECS
-#ifdef IT_IS_REDUCED_VERSION
+#ifdef PROG_VARIANT_R
"r"
#else
"a"
@@ -80,42 +103,65 @@ static const char *kHelpString =
" [<@listfiles...>]\n"
"\n"
"<Commands>\n"
- " a: Add files to archive\n"
- " b: Benchmark\n"
- " d: Delete files from archive\n"
- " e: Extract files from archive (without using directory names)\n"
- " l: List contents of archive\n"
-// " l[a|t][f]: List contents of archive\n"
-// " a - with Additional fields\n"
-// " t - with all fields\n"
-// " f - with Full pathnames\n"
- " t: Test integrity of archive\n"
- " u: Update files to archive\n"
- " x: eXtract files with full paths\n"
+ " a : Add files to archive\n"
+ " b : Benchmark\n"
+ " d : Delete files from archive\n"
+ " e : Extract files from archive (without using directory names)\n"
+ " h : Calculate hash values for files\n"
+ " i : Show information about supported formats\n"
+ " l : List contents of archive\n"
+ " rn : Rename files in archive\n"
+ " t : Test integrity of archive\n"
+ " u : Update files to archive\n"
+ " x : eXtract files with full paths\n"
+ "\n"
"<Switches>\n"
- " -ai[r[-|0]]{@listfile|!wildcard}: Include archives\n"
- " -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives\n"
- " -bd: Disable percentage indicator\n"
- " -i[r[-|0]]{@listfile|!wildcard}: Include filenames\n"
- " -m{Parameters}: set compression Method\n"
- " -o{Directory}: set Output directory\n"
+ " -- : Stop switches parsing\n"
+ " -ai[r[-|0]]{@listfile|!wildcard} : Include archives\n"
+ " -ax[r[-|0]]{@listfile|!wildcard} : eXclude archives\n"
+ " -ao{a|s|t|u} : set Overwrite mode\n"
+ " -an : disable archive_name field\n"
+ " -bb[0-3] : set output log level\n"
+ " -bd : disable progress indicator\n"
+ " -bs{o|e|p}{0|1|2} : set output stream for output/error/progress line\n"
+ " -bt : show execution time statistics\n"
+ " -i[r[-|0]]{@listfile|!wildcard} : Include filenames\n"
+ " -m{Parameters} : set compression Method\n"
+ " -mmt[N] : set number of CPU threads\n"
+ " -o{Directory} : set Output directory\n"
#ifndef _NO_CRYPTO
- " -p{Password}: set Password\n"
+ " -p{Password} : set Password\n"
#endif
- " -r[-|0]: Recurse subdirectories\n"
- " -scs{UTF-8 | WIN | DOS}: set charset for list files\n"
- " -sfx[{name}]: Create SFX archive\n"
- " -si[{name}]: read data from stdin\n"
- " -slt: show technical information for l (List) command\n"
- " -so: write data to stdout\n"
- " -ssc[-]: set sensitive case mode\n"
- " -ssw: compress shared files\n"
- " -t{Type}: Set type of archive\n"
- " -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options\n"
- " -v{Size}[b|k|m|g]: Create volumes\n"
- " -w[{path}]: assign Work directory. Empty path means a temporary directory\n"
- " -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames\n"
- " -y: assume Yes on all queries\n";
+ " -r[-|0] : Recurse subdirectories\n"
+ " -sa{a|e|s} : set Archive name mode\n"
+ " -scc{UTF-8|WIN|DOS} : set charset for for console input/output\n"
+ " -scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files\n"
+ " -scrc[CRC32|CRC64|SHA1|SHA256|*] : set hash function for x, e, h commands\n"
+ " -sdel : delete files after compression\n"
+ " -seml[.] : send archive by email\n"
+ " -sfx[{name}] : Create SFX archive\n"
+ " -si[{name}] : read data from stdin\n"
+ " -slp : set Large Pages mode\n"
+ " -slt : show technical information for l (List) command\n"
+ " -snh : store hard links as links\n"
+ " -snl : store symbolic links as links\n"
+ " -sni : store NT security information\n"
+ " -sns[-] : store NTFS alternate streams\n"
+ " -so : write data to stdout\n"
+ " -spd : disable wildcard matching for file names\n"
+ " -spe : eliminate duplication of root folder for extract command\n"
+ " -spf : use fully qualified file paths\n"
+ " -ssc[-] : set sensitive case mode\n"
+ " -ssw : compress shared files\n"
+ " -stl : set archive timestamp from the most recently modified file\n"
+ " -stm{HexMask} : set CPU thread affinity mask (hexadecimal number)\n"
+ " -stx{Type} : exclude archive type\n"
+ " -t{Type} : Set type of archive\n"
+ " -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] : Update options\n"
+ " -v{Size}[b|k|m|g] : Create volumes\n"
+ " -w[{path}] : assign Work directory. Empty path means a temporary directory\n"
+ " -x[r[-|0]]{@listfile|!wildcard} : eXclude filenames\n"
+ " -y : assume Yes on all queries\n";
// ---------------------------
// exception messages
@@ -124,21 +170,17 @@ static const char *kEverythingIsOk = "Everything is Ok";
static const char *kUserErrorMessage = "Incorrect command line";
static const char *kNoFormats = "7-Zip cannot find the code that works with archives.";
static const char *kUnsupportedArcTypeMessage = "Unsupported archive type";
+// static const char *kUnsupportedUpdateArcType = "Can't create archive for that type";
static CFSTR kDefaultSfxModule = FTEXT("7zCon.sfx");
-static void ShowMessageAndThrowException(CStdOutStream &s, LPCSTR message, NExitCode::EEnum code)
+static void ShowMessageAndThrowException(LPCSTR message, NExitCode::EEnum code)
{
- s << message << endl;
+ if (g_ErrStream)
+ *g_ErrStream << endl << "ERROR: " << message << endl;
throw code;
}
-static void PrintHelpAndExit(CStdOutStream &s)
-{
- s << kHelpString;
- ShowMessageAndThrowException(s, kUserErrorMessage, NExitCode::kUserError);
-}
-
#ifndef _WIN32
static void GetArguments(int numArgs, const char *args[], UStringVector &parts)
{
@@ -151,48 +193,295 @@ static void GetArguments(int numArgs, const char *args[], UStringVector &parts)
}
#endif
-static void ShowCopyrightAndHelp(CStdOutStream &s, bool needHelp)
+static void ShowCopyrightAndHelp(CStdOutStream *so, bool needHelp)
{
- s << kCopyrightString;
- // s << "# CPUs: " << (UInt64)NWindows::NSystem::GetNumberOfProcessors() << "\n";
+ if (!so)
+ return;
+ *so << kCopyrightString;
+ // *so << "# CPUs: " << (UInt64)NWindows::NSystem::GetNumberOfProcessors() << endl;
if (needHelp)
- s << kHelpString;
+ *so << kHelpString;
}
-#ifdef EXTERNAL_CODECS
-static void PrintString(CStdOutStream &stdStream, const AString &s, int size)
+
+static void PrintStringRight(CStdOutStream &so, const AString &s, unsigned size)
+{
+ unsigned len = s.Len();
+ for (unsigned i = len; i < size; i++)
+ so << ' ';
+ so << s;
+}
+
+static void PrintUInt32(CStdOutStream &so, UInt32 val, unsigned size)
+{
+ char s[16];
+ ConvertUInt32ToString(val, s);
+ PrintStringRight(so, s, size);
+}
+
+static void PrintLibIndex(CStdOutStream &so, int libIndex)
+{
+ if (libIndex >= 0)
+ PrintUInt32(so, libIndex, 2);
+ else
+ so << " ";
+ so << ' ';
+}
+
+static void PrintString(CStdOutStream &so, const UString &s, unsigned size)
+{
+ unsigned len = s.Len();
+ so << s;
+ for (unsigned i = len; i < size; i++)
+ so << ' ';
+}
+
+static inline char GetHex(unsigned val)
+{
+ return (char)((val < 10) ? ('0' + val) : ('A' + (val - 10)));
+}
+
+static void PrintWarningsPaths(const CErrorPathCodes &pc, CStdOutStream &so)
+{
+ FOR_VECTOR(i, pc.Paths)
+ {
+ so << pc.Paths[i] << " : ";
+ so << NError::MyFormatMessage(pc.Codes[i]) << endl;
+ }
+ so << "----------------" << endl;
+}
+
+static int WarningsCheck(HRESULT result, const CCallbackConsoleBase &callback,
+ const CUpdateErrorInfo &errorInfo,
+ CStdOutStream *so,
+ CStdOutStream *se,
+ bool showHeaders)
+{
+ int exitCode = NExitCode::kSuccess;
+
+ if (callback.ScanErrors.Paths.Size() != 0)
+ {
+ if (se)
+ {
+ *se << endl;
+ *se << "Scan WARNINGS for files and folders:" << endl << endl;
+ PrintWarningsPaths(callback.ScanErrors, *se);
+ *se << "Scan WARNINGS: " << callback.ScanErrors.Paths.Size();
+ *se << endl;
+ }
+ exitCode = NExitCode::kWarning;
+ }
+
+ if (result != S_OK || errorInfo.ThereIsError())
+ {
+ if (se)
+ {
+ UString message;
+ if (!errorInfo.Message.IsEmpty())
+ {
+ message.AddAscii(errorInfo.Message);
+ message.Add_LF();
+ }
+ {
+ FOR_VECTOR(i, errorInfo.FileNames)
+ {
+ message += fs2us(errorInfo.FileNames[i]);
+ message.Add_LF();
+ }
+ }
+ if (errorInfo.SystemError != 0)
+ {
+ message += NError::MyFormatMessage(errorInfo.SystemError);
+ message.Add_LF();
+ }
+ if (!message.IsEmpty())
+ *se << L"\nError:\n" << message;
+ }
+
+ // we will work with (result) later
+ // throw CSystemException(result);
+ return NExitCode::kFatalError;
+ }
+
+ unsigned numErrors = callback.FailedFiles.Paths.Size();
+ if (numErrors == 0)
+ {
+ if (showHeaders)
+ if (callback.ScanErrors.Paths.Size() == 0)
+ if (so)
+ {
+ if (se)
+ se->Flush();
+ *so << kEverythingIsOk << endl;
+ }
+ }
+ else
+ {
+ if (se)
+ {
+ *se << endl;
+ *se << "WARNINGS for files:" << endl << endl;
+ PrintWarningsPaths(callback.FailedFiles, *se);
+ *se << "WARNING: Cannot open " << numErrors << " file";
+ if (numErrors > 1)
+ *se << 's';
+ *se << endl;
+ }
+ exitCode = NExitCode::kWarning;
+ }
+
+ return exitCode;
+}
+
+static void ThrowException_if_Error(HRESULT res)
+{
+ if (res != S_OK)
+ throw CSystemException(res);
+}
+
+
+static void PrintNum(UInt64 val, unsigned numDigits, char c = ' ')
+{
+ char temp[64];
+ char *p = temp + 32;
+ ConvertUInt64ToString(val, p);
+ unsigned len = MyStringLen(p);
+ for (; len < numDigits; len++)
+ *--p = c;
+ *g_StdStream << p;
+}
+
+static void PrintTime(const char *s, UInt64 val, UInt64 total)
+{
+ *g_StdStream << endl << s << " Time =";
+ const UInt32 kFreq = 10000000;
+ UInt64 sec = val / kFreq;
+ PrintNum(sec, 6);
+ *g_StdStream << '.';
+ UInt32 ms = (UInt32)(val - (sec * kFreq)) / (kFreq / 1000);
+ PrintNum(ms, 3, '0');
+
+ while (val > ((UInt64)1 << 56))
+ {
+ val >>= 1;
+ total >>= 1;
+ }
+
+ UInt64 percent = 0;
+ if (total != 0)
+ percent = val * 100 / total;
+ *g_StdStream << " =";
+ PrintNum(percent, 5);
+ *g_StdStream << '%';
+}
+
+#ifndef UNDER_CE
+
+#define SHIFT_SIZE_VALUE(x, num) (((x) + (1 << (num)) - 1) >> (num))
+
+static void PrintMemUsage(const char *s, UInt64 val)
{
- int len = s.Length();
- stdStream << s;
- for (int i = len; i < size; i++)
- stdStream << ' ';
+ *g_StdStream << " " << s << " Memory =";
+ PrintNum(SHIFT_SIZE_VALUE(val, 20), 7);
+ *g_StdStream << " MB";
}
+
+EXTERN_C_BEGIN
+typedef BOOL (WINAPI *Func_GetProcessMemoryInfo)(HANDLE Process,
+ PPROCESS_MEMORY_COUNTERS ppsmemCounters, DWORD cb);
+EXTERN_C_END
+
#endif
-static void PrintString(CStdOutStream &stdStream, const UString &s, int size)
+static inline UInt64 GetTime64(const FILETIME &t) { return ((UInt64)t.dwHighDateTime << 32) | t.dwLowDateTime; }
+
+static void PrintStat()
{
- int len = s.Length();
- stdStream << s;
- for (int i = len; i < size; i++)
- stdStream << ' ';
+ FILETIME creationTimeFT, exitTimeFT, kernelTimeFT, userTimeFT;
+ if (!
+ #ifdef UNDER_CE
+ ::GetThreadTimes(::GetCurrentThread()
+ #else
+ // NT 3.5
+ ::GetProcessTimes(::GetCurrentProcess()
+ #endif
+ , &creationTimeFT, &exitTimeFT, &kernelTimeFT, &userTimeFT))
+ return;
+ FILETIME curTimeFT;
+ NTime::GetCurUtcFileTime(curTimeFT);
+
+ #ifndef UNDER_CE
+
+ PROCESS_MEMORY_COUNTERS m;
+ memset(&m, 0, sizeof(m));
+ BOOL memDefined = FALSE;
+ {
+ /* NT 4.0: GetProcessMemoryInfo() in Psapi.dll
+ Win7: new function K32GetProcessMemoryInfo() in kernel32.dll
+ It's faster to call kernel32.dll code than Psapi.dll code
+ GetProcessMemoryInfo() requires Psapi.lib
+ Psapi.lib in SDK7+ can link to K32GetProcessMemoryInfo in kernel32.dll
+ The program with K32GetProcessMemoryInfo will not work on systems before Win7
+ // memDefined = GetProcessMemoryInfo(GetCurrentProcess(), &m, sizeof(m));
+ */
+
+ Func_GetProcessMemoryInfo my_GetProcessMemoryInfo = (Func_GetProcessMemoryInfo)
+ ::GetProcAddress(::GetModuleHandleW(L"kernel32.dll"), "K32GetProcessMemoryInfo");
+ if (!my_GetProcessMemoryInfo)
+ {
+ HMODULE lib = LoadLibraryW(L"Psapi.dll");
+ if (lib)
+ my_GetProcessMemoryInfo = (Func_GetProcessMemoryInfo)::GetProcAddress(lib, "GetProcessMemoryInfo");
+ }
+ if (my_GetProcessMemoryInfo)
+ memDefined = my_GetProcessMemoryInfo(GetCurrentProcess(), &m, sizeof(m));
+ // FreeLibrary(lib);
+ }
+
+ #endif
+
+ UInt64 curTime = GetTime64(curTimeFT);
+ UInt64 creationTime = GetTime64(creationTimeFT);
+ UInt64 kernelTime = GetTime64(kernelTimeFT);
+ UInt64 userTime = GetTime64(userTimeFT);
+
+ UInt64 totalTime = curTime - creationTime;
+
+ PrintTime("Kernel ", kernelTime, totalTime);
+ PrintTime("User ", userTime, totalTime);
+
+ PrintTime("Process", kernelTime + userTime, totalTime);
+ #ifndef UNDER_CE
+ if (memDefined) PrintMemUsage("Virtual ", m.PeakPagefileUsage);
+ #endif
+
+ PrintTime("Global ", totalTime, totalTime);
+ #ifndef UNDER_CE
+ if (memDefined) PrintMemUsage("Physical", m.PeakWorkingSetSize);
+ #endif
+
+ *g_StdStream << endl;
}
-static inline char GetHex(Byte value)
+static void PrintHexId(CStdOutStream &so, UInt64 id)
{
- return (char)((value < 10) ? ('0' + value) : ('A' + (value - 10)));
+ char s[32];
+ ConvertUInt64ToHex(id, s);
+ PrintStringRight(so, s, 8);
}
int Main2(
#ifndef _WIN32
- int numArgs, const char *args[]
+ int numArgs, char *args[]
#endif
)
{
#if defined(_WIN32) && !defined(UNDER_CE)
SetFileApisToOEM();
#endif
-
+
UStringVector commandStrings;
+
#ifdef _WIN32
NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings);
#else
@@ -201,89 +490,185 @@ int Main2(
if (commandStrings.Size() == 1)
{
- ShowCopyrightAndHelp(g_StdOut, true);
+ ShowCopyrightAndHelp(g_StdStream, true);
return 0;
}
+
commandStrings.Delete(0);
- CArchiveCommandLineOptions options;
+ CArcCmdLineOptions options;
- CArchiveCommandLineParser parser;
+ CArcCmdLineParser parser;
parser.Parse1(commandStrings, options);
+
+ if (options.Number_for_Out != k_OutStream_stdout)
+ g_StdStream = (options.Number_for_Out == k_OutStream_stderr ? &g_StdErr : NULL);
+
+ if (options.Number_for_Errors != k_OutStream_stderr)
+ g_ErrStream = (options.Number_for_Errors == k_OutStream_stdout ? &g_StdOut : NULL);
+
+ CStdOutStream *percentsStream = NULL;
+ if (options.Number_for_Percents != k_OutStream_disabled)
+ percentsStream = (options.Number_for_Percents == k_OutStream_stderr) ? &g_StdErr : &g_StdOut;;
+
if (options.HelpMode)
{
- ShowCopyrightAndHelp(g_StdOut, true);
+ ShowCopyrightAndHelp(g_StdStream, true);
return 0;
}
- #if defined(_WIN32) && defined(_7ZIP_LARGE_PAGES)
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ NSecurity::EnablePrivilege_SymLink();
+ #endif
+
+ #ifdef _7ZIP_LARGE_PAGES
if (options.LargePages)
{
SetLargePageSize();
- NSecurity::EnableLockMemoryPrivilege();
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ NSecurity::EnablePrivilege_LockMemory();
+ #endif
}
#endif
- CStdOutStream &stdStream = options.StdOutMode ? g_StdErr : g_StdOut;
- g_StdStream = &stdStream;
-
if (options.EnableHeaders)
- ShowCopyrightAndHelp(stdStream, false);
+ ShowCopyrightAndHelp(g_StdStream, false);
parser.Parse2(options);
- CCodecs *codecs = new CCodecs;
- CMyComPtr<
- #ifdef EXTERNAL_CODECS
- ICompressCodecsInfo
+ unsigned percentsNameLevel = 1;
+ if (options.LogLevel == 0 || options.Number_for_Percents != options.Number_for_Out)
+ percentsNameLevel = 2;
+
+ unsigned consoleWidth = 80;
+
+ if (percentsStream)
+ {
+ #ifdef _WIN32
+
+ #if !defined(UNDER_CE)
+ CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
+ if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &consoleInfo))
+ consoleWidth = consoleInfo.dwSize.X;
+ #endif
+
#else
- IUnknown
+
+ struct winsize w;
+ if (ioctl(0, TIOCGWINSZ, &w) == )
+ consoleWidth = w.ws_col;
+
#endif
- > compressCodecsInfo = codecs;
- HRESULT result = codecs->Load();
- if (result != S_OK)
- throw CSystemException(result);
+ }
+
+ CREATE_CODECS_OBJECT
+
+ codecs->CaseSensitiveChange = options.CaseSensitiveChange;
+ codecs->CaseSensitive = options.CaseSensitive;
+ ThrowException_if_Error(codecs->Load());
bool isExtractGroupCommand = options.Command.IsFromExtractGroup();
if (codecs->Formats.Size() == 0 &&
- (isExtractGroupCommand ||
- options.Command.CommandType == NCommandType::kList ||
- options.Command.IsFromUpdateGroup()))
+ (isExtractGroupCommand
+ || options.Command.CommandType == NCommandType::kList
+ || options.Command.IsFromUpdateGroup()))
+ {
+ #ifdef EXTERNAL_CODECS
+ if (!codecs->MainDll_ErrorPath.IsEmpty())
+ {
+ UString s = L"Can't load module ";
+ s += fs2us(codecs->MainDll_ErrorPath);
+ throw s;
+ }
+ #endif
+
throw kNoFormats;
+ }
- CIntVector formatIndices;
- if (!codecs->FindFormatForArchiveType(options.ArcType, formatIndices))
+ CObjectVector<COpenType> types;
+ if (!ParseOpenTypes(*codecs, options.ArcType, types))
throw kUnsupportedArcTypeMessage;
+ CIntVector excludedFormats;
+ FOR_VECTOR (k, options.ExcludedArcTypes)
+ {
+ CIntVector tempIndices;
+ if (!codecs->FindFormatForArchiveType(options.ExcludedArcTypes[k], tempIndices)
+ || tempIndices.Size() != 1)
+ throw kUnsupportedArcTypeMessage;
+ excludedFormats.AddToUniqueSorted(tempIndices[0]);
+ // excludedFormats.Sort();
+ }
+
+
+ #ifdef EXTERNAL_CODECS
+ if (isExtractGroupCommand
+ || options.Command.CommandType == NCommandType::kHash
+ || options.Command.CommandType == NCommandType::kBenchmark)
+ ThrowException_if_Error(__externalCodecs.Load());
+ #endif
+
+ int retCode = NExitCode::kSuccess;
+ HRESULT hresultMain = S_OK;
+
+ // bool showStat = options.ShowTime;
+
+ /*
+ if (!options.EnableHeaders ||
+ options.TechMode)
+ showStat = false;
+ */
+
+
if (options.Command.CommandType == NCommandType::kInfo)
{
- stdStream << endl << "Formats:" << endl;
- int i;
+ CStdOutStream &so = (g_StdStream ? *g_StdStream : g_StdOut);
+ unsigned i;
+
+ #ifdef EXTERNAL_CODECS
+ so << endl << "Libs:" << endl;
+ for (i = 0; i < codecs->Libs.Size(); i++)
+ {
+ PrintLibIndex(so, i);
+ so << ' ' << codecs->Libs[i].Path << endl;
+ }
+ #endif
+
+ so << endl << "Formats:" << endl;
+
+ const char *kArcFlags = "KSNFMGOPBELH";
+ const unsigned kNumArcFlags = (unsigned)strlen(kArcFlags);
+
for (i = 0; i < codecs->Formats.Size(); i++)
{
const CArcInfoEx &arc = codecs->Formats[i];
+
#ifdef EXTERNAL_CODECS
- if (arc.LibIndex >= 0)
+ PrintLibIndex(so, arc.LibIndex);
+ #else
+ so << " ";
+ #endif
+
+ so << (char)(arc.UpdateEnabled ? 'C' : ' ');
+
+ for (unsigned b = 0; b < kNumArcFlags; b++)
{
- char s[16];
- ConvertUInt32ToString(arc.LibIndex, s);
- PrintString(stdStream, s, 2);
+ so << (char)
+ ((arc.Flags & ((UInt32)1 << b)) != 0 ? kArcFlags[b] : ' ');
}
- else
- #endif
- stdStream << " ";
- stdStream << ' ';
- stdStream << (char)(arc.UpdateEnabled ? 'C' : ' ');
- stdStream << (char)(arc.KeepName ? 'K' : ' ');
- stdStream << " ";
- PrintString(stdStream, arc.Name, 6);
- stdStream << " ";
+
+ so << ' ';
+ PrintString(so, arc.Name, 8);
+ so << ' ';
UString s;
- for (int t = 0; t < arc.Exts.Size(); t++)
+
+ FOR_VECTOR (t, arc.Exts)
{
+ if (t != 0)
+ s.Add_Space();
const CArcExtInfo &ext = arc.Exts[t];
s += ext.Ext;
if (!ext.AddExt.IsEmpty())
@@ -292,199 +677,381 @@ int Main2(
s += ext.AddExt;
s += L')';
}
- s += L' ';
}
- PrintString(stdStream, s, 14);
- stdStream << " ";
- const CByteBuffer &sig = arc.StartSignature;
- for (size_t j = 0; j < sig.GetCapacity(); j++)
+
+ PrintString(so, s, 13);
+ so << ' ';
+
+ if (arc.SignatureOffset != 0)
+ so << "offset=" << arc.SignatureOffset << ' ';
+
+ FOR_VECTOR(si, arc.Signatures)
{
- Byte b = sig[j];
- if (b > 0x20 && b < 0x80)
- {
- stdStream << (char)b;
- }
- else
+ if (si != 0)
+ so << " || ";
+
+ const CByteBuffer &sig = arc.Signatures[si];
+
+ for (size_t j = 0; j < sig.Size(); j++)
{
- stdStream << GetHex((Byte)((b >> 4) & 0xF));
- stdStream << GetHex((Byte)(b & 0xF));
+ if (j != 0)
+ so << ' ';
+ Byte b = sig[j];
+ if (b > 0x20 && b < 0x80)
+ {
+ so << (char)b;
+ }
+ else
+ {
+ so << GetHex((b >> 4) & 0xF);
+ so << GetHex(b & 0xF);
+ }
}
- stdStream << ' ';
}
- stdStream << endl;
+ so << endl;
+ }
+
+ so << endl << "Codecs:" << endl; // << "Lib ID Name" << endl;
+
+ for (i = 0; i < g_NumCodecs; i++)
+ {
+ const CCodecInfo &cod = *g_Codecs[i];
+
+ PrintLibIndex(so, -1);
+
+ if (cod.NumStreams == 1)
+ so << ' ';
+ else
+ so << cod.NumStreams;
+
+ so << (char)(cod.CreateEncoder ? 'E' : ' ');
+ so << (char)(cod.CreateDecoder ? 'D' : ' ');
+
+ so << ' ';
+ PrintHexId(so, cod.Id);
+ so << ' ' << cod.Name << endl;
}
- stdStream << endl << "Codecs:" << endl;
+
#ifdef EXTERNAL_CODECS
+
UInt32 numMethods;
- if (codecs->GetNumberOfMethods(&numMethods) == S_OK)
+ if (codecs->GetNumMethods(&numMethods) == S_OK)
for (UInt32 j = 0; j < numMethods; j++)
{
- int libIndex = codecs->GetCodecLibIndex(j);
- if (libIndex >= 0)
- {
- char s[16];
- ConvertUInt32ToString(libIndex, s);
- PrintString(stdStream, s, 2);
- }
+ PrintLibIndex(so, codecs->GetCodec_LibIndex(j));
+
+ UInt32 numStreams = codecs->GetCodec_NumStreams(j);
+ if (numStreams == 1)
+ so << ' ';
else
- stdStream << " ";
- stdStream << ' ';
- stdStream << (char)(codecs->GetCodecEncoderIsAssigned(j) ? 'C' : ' ');
+ so << numStreams;
+
+ so << (char)(codecs->GetCodec_EncoderIsAssigned(j) ? 'E' : ' ');
+ so << (char)(codecs->GetCodec_DecoderIsAssigned(j) ? 'D' : ' ');
+
+ so << ' ';
UInt64 id;
- stdStream << " ";
- HRESULT res = codecs->GetCodecId(j, id);
+ HRESULT res = codecs->GetCodec_Id(j, id);
if (res != S_OK)
id = (UInt64)(Int64)-1;
- char s[32];
- ConvertUInt64ToString(id, s, 16);
- PrintString(stdStream, s, 8);
- stdStream << " ";
- PrintString(stdStream, codecs->GetCodecName(j), 11);
- stdStream << endl;
- /*
- if (res != S_OK)
- throw "incorrect Codec ID";
- */
+ PrintHexId(so, id);
+ so << ' ' << codecs->GetCodec_Name(j) << endl;
}
+
#endif
- return S_OK;
+
+
+ so << endl << "Hashers:" << endl; // << " L Size ID Name" << endl;
+
+ for (i = 0; i < g_NumHashers; i++)
+ {
+ const CHasherInfo &codec = *g_Hashers[i];
+ PrintLibIndex(so, -1);
+ PrintUInt32(so, codec.DigestSize, 4);
+ so << ' ';
+ PrintHexId(so, codec.Id);
+ so << ' ' << codec.Name << endl;
+ }
+
+ #ifdef EXTERNAL_CODECS
+
+ numMethods = codecs->GetNumHashers();
+ for (UInt32 j = 0; j < numMethods; j++)
+ {
+ PrintLibIndex(so, codecs->GetHasherLibIndex(j));
+ PrintUInt32(so, codecs->GetHasherDigestSize(j), 4);
+ so << ' ';
+ PrintHexId(so, codecs->GetHasherId(j));
+ so << ' ' << codecs->GetHasherName(j) << endl;
+ }
+
+ #endif
+
}
else if (options.Command.CommandType == NCommandType::kBenchmark)
{
+ CStdOutStream &so = (g_StdStream ? *g_StdStream : g_StdOut);
+ hresultMain = BenchCon(EXTERNAL_CODECS_VARS_L
+ options.Properties, options.NumIterations, (FILE *)so);
+ if (hresultMain == S_FALSE)
{
- HRESULT res;
- #ifdef EXTERNAL_CODECS
- CObjectVector<CCodecInfoEx> externalCodecs;
- res = LoadExternalCodecs(compressCodecsInfo, externalCodecs);
- if (res != S_OK)
- throw CSystemException(res);
- #endif
- res = BenchCon(
- #ifdef EXTERNAL_CODECS
- compressCodecsInfo, &externalCodecs,
- #endif
- options.Properties, options.NumIterations, (FILE *)stdStream);
- if (res != S_OK)
+ if (g_ErrStream)
+ *g_ErrStream << "\nDecoding ERROR\n";
+ retCode = NExitCode::kFatalError;
+ hresultMain = S_OK;
+ }
+ }
+ else if (isExtractGroupCommand || options.Command.CommandType == NCommandType::kList)
+ {
+ UStringVector ArchivePathsSorted;
+ UStringVector ArchivePathsFullSorted;
+
+ if (options.StdInMode)
+ {
+ ArchivePathsSorted.Add(options.ArcName_for_StdInMode);
+ ArchivePathsFullSorted.Add(options.ArcName_for_StdInMode);
+ }
+ else
+ {
+ CExtractScanConsole scan;
+
+ scan.Init(options.EnableHeaders ? g_StdStream : NULL, g_ErrStream, percentsStream);
+ scan.SetWindowWidth(consoleWidth);
+
+ if (g_StdStream && options.EnableHeaders)
+ *g_StdStream << "Scanning the drive for archives:" << endl;
+
+ CDirItemsStat st;
+
+ scan.StartScanning();
+
+ hresultMain = EnumerateDirItemsAndSort(
+ options.arcCensor,
+ NWildcard::k_RelatPath,
+ UString(), // addPathPrefix
+ ArchivePathsSorted,
+ ArchivePathsFullSorted,
+ st,
+ &scan);
+
+ scan.CloseScanning();
+
+ if (hresultMain == S_OK)
{
- if (res == S_FALSE)
+ if (options.EnableHeaders)
+ scan.PrintStat(st);
+ }
+ else
+ {
+ /*
+ if (res != E_ABORT)
{
- stdStream << "\nDecoding Error\n";
- return NExitCode::kFatalError;
+ throw CSystemException(res);
+ // errorInfo.Message = "Scanning error";
}
- throw CSystemException(res);
+ return res;
+ */
}
}
- }
- else if (isExtractGroupCommand || options.Command.CommandType == NCommandType::kList)
- {
+
+ if (hresultMain == S_OK)
if (isExtractGroupCommand)
{
CExtractCallbackConsole *ecs = new CExtractCallbackConsole;
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
- ecs->OutStream = &stdStream;
-
#ifndef _NO_CRYPTO
ecs->PasswordIsDefined = options.PasswordEnabled;
ecs->Password = options.Password;
#endif
- ecs->Init();
+ ecs->Init(g_StdStream, g_ErrStream, percentsStream);
+ ecs->MultiArcMode = (ArchivePathsSorted.Size() > 1);
+ ecs->LogLevel = options.LogLevel;
+ ecs->PercentsNameLevel = percentsNameLevel;
+
+ if (percentsStream)
+ ecs->SetWindowWidth(consoleWidth);
+
+ /*
COpenCallbackConsole openCallback;
- openCallback.OutStream = &stdStream;
+ openCallback.Init(g_StdStream, g_ErrStream);
#ifndef _NO_CRYPTO
openCallback.PasswordIsDefined = options.PasswordEnabled;
openCallback.Password = options.Password;
#endif
+ */
CExtractOptions eo;
+ (CExtractOptionsBase &)eo = options.ExtractOptions;
+
eo.StdInMode = options.StdInMode;
eo.StdOutMode = options.StdOutMode;
- eo.PathMode = options.Command.GetPathMode();
- eo.TestMode = options.Command.IsTestMode();
- eo.OverwriteMode = options.OverwriteMode;
- eo.OutputDir = options.OutputDir;
eo.YesToAll = options.YesToAll;
- eo.CalcCrc = options.CalcCrc;
- #if !defined(_7ZIP_ST) && !defined(_SFX)
+ eo.TestMode = options.Command.IsTestCommand();
+
+ #ifndef _SFX
eo.Properties = options.Properties;
#endif
+
UString errorMessage;
CDecompressStat stat;
- HRESULT result = DecompressArchives(
+ CHashBundle hb;
+ IHashCalc *hashCalc = NULL;
+
+ if (!options.HashMethods.IsEmpty())
+ {
+ hashCalc = &hb;
+ ThrowException_if_Error(hb.SetMethods(EXTERNAL_CODECS_VARS_L options.HashMethods));
+ hb.Init();
+ }
+
+ hresultMain = Extract(
codecs,
- formatIndices,
- options.ArchivePathsSorted,
- options.ArchivePathsFullSorted,
- options.WildcardCensor.Pairs.Front().Head,
- eo, &openCallback, ecs, errorMessage, stat);
+ types,
+ excludedFormats,
+ ArchivePathsSorted,
+ ArchivePathsFullSorted,
+ options.Censor.Pairs.Front().Head,
+ eo, ecs, ecs, hashCalc, errorMessage, stat);
+
+ ecs->ClosePercents();
+
if (!errorMessage.IsEmpty())
{
- stdStream << endl << "Error: " << errorMessage;
- if (result == S_OK)
- result = E_FAIL;
+ if (g_ErrStream)
+ *g_ErrStream << endl << "ERROR:" << endl << errorMessage << endl;
+ if (hresultMain == S_OK)
+ hresultMain = E_FAIL;
}
- stdStream << endl;
- if (ecs->NumArchives > 1)
- stdStream << "Archives: " << ecs->NumArchives << endl;
- if (ecs->NumArchiveErrors != 0 || ecs->NumFileErrors != 0)
+ CStdOutStream *so = g_StdStream;
+
+ bool isError = false;
+
+ if (so)
+ {
+ *so << endl;
+
+ if (ecs->NumTryArcs > 1)
+ {
+ *so << "Archives: " << ecs->NumTryArcs << endl;
+ *so << "OK archives: " << ecs->NumOkArcs << endl;
+ }
+ }
+
+ if (ecs->NumCantOpenArcs != 0)
+ {
+ isError = true;
+ if (so)
+ *so << "Can't open as archive: " << ecs->NumCantOpenArcs << endl;
+ }
+
+ if (ecs->NumArcsWithError != 0)
+ {
+ isError = true;
+ if (so)
+ *so << "Archives with Errors: " << ecs->NumArcsWithError << endl;
+ }
+
+ if (so)
{
- if (ecs->NumArchives > 1)
+ if (ecs->NumArcsWithWarnings != 0)
+ *so << "Archives with Warnings: " << ecs->NumArcsWithWarnings << endl;
+
+ if (ecs->NumOpenArcWarnings != 0)
{
- stdStream << endl;
- if (ecs->NumArchiveErrors != 0)
- stdStream << "Archive Errors: " << ecs->NumArchiveErrors << endl;
+ *so << endl;
+ if (ecs->NumOpenArcWarnings != 0)
+ *so << "Warnings: " << ecs->NumOpenArcWarnings << endl;
+ }
+ }
+
+ if (ecs->NumOpenArcErrors != 0)
+ {
+ isError = true;
+ if (so)
+ {
+ *so << endl;
+ if (ecs->NumOpenArcErrors != 0)
+ *so << "Open Errors: " << ecs->NumOpenArcErrors << endl;
+ }
+ }
+
+ if (isError)
+ retCode = NExitCode::kFatalError;
+
+ if (so)
+ if (ecs->NumArcsWithError != 0 || ecs->NumFileErrors != 0)
+ {
+ // if (ecs->NumArchives > 1)
+ {
+ *so << endl;
if (ecs->NumFileErrors != 0)
- stdStream << "Sub items Errors: " << ecs->NumFileErrors << endl;
+ *so << "Sub items Errors: " << ecs->NumFileErrors << endl;
}
- if (result != S_OK)
- throw CSystemException(result);
- return NExitCode::kFatalError;
}
- if (result != S_OK)
- throw CSystemException(result);
- if (stat.NumFolders != 0)
- stdStream << "Folders: " << stat.NumFolders << endl;
- if (stat.NumFiles != 1 || stat.NumFolders != 0)
- stdStream << "Files: " << stat.NumFiles << endl;
- stdStream
- << "Size: " << stat.UnpackSize << endl
- << "Compressed: " << stat.PackSize << endl;
- if (options.CalcCrc)
+ else if (hresultMain == S_OK)
{
- char s[16];
- ConvertUInt32ToHexWithZeros(stat.CrcSum, s);
- stdStream << "CRC: " << s << endl;
+ if (stat.NumFolders != 0)
+ *so << "Folders: " << stat.NumFolders << endl;
+ if (stat.NumFiles != 1 || stat.NumFolders != 0 || stat.NumAltStreams != 0)
+ *so << "Files: " << stat.NumFiles << endl;
+ if (stat.NumAltStreams != 0)
+ {
+ *so << "Alternate Streams: " << stat.NumAltStreams << endl;
+ *so << "Alternate Streams Size: " << stat.AltStreams_UnpackSize << endl;
+ }
+
+ *so
+ << "Size: " << stat.UnpackSize << endl
+ << "Compressed: " << stat.PackSize << endl;
+ if (hashCalc)
+ {
+ *so << endl;
+ PrintHashStat(*so, hb);
+ }
}
}
else
{
UInt64 numErrors = 0;
- HRESULT result = ListArchives(
+ UInt64 numWarnings = 0;
+
+ // options.ExtractNtOptions.StoreAltStreams = true, if -sns[-] is not definmed
+
+ hresultMain = ListArchives(
codecs,
- formatIndices,
+ types,
+ excludedFormats,
options.StdInMode,
- options.ArchivePathsSorted,
- options.ArchivePathsFullSorted,
- options.WildcardCensor.Pairs.Front().Head,
+ ArchivePathsSorted,
+ ArchivePathsFullSorted,
+ options.ExtractOptions.NtOptions.AltStreams.Val,
+ options.AltStreams.Val, // we don't want to show AltStreams by default
+ options.Censor.Pairs.Front().Head,
options.EnableHeaders,
options.TechMode,
#ifndef _NO_CRYPTO
options.PasswordEnabled,
options.Password,
#endif
- numErrors);
+ &options.Properties,
+ numErrors, numWarnings);
+
+ if (options.EnableHeaders)
+ if (numWarnings > 0)
+ g_StdOut << endl << "Warnings: " << numWarnings << endl;
+
if (numErrors > 0)
{
- g_StdOut << endl << "Errors: " << numErrors << endl;
- return NExitCode::kFatalError;
+ if (options.EnableHeaders)
+ g_StdOut << endl << "Errors: " << numErrors << endl;
+ retCode = NExitCode::kFatalError;
}
- if (result != S_OK)
- throw CSystemException(result);
}
}
else if (options.Command.IsFromUpdateGroup())
@@ -494,105 +1061,86 @@ int Main2(
uo.SfxModule = kDefaultSfxModule;
COpenCallbackConsole openCallback;
- openCallback.OutStream = &stdStream;
+ openCallback.Init(g_StdStream, g_ErrStream, percentsStream);
#ifndef _NO_CRYPTO
bool passwordIsDefined =
- options.PasswordEnabled && !options.Password.IsEmpty();
+ (options.PasswordEnabled && !options.Password.IsEmpty());
openCallback.PasswordIsDefined = passwordIsDefined;
openCallback.Password = options.Password;
#endif
CUpdateCallbackConsole callback;
- callback.EnablePercents = options.EnablePercents;
+ callback.LogLevel = options.LogLevel;
+ callback.PercentsNameLevel = percentsNameLevel;
+
+ if (percentsStream)
+ callback.SetWindowWidth(consoleWidth);
#ifndef _NO_CRYPTO
callback.PasswordIsDefined = passwordIsDefined;
- callback.AskPassword = options.PasswordEnabled && options.Password.IsEmpty();
+ callback.AskPassword = (options.PasswordEnabled && options.Password.IsEmpty());
callback.Password = options.Password;
#endif
+
callback.StdOutMode = uo.StdOutMode;
- callback.Init(&stdStream);
+ callback.Init(
+ // NULL,
+ g_StdStream, g_ErrStream, percentsStream);
CUpdateErrorInfo errorInfo;
- if (!uo.Init(codecs, formatIndices, options.ArchiveName))
- throw kUnsupportedArcTypeMessage;
- HRESULT result = UpdateArchive(codecs,
- options.WildcardCensor, uo,
- errorInfo, &openCallback, &callback);
+ /*
+ if (!uo.Init(codecs, types, options.ArchiveName))
+ throw kUnsupportedUpdateArcType;
+ */
+ hresultMain = UpdateArchive(codecs,
+ types,
+ options.ArchiveName,
+ options.Censor,
+ uo,
+ errorInfo, &openCallback, &callback, true);
- int exitCode = NExitCode::kSuccess;
- if (callback.CantFindFiles.Size() > 0)
- {
- stdStream << endl;
- stdStream << "WARNINGS for files:" << endl << endl;
- int numErrors = callback.CantFindFiles.Size();
- for (int i = 0; i < numErrors; i++)
- {
- stdStream << callback.CantFindFiles[i] << " : ";
- stdStream << NError::MyFormatMessageW(callback.CantFindCodes[i]) << endl;
- }
- stdStream << "----------------" << endl;
- stdStream << "WARNING: Cannot find " << numErrors << " file";
- if (numErrors > 1)
- stdStream << "s";
- stdStream << endl;
- exitCode = NExitCode::kWarning;
- }
+ callback.ClosePercents2();
- if (result != S_OK)
- {
- UString message;
- if (!errorInfo.Message.IsEmpty())
- {
- message += errorInfo.Message;
- message += L"\n";
- }
- if (!errorInfo.FileName.IsEmpty())
- {
- message += fs2us(errorInfo.FileName);
- message += L"\n";
- }
- if (!errorInfo.FileName2.IsEmpty())
- {
- message += fs2us(errorInfo.FileName2);
- message += L"\n";
- }
- if (errorInfo.SystemError != 0)
- {
- message += NError::MyFormatMessageW(errorInfo.SystemError);
- message += L"\n";
- }
- if (!message.IsEmpty())
- stdStream << L"\nError:\n" << message;
- throw CSystemException(result);
- }
- int numErrors = callback.FailedFiles.Size();
- if (numErrors == 0)
- {
- if (callback.CantFindFiles.Size() == 0)
- stdStream << kEverythingIsOk << endl;
- }
- else
- {
- stdStream << endl;
- stdStream << "WARNINGS for files:" << endl << endl;
- for (int i = 0; i < numErrors; i++)
- {
- stdStream << callback.FailedFiles[i] << " : ";
- stdStream << NError::MyFormatMessageW(callback.FailedCodes[i]) << endl;
- }
- stdStream << "----------------" << endl;
- stdStream << "WARNING: Cannot open " << numErrors << " file";
- if (numErrors > 1)
- stdStream << "s";
- stdStream << endl;
- exitCode = NExitCode::kWarning;
- }
- return exitCode;
+ CStdOutStream *se = g_StdStream;
+ if (!se)
+ se = g_ErrStream;
+
+ retCode = WarningsCheck(hresultMain, callback, errorInfo,
+ g_StdStream, se,
+ true // options.EnableHeaders
+ );
+ }
+ else if (options.Command.CommandType == NCommandType::kHash)
+ {
+ const CHashOptions &uo = options.HashOptions;
+
+ CHashCallbackConsole callback;
+ if (percentsStream)
+ callback.SetWindowWidth(consoleWidth);
+
+ callback.Init(g_StdStream, g_ErrStream, percentsStream);
+ callback.PrintHeaders = options.EnableHeaders;
+
+ AString errorInfoString;
+ hresultMain = HashCalc(EXTERNAL_CODECS_VARS_L
+ options.Censor, uo,
+ errorInfoString, &callback);
+ CUpdateErrorInfo errorInfo;
+ errorInfo.Message = errorInfoString;
+ CStdOutStream *se = g_StdStream;
+ if (!se)
+ se = g_ErrStream;
+ retCode = WarningsCheck(hresultMain, callback, errorInfo, g_StdStream, se, options.EnableHeaders);
}
else
- PrintHelpAndExit(stdStream);
- return 0;
+ ShowMessageAndThrowException(kUserErrorMessage, NExitCode::kUserError);
+
+ if (options.ShowTime && g_StdStream)
+ PrintStat();
+
+ ThrowException_if_Error(hresultMain);
+
+ return retCode;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/MainAr.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/MainAr.cpp
index 25f4bd0df44..d30a96e4be2 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/MainAr.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/MainAr.cpp
@@ -2,11 +2,11 @@
#include "StdAfx.h"
-#include "Common/MyException.h"
-#include "Common/StdOutStream.h"
+#include "../../../Common/MyException.h"
+#include "../../../Common/StdOutStream.h"
-#include "Windows/Error.h"
-#include "Windows/NtCheck.h"
+#include "../../../Windows/ErrorMsg.h"
+#include "../../../Windows/NtCheck.h"
#include "../Common/ArchiveCommandLine.h"
#include "../Common/ExitCode.h"
@@ -15,35 +15,52 @@
using namespace NWindows;
-CStdOutStream *g_StdStream = 0;
+CStdOutStream *g_StdStream = NULL;
+CStdOutStream *g_ErrStream = NULL;
extern int Main2(
#ifndef _WIN32
- int numArgs, const char *args[]
+ int numArgs, char *args[]
#endif
);
-static const char *kExceptionErrorMessage = "\n\nError:\n";
-static const char *kUserBreak = "\nBreak signaled\n";
-static const char *kMemoryExceptionMessage = "\n\nERROR: Can't allocate required memory!\n";
-static const char *kUnknownExceptionMessage = "\n\nUnknown Error\n";
+static const char *kException_CmdLine_Error_Message = "Command Line Error:";
+static const char *kExceptionErrorMessage = "ERROR:";
+static const char *kUserBreakMessage = "Break signaled";
+static const char *kMemoryExceptionMessage = "ERROR: Can't allocate required memory!";
+static const char *kUnknownExceptionMessage = "Unknown Error";
static const char *kInternalExceptionMessage = "\n\nInternal Error #";
-#define NT_CHECK_FAIL_ACTION (*g_StdStream) << "Unsupported Windows version"; return NExitCode::kFatalError;
+static void FlushStreams()
+{
+ if (g_StdStream)
+ g_StdStream->Flush();
+}
+
+static void PrintError(const char *message)
+{
+ FlushStreams();
+ if (g_ErrStream)
+ *g_ErrStream << "\n\n" << message << endl;
+}
+
+#define NT_CHECK_FAIL_ACTION *g_StdStream << "Unsupported Windows version"; return NExitCode::kFatalError;
int MY_CDECL main
(
#ifndef _WIN32
- int numArgs, const char *args[]
+ int numArgs, char *args[]
#endif
)
{
+ g_ErrStream = &g_StdErr;
g_StdStream = &g_StdOut;
NT_CHECK
NConsoleClose::CCtrlHandlerSetter ctrlHandlerSetter;
int res = 0;
+
try
{
res = Main2(
@@ -54,71 +71,97 @@ int MY_CDECL main
}
catch(const CNewException &)
{
- (*g_StdStream) << kMemoryExceptionMessage;
+ PrintError(kMemoryExceptionMessage);
return (NExitCode::kMemoryError);
}
catch(const NConsoleClose::CCtrlBreakException &)
{
- (*g_StdStream) << endl << kUserBreak;
+ PrintError(kUserBreakMessage);
return (NExitCode::kUserBreak);
}
- catch(const CArchiveCommandLineException &e)
+ catch(const CArcCmdLineException &e)
{
- (*g_StdStream) << kExceptionErrorMessage << e << endl;
+ PrintError(kException_CmdLine_Error_Message);
+ if (g_ErrStream)
+ *g_ErrStream << e << endl;
return (NExitCode::kUserError);
}
catch(const CSystemException &systemError)
{
if (systemError.ErrorCode == E_OUTOFMEMORY)
{
- (*g_StdStream) << kMemoryExceptionMessage;
+ PrintError(kMemoryExceptionMessage);
return (NExitCode::kMemoryError);
}
if (systemError.ErrorCode == E_ABORT)
{
- (*g_StdStream) << endl << kUserBreak;
+ PrintError(kUserBreakMessage);
return (NExitCode::kUserBreak);
}
- (*g_StdStream) << endl << endl << "System error:" << endl <<
- NError::MyFormatMessageW(systemError.ErrorCode) << endl;
+ if (g_ErrStream)
+ {
+ PrintError("System ERROR:");
+ *g_ErrStream << NError::MyFormatMessage(systemError.ErrorCode) << endl;
+ }
return (NExitCode::kFatalError);
}
catch(NExitCode::EEnum &exitCode)
{
- (*g_StdStream) << kInternalExceptionMessage << exitCode << endl;
+ FlushStreams();
+ if (g_ErrStream)
+ *g_ErrStream << kInternalExceptionMessage << exitCode << endl;
return (exitCode);
}
- /*
- catch(const NExitCode::CMultipleErrors &multipleErrors)
- {
- (*g_StdStream) << endl << multipleErrors.NumErrors << " errors" << endl;
- return (NExitCode::kFatalError);
- }
- */
catch(const UString &s)
{
- (*g_StdStream) << kExceptionErrorMessage << s << endl;
+ if (g_ErrStream)
+ {
+ PrintError(kExceptionErrorMessage);
+ *g_ErrStream << s << endl;
+ }
return (NExitCode::kFatalError);
}
catch(const AString &s)
{
- (*g_StdStream) << kExceptionErrorMessage << s << endl;
+ if (g_ErrStream)
+ {
+ PrintError(kExceptionErrorMessage);
+ *g_ErrStream << s << endl;
+ }
return (NExitCode::kFatalError);
}
catch(const char *s)
{
- (*g_StdStream) << kExceptionErrorMessage << s << endl;
+ if (g_ErrStream)
+ {
+ PrintError(kExceptionErrorMessage);
+ *g_ErrStream << s << endl;
+ }
return (NExitCode::kFatalError);
}
- catch(int t)
+ catch(const wchar_t *s)
{
- (*g_StdStream) << kInternalExceptionMessage << t << endl;
+ if (g_ErrStream)
+ {
+ PrintError(kExceptionErrorMessage);
+ *g_ErrStream << s << endl;
+ }
return (NExitCode::kFatalError);
}
+ catch(int t)
+ {
+ if (g_ErrStream)
+ {
+ FlushStreams();
+ *g_ErrStream << kInternalExceptionMessage << t << endl;
+ return (NExitCode::kFatalError);
+ }
+ }
catch(...)
{
- (*g_StdStream) << kUnknownExceptionMessage;
+ PrintError(kUnknownExceptionMessage);
return (NExitCode::kFatalError);
}
- return res;
+
+ return res;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp
index 7dba2ad5d9b..9d25a729ca0 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp
@@ -7,41 +7,93 @@
#include "ConsoleClose.h"
#include "UserInputUtils.h"
+static HRESULT CheckBreak2()
+{
+ return NConsoleClose::TestBreakSignal() ? E_ABORT : S_OK;
+}
+
HRESULT COpenCallbackConsole::Open_CheckBreak()
{
- if (NConsoleClose::TestBreakSignal())
- return E_ABORT;
- return S_OK;
+ return CheckBreak2();
}
-HRESULT COpenCallbackConsole::Open_SetTotal(const UInt64 *, const UInt64 *)
+HRESULT COpenCallbackConsole::Open_SetTotal(const UInt64 *files, const UInt64 *bytes)
{
- return Open_CheckBreak();
+ if (!MultiArcMode && NeedPercents())
+ {
+ if (files)
+ {
+ _totalFilesDefined = true;
+ // _totalFiles = *files;
+ _percent.Total = *files;
+ }
+ else
+ _totalFilesDefined = false;
+
+ if (bytes)
+ {
+ _totalBytesDefined = true;
+ // _totalBytes = *bytes;
+ if (!files)
+ _percent.Total = *bytes;
+ }
+ else
+ _totalBytesDefined = false;
+ }
+
+ return CheckBreak2();
}
-HRESULT COpenCallbackConsole::Open_SetCompleted(const UInt64 *, const UInt64 *)
+HRESULT COpenCallbackConsole::Open_SetCompleted(const UInt64 *files, const UInt64 *bytes)
{
- return Open_CheckBreak();
+ if (!MultiArcMode && NeedPercents())
+ {
+ if (files)
+ {
+ _percent.Files = *files;
+ if (_totalFilesDefined)
+ _percent.Completed = *files;
+ }
+
+ if (bytes)
+ {
+ if (!_totalFilesDefined)
+ _percent.Completed = *bytes;
+ }
+ _percent.Print();
+ }
+
+ return CheckBreak2();
}
-
+
+HRESULT COpenCallbackConsole::Open_Finished()
+{
+ ClosePercents();
+ return S_OK;
+}
+
+
#ifndef _NO_CRYPTO
HRESULT COpenCallbackConsole::Open_CryptoGetTextPassword(BSTR *password)
{
- PasswordWasAsked = true;
- RINOK(Open_CheckBreak());
+ *password = NULL;
+ RINOK(CheckBreak2());
+
if (!PasswordIsDefined)
{
- Password = GetPassword(OutStream);
+ ClosePercents();
+ Password = GetPassword(_so);
PasswordIsDefined = true;
}
return StringToBstr(Password, password);
}
-HRESULT COpenCallbackConsole::Open_GetPasswordIfAny(UString &password)
+/*
+HRESULT COpenCallbackConsole::Open_GetPasswordIfAny(bool &passwordIsDefined, UString &password)
{
- if (PasswordIsDefined)
- password = Password;
+ passwordIsDefined = PasswordIsDefined;
+ password = Password;
return S_OK;
}
@@ -50,9 +102,10 @@ bool COpenCallbackConsole::Open_WasPasswordAsked()
return PasswordWasAsked;
}
-void COpenCallbackConsole::Open_ClearPasswordWasAskedFlag()
+void COpenCallbackConsole::Open_Clear_PasswordWasAsked_Flag ()
{
PasswordWasAsked = false;
}
+*/
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h b/3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h
index c002e6a726f..0dd4e1d1c82 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h
@@ -1,23 +1,64 @@
// OpenCallbackConsole.h
-#ifndef __OPENCALLBACKCONSOLE_H
-#define __OPENCALLBACKCONSOLE_H
+#ifndef __OPEN_CALLBACK_CONSOLE_H
+#define __OPEN_CALLBACK_CONSOLE_H
+
+#include "../../../Common/StdOutStream.h"
-#include "Common/StdOutStream.h"
#include "../Common/ArchiveOpenCallback.h"
+#include "PercentPrinter.h"
+
class COpenCallbackConsole: public IOpenCallbackUI
{
+protected:
+ CPercentPrinter _percent;
+
+ CStdOutStream *_so;
+ CStdOutStream *_se;
+
+ bool _totalFilesDefined;
+ bool _totalBytesDefined;
+ // UInt64 _totalFiles;
+ // UInt64 _totalBytes;
+
+ bool NeedPercents() const { return _percent._so != NULL; }
+
public:
- INTERFACE_IOpenCallbackUI(;)
+
+ bool MultiArcMode;
+
+ void ClosePercents()
+ {
+ if (NeedPercents())
+ _percent.ClosePrint(true);
+ }
+
+ COpenCallbackConsole():
+ _totalFilesDefined(false),
+ _totalBytesDefined(false),
+ MultiArcMode(false)
+
+ #ifndef _NO_CRYPTO
+ , PasswordIsDefined(false)
+ // , PasswordWasAsked(false)
+ #endif
+
+ {}
- CStdOutStream *OutStream;
+ void Init(CStdOutStream *outStream, CStdOutStream *errorStream, CStdOutStream *percentStream)
+ {
+ _so = outStream;
+ _se = errorStream;
+ _percent._so = percentStream;
+ }
+ INTERFACE_IOpenCallbackUI(;)
+
#ifndef _NO_CRYPTO
bool PasswordIsDefined;
- bool PasswordWasAsked;
+ // bool PasswordWasAsked;
UString Password;
- COpenCallbackConsole(): PasswordIsDefined(false), PasswordWasAsked(false) {}
#endif
};
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp
index 786db1bcebb..e3e8d599811 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp
@@ -2,101 +2,180 @@
#include "StdAfx.h"
-#include "Common/IntToString.h"
-#include "Common/MyString.h"
+#include "../../../Common/IntToString.h"
#include "PercentPrinter.h"
-static const unsigned kPaddingSize = 2;
static const unsigned kPercentsSize = 4;
-static const unsigned kMaxExtraSize = kPaddingSize + 32 + kPercentsSize;
-static void ClearPrev(char *p, unsigned num)
+CPercentPrinter::~CPercentPrinter()
{
- unsigned i;
- for (i = 0; i < num; i++) *p++ = '\b';
- for (i = 0; i < num; i++) *p++ = ' ';
- for (i = 0; i < num; i++) *p++ = '\b';
- *p = '\0';
-}
-
-void CPercentPrinter::ClosePrint()
-{
- if (m_NumExtraChars == 0)
- return;
- char s[kMaxExtraSize * 3 + 1];
- ClearPrev(s, m_NumExtraChars);
- (*OutStream) << s;
- m_NumExtraChars = 0;
+ ClosePrint(false);
}
-void CPercentPrinter::PrintString(const char *s)
+void CPercentPrinterState::ClearCurState()
{
- ClosePrint();
- (*OutStream) << s;
+ Completed = 0;
+ Total = ((UInt64)(Int64)-1);
+ Files = 0;
+ Command.Empty();
+ FileName.Empty();
}
-void CPercentPrinter::PrintString(const wchar_t *s)
+void CPercentPrinter::ClosePrint(bool needFlush)
{
- ClosePrint();
- (*OutStream) << s;
-}
+ unsigned num = _printedString.Len();
+ if (num != 0)
+ {
-void CPercentPrinter::PrintNewLine()
-{
- ClosePrint();
- (*OutStream) << "\n";
+ unsigned i;
+
+ /* '\r' in old MAC OS means "new line".
+ So we can't use '\r' in some systems */
+
+ #ifdef _WIN32
+ char *start = _temp.GetBuf(num + 2);
+ char *p = start;
+ *p++ = '\r';
+ for (i = 0; i < num; i++) *p++ = ' ';
+ *p++ = '\r';
+ #else
+ char *start = _temp.GetBuf(num * 3);
+ char *p = start;
+ for (i = 0; i < num; i++) *p++ = '\b';
+ for (i = 0; i < num; i++) *p++ = ' ';
+ for (i = 0; i < num; i++) *p++ = '\b';
+ #endif
+
+ *p = 0;
+ _temp.ReleaseBuf_SetLen((unsigned)(p - start));
+ *_so << _temp;
+ }
+ if (needFlush)
+ _so->Flush();
+ _printedString.Empty();
}
-void CPercentPrinter::RePrintRatio()
+void CPercentPrinter::GetPercents()
{
char s[32];
unsigned size;
{
char c = '%';
- UInt64 value = 0;
- if (m_Total == (UInt64)(Int64)-1)
+ UInt64 val = 0;
+ if (Total == (UInt64)(Int64)-1)
{
- value = m_CurValue >> 20;
+ val = Completed >> 20;
c = 'M';
}
- else if (m_Total != 0)
- value = m_CurValue * 100 / m_Total;
- ConvertUInt64ToString(value, s);
+ else if (Total != 0)
+ val = Completed * 100 / Total;
+ ConvertUInt64ToString(val, s);
size = (unsigned)strlen(s);
s[size++] = c;
- s[size] = '\0';
+ s[size] = 0;
}
- unsigned extraSize = kPaddingSize + MyMax(size, kPercentsSize);
- if (extraSize < m_NumExtraChars)
- extraSize = m_NumExtraChars;
-
- char fullString[kMaxExtraSize * 3];
- char *p = fullString;
- unsigned i;
- if (m_NumExtraChars == 0)
+ while (size < kPercentsSize)
{
- for (i = 0; i < extraSize; i++)
- *p++ = ' ';
- m_NumExtraChars = extraSize;
+ _s += ' ';
+ size++;
}
- for (i = 0; i < m_NumExtraChars; i++)
- *p++ = '\b';
- m_NumExtraChars = extraSize;
- for (; size < extraSize; size++)
- *p++ = ' ';
- MyStringCopy(p, s);
- (*OutStream) << fullString;
- OutStream->Flush();
- m_PrevValue = m_CurValue;
+ _s += s;
}
-void CPercentPrinter::PrintRatio()
+void CPercentPrinter::Print()
{
- if (m_CurValue < m_PrevValue + m_MinStepSize &&
- m_CurValue + m_MinStepSize > m_PrevValue && m_NumExtraChars != 0)
+ DWORD tick = 0;
+ if (_tickStep != 0)
+ tick = GetTickCount();
+
+ bool onlyPercentsChanged = false;
+
+ if (!_printedString.IsEmpty())
+ {
+ if (_tickStep != 0 && (UInt32)(tick - _prevTick) < _tickStep)
+ return;
+
+ CPercentPrinterState &st = *this;
+ if (_printedState.Command == st.Command
+ && _printedState.FileName == st.FileName
+ && _printedState.Files == st.Files)
+ {
+ if (_printedState.Total == st.Total
+ && _printedState.Completed == st.Completed)
+ return;
+ onlyPercentsChanged = true;
+ }
+ }
+
+ _s.Empty();
+
+ GetPercents();
+
+ if (onlyPercentsChanged && _s == _printedPercents)
return;
- RePrintRatio();
+
+ _printedPercents = _s;
+
+ if (Files != 0)
+ {
+ char s[32];
+ ConvertUInt64ToString(Files, s);
+ // unsigned size = (unsigned)strlen(s);
+ // for (; size < 3; size++) _s += ' ';
+ _s += ' ';
+ _s += s;
+ // _s += "f";
+ }
+
+
+ if (!Command.IsEmpty())
+ {
+ _s += ' ';
+ _s += Command;
+ }
+
+ if (!FileName.IsEmpty() && _s.Len() < MaxLen)
+ {
+ _s += ' ';
+
+ StdOut_Convert_UString_to_AString(FileName, _temp);
+ _temp.Replace('\n', ' ');
+ if (_s.Len() + _temp.Len() > MaxLen)
+ {
+ unsigned len = FileName.Len();
+ for (; len != 0;)
+ {
+ unsigned delta = len / 8;
+ if (delta == 0)
+ delta = 1;
+ len -= delta;
+ _tempU = FileName;
+ _tempU.Delete(len / 2, FileName.Len() - len);
+ _tempU.Insert(len / 2, L" . ");
+ StdOut_Convert_UString_to_AString(_tempU, _temp);
+ if (_s.Len() + _temp.Len() <= MaxLen)
+ break;
+ }
+ if (len == 0)
+ _temp.Empty();
+ }
+ _s += _temp;
+ }
+
+ if (_printedString != _s)
+ {
+ ClosePrint(false);
+ *_so << _s;
+ if (NeedFlush)
+ _so->Flush();
+ _printedString = _s;
+ }
+
+ _printedState = *this;
+
+ if (_tickStep != 0)
+ _prevTick = tick;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/PercentPrinter.h b/3rdparty/lzma/CPP/7zip/UI/Console/PercentPrinter.h
index d970cc4b94f..95290b37e9c 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/PercentPrinter.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/PercentPrinter.h
@@ -3,28 +3,60 @@
#ifndef __PERCENT_PRINTER_H
#define __PERCENT_PRINTER_H
-#include "Common/StdOutStream.h"
+#include "../../../Common/StdOutStream.h"
-class CPercentPrinter
+struct CPercentPrinterState
{
- UInt64 m_MinStepSize;
- UInt64 m_PrevValue;
- UInt64 m_CurValue;
- UInt64 m_Total;
- unsigned m_NumExtraChars;
+ UInt64 Completed;
+ UInt64 Total;
+
+ UInt64 Files;
+
+ AString Command;
+ UString FileName;
+
+ void ClearCurState();
+
+ CPercentPrinterState():
+ Completed(0),
+ Total((UInt64)(Int64)-1),
+ Files(0)
+ {}
+};
+
+class CPercentPrinter: public CPercentPrinterState
+{
+ UInt32 _tickStep;
+ DWORD _prevTick;
+
+ AString _s;
+
+ AString _printedString;
+ AString _temp;
+ UString _tempU;
+
+ CPercentPrinterState _printedState;
+ AString _printedPercents;
+
+ void GetPercents();
+
public:
- CStdOutStream *OutStream;
-
- CPercentPrinter(UInt64 minStepSize = 1): m_MinStepSize(minStepSize),
- m_PrevValue(0), m_CurValue(0), m_Total((UInt64)(Int64)-1), m_NumExtraChars(0) {}
- void SetTotal(UInt64 total) { m_Total = total; m_PrevValue = 0; }
- void SetRatio(UInt64 doneValue) { m_CurValue = doneValue; }
- void PrintString(const char *s);
- void PrintString(const wchar_t *s);
- void PrintNewLine();
- void ClosePrint();
- void RePrintRatio();
- void PrintRatio();
+ CStdOutStream *_so;
+
+ bool NeedFlush;
+ unsigned MaxLen;
+
+ CPercentPrinter(UInt32 tickStep = 200):
+ _tickStep(tickStep),
+ _prevTick(0),
+ NeedFlush(true),
+ MaxLen(80 - 1)
+ {}
+
+ ~CPercentPrinter();
+
+ void ClosePrint(bool needFlush);
+ void Print();
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/StdAfx.h b/3rdparty/lzma/CPP/7zip/UI/Console/StdAfx.h
index 2e4be10b291..2854ff3e935 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../../../Common/MyWindows.h"
-#include "../../../Common/NewHandler.h"
+#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp
index 7f337319714..f4f2d10210d 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp
@@ -2,15 +2,17 @@
#include "StdAfx.h"
-#include "UpdateCallbackConsole.h"
+#include "../../../Common/IntToString.h"
+
+#include "../../../Windows/ErrorMsg.h"
-#include "Windows/Error.h"
#ifndef _7ZIP_ST
-#include "Windows/Synchronization.h"
+#include "../../../Windows/Synchronization.h"
#endif
#include "ConsoleClose.h"
#include "UserInputUtils.h"
+#include "UpdateCallbackConsole.h"
using namespace NWindows;
@@ -23,179 +25,590 @@ static NSynchronization::CCriticalSection g_CriticalSection;
static const wchar_t *kEmptyFileAlias = L"[Content]";
-static const char *kCreatingArchiveMessage = "Creating archive ";
-static const char *kUpdatingArchiveMessage = "Updating archive ";
-static const char *kScanningMessage = "Scanning";
+static const char *kOpenArchiveMessage = "Open archive: ";
+static const char *kCreatingArchiveMessage = "Creating archive: ";
+static const char *kUpdatingArchiveMessage = "Updating archive: ";
+static const char *kScanningMessage = "Scanning the drive:";
+
+static const char *kError = "ERROR: ";
+static const char *kWarning = "WARNING: ";
+
+static HRESULT CheckBreak2()
+{
+ return NConsoleClose::TestBreakSignal() ? E_ABORT : S_OK;
+}
+
+HRESULT Print_OpenArchive_Props(CStdOutStream &so, const CCodecs *codecs, const CArchiveLink &arcLink);
+HRESULT Print_OpenArchive_Error(CStdOutStream &so, const CCodecs *codecs, const CArchiveLink &arcLink);
+
+void PrintErrorFlags(CStdOutStream &so, const char *s, UInt32 errorFlags);
+void Print_ErrorFormatIndex_Warning(CStdOutStream *_so, const CCodecs *codecs, const CArc &arc);
-HRESULT CUpdateCallbackConsole::OpenResult(const wchar_t *name, HRESULT result)
+HRESULT CUpdateCallbackConsole::OpenResult(
+ const CCodecs *codecs, const CArchiveLink &arcLink,
+ const wchar_t *name, HRESULT result)
{
- (*OutStream) << endl;
- if (result != S_OK)
- (*OutStream) << "Error: " << name << " is not supported archive" << endl;
+ ClosePercents2();
+
+ FOR_VECTOR (level, arcLink.Arcs)
+ {
+ const CArc &arc = arcLink.Arcs[level];
+ const CArcErrorInfo &er = arc.ErrorInfo;
+
+ UInt32 errorFlags = er.GetErrorFlags();
+
+ if (errorFlags != 0 || !er.ErrorMessage.IsEmpty())
+ {
+ if (_se)
+ {
+ *_se << endl;
+ if (level != 0)
+ *_se << arc.Path << endl;
+ }
+
+ if (errorFlags != 0)
+ {
+ if (_se)
+ PrintErrorFlags(*_se, "ERRORS:", errorFlags);
+ }
+
+ if (!er.ErrorMessage.IsEmpty())
+ {
+ if (_se)
+ *_se << "ERRORS:" << endl << er.ErrorMessage << endl;
+ }
+
+ if (_se)
+ {
+ *_se << endl;
+ _se->Flush();
+ }
+ }
+
+ UInt32 warningFlags = er.GetWarningFlags();
+
+ if (warningFlags != 0 || !er.WarningMessage.IsEmpty())
+ {
+ if (_so)
+ {
+ *_so << endl;
+ if (level != 0)
+ *_so << arc.Path << endl;
+ }
+
+ if (warningFlags != 0)
+ {
+ if (_so)
+ PrintErrorFlags(*_so, "WARNINGS:", warningFlags);
+ }
+
+ if (!er.WarningMessage.IsEmpty())
+ {
+ if (_so)
+ *_so << "WARNINGS:" << endl << er.WarningMessage << endl;
+ }
+
+ if (_so)
+ {
+ *_so << endl;
+ if (NeedFlush)
+ _so->Flush();
+ }
+ }
+
+
+ if (er.ErrorFormatIndex >= 0)
+ {
+ if (_so)
+ {
+ Print_ErrorFormatIndex_Warning(_so, codecs, arc);
+ if (NeedFlush)
+ _so->Flush();
+ }
+ }
+ }
+
+ if (result == S_OK)
+ {
+ if (_so)
+ {
+ RINOK(Print_OpenArchive_Props(*_so, codecs, arcLink));
+ *_so << endl;
+ }
+ }
+ else
+ {
+ if (_so)
+ _so->Flush();
+ if (_se)
+ {
+ *_se << kError << name << endl;
+ HRESULT res = Print_OpenArchive_Error(*_se, codecs, arcLink);
+ RINOK(res);
+ _se->Flush();
+ }
+ }
+
return S_OK;
}
HRESULT CUpdateCallbackConsole::StartScanning()
{
- (*OutStream) << kScanningMessage;
+ if (_so)
+ *_so << kScanningMessage << endl;
+ _percent.Command = "Scan ";
return S_OK;
}
-HRESULT CUpdateCallbackConsole::ScanProgress(UInt64 /* numFolders */, UInt64 /* numFiles */, const wchar_t * /* path */)
+HRESULT CUpdateCallbackConsole::ScanProgress(const CDirItemsStat &st, const FString &path, bool /* isDir */)
{
+ if (NeedPercents())
+ {
+ _percent.Files = st.NumDirs + st.NumFiles + st.NumAltStreams;
+ _percent.Completed = st.GetTotalBytes();
+ _percent.FileName = fs2us(path);
+ _percent.Print();
+ }
+
return CheckBreak();
}
-HRESULT CUpdateCallbackConsole::CanNotFindError(const wchar_t *name, DWORD systemError)
+void CCallbackConsoleBase::CommonError(const FString &path, DWORD systemError, bool isWarning)
+{
+ ClosePercents2();
+
+ if (_se)
+ {
+ if (_so)
+ _so->Flush();
+
+ *_se << endl << (isWarning ? kWarning : kError)
+ << NError::MyFormatMessage(systemError)
+ << endl << fs2us(path) << endl << endl;
+ _se->Flush();
+ }
+}
+
+
+HRESULT CCallbackConsoleBase::ScanError_Base(const FString &path, DWORD systemError)
+{
+ MT_LOCK
+
+ ScanErrors.AddError(path, systemError);
+ CommonError(path, systemError, true);
+
+ return S_OK;
+}
+
+HRESULT CCallbackConsoleBase::OpenFileError_Base(const FString &path, DWORD systemError)
+{
+ MT_LOCK
+ FailedFiles.AddError(path, systemError);
+ /*
+ if (systemError == ERROR_SHARING_VIOLATION)
+ {
+ */
+ CommonError(path, systemError, true);
+ return S_FALSE;
+ /*
+ }
+ return systemError;
+ */
+}
+
+HRESULT CCallbackConsoleBase::ReadingFileError_Base(const FString &path, DWORD systemError)
+{
+ MT_LOCK
+ CommonError(path, systemError, false);
+ return HRESULT_FROM_WIN32(systemError);
+}
+
+HRESULT CUpdateCallbackConsole::ScanError(const FString &path, DWORD systemError)
+{
+ return ScanError_Base(path, systemError);
+}
+
+
+static void PrintPropPair(AString &s, const char *name, UInt64 val)
+{
+ char temp[32];
+ ConvertUInt64ToString(val, temp);
+ s += name;
+ s += ": ";
+ s += temp;
+}
+
+void PrintSize_bytes_Smart(AString &s, UInt64 val);
+void Print_DirItemsStat(AString &s, const CDirItemsStat &st);
+
+HRESULT CUpdateCallbackConsole::FinishScanning(const CDirItemsStat &st)
{
- CantFindFiles.Add(name);
- CantFindCodes.Add(systemError);
- // m_PercentPrinter.ClosePrint();
- if (!m_WarningsMode)
+ if (NeedPercents())
+ {
+ _percent.ClosePrint(true);
+ _percent.ClearCurState();
+ }
+
+ if (_so)
{
- (*OutStream) << endl << endl;
- m_PercentPrinter.PrintNewLine();
- m_WarningsMode = true;
+ AString s;
+ Print_DirItemsStat(s, st);
+ *_so << s << endl << endl;
}
- m_PercentPrinter.PrintString(name);
- m_PercentPrinter.PrintString(": WARNING: ");
- m_PercentPrinter.PrintString(NError::MyFormatMessageW(systemError));
- m_PercentPrinter.PrintNewLine();
return S_OK;
}
-HRESULT CUpdateCallbackConsole::FinishScanning()
+static const char *k_StdOut_ArcName = "StdOut";
+
+HRESULT CUpdateCallbackConsole::StartOpenArchive(const wchar_t *name)
{
- (*OutStream) << endl << endl;
+ if (_so)
+ {
+ *_so << kOpenArchiveMessage;
+ if (name)
+ *_so << name;
+ else
+ *_so << k_StdOut_ArcName;
+ *_so << endl;
+ }
return S_OK;
}
HRESULT CUpdateCallbackConsole::StartArchive(const wchar_t *name, bool updating)
{
- if(updating)
- (*OutStream) << kUpdatingArchiveMessage;
- else
- (*OutStream) << kCreatingArchiveMessage;
- if (name != 0)
- (*OutStream) << name;
- else
- (*OutStream) << "StdOut";
- (*OutStream) << endl << endl;
+ if (_so)
+ {
+ *_so << (updating ? kUpdatingArchiveMessage : kCreatingArchiveMessage);
+ if (name != 0)
+ *_so << name;
+ else
+ *_so << k_StdOut_ArcName;
+ *_so << endl << endl;
+ }
return S_OK;
}
-HRESULT CUpdateCallbackConsole::FinishArchive()
+HRESULT CUpdateCallbackConsole::FinishArchive(const CFinishArchiveStat &st)
{
- (*OutStream) << endl;
+ ClosePercents2();
+
+ if (_so)
+ {
+ AString s;
+ // Print_UInt64_and_String(s, _percent.Files == 1 ? "file" : "files", _percent.Files);
+ PrintPropPair(s, "Files read from disk", _percent.Files);
+ s.Add_LF();
+ s += "Archive size: ";
+ PrintSize_bytes_Smart(s, st.OutArcFileSize);
+ s.Add_LF();
+ *_so << endl;
+ *_so << s;
+ // *_so << endl;
+ }
+
return S_OK;
}
-HRESULT CUpdateCallbackConsole::CheckBreak()
+HRESULT CUpdateCallbackConsole::WriteSfx(const wchar_t *name, UInt64 size)
{
- if (NConsoleClose::TestBreakSignal())
- return E_ABORT;
+ if (_so)
+ {
+ *_so << "Write SFX: ";
+ *_so << name;
+ AString s = " : ";
+ PrintSize_bytes_Smart(s, size);
+ *_so << s << endl;
+ }
return S_OK;
}
-HRESULT CUpdateCallbackConsole::Finilize()
+
+HRESULT CUpdateCallbackConsole::DeletingAfterArchiving(const FString &path, bool /* isDir */)
{
- MT_LOCK
- if (m_NeedBeClosed)
+ if (LogLevel > 0 && _so)
+ {
+ ClosePercents_for_so();
+
+ if (!DeleteMessageWasShown)
+ {
+ if (_so)
+ *_so << endl << ": Removing files after including to archive" << endl;
+ }
+
+ {
+ {
+ _tempA = "Removing";
+ _tempA.Add_Space();
+ *_so << _tempA;
+ _tempU = fs2us(path);
+ _so->PrintUString(_tempU, _tempA);
+ *_so << endl;
+ if (NeedFlush)
+ _so->Flush();
+ }
+ }
+ }
+
+ if (!DeleteMessageWasShown)
{
- if (EnablePercents)
+ if (NeedPercents())
{
- m_PercentPrinter.ClosePrint();
+ _percent.ClearCurState();
}
- if (!StdOutMode && m_NeedNewLine)
+ DeleteMessageWasShown = true;
+ }
+ else
+ {
+ _percent.Files++;
+ }
+
+ if (NeedPercents())
+ {
+ // if (!FullLog)
{
- m_PercentPrinter.PrintNewLine();
- m_NeedNewLine = false;
+ _percent.Command = "Removing";
+ _percent.FileName = fs2us(path);
}
- m_NeedBeClosed = false;
+ _percent.Print();
}
+
+ return S_OK;
+}
+
+
+HRESULT CUpdateCallbackConsole::FinishDeletingAfterArchiving()
+{
+ ClosePercents2();
+ if (_so && DeleteMessageWasShown)
+ *_so << endl;
return S_OK;
}
-HRESULT CUpdateCallbackConsole::SetNumFiles(UInt64 /* numFiles */)
+HRESULT CUpdateCallbackConsole::CheckBreak()
+{
+ return CheckBreak2();
+}
+
+/*
+HRESULT CUpdateCallbackConsole::Finalize()
+{
+ // MT_LOCK
+ return S_OK;
+}
+*/
+
+HRESULT CUpdateCallbackConsole::SetNumItems(UInt64 numItems)
{
+ if (_so)
+ {
+ ClosePercents_for_so();
+ AString s;
+ PrintPropPair(s, "Items to compress", numItems);
+ *_so << s << endl << endl;
+ }
return S_OK;
}
HRESULT CUpdateCallbackConsole::SetTotal(UInt64 size)
{
MT_LOCK
- if (EnablePercents)
- m_PercentPrinter.SetTotal(size);
+ if (NeedPercents())
+ {
+ _percent.Total = size;
+ _percent.Print();
+ }
return S_OK;
}
HRESULT CUpdateCallbackConsole::SetCompleted(const UInt64 *completeValue)
{
MT_LOCK
- if (completeValue != NULL)
+ if (completeValue)
{
- if (EnablePercents)
+ if (NeedPercents())
{
- m_PercentPrinter.SetRatio(*completeValue);
- m_PercentPrinter.PrintRatio();
- m_NeedBeClosed = true;
+ _percent.Completed = *completeValue;
+ _percent.Print();
}
}
- if (NConsoleClose::TestBreakSignal())
- return E_ABORT;
- return S_OK;
+ return CheckBreak2();
}
HRESULT CUpdateCallbackConsole::SetRatioInfo(const UInt64 * /* inSize */, const UInt64 * /* outSize */)
{
- if (NConsoleClose::TestBreakSignal())
- return E_ABORT;
- return S_OK;
+ return CheckBreak2();
}
-HRESULT CUpdateCallbackConsole::GetStream(const wchar_t *name, bool isAnti)
+HRESULT CCallbackConsoleBase::PrintProgress(const wchar_t *name, const char *command, bool showInLog)
{
MT_LOCK
+
+ bool show2 = (showInLog && _so);
+
+ if (show2)
+ {
+ ClosePercents_for_so();
+
+ _tempA = command;
+ if (name)
+ _tempA.Add_Space();
+ *_so << _tempA;
+
+ _tempU.Empty();
+ if (name)
+ _tempU = name;
+ _so->PrintUString(_tempU, _tempA);
+ *_so << endl;
+ if (NeedFlush)
+ _so->Flush();
+ }
+
+ if (NeedPercents())
+ {
+ if (PercentsNameLevel >= 1)
+ {
+ _percent.FileName.Empty();
+ _percent.Command.Empty();
+ if (PercentsNameLevel > 1 || !show2)
+ {
+ _percent.Command = command;
+ if (name)
+ _percent.FileName = name;
+ }
+ }
+ _percent.Print();
+ }
+
+ return CheckBreak2();
+}
+
+HRESULT CUpdateCallbackConsole::GetStream(const wchar_t *name, bool /* isDir */, bool isAnti, UInt32 mode)
+{
if (StdOutMode)
return S_OK;
- if(isAnti)
- m_PercentPrinter.PrintString("Anti item ");
- else
- m_PercentPrinter.PrintString("Compressing ");
- if (name[0] == 0)
+
+ if (!name || name[0] == 0)
name = kEmptyFileAlias;
- m_PercentPrinter.PrintString(name);
- if (EnablePercents)
- m_PercentPrinter.RePrintRatio();
- return S_OK;
+
+ unsigned requiredLevel = 1;
+
+ const char *s;
+ if (mode == NUpdateNotifyOp::kAdd ||
+ mode == NUpdateNotifyOp::kUpdate)
+ {
+ if (isAnti)
+ s = "Anti";
+ else if (mode == NUpdateNotifyOp::kAdd)
+ s = "+";
+ else
+ s = "U";
+ }
+ else
+ {
+ requiredLevel = 3;
+ if (mode == NUpdateNotifyOp::kAnalyze)
+ s = "A";
+ else
+ s = "Reading";
+ }
+
+ return PrintProgress(name, s, LogLevel >= requiredLevel);
+}
+
+HRESULT CUpdateCallbackConsole::OpenFileError(const FString &path, DWORD systemError)
+{
+ return OpenFileError_Base(path, systemError);
+}
+
+HRESULT CUpdateCallbackConsole::ReadingFileError(const FString &path, DWORD systemError)
+{
+ return ReadingFileError_Base(path, systemError);
}
-HRESULT CUpdateCallbackConsole::OpenFileError(const wchar_t *name, DWORD systemError)
+HRESULT CUpdateCallbackConsole::SetOperationResult(Int32)
{
MT_LOCK
- FailedCodes.Add(systemError);
- FailedFiles.Add(name);
- // if (systemError == ERROR_SHARING_VIOLATION)
+ _percent.Files++;
+ return S_OK;
+}
+
+void SetExtractErrorMessage(Int32 opRes, Int32 encrypted, AString &dest);
+
+HRESULT CUpdateCallbackConsole::ReportExtractResult(Int32 opRes, Int32 isEncrypted, const wchar_t *name)
+{
+ // if (StdOutMode) return S_OK;
+
+ if (opRes != NArchive::NExtract::NOperationResult::kOK)
{
- m_PercentPrinter.ClosePrint();
- m_PercentPrinter.PrintNewLine();
- m_PercentPrinter.PrintString("WARNING: ");
- m_PercentPrinter.PrintString(NError::MyFormatMessageW(systemError));
- return S_FALSE;
+ ClosePercents2();
+
+ if (_se)
+ {
+ if (_so)
+ _so->Flush();
+
+ AString s;
+ SetExtractErrorMessage(opRes, isEncrypted, s);
+ *_se << s << " : " << endl << name << endl << endl;
+ _se->Flush();
+ }
+ return S_OK;
+ }
+ return S_OK;
+}
+
+
+HRESULT CUpdateCallbackConsole::ReportUpdateOpeartion(UInt32 op, const wchar_t *name, bool /* isDir */)
+{
+ // if (StdOutMode) return S_OK;
+
+ char temp[16];
+ const char *s;
+
+ unsigned requiredLevel = 1;
+
+ switch (op)
+ {
+ case NUpdateNotifyOp::kAdd: s = "+"; break;
+ case NUpdateNotifyOp::kUpdate: s = "U"; break;
+ case NUpdateNotifyOp::kAnalyze: s = "A"; requiredLevel = 3; break;
+ case NUpdateNotifyOp::kReplicate: s = "="; requiredLevel = 3; break;
+ case NUpdateNotifyOp::kRepack: s = "R"; requiredLevel = 2; break;
+ case NUpdateNotifyOp::kSkip: s = "."; requiredLevel = 2; break;
+ case NUpdateNotifyOp::kDelete: s = "D"; requiredLevel = 3; break;
+ case NUpdateNotifyOp::kHeader: s = "Header creation"; requiredLevel = 100; break;
+ default:
+ {
+ temp[0] = 'o';
+ temp[1] = 'p';
+ ConvertUInt64ToString(op, temp + 2);
+ s = temp;
+ }
}
- // return systemError;
+
+ return PrintProgress(name, s, LogLevel >= requiredLevel);
}
-HRESULT CUpdateCallbackConsole::SetOperationResult(Int32 )
+/*
+HRESULT CUpdateCallbackConsole::SetPassword(const UString &
+ #ifndef _NO_CRYPTO
+ password
+ #endif
+ )
{
- m_NeedBeClosed = true;
- m_NeedNewLine = true;
+ #ifndef _NO_CRYPTO
+ PasswordIsDefined = true;
+ Password = password;
+ #endif
return S_OK;
}
+*/
HRESULT CUpdateCallbackConsole::CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password)
{
+ COM_TRY_BEGIN
+
*password = NULL;
#ifdef _NO_CRYPTO
@@ -209,7 +622,7 @@ HRESULT CUpdateCallbackConsole::CryptoGetTextPassword2(Int32 *passwordIsDefined,
{
if (AskPassword)
{
- Password = GetPassword(OutStream);
+ Password = GetPassword(_so);
PasswordIsDefined = true;
}
}
@@ -217,10 +630,14 @@ HRESULT CUpdateCallbackConsole::CryptoGetTextPassword2(Int32 *passwordIsDefined,
return StringToBstr(Password, password);
#endif
+
+ COM_TRY_END
}
HRESULT CUpdateCallbackConsole::CryptoGetTextPassword(BSTR *password)
{
+ COM_TRY_BEGIN
+
*password = NULL;
#ifdef _NO_CRYPTO
@@ -232,30 +649,26 @@ HRESULT CUpdateCallbackConsole::CryptoGetTextPassword(BSTR *password)
if (!PasswordIsDefined)
{
{
- Password = GetPassword(OutStream);
+ Password = GetPassword(_so);
PasswordIsDefined = true;
}
}
return StringToBstr(Password, password);
#endif
+ COM_TRY_END
}
-/*
-HRESULT CUpdateCallbackConsole::ShowDeleteFile(const wchar_t *name)
+HRESULT CUpdateCallbackConsole::ShowDeleteFile(const wchar_t *name, bool /* isDir */)
{
- // MT_LOCK
if (StdOutMode)
return S_OK;
- RINOK(Finilize());
- m_PercentPrinter.PrintString("Deleting ");
- if (name[0] == 0)
- name = kEmptyFileAlias;
- m_PercentPrinter.PrintString(name);
- if (EnablePercents)
- m_PercentPrinter.RePrintRatio();
- m_NeedBeClosed = true;
- m_NeedNewLine = true;
+
+ if (LogLevel > 7)
+ {
+ if (!name || name[0] == 0)
+ name = kEmptyFileAlias;
+ return PrintProgress(name, "D", true);
+ }
return S_OK;
}
-*/
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h b/3rdparty/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h
index 5ffe3eb7ae4..ba8614ebaa3 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h
@@ -3,60 +3,122 @@
#ifndef __UPDATE_CALLBACK_CONSOLE_H
#define __UPDATE_CALLBACK_CONSOLE_H
-#include "Common/StdOutStream.h"
+#include "../../../Common/StdOutStream.h"
#include "../Common/Update.h"
#include "PercentPrinter.h"
-class CUpdateCallbackConsole: public IUpdateCallbackUI2
+struct CErrorPathCodes
{
- CPercentPrinter m_PercentPrinter;
- bool m_NeedBeClosed;
- bool m_NeedNewLine;
+ FStringVector Paths;
+ CRecordVector<DWORD> Codes;
- bool m_WarningsMode;
+ void AddError(const FString &path, DWORD systemError)
+ {
+ Paths.Add(path);
+ Codes.Add(systemError);
+ }
+ void Clear()
+ {
+ Paths.Clear();
+ Codes.Clear();
+ }
+};
+
+class CCallbackConsoleBase
+{
+protected:
+ CPercentPrinter _percent;
+
+ CStdOutStream *_so;
+ CStdOutStream *_se;
+
+ void CommonError(const FString &path, DWORD systemError, bool isWarning);
+
+ HRESULT ScanError_Base(const FString &path, DWORD systemError);
+ HRESULT OpenFileError_Base(const FString &name, DWORD systemError);
+ HRESULT ReadingFileError_Base(const FString &name, DWORD systemError);
- CStdOutStream *OutStream;
public:
- bool EnablePercents;
+ bool NeedPercents() const { return _percent._so != NULL; };
+
bool StdOutMode;
+ bool NeedFlush;
+ unsigned PercentsNameLevel;
+ unsigned LogLevel;
+
+ AString _tempA;
+ UString _tempU;
+
+ CCallbackConsoleBase():
+ StdOutMode(false),
+ NeedFlush(false),
+ PercentsNameLevel(1),
+ LogLevel(0)
+ {}
+
+ void SetWindowWidth(unsigned width) { _percent.MaxLen = width - 1; }
+
+ void Init(CStdOutStream *outStream, CStdOutStream *errorStream, CStdOutStream *percentStream)
+ {
+ FailedFiles.Clear();
+
+ _so = outStream;
+ _se = errorStream;
+ _percent._so = percentStream;
+ }
+
+ void ClosePercents2()
+ {
+ if (NeedPercents())
+ _percent.ClosePrint(true);
+ }
+
+ void ClosePercents_for_so()
+ {
+ if (NeedPercents() && _so == _percent._so)
+ _percent.ClosePrint(false);
+ }
+
+
+ CErrorPathCodes FailedFiles;
+ CErrorPathCodes ScanErrors;
+
+ HRESULT PrintProgress(const wchar_t *name, const char *command, bool showInLog);
+
+};
+
+class CUpdateCallbackConsole: public IUpdateCallbackUI2, public CCallbackConsoleBase
+{
+ // void PrintPropPair(const char *name, const wchar_t *val);
+
+public:
#ifndef _NO_CRYPTO
bool PasswordIsDefined;
UString Password;
bool AskPassword;
#endif
- CUpdateCallbackConsole():
- m_PercentPrinter(1 << 16),
+ bool DeleteMessageWasShown;
+
+ CUpdateCallbackConsole()
+ : DeleteMessageWasShown(false)
#ifndef _NO_CRYPTO
- PasswordIsDefined(false),
- AskPassword(false),
+ , PasswordIsDefined(false)
+ , AskPassword(false)
#endif
- StdOutMode(false),
- EnablePercents(true),
- m_WarningsMode(false)
{}
- ~CUpdateCallbackConsole() { Finilize(); }
+ /*
void Init(CStdOutStream *outStream)
{
- m_NeedBeClosed = false;
- m_NeedNewLine = false;
- FailedFiles.Clear();
- FailedCodes.Clear();
- OutStream = outStream;
- m_PercentPrinter.OutStream = outStream;
+ CCallbackConsoleBase::Init(outStream);
}
-
+ */
+ // ~CUpdateCallbackConsole() { if (NeedPercents()) _percent.ClosePrint(); }
INTERFACE_IUpdateCallbackUI2(;)
-
- UStringVector FailedFiles;
- CRecordVector<HRESULT> FailedCodes;
-
- UStringVector CantFindFiles;
- CRecordVector<HRESULT> CantFindCodes;
};
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp b/3rdparty/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp
index 754680090bc..c7f830ff999 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp
@@ -2,19 +2,19 @@
#include "StdAfx.h"
-#include "Common/StdInStream.h"
-#include "Common/StringConvert.h"
+#include "../../../Common/StdInStream.h"
+#include "../../../Common/StringConvert.h"
#include "UserInputUtils.h"
-static const char kYes = 'Y';
-static const char kNo = 'N';
-static const char kYesAll = 'A';
-static const char kNoAll = 'S';
-static const char kAutoRenameAll = 'U';
-static const char kQuit = 'Q';
+static const char kYes = 'y';
+static const char kNo = 'n';
+static const char kYesAll = 'a';
+static const char kNoAll = 's';
+static const char kAutoRenameAll = 'u';
+static const char kQuit = 'q';
-static const char *kFirstQuestionMessage = "?\n";
+static const char *kFirstQuestionMessage = "? ";
static const char *kHelpQuestionMessage =
"(Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit? ";
@@ -22,33 +22,26 @@ static const char *kHelpQuestionMessage =
NUserAnswerMode::EEnum ScanUserYesNoAllQuit(CStdOutStream *outStream)
{
- (*outStream) << kFirstQuestionMessage;
+ if (outStream)
+ *outStream << kFirstQuestionMessage;
for (;;)
{
- (*outStream) << kHelpQuestionMessage;
- outStream->Flush();
+ if (outStream)
+ {
+ *outStream << kHelpQuestionMessage;
+ outStream->Flush();
+ }
AString scannedString = g_StdIn.ScanStringUntilNewLine();
scannedString.Trim();
if (!scannedString.IsEmpty())
- switch(
- ::MyCharUpper(
- #ifdef UNDER_CE
- (wchar_t)
- #endif
- scannedString[0]))
+ switch (::MyCharLower_Ascii(scannedString[0]))
{
- case kYes:
- return NUserAnswerMode::kYes;
- case kNo:
- return NUserAnswerMode::kNo;
- case kYesAll:
- return NUserAnswerMode::kYesAll;
- case kNoAll:
- return NUserAnswerMode::kNoAll;
- case kAutoRenameAll:
- return NUserAnswerMode::kAutoRenameAll;
- case kQuit:
- return NUserAnswerMode::kQuit;
+ case kYes: return NUserAnswerMode::kYes;
+ case kNo: return NUserAnswerMode::kNo;
+ case kYesAll: return NUserAnswerMode::kYesAll;
+ case kNoAll: return NUserAnswerMode::kNoAll;
+ case kAutoRenameAll: return NUserAnswerMode::kAutoRenameAll;
+ case kQuit: return NUserAnswerMode::kQuit;
}
}
}
@@ -61,14 +54,18 @@ NUserAnswerMode::EEnum ScanUserYesNoAllQuit(CStdOutStream *outStream)
UString GetPassword(CStdOutStream *outStream)
{
- (*outStream) << "\nEnter password"
+ if (outStream)
+ {
+ *outStream << "\nEnter password"
#ifdef MY_DISABLE_ECHO
" (will not be echoed)"
#endif
":";
- outStream->Flush();
+ outStream->Flush();
+ }
#ifdef MY_DISABLE_ECHO
+
HANDLE console = GetStdHandle(STD_INPUT_HANDLE);
bool wasChanged = false;
DWORD mode = 0;
@@ -78,10 +75,16 @@ UString GetPassword(CStdOutStream *outStream)
UString res = g_StdIn.ScanUStringUntilNewLine();
if (wasChanged)
SetConsoleMode(console, mode);
- (*outStream) << "\n";
- outStream->Flush();
+ if (outStream)
+ {
+ *outStream << endl;
+ outStream->Flush();
+ }
return res;
+
#else
+
return g_StdIn.ScanUStringUntilNewLine();
+
#endif
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/UserInputUtils.h b/3rdparty/lzma/CPP/7zip/UI/Console/UserInputUtils.h
index 8b5232b3fc2..16f045803e4 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/UserInputUtils.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/UserInputUtils.h
@@ -1,9 +1,9 @@
// UserInputUtils.h
-#ifndef __USERINPUTUTILS_H
-#define __USERINPUTUTILS_H
+#ifndef __USER_INPUT_UTILS_H
+#define __USER_INPUT_UTILS_H
-#include "Common/StdOutStream.h"
+#include "../../../Common/StdOutStream.h"
namespace NUserAnswerMode {
diff --git a/3rdparty/lzma/CPP/7zip/UI/Console/makefile b/3rdparty/lzma/CPP/7zip/UI/Console/makefile
index f100f63589e..98ad91c2440 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Console/makefile
+++ b/3rdparty/lzma/CPP/7zip/UI/Console/makefile
@@ -1,25 +1,12 @@
PROG = 7z.exe
MY_CONSOLE = 1
-CFLAGS = $(CFLAGS) -I ../../../ \
+CFLAGS = $(CFLAGS) \
-DEXTERNAL_CODECS \
!IFNDEF UNDER_CE
CFLAGS = $(CFLAGS) -DWIN_LONG_PATH -D_7ZIP_LARGE_PAGES -DSUPPORT_DEVICE_FILE
!ENDIF
-
-CONSOLE_OBJS = \
- $O\ConsoleClose.obj \
- $O\ExtractCallbackConsole.obj \
- $O\List.obj \
- $O\BenchCon.obj \
- $O\Main.obj \
- $O\MainAr.obj \
- $O\OpenCallbackConsole.obj \
- $O\PercentPrinter.obj \
- $O\UpdateCallbackConsole.obj \
- $O\UserInputUtils.obj \
-
COMMON_OBJS = \
$O\CommandLineParser.obj \
$O\CRC.obj \
@@ -37,88 +24,46 @@ COMMON_OBJS = \
WIN_OBJS = \
$O\DLL.obj \
- $O\Error.obj \
+ $O\ErrorMsg.obj \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
+ $O\FileLink.obj \
$O\FileName.obj \
+ $O\FileSystem.obj \
$O\MemoryLock.obj \
$O\PropVariant.obj \
- $O\PropVariantConversions.obj \
+ $O\PropVariantConv.obj \
$O\Registry.obj \
$O\System.obj \
- $O\Time.obj \
+ $O\TimeUtils.obj \
7ZIP_COMMON_OBJS = \
$O\CreateCoder.obj \
$O\FilePathAutoRename.obj \
$O\FileStreams.obj \
$O\FilterCoder.obj \
+ $O\LimitedStreams.obj \
$O\MethodProps.obj \
$O\ProgressUtils.obj \
+ $O\PropId.obj \
+ $O\StreamObjects.obj \
$O\StreamUtils.obj \
-
-UI_COMMON_OBJS = \
- $O\ArchiveCommandLine.obj \
- $O\ArchiveExtractCallback.obj \
- $O\ArchiveOpenCallback.obj \
- $O\DefaultName.obj \
- $O\EnumDirItems.obj \
- $O\Extract.obj \
- $O\ExtractingFilePath.obj \
- $O\Bench.obj \
- $O\LoadCodecs.obj \
- $O\OpenArchive.obj \
- $O\PropIDUtils.obj \
- $O\SetProperties.obj \
- $O\SortUtils.obj \
- $O\TempFiles.obj \
- $O\Update.obj \
- $O\UpdateAction.obj \
- $O\UpdateCallback.obj \
- $O\UpdatePair.obj \
- $O\UpdateProduce.obj \
+ $O\UniqBlocks.obj \
AR_COMMON_OBJS = \
$O\OutStreamWithCRC.obj \
+COMPRESS_OBJS = \
+ $O\CopyCoder.obj \
+
C_OBJS = \
$O\Alloc.obj \
$O\CpuArch.obj \
+ $O\Sort.obj \
$O\Threads.obj \
!include "../../Crc.mak"
+!include "Console.mak"
-OBJS = \
- $O\StdAfx.obj \
- $(CONSOLE_OBJS) \
- $(COMMON_OBJS) \
- $(WIN_OBJS) \
- $(7ZIP_COMMON_OBJS) \
- $(UI_COMMON_OBJS) \
- $(AR_COMMON_OBJS) \
- $O\CopyCoder.obj \
- $(C_OBJS) \
- $(ASM_OBJS) \
- $O\resource.res
-
-!include "../../../Build.mak"
-
-$(CONSOLE_OBJS): $(*B).cpp
- $(COMPL)
-$(COMMON_OBJS): ../../../Common/$(*B).cpp
- $(COMPL)
-$(WIN_OBJS): ../../../Windows/$(*B).cpp
- $(COMPL)
-$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
- $(COMPL)
-$(UI_COMMON_OBJS): ../Common/$(*B).cpp
- $(COMPL)
-$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
- $(COMPL)
-$O\CopyCoder.obj: ../../Compress/$(*B).cpp
- $(COMPL)
-$(C_OBJS): ../../../../C/$(*B).c
- $(COMPL_O2)
-
-!include "../../Asm.mak"
+!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp b/3rdparty/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp
new file mode 100644
index 00000000000..70c2a4608d3
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp
@@ -0,0 +1,37 @@
+// MyMessages.cpp
+
+#include "StdAfx.h"
+
+#include "MyMessages.h"
+
+#include "../../../Windows/ErrorMsg.h"
+#include "../../../Windows/ResourceString.h"
+
+#include "../FileManager/LangUtils.h"
+
+using namespace NWindows;
+
+void ShowErrorMessage(HWND window, LPCWSTR message)
+{
+ ::MessageBoxW(window, message, L"7-Zip", MB_OK | MB_ICONSTOP);
+}
+
+void ShowErrorMessageHwndRes(HWND window, UINT resID)
+{
+ ShowErrorMessage(window, LangString(resID));
+}
+
+void ShowErrorMessageRes(UINT resID)
+{
+ ShowErrorMessageHwndRes(0, resID);
+}
+
+void ShowErrorMessageDWORD(HWND window, DWORD errorCode)
+{
+ ShowErrorMessage(window, NError::MyFormatMessage(errorCode));
+}
+
+void ShowLastErrorMessage(HWND window)
+{
+ ShowErrorMessageDWORD(window, ::GetLastError());
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/Explorer/MyMessages.h b/3rdparty/lzma/CPP/7zip/UI/Explorer/MyMessages.h
new file mode 100644
index 00000000000..d5822f45f1c
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/Explorer/MyMessages.h
@@ -0,0 +1,16 @@
+// MyMessages.h
+
+#ifndef __MY_MESSAGES_H
+#define __MY_MESSAGES_H
+
+#include "../../../Common/MyString.h"
+
+void ShowErrorMessage(HWND window, LPCWSTR message);
+inline void ShowErrorMessage(LPCWSTR message) { ShowErrorMessage(0, message); }
+
+void ShowErrorMessageHwndRes(HWND window, UInt32 langID);
+void ShowErrorMessageRes(UInt32 langID);
+
+void ShowLastErrorMessage(HWND window = 0);
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp b/3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp
new file mode 100644
index 00000000000..066ac219190
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp
@@ -0,0 +1,1024 @@
+// BrowseDialog.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/MyWindows.h"
+
+#include <commctrl.h>
+
+#ifndef UNDER_CE
+#include "../../../Windows/CommonDialog.h"
+#include "../../../Windows/Shell.h"
+#endif
+
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/FileFind.h"
+
+#ifdef UNDER_CE
+#include <commdlg.h>
+#endif
+
+#include "BrowseDialog.h"
+
+#define USE_MY_BROWSE_DIALOG
+
+#ifdef USE_MY_BROWSE_DIALOG
+
+#include "../../../Common/Defs.h"
+#include "../../../Common/IntToString.h"
+#include "../../../Common/Wildcard.h"
+
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/PropVariantConv.h"
+
+#include "../../../Windows/Control/ComboBox.h"
+#include "../../../Windows/Control/Dialog.h"
+#include "../../../Windows/Control/Edit.h"
+#include "../../../Windows/Control/ListView.h"
+
+#include "BrowseDialogRes.h"
+#include "PropertyNameRes.h"
+#include "SysIconUtils.h"
+
+#ifndef _SFX
+#include "RegistryUtils.h"
+#endif
+
+#endif
+
+#include "ComboDialog.h"
+#include "LangUtils.h"
+
+#include "resource.h"
+
+using namespace NWindows;
+using namespace NFile;
+using namespace NName;
+using namespace NFind;
+
+#ifdef USE_MY_BROWSE_DIALOG
+
+extern bool g_LVN_ITEMACTIVATE_Support;
+
+static const int kParentIndex = -1;
+static const UINT k_Message_RefreshPathEdit = WM_APP + 1;
+
+static HRESULT GetNormalizedError()
+{
+ DWORD errorCode = GetLastError();
+ return errorCode == 0 ? E_FAIL : errorCode;
+}
+
+extern UString HResultToMessage(HRESULT errorCode);
+
+static void MessageBox_Error_Global(HWND wnd, const wchar_t *message)
+{
+ ::MessageBoxW(wnd, message, L"7-Zip", MB_ICONERROR);
+}
+
+static void MessageBox_HResError(HWND wnd, HRESULT errorCode, const wchar_t *name)
+{
+ UString s = HResultToMessage(errorCode);
+ if (name)
+ {
+ s.Add_LF();
+ s += name;
+ }
+ MessageBox_Error_Global(wnd, s);
+}
+
+class CBrowseDialog: public NControl::CModalDialog
+{
+ NControl::CListView _list;
+ NControl::CEdit _pathEdit;
+ NControl::CComboBox _filterCombo;
+
+ CObjectVector<CFileInfo> _files;
+
+ CExtToIconMap _extToIconMap;
+ int _sortIndex;
+ bool _ascending;
+ bool _showDots;
+ UString _topDirPrefix; // we don't open parent of that folder
+ UString DirPrefix;
+
+ virtual bool OnInit();
+ virtual bool OnSize(WPARAM wParam, int xSize, int ySize);
+ virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
+ virtual bool OnNotify(UINT controlID, LPNMHDR header);
+ virtual bool OnKeyDown(LPNMLVKEYDOWN keyDownInfo);
+ virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
+ virtual void OnOK();
+
+ void Post_RefreshPathEdit() { PostMsg(k_Message_RefreshPathEdit); }
+
+ bool GetParentPath(const UString &path, UString &parentPrefix, UString &name);
+ // Reload changes DirPrefix. Don't send DirPrefix in pathPrefix parameter
+ HRESULT Reload(const UString &pathPrefix, const UString &selectedName);
+ HRESULT Reload();
+
+ void OpenParentFolder();
+ void SetPathEditText();
+ void OnCreateDir();
+ void OnItemEnter();
+ void FinishOnOK();
+
+ int GetRealItemIndex(int indexInListView) const
+ {
+ LPARAM param;
+ if (!_list.GetItemParam(indexInListView, param))
+ return (int)-1;
+ return (int)param;
+ }
+
+public:
+ bool FolderMode;
+ UString Title;
+ UString FilePath; // input/ result path
+ bool ShowAllFiles;
+ UStringVector Filters;
+ UString FilterDescription;
+
+ CBrowseDialog(): FolderMode(false), _showDots(false), ShowAllFiles(true) {}
+ void SetFilter(const UString &s);
+ INT_PTR Create(HWND parent = 0) { return CModalDialog::Create(IDD_BROWSE, parent); }
+ int CompareItems(LPARAM lParam1, LPARAM lParam2);
+};
+
+void CBrowseDialog::SetFilter(const UString &s)
+{
+ Filters.Clear();
+ UString mask;
+ unsigned i;
+ for (i = 0; i < s.Len(); i++)
+ {
+ wchar_t c = s[i];
+ if (c == ';')
+ {
+ if (!mask.IsEmpty())
+ Filters.Add(mask);
+ mask.Empty();
+ }
+ else
+ mask += c;
+ }
+ if (!mask.IsEmpty())
+ Filters.Add(mask);
+ ShowAllFiles = Filters.IsEmpty();
+ for (i = 0; i < Filters.Size(); i++)
+ {
+ const UString &f = Filters[i];
+ if (f == L"*.*" || f == L"*")
+ {
+ ShowAllFiles = true;
+ break;
+ }
+ }
+}
+
+bool CBrowseDialog::OnInit()
+{
+ #ifdef LANG
+ LangSetDlgItems(*this, NULL, 0);
+ #endif
+ if (!Title.IsEmpty())
+ SetText(Title);
+ _list.Attach(GetItem(IDL_BROWSE));
+ _filterCombo.Attach(GetItem(IDC_BROWSE_FILTER));
+ _pathEdit.Attach(GetItem(IDE_BROWSE_PATH));
+
+ if (FolderMode)
+ HideItem(IDC_BROWSE_FILTER);
+ else
+ EnableItem(IDC_BROWSE_FILTER, false);
+
+ #ifndef UNDER_CE
+ _list.SetUnicodeFormat();
+ #endif
+
+ #ifndef _SFX
+ CFmSettings st;
+ st.Load();
+ if (st.SingleClick)
+ _list.SetExtendedListViewStyle(LVS_EX_ONECLICKACTIVATE | LVS_EX_TRACKSELECT);
+ _showDots = st.ShowDots;
+ #endif
+
+ {
+ UString s;
+ if (!FilterDescription.IsEmpty())
+ s = FilterDescription;
+ else if (ShowAllFiles)
+ s = L"*.*";
+ else
+ {
+ FOR_VECTOR (i, Filters)
+ {
+ if (i != 0)
+ s.Add_Space();
+ s += Filters[i];
+ }
+ }
+ _filterCombo.AddString(s);
+ _filterCombo.SetCurSel(0);
+ }
+
+ _list.SetImageList(GetSysImageList(true), LVSIL_SMALL);
+ _list.SetImageList(GetSysImageList(false), LVSIL_NORMAL);
+
+ _list.InsertColumn(0, LangString(IDS_PROP_NAME), 100);
+ _list.InsertColumn(1, LangString(IDS_PROP_MTIME), 100);
+ {
+ LV_COLUMNW column;
+ column.iSubItem = 2;
+ column.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
+ column.fmt = LVCFMT_RIGHT;
+ column.cx = 100;
+ const UString s = LangString(IDS_PROP_SIZE);
+ column.pszText = (wchar_t *)(const wchar_t *)s;
+ _list.InsertColumn(2, &column);
+ }
+
+ _list.InsertItem(0, L"12345678901234567"
+ #ifndef UNDER_CE
+ L"1234567890"
+ #endif
+ );
+ _list.SetSubItem(0, 1, L"2009-09-09"
+ #ifndef UNDER_CE
+ L" 09:09"
+ #endif
+ );
+ _list.SetSubItem(0, 2, L"9999 MB");
+ for (int i = 0; i < 3; i++)
+ _list.SetColumnWidthAuto(i);
+ _list.DeleteAllItems();
+
+ _ascending = true;
+ _sortIndex = 0;
+
+ NormalizeSize();
+
+ _topDirPrefix.Empty();
+ {
+ int rootSize = GetRootPrefixSize(FilePath);
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ // We can go up from root folder to drives list
+ if (IsDrivePath(FilePath))
+ rootSize = 0;
+ else if (IsSuperPath(FilePath))
+ {
+ if (IsDrivePath(FilePath.Ptr(kSuperPathPrefixSize)))
+ rootSize = kSuperPathPrefixSize;
+ }
+ #endif
+ _topDirPrefix.SetFrom(FilePath, rootSize);
+ }
+
+ UString name;
+ if (!GetParentPath(FilePath, DirPrefix, name))
+ DirPrefix = _topDirPrefix;
+
+ for (;;)
+ {
+ UString baseFolder = DirPrefix;
+ if (Reload(baseFolder, name) == S_OK)
+ break;
+ name.Empty();
+ if (DirPrefix.IsEmpty())
+ break;
+ UString parent, name2;
+ GetParentPath(DirPrefix, parent, name2);
+ DirPrefix = parent;
+ }
+
+ if (name.IsEmpty())
+ name = FilePath;
+ if (FolderMode)
+ NormalizeDirPathPrefix(name);
+ _pathEdit.SetText(name);
+
+ #ifndef UNDER_CE
+ /* If we clear UISF_HIDEFOCUS, the focus rectangle in ListView will be visible,
+ even if we use mouse for pressing the button to open this dialog. */
+ PostMsg(MY__WM_UPDATEUISTATE, MAKEWPARAM(MY__UIS_CLEAR, MY__UISF_HIDEFOCUS));
+ #endif
+
+ return CModalDialog::OnInit();
+}
+
+bool CBrowseDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
+{
+ int mx, my;
+ {
+ RECT r;
+ GetClientRectOfItem(IDB_BROWSE_PARENT, r);
+ mx = r.left;
+ my = r.top;
+ }
+ InvalidateRect(NULL);
+
+ int xLim = xSize - mx;
+ {
+ RECT r;
+ GetClientRectOfItem(IDT_BROWSE_FOLDER, r);
+ MoveItem(IDT_BROWSE_FOLDER, r.left, r.top, xLim - r.left, RECT_SIZE_Y(r));
+ }
+
+ int bx1, bx2, by;
+ GetItemSizes(IDCANCEL, bx1, by);
+ GetItemSizes(IDOK, bx2, by);
+ int y = ySize - my - by;
+ int x = xLim - bx1;
+ MoveItem(IDCANCEL, x, y, bx1, by);
+ MoveItem(IDOK, x - mx - bx2, y, bx2, by);
+
+ // Y_Size of ComboBox is tricky. So we use Y_Size of _pathEdit instead
+
+ int yPathSize;
+ {
+ RECT r;
+ GetClientRectOfItem(IDE_BROWSE_PATH, r);
+ yPathSize = RECT_SIZE_Y(r);
+ _pathEdit.Move(r.left, y - my - yPathSize - my - yPathSize, xLim - r.left, yPathSize);
+ }
+
+ {
+ RECT r;
+ GetClientRectOfItem(IDC_BROWSE_FILTER, r);
+ _filterCombo.Move(r.left, y - my - yPathSize, xLim - r.left, RECT_SIZE_Y(r));
+ }
+
+ {
+ RECT r;
+ GetClientRectOfItem(IDL_BROWSE, r);
+ _list.Move(r.left, r.top, xLim - r.left, y - my - yPathSize - my - yPathSize - my - r.top);
+ }
+
+ return false;
+}
+
+bool CBrowseDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ if (message == k_Message_RefreshPathEdit)
+ {
+ SetPathEditText();
+ return true;
+ }
+ return CModalDialog::OnMessage(message, wParam, lParam);
+}
+
+bool CBrowseDialog::OnNotify(UINT /* controlID */, LPNMHDR header)
+{
+ if (header->hwndFrom != _list)
+ return false;
+ switch (header->code)
+ {
+ case LVN_ITEMACTIVATE:
+ if (g_LVN_ITEMACTIVATE_Support)
+ OnItemEnter();
+ break;
+ case NM_DBLCLK:
+ case NM_RETURN: // probabably it's unused
+ if (!g_LVN_ITEMACTIVATE_Support)
+ OnItemEnter();
+ break;
+ case LVN_COLUMNCLICK:
+ {
+ int index = LPNMLISTVIEW(header)->iSubItem;
+ if (index == _sortIndex)
+ _ascending = !_ascending;
+ else
+ {
+ _ascending = (index == 0);
+ _sortIndex = index;
+ }
+ Reload();
+ return false;
+ }
+ case LVN_KEYDOWN:
+ {
+ bool boolResult = OnKeyDown(LPNMLVKEYDOWN(header));
+ Post_RefreshPathEdit();
+ return boolResult;
+ }
+ case NM_RCLICK:
+ case NM_CLICK:
+ case LVN_BEGINDRAG:
+ Post_RefreshPathEdit();
+ break;
+ }
+ return false;
+}
+
+bool CBrowseDialog::OnKeyDown(LPNMLVKEYDOWN keyDownInfo)
+{
+ bool ctrl = IsKeyDown(VK_CONTROL);
+
+ switch (keyDownInfo->wVKey)
+ {
+ case VK_BACK:
+ OpenParentFolder();
+ return true;
+ case 'R':
+ if (ctrl)
+ {
+ Reload();
+ return true;
+ }
+ return false;
+ case VK_F7:
+ OnCreateDir();
+ return true;
+ }
+ return false;
+}
+
+bool CBrowseDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
+{
+ switch (buttonID)
+ {
+ case IDB_BROWSE_PARENT: OpenParentFolder(); break;
+ case IDB_BROWSE_CREATE_DIR: OnCreateDir(); break;
+ default: return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
+ }
+ _list.SetFocus();
+ return true;
+}
+
+void CBrowseDialog::OnOK()
+{
+ /* When we press "Enter" in listview, Windows sends message to first Button.
+ We check that message was from ListView; */
+ if (GetFocus() == _list)
+ {
+ OnItemEnter();
+ return;
+ }
+ FinishOnOK();
+}
+
+
+bool CBrowseDialog::GetParentPath(const UString &path, UString &parentPrefix, UString &name)
+{
+ parentPrefix.Empty();
+ name.Empty();
+ if (path.IsEmpty())
+ return false;
+ if (_topDirPrefix == path)
+ return false;
+ UString s = path;
+ if (s.Back() == WCHAR_PATH_SEPARATOR)
+ s.DeleteBack();
+ if (s.IsEmpty())
+ return false;
+ if (s.Back() == WCHAR_PATH_SEPARATOR)
+ return false;
+ int pos = s.ReverseFind_PathSepar();
+ parentPrefix.SetFrom(s, pos + 1);
+ name = s.Ptr(pos + 1);
+ return true;
+}
+
+int CBrowseDialog::CompareItems(LPARAM lParam1, LPARAM lParam2)
+{
+ if (lParam1 == kParentIndex) return -1;
+ if (lParam2 == kParentIndex) return 1;
+ const CFileInfo &f1 = _files[(int)lParam1];
+ const CFileInfo &f2 = _files[(int)lParam2];
+
+ bool isDir1 = f1.IsDir();
+ bool isDir2 = f2.IsDir();
+ if (isDir1 && !isDir2) return -1;
+ if (isDir2 && !isDir1) return 1;
+
+ int res = 0;
+ switch (_sortIndex)
+ {
+ case 0: res = CompareFileNames(fs2us(f1.Name), fs2us(f2.Name)); break;
+ case 1: res = CompareFileTime(&f1.MTime, &f2.MTime); break;
+ case 2: res = MyCompare(f1.Size, f2.Size); break;
+ }
+ return _ascending ? res: -res;
+}
+
+static int CALLBACK CompareItems2(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
+{
+ return ((CBrowseDialog *)lpData)->CompareItems(lParam1, lParam2);
+}
+
+static void ConvertSizeToString(UInt64 v, wchar_t *s)
+{
+ Byte c = 0;
+ if (v >= ((UInt64)10000 << 20)) { v >>= 30; c = 'G'; }
+ else if (v >= ((UInt64)10000 << 10)) { v >>= 20; c = 'M'; }
+ else if (v >= ((UInt64)10000 << 0)) { v >>= 10; c = 'K'; }
+ ConvertUInt64ToString(v, s);
+ if (c != 0)
+ {
+ s += MyStringLen(s);
+ *s++ = ' ';
+ *s++ = c;
+ *s++ = 0;
+ }
+}
+
+// Reload changes DirPrefix. Don't send DirPrefix in pathPrefix parameter
+
+HRESULT CBrowseDialog::Reload(const UString &pathPrefix, const UString &selectedName)
+{
+ CObjectVector<CFileInfo> files;
+
+ #ifndef UNDER_CE
+ bool isDrive = false;
+ if (pathPrefix.IsEmpty() || pathPrefix == kSuperPathPrefix)
+ {
+ isDrive = true;
+ FStringVector drives;
+ if (!MyGetLogicalDriveStrings(drives))
+ return GetNormalizedError();
+ FOR_VECTOR (i, drives)
+ {
+ FString d = drives[i];
+ if (d.Len() < 3 || d.Back() != '\\')
+ return E_FAIL;
+ d.DeleteBack();
+ CFileInfo &fi = files.AddNew();
+ fi.SetAsDir();
+ fi.Name = d;
+ }
+ }
+ else
+ #endif
+ {
+ CEnumerator enumerator(us2fs(pathPrefix + L'*'));
+ for (;;)
+ {
+ bool found;
+ CFileInfo fi;
+ if (!enumerator.Next(fi, found))
+ return GetNormalizedError();
+ if (!found)
+ break;
+ if (!fi.IsDir())
+ {
+ if (FolderMode)
+ continue;
+ if (!ShowAllFiles)
+ {
+ unsigned i;
+ for (i = 0; i < Filters.Size(); i++)
+ if (DoesWildcardMatchName(Filters[i], fs2us(fi.Name)))
+ break;
+ if (i == Filters.Size())
+ continue;
+ }
+ }
+ files.Add(fi);
+ }
+ }
+
+ DirPrefix = pathPrefix;
+
+ _files = files;
+
+ SetItemText(IDT_BROWSE_FOLDER, DirPrefix);
+
+ _list.SetRedraw(false);
+ _list.DeleteAllItems();
+
+ LVITEMW item;
+
+ int index = 0;
+ int cursorIndex = -1;
+
+ #ifndef _SFX
+ if (_showDots && _topDirPrefix != DirPrefix)
+ {
+ item.iItem = index;
+ const UString itemName = L"..";
+ if (selectedName.IsEmpty())
+ cursorIndex = index;
+ item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
+ int subItem = 0;
+ item.iSubItem = subItem++;
+ item.lParam = kParentIndex;
+ item.pszText = (wchar_t *)(const wchar_t *)itemName;
+ item.iImage = _extToIconMap.GetIconIndex(FILE_ATTRIBUTE_DIRECTORY, DirPrefix);
+ if (item.iImage < 0)
+ item.iImage = 0;
+ _list.InsertItem(&item);
+ _list.SetSubItem(index, subItem++, L"");
+ _list.SetSubItem(index, subItem++, L"");
+ index++;
+ }
+ #endif
+
+ for (unsigned i = 0; i < _files.Size(); i++, index++)
+ {
+ item.iItem = index;
+ const CFileInfo &fi = _files[i];
+ const UString name = fs2us(fi.Name);
+ if (!selectedName.IsEmpty() && CompareFileNames(name, selectedName) == 0)
+ cursorIndex = index;
+ item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
+ int subItem = 0;
+ item.iSubItem = subItem++;
+ item.lParam = i;
+ item.pszText = (wchar_t *)(const wchar_t *)name;
+
+ const UString fullPath = DirPrefix + name;
+ #ifndef UNDER_CE
+ if (isDrive)
+ {
+ if (GetRealIconIndex(fi.Name + FCHAR_PATH_SEPARATOR, FILE_ATTRIBUTE_DIRECTORY, item.iImage) == 0)
+ item.iImage = 0;
+ }
+ else
+ #endif
+ item.iImage = _extToIconMap.GetIconIndex(fi.Attrib, fullPath);
+ if (item.iImage < 0)
+ item.iImage = 0;
+ _list.InsertItem(&item);
+ wchar_t s[32];
+ {
+ FILETIME ft;
+ s[0] = 0;
+ if (FileTimeToLocalFileTime(&fi.MTime, &ft))
+ ConvertFileTimeToString(ft, s,
+ #ifndef UNDER_CE
+ true
+ #else
+ false
+ #endif
+ , false);
+ _list.SetSubItem(index, subItem++, s);
+ }
+ {
+ s[0] = 0;
+ if (!fi.IsDir())
+ ConvertSizeToString(fi.Size, s);
+ _list.SetSubItem(index, subItem++, s);
+ }
+ }
+
+ if (_list.GetItemCount() > 0 && cursorIndex >= 0)
+ _list.SetItemState_FocusedSelected(cursorIndex);
+ _list.SortItems(CompareItems2, (LPARAM)this);
+ if (_list.GetItemCount() > 0 && cursorIndex < 0)
+ _list.SetItemState(0, LVIS_FOCUSED, LVIS_FOCUSED);
+ _list.EnsureVisible(_list.GetFocusedItem(), false);
+ _list.SetRedraw(true);
+ _list.InvalidateRect(NULL, true);
+ return S_OK;
+}
+
+HRESULT CBrowseDialog::Reload()
+{
+ UString selected;
+ int index = _list.GetNextSelectedItem(-1);
+ if (index >= 0)
+ {
+ int fileIndex = GetRealItemIndex(index);
+ if (fileIndex != kParentIndex)
+ selected = fs2us(_files[fileIndex].Name);
+ }
+ UString dirPathTemp = DirPrefix;
+ return Reload(dirPathTemp, selected);
+}
+
+void CBrowseDialog::OpenParentFolder()
+{
+ UString parent, selected;
+ if (GetParentPath(DirPrefix, parent, selected))
+ {
+ Reload(parent, selected);
+ SetPathEditText();
+ }
+}
+
+void CBrowseDialog::SetPathEditText()
+{
+ int index = _list.GetNextSelectedItem(-1);
+ if (index < 0)
+ {
+ if (FolderMode)
+ _pathEdit.SetText(DirPrefix);
+ return;
+ }
+ int fileIndex = GetRealItemIndex(index);
+ if (fileIndex == kParentIndex)
+ {
+ if (FolderMode)
+ _pathEdit.SetText(L".." WSTRING_PATH_SEPARATOR);
+ return;
+ }
+ const CFileInfo &file = _files[fileIndex];
+ if (file.IsDir())
+ {
+ if (!FolderMode)
+ return;
+ _pathEdit.SetText(fs2us(file.Name) + WCHAR_PATH_SEPARATOR);
+ }
+ else
+ _pathEdit.SetText(fs2us(file.Name));
+}
+
+void CBrowseDialog::OnCreateDir()
+{
+ UString name;
+ {
+ UString enteredName;
+ Dlg_CreateFolder((HWND)*this, enteredName);
+ if (enteredName.IsEmpty())
+ return;
+ if (!CorrectFsPath(DirPrefix, enteredName, name))
+ {
+ MessageBox_HResError((HWND)*this, ERROR_INVALID_NAME, name);
+ return;
+ }
+ }
+ if (name.IsEmpty())
+ return;
+
+ FString destPath;
+ if (GetFullPath(us2fs(DirPrefix), us2fs(name), destPath))
+ {
+ if (!NDir::CreateComplexDir(destPath))
+ {
+ MessageBox_HResError((HWND)*this, GetNormalizedError(), fs2us(destPath));
+ }
+ else
+ {
+ UString tempPath = DirPrefix;
+ Reload(tempPath, name);
+ SetPathEditText();
+ }
+ _list.SetFocus();
+ }
+}
+
+void CBrowseDialog::OnItemEnter()
+{
+ int index = _list.GetNextSelectedItem(-1);
+ if (index < 0)
+ return;
+ int fileIndex = GetRealItemIndex(index);
+ if (fileIndex == kParentIndex)
+ OpenParentFolder();
+ else
+ {
+ const CFileInfo &file = _files[fileIndex];
+ if (!file.IsDir())
+ {
+ if (!FolderMode)
+ FinishOnOK();
+ /*
+ MessageBox_Error_Global(*this, FolderMode ?
+ L"You must select some folder":
+ L"You must select some file");
+ */
+ return;
+ }
+ UString s = DirPrefix + fs2us(file.Name) + WCHAR_PATH_SEPARATOR;
+ HRESULT res = Reload(s, L"");
+ if (res != S_OK)
+ MessageBox_HResError(*this, res, s);
+ SetPathEditText();
+ }
+}
+
+void CBrowseDialog::FinishOnOK()
+{
+ UString s;
+ _pathEdit.GetText(s);
+ FString destPath;
+ if (!GetFullPath(us2fs(DirPrefix), us2fs(s), destPath))
+ {
+ MessageBox_HResError((HWND)*this, ERROR_INVALID_NAME, s);
+ return;
+ }
+ FilePath = fs2us(destPath);
+ if (FolderMode)
+ NormalizeDirPathPrefix(FilePath);
+ End(IDOK);
+}
+
+#endif
+
+bool MyBrowseForFolder(HWND owner, LPCWSTR title, LPCWSTR path, UString &resultPath)
+{
+ resultPath.Empty();
+
+ #ifndef UNDER_CE
+
+ #ifdef USE_MY_BROWSE_DIALOG
+ if (!IsSuperOrDevicePath(path))
+ #endif
+ return NShell::BrowseForFolder(owner, title, path, resultPath);
+
+ #endif
+
+ #ifdef USE_MY_BROWSE_DIALOG
+
+ CBrowseDialog dialog;
+ dialog.FolderMode = true;
+ if (title)
+ dialog.Title = title;
+ if (path)
+ dialog.FilePath = path;
+ if (dialog.Create(owner) != IDOK)
+ return false;
+ resultPath = dialog.FilePath;
+ #endif
+
+ return true;
+}
+
+bool MyBrowseForFile(HWND owner, LPCWSTR title, LPCWSTR path,
+ LPCWSTR filterDescription, LPCWSTR filter, UString &resultPath)
+{
+ resultPath.Empty();
+
+ #ifndef UNDER_CE
+
+ #ifdef USE_MY_BROWSE_DIALOG
+ if (!IsSuperOrDevicePath(path))
+ #endif
+ {
+ if (MyGetOpenFileName(owner, title, NULL, path, filterDescription, filter, resultPath))
+ return true;
+ #ifdef UNDER_CE
+ return false;
+ #else
+ // maybe we must use GetLastError in WinCE.
+ DWORD errorCode = CommDlgExtendedError();
+ const wchar_t *errorMessage = NULL;
+ switch (errorCode)
+ {
+ case 0: return false; // cancel or close obn dialog
+ case FNERR_INVALIDFILENAME: errorMessage = L"Invalid File Name"; break;
+ default: errorMessage = L"Open Dialog Error";
+ }
+ if (!errorMessage)
+ return false;
+ {
+ UString s = errorMessage;
+ s.Add_LF();
+ s += path;
+ MessageBox_Error_Global(owner, s);
+ }
+ #endif
+ }
+
+ #endif
+
+ #ifdef USE_MY_BROWSE_DIALOG
+ CBrowseDialog dialog;
+ if (title)
+ dialog.Title = title;
+ if (path)
+ dialog.FilePath = path;
+ dialog.FolderMode = false;
+ if (filter)
+ dialog.SetFilter(filter);
+ if (filterDescription)
+ dialog.FilterDescription = filterDescription;
+ if (dialog.Create(owner) != IDOK)
+ return false;
+ resultPath = dialog.FilePath;
+ #endif
+
+ return true;
+}
+
+
+#ifdef _WIN32
+
+static void RemoveDotsAndSpaces(UString &path)
+{
+ while (!path.IsEmpty())
+ {
+ wchar_t c = path.Back();
+ if (c != ' ' && c != '.')
+ return;
+ path.DeleteBack();
+ }
+}
+
+
+bool CorrectFsPath(const UString &relBase, const UString &path2, UString &result)
+{
+ result.Empty();
+
+ UString path = path2;
+ path.Replace(L'/', WCHAR_PATH_SEPARATOR);
+ unsigned start = 0;
+ UString base;
+
+ if (IsAbsolutePath(path))
+ {
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (IsSuperOrDevicePath(path))
+ {
+ result = path;
+ return true;
+ }
+ #endif
+ int pos = GetRootPrefixSize(path);
+ if (pos > 0)
+ start = pos;
+ }
+ else
+ {
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (IsSuperOrDevicePath(relBase))
+ {
+ result = path;
+ return true;
+ }
+ #endif
+ base = relBase;
+ }
+
+ /* We can't use backward, since we must change only disk paths */
+ /*
+ for (;;)
+ {
+ if (path.Len() <= start)
+ break;
+ if (DoesFileOrDirExist(us2fs(path)))
+ break;
+ if (path.Back() == WCHAR_PATH_SEPARATOR)
+ {
+ path.DeleteBack();
+ result.Insert(0, WCHAR_PATH_SEPARATOR);;
+ }
+ int pos = path.ReverseFind(WCHAR_PATH_SEPARATOR) + 1;
+ UString cur = path.Ptr(pos);
+ RemoveDotsAndSpaces(cur);
+ result.Insert(0, cur);
+ path.DeleteFrom(pos);
+ }
+ result.Insert(0, path);
+ return true;
+ */
+
+ result += path.Left(start);
+ bool checkExist = true;
+ UString cur;
+
+ for (;;)
+ {
+ if (start == path.Len())
+ break;
+ int slashPos = path.Find(WCHAR_PATH_SEPARATOR, start);
+ cur.SetFrom(path.Ptr(start), (slashPos < 0 ? path.Len() : slashPos) - start);
+ if (checkExist)
+ {
+ CFileInfo fi;
+ if (fi.Find(us2fs(base + result + cur)))
+ {
+ if (!fi.IsDir())
+ {
+ result = path;
+ break;
+ }
+ }
+ else
+ checkExist = false;
+ }
+ if (!checkExist)
+ RemoveDotsAndSpaces(cur);
+ result += cur;
+ if (slashPos < 0)
+ break;
+ result.Add_PathSepar();
+ start = slashPos + 1;
+ }
+
+ return true;
+}
+
+#else
+
+bool CorrectFsPath(const UString & /* relBase */, const UString &path, UString &result)
+{
+ result = path;
+ return true;
+}
+
+#endif
+
+bool Dlg_CreateFolder(HWND wnd, UString &destName)
+{
+ destName.Empty();
+ CComboDialog dlg;
+ LangString(IDS_CREATE_FOLDER, dlg.Title);
+ LangString(IDS_CREATE_FOLDER_NAME, dlg.Static);
+ LangString(IDS_CREATE_FOLDER_DEFAULT_NAME, dlg.Value);
+ if (dlg.Create(wnd) != IDOK)
+ return false;
+ destName = dlg.Value;
+ return true;
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h
new file mode 100644
index 00000000000..957af2e2577
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h
@@ -0,0 +1,21 @@
+// BrowseDialog.h
+
+#ifndef __BROWSE_DIALOG_H
+#define __BROWSE_DIALOG_H
+
+#include "../../../Common/MyString.h"
+
+bool MyBrowseForFolder(HWND owner, LPCWSTR title, LPCWSTR path, UString &resultPath);
+bool MyBrowseForFile(HWND owner, LPCWSTR title, LPCWSTR path, LPCWSTR filterDescription, LPCWSTR filter, UString &resultPath);
+
+/* CorrectFsPath removes undesirable characters in names (dots and spaces at the end of file)
+ But it doesn't change "bad" name in any of the following cases:
+ - path is Super Path (with \\?\ prefix)
+ - path is relative and relBase is Super Path
+ - there is file or dir in filesystem with specified "bad" name */
+
+bool CorrectFsPath(const UString &relBase, const UString &path, UString &result);
+
+bool Dlg_CreateFolder(HWND wnd, UString &destName);
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h
new file mode 100644
index 00000000000..aff84ec9aa3
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h
@@ -0,0 +1,9 @@
+#define IDD_BROWSE 95
+
+#define IDL_BROWSE 100
+#define IDT_BROWSE_FOLDER 101
+#define IDE_BROWSE_PATH 102
+#define IDC_BROWSE_FILTER 103
+
+#define IDB_BROWSE_PARENT 110
+#define IDB_BROWSE_CREATE_DIR 112
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp b/3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp
new file mode 100644
index 00000000000..729743e8795
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp
@@ -0,0 +1,64 @@
+// ComboDialog.cpp
+
+#include "StdAfx.h"
+#include "ComboDialog.h"
+
+#include "../../../Windows/Control/Static.h"
+
+#ifdef LANG
+#include "LangUtils.h"
+#endif
+
+using namespace NWindows;
+
+bool CComboDialog::OnInit()
+{
+ #ifdef LANG
+ LangSetDlgItems(*this, NULL, 0);
+ #endif
+ _comboBox.Attach(GetItem(IDC_COMBO));
+
+ /*
+ // why it doesn't work ?
+ DWORD style = _comboBox.GetStyle();
+ if (Sorted)
+ style |= CBS_SORT;
+ else
+ style &= ~CBS_SORT;
+ _comboBox.SetStyle(style);
+ */
+ SetText(Title);
+
+ NControl::CStatic staticContol;
+ staticContol.Attach(GetItem(IDT_COMBO));
+ staticContol.SetText(Static);
+ _comboBox.SetText(Value);
+ FOR_VECTOR (i, Strings)
+ _comboBox.AddString(Strings[i]);
+ NormalizeSize();
+ return CModalDialog::OnInit();
+}
+
+bool CComboDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
+{
+ int mx, my;
+ GetMargins(8, mx, my);
+ int bx1, bx2, by;
+ GetItemSizes(IDCANCEL, bx1, by);
+ GetItemSizes(IDOK, bx2, by);
+ int y = ySize - my - by;
+ int x = xSize - mx - bx1;
+
+ InvalidateRect(NULL);
+
+ MoveItem(IDCANCEL, x, y, bx1, by);
+ MoveItem(IDOK, x - mx - bx2, y, bx2, by);
+ ChangeSubWindowSizeX(_comboBox, xSize - mx * 2);
+ return false;
+}
+
+void CComboDialog::OnOK()
+{
+ _comboBox.GetText(Value);
+ CModalDialog::OnOK();
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialog.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialog.h
new file mode 100644
index 00000000000..29b28b5b49c
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialog.h
@@ -0,0 +1,28 @@
+// ComboDialog.h
+
+#ifndef __COMBO_DIALOG_H
+#define __COMBO_DIALOG_H
+
+#include "../../../Windows/Control/ComboBox.h"
+#include "../../../Windows/Control/Dialog.h"
+
+#include "ComboDialogRes.h"
+
+class CComboDialog: public NWindows::NControl::CModalDialog
+{
+ NWindows::NControl::CComboBox _comboBox;
+ virtual void OnOK();
+ virtual bool OnInit();
+ virtual bool OnSize(WPARAM wParam, int xSize, int ySize);
+public:
+ // bool Sorted;
+ UString Title;
+ UString Static;
+ UString Value;
+ UStringVector Strings;
+
+ // CComboDialog(): Sorted(false) {};
+ INT_PTR Create(HWND parentWindow = 0) { return CModalDialog::Create(IDD_COMBO, parentWindow); }
+};
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h
new file mode 100644
index 00000000000..a044797e456
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h
@@ -0,0 +1,4 @@
+#define IDD_COMBO 98
+
+#define IDT_COMBO 100
+#define IDC_COMBO 101
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/DialogSize.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/DialogSize.h
new file mode 100644
index 00000000000..504541bdf3c
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/DialogSize.h
@@ -0,0 +1,16 @@
+// DialogSize.h
+
+#ifndef __DIALOG_SIZE_H
+#define __DIALOG_SIZE_H
+
+#include "../../../Windows/Control/Dialog.h"
+
+#ifdef UNDER_CE
+#define BIG_DIALOG_SIZE(x, y) bool isBig = NWindows::NControl::IsDialogSizeOK(x, y);
+#define SIZED_DIALOG(big) (isBig ? big : big ## _2)
+#else
+#define BIG_DIALOG_SIZE(x, y)
+#define SIZED_DIALOG(big) big
+#endif
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp b/3rdparty/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp
new file mode 100644
index 00000000000..7d61d14d9d9
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp
@@ -0,0 +1,1035 @@
+// ExtractCallback.cpp
+
+#include "StdAfx.h"
+
+
+#include "../../../Common/ComTry.h"
+#include "../../../Common/IntToString.h"
+#include "../../../Common/Lang.h"
+#include "../../../Common/StringConvert.h"
+
+#include "../../../Windows/ErrorMsg.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileFind.h"
+#include "../../../Windows/PropVariantConv.h"
+
+#include "../../Common/FilePathAutoRename.h"
+#include "../../Common/StreamUtils.h"
+#include "../Common/ExtractingFilePath.h"
+
+#ifndef _SFX
+#include "../Common/ZipRegistry.h"
+#endif
+
+#include "../GUI/ExtractRes.h"
+#include "resourceGui.h"
+
+#include "ExtractCallback.h"
+#include "FormatUtils.h"
+#include "LangUtils.h"
+#include "OverwriteDialog.h"
+#ifndef _NO_CRYPTO
+#include "PasswordDialog.h"
+#endif
+#include "PropertyName.h"
+
+using namespace NWindows;
+using namespace NFile;
+using namespace NFind;
+
+CExtractCallbackImp::~CExtractCallbackImp() {}
+
+void CExtractCallbackImp::Init()
+{
+ _lang_Extracting = LangString(IDS_PROGRESS_EXTRACTING);
+ _lang_Testing = LangString(IDS_PROGRESS_TESTING);
+ _lang_Skipping = LangString(IDS_PROGRESS_SKIPPING);
+
+ NumArchiveErrors = 0;
+ ThereAreMessageErrors = false;
+ #ifndef _SFX
+ NumFolders = NumFiles = 0;
+ NeedAddFile = false;
+ #endif
+}
+
+void CExtractCallbackImp::AddError_Message(LPCWSTR s)
+{
+ ThereAreMessageErrors = true;
+ ProgressDialog->Sync.AddError_Message(s);
+}
+
+#ifndef _SFX
+
+STDMETHODIMP CExtractCallbackImp::SetNumFiles(UInt64
+ #ifndef _SFX
+ numFiles
+ #endif
+ )
+{
+ #ifndef _SFX
+ ProgressDialog->Sync.Set_NumFilesTotal(numFiles);
+ #endif
+ return S_OK;
+}
+
+#endif
+
+STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 total)
+{
+ ProgressDialog->Sync.Set_NumBytesTotal(total);
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallbackImp::SetCompleted(const UInt64 *value)
+{
+ return ProgressDialog->Sync.Set_NumBytesCur(value);
+}
+
+HRESULT CExtractCallbackImp::Open_CheckBreak()
+{
+ return ProgressDialog->Sync.CheckStop();
+}
+
+HRESULT CExtractCallbackImp::Open_SetTotal(const UInt64 *files, const UInt64 *bytes)
+{
+ HRESULT res = S_OK;
+ if (!MultiArcMode)
+ {
+ if (files)
+ {
+ _totalFilesDefined = true;
+ // res = ProgressDialog->Sync.Set_NumFilesTotal(*files);
+ }
+ else
+ _totalFilesDefined = false;
+
+ if (bytes)
+ {
+ _totalBytesDefined = true;
+ ProgressDialog->Sync.Set_NumBytesTotal(*bytes);
+ }
+ else
+ _totalBytesDefined = false;
+ }
+
+ return res;
+}
+
+HRESULT CExtractCallbackImp::Open_SetCompleted(const UInt64 *files, const UInt64 *bytes)
+{
+ if (!MultiArcMode)
+ {
+ if (files)
+ {
+ ProgressDialog->Sync.Set_NumFilesCur(*files);
+ }
+
+ if (bytes)
+ {
+ }
+ }
+
+ return ProgressDialog->Sync.CheckStop();
+}
+
+HRESULT CExtractCallbackImp::Open_Finished()
+{
+ return ProgressDialog->Sync.CheckStop();
+}
+
+#ifndef _NO_CRYPTO
+
+HRESULT CExtractCallbackImp::Open_CryptoGetTextPassword(BSTR *password)
+{
+ return CryptoGetTextPassword(password);
+}
+
+/*
+HRESULT CExtractCallbackImp::Open_GetPasswordIfAny(bool &passwordIsDefined, UString &password)
+{
+ passwordIsDefined = PasswordIsDefined;
+ password = Password;
+ return S_OK;
+}
+
+bool CExtractCallbackImp::Open_WasPasswordAsked()
+{
+ return PasswordWasAsked;
+}
+
+void CExtractCallbackImp::Open_Clear_PasswordWasAsked_Flag()
+{
+ PasswordWasAsked = false;
+}
+*/
+
+#endif
+
+
+#ifndef _SFX
+STDMETHODIMP CExtractCallbackImp::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize)
+{
+ ProgressDialog->Sync.Set_Ratio(inSize, outSize);
+ return S_OK;
+}
+#endif
+
+/*
+STDMETHODIMP CExtractCallbackImp::SetTotalFiles(UInt64 total)
+{
+ ProgressDialog->Sync.SetNumFilesTotal(total);
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallbackImp::SetCompletedFiles(const UInt64 *value)
+{
+ if (value != NULL)
+ ProgressDialog->Sync.SetNumFilesCur(*value);
+ return S_OK;
+}
+*/
+
+STDMETHODIMP CExtractCallbackImp::AskOverwrite(
+ const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize,
+ const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize,
+ Int32 *answer)
+{
+ COverwriteDialog dialog;
+
+ dialog.OldFileInfo.SetTime(existTime);
+ dialog.OldFileInfo.SetSize(existSize);
+ dialog.OldFileInfo.Name = existName;
+
+ dialog.NewFileInfo.SetTime(newTime);
+ dialog.NewFileInfo.SetSize(newSize);
+ dialog.NewFileInfo.Name = newName;
+
+ ProgressDialog->WaitCreating();
+ INT_PTR writeAnswer = dialog.Create(*ProgressDialog);
+
+ switch (writeAnswer)
+ {
+ case IDCANCEL: *answer = NOverwriteAnswer::kCancel; return E_ABORT;
+ case IDYES: *answer = NOverwriteAnswer::kYes; break;
+ case IDNO: *answer = NOverwriteAnswer::kNo; break;
+ case IDB_YES_TO_ALL: *answer = NOverwriteAnswer::kYesToAll; break;
+ case IDB_NO_TO_ALL: *answer = NOverwriteAnswer::kNoToAll; break;
+ case IDB_AUTO_RENAME: *answer = NOverwriteAnswer::kAutoRename; break;
+ default: return E_FAIL;
+ }
+ return S_OK;
+}
+
+
+STDMETHODIMP CExtractCallbackImp::PrepareOperation(const wchar_t *name, Int32 isFolder, Int32 askExtractMode, const UInt64 * /* position */)
+{
+ _isFolder = IntToBool(isFolder);
+ _currentFilePath = name;
+
+ const UString *msg = &_lang_Empty;
+ switch (askExtractMode)
+ {
+ case NArchive::NExtract::NAskMode::kExtract: msg = &_lang_Extracting; break;
+ case NArchive::NExtract::NAskMode::kTest: msg = &_lang_Testing; break;
+ case NArchive::NExtract::NAskMode::kSkip: msg = &_lang_Skipping; break;
+ // default: s = "Unknown operation";
+ }
+
+ return ProgressDialog->Sync.Set_Status2(*msg, name, IntToBool(isFolder));
+}
+
+STDMETHODIMP CExtractCallbackImp::MessageError(const wchar_t *s)
+{
+ AddError_Message(s);
+ return S_OK;
+}
+
+HRESULT CExtractCallbackImp::MessageError(const char *message, const FString &path)
+{
+ ThereAreMessageErrors = true;
+ ProgressDialog->Sync.AddError_Message_Name(GetUnicodeString(message), fs2us(path));
+ return S_OK;
+}
+
+#ifndef _SFX
+
+STDMETHODIMP CExtractCallbackImp::ShowMessage(const wchar_t *s)
+{
+ AddError_Message(s);
+ return S_OK;
+}
+
+#endif
+
+void SetExtractErrorMessage(Int32 opRes, Int32 encrypted, const wchar_t *fileName, UString &s)
+{
+ s.Empty();
+
+ if (opRes == NArchive::NExtract::NOperationResult::kOK)
+ return;
+
+ UINT messageID = 0;
+ UINT id = 0;
+
+ switch (opRes)
+ {
+ case NArchive::NExtract::NOperationResult::kUnsupportedMethod:
+ messageID = IDS_EXTRACT_MESSAGE_UNSUPPORTED_METHOD;
+ id = IDS_EXTRACT_MSG_UNSUPPORTED_METHOD;
+ break;
+ case NArchive::NExtract::NOperationResult::kDataError:
+ messageID = encrypted ?
+ IDS_EXTRACT_MESSAGE_DATA_ERROR_ENCRYPTED:
+ IDS_EXTRACT_MESSAGE_DATA_ERROR;
+ id = IDS_EXTRACT_MSG_DATA_ERROR;
+ break;
+ case NArchive::NExtract::NOperationResult::kCRCError:
+ messageID = encrypted ?
+ IDS_EXTRACT_MESSAGE_CRC_ERROR_ENCRYPTED:
+ IDS_EXTRACT_MESSAGE_CRC_ERROR;
+ id = IDS_EXTRACT_MSG_CRC_ERROR;
+ break;
+ case NArchive::NExtract::NOperationResult::kUnavailable:
+ id = IDS_EXTRACT_MSG_UNAVAILABLE_DATA;
+ break;
+ case NArchive::NExtract::NOperationResult::kUnexpectedEnd:
+ id = IDS_EXTRACT_MSG_UEXPECTED_END;
+ break;
+ case NArchive::NExtract::NOperationResult::kDataAfterEnd:
+ id = IDS_EXTRACT_MSG_DATA_AFTER_END;
+ break;
+ case NArchive::NExtract::NOperationResult::kIsNotArc:
+ id = IDS_EXTRACT_MSG_IS_NOT_ARC;
+ break;
+ case NArchive::NExtract::NOperationResult::kHeadersError:
+ id = IDS_EXTRACT_MSG_HEADERS_ERROR;
+ break;
+ case NArchive::NExtract::NOperationResult::kWrongPassword:
+ id = IDS_EXTRACT_MSG_WRONG_PSW_CLAIM;
+ break;
+ /*
+ default:
+ messageID = IDS_EXTRACT_MESSAGE_UNKNOWN_ERROR;
+ break;
+ */
+ }
+
+ UString msg;
+ UString msgOld;
+
+ #ifndef _SFX
+ if (id != 0)
+ LangString_OnlyFromLangFile(id, msg);
+ if (messageID != 0 && msg.IsEmpty())
+ LangString_OnlyFromLangFile(messageID, msgOld);
+ #endif
+
+ if (msg.IsEmpty() && !msgOld.IsEmpty())
+ s = MyFormatNew(msgOld, fileName);
+ else
+ {
+ if (msg.IsEmpty() && id != 0)
+ LangString(id, msg);
+ if (!msg.IsEmpty())
+ s += msg;
+ else
+ {
+ char temp[16];
+ ConvertUInt32ToString(opRes, temp);
+ s.AddAscii("Error #");
+ s.AddAscii(temp);
+ }
+
+ if (encrypted && opRes != NArchive::NExtract::NOperationResult::kWrongPassword)
+ {
+ // s.AddAscii(" : ");
+ // AddLangString(s, IDS_EXTRACT_MSG_ENCRYPTED);
+ s.AddAscii(" : ");
+ AddLangString(s, IDS_EXTRACT_MSG_WRONG_PSW_GUESS);
+ }
+ s.AddAscii(" : ");
+ s += fileName;
+ }
+}
+
+STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 opRes, Int32 encrypted)
+{
+ switch (opRes)
+ {
+ case NArchive::NExtract::NOperationResult::kOK:
+ break;
+ default:
+ {
+ UString s;
+ SetExtractErrorMessage(opRes, encrypted, _currentFilePath, s);
+ Add_ArchiveName_Error();
+ AddError_Message(s);
+ }
+ }
+
+ #ifndef _SFX
+ if (_isFolder)
+ NumFolders++;
+ else
+ NumFiles++;
+ ProgressDialog->Sync.Set_NumFilesCur(NumFiles);
+ #endif
+
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallbackImp::ReportExtractResult(Int32 opRes, Int32 encrypted, const wchar_t *name)
+{
+ if (opRes != NArchive::NExtract::NOperationResult::kOK)
+ {
+ UString s;
+ SetExtractErrorMessage(opRes, encrypted, name, s);
+ Add_ArchiveName_Error();
+ AddError_Message(s);
+ }
+ return S_OK;
+}
+
+////////////////////////////////////////
+// IExtractCallbackUI
+
+HRESULT CExtractCallbackImp::BeforeOpen(const wchar_t *name, bool /* testMode */)
+{
+ #ifndef _SFX
+ RINOK(ProgressDialog->Sync.CheckStop());
+ ProgressDialog->Sync.Set_TitleFileName(name);
+ #endif
+ _currentArchivePath = name;
+ return S_OK;
+}
+
+HRESULT CExtractCallbackImp::SetCurrentFilePath2(const wchar_t *path)
+{
+ _currentFilePath = path;
+ #ifndef _SFX
+ ProgressDialog->Sync.Set_FilePath(path);
+ #endif
+ return S_OK;
+}
+
+#ifndef _SFX
+
+HRESULT CExtractCallbackImp::SetCurrentFilePath(const wchar_t *path)
+{
+ #ifndef _SFX
+ if (NeedAddFile)
+ NumFiles++;
+ NeedAddFile = true;
+ ProgressDialog->Sync.Set_NumFilesCur(NumFiles);
+ #endif
+ return SetCurrentFilePath2(path);
+}
+
+#endif
+
+UString HResultToMessage(HRESULT errorCode);
+
+static const UInt32 k_ErrorFlagsIds[] =
+{
+ IDS_EXTRACT_MSG_IS_NOT_ARC,
+ IDS_EXTRACT_MSG_HEADERS_ERROR,
+ IDS_EXTRACT_MSG_HEADERS_ERROR,
+ IDS_OPEN_MSG_UNAVAILABLE_START,
+ IDS_OPEN_MSG_UNCONFIRMED_START,
+ IDS_EXTRACT_MSG_UEXPECTED_END,
+ IDS_EXTRACT_MSG_DATA_AFTER_END,
+ IDS_EXTRACT_MSG_UNSUPPORTED_METHOD,
+ IDS_OPEN_MSG_UNSUPPORTED_FEATURE,
+ IDS_EXTRACT_MSG_DATA_ERROR,
+ IDS_EXTRACT_MSG_CRC_ERROR
+};
+
+static void AddNewLineString(UString &s, const UString &m)
+{
+ s += m;
+ s.Add_LF();
+}
+
+UString GetOpenArcErrorMessage(UInt32 errorFlags)
+{
+ UString s;
+
+ for (unsigned i = 0; i < ARRAY_SIZE(k_ErrorFlagsIds); i++)
+ {
+ UInt32 f = ((UInt32)1 << i);
+ if ((errorFlags & f) == 0)
+ continue;
+ UInt32 id = k_ErrorFlagsIds[i];
+ UString m = LangString(id);
+ if (m.IsEmpty())
+ continue;
+ if (f == kpv_ErrorFlags_EncryptedHeadersError)
+ {
+ m.AddAscii(" : ");
+ AddLangString(m, IDS_EXTRACT_MSG_WRONG_PSW_GUESS);
+ }
+ if (!s.IsEmpty())
+ s.Add_LF();
+ s += m;
+ errorFlags &= ~f;
+ }
+
+ if (errorFlags != 0)
+ {
+ char sz[16];
+ sz[0] = '0';
+ sz[1] = 'x';
+ ConvertUInt32ToHex(errorFlags, sz + 2);
+ if (!s.IsEmpty())
+ s.Add_LF();
+ s.AddAscii(sz);
+ }
+
+ return s;
+}
+
+static void ErrorInfo_Print(UString &s, const CArcErrorInfo &er)
+{
+ UInt32 errorFlags = er.GetErrorFlags();
+ UInt32 warningFlags = er.GetWarningFlags();
+
+ if (errorFlags != 0)
+ AddNewLineString(s, GetOpenArcErrorMessage(errorFlags));
+
+ if (!er.ErrorMessage.IsEmpty())
+ AddNewLineString(s, er.ErrorMessage);
+
+ if (warningFlags != 0)
+ {
+ s += GetNameOfProperty(kpidWarningFlags, L"Warnings");
+ s.AddAscii(":");
+ s.Add_LF();
+ AddNewLineString(s, GetOpenArcErrorMessage(warningFlags));
+ }
+
+ if (!er.WarningMessage.IsEmpty())
+ {
+ s += GetNameOfProperty(kpidWarning, L"Warning");
+ s.AddAscii(": ");
+ s += er.WarningMessage;
+ s.Add_LF();
+ }
+}
+
+static UString GetBracedType(const wchar_t *type)
+{
+ UString s = L'[';
+ s += type;
+ s += L']';
+ return s;
+}
+
+void OpenResult_GUI(UString &s, const CCodecs *codecs, const CArchiveLink &arcLink, const wchar_t *name, HRESULT result)
+{
+ FOR_VECTOR (level, arcLink.Arcs)
+ {
+ const CArc &arc = arcLink.Arcs[level];
+ const CArcErrorInfo &er = arc.ErrorInfo;
+
+ if (!er.IsThereErrorOrWarning() && er.ErrorFormatIndex < 0)
+ continue;
+
+ if (s.IsEmpty())
+ {
+ s += name;
+ s.Add_LF();
+ }
+
+ if (level != 0)
+ {
+ AddNewLineString(s, arc.Path);
+ }
+
+ ErrorInfo_Print(s, er);
+
+ if (er.ErrorFormatIndex >= 0)
+ {
+ AddNewLineString(s, GetNameOfProperty(kpidWarning, L"Warning"));
+ if (arc.FormatIndex == er.ErrorFormatIndex)
+ {
+ AddNewLineString(s, LangString(IDS_IS_OPEN_WITH_OFFSET));
+ }
+ else
+ {
+ AddNewLineString(s, MyFormatNew(IDS_CANT_OPEN_AS_TYPE, GetBracedType(codecs->GetFormatNamePtr(er.ErrorFormatIndex))));
+ AddNewLineString(s, MyFormatNew(IDS_IS_OPEN_AS_TYPE, GetBracedType(codecs->GetFormatNamePtr(arc.FormatIndex))));
+ }
+ }
+ }
+
+ if (arcLink.NonOpen_ErrorInfo.ErrorFormatIndex >= 0 || result != S_OK)
+ {
+ s += name;
+ s.Add_LF();
+ if (!arcLink.Arcs.IsEmpty())
+ AddNewLineString(s, arcLink.NonOpen_ArcPath);
+
+ if (arcLink.NonOpen_ErrorInfo.ErrorFormatIndex >= 0 || result == S_FALSE)
+ {
+ UINT id = IDS_CANT_OPEN_ARCHIVE;
+ UString param;
+ if (arcLink.PasswordWasAsked)
+ id = IDS_CANT_OPEN_ENCRYPTED_ARCHIVE;
+ else if (arcLink.NonOpen_ErrorInfo.ErrorFormatIndex >= 0)
+ {
+ id = IDS_CANT_OPEN_AS_TYPE;
+ param = GetBracedType(codecs->GetFormatNamePtr(arcLink.NonOpen_ErrorInfo.ErrorFormatIndex));
+ }
+ UString s2 = MyFormatNew(id, param);
+ s2.Replace(L" ''", L"");
+ s2.Replace(L"''", L"");
+ s += s2;
+ }
+ else
+ s += HResultToMessage(result);
+
+ s.Add_LF();
+ ErrorInfo_Print(s, arcLink.NonOpen_ErrorInfo);
+ }
+
+ if (!s.IsEmpty() && s.Back() == '\n')
+ s.DeleteBack();
+}
+
+HRESULT CExtractCallbackImp::OpenResult(const CCodecs *codecs, const CArchiveLink &arcLink, const wchar_t *name, HRESULT result)
+{
+ _currentArchivePath = name;
+ _needWriteArchivePath = true;
+
+ UString s;
+ OpenResult_GUI(s, codecs, arcLink, name, result);
+ if (!s.IsEmpty())
+ {
+ NumArchiveErrors++;
+ AddError_Message(s);
+ _needWriteArchivePath = false;
+ }
+
+ return S_OK;
+}
+
+HRESULT CExtractCallbackImp::ThereAreNoFiles()
+{
+ return S_OK;
+}
+
+void CExtractCallbackImp::Add_ArchiveName_Error()
+{
+ if (_needWriteArchivePath)
+ {
+ if (!_currentArchivePath.IsEmpty())
+ AddError_Message(_currentArchivePath);
+ _needWriteArchivePath = false;
+ }
+}
+
+HRESULT CExtractCallbackImp::ExtractResult(HRESULT result)
+{
+ if (result == S_OK)
+ return result;
+ NumArchiveErrors++;
+ if (result == E_ABORT || result == ERROR_DISK_FULL)
+ return result;
+
+ Add_ArchiveName_Error();
+ if (!_currentFilePath.IsEmpty())
+ MessageError(_currentFilePath);
+ MessageError(NError::MyFormatMessage(result));
+ return S_OK;
+}
+
+#ifndef _NO_CRYPTO
+
+HRESULT CExtractCallbackImp::SetPassword(const UString &password)
+{
+ PasswordIsDefined = true;
+ Password = password;
+ return S_OK;
+}
+
+STDMETHODIMP CExtractCallbackImp::CryptoGetTextPassword(BSTR *password)
+{
+ PasswordWasAsked = true;
+ if (!PasswordIsDefined)
+ {
+ CPasswordDialog dialog;
+ #ifndef _SFX
+ bool showPassword = NExtract::Read_ShowPassword();
+ dialog.ShowPassword = showPassword;
+ #endif
+ ProgressDialog->WaitCreating();
+ if (dialog.Create(*ProgressDialog) != IDOK)
+ return E_ABORT;
+ Password = dialog.Password;
+ PasswordIsDefined = true;
+ #ifndef _SFX
+ if (dialog.ShowPassword != showPassword)
+ NExtract::Save_ShowPassword(dialog.ShowPassword);
+ #endif
+ }
+ return StringToBstr(Password, password);
+}
+
+#endif
+
+#ifndef _SFX
+
+STDMETHODIMP CExtractCallbackImp::AskWrite(
+ const wchar_t *srcPath, Int32 srcIsFolder,
+ const FILETIME *srcTime, const UInt64 *srcSize,
+ const wchar_t *destPath,
+ BSTR *destPathResult,
+ Int32 *writeAnswer)
+{
+ UString destPathResultTemp = destPath;
+
+ // RINOK(StringToBstr(destPath, destPathResult));
+
+ *destPathResult = 0;
+ *writeAnswer = BoolToInt(false);
+
+ FString destPathSys = us2fs(destPath);
+ bool srcIsFolderSpec = IntToBool(srcIsFolder);
+ CFileInfo destFileInfo;
+
+ if (destFileInfo.Find(destPathSys))
+ {
+ if (srcIsFolderSpec)
+ {
+ if (!destFileInfo.IsDir())
+ {
+ RINOK(MessageError("can not replace file with folder with same name", destPathSys));
+ return E_ABORT;
+ }
+ *writeAnswer = BoolToInt(false);
+ return S_OK;
+ }
+
+ if (destFileInfo.IsDir())
+ {
+ RINOK(MessageError("can not replace folder with file with same name", destPathSys));
+ *writeAnswer = BoolToInt(false);
+ return S_OK;
+ }
+
+ switch (OverwriteMode)
+ {
+ case NExtract::NOverwriteMode::kSkip:
+ return S_OK;
+ case NExtract::NOverwriteMode::kAsk:
+ {
+ Int32 overwriteResult;
+ UString destPathSpec = destPath;
+ int slashPos = destPathSpec.ReverseFind_PathSepar();
+ destPathSpec.DeleteFrom(slashPos + 1);
+ destPathSpec += fs2us(destFileInfo.Name);
+
+ RINOK(AskOverwrite(
+ destPathSpec,
+ &destFileInfo.MTime, &destFileInfo.Size,
+ srcPath,
+ srcTime, srcSize,
+ &overwriteResult));
+
+ switch (overwriteResult)
+ {
+ case NOverwriteAnswer::kCancel: return E_ABORT;
+ case NOverwriteAnswer::kNo: return S_OK;
+ case NOverwriteAnswer::kNoToAll: OverwriteMode = NExtract::NOverwriteMode::kSkip; return S_OK;
+ case NOverwriteAnswer::kYes: break;
+ case NOverwriteAnswer::kYesToAll: OverwriteMode = NExtract::NOverwriteMode::kOverwrite; break;
+ case NOverwriteAnswer::kAutoRename: OverwriteMode = NExtract::NOverwriteMode::kRename; break;
+ default:
+ return E_FAIL;
+ }
+ }
+ }
+
+ if (OverwriteMode == NExtract::NOverwriteMode::kRename)
+ {
+ if (!AutoRenamePath(destPathSys))
+ {
+ RINOK(MessageError("can not create name for file", destPathSys));
+ return E_ABORT;
+ }
+ destPathResultTemp = fs2us(destPathSys);
+ }
+ else
+ if (!NDir::DeleteFileAlways(destPathSys))
+ {
+ RINOK(MessageError("can not delete output file", destPathSys));
+ return E_ABORT;
+ }
+ }
+ *writeAnswer = BoolToInt(true);
+ return StringToBstr(destPathResultTemp, destPathResult);
+}
+
+
+STDMETHODIMP CExtractCallbackImp::UseExtractToStream(Int32 *res)
+{
+ *res = BoolToInt(StreamMode);
+ return S_OK;
+}
+
+static HRESULT GetTime(IGetProp *getProp, PROPID propID, FILETIME &ft, bool &ftDefined)
+{
+ ftDefined = false;
+ NCOM::CPropVariant prop;
+ RINOK(getProp->GetProp(propID, &prop));
+ if (prop.vt == VT_FILETIME)
+ {
+ ft = prop.filetime;
+ ftDefined = (ft.dwHighDateTime != 0 || ft.dwLowDateTime != 0);
+ }
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+ return S_OK;
+}
+
+
+static HRESULT GetItemBoolProp(IGetProp *getProp, PROPID propID, bool &result)
+{
+ NCOM::CPropVariant prop;
+ result = false;
+ RINOK(getProp->GetProp(propID, &prop));
+ if (prop.vt == VT_BOOL)
+ result = VARIANT_BOOLToBool(prop.boolVal);
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+ return S_OK;
+}
+
+
+STDMETHODIMP CExtractCallbackImp::GetStream7(const wchar_t *name,
+ Int32 isDir,
+ ISequentialOutStream **outStream, Int32 askExtractMode,
+ IGetProp *getProp)
+{
+ COM_TRY_BEGIN
+ *outStream = 0;
+ _newVirtFileWasAdded = false;
+ _hashStreamWasUsed = false;
+ _needUpdateStat = false;
+
+ if (_hashStream)
+ _hashStreamSpec->ReleaseStream();
+
+ GetItemBoolProp(getProp, kpidIsAltStream, _isAltStream);
+
+ if (!ProcessAltStreams && _isAltStream)
+ return S_OK;
+
+ _filePath = name;
+ _isFolder = IntToBool(isDir);
+ _curSize = 0;
+ _curSizeDefined = false;
+
+ UInt64 size = 0;
+ bool sizeDefined;
+ {
+ NCOM::CPropVariant prop;
+ RINOK(getProp->GetProp(kpidSize, &prop));
+ sizeDefined = ConvertPropVariantToUInt64(prop, size);
+ }
+
+ if (sizeDefined)
+ {
+ _curSize = size;
+ _curSizeDefined = true;
+ }
+
+ if (askExtractMode != NArchive::NExtract::NAskMode::kExtract &&
+ askExtractMode != NArchive::NExtract::NAskMode::kTest)
+ return S_OK;
+
+ _needUpdateStat = true;
+
+ CMyComPtr<ISequentialOutStream> outStreamLoc;
+
+ if (VirtFileSystem && askExtractMode == NArchive::NExtract::NAskMode::kExtract)
+ {
+ CVirtFile &file = VirtFileSystemSpec->AddNewFile();
+ _newVirtFileWasAdded = true;
+ file.Name = name;
+ file.IsDir = IntToBool(isDir);
+ file.IsAltStream = _isAltStream;
+ file.Size = 0;
+
+ RINOK(GetTime(getProp, kpidCTime, file.CTime, file.CTimeDefined));
+ RINOK(GetTime(getProp, kpidATime, file.ATime, file.ATimeDefined));
+ RINOK(GetTime(getProp, kpidMTime, file.MTime, file.MTimeDefined));
+
+ NCOM::CPropVariant prop;
+ RINOK(getProp->GetProp(kpidAttrib, &prop));
+ if (prop.vt == VT_UI4)
+ {
+ file.Attrib = prop.ulVal;
+ file.AttribDefined = true;
+ }
+ // else if (isDir) file.Attrib = FILE_ATTRIBUTE_DIRECTORY;
+
+ file.ExpectedSize = 0;
+ if (sizeDefined)
+ file.ExpectedSize = size;
+ outStreamLoc = VirtFileSystem;
+ }
+
+ if (_hashStream)
+ {
+ {
+ _hashStreamSpec->SetStream(outStreamLoc);
+ outStreamLoc = _hashStream;
+ _hashStreamSpec->Init(true);
+ _hashStreamWasUsed = true;
+ }
+ }
+
+ if (outStreamLoc)
+ *outStream = outStreamLoc.Detach();
+ return S_OK;
+ COM_TRY_END
+}
+
+STDMETHODIMP CExtractCallbackImp::PrepareOperation7(Int32 askExtractMode)
+{
+ COM_TRY_BEGIN
+ _needUpdateStat = (
+ askExtractMode == NArchive::NExtract::NAskMode::kExtract ||
+ askExtractMode == NArchive::NExtract::NAskMode::kTest);
+
+ /*
+ _extractMode = false;
+ switch (askExtractMode)
+ {
+ case NArchive::NExtract::NAskMode::kExtract:
+ if (_testMode)
+ askExtractMode = NArchive::NExtract::NAskMode::kTest;
+ else
+ _extractMode = true;
+ break;
+ };
+ */
+ return SetCurrentFilePath2(_filePath);
+ COM_TRY_END
+}
+
+STDMETHODIMP CExtractCallbackImp::SetOperationResult7(Int32 opRes, Int32 encrypted)
+{
+ COM_TRY_BEGIN
+ if (VirtFileSystem && _newVirtFileWasAdded)
+ {
+ // FIXME: probably we must request file size from VirtFileSystem
+ // _curSize = VirtFileSystem->GetLastFileSize()
+ // _curSizeDefined = true;
+ RINOK(VirtFileSystemSpec->CloseMemFile());
+ }
+ if (_hashStream && _hashStreamWasUsed)
+ {
+ _hashStreamSpec->_hash->Final(_isFolder, _isAltStream, _filePath);
+ _curSize = _hashStreamSpec->GetSize();
+ _curSizeDefined = true;
+ _hashStreamSpec->ReleaseStream();
+ _hashStreamWasUsed = false;
+ }
+ else if (_hashCalc && _needUpdateStat)
+ {
+ _hashCalc->SetSize(_curSize);
+ _hashCalc->Final(_isFolder, _isAltStream, _filePath);
+ }
+ return SetOperationResult(opRes, encrypted);
+ COM_TRY_END
+}
+
+
+static const size_t k_SizeT_MAX = (size_t)((size_t)0 - 1);
+
+static const UInt32 kBlockSize = ((UInt32)1 << 31);
+
+STDMETHODIMP CVirtFileSystem::Write(const void *data, UInt32 size, UInt32 *processedSize)
+{
+ if (processedSize)
+ *processedSize = 0;
+ if (size == 0)
+ return S_OK;
+ if (!_fileMode)
+ {
+ CVirtFile &file = Files.Back();
+ size_t rem = file.Data.Size() - (size_t)file.Size;
+ bool useMem = true;
+ if (rem < size)
+ {
+ UInt64 b = 0;
+ if (file.Data.Size() == 0)
+ b = file.ExpectedSize;
+ UInt64 a = file.Size + size;
+ if (b < a)
+ b = a;
+ a = (UInt64)file.Data.Size() * 2;
+ if (b < a)
+ b = a;
+ useMem = false;
+ if (b <= k_SizeT_MAX && b <= MaxTotalAllocSize)
+ useMem = file.Data.ReAlloc_KeepData((size_t)b, (size_t)file.Size);
+ }
+ if (useMem)
+ {
+ memcpy(file.Data + file.Size, data, size);
+ file.Size += size;
+ if (processedSize)
+ *processedSize = (UInt32)size;
+ return S_OK;
+ }
+ _fileMode = true;
+ }
+ RINOK(FlushToDisk(false));
+ return _outFileStream->Write(data, size, processedSize);
+}
+
+HRESULT CVirtFileSystem::FlushToDisk(bool closeLast)
+{
+ if (!_outFileStream)
+ {
+ _outFileStreamSpec = new COutFileStream;
+ _outFileStream = _outFileStreamSpec;
+ }
+ while (_numFlushed < Files.Size())
+ {
+ const CVirtFile &file = Files[_numFlushed];
+ const FString path = DirPrefix + us2fs(Get_Correct_FsFile_Name(file.Name));
+ if (!_fileIsOpen)
+ {
+ if (!_outFileStreamSpec->Create(path, false))
+ {
+ _outFileStream.Release();
+ return E_FAIL;
+ // MessageBoxMyError(UString(L"Can't create file ") + fs2us(tempFilePath));
+ }
+ _fileIsOpen = true;
+ RINOK(WriteStream(_outFileStream, file.Data, (size_t)file.Size));
+ }
+ if (_numFlushed == Files.Size() - 1 && !closeLast)
+ break;
+ if (file.CTimeDefined ||
+ file.ATimeDefined ||
+ file.MTimeDefined)
+ _outFileStreamSpec->SetTime(
+ file.CTimeDefined ? &file.CTime : NULL,
+ file.ATimeDefined ? &file.ATime : NULL,
+ file.MTimeDefined ? &file.MTime : NULL);
+ _outFileStreamSpec->Close();
+ _numFlushed++;
+ _fileIsOpen = false;
+ if (file.AttribDefined)
+ NDir::SetFileAttrib(path, file.Attrib);
+ }
+ return S_OK;
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h
new file mode 100644
index 00000000000..6cd8d0aa83d
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h
@@ -0,0 +1,328 @@
+// ExtractCallback.h
+
+#ifndef __EXTRACT_CALLBACK_H
+#define __EXTRACT_CALLBACK_H
+
+#include "../../../../C/Alloc.h"
+
+#include "../../../Common/MyCom.h"
+#include "../../../Common/StringConvert.h"
+
+#ifndef _SFX
+#include "../Agent/IFolderArchive.h"
+#endif
+
+#include "../Common/ArchiveExtractCallback.h"
+#include "../Common/ArchiveOpenCallback.h"
+
+#ifndef _NO_CRYPTO
+#include "../../IPassword.h"
+#endif
+
+#ifndef _SFX
+#include "IFolder.h"
+#endif
+
+#include "ProgressDialog2.h"
+
+#ifdef LANG
+#include "LangUtils.h"
+#endif
+
+#ifndef _SFX
+
+class CGrowBuf
+{
+ Byte *_items;
+ size_t _size;
+
+ CLASS_NO_COPY(CGrowBuf);
+
+public:
+ bool ReAlloc_KeepData(size_t newSize, size_t keepSize)
+ {
+ void *buf = MyAlloc(newSize);
+ if (!buf)
+ return false;
+ if (keepSize != 0)
+ memcpy(buf, _items, keepSize);
+ MyFree(_items);
+ _items = (Byte *)buf;
+ _size = newSize;
+ return true;
+ }
+
+ CGrowBuf(): _items(0), _size(0) {}
+ ~CGrowBuf() { MyFree(_items); }
+
+ operator Byte *() { return _items; }
+ operator const Byte *() const { return _items; }
+ size_t Size() const { return _size; }
+};
+
+struct CVirtFile
+{
+ CGrowBuf Data;
+
+ UInt64 Size; // real size
+ UInt64 ExpectedSize; // the size from props request. 0 if unknown
+
+ UString Name;
+
+ bool CTimeDefined;
+ bool ATimeDefined;
+ bool MTimeDefined;
+ bool AttribDefined;
+
+ bool IsDir;
+ bool IsAltStream;
+
+ DWORD Attrib;
+
+ FILETIME CTime;
+ FILETIME ATime;
+ FILETIME MTime;
+
+ CVirtFile():
+ CTimeDefined(false),
+ ATimeDefined(false),
+ MTimeDefined(false),
+ AttribDefined(false),
+ IsDir(false),
+ IsAltStream(false) {}
+};
+
+class CVirtFileSystem:
+ public ISequentialOutStream,
+ public CMyUnknownImp
+{
+ UInt64 _totalAllocSize;
+
+ size_t _pos;
+ unsigned _numFlushed;
+ bool _fileIsOpen;
+ bool _fileMode;
+ COutFileStream *_outFileStreamSpec;
+ CMyComPtr<ISequentialOutStream> _outFileStream;
+public:
+ CObjectVector<CVirtFile> Files;
+ UInt64 MaxTotalAllocSize;
+ FString DirPrefix;
+
+ CVirtFile &AddNewFile()
+ {
+ if (!Files.IsEmpty())
+ {
+ MaxTotalAllocSize -= Files.Back().Data.Size();
+ }
+ return Files.AddNew();
+ }
+ HRESULT CloseMemFile()
+ {
+ if (_fileMode)
+ {
+ return FlushToDisk(true);
+ }
+ CVirtFile &file = Files.Back();
+ if (file.Data.Size() != file.Size)
+ {
+ file.Data.ReAlloc_KeepData((size_t)file.Size, (size_t)file.Size);
+ }
+ return S_OK;
+ }
+
+ bool IsStreamInMem() const
+ {
+ if (_fileMode)
+ return false;
+ if (Files.Size() < 1 || /* Files[0].IsAltStream || */ Files[0].IsDir)
+ return false;
+ return true;
+ }
+
+ size_t GetMemStreamWrittenSize() const { return _pos; }
+
+ CVirtFileSystem(): _outFileStreamSpec(NULL), MaxTotalAllocSize((UInt64)0 - 1) {}
+
+ void Init()
+ {
+ _totalAllocSize = 0;
+ _fileMode = false;
+ _pos = 0;
+ _numFlushed = 0;
+ _fileIsOpen = false;
+ }
+
+ HRESULT CloseFile(const FString &path);
+ HRESULT FlushToDisk(bool closeLast);
+ size_t GetPos() const { return _pos; }
+
+ MY_UNKNOWN_IMP
+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
+};
+
+#endif
+
+class CExtractCallbackImp:
+ public IExtractCallbackUI, // it includes IFolderArchiveExtractCallback
+ public IOpenCallbackUI,
+ public IFolderArchiveExtractCallback2,
+ #ifndef _SFX
+ public IFolderOperationsExtractCallback,
+ public IFolderExtractToStreamCallback,
+ public ICompressProgressInfo,
+ #endif
+ #ifndef _NO_CRYPTO
+ public ICryptoGetTextPassword,
+ #endif
+ public CMyUnknownImp
+{
+ HRESULT MessageError(const char *message, const FString &path);
+ void Add_ArchiveName_Error();
+public:
+ MY_QUERYINTERFACE_BEGIN2(IFolderArchiveExtractCallback)
+ MY_QUERYINTERFACE_ENTRY(IFolderArchiveExtractCallback2)
+ #ifndef _SFX
+ MY_QUERYINTERFACE_ENTRY(IFolderOperationsExtractCallback)
+ MY_QUERYINTERFACE_ENTRY(IFolderExtractToStreamCallback)
+ MY_QUERYINTERFACE_ENTRY(ICompressProgressInfo)
+ #endif
+ #ifndef _NO_CRYPTO
+ MY_QUERYINTERFACE_ENTRY(ICryptoGetTextPassword)
+ #endif
+ MY_QUERYINTERFACE_END
+ MY_ADDREF_RELEASE
+
+ INTERFACE_IProgress(;)
+ INTERFACE_IOpenCallbackUI(;)
+ INTERFACE_IFolderArchiveExtractCallback(;)
+ INTERFACE_IFolderArchiveExtractCallback2(;)
+ // STDMETHOD(SetTotalFiles)(UInt64 total);
+ // STDMETHOD(SetCompletedFiles)(const UInt64 *value);
+
+ INTERFACE_IExtractCallbackUI(;)
+
+ #ifndef _SFX
+ // IFolderOperationsExtractCallback
+ STDMETHOD(AskWrite)(
+ const wchar_t *srcPath,
+ Int32 srcIsFolder,
+ const FILETIME *srcTime,
+ const UInt64 *srcSize,
+ const wchar_t *destPathRequest,
+ BSTR *destPathResult,
+ Int32 *writeAnswer);
+ STDMETHOD(ShowMessage)(const wchar_t *message);
+ STDMETHOD(SetCurrentFilePath)(const wchar_t *filePath);
+ STDMETHOD(SetNumFiles)(UInt64 numFiles);
+ INTERFACE_IFolderExtractToStreamCallback(;)
+ STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
+ #endif
+
+ // ICryptoGetTextPassword
+ #ifndef _NO_CRYPTO
+ STDMETHOD(CryptoGetTextPassword)(BSTR *password);
+ #endif
+
+private:
+ UString _currentArchivePath;
+ bool _needWriteArchivePath;
+
+ UString _currentFilePath;
+ bool _isFolder;
+
+ bool _isAltStream;
+ UInt64 _curSize;
+ bool _curSizeDefined;
+ UString _filePath;
+ // bool _extractMode;
+ // bool _testMode;
+ bool _newVirtFileWasAdded;
+ bool _needUpdateStat;
+
+
+ HRESULT SetCurrentFilePath2(const wchar_t *filePath);
+ void AddError_Message(LPCWSTR message);
+
+ #ifndef _SFX
+ bool _hashStreamWasUsed;
+ COutStreamWithHash *_hashStreamSpec;
+ CMyComPtr<ISequentialOutStream> _hashStream;
+ IHashCalc *_hashCalc; // it's for stat in Test operation
+ #endif
+
+public:
+
+ #ifndef _SFX
+ CVirtFileSystem *VirtFileSystemSpec;
+ CMyComPtr<ISequentialOutStream> VirtFileSystem;
+ #endif
+
+ bool ProcessAltStreams;
+
+ bool StreamMode;
+
+ CProgressDialog *ProgressDialog;
+ #ifndef _SFX
+ UInt64 NumFolders;
+ UInt64 NumFiles;
+ bool NeedAddFile;
+ #endif
+ UInt32 NumArchiveErrors;
+ bool ThereAreMessageErrors;
+ NExtract::NOverwriteMode::EEnum OverwriteMode;
+
+ #ifndef _NO_CRYPTO
+ bool PasswordIsDefined;
+ bool PasswordWasAsked;
+ UString Password;
+ #endif
+
+
+ UString _lang_Extracting;
+ UString _lang_Testing;
+ UString _lang_Skipping;
+ UString _lang_Empty;
+
+ bool _totalFilesDefined;
+ bool _totalBytesDefined;
+ bool MultiArcMode;
+
+ CExtractCallbackImp():
+ #ifndef _NO_CRYPTO
+ PasswordIsDefined(false),
+ PasswordWasAsked(false),
+ #endif
+ OverwriteMode(NExtract::NOverwriteMode::kAsk),
+ StreamMode(false),
+ ProcessAltStreams(true),
+
+ _totalFilesDefined(false),
+ _totalBytesDefined(false),
+ MultiArcMode(false)
+
+ #ifndef _SFX
+ , _hashCalc(NULL)
+ #endif
+ {}
+
+ ~CExtractCallbackImp();
+ void Init();
+
+ #ifndef _SFX
+ void SetHashCalc(IHashCalc *hashCalc) { _hashCalc = hashCalc; }
+
+ void SetHashMethods(IHashCalc *hash)
+ {
+ if (!hash)
+ return;
+ _hashStreamSpec = new COutStreamWithHash;
+ _hashStream = _hashStreamSpec;
+ _hashStreamSpec->_hash = hash;
+ }
+ #endif
+
+ bool IsOK() const { return NumArchiveErrors == 0 && !ThereAreMessageErrors; }
+};
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp b/3rdparty/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp
new file mode 100644
index 00000000000..2143c3f1b12
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp
@@ -0,0 +1,28 @@
+// FormatUtils.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/IntToString.h"
+
+#include "FormatUtils.h"
+
+#include "LangUtils.h"
+
+UString NumberToString(UInt64 number)
+{
+ wchar_t numberString[32];
+ ConvertUInt64ToString(number, numberString);
+ return numberString;
+}
+
+UString MyFormatNew(const UString &format, const UString &argument)
+{
+ UString result = format;
+ result.Replace(L"{0}", argument);
+ return result;
+}
+
+UString MyFormatNew(UINT resourceID, const UString &argument)
+{
+ return MyFormatNew(LangString(resourceID), argument);
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/FormatUtils.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/FormatUtils.h
new file mode 100644
index 00000000000..993e803390f
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/FormatUtils.h
@@ -0,0 +1,14 @@
+// FormatUtils.h
+
+#ifndef __FORMAT_UTILS_H
+#define __FORMAT_UTILS_H
+
+#include "../../../Common/MyTypes.h"
+#include "../../../Common/MyString.h"
+
+UString NumberToString(UInt64 number);
+
+UString MyFormatNew(const UString &format, const UString &argument);
+UString MyFormatNew(UINT resourceID, const UString &argument);
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/LangUtils.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/LangUtils.h
new file mode 100644
index 00000000000..d63a443c6d3
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/LangUtils.h
@@ -0,0 +1,40 @@
+// LangUtils.h
+
+#ifndef __LANG_UTILS_H
+#define __LANG_UTILS_H
+
+#include "../../../Windows/ResourceString.h"
+
+#ifdef LANG
+
+extern UString g_LangID;
+
+struct CIDLangPair
+{
+ UInt32 ControlID;
+ UInt32 LangID;
+};
+
+void ReloadLang();
+void LoadLangOneTime();
+FString GetLangDirPrefix();
+
+void LangSetDlgItemText(HWND dialog, UInt32 controlID, UInt32 langID);
+void LangSetDlgItems(HWND dialog, const UInt32 *ids, unsigned numItems);
+void LangSetDlgItems_Colon(HWND dialog, const UInt32 *ids, unsigned numItems);
+void LangSetWindowText(HWND window, UInt32 langID);
+
+UString LangString(UInt32 langID);
+void AddLangString(UString &s, UInt32 langID);
+void LangString(UInt32 langID, UString &dest);
+void LangString_OnlyFromLangFile(UInt32 langID, UString &dest);
+
+#else
+
+inline UString LangString(UInt32 langID) { return NWindows::MyLoadString(langID); }
+inline void LangString(UInt32 langID, UString &dest) { NWindows::MyLoadString(langID, dest); }
+inline void AddLangString(UString &s, UInt32 langID) { s += NWindows::MyLoadString(langID); }
+
+#endif
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h
new file mode 100644
index 00000000000..48a95359e6f
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h
@@ -0,0 +1,76 @@
+// MyWindowsNew.h
+
+#ifndef __MY_WINDOWS_NEW_H
+#define __MY_WINDOWS_NEW_H
+
+#ifdef _MSC_VER
+
+#include <ShObjIdl.h>
+
+#ifndef __ITaskbarList3_INTERFACE_DEFINED__
+#define __ITaskbarList3_INTERFACE_DEFINED__
+
+typedef enum THUMBBUTTONFLAGS
+{
+ THBF_ENABLED = 0,
+ THBF_DISABLED = 0x1,
+ THBF_DISMISSONCLICK = 0x2,
+ THBF_NOBACKGROUND = 0x4,
+ THBF_HIDDEN = 0x8,
+ THBF_NONINTERACTIVE = 0x10
+} THUMBBUTTONFLAGS;
+
+typedef enum THUMBBUTTONMASK
+{
+ THB_BITMAP = 0x1,
+ THB_ICON = 0x2,
+ THB_TOOLTIP = 0x4,
+ THB_FLAGS = 0x8
+} THUMBBUTTONMASK;
+
+// #include <pshpack8.h>
+
+typedef struct THUMBBUTTON
+{
+ THUMBBUTTONMASK dwMask;
+ UINT iId;
+ UINT iBitmap;
+ HICON hIcon;
+ WCHAR szTip[260];
+ THUMBBUTTONFLAGS dwFlags;
+} THUMBBUTTON;
+
+typedef struct THUMBBUTTON *LPTHUMBBUTTON;
+
+typedef enum TBPFLAG
+{
+ TBPF_NOPROGRESS = 0,
+ TBPF_INDETERMINATE = 0x1,
+ TBPF_NORMAL = 0x2,
+ TBPF_ERROR = 0x4,
+ TBPF_PAUSED = 0x8
+} TBPFLAG;
+
+DEFINE_GUID(IID_ITaskbarList3, 0xEA1AFB91, 0x9E28, 0x4B86, 0x90, 0xE9, 0x9E, 0x9F, 0x8A, 0x5E, 0xEF, 0xAF);
+
+struct ITaskbarList3: public ITaskbarList2
+{
+ STDMETHOD(SetProgressValue)(HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal) = 0;
+ STDMETHOD(SetProgressState)(HWND hwnd, TBPFLAG tbpFlags) = 0;
+ STDMETHOD(RegisterTab)(HWND hwndTab, HWND hwndMDI) = 0;
+ STDMETHOD(UnregisterTab)(HWND hwndTab) = 0;
+ STDMETHOD(SetTabOrder)(HWND hwndTab, HWND hwndInsertBefore) = 0;
+ STDMETHOD(SetTabActive)(HWND hwndTab, HWND hwndMDI, DWORD dwReserved) = 0;
+ STDMETHOD(ThumbBarAddButtons)(HWND hwnd, UINT cButtons, LPTHUMBBUTTON pButton) = 0;
+ STDMETHOD(ThumbBarUpdateButtons)(HWND hwnd, UINT cButtons, LPTHUMBBUTTON pButton) = 0;
+ STDMETHOD(ThumbBarSetImageList)(HWND hwnd, HIMAGELIST himl) = 0;
+ STDMETHOD(SetOverlayIcon)(HWND hwnd, HICON hIcon, LPCWSTR pszDescription) = 0;
+ STDMETHOD(SetThumbnailTooltip)(HWND hwnd, LPCWSTR pszTip) = 0;
+ STDMETHOD(SetThumbnailClip)(HWND hwnd, RECT *prcClip) = 0;
+};
+
+#endif
+
+#endif
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp b/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp
new file mode 100644
index 00000000000..c6feb9021bb
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp
@@ -0,0 +1,119 @@
+// OverwriteDialog.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/StringConvert.h"
+
+#include "../../../Windows/PropVariantConv.h"
+#include "../../../Windows/ResourceString.h"
+
+#include "../../../Windows/Control/Static.h"
+
+#include "FormatUtils.h"
+#include "LangUtils.h"
+#include "OverwriteDialog.h"
+
+#include "PropertyNameRes.h"
+
+using namespace NWindows;
+
+#ifdef LANG
+static const UInt32 kLangIDs[] =
+{
+ IDT_OVERWRITE_HEADER,
+ IDT_OVERWRITE_QUESTION_BEGIN,
+ IDT_OVERWRITE_QUESTION_END,
+ IDB_YES_TO_ALL,
+ IDB_NO_TO_ALL,
+ IDB_AUTO_RENAME
+};
+#endif
+
+static const unsigned kCurrentFileNameSizeLimit = 82;
+static const unsigned kCurrentFileNameSizeLimit2 = 30;
+
+void COverwriteDialog::ReduceString(UString &s)
+{
+ unsigned size = _isBig ? kCurrentFileNameSizeLimit : kCurrentFileNameSizeLimit2;
+ if (s.Len() > size)
+ {
+ s.Delete(size / 2, s.Len() - size);
+ s.Insert(size / 2, L" ... ");
+ }
+}
+
+void COverwriteDialog::SetFileInfoControl(int textID, int iconID,
+ const NOverwriteDialog::CFileInfo &fileInfo)
+{
+ UString sizeString;
+ if (fileInfo.SizeIsDefined)
+ sizeString = MyFormatNew(IDS_FILE_SIZE, NumberToString(fileInfo.Size));
+
+ const UString &fileName = fileInfo.Name;
+ int slashPos = fileName.ReverseFind_PathSepar();
+ UString s1 = fileName.Left(slashPos + 1);
+ UString s2 = fileName.Ptr(slashPos + 1);
+
+ ReduceString(s1);
+ ReduceString(s2);
+
+ UString s = s1;
+ s.Add_LF();
+ s += s2;
+ s.Add_LF();
+ s += sizeString;
+ s.Add_LF();
+
+ if (fileInfo.TimeIsDefined)
+ {
+ FILETIME localFileTime;
+ if (!FileTimeToLocalFileTime(&fileInfo.Time, &localFileTime))
+ throw 4190402;
+ AddLangString(s, IDS_PROP_MTIME);
+ s += L": ";
+ wchar_t t[32];
+ ConvertFileTimeToString(localFileTime, t);
+ s += t;
+ }
+
+ NControl::CDialogChildControl control;
+ control.Init(*this, textID);
+ control.SetText(s);
+
+ SHFILEINFO shellFileInfo;
+ if (::SHGetFileInfo(
+ GetSystemString(fileInfo.Name), FILE_ATTRIBUTE_NORMAL, &shellFileInfo,
+ sizeof(shellFileInfo), SHGFI_ICON | SHGFI_USEFILEATTRIBUTES | SHGFI_LARGEICON))
+ {
+ NControl::CStatic staticContol;
+ staticContol.Attach(GetItem(iconID));
+ staticContol.SetIcon(shellFileInfo.hIcon);
+ }
+}
+
+bool COverwriteDialog::OnInit()
+{
+ #ifdef LANG
+ LangSetWindowText(*this, IDD_OVERWRITE);
+ LangSetDlgItems(*this, kLangIDs, ARRAY_SIZE(kLangIDs));
+ #endif
+ SetFileInfoControl(IDT_OVERWRITE_OLD_FILE_SIZE_TIME, IDI_OVERWRITE_OLD_FILE, OldFileInfo);
+ SetFileInfoControl(IDT_OVERWRITE_NEW_FILE_SIZE_TIME, IDI_OVERWRITE_NEW_FILE, NewFileInfo);
+ NormalizePosition();
+ return CModalDialog::OnInit();
+}
+
+bool COverwriteDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
+{
+ switch (buttonID)
+ {
+ case IDYES:
+ case IDNO:
+ case IDB_YES_TO_ALL:
+ case IDB_NO_TO_ALL:
+ case IDB_AUTO_RENAME:
+ End(buttonID);
+ return true;
+ }
+ return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h
new file mode 100644
index 00000000000..da7fa55ff68
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h
@@ -0,0 +1,69 @@
+// OverwriteDialog.h
+
+#ifndef __OVERWRITE_DIALOG_H
+#define __OVERWRITE_DIALOG_H
+
+#include "../../../Windows/Control/Dialog.h"
+
+#include "DialogSize.h"
+#include "OverwriteDialogRes.h"
+
+namespace NOverwriteDialog
+{
+ struct CFileInfo
+ {
+ bool SizeIsDefined;
+ bool TimeIsDefined;
+ UInt64 Size;
+ FILETIME Time;
+ UString Name;
+
+ void SetTime(const FILETIME *t)
+ {
+ if (t == 0)
+ TimeIsDefined = false;
+ else
+ {
+ TimeIsDefined = true;
+ Time = *t;
+ }
+ }
+ void SetSize(const UInt64 *size)
+ {
+ if (size == 0)
+ SizeIsDefined = false;
+ else
+ {
+ SizeIsDefined = true;
+ Size = *size;
+ }
+ }
+ };
+}
+
+class COverwriteDialog: public NWindows::NControl::CModalDialog
+{
+ bool _isBig;
+
+ void SetFileInfoControl(int textID, int iconID, const NOverwriteDialog::CFileInfo &fileInfo);
+ virtual bool OnInit();
+ bool OnButtonClicked(int buttonID, HWND buttonHWND);
+ void ReduceString(UString &s);
+
+public:
+ INT_PTR Create(HWND parent = 0)
+ {
+ BIG_DIALOG_SIZE(280, 200);
+ #ifdef UNDER_CE
+ _isBig = isBig;
+ #else
+ _isBig = true;
+ #endif
+ return CModalDialog::Create(SIZED_DIALOG(IDD_OVERWRITE), parent);
+ }
+
+ NOverwriteDialog::CFileInfo OldFileInfo;
+ NOverwriteDialog::CFileInfo NewFileInfo;
+};
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc b/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc
new file mode 100644
index 00000000000..29f99122bfd
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc
@@ -0,0 +1,91 @@
+#include "OverwriteDialogRes.h"
+#include "../../GuiCommon.rc"
+
+#define xc 280
+#define yc 200
+
+#undef iconSize
+#define iconSize 24
+
+#undef x
+#undef fx
+#undef fy
+#define x (m + iconSize + m)
+#define fx (xc - iconSize - m)
+#define fy 50
+
+#define bSizeBig 104
+#undef bx1
+#define bx1 (xs - m - bSizeBig)
+
+IDD_OVERWRITE DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
+CAPTION "Confirm File Replace"
+BEGIN
+ LTEXT "Destination folder already contains processed file.", IDT_OVERWRITE_HEADER, m, 7, xc, 8
+ LTEXT "Would you like to replace the existing file", IDT_OVERWRITE_QUESTION_BEGIN, m, 28, xc, 8
+
+ ICON "", IDI_OVERWRITE_OLD_FILE, m, 44, iconSize, iconSize
+ LTEXT "", IDT_OVERWRITE_OLD_FILE_SIZE_TIME, x, 44, fx, fy, SS_NOPREFIX
+
+ LTEXT "with this one?", IDT_OVERWRITE_QUESTION_END, m, 98, xc, 8
+
+ ICON "", IDI_OVERWRITE_NEW_FILE, m, 114, iconSize, iconSize
+ LTEXT "", IDT_OVERWRITE_NEW_FILE_SIZE_TIME, x, 114, fx, fy, SS_NOPREFIX
+
+ PUSHBUTTON "&Yes", IDYES, bx3, by2, bxs, bys
+ PUSHBUTTON "Yes to &All", IDB_YES_TO_ALL, bx2, by2, bxs, bys
+ PUSHBUTTON "A&uto Rename", IDB_AUTO_RENAME, bx1, by2, bSizeBig, bys
+ PUSHBUTTON "&No", IDNO, bx3, by1, bxs, bys
+ PUSHBUTTON "No to A&ll", IDB_NO_TO_ALL, bx2, by1, bxs, bys
+ PUSHBUTTON "&Cancel", IDCANCEL, xs - m - bxs, by1, bxs, bys
+END
+
+
+#ifdef UNDER_CE
+
+#undef m
+#undef xc
+#undef yc
+
+#define m 4
+#define xc 152
+#define yc 144
+
+#undef fy
+#define fy 40
+
+#undef bxs
+#define bxs 48
+
+#undef bx1
+
+#define bx1 (xs - m - bxs)
+
+IDD_OVERWRITE_2 DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
+CAPTION "Confirm File Replace"
+BEGIN
+ LTEXT "Would you like to replace the existing file", IDT_OVERWRITE_QUESTION_BEGIN, m, m, xc, 8
+
+ ICON "", IDI_OVERWRITE_OLD_FILE, m, 20, iconSize, iconSize
+ LTEXT "", IDT_OVERWRITE_OLD_FILE_SIZE_TIME, x, 20, fx, fy, SS_NOPREFIX
+
+ LTEXT "with this one?", IDT_OVERWRITE_QUESTION_END, m, 60, xc, 8
+
+ ICON "", IDI_OVERWRITE_NEW_FILE, m, 72, iconSize, iconSize
+ LTEXT "", IDT_OVERWRITE_NEW_FILE_SIZE_TIME, x, 72, fx, fy, SS_NOPREFIX
+
+ PUSHBUTTON "&Yes", IDYES, bx3, by2, bxs, bys
+ PUSHBUTTON "Yes to &All", IDB_YES_TO_ALL, bx2, by2, bxs, bys
+ PUSHBUTTON "A&uto Rename", IDB_AUTO_RENAME, bx1, by2, bxs, bys
+ PUSHBUTTON "&No", IDNO, bx3, by1, bxs, bys
+ PUSHBUTTON "No to A&ll", IDB_NO_TO_ALL, bx2, by1, bxs, bys
+ PUSHBUTTON "&Cancel", IDCANCEL, bx1, by1, bxs, bys
+END
+
+#endif
+
+
+STRINGTABLE
+BEGIN
+ IDS_FILE_SIZE "{0} bytes"
+END
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h
new file mode 100644
index 00000000000..b480ba1634c
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h
@@ -0,0 +1,17 @@
+#define IDD_OVERWRITE 3500
+#define IDD_OVERWRITE_2 13500
+
+#define IDT_OVERWRITE_HEADER 3501
+#define IDT_OVERWRITE_QUESTION_BEGIN 3502
+#define IDT_OVERWRITE_QUESTION_END 3503
+#define IDS_FILE_SIZE 3504
+
+#define IDB_AUTO_RENAME 3505
+#define IDB_YES_TO_ALL 440
+#define IDB_NO_TO_ALL 441
+
+#define IDI_OVERWRITE_OLD_FILE 100
+#define IDI_OVERWRITE_NEW_FILE 101
+
+#define IDT_OVERWRITE_OLD_FILE_SIZE_TIME 102
+#define IDT_OVERWRITE_NEW_FILE_SIZE_TIME 103
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp b/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp
new file mode 100644
index 00000000000..6ead39c3764
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp
@@ -0,0 +1,58 @@
+// PasswordDialog.cpp
+
+#include "StdAfx.h"
+
+#include "PasswordDialog.h"
+
+#ifdef LANG
+#include "LangUtils.h"
+#endif
+
+#ifdef LANG
+static const UInt32 kLangIDs[] =
+{
+ IDT_PASSWORD_ENTER,
+ IDX_PASSWORD_SHOW
+};
+#endif
+
+void CPasswordDialog::ReadControls()
+{
+ _passwordEdit.GetText(Password);
+ ShowPassword = IsButtonCheckedBool(IDX_PASSWORD_SHOW);
+}
+
+void CPasswordDialog::SetTextSpec()
+{
+ _passwordEdit.SetPasswordChar(ShowPassword ? 0: TEXT('*'));
+ _passwordEdit.SetText(Password);
+}
+
+bool CPasswordDialog::OnInit()
+{
+ #ifdef LANG
+ LangSetWindowText(*this, IDD_PASSWORD);
+ LangSetDlgItems(*this, kLangIDs, ARRAY_SIZE(kLangIDs));
+ #endif
+ _passwordEdit.Attach(GetItem(IDE_PASSWORD_PASSWORD));
+ CheckButton(IDX_PASSWORD_SHOW, ShowPassword);
+ SetTextSpec();
+ return CModalDialog::OnInit();
+}
+
+bool CPasswordDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
+{
+ if (buttonID == IDX_PASSWORD_SHOW)
+ {
+ ReadControls();
+ SetTextSpec();
+ return true;
+ }
+ return CDialog::OnButtonClicked(buttonID, buttonHWND);
+}
+
+void CPasswordDialog::OnOK()
+{
+ ReadControls();
+ CModalDialog::OnOK();
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h
new file mode 100644
index 00000000000..339ebdaf072
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h
@@ -0,0 +1,28 @@
+// PasswordDialog.h
+
+#ifndef __PASSWORD_DIALOG_H
+#define __PASSWORD_DIALOG_H
+
+#include "../../../Windows/Control/Dialog.h"
+#include "../../../Windows/Control/Edit.h"
+
+#include "PasswordDialogRes.h"
+
+class CPasswordDialog: public NWindows::NControl::CModalDialog
+{
+ NWindows::NControl::CEdit _passwordEdit;
+
+ virtual void OnOK();
+ virtual bool OnInit();
+ virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
+ void SetTextSpec();
+ void ReadControls();
+public:
+ UString Password;
+ bool ShowPassword;
+
+ CPasswordDialog(): ShowPassword(false) {}
+ INT_PTR Create(HWND parentWindow = 0) { return CModalDialog::Create(IDD_PASSWORD, parentWindow); }
+};
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc b/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc
new file mode 100644
index 00000000000..90c57efa607
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc
@@ -0,0 +1,14 @@
+#include "PasswordDialogRes.h"
+#include "../../GuiCommon.rc"
+
+#define xc 140
+#define yc 72
+
+IDD_PASSWORD DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
+CAPTION "Enter password"
+BEGIN
+ LTEXT "&Enter password:", IDT_PASSWORD_ENTER, m, m, xc, 8
+ EDITTEXT IDE_PASSWORD_PASSWORD, m, 20, xc, 14, ES_PASSWORD | ES_AUTOHSCROLL
+ CONTROL "&Show password", IDX_PASSWORD_SHOW, MY_CHECKBOX, m, 42, xc, 10
+ OK_CANCEL
+END
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h
new file mode 100644
index 00000000000..1fe32e10aa5
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h
@@ -0,0 +1,5 @@
+#define IDD_PASSWORD 3800
+#define IDT_PASSWORD_ENTER 3801
+#define IDX_PASSWORD_SHOW 3803
+
+#define IDE_PASSWORD_PASSWORD 120
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp
new file mode 100644
index 00000000000..65201a9ed16
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp
@@ -0,0 +1,196 @@
+// ProgressDialog.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/IntToString.h"
+
+#include "resource.h"
+
+#include "ProgressDialog.h"
+
+using namespace NWindows;
+
+extern HINSTANCE g_hInstance;
+
+static const UINT_PTR kTimerID = 3;
+static const UINT kTimerElapse = 100;
+
+#ifdef LANG
+#include "LangUtils.h"
+#endif
+
+HRESULT CProgressSync::ProcessStopAndPause()
+{
+ for (;;)
+ {
+ if (GetStopped())
+ return E_ABORT;
+ if (!GetPaused())
+ break;
+ ::Sleep(100);
+ }
+ return S_OK;
+}
+
+#ifndef _SFX
+CProgressDialog::~CProgressDialog()
+{
+ AddToTitle(L"");
+}
+void CProgressDialog::AddToTitle(LPCWSTR s)
+{
+ if (MainWindow != 0)
+ MySetWindowText(MainWindow, UString(s) + MainTitle);
+}
+#endif
+
+
+bool CProgressDialog::OnInit()
+{
+ _range = (UInt64)(Int64)-1;
+ _prevPercentValue = -1;
+
+ _wasCreated = true;
+ _dialogCreatedEvent.Set();
+
+ #ifdef LANG
+ LangSetDlgItems(*this, NULL, 0);
+ #endif
+
+ m_ProgressBar.Attach(GetItem(IDC_PROGRESS1));
+
+ if (IconID >= 0)
+ {
+ HICON icon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IconID));
+ SetIcon(ICON_BIG, icon);
+ }
+
+ _timer = SetTimer(kTimerID, kTimerElapse);
+ SetText(_title);
+ CheckNeedClose();
+ return CModalDialog::OnInit();
+}
+
+void CProgressDialog::OnCancel() { Sync.SetStopped(true); }
+void CProgressDialog::OnOK() { }
+
+void CProgressDialog::SetRange(UInt64 range)
+{
+ _range = range;
+ _peviousPos = (UInt64)(Int64)-1;
+ _converter.Init(range);
+ m_ProgressBar.SetRange32(0 , _converter.Count(range)); // Test it for 100%
+}
+
+void CProgressDialog::SetPos(UInt64 pos)
+{
+ bool redraw = true;
+ if (pos < _range && pos > _peviousPos)
+ {
+ UInt64 posDelta = pos - _peviousPos;
+ if (posDelta < (_range >> 10))
+ redraw = false;
+ }
+ if (redraw)
+ {
+ m_ProgressBar.SetPos(_converter.Count(pos)); // Test it for 100%
+ _peviousPos = pos;
+ }
+}
+
+bool CProgressDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */)
+{
+ if (Sync.GetPaused())
+ return true;
+
+ CheckNeedClose();
+
+ UInt64 total, completed;
+ Sync.GetProgress(total, completed);
+ if (total != _range)
+ SetRange(total);
+ SetPos(completed);
+
+ if (total == 0)
+ total = 1;
+
+ int percentValue = (int)(completed * 100 / total);
+ if (percentValue != _prevPercentValue)
+ {
+ wchar_t s[64];
+ ConvertUInt64ToString(percentValue, s);
+ UString title = s;
+ title += L"% ";
+ SetText(title + _title);
+ #ifndef _SFX
+ AddToTitle(title + MainAddTitle);
+ #endif
+ _prevPercentValue = percentValue;
+ }
+ return true;
+}
+
+bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message)
+ {
+ case kCloseMessage:
+ {
+ KillTimer(_timer);
+ _timer = 0;
+ if (_inCancelMessageBox)
+ {
+ _externalCloseMessageWasReceived = true;
+ break;
+ }
+ return OnExternalCloseMessage();
+ }
+ /*
+ case WM_SETTEXT:
+ {
+ if (_timer == 0)
+ return true;
+ }
+ */
+ }
+ return CModalDialog::OnMessage(message, wParam, lParam);
+}
+
+bool CProgressDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
+{
+ switch (buttonID)
+ {
+ case IDCANCEL:
+ {
+ bool paused = Sync.GetPaused();
+ Sync.SetPaused(true);
+ _inCancelMessageBox = true;
+ int res = ::MessageBoxW(*this, L"Are you sure you want to cancel?", _title, MB_YESNOCANCEL);
+ _inCancelMessageBox = false;
+ Sync.SetPaused(paused);
+ if (res == IDCANCEL || res == IDNO)
+ {
+ if (_externalCloseMessageWasReceived)
+ OnExternalCloseMessage();
+ return true;
+ }
+ break;
+ }
+ }
+ return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
+}
+
+void CProgressDialog::CheckNeedClose()
+{
+ if (_needClose)
+ {
+ PostMsg(kCloseMessage);
+ _needClose = false;
+ }
+}
+
+bool CProgressDialog::OnExternalCloseMessage()
+{
+ End(0);
+ return true;
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h
new file mode 100644
index 00000000000..0f41b57aed6
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h
@@ -0,0 +1,170 @@
+// ProgressDialog.h
+
+#ifndef __PROGRESS_DIALOG_H
+#define __PROGRESS_DIALOG_H
+
+#include "../../../Windows/Synchronization.h"
+#include "../../../Windows/Thread.h"
+
+#include "../../../Windows/Control/Dialog.h"
+#include "../../../Windows/Control/ProgressBar.h"
+
+#include "ProgressDialogRes.h"
+
+class CProgressSync
+{
+ NWindows::NSynchronization::CCriticalSection _cs;
+ bool _stopped;
+ bool _paused;
+ UInt64 _total;
+ UInt64 _completed;
+public:
+ CProgressSync(): _stopped(false), _paused(false), _total(1), _completed(0) {}
+
+ HRESULT ProcessStopAndPause();
+ bool GetStopped()
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ return _stopped;
+ }
+ void SetStopped(bool value)
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ _stopped = value;
+ }
+ bool GetPaused()
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ return _paused;
+ }
+ void SetPaused(bool value)
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ _paused = value;
+ }
+ void SetProgress(UInt64 total, UInt64 completed)
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ _total = total;
+ _completed = completed;
+ }
+ void SetPos(UInt64 completed)
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ _completed = completed;
+ }
+ void GetProgress(UInt64 &total, UInt64 &completed)
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ total = _total;
+ completed = _completed;
+ }
+};
+
+class CU64ToI32Converter
+{
+ UInt64 _numShiftBits;
+public:
+ void Init(UInt64 range)
+ {
+ // Windows CE doesn't like big number here.
+ for (_numShiftBits = 0; range > (1 << 15); _numShiftBits++)
+ range >>= 1;
+ }
+ int Count(UInt64 value) { return int(value >> _numShiftBits); }
+};
+
+class CProgressDialog: public NWindows::NControl::CModalDialog
+{
+private:
+ UINT_PTR _timer;
+
+ UString _title;
+ CU64ToI32Converter _converter;
+ UInt64 _peviousPos;
+ UInt64 _range;
+ NWindows::NControl::CProgressBar m_ProgressBar;
+
+ int _prevPercentValue;
+
+ bool _wasCreated;
+ bool _needClose;
+ bool _inCancelMessageBox;
+ bool _externalCloseMessageWasReceived;
+
+ bool OnTimer(WPARAM timerID, LPARAM callback);
+ void SetRange(UInt64 range);
+ void SetPos(UInt64 pos);
+ virtual bool OnInit();
+ virtual void OnCancel();
+ virtual void OnOK();
+ NWindows::NSynchronization::CManualResetEvent _dialogCreatedEvent;
+ #ifndef _SFX
+ void AddToTitle(LPCWSTR string);
+ #endif
+ bool OnButtonClicked(int buttonID, HWND buttonHWND);
+
+ void WaitCreating() { _dialogCreatedEvent.Lock(); }
+ void CheckNeedClose();
+ bool OnExternalCloseMessage();
+public:
+ CProgressSync Sync;
+ int IconID;
+
+ #ifndef _SFX
+ HWND MainWindow;
+ UString MainTitle;
+ UString MainAddTitle;
+ ~CProgressDialog();
+ #endif
+
+ CProgressDialog(): _timer(0)
+ #ifndef _SFX
+ ,MainWindow(0)
+ #endif
+ {
+ IconID = -1;
+ _wasCreated = false;
+ _needClose = false;
+ _inCancelMessageBox = false;
+ _externalCloseMessageWasReceived = false;
+
+ if (_dialogCreatedEvent.Create() != S_OK)
+ throw 1334987;
+ }
+
+ INT_PTR Create(const UString &title, NWindows::CThread &thread, HWND wndParent = 0)
+ {
+ _title = title;
+ INT_PTR res = CModalDialog::Create(IDD_PROGRESS, wndParent);
+ thread.Wait();
+ return res;
+ }
+
+ enum
+ {
+ kCloseMessage = WM_APP + 1
+ };
+
+ virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
+
+ void ProcessWasFinished()
+ {
+ WaitCreating();
+ if (_wasCreated)
+ PostMsg(kCloseMessage);
+ else
+ _needClose = true;
+ };
+};
+
+
+class CProgressCloser
+{
+ CProgressDialog *_p;
+public:
+ CProgressCloser(CProgressDialog &p) : _p(&p) {}
+ ~CProgressCloser() { _p->ProcessWasFinished(); }
+};
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc
new file mode 100644
index 00000000000..55d99233b05
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc
@@ -0,0 +1,12 @@
+#include "ProgressDialogRes.h"
+#include "../../GuiCommon.rc"
+
+#define xc 172
+#define yc 44
+
+IDD_PROGRESS DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
+CAPTION "Progress"
+BEGIN
+ PUSHBUTTON "Cancel", IDCANCEL, bx, by, bxs, bys
+ CONTROL "Progress1", IDC_PROGRESS1, "msctls_progress32", PBS_SMOOTH | WS_BORDER, m, m, xc, 14
+END
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp
new file mode 100644
index 00000000000..378ad9035c3
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp
@@ -0,0 +1,1319 @@
+// ProgressDialog2.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/IntToString.h"
+#include "../../../Common/StringConvert.h"
+
+#include "../../../Windows/Control/Static.h"
+#include "../../../Windows/ErrorMsg.h"
+
+#include "../GUI/ExtractRes.h"
+
+#include "LangUtils.h"
+
+#include "DialogSize.h"
+#include "ProgressDialog2.h"
+#include "ProgressDialog2Res.h"
+
+using namespace NWindows;
+
+extern HINSTANCE g_hInstance;
+
+static const UINT_PTR kTimerID = 3;
+
+static const UINT kCloseMessage = WM_APP + 1;
+// we can't use WM_USER, since WM_USER can be used by standard Windows procedure for Dialog
+
+static const UINT kTimerElapse =
+ #ifdef UNDER_CE
+ 500
+ #else
+ 200
+ #endif
+ ;
+
+static const UINT kCreateDelay =
+ #ifdef UNDER_CE
+ 2500
+ #else
+ 500
+ #endif
+ ;
+
+static const DWORD kPauseSleepTime = 100;
+
+#ifdef LANG
+
+static const UInt32 kLangIDs[] =
+{
+ IDT_PROGRESS_ELAPSED,
+ IDT_PROGRESS_REMAINING,
+ IDT_PROGRESS_TOTAL,
+ IDT_PROGRESS_SPEED,
+ IDT_PROGRESS_PROCESSED,
+ IDT_PROGRESS_RATIO,
+ IDT_PROGRESS_ERRORS,
+ IDB_PROGRESS_BACKGROUND,
+ IDB_PAUSE
+};
+
+static const UInt32 kLangIDs_Colon[] =
+{
+ IDT_PROGRESS_PACKED,
+ IDT_PROGRESS_FILES
+};
+
+#endif
+
+
+#define UNDEFINED_VAL ((UInt64)(Int64)-1)
+#define INIT_AS_UNDEFINED(v) v = UNDEFINED_VAL;
+#define IS_UNDEFINED_VAL(v) ((v) == UNDEFINED_VAL)
+#define IS_DEFINED_VAL(v) ((v) != UNDEFINED_VAL)
+
+CProgressSync::CProgressSync():
+ _stopped(false), _paused(false),
+ _bytesProgressMode(true),
+ _totalBytes(UNDEFINED_VAL), _completedBytes(0),
+ _totalFiles(UNDEFINED_VAL), _curFiles(0),
+ _inSize(UNDEFINED_VAL),
+ _outSize(UNDEFINED_VAL),
+ _isDir(false)
+ {}
+
+#define CHECK_STOP if (_stopped) return E_ABORT; if (!_paused) return S_OK;
+#define CRITICAL_LOCK NSynchronization::CCriticalSectionLock lock(_cs);
+
+bool CProgressSync::Get_Paused()
+{
+ CRITICAL_LOCK
+ return _paused;
+}
+
+HRESULT CProgressSync::CheckStop()
+{
+ for (;;)
+ {
+ {
+ CRITICAL_LOCK
+ CHECK_STOP
+ }
+ ::Sleep(kPauseSleepTime);
+ }
+}
+
+HRESULT CProgressSync::ScanProgress(UInt64 numFiles, UInt64 totalSize, const FString &fileName, bool isDir)
+{
+ {
+ CRITICAL_LOCK
+ _totalFiles = numFiles;
+ _totalBytes = totalSize;
+ _filePath = fs2us(fileName);
+ _isDir = isDir;
+ // _completedBytes = 0;
+ CHECK_STOP
+ }
+ return CheckStop();
+}
+
+HRESULT CProgressSync::Set_NumFilesTotal(UInt64 val)
+{
+ {
+ CRITICAL_LOCK
+ _totalFiles = val;
+ CHECK_STOP
+ }
+ return CheckStop();
+}
+
+void CProgressSync::Set_NumBytesTotal(UInt64 val)
+{
+ CRITICAL_LOCK
+ _totalBytes = val;
+}
+
+void CProgressSync::Set_NumFilesCur(UInt64 val)
+{
+ CRITICAL_LOCK
+ _curFiles = val;
+}
+
+HRESULT CProgressSync::Set_NumBytesCur(const UInt64 *val)
+{
+ {
+ CRITICAL_LOCK
+ if (val)
+ _completedBytes = *val;
+ CHECK_STOP
+ }
+ return CheckStop();
+}
+
+HRESULT CProgressSync::Set_NumBytesCur(UInt64 val)
+{
+ {
+ CRITICAL_LOCK
+ _completedBytes = val;
+ CHECK_STOP
+ }
+ return CheckStop();
+}
+
+void CProgressSync::Set_Ratio(const UInt64 *inSize, const UInt64 *outSize)
+{
+ CRITICAL_LOCK
+ if (inSize)
+ _inSize = *inSize;
+ if (outSize)
+ _outSize = *outSize;
+}
+
+void CProgressSync::Set_TitleFileName(const UString &fileName)
+{
+ CRITICAL_LOCK
+ _titleFileName = fileName;
+}
+
+void CProgressSync::Set_Status(const UString &s)
+{
+ CRITICAL_LOCK
+ _status = s;
+}
+
+HRESULT CProgressSync::Set_Status2(const UString &s, const wchar_t *path, bool isDir)
+{
+ {
+ CRITICAL_LOCK
+ _status = s;
+ if (path)
+ _filePath = path;
+ else
+ _filePath.Empty();
+ _isDir = isDir;
+ }
+ return CheckStop();
+}
+
+void CProgressSync::Set_FilePath(const wchar_t *path, bool isDir)
+{
+ CRITICAL_LOCK
+ if (path)
+ _filePath = path;
+ else
+ _filePath.Empty();
+ _isDir = isDir;
+}
+
+
+void CProgressSync::AddError_Message(const wchar_t *message)
+{
+ CRITICAL_LOCK
+ Messages.Add(message);
+}
+
+void CProgressSync::AddError_Message_Name(const wchar_t *message, const wchar_t *name)
+{
+ UString s;
+ if (name && *name != 0)
+ s += name;
+ if (message && *message != 0 )
+ {
+ if (!s.IsEmpty())
+ s.Add_LF();
+ s += message;
+ if (!s.IsEmpty() && s.Back() == L'\n')
+ s.DeleteBack();
+ }
+ AddError_Message(s);
+}
+
+void CProgressSync::AddError_Code_Name(DWORD systemError, const wchar_t *name)
+{
+ UString s = NError::MyFormatMessage(systemError);
+ if (systemError == 0)
+ s = L"Error";
+ AddError_Message_Name(s, name);
+}
+
+CProgressDialog::CProgressDialog(): _timer(0), CompressingMode(true), MainWindow(0)
+{
+ _isDir = false;
+
+ _numMessages = 0;
+ IconID = -1;
+ MessagesDisplayed = false;
+ _wasCreated = false;
+ _needClose = false;
+ _inCancelMessageBox = false;
+ _externalCloseMessageWasReceived = false;
+
+ _numPostedMessages = 0;
+ _numAutoSizeMessages = 0;
+ _errorsWereDisplayed = false;
+ _waitCloseByCancelButton = false;
+ _cancelWasPressed = false;
+ ShowCompressionInfo = true;
+ WaitMode = false;
+ if (_dialogCreatedEvent.Create() != S_OK)
+ throw 1334987;
+ if (_createDialogEvent.Create() != S_OK)
+ throw 1334987;
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
+ CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (void**)&_taskbarList);
+ if (_taskbarList)
+ _taskbarList->HrInit();
+ #endif
+}
+
+#ifndef _SFX
+
+CProgressDialog::~CProgressDialog()
+{
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
+ SetTaskbarProgressState(TBPF_NOPROGRESS);
+ #endif
+ AddToTitle(L"");
+}
+void CProgressDialog::AddToTitle(LPCWSTR s)
+{
+ if (MainWindow != 0)
+ {
+ CWindow window(MainWindow);
+ window.SetText((UString)s + MainTitle);
+ }
+}
+
+#endif
+
+
+void CProgressDialog::SetTaskbarProgressState()
+{
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
+ if (_taskbarList && _hwndForTaskbar)
+ {
+ TBPFLAG tbpFlags;
+ if (Sync.Get_Paused())
+ tbpFlags = TBPF_PAUSED;
+ else
+ tbpFlags = _errorsWereDisplayed ? TBPF_ERROR: TBPF_NORMAL;
+ SetTaskbarProgressState(tbpFlags);
+ }
+ #endif
+}
+
+static const unsigned kTitleFileNameSizeLimit = 36;
+static const unsigned kCurrentFileNameSizeLimit = 82;
+
+static void ReduceString(UString &s, unsigned size)
+{
+ if (s.Len() <= size)
+ return;
+ s.Delete(size / 2, s.Len() - size);
+ s.Insert(size / 2, L" ... ");
+}
+
+void CProgressDialog::EnableErrorsControls(bool enable)
+{
+ ShowItem_Bool(IDT_PROGRESS_ERRORS, enable);
+ ShowItem_Bool(IDT_PROGRESS_ERRORS_VAL, enable);
+ ShowItem_Bool(IDL_PROGRESS_MESSAGES, enable);
+}
+
+bool CProgressDialog::OnInit()
+{
+ _hwndForTaskbar = MainWindow;
+ if (!_hwndForTaskbar)
+ _hwndForTaskbar = GetParent();
+ if (!_hwndForTaskbar)
+ _hwndForTaskbar = *this;
+
+ INIT_AS_UNDEFINED(_progressBar_Range);
+ INIT_AS_UNDEFINED(_progressBar_Pos);
+
+ INIT_AS_UNDEFINED(_prevPercentValue);
+ INIT_AS_UNDEFINED(_prevElapsedSec);
+ INIT_AS_UNDEFINED(_prevRemainingSec);
+
+ INIT_AS_UNDEFINED(_prevSpeed);
+ _prevSpeed_MoveBits = 0;
+
+ _prevTime = ::GetTickCount();
+ _elapsedTime = 0;
+
+ INIT_AS_UNDEFINED(_totalBytes_Prev);
+ INIT_AS_UNDEFINED(_processed_Prev);
+ INIT_AS_UNDEFINED(_packed_Prev);
+ INIT_AS_UNDEFINED(_ratio_Prev);
+ _filesStr_Prev.Empty();
+
+ _foreground = true;
+
+ m_ProgressBar.Attach(GetItem(IDC_PROGRESS1));
+ _messageList.Attach(GetItem(IDL_PROGRESS_MESSAGES));
+ _messageList.SetUnicodeFormat();
+
+ _wasCreated = true;
+ _dialogCreatedEvent.Set();
+
+ #ifdef LANG
+ LangSetDlgItems(*this, kLangIDs, ARRAY_SIZE(kLangIDs));
+ LangSetDlgItems_Colon(*this, kLangIDs_Colon, ARRAY_SIZE(kLangIDs_Colon));
+ #endif
+
+ CWindow window(GetItem(IDB_PROGRESS_BACKGROUND));
+ window.GetText(_background_String);
+ _backgrounded_String = _background_String;
+ _backgrounded_String.RemoveChar(L'&');
+
+ window = GetItem(IDB_PAUSE);
+ window.GetText(_pause_String);
+
+ LangString(IDS_PROGRESS_FOREGROUND, _foreground_String);
+ LangString(IDS_CONTINUE, _continue_String);
+ LangString(IDS_PROGRESS_PAUSED, _paused_String);
+
+ SetText(_title);
+ SetPauseText();
+ SetPriorityText();
+
+ _messageList.InsertColumn(0, L"", 30);
+ _messageList.InsertColumn(1, L"", 600);
+
+ _messageList.SetColumnWidthAuto(0);
+ _messageList.SetColumnWidthAuto(1);
+
+ EnableErrorsControls(false);
+
+ GetItemSizes(IDCANCEL, _buttonSizeX, _buttonSizeY);
+ _numReduceSymbols = kCurrentFileNameSizeLimit;
+ NormalizeSize(true);
+
+ if (!ShowCompressionInfo)
+ {
+ HideItem(IDT_PROGRESS_PACKED);
+ HideItem(IDT_PROGRESS_PACKED_VAL);
+ HideItem(IDT_PROGRESS_RATIO);
+ HideItem(IDT_PROGRESS_RATIO_VAL);
+ }
+
+ if (IconID >= 0)
+ {
+ HICON icon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IconID));
+ // SetIcon(ICON_SMALL, icon);
+ SetIcon(ICON_BIG, icon);
+ }
+ _timer = SetTimer(kTimerID, kTimerElapse);
+ #ifdef UNDER_CE
+ Foreground();
+ #endif
+
+ CheckNeedClose();
+
+ SetTaskbarProgressState();
+
+ return CModalDialog::OnInit();
+}
+
+static const UINT kIDs[] =
+{
+ IDT_PROGRESS_ELAPSED, IDT_PROGRESS_ELAPSED_VAL,
+ IDT_PROGRESS_REMAINING, IDT_PROGRESS_REMAINING_VAL,
+ IDT_PROGRESS_FILES, IDT_PROGRESS_FILES_VAL,
+ IDT_PROGRESS_RATIO, IDT_PROGRESS_RATIO_VAL,
+ IDT_PROGRESS_ERRORS, IDT_PROGRESS_ERRORS_VAL,
+
+ IDT_PROGRESS_TOTAL, IDT_PROGRESS_TOTAL_VAL,
+ IDT_PROGRESS_SPEED, IDT_PROGRESS_SPEED_VAL,
+ IDT_PROGRESS_PROCESSED, IDT_PROGRESS_PROCESSED_VAL,
+ IDT_PROGRESS_PACKED, IDT_PROGRESS_PACKED_VAL
+};
+
+bool CProgressDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
+{
+ int sY;
+ int sStep;
+ int mx, my;
+ {
+ RECT r;
+ GetClientRectOfItem(IDT_PROGRESS_ELAPSED, r);
+ mx = r.left;
+ my = r.top;
+ sY = RECT_SIZE_Y(r);
+ GetClientRectOfItem(IDT_PROGRESS_REMAINING, r);
+ sStep = r.top - my;
+ }
+
+ InvalidateRect(NULL);
+
+ int xSizeClient = xSize - mx * 2;
+
+ {
+ int i;
+ for (i = 800; i > 40; i = i * 9 / 10)
+ if (Units_To_Pixels_X(i) <= xSizeClient)
+ break;
+ _numReduceSymbols = i / 4;
+ }
+
+ int yPos = ySize - my - _buttonSizeY;
+
+ ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_STATUS), xSize - mx * 2);
+ ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_FILE_NAME), xSize - mx * 2);
+ ChangeSubWindowSizeX(GetItem(IDC_PROGRESS1), xSize - mx * 2);
+
+ int bSizeX = _buttonSizeX;
+ int mx2 = mx;
+ for (;; mx2--)
+ {
+ int bSize2 = bSizeX * 3 + mx2 * 2;
+ if (bSize2 <= xSizeClient)
+ break;
+ if (mx2 < 5)
+ {
+ bSizeX = (xSizeClient - mx2 * 2) / 3;
+ break;
+ }
+ }
+ if (bSizeX < 2)
+ bSizeX = 2;
+
+ {
+ RECT r;
+ GetClientRectOfItem(IDL_PROGRESS_MESSAGES, r);
+ int y = r.top;
+ int ySize2 = yPos - my - y;
+ const int kMinYSize = _buttonSizeY + _buttonSizeY * 3 / 4;
+ int xx = xSize - mx * 2;
+ if (ySize2 < kMinYSize)
+ {
+ ySize2 = kMinYSize;
+ if (xx > bSizeX * 2)
+ xx -= bSizeX;
+ }
+
+ _messageList.Move(mx, y, xx, ySize2);
+ }
+
+ {
+ int xPos = xSize - mx;
+ xPos -= bSizeX;
+ MoveItem(IDCANCEL, xPos, yPos, bSizeX, _buttonSizeY);
+ xPos -= (mx2 + bSizeX);
+ MoveItem(IDB_PAUSE, xPos, yPos, bSizeX, _buttonSizeY);
+ xPos -= (mx2 + bSizeX);
+ MoveItem(IDB_PROGRESS_BACKGROUND, xPos, yPos, bSizeX, _buttonSizeY);
+ }
+
+ int valueSize;
+ int labelSize;
+ int padSize;
+
+ labelSize = Units_To_Pixels_X(MY_PROGRESS_LABEL_UNITS_MIN);
+ valueSize = Units_To_Pixels_X(MY_PROGRESS_VAL_UNITS);
+ padSize = Units_To_Pixels_X(MY_PROGRESS_PAD_UNITS);
+ int requiredSize = (labelSize + valueSize) * 2 + padSize;
+
+ int gSize;
+ {
+ if (requiredSize < xSizeClient)
+ {
+ int incr = (xSizeClient - requiredSize) / 3;
+ labelSize += incr;
+ }
+ else
+ labelSize = (xSizeClient - valueSize * 2 - padSize) / 2;
+ if (labelSize < 0)
+ labelSize = 0;
+
+ gSize = labelSize + valueSize;
+ padSize = xSizeClient - gSize * 2;
+ }
+
+ labelSize = gSize - valueSize;
+
+ yPos = my;
+ for (int i = 0; i < ARRAY_SIZE(kIDs); i += 2)
+ {
+ int x = mx;
+ const int kNumColumn1Items = 5 * 2;
+ if (i >= kNumColumn1Items)
+ {
+ if (i == kNumColumn1Items)
+ yPos = my;
+ x = mx + gSize + padSize;
+ }
+ MoveItem(kIDs[i], x, yPos, labelSize, sY);
+ MoveItem(kIDs[i + 1], x + labelSize, yPos, valueSize, sY);
+ yPos += sStep;
+ }
+ return false;
+}
+
+void CProgressDialog::OnCancel() { Sync.Set_Stopped(true); }
+void CProgressDialog::OnOK() { }
+
+void CProgressDialog::SetProgressRange(UInt64 range)
+{
+ if (range == _progressBar_Range)
+ return;
+ _progressBar_Range = range;
+ INIT_AS_UNDEFINED(_progressBar_Pos);
+ _progressConv.Init(range);
+ m_ProgressBar.SetRange32(0, _progressConv.Count(range));
+}
+
+void CProgressDialog::SetProgressPos(UInt64 pos)
+{
+ if (pos >= _progressBar_Range ||
+ pos <= _progressBar_Pos ||
+ pos - _progressBar_Pos >= (_progressBar_Range >> 10))
+ {
+ m_ProgressBar.SetPos(_progressConv.Count(pos));
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
+ if (_taskbarList && _hwndForTaskbar)
+ _taskbarList->SetProgressValue(_hwndForTaskbar, pos, _progressBar_Range);
+ #endif
+ _progressBar_Pos = pos;
+ }
+}
+
+#define UINT_TO_STR_2(val) { s[0] = (wchar_t)('0' + (val) / 10); s[1] = (wchar_t)('0' + (val) % 10); s += 2; }
+
+void GetTimeString(UInt64 timeValue, wchar_t *s)
+{
+ UInt64 hours = timeValue / 3600;
+ UInt32 seconds = (UInt32)(timeValue - hours * 3600);
+ UInt32 minutes = seconds / 60;
+ seconds %= 60;
+ if (hours > 99)
+ {
+ ConvertUInt64ToString(hours, s);
+ for (; *s != 0; s++);
+ }
+ else
+ {
+ UInt32 hours32 = (UInt32)hours;
+ UINT_TO_STR_2(hours32);
+ }
+ *s++ = ':'; UINT_TO_STR_2(minutes);
+ *s++ = ':'; UINT_TO_STR_2(seconds);
+ *s = 0;
+}
+
+static void ConvertSizeToString(UInt64 v, wchar_t *s)
+{
+ Byte c = 0;
+ if (v >= ((UInt64)100000 << 20)) { v >>= 30; c = 'G'; }
+ else if (v >= ((UInt64)100000 << 10)) { v >>= 20; c = 'M'; }
+ else if (v >= ((UInt64)100000 << 0)) { v >>= 10; c = 'K'; }
+ ConvertUInt64ToString(v, s);
+ if (c != 0)
+ {
+ s += MyStringLen(s);
+ *s++ = ' ';
+ *s++ = c;
+ *s++ = 0;
+ }
+}
+
+void CProgressDialog::ShowSize(int id, UInt64 val, UInt64 &prev)
+{
+ if (val == prev)
+ return;
+ prev = val;
+ wchar_t s[40];
+ s[0] = 0;
+ if (IS_DEFINED_VAL(val))
+ ConvertSizeToString(val, s);
+ SetItemText(id, s);
+}
+
+static void GetChangedString(const UString &newStr, UString &prevStr, bool &hasChanged)
+{
+ hasChanged = !(prevStr == newStr);
+ if (hasChanged)
+ prevStr = newStr;
+}
+
+static unsigned GetPower32(UInt32 val)
+{
+ const unsigned kStart = 32;
+ UInt32 mask = ((UInt32)1 << (kStart - 1));
+ for (unsigned i = kStart;; i--)
+ {
+ if (i == 0 || (val & mask) != 0)
+ return i;
+ mask >>= 1;
+ }
+}
+
+static unsigned GetPower64(UInt64 val)
+{
+ UInt32 high = (UInt32)(val >> 32);
+ if (high == 0)
+ return GetPower32((UInt32)val);
+ return GetPower32(high) + 32;
+}
+
+static UInt64 MyMultAndDiv(UInt64 mult1, UInt64 mult2, UInt64 divider)
+{
+ unsigned pow1 = GetPower64(mult1);
+ unsigned pow2 = GetPower64(mult2);
+ while (pow1 + pow2 > 64)
+ {
+ if (pow1 > pow2) { pow1--; mult1 >>= 1; }
+ else { pow2--; mult2 >>= 1; }
+ divider >>= 1;
+ }
+ UInt64 res = mult1 * mult2;
+ if (divider != 0)
+ res /= divider;
+ return res;
+}
+
+void CProgressDialog::UpdateStatInfo(bool showAll)
+{
+ UInt64 total, completed, totalFiles, completedFiles, inSize, outSize;
+ bool bytesProgressMode;
+
+ bool titleFileName_Changed;
+ bool curFilePath_Changed;
+ bool status_Changed;
+ unsigned numErrors;
+ {
+ NSynchronization::CCriticalSectionLock lock(Sync._cs);
+ total = Sync._totalBytes;
+ completed = Sync._completedBytes;
+ totalFiles = Sync._totalFiles;
+ completedFiles = Sync._curFiles;
+ inSize = Sync._inSize;
+ outSize = Sync._outSize;
+ bytesProgressMode = Sync._bytesProgressMode;
+
+ GetChangedString(Sync._titleFileName, _titleFileName, titleFileName_Changed);
+ GetChangedString(Sync._filePath, _filePath, curFilePath_Changed);
+ GetChangedString(Sync._status, _status, status_Changed);
+ if (_isDir != Sync._isDir)
+ {
+ curFilePath_Changed = true;
+ _isDir = Sync._isDir;
+ }
+ numErrors = Sync.Messages.Size();
+ }
+
+ UInt32 curTime = ::GetTickCount();
+
+ const UInt64 progressTotal = bytesProgressMode ? total : totalFiles;
+ const UInt64 progressCompleted = bytesProgressMode ? completed : completedFiles;
+ {
+ if (IS_UNDEFINED_VAL(progressTotal))
+ {
+ // SetPos(0);
+ // SetRange(progressCompleted);
+ }
+ else
+ {
+ if (_progressBar_Pos != 0 || progressCompleted != 0 ||
+ (_progressBar_Range == 0 && progressTotal != 0))
+ {
+ SetProgressRange(progressTotal);
+ SetProgressPos(progressCompleted);
+ }
+ }
+ }
+
+ ShowSize(IDT_PROGRESS_TOTAL_VAL, total, _totalBytes_Prev);
+
+ _elapsedTime += (curTime - _prevTime);
+ _prevTime = curTime;
+ UInt64 elapsedSec = _elapsedTime / 1000;
+ bool elapsedChanged = false;
+ if (elapsedSec != _prevElapsedSec)
+ {
+ _prevElapsedSec = elapsedSec;
+ elapsedChanged = true;
+ wchar_t s[40];
+ GetTimeString(elapsedSec, s);
+ SetItemText(IDT_PROGRESS_ELAPSED_VAL, s);
+ }
+
+ bool needSetTitle = false;
+ if (elapsedChanged || showAll)
+ {
+ if (numErrors > _numPostedMessages)
+ {
+ UpdateMessagesDialog();
+ wchar_t s[32];
+ ConvertUInt64ToString(numErrors, s);
+ SetItemText(IDT_PROGRESS_ERRORS_VAL, s);
+ if (!_errorsWereDisplayed)
+ {
+ _errorsWereDisplayed = true;
+ EnableErrorsControls(true);
+ SetTaskbarProgressState();
+ }
+ }
+
+ if (progressCompleted != 0)
+ {
+ if (IS_UNDEFINED_VAL(progressTotal))
+ {
+ if (IS_DEFINED_VAL(_prevRemainingSec))
+ {
+ INIT_AS_UNDEFINED(_prevRemainingSec);
+ SetItemText(IDT_PROGRESS_REMAINING_VAL, L"");
+ }
+ }
+ else
+ {
+ UInt64 remainingTime = 0;
+ if (progressCompleted < progressTotal)
+ remainingTime = MyMultAndDiv(_elapsedTime, progressTotal - progressCompleted, progressCompleted);
+ UInt64 remainingSec = remainingTime / 1000;
+ if (remainingSec != _prevRemainingSec)
+ {
+ _prevRemainingSec = remainingSec;
+ wchar_t s[40];
+ GetTimeString(remainingSec, s);
+ SetItemText(IDT_PROGRESS_REMAINING_VAL, s);
+ }
+ }
+ {
+ UInt64 elapsedTime = (_elapsedTime == 0) ? 1 : _elapsedTime;
+ UInt64 v = (progressCompleted * 1000) / elapsedTime;
+ Byte c = 0;
+ unsigned moveBits = 0;
+ if (v >= ((UInt64)10000 << 10)) { moveBits = 20; c = 'M'; }
+ else if (v >= ((UInt64)10000 << 0)) { moveBits = 10; c = 'K'; }
+ v >>= moveBits;
+ if (moveBits != _prevSpeed_MoveBits || v != _prevSpeed)
+ {
+ _prevSpeed_MoveBits = moveBits;
+ _prevSpeed = v;
+ wchar_t s[40];
+ ConvertUInt64ToString(v, s);
+ unsigned pos = MyStringLen(s);
+ s[pos++] = ' ';
+ if (moveBits != 0)
+ s[pos++] = c;
+ s[pos++] = 'B';
+ s[pos++] = '/';
+ s[pos++] = 's';
+ s[pos++] = 0;
+ SetItemText(IDT_PROGRESS_SPEED_VAL, s);
+ }
+ }
+ }
+
+ {
+ UInt64 percent = 0;
+ {
+ if (IS_DEFINED_VAL(progressTotal))
+ {
+ percent = progressCompleted * 100;
+ if (progressTotal != 0)
+ percent /= progressTotal;
+ }
+ }
+ if (percent != _prevPercentValue)
+ {
+ _prevPercentValue = percent;
+ needSetTitle = true;
+ }
+ }
+
+ {
+ wchar_t s[64];
+ ConvertUInt64ToString(completedFiles, s);
+ if (IS_DEFINED_VAL(totalFiles))
+ {
+ wcscat(s, L" / ");
+ ConvertUInt64ToString(totalFiles, s + wcslen(s));
+ }
+ if (_filesStr_Prev != s)
+ {
+ _filesStr_Prev = s;
+ SetItemText(IDT_PROGRESS_FILES_VAL, s);
+ }
+ }
+
+ const UInt64 packSize = CompressingMode ? outSize : inSize;
+ const UInt64 unpackSize = CompressingMode ? inSize : outSize;
+
+ if (IS_UNDEFINED_VAL(unpackSize) &&
+ IS_UNDEFINED_VAL(packSize))
+ {
+ ShowSize(IDT_PROGRESS_PROCESSED_VAL, completed, _processed_Prev);
+ ShowSize(IDT_PROGRESS_PACKED_VAL, UNDEFINED_VAL, _packed_Prev);
+ }
+ else
+ {
+ ShowSize(IDT_PROGRESS_PROCESSED_VAL, unpackSize, _processed_Prev);
+ ShowSize(IDT_PROGRESS_PACKED_VAL, packSize, _packed_Prev);
+
+ if (IS_DEFINED_VAL(packSize) &&
+ IS_DEFINED_VAL(unpackSize) &&
+ unpackSize != 0)
+ {
+ wchar_t s[32];
+ UInt64 ratio = packSize * 100 / unpackSize;
+ if (_ratio_Prev != ratio)
+ {
+ _ratio_Prev = ratio;
+ ConvertUInt64ToString(ratio, s);
+ wcscat(s, L"%");
+ SetItemText(IDT_PROGRESS_RATIO_VAL, s);
+ }
+ }
+ }
+ }
+
+ if (needSetTitle || titleFileName_Changed)
+ SetTitleText();
+
+ if (status_Changed)
+ {
+ UString s = _status;
+ ReduceString(s, _numReduceSymbols);
+ SetItemText(IDT_PROGRESS_STATUS, _status);
+ }
+
+ if (curFilePath_Changed)
+ {
+ UString s1, s2;
+ if (_isDir)
+ s1 = _filePath;
+ else
+ {
+ int slashPos = _filePath.ReverseFind_PathSepar();
+ if (slashPos >= 0)
+ {
+ s1.SetFrom(_filePath, slashPos + 1);
+ s2 = _filePath.Ptr(slashPos + 1);
+ }
+ else
+ s2 = _filePath;
+ }
+ ReduceString(s1, _numReduceSymbols);
+ ReduceString(s2, _numReduceSymbols);
+ s1.Add_LF();
+ s1 += s2;
+ SetItemText(IDT_PROGRESS_FILE_NAME, s1);
+ }
+}
+
+bool CProgressDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */)
+{
+ if (Sync.Get_Paused())
+ return true;
+ CheckNeedClose();
+ UpdateStatInfo(false);
+ return true;
+}
+
+struct CWaitCursor
+{
+ HCURSOR _waitCursor;
+ HCURSOR _oldCursor;
+ CWaitCursor()
+ {
+ _waitCursor = LoadCursor(NULL, IDC_WAIT);
+ if (_waitCursor != NULL)
+ _oldCursor = SetCursor(_waitCursor);
+ }
+ ~CWaitCursor()
+ {
+ if (_waitCursor != NULL)
+ SetCursor(_oldCursor);
+ }
+};
+
+INT_PTR CProgressDialog::Create(const UString &title, NWindows::CThread &thread, HWND wndParent)
+{
+ INT_PTR res = 0;
+ try
+ {
+ if (WaitMode)
+ {
+ CWaitCursor waitCursor;
+ HANDLE h[] = { thread, _createDialogEvent };
+
+ WRes res = WaitForMultipleObjects(ARRAY_SIZE(h), h, FALSE, kCreateDelay);
+ if (res == WAIT_OBJECT_0 && !Sync.ThereIsMessage())
+ return 0;
+ }
+ _title = title;
+ BIG_DIALOG_SIZE(360, 192);
+ res = CModalDialog::Create(SIZED_DIALOG(IDD_PROGRESS), wndParent);
+ }
+ catch(...)
+ {
+ _wasCreated = true;
+ _dialogCreatedEvent.Set();
+ res = res;
+ }
+ thread.Wait();
+ if (!MessagesDisplayed)
+ MessageBoxW(wndParent, L"Progress Error", L"7-Zip", MB_ICONERROR);
+ return res;
+}
+
+bool CProgressDialog::OnExternalCloseMessage()
+{
+ // it doesn't work if there is MessageBox.
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
+ SetTaskbarProgressState(TBPF_NOPROGRESS);
+ #endif
+ // AddToTitle(L"Finished ");
+ // SetText(L"Finished2 ");
+
+ UpdateStatInfo(true);
+
+ SetItemText(IDCANCEL, LangString(IDS_CLOSE));
+ ::SendMessage(GetItem(IDCANCEL), BM_SETSTYLE, BS_DEFPUSHBUTTON, MAKELPARAM(TRUE, 0));
+ HideItem(IDB_PROGRESS_BACKGROUND);
+ HideItem(IDB_PAUSE);
+
+ bool thereAreMessages;
+ CProgressFinalMessage fm;
+ {
+ NSynchronization::CCriticalSectionLock lock(Sync._cs);
+ thereAreMessages = !Sync.Messages.IsEmpty();
+ fm = Sync.FinalMessage;
+ }
+ if (!fm.ErrorMessage.Message.IsEmpty())
+ {
+ MessagesDisplayed = true;
+ if (fm.ErrorMessage.Title.IsEmpty())
+ fm.ErrorMessage.Title = L"7-Zip";
+ MessageBoxW(*this, fm.ErrorMessage.Message, fm.ErrorMessage.Title, MB_ICONERROR);
+ }
+ else if (!thereAreMessages)
+ {
+ MessagesDisplayed = true;
+ if (!fm.OkMessage.Message.IsEmpty())
+ {
+ if (fm.OkMessage.Title.IsEmpty())
+ fm.OkMessage.Title = L"7-Zip";
+ MessageBoxW(*this, fm.OkMessage.Message, fm.OkMessage.Title, MB_OK);
+ }
+ }
+
+ if (thereAreMessages && !_cancelWasPressed)
+ {
+ _waitCloseByCancelButton = true;
+ UpdateMessagesDialog();
+ return true;
+ }
+
+ End(0);
+ return true;
+}
+
+bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message)
+ {
+ case kCloseMessage:
+ {
+ KillTimer(_timer);
+ _timer = 0;
+ if (_inCancelMessageBox)
+ {
+ _externalCloseMessageWasReceived = true;
+ break;
+ }
+ return OnExternalCloseMessage();
+ }
+ /*
+ case WM_SETTEXT:
+ {
+ if (_timer == 0)
+ return true;
+ break;
+ }
+ */
+ }
+ return CModalDialog::OnMessage(message, wParam, lParam);
+}
+
+void CProgressDialog::SetTitleText()
+{
+ UString s;
+ if (Sync.Get_Paused())
+ {
+ s += _paused_String;
+ s.Add_Space();
+ }
+ if (IS_DEFINED_VAL(_prevPercentValue))
+ {
+ char temp[32];
+ ConvertUInt64ToString(_prevPercentValue, temp);
+ s.AddAscii(temp);
+ s += L'%';
+ }
+ if (!_foreground)
+ {
+ s.Add_Space();
+ s += _backgrounded_String;
+ }
+
+ s.Add_Space();
+ #ifndef _SFX
+ {
+ unsigned len = s.Len();
+ s += MainAddTitle;
+ AddToTitle(s);
+ s.DeleteFrom(len);
+ }
+ #endif
+
+ s += _title;
+ if (!_titleFileName.IsEmpty())
+ {
+ UString fileName = _titleFileName;
+ ReduceString(fileName, kTitleFileNameSizeLimit);
+ s.Add_Space();
+ s += fileName;
+ }
+ SetText(s);
+}
+
+void CProgressDialog::SetPauseText()
+{
+ SetItemText(IDB_PAUSE, Sync.Get_Paused() ? _continue_String : _pause_String);
+ SetTitleText();
+}
+
+void CProgressDialog::OnPauseButton()
+{
+ bool paused = !Sync.Get_Paused();
+ Sync.Set_Paused(paused);
+ UInt32 curTime = ::GetTickCount();
+ if (paused)
+ _elapsedTime += (curTime - _prevTime);
+ SetTaskbarProgressState();
+ _prevTime = curTime;
+ SetPauseText();
+}
+
+void CProgressDialog::SetPriorityText()
+{
+ SetItemText(IDB_PROGRESS_BACKGROUND, _foreground ?
+ _background_String :
+ _foreground_String);
+ SetTitleText();
+}
+
+void CProgressDialog::OnPriorityButton()
+{
+ _foreground = !_foreground;
+ #ifndef UNDER_CE
+ SetPriorityClass(GetCurrentProcess(), _foreground ? NORMAL_PRIORITY_CLASS: IDLE_PRIORITY_CLASS);
+ #endif
+ SetPriorityText();
+}
+
+void CProgressDialog::AddMessageDirect(LPCWSTR message, bool needNumber)
+{
+ int itemIndex = _messageList.GetItemCount();
+ wchar_t sz[16];
+ sz[0] = 0;
+ if (needNumber)
+ ConvertUInt32ToString(_numMessages + 1, sz);
+ _messageList.InsertItem(itemIndex, sz);
+ _messageList.SetSubItem(itemIndex, 1, message);
+}
+
+void CProgressDialog::AddMessage(LPCWSTR message)
+{
+ UString s = message;
+ bool needNumber = true;
+ while (!s.IsEmpty())
+ {
+ int pos = s.Find(L'\n');
+ if (pos < 0)
+ break;
+ AddMessageDirect(s.Left(pos), needNumber);
+ needNumber = false;
+ s.DeleteFrontal(pos + 1);
+ }
+ AddMessageDirect(s, needNumber);
+ _numMessages++;
+}
+
+static unsigned GetNumDigits(UInt32 val)
+{
+ unsigned i;
+ for (i = 0; val >= 10; i++)
+ val /= 10;
+ return i;
+}
+
+void CProgressDialog::UpdateMessagesDialog()
+{
+ UStringVector messages;
+ {
+ NSynchronization::CCriticalSectionLock lock(Sync._cs);
+ unsigned num = Sync.Messages.Size();
+ if (num > _numPostedMessages)
+ {
+ messages.ClearAndReserve(num - _numPostedMessages);
+ for (unsigned i = _numPostedMessages; i < num; i++)
+ messages.AddInReserved(Sync.Messages[i]);
+ _numPostedMessages = num;
+ }
+ }
+ if (!messages.IsEmpty())
+ {
+ FOR_VECTOR (i, messages)
+ AddMessage(messages[i]);
+ if (_numAutoSizeMessages < 256 || GetNumDigits(_numPostedMessages) > GetNumDigits(_numAutoSizeMessages))
+ {
+ _messageList.SetColumnWidthAuto(0);
+ _messageList.SetColumnWidthAuto(1);
+ _numAutoSizeMessages = _numPostedMessages;
+ }
+ }
+}
+
+
+bool CProgressDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
+{
+ switch (buttonID)
+ {
+ // case IDOK: // if IDCANCEL is not DEFPUSHBUTTON
+ case IDCANCEL:
+ {
+ if (_waitCloseByCancelButton)
+ {
+ MessagesDisplayed = true;
+ End(IDCLOSE);
+ break;
+ }
+
+ bool paused = Sync.Get_Paused();
+ if (!paused)
+ OnPauseButton();
+ _inCancelMessageBox = true;
+ int res = ::MessageBoxW(*this, LangString(IDS_PROGRESS_ASK_CANCEL), _title, MB_YESNOCANCEL);
+ _inCancelMessageBox = false;
+ if (!paused)
+ OnPauseButton();
+ if (res == IDCANCEL || res == IDNO)
+ {
+ if (_externalCloseMessageWasReceived)
+ OnExternalCloseMessage();
+ return true;
+ }
+
+ _cancelWasPressed = true;
+ MessagesDisplayed = true;
+ break;
+ }
+
+ case IDB_PAUSE:
+ OnPauseButton();
+ return true;
+ case IDB_PROGRESS_BACKGROUND:
+ OnPriorityButton();
+ return true;
+ }
+ return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
+}
+
+void CProgressDialog::CheckNeedClose()
+{
+ if (_needClose)
+ {
+ PostMsg(kCloseMessage);
+ _needClose = false;
+ }
+}
+
+void CProgressDialog::ProcessWasFinished()
+{
+ // Set Window title here.
+ if (!WaitMode)
+ WaitCreating();
+
+ if (_wasCreated)
+ PostMsg(kCloseMessage);
+ else
+ _needClose = true;
+}
+
+
+HRESULT CProgressThreadVirt::Create(const UString &title, HWND parentWindow)
+{
+ NWindows::CThread thread;
+ RINOK(thread.Create(MyThreadFunction, this));
+ ProgressDialog.Create(title, thread, parentWindow);
+ return S_OK;
+}
+
+static void AddMessageToString(UString &dest, const UString &src)
+{
+ if (!src.IsEmpty())
+ {
+ if (!dest.IsEmpty())
+ dest.Add_LF();
+ dest += src;
+ }
+}
+
+void CProgressThreadVirt::Process()
+{
+ CProgressCloser closer(ProgressDialog);
+ UString m;
+ try { Result = ProcessVirt(); }
+ catch(const wchar_t *s) { m = s; }
+ catch(const UString &s) { m = s; }
+ catch(const char *s) { m = GetUnicodeString(s); }
+ catch(int v)
+ {
+ wchar_t s[16];
+ ConvertUInt32ToString(v, s);
+ m = L"Error #";
+ m += s;
+ }
+ catch(...) { m = L"Error"; }
+ if (Result != E_ABORT)
+ {
+ if (m.IsEmpty() && Result != S_OK)
+ m = HResultToMessage(Result);
+ }
+ AddMessageToString(m, FinalMessage.ErrorMessage.Message);
+
+ {
+ FOR_VECTOR(i, ErrorPaths)
+ {
+ if (i >= 32)
+ break;
+ AddMessageToString(m, fs2us(ErrorPaths[i]));
+ }
+ }
+
+ CProgressSync &sync = ProgressDialog.Sync;
+ NSynchronization::CCriticalSectionLock lock(sync._cs);
+ if (m.IsEmpty())
+ {
+ if (!FinalMessage.OkMessage.Message.IsEmpty())
+ sync.FinalMessage.OkMessage = FinalMessage.OkMessage;
+ }
+ else
+ {
+ sync.FinalMessage.ErrorMessage.Message = m;
+ if (Result == S_OK)
+ Result = E_FAIL;
+ }
+}
+
+UString HResultToMessage(HRESULT errorCode)
+{
+ if (errorCode == E_OUTOFMEMORY)
+ return LangString(IDS_MEM_ERROR);
+ else
+ return NError::MyFormatMessage(errorCode);
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h
new file mode 100644
index 00000000000..03f836da219
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h
@@ -0,0 +1,313 @@
+// ProgressDialog2.h
+
+#ifndef __PROGRESS_DIALOG_2_H
+#define __PROGRESS_DIALOG_2_H
+
+#include "../../../Common/MyCom.h"
+
+#include "../../../Windows/ErrorMsg.h"
+#include "../../../Windows/Synchronization.h"
+#include "../../../Windows/Thread.h"
+
+#include "../../../Windows/Control/Dialog.h"
+#include "../../../Windows/Control/ListView.h"
+#include "../../../Windows/Control/ProgressBar.h"
+
+#include "MyWindowsNew.h"
+
+struct CProgressMessageBoxPair
+{
+ UString Title;
+ UString Message;
+};
+
+struct CProgressFinalMessage
+{
+ CProgressMessageBoxPair ErrorMessage;
+ CProgressMessageBoxPair OkMessage;
+
+ bool ThereIsMessage() const { return !ErrorMessage.Message.IsEmpty() || !OkMessage.Message.IsEmpty(); }
+};
+
+class CProgressSync
+{
+ bool _stopped;
+ bool _paused;
+
+public:
+ bool _bytesProgressMode;
+ UInt64 _totalBytes;
+ UInt64 _completedBytes;
+ UInt64 _totalFiles;
+ UInt64 _curFiles;
+ UInt64 _inSize;
+ UInt64 _outSize;
+
+ UString _titleFileName;
+ UString _status;
+ UString _filePath;
+ bool _isDir;
+
+ UStringVector Messages;
+ CProgressFinalMessage FinalMessage;
+
+ NWindows::NSynchronization::CCriticalSection _cs;
+
+ CProgressSync();
+
+ bool Get_Stopped()
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ return _stopped;
+ }
+ void Set_Stopped(bool val)
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ _stopped = val;
+ }
+
+ bool Get_Paused();
+ void Set_Paused(bool val)
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ _paused = val;
+ }
+
+ void Set_BytesProgressMode(bool bytesProgressMode)
+ {
+ NWindows::NSynchronization::CCriticalSectionLock lock(_cs);
+ _bytesProgressMode = bytesProgressMode;
+ }
+
+ HRESULT CheckStop();
+ HRESULT ScanProgress(UInt64 numFiles, UInt64 totalSize, const FString &fileName, bool isDir = false);
+
+ HRESULT Set_NumFilesTotal(UInt64 val);
+ void Set_NumBytesTotal(UInt64 val);
+ void Set_NumFilesCur(UInt64 val);
+ HRESULT Set_NumBytesCur(const UInt64 *val);
+ HRESULT Set_NumBytesCur(UInt64 val);
+ void Set_Ratio(const UInt64 *inSize, const UInt64 *outSize);
+
+ void Set_TitleFileName(const UString &fileName);
+ void Set_Status(const UString &s);
+ HRESULT Set_Status2(const UString &s, const wchar_t *path, bool isDir = false);
+ void Set_FilePath(const wchar_t *path, bool isDir = false);
+
+ void AddError_Message(const wchar_t *message);
+ void AddError_Message_Name(const wchar_t *message, const wchar_t *name);
+ void AddError_Code_Name(DWORD systemError, const wchar_t *name);
+
+ bool ThereIsMessage() const { return !Messages.IsEmpty() || FinalMessage.ThereIsMessage(); }
+};
+
+class CProgressDialog: public NWindows::NControl::CModalDialog
+{
+ UString _titleFileName;
+ UString _filePath;
+ UString _status;
+ bool _isDir;
+
+ UString _background_String;
+ UString _backgrounded_String;
+ UString _foreground_String;
+ UString _pause_String;
+ UString _continue_String;
+ UString _paused_String;
+
+ int _buttonSizeX;
+ int _buttonSizeY;
+
+ UINT_PTR _timer;
+
+ UString _title;
+
+ class CU64ToI32Converter
+ {
+ unsigned _numShiftBits;
+ UInt64 _range;
+ public:
+ CU64ToI32Converter(): _numShiftBits(0), _range(1) {}
+ void Init(UInt64 range)
+ {
+ _range = range;
+ // Windows CE doesn't like big number for ProgressBar.
+ for (_numShiftBits = 0; range >= ((UInt32)1 << 15); _numShiftBits++)
+ range >>= 1;
+ }
+ int Count(UInt64 val)
+ {
+ int res = (int)(val >> _numShiftBits);
+ if (val == _range)
+ res++;
+ return res;
+ }
+ };
+
+ CU64ToI32Converter _progressConv;
+ UInt64 _progressBar_Pos;
+ UInt64 _progressBar_Range;
+
+ NWindows::NControl::CProgressBar m_ProgressBar;
+ NWindows::NControl::CListView _messageList;
+
+ int _numMessages;
+
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
+ CMyComPtr<ITaskbarList3> _taskbarList;
+ #endif
+ HWND _hwndForTaskbar;
+
+ UInt32 _prevTime;
+ UInt64 _elapsedTime;
+
+ UInt64 _prevPercentValue;
+ UInt64 _prevElapsedSec;
+ UInt64 _prevRemainingSec;
+
+ UInt64 _totalBytes_Prev;
+ UInt64 _processed_Prev;
+ UInt64 _packed_Prev;
+ UInt64 _ratio_Prev;
+ UString _filesStr_Prev;
+
+ unsigned _prevSpeed_MoveBits;
+ UInt64 _prevSpeed;
+
+ bool _foreground;
+
+ unsigned _numReduceSymbols;
+
+ bool _wasCreated;
+ bool _needClose;
+
+ unsigned _numPostedMessages;
+ UInt32 _numAutoSizeMessages;
+
+ bool _errorsWereDisplayed;
+
+ bool _waitCloseByCancelButton;
+ bool _cancelWasPressed;
+
+ bool _inCancelMessageBox;
+ bool _externalCloseMessageWasReceived;
+
+
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
+ void SetTaskbarProgressState(TBPFLAG tbpFlags)
+ {
+ if (_taskbarList && _hwndForTaskbar)
+ _taskbarList->SetProgressState(_hwndForTaskbar, tbpFlags);
+ }
+ #endif
+ void SetTaskbarProgressState();
+
+ void UpdateStatInfo(bool showAll);
+ bool OnTimer(WPARAM timerID, LPARAM callback);
+ void SetProgressRange(UInt64 range);
+ void SetProgressPos(UInt64 pos);
+ virtual bool OnInit();
+ virtual bool OnSize(WPARAM wParam, int xSize, int ySize);
+ virtual void OnCancel();
+ virtual void OnOK();
+ NWindows::NSynchronization::CManualResetEvent _createDialogEvent;
+ NWindows::NSynchronization::CManualResetEvent _dialogCreatedEvent;
+ #ifndef _SFX
+ void AddToTitle(LPCWSTR string);
+ #endif
+
+ void SetPauseText();
+ void SetPriorityText();
+ void OnPauseButton();
+ void OnPriorityButton();
+ bool OnButtonClicked(int buttonID, HWND buttonHWND);
+ bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
+
+ void SetTitleText();
+ void ShowSize(int id, UInt64 val, UInt64 &prev);
+
+ void UpdateMessagesDialog();
+
+ void AddMessageDirect(LPCWSTR message, bool needNumber);
+ void AddMessage(LPCWSTR message);
+
+ bool OnExternalCloseMessage();
+ void EnableErrorsControls(bool enable);
+
+ void ShowAfterMessages(HWND wndParent);
+
+ void CheckNeedClose();
+public:
+ CProgressSync Sync;
+ bool CompressingMode;
+ bool WaitMode;
+ bool ShowCompressionInfo;
+ bool MessagesDisplayed; // = true if user pressed OK on all messages or there are no messages.
+ int IconID;
+
+ HWND MainWindow;
+ #ifndef _SFX
+ UString MainTitle;
+ UString MainAddTitle;
+ ~CProgressDialog();
+ #endif
+
+ CProgressDialog();
+ void WaitCreating()
+ {
+ _createDialogEvent.Set();
+ _dialogCreatedEvent.Lock();
+ }
+
+ INT_PTR Create(const UString &title, NWindows::CThread &thread, HWND wndParent = 0);
+
+ void ProcessWasFinished();
+};
+
+
+class CProgressCloser
+{
+ CProgressDialog *_p;
+public:
+ CProgressCloser(CProgressDialog &p) : _p(&p) {}
+ ~CProgressCloser() { _p->ProcessWasFinished(); }
+};
+
+class CProgressThreadVirt
+{
+protected:
+ FStringVector ErrorPaths;
+ CProgressFinalMessage FinalMessage;
+
+ // error if any of HRESULT, ErrorMessage, ErrorPath
+ virtual HRESULT ProcessVirt() = 0;
+ void Process();
+public:
+ HRESULT Result;
+ bool ThreadFinishedOK; // if there is no fatal exception
+ CProgressDialog ProgressDialog;
+
+ static THREAD_FUNC_DECL MyThreadFunction(void *param)
+ {
+ CProgressThreadVirt *p = (CProgressThreadVirt *)param;
+ try
+ {
+ p->Process();
+ p->ThreadFinishedOK = true;
+ }
+ catch (...) { p->Result = E_FAIL; }
+ return 0;
+ }
+
+ void AddErrorPath(const FString &path) { ErrorPaths.Add(path); }
+
+ HRESULT Create(const UString &title, HWND parentWindow = 0);
+ CProgressThreadVirt(): Result(E_FAIL), ThreadFinishedOK(false) {}
+
+ CProgressMessageBoxPair &GetMessagePair(bool isError) { return isError ? FinalMessage.ErrorMessage : FinalMessage.OkMessage; }
+
+};
+
+UString HResultToMessage(HRESULT errorCode);
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc
new file mode 100644
index 00000000000..4d0e0c7bfe0
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc
@@ -0,0 +1,40 @@
+#include "ProgressDialog2Res.h"
+#include "../../GuiCommon.rc"
+
+#undef DIALOG_ID
+#define DIALOG_ID IDD_PROGRESS
+#define xc 360
+#define k 11
+#define z1s 16
+
+#include "ProgressDialog2a.rc"
+
+#ifdef UNDER_CE
+
+#include "../../GuiCommon.rc"
+
+
+#undef DIALOG_ID
+#undef m
+#undef k
+#undef z1s
+
+#define DIALOG_ID IDD_PROGRESS_2
+#define m 4
+#define k 8
+#define z1s 12
+
+#define xc 280
+
+#include "ProgressDialog2a.rc"
+
+#endif
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_PROGRESS_PAUSED "Paused"
+ IDS_PROGRESS_FOREGROUND "&Foreground"
+ IDS_CONTINUE "&Continue"
+ IDS_PROGRESS_ASK_CANCEL "Are you sure you want to cancel?"
+ IDS_CLOSE "&Close"
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h
new file mode 100644
index 00000000000..b45d7b49506
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h
@@ -0,0 +1,48 @@
+#define IDD_PROGRESS 97
+#define IDD_PROGRESS_2 10097
+
+#define IDS_CLOSE 408
+#define IDS_CONTINUE 411
+
+#define IDB_PROGRESS_BACKGROUND 444
+#define IDS_PROGRESS_FOREGROUND 445
+#define IDB_PAUSE 446
+#define IDS_PROGRESS_PAUSED 447
+#define IDS_PROGRESS_ASK_CANCEL 448
+
+#define IDT_PROGRESS_PACKED 1008
+#define IDT_PROGRESS_FILES 1032
+
+#define IDT_PROGRESS_ELAPSED 3900
+#define IDT_PROGRESS_REMAINING 3901
+#define IDT_PROGRESS_TOTAL 3902
+#define IDT_PROGRESS_SPEED 3903
+#define IDT_PROGRESS_PROCESSED 3904
+#define IDT_PROGRESS_RATIO 3905
+#define IDT_PROGRESS_ERRORS 3906
+
+#define IDC_PROGRESS1 100
+#define IDL_PROGRESS_MESSAGES 101
+#define IDT_PROGRESS_FILE_NAME 102
+#define IDT_PROGRESS_STATUS 103
+
+#define IDT_PROGRESS_PACKED_VAL 110
+#define IDT_PROGRESS_FILES_VAL 111
+
+#define IDT_PROGRESS_ELAPSED_VAL 120
+#define IDT_PROGRESS_REMAINING_VAL 121
+#define IDT_PROGRESS_TOTAL_VAL 122
+#define IDT_PROGRESS_SPEED_VAL 123
+#define IDT_PROGRESS_PROCESSED_VAL 124
+#define IDT_PROGRESS_RATIO_VAL 125
+#define IDT_PROGRESS_ERRORS_VAL 126
+
+
+#ifdef UNDER_CE
+#define MY_PROGRESS_VAL_UNITS 44
+#else
+#define MY_PROGRESS_VAL_UNITS 76
+#endif
+#define MY_PROGRESS_LABEL_UNITS_MIN 60
+#define MY_PROGRESS_LABEL_UNITS_START 90
+#define MY_PROGRESS_PAD_UNITS 4
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc
new file mode 100644
index 00000000000..e9713930be1
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc
@@ -0,0 +1,80 @@
+#undef bxs
+#define bxs 80
+
+#define x0s MY_PROGRESS_LABEL_UNITS_START
+#define x1s MY_PROGRESS_VAL_UNITS
+#define x2s MY_PROGRESS_LABEL_UNITS_START
+#define x3s MY_PROGRESS_VAL_UNITS
+
+#define x1 (m + x0s)
+#define x3 (xs - m - x3s)
+#define x2 (x3 - x2s)
+
+#undef y0
+#undef y1
+#undef y2
+#undef y3
+#undef y4
+
+#undef z0
+#undef z1
+#undef z2
+#undef z3
+
+#define y0 m
+#define y1 (y0 + k)
+#define y2 (y1 + k)
+#define y3 (y2 + k)
+#define y4 (y3 + k)
+
+#define z3 (y4 + k + 1)
+
+#define z2 (z3 + k + 1)
+#define z2s 24
+
+#define z1 (z2 + z2s)
+
+#define z0 (z1 + z1s + m)
+#define z0s 48
+
+#define yc (z0 + z0s + bys)
+
+
+DIALOG_ID DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT
+CAPTION "Progress"
+{
+ DEFPUSHBUTTON "&Background", IDB_PROGRESS_BACKGROUND, bx3, by, bxs, bys
+ PUSHBUTTON "&Pause", IDB_PAUSE bx2, by, bxs, bys
+ PUSHBUTTON "Cancel", IDCANCEL, bx1, by, bxs, bys
+
+ LTEXT "Elapsed time:", IDT_PROGRESS_ELAPSED, m, y0, x0s, 8
+ LTEXT "Remaining time:", IDT_PROGRESS_REMAINING, m, y1, x0s, 8
+ LTEXT "Files:", IDT_PROGRESS_FILES, m, y2, x0s, 8
+ LTEXT "Compression ratio:", IDT_PROGRESS_RATIO, m, y3, x0s, 8
+ LTEXT "Errors:", IDT_PROGRESS_ERRORS, m, y4, x0s, 8
+
+ LTEXT "Total size:", IDT_PROGRESS_TOTAL, x2, y0, x2s, 8
+ LTEXT "Speed:", IDT_PROGRESS_SPEED, x2, y1, x2s, 8
+ LTEXT "Processed:", IDT_PROGRESS_PROCESSED,x2, y2, x2s, 8
+ LTEXT "Compressed size:" , IDT_PROGRESS_PACKED, x2, y3, x2s, 8
+
+ RTEXT "", IDT_PROGRESS_ELAPSED_VAL, x1, y0, x1s, MY_TEXT_NOPREFIX
+ RTEXT "", IDT_PROGRESS_REMAINING_VAL, x1, y1, x1s, MY_TEXT_NOPREFIX
+ RTEXT "", IDT_PROGRESS_FILES_VAL, x1, y2, x1s, MY_TEXT_NOPREFIX
+ RTEXT "", IDT_PROGRESS_RATIO_VAL, x1, y3, x1s, MY_TEXT_NOPREFIX
+ RTEXT "", IDT_PROGRESS_ERRORS_VAL, x1, y4, x1s, MY_TEXT_NOPREFIX
+
+ RTEXT "", IDT_PROGRESS_TOTAL_VAL, x3, y0, x3s, MY_TEXT_NOPREFIX
+ RTEXT "", IDT_PROGRESS_SPEED_VAL, x3, y1, x3s, MY_TEXT_NOPREFIX
+ RTEXT "", IDT_PROGRESS_PROCESSED_VAL, x3, y2, x3s, MY_TEXT_NOPREFIX
+ RTEXT "", IDT_PROGRESS_PACKED_VAL, x3, y3, x3s, MY_TEXT_NOPREFIX
+
+ LTEXT "", IDT_PROGRESS_STATUS, m, z3, xc, MY_TEXT_NOPREFIX
+ CONTROL "", IDT_PROGRESS_FILE_NAME, "Static", SS_NOPREFIX | SS_LEFTNOWORDWRAP, m, z2, xc, z2s
+
+ CONTROL "Progress1", IDC_PROGRESS1, "msctls_progress32", PBS_SMOOTH | WS_BORDER, m, z1, xc, z1s
+
+ CONTROL "List1", IDL_PROGRESS_MESSAGES, "SysListView32",
+ LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,
+ m, z0, xc, z0s
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h
new file mode 100644
index 00000000000..cbf3beb2179
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h
@@ -0,0 +1,3 @@
+#define IDD_PROGRESS 97
+
+#define IDC_PROGRESS1 100
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp b/3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp
new file mode 100644
index 00000000000..838b6e3f63c
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp
@@ -0,0 +1,23 @@
+// PropertyName.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/IntToString.h"
+
+#include "LangUtils.h"
+#include "PropertyName.h"
+
+UString GetNameOfProperty(PROPID propID, const wchar_t *name)
+{
+ if (propID < 1000)
+ {
+ UString s = LangString(1000 + propID);
+ if (!s.IsEmpty())
+ return s;
+ }
+ if (name)
+ return name;
+ wchar_t temp[16];
+ ConvertUInt32ToString(propID, temp);
+ return temp;
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyName.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyName.h
new file mode 100644
index 00000000000..4f0d6dc11d9
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyName.h
@@ -0,0 +1,10 @@
+// PropertyName.h
+
+#ifndef __PROPERTY_NAME_H
+#define __PROPERTY_NAME_H
+
+#include "../../../Common/MyString.h"
+
+UString GetNameOfProperty(PROPID propID, const wchar_t *name);
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h
new file mode 100644
index 00000000000..67f339028fe
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h
@@ -0,0 +1,95 @@
+
+
+#define IDS_PROP_PATH 1003
+#define IDS_PROP_NAME 1004
+#define IDS_PROP_EXTENSION 1005
+#define IDS_PROP_IS_FOLDER 1006
+#define IDS_PROP_SIZE 1007
+#define IDS_PROP_PACKED_SIZE 1008
+#define IDS_PROP_ATTRIBUTES 1009
+#define IDS_PROP_CTIME 1010
+#define IDS_PROP_ATIME 1011
+#define IDS_PROP_MTIME 1012
+#define IDS_PROP_SOLID 1013
+#define IDS_PROP_C0MMENTED 1014
+#define IDS_PROP_ENCRYPTED 1015
+#define IDS_PROP_SPLIT_BEFORE 1016
+#define IDS_PROP_SPLIT_AFTER 1017
+#define IDS_PROP_DICTIONARY_SIZE 1018
+#define IDS_PROP_CRC 1019
+#define IDS_PROP_FILE_TYPE 1020
+#define IDS_PROP_ANTI 1021
+#define IDS_PROP_METHOD 1022
+#define IDS_PROP_HOST_OS 1023
+#define IDS_PROP_FILE_SYSTEM 1024
+#define IDS_PROP_USER 1025
+#define IDS_PROP_GROUP 1026
+#define IDS_PROP_BLOCK 1027
+#define IDS_PROP_COMMENT 1028
+#define IDS_PROP_POSITION 1029
+#define IDS_PROP_PREFIX 1030
+#define IDS_PROP_FOLDERS 1031
+#define IDS_PROP_FILES 1032
+#define IDS_PROP_VERSION 1033
+#define IDS_PROP_VOLUME 1034
+#define IDS_PROP_IS_VOLUME 1035
+#define IDS_PROP_OFFSET 1036
+#define IDS_PROP_LINKS 1037
+#define IDS_PROP_NUM_BLOCKS 1038
+#define IDS_PROP_NUM_VOLUMES 1039
+
+#define IDS_PROP_BIT64 1041
+#define IDS_PROP_BIG_ENDIAN 1042
+#define IDS_PROP_CPU 1043
+#define IDS_PROP_PHY_SIZE 1044
+#define IDS_PROP_HEADERS_SIZE 1045
+#define IDS_PROP_CHECKSUM 1046
+#define IDS_PROP_CHARACTS 1047
+#define IDS_PROP_VA 1048
+#define IDS_PROP_ID 1049
+#define IDS_PROP_SHORT_NAME 1050
+#define IDS_PROP_CREATOR_APP 1051
+#define IDS_PROP_SECTOR_SIZE 1052
+#define IDS_PROP_POSIX_ATTRIB 1053
+#define IDS_PROP_SYM_LINK 1054
+#define IDS_PROP_ERROR 1055
+#define IDS_PROP_TOTAL_SIZE 1056
+#define IDS_PROP_FREE_SPACE 1057
+#define IDS_PROP_CLUSTER_SIZE 1058
+#define IDS_PROP_VOLUME_NAME 1059
+#define IDS_PROP_LOCAL_NAME 1060
+#define IDS_PROP_PROVIDER 1061
+#define IDS_PROP_NT_SECURITY 1062
+#define IDS_PROP_ALT_STREAM 1063
+#define IDS_PROP_AUX 1064
+#define IDS_PROP_DELETED 1065
+#define IDS_PROP_IS_TREE 1066
+#define IDS_PROP_SHA1 1067
+#define IDS_PROP_SHA256 1068
+#define IDS_PROP_ERROR_TYPE 1069
+#define IDS_PROP_NUM_ERRORS 1070
+#define IDS_PROP_ERROR_FLAGS 1071
+#define IDS_PROP_WARNING_FLAGS 1072
+#define IDS_PROP_WARNING 1073
+#define IDS_PROP_NUM_STREAMS 1074
+#define IDS_PROP_NUM_ALT_STREAMS 1075
+#define IDS_PROP_ALT_STREAMS_SIZE 1076
+#define IDS_PROP_VIRTUAL_SIZE 1077
+#define IDS_PROP_UNPACK_SIZE 1078
+#define IDS_PROP_TOTAL_PHY_SIZE 1079
+#define IDS_PROP_VOLUME_INDEX 1080
+#define IDS_PROP_SUBTYPE 1081
+#define IDS_PROP_SHORT_COMMENT 1082
+#define IDS_PROP_CODE_PAGE 1083
+#define IDS_PROP_IS_NOT_ARC_TYPE 1084
+#define IDS_PROP_PHY_SIZE_CANT_BE_DETECTED 1085
+#define IDS_PROP_ZEROS_TAIL_IS_ALLOWED 1086
+#define IDS_PROP_TAIL_SIZE 1087
+#define IDS_PROP_EMB_STUB_SIZE 1088
+#define IDS_PROP_NT_REPARSE 1089
+#define IDS_PROP_HARD_LINK 1090
+#define IDS_PROP_INODE 1091
+#define IDS_PROP_STREAM_ID 1092
+#define IDS_PROP_READ_ONLY 1093
+#define IDS_PROP_OUT_NAME 1094
+#define IDS_PROP_COPY_LINK 1095
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp b/3rdparty/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp
new file mode 100644
index 00000000000..c8ea8b95aef
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp
@@ -0,0 +1,255 @@
+// SysIconUtils.cpp
+
+#include "StdAfx.h"
+
+#ifndef _UNICODE
+#include "../../../Common/StringConvert.h"
+#endif
+
+#include "../../../Windows/FileDir.h"
+
+#include "SysIconUtils.h"
+
+#include <ShlObj.h>
+
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+int GetIconIndexForCSIDL(int csidl)
+{
+ LPITEMIDLIST pidl = 0;
+ SHGetSpecialFolderLocation(NULL, csidl, &pidl);
+ if (pidl)
+ {
+ SHFILEINFO shellInfo;
+ SHGetFileInfo(LPCTSTR(pidl), FILE_ATTRIBUTE_NORMAL,
+ &shellInfo, sizeof(shellInfo),
+ SHGFI_PIDL | SHGFI_SYSICONINDEX);
+ IMalloc *pMalloc;
+ SHGetMalloc(&pMalloc);
+ if (pMalloc)
+ {
+ pMalloc->Free(pidl);
+ pMalloc->Release();
+ }
+ return shellInfo.iIcon;
+ }
+ return 0;
+}
+
+#ifndef _UNICODE
+typedef int (WINAPI * SHGetFileInfoWP)(LPCWSTR pszPath, DWORD attrib, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
+
+struct CSHGetFileInfoInit
+{
+ SHGetFileInfoWP shGetFileInfoW;
+ CSHGetFileInfoInit()
+ {
+ shGetFileInfoW = (SHGetFileInfoWP)
+ ::GetProcAddress(::GetModuleHandleW(L"shell32.dll"), "SHGetFileInfoW");
+ }
+} g_SHGetFileInfoInit;
+#endif
+
+static DWORD_PTR MySHGetFileInfoW(LPCWSTR pszPath, DWORD attrib, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags)
+{
+ #ifdef _UNICODE
+ return SHGetFileInfo
+ #else
+ if (g_SHGetFileInfoInit.shGetFileInfoW == 0)
+ return 0;
+ return g_SHGetFileInfoInit.shGetFileInfoW
+ #endif
+ (pszPath, attrib, psfi, cbFileInfo, uFlags);
+}
+
+DWORD_PTR GetRealIconIndex(CFSTR path, DWORD attrib, int &iconIndex)
+{
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ SHFILEINFO shellInfo;
+ DWORD_PTR res = ::SHGetFileInfo(fs2fas(path), FILE_ATTRIBUTE_NORMAL | attrib, &shellInfo,
+ sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX);
+ iconIndex = shellInfo.iIcon;
+ return res;
+ }
+ else
+ #endif
+ {
+ SHFILEINFOW shellInfo;
+ DWORD_PTR res = ::MySHGetFileInfoW(fs2us(path), FILE_ATTRIBUTE_NORMAL | attrib, &shellInfo,
+ sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX);
+ iconIndex = shellInfo.iIcon;
+ return res;
+ }
+}
+
+/*
+DWORD_PTR GetRealIconIndex(const UString &fileName, DWORD attrib, int &iconIndex, UString *typeName)
+{
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ SHFILEINFO shellInfo;
+ shellInfo.szTypeName[0] = 0;
+ DWORD_PTR res = ::SHGetFileInfoA(GetSystemString(fileName), FILE_ATTRIBUTE_NORMAL | attrib, &shellInfo,
+ sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX | SHGFI_TYPENAME);
+ if (typeName)
+ *typeName = GetUnicodeString(shellInfo.szTypeName);
+ iconIndex = shellInfo.iIcon;
+ return res;
+ }
+ else
+ #endif
+ {
+ SHFILEINFOW shellInfo;
+ shellInfo.szTypeName[0] = 0;
+ DWORD_PTR res = ::MySHGetFileInfoW(fileName, FILE_ATTRIBUTE_NORMAL | attrib, &shellInfo,
+ sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX | SHGFI_TYPENAME);
+ if (typeName)
+ *typeName = shellInfo.szTypeName;
+ iconIndex = shellInfo.iIcon;
+ return res;
+ }
+}
+*/
+
+static int FindInSorted_Attrib(const CRecordVector<CAttribIconPair> &vect, DWORD attrib, int &insertPos)
+{
+ unsigned left = 0, right = vect.Size();
+ while (left != right)
+ {
+ unsigned mid = (left + right) / 2;
+ DWORD midAttrib = vect[mid].Attrib;
+ if (attrib == midAttrib)
+ return mid;
+ if (attrib < midAttrib)
+ right = mid;
+ else
+ left = mid + 1;
+ }
+ insertPos = left;
+ return -1;
+}
+
+static int FindInSorted_Ext(const CObjectVector<CExtIconPair> &vect, const wchar_t *ext, int &insertPos)
+{
+ unsigned left = 0, right = vect.Size();
+ while (left != right)
+ {
+ unsigned mid = (left + right) / 2;
+ int compare = MyStringCompareNoCase(ext, vect[mid].Ext);
+ if (compare == 0)
+ return mid;
+ if (compare < 0)
+ right = mid;
+ else
+ left = mid + 1;
+ }
+ insertPos = left;
+ return -1;
+}
+
+int CExtToIconMap::GetIconIndex(DWORD attrib, const wchar_t *fileName /*, UString *typeName */)
+{
+ int dotPos = -1;
+ unsigned i;
+ for (i = 0;; i++)
+ {
+ wchar_t c = fileName[i];
+ if (c == 0)
+ break;
+ if (c == '.')
+ dotPos = i;
+ }
+
+ /*
+ if (MyStringCompareNoCase(fileName, L"$Recycle.Bin") == 0)
+ {
+ char s[256];
+ sprintf(s, "SPEC i = %3d, attr = %7x", _attribMap.Size(), attrib);
+ OutputDebugStringA(s);
+ OutputDebugStringW(fileName);
+ }
+ */
+
+ if ((attrib & FILE_ATTRIBUTE_DIRECTORY) != 0 || dotPos < 0)
+ {
+ int insertPos = 0;
+ int index = FindInSorted_Attrib(_attribMap, attrib, insertPos);
+ if (index >= 0)
+ {
+ // if (typeName) *typeName = _attribMap[index].TypeName;
+ return _attribMap[index].IconIndex;
+ }
+ CAttribIconPair pair;
+ GetRealIconIndex(
+ #ifdef UNDER_CE
+ FTEXT("\\")
+ #endif
+ FTEXT("__DIR__")
+ , attrib, pair.IconIndex
+ // , pair.TypeName
+ );
+
+ /*
+ char s[256];
+ sprintf(s, "i = %3d, attr = %7x", _attribMap.Size(), attrib);
+ OutputDebugStringA(s);
+ */
+
+ pair.Attrib = attrib;
+ _attribMap.Insert(insertPos, pair);
+ // if (typeName) *typeName = pair.TypeName;
+ return pair.IconIndex;
+ }
+
+ const wchar_t *ext = fileName + dotPos + 1;
+ int insertPos = 0;
+ int index = FindInSorted_Ext(_extMap, ext, insertPos);
+ if (index >= 0)
+ {
+ const CExtIconPair &pa = _extMap[index];
+ // if (typeName) *typeName = pa.TypeName;
+ return pa.IconIndex;
+ }
+
+ for (i = 0;; i++)
+ {
+ wchar_t c = ext[i];
+ if (c == 0)
+ break;
+ if (c < L'0' || c > L'9')
+ break;
+ }
+ if (i != 0 && ext[i] == 0)
+ {
+ // GetRealIconIndex is too slow for big number of split extensions: .001, .002, .003
+ if (!SplitIconIndex_Defined)
+ {
+ GetRealIconIndex(
+ #ifdef UNDER_CE
+ FTEXT("\\")
+ #endif
+ FTEXT("__FILE__.001"), 0, SplitIconIndex);
+ SplitIconIndex_Defined = true;
+ }
+ return SplitIconIndex;
+ }
+
+ CExtIconPair pair;
+ pair.Ext = ext;
+ GetRealIconIndex(us2fs(fileName + dotPos), attrib, pair.IconIndex);
+ _extMap.Insert(insertPos, pair);
+ // if (typeName) *typeName = pair.TypeName;
+ return pair.IconIndex;
+}
+
+/*
+int CExtToIconMap::GetIconIndex(DWORD attrib, const UString &fileName)
+{
+ return GetIconIndex(attrib, fileName, NULL);
+}
+*/
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h
new file mode 100644
index 00000000000..f1b27fa1541
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h
@@ -0,0 +1,62 @@
+// SysIconUtils.h
+
+#ifndef __SYS_ICON_UTILS_H
+#define __SYS_ICON_UTILS_H
+
+#include "../../../Common/MyWindows.h"
+
+#include <commctrl.h>
+
+#include "../../../Common/MyString.h"
+
+struct CExtIconPair
+{
+ UString Ext;
+ int IconIndex;
+ // UString TypeName;
+
+ // int Compare(const CExtIconPair &a) const { return MyStringCompareNoCase(Ext, a.Ext); }
+};
+
+struct CAttribIconPair
+{
+ DWORD Attrib;
+ int IconIndex;
+ // UString TypeName;
+
+ // int Compare(const CAttribIconPair &a) const { return Ext.Compare(a.Ext); }
+};
+
+class CExtToIconMap
+{
+public:
+ CRecordVector<CAttribIconPair> _attribMap;
+ CObjectVector<CExtIconPair> _extMap;
+ int SplitIconIndex;
+ int SplitIconIndex_Defined;
+
+ CExtToIconMap(): SplitIconIndex_Defined(false) {}
+
+ void Clear()
+ {
+ SplitIconIndex_Defined = false;
+ _extMap.Clear();
+ _attribMap.Clear();
+ }
+ int GetIconIndex(DWORD attrib, const wchar_t *fileName /* , UString *typeName */);
+ // int GetIconIndex(DWORD attrib, const UString &fileName);
+};
+
+DWORD_PTR GetRealIconIndex(CFSTR path, DWORD attrib, int &iconIndex);
+int GetIconIndexForCSIDL(int csidl);
+
+inline HIMAGELIST GetSysImageList(bool smallIcons)
+{
+ SHFILEINFO shellInfo;
+ return (HIMAGELIST)SHGetFileInfo(TEXT(""),
+ FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_DIRECTORY,
+ &shellInfo, sizeof(shellInfo),
+ SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX | (smallIcons ? SHGFI_SMALLICON : SHGFI_ICON));
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/resource.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/resource.h
new file mode 100644
index 00000000000..b7ca17f1b22
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/resource.h
@@ -0,0 +1,175 @@
+#include "resourceGui.h"
+
+#define IDR_MENUBAR1 70
+#define IDM_MENU 71
+#define IDR_ACCELERATOR1 72
+
+#define IDB_ADD 100
+#define IDB_EXTRACT 101
+#define IDB_TEST 102
+#define IDB_COPY 103
+#define IDB_MOVE 104
+#define IDB_DELETE 105
+#define IDB_INFO 106
+
+#define IDB_ADD2 150
+#define IDB_EXTRACT2 151
+#define IDB_TEST2 152
+#define IDB_COPY2 153
+#define IDB_MOVE2 154
+#define IDB_DELETE2 155
+#define IDB_INFO2 156
+
+#define IDM_HASH_ALL 101
+#define IDM_CRC32 102
+#define IDM_CRC64 103
+#define IDM_SHA1 104
+#define IDM_SHA256 105
+
+#define IDM_OPEN 540
+#define IDM_OPEN_INSIDE 541
+#define IDM_OPEN_OUTSIDE 542
+#define IDM_FILE_VIEW 543
+#define IDM_FILE_EDIT 544
+#define IDM_RENAME 545
+#define IDM_COPY_TO 546
+#define IDM_MOVE_TO 547
+#define IDM_DELETE 548
+#define IDM_SPLIT 549
+#define IDM_COMBINE 550
+#define IDM_PROPERTIES 551
+#define IDM_COMMENT 552
+#define IDM_CRC 553
+#define IDM_DIFF 554
+#define IDM_CREATE_FOLDER 555
+#define IDM_CREATE_FILE 556
+// #define IDM_EXIT 557
+#define IDM_LINK 558
+#define IDM_ALT_STREAMS 559
+
+#define IDM_OPEN_INSIDE_ONE 590
+#define IDM_OPEN_INSIDE_PARSER 591
+
+#define IDM_SELECT_ALL 600
+#define IDM_DESELECT_ALL 601
+#define IDM_INVERT_SELECTION 602
+#define IDM_SELECT 603
+#define IDM_DESELECT 604
+#define IDM_SELECT_BY_TYPE 605
+#define IDM_DESELECT_BY_TYPE 606
+
+#define IDM_VIEW_LARGE_ICONS 700
+#define IDM_VIEW_SMALL_ICONS 701
+#define IDM_VIEW_LIST 702
+#define IDM_VIEW_DETAILS 703
+
+#define IDM_VIEW_ARANGE_BY_NAME 710
+#define IDM_VIEW_ARANGE_BY_TYPE 711
+#define IDM_VIEW_ARANGE_BY_DATE 712
+#define IDM_VIEW_ARANGE_BY_SIZE 713
+
+#define IDM_VIEW_ARANGE_NO_SORT 730
+#define IDM_VIEW_FLAT_VIEW 731
+#define IDM_VIEW_TWO_PANELS 732
+#define IDM_VIEW_TOOLBARS 733
+#define IDM_OPEN_ROOT_FOLDER 734
+#define IDM_OPEN_PARENT_FOLDER 735
+#define IDM_FOLDERS_HISTORY 736
+#define IDM_VIEW_REFRESH 737
+#define IDM_VIEW_AUTO_REFRESH 738
+// #define IDM_VIEW_SHOW_DELETED 739
+// #define IDM_VIEW_SHOW_STREAMS 740
+
+#define IDM_VIEW_ARCHIVE_TOOLBAR 750
+#define IDM_VIEW_STANDARD_TOOLBAR 751
+#define IDM_VIEW_TOOLBARS_LARGE_BUTTONS 752
+#define IDM_VIEW_TOOLBARS_SHOW_BUTTONS_TEXT 753
+
+#define IDS_BOOKMARK 801
+
+#define IDM_OPTIONS 900
+#define IDM_BENCHMARK 901
+#define IDM_BENCHMARK2 902
+
+#define IDM_HELP_CONTENTS 960
+#define IDM_ABOUT 961
+
+#define IDS_OPTIONS 2100
+
+#define IDS_N_SELECTED_ITEMS 3002
+
+#define IDS_FILE_EXIST 3008
+#define IDS_WANT_UPDATE_MODIFIED_FILE 3009
+#define IDS_CANNOT_UPDATE_FILE 3010
+#define IDS_CANNOT_START_EDITOR 3011
+#define IDS_VIRUS 3012
+#define IDS_MESSAGE_UNSUPPORTED_OPERATION_FOR_LONG_PATH_FOLDER 3013
+#define IDS_SELECT_ONE_FILE 3014
+#define IDS_SELECT_FILES 3015
+#define IDS_TOO_MANY_ITEMS 3016
+
+#define IDS_COPY 6000
+#define IDS_MOVE 6001
+#define IDS_COPY_TO 6002
+#define IDS_MOVE_TO 6003
+#define IDS_COPYING 6004
+#define IDS_MOVING 6005
+#define IDS_RENAMING 6006
+
+#define IDS_OPERATION_IS_NOT_SUPPORTED 6008
+#define IDS_ERROR_RENAMING 6009
+#define IDS_CONFIRM_FILE_COPY 6010
+#define IDS_WANT_TO_COPY_FILES 6011
+
+#define IDS_CONFIRM_FILE_DELETE 6100
+#define IDS_CONFIRM_FOLDER_DELETE 6101
+#define IDS_CONFIRM_ITEMS_DELETE 6102
+#define IDS_WANT_TO_DELETE_FILE 6103
+#define IDS_WANT_TO_DELETE_FOLDER 6104
+#define IDS_WANT_TO_DELETE_ITEMS 6105
+#define IDS_DELETING 6106
+#define IDS_ERROR_DELETING 6107
+#define IDS_ERROR_LONG_PATH_TO_RECYCLE 6108
+
+#define IDS_CREATE_FOLDER 6300
+#define IDS_CREATE_FILE 6301
+#define IDS_CREATE_FOLDER_NAME 6302
+#define IDS_CREATE_FILE_NAME 6303
+#define IDS_CREATE_FOLDER_DEFAULT_NAME 6304
+#define IDS_CREATE_FILE_DEFAULT_NAME 6305
+#define IDS_CREATE_FOLDER_ERROR 6306
+#define IDS_CREATE_FILE_ERROR 6307
+
+#define IDS_COMMENT 6400
+#define IDS_COMMENT2 6401
+#define IDS_SELECT 6402
+#define IDS_DESELECT 6403
+#define IDS_SELECT_MASK 6404
+
+#define IDS_PROPERTIES 6600
+#define IDS_FOLDERS_HISTORY 6601
+
+#define IDS_COMPUTER 7100
+#define IDS_NETWORK 7101
+#define IDS_DOCUMENTS 7102
+#define IDS_SYSTEM 7103
+
+#define IDS_ADD 7200
+#define IDS_EXTRACT 7201
+#define IDS_TEST 7202
+#define IDS_BUTTON_COPY 7203
+#define IDS_BUTTON_MOVE 7204
+#define IDS_BUTTON_DELETE 7205
+#define IDS_BUTTON_INFO 7206
+
+#define IDS_SPLITTING 7303
+#define IDS_SPLIT_CONFIRM_TITLE 7304
+#define IDS_SPLIT_CONFIRM_MESSAGE 7305
+#define IDS_SPLIT_VOL_MUST_BE_SMALLER 7306
+
+#define IDS_COMBINE 7400
+#define IDS_COMBINE_TO 7401
+#define IDS_COMBINING 7402
+#define IDS_COMBINE_SELECT_ONE_FILE 7403
+#define IDS_COMBINE_CANT_DETECT_SPLIT_FILE 7404
+#define IDS_COMBINE_CANT_FIND_MORE_THAN_ONE_PART 7405
diff --git a/3rdparty/lzma/CPP/7zip/UI/FileManager/resourceGui.h b/3rdparty/lzma/CPP/7zip/UI/FileManager/resourceGui.h
new file mode 100644
index 00000000000..7c1b40e430b
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/FileManager/resourceGui.h
@@ -0,0 +1,15 @@
+#define IDI_ICON 1
+
+#define IDS_MESSAGE_NO_ERRORS 3001
+
+#define IDS_PROGRESS_TESTING 3302
+#define IDS_OPENNING 3303
+#define IDS_SCANNING 3304
+
+#define IDS_CHECKSUM_CALCULATING 7500
+#define IDS_CHECKSUM_INFORMATION 7501
+#define IDS_CHECKSUM_CRC_DATA 7502
+#define IDS_CHECKSUM_CRC_DATA_NAMES 7503
+#define IDS_CHECKSUM_CRC_STREAMS_NAMES 7504
+
+#define IDS_INCORRECT_VOLUME_SIZE 7307
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/Extract.rc b/3rdparty/lzma/CPP/7zip/UI/GUI/Extract.rc
new file mode 100644
index 00000000000..f75b2e6fcb3
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/Extract.rc
@@ -0,0 +1,59 @@
+#include "ExtractRes.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_MEM_ERROR "The system cannot allocate the required amount of memory"
+ IDS_CANNOT_CREATE_FOLDER "Cannot create folder '{0}'"
+ IDS_UPDATE_NOT_SUPPORTED "Update operations are not supported for this archive."
+ IDS_CANT_OPEN_ARCHIVE "Can not open file '{0}' as archive"
+ IDS_CANT_OPEN_ENCRYPTED_ARCHIVE "Can not open encrypted archive '{0}'. Wrong password?"
+ IDS_UNSUPPORTED_ARCHIVE_TYPE "Unsupported archive type"
+
+ IDS_CANT_OPEN_AS_TYPE "Can not open the file as {0} archive"
+ IDS_IS_OPEN_AS_TYPE "The file is open as {0} archive"
+ IDS_IS_OPEN_WITH_OFFSET "The archive is open with offset"
+
+ IDS_PROGRESS_EXTRACTING "Extracting"
+
+ IDS_PROGRESS_SKIPPING "Skipping"
+
+ IDS_EXTRACT_SET_FOLDER "Specify a location for extracted files."
+
+ IDS_EXTRACT_PATHS_FULL "Full pathnames"
+ IDS_EXTRACT_PATHS_NO "No pathnames"
+ IDS_EXTRACT_PATHS_ABS "Absolute pathnames"
+ IDS_PATH_MODE_RELAT "Relative pathnames"
+
+ IDS_EXTRACT_OVERWRITE_ASK "Ask before overwrite"
+ IDS_EXTRACT_OVERWRITE_WITHOUT_PROMPT "Overwrite without prompt"
+ IDS_EXTRACT_OVERWRITE_SKIP_EXISTING "Skip existing files"
+ IDS_EXTRACT_OVERWRITE_RENAME "Auto rename"
+ IDS_EXTRACT_OVERWRITE_RENAME_EXISTING "Auto rename existing files"
+
+ IDS_EXTRACT_MESSAGE_UNSUPPORTED_METHOD "Unsupported compression method for '{0}'."
+ IDS_EXTRACT_MESSAGE_DATA_ERROR "Data error in '{0}'. File is broken"
+ IDS_EXTRACT_MESSAGE_CRC_ERROR "CRC failed in '{0}'. File is broken."
+ IDS_EXTRACT_MESSAGE_DATA_ERROR_ENCRYPTED "Data error in encrypted file '{0}'. Wrong password?"
+ IDS_EXTRACT_MESSAGE_CRC_ERROR_ENCRYPTED "CRC failed in encrypted file '{0}'. Wrong password?"
+
+ IDS_EXTRACT_MSG_WRONG_PSW_GUESS "Wrong password?"
+ // IDS_EXTRACT_MSG_ENCRYPTED "Encrypted file"
+
+ IDS_EXTRACT_MSG_UNSUPPORTED_METHOD "Unsupported compression method"
+ IDS_EXTRACT_MSG_DATA_ERROR "Data error"
+ IDS_EXTRACT_MSG_CRC_ERROR "CRC failed"
+ IDS_EXTRACT_MSG_UNAVAILABLE_DATA "Unavailable data"
+ IDS_EXTRACT_MSG_UEXPECTED_END "Unexpected end of data";
+ IDS_EXTRACT_MSG_DATA_AFTER_END "There are some data after the end of the payload data"
+ IDS_EXTRACT_MSG_IS_NOT_ARC "Is not archive"
+ IDS_EXTRACT_MSG_HEADERS_ERROR "Headers Error"
+ IDS_EXTRACT_MSG_WRONG_PSW_CLAIM "Wrong password"
+
+ IDS_OPEN_MSG_UNAVAILABLE_START "Unavailable start of archive"
+ IDS_OPEN_MSG_UNCONFIRMED_START "Unconfirmed start of archive"
+ // IDS_OPEN_MSG_ERROR_FLAGS + 5 "Unexpected end of archive"
+ // IDS_OPEN_MSG_ERROR_FLAGS + 6 "There are data after the end of archive"
+ IDS_OPEN_MSG_UNSUPPORTED_FEATURE "Unsupported feature"
+END
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp
new file mode 100644
index 00000000000..af47fc2d205
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp
@@ -0,0 +1,418 @@
+// ExtractDialog.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/StringConvert.h"
+#include "../../../Common/Wildcard.h"
+
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/ResourceString.h"
+
+#ifndef NO_REGISTRY
+#include "../FileManager/HelpUtils.h"
+#endif
+
+
+#include "../FileManager/BrowseDialog.h"
+#include "../FileManager/LangUtils.h"
+#include "../FileManager/resourceGui.h"
+
+#include "ExtractDialog.h"
+#include "ExtractDialogRes.h"
+#include "ExtractRes.h"
+
+using namespace NWindows;
+using namespace NFile;
+using namespace NName;
+
+extern HINSTANCE g_hInstance;
+
+static const UInt32 kPathMode_IDs[] =
+{
+ IDS_EXTRACT_PATHS_FULL,
+ IDS_EXTRACT_PATHS_NO,
+ IDS_EXTRACT_PATHS_ABS
+};
+
+static const UInt32 kOverwriteMode_IDs[] =
+{
+ IDS_EXTRACT_OVERWRITE_ASK,
+ IDS_EXTRACT_OVERWRITE_WITHOUT_PROMPT,
+ IDS_EXTRACT_OVERWRITE_SKIP_EXISTING,
+ IDS_EXTRACT_OVERWRITE_RENAME,
+ IDS_EXTRACT_OVERWRITE_RENAME_EXISTING
+};
+
+#ifndef _SFX
+
+static const
+ // NExtract::NPathMode::EEnum
+ int
+ kPathModeButtonsVals[] =
+{
+ NExtract::NPathMode::kFullPaths,
+ NExtract::NPathMode::kNoPaths,
+ NExtract::NPathMode::kAbsPaths
+};
+
+static const
+ int
+ // NExtract::NOverwriteMode::EEnum
+ kOverwriteButtonsVals[] =
+{
+ NExtract::NOverwriteMode::kAsk,
+ NExtract::NOverwriteMode::kOverwrite,
+ NExtract::NOverwriteMode::kSkip,
+ NExtract::NOverwriteMode::kRename,
+ NExtract::NOverwriteMode::kRenameExisting
+};
+
+#endif
+
+#ifdef LANG
+
+static const UInt32 kLangIDs[] =
+{
+ IDT_EXTRACT_EXTRACT_TO,
+ IDT_EXTRACT_PATH_MODE,
+ IDT_EXTRACT_OVERWRITE_MODE,
+ // IDX_EXTRACT_ALT_STREAMS,
+ IDX_EXTRACT_NT_SECUR,
+ IDX_EXTRACT_ELIM_DUP,
+ IDG_PASSWORD,
+ IDX_PASSWORD_SHOW
+};
+#endif
+
+// static const int kWildcardsButtonIndex = 2;
+
+#ifndef NO_REGISTRY
+static const unsigned kHistorySize = 16;
+#endif
+
+#ifndef _SFX
+
+// it's used in CompressDialog also
+void AddComboItems(NControl::CComboBox &combo, const UInt32 *langIDs, unsigned numItems, const int *values, int curVal)
+{
+ int curSel = 0;
+ for (unsigned i = 0; i < numItems; i++)
+ {
+ UString s = LangString(langIDs[i]);
+ s.RemoveChar(L'&');
+ int index = (int)combo.AddString(s);
+ combo.SetItemData(index, i);
+ if (values[i] == curVal)
+ curSel = i;
+ }
+ combo.SetCurSel(curSel);
+}
+
+// it's used in CompressDialog also
+bool GetBoolsVal(const CBoolPair &b1, const CBoolPair &b2)
+{
+ if (b1.Def) return b1.Val;
+ if (b2.Def) return b2.Val;
+ return b1.Val;
+}
+
+void CExtractDialog::CheckButton_TwoBools(UINT id, const CBoolPair &b1, const CBoolPair &b2)
+{
+ CheckButton(id, GetBoolsVal(b1, b2));
+}
+
+void CExtractDialog::GetButton_Bools(UINT id, CBoolPair &b1, CBoolPair &b2)
+{
+ bool val = IsButtonCheckedBool(id);
+ bool oldVal = GetBoolsVal(b1, b2);
+ if (val != oldVal)
+ b1.Def = b2.Def = true;
+ b1.Val = b2.Val = val;
+}
+
+#endif
+
+bool CExtractDialog::OnInit()
+{
+ #ifdef LANG
+ {
+ UString s;
+ LangString_OnlyFromLangFile(IDD_EXTRACT, s);
+ if (s.IsEmpty())
+ GetText(s);
+ if (!ArcPath.IsEmpty())
+ {
+ s.AddAscii(" : ");
+ s += ArcPath;
+ }
+ SetText(s);
+ // LangSetWindowText(*this, IDD_EXTRACT);
+ LangSetDlgItems(*this, kLangIDs, ARRAY_SIZE(kLangIDs));
+ }
+ #endif
+
+ #ifndef _SFX
+ _passwordControl.Attach(GetItem(IDE_EXTRACT_PASSWORD));
+ _passwordControl.SetText(Password);
+ _passwordControl.SetPasswordChar(TEXT('*'));
+ _pathName.Attach(GetItem(IDE_EXTRACT_NAME));
+ #endif
+
+ #ifdef NO_REGISTRY
+
+ PathMode = NExtract::NPathMode::kFullPaths;
+ OverwriteMode = NExtract::NOverwriteMode::kAsk;
+
+ #else
+
+ _info.Load();
+
+ if (_info.PathMode == NExtract::NPathMode::kCurPaths)
+ _info.PathMode = NExtract::NPathMode::kFullPaths;
+
+ if (!PathMode_Force && _info.PathMode_Force)
+ PathMode = _info.PathMode;
+ if (!OverwriteMode_Force && _info.OverwriteMode_Force)
+ OverwriteMode = _info.OverwriteMode;
+
+ // CheckButton_TwoBools(IDX_EXTRACT_ALT_STREAMS, AltStreams, _info.AltStreams);
+ CheckButton_TwoBools(IDX_EXTRACT_NT_SECUR, NtSecurity, _info.NtSecurity);
+ CheckButton_TwoBools(IDX_EXTRACT_ELIM_DUP, ElimDup, _info.ElimDup);
+
+ CheckButton(IDX_PASSWORD_SHOW, _info.ShowPassword.Val);
+ UpdatePasswordControl();
+
+ #endif
+
+ _path.Attach(GetItem(IDC_EXTRACT_PATH));
+
+ UString pathPrefix = DirPath;
+
+ #ifndef _SFX
+
+ if (_info.SplitDest.Val)
+ {
+ CheckButton(IDX_EXTRACT_NAME_ENABLE, true);
+ UString pathName;
+ SplitPathToParts_Smart(DirPath, pathPrefix, pathName);
+ if (pathPrefix.IsEmpty())
+ pathPrefix = pathName;
+ else
+ _pathName.SetText(pathName);
+ }
+ else
+ ShowItem_Bool(IDE_EXTRACT_NAME, false);
+
+ #endif
+
+ _path.SetText(pathPrefix);
+
+ #ifndef NO_REGISTRY
+ for (unsigned i = 0; i < _info.Paths.Size() && i < kHistorySize; i++)
+ _path.AddString(_info.Paths[i]);
+ #endif
+
+ /*
+ if (_info.Paths.Size() > 0)
+ _path.SetCurSel(0);
+ else
+ _path.SetCurSel(-1);
+ */
+
+ #ifndef _SFX
+
+ _pathMode.Attach(GetItem(IDC_EXTRACT_PATH_MODE));
+ _overwriteMode.Attach(GetItem(IDC_EXTRACT_OVERWRITE_MODE));
+
+ AddComboItems(_pathMode, kPathMode_IDs, ARRAY_SIZE(kPathMode_IDs), kPathModeButtonsVals, PathMode);
+ AddComboItems(_overwriteMode, kOverwriteMode_IDs, ARRAY_SIZE(kOverwriteMode_IDs), kOverwriteButtonsVals, OverwriteMode);
+
+ #endif
+
+ HICON icon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_ICON));
+ SetIcon(ICON_BIG, icon);
+
+ // CWindow filesWindow = GetItem(IDC_EXTRACT_RADIO_FILES);
+ // filesWindow.Enable(_enableFilesButton);
+
+ NormalizePosition();
+
+ return CModalDialog::OnInit();
+}
+
+#ifndef _SFX
+void CExtractDialog::UpdatePasswordControl()
+{
+ _passwordControl.SetPasswordChar(IsShowPasswordChecked() ? 0 : TEXT('*'));
+ UString password;
+ _passwordControl.GetText(password);
+ _passwordControl.SetText(password);
+}
+#endif
+
+bool CExtractDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
+{
+ switch (buttonID)
+ {
+ case IDB_EXTRACT_SET_PATH:
+ OnButtonSetPath();
+ return true;
+ #ifndef _SFX
+ case IDX_EXTRACT_NAME_ENABLE:
+ ShowItem_Bool(IDE_EXTRACT_NAME, IsButtonCheckedBool(IDX_EXTRACT_NAME_ENABLE));
+ return true;
+ case IDX_PASSWORD_SHOW:
+ {
+ UpdatePasswordControl();
+ return true;
+ }
+ #endif
+ }
+ return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
+}
+
+void CExtractDialog::OnButtonSetPath()
+{
+ UString currentPath;
+ _path.GetText(currentPath);
+ UString title = LangString(IDS_EXTRACT_SET_FOLDER);
+ UString resultPath;
+ if (!MyBrowseForFolder(*this, title, currentPath, resultPath))
+ return;
+ #ifndef NO_REGISTRY
+ _path.SetCurSel(-1);
+ #endif
+ _path.SetText(resultPath);
+}
+
+void AddUniqueString(UStringVector &list, const UString &s)
+{
+ FOR_VECTOR (i, list)
+ if (s.IsEqualTo_NoCase(list[i]))
+ return;
+ list.Add(s);
+}
+
+void CExtractDialog::OnOK()
+{
+ #ifndef _SFX
+ int pathMode2 = kPathModeButtonsVals[_pathMode.GetCurSel()];
+ if (PathMode != NExtract::NPathMode::kCurPaths ||
+ pathMode2 != NExtract::NPathMode::kFullPaths)
+ PathMode = (NExtract::NPathMode::EEnum)pathMode2;
+
+ OverwriteMode = (NExtract::NOverwriteMode::EEnum)kOverwriteButtonsVals[_overwriteMode.GetCurSel()];
+
+ // _filesMode = (NExtractionDialog::NFilesMode::EEnum)GetFilesMode();
+
+ _passwordControl.GetText(Password);
+
+ #endif
+
+ #ifndef NO_REGISTRY
+
+ // GetButton_Bools(IDX_EXTRACT_ALT_STREAMS, AltStreams, _info.AltStreams);
+ GetButton_Bools(IDX_EXTRACT_NT_SECUR, NtSecurity, _info.NtSecurity);
+ GetButton_Bools(IDX_EXTRACT_ELIM_DUP, ElimDup, _info.ElimDup);
+
+ bool showPassword = IsShowPasswordChecked();
+ if (showPassword != _info.ShowPassword.Val)
+ {
+ _info.ShowPassword.Def = true;
+ _info.ShowPassword.Val = showPassword;
+ }
+
+ if (_info.PathMode != pathMode2)
+ {
+ _info.PathMode_Force = true;
+ _info.PathMode = (NExtract::NPathMode::EEnum)pathMode2;
+ /*
+ // we allow kAbsPaths in registry.
+ if (_info.PathMode == NExtract::NPathMode::kAbsPaths)
+ _info.PathMode = NExtract::NPathMode::kFullPaths;
+ */
+ }
+
+ if (!OverwriteMode_Force && _info.OverwriteMode != OverwriteMode)
+ _info.OverwriteMode_Force = true;
+ _info.OverwriteMode = OverwriteMode;
+
+
+ #else
+
+ ElimDup.Val = IsButtonCheckedBool(IDX_EXTRACT_ELIM_DUP);
+
+ #endif
+
+ UString s;
+
+ #ifdef NO_REGISTRY
+
+ _path.GetText(s);
+
+ #else
+
+ int currentItem = _path.GetCurSel();
+ if (currentItem == CB_ERR)
+ {
+ _path.GetText(s);
+ if (_path.GetCount() >= kHistorySize)
+ currentItem = _path.GetCount() - 1;
+ }
+ else
+ _path.GetLBText(currentItem, s);
+
+ #endif
+
+ s.Trim();
+ NName::NormalizeDirPathPrefix(s);
+
+ #ifndef _SFX
+
+ bool splitDest = IsButtonCheckedBool(IDX_EXTRACT_NAME_ENABLE);
+ if (splitDest)
+ {
+ UString pathName;
+ _pathName.GetText(pathName);
+ pathName.Trim();
+ s += pathName;
+ NName::NormalizeDirPathPrefix(s);
+ }
+ if (splitDest != _info.SplitDest.Val)
+ {
+ _info.SplitDest.Def = true;
+ _info.SplitDest.Val = splitDest;
+ }
+
+ #endif
+
+ DirPath = s;
+
+ #ifndef NO_REGISTRY
+ _info.Paths.Clear();
+ #ifndef _SFX
+ AddUniqueString(_info.Paths, s);
+ #endif
+ for (int i = 0; i < _path.GetCount(); i++)
+ if (i != currentItem)
+ {
+ UString sTemp;
+ _path.GetLBText(i, sTemp);
+ sTemp.Trim();
+ AddUniqueString(_info.Paths, sTemp);
+ }
+ _info.Save();
+ #endif
+
+ CModalDialog::OnOK();
+}
+
+#ifndef NO_REGISTRY
+static LPCWSTR kHelpTopic = L"fm/plugins/7-zip/extract.htm";
+void CExtractDialog::OnHelp()
+{
+ ShowHelpWindow(NULL, kHelpTopic);
+ CModalDialog::OnHelp();
+}
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.h b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.h
new file mode 100644
index 00000000000..33349ffc615
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.h
@@ -0,0 +1,113 @@
+// ExtractDialog.h
+
+#ifndef __EXTRACT_DIALOG_H
+#define __EXTRACT_DIALOG_H
+
+#include "ExtractDialogRes.h"
+
+#include "../../../Windows/Control/ComboBox.h"
+#include "../../../Windows/Control/Edit.h"
+
+#include "../Common/ExtractMode.h"
+
+#include "../FileManager/DialogSize.h"
+
+#ifndef NO_REGISTRY
+#include "../Common/ZipRegistry.h"
+#endif
+
+namespace NExtractionDialog
+{
+ /*
+ namespace NFilesMode
+ {
+ enum EEnum
+ {
+ kSelected,
+ kAll,
+ kSpecified
+ };
+ }
+ */
+}
+
+class CExtractDialog: public NWindows::NControl::CModalDialog
+{
+ #ifdef NO_REGISTRY
+ NWindows::NControl::CDialogChildControl _path;
+ #else
+ NWindows::NControl::CComboBox _path;
+ #endif
+
+ #ifndef _SFX
+ NWindows::NControl::CEdit _pathName;
+ NWindows::NControl::CEdit _passwordControl;
+ NWindows::NControl::CComboBox _pathMode;
+ NWindows::NControl::CComboBox _overwriteMode;
+ #endif
+
+ #ifndef _SFX
+ // int GetFilesMode() const;
+ void UpdatePasswordControl();
+ #endif
+
+ void OnButtonSetPath();
+
+ void CheckButton_TwoBools(UINT id, const CBoolPair &b1, const CBoolPair &b2);
+ void GetButton_Bools(UINT id, CBoolPair &b1, CBoolPair &b2);
+ virtual bool OnInit();
+ virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
+ virtual void OnOK();
+
+ #ifndef NO_REGISTRY
+
+ virtual void OnHelp();
+
+ NExtract::CInfo _info;
+
+ #endif
+
+ bool IsShowPasswordChecked() const { return IsButtonCheckedBool(IDX_PASSWORD_SHOW); }
+public:
+ // bool _enableSelectedFilesButton;
+ // bool _enableFilesButton;
+ // NExtractionDialog::NFilesMode::EEnum FilesMode;
+
+ UString DirPath;
+ UString ArcPath;
+
+ #ifndef _SFX
+ UString Password;
+ #endif
+ bool PathMode_Force;
+ bool OverwriteMode_Force;
+ NExtract::NPathMode::EEnum PathMode;
+ NExtract::NOverwriteMode::EEnum OverwriteMode;
+
+ #ifndef _SFX
+ // CBoolPair AltStreams;
+ CBoolPair NtSecurity;
+ #endif
+
+ CBoolPair ElimDup;
+
+ INT_PTR Create(HWND aWndParent = 0)
+ {
+ #ifdef _SFX
+ BIG_DIALOG_SIZE(240, 64);
+ #else
+ BIG_DIALOG_SIZE(300, 160);
+ #endif
+ return CModalDialog::Create(SIZED_DIALOG(IDD_EXTRACT), aWndParent);
+ }
+
+ CExtractDialog():
+ PathMode_Force(false),
+ OverwriteMode_Force(false)
+ {
+ ElimDup.Val = true;
+ }
+
+};
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc
new file mode 100644
index 00000000000..3728b96d289
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc
@@ -0,0 +1,98 @@
+#include "ExtractDialogRes.h"
+#include "../../GuiCommon.rc"
+
+#define xc 336
+#define yc 168
+
+#undef g1xs
+#undef g2x
+#undef g2x2
+#undef g2xs
+#undef g2xs2
+
+#define g1xs 160
+
+#define gSpace 20
+#define g2x (m + g1xs + gSpace)
+#define g2x2 (g2x + m)
+#define g2xs (xc - g1xs - gSpace)
+#define g2xs2 (g2xs - m - m)
+
+#undef GROUP_Y_SIZE
+#ifdef UNDER_CE
+#define GROUP_Y_SIZE 8
+#else
+#define GROUP_Y_SIZE 56
+#endif
+
+IDD_EXTRACT DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
+CAPTION "Extract"
+BEGIN
+ LTEXT "E&xtract to:", IDT_EXTRACT_EXTRACT_TO, m, m, xc, 8
+ COMBOBOX IDC_EXTRACT_PATH, m, m + 12, xc - bxsDots - 12, 100, MY_COMBO_WITH_EDIT
+ PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots, m + 12 - 2, bxsDots, bys, WS_GROUP
+
+ CONTROL "", IDX_EXTRACT_NAME_ENABLE, MY_CHECKBOX, m, m + 34, 12, 10
+ EDITTEXT IDE_EXTRACT_NAME, m + 12 + 2, m + 32, g1xs - 12 - 2, 14, ES_AUTOHSCROLL
+
+ LTEXT "Path mode:", IDT_EXTRACT_PATH_MODE, m, m + 52, g1xs, 8
+ COMBOBOX IDC_EXTRACT_PATH_MODE, m, m + 64, g1xs, 140, MY_COMBO
+
+ CONTROL "Eliminate duplication of root folder", IDX_EXTRACT_ELIM_DUP, MY_CHECKBOX,
+ m, m + 84, g1xs, 10
+
+ LTEXT "Overwrite mode:", IDT_EXTRACT_OVERWRITE_MODE, m, m + 104, g1xs, 8
+ COMBOBOX IDC_EXTRACT_OVERWRITE_MODE, m, m + 116, g1xs, 140, MY_COMBO
+
+
+ GROUPBOX "Password", IDG_PASSWORD, g2x, m + 36, g2xs, GROUP_Y_SIZE
+ EDITTEXT IDE_EXTRACT_PASSWORD, g2x2, m + 50, g2xs2, 14, ES_PASSWORD | ES_AUTOHSCROLL
+ CONTROL "Show Password", IDX_PASSWORD_SHOW, MY_CHECKBOX, g2x2, m + 72, g2xs2, 10
+
+// CONTROL "Restore alternate data streams", IDX_EXTRACT_ALT_STREAMS, MY_CHECKBOX,
+// g2x, m + 104, g2xs, 10
+ CONTROL "Restore file security", IDX_EXTRACT_NT_SECUR, MY_CHECKBOX,
+ g2x, m + 104, g2xs, 10
+
+ DEFPUSHBUTTON "OK", IDOK, bx3, by, bxs, bys, WS_GROUP
+ PUSHBUTTON "Cancel", IDCANCEL, bx2, by, bxs, bys
+ PUSHBUTTON "Help", IDHELP, bx1, by, bxs, bys
+END
+
+
+#ifdef UNDER_CE
+
+#undef m
+#define m 4
+
+#undef xc
+#undef yc
+
+#define xc 152
+#define yc 128
+
+#undef g1xs
+
+#define g1xs 64
+
+IDD_EXTRACT_2 DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
+CAPTION "Extract"
+BEGIN
+ LTEXT "E&xtract to:", IDT_EXTRACT_EXTRACT_TO, m, m, xc - bxsDots - 8, 8
+ COMBOBOX IDC_EXTRACT_PATH, m, m + 12, xc - bxsDots - 8, 100, MY_COMBO_WITH_EDIT
+ PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots, m + 12 - 3, bxsDots, bys, WS_GROUP
+
+ LTEXT "Path mode:", IDT_EXTRACT_PATH_MODE, m, m + 36, g1xs, 8
+ COMBOBOX IDC_EXTRACT_PATH_MODE, m + g1xs, m + 36, xc - g1xs, 100, MY_COMBO
+
+ LTEXT "Overwrite mode:", IDT_EXTRACT_OVERWRITE_MODE, m, m + 56, g1xs, 8
+ COMBOBOX IDC_EXTRACT_OVERWRITE_MODE, m + g1xs, m + 56, xc - g1xs, 100, MY_COMBO
+
+ LTEXT "Password", IDG_PASSWORD, m, m + 76, g1xs, 8
+ EDITTEXT IDE_EXTRACT_PASSWORD, m + g1xs, m + 76, xc - g1xs, 14, ES_PASSWORD | ES_AUTOHSCROLL
+ CONTROL "Show Password", IDX_PASSWORD_SHOW, MY_CHECKBOX, m, m + 92, xc, 10
+
+ OK_CANCEL
+END
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h
new file mode 100644
index 00000000000..ed12bfb315f
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h
@@ -0,0 +1,24 @@
+#define IDD_EXTRACT 3400
+#define IDD_EXTRACT_2 13400
+
+#define IDC_EXTRACT_PATH 100
+#define IDB_EXTRACT_SET_PATH 101
+#define IDC_EXTRACT_PATH_MODE 102
+#define IDC_EXTRACT_OVERWRITE_MODE 103
+
+#define IDE_EXTRACT_PASSWORD 120
+
+#define IDE_EXTRACT_NAME 130
+#define IDX_EXTRACT_NAME_ENABLE 131
+
+
+#define IDT_EXTRACT_EXTRACT_TO 3401
+#define IDT_EXTRACT_PATH_MODE 3410
+#define IDT_EXTRACT_OVERWRITE_MODE 3420
+
+#define IDX_EXTRACT_ELIM_DUP 3430
+#define IDX_EXTRACT_NT_SECUR 3431
+// #define IDX_EXTRACT_ALT_STREAMS 3432
+
+#define IDX_PASSWORD_SHOW 3803
+#define IDG_PASSWORD 3807
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp
new file mode 100644
index 00000000000..7fb843a15fc
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp
@@ -0,0 +1,272 @@
+// ExtractGUI.cpp
+
+#include "StdAfx.h"
+
+#include "../../../Common/IntToString.h"
+#include "../../../Common/StringConvert.h"
+
+#include "../../../Windows/FileDir.h"
+#include "../../../Windows/FileFind.h"
+#include "../../../Windows/FileName.h"
+#include "../../../Windows/Thread.h"
+
+#include "../FileManager/ExtractCallback.h"
+#include "../FileManager/FormatUtils.h"
+#include "../FileManager/LangUtils.h"
+#include "../FileManager/resourceGui.h"
+#include "../FileManager/OverwriteDialogRes.h"
+
+#include "../Common/ArchiveExtractCallback.h"
+#include "../Common/PropIDUtils.h"
+
+#include "../Explorer/MyMessages.h"
+
+#include "resource2.h"
+#include "ExtractRes.h"
+
+#include "ExtractDialog.h"
+#include "ExtractGUI.h"
+#include "HashGUI.h"
+
+#include "../FileManager/PropertyNameRes.h"
+
+using namespace NWindows;
+using namespace NFile;
+using namespace NDir;
+
+static const wchar_t *kIncorrectOutDir = L"Incorrect output directory path";
+
+#ifndef _SFX
+
+static void AddValuePair(UString &s, UINT resourceID, UInt64 value, bool addColon = true)
+{
+ AddLangString(s, resourceID);
+ if (addColon)
+ s += L':';
+ s.Add_Space();
+ char sz[32];
+ ConvertUInt64ToString(value, sz);
+ s.AddAscii(sz);
+ s.Add_LF();
+}
+
+static void AddSizePair(UString &s, UINT resourceID, UInt64 value)
+{
+ wchar_t sz[32];
+ AddLangString(s, resourceID);
+ s += L": ";
+ ConvertUInt64ToString(value, sz);
+ s += MyFormatNew(IDS_FILE_SIZE, sz);
+ // s += sz;
+ if (value >= (1 << 20))
+ {
+ ConvertUInt64ToString(value >> 20, sz);
+ s += L" (";
+ s += sz;
+ s += L" MB)";
+ }
+ s.Add_LF();
+}
+
+#endif
+
+class CThreadExtracting: public CProgressThreadVirt
+{
+ HRESULT ProcessVirt();
+public:
+ CCodecs *codecs;
+ CExtractCallbackImp *ExtractCallbackSpec;
+ const CObjectVector<COpenType> *FormatIndices;
+ const CIntVector *ExcludedFormatIndices;
+
+ UStringVector *ArchivePaths;
+ UStringVector *ArchivePathsFull;
+ const NWildcard::CCensorNode *WildcardCensor;
+ const CExtractOptions *Options;
+ #ifndef _SFX
+ CHashBundle *HashBundle;
+ #endif
+ CMyComPtr<IExtractCallbackUI> ExtractCallback;
+ UString Title;
+};
+
+HRESULT CThreadExtracting::ProcessVirt()
+{
+ CDecompressStat Stat;
+ #ifndef _SFX
+ if (HashBundle)
+ HashBundle->Init();
+ #endif
+
+ HRESULT res = Extract(codecs,
+ *FormatIndices, *ExcludedFormatIndices,
+ *ArchivePaths, *ArchivePathsFull,
+ *WildcardCensor, *Options, ExtractCallbackSpec, ExtractCallback,
+ #ifndef _SFX
+ HashBundle,
+ #endif
+ FinalMessage.ErrorMessage.Message, Stat);
+ #ifndef _SFX
+ if (res == S_OK && Options->TestMode && ExtractCallbackSpec->IsOK())
+ {
+ UString s;
+
+ AddValuePair(s, IDS_ARCHIVES_COLON, Stat.NumArchives, false);
+ AddSizePair(s, IDS_PROP_PACKED_SIZE, Stat.PackSize);
+
+ if (!HashBundle)
+ {
+ if (Stat.NumFolders != 0)
+ AddValuePair(s, IDS_PROP_FOLDERS, Stat.NumFolders);
+ AddValuePair(s, IDS_PROP_FILES, Stat.NumFiles);
+ AddSizePair(s, IDS_PROP_SIZE, Stat.UnpackSize);
+ if (Stat.NumAltStreams != 0)
+ {
+ s.Add_LF();
+ AddValuePair(s, IDS_PROP_NUM_ALT_STREAMS, Stat.NumAltStreams);
+ AddSizePair(s, IDS_PROP_ALT_STREAMS_SIZE, Stat.AltStreams_UnpackSize);
+ }
+ }
+
+ if (HashBundle)
+ {
+ s.Add_LF();
+ AddHashBundleRes(s, *HashBundle, UString());
+ }
+
+ s.Add_LF();
+ AddLangString(s, IDS_MESSAGE_NO_ERRORS);
+
+ FinalMessage.OkMessage.Title = Title;
+ FinalMessage.OkMessage.Message = s;
+ }
+ #endif
+ return res;
+}
+
+HRESULT ExtractGUI(
+ CCodecs *codecs,
+ const CObjectVector<COpenType> &formatIndices,
+ const CIntVector &excludedFormatIndices,
+ UStringVector &archivePaths,
+ UStringVector &archivePathsFull,
+ const NWildcard::CCensorNode &wildcardCensor,
+ CExtractOptions &options,
+ #ifndef _SFX
+ CHashBundle *hb,
+ #endif
+ bool showDialog,
+ bool &messageWasDisplayed,
+ CExtractCallbackImp *extractCallback,
+ HWND hwndParent)
+{
+ messageWasDisplayed = false;
+
+ CThreadExtracting extracter;
+ extracter.codecs = codecs;
+ extracter.FormatIndices = &formatIndices;
+ extracter.ExcludedFormatIndices = &excludedFormatIndices;
+
+ if (!options.TestMode)
+ {
+ FString outputDir = options.OutputDir;
+ #ifndef UNDER_CE
+ if (outputDir.IsEmpty())
+ GetCurrentDir(outputDir);
+ #endif
+ if (showDialog)
+ {
+ CExtractDialog dialog;
+ FString outputDirFull;
+ if (!MyGetFullPathName(outputDir, outputDirFull))
+ {
+ ShowErrorMessage(kIncorrectOutDir);
+ messageWasDisplayed = true;
+ return E_FAIL;
+ }
+ NName::NormalizeDirPathPrefix(outputDirFull);
+
+ dialog.DirPath = fs2us(outputDirFull);
+
+ dialog.OverwriteMode = options.OverwriteMode;
+ dialog.OverwriteMode_Force = options.OverwriteMode_Force;
+ dialog.PathMode = options.PathMode;
+ dialog.PathMode_Force = options.PathMode_Force;
+ dialog.ElimDup = options.ElimDup;
+
+ if (archivePathsFull.Size() == 1)
+ dialog.ArcPath = archivePathsFull[0];
+
+ #ifndef _SFX
+ // dialog.AltStreams = options.NtOptions.AltStreams;
+ dialog.NtSecurity = options.NtOptions.NtSecurity;
+ if (extractCallback->PasswordIsDefined)
+ dialog.Password = extractCallback->Password;
+ #endif
+
+ if (dialog.Create(hwndParent) != IDOK)
+ return E_ABORT;
+
+ outputDir = us2fs(dialog.DirPath);
+
+ options.OverwriteMode = dialog.OverwriteMode;
+ options.PathMode = dialog.PathMode;
+ options.ElimDup = dialog.ElimDup;
+
+ #ifndef _SFX
+ // options.NtOptions.AltStreams = dialog.AltStreams;
+ options.NtOptions.NtSecurity = dialog.NtSecurity;
+ extractCallback->Password = dialog.Password;
+ extractCallback->PasswordIsDefined = !dialog.Password.IsEmpty();
+ #endif
+ }
+ if (!MyGetFullPathName(outputDir, options.OutputDir))
+ {
+ ShowErrorMessage(kIncorrectOutDir);
+ messageWasDisplayed = true;
+ return E_FAIL;
+ }
+ NName::NormalizeDirPathPrefix(options.OutputDir);
+
+ /*
+ if (!CreateComplexDirectory(options.OutputDir))
+ {
+ UString s = GetUnicodeString(NError::MyFormatMessage(GetLastError()));
+ UString s2 = MyFormatNew(IDS_CANNOT_CREATE_FOLDER,
+ #ifdef LANG
+ 0x02000603,
+ #endif
+ options.OutputDir);
+ s2.Add_LF();
+ s2 += s;
+ MyMessageBox(s2);
+ return E_FAIL;
+ }
+ */
+ }
+
+ UString title = LangString(options.TestMode ? IDS_PROGRESS_TESTING : IDS_PROGRESS_EXTRACTING);
+
+ extracter.Title = title;
+ extracter.ExtractCallbackSpec = extractCallback;
+ extracter.ExtractCallbackSpec->ProgressDialog = &extracter.ProgressDialog;
+ extracter.ExtractCallback = extractCallback;
+ extracter.ExtractCallbackSpec->Init();
+
+ extracter.ProgressDialog.CompressingMode = false;
+
+ extracter.ArchivePaths = &archivePaths;
+ extracter.ArchivePathsFull = &archivePathsFull;
+ extracter.WildcardCensor = &wildcardCensor;
+ extracter.Options = &options;
+ #ifndef _SFX
+ extracter.HashBundle = hb;
+ #endif
+
+ extracter.ProgressDialog.IconID = IDI_ICON;
+
+ RINOK(extracter.Create(title, hwndParent));
+ messageWasDisplayed = extracter.ThreadFinishedOK &
+ extracter.ProgressDialog.MessagesDisplayed;
+ return extracter.Result;
+}
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.h b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.h
new file mode 100644
index 00000000000..d55b30de15c
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.h
@@ -0,0 +1,38 @@
+// GUI/ExtractGUI.h
+
+#ifndef __EXTRACT_GUI_H
+#define __EXTRACT_GUI_H
+
+#include "../Common/Extract.h"
+
+#include "../FileManager/ExtractCallback.h"
+
+/*
+ RESULT can be S_OK, even if there are errors!!!
+ if RESULT == S_OK, check extractCallback->IsOK() after ExtractGUI().
+
+ RESULT = E_ABORT - user break.
+ RESULT != E_ABORT:
+ {
+ messageWasDisplayed = true - message was displayed already.
+ messageWasDisplayed = false - there was some internal error, so you must show error message.
+ }
+*/
+
+HRESULT ExtractGUI(
+ CCodecs *codecs,
+ const CObjectVector<COpenType> &formatIndices,
+ const CIntVector &excludedFormatIndices,
+ UStringVector &archivePaths,
+ UStringVector &archivePathsFull,
+ const NWildcard::CCensorNode &wildcardCensor,
+ CExtractOptions &options,
+ #ifndef _SFX
+ CHashBundle *hb,
+ #endif
+ bool showDialog,
+ bool &messageWasDisplayed,
+ CExtractCallbackImp *extractCallback,
+ HWND hwndParent = NULL);
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractRes.h b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractRes.h
new file mode 100644
index 00000000000..634ba6b5ff9
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractRes.h
@@ -0,0 +1,51 @@
+#define IDS_MEM_ERROR 3000
+
+#define IDS_CANNOT_CREATE_FOLDER 3003
+#define IDS_UPDATE_NOT_SUPPORTED 3004
+#define IDS_CANT_OPEN_ARCHIVE 3005
+#define IDS_CANT_OPEN_ENCRYPTED_ARCHIVE 3006
+#define IDS_UNSUPPORTED_ARCHIVE_TYPE 3007
+
+#define IDS_CANT_OPEN_AS_TYPE 3017
+#define IDS_IS_OPEN_AS_TYPE 3018
+#define IDS_IS_OPEN_WITH_OFFSET 3019
+
+#define IDS_PROGRESS_EXTRACTING 3300
+
+#define IDS_PROGRESS_SKIPPING 3325
+
+#define IDS_EXTRACT_SET_FOLDER 3402
+
+#define IDS_EXTRACT_PATHS_FULL 3411
+#define IDS_EXTRACT_PATHS_NO 3412
+#define IDS_EXTRACT_PATHS_ABS 3413
+#define IDS_PATH_MODE_RELAT 3414
+
+#define IDS_EXTRACT_OVERWRITE_ASK 3421
+#define IDS_EXTRACT_OVERWRITE_WITHOUT_PROMPT 3422
+#define IDS_EXTRACT_OVERWRITE_SKIP_EXISTING 3423
+#define IDS_EXTRACT_OVERWRITE_RENAME 3424
+#define IDS_EXTRACT_OVERWRITE_RENAME_EXISTING 3425
+
+#define IDS_EXTRACT_MESSAGE_UNSUPPORTED_METHOD 3700
+#define IDS_EXTRACT_MESSAGE_DATA_ERROR 3701
+#define IDS_EXTRACT_MESSAGE_CRC_ERROR 3702
+#define IDS_EXTRACT_MESSAGE_DATA_ERROR_ENCRYPTED 3703
+#define IDS_EXTRACT_MESSAGE_CRC_ERROR_ENCRYPTED 3704
+
+#define IDS_EXTRACT_MSG_WRONG_PSW_GUESS 3710
+// #define IDS_EXTRACT_MSG_ENCRYPTED 3711
+
+#define IDS_EXTRACT_MSG_UNSUPPORTED_METHOD 3721
+#define IDS_EXTRACT_MSG_DATA_ERROR 3722
+#define IDS_EXTRACT_MSG_CRC_ERROR 3723
+#define IDS_EXTRACT_MSG_UNAVAILABLE_DATA 3724
+#define IDS_EXTRACT_MSG_UEXPECTED_END 3725
+#define IDS_EXTRACT_MSG_DATA_AFTER_END 3726
+#define IDS_EXTRACT_MSG_IS_NOT_ARC 3727
+#define IDS_EXTRACT_MSG_HEADERS_ERROR 3728
+#define IDS_EXTRACT_MSG_WRONG_PSW_CLAIM 3729
+
+#define IDS_OPEN_MSG_UNAVAILABLE_START 3763
+#define IDS_OPEN_MSG_UNCONFIRMED_START 3764
+#define IDS_OPEN_MSG_UNSUPPORTED_FEATURE 3768
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/HashGUI.h b/3rdparty/lzma/CPP/7zip/UI/GUI/HashGUI.h
new file mode 100644
index 00000000000..40340365abe
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/HashGUI.h
@@ -0,0 +1,16 @@
+// HashGUI.h
+
+#ifndef __HASH_GUI_H
+#define __HASH_GUI_H
+
+#include "../Common/HashCalc.h"
+
+HRESULT HashCalcGUI(
+ DECL_EXTERNAL_CODECS_LOC_VARS
+ const NWildcard::CCensor &censor,
+ const CHashOptions &options,
+ bool &messageWasDisplayed);
+
+void AddHashBundleRes(UString &s, const CHashBundle &hb, const UString &firstFileName);
+
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/resource2.h b/3rdparty/lzma/CPP/7zip/UI/GUI/resource2.h
new file mode 100644
index 00000000000..cd8829245b1
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/resource2.h
@@ -0,0 +1,2 @@
+#define IDS_PROGRESS_COMPRESSING 3301
+#define IDS_ARCHIVES_COLON 3907
diff --git a/3rdparty/lzma/CPP/Build.mak b/3rdparty/lzma/CPP/Build.mak
index b3465d4410a..ef0ed0c4112 100644
--- a/3rdparty/lzma/CPP/Build.mak
+++ b/3rdparty/lzma/CPP/Build.mak
@@ -1,11 +1,10 @@
LIBS = $(LIBS) oleaut32.lib ole32.lib
-!IFDEF CPU
-!IFNDEF NO_BUFFEROVERFLOWU
-LIBS = $(LIBS) bufferoverflowU.lib
-!ENDIF
+!IFNDEF MY_NO_UNICODE
+CFLAGS = $(CFLAGS) -DUNICODE -D_UNICODE
!ENDIF
+# CFLAGS = $(CFLAGS) -FAsc -Fa$O/Asm/
!IFNDEF O
!IFDEF CPU
@@ -43,7 +42,7 @@ COMPL_ASM = $(MY_ML) $** $O/$(*B).obj
COMPL_ASM = $(MY_ML) -c -Fo$O/ $**
!ENDIF
-CFLAGS = $(CFLAGS) -nologo -c -Fo$O/ -WX -EHsc -Gy -GR-
+CFLAGS = $(CFLAGS) -nologo -c -Fo$O/ -W4 -WX -EHsc -Gy -GR- -GF
!IFDEF MY_STATIC_LINK
!IFNDEF MY_SINGLE_THREAD
@@ -54,9 +53,12 @@ CFLAGS = $(CFLAGS) -MD
!ENDIF
!IFDEF NEW_COMPILER
-CFLAGS = $(CFLAGS) -W4 -GS- -Zc:forScope
+CFLAGS = $(CFLAGS) -GS- -Zc:forScope
+!IFNDEF UNDER_CE
+CFLAGS = $(CFLAGS) -MP2
+!ENDIF
!ELSE
-CFLAGS = $(CFLAGS) -W3
+CFLAGS = $(CFLAGS)
!ENDIF
CFLAGS_O1 = $(CFLAGS) -O1
@@ -72,6 +74,13 @@ LFLAGS = $(LFLAGS) /LARGEADDRESSAWARE
LFLAGS = $(LFLAGS) -DLL -DEF:$(DEF_FILE)
!ENDIF
+MY_SUB_SYS_VER=6.0
+!IFDEF MY_CONSOLE
+# LFLAGS = $(LFLAGS) /SUBSYSTEM:console,$(MY_SUB_SYS_VER)
+!ELSE
+# LFLAGS = $(LFLAGS) /SUBSYSTEM:windows,$(MY_SUB_SYS_VER)
+!ENDIF
+
PROGPATH = $O\$(PROG)
COMPL_O1 = $(CC) $(CFLAGS_O1) $**
@@ -79,15 +88,27 @@ COMPL_O2 = $(CC) $(CFLAGS_O2) $**
COMPL_PCH = $(CC) $(CFLAGS_O1) -Yc"StdAfx.h" -Fp$O/a.pch $**
COMPL = $(CC) $(CFLAGS_O1) -Yu"StdAfx.h" -Fp$O/a.pch $**
+COMPLB = $(CC) $(CFLAGS_O1) -Yu"StdAfx.h" -Fp$O/a.pch $<
+# COMPLB_O2 = $(CC) $(CFLAGS_O2) -Yu"StdAfx.h" -Fp$O/a.pch $<
+COMPLB_O2 = $(CC) $(CFLAGS_O2) $<
+
+CCOMPL_PCH = $(CC) $(CFLAGS_O2) -Yc"Precomp.h" -Fp$O/a.pch $**
+CCOMPL_USE = $(CC) $(CFLAGS_O2) -Yu"Precomp.h" -Fp$O/a.pch $**
+CCOMPL = $(CC) $(CFLAGS_O2) $**
+CCOMPLB = $(CC) $(CFLAGS_O2) $<
+
+
all: $(PROGPATH)
clean:
- -del /Q $(PROGPATH) $O\*.exe $O\*.dll $O\*.obj $O\*.lib $O\*.exp $O\*.res $O\*.pch
+ -del /Q $(PROGPATH) $O\*.exe $O\*.dll $O\*.obj $O\*.lib $O\*.exp $O\*.res $O\*.pch $O\*.asm
$O:
if not exist "$O" mkdir "$O"
+$O/Asm:
+ if not exist "$O/Asm" mkdir "$O/Asm"
-$(PROGPATH): $O $(OBJS) $(DEF_FILE)
+$(PROGPATH): $O $O/Asm $(OBJS) $(DEF_FILE)
link $(LFLAGS) -out:$(PROGPATH) $(OBJS) $(LIBS)
!IFNDEF NO_DEFAULT_RES
diff --git a/3rdparty/lzma/CPP/Common/Buffer.h b/3rdparty/lzma/CPP/Common/Buffer.h
deleted file mode 100644
index 118fe11fced..00000000000
--- a/3rdparty/lzma/CPP/Common/Buffer.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Common/Buffer.h
-
-#ifndef __COMMON_BUFFER_H
-#define __COMMON_BUFFER_H
-
-#include "Defs.h"
-
-template <class T> class CBuffer
-{
-protected:
- size_t _capacity;
- T *_items;
-public:
- void Free()
- {
- delete []_items;
- _items = 0;
- _capacity = 0;
- }
- CBuffer(): _capacity(0), _items(0) {};
- CBuffer(const CBuffer &buffer): _capacity(0), _items(0) { *this = buffer; }
- CBuffer(size_t size): _items(0), _capacity(0) { SetCapacity(size); }
- virtual ~CBuffer() { delete []_items; }
- operator T *() { return _items; };
- operator const T *() const { return _items; };
- size_t GetCapacity() const { return _capacity; }
- void SetCapacity(size_t newCapacity)
- {
- if (newCapacity == _capacity)
- return;
- T *newBuffer;
- if (newCapacity > 0)
- {
- newBuffer = new T[newCapacity];
- if (_capacity > 0)
- memmove(newBuffer, _items, MyMin(_capacity, newCapacity) * sizeof(T));
- }
- else
- newBuffer = 0;
- delete []_items;
- _items = newBuffer;
- _capacity = newCapacity;
- }
- CBuffer& operator=(const CBuffer &buffer)
- {
- Free();
- if (buffer._capacity > 0)
- {
- SetCapacity(buffer._capacity);
- memmove(_items, buffer._items, buffer._capacity * sizeof(T));
- }
- return *this;
- }
-};
-
-template <class T>
-bool operator==(const CBuffer<T>& b1, const CBuffer<T>& b2)
-{
- if (b1.GetCapacity() != b2.GetCapacity())
- return false;
- for (size_t i = 0; i < b1.GetCapacity(); i++)
- if (b1[i] != b2[i])
- return false;
- return true;
-}
-
-template <class T>
-bool operator!=(const CBuffer<T>& b1, const CBuffer<T>& b2)
-{
- return !(b1 == b2);
-}
-
-typedef CBuffer<char> CCharBuffer;
-typedef CBuffer<wchar_t> CWCharBuffer;
-typedef CBuffer<unsigned char> CByteBuffer;
-
-#endif
diff --git a/3rdparty/lzma/CPP/Common/C_FileIO.h b/3rdparty/lzma/CPP/Common/C_FileIO.h
index ff7a1a1166a..ff4ec162c59 100644
--- a/3rdparty/lzma/CPP/Common/C_FileIO.h
+++ b/3rdparty/lzma/CPP/Common/C_FileIO.h
@@ -6,12 +6,14 @@
#include <stdio.h>
#include <sys/types.h>
-#include "Types.h"
+#include "MyTypes.h"
#include "MyWindows.h"
#ifdef _WIN32
+#ifdef _MSC_VER
typedef size_t ssize_t;
#endif
+#endif
namespace NC {
namespace NFile {
diff --git a/3rdparty/lzma/CPP/Common/CommandLineParser.cpp b/3rdparty/lzma/CPP/Common/CommandLineParser.cpp
index 80b467fcb58..1c7f26547c8 100644
--- a/3rdparty/lzma/CPP/Common/CommandLineParser.cpp
+++ b/3rdparty/lzma/CPP/Common/CommandLineParser.cpp
@@ -4,6 +4,20 @@
#include "CommandLineParser.h"
+static bool IsString1PrefixedByString2_NoCase(const wchar_t *u, const char *a)
+{
+ for (;;)
+ {
+ char c = *a;
+ if (c == 0)
+ return true;
+ if ((unsigned char)MyCharLower_Ascii(c) != MyCharLower_Ascii(*u))
+ return false;
+ a++;
+ u++;
+ }
+}
+
namespace NCommandLineParser {
bool SplitCommandLine(const UString &src, UString &dest1, UString &dest2)
@@ -11,13 +25,13 @@ bool SplitCommandLine(const UString &src, UString &dest1, UString &dest2)
dest1.Empty();
dest2.Empty();
bool quoteMode = false;
- int i;
- for (i = 0; i < src.Length(); i++)
+ unsigned i;
+ for (i = 0; i < src.Len(); i++)
{
wchar_t c = src[i];
- if (c == L' ' && !quoteMode)
+ if ((c == L' ' || c == L'\t') && !quoteMode)
{
- dest2 = src.Mid(i + 1);
+ dest2 = src.Ptr(i + 1);
return i != 0;
}
if (c == L'\"')
@@ -45,21 +59,18 @@ void SplitCommandLine(const UString &s, UStringVector &parts)
}
-static const wchar_t kSwitchID1 = '-';
-// static const wchar_t kSwitchID2 = '/';
+static const char *kStopSwitchParsing = "--";
-static const wchar_t kSwitchMinus = '-';
-static const wchar_t *kStopSwitchParsing = L"--";
-
-static bool IsItSwitchChar(wchar_t c)
+static bool inline IsItSwitchChar(wchar_t c)
{
- return (c == kSwitchID1 /*|| c == kSwitchID2 */);
+ return (c == '-');
}
-CParser::CParser(int numSwitches):
- _numSwitches(numSwitches)
+CParser::CParser(unsigned numSwitches):
+ _numSwitches(numSwitches),
+ _switches(0)
{
- _switches = new CSwitchResult[_numSwitches];
+ _switches = new CSwitchResult[numSwitches];
}
CParser::~CParser()
@@ -67,163 +78,126 @@ CParser::~CParser()
delete []_switches;
}
-void CParser::ParseStrings(const CSwitchForm *switchForms,
- const UStringVector &commandStrings)
-{
- int numCommandStrings = commandStrings.Size();
- bool stopSwitch = false;
- for (int i = 0; i < numCommandStrings; i++)
- {
- const UString &s = commandStrings[i];
- if (stopSwitch)
- NonSwitchStrings.Add(s);
- else
- if (s == kStopSwitchParsing)
- stopSwitch = true;
- else
- if (!ParseString(s, switchForms))
- NonSwitchStrings.Add(s);
- }
-}
-// if string contains switch then function updates switch structures
-// out: (string is a switch)
+// if (s) contains switch then function updates switch structures
+// out: true, if (s) is a switch
bool CParser::ParseString(const UString &s, const CSwitchForm *switchForms)
{
- int len = s.Length();
- if (len == 0)
- return false;
- int pos = 0;
- if (!IsItSwitchChar(s[pos]))
+ if (s.IsEmpty() || !IsItSwitchChar(s[0]))
return false;
- while (pos < len)
+
+ unsigned pos = 1;
+ unsigned switchIndex = 0;
+ int maxLen = -1;
+
+ for (unsigned i = 0; i < _numSwitches; i++)
{
- if (IsItSwitchChar(s[pos]))
- pos++;
- const int kNoLen = -1;
- int matchedSwitchIndex = 0; // GCC Warning
- int maxLen = kNoLen;
- for (int switchIndex = 0; switchIndex < _numSwitches; switchIndex++)
+ const char *key = switchForms[i].Key;
+ unsigned switchLen = MyStringLen(key);
+ if ((int)switchLen <= maxLen || pos + switchLen > s.Len())
+ continue;
+ if (IsString1PrefixedByString2_NoCase((const wchar_t *)s + pos, key))
{
- int switchLen = MyStringLen(switchForms[switchIndex].IDString);
- if (switchLen <= maxLen || pos + switchLen > len)
- continue;
+ switchIndex = i;
+ maxLen = switchLen;
+ }
+ }
+
+ if (maxLen < 0)
+ {
+ ErrorMessage = "Unknown switch:";
+ return false;
+ }
- UString temp = s + pos;
- temp = temp.Left(switchLen);
- if (temp.CompareNoCase(switchForms[switchIndex].IDString) == 0)
- // if (_strnicmp(switchForms[switchIndex].IDString, LPCSTR(s) + pos, switchLen) == 0)
+ pos += maxLen;
+
+ CSwitchResult &sw = _switches[switchIndex];
+ const CSwitchForm &form = switchForms[switchIndex];
+
+ if (!form.Multi && sw.ThereIs)
+ {
+ ErrorMessage = "Multiple instances for switch:";
+ return false;
+ }
+
+ sw.ThereIs = true;
+
+ int rem = s.Len() - pos;
+ if (rem < form.MinLen)
+ {
+ ErrorMessage = "Too short switch:";
+ return false;
+ }
+
+ sw.WithMinus = false;
+ sw.PostCharIndex = -1;
+
+ switch (form.Type)
+ {
+ case NSwitchType::kMinus:
+ if (rem == 1)
{
- matchedSwitchIndex = switchIndex;
- maxLen = switchLen;
+ sw.WithMinus = (s[pos] == '-');
+ if (sw.WithMinus)
+ return true;
+ ErrorMessage = "Incorrect switch postfix:";
+ return false;
}
- }
- if (maxLen == kNoLen)
- throw "maxLen == kNoLen";
- CSwitchResult &matchedSwitch = _switches[matchedSwitchIndex];
- const CSwitchForm &switchForm = switchForms[matchedSwitchIndex];
- if ((!switchForm.Multi) && matchedSwitch.ThereIs)
- throw "switch must be single";
- matchedSwitch.ThereIs = true;
- pos += maxLen;
- int tailSize = len - pos;
- NSwitchType::EEnum type = switchForm.Type;
- switch(type)
- {
- case NSwitchType::kPostMinus:
- {
- if (tailSize == 0)
- matchedSwitch.WithMinus = false;
- else
- {
- matchedSwitch.WithMinus = (s[pos] == kSwitchMinus);
- if (matchedSwitch.WithMinus)
- pos++;
- }
- break;
- }
- case NSwitchType::kPostChar:
- {
- if (tailSize < switchForm.MinLen)
- throw "switch is not full";
- UString set = switchForm.PostCharSet;
- const int kEmptyCharValue = -1;
- if (tailSize == 0)
- matchedSwitch.PostCharIndex = kEmptyCharValue;
- else
- {
- int index = set.Find(s[pos]);
- if (index < 0)
- matchedSwitch.PostCharIndex = kEmptyCharValue;
- else
- {
- matchedSwitch.PostCharIndex = index;
- pos++;
- }
- }
- break;
- }
- case NSwitchType::kLimitedPostString:
- case NSwitchType::kUnLimitedPostString:
+ break;
+
+ case NSwitchType::kChar:
+ if (rem == 1)
+ {
+ wchar_t c = s[pos];
+ if (c <= 0x7F)
{
- int minLen = switchForm.MinLen;
- if (tailSize < minLen)
- throw "switch is not full";
- if (type == NSwitchType::kUnLimitedPostString)
- {
- matchedSwitch.PostStrings.Add(s.Mid(pos));
+ sw.PostCharIndex = FindCharPosInString(form.PostCharSet, (char)c);
+ if (sw.PostCharIndex >= 0)
return true;
- }
- int maxLen = switchForm.MaxLen;
- UString stringSwitch = s.Mid(pos, minLen);
- pos += minLen;
- for (int i = minLen; i < maxLen && pos < len; i++, pos++)
- {
- wchar_t c = s[pos];
- if (IsItSwitchChar(c))
- break;
- stringSwitch += c;
- }
- matchedSwitch.PostStrings.Add(stringSwitch);
- break;
}
- case NSwitchType::kSimple:
- break;
- }
+ ErrorMessage = "Incorrect switch postfix:";
+ return false;
+ }
+ break;
+
+ case NSwitchType::kString:
+ sw.PostStrings.Add((const wchar_t *)s + pos);
+ return true;
}
- return true;
-}
-const CSwitchResult& CParser::operator[](size_t index) const
-{
- return _switches[index];
+ if (pos != s.Len())
+ {
+ ErrorMessage = "Too long switch:";
+ return false;
+ }
+ return true;
}
-/////////////////////////////////
-// Command parsing procedures
-
-int ParseCommand(int numCommandForms, const CCommandForm *commandForms,
- const UString &commandString, UString &postString)
+bool CParser::ParseStrings(const CSwitchForm *switchForms, const UStringVector &commandStrings)
{
- for (int i = 0; i < numCommandForms; i++)
+ ErrorLine.Empty();
+ bool stopSwitch = false;
+ FOR_VECTOR (i, commandStrings)
{
- const UString id = commandForms[i].IDString;
- if (commandForms[i].PostStringMode)
+ const UString &s = commandStrings[i];
+ if (!stopSwitch)
{
- if (commandString.Find(id) == 0)
+ if (s.IsEqualTo(kStopSwitchParsing))
{
- postString = commandString.Mid(id.Length());
- return i;
+ stopSwitch = true;
+ continue;
}
- }
- else
- if (commandString == id)
+ if (!s.IsEmpty() && IsItSwitchChar(s[0]))
{
- postString.Empty();
- return i;
+ if (ParseString(s, switchForms))
+ continue;
+ ErrorLine = s;
+ return false;
}
+ }
+ NonSwitchStrings.Add(s);
}
- return -1;
+ return true;
}
-
+
}
diff --git a/3rdparty/lzma/CPP/Common/CommandLineParser.h b/3rdparty/lzma/CPP/Common/CommandLineParser.h
index 3d0b41dd47b..c9fd2956186 100644
--- a/3rdparty/lzma/CPP/Common/CommandLineParser.h
+++ b/3rdparty/lzma/CPP/Common/CommandLineParser.h
@@ -10,63 +10,54 @@ namespace NCommandLineParser {
bool SplitCommandLine(const UString &src, UString &dest1, UString &dest2);
void SplitCommandLine(const UString &s, UStringVector &parts);
-namespace NSwitchType {
+namespace NSwitchType
+{
enum EEnum
{
kSimple,
- kPostMinus,
- kLimitedPostString,
- kUnLimitedPostString,
- kPostChar
+ kMinus,
+ kString,
+ kChar
};
}
struct CSwitchForm
{
- const wchar_t *IDString;
- NSwitchType::EEnum Type;
+ const char *Key;
+ Byte Type;
bool Multi;
- int MinLen;
- int MaxLen;
- const wchar_t *PostCharSet;
+ Byte MinLen;
+ // int MaxLen;
+ const char *PostCharSet;
};
struct CSwitchResult
{
bool ThereIs;
bool WithMinus;
- UStringVector PostStrings;
int PostCharIndex;
+ UStringVector PostStrings;
+
CSwitchResult(): ThereIs(false) {};
};
class CParser
{
- int _numSwitches;
+ unsigned _numSwitches;
CSwitchResult *_switches;
+
bool ParseString(const UString &s, const CSwitchForm *switchForms);
public:
UStringVector NonSwitchStrings;
- CParser(int numSwitches);
+ AString ErrorMessage;
+ UString ErrorLine;
+
+ CParser(unsigned numSwitches);
~CParser();
- void ParseStrings(const CSwitchForm *switchForms,
- const UStringVector &commandStrings);
- const CSwitchResult& operator[](size_t index) const;
+ bool ParseStrings(const CSwitchForm *switchForms, const UStringVector &commandStrings);
+ const CSwitchResult& operator[](size_t index) const { return _switches[index]; }
};
-/////////////////////////////////
-// Command parsing procedures
-
-struct CCommandForm
-{
- const wchar_t *IDString;
- bool PostStringMode;
-};
-
-// Returns: Index of form and postString; -1, if there is no match
-int ParseCommand(int numCommandForms, const CCommandForm *commandForms,
- const UString &commandString, UString &postString);
-
}
#endif
diff --git a/3rdparty/lzma/CPP/Common/Common.h b/3rdparty/lzma/CPP/Common/Common.h
new file mode 100644
index 00000000000..9dd30f4bef2
--- /dev/null
+++ b/3rdparty/lzma/CPP/Common/Common.h
@@ -0,0 +1,13 @@
+// Common.h
+
+#ifndef __COMMON_COMMON_H
+#define __COMMON_COMMON_H
+
+#include "../../C/Compiler.h"
+
+#include "MyWindows.h"
+#include "NewHandler.h"
+
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[1]))
+
+#endif
diff --git a/3rdparty/lzma/CPP/Common/CrcReg.cpp b/3rdparty/lzma/CPP/Common/CrcReg.cpp
new file mode 100644
index 00000000000..2c343b3108a
--- /dev/null
+++ b/3rdparty/lzma/CPP/Common/CrcReg.cpp
@@ -0,0 +1,98 @@
+// CrcReg.cpp
+
+#include "StdAfx.h"
+
+#include "../../C/7zCrc.h"
+#include "../../C/CpuArch.h"
+
+#include "../Common/MyCom.h"
+
+#include "../7zip/Common/RegisterCodec.h"
+
+EXTERN_C_BEGIN
+
+typedef UInt32 (MY_FAST_CALL *CRC_FUNC)(UInt32 v, const void *data, size_t size, const UInt32 *table);
+
+UInt32 MY_FAST_CALL CrcUpdateT1(UInt32 v, const void *data, size_t size, const UInt32 *table);
+
+extern CRC_FUNC g_CrcUpdate;
+extern CRC_FUNC g_CrcUpdateT8;
+extern CRC_FUNC g_CrcUpdateT4;
+
+EXTERN_C_END
+
+class CCrcHasher:
+ public IHasher,
+ public ICompressSetCoderProperties,
+ public CMyUnknownImp
+{
+ UInt32 _crc;
+ CRC_FUNC _updateFunc;
+ Byte mtDummy[1 << 7];
+
+ bool SetFunctions(UInt32 tSize);
+public:
+ CCrcHasher(): _crc(CRC_INIT_VAL) { SetFunctions(0); }
+
+ MY_UNKNOWN_IMP1(ICompressSetCoderProperties)
+ INTERFACE_IHasher(;)
+ STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps);
+};
+
+bool CCrcHasher::SetFunctions(UInt32 tSize)
+{
+ _updateFunc = g_CrcUpdate;
+
+ if (tSize == 1)
+ _updateFunc = CrcUpdateT1;
+ else if (tSize == 4)
+ {
+ if (g_CrcUpdateT4)
+ _updateFunc = g_CrcUpdateT4;
+ else
+ return false;
+ }
+ else if (tSize == 8)
+ {
+ if (g_CrcUpdateT8)
+ _updateFunc = g_CrcUpdateT8;
+ else
+ return false;
+ }
+
+ return true;
+}
+
+STDMETHODIMP CCrcHasher::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *coderProps, UInt32 numProps)
+{
+ for (UInt32 i = 0; i < numProps; i++)
+ {
+ const PROPVARIANT &prop = coderProps[i];
+ if (propIDs[i] == NCoderPropID::kDefaultProp)
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ if (!SetFunctions(prop.ulVal))
+ return E_NOTIMPL;
+ }
+ }
+ return S_OK;
+}
+
+STDMETHODIMP_(void) CCrcHasher::Init() throw()
+{
+ _crc = CRC_INIT_VAL;
+}
+
+STDMETHODIMP_(void) CCrcHasher::Update(const void *data, UInt32 size) throw()
+{
+ _crc = _updateFunc(_crc, data, size, g_CrcTable);
+}
+
+STDMETHODIMP_(void) CCrcHasher::Final(Byte *digest) throw()
+{
+ UInt32 val = CRC_GET_DIGEST(_crc);
+ SetUi32(digest, val);
+}
+
+REGISTER_HASHER(CCrcHasher, 0x1, "CRC32", 4)
diff --git a/3rdparty/lzma/CPP/Common/Defs.h b/3rdparty/lzma/CPP/Common/Defs.h
index dad3ae8f11d..1fbd78bda7f 100644
--- a/3rdparty/lzma/CPP/Common/Defs.h
+++ b/3rdparty/lzma/CPP/Common/Defs.h
@@ -3,18 +3,13 @@
#ifndef __COMMON_DEFS_H
#define __COMMON_DEFS_H
-template <class T> inline T MyMin(T a, T b)
- { return a < b ? a : b; }
-template <class T> inline T MyMax(T a, T b)
- { return a > b ? a : b; }
+template <class T> inline T MyMin(T a, T b) { return a < b ? a : b; }
+template <class T> inline T MyMax(T a, T b) { return a > b ? a : b; }
template <class T> inline int MyCompare(T a, T b)
- { return a < b ? -1 : (a == b ? 0 : 1); }
+ { return a == b ? 0 : (a < b ? -1 : 1); }
-inline int BoolToInt(bool value)
- { return (value ? 1: 0); }
-
-inline bool IntToBool(int value)
- { return (value != 0); }
+inline int BoolToInt(bool v) { return (v ? 1 : 0); }
+inline bool IntToBool(int v) { return (v != 0); }
#endif
diff --git a/3rdparty/lzma/CPP/Common/DynamicBuffer.h b/3rdparty/lzma/CPP/Common/DynamicBuffer.h
index bf52a7425a8..44e3df7fd4a 100644
--- a/3rdparty/lzma/CPP/Common/DynamicBuffer.h
+++ b/3rdparty/lzma/CPP/Common/DynamicBuffer.h
@@ -3,48 +3,62 @@
#ifndef __COMMON_DYNAMIC_BUFFER_H
#define __COMMON_DYNAMIC_BUFFER_H
-#include "Buffer.h"
-
-template <class T> class CDynamicBuffer: public CBuffer<T>
+template <class T> class CDynamicBuffer
{
- void GrowLength(size_t size)
+ T *_items;
+ size_t _size;
+ size_t _pos;
+
+ CDynamicBuffer(const CDynamicBuffer &buffer);
+ void operator=(const CDynamicBuffer &buffer);
+
+ void Grow(size_t size)
{
- size_t delta;
- if (this->_capacity > 64)
- delta = this->_capacity / 4;
- else if (this->_capacity > 8)
- delta = 16;
- else
- delta = 4;
- delta = MyMax(delta, size);
- size_t newCap = this->_capacity + delta;
+ size_t delta = _size >= 64 ? _size : 64;
+ if (delta < size)
+ delta = size;
+ size_t newCap = _size + delta;
if (newCap < delta)
- newCap = this->_capacity + size;
- SetCapacity(newCap);
+ {
+ newCap = _size + size;
+ if (newCap < size)
+ throw 20120116;
+ }
+
+ T *newBuffer = new T[newCap];
+ if (_pos != 0)
+ memcpy(newBuffer, _items, _pos * sizeof(T));
+ delete []_items;
+ _items = newBuffer;
+ _size = newCap;
}
+
public:
- CDynamicBuffer(): CBuffer<T>() {};
- CDynamicBuffer(const CDynamicBuffer &buffer): CBuffer<T>(buffer) {};
- CDynamicBuffer(size_t size): CBuffer<T>(size) {};
- CDynamicBuffer& operator=(const CDynamicBuffer &buffer)
+ CDynamicBuffer(): _items(0), _size(0), _pos(0) {}
+ // operator T *() { return _items; }
+ operator const T *() const { return _items; }
+ ~CDynamicBuffer() { delete []_items; }
+
+ T *GetCurPtrAndGrow(size_t addSize)
{
- this->Free();
- if (buffer._capacity > 0)
- {
- SetCapacity(buffer._capacity);
- memmove(this->_items, buffer._items, buffer._capacity * sizeof(T));
- }
- return *this;
+ size_t rem = _size - _pos;
+ if (rem < addSize)
+ Grow(addSize - rem);
+ T *res = _items + _pos;
+ _pos += addSize;
+ return res;
}
- void EnsureCapacity(size_t capacity)
+
+ void AddData(const T *data, size_t size)
{
- if (this->_capacity < capacity)
- GrowLength(capacity - this->_capacity);
+ memcpy(GetCurPtrAndGrow(size), data, size * sizeof(T));
}
+
+ const size_t GetPos() const { return _pos; }
+
+ // void Empty() { _pos = 0; }
};
-typedef CDynamicBuffer<char> CCharDynamicBuffer;
-typedef CDynamicBuffer<wchar_t> CWCharDynamicBuffer;
typedef CDynamicBuffer<unsigned char> CByteDynamicBuffer;
#endif
diff --git a/3rdparty/lzma/CPP/Common/IntToString.cpp b/3rdparty/lzma/CPP/Common/IntToString.cpp
index 013fee5277f..ed217c72c0a 100644
--- a/3rdparty/lzma/CPP/Common/IntToString.cpp
+++ b/3rdparty/lzma/CPP/Common/IntToString.cpp
@@ -4,74 +4,143 @@
#include "IntToString.h"
-void ConvertUInt64ToString(UInt64 value, char *s, UInt32 base)
+#define CONVERT_INT_TO_STR(charType, tempSize) \
+ unsigned char temp[tempSize]; unsigned i = 0; \
+ while (val >= 10) { temp[i++] = (unsigned char)('0' + (unsigned)(val % 10)); val /= 10; } \
+ *s++ = (charType)('0' + (unsigned)val); \
+ while (i != 0) { i--; *s++ = temp[i]; } \
+ *s = 0;
+
+void ConvertUInt32ToString(UInt32 val, char *s) throw()
{
- if (base < 2 || base > 36)
+ CONVERT_INT_TO_STR(char, 16);
+}
+
+void ConvertUInt64ToString(UInt64 val, char *s) throw()
+{
+ if (val <= (UInt32)0xFFFFFFFF)
{
- *s = '\0';
+ ConvertUInt32ToString((UInt32)val, s);
return;
}
- char temp[72];
- int pos = 0;
- do
+ CONVERT_INT_TO_STR(char, 24);
+}
+
+void ConvertUInt64ToOct(UInt64 val, char *s) throw()
+{
+ UInt64 v = val;
+ unsigned i;
+ for (i = 1;; i++)
{
- int delta = (int)(value % base);
- temp[pos++] = (char)((delta < 10) ? ('0' + delta) : ('a' + (delta - 10)));
- value /= base;
+ v >>= 3;
+ if (v == 0)
+ break;
}
- while (value != 0);
+ s[i] = 0;
do
- *s++ = temp[--pos];
- while (pos > 0);
- *s = '\0';
+ {
+ unsigned t = (unsigned)(val & 0x7);
+ val >>= 3;
+ s[--i] = (char)('0' + t);
+ }
+ while (i);
}
-void ConvertUInt64ToString(UInt64 value, wchar_t *s)
+void ConvertUInt32ToHex(UInt32 val, char *s) throw()
{
- wchar_t temp[32];
- int pos = 0;
+ UInt32 v = val;
+ unsigned i;
+ for (i = 1;; i++)
+ {
+ v >>= 4;
+ if (v == 0)
+ break;
+ }
+ s[i] = 0;
do
{
- temp[pos++] = (wchar_t)(L'0' + (int)(value % 10));
- value /= 10;
+ unsigned t = (unsigned)((val & 0xF));
+ val >>= 4;
+ s[--i] = (char)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
}
- while (value != 0);
+ while (i);
+}
+
+void ConvertUInt64ToHex(UInt64 val, char *s) throw()
+{
+ UInt64 v = val;
+ unsigned i;
+ for (i = 1;; i++)
+ {
+ v >>= 4;
+ if (v == 0)
+ break;
+ }
+ s[i] = 0;
do
- *s++ = temp[--pos];
- while (pos > 0);
- *s = L'\0';
+ {
+ unsigned t = (unsigned)((val & 0xF));
+ val >>= 4;
+ s[--i] = (char)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
+ }
+ while (i);
}
-void ConvertUInt32ToString(UInt32 value, char *s) { ConvertUInt64ToString(value, s); }
-void ConvertUInt32ToString(UInt32 value, wchar_t *s) { ConvertUInt64ToString(value, s); }
+void ConvertUInt32ToHex8Digits(UInt32 val, char *s) throw()
+{
+ s[8] = 0;
+ for (int i = 7; i >= 0; i--)
+ {
+ unsigned t = val & 0xF;
+ val >>= 4;
+ s[i] = (char)(((t < 10) ? ('0' + t) : ('A' + (t - 10))));
+ }
+}
-void ConvertInt64ToString(Int64 value, char *s)
+/*
+void ConvertUInt32ToHex8Digits(UInt32 val, wchar_t *s)
{
- if (value < 0)
+ s[8] = 0;
+ for (int i = 7; i >= 0; i--)
{
- *s++ = '-';
- value = -value;
+ unsigned t = val & 0xF;
+ val >>= 4;
+ s[i] = (wchar_t)(((t < 10) ? ('0' + t) : ('A' + (t - 10))));
+ }
+}
+*/
+
+void ConvertUInt32ToString(UInt32 val, wchar_t *s) throw()
+{
+ CONVERT_INT_TO_STR(wchar_t, 16);
+}
+
+void ConvertUInt64ToString(UInt64 val, wchar_t *s) throw()
+{
+ if (val <= (UInt32)0xFFFFFFFF)
+ {
+ ConvertUInt32ToString((UInt32)val, s);
+ return;
}
- ConvertUInt64ToString(value, s);
+ CONVERT_INT_TO_STR(wchar_t, 24);
}
-void ConvertInt64ToString(Int64 value, wchar_t *s)
+void ConvertInt64ToString(Int64 val, char *s) throw()
{
- if (value < 0)
+ if (val < 0)
{
- *s++ = L'-';
- value = -value;
+ *s++ = '-';
+ val = -val;
}
- ConvertUInt64ToString(value, s);
+ ConvertUInt64ToString(val, s);
}
-void ConvertUInt32ToHexWithZeros(UInt32 value, char *s)
+void ConvertInt64ToString(Int64 val, wchar_t *s) throw()
{
- for (int i = 0; i < 8; i++)
+ if (val < 0)
{
- int t = value & 0xF;
- value >>= 4;
- s[7 - i] = (char)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
+ *s++ = L'-';
+ val = -val;
}
- s[8] = '\0';
+ ConvertUInt64ToString(val, s);
}
diff --git a/3rdparty/lzma/CPP/Common/IntToString.h b/3rdparty/lzma/CPP/Common/IntToString.h
index 782f930c56e..69605ab76ce 100644
--- a/3rdparty/lzma/CPP/Common/IntToString.h
+++ b/3rdparty/lzma/CPP/Common/IntToString.h
@@ -3,17 +3,22 @@
#ifndef __COMMON_INT_TO_STRING_H
#define __COMMON_INT_TO_STRING_H
-#include <stddef.h>
-#include "Types.h"
+#include "MyTypes.h"
-void ConvertUInt64ToString(UInt64 value, char *s, UInt32 base = 10);
-void ConvertUInt64ToString(UInt64 value, wchar_t *s);
-void ConvertInt64ToString(Int64 value, char *s);
-void ConvertInt64ToString(Int64 value, wchar_t *s);
+void ConvertUInt32ToString(UInt32 value, char *s) throw();
+void ConvertUInt64ToString(UInt64 value, char *s) throw();
-void ConvertUInt32ToString(UInt32 value, char *s);
-void ConvertUInt32ToString(UInt32 value, wchar_t *s);
+void ConvertUInt32ToString(UInt32 value, wchar_t *s) throw();
+void ConvertUInt64ToString(UInt64 value, wchar_t *s) throw();
-void ConvertUInt32ToHexWithZeros(UInt32 value, char *s);
+void ConvertUInt64ToOct(UInt64 value, char *s) throw();
+
+void ConvertUInt32ToHex(UInt32 value, char *s) throw();
+void ConvertUInt64ToHex(UInt64 value, char *s) throw();
+void ConvertUInt32ToHex8Digits(UInt32 value, char *s) throw();
+// void ConvertUInt32ToHex8Digits(UInt32 value, wchar_t *s) throw();
+
+void ConvertInt64ToString(Int64 value, char *s) throw();
+void ConvertInt64ToString(Int64 value, wchar_t *s) throw();
#endif
diff --git a/3rdparty/lzma/CPP/Common/Lang.h b/3rdparty/lzma/CPP/Common/Lang.h
new file mode 100644
index 00000000000..22e42574eaa
--- /dev/null
+++ b/3rdparty/lzma/CPP/Common/Lang.h
@@ -0,0 +1,23 @@
+// Common/Lang.h
+
+#ifndef __COMMON_LANG_H
+#define __COMMON_LANG_H
+
+#include "MyString.h"
+
+class CLang
+{
+ wchar_t *_text;
+ CRecordVector<UInt32> _ids;
+ CRecordVector<UInt32> _offsets;
+
+ bool OpenFromString(const AString &s);
+public:
+ CLang(): _text(0) {}
+ ~CLang() { Clear(); }
+ bool Open(CFSTR fileName, const wchar_t *id);
+ void Clear() throw();
+ const wchar_t *Get(UInt32 id) const throw();
+};
+
+#endif
diff --git a/3rdparty/lzma/CPP/Common/ListFileUtils.cpp b/3rdparty/lzma/CPP/Common/ListFileUtils.cpp
index f9bd18ed3c3..3bf4ec29d9f 100644
--- a/3rdparty/lzma/CPP/Common/ListFileUtils.cpp
+++ b/3rdparty/lzma/CPP/Common/ListFileUtils.cpp
@@ -2,75 +2,116 @@
#include "StdAfx.h"
-#include "MyWindows.h"
+#include "../../C/CpuArch.h"
+
#include "../Windows/FileIO.h"
#include "ListFileUtils.h"
+#include "MyBuffer.h"
#include "StringConvert.h"
#include "UTFConvert.h"
static const char kQuoteChar = '\"';
-static void RemoveQuote(UString &s)
+static void AddName(UStringVector &strings, UString &s)
{
- if (s.Length() >= 2)
- if (s[0] == kQuoteChar && s.Back() == kQuoteChar)
- s = s.Mid(1, s.Length() - 2);
+ s.Trim();
+ if (s.Len() >= 2 && s[0] == kQuoteChar && s.Back() == kQuoteChar)
+ {
+ s.DeleteBack();
+ s.Delete(0);
+ }
+ if (!s.IsEmpty())
+ strings.Add(s);
}
-bool ReadNamesFromListFile(CFSTR fileName, UStringVector &resultStrings, UINT codePage)
+bool ReadNamesFromListFile(CFSTR fileName, UStringVector &strings, UINT codePage)
{
NWindows::NFile::NIO::CInFile file;
if (!file.Open(fileName))
return false;
- UInt64 length;
- if (!file.GetLength(length))
- return false;
- if (length > ((UInt32)1 << 31))
+ UInt64 fileSize;
+ if (!file.GetLength(fileSize))
return false;
- AString s;
- char *p = s.GetBuffer((int)length + 1);
- UInt32 processed;
- if (!file.Read(p, (UInt32)length, processed))
+ if (fileSize >= ((UInt32)1 << 31) - 32)
return false;
- p[(UInt32)length] = 0;
- s.ReleaseBuffer();
- file.Close();
-
UString u;
- #ifdef CP_UTF8
- if (codePage == CP_UTF8)
+ if (codePage == MY__CP_UTF16 || codePage == MY__CP_UTF16BE)
{
- if (!ConvertUTF8ToUnicode(s, u))
+ if ((fileSize & 1) != 0)
+ return false;
+ CByteArr buf((size_t)fileSize);
+ UInt32 processed;
+ if (!file.Read(buf, (UInt32)fileSize, processed))
return false;
+ if (processed != fileSize)
+ return false;
+ file.Close();
+ unsigned num = (unsigned)fileSize / 2;
+ wchar_t *p = u.GetBuf(num);
+ if (codePage == MY__CP_UTF16)
+ for (unsigned i = 0; i < num; i++)
+ {
+ wchar_t c = GetUi16(buf + i * 2);
+ if (c == 0)
+ return false;
+ p[i] = c;
+ }
+ else
+ for (unsigned i = 0; i < num; i++)
+ {
+ wchar_t c = (wchar_t)GetBe16(buf + i * 2);
+ if (c == 0)
+ return false;
+ p[i] = c;
+ }
+ p[num] = 0;
+ u.ReleaseBuf_SetLen(num);
}
else
- #endif
- u = MultiByteToUnicodeString(s, codePage);
- if (!u.IsEmpty())
{
- if (u[0] == 0xFEFF)
- u.Delete(0);
+ AString s;
+ char *p = s.GetBuf((unsigned)fileSize);
+ UInt32 processed;
+ if (!file.Read(p, (UInt32)fileSize, processed))
+ return false;
+ if (processed != fileSize)
+ return false;
+ file.Close();
+ s.ReleaseBuf_CalcLen((unsigned)processed);
+ if (s.Len() != processed)
+ return false;
+
+ // #ifdef CP_UTF8
+ if (codePage == CP_UTF8)
+ {
+ if (!ConvertUTF8ToUnicode(s, u))
+ return false;
+ }
+ else
+ // #endif
+ MultiByteToUnicodeString2(u, s, codePage);
}
- UString t;
- for (int i = 0; i < u.Length(); i++)
+ const wchar_t kGoodBOM = 0xFEFF;
+ const wchar_t kBadBOM = 0xFFFE;
+
+ UString s;
+ unsigned i = 0;
+ for (; i < u.Len() && u[i] == kGoodBOM; i++);
+ for (; i < u.Len(); i++)
{
wchar_t c = u[i];
+ if (c == kGoodBOM || c == kBadBOM)
+ return false;
if (c == L'\n' || c == 0xD)
{
- t.Trim();
- RemoveQuote(t);
- if (!t.IsEmpty())
- resultStrings.Add(t);
- t.Empty();
+ AddName(strings, s);
+ s.Empty();
}
else
- t += c;
+ s += c;
}
- t.Trim();
- RemoveQuote(t);
- if (!t.IsEmpty())
- resultStrings.Add(t);
+ AddName(strings, s);
return true;
}
diff --git a/3rdparty/lzma/CPP/Common/ListFileUtils.h b/3rdparty/lzma/CPP/Common/ListFileUtils.h
index d43bfdfc140..e8d833fdb8c 100644
--- a/3rdparty/lzma/CPP/Common/ListFileUtils.h
+++ b/3rdparty/lzma/CPP/Common/ListFileUtils.h
@@ -4,7 +4,10 @@
#define __COMMON_LIST_FILE_UTILS_H
#include "MyString.h"
-#include "Types.h"
+#include "MyTypes.h"
+
+#define MY__CP_UTF16 1200
+#define MY__CP_UTF16BE 1201
bool ReadNamesFromListFile(CFSTR fileName, UStringVector &strings, UINT codePage = CP_OEMCP);
diff --git a/3rdparty/lzma/CPP/Common/MyBuffer.h b/3rdparty/lzma/CPP/Common/MyBuffer.h
new file mode 100644
index 00000000000..d0378057a95
--- /dev/null
+++ b/3rdparty/lzma/CPP/Common/MyBuffer.h
@@ -0,0 +1,244 @@
+// Common/MyBuffer.h
+
+#ifndef __COMMON_MY_BUFFER_H
+#define __COMMON_MY_BUFFER_H
+
+#include "Defs.h"
+
+template <class T> class CBuffer
+{
+ T *_items;
+ size_t _size;
+
+public:
+ void Free()
+ {
+ if (_items)
+ {
+ delete []_items;
+ _items = 0;
+ }
+ _size = 0;
+ }
+
+ CBuffer(): _items(0), _size(0) {};
+ CBuffer(size_t size): _items(0), _size(0) { _items = new T[size]; _size = size; }
+ CBuffer(const CBuffer &buffer): _items(0), _size(0)
+ {
+ size_t size = buffer._size;
+ if (size != 0)
+ {
+ _items = new T[size];
+ memcpy(_items, buffer._items, size * sizeof(T));
+ _size = size;
+ }
+ }
+
+ ~CBuffer() { delete []_items; }
+
+ operator T *() { return _items; }
+ operator const T *() const { return _items; }
+ size_t Size() const { return _size; }
+
+ void Alloc(size_t size)
+ {
+ if (size != _size)
+ {
+ Free();
+ if (size != 0)
+ {
+ _items = new T[size];
+ _size = size;
+ }
+ }
+ }
+
+ void AllocAtLeast(size_t size)
+ {
+ if (size > _size)
+ {
+ Free();
+ _items = new T[size];
+ _size = size;
+ }
+ }
+
+ void CopyFrom(const T *data, size_t size)
+ {
+ Alloc(size);
+ if (size != 0)
+ memcpy(_items, data, size * sizeof(T));
+ }
+
+ void ChangeSize_KeepData(size_t newSize, size_t keepSize)
+ {
+ if (newSize == _size)
+ return;
+ T *newBuffer = NULL;
+ if (newSize != 0)
+ {
+ newBuffer = new T[newSize];
+ if (keepSize > _size)
+ keepSize = _size;
+ if (keepSize != 0)
+ memcpy(newBuffer, _items, MyMin(keepSize, newSize) * sizeof(T));
+ }
+ delete []_items;
+ _items = newBuffer;
+ _size = newSize;
+ }
+
+ CBuffer& operator=(const CBuffer &buffer)
+ {
+ if (&buffer != this)
+ CopyFrom(buffer, buffer._size);
+ return *this;
+ }
+};
+
+template <class T>
+bool operator==(const CBuffer<T>& b1, const CBuffer<T>& b2)
+{
+ size_t size1 = b1.Size();
+ if (size1 != b2.Size())
+ return false;
+ if (size1 == 0)
+ return true;
+ return memcmp(b1, b2, size1 * sizeof(T)) == 0;
+}
+
+template <class T>
+bool operator!=(const CBuffer<T>& b1, const CBuffer<T>& b2)
+{
+ size_t size1 = b1.Size();
+ if (size1 != b2.Size())
+ return true;
+ if (size1 == 0)
+ return false;
+ return memcmp(b1, b2, size1 * sizeof(T)) != 0;
+}
+
+
+typedef CBuffer<char> CCharBuffer;
+// typedef CBuffer<wchar_t> CWCharBuffer;
+typedef CBuffer<unsigned char> CByteBuffer;
+
+
+template <class T> class CObjArray
+{
+protected:
+ T *_items;
+private:
+ // we disable constructors
+ CObjArray(const CObjArray &buffer);
+ void operator=(const CObjArray &buffer);
+public:
+ void Free()
+ {
+ delete []_items;
+ _items = 0;
+ }
+ CObjArray(size_t size): _items(0) { if (size != 0) _items = new T[size]; }
+ CObjArray(): _items(0) {};
+ ~CObjArray() { delete []_items; }
+
+ operator T *() { return _items; }
+ operator const T *() const { return _items; }
+
+ void Alloc(size_t newSize)
+ {
+ delete []_items;
+ _items = 0;
+ _items = new T[newSize];
+ }
+};
+
+typedef CObjArray<unsigned char> CByteArr;
+typedef CObjArray<bool> CBoolArr;
+typedef CObjArray<int> CIntArr;
+typedef CObjArray<unsigned> CUIntArr;
+
+
+template <class T> class CObjArray2
+{
+ T *_items;
+ unsigned _size;
+
+ CObjArray2(const CObjArray2 &buffer);
+ void operator=(const CObjArray2 &buffer);
+public:
+
+ void Free()
+ {
+ delete []_items;
+ _items = 0;
+ _size = 0;
+ }
+ CObjArray2(): _items(0), _size(0) {};
+ /*
+ CObjArray2(const CObjArray2 &buffer): _items(0), _size(0)
+ {
+ size_t newSize = buffer._size;
+ if (newSize != 0)
+ {
+ T *newBuffer = new T[newSize];;
+ _items = newBuffer;
+ _size = newSize;
+ const T *src = buffer;
+ for (size_t i = 0; i < newSize; i++)
+ newBuffer[i] = src[i];
+ }
+ }
+ */
+ /*
+ CObjArray2(size_t size): _items(0), _size(0)
+ {
+ if (size != 0)
+ {
+ _items = new T[size];
+ _size = size;
+ }
+ }
+ */
+
+ ~CObjArray2() { delete []_items; }
+
+ operator T *() { return _items; }
+ operator const T *() const { return _items; }
+
+ unsigned Size() const { return (unsigned)_size; }
+ bool IsEmpty() const { return _size == 0; }
+
+ // SetSize doesn't keep old items. It allocates new array if size is not equal
+ void SetSize(unsigned size)
+ {
+ if (size == _size)
+ return;
+ T *newBuffer = NULL;
+ if (size != 0)
+ newBuffer = new T[size];
+ delete []_items;
+ _items = newBuffer;
+ _size = size;
+ }
+
+ /*
+ CObjArray2& operator=(const CObjArray2 &buffer)
+ {
+ Free();
+ size_t newSize = buffer._size;
+ if (newSize != 0)
+ {
+ T *newBuffer = new T[newSize];;
+ _items = newBuffer;
+ _size = newSize;
+ const T *src = buffer;
+ for (size_t i = 0; i < newSize; i++)
+ newBuffer[i] = src[i];
+ }
+ return *this;
+ }
+ */
+};
+
+#endif
diff --git a/3rdparty/lzma/CPP/Common/MyCom.h b/3rdparty/lzma/CPP/Common/MyCom.h
index 2f00c258f22..7c725c9136e 100644
--- a/3rdparty/lzma/CPP/Common/MyCom.h
+++ b/3rdparty/lzma/CPP/Common/MyCom.h
@@ -1,9 +1,10 @@
// MyCom.h
-#ifndef __MYCOM_H
-#define __MYCOM_H
+#ifndef __MY_COM_H
+#define __MY_COM_H
#include "MyWindows.h"
+#include "NewHandler.h"
#ifndef RINOK
#define RINOK(x) { HRESULT __result_ = (x); if (__result_ != S_OK) return __result_; }
@@ -14,14 +15,9 @@ class CMyComPtr
{
T* _p;
public:
- // typedef T _PtrClass;
- CMyComPtr() { _p = NULL;}
- CMyComPtr(T* p) {if ((_p = p) != NULL) p->AddRef(); }
- CMyComPtr(const CMyComPtr<T>& lp)
- {
- if ((_p = lp._p) != NULL)
- _p->AddRef();
- }
+ CMyComPtr(): _p(NULL) {}
+ CMyComPtr(T* p) throw() { if ((_p = p) != NULL) p->AddRef(); }
+ CMyComPtr(const CMyComPtr<T>& lp) throw() { if ((_p = lp._p) != NULL) _p->AddRef(); }
~CMyComPtr() { if (_p) _p->Release(); }
void Release() { if (_p) { _p->Release(); _p = NULL; } }
operator T*() const { return (T*)_p; }
@@ -30,7 +26,7 @@ public:
T* operator->() const { return _p; }
T* operator=(T* p)
{
- if (p != 0)
+ if (p)
p->AddRef();
if (_p)
_p->Release();
@@ -40,7 +36,6 @@ public:
T* operator=(const CMyComPtr<T>& lp) { return (*this = lp._p); }
bool operator!() const { return (_p == NULL); }
// bool operator==(T* pT) const { return _p == pT; }
- // Compare two objects for equivalence
void Attach(T* p2)
{
Release();
@@ -70,7 +65,7 @@ public:
}
*/
template <class Q>
- HRESULT QueryInterface(REFGUID iid, Q** pp) const
+ HRESULT QueryInterface(REFGUID iid, Q** pp) const throw()
{
return _p->QueryInterface(iid, (void**)pp);
}
@@ -81,18 +76,28 @@ public:
inline HRESULT StringToBstr(LPCOLESTR src, BSTR *bstr)
{
*bstr = ::SysAllocString(src);
- return (*bstr != 0) ? S_OK : E_OUTOFMEMORY;
+ return (*bstr) ? S_OK : E_OUTOFMEMORY;
}
class CMyComBSTR
{
-public:
BSTR m_str;
+
+public:
CMyComBSTR(): m_str(NULL) {}
+ ~CMyComBSTR() { ::SysFreeString(m_str); }
+ BSTR* operator&() { return &m_str; }
+ operator LPCOLESTR() const { return m_str; }
+ // operator bool() const { return m_str != NULL; }
+ // bool operator!() const { return m_str == NULL; }
+private:
+ // operator BSTR() const { return m_str; }
+
CMyComBSTR(LPCOLESTR src) { m_str = ::SysAllocString(src); }
// CMyComBSTR(int nSize) { m_str = ::SysAllocStringLen(NULL, nSize); }
// CMyComBSTR(int nSize, LPCOLESTR sz) { m_str = ::SysAllocStringLen(sz, nSize); }
CMyComBSTR(const CMyComBSTR& src) { m_str = src.MyCopy(); }
+
/*
CMyComBSTR(REFGUID src)
{
@@ -102,7 +107,7 @@ public:
CoTaskMemFree(szGuid);
}
*/
- ~CMyComBSTR() { ::SysFreeString(m_str); }
+
CMyComBSTR& operator=(const CMyComBSTR& src)
{
if (m_str != src.m_str)
@@ -113,22 +118,29 @@ public:
}
return *this;
}
+
CMyComBSTR& operator=(LPCOLESTR src)
{
::SysFreeString(m_str);
m_str = ::SysAllocString(src);
return *this;
}
- unsigned int Length() const { return ::SysStringLen(m_str); }
- operator BSTR() const { return m_str; }
- BSTR* operator&() { return &m_str; }
+
+ unsigned Len() const { return ::SysStringLen(m_str); }
+
BSTR MyCopy() const
{
- int byteLen = ::SysStringByteLen(m_str);
+ // We don't support Byte BSTRs here
+ return ::SysAllocStringLen(m_str, ::SysStringLen(m_str));
+ /*
+ UINT byteLen = ::SysStringByteLen(m_str);
BSTR res = ::SysAllocStringByteLen(NULL, byteLen);
- memcpy(res, m_str, byteLen);
+ if (res && byteLen != 0 && m_str)
+ memcpy(res, m_str, byteLen);
return res;
+ */
}
+
/*
void Attach(BSTR src) { m_str = src; }
BSTR Detach()
@@ -138,12 +150,12 @@ public:
return s;
}
*/
+
void Empty()
{
::SysFreeString(m_str);
m_str = NULL;
}
- bool operator!() const { return (m_str == NULL); }
};
//////////////////////////////////////////////////////////
@@ -153,25 +165,27 @@ class CMyUnknownImp
public:
ULONG __m_RefCount;
CMyUnknownImp(): __m_RefCount(0) {}
+
+ // virtual ~CMyUnknownImp() {};
};
#define MY_QUERYINTERFACE_BEGIN STDMETHOD(QueryInterface) \
- (REFGUID iid, void **outObject) {
+(REFGUID iid, void **outObject) throw() { *outObject = NULL;
-#define MY_QUERYINTERFACE_ENTRY(i) if (iid == IID_ ## i) \
- { *outObject = (void *)(i *)this; AddRef(); return S_OK; }
+#define MY_QUERYINTERFACE_ENTRY(i) else if (iid == IID_ ## i) \
+ { *outObject = (void *)(i *)this; }
#define MY_QUERYINTERFACE_ENTRY_UNKNOWN(i) if (iid == IID_IUnknown) \
- { *outObject = (void *)(IUnknown *)(i *)this; AddRef(); return S_OK; }
+ { *outObject = (void *)(IUnknown *)(i *)this; }
#define MY_QUERYINTERFACE_BEGIN2(i) MY_QUERYINTERFACE_BEGIN \
MY_QUERYINTERFACE_ENTRY_UNKNOWN(i) \
MY_QUERYINTERFACE_ENTRY(i)
-#define MY_QUERYINTERFACE_END return E_NOINTERFACE; }
+#define MY_QUERYINTERFACE_END else return E_NOINTERFACE; ++__m_RefCount; /* AddRef(); */ return S_OK; }
#define MY_ADDREF_RELEASE \
-STDMETHOD_(ULONG, AddRef)() { return ++__m_RefCount; } \
+STDMETHOD_(ULONG, AddRef)() throw() { return ++__m_RefCount; } \
STDMETHOD_(ULONG, Release)() { if (--__m_RefCount != 0) \
return __m_RefCount; delete this; return 0; }
@@ -222,4 +236,27 @@ STDMETHOD_(ULONG, Release)() { if (--__m_RefCount != 0) \
MY_QUERYINTERFACE_ENTRY(i5) \
)
+#define MY_UNKNOWN_IMP6(i1, i2, i3, i4, i5, i6) MY_UNKNOWN_IMP_SPEC( \
+ MY_QUERYINTERFACE_ENTRY_UNKNOWN(i1) \
+ MY_QUERYINTERFACE_ENTRY(i1) \
+ MY_QUERYINTERFACE_ENTRY(i2) \
+ MY_QUERYINTERFACE_ENTRY(i3) \
+ MY_QUERYINTERFACE_ENTRY(i4) \
+ MY_QUERYINTERFACE_ENTRY(i5) \
+ MY_QUERYINTERFACE_ENTRY(i6) \
+ )
+
+#define MY_UNKNOWN_IMP7(i1, i2, i3, i4, i5, i6, i7) MY_UNKNOWN_IMP_SPEC( \
+ MY_QUERYINTERFACE_ENTRY_UNKNOWN(i1) \
+ MY_QUERYINTERFACE_ENTRY(i1) \
+ MY_QUERYINTERFACE_ENTRY(i2) \
+ MY_QUERYINTERFACE_ENTRY(i3) \
+ MY_QUERYINTERFACE_ENTRY(i4) \
+ MY_QUERYINTERFACE_ENTRY(i5) \
+ MY_QUERYINTERFACE_ENTRY(i6) \
+ MY_QUERYINTERFACE_ENTRY(i7) \
+ )
+
+const HRESULT k_My_HRESULT_WritingWasCut = 0x20000010;
+
#endif
diff --git a/3rdparty/lzma/CPP/Common/MyGuidDef.h b/3rdparty/lzma/CPP/Common/MyGuidDef.h
index 3c52cc07dc0..68745870ee3 100644
--- a/3rdparty/lzma/CPP/Common/MyGuidDef.h
+++ b/3rdparty/lzma/CPP/Common/MyGuidDef.h
@@ -3,7 +3,7 @@
#ifndef GUID_DEFINED
#define GUID_DEFINED
-#include "Types.h"
+#include "MyTypes.h"
typedef struct {
UInt32 Data1;
diff --git a/3rdparty/lzma/CPP/Common/MyInitGuid.h b/3rdparty/lzma/CPP/Common/MyInitGuid.h
index d6a4869806a..279fba5d612 100644
--- a/3rdparty/lzma/CPP/Common/MyInitGuid.h
+++ b/3rdparty/lzma/CPP/Common/MyInitGuid.h
@@ -3,20 +3,43 @@
#ifndef __COMMON_MY_INITGUID_H
#define __COMMON_MY_INITGUID_H
+/*
+This file must be included only to one C++ file in project before
+declarations of COM interfaces with DEFINE_GUID macro.
+
+Each GUID must be initialized exactly once in project.
+There are two different versions of the DEFINE_GUID macro in guiddef.h (MyGuidDef.h):
+ - if INITGUID is not defined: DEFINE_GUID declares an external reference to the symbol name.
+ - if INITGUID is defined: DEFINE_GUID initializes the symbol name to the value of the GUID.
+
+Also we need IID_IUnknown that is initialized in some file for linking:
+ MSVC: by default the linker uses some lib file that contains IID_IUnknown
+ MinGW: add -luuid switch for linker
+ WinCE: we define IID_IUnknown in this file
+ Other: we define IID_IUnknown in this file
+*/
+
#ifdef _WIN32
+
#ifdef UNDER_CE
#include <basetyps.h>
#endif
+
#include <initguid.h>
+
#ifdef UNDER_CE
DEFINE_GUID(IID_IUnknown,
0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
#endif
+
#else
+
#define INITGUID
#include "MyGuidDef.h"
DEFINE_GUID(IID_IUnknown,
0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
+
#endif
+
#endif
diff --git a/3rdparty/lzma/CPP/Common/MyLinux.h b/3rdparty/lzma/CPP/Common/MyLinux.h
new file mode 100644
index 00000000000..1a918993527
--- /dev/null
+++ b/3rdparty/lzma/CPP/Common/MyLinux.h
@@ -0,0 +1,42 @@
+// MyLinux.h
+
+#ifndef __MY_LIN_LINUX_H
+#define __MY_LIN_LINUX_H
+
+#define MY_LIN_S_IFMT 00170000
+#define MY_LIN_S_IFSOCK 0140000
+#define MY_LIN_S_IFLNK 0120000
+#define MY_LIN_S_IFREG 0100000
+#define MY_LIN_S_IFBLK 0060000
+#define MY_LIN_S_IFDIR 0040000
+#define MY_LIN_S_IFCHR 0020000
+#define MY_LIN_S_IFIFO 0010000
+
+#define MY_LIN_S_ISLNK(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFLNK)
+#define MY_LIN_S_ISREG(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFREG)
+#define MY_LIN_S_ISDIR(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFDIR)
+#define MY_LIN_S_ISCHR(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFCHR)
+#define MY_LIN_S_ISBLK(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFBLK)
+#define MY_LIN_S_ISFIFO(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFIFO)
+#define MY_LIN_S_ISSOCK(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFSOCK)
+
+#define MY_LIN_S_ISUID 0004000
+#define MY_LIN_S_ISGID 0002000
+#define MY_LIN_S_ISVTX 0001000
+
+#define MY_LIN_S_IRWXU 00700
+#define MY_LIN_S_IRUSR 00400
+#define MY_LIN_S_IWUSR 00200
+#define MY_LIN_S_IXUSR 00100
+
+#define MY_LIN_S_IRWXG 00070
+#define MY_LIN_S_IRGRP 00040
+#define MY_LIN_S_IWGRP 00020
+#define MY_LIN_S_IXGRP 00010
+
+#define MY_LIN_S_IRWXO 00007
+#define MY_LIN_S_IROTH 00004
+#define MY_LIN_S_IWOTH 00002
+#define MY_LIN_S_IXOTH 00001
+
+#endif
diff --git a/3rdparty/lzma/CPP/Common/MyString.cpp b/3rdparty/lzma/CPP/Common/MyString.cpp
index dc254eaf831..a2d4cc4e6d0 100644
--- a/3rdparty/lzma/CPP/Common/MyString.cpp
+++ b/3rdparty/lzma/CPP/Common/MyString.cpp
@@ -3,18 +3,22 @@
#include "StdAfx.h"
#ifdef _WIN32
-#include <windows.h>
+#include <wchar.h>
#else
#include <ctype.h>
#endif
-#ifndef _UNICODE
+#if !defined(_UNICODE) || !defined(USE_UNICODE_FSTRING)
#include "StringConvert.h"
#endif
#include "MyString.h"
-const char* MyStringGetNextCharPointer(const char *p)
+#define MY_STRING_NEW(_T_, _size_) new _T_[_size_]
+// #define MY_STRING_NEW(_T_, _size_) ((_T_ *)my_new((size_t)(_size_) * sizeof(_T_)))
+
+/*
+inline const char* MyStringGetNextCharPointer(const char *p) throw()
{
#if defined(_WIN32) && !defined(UNDER_CE)
return CharNextA(p);
@@ -22,20 +26,21 @@ const char* MyStringGetNextCharPointer(const char *p)
return p + 1;
#endif
}
+*/
-int FindCharPosInString(const char *s, char c)
+int FindCharPosInString(const char *s, char c) throw()
{
- for (const char *p = s;;)
+ for (const char *p = s;; p++)
{
if (*p == c)
return (int)(p - s);
if (*p == 0)
return -1;
- p = MyStringGetNextCharPointer(p);
+ // MyStringGetNextCharPointer(p);
}
}
-int FindCharPosInString(const wchar_t *s, wchar_t c)
+int FindCharPosInString(const wchar_t *s, wchar_t c) throw()
{
for (const wchar_t *p = s;; p++)
{
@@ -46,55 +51,65 @@ int FindCharPosInString(const wchar_t *s, wchar_t c)
}
}
-#ifdef _WIN32
-
-#ifdef _UNICODE
+/*
+void MyStringUpper_Ascii(wchar_t *s)
+{
+ for (;;)
+ {
+ wchar_t c = *s;
+ if (c == 0)
+ return;
+ *s++ = MyCharUpper_Ascii(c);
+ }
+}
+*/
-wchar_t MyCharUpper(wchar_t c)
+void MyStringLower_Ascii(char *s) throw()
{
- return (wchar_t)(unsigned int)(UINT_PTR)CharUpperW((LPWSTR)(UINT_PTR)(unsigned int)c);
+ for (;;)
+ {
+ char c = *s;
+ if (c == 0)
+ return;
+ *s++ = MyCharLower_Ascii(c);
+ }
}
-/*
-wchar_t MyCharLower(wchar_t c)
+void MyStringLower_Ascii(wchar_t *s) throw()
{
- return (wchar_t)(unsigned int)(UINT_PTR)CharLowerW((LPWSTR)(UINT_PTR)(unsigned int)c);
+ for (;;)
+ {
+ wchar_t c = *s;
+ if (c == 0)
+ return;
+ *s++ = MyCharLower_Ascii(c);
+ }
}
-char MyCharLower(char c)
-#ifdef UNDER_CE
- { return (char)MyCharLower((wchar_t)c); }
-#else
- { return (char)(unsigned int)(UINT_PTR)CharLowerA((LPSTR)(UINT_PTR)(unsigned int)(unsigned char)c); }
-#endif
-*/
+#ifdef _WIN32
-wchar_t * MyStringUpper(wchar_t *s) { return CharUpperW(s); }
-wchar_t * MyStringLower(wchar_t *s) { return CharLowerW(s); }
+#ifdef _UNICODE
+// wchar_t * MyStringUpper(wchar_t *s) { return CharUpperW(s); }
+// wchar_t * MyStringLower(wchar_t *s) { return CharLowerW(s); }
// for WinCE - FString - char
-const char *MyStringGetPrevCharPointer(const char * /* base */, const char *p)
-{
- return p - 1;
-}
+// const char *MyStringGetPrevCharPointer(const char * /* base */, const char *p) { return p - 1; }
#else
-const char * MyStringGetPrevCharPointer(const char *base, const char *p) { return CharPrevA(base, p); }
-char * MyStringUpper(char *s) { return CharUpperA(s); }
-char * MyStringLower(char *s) { return CharLowerA(s); }
+// const char * MyStringGetPrevCharPointer(const char *base, const char *p) throw() { return CharPrevA(base, p); }
+// char * MyStringUpper(char *s) { return CharUpperA(s); }
+// char * MyStringLower(char *s) { return CharLowerA(s); }
-wchar_t MyCharUpper(wchar_t c)
+wchar_t MyCharUpper_WIN(wchar_t c) throw()
{
- if (c == 0)
- return 0;
- wchar_t *res = CharUpperW((LPWSTR)(UINT_PTR)(unsigned int)c);
+ wchar_t *res = CharUpperW((LPWSTR)(UINT_PTR)(unsigned)c);
if (res != 0 || ::GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
- return (wchar_t)(unsigned int)(UINT_PTR)res;
- const int kBufferSize = 4;
- char s[kBufferSize + 1];
- int numChars = ::WideCharToMultiByte(CP_ACP, 0, &c, 1, s, kBufferSize, 0, 0);
- if (numChars == 0 || numChars > kBufferSize)
+ return (wchar_t)(unsigned)(UINT_PTR)res;
+ const int kBufSize = 4;
+ char s[kBufSize + 1];
+ int numChars = ::WideCharToMultiByte(CP_ACP, 0, &c, 1, s, kBufSize, 0, 0);
+ if (numChars == 0 || numChars > kBufSize)
return c;
s[numChars] = 0;
::CharUpperA(s);
@@ -102,24 +117,25 @@ wchar_t MyCharUpper(wchar_t c)
return c;
}
-wchar_t MyCharLower(wchar_t c)
+/*
+wchar_t MyCharLower_WIN(wchar_t c)
{
- if (c == 0)
- return 0;
- wchar_t *res = CharLowerW((LPWSTR)(UINT_PTR)(unsigned int)c);
+ wchar_t *res = CharLowerW((LPWSTR)(UINT_PTR)(unsigned)c);
if (res != 0 || ::GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
- return (wchar_t)(unsigned int)(UINT_PTR)res;
- const int kBufferSize = 4;
- char s[kBufferSize + 1];
- int numChars = ::WideCharToMultiByte(CP_ACP, 0, &c, 1, s, kBufferSize, 0, 0);
- if (numChars == 0 || numChars > kBufferSize)
+ return (wchar_t)(unsigned)(UINT_PTR)res;
+ const int kBufSize = 4;
+ char s[kBufSize + 1];
+ int numChars = ::WideCharToMultiByte(CP_ACP, 0, &c, 1, s, kBufSize, 0, 0);
+ if (numChars == 0 || numChars > kBufSize)
return c;
s[numChars] = 0;
::CharLowerA(s);
::MultiByteToWideChar(CP_ACP, 0, s, numChars, &c, 1);
return c;
}
+*/
+/*
wchar_t * MyStringUpper(wchar_t *s)
{
if (s == 0)
@@ -132,7 +148,9 @@ wchar_t * MyStringUpper(wchar_t *s)
MyStringCopy(s, (const wchar_t *)MultiByteToUnicodeString(a));
return s;
}
+*/
+/*
wchar_t * MyStringLower(wchar_t *s)
{
if (s == 0)
@@ -145,71 +163,158 @@ wchar_t * MyStringLower(wchar_t *s)
MyStringCopy(s, (const wchar_t *)MultiByteToUnicodeString(a));
return s;
}
+*/
#endif
-#else
+#endif
-wchar_t MyCharUpper(wchar_t c)
+bool IsString1PrefixedByString2(const char *s1, const char *s2) throw()
{
- return toupper(c);
+ for (;;)
+ {
+ unsigned char c2 = (unsigned char)*s2++; if (c2 == 0) return true;
+ unsigned char c1 = (unsigned char)*s1++; if (c1 != c2) return false;
+ }
}
-wchar_t * MyStringUpper(wchar_t *s)
+bool StringsAreEqualNoCase(const wchar_t *s1, const wchar_t *s2) throw()
{
- if (s == 0)
- return 0;
- for (wchar_t *p = s; *p != 0; p++)
- *p = MyCharUpper(*p);
- return s;
+ for (;;)
+ {
+ wchar_t c1 = *s1++;
+ wchar_t c2 = *s2++;
+ if (c1 != c2 && MyCharUpper(c1) != MyCharUpper(c2)) return false;
+ if (c1 == 0) return true;
+ }
}
-/*
-int MyStringCollateNoCase(const wchar_t *s1, const wchar_t *s2)
+// ---------- ASCII ----------
+
+bool AString::IsPrefixedBy_Ascii_NoCase(const char *s) const throw()
+{
+ const char *s1 = _chars;
+ for (;;)
+ {
+ char c2 = *s++;
+ if (c2 == 0)
+ return true;
+ char c1 = *s1++;
+ if (MyCharLower_Ascii(c1) !=
+ MyCharLower_Ascii(c2))
+ return false;
+ }
+}
+
+bool UString::IsPrefixedBy_Ascii_NoCase(const char *s) const throw()
+{
+ const wchar_t *s1 = _chars;
+ for (;;)
+ {
+ char c2 = *s++;
+ if (c2 == 0)
+ return true;
+ wchar_t c1 = *s1++;
+ if (MyCharLower_Ascii(c1) != (unsigned char)MyCharLower_Ascii(c2))
+ return false;
+ }
+}
+
+bool StringsAreEqual_Ascii(const wchar_t *u, const char *a) throw()
+{
+ for (;;)
+ {
+ unsigned char c = *a;
+ if (c != *u)
+ return false;
+ if (c == 0)
+ return true;
+ a++;
+ u++;
+ }
+}
+
+bool StringsAreEqualNoCase_Ascii(const char *s1, const char *s2) throw()
+{
+ for (;;)
+ {
+ char c1 = *s1++;
+ char c2 = *s2++;
+ if (c1 != c2 && MyCharLower_Ascii(c1) != MyCharLower_Ascii(c2))
+ return false;
+ if (c1 == 0)
+ return true;
+ }
+}
+
+bool StringsAreEqualNoCase_Ascii(const wchar_t *s1, const wchar_t *s2) throw()
{
for (;;)
{
wchar_t c1 = *s1++;
wchar_t c2 = *s2++;
- wchar_t u1 = MyCharUpper(c1);
- wchar_t u2 = MyCharUpper(c2);
+ if (c1 != c2 && MyCharLower_Ascii(c1) != MyCharLower_Ascii(c2))
+ return false;
+ if (c1 == 0)
+ return true;
+ }
+}
- if (u1 < u2) return -1;
- if (u1 > u2) return 1;
- if (u1 == 0) return 0;
+bool StringsAreEqualNoCase_Ascii(const wchar_t *s1, const char *s2) throw()
+{
+ for (;;)
+ {
+ wchar_t c1 = *s1++;
+ char c2 = *s2++;
+ if (c1 != (unsigned char)c2 && (c1 > 0x7F || MyCharLower_Ascii(c1) != (unsigned char)MyCharLower_Ascii(c2)))
+ return false;
+ if (c1 == 0)
+ return true;
}
}
-*/
-#endif
+bool IsString1PrefixedByString2(const wchar_t *s1, const wchar_t *s2) throw()
+{
+ for (;;)
+ {
+ wchar_t c2 = *s2++; if (c2 == 0) return true;
+ wchar_t c1 = *s1++; if (c1 != c2) return false;
+ }
+}
-int MyStringCompare(const char *s1, const char *s2)
+bool IsString1PrefixedByString2_NoCase(const wchar_t *s1, const wchar_t *s2) throw()
{
for (;;)
{
- unsigned char c1 = (unsigned char)*s1++;
- unsigned char c2 = (unsigned char)*s2++;
- if (c1 < c2) return -1;
- if (c1 > c2) return 1;
- if (c1 == 0) return 0;
+ wchar_t c2 = *s2++; if (c2 == 0) return true;
+ wchar_t c1 = *s1++;
+ if (c1 != c2 && MyCharUpper(c1) != MyCharUpper(c2))
+ return false;
}
}
-int MyStringCompare(const wchar_t *s1, const wchar_t *s2)
+// NTFS order: uses upper case
+int MyStringCompareNoCase(const wchar_t *s1, const wchar_t *s2) throw()
{
for (;;)
{
wchar_t c1 = *s1++;
wchar_t c2 = *s2++;
- if (c1 < c2) return -1;
- if (c1 > c2) return 1;
+ if (c1 != c2)
+ {
+ wchar_t u1 = MyCharUpper(c1);
+ wchar_t u2 = MyCharUpper(c2);
+ if (u1 < u2) return -1;
+ if (u1 > u2) return 1;
+ }
if (c1 == 0) return 0;
}
}
-int MyStringCompareNoCase(const wchar_t *s1, const wchar_t *s2)
+/*
+int MyStringCompareNoCase_N(const wchar_t *s1, const wchar_t *s2, unsigned num)
{
- for (;;)
+ for (; num != 0; num--)
{
wchar_t c1 = *s1++;
wchar_t c2 = *s2++;
@@ -222,19 +327,1206 @@ int MyStringCompareNoCase(const wchar_t *s1, const wchar_t *s2)
}
if (c1 == 0) return 0;
}
+ return 0;
+}
+*/
+
+// ---------- AString ----------
+
+void AString::InsertSpace(unsigned &index, unsigned size)
+{
+ Grow(size);
+ MoveItems(index + size, index);
+}
+
+#define k_Alloc_Len_Limit 0x40000000
+
+void AString::ReAlloc(unsigned newLimit)
+{
+ if (newLimit < _len || newLimit >= k_Alloc_Len_Limit) throw 20130220;
+ // MY_STRING_REALLOC(_chars, char, newLimit + 1, _len + 1);
+ char *newBuf = MY_STRING_NEW(char, newLimit + 1);
+ memcpy(newBuf, _chars, (size_t)(_len + 1)); \
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = newLimit;
+}
+
+void AString::ReAlloc2(unsigned newLimit)
+{
+ if (newLimit >= k_Alloc_Len_Limit) throw 20130220;
+ // MY_STRING_REALLOC(_chars, char, newLimit + 1, 0);
+ char *newBuf = MY_STRING_NEW(char, newLimit + 1);
+ newBuf[0] = 0;
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = newLimit;
+}
+
+void AString::SetStartLen(unsigned len)
+{
+ _chars = 0;
+ _chars = MY_STRING_NEW(char, len + 1);
+ _len = len;
+ _limit = len;
+}
+
+void AString::Grow_1()
+{
+ unsigned next = _len;
+ next += next / 2;
+ next += 16;
+ next &= ~(unsigned)15;
+ ReAlloc(next - 1);
+}
+
+void AString::Grow(unsigned n)
+{
+ unsigned freeSize = _limit - _len;
+ if (n <= freeSize)
+ return;
+
+ unsigned next = _len + n;
+ next += next / 2;
+ next += 16;
+ next &= ~(unsigned)15;
+ ReAlloc(next - 1);
+}
+
+/*
+AString::AString(unsigned num, const char *s)
+{
+ unsigned len = MyStringLen(s);
+ if (num > len)
+ num = len;
+ SetStartLen(num);
+ memcpy(_chars, s, num);
+ _chars[num] = 0;
+}
+*/
+
+AString::AString(unsigned num, const AString &s)
+{
+ if (num > s._len)
+ num = s._len;
+ SetStartLen(num);
+ memcpy(_chars, s._chars, num);
+ _chars[num] = 0;
+}
+
+AString::AString(const AString &s, char c)
+{
+ SetStartLen(s.Len() + 1);
+ char *chars = _chars;
+ unsigned len = s.Len();
+ memcpy(chars, s, len);
+ chars[len] = c;
+ chars[len + 1] = 0;
+}
+
+AString::AString(const char *s1, unsigned num1, const char *s2, unsigned num2)
+{
+ SetStartLen(num1 + num2);
+ char *chars = _chars;
+ memcpy(chars, s1, num1);
+ memcpy(chars + num1, s2, num2 + 1);
+}
+
+AString operator+(const AString &s1, const AString &s2) { return AString(s1, s1.Len(), s2, s2.Len()); }
+AString operator+(const AString &s1, const char *s2) { return AString(s1, s1.Len(), s2, MyStringLen(s2)); }
+AString operator+(const char *s1, const AString &s2) { return AString(s1, MyStringLen(s1), s2, s2.Len()); }
+
+AString::AString()
+{
+ _chars = 0;
+ _chars = MY_STRING_NEW(char, 4);
+ _len = 0;
+ _limit = 4 - 1;
+ _chars[0] = 0;
+}
+
+AString::AString(char c)
+{
+ SetStartLen(1);
+ _chars[0] = c;
+ _chars[1] = 0;
+}
+
+AString::AString(const char *s)
+{
+ SetStartLen(MyStringLen(s));
+ MyStringCopy(_chars, s);
+}
+
+AString::AString(const AString &s)
+{
+ SetStartLen(s._len);
+ MyStringCopy(_chars, s._chars);
+}
+
+AString &AString::operator=(char c)
+{
+ if (1 > _limit)
+ {
+ char *newBuf = MY_STRING_NEW(char, 1 + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = 1;
+ }
+ _len = 1;
+ _chars[0] = c;
+ _chars[1] = 0;
+ return *this;
}
-UString MultiByteToUnicodeString(const AString &srcString, UINT codePage);
-AString UnicodeStringToMultiByte(const UString &srcString, UINT codePage);
+AString &AString::operator=(const char *s)
+{
+ unsigned len = MyStringLen(s);
+ if (len > _limit)
+ {
+ char *newBuf = MY_STRING_NEW(char, len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = len;
+ }
+ _len = len;
+ MyStringCopy(_chars, s);
+ return *this;
+}
+
+AString &AString::operator=(const AString &s)
+{
+ if (&s == this)
+ return *this;
+ unsigned len = s._len;
+ if (len > _limit)
+ {
+ char *newBuf = MY_STRING_NEW(char, len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = len;
+ }
+ _len = len;
+ MyStringCopy(_chars, s._chars);
+ return *this;
+}
+
+void AString::SetFromWStr_if_Ascii(const wchar_t *s)
+{
+ unsigned len = 0;
+ {
+ for (;; len++)
+ {
+ wchar_t c = s[len];
+ if (c == 0)
+ break;
+ if (c >= 0x80)
+ return;
+ }
+ }
+ if (len > _limit)
+ {
+ char *newBuf = MY_STRING_NEW(char, len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = len;
+ }
+ _len = len;
+ char *dest = _chars;
+ unsigned i;
+ for (i = 0; i < len; i++)
+ dest[i] = (char)s[i];
+ dest[i] = 0;
+}
+
+/*
+void AString::SetFromBstr_if_Ascii(BSTR s)
+{
+ unsigned len = ::SysStringLen(s);
+ {
+ for (unsigned i = 0; i < len; i++)
+ if (s[i] <= 0 || s[i] >= 0x80)
+ return;
+ }
+ if (len > _limit)
+ {
+ char *newBuf = MY_STRING_NEW(char, len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = len;
+ }
+ _len = len;
+ char *dest = _chars;
+ unsigned i;
+ for (i = 0; i < len; i++)
+ dest[i] = (char)s[i];
+ dest[i] = 0;
+}
+*/
+
+void AString::Add_Space() { operator+=(' '); }
+void AString::Add_Space_if_NotEmpty() { if (!IsEmpty()) Add_Space(); }
+void AString::Add_LF() { operator+=('\n'); }
+
+AString &AString::operator+=(const char *s)
+{
+ unsigned len = MyStringLen(s);
+ Grow(len);
+ MyStringCopy(_chars + _len, s);
+ _len += len;
+ return *this;
+}
+
+AString &AString::operator+=(const AString &s)
+{
+ Grow(s._len);
+ MyStringCopy(_chars + _len, s._chars);
+ _len += s._len;
+ return *this;
+}
+
+void AString::SetFrom(const char *s, unsigned len) // no check
+{
+ if (len > _limit)
+ {
+ char *newBuf = MY_STRING_NEW(char, len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = len;
+ }
+ if (len != 0)
+ memcpy(_chars, s, len);
+ _chars[len] = 0;
+ _len = len;
+}
+
+void AString::SetFrom_CalcLen(const char *s, unsigned len) // no check
+{
+ unsigned i;
+ for (i = 0; i < len; i++)
+ if (s[i] == 0)
+ break;
+ SetFrom(s, i);
+}
+
+int AString::Find(const char *s, unsigned startIndex) const throw()
+{
+ const char *fs = strstr(_chars + startIndex, s);
+ if (!fs)
+ return -1;
+ return (int)(fs - _chars);
+
+ /*
+ if (s[0] == 0)
+ return startIndex;
+ unsigned len = MyStringLen(s);
+ const char *p = _chars + startIndex;
+ for (;; p++)
+ {
+ const char c = *p;
+ if (c != s[0])
+ {
+ if (c == 0)
+ return -1;
+ continue;
+ }
+ unsigned i;
+ for (i = 1; i < len; i++)
+ if (p[i] != s[i])
+ break;
+ if (i == len)
+ return (int)(p - _chars);
+ }
+ */
+}
+
+int AString::ReverseFind(char c) const throw()
+{
+ if (_len == 0)
+ return -1;
+ const char *p = _chars + _len - 1;
+ for (;;)
+ {
+ if (*p == c)
+ return (int)(p - _chars);
+ if (p == _chars)
+ return -1;
+ p--; // p = GetPrevCharPointer(_chars, p);
+ }
+}
+
+int AString::ReverseFind_PathSepar() const throw()
+{
+ if (_len == 0)
+ return -1;
+ const char *p = _chars + _len - 1;
+ for (;;)
+ {
+ char c = *p;
+ if (IS_PATH_SEPAR(c))
+ return (int)(p - _chars);
+ if (p == _chars)
+ return -1;
+ p--;
+ }
+}
+
+void AString::TrimLeft() throw()
+{
+ const char *p = _chars;
+ for (;; p++)
+ {
+ char c = *p;
+ if (c != ' ' && c != '\n' && c != '\t')
+ break;
+ }
+ unsigned pos = (unsigned)(p - _chars);
+ if (pos != 0)
+ {
+ MoveItems(0, pos);
+ _len -= pos;
+ }
+}
+
+void AString::TrimRight() throw()
+{
+ const char *p = _chars;
+ unsigned i;
+ for (i = _len; i != 0; i--)
+ {
+ char c = p[i - 1];
+ if (c != ' ' && c != '\n' && c != '\t')
+ break;
+ }
+ if (i != _len)
+ {
+ _chars[i] = 0;
+ _len = i;
+ }
+}
+
+void AString::InsertAtFront(char c)
+{
+ if (_limit == _len)
+ Grow_1();
+ MoveItems(1, 0);
+ _chars[0] = c;
+ _len++;
+}
+
+/*
+void AString::Insert(unsigned index, char c)
+{
+ InsertSpace(index, 1);
+ _chars[index] = c;
+ _len++;
+}
+*/
+
+void AString::Insert(unsigned index, const char *s)
+{
+ unsigned num = MyStringLen(s);
+ if (num != 0)
+ {
+ InsertSpace(index, num);
+ memcpy(_chars + index, s, num);
+ _len += num;
+ }
+}
+
+void AString::Insert(unsigned index, const AString &s)
+{
+ unsigned num = s.Len();
+ if (num != 0)
+ {
+ InsertSpace(index, num);
+ memcpy(_chars + index, s, num);
+ _len += num;
+ }
+}
+
+void AString::RemoveChar(char ch) throw()
+{
+ char *src = _chars;
+
+ for (;;)
+ {
+ char c = *src++;
+ if (c == 0)
+ return;
+ if (c == ch)
+ break;
+ }
+
+ char *dest = src - 1;
+
+ for (;;)
+ {
+ char c = *src++;
+ if (c == 0)
+ break;
+ if (c != ch)
+ *dest++ = c;
+ }
+
+ *dest = 0;
+ _len = (unsigned)(dest - _chars);
+}
+
+// !!!!!!!!!!!!!!! test it if newChar = '\0'
+void AString::Replace(char oldChar, char newChar) throw()
+{
+ if (oldChar == newChar)
+ return; // 0;
+ // unsigned number = 0;
+ int pos = 0;
+ while ((unsigned)pos < _len)
+ {
+ pos = Find(oldChar, pos);
+ if (pos < 0)
+ break;
+ _chars[(unsigned)pos] = newChar;
+ pos++;
+ // number++;
+ }
+ return; // number;
+}
+
+void AString::Replace(const AString &oldString, const AString &newString)
+{
+ if (oldString.IsEmpty())
+ return; // 0;
+ if (oldString == newString)
+ return; // 0;
+ unsigned oldLen = oldString.Len();
+ unsigned newLen = newString.Len();
+ // unsigned number = 0;
+ int pos = 0;
+ while ((unsigned)pos < _len)
+ {
+ pos = Find(oldString, pos);
+ if (pos < 0)
+ break;
+ Delete(pos, oldLen);
+ Insert(pos, newString);
+ pos += newLen;
+ // number++;
+ }
+ // return number;
+}
+
+void AString::Delete(unsigned index) throw()
+{
+ MoveItems(index, index + 1);
+ _len--;
+}
+void AString::Delete(unsigned index, unsigned count) throw()
+{
+ if (index + count > _len)
+ count = _len - index;
+ if (count > 0)
+ {
+ MoveItems(index, index + count);
+ _len -= count;
+ }
+}
+
+void AString::DeleteFrontal(unsigned num) throw()
+{
+ if (num != 0)
+ {
+ MoveItems(0, num);
+ _len -= num;
+ }
+}
+
+/*
+AString operator+(const AString &s1, const AString &s2)
+{
+ AString result(s1);
+ result += s2;
+ return result;
+}
+
+AString operator+(const AString &s, const char *chars)
+{
+ AString result(s);
+ result += chars;
+ return result;
+}
+
+AString operator+(const char *chars, const AString &s)
+{
+ AString result(chars);
+ result += s;
+ return result;
+}
+
+AString operator+(const AString &s, char c)
+{
+ AString result(s);
+ result += c;
+ return result;
+}
+*/
+
+/*
+AString operator+(char c, const AString &s)
+{
+ AString result(c);
+ result += s;
+ return result;
+}
+*/
+
+
+
+
+// ---------- UString ----------
+
+void UString::InsertSpace(unsigned index, unsigned size)
+{
+ Grow(size);
+ MoveItems(index + size, index);
+}
+
+void UString::ReAlloc(unsigned newLimit)
+{
+ if (newLimit < _len || newLimit >= k_Alloc_Len_Limit) throw 20130221;
+ // MY_STRING_REALLOC(_chars, wchar_t, newLimit + 1, _len + 1);
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, newLimit + 1);
+ wmemcpy(newBuf, _chars, _len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = newLimit;
+}
+
+void UString::ReAlloc2(unsigned newLimit)
+{
+ if (newLimit >= k_Alloc_Len_Limit) throw 20130221;
+ // MY_STRING_REALLOC(_chars, wchar_t, newLimit + 1, 0);
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, newLimit + 1);
+ newBuf[0] = 0;
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = newLimit;
+}
+
+void UString::SetStartLen(unsigned len)
+{
+ _chars = 0;
+ _chars = MY_STRING_NEW(wchar_t, len + 1);
+ _len = len;
+ _limit = len;
+}
+
+void UString::Grow_1()
+{
+ unsigned next = _len;
+ next += next / 2;
+ next += 16;
+ next &= ~(unsigned)15;
+ ReAlloc(next - 1);
+}
+
+void UString::Grow(unsigned n)
+{
+ unsigned freeSize = _limit - _len;
+ if (n <= freeSize)
+ return;
+
+ unsigned next = _len + n;
+ next += next / 2;
+ next += 16;
+ next &= ~(unsigned)15;
+ ReAlloc(next - 1);
+}
+
+
+UString::UString(unsigned num, const wchar_t *s)
+{
+ unsigned len = MyStringLen(s);
+ if (num > len)
+ num = len;
+ SetStartLen(num);
+ wmemcpy(_chars, s, num);
+ _chars[num] = 0;
+}
+
+
+UString::UString(unsigned num, const UString &s)
+{
+ if (num > s._len)
+ num = s._len;
+ SetStartLen(num);
+ wmemcpy(_chars, s._chars, num);
+ _chars[num] = 0;
+}
+
+UString::UString(const UString &s, wchar_t c)
+{
+ SetStartLen(s.Len() + 1);
+ wchar_t *chars = _chars;
+ unsigned len = s.Len();
+ wmemcpy(chars, s, len);
+ chars[len] = c;
+ chars[len + 1] = 0;
+}
+
+UString::UString(const wchar_t *s1, unsigned num1, const wchar_t *s2, unsigned num2)
+{
+ SetStartLen(num1 + num2);
+ wchar_t *chars = _chars;
+ wmemcpy(chars, s1, num1);
+ wmemcpy(chars + num1, s2, num2 + 1);
+}
+
+UString operator+(const UString &s1, const UString &s2) { return UString(s1, s1.Len(), s2, s2.Len()); }
+UString operator+(const UString &s1, const wchar_t *s2) { return UString(s1, s1.Len(), s2, MyStringLen(s2)); }
+UString operator+(const wchar_t *s1, const UString &s2) { return UString(s1, MyStringLen(s1), s2, s2.Len()); }
+
+UString::UString()
+{
+ _chars = 0;
+ _chars = MY_STRING_NEW(wchar_t, 4);
+ _len = 0;
+ _limit = 4 - 1;
+ _chars[0] = 0;
+}
+
+UString::UString(wchar_t c)
+{
+ SetStartLen(1);
+ _chars[0] = c;
+ _chars[1] = 0;
+}
+
+UString::UString(const wchar_t *s)
+{
+ unsigned len = MyStringLen(s);
+ SetStartLen(len);
+ wmemcpy(_chars, s, len + 1);
+}
+
+UString::UString(const UString &s)
+{
+ SetStartLen(s._len);
+ wmemcpy(_chars, s._chars, s._len + 1);
+}
+
+UString &UString::operator=(wchar_t c)
+{
+ if (1 > _limit)
+ {
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, 1 + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = 1;
+ }
+ _len = 1;
+ _chars[0] = c;
+ _chars[1] = 0;
+ return *this;
+}
+
+UString &UString::operator=(const wchar_t *s)
+{
+ unsigned len = MyStringLen(s);
+ if (len > _limit)
+ {
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = len;
+ }
+ _len = len;
+ wmemcpy(_chars, s, len + 1);
+ return *this;
+}
+
+UString &UString::operator=(const UString &s)
+{
+ if (&s == this)
+ return *this;
+ unsigned len = s._len;
+ if (len > _limit)
+ {
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = len;
+ }
+ _len = len;
+ wmemcpy(_chars, s._chars, len + 1);
+ return *this;
+}
+
+void UString::SetFromBstr(BSTR s)
+{
+ unsigned len = ::SysStringLen(s);
+ if (len > _limit)
+ {
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = len;
+ }
+ _len = len;
+ // if (s)
+ wmemcpy(_chars, s, len + 1);
+}
+
+void UString::Add_Space() { operator+=(L' '); }
+void UString::Add_Space_if_NotEmpty() { if (!IsEmpty()) Add_Space(); }
+
+void UString::Add_LF()
+{
+ if (_limit == _len)
+ Grow_1();
+ unsigned len = _len;
+ wchar_t *chars = _chars;
+ chars[len++] = L'\n';
+ chars[len] = 0;
+ _len = len;
+}
+
+UString &UString::operator+=(const wchar_t *s)
+{
+ unsigned len = MyStringLen(s);
+ Grow(len);
+ wmemcpy(_chars + _len, s, len + 1);
+ _len += len;
+ return *this;
+}
+
+UString &UString::operator+=(const UString &s)
+{
+ Grow(s._len);
+ wmemcpy(_chars + _len, s._chars, s._len + 1);
+ _len += s._len;
+ return *this;
+}
+
+void UString::SetFrom(const wchar_t *s, unsigned len) // no check
+{
+ if (len > _limit)
+ {
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = len;
+ }
+ if (len != 0)
+ wmemcpy(_chars, s, len);
+ _chars[len] = 0;
+ _len = len;
+}
+
+void UString::SetFromAscii(const char *s)
+{
+ unsigned len = MyStringLen(s);
+ if (len > _limit)
+ {
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, len + 1);
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ _limit = len;
+ }
+ wchar_t *chars = _chars;
+ for (unsigned i = 0; i < len; i++)
+ chars[i] = (unsigned char)s[i];
+ chars[len] = 0;
+ _len = len;
+}
+
+void UString::AddAscii(const char *s)
+{
+ unsigned len = MyStringLen(s);
+ Grow(len);
+ wchar_t *chars = _chars + _len;
+ for (unsigned i = 0; i < len; i++)
+ chars[i] = (unsigned char)s[i];
+ chars[len] = 0;
+ _len += len;
+}
+
+
+
+int UString::Find(const wchar_t *s, unsigned startIndex) const throw()
+{
+ const wchar_t *fs = wcsstr(_chars + startIndex, s);
+ if (!fs)
+ return -1;
+ return (int)(fs - _chars);
+
+ /*
+ if (s[0] == 0)
+ return startIndex;
+ unsigned len = MyStringLen(s);
+ const wchar_t *p = _chars + startIndex;
+ for (;; p++)
+ {
+ const wchar_t c = *p;
+ if (c != s[0])
+ {
+ if (c == 0)
+ return -1;
+ continue;
+ }
+ unsigned i;
+ for (i = 1; i < len; i++)
+ if (p[i] != s[i])
+ break;
+ if (i == len)
+ return (int)(p - _chars);
+ }
+ */
+}
+
+int UString::ReverseFind(wchar_t c) const throw()
+{
+ if (_len == 0)
+ return -1;
+ const wchar_t *p = _chars + _len - 1;
+ for (;;)
+ {
+ if (*p == c)
+ return (int)(p - _chars);
+ if (p == _chars)
+ return -1;
+ p--;
+ }
+}
+
+int UString::ReverseFind_PathSepar() const throw()
+{
+ if (_len == 0)
+ return -1;
+ const wchar_t *p = _chars + _len - 1;
+ for (;;)
+ {
+ wchar_t c = *p;
+ if (IS_PATH_SEPAR(c))
+ return (int)(p - _chars);
+ if (p == _chars)
+ return -1;
+ p--;
+ }
+}
+
+void UString::TrimLeft() throw()
+{
+ const wchar_t *p = _chars;
+ for (;; p++)
+ {
+ wchar_t c = *p;
+ if (c != ' ' && c != '\n' && c != '\t')
+ break;
+ }
+ unsigned pos = (unsigned)(p - _chars);
+ if (pos != 0)
+ {
+ MoveItems(0, pos);
+ _len -= pos;
+ }
+}
+
+void UString::TrimRight() throw()
+{
+ const wchar_t *p = _chars;
+ unsigned i;
+ for (i = _len; i != 0; i--)
+ {
+ wchar_t c = p[i - 1];
+ if (c != ' ' && c != '\n' && c != '\t')
+ break;
+ }
+ if (i != _len)
+ {
+ _chars[i] = 0;
+ _len = i;
+ }
+}
+
+void UString::InsertAtFront(wchar_t c)
+{
+ if (_limit == _len)
+ Grow_1();
+ MoveItems(1, 0);
+ _chars[0] = c;
+ _len++;
+}
+
+/*
+void UString::Insert(unsigned index, wchar_t c)
+{
+ InsertSpace(index, 1);
+ _chars[index] = c;
+ _len++;
+}
+*/
+
+void UString::Insert(unsigned index, const wchar_t *s)
+{
+ unsigned num = MyStringLen(s);
+ if (num != 0)
+ {
+ InsertSpace(index, num);
+ wmemcpy(_chars + index, s, num);
+ _len += num;
+ }
+}
+
+void UString::Insert(unsigned index, const UString &s)
+{
+ unsigned num = s.Len();
+ if (num != 0)
+ {
+ InsertSpace(index, num);
+ wmemcpy(_chars + index, s, num);
+ _len += num;
+ }
+}
+
+void UString::RemoveChar(wchar_t ch) throw()
+{
+ wchar_t *src = _chars;
+
+ for (;;)
+ {
+ wchar_t c = *src++;
+ if (c == 0)
+ return;
+ if (c == ch)
+ break;
+ }
+
+ wchar_t *dest = src - 1;
+
+ for (;;)
+ {
+ wchar_t c = *src++;
+ if (c == 0)
+ break;
+ if (c != ch)
+ *dest++ = c;
+ }
+
+ *dest = 0;
+ _len = (unsigned)(dest - _chars);
+}
+
+// !!!!!!!!!!!!!!! test it if newChar = '\0'
+void UString::Replace(wchar_t oldChar, wchar_t newChar) throw()
+{
+ if (oldChar == newChar)
+ return; // 0;
+ // unsigned number = 0;
+ int pos = 0;
+ while ((unsigned)pos < _len)
+ {
+ pos = Find(oldChar, pos);
+ if (pos < 0)
+ break;
+ _chars[(unsigned)pos] = newChar;
+ pos++;
+ // number++;
+ }
+ return; // number;
+}
+
+void UString::Replace(const UString &oldString, const UString &newString)
+{
+ if (oldString.IsEmpty())
+ return; // 0;
+ if (oldString == newString)
+ return; // 0;
+ unsigned oldLen = oldString.Len();
+ unsigned newLen = newString.Len();
+ // unsigned number = 0;
+ int pos = 0;
+ while ((unsigned)pos < _len)
+ {
+ pos = Find(oldString, pos);
+ if (pos < 0)
+ break;
+ Delete(pos, oldLen);
+ Insert(pos, newString);
+ pos += newLen;
+ // number++;
+ }
+ // return number;
+}
+
+void UString::Delete(unsigned index) throw()
+{
+ MoveItems(index, index + 1);
+ _len--;
+}
+
+void UString::Delete(unsigned index, unsigned count) throw()
+{
+ if (index + count > _len)
+ count = _len - index;
+ if (count > 0)
+ {
+ MoveItems(index, index + count);
+ _len -= count;
+ }
+}
+
+void UString::DeleteFrontal(unsigned num) throw()
+{
+ if (num != 0)
+ {
+ MoveItems(0, num);
+ _len -= num;
+ }
+}
+
+
+// ---------- UString2 ----------
+
+void UString2::ReAlloc2(unsigned newLimit)
+{
+ if (newLimit >= k_Alloc_Len_Limit) throw 20130221;
+ // MY_STRING_REALLOC(_chars, wchar_t, newLimit + 1, 0);
+ _chars = MY_STRING_NEW(wchar_t, newLimit + 1);
+}
+
+void UString2::SetStartLen(unsigned len)
+{
+ _chars = 0;
+ _chars = MY_STRING_NEW(wchar_t, len + 1);
+ _len = len;
+}
+
+
+/*
+UString2::UString2(wchar_t c)
+{
+ SetStartLen(1);
+ _chars[0] = c;
+ _chars[1] = 0;
+}
+*/
+
+UString2::UString2(const wchar_t *s)
+{
+ unsigned len = MyStringLen(s);
+ SetStartLen(len);
+ wmemcpy(_chars, s, len + 1);
+}
+
+UString2::UString2(const UString2 &s): _chars(NULL), _len(0)
+{
+ if (s._chars)
+ {
+ SetStartLen(s._len);
+ wmemcpy(_chars, s._chars, s._len + 1);
+ }
+}
+
+/*
+UString2 &UString2::operator=(wchar_t c)
+{
+ if (1 > _len)
+ {
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, 1 + 1);
+ if (_chars)
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ }
+ _len = 1;
+ _chars[0] = c;
+ _chars[1] = 0;
+ return *this;
+}
+*/
+
+UString2 &UString2::operator=(const wchar_t *s)
+{
+ unsigned len = MyStringLen(s);
+ if (len > _len)
+ {
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, len + 1);
+ if (_chars)
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ }
+ _len = len;
+ MyStringCopy(_chars, s);
+ return *this;
+}
+
+void UString2::SetFromAscii(const char *s)
+{
+ unsigned len = MyStringLen(s);
+ if (len > _len)
+ {
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, len + 1);
+ if (_chars)
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ }
+ wchar_t *chars = _chars;
+ for (unsigned i = 0; i < len; i++)
+ chars[i] = (unsigned char)s[i];
+ chars[len] = 0;
+ _len = len;
+}
+
+UString2 &UString2::operator=(const UString2 &s)
+{
+ if (&s == this)
+ return *this;
+ unsigned len = s._len;
+ if (len > _len)
+ {
+ wchar_t *newBuf = MY_STRING_NEW(wchar_t, len + 1);
+ if (_chars)
+ MY_STRING_DELETE(_chars);
+ _chars = newBuf;
+ }
+ _len = len;
+ MyStringCopy(_chars, s._chars);
+ return *this;
+}
+
+bool operator==(const UString2 &s1, const UString2 &s2)
+{
+ return s1.Len() == s2.Len() && (s1.IsEmpty() || wcscmp(s1.GetRawPtr(), s2.GetRawPtr()) == 0);
+}
+
+bool operator==(const UString2 &s1, const wchar_t *s2)
+{
+ if (s1.IsEmpty())
+ return (*s2 == 0);
+ return wcscmp(s1.GetRawPtr(), s2) == 0;
+}
+
+bool operator==(const wchar_t *s1, const UString2 &s2)
+{
+ if (s2.IsEmpty())
+ return (*s1 == 0);
+ return wcscmp(s1, s2.GetRawPtr()) == 0;
+}
+
+
+
+// ----------------------------------------
+
+/*
int MyStringCompareNoCase(const char *s1, const char *s2)
{
- return MyStringCompareNoCase(MultiByteToUnicodeString(s1, CP_ACP), MultiByteToUnicodeString(s2, CP_ACP));
+ return MyStringCompareNoCase(MultiByteToUnicodeString(s1), MultiByteToUnicodeString(s2));
}
+*/
static inline UINT GetCurrentCodePage()
{
- #if defined(UNDER_CE) || !defined(defined)
+ #if defined(UNDER_CE) || !defined(_WIN32)
return CP_ACP;
#else
return ::AreFileApisANSI() ? CP_ACP : CP_OEMCP;
@@ -243,6 +1535,8 @@ static inline UINT GetCurrentCodePage()
#ifdef USE_UNICODE_FSTRING
+#ifndef _UNICODE
+
AString fs2fas(CFSTR s)
{
return UnicodeStringToMultiByte(s, GetCurrentCodePage());
@@ -253,6 +1547,8 @@ FString fas2fs(const AString &s)
return MultiByteToUnicodeString(s, GetCurrentCodePage());
}
+#endif
+
#else
UString fs2us(const FString &s)
diff --git a/3rdparty/lzma/CPP/Common/MyString.h b/3rdparty/lzma/CPP/Common/MyString.h
index 0312bac6d72..02308555a38 100644
--- a/3rdparty/lzma/CPP/Common/MyString.h
+++ b/3rdparty/lzma/CPP/Common/MyString.h
@@ -5,552 +5,727 @@
#include <string.h>
-#include "Types.h"
+#ifndef _WIN32
+#include <wctype.h>
+#include <wchar.h>
+#endif
+
+#include "MyWindows.h"
+#include "MyTypes.h"
#include "MyVector.h"
-template <class T>
-inline int MyStringLen(const T *s)
+#ifdef _WIN32
+#define IS_PATH_SEPAR(c) ((c) == '\\' || (c) == '/')
+#else
+#define IS_PATH_SEPAR(c) ((c) == CHAR_PATH_SEPARATOR)
+#endif
+
+inline bool IsPathSepar(char c) { return IS_PATH_SEPAR(c); }
+inline bool IsPathSepar(wchar_t c) { return IS_PATH_SEPAR(c); }
+
+inline unsigned MyStringLen(const char *s)
{
- int i;
- for (i = 0; s[i] != '\0'; i++);
+ unsigned i;
+ for (i = 0; s[i] != 0; i++);
return i;
}
-template <class T>
-inline void MyStringCopy(T *dest, const T *src)
+inline void MyStringCopy(char *dest, const char *src)
{
while ((*dest++ = *src++) != 0);
}
-int FindCharPosInString(const char *s, char c);
-int FindCharPosInString(const wchar_t *s, wchar_t c);
+inline char *MyStpCpy(char *dest, const char *src)
+{
+ for (;;)
+ {
+ char c = *src;
+ *dest = c;
+ if (c == 0)
+ return dest;
+ src++;
+ dest++;
+ }
+}
-inline wchar_t* MyStringGetNextCharPointer(wchar_t *p)
- { return (p + 1); }
-inline const wchar_t* MyStringGetNextCharPointer(const wchar_t *p)
- { return (p + 1); }
-inline wchar_t* MyStringGetPrevCharPointer(const wchar_t *, wchar_t *p)
- { return (p - 1); }
-inline const wchar_t* MyStringGetPrevCharPointer(const wchar_t *, const wchar_t *p)
- { return (p - 1); }
+inline unsigned MyStringLen(const wchar_t *s)
+{
+ unsigned i;
+ for (i = 0; s[i] != 0; i++);
+ return i;
+}
-wchar_t MyCharUpper(wchar_t c);
-// wchar_t MyCharLower(wchar_t c);
+inline void MyStringCopy(wchar_t *dest, const wchar_t *src)
+{
+ while ((*dest++ = *src++) != 0);
+}
-char *MyStringUpper(char *s);
-char *MyStringLower(char *s);
+/*
+inline wchar_t *MyWcpCpy(wchar_t *dest, const wchar_t *src)
+{
+ for (;;)
+ {
+ wchar_t c = *src;
+ *dest = c;
+ if (c == 0)
+ return dest;
+ src++;
+ dest++;
+ }
+}
+*/
-wchar_t *MyStringUpper(wchar_t *s);
-wchar_t *MyStringLower(wchar_t *s);
+int FindCharPosInString(const char *s, char c) throw();
+int FindCharPosInString(const wchar_t *s, wchar_t c) throw();
-const char* MyStringGetNextCharPointer(const char *p);
-const char* MyStringGetPrevCharPointer(const char *base, const char *p);
+#ifdef _WIN32
+ #ifndef _UNICODE
+ #define STRING_UNICODE_THROW
+ #endif
+#endif
-//////////////////////////////////////
-// Compare
+#ifndef STRING_UNICODE_THROW
+ #define STRING_UNICODE_THROW throw()
+#endif
-int MyStringCompare(const char *s1, const char *s2);
-int MyStringCompare(const wchar_t *s1, const wchar_t *s2);
+/*
+inline char MyCharUpper_Ascii(char c)
+{
+ if (c >= 'a' && c <= 'z')
+ return (char)(c - 0x20);
+ return c;
+}
+inline wchar_t MyCharUpper_Ascii(wchar_t c)
+{
+ if (c >= 'a' && c <= 'z')
+ return (wchar_t)(c - 0x20);
+ return c;
+}
+*/
-int MyStringCompareNoCase(const char *s1, const char *s2);
-int MyStringCompareNoCase(const wchar_t *s1, const wchar_t *s2);
+inline char MyCharLower_Ascii(char c)
+{
+ if (c >= 'A' && c <= 'Z')
+ return (char)((unsigned char)c + 0x20);
+ return c;
+}
-template <class T>
-class CStringBase
+inline wchar_t MyCharLower_Ascii(wchar_t c)
{
- void TrimLeftWithCharSet(const CStringBase &charSet)
- {
- const T *p = _chars;
- while (charSet.Find(*p) >= 0 && (*p != 0))
- p = GetNextCharPointer(p);
- Delete(0, (int)(p - _chars));
- }
- void TrimRightWithCharSet(const CStringBase &charSet)
- {
- const T *p = _chars;
- const T *pLast = NULL;
- while (*p != 0)
- {
- if (charSet.Find(*p) >= 0)
- {
- if (pLast == NULL)
- pLast = p;
- }
- else
- pLast = NULL;
- p = GetNextCharPointer(p);
- }
- if (pLast != NULL)
- {
- int i = (int)(pLast - _chars);
- Delete(i, _length - i);
- }
+ if (c >= 'A' && c <= 'Z')
+ return (wchar_t)(c + 0x20);
+ return c;
+}
- }
- void MoveItems(int destIndex, int srcIndex)
- {
- memmove(_chars + destIndex, _chars + srcIndex,
- sizeof(T) * (_length - srcIndex + 1));
- }
-
- void InsertSpace(int &index, int size)
- {
- CorrectIndex(index);
- GrowLength(size);
- MoveItems(index + size, index);
- }
+wchar_t MyCharUpper_WIN(wchar_t c) throw();
- static const T *GetNextCharPointer(const T *p)
- { return MyStringGetNextCharPointer(p); }
- static const T *GetPrevCharPointer(const T *base, const T *p)
- { return MyStringGetPrevCharPointer(base, p); }
-protected:
- T *_chars;
- int _length;
- int _capacity;
-
- void SetCapacity(int newCapacity)
- {
- int realCapacity = newCapacity + 1;
- if (realCapacity == _capacity)
- return;
- /*
- const int kMaxStringSize = 0x20000000;
- if (newCapacity > kMaxStringSize || newCapacity < _length)
- throw 1052337;
- */
- T *newBuffer = new T[realCapacity];
- if (_capacity > 0)
- {
- for (int i = 0; i < _length; i++)
- newBuffer[i] = _chars[i];
- delete []_chars;
- }
- _chars = newBuffer;
- _chars[_length] = 0;
- _capacity = realCapacity;
- }
+inline wchar_t MyCharUpper(wchar_t c) throw()
+{
+ if (c < 'a') return c;
+ if (c <= 'z') return (wchar_t)(c - 0x20);
+ if (c <= 0x7F) return c;
+ #ifdef _WIN32
+ #ifdef _UNICODE
+ return (wchar_t)(unsigned)(UINT_PTR)CharUpperW((LPWSTR)(UINT_PTR)(unsigned)c);
+ #else
+ return (wchar_t)MyCharUpper_WIN(c);
+ #endif
+ #else
+ return (wchar_t)towupper(c);
+ #endif
+}
- void GrowLength(int n)
- {
- int freeSize = _capacity - _length - 1;
- if (n <= freeSize)
- return;
- int delta;
- if (_capacity > 64)
- delta = _capacity / 2;
- else if (_capacity > 8)
- delta = 16;
- else
- delta = 4;
- if (freeSize + delta < n)
- delta = n - freeSize;
- SetCapacity(_capacity + delta);
- }
+/*
+wchar_t MyCharLower_WIN(wchar_t c) throw();
- void CorrectIndex(int &index) const
- {
- if (index > _length)
- index = _length;
- }
+inline wchar_t MyCharLower(wchar_t c) throw()
+{
+ if (c < 'A') return c;
+ if (c <= 'Z') return (wchar_t)(c + 0x20);
+ if (c <= 0x7F) return c;
+ #ifdef _WIN32
+ #ifdef _UNICODE
+ return (wchar_t)(unsigned)(UINT_PTR)CharLowerW((LPWSTR)(UINT_PTR)(unsigned)c);
+ #else
+ return (wchar_t)MyCharLower_WIN(c);
+ #endif
+ #else
+ return (wchar_t)tolower(c);
+ #endif
+}
+*/
-public:
- CStringBase(): _chars(0), _length(0), _capacity(0) { SetCapacity(3); }
- CStringBase(T c): _chars(0), _length(0), _capacity(0)
- {
- SetCapacity(1);
- _chars[0] = c;
- _chars[1] = 0;
- _length = 1;
- }
- CStringBase(const T *chars): _chars(0), _length(0), _capacity(0)
- {
- int length = MyStringLen(chars);
- SetCapacity(length);
- MyStringCopy(_chars, chars); // can be optimized by memove()
- _length = length;
- }
- CStringBase(const CStringBase &s): _chars(0), _length(0), _capacity(0)
- {
- SetCapacity(s._length);
- MyStringCopy(_chars, s._chars);
- _length = s._length;
- }
- ~CStringBase() { delete []_chars; }
+// char *MyStringUpper(char *s) throw();
+// char *MyStringLower(char *s) throw();
- operator const T*() const { return _chars;}
+// void MyStringUpper_Ascii(wchar_t *s) throw();
+void MyStringLower_Ascii(char *s) throw();
+void MyStringLower_Ascii(wchar_t *s) throw();
+// wchar_t *MyStringUpper(wchar_t *s) STRING_UNICODE_THROW;
+// wchar_t *MyStringLower(wchar_t *s) STRING_UNICODE_THROW;
- T Back() const { return _chars[_length - 1]; }
+bool StringsAreEqualNoCase(const wchar_t *s1, const wchar_t *s2) throw();
- // The minimum size of the character buffer in characters.
- // This value does not include space for a null terminator.
- T* GetBuffer(int minBufLength)
+bool IsString1PrefixedByString2(const char *s1, const char *s2) throw();
+bool IsString1PrefixedByString2(const wchar_t *s1, const wchar_t *s2) throw();
+bool IsString1PrefixedByString2_NoCase(const wchar_t *s1, const wchar_t *s2) throw();
+
+int MyStringCompareNoCase(const wchar_t *s1, const wchar_t *s2) throw();
+// int MyStringCompareNoCase_N(const wchar_t *s1, const wchar_t *s2, unsigned num) throw();
+
+// ---------- ASCII ----------
+// char values in ASCII strings must be less then 128
+bool StringsAreEqual_Ascii(const wchar_t *u, const char *a) throw();
+bool StringsAreEqualNoCase_Ascii(const char *s1, const char *s2) throw();
+bool StringsAreEqualNoCase_Ascii(const wchar_t *s1, const char *s2) throw();
+bool StringsAreEqualNoCase_Ascii(const wchar_t *s1, const wchar_t *s2) throw();
+
+#define MY_STRING_DELETE(_p_) delete []_p_;
+// #define MY_STRING_DELETE(_p_) my_delete(_p_);
+
+class AString
+{
+ char *_chars;
+ unsigned _len;
+ unsigned _limit;
+
+ void MoveItems(unsigned dest, unsigned src)
{
- if (minBufLength >= _capacity)
- SetCapacity(minBufLength);
+ memmove(_chars + dest, _chars + src, (size_t)(_len - src + 1) * sizeof(char));
+ }
+
+ void InsertSpace(unsigned &index, unsigned size);
+
+ void ReAlloc(unsigned newLimit);
+ void ReAlloc2(unsigned newLimit);
+ void SetStartLen(unsigned len);
+ void Grow_1();
+ void Grow(unsigned n);
+
+ // AString(unsigned num, const char *s);
+ AString(unsigned num, const AString &s);
+ AString(const AString &s, char c); // it's for String + char
+ AString(const char *s1, unsigned num1, const char *s2, unsigned num2);
+
+ friend AString operator+(const AString &s, char c) { return AString(s, c); } ;
+ // friend AString operator+(char c, const AString &s); // is not supported
+
+ friend AString operator+(const AString &s1, const AString &s2);
+ friend AString operator+(const AString &s1, const char *s2);
+ friend AString operator+(const char *s1, const AString &s2);
+
+ // ---------- forbidden functions ----------
+ AString &operator+=(wchar_t c);
+ AString &operator=(wchar_t c);
+ AString(wchar_t c);
+ void Find(wchar_t c) const;
+ void Find(wchar_t c, unsigned startIndex) const;
+ void ReverseFind(wchar_t c) const;
+ void InsertAtFront(wchar_t c);
+ void RemoveChar(wchar_t ch);
+ void Replace(wchar_t oldChar, wchar_t newChar);
+
+public:
+ AString();
+ AString(char c);
+ AString(const char *s);
+ AString(const AString &s);
+ ~AString() { MY_STRING_DELETE(_chars); }
+
+ unsigned Len() const { return _len; }
+ bool IsEmpty() const { return _len == 0; }
+ void Empty() { _len = 0; _chars[0] = 0; }
+
+ operator const char *() const { return _chars; }
+ const char *Ptr() const { return _chars; }
+ const char *Ptr(unsigned pos) const { return _chars + pos; }
+ const char *RightPtr(unsigned num) const { return _chars + _len - num; }
+ char Back() const { return _chars[_len - 1]; }
+
+ void ReplaceOneCharAtPos(unsigned pos, char c) { _chars[pos] = c; }
+
+ /* GetBuf(minLen): provides the buffer that can store
+ at least (minLen) characters and additional null terminator.
+ 9.35: GetBuf doesn't preserve old characters and terminator */
+ char *GetBuf(unsigned minLen)
+ {
+ if (minLen > _limit)
+ ReAlloc2(minLen);
return _chars;
}
- void ReleaseBuffer() { ReleaseBuffer(MyStringLen(_chars)); }
- void ReleaseBuffer(int newLength)
+ char *GetBuf_SetEnd(unsigned minLen)
{
- /*
- if (newLength >= _capacity)
- throw 282217;
- */
- _chars[newLength] = 0;
- _length = newLength;
+ if (minLen > _limit)
+ ReAlloc2(minLen);
+ char *chars = _chars;
+ chars[minLen] = 0;
+ _len = minLen;
+ return chars;
}
- CStringBase& operator=(T c)
- {
- Empty();
- SetCapacity(1);
- _chars[0] = c;
- _chars[1] = 0;
- _length = 1;
- return *this;
- }
- CStringBase& operator=(const T *chars)
+ void ReleaseBuf_SetLen(unsigned newLen) { _len = newLen; }
+ void ReleaseBuf_SetEnd(unsigned newLen) { _len = newLen; _chars[newLen] = 0; }
+ void ReleaseBuf_CalcLen(unsigned maxLen)
{
- Empty();
- int length = MyStringLen(chars);
- SetCapacity(length);
- MyStringCopy(_chars, chars);
- _length = length;
- return *this;
+ char *chars = _chars;
+ chars[maxLen] = 0;
+ _len = MyStringLen(chars);
}
- CStringBase& operator=(const CStringBase& s)
+
+ AString &operator=(char c);
+ AString &operator=(const char *s);
+ AString &operator=(const AString &s);
+ void SetFromWStr_if_Ascii(const wchar_t *s);
+ // void SetFromBstr_if_Ascii(BSTR s);
+
+ AString &operator+=(char c)
{
- if (&s == this)
- return *this;
- Empty();
- SetCapacity(s._length);
- MyStringCopy(_chars, s._chars);
- _length = s._length;
+ if (_limit == _len)
+ Grow_1();
+ unsigned len = _len;
+ char *chars = _chars;
+ chars[len++] = c;
+ chars[len] = 0;
+ _len = len;
return *this;
}
- CStringBase& operator+=(T c)
+ void Add_Space();
+ void Add_Space_if_NotEmpty();
+ void Add_LF();
+ void Add_PathSepar() { operator+=(CHAR_PATH_SEPARATOR); }
+
+ AString &operator+=(const char *s);
+ AString &operator+=(const AString &s);
+ void AddAscii(const char *s) { operator+=(s); }
+
+ void SetFrom(const char *s, unsigned len); // no check
+ void SetFrom_CalcLen(const char *s, unsigned len);
+ // void SetFromAscii(const char *s) { operator+=(s); }
+
+ AString Mid(unsigned startIndex, unsigned count) const { return AString(count, _chars + startIndex); }
+ AString Left(unsigned count) const { return AString(count, *this); }
+
+ // void MakeUpper() { MyStringUpper(_chars); }
+ // void MakeLower() { MyStringLower(_chars); }
+ void MakeLower_Ascii() { MyStringLower_Ascii(_chars); }
+
+
+ bool IsEqualTo(const char *s) const { return strcmp(_chars, s) == 0; }
+ bool IsEqualTo_Ascii_NoCase(const char *s) const { return StringsAreEqualNoCase_Ascii(_chars, s); }
+ // int Compare(const char *s) const { return MyStringCompare(_chars, s); }
+ // int Compare(const AString &s) const { return MyStringCompare(_chars, s._chars); }
+ // int CompareNoCase(const char *s) const { return MyStringCompareNoCase(_chars, s); }
+ // int CompareNoCase(const AString &s) const { return MyStringCompareNoCase(_chars, s._chars); }
+ bool IsPrefixedBy(const char *s) const { return IsString1PrefixedByString2(_chars, s); }
+ bool IsPrefixedBy_Ascii_NoCase(const char *s) const throw();
+
+ bool IsAscii() const
+ {
+ unsigned len = Len();
+ const char *s = _chars;
+ for (unsigned i = 0; i < len; i++)
+ if ((unsigned char)s[i] >= 0x80)
+ return false;
+ return true;
+ }
+ int Find(char c) const { return FindCharPosInString(_chars, c); }
+ int Find(char c, unsigned startIndex) const
{
- GrowLength(1);
- _chars[_length] = c;
- _chars[++_length] = 0;
- return *this;
- }
- CStringBase& operator+=(const T *s)
- {
- int len = MyStringLen(s);
- GrowLength(len);
- MyStringCopy(_chars + _length, s);
- _length += len;
- return *this;
- }
- CStringBase& operator+=(const CStringBase &s)
- {
- GrowLength(s._length);
- MyStringCopy(_chars + _length, s._chars);
- _length += s._length;
- return *this;
- }
- void Empty()
- {
- _length = 0;
- _chars[0] = 0;
+ int pos = FindCharPosInString(_chars + startIndex, c);
+ return pos < 0 ? -1 : (int)startIndex + pos;
}
- int Length() const { return _length; }
- bool IsEmpty() const { return (_length == 0); }
+
+ int ReverseFind(char c) const throw();
+ int ReverseFind_Dot() const throw() { return ReverseFind('.'); }
+ int ReverseFind_PathSepar() const throw();
- CStringBase Mid(int startIndex) const
- { return Mid(startIndex, _length - startIndex); }
- CStringBase Mid(int startIndex, int count) const
+ int Find(const char *s) const { return Find(s, 0); }
+ int Find(const char *s, unsigned startIndex) const throw();
+
+ void TrimLeft() throw();
+ void TrimRight() throw();
+ void Trim()
{
- if (startIndex + count > _length)
- count = _length - startIndex;
-
- if (startIndex == 0 && startIndex + count == _length)
- return *this;
-
- CStringBase<T> result;
- result.SetCapacity(count);
- // MyStringNCopy(result._chars, _chars + startIndex, count);
- for (int i = 0; i < count; i++)
- result._chars[i] = _chars[startIndex + i];
- result._chars[count] = 0;
- result._length = count;
- return result;
+ TrimRight();
+ TrimLeft();
}
- CStringBase Left(int count) const
- { return Mid(0, count); }
- CStringBase Right(int count) const
+
+ void InsertAtFront(char c);
+ // void Insert(unsigned index, char c);
+ void Insert(unsigned index, const char *s);
+ void Insert(unsigned index, const AString &s);
+
+ void RemoveChar(char ch) throw();
+
+ void Replace(char oldChar, char newChar) throw();
+ void Replace(const AString &oldString, const AString &newString);
+
+ void Delete(unsigned index) throw();
+ void Delete(unsigned index, unsigned count) throw();
+ void DeleteFrontal(unsigned num) throw();
+ void DeleteBack() { _chars[--_len] = 0; }
+ void DeleteFrom(unsigned index)
{
- if (count > _length)
- count = _length;
- return Mid(_length - count, count);
+ if (index < _len)
+ {
+ _len = index;
+ _chars[index] = 0;
+ }
}
+};
- void MakeUpper() { MyStringUpper(_chars); }
- void MakeLower() { MyStringLower(_chars); }
+bool operator<(const AString &s1, const AString &s2);
+bool operator>(const AString &s1, const AString &s2);
- int Compare(const CStringBase& s) const
- { return MyStringCompare(_chars, s._chars); }
+/*
+bool operator==(const AString &s1, const AString &s2);
+bool operator==(const AString &s1, const char *s2);
+bool operator==(const char *s1, const AString &s2);
- int Compare(const T *s) const
- { return MyStringCompare(_chars, s); }
+bool operator!=(const AString &s1, const AString &s2);
+bool operator!=(const AString &s1, const char *s2);
+bool operator!=(const char *s1, const AString &s2);
+*/
- int CompareNoCase(const CStringBase& s) const
- { return MyStringCompareNoCase(_chars, s._chars); }
+inline bool operator==(const AString &s1, const AString &s2) { return s1.Len() == s2.Len() && strcmp(s1, s2) == 0; }
+inline bool operator==(const AString &s1, const char *s2) { return strcmp(s1, s2) == 0; }
+inline bool operator==(const char *s1, const AString &s2) { return strcmp(s1, s2) == 0; }
- int CompareNoCase(const T *s) const
- { return MyStringCompareNoCase(_chars, s); }
+inline bool operator!=(const AString &s1, const AString &s2) { return s1.Len() != s2.Len() || strcmp(s1, s2) != 0; }
+inline bool operator!=(const AString &s1, const char *s2) { return strcmp(s1, s2) != 0; }
+inline bool operator!=(const char *s1, const AString &s2) { return strcmp(s1, s2) != 0; }
- /*
- int Collate(const CStringBase& s) const
- { return MyStringCollate(_chars, s._chars); }
- int CollateNoCase(const CStringBase& s) const
- { return MyStringCollateNoCase(_chars, s._chars); }
- */
+// ---------- forbidden functions ----------
- int Find(T c) const { return FindCharPosInString(_chars, c); }
- int Find(T c, int startIndex) const
- {
- int pos = FindCharPosInString(_chars + startIndex, c);
- return pos < 0 ? -1 : pos + startIndex;
- }
- int Find(const CStringBase &s) const { return Find(s, 0); }
- int Find(const CStringBase &s, int startIndex) const
+void operator==(char c1, const AString &s2);
+void operator==(const AString &s1, char c2);
+
+void operator+(char c, const AString &s); // this function can be OK, but we don't use it
+
+void operator+(const AString &s, int c);
+void operator+(const AString &s, unsigned c);
+void operator+(int c, const AString &s);
+void operator+(unsigned c, const AString &s);
+void operator-(const AString &s, int c);
+void operator-(const AString &s, unsigned c);
+
+
+class UString
+{
+ wchar_t *_chars;
+ unsigned _len;
+ unsigned _limit;
+
+ void MoveItems(unsigned dest, unsigned src)
{
- if (s.IsEmpty())
- return startIndex;
- for (; startIndex < _length; startIndex++)
- {
- int j;
- for (j = 0; j < s._length && startIndex + j < _length; j++)
- if (_chars[startIndex+j] != s._chars[j])
- break;
- if (j == s._length)
- return startIndex;
- }
- return -1;
+ memmove(_chars + dest, _chars + src, (size_t)(_len - src + 1) * sizeof(wchar_t));
}
- int ReverseFind(T c) const
+
+ void InsertSpace(unsigned index, unsigned size);
+
+ void ReAlloc(unsigned newLimit);
+ void ReAlloc2(unsigned newLimit);
+ void SetStartLen(unsigned len);
+ void Grow_1();
+ void Grow(unsigned n);
+
+ UString(unsigned num, const wchar_t *s); // for Mid
+ UString(unsigned num, const UString &s); // for Left
+ UString(const UString &s, wchar_t c); // it's for String + char
+ UString(const wchar_t *s1, unsigned num1, const wchar_t *s2, unsigned num2);
+
+ friend UString operator+(const UString &s, wchar_t c) { return UString(s, c); } ;
+ // friend UString operator+(wchar_t c, const UString &s); // is not supported
+
+ friend UString operator+(const UString &s1, const UString &s2);
+ friend UString operator+(const UString &s1, const wchar_t *s2);
+ friend UString operator+(const wchar_t *s1, const UString &s2);
+
+ // ---------- forbidden functions ----------
+
+ UString &operator+=(char c);
+ UString &operator+=(unsigned char c);
+ UString &operator=(char c);
+ UString &operator=(unsigned char c);
+ UString(char c);
+ UString(unsigned char c);
+ void Find(char c) const;
+ void Find(unsigned char c) const;
+ void Find(char c, unsigned startIndex) const;
+ void Find(unsigned char c, unsigned startIndex) const;
+ void ReverseFind(char c) const;
+ void ReverseFind(unsigned char c) const;
+ void InsertAtFront(char c);
+ void InsertAtFront(unsigned char c);
+ void RemoveChar(char ch);
+ void RemoveChar(unsigned char ch);
+ void Replace(char oldChar, char newChar);
+ void Replace(unsigned char oldChar, unsigned char newChar);
+
+public:
+ UString();
+ UString(wchar_t c);
+ UString(const wchar_t *s);
+ UString(const UString &s);
+ ~UString() { MY_STRING_DELETE(_chars); }
+
+ unsigned Len() const { return _len; }
+ bool IsEmpty() const { return _len == 0; }
+ void Empty() { _len = 0; _chars[0] = 0; }
+
+ operator const wchar_t *() const { return _chars; }
+ const wchar_t *Ptr() const { return _chars; }
+ const wchar_t *Ptr(unsigned pos) const { return _chars + pos; }
+ const wchar_t *RightPtr(unsigned num) const { return _chars + _len - num; }
+ wchar_t Back() const { return _chars[_len - 1]; }
+
+ void ReplaceOneCharAtPos(unsigned pos, wchar_t c) { _chars[pos] = c; }
+
+ wchar_t *GetBuf(unsigned minLen)
{
- if (_length == 0)
- return -1;
- const T *p = _chars + _length - 1;
- for (;;)
- {
- if (*p == c)
- return (int)(p - _chars);
- if (p == _chars)
- return -1;
- p = GetPrevCharPointer(_chars, p);
- }
+ if (minLen > _limit)
+ ReAlloc2(minLen);
+ return _chars;
}
- int FindOneOf(const CStringBase &s) const
+ wchar_t *GetBuf_SetEnd(unsigned minLen)
{
- for (int i = 0; i < _length; i++)
- if (s.Find(_chars[i]) >= 0)
- return i;
- return -1;
+ if (minLen > _limit)
+ ReAlloc2(minLen);
+ wchar_t *chars = _chars;
+ chars[minLen] = 0;
+ _len = minLen;
+ return chars;
}
- void TrimLeft(T c)
+ void ReleaseBuf_SetLen(unsigned newLen) { _len = newLen; }
+ void ReleaseBuf_SetEnd(unsigned newLen) { _len = newLen; _chars[newLen] = 0; }
+ void ReleaseBuf_CalcLen(unsigned maxLen)
{
- const T *p = _chars;
- while (c == *p)
- p = GetNextCharPointer(p);
- Delete(0, p - _chars);
+ wchar_t *chars = _chars;
+ chars[maxLen] = 0;
+ _len = MyStringLen(chars);
}
- private:
- CStringBase GetTrimDefaultCharSet()
- {
- CStringBase<T> charSet;
- charSet += (T)' ';
- charSet += (T)'\n';
- charSet += (T)'\t';
- return charSet;
- }
- public:
- void TrimLeft()
+ UString &operator=(wchar_t c);
+ UString &operator=(const wchar_t *s);
+ UString &operator=(const UString &s);
+ void SetFromBstr(BSTR s);
+
+ UString &operator+=(wchar_t c)
{
- TrimLeftWithCharSet(GetTrimDefaultCharSet());
+ if (_limit == _len)
+ Grow_1();
+ unsigned len = _len;
+ wchar_t *chars = _chars;
+ chars[len++] = c;
+ chars[len] = 0;
+ _len = len;
+ return *this;
}
- void TrimRight()
+
+ void Add_Space();
+ void Add_Space_if_NotEmpty();
+ void Add_LF();
+ void Add_PathSepar() { operator+=(WCHAR_PATH_SEPARATOR); }
+
+ UString &operator+=(const wchar_t *s);
+ UString &operator+=(const UString &s);
+
+ void SetFrom(const wchar_t *s, unsigned len); // no check
+
+ void SetFromAscii(const char *s);
+ void AddAscii(const char *s);
+
+ UString Mid(unsigned startIndex, unsigned count) const { return UString(count, _chars + startIndex); }
+ UString Left(unsigned count) const { return UString(count, *this); }
+
+ // void MakeUpper() { MyStringUpper(_chars); }
+ // void MakeUpper() { MyStringUpper_Ascii(_chars); }
+ // void MakeUpper_Ascii() { MyStringUpper_Ascii(_chars); }
+ void MakeLower_Ascii() { MyStringLower_Ascii(_chars); }
+
+ bool IsEqualTo(const char *s) const { return StringsAreEqual_Ascii(_chars, s); }
+ bool IsEqualTo_NoCase(const wchar_t *s) const { return StringsAreEqualNoCase(_chars, s); }
+ bool IsEqualTo_Ascii_NoCase(const char *s) const { return StringsAreEqualNoCase_Ascii(_chars, s); }
+ int Compare(const wchar_t *s) const { return wcscmp(_chars, s); }
+ // int Compare(const UString &s) const { return MyStringCompare(_chars, s._chars); }
+ // int CompareNoCase(const wchar_t *s) const { return MyStringCompareNoCase(_chars, s); }
+ // int CompareNoCase(const UString &s) const { return MyStringCompareNoCase(_chars, s._chars); }
+ bool IsPrefixedBy(const wchar_t *s) const { return IsString1PrefixedByString2(_chars, s); }
+ bool IsPrefixedBy_NoCase(const wchar_t *s) const { return IsString1PrefixedByString2_NoCase(_chars, s); }
+ bool IsPrefixedBy_Ascii_NoCase(const char *s) const throw();
+
+ bool IsAscii() const
{
- TrimRightWithCharSet(GetTrimDefaultCharSet());
+ unsigned len = Len();
+ const wchar_t *s = _chars;
+ for (unsigned i = 0; i < len; i++)
+ if (s[i] >= 0x80)
+ return false;
+ return true;
}
- void TrimRight(T c)
+ int Find(wchar_t c) const { return FindCharPosInString(_chars, c); }
+ int Find(wchar_t c, unsigned startIndex) const
{
- const T *p = _chars;
- const T *pLast = NULL;
- while (*p != 0)
- {
- if (*p == c)
- {
- if (pLast == NULL)
- pLast = p;
- }
- else
- pLast = NULL;
- p = GetNextCharPointer(p);
- }
- if (pLast != NULL)
- {
- int i = pLast - _chars;
- Delete(i, _length - i);
- }
+ int pos = FindCharPosInString(_chars + startIndex, c);
+ return pos < 0 ? -1 : (int)startIndex + pos;
}
+
+ int ReverseFind(wchar_t c) const throw();
+ int ReverseFind_Dot() const throw() { return ReverseFind(L'.'); }
+ int ReverseFind_PathSepar() const throw();
+
+ int Find(const wchar_t *s) const { return Find(s, 0); }
+ int Find(const wchar_t *s, unsigned startIndex) const throw();
+
+ void TrimLeft() throw();
+ void TrimRight() throw();
void Trim()
{
TrimRight();
TrimLeft();
}
- int Insert(int index, T c)
- {
- InsertSpace(index, 1);
- _chars[index] = c;
- _length++;
- return _length;
- }
- int Insert(int index, const CStringBase &s)
- {
- CorrectIndex(index);
- if (s.IsEmpty())
- return _length;
- int numInsertChars = s.Length();
- InsertSpace(index, numInsertChars);
- for (int i = 0; i < numInsertChars; i++)
- _chars[index + i] = s[i];
- _length += numInsertChars;
- return _length;
- }
+ void InsertAtFront(wchar_t c);
+ // void Insert(unsigned index, wchar_t c);
+ void Insert(unsigned index, const wchar_t *s);
+ void Insert(unsigned index, const UString &s);
- // !!!!!!!!!!!!!!! test it if newChar = '\0'
- int Replace(T oldChar, T newChar)
- {
- if (oldChar == newChar)
- return 0;
- int number = 0;
- int pos = 0;
- while (pos < Length())
- {
- pos = Find(oldChar, pos);
- if (pos < 0)
- break;
- _chars[pos] = newChar;
- pos++;
- number++;
- }
- return number;
- }
- int Replace(const CStringBase &oldString, const CStringBase &newString)
- {
- if (oldString.IsEmpty())
- return 0;
- if (oldString == newString)
- return 0;
- int oldStringLength = oldString.Length();
- int newStringLength = newString.Length();
- int number = 0;
- int pos = 0;
- while (pos < _length)
- {
- pos = Find(oldString, pos);
- if (pos < 0)
- break;
- Delete(pos, oldStringLength);
- Insert(pos, newString);
- pos += newStringLength;
- number++;
- }
- return number;
- }
- int Delete(int index, int count = 1)
+ void RemoveChar(wchar_t ch) throw();
+
+ void Replace(wchar_t oldChar, wchar_t newChar) throw();
+ void Replace(const UString &oldString, const UString &newString);
+
+ void Delete(unsigned index) throw();
+ void Delete(unsigned index, unsigned count) throw();
+ void DeleteFrontal(unsigned num) throw();
+ void DeleteBack() { _chars[--_len] = 0; }
+ void DeleteFrom(unsigned index)
{
- if (index + count > _length)
- count = _length - index;
- if (count > 0)
+ if (index < _len)
{
- MoveItems(index, index + count);
- _length -= count;
+ _len = index;
+ _chars[index] = 0;
}
- return _length;
}
- void DeleteBack() { Delete(_length - 1); }
};
-template <class T>
-CStringBase<T> operator+(const CStringBase<T>& s1, const CStringBase<T>& s2)
-{
- CStringBase<T> result(s1);
- result += s2;
- return result;
-}
+bool operator<(const UString &s1, const UString &s2);
+bool operator>(const UString &s1, const UString &s2);
+
+inline bool operator==(const UString &s1, const UString &s2) { return s1.Len() == s2.Len() && wcscmp(s1, s2) == 0; }
+inline bool operator==(const UString &s1, const wchar_t *s2) { return wcscmp(s1, s2) == 0; }
+inline bool operator==(const wchar_t *s1, const UString &s2) { return wcscmp(s1, s2) == 0; }
+
+inline bool operator!=(const UString &s1, const UString &s2) { return s1.Len() != s2.Len() || wcscmp(s1, s2) != 0; }
+inline bool operator!=(const UString &s1, const wchar_t *s2) { return wcscmp(s1, s2) != 0; }
+inline bool operator!=(const wchar_t *s1, const UString &s2) { return wcscmp(s1, s2) != 0; }
+
+
+// ---------- forbidden functions ----------
+
+void operator==(wchar_t c1, const UString &s2);
+void operator==(const UString &s1, wchar_t c2);
+
+void operator+(wchar_t c, const UString &s); // this function can be OK, but we don't use it
+
+void operator+(const UString &s, char c);
+void operator+(const UString &s, unsigned char c);
+void operator+(char c, const UString &s);
+void operator+(unsigned char c, const UString &s);
+void operator-(const UString &s1, wchar_t c);
+
+#ifdef _WIN32
+// can we forbid these functions, if wchar_t is 32-bit ?
+void operator+(const UString &s, int c);
+void operator+(const UString &s, unsigned c);
+void operator+(int c, const UString &s);
+void operator+(unsigned c, const UString &s);
+void operator-(const UString &s1, int c);
+void operator-(const UString &s1, unsigned c);
+#endif
+
+
-template <class T>
-CStringBase<T> operator+(const CStringBase<T>& s, T c)
-{
- CStringBase<T> result(s);
- result += c;
- return result;
-}
-template <class T>
-CStringBase<T> operator+(T c, const CStringBase<T>& s)
-{
- CStringBase<T> result(c);
- result += s;
- return result;
-}
-template <class T>
-CStringBase<T> operator+(const CStringBase<T>& s, const T * chars)
-{
- CStringBase<T> result(s);
- result += chars;
- return result;
-}
-template <class T>
-CStringBase<T> operator+(const T * chars, const CStringBase<T>& s)
+
+class UString2
{
- CStringBase<T> result(chars);
- result += s;
- return result;
-}
+ wchar_t *_chars;
+ unsigned _len;
+
+ void ReAlloc2(unsigned newLimit);
+ void SetStartLen(unsigned len);
+
+ // ---------- forbidden functions ----------
+
+ UString2 &operator=(char c);
+ UString2 &operator=(unsigned char c);
+ UString2 &operator=(wchar_t c);
+ UString2(char c);
+ UString2(unsigned char c);
+
+public:
+ UString2(): _chars(NULL), _len(0) {}
+ // UString2(wchar_t c);
+ UString2(const wchar_t *s);
+ UString2(const UString2 &s);
+ ~UString2() { if (_chars) MY_STRING_DELETE(_chars); }
+
+ unsigned Len() const { return _len; }
+ bool IsEmpty() const { return _len == 0; }
+ // void Empty() { _len = 0; _chars[0] = 0; }
+
+ // operator const wchar_t *() const { return _chars; }
+ const wchar_t *GetRawPtr() const { return _chars; }
+
+ wchar_t *GetBuf(unsigned minLen)
+ {
+ if (!_chars || minLen > _len)
+ ReAlloc2(minLen);
+ return _chars;
+ }
+ void ReleaseBuf_SetLen(unsigned newLen) { _len = newLen; }
+
+ UString2 &operator=(const wchar_t *s);
+ UString2 &operator=(const UString2 &s);
+ void SetFromAscii(const char *s);
+};
+
+bool operator==(const UString2 &s1, const UString2 &s2);
+bool operator==(const UString2 &s1, const wchar_t *s2);
+bool operator==(const wchar_t *s1, const UString2 &s2);
+
+inline bool operator!=(const UString2 &s1, const UString2 &s2) { return !(s1 == s2); }
+inline bool operator!=(const UString2 &s1, const wchar_t *s2) { return !(s1 == s2); }
+inline bool operator!=(const wchar_t *s1, const UString2 &s2) { return !(s1 == s2); }
+
-template <class T>
-bool operator==(const CStringBase<T>& s1, const CStringBase<T>& s2)
- { return (s1.Compare(s2) == 0); }
+// ---------- forbidden functions ----------
-template <class T>
-bool operator<(const CStringBase<T>& s1, const CStringBase<T>& s2)
- { return (s1.Compare(s2) < 0); }
+void operator==(wchar_t c1, const UString2 &s2);
+void operator==(const UString2 &s1, wchar_t c2);
+bool operator<(const UString2 &s1, const UString2 &s2);
+bool operator>(const UString2 &s1, const UString2 &s2);
-template <class T>
-bool operator==(const T *s1, const CStringBase<T>& s2)
- { return (s2.Compare(s1) == 0); }
+void operator+(const UString2 &s1, const UString2 &s2);
+void operator+(const UString2 &s1, const wchar_t *s2);
+void operator+(const wchar_t *s1, const UString2 &s2);
+void operator+(wchar_t c, const UString2 &s);
+void operator+(const UString2 &s, wchar_t c);
+void operator+(const UString2 &s, char c);
+void operator+(const UString2 &s, unsigned char c);
+void operator+(char c, const UString2 &s);
+void operator+(unsigned char c, const UString2 &s);
+void operator-(const UString2 &s1, wchar_t c);
-template <class T>
-bool operator==(const CStringBase<T>& s1, const T *s2)
- { return (s1.Compare(s2) == 0); }
-template <class T>
-bool operator!=(const CStringBase<T>& s1, const CStringBase<T>& s2)
- { return (s1.Compare(s2) != 0); }
-template <class T>
-bool operator!=(const T *s1, const CStringBase<T>& s2)
- { return (s2.Compare(s1) != 0); }
-template <class T>
-bool operator!=(const CStringBase<T>& s1, const T *s2)
- { return (s1.Compare(s2) != 0); }
-typedef CStringBase<char> AString;
-typedef CStringBase<wchar_t> UString;
typedef CObjectVector<AString> AStringVector;
typedef CObjectVector<UString> UStringVector;
diff --git a/3rdparty/lzma/CPP/Common/MyTypes.h b/3rdparty/lzma/CPP/Common/MyTypes.h
new file mode 100644
index 00000000000..75806f37dcf
--- /dev/null
+++ b/3rdparty/lzma/CPP/Common/MyTypes.h
@@ -0,0 +1,35 @@
+// Common/MyTypes.h
+
+#ifndef __COMMON_MY_TYPES_H
+#define __COMMON_MY_TYPES_H
+
+#include "../../C/7zTypes.h"
+
+typedef int HRes;
+
+struct CBoolPair
+{
+ bool Val;
+ bool Def;
+
+ CBoolPair(): Val(false), Def(false) {}
+
+ void Init()
+ {
+ Val = false;
+ Def = false;
+ }
+
+ void SetTrueTrue()
+ {
+ Val = true;
+ Def = true;
+ }
+};
+
+#define CLASS_NO_COPY(cls) \
+ private: \
+ cls(const cls &); \
+ cls &operator=(const cls &);
+
+#endif
diff --git a/3rdparty/lzma/CPP/Common/MyUnknown.h b/3rdparty/lzma/CPP/Common/MyUnknown.h
index e9e8666b920..ff025cb538d 100644
--- a/3rdparty/lzma/CPP/Common/MyUnknown.h
+++ b/3rdparty/lzma/CPP/Common/MyUnknown.h
@@ -3,11 +3,15 @@
#ifndef __MY_UNKNOWN_H
#define __MY_UNKNOWN_H
+#include "MyWindows.h"
+
+/*
#ifdef _WIN32
#include <basetyps.h>
#include <unknwn.h>
#else
#include "MyWindows.h"
#endif
+*/
#endif
diff --git a/3rdparty/lzma/CPP/Common/MyVector.cpp b/3rdparty/lzma/CPP/Common/MyVector.cpp
index 3b531768847..0b1baf45cc6 100644
--- a/3rdparty/lzma/CPP/Common/MyVector.cpp
+++ b/3rdparty/lzma/CPP/Common/MyVector.cpp
@@ -1,87 +1,3 @@
// Common/MyVector.cpp
#include "StdAfx.h"
-
-#include <string.h>
-
-#include "MyVector.h"
-
-CBaseRecordVector::~CBaseRecordVector() { ClearAndFree(); }
-
-void CBaseRecordVector::ClearAndFree()
-{
- Clear();
- delete []((unsigned char *)_items);
- _capacity = 0;
- _size = 0;
- _items = 0;
-}
-
-void CBaseRecordVector::Clear() { DeleteFrom(0); }
-void CBaseRecordVector::DeleteBack() { Delete(_size - 1); }
-void CBaseRecordVector::DeleteFrom(int index) { Delete(index, _size - index); }
-
-void CBaseRecordVector::ReserveOnePosition()
-{
- if (_size != _capacity)
- return;
- unsigned delta = 1;
- if (_capacity >= 64)
- delta = (unsigned)_capacity / 4;
- else if (_capacity >= 8)
- delta = 8;
- Reserve(_capacity + (int)delta);
-}
-
-void CBaseRecordVector::Reserve(int newCapacity)
-{
- // if (newCapacity <= _capacity)
- if (newCapacity == _capacity)
- return;
- if ((unsigned)newCapacity >= ((unsigned)1 << (sizeof(unsigned) * 8 - 1)))
- throw 1052353;
- size_t newSize = (size_t)(unsigned)newCapacity * _itemSize;
- if (newSize / _itemSize != (size_t)(unsigned)newCapacity)
- throw 1052354;
- unsigned char *p = NULL;
- if (newSize > 0)
- {
- p = new unsigned char[newSize];
- if (p == 0)
- throw 1052355;
- int numRecordsToMove = (_size < newCapacity ? _size : newCapacity);
- memcpy(p, _items, _itemSize * numRecordsToMove);
- }
- delete [](unsigned char *)_items;
- _items = p;
- _capacity = newCapacity;
-}
-
-void CBaseRecordVector::ReserveDown()
-{
- Reserve(_size);
-}
-
-void CBaseRecordVector::MoveItems(int destIndex, int srcIndex)
-{
- memmove(((unsigned char *)_items) + destIndex * _itemSize,
- ((unsigned char *)_items) + srcIndex * _itemSize,
- _itemSize * (_size - srcIndex));
-}
-
-void CBaseRecordVector::InsertOneItem(int index)
-{
- ReserveOnePosition();
- MoveItems(index + 1, index);
- _size++;
-}
-
-void CBaseRecordVector::Delete(int index, int num)
-{
- TestIndexAndCorrectNum(index, num);
- if (num > 0)
- {
- MoveItems(index, index + num);
- _size -= num;
- }
-}
diff --git a/3rdparty/lzma/CPP/Common/MyVector.h b/3rdparty/lzma/CPP/Common/MyVector.h
index 781b648bc87..14f7b11a1a7 100644
--- a/3rdparty/lzma/CPP/Common/MyVector.h
+++ b/3rdparty/lzma/CPP/Common/MyVector.h
@@ -1,92 +1,256 @@
-// Common/Vector.h
+// Common/MyVector.h
-#ifndef __COMMON_VECTOR_H
-#define __COMMON_VECTOR_H
+#ifndef __COMMON_MY_VECTOR_H
+#define __COMMON_MY_VECTOR_H
-#include "Defs.h"
+#include <string.h>
-class CBaseRecordVector
+template <class T>
+class CRecordVector
{
- void MoveItems(int destIndex, int srcIndex);
-protected:
- int _capacity;
- int _size;
- void *_items;
- size_t _itemSize;
+ T *_items;
+ unsigned _size;
+ unsigned _capacity;
- void ReserveOnePosition();
- void InsertOneItem(int index);
- void TestIndexAndCorrectNum(int index, int &num) const
- { if (index + num > _size) num = _size - index; }
-public:
- CBaseRecordVector(size_t itemSize): _capacity(0), _size(0), _items(0), _itemSize(itemSize) {}
- virtual ~CBaseRecordVector();
- void ClearAndFree();
- int Size() const { return _size; }
- bool IsEmpty() const { return (_size == 0); }
- void Reserve(int newCapacity);
- void ReserveDown();
- virtual void Delete(int index, int num = 1);
- void Clear();
- void DeleteFrom(int index);
- void DeleteBack();
-};
+ void MoveItems(unsigned destIndex, unsigned srcIndex)
+ {
+ memmove(_items + destIndex, _items + srcIndex, (size_t)(_size - srcIndex) * sizeof(T));
+ }
+
+ void ReserveOnePosition()
+ {
+ if (_size == _capacity)
+ {
+ unsigned newCapacity = _capacity + (_capacity >> 2) + 1;
+ T *p = new T[newCapacity];
+ if (_size != 0)
+ memcpy(p, _items, (size_t)_size * sizeof(T));
+ delete []_items;
+ _items = p;
+ _capacity = newCapacity;
+ }
+ }
-template <class T>
-class CRecordVector: public CBaseRecordVector
-{
public:
- CRecordVector(): CBaseRecordVector(sizeof(T)){};
- CRecordVector(const CRecordVector &v): CBaseRecordVector(sizeof(T)) { *this = v; }
- CRecordVector& operator=(const CRecordVector &v)
+
+ CRecordVector(): _items(0), _size(0), _capacity(0) {}
+
+ CRecordVector(const CRecordVector &v): _items(0), _size(0), _capacity(0)
+ {
+ unsigned size = v.Size();
+ if (size != 0)
+ {
+ _items = new T[size];
+ _size = size;
+ _capacity = size;
+ memcpy(_items, v._items, (size_t)size * sizeof(T));
+ }
+ }
+
+ unsigned Size() const { return _size; }
+ bool IsEmpty() const { return _size == 0; }
+
+ void ConstructReserve(unsigned size)
+ {
+ if (size != 0)
+ {
+ _items = new T[size];
+ _capacity = size;
+ }
+ }
+
+ void Reserve(unsigned newCapacity)
+ {
+ if (newCapacity > _capacity)
+ {
+ T *p = new T[newCapacity];
+ if (_size != 0)
+ memcpy(p, _items, (size_t)_size * sizeof(T));
+ delete []_items;
+ _items = p;
+ _capacity = newCapacity;
+ }
+ }
+
+ void ClearAndReserve(unsigned newCapacity)
{
Clear();
- return (*this += v);
+ if (newCapacity > _capacity)
+ {
+ delete []_items;
+ _items = NULL;
+ _capacity = 0;
+ _items = new T[newCapacity];
+ _capacity = newCapacity;
+ }
+ }
+
+ void ClearAndSetSize(unsigned newSize)
+ {
+ ClearAndReserve(newSize);
+ _size = newSize;
+ }
+
+ void ChangeSize_KeepData(unsigned newSize)
+ {
+ if (newSize > _capacity)
+ {
+ T *p = new T[newSize];
+ if (_size != 0)
+ memcpy(p, _items, (size_t)_size * sizeof(T));
+ delete []_items;
+ _items = p;
+ _capacity = newSize;
+ }
+ _size = newSize;
+ }
+
+ void ReserveDown()
+ {
+ if (_size == _capacity)
+ return;
+ T *p = NULL;
+ if (_size != 0)
+ {
+ p = new T[_size];
+ memcpy(p, _items, (size_t)_size * sizeof(T));
+ }
+ delete []_items;
+ _items = p;
+ _capacity = _size;
+ }
+
+ ~CRecordVector() { delete []_items; }
+
+ void ClearAndFree()
+ {
+ delete []_items;
+ _items = NULL;
+ _size = 0;
+ _capacity = 0;
+ }
+
+ void Clear() { _size = 0; }
+
+ void DeleteBack() { _size--; }
+
+ void DeleteFrom(unsigned index)
+ {
+ // if (index <= _size)
+ _size = index;
+ }
+
+ void DeleteFrontal(unsigned num)
+ {
+ if (num != 0)
+ {
+ MoveItems(0, num);
+ _size -= num;
+ }
+ }
+
+ void Delete(unsigned index)
+ {
+ MoveItems(index, index + 1);
+ _size -= 1;
+ }
+
+ /*
+ void Delete(unsigned index, unsigned num)
+ {
+ if (num > 0)
+ {
+ MoveItems(index, index + num);
+ _size -= num;
+ }
+ }
+ */
+
+ CRecordVector& operator=(const CRecordVector &v)
+ {
+ if (&v == this)
+ return *this;
+ unsigned size = v.Size();
+ if (size > _capacity)
+ {
+ delete []_items;
+ _capacity = 0;
+ _size = 0;
+ _items = NULL;
+ _items = new T[size];
+ _capacity = size;
+ }
+ _size = size;
+ if (size != 0)
+ memcpy(_items, v._items, (size_t)size * sizeof(T));
+ return *this;
}
+
CRecordVector& operator+=(const CRecordVector &v)
{
- int size = v.Size();
- Reserve(Size() + size);
- for (int i = 0; i < size; i++)
- Add(v[i]);
+ unsigned size = v.Size();
+ Reserve(_size + size);
+ if (size != 0)
+ memcpy(_items + _size, v._items, (size_t)size * sizeof(T));
+ _size += size;
return *this;
}
- int Add(T item)
+
+ unsigned Add(const T item)
{
ReserveOnePosition();
- ((T *)_items)[_size] = item;
+ _items[_size] = item;
return _size++;
}
- void Insert(int index, T item)
+
+ void AddInReserved(const T item)
{
- InsertOneItem(index);
- ((T *)_items)[index] = item;
+ _items[_size++] = item;
}
- // T* GetPointer() const { return (T*)_items; }
- // operator const T *() const { return _items; };
- const T& operator[](int index) const { return ((T *)_items)[index]; }
- T& operator[](int index) { return ((T *)_items)[index]; }
- const T& Front() const { return operator[](0); }
- T& Front() { return operator[](0); }
- const T& Back() const { return operator[](_size - 1); }
- T& Back() { return operator[](_size - 1); }
- void Swap(int i, int j)
+ void Insert(unsigned index, const T item)
{
- T temp = operator[](i);
- operator[](i) = operator[](j);
- operator[](j) = temp;
+ ReserveOnePosition();
+ MoveItems(index + 1, index);
+ _items[index] = item;
+ _size++;
}
- int FindInSorted(const T& item, int left, int right) const
+ void MoveToFront(unsigned index)
+ {
+ if (index != 0)
+ {
+ T temp = _items[index];
+ memmove(_items + 1, _items, (size_t)index * sizeof(T));
+ _items[0] = temp;
+ }
+ }
+
+ const T& operator[](unsigned index) const { return _items[index]; }
+ T& operator[](unsigned index) { return _items[index]; }
+ const T& Front() const { return _items[0]; }
+ T& Front() { return _items[0]; }
+ const T& Back() const { return _items[_size - 1]; }
+ T& Back() { return _items[_size - 1]; }
+
+ /*
+ void Swap(unsigned i, unsigned j)
+ {
+ T temp = _items[i];
+ _items[i] = _items[j];
+ _items[j] = temp;
+ }
+ */
+
+ int FindInSorted(const T item, unsigned left, unsigned right) const
{
while (left != right)
{
- int mid = (left + right) / 2;
- const T& midValue = (*this)[mid];
- if (item == midValue)
+ unsigned mid = (left + right) / 2;
+ const T midVal = (*this)[mid];
+ if (item == midVal)
return mid;
- if (item < midValue)
+ if (item < midVal)
right = mid;
else
left = mid + 1;
@@ -94,16 +258,16 @@ public:
return -1;
}
- int FindInSorted(const T& item) const
+ int FindInSorted2(const T &item, unsigned left, unsigned right) const
{
- int left = 0, right = Size();
while (left != right)
{
- int mid = (left + right) / 2;
- const T& midValue = (*this)[mid];
- if (item == midValue)
+ unsigned mid = (left + right) / 2;
+ const T& midVal = (*this)[mid];
+ int comp = item.Compare(midVal);
+ if (comp == 0)
return mid;
- if (item < midValue)
+ if (comp < 0)
right = mid;
else
left = mid + 1;
@@ -111,16 +275,26 @@ public:
return -1;
}
- int AddToUniqueSorted(const T& item)
+ int FindInSorted(const T item) const
+ {
+ return FindInSorted(item, 0, _size);
+ }
+
+ int FindInSorted2(const T &item) const
{
- int left = 0, right = Size();
+ return FindInSorted2(item, 0, _size);
+ }
+
+ unsigned AddToUniqueSorted(const T item)
+ {
+ unsigned left = 0, right = _size;
while (left != right)
{
- int mid = (left + right) / 2;
- const T& midValue = (*this)[mid];
- if (item == midValue)
+ unsigned mid = (left + right) / 2;
+ const T midVal = (*this)[mid];
+ if (item == midVal)
return mid;
- if (item < midValue)
+ if (item < midVal)
right = mid;
else
left = mid + 1;
@@ -129,12 +303,31 @@ public:
return right;
}
- static void SortRefDown(T* p, int k, int size, int (*compare)(const T*, const T*, void *), void *param)
+ unsigned AddToUniqueSorted2(const T &item)
+ {
+ unsigned left = 0, right = _size;
+ while (left != right)
+ {
+ unsigned mid = (left + right) / 2;
+ const T& midVal = (*this)[mid];
+ int comp = item.Compare(midVal);
+ if (comp == 0)
+ return mid;
+ if (comp < 0)
+ right = mid;
+ else
+ left = mid + 1;
+ }
+ Insert(right, item);
+ return right;
+ }
+
+ static void SortRefDown(T* p, unsigned k, unsigned size, int (*compare)(const T*, const T*, void *), void *param)
{
T temp = p[k];
for (;;)
{
- int s = (k << 1);
+ unsigned s = (k << 1);
if (s > size)
break;
if (s < size && compare(p + s + 1, p + s, param) > 0)
@@ -149,12 +342,12 @@ public:
void Sort(int (*compare)(const T*, const T*, void *), void *param)
{
- int size = _size;
+ unsigned size = _size;
if (size <= 1)
return;
T* p = (&Front()) - 1;
{
- int i = size / 2;
+ unsigned i = size >> 1;
do
SortRefDown(p, i, size, compare, param);
while (--i != 0);
@@ -168,6 +361,46 @@ public:
}
while (size > 1);
}
+
+ static void SortRefDown2(T* p, unsigned k, unsigned size)
+ {
+ T temp = p[k];
+ for (;;)
+ {
+ unsigned s = (k << 1);
+ if (s > size)
+ break;
+ if (s < size && p[s + 1].Compare(p[s]) > 0)
+ s++;
+ if (temp.Compare(p[s]) >= 0)
+ break;
+ p[k] = p[s];
+ k = s;
+ }
+ p[k] = temp;
+ }
+
+ void Sort2()
+ {
+ unsigned size = _size;
+ if (size <= 1)
+ return;
+ T* p = (&Front()) - 1;
+ {
+ unsigned i = size >> 1;
+ do
+ SortRefDown2(p, i, size);
+ while (--i != 0);
+ }
+ do
+ {
+ T temp = p[size];
+ p[size--] = p[1];
+ p[1] = temp;
+ SortRefDown2(p, 1, size);
+ }
+ while (size > 1);
+ }
};
typedef CRecordVector<int> CIntVector;
@@ -177,76 +410,199 @@ typedef CRecordVector<unsigned char> CByteVector;
typedef CRecordVector<void *> CPointerVector;
template <class T>
-class CObjectVector: public CPointerVector
+class CObjectVector
{
+ CPointerVector _v;
public:
+ unsigned Size() const { return _v.Size(); }
+ bool IsEmpty() const { return _v.IsEmpty(); }
+ void ReserveDown() { _v.ReserveDown(); }
+ // void Reserve(unsigned newCapacity) { _v.Reserve(newCapacity); }
+ void ClearAndReserve(unsigned newCapacity) { Clear(); _v.ClearAndReserve(newCapacity); }
+
CObjectVector() {};
- ~CObjectVector() { Clear(); };
- CObjectVector(const CObjectVector &v): CPointerVector() { *this = v; }
+ CObjectVector(const CObjectVector &v)
+ {
+ unsigned size = v.Size();
+ _v.ConstructReserve(size);
+ for (unsigned i = 0; i < size; i++)
+ _v.AddInReserved(new T(v[i]));
+ }
CObjectVector& operator=(const CObjectVector &v)
{
+ if (&v == this)
+ return *this;
Clear();
- return (*this += v);
+ unsigned size = v.Size();
+ _v.Reserve(size);
+ for (unsigned i = 0; i < size; i++)
+ _v.AddInReserved(new T(v[i]));
+ return *this;
}
+
CObjectVector& operator+=(const CObjectVector &v)
{
- int size = v.Size();
- Reserve(Size() + size);
- for (int i = 0; i < size; i++)
- Add(v[i]);
+ unsigned size = v.Size();
+ _v.Reserve(Size() + size);
+ for (unsigned i = 0; i < size; i++)
+ _v.AddInReserved(new T(v[i]));
return *this;
}
- const T& operator[](int index) const { return *((T *)CPointerVector::operator[](index)); }
- T& operator[](int index) { return *((T *)CPointerVector::operator[](index)); }
- T& Front() { return operator[](0); }
+
+ const T& operator[](unsigned index) const { return *((T *)_v[index]); }
+ T& operator[](unsigned index) { return *((T *)_v[index]); }
const T& Front() const { return operator[](0); }
- T& Back() { return operator[](_size - 1); }
- const T& Back() const { return operator[](_size - 1); }
- int Add(const T& item) { return CPointerVector::Add(new T(item)); }
- void Insert(int index, const T& item) { CPointerVector::Insert(index, new T(item)); }
- virtual void Delete(int index, int num = 1)
+ T& Front() { return operator[](0); }
+ const T& Back() const { return operator[](_v.Size() - 1); }
+ T& Back() { return operator[](_v.Size() - 1); }
+
+ void MoveToFront(unsigned index) { _v.MoveToFront(index); }
+
+ unsigned Add(const T& item) { return _v.Add(new T(item)); }
+
+ void AddInReserved(const T& item) { _v.AddInReserved(new T(item)); }
+
+ T& AddNew()
{
- TestIndexAndCorrectNum(index, num);
- for (int i = 0; i < num; i++)
- delete (T *)(((void **)_items)[index + i]);
- CPointerVector::Delete(index, num);
+ T *p = new T;
+ _v.Add(p);
+ return *p;
}
+
+ T& AddNewInReserved()
+ {
+ T *p = new T;
+ _v.AddInReserved(p);
+ return *p;
+ }
+
+ void Insert(unsigned index, const T& item) { _v.Insert(index, new T(item)); }
+
+ T& InsertNew(unsigned index)
+ {
+ T *p = new T;
+ _v.Insert(index, p);
+ return *p;
+ }
+
+ ~CObjectVector()
+ {
+ for (unsigned i = _v.Size(); i != 0;)
+ delete (T *)_v[--i];
+ }
+
+ void ClearAndFree()
+ {
+ Clear();
+ _v.ClearAndFree();
+ }
+
+ void Clear()
+ {
+ for (unsigned i = _v.Size(); i != 0;)
+ delete (T *)_v[--i];
+ _v.Clear();
+ }
+
+ void DeleteFrom(unsigned index)
+ {
+ unsigned size = _v.Size();
+ for (unsigned i = index; i < size; i++)
+ delete (T *)_v[i];
+ _v.DeleteFrom(index);
+ }
+
+ void DeleteFrontal(unsigned num)
+ {
+ for (unsigned i = 0; i < num; i++)
+ delete (T *)_v[i];
+ _v.DeleteFrontal(num);
+ }
+
+ void DeleteBack()
+ {
+ delete (T *)_v[_v.Size() - 1];
+ _v.DeleteBack();
+ }
+
+ void Delete(unsigned index)
+ {
+ delete (T *)_v[index];
+ _v.Delete(index);
+ }
+
+ /*
+ void Delete(unsigned index, unsigned num)
+ {
+ for (unsigned i = 0; i < num; i++)
+ delete (T *)_v[index + i];
+ _v.Delete(index, num);
+ }
+ */
+
+ /*
int Find(const T& item) const
{
- for (int i = 0; i < Size(); i++)
+ unsigned size = Size();
+ for (unsigned i = 0; i < size; i++)
if (item == (*this)[i])
return i;
return -1;
}
+ */
+
int FindInSorted(const T& item) const
{
- int left = 0, right = Size();
+ unsigned left = 0, right = Size();
while (left != right)
{
- int mid = (left + right) / 2;
- const T& midValue = (*this)[mid];
- if (item == midValue)
+ unsigned mid = (left + right) / 2;
+ const T& midVal = (*this)[mid];
+ int comp = item.Compare(midVal);
+ if (comp == 0)
return mid;
- if (item < midValue)
+ if (comp < 0)
right = mid;
else
left = mid + 1;
}
return -1;
}
- int AddToSorted(const T& item)
+
+ unsigned AddToUniqueSorted(const T& item)
+ {
+ unsigned left = 0, right = Size();
+ while (left != right)
+ {
+ unsigned mid = (left + right) / 2;
+ const T& midVal = (*this)[mid];
+ int comp = item.Compare(midVal);
+ if (comp == 0)
+ return mid;
+ if (comp < 0)
+ right = mid;
+ else
+ left = mid + 1;
+ }
+ Insert(right, item);
+ return right;
+ }
+
+ /*
+ unsigned AddToSorted(const T& item)
{
- int left = 0, right = Size();
+ unsigned left = 0, right = Size();
while (left != right)
{
- int mid = (left + right) / 2;
- const T& midValue = (*this)[mid];
- if (item == midValue)
+ unsigned mid = (left + right) / 2;
+ const T& midVal = (*this)[mid];
+ int comp = item.Compare(midVal);
+ if (comp == 0)
{
right = mid + 1;
break;
}
- if (item < midValue)
+ if (comp < 0)
right = mid;
else
left = mid + 1;
@@ -254,13 +610,17 @@ public:
Insert(right, item);
return right;
}
+ */
void Sort(int (*compare)(void *const *, void *const *, void *), void *param)
- { CPointerVector::Sort(compare, param); }
+ { _v.Sort(compare, param); }
static int CompareObjectItems(void *const *a1, void *const *a2, void * /* param */)
- { return MyCompare(*(*((const T **)a1)), *(*((const T **)a2))); }
- void Sort() { CPointerVector::Sort(CompareObjectItems, 0); }
+ { return (*(*((const T **)a1))).Compare(*(*((const T **)a2))); }
+
+ void Sort() { _v.Sort(CompareObjectItems, 0); }
};
+#define FOR_VECTOR(_i_, _v_) for (unsigned _i_ = 0; _i_ < (_v_).Size(); _i_++)
+
#endif
diff --git a/3rdparty/lzma/CPP/Common/MyWindows.cpp b/3rdparty/lzma/CPP/Common/MyWindows.cpp
index f940fc8aee2..463c77c4a37 100644
--- a/3rdparty/lzma/CPP/Common/MyWindows.cpp
+++ b/3rdparty/lzma/CPP/Common/MyWindows.cpp
@@ -4,71 +4,104 @@
#ifndef _WIN32
+#include <stdlib.h>
+
#include "MyWindows.h"
-#include "Types.h"
-#include <malloc.h>
static inline void *AllocateForBSTR(size_t cb) { return ::malloc(cb); }
static inline void FreeForBSTR(void *pv) { ::free(pv);}
-static UINT MyStringLen(const wchar_t *s)
+/* Win32 uses DWORD (32-bit) type to store size of string before (OLECHAR *) string.
+ We must select CBstrSizeType for another systems (not Win32):
+
+ if (CBstrSizeType is UINT32),
+ then we support only strings smaller than 4 GB.
+ Win32 version always has that limitation.
+
+ if (CBstrSizeType is UINT),
+ (UINT can be 16/32/64-bit)
+ We can support strings larger than 4 GB (if UINT is 64-bit),
+ but sizeof(UINT) can be different in parts compiled by
+ different compilers/settings,
+ and we can't send such BSTR strings between such parts.
+*/
+
+typedef UINT32 CBstrSizeType;
+// typedef UINT CBstrSizeType;
+
+#define k_BstrSize_Max 0xFFFFFFFF
+// #define k_BstrSize_Max UINT_MAX
+// #define k_BstrSize_Max ((UINT)(INT)-1)
+
+BSTR SysAllocStringByteLen(LPCSTR s, UINT len)
{
- UINT i;
- for (i = 0; s[i] != '\0'; i++);
- return i;
+ /* Original SysAllocStringByteLen in Win32 maybe fills only unaligned null OLECHAR at the end.
+ We provide also aligned null OLECHAR at the end. */
+
+ if (len >= (k_BstrSize_Max - sizeof(OLECHAR) - sizeof(OLECHAR) - sizeof(CBstrSizeType)))
+ return NULL;
+
+ UINT size = (len + sizeof(OLECHAR) + sizeof(OLECHAR) - 1) & ~(sizeof(OLECHAR) - 1);
+ void *p = AllocateForBSTR(size + sizeof(CBstrSizeType));
+ if (!p)
+ return NULL;
+ *(CBstrSizeType *)p = (CBstrSizeType)len;
+ BSTR bstr = (BSTR)((CBstrSizeType *)p + 1);
+ if (s)
+ memcpy(bstr, s, len);
+ for (; len < size; len++)
+ ((Byte *)bstr)[len] = 0;
+ return bstr;
}
-BSTR SysAllocStringByteLen(LPCSTR psz, UINT len)
+BSTR SysAllocStringLen(const OLECHAR *s, UINT len)
{
- int realLen = len + sizeof(UINT) + sizeof(OLECHAR) + sizeof(OLECHAR);
- void *p = AllocateForBSTR(realLen);
- if (p == 0)
- return 0;
- *(UINT *)p = len;
- BSTR bstr = (BSTR)((UINT *)p + 1);
- if (psz)
- {
- memmove(bstr, psz, len);
- Byte *pb = ((Byte *)bstr) + len;
- for (unsigned i = 0; i < sizeof(OLECHAR) * 2; i++)
- pb[i] = 0;
- }
+ if (len >= (k_BstrSize_Max - sizeof(OLECHAR) - sizeof(CBstrSizeType)) / sizeof(OLECHAR))
+ return NULL;
+
+ UINT size = len * sizeof(OLECHAR);
+ void *p = AllocateForBSTR(size + sizeof(CBstrSizeType) + sizeof(OLECHAR));
+ if (!p)
+ return NULL;
+ *(CBstrSizeType *)p = (CBstrSizeType)size;
+ BSTR bstr = (BSTR)((CBstrSizeType *)p + 1);
+ if (s)
+ memcpy(bstr, s, size);
+ bstr[len] = 0;
return bstr;
}
-BSTR SysAllocString(const OLECHAR *sz)
+BSTR SysAllocString(const OLECHAR *s)
{
- if (sz == 0)
+ if (!s)
return 0;
- UINT strLen = MyStringLen(sz);
- UINT len = (strLen + 1) * sizeof(OLECHAR);
- void *p = AllocateForBSTR(len + sizeof(UINT));
- if (p == 0)
- return 0;
- *(UINT *)p = strLen;
- BSTR bstr = (BSTR)((UINT *)p + 1);
- memmove(bstr, sz, len);
- return bstr;
+ const OLECHAR *s2 = s;
+ while (*s2 != 0)
+ s2++;
+ return SysAllocStringLen(s, (UINT)(s2 - s));
}
void SysFreeString(BSTR bstr)
{
- if (bstr != 0)
- FreeForBSTR((UINT *)bstr - 1);
+ if (bstr)
+ FreeForBSTR((CBstrSizeType *)bstr - 1);
}
UINT SysStringByteLen(BSTR bstr)
{
- if (bstr == 0)
+ if (!bstr)
return 0;
- return *((UINT *)bstr - 1);
+ return *((CBstrSizeType *)bstr - 1);
}
UINT SysStringLen(BSTR bstr)
{
- return SysStringByteLen(bstr) / sizeof(OLECHAR);
+ if (!bstr)
+ return 0;
+ return *((CBstrSizeType *)bstr - 1) / sizeof(OLECHAR);
}
+
HRESULT VariantClear(VARIANTARG *prop)
{
if (prop->vt == VT_BSTR)
@@ -77,7 +110,7 @@ HRESULT VariantClear(VARIANTARG *prop)
return S_OK;
}
-HRESULT VariantCopy(VARIANTARG *dest, VARIANTARG *src)
+HRESULT VariantCopy(VARIANTARG *dest, const VARIANTARG *src)
{
HRESULT res = ::VariantClear(dest);
if (res != S_OK)
@@ -86,7 +119,7 @@ HRESULT VariantCopy(VARIANTARG *dest, VARIANTARG *src)
{
dest->bstrVal = SysAllocStringByteLen((LPCSTR)src->bstrVal,
SysStringByteLen(src->bstrVal));
- if (dest->bstrVal == 0)
+ if (!dest->bstrVal)
return E_OUTOFMEMORY;
dest->vt = VT_BSTR;
}
diff --git a/3rdparty/lzma/CPP/Common/MyWindows.h b/3rdparty/lzma/CPP/Common/MyWindows.h
index 780e1f5d526..139a4e8b976 100644
--- a/3rdparty/lzma/CPP/Common/MyWindows.h
+++ b/3rdparty/lzma/CPP/Common/MyWindows.h
@@ -7,6 +7,11 @@
#include <windows.h>
+#ifdef UNDER_CE
+ #undef VARIANT_TRUE
+ #define VARIANT_TRUE ((VARIANT_BOOL)-1)
+#endif
+
#else
#include <stddef.h> // for wchar_t
@@ -14,6 +19,8 @@
#include "MyGuidDef.h"
+#define WINAPI
+
typedef char CHAR;
typedef unsigned char UCHAR;
@@ -145,8 +152,6 @@ typedef WORD PROPVAR_PAD1;
typedef WORD PROPVAR_PAD2;
typedef WORD PROPVAR_PAD3;
-#ifdef __cplusplus
-
typedef struct tagPROPVARIANT
{
VARTYPE vt;
@@ -177,7 +182,7 @@ typedef tagVARIANT VARIANT;
typedef VARIANT VARIANTARG;
MY_EXTERN_C HRESULT VariantClear(VARIANTARG *prop);
-MY_EXTERN_C HRESULT VariantCopy(VARIANTARG *dest, VARIANTARG *src);
+MY_EXTERN_C HRESULT VariantCopy(VARIANTARG *dest, const VARIANTARG *src);
typedef struct tagSTATPROPSTG
{
@@ -186,9 +191,8 @@ typedef struct tagSTATPROPSTG
VARTYPE vt;
} STATPROPSTG;
-#endif
-
MY_EXTERN_C BSTR SysAllocStringByteLen(LPCSTR psz, UINT len);
+MY_EXTERN_C BSTR SysAllocStringLen(const OLECHAR *sz, UINT len);
MY_EXTERN_C BSTR SysAllocString(const OLECHAR *sz);
MY_EXTERN_C void SysFreeString(BSTR bstr);
MY_EXTERN_C UINT SysStringByteLen(BSTR bstr);
@@ -199,6 +203,7 @@ MY_EXTERN_C LONG CompareFileTime(const FILETIME* ft1, const FILETIME* ft2);
#define CP_ACP 0
#define CP_OEMCP 1
+#define CP_UTF8 65001
typedef enum tagSTREAM_SEEK
{
diff --git a/3rdparty/lzma/CPP/Common/NewHandler.cpp b/3rdparty/lzma/CPP/Common/NewHandler.cpp
index aad6e7d1693..522c2a75390 100644
--- a/3rdparty/lzma/CPP/Common/NewHandler.cpp
+++ b/3rdparty/lzma/CPP/Common/NewHandler.cpp
@@ -11,6 +11,33 @@
#ifndef DEBUG_MEMORY_LEAK
#ifdef _WIN32
+
+/*
+void * my_new(size_t size)
+{
+ // void *p = ::HeapAlloc(::GetProcessHeap(), 0, size);
+ void *p = ::malloc(size);
+ if (p == 0)
+ throw CNewException();
+ return p;
+}
+
+void my_delete(void *p) throw()
+{
+ // if (p == 0) return; ::HeapFree(::GetProcessHeap(), 0, p);
+ ::free(p);
+}
+
+void * my_Realloc(void *p, size_t newSize, size_t oldSize)
+{
+ void *newBuf = my_new(newSize);
+ if (oldSize != 0)
+ memcpy(newBuf, p, oldSize);
+ my_delete(p);
+ return newBuf;
+}
+*/
+
void *
#ifdef _MSC_VER
__cdecl
@@ -30,18 +57,42 @@ __cdecl
#endif
operator delete(void *p) throw()
{
- /*
+ // if (p == 0) return; ::HeapFree(::GetProcessHeap(), 0, p);
+ ::free(p);
+}
+
+/*
+void *
+#ifdef _MSC_VER
+__cdecl
+#endif
+operator new[](size_t size)
+{
+ // void *p = ::HeapAlloc(::GetProcessHeap(), 0, size);
+ void *p = ::malloc(size);
if (p == 0)
- return;
- ::HeapFree(::GetProcessHeap(), 0, p);
- */
+ throw CNewException();
+ return p;
+}
+
+void
+#ifdef _MSC_VER
+__cdecl
+#endif
+operator delete[](void *p) throw()
+{
+ // if (p == 0) return; ::HeapFree(::GetProcessHeap(), 0, p);
::free(p);
}
+*/
+
#endif
#else
-#pragma init_seg(lib)
+#include <stdio.h>
+
+// #pragma init_seg(lib)
const int kDebugSize = 1000000;
static void *a[kDebugSize];
static int index = 0;
@@ -51,10 +102,6 @@ void * __cdecl operator new(size_t size)
{
numAllocs++;
void *p = HeapAlloc(GetProcessHeap(), 0, size);
- if (index == 40)
- {
- int t = 1;
- }
if (index < kDebugSize)
{
a[index] = p;
@@ -62,7 +109,7 @@ void * __cdecl operator new(size_t size)
}
if (p == 0)
throw CNewException();
- printf("Alloc %6d, size = %8d\n", numAllocs, size);
+ printf("Alloc %6d, size = %8u\n", numAllocs, (unsigned)size);
return p;
}
diff --git a/3rdparty/lzma/CPP/Common/NewHandler.h b/3rdparty/lzma/CPP/Common/NewHandler.h
index 215ba05f103..dcad56886db 100644
--- a/3rdparty/lzma/CPP/Common/NewHandler.h
+++ b/3rdparty/lzma/CPP/Common/NewHandler.h
@@ -1,16 +1,69 @@
// Common/NewHandler.h
-#ifndef __COMMON_NEWHANDLER_H
-#define __COMMON_NEWHANDLER_H
+#ifndef __COMMON_NEW_HANDLER_H
+#define __COMMON_NEW_HANDLER_H
+
+/*
+This file must be included before any code that uses operators "delete" or "new".
+Also you must compile and link "NewHandler.cpp", if you use MSVC 6.0.
+The operator "new" in MSVC 6.0 doesn't throw exception "bad_alloc".
+So we define another version of operator "new" that throws "CNewException" on failure.
+
+If you use compiler that throws exception in "new" operator (GCC or new version of MSVC),
+you can compile without "NewHandler.cpp". So standard exception "bad_alloc" will be used.
+
+It's still allowed to use redefined version of operator "new" from "NewHandler.cpp"
+with any compiler. 7-Zip's code can work with "bad_alloc" and "CNewException" exceptions.
+But if you use some additional code (outside of 7-Zip's code), you must check
+that redefined version of operator "new" (that throws CNewException) is not
+problem for your code.
+
+Also we declare delete(void *p) throw() that creates smaller code.
+*/
+
+#include <stddef.h>
class CNewException {};
+#ifdef WIN32
+// We can compile my_new and my_delete with _fastcall
+/*
+void * my_new(size_t size);
+void my_delete(void *p) throw();
+// void * my_Realloc(void *p, size_t newSize, size_t oldSize);
+*/
+#endif
+
#ifdef _WIN32
+
+void *
+#ifdef _MSC_VER
+__cdecl
+#endif
+operator new(size_t size);
+
void
#ifdef _MSC_VER
__cdecl
#endif
operator delete(void *p) throw();
+
+#endif
+
+/*
+#ifdef _WIN32
+void *
+#ifdef _MSC_VER
+__cdecl
+#endif
+operator new[](size_t size);
+
+void
+#ifdef _MSC_VER
+__cdecl
+#endif
+operator delete[](void *p) throw();
#endif
+*/
#endif
diff --git a/3rdparty/lzma/CPP/Common/Sha256Reg.cpp b/3rdparty/lzma/CPP/Common/Sha256Reg.cpp
new file mode 100644
index 00000000000..6c822cc7b8e
--- /dev/null
+++ b/3rdparty/lzma/CPP/Common/Sha256Reg.cpp
@@ -0,0 +1,40 @@
+// Sha256Reg.cpp
+
+#include "StdAfx.h"
+
+#include "../../C/Sha256.h"
+
+#include "../Common/MyCom.h"
+
+#include "../7zip/Common/RegisterCodec.h"
+
+class CSha256Hasher:
+ public IHasher,
+ public CMyUnknownImp
+{
+ CSha256 _sha;
+ Byte mtDummy[1 << 7];
+
+public:
+ CSha256Hasher() { Sha256_Init(&_sha); }
+
+ MY_UNKNOWN_IMP
+ INTERFACE_IHasher(;)
+};
+
+STDMETHODIMP_(void) CSha256Hasher::Init() throw()
+{
+ Sha256_Init(&_sha);
+}
+
+STDMETHODIMP_(void) CSha256Hasher::Update(const void *data, UInt32 size) throw()
+{
+ Sha256_Update(&_sha, (const Byte *)data, size);
+}
+
+STDMETHODIMP_(void) CSha256Hasher::Final(Byte *digest) throw()
+{
+ Sha256_Final(&_sha, digest);
+}
+
+REGISTER_HASHER(CSha256Hasher, 0xA, "SHA256", SHA256_DIGEST_SIZE)
diff --git a/3rdparty/lzma/CPP/Common/StdAfx.h b/3rdparty/lzma/CPP/Common/StdAfx.h
index b8ba1d5c4c9..420f5c3267f 100644
--- a/3rdparty/lzma/CPP/Common/StdAfx.h
+++ b/3rdparty/lzma/CPP/Common/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-// #include "MyWindows.h"
-#include "NewHandler.h"
+#include "Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/Common/StdInStream.cpp b/3rdparty/lzma/CPP/Common/StdInStream.cpp
index f3dcb85f53a..c35747bbe69 100644
--- a/3rdparty/lzma/CPP/Common/StdInStream.cpp
+++ b/3rdparty/lzma/CPP/Common/StdInStream.cpp
@@ -8,12 +8,6 @@
#include "StringConvert.h"
#include "UTFConvert.h"
-#ifdef _MSC_VER
-// "was declared deprecated" disabling
-#pragma warning(disable : 4996 )
-#endif
-
-static const char kIllegalChar = '\0';
static const char kNewLineChar = '\n';
static const char *kEOFMessage = "Unexpected end of input stream";
@@ -26,7 +20,7 @@ extern int g_CodePage;
CStdInStream g_StdIn(stdin);
-bool CStdInStream::Open(LPCTSTR fileName)
+bool CStdInStream::Open(LPCTSTR fileName) throw()
{
Close();
_stream = _tfopen(fileName, kFileOpenMode);
@@ -34,7 +28,7 @@ bool CStdInStream::Open(LPCTSTR fileName)
return _streamIsOpen;
}
-bool CStdInStream::Close()
+bool CStdInStream::Close() throw()
{
if (!_streamIsOpen)
return true;
@@ -42,11 +36,6 @@ bool CStdInStream::Close()
return !_streamIsOpen;
}
-CStdInStream::~CStdInStream()
-{
- Close();
-}
-
AString CStdInStream::ScanStringUntilNewLine(bool allowEOF)
{
AString s;
@@ -59,8 +48,8 @@ AString CStdInStream::ScanStringUntilNewLine(bool allowEOF)
break;
throw kEOFMessage;
}
- char c = char(intChar);
- if (c == kIllegalChar)
+ char c = (char)intChar;
+ if (c == 0)
throw kIllegalCharMessage;
if (c == kNewLineChar)
break;
@@ -88,10 +77,10 @@ void CStdInStream::ReadToString(AString &resultString)
resultString.Empty();
int c;
while ((c = GetChar()) != EOF)
- resultString += char(c);
+ resultString += (char)c;
}
-bool CStdInStream::Eof()
+bool CStdInStream::Eof() throw()
{
return (feof(_stream) != 0);
}
@@ -103,5 +92,3 @@ int CStdInStream::GetChar()
throw kReadErrorMessage;
return c;
}
-
-
diff --git a/3rdparty/lzma/CPP/Common/StdInStream.h b/3rdparty/lzma/CPP/Common/StdInStream.h
index 0d182cc3c8b..6d9ed67040d 100644
--- a/3rdparty/lzma/CPP/Common/StdInStream.h
+++ b/3rdparty/lzma/CPP/Common/StdInStream.h
@@ -1,29 +1,30 @@
// Common/StdInStream.h
-#ifndef __COMMON_STDINSTREAM_H
-#define __COMMON_STDINSTREAM_H
+#ifndef __COMMON_STD_IN_STREAM_H
+#define __COMMON_STD_IN_STREAM_H
#include <stdio.h>
#include "MyString.h"
-#include "Types.h"
+#include "MyTypes.h"
class CStdInStream
{
- bool _streamIsOpen;
FILE *_stream;
+ bool _streamIsOpen;
public:
- CStdInStream(): _streamIsOpen(false) {};
- CStdInStream(FILE *stream): _streamIsOpen(false), _stream(stream) {};
- ~CStdInStream();
- bool Open(LPCTSTR fileName);
- bool Close();
+ CStdInStream(): _stream(0), _streamIsOpen(false) {};
+ CStdInStream(FILE *stream): _stream(stream), _streamIsOpen(false) {};
+ ~CStdInStream() { Close(); }
+
+ bool Open(LPCTSTR fileName) throw();
+ bool Close() throw();
AString ScanStringUntilNewLine(bool allowEOF = false);
void ReadToString(AString &resultString);
UString ScanUStringUntilNewLine();
- bool Eof();
+ bool Eof() throw();
int GetChar();
};
diff --git a/3rdparty/lzma/CPP/Common/StdOutStream.cpp b/3rdparty/lzma/CPP/Common/StdOutStream.cpp
index 061a760631b..6aed31a3143 100644
--- a/3rdparty/lzma/CPP/Common/StdOutStream.cpp
+++ b/3rdparty/lzma/CPP/Common/StdOutStream.cpp
@@ -9,21 +9,16 @@
#include "StringConvert.h"
#include "UTFConvert.h"
-#ifdef _MSC_VER
-// "was declared deprecated" disabling
-#pragma warning(disable : 4996 )
-#endif
-
static const char kNewLineChar = '\n';
static const char *kFileOpenMode = "wt";
extern int g_CodePage;
-CStdOutStream g_StdOut(stdout);
-CStdOutStream g_StdErr(stderr);
+CStdOutStream g_StdOut(stdout);
+CStdOutStream g_StdErr(stderr);
-bool CStdOutStream::Open(const char *fileName)
+bool CStdOutStream::Open(const char *fileName) throw()
{
Close();
_stream = fopen(fileName, kFileOpenMode);
@@ -31,7 +26,7 @@ bool CStdOutStream::Open(const char *fileName)
return _streamIsOpen;
}
-bool CStdOutStream::Close()
+bool CStdOutStream::Close() throw()
{
if (!_streamIsOpen)
return true;
@@ -42,33 +37,16 @@ bool CStdOutStream::Close()
return true;
}
-bool CStdOutStream::Flush()
+bool CStdOutStream::Flush() throw()
{
return (fflush(_stream) == 0);
}
-CStdOutStream::~CStdOutStream ()
-{
- Close();
-}
-
-CStdOutStream & CStdOutStream::operator<<(CStdOutStream & (*aFunction)(CStdOutStream &))
-{
- (*aFunction)(*this);
- return *this;
-}
-
-CStdOutStream & endl(CStdOutStream & outStream)
+CStdOutStream & endl(CStdOutStream & outStream) throw()
{
return outStream << kNewLineChar;
}
-CStdOutStream & CStdOutStream::operator<<(const char *s)
-{
- fputs(s, _stream);
- return *this;
-}
-
CStdOutStream & CStdOutStream::operator<<(const wchar_t *s)
{
int codePage = g_CodePage;
@@ -78,27 +56,51 @@ CStdOutStream & CStdOutStream::operator<<(const wchar_t *s)
if (codePage == CP_UTF8)
ConvertUnicodeToUTF8(s, dest);
else
- dest = UnicodeStringToMultiByte(s, (UINT)codePage);
- *this << (const char *)dest;
- return *this;
+ UnicodeStringToMultiByte2(dest, s, (UINT)codePage);
+ return operator<<((const char *)dest);
+}
+
+void StdOut_Convert_UString_to_AString(const UString &s, AString &temp)
+{
+ int codePage = g_CodePage;
+ if (codePage == -1)
+ codePage = CP_OEMCP;
+ if (codePage == CP_UTF8)
+ ConvertUnicodeToUTF8(s, temp);
+ else
+ UnicodeStringToMultiByte2(temp, s, (UINT)codePage);
+}
+
+void CStdOutStream::PrintUString(const UString &s, AString &temp)
+{
+ StdOut_Convert_UString_to_AString(s, temp);
+ *this << (const char *)temp;
+}
+
+CStdOutStream & CStdOutStream::operator<<(Int32 number) throw()
+{
+ char s[32];
+ ConvertInt64ToString(number, s);
+ return operator<<(s);
}
-CStdOutStream & CStdOutStream::operator<<(char c)
+CStdOutStream & CStdOutStream::operator<<(Int64 number) throw()
{
- fputc(c, _stream);
- return *this;
+ char s[32];
+ ConvertInt64ToString(number, s);
+ return operator<<(s);
}
-CStdOutStream & CStdOutStream::operator<<(int number)
+CStdOutStream & CStdOutStream::operator<<(UInt32 number) throw()
{
- char textString[32];
- ConvertInt64ToString(number, textString);
- return operator<<(textString);
+ char s[16];
+ ConvertUInt32ToString(number, s);
+ return operator<<(s);
}
-CStdOutStream & CStdOutStream::operator<<(UInt64 number)
+CStdOutStream & CStdOutStream::operator<<(UInt64 number) throw()
{
- char textString[32];
- ConvertUInt64ToString(number, textString);
- return operator<<(textString);
+ char s[32];
+ ConvertUInt64ToString(number, s);
+ return operator<<(s);
}
diff --git a/3rdparty/lzma/CPP/Common/StdOutStream.h b/3rdparty/lzma/CPP/Common/StdOutStream.h
index b0b2c615c7f..1837bfb0adc 100644
--- a/3rdparty/lzma/CPP/Common/StdOutStream.h
+++ b/3rdparty/lzma/CPP/Common/StdOutStream.h
@@ -1,35 +1,62 @@
// Common/StdOutStream.h
-#ifndef __COMMON_STDOUTSTREAM_H
-#define __COMMON_STDOUTSTREAM_H
+#ifndef __COMMON_STD_OUT_STREAM_H
+#define __COMMON_STD_OUT_STREAM_H
#include <stdio.h>
-#include "Types.h"
+#include "MyString.h"
+#include "MyTypes.h"
class CStdOutStream
{
- bool _streamIsOpen;
FILE *_stream;
+ bool _streamIsOpen;
public:
- CStdOutStream (): _streamIsOpen(false), _stream(0) {};
- CStdOutStream (FILE *stream): _streamIsOpen(false), _stream(stream) {};
- ~CStdOutStream ();
+ CStdOutStream(): _stream(0), _streamIsOpen(false) {};
+ CStdOutStream(FILE *stream): _stream(stream), _streamIsOpen(false) {};
+ ~CStdOutStream() { Close(); }
+
+ // void AttachStdStream(FILE *stream) { _stream = stream; _streamIsOpen = false; }
+ // bool IsDefined() const { return _stream != NULL; }
+
operator FILE *() { return _stream; }
- bool Open(const char *fileName);
- bool Close();
- bool Flush();
- CStdOutStream & operator<<(CStdOutStream & (* aFunction)(CStdOutStream &));
- CStdOutStream & operator<<(const char *string);
- CStdOutStream & operator<<(const wchar_t *string);
- CStdOutStream & operator<<(char c);
- CStdOutStream & operator<<(int number);
- CStdOutStream & operator<<(UInt64 number);
+ bool Open(const char *fileName) throw();
+ bool Close() throw();
+ bool Flush() throw();
+
+ CStdOutStream & operator<<(CStdOutStream & (* func)(CStdOutStream &))
+ {
+ (*func)(*this);
+ return *this;
+ }
+
+ CStdOutStream & operator<<(const char *s) throw()
+ {
+ fputs(s, _stream);
+ return *this;
+ }
+
+ CStdOutStream & operator<<(char c) throw()
+ {
+ fputc((unsigned char)c, _stream);
+ return *this;
+ }
+
+ CStdOutStream & operator<<(Int32 number) throw();
+ CStdOutStream & operator<<(Int64 number) throw();
+ CStdOutStream & operator<<(UInt32 number) throw();
+ CStdOutStream & operator<<(UInt64 number) throw();
+
+ CStdOutStream & operator<<(const wchar_t *s);
+ void PrintUString(const UString &s, AString &temp);
};
-CStdOutStream & endl(CStdOutStream & outStream);
+CStdOutStream & endl(CStdOutStream & outStream) throw();
extern CStdOutStream g_StdOut;
extern CStdOutStream g_StdErr;
+void StdOut_Convert_UString_to_AString(const UString &s, AString &temp);
+
#endif
diff --git a/3rdparty/lzma/CPP/Common/StringConvert.cpp b/3rdparty/lzma/CPP/Common/StringConvert.cpp
index 681895b7125..30d95aa7b56 100644
--- a/3rdparty/lzma/CPP/Common/StringConvert.cpp
+++ b/3rdparty/lzma/CPP/Common/StringConvert.cpp
@@ -8,90 +8,306 @@
#include <stdlib.h>
#endif
+static const char k_DefultChar = '_';
+
#ifdef _WIN32
-UString MultiByteToUnicodeString(const AString &srcString, UINT codePage)
+
+/*
+MultiByteToWideChar(CodePage, DWORD dwFlags,
+ LPCSTR lpMultiByteStr, int cbMultiByte,
+ LPWSTR lpWideCharStr, int cchWideChar)
+
+ if (cbMultiByte == 0)
+ return: 0. ERR: ERROR_INVALID_PARAMETER
+
+ if (cchWideChar == 0)
+ return: the required buffer size in characters.
+
+ if (supplied buffer size was not large enough)
+ return: 0. ERR: ERROR_INSUFFICIENT_BUFFER
+ The number of filled characters in lpWideCharStr can be smaller than cchWideChar (if last character is complex)
+
+ If there are illegal characters:
+ if MB_ERR_INVALID_CHARS is set in dwFlags:
+ - the function stops conversion on illegal character.
+ - Return: 0. ERR: ERROR_NO_UNICODE_TRANSLATION.
+
+ if MB_ERR_INVALID_CHARS is NOT set in dwFlags:
+ before Vista: illegal character is dropped (skipped). WinXP-64: GetLastError() returns 0.
+ in Vista+: illegal character is not dropped (MSDN). Undocumented: illegal
+ character is converted to U+FFFD, which is REPLACEMENT CHARACTER.
+*/
+
+
+void MultiByteToUnicodeString2(UString &dest, const AString &src, UINT codePage)
{
- UString resultString;
- if (!srcString.IsEmpty())
+ dest.Empty();
+ if (src.IsEmpty())
+ return;
{
- int numChars = MultiByteToWideChar(codePage, 0, srcString,
- srcString.Length(), resultString.GetBuffer(srcString.Length()),
- srcString.Length() + 1);
- if (numChars == 0)
- throw 282228;
- resultString.ReleaseBuffer(numChars);
+ /*
+ wchar_t *d = dest.GetBuf(src.Len());
+ const char *s = (const char *)src;
+ unsigned i;
+
+ for (i = 0;;)
+ {
+ Byte c = (Byte)s[i];
+ if (c >= 0x80 || c == 0)
+ break;
+ d[i++] = (wchar_t)c;
+ }
+
+ if (i != src.Len())
+ {
+ unsigned len = MultiByteToWideChar(codePage, 0, s + i,
+ src.Len() - i, d + i,
+ src.Len() + 1 - i);
+ if (len == 0)
+ throw 282228;
+ i += len;
+ }
+
+ d[i] = 0;
+ dest.ReleaseBuf_SetLen(i);
+ */
+ unsigned len = MultiByteToWideChar(codePage, 0, src, src.Len(), NULL, 0);
+ if (len == 0)
+ {
+ if (GetLastError() != 0)
+ throw 282228;
+ }
+ else
+ {
+ len = MultiByteToWideChar(codePage, 0, src, src.Len(), dest.GetBuf(len), len);
+ if (len == 0)
+ throw 282228;
+ dest.ReleaseBuf_SetEnd(len);
+ }
}
- return resultString;
}
-AString UnicodeStringToMultiByte(const UString &s, UINT codePage, char defaultChar, bool &defaultCharWasUsed)
+/*
+ int WideCharToMultiByte(
+ UINT CodePage, DWORD dwFlags,
+ LPCWSTR lpWideCharStr, int cchWideChar,
+ LPSTR lpMultiByteStr, int cbMultiByte,
+ LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar);
+
+if (lpDefaultChar == NULL),
+ - it uses system default value.
+
+if (CodePage == CP_UTF7 || CodePage == CP_UTF8)
+ if (lpDefaultChar != NULL || lpUsedDefaultChar != NULL)
+ return: 0. ERR: ERROR_INVALID_PARAMETER.
+
+The function operates most efficiently, if (lpDefaultChar == NULL && lpUsedDefaultChar == NULL)
+
+*/
+
+static void UnicodeStringToMultiByte2(AString &dest, const UString &src, UINT codePage, char defaultChar, bool &defaultCharWasUsed)
{
- AString dest;
+ dest.Empty();
defaultCharWasUsed = false;
- if (!s.IsEmpty())
+ if (src.IsEmpty())
+ return;
{
- int numRequiredBytes = s.Length() * 2;
- BOOL defUsed;
- int numChars = WideCharToMultiByte(codePage, 0, s, s.Length(),
- dest.GetBuffer(numRequiredBytes), numRequiredBytes + 1,
- &defaultChar, &defUsed);
- defaultCharWasUsed = (defUsed != FALSE);
- if (numChars == 0)
- throw 282229;
- dest.ReleaseBuffer(numChars);
- }
- return dest;
-}
+ /*
+ unsigned numRequiredBytes = src.Len() * 2;
+ char *d = dest.GetBuf(numRequiredBytes);
+ const wchar_t *s = (const wchar_t *)src;
+ unsigned i;
+
+ for (i = 0;;)
+ {
+ wchar_t c = s[i];
+ if (c >= 0x80 || c == 0)
+ break;
+ d[i++] = (char)c;
+ }
+
+ if (i != src.Len())
+ {
+ BOOL defUsed = FALSE;
+ defaultChar = defaultChar;
-AString UnicodeStringToMultiByte(const UString &srcString, UINT codePage)
-{
- bool defaultCharWasUsed;
- return UnicodeStringToMultiByte(srcString, codePage, '_', defaultCharWasUsed);
+ bool isUtf = (codePage == CP_UTF8 || codePage == CP_UTF7);
+ unsigned len = WideCharToMultiByte(codePage, 0, s + i, src.Len() - i,
+ d + i, numRequiredBytes + 1 - i,
+ (isUtf ? NULL : &defaultChar),
+ (isUtf ? NULL : &defUsed));
+ defaultCharWasUsed = (defUsed != FALSE);
+ if (len == 0)
+ throw 282229;
+ i += len;
+ }
+
+ d[i] = 0;
+ dest.ReleaseBuf_SetLen(i);
+ */
+
+ /*
+ if (codePage != CP_UTF7)
+ {
+ const wchar_t *s = (const wchar_t *)src;
+ unsigned i;
+ for (i = 0;; i++)
+ {
+ wchar_t c = s[i];
+ if (c >= 0x80 || c == 0)
+ break;
+ }
+
+ if (s[i] == 0)
+ {
+ char *d = dest.GetBuf(src.Len());
+ for (i = 0;;)
+ {
+ wchar_t c = s[i];
+ if (c == 0)
+ break;
+ d[i++] = (char)c;
+ }
+ d[i] = 0;
+ dest.ReleaseBuf_SetLen(i);
+ return;
+ }
+ }
+ */
+
+ unsigned len = WideCharToMultiByte(codePage, 0, src, src.Len(), NULL, 0, NULL, NULL);
+ if (len == 0)
+ {
+ if (GetLastError() != 0)
+ throw 282228;
+ }
+ else
+ {
+ BOOL defUsed = FALSE;
+ bool isUtf = (codePage == CP_UTF8 || codePage == CP_UTF7);
+ // defaultChar = defaultChar;
+ len = WideCharToMultiByte(codePage, 0, src, src.Len(),
+ dest.GetBuf(len), len,
+ (isUtf ? NULL : &defaultChar),
+ (isUtf ? NULL : &defUsed)
+ );
+ if (!isUtf)
+ defaultCharWasUsed = (defUsed != FALSE);
+ if (len == 0)
+ throw 282228;
+ dest.ReleaseBuf_SetEnd(len);
+ }
+ }
}
+/*
#ifndef UNDER_CE
-AString SystemStringToOemString(const CSysString &srcString)
+AString SystemStringToOemString(const CSysString &src)
{
- AString result;
- CharToOem(srcString, result.GetBuffer(srcString.Length() * 2));
- result.ReleaseBuffer();
- return result;
+ AString dest;
+ const unsigned len = src.Len() * 2;
+ CharToOem(src, dest.GetBuf(len));
+ dest.ReleaseBuf_CalcLen(len);
+ return dest;
}
#endif
+*/
#else
-UString MultiByteToUnicodeString(const AString &srcString, UINT codePage)
+void MultiByteToUnicodeString2(UString &dest, const AString &src, UINT /* codePage */)
{
- UString resultString;
- for (int i = 0; i < srcString.Length(); i++)
- resultString += wchar_t(srcString[i]);
- /*
- if (!srcString.IsEmpty())
+ dest.Empty();
+ if (src.IsEmpty())
+ return;
+
+ size_t limit = ((size_t)src.Len() + 1) * 2;
+ wchar_t *d = dest.GetBuf((unsigned)limit);
+ size_t len = mbstowcs(d, src, limit);
+ if (len != (size_t)-1)
{
- int numChars = mbstowcs(resultString.GetBuffer(srcString.Length()), srcString, srcString.Length() + 1);
- if (numChars < 0) throw "Your environment does not support UNICODE";
- resultString.ReleaseBuffer(numChars);
+ dest.ReleaseBuf_SetEnd((unsigned)len);
+ return;
+ }
+
+ {
+ unsigned i;
+ const char *s = (const char *)src;
+ for (i = 0;;)
+ {
+ Byte c = (Byte)s[i];
+ if (c == 0)
+ break;
+ d[i++] = (wchar_t)c;
+ }
+ d[i] = 0;
+ dest.ReleaseBuf_SetLen(i);
}
- */
- return resultString;
}
-AString UnicodeStringToMultiByte(const UString &srcString, UINT codePage)
+static void UnicodeStringToMultiByte2(AString &dest, const UString &src, UINT /* codePage */, char defaultChar, bool &defaultCharWasUsed)
{
- AString resultString;
- for (int i = 0; i < srcString.Length(); i++)
- resultString += char(srcString[i]);
- /*
- if (!srcString.IsEmpty())
+ dest.Empty();
+ defaultCharWasUsed = false;
+ if (src.IsEmpty())
+ return;
+
+ size_t limit = ((size_t)src.Len() + 1) * 6;
+ char *d = dest.GetBuf((unsigned)limit);
+ size_t len = wcstombs(d, src, limit);
+ if (len != (size_t)-1)
+ {
+ dest.ReleaseBuf_SetEnd((unsigned)len);
+ return;
+ }
+
{
- int numRequiredBytes = srcString.Length() * 6 + 1;
- int numChars = wcstombs(resultString.GetBuffer(numRequiredBytes), srcString, numRequiredBytes);
- if (numChars < 0) throw "Your environment does not support UNICODE";
- resultString.ReleaseBuffer(numChars);
+ const wchar_t *s = (const wchar_t *)src;
+ unsigned i;
+ for (i = 0;;)
+ {
+ wchar_t c = s[i];
+ if (c == 0)
+ break;
+ if (c >= 0x100)
+ {
+ c = defaultChar;
+ defaultCharWasUsed = true;
+ }
+ d[i++] = (char)c;
+ }
+ d[i] = 0;
+ dest.ReleaseBuf_SetLen(i);
}
- */
- return resultString;
}
#endif
+
+
+UString MultiByteToUnicodeString(const AString &src, UINT codePage)
+{
+ UString dest;
+ MultiByteToUnicodeString2(dest, src, codePage);
+ return dest;
+}
+
+void UnicodeStringToMultiByte2(AString &dest, const UString &src, UINT codePage)
+{
+ bool defaultCharWasUsed;
+ UnicodeStringToMultiByte2(dest, src, codePage, k_DefultChar, defaultCharWasUsed);
+}
+
+AString UnicodeStringToMultiByte(const UString &src, UINT codePage, char defaultChar, bool &defaultCharWasUsed)
+{
+ AString dest;
+ UnicodeStringToMultiByte2(dest, src, codePage, defaultChar, defaultCharWasUsed);
+ return dest;
+}
+
+AString UnicodeStringToMultiByte(const UString &src, UINT codePage)
+{
+ AString dest;
+ bool defaultCharWasUsed;
+ UnicodeStringToMultiByte2(dest, src, codePage, k_DefultChar, defaultCharWasUsed);
+ return dest;
+}
diff --git a/3rdparty/lzma/CPP/Common/StringConvert.h b/3rdparty/lzma/CPP/Common/StringConvert.h
index cd737becbf5..924012450c6 100644
--- a/3rdparty/lzma/CPP/Common/StringConvert.h
+++ b/3rdparty/lzma/CPP/Common/StringConvert.h
@@ -3,15 +3,19 @@
#ifndef __COMMON_STRING_CONVERT_H
#define __COMMON_STRING_CONVERT_H
-#include "MyWindows.h"
#include "MyString.h"
-#include "Types.h"
+#include "MyWindows.h"
UString MultiByteToUnicodeString(const AString &srcString, UINT codePage = CP_ACP);
+
+// optimized versions that work faster for ASCII strings
+void MultiByteToUnicodeString2(UString &dest, const AString &srcString, UINT codePage = CP_ACP);
+// void UnicodeStringToMultiByte2(AString &dest, const UString &s, UINT codePage, char defaultChar, bool &defaultCharWasUsed);
+void UnicodeStringToMultiByte2(AString &dest, const UString &srcString, UINT codePage);
+
AString UnicodeStringToMultiByte(const UString &srcString, UINT codePage, char defaultChar, bool &defaultCharWasUsed);
AString UnicodeStringToMultiByte(const UString &srcString, UINT codePage = CP_ACP);
-
inline const wchar_t* GetUnicodeString(const wchar_t* unicodeString)
{ return unicodeString; }
inline const UString& GetUnicodeString(const UString &unicodeString)
diff --git a/3rdparty/lzma/CPP/Common/StringToInt.cpp b/3rdparty/lzma/CPP/Common/StringToInt.cpp
index 15474a4223d..dfa5cc3bff4 100644
--- a/3rdparty/lzma/CPP/Common/StringToInt.cpp
+++ b/3rdparty/lzma/CPP/Common/StringToInt.cpp
@@ -4,94 +4,141 @@
#include "StringToInt.h"
-UInt64 ConvertStringToUInt64(const char *s, const char **end)
+static const UInt32 k_UInt32_max = 0xFFFFFFFF;
+static const UInt64 k_UInt64_max = UINT64_CONST(0xFFFFFFFFFFFFFFFF);
+// static const UInt64 k_UInt64_max = (UInt64)(Int64)-1;
+
+#define CONVERT_STRING_TO_UINT_FUNC(uintType, charType, charTypeUnsigned) \
+ uintType ConvertStringTo ## uintType(const charType *s, const charType **end) throw() { \
+ if (end) *end = s; \
+ uintType res = 0; \
+ for (;; s++) { \
+ charTypeUnsigned c = (charTypeUnsigned)*s; \
+ if (c < '0' || c > '9') { if (end) *end = s; return res; } \
+ if (res > (k_ ## uintType ## _max) / 10) return 0; \
+ res *= 10; \
+ unsigned v = (c - '0'); \
+ if (res > (k_ ## uintType ## _max) - v) return 0; \
+ res += v; }}
+
+CONVERT_STRING_TO_UINT_FUNC(UInt32, char, Byte)
+CONVERT_STRING_TO_UINT_FUNC(UInt32, wchar_t, wchar_t)
+CONVERT_STRING_TO_UINT_FUNC(UInt64, char, Byte)
+CONVERT_STRING_TO_UINT_FUNC(UInt64, wchar_t, wchar_t)
+
+Int32 ConvertStringToInt32(const wchar_t *s, const wchar_t **end) throw()
{
- UInt64 result = 0;
- for (;;)
+ if (end)
+ *end = s;
+ const wchar_t *s2 = s;
+ if (*s == '-')
+ s2++;
+ if (*s2 == 0)
+ return 0;
+ const wchar_t *end2;
+ UInt32 res = ConvertStringToUInt32(s2, &end2);
+ if (*s == '-')
{
- char c = *s;
- if (c < '0' || c > '9')
+ if (res > ((UInt32)1 << (32 - 1)))
+ return 0;
+ }
+ else if ((res & ((UInt32)1 << (32 - 1))) != 0)
+ return 0;
+ if (end)
+ *end = end2;
+ if (*s == '-')
+ return -(Int32)res;
+ return (Int32)res;
+}
+
+UInt32 ConvertOctStringToUInt32(const char *s, const char **end) throw()
+{
+ if (end)
+ *end = s;
+ UInt32 res = 0;
+ for (;; s++)
+ {
+ unsigned c = (unsigned char)*s;
+ if (c < '0' || c > '7')
{
- if (end != NULL)
+ if (end)
*end = s;
- return result;
+ return res;
}
- result *= 10;
- result += (c - '0');
- s++;
+ if ((res & (UInt32)7 << (32 - 3)) != 0)
+ return 0;
+ res <<= 3;
+ res |= (unsigned)(c - '0');
}
}
-UInt64 ConvertOctStringToUInt64(const char *s, const char **end)
+UInt64 ConvertOctStringToUInt64(const char *s, const char **end) throw()
{
- UInt64 result = 0;
- for (;;)
+ if (end)
+ *end = s;
+ UInt64 res = 0;
+ for (;; s++)
{
- char c = *s;
+ unsigned c = (unsigned char)*s;
if (c < '0' || c > '7')
{
- if (end != NULL)
+ if (end)
*end = s;
- return result;
+ return res;
}
- result <<= 3;
- result += (c - '0');
- s++;
+ if ((res & (UInt64)7 << (64 - 3)) != 0)
+ return 0;
+ res <<= 3;
+ res |= (unsigned)(c - '0');
}
}
-UInt64 ConvertHexStringToUInt64(const char *s, const char **end)
+UInt32 ConvertHexStringToUInt32(const char *s, const char **end) throw()
{
- UInt64 result = 0;
- for (;;)
+ if (end)
+ *end = s;
+ UInt32 res = 0;
+ for (;; s++)
{
- char c = *s;
- UInt32 v;
+ unsigned c = (Byte)*s;
+ unsigned v;
if (c >= '0' && c <= '9') v = (c - '0');
else if (c >= 'A' && c <= 'F') v = 10 + (c - 'A');
else if (c >= 'a' && c <= 'f') v = 10 + (c - 'a');
else
{
- if (end != NULL)
+ if (end)
*end = s;
- return result;
+ return res;
}
- result <<= 4;
- result |= v;
- s++;
+ if ((res & (UInt32)0xF << (32 - 4)) != 0)
+ return 0;
+ res <<= 4;
+ res |= v;
}
}
-
-UInt64 ConvertStringToUInt64(const wchar_t *s, const wchar_t **end)
+UInt64 ConvertHexStringToUInt64(const char *s, const char **end) throw()
{
- UInt64 result = 0;
- for (;;)
+ if (end)
+ *end = s;
+ UInt64 res = 0;
+ for (;; s++)
{
- wchar_t c = *s;
- if (c < '0' || c > '9')
+ unsigned c = (Byte)*s;
+ unsigned v;
+ if (c >= '0' && c <= '9') v = (c - '0');
+ else if (c >= 'A' && c <= 'F') v = 10 + (c - 'A');
+ else if (c >= 'a' && c <= 'f') v = 10 + (c - 'a');
+ else
{
- if (end != NULL)
+ if (end)
*end = s;
- return result;
+ return res;
}
- result *= 10;
- result += (c - '0');
- s++;
+ if ((res & (UInt64)0xF << (64 - 4)) != 0)
+ return 0;
+ res <<= 4;
+ res |= v;
}
}
-
-
-Int64 ConvertStringToInt64(const char *s, const char **end)
-{
- if (*s == '-')
- return -(Int64)ConvertStringToUInt64(s + 1, end);
- return ConvertStringToUInt64(s, end);
-}
-
-Int64 ConvertStringToInt64(const wchar_t *s, const wchar_t **end)
-{
- if (*s == L'-')
- return -(Int64)ConvertStringToUInt64(s + 1, end);
- return ConvertStringToUInt64(s, end);
-}
diff --git a/3rdparty/lzma/CPP/Common/StringToInt.h b/3rdparty/lzma/CPP/Common/StringToInt.h
index cd99f17e6a0..5c5d7d7fe75 100644
--- a/3rdparty/lzma/CPP/Common/StringToInt.h
+++ b/3rdparty/lzma/CPP/Common/StringToInt.h
@@ -3,14 +3,19 @@
#ifndef __COMMON_STRING_TO_INT_H
#define __COMMON_STRING_TO_INT_H
-#include "Types.h"
+#include "MyTypes.h"
-UInt64 ConvertStringToUInt64(const char *s, const char **end);
-UInt64 ConvertOctStringToUInt64(const char *s, const char **end);
-UInt64 ConvertHexStringToUInt64(const char *s, const char **end);
-UInt64 ConvertStringToUInt64(const wchar_t *s, const wchar_t **end);
+UInt32 ConvertStringToUInt32(const char *s, const char **end) throw();
+UInt64 ConvertStringToUInt64(const char *s, const char **end) throw();
+UInt32 ConvertStringToUInt32(const wchar_t *s, const wchar_t **end) throw();
+UInt64 ConvertStringToUInt64(const wchar_t *s, const wchar_t **end) throw();
-Int64 ConvertStringToInt64(const char *s, const char **end);
-Int64 ConvertStringToInt64(const wchar_t *s, const wchar_t **end);
+Int32 ConvertStringToInt32(const wchar_t *s, const wchar_t **end) throw();
+
+UInt32 ConvertOctStringToUInt32(const char *s, const char **end) throw();
+UInt64 ConvertOctStringToUInt64(const char *s, const char **end) throw();
+
+UInt32 ConvertHexStringToUInt32(const char *s, const char **end) throw();
+UInt64 ConvertHexStringToUInt64(const char *s, const char **end) throw();
#endif
diff --git a/3rdparty/lzma/CPP/Common/TextConfig.cpp b/3rdparty/lzma/CPP/Common/TextConfig.cpp
new file mode 100644
index 00000000000..7606ee7b47e
--- /dev/null
+++ b/3rdparty/lzma/CPP/Common/TextConfig.cpp
@@ -0,0 +1,124 @@
+// Common/TextConfig.cpp
+
+#include "StdAfx.h"
+
+#include "TextConfig.h"
+#include "UTFConvert.h"
+
+static inline bool IsDelimitChar(char c)
+{
+ return (c == ' ' || c == 0x0A || c == 0x0D || c == '\0' || c == '\t');
+}
+
+static AString GetIDString(const char *s, unsigned &finishPos)
+{
+ AString result;
+ for (finishPos = 0; ; finishPos++)
+ {
+ char c = s[finishPos];
+ if (IsDelimitChar(c) || c == '=')
+ break;
+ result += c;
+ }
+ return result;
+}
+
+static bool WaitNextLine(const AString &s, unsigned &pos)
+{
+ for (; pos < s.Len(); pos++)
+ if (s[pos] == 0x0A)
+ return true;
+ return false;
+}
+
+static bool SkipSpaces(const AString &s, unsigned &pos)
+{
+ for (; pos < s.Len(); pos++)
+ {
+ char c = s[pos];
+ if (!IsDelimitChar(c))
+ {
+ if (c != ';')
+ return true;
+ if (!WaitNextLine(s, pos))
+ return false;
+ }
+ }
+ return false;
+}
+
+bool GetTextConfig(const AString &s, CObjectVector<CTextConfigPair> &pairs)
+{
+ pairs.Clear();
+ unsigned pos = 0;
+
+ /////////////////////
+ // read strings
+
+ for (;;)
+ {
+ if (!SkipSpaces(s, pos))
+ break;
+ CTextConfigPair pair;
+ unsigned finishPos;
+ AString temp = GetIDString(((const char *)s) + pos, finishPos);
+ if (!ConvertUTF8ToUnicode(temp, pair.ID))
+ return false;
+ if (finishPos == 0)
+ return false;
+ pos += finishPos;
+ if (!SkipSpaces(s, pos))
+ return false;
+ if (s[pos] != '=')
+ return false;
+ pos++;
+ if (!SkipSpaces(s, pos))
+ return false;
+ if (s[pos] != '\"')
+ return false;
+ pos++;
+ AString message;
+ for (;;)
+ {
+ if (pos >= s.Len())
+ return false;
+ char c = s[pos++];
+ if (c == '\"')
+ break;
+ if (c == '\\')
+ {
+ char c = s[pos++];
+ switch (c)
+ {
+ case 'n': message += '\n'; break;
+ case 't': message += '\t'; break;
+ case '\\': message += '\\'; break;
+ case '\"': message += '\"'; break;
+ default: message += '\\'; message += c; break;
+ }
+ }
+ else
+ message += c;
+ }
+ if (!ConvertUTF8ToUnicode(message, pair.String))
+ return false;
+ pairs.Add(pair);
+ }
+ return true;
+}
+
+int FindTextConfigItem(const CObjectVector<CTextConfigPair> &pairs, const UString &id) throw()
+{
+ FOR_VECTOR (i, pairs)
+ if (pairs[i].ID == id)
+ return i;
+ return -1;
+}
+
+UString GetTextConfigValue(const CObjectVector<CTextConfigPair> &pairs, const UString &id)
+{
+ int index = FindTextConfigItem(pairs, id);
+ if (index < 0)
+ return UString();
+ return pairs[index].String;
+}
diff --git a/3rdparty/lzma/CPP/Common/TextConfig.h b/3rdparty/lzma/CPP/Common/TextConfig.h
new file mode 100644
index 00000000000..0129ad963a1
--- /dev/null
+++ b/3rdparty/lzma/CPP/Common/TextConfig.h
@@ -0,0 +1,19 @@
+// Common/TextConfig.h
+
+#ifndef __COMMON_TEXT_CONFIG_H
+#define __COMMON_TEXT_CONFIG_H
+
+#include "MyString.h"
+
+struct CTextConfigPair
+{
+ UString ID;
+ UString String;
+};
+
+bool GetTextConfig(const AString &text, CObjectVector<CTextConfigPair> &pairs);
+
+int FindTextConfigItem(const CObjectVector<CTextConfigPair> &pairs, const UString &id) throw();
+UString GetTextConfigValue(const CObjectVector<CTextConfigPair> &pairs, const UString &id);
+
+#endif
diff --git a/3rdparty/lzma/CPP/Common/Types.h b/3rdparty/lzma/CPP/Common/Types.h
deleted file mode 100644
index 9365b327f6e..00000000000
--- a/3rdparty/lzma/CPP/Common/Types.h
+++ /dev/null
@@ -1,11 +0,0 @@
-// Common/Types.h
-
-#ifndef __COMMON_TYPES_H
-#define __COMMON_TYPES_H
-
-#include "../../C/Types.h"
-
-typedef int HRes;
-
-#endif
-
diff --git a/3rdparty/lzma/CPP/Common/UTFConvert.cpp b/3rdparty/lzma/CPP/Common/UTFConvert.cpp
index 95362430a94..b772164aab4 100644
--- a/3rdparty/lzma/CPP/Common/UTFConvert.cpp
+++ b/3rdparty/lzma/CPP/Common/UTFConvert.cpp
@@ -2,24 +2,94 @@
#include "StdAfx.h"
+#include "MyTypes.h"
#include "UTFConvert.h"
-#include "Types.h"
-static const Byte kUtf8Limits[5] = { 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
+#ifdef _WIN32
+#define _WCHART_IS_16BIT 1
+#endif
-static Bool Utf8_To_Utf16(wchar_t *dest, size_t *destLen, const char *src, size_t srcLen)
+/*
+ _UTF8_START(n) - is a base value for start byte (head), if there are (n) additional bytes after start byte
+
+ n : _UTF8_START(n) : Bits of code point
+
+ 0 : 0x80 : : unused
+ 1 : 0xC0 : 11 :
+ 2 : 0xE0 : 16 : Basic Multilingual Plane
+ 3 : 0xF0 : 21 : Unicode space
+ 3 : 0xF8 : 26 :
+ 5 : 0xFC : 31 : UCS-4
+ 6 : 0xFE : 36 : We can use it, if we want to encode any 32-bit value
+ 7 : 0xFF :
+*/
+
+#define _UTF8_START(n) (0x100 - (1 << (7 - (n))))
+
+#define _UTF8_HEAD_PARSE2(n) if (c < _UTF8_START((n) + 1)) { numBytes = (n); c -= _UTF8_START(n); }
+
+#define _UTF8_HEAD_PARSE \
+ _UTF8_HEAD_PARSE2(1) \
+ else _UTF8_HEAD_PARSE2(2) \
+ else _UTF8_HEAD_PARSE2(3) \
+ else _UTF8_HEAD_PARSE2(4) \
+ else _UTF8_HEAD_PARSE2(5) \
+
+ // else _UTF8_HEAD_PARSE2(6)
+
+bool CheckUTF8(const char *src, bool allowReduced) throw()
+{
+ for (;;)
+ {
+ Byte c = *src++;
+ if (c == 0)
+ return true;
+
+ if (c < 0x80)
+ continue;
+ if (c < 0xC0) // (c < 0xC0 + 2) // if we support only optimal encoding chars
+ return false;
+
+ unsigned numBytes;
+ _UTF8_HEAD_PARSE
+ else
+ return false;
+
+ UInt32 val = c;
+
+ do
+ {
+ Byte c2 = *src++;
+ if (c2 < 0x80 || c2 >= 0xC0)
+ return allowReduced && c2 == 0;
+ val <<= 6;
+ val |= (c2 - 0x80);
+ }
+ while (--numBytes);
+
+ if (val >= 0x110000)
+ return false;
+ }
+}
+
+
+#define _ERROR_UTF8 \
+ { if (dest) dest[destPos] = (wchar_t)0xFFFD; destPos++; ok = false; continue; }
+
+static bool Utf8_To_Utf16(wchar_t *dest, size_t *destLen, const char *src, const char *srcLim) throw()
{
- size_t destPos = 0, srcPos = 0;
+ size_t destPos = 0;
+ bool ok = true;
+
for (;;)
{
Byte c;
- int numAdds;
- if (srcPos == srcLen)
+ if (src == srcLim)
{
*destLen = destPos;
- return True;
+ return ok;
}
- c = (Byte)src[srcPos++];
+ c = *src++;
if (c < 0x80)
{
@@ -29,117 +99,190 @@ static Bool Utf8_To_Utf16(wchar_t *dest, size_t *destLen, const char *src, size_
continue;
}
if (c < 0xC0)
- break;
- for (numAdds = 1; numAdds < 5; numAdds++)
- if (c < kUtf8Limits[numAdds])
- break;
- UInt32 value = (c - kUtf8Limits[numAdds - 1]);
+ _ERROR_UTF8
+
+ unsigned numBytes;
+ _UTF8_HEAD_PARSE
+ else
+ _ERROR_UTF8
+
+ UInt32 val = c;
do
{
Byte c2;
- if (srcPos == srcLen)
+ if (src == srcLim)
break;
- c2 = (Byte)src[srcPos++];
+ c2 = *src;
if (c2 < 0x80 || c2 >= 0xC0)
break;
- value <<= 6;
- value |= (c2 - 0x80);
+ src++;
+ val <<= 6;
+ val |= (c2 - 0x80);
}
- while (--numAdds != 0);
-
- if (value < 0x10000)
+ while (--numBytes);
+
+ if (numBytes != 0)
+ _ERROR_UTF8
+
+ if (val < 0x10000)
{
if (dest)
- dest[destPos] = (wchar_t)value;
+ dest[destPos] = (wchar_t)val;
destPos++;
}
else
{
- value -= 0x10000;
- if (value >= 0x100000)
- break;
+ val -= 0x10000;
+ if (val >= 0x100000)
+ _ERROR_UTF8
if (dest)
{
- dest[destPos + 0] = (wchar_t)(0xD800 + (value >> 10));
- dest[destPos + 1] = (wchar_t)(0xDC00 + (value & 0x3FF));
+ dest[destPos + 0] = (wchar_t)(0xD800 + (val >> 10));
+ dest[destPos + 1] = (wchar_t)(0xDC00 + (val & 0x3FF));
}
destPos += 2;
}
}
- *destLen = destPos;
- return False;
}
-static Bool Utf16_To_Utf8(char *dest, size_t *destLen, const wchar_t *src, size_t srcLen)
+#define _UTF8_RANGE(n) (((UInt32)1) << ((n) * 5 + 6))
+
+#define _UTF8_HEAD(n, val) ((char)(_UTF8_START(n) + (val >> (6 * (n)))))
+#define _UTF8_CHAR(n, val) ((char)(0x80 + (((val) >> (6 * (n))) & 0x3F)))
+
+static size_t Utf16_To_Utf8_Calc(const wchar_t *src, const wchar_t *srcLim)
{
- size_t destPos = 0, srcPos = 0;
+ size_t size = srcLim - src;
for (;;)
{
- unsigned numAdds;
- UInt32 value;
- if (srcPos == srcLen)
+ if (src == srcLim)
+ return size;
+
+ UInt32 val = *src++;
+
+ if (val < 0x80)
+ continue;
+
+ if (val < _UTF8_RANGE(1))
{
- *destLen = destPos;
- return True;
+ size++;
+ continue;
}
- value = src[srcPos++];
- if (value < 0x80)
+
+ if (val >= 0xD800 && val < 0xDC00 && src != srcLim)
{
- if (dest)
- dest[destPos] = (char)value;
- destPos++;
+ UInt32 c2 = *src;
+ if (c2 >= 0xDC00 && c2 < 0xE000)
+ {
+ src++;
+ size += 2;
+ continue;
+ }
+ }
+
+ #ifdef _WCHART_IS_16BIT
+
+ size += 2;
+
+ #else
+
+ if (val < _UTF8_RANGE(2)) size += 2;
+ else if (val < _UTF8_RANGE(3)) size += 3;
+ else if (val < _UTF8_RANGE(4)) size += 4;
+ else if (val < _UTF8_RANGE(5)) size += 5;
+ else size += 6;
+
+ #endif
+ }
+}
+
+static char *Utf16_To_Utf8(char *dest, const wchar_t *src, const wchar_t *srcLim)
+{
+ for (;;)
+ {
+ if (src == srcLim)
+ return dest;
+
+ UInt32 val = *src++;
+
+ if (val < 0x80)
+ {
+ *dest++ = (char)val;
+ continue;
+ }
+
+ if (val < _UTF8_RANGE(1))
+ {
+ dest[0] = _UTF8_HEAD(1, val);
+ dest[1] = _UTF8_CHAR(0, val);
+ dest += 2;
continue;
}
- if (value >= 0xD800 && value < 0xE000)
+
+ if (val >= 0xD800 && val < 0xDC00 && src != srcLim)
{
- UInt32 c2;
- if (value >= 0xDC00 || srcPos == srcLen)
- break;
- c2 = src[srcPos++];
- if (c2 < 0xDC00 || c2 >= 0xE000)
- break;
- value = (((value - 0xD800) << 10) | (c2 - 0xDC00)) + 0x10000;
+ UInt32 c2 = *src;
+ if (c2 >= 0xDC00 && c2 < 0xE000)
+ {
+ src++;
+ val = (((val - 0xD800) << 10) | (c2 - 0xDC00)) + 0x10000;
+ dest[0] = _UTF8_HEAD(3, val);
+ dest[1] = _UTF8_CHAR(2, val);
+ dest[2] = _UTF8_CHAR(1, val);
+ dest[3] = _UTF8_CHAR(0, val);
+ dest += 4;
+ continue;
+ }
}
- for (numAdds = 1; numAdds < 5; numAdds++)
- if (value < (((UInt32)1) << (numAdds * 5 + 6)))
- break;
- if (dest)
- dest[destPos] = (char)(kUtf8Limits[numAdds - 1] + (value >> (6 * numAdds)));
- destPos++;
+
+ #ifndef _WCHART_IS_16BIT
+ if (val < _UTF8_RANGE(2))
+ #endif
+ {
+ dest[0] = _UTF8_HEAD(2, val);
+ dest[1] = _UTF8_CHAR(1, val);
+ dest[2] = _UTF8_CHAR(0, val);
+ dest += 3;
+ continue;
+ }
+
+ #ifndef _WCHART_IS_16BIT
+
+ UInt32 b;
+ unsigned numBits;
+ if (val < _UTF8_RANGE(3)) { numBits = 6 * 3; b = _UTF8_HEAD(3, val); }
+ else if (val < _UTF8_RANGE(4)) { numBits = 6 * 4; b = _UTF8_HEAD(4, val); }
+ else if (val < _UTF8_RANGE(5)) { numBits = 6 * 5; b = _UTF8_HEAD(5, val); }
+ else { numBits = 6 * 6; b = _UTF8_START(6); }
+
+ *dest++ = (Byte)b;
+
do
{
- numAdds--;
- if (dest)
- dest[destPos] = (char)(0x80 + ((value >> (6 * numAdds)) & 0x3F));
- destPos++;
+ numBits -= 6;
+ *dest++ = (char)(0x80 + ((val >> numBits) & 0x3F));
}
- while (numAdds != 0);
+ while (numBits != 0);
+
+ #endif
}
- *destLen = destPos;
- return False;
}
bool ConvertUTF8ToUnicode(const AString &src, UString &dest)
{
dest.Empty();
size_t destLen = 0;
- Utf8_To_Utf16(NULL, &destLen, src, src.Length());
- wchar_t *p = dest.GetBuffer((int)destLen);
- Bool res = Utf8_To_Utf16(p, &destLen, src, src.Length());
- p[destLen] = 0;
- dest.ReleaseBuffer();
- return res ? true : false;
+ Utf8_To_Utf16(NULL, &destLen, src, src.Ptr(src.Len()));
+ bool res = Utf8_To_Utf16(dest.GetBuf((unsigned)destLen), &destLen, src, src.Ptr(src.Len()));
+ dest.ReleaseBuf_SetEnd((unsigned)destLen);
+ return res;
}
-bool ConvertUnicodeToUTF8(const UString &src, AString &dest)
+void ConvertUnicodeToUTF8(const UString &src, AString &dest)
{
dest.Empty();
- size_t destLen = 0;
- Utf16_To_Utf8(NULL, &destLen, src, src.Length());
- char *p = dest.GetBuffer((int)destLen);
- Bool res = Utf16_To_Utf8(p, &destLen, src, src.Length());
- p[destLen] = 0;
- dest.ReleaseBuffer();
- return res ? true : false;
+ size_t destLen = Utf16_To_Utf8_Calc(src, src.Ptr(src.Len()));
+ Utf16_To_Utf8(dest.GetBuf((unsigned)destLen), src, src.Ptr(src.Len()));
+ dest.ReleaseBuf_SetEnd((unsigned)destLen);
}
diff --git a/3rdparty/lzma/CPP/Common/UTFConvert.h b/3rdparty/lzma/CPP/Common/UTFConvert.h
index 2a14600d9e0..827f3dcfe19 100644
--- a/3rdparty/lzma/CPP/Common/UTFConvert.h
+++ b/3rdparty/lzma/CPP/Common/UTFConvert.h
@@ -1,11 +1,12 @@
// Common/UTFConvert.h
-#ifndef __COMMON_UTFCONVERT_H
-#define __COMMON_UTFCONVERT_H
+#ifndef __COMMON_UTF_CONVERT_H
+#define __COMMON_UTF_CONVERT_H
#include "MyString.h"
+bool CheckUTF8(const char *src, bool allowReduced = false) throw();
bool ConvertUTF8ToUnicode(const AString &utfString, UString &resultString);
-bool ConvertUnicodeToUTF8(const UString &unicodeString, AString &resultString);
+void ConvertUnicodeToUTF8(const UString &unicodeString, AString &resultString);
#endif
diff --git a/3rdparty/lzma/CPP/Common/Wildcard.cpp b/3rdparty/lzma/CPP/Common/Wildcard.cpp
index 87d449714bc..a83f9f104c0 100644
--- a/3rdparty/lzma/CPP/Common/Wildcard.cpp
+++ b/3rdparty/lzma/CPP/Common/Wildcard.cpp
@@ -2,8 +2,6 @@
#include "StdAfx.h"
-#include "../../C/Types.h"
-
#include "Wildcard.h"
bool g_CaseSensitive =
@@ -13,37 +11,29 @@ bool g_CaseSensitive =
true;
#endif
-static const wchar_t kAnyCharsChar = L'*';
-static const wchar_t kAnyCharChar = L'?';
-
-#ifdef _WIN32
-static const wchar_t kDirDelimiter1 = L'\\';
-#endif
-static const wchar_t kDirDelimiter2 = L'/';
-
-static const UString kWildCardCharSet = L"?*";
-
-static const UString kIllegalWildCardFileNameChars=
- L"\x1\x2\x3\x4\x5\x6\x7\x8\x9\xA\xB\xC\xD\xE\xF"
- L"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"
- L"\"/:<>\\|";
+bool IsPath1PrefixedByPath2(const wchar_t *s1, const wchar_t *s2)
+{
+ if (g_CaseSensitive)
+ return IsString1PrefixedByString2(s1, s2);
+ return IsString1PrefixedByString2_NoCase(s1, s2);
+}
-static inline bool IsCharDirLimiter(wchar_t c)
+int CompareFileNames(const wchar_t *s1, const wchar_t *s2) STRING_UNICODE_THROW
{
- return (
- #ifdef _WIN32
- c == kDirDelimiter1 ||
- #endif
- c == kDirDelimiter2);
+ if (g_CaseSensitive)
+ return wcscmp(s1, s2);
+ return MyStringCompareNoCase(s1, s2);
}
-int CompareFileNames(const UString &s1, const UString &s2)
+#ifndef USE_UNICODE_FSTRING
+int CompareFileNames(const char *s1, const char *s2)
{
if (g_CaseSensitive)
- return s1.Compare(s2);
- return s1.CompareNoCase(s2);
+ return wcscmp(fs2us(s1), fs2us(s2));
+ return MyStringCompareNoCase(fs2us(s1), fs2us(s2));
}
+#endif
// -----------------------------------------
// this function compares name with mask
@@ -58,7 +48,7 @@ static bool EnhancedMaskTest(const wchar_t *mask, const wchar_t *name)
wchar_t c = *name;
if (m == 0)
return (c == 0);
- if (m == kAnyCharsChar)
+ if (m == '*')
{
if (EnhancedMaskTest(mask + 1, name))
return true;
@@ -67,7 +57,7 @@ static bool EnhancedMaskTest(const wchar_t *mask, const wchar_t *name)
}
else
{
- if (m == kAnyCharChar)
+ if (m == '?')
{
if (c == 0)
return false;
@@ -87,61 +77,84 @@ static bool EnhancedMaskTest(const wchar_t *mask, const wchar_t *name)
void SplitPathToParts(const UString &path, UStringVector &pathParts)
{
pathParts.Clear();
- UString name;
- int len = path.Length();
+ unsigned len = path.Len();
if (len == 0)
return;
- for (int i = 0; i < len; i++)
- {
- wchar_t c = path[i];
- if (IsCharDirLimiter(c))
+ UString name;
+ unsigned prev = 0;
+ for (unsigned i = 0; i < len; i++)
+ if (IsPathSepar(path[i]))
{
+ name.SetFrom(path.Ptr(prev), i - prev);
pathParts.Add(name);
- name.Empty();
+ prev = i + 1;
}
- else
- name += c;
- }
+ name.SetFrom(path.Ptr(prev), len - prev);
pathParts.Add(name);
}
-void SplitPathToParts(const UString &path, UString &dirPrefix, UString &name)
+void SplitPathToParts_2(const UString &path, UString &dirPrefix, UString &name)
{
- int i;
- for (i = path.Length() - 1; i >= 0; i--)
- if (IsCharDirLimiter(path[i]))
+ const wchar_t *start = path;
+ const wchar_t *p = start + path.Len();
+ for (; p != start; p--)
+ if (IsPathSepar(*(p - 1)))
break;
- dirPrefix = path.Left(i + 1);
- name = path.Mid(i + 1);
+ dirPrefix.SetFrom(path, (unsigned)(p - start));
+ name = p;
+}
+
+void SplitPathToParts_Smart(const UString &path, UString &dirPrefix, UString &name)
+{
+ const wchar_t *start = path;
+ const wchar_t *p = start + path.Len();
+ if (p != start)
+ {
+ if (IsPathSepar(*(p - 1)))
+ p--;
+ for (; p != start; p--)
+ if (IsPathSepar(*(p - 1)))
+ break;
+ }
+ dirPrefix.SetFrom(path, (unsigned)(p - start));
+ name = p;
}
UString ExtractDirPrefixFromPath(const UString &path)
{
- int i;
- for (i = path.Length() - 1; i >= 0; i--)
- if (IsCharDirLimiter(path[i]))
+ const wchar_t *start = path;
+ const wchar_t *p = start + path.Len();
+ for (; p != start; p--)
+ if (IsPathSepar(*(p - 1)))
break;
- return path.Left(i + 1);
+ return path.Left((unsigned)(p - start));
}
UString ExtractFileNameFromPath(const UString &path)
{
- int i;
- for (i = path.Length() - 1; i >= 0; i--)
- if (IsCharDirLimiter(path[i]))
+ const wchar_t *start = path;
+ const wchar_t *p = start + path.Len();
+ for (; p != start; p--)
+ if (IsPathSepar(*(p - 1)))
break;
- return path.Mid(i + 1);
+ return p;
}
-bool CompareWildCardWithName(const UString &mask, const UString &name)
+bool DoesWildcardMatchName(const UString &mask, const UString &name)
{
return EnhancedMaskTest(mask, name);
}
-bool DoesNameContainWildCard(const UString &path)
+bool DoesNameContainWildcard(const UString &path)
{
- return (path.FindOneOf(kWildCardCharSet) >= 0);
+ for (unsigned i = 0; i < path.Len(); i++)
+ {
+ wchar_t c = path[i];
+ if (c == '*' || c == '?')
+ return true;
+ }
+ return false;
}
@@ -150,62 +163,106 @@ bool DoesNameContainWildCard(const UString &path)
namespace NWildcard {
-
/*
+
M = MaskParts.Size();
N = TestNameParts.Size();
File Dir
-ForFile req M<=N [N-M, N) -
- nonreq M=N [0, M) -
+ForFile rec M<=N [N-M, N) -
+!ForDir nonrec M=N [0, M) -
-ForDir req M<N [0, M) ... [N-M-1, N-1) same as ForBoth-File
- nonreq [0, M) same as ForBoth-File
+ForDir rec M<N [0, M) ... [N-M-1, N-1) same as ForBoth-File
+!ForFile nonrec [0, M) same as ForBoth-File
-ForBoth req m<=N [0, M) ... [N-M, N) same as ForBoth-File
- nonreq [0, M) same as ForBoth-File
+ForFile rec m<=N [0, M) ... [N-M, N) same as ForBoth-File
+ForDir nonrec [0, M) same as ForBoth-File
*/
+bool CItem::AreAllAllowed() const
+{
+ return ForFile && ForDir && WildcardMatching && PathParts.Size() == 1 && PathParts.Front() == L"*";
+}
+
bool CItem::CheckPath(const UStringVector &pathParts, bool isFile) const
{
if (!isFile && !ForDir)
return false;
+
+ /*
+ if (PathParts.IsEmpty())
+ {
+ // PathParts.IsEmpty() means all items (universal wildcard)
+ if (!isFile)
+ return true;
+ if (pathParts.Size() <= 1)
+ return ForFile;
+ return (ForDir || Recursive && ForFile);
+ }
+ */
+
int delta = (int)pathParts.Size() - (int)PathParts.Size();
if (delta < 0)
return false;
int start = 0;
int finish = 0;
+
if (isFile)
{
- if (!ForDir && !Recursive && delta !=0)
- return false;
+ if (!ForDir)
+ {
+ if (Recursive)
+ start = delta;
+ else if (delta !=0)
+ return false;
+ }
if (!ForFile && delta == 0)
return false;
- if (!ForDir && Recursive)
- start = delta;
}
+
if (Recursive)
{
finish = delta;
if (isFile && !ForFile)
finish = delta - 1;
}
+
for (int d = start; d <= finish; d++)
{
- int i;
+ unsigned i;
for (i = 0; i < PathParts.Size(); i++)
- if (!CompareWildCardWithName(PathParts[i], pathParts[i + d]))
- break;
+ {
+ if (WildcardMatching)
+ {
+ if (!DoesWildcardMatchName(PathParts[i], pathParts[i + d]))
+ break;
+ }
+ else
+ {
+ if (CompareFileNames(PathParts[i], pathParts[i + d]) != 0)
+ break;
+ }
+ }
if (i == PathParts.Size())
return true;
}
return false;
}
+bool CCensorNode::AreAllAllowed() const
+{
+ if (!Name.IsEmpty() ||
+ !SubNodes.IsEmpty() ||
+ !ExcludeItems.IsEmpty() ||
+ IncludeItems.Size() != 1)
+ return false;
+ return IncludeItems.Front().AreAllAllowed();
+}
+
int CCensorNode::FindSubNode(const UString &name) const
{
- for (int i = 0; i < SubNodes.Size(); i++)
+ FOR_VECTOR (i, SubNodes)
if (CompareFileNames(SubNodes[i].Name, name) == 0)
return i;
return -1;
@@ -219,15 +276,24 @@ void CCensorNode::AddItemSimple(bool include, CItem &item)
ExcludeItems.Add(item);
}
-void CCensorNode::AddItem(bool include, CItem &item)
+void CCensorNode::AddItem(bool include, CItem &item, int ignoreWildcardIndex)
{
if (item.PathParts.Size() <= 1)
{
+ if (item.PathParts.Size() != 0 && item.WildcardMatching)
+ {
+ if (!DoesNameContainWildcard(item.PathParts.Front()))
+ item.WildcardMatching = false;
+ }
AddItemSimple(include, item);
return;
}
const UString &front = item.PathParts.Front();
- if (DoesNameContainWildCard(front))
+
+ // WIN32 doesn't support wildcards in file names
+ if (item.WildcardMatching
+ && ignoreWildcardIndex != 0
+ && DoesNameContainWildcard(front))
{
AddItemSimple(include, item);
return;
@@ -236,22 +302,23 @@ void CCensorNode::AddItem(bool include, CItem &item)
if (index < 0)
index = SubNodes.Add(CCensorNode(front, this));
item.PathParts.Delete(0);
- SubNodes[index].AddItem(include, item);
+ SubNodes[index].AddItem(include, item, ignoreWildcardIndex - 1);
}
-void CCensorNode::AddItem(bool include, const UString &path, bool recursive, bool forFile, bool forDir)
+void CCensorNode::AddItem(bool include, const UString &path, bool recursive, bool forFile, bool forDir, bool wildcardMatching)
{
CItem item;
SplitPathToParts(path, item.PathParts);
item.Recursive = recursive;
item.ForFile = forFile;
item.ForDir = forDir;
+ item.WildcardMatching = wildcardMatching;
AddItem(include, item);
}
bool CCensorNode::NeedCheckSubDirs() const
{
- for (int i = 0; i < IncludeItems.Size(); i++)
+ FOR_VECTOR (i, IncludeItems)
{
const CItem &item = IncludeItems[i];
if (item.Recursive || item.PathParts.Size() > 1)
@@ -264,7 +331,7 @@ bool CCensorNode::AreThereIncludeItems() const
{
if (IncludeItems.Size() > 0)
return true;
- for (int i = 0; i < SubNodes.Size(); i++)
+ FOR_VECTOR (i, SubNodes)
if (SubNodes[i].AreThereIncludeItems())
return true;
return false;
@@ -273,13 +340,13 @@ bool CCensorNode::AreThereIncludeItems() const
bool CCensorNode::CheckPathCurrent(bool include, const UStringVector &pathParts, bool isFile) const
{
const CObjectVector<CItem> &items = include ? IncludeItems : ExcludeItems;
- for (int i = 0; i < items.Size(); i++)
+ FOR_VECTOR (i, items)
if (items[i].CheckPath(pathParts, isFile))
return true;
return false;
}
-bool CCensorNode::CheckPath(UStringVector &pathParts, bool isFile, bool &include) const
+bool CCensorNode::CheckPathVect(const UStringVector &pathParts, bool isFile, bool &include) const
{
if (CheckPathCurrent(false, pathParts, isFile))
{
@@ -288,33 +355,50 @@ bool CCensorNode::CheckPath(UStringVector &pathParts, bool isFile, bool &include
}
include = true;
bool finded = CheckPathCurrent(true, pathParts, isFile);
- if (pathParts.Size() == 1)
+ if (pathParts.Size() <= 1)
return finded;
int index = FindSubNode(pathParts.Front());
if (index >= 0)
{
UStringVector pathParts2 = pathParts;
pathParts2.Delete(0);
- if (SubNodes[index].CheckPath(pathParts2, isFile, include))
+ if (SubNodes[index].CheckPathVect(pathParts2, isFile, include))
return true;
}
return finded;
}
-bool CCensorNode::CheckPath(const UString &path, bool isFile, bool &include) const
+/*
+bool CCensorNode::CheckPath2(bool isAltStream, const UString &path, bool isFile, bool &include) const
{
UStringVector pathParts;
SplitPathToParts(path, pathParts);
- return CheckPath(pathParts, isFile, include);
+ if (CheckPathVect(pathParts, isFile, include))
+ {
+ if (!include || !isAltStream)
+ return true;
+ }
+ if (isAltStream && !pathParts.IsEmpty())
+ {
+ UString &back = pathParts.Back();
+ int pos = back.Find(L':');
+ if (pos > 0)
+ {
+ back.DeleteFrom(pos);
+ return CheckPathVect(pathParts, isFile, include);
+ }
+ }
+ return false;
}
-bool CCensorNode::CheckPath(const UString &path, bool isFile) const
+bool CCensorNode::CheckPath(bool isAltStream, const UString &path, bool isFile) const
{
bool include;
- if (CheckPath(path, isFile, include))
+ if (CheckPath2(isAltStream, path, isFile, include))
return include;
return false;
}
+*/
bool CCensorNode::CheckPathToRoot(bool include, UStringVector &pathParts, bool isFile) const
{
@@ -335,25 +419,25 @@ bool CCensorNode::CheckPathToRoot(bool include, const UString &path, bool isFile
}
*/
-void CCensorNode::AddItem2(bool include, const UString &path, bool recursive)
+void CCensorNode::AddItem2(bool include, const UString &path, bool recursive, bool wildcardMatching)
{
if (path.IsEmpty())
return;
bool forFile = true;
bool forFolder = true;
UString path2 = path;
- if (IsCharDirLimiter(path.Back()))
+ if (IsPathSepar(path.Back()))
{
path2.DeleteBack();
forFile = false;
}
- AddItem(include, path2, recursive, forFile, forFolder);
+ AddItem(include, path2, recursive, forFile, forFolder, wildcardMatching);
}
void CCensorNode::ExtendExclude(const CCensorNode &fromNodes)
{
ExcludeItems += fromNodes.ExcludeItems;
- for (int i = 0; i < fromNodes.SubNodes.Size(); i++)
+ FOR_VECTOR (i, fromNodes.SubNodes)
{
const CCensorNode &node = fromNodes.SubNodes[i];
int subNodeIndex = FindSubNode(node.Name);
@@ -365,77 +449,193 @@ void CCensorNode::ExtendExclude(const CCensorNode &fromNodes)
int CCensor::FindPrefix(const UString &prefix) const
{
- for (int i = 0; i < Pairs.Size(); i++)
+ FOR_VECTOR (i, Pairs)
if (CompareFileNames(Pairs[i].Prefix, prefix) == 0)
return i;
return -1;
}
-void CCensor::AddItem(bool include, const UString &path, bool recursive)
+#ifdef _WIN32
+
+bool IsDriveColonName(const wchar_t *s)
+{
+ wchar_t c = s[0];
+ return c != 0 && s[1] == ':' && s[2] == 0 && (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z');
+}
+
+unsigned GetNumPrefixParts_if_DrivePath(UStringVector &pathParts)
+{
+ if (pathParts.IsEmpty())
+ return 0;
+
+ unsigned testIndex = 0;
+ if (pathParts[0].IsEmpty())
+ {
+ if (pathParts.Size() < 4
+ || !pathParts[1].IsEmpty()
+ || pathParts[2] != L"?")
+ return 0;
+ testIndex = 3;
+ }
+ if (NWildcard::IsDriveColonName(pathParts[testIndex]))
+ return testIndex + 1;
+ return 0;
+}
+
+#endif
+
+static unsigned GetNumPrefixParts(const UStringVector pathParts)
+{
+ if (pathParts.IsEmpty())
+ return 0;
+
+ #ifdef _WIN32
+
+ if (IsDriveColonName(pathParts[0]))
+ return 1;
+ if (!pathParts[0].IsEmpty())
+ return 0;
+
+ if (pathParts.Size() == 1)
+ return 1;
+ if (!pathParts[1].IsEmpty())
+ return 1;
+ if (pathParts.Size() == 2)
+ return 2;
+ if (pathParts[2] == L".")
+ return 3;
+
+ unsigned networkParts = 2;
+ if (pathParts[2] == L"?")
+ {
+ if (pathParts.Size() == 3)
+ return 3;
+ if (IsDriveColonName(pathParts[3]))
+ return 4;
+ if (!pathParts[3].IsEqualTo_Ascii_NoCase("UNC"))
+ return 3;
+ networkParts = 4;
+ }
+
+ networkParts +=
+ // 2; // server/share
+ 1; // server
+ if (pathParts.Size() <= networkParts)
+ return pathParts.Size();
+ return networkParts;
+
+ #else
+
+ return pathParts[0].IsEmpty() ? 1 : 0;
+
+ #endif
+}
+
+void CCensor::AddItem(ECensorPathMode pathMode, bool include, const UString &path, bool recursive, bool wildcardMatching)
{
- UStringVector pathParts;
if (path.IsEmpty())
throw "Empty file path";
+
+ UStringVector pathParts;
SplitPathToParts(path, pathParts);
+
bool forFile = true;
if (pathParts.Back().IsEmpty())
{
forFile = false;
pathParts.DeleteBack();
}
- const UString &front = pathParts.Front();
- bool isAbs = false;
- if (front.IsEmpty())
- isAbs = true;
- else if (front.Length() == 2 && front[1] == L':')
- isAbs = true;
- else
+
+ UString prefix;
+
+ int ignoreWildcardIndex = -1;
+
+ // #ifdef _WIN32
+ // we ignore "?" wildcard in "\\?\" prefix.
+ if (pathParts.Size() >= 3
+ && pathParts[0].IsEmpty()
+ && pathParts[1].IsEmpty()
+ && pathParts[2] == L"?")
+ ignoreWildcardIndex = 2;
+ // #endif
+
+ if (pathMode != k_AbsPath)
{
- for (int i = 0; i < pathParts.Size(); i++)
+ ignoreWildcardIndex = -1;
+
+ const unsigned numPrefixParts = GetNumPrefixParts(pathParts);
+ unsigned numSkipParts = numPrefixParts;
+
+ if (pathMode != k_FullPath)
+ {
+ if (numPrefixParts != 0 && pathParts.Size() > numPrefixParts)
+ numSkipParts = pathParts.Size() - 1;
+ }
{
- const UString &part = pathParts[i];
- if (part == L".." || part == L".")
+ int dotsIndex = -1;
+ for (unsigned i = numPrefixParts; i < pathParts.Size(); i++)
{
- isAbs = true;
- break;
+ const UString &part = pathParts[i];
+ if (part == L".." || part == L".")
+ dotsIndex = i;
}
+
+ if (dotsIndex >= 0)
+ if (dotsIndex == (int)pathParts.Size() - 1)
+ numSkipParts = pathParts.Size();
+ else
+ numSkipParts = pathParts.Size() - 1;
+ }
+
+ for (unsigned i = 0; i < numSkipParts; i++)
+ {
+ {
+ const UString &front = pathParts.Front();
+ // WIN32 doesn't support wildcards in file names
+ if (wildcardMatching)
+ if (i >= numPrefixParts && DoesNameContainWildcard(front))
+ break;
+ prefix += front;
+ prefix.Add_PathSepar();
+ }
+ pathParts.Delete(0);
}
}
- int numAbsParts = 0;
- if (isAbs)
- if (pathParts.Size() > 1)
- numAbsParts = pathParts.Size() - 1;
- else
- numAbsParts = 1;
- UString prefix;
- for (int i = 0; i < numAbsParts; i++)
- {
- const UString &front = pathParts.Front();
- if (DoesNameContainWildCard(front))
- break;
- prefix += front;
- prefix += WCHAR_PATH_SEPARATOR;
- pathParts.Delete(0);
- }
+
int index = FindPrefix(prefix);
if (index < 0)
index = Pairs.Add(CPair(prefix));
+ if (pathMode != k_AbsPath)
+ {
+ if (pathParts.IsEmpty() || pathParts.Size() == 1 && pathParts[0].IsEmpty())
+ {
+ // we create universal item, if we skip all parts as prefix (like \ or L:\ )
+ pathParts.Clear();
+ pathParts.Add(L"*");
+ forFile = true;
+ wildcardMatching = true;
+ recursive = false;
+ }
+ }
+
CItem item;
item.PathParts = pathParts;
item.ForDir = true;
item.ForFile = forFile;
item.Recursive = recursive;
- Pairs[index].Head.AddItem(include, item);
+ item.WildcardMatching = wildcardMatching;
+ Pairs[index].Head.AddItem(include, item, ignoreWildcardIndex);
}
-bool CCensor::CheckPath(const UString &path, bool isFile) const
+/*
+bool CCensor::CheckPath(bool isAltStream, const UString &path, bool isFile) const
{
bool finded = false;
- for (int i = 0; i < Pairs.Size(); i++)
+ FOR_VECTOR (i, Pairs)
{
bool include;
- if (Pairs[i].Head.CheckPath(path, isFile, include))
+ if (Pairs[i].Head.CheckPath2(isAltStream, path, isFile, include))
{
if (!include)
return false;
@@ -444,19 +644,39 @@ bool CCensor::CheckPath(const UString &path, bool isFile) const
}
return finded;
}
+*/
void CCensor::ExtendExclude()
{
- int i;
+ unsigned i;
for (i = 0; i < Pairs.Size(); i++)
if (Pairs[i].Prefix.IsEmpty())
break;
if (i == Pairs.Size())
return;
- int index = i;
+ unsigned index = i;
for (i = 0; i < Pairs.Size(); i++)
if (index != i)
Pairs[i].Head.ExtendExclude(Pairs[index].Head);
}
+void CCensor::AddPathsToCensor(ECensorPathMode censorPathMode)
+{
+ FOR_VECTOR(i, CensorPaths)
+ {
+ const CCensorPath &cp = CensorPaths[i];
+ AddItem(censorPathMode, cp.Include, cp.Path, cp.Recursive, cp.WildcardMatching);
+ }
+ CensorPaths.Clear();
+}
+
+void CCensor::AddPreItem(bool include, const UString &path, bool recursive, bool wildcardMatching)
+{
+ CCensorPath &cp = CensorPaths.AddNew();
+ cp.Path = path;
+ cp.Include = include;
+ cp.Recursive = recursive;
+ cp.WildcardMatching = wildcardMatching;
+}
+
}
diff --git a/3rdparty/lzma/CPP/Common/Wildcard.h b/3rdparty/lzma/CPP/Common/Wildcard.h
index 6d4cbcece44..512687d1e67 100644
--- a/3rdparty/lzma/CPP/Common/Wildcard.h
+++ b/3rdparty/lzma/CPP/Common/Wildcard.h
@@ -5,51 +5,82 @@
#include "MyString.h"
-int CompareFileNames(const UString &s1, const UString &s2);
+int CompareFileNames(const wchar_t *s1, const wchar_t *s2) STRING_UNICODE_THROW;
+#ifndef USE_UNICODE_FSTRING
+ int CompareFileNames(const char *s1, const char *s2);
+#endif
+
+bool IsPath1PrefixedByPath2(const wchar_t *s1, const wchar_t *s2);
void SplitPathToParts(const UString &path, UStringVector &pathParts);
-void SplitPathToParts(const UString &path, UString &dirPrefix, UString &name);
+void SplitPathToParts_2(const UString &path, UString &dirPrefix, UString &name);
+void SplitPathToParts_Smart(const UString &path, UString &dirPrefix, UString &name); // ignores dir delimiter at the end of (path)
+
UString ExtractDirPrefixFromPath(const UString &path);
UString ExtractFileNameFromPath(const UString &path);
-bool DoesNameContainWildCard(const UString &path);
-bool CompareWildCardWithName(const UString &mask, const UString &name);
+
+bool DoesNameContainWildcard(const UString &path);
+bool DoesWildcardMatchName(const UString &mask, const UString &name);
namespace NWildcard {
+#ifdef _WIN32
+// returns true, if name is like "a:", "c:", ...
+bool IsDriveColonName(const wchar_t *s);
+unsigned GetNumPrefixParts_if_DrivePath(UStringVector &pathParts);
+#endif
+
struct CItem
{
UStringVector PathParts;
bool Recursive;
bool ForFile;
bool ForDir;
+ bool WildcardMatching;
+
+ #ifdef _WIN32
+ bool IsDriveItem() const
+ {
+ return PathParts.Size() == 1 && !ForFile && ForDir && IsDriveColonName(PathParts[0]);
+ }
+ #endif
+
+ // CItem(): WildcardMatching(true) {}
+
+ bool AreAllAllowed() const;
bool CheckPath(const UStringVector &pathParts, bool isFile) const;
};
class CCensorNode
{
CCensorNode *Parent;
+
bool CheckPathCurrent(bool include, const UStringVector &pathParts, bool isFile) const;
void AddItemSimple(bool include, CItem &item);
- bool CheckPath(UStringVector &pathParts, bool isFile, bool &include) const;
public:
+ bool CheckPathVect(const UStringVector &pathParts, bool isFile, bool &include) const;
+
CCensorNode(): Parent(0) { };
CCensorNode(const UString &name, CCensorNode *parent): Name(name), Parent(parent) { };
- UString Name;
+
+ UString Name; // WIN32 doesn't support wildcards in file names
CObjectVector<CCensorNode> SubNodes;
CObjectVector<CItem> IncludeItems;
CObjectVector<CItem> ExcludeItems;
+ bool AreAllAllowed() const;
+
int FindSubNode(const UString &path) const;
- void AddItem(bool include, CItem &item);
- void AddItem(bool include, const UString &path, bool recursive, bool forFile, bool forDir);
- void AddItem2(bool include, const UString &path, bool recursive);
+ void AddItem(bool include, CItem &item, int ignoreWildcardIndex = -1);
+ void AddItem(bool include, const UString &path, bool recursive, bool forFile, bool forDir, bool wildcardMatching);
+ void AddItem2(bool include, const UString &path, bool recursive, bool wildcardMatching);
bool NeedCheckSubDirs() const;
bool AreThereIncludeItems() const;
- bool CheckPath(const UString &path, bool isFile, bool &include) const;
- bool CheckPath(const UString &path, bool isFile) const;
+ // bool CheckPath2(bool isAltStream, const UString &path, bool isFile, bool &include) const;
+ // bool CheckPath(bool isAltStream, const UString &path, bool isFile) const;
bool CheckPathToRoot(bool include, UStringVector &pathParts, bool isFile) const;
// bool CheckPathToRoot(const UString &path, bool isFile, bool include) const;
@@ -60,21 +91,59 @@ struct CPair
{
UString Prefix;
CCensorNode Head;
+
CPair(const UString &prefix): Prefix(prefix) { };
};
+enum ECensorPathMode
+{
+ k_RelatPath, // absolute prefix as Prefix, remain path in Tree
+ k_FullPath, // drive prefix as Prefix, remain path in Tree
+ k_AbsPath // full path in Tree
+};
+
+struct CCensorPath
+{
+ UString Path;
+ bool Include;
+ bool Recursive;
+ bool WildcardMatching;
+
+ CCensorPath():
+ Include(true),
+ Recursive(false),
+ WildcardMatching(true)
+ {}
+};
+
class CCensor
{
int FindPrefix(const UString &prefix) const;
public:
CObjectVector<CPair> Pairs;
+
+ CObjectVector<NWildcard::CCensorPath> CensorPaths;
+
bool AllAreRelative() const
{ return (Pairs.Size() == 1 && Pairs.Front().Prefix.IsEmpty()); }
- void AddItem(bool include, const UString &path, bool recursive);
- bool CheckPath(const UString &path, bool isFile) const;
+
+ void AddItem(ECensorPathMode pathMode, bool include, const UString &path, bool recursive, bool wildcardMatching);
+ // bool CheckPath(bool isAltStream, const UString &path, bool isFile) const;
void ExtendExclude();
+
+ void AddPathsToCensor(NWildcard::ECensorPathMode censorPathMode);
+ void AddPreItem(bool include, const UString &path, bool recursive, bool wildcardMatching);
+ void AddPreItem(const UString &path)
+ {
+ AddPreItem(true, path, false, false);
+ }
+ void AddPreItem_Wildcard()
+ {
+ AddPreItem(true, L"*", false, true);
+ }
};
+
}
#endif
diff --git a/3rdparty/lzma/CPP/Common/XzCrc64Reg.cpp b/3rdparty/lzma/CPP/Common/XzCrc64Reg.cpp
new file mode 100644
index 00000000000..d1a51338646
--- /dev/null
+++ b/3rdparty/lzma/CPP/Common/XzCrc64Reg.cpp
@@ -0,0 +1,42 @@
+// XzCrc64Reg.cpp
+
+#include "StdAfx.h"
+
+#include "../../C/CpuArch.h"
+#include "../../C/XzCrc64.h"
+
+#include "../Common/MyCom.h"
+
+#include "../7zip/Common/RegisterCodec.h"
+
+class CXzCrc64Hasher:
+ public IHasher,
+ public CMyUnknownImp
+{
+ UInt64 _crc;
+ Byte mtDummy[1 << 7];
+
+public:
+ CXzCrc64Hasher(): _crc(CRC64_INIT_VAL) {}
+
+ MY_UNKNOWN_IMP
+ INTERFACE_IHasher(;)
+};
+
+STDMETHODIMP_(void) CXzCrc64Hasher::Init() throw()
+{
+ _crc = CRC64_INIT_VAL;
+}
+
+STDMETHODIMP_(void) CXzCrc64Hasher::Update(const void *data, UInt32 size) throw()
+{
+ _crc = Crc64Update(_crc, data, size);
+}
+
+STDMETHODIMP_(void) CXzCrc64Hasher::Final(Byte *digest) throw()
+{
+ UInt64 val = CRC64_GET_DIGEST(_crc);
+ SetUi64(digest, val);
+}
+
+REGISTER_HASHER(CXzCrc64Hasher, 0x4, "CRC64", 8)
diff --git a/3rdparty/lzma/CPP/Windows/COM.h b/3rdparty/lzma/CPP/Windows/COM.h
new file mode 100644
index 00000000000..cee7f702d6f
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/COM.h
@@ -0,0 +1,70 @@
+// Windows/COM.h
+
+#ifndef __WINDOWS_COM_H
+#define __WINDOWS_COM_H
+
+#include "../Common/MyString.h"
+
+namespace NWindows {
+namespace NCOM {
+
+#ifdef _WIN32
+
+class CComInitializer
+{
+public:
+ CComInitializer()
+ {
+ #ifdef UNDER_CE
+ CoInitializeEx(NULL, COINIT_MULTITHREADED);
+ #else
+ // it's single thread. Do we need multithread?
+ CoInitialize(NULL);
+ #endif
+ };
+ ~CComInitializer() { CoUninitialize(); }
+};
+
+class CStgMedium
+{
+ STGMEDIUM _object;
+public:
+ bool _mustBeReleased;
+ CStgMedium(): _mustBeReleased(false) {}
+ ~CStgMedium() { Free(); }
+ void Free()
+ {
+ if (_mustBeReleased)
+ ReleaseStgMedium(&_object);
+ _mustBeReleased = false;
+ }
+ const STGMEDIUM* operator->() const { return &_object;}
+ STGMEDIUM* operator->() { return &_object;}
+ STGMEDIUM* operator&() { return &_object; }
+};
+
+#endif
+
+/*
+//////////////////////////////////
+// GUID <--> String Conversions
+UString GUIDToStringW(REFGUID guid);
+AString GUIDToStringA(REFGUID guid);
+#ifdef UNICODE
+ #define GUIDToString GUIDToStringW
+#else
+ #define GUIDToString GUIDToStringA
+#endif
+
+HRESULT StringToGUIDW(const wchar_t *string, GUID &classID);
+HRESULT StringToGUIDA(const char *string, GUID &classID);
+#ifdef UNICODE
+ #define StringToGUID StringToGUIDW
+#else
+ #define StringToGUID StringToGUIDA
+#endif
+*/
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/CommonDialog.cpp b/3rdparty/lzma/CPP/Windows/CommonDialog.cpp
new file mode 100644
index 00000000000..8f4f56d39a4
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/CommonDialog.cpp
@@ -0,0 +1,185 @@
+// Windows/CommonDialog.cpp
+
+#include "StdAfx.h"
+
+#include "../Common/MyWindows.h"
+
+#ifdef UNDER_CE
+#include <commdlg.h>
+#endif
+
+#ifndef _UNICODE
+#include "../Common/StringConvert.h"
+#endif
+
+#include "CommonDialog.h"
+#include "Defs.h"
+
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+
+#ifndef _UNICODE
+
+class CDoubleZeroStringListA
+{
+ LPTSTR Buf;
+ unsigned Size;
+public:
+ CDoubleZeroStringListA(LPSTR buf, unsigned size): Buf(buf), Size(size) {}
+ bool Add(LPCSTR s) throw();
+ void Finish() { *Buf = 0; }
+};
+
+bool CDoubleZeroStringListA::Add(LPCSTR s) throw()
+{
+ unsigned len = MyStringLen(s) + 1;
+ if (len >= Size)
+ return false;
+ MyStringCopy(Buf, s);
+ Buf += len;
+ Size -= len;
+ return true;
+}
+
+#endif
+
+class CDoubleZeroStringListW
+{
+ LPWSTR Buf;
+ unsigned Size;
+public:
+ CDoubleZeroStringListW(LPWSTR buf, unsigned size): Buf(buf), Size(size) {}
+ bool Add(LPCWSTR s) throw();
+ void Finish() { *Buf = 0; }
+};
+
+bool CDoubleZeroStringListW::Add(LPCWSTR s) throw()
+{
+ unsigned len = MyStringLen(s) + 1;
+ if (len >= Size)
+ return false;
+ MyStringCopy(Buf, s);
+ Buf += len;
+ Size -= len;
+ return true;
+}
+
+#define MY__OFN_PROJECT 0x00400000
+#define MY__OFN_SHOW_ALL 0x01000000
+
+/* if (lpstrFilter == NULL && nFilterIndex == 0)
+ MSDN : "the system doesn't show any files",
+ but WinXP-64 shows all files. Why ??? */
+
+/*
+structures
+ OPENFILENAMEW
+ OPENFILENAMEA
+contain additional members:
+#if (_WIN32_WINNT >= 0x0500)
+ void *pvReserved;
+ DWORD dwReserved;
+ DWORD FlagsEx;
+#endif
+
+If we compile the source code with (_WIN32_WINNT >= 0x0500), some functions
+will not work at NT 4.0, if we use sizeof(OPENFILENAME*).
+So we use size of old version of structure. */
+
+#if defined(UNDER_CE) || defined(_WIN64) || (_WIN32_WINNT < 0x0500)
+// || !defined(WINVER)
+ #define my_compatib_OPENFILENAMEA_size sizeof(OPENFILENAMEA)
+ #define my_compatib_OPENFILENAMEW_size sizeof(OPENFILENAMEW)
+#else
+ #define my_compatib_OPENFILENAMEA_size OPENFILENAME_SIZE_VERSION_400A
+ #define my_compatib_OPENFILENAMEW_size OPENFILENAME_SIZE_VERSION_400W
+#endif
+
+#define CONV_U_To_A(dest, src, temp) AString temp; if (src) { temp = GetSystemString(src); dest = temp; }
+
+bool MyGetOpenFileName(HWND hwnd, LPCWSTR title,
+ LPCWSTR initialDir,
+ LPCWSTR filePath,
+ LPCWSTR filterDescription,
+ LPCWSTR filter,
+ UString &resPath
+ #ifdef UNDER_CE
+ , bool openFolder
+ #endif
+ )
+{
+ const unsigned kBufSize = MAX_PATH * 2;
+ const unsigned kFilterBufSize = MAX_PATH;
+ if (!filter)
+ filter = L"*.*";
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ CHAR buf[kBufSize];
+ MyStringCopy(buf, (const char *)GetSystemString(filePath));
+ // OPENFILENAME_NT4A
+ OPENFILENAMEA p;
+ memset(&p, 0, sizeof(p));
+ p.lStructSize = my_compatib_OPENFILENAMEA_size;
+ p.hwndOwner = hwnd;
+ CHAR filterBuf[kFilterBufSize];
+ {
+ CDoubleZeroStringListA dz(filterBuf, kFilterBufSize);
+ dz.Add(GetSystemString(filterDescription ? filterDescription : filter));
+ dz.Add(GetSystemString(filter));
+ dz.Finish();
+ p.lpstrFilter = filterBuf;
+ p.nFilterIndex = 1;
+ }
+
+ p.lpstrFile = buf;
+ p.nMaxFile = kBufSize;
+ CONV_U_To_A(p.lpstrInitialDir, initialDir, initialDirA);
+ CONV_U_To_A(p.lpstrTitle, title, titleA);
+ p.Flags = OFN_EXPLORER | OFN_HIDEREADONLY;
+
+ bool res = BOOLToBool(::GetOpenFileNameA(&p));
+ resPath = GetUnicodeString(buf);
+ return res;
+ }
+ else
+ #endif
+ {
+ WCHAR buf[kBufSize];
+ MyStringCopy(buf, filePath);
+ // OPENFILENAME_NT4W
+ OPENFILENAMEW p;
+ memset(&p, 0, sizeof(p));
+ p.lStructSize = my_compatib_OPENFILENAMEW_size;
+ p.hwndOwner = hwnd;
+
+ WCHAR filterBuf[kFilterBufSize];
+ {
+ CDoubleZeroStringListW dz(filterBuf, kFilterBufSize);
+ dz.Add(filterDescription ? filterDescription : filter);
+ dz.Add(filter);
+ dz.Finish();
+ p.lpstrFilter = filterBuf;
+ p.nFilterIndex = 1;
+ }
+
+ p.lpstrFile = buf;
+ p.nMaxFile = kBufSize;
+ p.lpstrInitialDir = initialDir;
+ p.lpstrTitle = title;
+ p.Flags = OFN_EXPLORER | OFN_HIDEREADONLY
+ #ifdef UNDER_CE
+ | (openFolder ? (MY__OFN_PROJECT | MY__OFN_SHOW_ALL) : 0)
+ #endif
+ ;
+
+ bool res = BOOLToBool(::GetOpenFileNameW(&p));
+ resPath = buf;
+ return res;
+ }
+}
+
+}
diff --git a/3rdparty/lzma/CPP/Windows/CommonDialog.h b/3rdparty/lzma/CPP/Windows/CommonDialog.h
new file mode 100644
index 00000000000..aaf17ac57ce
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/CommonDialog.h
@@ -0,0 +1,23 @@
+// Windows/CommonDialog.h
+
+#ifndef __WINDOWS_COMMON_DIALOG_H
+#define __WINDOWS_COMMON_DIALOG_H
+
+#include "../Common/MyString.h"
+
+namespace NWindows {
+
+bool MyGetOpenFileName(HWND hwnd, LPCWSTR title,
+ LPCWSTR initialDir, // can be NULL, so dir prefix in filePath will be used
+ LPCWSTR filePath, // full path
+ LPCWSTR filterDescription, // like "All files (*.*)"
+ LPCWSTR filter, // like "*.exe"
+ UString &resPath
+ #ifdef UNDER_CE
+ , bool openFolder = false
+ #endif
+);
+
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/ComboBox.cpp b/3rdparty/lzma/CPP/Windows/Control/ComboBox.cpp
new file mode 100644
index 00000000000..c6d5a8d688b
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/ComboBox.cpp
@@ -0,0 +1,66 @@
+// Windows/Control/ComboBox.cpp
+
+#include "StdAfx.h"
+
+#ifndef _UNICODE
+#include "../../Common/StringConvert.h"
+#endif
+
+#include "ComboBox.h"
+
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+namespace NControl {
+
+LRESULT CComboBox::GetLBText(int index, CSysString &s)
+{
+ s.Empty();
+ LRESULT len = GetLBTextLen(index); // length, excluding the terminating null character
+ if (len == CB_ERR)
+ return len;
+ LRESULT len2 = GetLBText(index, s.GetBuf((unsigned)len));
+ if (len2 == CB_ERR)
+ return len;
+ if (len > len2)
+ len = len2;
+ s.ReleaseBuf_CalcLen((unsigned)len);
+ return len;
+}
+
+#ifndef _UNICODE
+LRESULT CComboBox::AddString(LPCWSTR s)
+{
+ if (g_IsNT)
+ return SendMsgW(CB_ADDSTRING, 0, (LPARAM)s);
+ return AddString(GetSystemString(s));
+}
+
+LRESULT CComboBox::GetLBText(int index, UString &s)
+{
+ s.Empty();
+ if (g_IsNT)
+ {
+ LRESULT len = SendMsgW(CB_GETLBTEXTLEN, index, 0);
+ if (len == CB_ERR)
+ return len;
+ LRESULT len2 = SendMsgW(CB_GETLBTEXT, index, (LPARAM)s.GetBuf((unsigned)len));
+ if (len2 == CB_ERR)
+ return len;
+ if (len > len2)
+ len = len2;
+ s.ReleaseBuf_CalcLen(len);
+ return len;
+ }
+ AString sa;
+ LRESULT len = GetLBText(index, sa);
+ if (len == CB_ERR)
+ return len;
+ s = GetUnicodeString(sa);
+ return s.Len();
+}
+#endif
+
+}}
diff --git a/3rdparty/lzma/CPP/Windows/Control/ComboBox.h b/3rdparty/lzma/CPP/Windows/Control/ComboBox.h
new file mode 100644
index 00000000000..1d5a482134c
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/ComboBox.h
@@ -0,0 +1,65 @@
+// Windows/Control/ComboBox.h
+
+#ifndef __WINDOWS_CONTROL_COMBOBOX_H
+#define __WINDOWS_CONTROL_COMBOBOX_H
+
+#include "../../Common/MyWindows.h"
+
+#include <commctrl.h>
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CComboBox: public CWindow
+{
+public:
+ void ResetContent() { SendMsg(CB_RESETCONTENT, 0, 0); }
+ LRESULT AddString(LPCTSTR s) { return SendMsg(CB_ADDSTRING, 0, (LPARAM)s); }
+ #ifndef _UNICODE
+ LRESULT AddString(LPCWSTR s);
+ #endif
+ LRESULT SetCurSel(int index) { return SendMsg(CB_SETCURSEL, index, 0); }
+ int GetCurSel() { return (int)SendMsg(CB_GETCURSEL, 0, 0); }
+ int GetCount() { return (int)SendMsg(CB_GETCOUNT, 0, 0); }
+
+ LRESULT GetLBTextLen(int index) { return SendMsg(CB_GETLBTEXTLEN, index, 0); }
+ LRESULT GetLBText(int index, LPTSTR s) { return SendMsg(CB_GETLBTEXT, index, (LPARAM)s); }
+ LRESULT GetLBText(int index, CSysString &s);
+ #ifndef _UNICODE
+ LRESULT GetLBText(int index, UString &s);
+ #endif
+
+ LRESULT SetItemData(int index, LPARAM lParam) { return SendMsg(CB_SETITEMDATA, index, lParam); }
+ LRESULT GetItemData(int index) { return SendMsg(CB_GETITEMDATA, index, 0); }
+
+ LRESULT GetItemData_of_CurSel() { return GetItemData(GetCurSel()); }
+
+ void ShowDropDown(bool show = true) { SendMsg(CB_SHOWDROPDOWN, show ? TRUE : FALSE, 0); }
+};
+
+#ifndef UNDER_CE
+
+class CComboBoxEx: public CComboBox
+{
+public:
+ bool SetUnicodeFormat(bool fUnicode) { return LRESULTToBool(SendMsg(CBEM_SETUNICODEFORMAT, BOOLToBool(fUnicode), 0)); }
+
+ LRESULT DeleteItem(int index) { return SendMsg(CBEM_DELETEITEM, index, 0); }
+ LRESULT InsertItem(COMBOBOXEXITEM *item) { return SendMsg(CBEM_INSERTITEM, 0, (LPARAM)item); }
+ #ifndef _UNICODE
+ LRESULT InsertItem(COMBOBOXEXITEMW *item) { return SendMsg(CBEM_INSERTITEMW, 0, (LPARAM)item); }
+ #endif
+
+ LRESULT SetItem(COMBOBOXEXITEM *item) { return SendMsg(CBEM_SETITEM, 0, (LPARAM)item); }
+ DWORD SetExtendedStyle(DWORD exMask, DWORD exStyle) { return (DWORD)SendMsg(CBEM_SETEXTENDEDSTYLE, exMask, exStyle); }
+ HWND GetEditControl() { return (HWND)SendMsg(CBEM_GETEDITCONTROL, 0, 0); }
+ HIMAGELIST SetImageList(HIMAGELIST imageList) { return (HIMAGELIST)SendMsg(CBEM_SETIMAGELIST, 0, (LPARAM)imageList); }
+};
+
+#endif
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/CommandBar.h b/3rdparty/lzma/CPP/Windows/Control/CommandBar.h
new file mode 100644
index 00000000000..a6197447a40
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/CommandBar.h
@@ -0,0 +1,52 @@
+// Windows/Control/CommandBar.h
+
+#ifndef __WINDOWS_CONTROL_COMMANDBAR_H
+#define __WINDOWS_CONTROL_COMMANDBAR_H
+
+#ifdef UNDER_CE
+
+#include "../../Common/MyWindows.h"
+
+#include <commctrl.h>
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CCommandBar: public NWindows::CWindow
+{
+public:
+ bool Create(HINSTANCE hInst, HWND hwndParent, int idCmdBar)
+ {
+ _window = ::CommandBar_Create(hInst, hwndParent, idCmdBar);
+ return (_window != NULL);
+ }
+
+ // Macros
+ // void Destroy() { CommandBar_Destroy(_window); }
+ // bool AddButtons(UINT numButtons, LPTBBUTTON buttons) { return BOOLToBool(SendMsg(TB_ADDBUTTONS, (WPARAM)numButtons, (LPARAM)buttons)); }
+ bool InsertButton(int iButton, LPTBBUTTON button) { return BOOLToBool(SendMsg(TB_INSERTBUTTON, (WPARAM)iButton, (LPARAM)button)); }
+ BOOL AddToolTips(UINT numToolTips, LPTSTR toolTips) { return BOOLToBool(SendMsg(TB_SETTOOLTIPS, (WPARAM)numToolTips, (LPARAM)toolTips)); }
+ void AutoSize() { SendMsg(TB_AUTOSIZE, 0, 0); }
+
+ bool AddAdornments(DWORD dwFlags) { return BOOLToBool(::CommandBar_AddAdornments(_window, dwFlags, 0)); }
+ int AddBitmap(HINSTANCE hInst, int idBitmap, int iNumImages, int iImageWidth, int iImageHeight) { return ::CommandBar_AddBitmap(_window, hInst, idBitmap, iNumImages, iImageWidth, iImageHeight); }
+ bool DrawMenuBar(WORD iButton) { return BOOLToBool(::CommandBar_DrawMenuBar(_window, iButton)); }
+ HMENU GetMenu(WORD iButton) { return ::CommandBar_GetMenu(_window, iButton); }
+ int Height() { return CommandBar_Height(_window); }
+ HWND InsertComboBox(HINSTANCE hInst, int iWidth, UINT dwStyle, WORD idComboBox, WORD iButton) { return ::CommandBar_InsertComboBox(_window, hInst, iWidth, dwStyle, idComboBox, iButton); }
+ bool InsertMenubar(HINSTANCE hInst, WORD idMenu, WORD iButton) { return BOOLToBool(::CommandBar_InsertMenubar(_window, hInst, idMenu, iButton)); }
+ bool InsertMenubarEx(HINSTANCE hInst, LPTSTR pszMenu, WORD iButton) { return BOOLToBool(::CommandBar_InsertMenubarEx(_window, hInst, pszMenu, iButton)); }
+ bool Show(bool cmdShow) { return BOOLToBool(::CommandBar_Show(_window, BoolToBOOL(cmdShow))); }
+
+
+ // CE 4.0
+ void AlignAdornments() { CommandBar_AlignAdornments(_window); }
+};
+
+}}
+
+#endif
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/Dialog.cpp b/3rdparty/lzma/CPP/Windows/Control/Dialog.cpp
new file mode 100644
index 00000000000..9df3ef5ef24
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/Dialog.cpp
@@ -0,0 +1,250 @@
+// Windows/Control/Dialog.cpp
+
+#include "StdAfx.h"
+
+#ifndef _UNICODE
+#include "../../Common/StringConvert.h"
+#endif
+
+#include "Dialog.h"
+
+extern HINSTANCE g_hInstance;
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+namespace NControl {
+
+static INT_PTR APIENTRY DialogProcedure(HWND dialogHWND, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ CWindow tempDialog(dialogHWND);
+ if (message == WM_INITDIALOG)
+ tempDialog.SetUserDataLongPtr(lParam);
+ CDialog *dialog = (CDialog *)(tempDialog.GetUserDataLongPtr());
+ if (dialog == NULL)
+ return FALSE;
+ if (message == WM_INITDIALOG)
+ dialog->Attach(dialogHWND);
+ try { return BoolToBOOL(dialog->OnMessage(message, wParam, lParam)); }
+ catch(...) { return TRUE; }
+}
+
+bool CDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message)
+ {
+ case WM_INITDIALOG: return OnInit();
+ case WM_COMMAND: return OnCommand(wParam, lParam);
+ case WM_NOTIFY: return OnNotify((UINT)wParam, (LPNMHDR) lParam);
+ case WM_TIMER: return OnTimer(wParam, lParam);
+ case WM_SIZE: return OnSize(wParam, LOWORD(lParam), HIWORD(lParam));
+ case WM_HELP: OnHelp(); return true;
+ /*
+ OnHelp(
+ #ifdef UNDER_CE
+ (void *)
+ #else
+ (LPHELPINFO)
+ #endif
+ lParam);
+ return true;
+ */
+ default: return false;
+ }
+}
+
+bool CDialog::OnCommand(WPARAM wParam, LPARAM lParam)
+{
+ return OnCommand(HIWORD(wParam), LOWORD(wParam), lParam);
+}
+
+bool CDialog::OnCommand(int code, int itemID, LPARAM lParam)
+{
+ if (code == BN_CLICKED)
+ return OnButtonClicked(itemID, (HWND)lParam);
+ return false;
+}
+
+bool CDialog::OnButtonClicked(int buttonID, HWND /* buttonHWND */)
+{
+ switch (buttonID)
+ {
+ case IDOK: OnOK(); break;
+ case IDCANCEL: OnCancel(); break;
+ case IDHELP: OnHelp(); break;
+ default: return false;
+ }
+ return true;
+}
+
+static bool GetWorkAreaRect(RECT *rect)
+{
+ // use another function for multi-monitor.
+ return BOOLToBool(::SystemParametersInfo(SPI_GETWORKAREA, 0, rect, 0));
+}
+
+bool IsDialogSizeOK(int xSize, int ySize)
+{
+ // it returns for system font. Real font uses another values
+ LONG v = GetDialogBaseUnits();
+ int x = LOWORD(v);
+ int y = HIWORD(v);
+
+ RECT rect;
+ GetWorkAreaRect(&rect);
+ int wx = RECT_SIZE_X(rect);
+ int wy = RECT_SIZE_Y(rect);
+ return
+ xSize / 4 * x <= wx &&
+ ySize / 8 * y <= wy;
+}
+
+bool CDialog::GetMargins(int margin, int &x, int &y)
+{
+ x = margin;
+ y = margin;
+ RECT rect;
+ rect.left = 0;
+ rect.top = 0;
+ rect.right = margin;
+ rect.bottom = margin;
+ if (!MapRect(&rect))
+ return false;
+ x = rect.right - rect.left;
+ y = rect.bottom - rect.top;
+ return true;
+}
+
+int CDialog::Units_To_Pixels_X(int units)
+{
+ RECT rect;
+ rect.left = 0;
+ rect.top = 0;
+ rect.right = units;
+ rect.bottom = units;
+ if (!MapRect(&rect))
+ return units * 3 / 2;
+ return rect.right - rect.left;
+}
+
+bool CDialog::GetItemSizes(int id, int &x, int &y)
+{
+ RECT rect;
+ if (!::GetWindowRect(GetItem(id), &rect))
+ return false;
+ x = RECT_SIZE_X(rect);
+ y = RECT_SIZE_Y(rect);
+ return true;
+}
+
+void CDialog::GetClientRectOfItem(int id, RECT &rect)
+{
+ ::GetWindowRect(GetItem(id), &rect);
+ ScreenToClient(&rect);
+}
+
+bool CDialog::MoveItem(int id, int x, int y, int width, int height, bool repaint)
+{
+ return BOOLToBool(::MoveWindow(GetItem(id), x, y, width, height, BoolToBOOL(repaint)));
+}
+
+void CDialog::NormalizeSize(bool fullNormalize)
+{
+ RECT workRect;
+ GetWorkAreaRect(&workRect);
+ int xSize = RECT_SIZE_X(workRect);
+ int ySize = RECT_SIZE_Y(workRect);
+ RECT rect;
+ GetWindowRect(&rect);
+ int xSize2 = RECT_SIZE_X(rect);
+ int ySize2 = RECT_SIZE_Y(rect);
+ bool needMove = (xSize2 > xSize || ySize2 > ySize);
+ if (xSize2 > xSize || (needMove && fullNormalize))
+ {
+ rect.left = workRect.left;
+ rect.right = workRect.right;
+ xSize2 = xSize;
+ }
+ if (ySize2 > ySize || (needMove && fullNormalize))
+ {
+ rect.top = workRect.top;
+ rect.bottom = workRect.bottom;
+ ySize2 = ySize;
+ }
+ if (needMove)
+ {
+ if (fullNormalize)
+ Show(SW_SHOWMAXIMIZED);
+ else
+ Move(rect.left, rect.top, xSize2, ySize2, true);
+ }
+}
+
+void CDialog::NormalizePosition()
+{
+ RECT workRect, rect;
+ GetWorkAreaRect(&workRect);
+ GetWindowRect(&rect);
+ if (rect.bottom > workRect.bottom && rect.top > workRect.top)
+ Move(rect.left, workRect.top, RECT_SIZE_X(rect), RECT_SIZE_Y(rect), true);
+}
+
+bool CModelessDialog::Create(LPCTSTR templateName, HWND parentWindow)
+{
+ HWND aHWND = CreateDialogParam(g_hInstance, templateName, parentWindow, DialogProcedure, (LPARAM)this);
+ if (aHWND == 0)
+ return false;
+ Attach(aHWND);
+ return true;
+}
+
+INT_PTR CModalDialog::Create(LPCTSTR templateName, HWND parentWindow)
+{
+ return DialogBoxParam(g_hInstance, templateName, parentWindow, DialogProcedure, (LPARAM)this);
+}
+
+#ifndef _UNICODE
+
+bool CModelessDialog::Create(LPCWSTR templateName, HWND parentWindow)
+{
+ HWND aHWND;
+ if (g_IsNT)
+ aHWND = CreateDialogParamW(g_hInstance, templateName, parentWindow, DialogProcedure, (LPARAM)this);
+ else
+ {
+ AString name;
+ LPCSTR templateNameA;
+ if (IS_INTRESOURCE(templateName))
+ templateNameA = (LPCSTR)templateName;
+ else
+ {
+ name = GetSystemString(templateName);
+ templateNameA = name;
+ }
+ aHWND = CreateDialogParamA(g_hInstance, templateNameA, parentWindow, DialogProcedure, (LPARAM)this);
+ }
+ if (aHWND == 0)
+ return false;
+ Attach(aHWND);
+ return true;
+}
+
+INT_PTR CModalDialog::Create(LPCWSTR templateName, HWND parentWindow)
+{
+ if (g_IsNT)
+ return DialogBoxParamW(g_hInstance, templateName, parentWindow, DialogProcedure, (LPARAM)this);
+ AString name;
+ LPCSTR templateNameA;
+ if (IS_INTRESOURCE(templateName))
+ templateNameA = (LPCSTR)templateName;
+ else
+ {
+ name = GetSystemString(templateName);
+ templateNameA = name;
+ }
+ return DialogBoxParamA(g_hInstance, templateNameA, parentWindow, DialogProcedure, (LPARAM)this);
+}
+#endif
+
+}}
diff --git a/3rdparty/lzma/CPP/Windows/Control/Dialog.h b/3rdparty/lzma/CPP/Windows/Control/Dialog.h
new file mode 100644
index 00000000000..59b9f41935c
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/Dialog.h
@@ -0,0 +1,167 @@
+// Windows/Control/Dialog.h
+
+#ifndef __WINDOWS_CONTROL_DIALOG_H
+#define __WINDOWS_CONTROL_DIALOG_H
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CDialog: public CWindow
+{
+public:
+ CDialog(HWND wnd = NULL): CWindow(wnd){};
+ virtual ~CDialog() {};
+
+ HWND GetItem(int itemID) const
+ { return GetDlgItem(_window, itemID); }
+
+ bool EnableItem(int itemID, bool enable) const
+ { return BOOLToBool(::EnableWindow(GetItem(itemID), BoolToBOOL(enable))); }
+
+ bool ShowItem(int itemID, int cmdShow) const
+ { return BOOLToBool(::ShowWindow(GetItem(itemID), cmdShow)); }
+
+ bool ShowItem_Bool(int itemID, bool show) const
+ { return ShowItem(itemID, show ? SW_SHOW: SW_HIDE); }
+
+ bool HideItem(int itemID) const { return ShowItem(itemID, SW_HIDE); }
+
+ bool SetItemText(int itemID, LPCTSTR s)
+ { return BOOLToBool(SetDlgItemText(_window, itemID, s)); }
+
+ #ifndef _UNICODE
+ bool SetItemText(int itemID, LPCWSTR s)
+ {
+ CWindow window(GetItem(itemID));
+ return window.SetText(s);
+ }
+ #endif
+
+ UINT GetItemText(int itemID, LPTSTR string, int maxCount)
+ { return GetDlgItemText(_window, itemID, string, maxCount); }
+ #ifndef _UNICODE
+ /*
+ bool GetItemText(int itemID, LPWSTR string, int maxCount)
+ {
+ CWindow window(GetItem(itemID));
+ return window.GetText(string, maxCount);
+ }
+ */
+ #endif
+
+ bool SetItemInt(int itemID, UINT value, bool isSigned)
+ { return BOOLToBool(SetDlgItemInt(_window, itemID, value, BoolToBOOL(isSigned))); }
+ bool GetItemInt(int itemID, bool isSigned, UINT &value)
+ {
+ BOOL result;
+ value = GetDlgItemInt(_window, itemID, &result, BoolToBOOL(isSigned));
+ return BOOLToBool(result);
+ }
+
+ HWND GetNextGroupItem(HWND control, bool previous)
+ { return GetNextDlgGroupItem(_window, control, BoolToBOOL(previous)); }
+ HWND GetNextTabItem(HWND control, bool previous)
+ { return GetNextDlgTabItem(_window, control, BoolToBOOL(previous)); }
+
+ bool MapRect(LPRECT rect)
+ { return BOOLToBool(MapDialogRect(_window, rect)); }
+
+ bool IsMessage(LPMSG message)
+ { return BOOLToBool(IsDialogMessage(_window, message)); }
+
+ LRESULT SendItemMessage(int itemID, UINT message, WPARAM wParam, LPARAM lParam)
+ { return SendDlgItemMessage(_window, itemID, message, wParam, lParam); }
+
+ bool CheckButton(int buttonID, UINT checkState)
+ { return BOOLToBool(CheckDlgButton(_window, buttonID, checkState)); }
+ bool CheckButton(int buttonID, bool checkState)
+ { return CheckButton(buttonID, UINT(checkState ? BST_CHECKED : BST_UNCHECKED)); }
+
+ UINT IsButtonChecked(int buttonID) const
+ { return IsDlgButtonChecked(_window, buttonID); }
+ bool IsButtonCheckedBool(int buttonID) const
+ { return (IsButtonChecked(buttonID) == BST_CHECKED); }
+
+ bool CheckRadioButton(int firstButtonID, int lastButtonID, int checkButtonID)
+ { return BOOLToBool(::CheckRadioButton(_window, firstButtonID, lastButtonID, checkButtonID)); }
+
+ virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
+ virtual bool OnInit() { return true; }
+ virtual bool OnCommand(WPARAM wParam, LPARAM lParam);
+ virtual bool OnCommand(int code, int itemID, LPARAM lParam);
+ virtual bool OnSize(WPARAM /* wParam */, int /* xSize */, int /* ySize */) { return false; }
+
+ /*
+ #ifdef UNDER_CE
+ virtual void OnHelp(void *) { OnHelp(); }
+ #else
+ virtual void OnHelp(LPHELPINFO) { OnHelp(); }
+ #endif
+ */
+ virtual void OnHelp() {};
+
+ virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
+ virtual void OnOK() {};
+ virtual void OnCancel() {};
+ virtual bool OnNotify(UINT /* controlID */, LPNMHDR /* lParam */) { return false; }
+ virtual bool OnTimer(WPARAM /* timerID */, LPARAM /* callback */) { return false; }
+
+ LONG_PTR SetMsgResult(LONG_PTR newLongPtr )
+ { return SetLongPtr(DWLP_MSGRESULT, newLongPtr); }
+ LONG_PTR GetMsgResult() const
+ { return GetLongPtr(DWLP_MSGRESULT); }
+
+ bool GetMargins(int margin, int &x, int &y);
+ int Units_To_Pixels_X(int units);
+ bool GetItemSizes(int id, int &x, int &y);
+ void GetClientRectOfItem(int id, RECT &rect);
+ bool MoveItem(int id, int x, int y, int width, int height, bool repaint = true);
+
+ void NormalizeSize(bool fullNormalize = false);
+ void NormalizePosition();
+};
+
+class CModelessDialog: public CDialog
+{
+public:
+ bool Create(LPCTSTR templateName, HWND parentWindow);
+ bool Create(UINT resID, HWND parentWindow) { return Create(MAKEINTRESOURCEW(resID), parentWindow); }
+ #ifndef _UNICODE
+ bool Create(LPCWSTR templateName, HWND parentWindow);
+ #endif
+ virtual void OnOK() { Destroy(); }
+ virtual void OnCancel() { Destroy(); }
+};
+
+class CModalDialog: public CDialog
+{
+public:
+ INT_PTR Create(LPCTSTR templateName, HWND parentWindow);
+ INT_PTR Create(UINT resID, HWND parentWindow) { return Create(MAKEINTRESOURCEW(resID), parentWindow); }
+ #ifndef _UNICODE
+ INT_PTR Create(LPCWSTR templateName, HWND parentWindow);
+ #endif
+
+ bool End(INT_PTR result) { return BOOLToBool(::EndDialog(_window, result)); }
+ virtual void OnOK() { End(IDOK); }
+ virtual void OnCancel() { End(IDCANCEL); }
+};
+
+class CDialogChildControl: public NWindows::CWindow
+{
+ int m_ID;
+public:
+ void Init(const NWindows::NControl::CDialog &parentDialog, int id)
+ {
+ m_ID = id;
+ Attach(parentDialog.GetItem(id));
+ }
+};
+
+bool IsDialogSizeOK(int xSize, int ySize);
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/Edit.h b/3rdparty/lzma/CPP/Windows/Control/Edit.h
new file mode 100644
index 00000000000..51a22c53740
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/Edit.h
@@ -0,0 +1,19 @@
+// Windows/Control/Edit.h
+
+#ifndef __WINDOWS_CONTROL_EDIT_H
+#define __WINDOWS_CONTROL_EDIT_H
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CEdit: public CWindow
+{
+public:
+ void SetPasswordChar(WPARAM c) { SendMsg(EM_SETPASSWORDCHAR, c); }
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/ImageList.cpp b/3rdparty/lzma/CPP/Windows/Control/ImageList.cpp
new file mode 100644
index 00000000000..3e22b956ed2
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/ImageList.cpp
@@ -0,0 +1,10 @@
+// Windows/Control/ImageList.cpp
+
+#include "StdAfx.h"
+
+#include "ImageList.h"
+
+namespace NWindows {
+namespace NControl {
+
+}}
diff --git a/3rdparty/lzma/CPP/Windows/Control/ImageList.h b/3rdparty/lzma/CPP/Windows/Control/ImageList.h
new file mode 100644
index 00000000000..0d9c9313103
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/ImageList.h
@@ -0,0 +1,87 @@
+// Windows/Control/ImageList.h
+
+#ifndef __WINDOWS_CONTROL_IMAGE_LIST_H
+#define __WINDOWS_CONTROL_IMAGE_LIST_H
+
+#include <commctrl.h>
+
+#include "../Defs.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CImageList
+{
+ HIMAGELIST m_Object;
+public:
+ operator HIMAGELIST() const {return m_Object; }
+ CImageList(): m_Object(NULL) {}
+ bool Attach(HIMAGELIST imageList)
+ {
+ if (imageList == NULL)
+ return false;
+ m_Object = imageList;
+ return true;
+ }
+
+ HIMAGELIST Detach()
+ {
+ HIMAGELIST imageList = m_Object;
+ m_Object = NULL;
+ return imageList;
+ }
+
+ bool Create(int width, int height, UINT flags, int initialNumber, int grow)
+ {
+ HIMAGELIST a = ImageList_Create(width, height, flags,
+ initialNumber, grow);
+ if (a == NULL)
+ return false;
+ return Attach(a);
+ }
+
+ bool Destroy() // DeleteImageList() in MFC
+ {
+ if (m_Object == NULL)
+ return false;
+ return BOOLToBool(ImageList_Destroy(Detach()));
+ }
+
+ ~CImageList()
+ { Destroy(); }
+
+ int GetImageCount() const
+ { return ImageList_GetImageCount(m_Object); }
+
+ bool GetImageInfo(int index, IMAGEINFO* imageInfo) const
+ { return BOOLToBool(ImageList_GetImageInfo(m_Object, index, imageInfo)); }
+
+ int Add(HBITMAP hbmImage, HBITMAP hbmMask = 0)
+ { return ImageList_Add(m_Object, hbmImage, hbmMask); }
+ int AddMasked(HBITMAP hbmImage, COLORREF mask)
+ { return ImageList_AddMasked(m_Object, hbmImage, mask); }
+ int AddIcon(HICON icon)
+ { return ImageList_AddIcon(m_Object, icon); }
+ int Replace(int index, HICON icon)
+ { return ImageList_ReplaceIcon(m_Object, index, icon); }
+
+ // If index is -1, the function removes all images.
+ bool Remove(int index)
+ { return BOOLToBool(ImageList_Remove(m_Object, index)); }
+ bool RemoveAll()
+ { return BOOLToBool(ImageList_RemoveAll(m_Object)); }
+
+ HICON ExtractIcon(int index)
+ { return ImageList_ExtractIcon(NULL, m_Object, index); }
+ HICON GetIcon(int index, UINT flags)
+ { return ImageList_GetIcon(m_Object, index, flags); }
+
+ bool GetIconSize(int &width, int &height) const
+ { return BOOLToBool(ImageList_GetIconSize(m_Object, &width, &height)); }
+ bool SetIconSize(int width, int height)
+ { return BOOLToBool(ImageList_SetIconSize(m_Object, width, height)); }
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/ListView.cpp b/3rdparty/lzma/CPP/Windows/Control/ListView.cpp
new file mode 100644
index 00000000000..6d916591a51
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/ListView.cpp
@@ -0,0 +1,155 @@
+// Windows/Control/ListView.cpp
+
+#include "StdAfx.h"
+
+#include "ListView.h"
+
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+namespace NControl {
+
+bool CListView::CreateEx(DWORD exStyle, DWORD style,
+ int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu,
+ HINSTANCE instance, LPVOID createParam)
+{
+ return CWindow::CreateEx(exStyle, WC_LISTVIEW, TEXT(""), style, x, y, width,
+ height, parentWindow, idOrHMenu, instance, createParam);
+}
+
+bool CListView::GetItemParam(int index, LPARAM &param) const
+{
+ LVITEM item;
+ item.iItem = index;
+ item.iSubItem = 0;
+ item.mask = LVIF_PARAM;
+ bool aResult = GetItem(&item);
+ param = item.lParam;
+ return aResult;
+}
+
+int CListView::InsertColumn(int columnIndex, LPCTSTR text, int width)
+{
+ LVCOLUMN ci;
+ ci.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
+ ci.pszText = (LPTSTR)text;
+ ci.iSubItem = columnIndex;
+ ci.cx = width;
+ return InsertColumn(columnIndex, &ci);
+}
+
+int CListView::InsertItem(int index, LPCTSTR text)
+{
+ LVITEM item;
+ item.mask = LVIF_TEXT | LVIF_PARAM;
+ item.iItem = index;
+ item.lParam = index;
+ item.pszText = (LPTSTR)text;
+ item.iSubItem = 0;
+ return InsertItem(&item);
+}
+
+int CListView::SetSubItem(int index, int subIndex, LPCTSTR text)
+{
+ LVITEM item;
+ item.mask = LVIF_TEXT;
+ item.iItem = index;
+ item.pszText = (LPTSTR)text;
+ item.iSubItem = subIndex;
+ return SetItem(&item);
+}
+
+#ifndef _UNICODE
+
+int CListView::InsertColumn(int columnIndex, LPCWSTR text, int width)
+{
+ LVCOLUMNW ci;
+ ci.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
+ ci.pszText = (LPWSTR)text;
+ ci.iSubItem = columnIndex;
+ ci.cx = width;
+ return InsertColumn(columnIndex, &ci);
+}
+
+int CListView::InsertItem(int index, LPCWSTR text)
+{
+ LVITEMW item;
+ item.mask = LVIF_TEXT | LVIF_PARAM;
+ item.iItem = index;
+ item.lParam = index;
+ item.pszText = (LPWSTR)text;
+ item.iSubItem = 0;
+ return InsertItem(&item);
+}
+
+int CListView::SetSubItem(int index, int subIndex, LPCWSTR text)
+{
+ LVITEMW item;
+ item.mask = LVIF_TEXT;
+ item.iItem = index;
+ item.pszText = (LPWSTR)text;
+ item.iSubItem = subIndex;
+ return SetItem(&item);
+}
+
+#endif
+
+static LRESULT APIENTRY ListViewSubclassProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ CWindow window(hwnd);
+ CListView2 *w = (CListView2 *)(window.GetUserDataLongPtr());
+ if (w == NULL)
+ return 0;
+ return w->OnMessage(message, wParam, lParam);
+}
+
+LRESULT CListView2::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ #ifndef _UNICODE
+ if (g_IsNT)
+ return CallWindowProcW(_origWindowProc, *this, message, wParam, lParam);
+ else
+ #endif
+ return CallWindowProc(_origWindowProc, *this, message, wParam, lParam);
+}
+
+void CListView2::SetWindowProc()
+{
+ SetUserDataLongPtr((LONG_PTR)this);
+ #ifndef _UNICODE
+ if (g_IsNT)
+ _origWindowProc = (WNDPROC)SetLongPtrW(GWLP_WNDPROC, (LONG_PTR)ListViewSubclassProc);
+ else
+ #endif
+ _origWindowProc = (WNDPROC)SetLongPtr(GWLP_WNDPROC, (LONG_PTR)ListViewSubclassProc);
+}
+
+/*
+LRESULT CListView3::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ LRESULT res = CListView2::OnMessage(message, wParam, lParam);
+ if (message == WM_GETDLGCODE)
+ {
+ // when user presses RETURN, windows sends default (first) button command to parent dialog.
+ // we disable this:
+ MSG *msg = (MSG *)lParam;
+ WPARAM key = wParam;
+ bool change = false;
+ if (msg)
+ {
+ if (msg->message == WM_KEYDOWN && msg->wParam == VK_RETURN)
+ change = true;
+ }
+ else if (wParam == VK_RETURN)
+ change = true;
+ if (change)
+ res |= DLGC_WANTALLKEYS;
+ }
+ return res;
+}
+*/
+
+}}
diff --git a/3rdparty/lzma/CPP/Windows/Control/ListView.h b/3rdparty/lzma/CPP/Windows/Control/ListView.h
new file mode 100644
index 00000000000..9a3abe70fa1
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/ListView.h
@@ -0,0 +1,146 @@
+// Windows/Control/ListView.h
+
+#ifndef __WINDOWS_CONTROL_LISTVIEW_H
+#define __WINDOWS_CONTROL_LISTVIEW_H
+
+#include "../../Common/MyWindows.h"
+
+#include <commctrl.h>
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CListView: public NWindows::CWindow
+{
+public:
+ bool CreateEx(DWORD exStyle, DWORD style,
+ int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu,
+ HINSTANCE instance, LPVOID createParam);
+
+ void SetUnicodeFormat()
+ {
+ #ifndef UNDER_CE
+ ListView_SetUnicodeFormat(_window, TRUE);
+ #endif
+ }
+
+ bool DeleteAllItems() { return BOOLToBool(ListView_DeleteAllItems(_window)); }
+ bool DeleteColumn(int columnIndex) { return BOOLToBool(ListView_DeleteColumn(_window, columnIndex)); }
+
+ int InsertColumn(int columnIndex, const LVCOLUMN *columnInfo) { return ListView_InsertColumn(_window, columnIndex, columnInfo); }
+ int InsertColumn(int columnIndex, LPCTSTR text, int width);
+ bool SetColumnOrderArray(int count, const int *columns) { return BOOLToBool(ListView_SetColumnOrderArray(_window, count, columns)); }
+
+ /*
+ int GetNumColumns()
+ {
+ HWND header = ListView_GetHeader(_window);
+ if (!header)
+ return -1;
+ return Header_GetItemCount(header);
+ }
+ */
+
+ int InsertItem(const LVITEM* item) { return ListView_InsertItem(_window, item); }
+ int InsertItem(int index, LPCTSTR text);
+ bool SetItem(const LVITEM* item) { return BOOLToBool(ListView_SetItem(_window, item)); }
+ int SetSubItem(int index, int subIndex, LPCTSTR text);
+
+ #ifndef _UNICODE
+
+ int InsertColumn(int columnIndex, const LVCOLUMNW *columnInfo) { return (int)SendMsg(LVM_INSERTCOLUMNW, (WPARAM)columnIndex, (LPARAM)columnInfo); }
+ int InsertColumn(int columnIndex, LPCWSTR text, int width);
+ int InsertItem(const LV_ITEMW* item) { return (int)SendMsg(LVM_INSERTITEMW, 0, (LPARAM)item); }
+ int InsertItem(int index, LPCWSTR text);
+ bool SetItem(const LV_ITEMW* item) { return BOOLToBool((BOOL)SendMsg(LVM_SETITEMW, 0, (LPARAM)item)); }
+ int SetSubItem(int index, int subIndex, LPCWSTR text);
+
+ #endif
+
+ bool DeleteItem(int itemIndex) { return BOOLToBool(ListView_DeleteItem(_window, itemIndex)); }
+
+ UINT GetSelectedCount() const { return ListView_GetSelectedCount(_window); }
+ int GetItemCount() const { return ListView_GetItemCount(_window); }
+
+ INT GetSelectionMark() const { return ListView_GetSelectionMark(_window); }
+
+ void SetItemCount(int numItems) { ListView_SetItemCount(_window, numItems); }
+ void SetItemCountEx(int numItems, DWORD flags) { ListView_SetItemCountEx(_window, numItems, flags); }
+
+ int GetNextItem(int startIndex, UINT flags) const { return ListView_GetNextItem(_window, startIndex, flags); }
+ int GetNextSelectedItem(int startIndex) const { return GetNextItem(startIndex, LVNI_SELECTED); }
+ int GetFocusedItem() const { return GetNextItem(-1, LVNI_FOCUSED); }
+
+ bool GetItem(LVITEM* item) const { return BOOLToBool(ListView_GetItem(_window, item)); }
+ bool GetItemParam(int itemIndex, LPARAM &param) const;
+ void GetItemText(int itemIndex, int subItemIndex, LPTSTR text, int textSizeMax) const
+ { ListView_GetItemText(_window, itemIndex, subItemIndex, text, textSizeMax); }
+ bool SortItems(PFNLVCOMPARE compareFunction, LPARAM dataParam)
+ { return BOOLToBool(ListView_SortItems(_window, compareFunction, dataParam)); }
+
+ void SetItemState(int index, UINT state, UINT mask) { ListView_SetItemState(_window, index, state, mask); }
+ void SetItemState_Selected(int index, bool select) { SetItemState(index, select ? LVIS_SELECTED : 0, LVIS_SELECTED); }
+ void SetItemState_Selected(int index) { SetItemState(index, LVIS_SELECTED, LVIS_SELECTED); }
+ void SelectAll() { SetItemState_Selected(-1); }
+ void SetItemState_FocusedSelected(int index) { SetItemState(index, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED); }
+ UINT GetItemState(int index, UINT mask) const { return ListView_GetItemState(_window, index, mask); }
+ bool IsItemSelected(int index) const { return GetItemState(index, LVIS_SELECTED) == LVIS_SELECTED; }
+
+ bool GetColumn(int columnIndex, LVCOLUMN* columnInfo) const
+ { return BOOLToBool(ListView_GetColumn(_window, columnIndex, columnInfo)); }
+
+ HIMAGELIST SetImageList(HIMAGELIST imageList, int imageListType)
+ { return ListView_SetImageList(_window, imageList, imageListType); }
+
+ // version 4.70: NT5 | (NT4 + ie3) | w98 | (w95 + ie3)
+ DWORD GetExtendedListViewStyle() { return ListView_GetExtendedListViewStyle(_window); }
+ void SetExtendedListViewStyle(DWORD exStyle) { ListView_SetExtendedListViewStyle(_window, exStyle); }
+ void SetExtendedListViewStyle(DWORD exMask, DWORD exStyle) { ListView_SetExtendedListViewStyleEx(_window, exMask, exStyle); }
+
+ void SetCheckState(UINT index, bool checkState) { ListView_SetCheckState(_window, index, BoolToBOOL(checkState)); }
+ bool GetCheckState(UINT index) { return BOOLToBool(ListView_GetCheckState(_window, index)); }
+
+ bool EnsureVisible(int index, bool partialOK) { return BOOLToBool(ListView_EnsureVisible(_window, index, BoolToBOOL(partialOK))); }
+
+ bool GetItemRect(int index, RECT *rect, int code) { return BOOLToBool(ListView_GetItemRect(_window, index, rect, code)); }
+
+ HWND GetEditControl() { return ListView_GetEditControl(_window) ; }
+ HWND EditLabel(int itemIndex) { return ListView_EditLabel(_window, itemIndex) ; }
+
+ bool RedrawItems(int firstIndex, int lastIndex) { return BOOLToBool(ListView_RedrawItems(_window, firstIndex, lastIndex)); }
+ bool RedrawAllItems()
+ {
+ if (GetItemCount() > 0)
+ return RedrawItems(0, GetItemCount() - 1);
+ return true;
+ }
+ bool RedrawItem(int index) { return RedrawItems(index, index); }
+
+ int HitTest(LPLVHITTESTINFO info) { return ListView_HitTest(_window, info); }
+ COLORREF GetBkColor() { return ListView_GetBkColor(_window); }
+ bool SetColumnWidth(int iCol, int cx) { return BOOLToBool(ListView_SetColumnWidth(_window, iCol, cx)); }
+ bool SetColumnWidthAuto(int iCol) { return SetColumnWidth(iCol, LVSCW_AUTOSIZE); }
+};
+
+class CListView2: public CListView
+{
+ WNDPROC _origWindowProc;
+public:
+ void SetWindowProc();
+ virtual LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
+};
+
+/*
+class CListView3: public CListView2
+{
+public:
+ virtual LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
+};
+*/
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/ProgressBar.h b/3rdparty/lzma/CPP/Windows/Control/ProgressBar.h
new file mode 100644
index 00000000000..38ebcb6131b
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/ProgressBar.h
@@ -0,0 +1,35 @@
+// Windows/Control/ProgressBar.h
+
+#ifndef __WINDOWS_CONTROL_PROGRESSBAR_H
+#define __WINDOWS_CONTROL_PROGRESSBAR_H
+
+#include "../../Common/MyWindows.h"
+
+#include <commctrl.h>
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CProgressBar: public CWindow
+{
+public:
+ LRESULT SetPos(int pos) { return SendMsg(PBM_SETPOS, pos, 0); }
+ LRESULT DeltaPos(int increment) { return SendMsg(PBM_DELTAPOS, increment, 0); }
+ UINT GetPos() { return (UINT)SendMsg(PBM_GETPOS, 0, 0); }
+ LRESULT SetRange(unsigned short minValue, unsigned short maxValue) { return SendMsg(PBM_SETRANGE, 0, MAKELPARAM(minValue, maxValue)); }
+ DWORD SetRange32(int minValue, int maxValue) { return (DWORD)SendMsg(PBM_SETRANGE32, minValue, maxValue); }
+ int SetStep(int step) { return (int)SendMsg(PBM_SETSTEP, step, 0); }
+ LRESULT StepIt() { return SendMsg(PBM_STEPIT, 0, 0); }
+ INT GetRange(bool minValue, PPBRANGE range) { return (INT)SendMsg(PBM_GETRANGE, BoolToBOOL(minValue), (LPARAM)range); }
+
+ #ifndef UNDER_CE
+ COLORREF SetBarColor(COLORREF color) { return (COLORREF)SendMsg(PBM_SETBARCOLOR, 0, color); }
+ COLORREF SetBackgroundColor(COLORREF color) { return (COLORREF)SendMsg(PBM_SETBKCOLOR, 0, color); }
+ #endif
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/PropertyPage.cpp b/3rdparty/lzma/CPP/Windows/Control/PropertyPage.cpp
new file mode 100644
index 00000000000..bbac74ad732
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/PropertyPage.cpp
@@ -0,0 +1,143 @@
+// Windows/Control/PropertyPage.cpp
+
+#include "StdAfx.h"
+
+#ifndef _UNICODE
+#include "../../Common/StringConvert.h"
+#endif
+
+#include "PropertyPage.h"
+
+extern HINSTANCE g_hInstance;
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+namespace NControl {
+
+static INT_PTR APIENTRY MyProperyPageProcedure(HWND dialogHWND, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ CWindow tempDialog(dialogHWND);
+ if (message == WM_INITDIALOG)
+ tempDialog.SetUserDataLongPtr(((PROPSHEETPAGE *)lParam)->lParam);
+ CDialog *dialog = (CDialog *)(tempDialog.GetUserDataLongPtr());
+ if (dialog == NULL)
+ return FALSE;
+ if (message == WM_INITDIALOG)
+ dialog->Attach(dialogHWND);
+ try { return BoolToBOOL(dialog->OnMessage(message, wParam, lParam)); }
+ catch(...) { return TRUE; }
+}
+
+bool CPropertyPage::OnNotify(UINT /* controlID */, LPNMHDR lParam)
+{
+ switch (lParam->code)
+ {
+ case PSN_APPLY: SetMsgResult(OnApply(LPPSHNOTIFY(lParam))); break;
+ case PSN_KILLACTIVE: SetMsgResult(BoolToBOOL(OnKillActive(LPPSHNOTIFY(lParam)))); break;
+ case PSN_SETACTIVE: SetMsgResult(OnSetActive(LPPSHNOTIFY(lParam))); break;
+ case PSN_RESET: OnReset(LPPSHNOTIFY(lParam)); break;
+ case PSN_HELP: OnNotifyHelp(LPPSHNOTIFY(lParam)); break;
+ default: return false;
+ }
+ return true;
+}
+
+INT_PTR MyPropertySheet(const CObjectVector<CPageInfo> &pagesInfo, HWND hwndParent, const UString &title)
+{
+ #ifndef _UNICODE
+ AStringVector titles;
+ #endif
+ #ifndef _UNICODE
+ CRecordVector<PROPSHEETPAGEA> pagesA;
+ #endif
+ CRecordVector<PROPSHEETPAGEW> pagesW;
+
+ unsigned i;
+ #ifndef _UNICODE
+ for (i = 0; i < pagesInfo.Size(); i++)
+ titles.Add(GetSystemString(pagesInfo[i].Title));
+ #endif
+
+ for (i = 0; i < pagesInfo.Size(); i++)
+ {
+ const CPageInfo &pageInfo = pagesInfo[i];
+ #ifndef _UNICODE
+ {
+ PROPSHEETPAGE page;
+ page.dwSize = sizeof(page);
+ page.dwFlags = PSP_HASHELP;
+ page.hInstance = g_hInstance;
+ page.pszTemplate = MAKEINTRESOURCE(pageInfo.ID);
+ page.pszIcon = NULL;
+ page.pfnDlgProc = NWindows::NControl::MyProperyPageProcedure;
+
+ if (titles[i].IsEmpty())
+ page.pszTitle = NULL;
+ else
+ {
+ page.dwFlags |= PSP_USETITLE;
+ page.pszTitle = titles[i];
+ }
+ page.lParam = (LPARAM)pageInfo.Page;
+ page.pfnCallback = NULL;
+ pagesA.Add(page);
+ }
+ #endif
+ {
+ PROPSHEETPAGEW page;
+ page.dwSize = sizeof(page);
+ page.dwFlags = PSP_HASHELP;
+ page.hInstance = g_hInstance;
+ page.pszTemplate = MAKEINTRESOURCEW(pageInfo.ID);
+ page.pszIcon = NULL;
+ page.pfnDlgProc = NWindows::NControl::MyProperyPageProcedure;
+
+ if (pageInfo.Title.IsEmpty())
+ page.pszTitle = NULL;
+ else
+ {
+ page.dwFlags |= PSP_USETITLE;
+ page.pszTitle = pageInfo.Title;
+ }
+ page.lParam = (LPARAM)pageInfo.Page;
+ page.pfnCallback = NULL;
+ pagesW.Add(page);
+ }
+ }
+
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ PROPSHEETHEADER sheet;
+ sheet.dwSize = sizeof(sheet);
+ sheet.dwFlags = PSH_PROPSHEETPAGE;
+ sheet.hwndParent = hwndParent;
+ sheet.hInstance = g_hInstance;
+ AString titleA = GetSystemString(title);
+ sheet.pszCaption = titleA;
+ sheet.nPages = pagesInfo.Size();
+ sheet.nStartPage = 0;
+ sheet.ppsp = &pagesA.Front();
+ sheet.pfnCallback = NULL;
+ return ::PropertySheetA(&sheet);
+ }
+ else
+ #endif
+ {
+ PROPSHEETHEADERW sheet;
+ sheet.dwSize = sizeof(sheet);
+ sheet.dwFlags = PSH_PROPSHEETPAGE;
+ sheet.hwndParent = hwndParent;
+ sheet.hInstance = g_hInstance;
+ sheet.pszCaption = title;
+ sheet.nPages = pagesInfo.Size();
+ sheet.nStartPage = 0;
+ sheet.ppsp = &pagesW.Front();
+ sheet.pfnCallback = NULL;
+ return ::PropertySheetW(&sheet);
+ }
+}
+
+}}
diff --git a/3rdparty/lzma/CPP/Windows/Control/PropertyPage.h b/3rdparty/lzma/CPP/Windows/Control/PropertyPage.h
new file mode 100644
index 00000000000..4c4ddad9113
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/PropertyPage.h
@@ -0,0 +1,50 @@
+// Windows/Control/PropertyPage.h
+
+#ifndef __WINDOWS_CONTROL_PROPERTYPAGE_H
+#define __WINDOWS_CONTROL_PROPERTYPAGE_H
+
+#include "../../Common/MyWindows.h"
+
+#include <prsht.h>
+
+#include "Dialog.h"
+
+namespace NWindows {
+namespace NControl {
+
+INT_PTR APIENTRY ProperyPageProcedure(HWND dialogHWND, UINT message, WPARAM wParam, LPARAM lParam);
+
+class CPropertyPage: public CDialog
+{
+public:
+ CPropertyPage(HWND window = NULL): CDialog(window){};
+
+ void Changed() { PropSheet_Changed(GetParent(), (HWND)*this); }
+ void UnChanged() { PropSheet_UnChanged(GetParent(), (HWND)*this); }
+
+ virtual bool OnNotify(UINT controlID, LPNMHDR lParam);
+
+ virtual bool OnKillActive() { return false; } // false = OK
+ virtual bool OnKillActive(const PSHNOTIFY *) { return OnKillActive(); }
+ virtual LONG OnSetActive() { return false; } // false = OK
+ virtual LONG OnSetActive(const PSHNOTIFY *) { return OnSetActive(); }
+ virtual LONG OnApply() { return PSNRET_NOERROR; }
+ virtual LONG OnApply(const PSHNOTIFY *) { return OnApply(); }
+ virtual void OnNotifyHelp() {}
+ virtual void OnNotifyHelp(const PSHNOTIFY *) { OnNotifyHelp(); }
+ virtual void OnReset() {}
+ virtual void OnReset(const PSHNOTIFY *) { OnReset(); }
+};
+
+struct CPageInfo
+{
+ CPropertyPage *Page;
+ UString Title;
+ UINT ID;
+};
+
+INT_PTR MyPropertySheet(const CObjectVector<CPageInfo> &pagesInfo, HWND hwndParent, const UString &title);
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/ReBar.h b/3rdparty/lzma/CPP/Windows/Control/ReBar.h
new file mode 100644
index 00000000000..c2d58dbe80d
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/ReBar.h
@@ -0,0 +1,34 @@
+// Windows/Control/ReBar.h
+
+#ifndef __WINDOWS_CONTROL_REBAR_H
+#define __WINDOWS_CONTROL_REBAR_H
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CReBar: public NWindows::CWindow
+{
+public:
+ bool SetBarInfo(LPREBARINFO barInfo)
+ { return LRESULTToBool(SendMsg(RB_SETBARINFO, 0, (LPARAM)barInfo)); }
+ bool InsertBand(int index, LPREBARBANDINFO bandInfo)
+ { return LRESULTToBool(SendMsg(RB_INSERTBAND, index, (LPARAM)bandInfo)); }
+ bool SetBandInfo(unsigned index, LPREBARBANDINFO bandInfo)
+ { return LRESULTToBool(SendMsg(RB_SETBANDINFO, index, (LPARAM)bandInfo)); }
+ void MaximizeBand(unsigned index, bool ideal)
+ { SendMsg(RB_MAXIMIZEBAND, index, BoolToBOOL(ideal)); }
+ bool SizeToRect(LPRECT rect)
+ { return LRESULTToBool(SendMsg(RB_SIZETORECT, 0, (LPARAM)rect)); }
+ UINT GetHeight()
+ { return (UINT)SendMsg(RB_GETBARHEIGHT); }
+ UINT GetBandCount()
+ { return (UINT)SendMsg(RB_GETBANDCOUNT); }
+ bool DeleteBand(UINT index)
+ { return LRESULTToBool(SendMsg(RB_DELETEBAND, index)); }
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/Static.h b/3rdparty/lzma/CPP/Windows/Control/Static.h
new file mode 100644
index 00000000000..5523b2e633e
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/Static.h
@@ -0,0 +1,28 @@
+// Windows/Control/Static.h
+
+#ifndef __WINDOWS_CONTROL_STATIC_H
+#define __WINDOWS_CONTROL_STATIC_H
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CStatic: public CWindow
+{
+public:
+ HANDLE SetImage(WPARAM imageType, HANDLE handle) { return (HANDLE)SendMsg(STM_SETIMAGE, imageType, (LPARAM)handle); }
+ HANDLE GetImage(WPARAM imageType) { return (HANDLE)SendMsg(STM_GETIMAGE, imageType, 0); }
+
+ #ifdef UNDER_CE
+ HICON SetIcon(HICON icon) { return (HICON)SetImage(IMAGE_ICON, icon); }
+ HICON GetIcon() { return (HICON)GetImage(IMAGE_ICON); }
+ #else
+ HICON SetIcon(HICON icon) { return (HICON)SendMsg(STM_SETICON, (WPARAM)icon, 0); }
+ HICON GetIcon() { return (HICON)SendMsg(STM_GETICON, 0, 0); }
+ #endif
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/StatusBar.h b/3rdparty/lzma/CPP/Windows/Control/StatusBar.h
new file mode 100644
index 00000000000..988b84700b4
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/StatusBar.h
@@ -0,0 +1,42 @@
+// Windows/Control/StatusBar.h
+
+#ifndef __WINDOWS_CONTROL_STATUSBAR_H
+#define __WINDOWS_CONTROL_STATUSBAR_H
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CStatusBar: public NWindows::CWindow
+{
+public:
+ bool Create(LONG style, LPCTSTR text, HWND hwndParent, UINT id)
+ { return (_window = ::CreateStatusWindow(style, text, hwndParent, id)) != 0; }
+ bool SetText(LPCTSTR text)
+ { return CWindow::SetText(text); }
+ bool SetText(unsigned index, LPCTSTR text, UINT type)
+ { return LRESULTToBool(SendMsg(SB_SETTEXT, index | type, (LPARAM)text)); }
+ bool SetText(unsigned index, LPCTSTR text)
+ { return SetText(index, text, 0); }
+
+ #ifndef _UNICODE
+ bool Create(LONG style, LPCWSTR text, HWND hwndParent, UINT id)
+ { return (_window = ::CreateStatusWindowW(style, text, hwndParent, id)) != 0; }
+ bool SetText(LPCWSTR text)
+ { return CWindow::SetText(text); }
+ bool SetText(unsigned index, LPCWSTR text, UINT type)
+ { return LRESULTToBool(SendMsg(SB_SETTEXTW, index | type, (LPARAM)text)); }
+ bool SetText(unsigned index, LPCWSTR text)
+ { return SetText(index, text, 0); }
+ #endif
+
+ bool SetParts(unsigned numParts, const int *edgePostions)
+ { return LRESULTToBool(SendMsg(SB_SETPARTS, numParts, (LPARAM)edgePostions)); }
+ void Simple(bool simple)
+ { SendMsg(SB_SIMPLE, BoolToBOOL(simple), 0); }
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/StdAfx.h b/3rdparty/lzma/CPP/Windows/Control/StdAfx.h
new file mode 100644
index 00000000000..1cbd7feaeec
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/StdAfx.h
@@ -0,0 +1,8 @@
+// StdAfx.h
+
+#ifndef __STDAFX_H
+#define __STDAFX_H
+
+#include "../../Common/Common.h"
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/ToolBar.h b/3rdparty/lzma/CPP/Windows/Control/ToolBar.h
new file mode 100644
index 00000000000..7bc93a24170
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/ToolBar.h
@@ -0,0 +1,43 @@
+// Windows/Control/ToolBar.h
+
+#ifndef __WINDOWS_CONTROL_TOOLBAR_H
+#define __WINDOWS_CONTROL_TOOLBAR_H
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CToolBar: public NWindows::CWindow
+{
+public:
+ void AutoSize() { SendMsg(TB_AUTOSIZE, 0, 0); }
+ DWORD GetButtonSize() { return (DWORD)SendMsg(TB_GETBUTTONSIZE, 0, 0); }
+
+ bool GetMaxSize(LPSIZE size)
+ #ifdef UNDER_CE
+ {
+ // maybe it must be fixed for more than 1 buttons
+ DWORD val = GetButtonSize();
+ size->cx = LOWORD(val);
+ size->cy = HIWORD(val);
+ return true;
+ }
+ #else
+ {
+ return LRESULTToBool(SendMsg(TB_GETMAXSIZE, 0, (LPARAM)size));
+ }
+ #endif
+
+ bool EnableButton(UINT buttonID, bool enable) { return LRESULTToBool(SendMsg(TB_ENABLEBUTTON, buttonID, MAKELONG(BoolToBOOL(enable), 0))); }
+ void ButtonStructSize() { SendMsg(TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON)); }
+ HIMAGELIST SetImageList(UINT listIndex, HIMAGELIST imageList) { return HIMAGELIST(SendMsg(TB_SETIMAGELIST, listIndex, (LPARAM)imageList)); }
+ bool AddButton(UINT numButtons, LPTBBUTTON buttons) { return LRESULTToBool(SendMsg(TB_ADDBUTTONS, numButtons, (LPARAM)buttons)); }
+ #ifndef _UNICODE
+ bool AddButtonW(UINT numButtons, LPTBBUTTON buttons) { return LRESULTToBool(SendMsg(TB_ADDBUTTONSW, numButtons, (LPARAM)buttons)); }
+ #endif
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/Trackbar.h b/3rdparty/lzma/CPP/Windows/Control/Trackbar.h
new file mode 100644
index 00000000000..313e0c851b6
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/Trackbar.h
@@ -0,0 +1,27 @@
+// Windows/Control/Trackbar.h
+
+#ifndef __WINDOWS_CONTROL_TRACKBAR_H
+#define __WINDOWS_CONTROL_TRACKBAR_H
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CTrackbar: public CWindow
+{
+public:
+ void SetRange(int minimum, int maximum, bool redraw = true)
+ { SendMsg(TBM_SETRANGE, BoolToBOOL(redraw), MAKELONG(minimum, maximum)); }
+ void SetPos(int pos, bool redraw = true)
+ { SendMsg(TBM_SETPOS, BoolToBOOL(redraw), pos); }
+ void SetTicFreq(int freq)
+ { SendMsg(TBM_SETTICFREQ, freq); }
+
+ int GetPos()
+ { return (int)SendMsg(TBM_GETPOS); }
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Control/Window2.cpp b/3rdparty/lzma/CPP/Windows/Control/Window2.cpp
new file mode 100644
index 00000000000..994d96e080a
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/Window2.cpp
@@ -0,0 +1,200 @@
+// Windows/Control/Window2.cpp
+
+#include "StdAfx.h"
+
+#ifndef _UNICODE
+#include "../../Common/StringConvert.h"
+#endif
+
+#include "Window2.h"
+
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+
+#ifndef _UNICODE
+ATOM MyRegisterClass(CONST WNDCLASSW *wndClass);
+#endif
+
+namespace NControl {
+
+#ifdef UNDER_CE
+#define MY_START_WM_CREATE WM_CREATE
+#else
+#define MY_START_WM_CREATE WM_NCCREATE
+#endif
+
+static LRESULT CALLBACK WindowProcedure(HWND aHWND, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ CWindow tempWindow(aHWND);
+ if (message == MY_START_WM_CREATE)
+ tempWindow.SetUserDataLongPtr((LONG_PTR)(((LPCREATESTRUCT)lParam)->lpCreateParams));
+ CWindow2 *window = (CWindow2 *)(tempWindow.GetUserDataLongPtr());
+ if (window != NULL && message == MY_START_WM_CREATE)
+ window->Attach(aHWND);
+ if (window == 0)
+ {
+ #ifndef _UNICODE
+ if (g_IsNT)
+ return DefWindowProcW(aHWND, message, wParam, lParam);
+ else
+ #endif
+ return DefWindowProc(aHWND, message, wParam, lParam);
+ }
+ return window->OnMessage(message, wParam, lParam);
+}
+
+bool CWindow2::CreateEx(DWORD exStyle, LPCTSTR className, LPCTSTR windowName,
+ DWORD style, int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu, HINSTANCE instance)
+{
+ WNDCLASS wc;
+ if (!::GetClassInfo(instance, className, &wc))
+ {
+ // wc.style = CS_HREDRAW | CS_VREDRAW;
+ wc.style = 0;
+ wc.lpfnWndProc = WindowProcedure;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+ wc.hInstance = instance;
+ wc.hIcon = NULL;
+ wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
+ wc.lpszMenuName = NULL;
+ wc.lpszClassName = className;
+ if (::RegisterClass(&wc) == 0)
+ return false;
+ }
+ return CWindow::CreateEx(exStyle, className, windowName, style,
+ x, y, width, height, parentWindow, idOrHMenu, instance, this);
+}
+
+#ifndef _UNICODE
+
+bool CWindow2::CreateEx(DWORD exStyle, LPCWSTR className, LPCWSTR windowName,
+ DWORD style, int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu, HINSTANCE instance)
+{
+ bool needRegister;
+ if (g_IsNT)
+ {
+ WNDCLASSW wc;
+ needRegister = ::GetClassInfoW(instance, className, &wc) == 0;
+ }
+ else
+ {
+ WNDCLASSA windowClassA;
+ AString classNameA;
+ LPCSTR classNameP;
+ if (IS_INTRESOURCE(className))
+ classNameP = (LPCSTR)className;
+ else
+ {
+ classNameA = GetSystemString(className);
+ classNameP = classNameA;
+ }
+ needRegister = ::GetClassInfoA(instance, classNameP, &windowClassA) == 0;
+ }
+ if (needRegister)
+ {
+ WNDCLASSW wc;
+ // wc.style = CS_HREDRAW | CS_VREDRAW;
+ wc.style = 0;
+ wc.lpfnWndProc = WindowProcedure;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+ wc.hInstance = instance;
+ wc.hIcon = NULL;
+ wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
+ wc.lpszMenuName = NULL;
+ wc.lpszClassName = className;
+ if (MyRegisterClass(&wc) == 0)
+ return false;
+ }
+ return CWindow::CreateEx(exStyle, className, windowName, style,
+ x, y, width, height, parentWindow, idOrHMenu, instance, this);
+}
+
+#endif
+
+LRESULT CWindow2::DefProc(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ #ifndef _UNICODE
+ if (g_IsNT)
+ return DefWindowProcW(_window, message, wParam, lParam);
+ else
+ #endif
+ return DefWindowProc(_window, message, wParam, lParam);
+}
+
+LRESULT CWindow2::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ LRESULT result;
+ switch (message)
+ {
+ case WM_CREATE:
+ if (!OnCreate((CREATESTRUCT *)lParam))
+ return -1;
+ break;
+ case WM_COMMAND:
+ if (OnCommand(wParam, lParam, result))
+ return result;
+ break;
+ case WM_NOTIFY:
+ if (OnNotify((UINT)wParam, (LPNMHDR) lParam, result))
+ return result;
+ break;
+ case WM_DESTROY:
+ OnDestroy();
+ break;
+ case WM_CLOSE:
+ OnClose();
+ return 0;
+ case WM_SIZE:
+ if (OnSize(wParam, LOWORD(lParam), HIWORD(lParam)))
+ return 0;
+ }
+ return DefProc(message, wParam, lParam);
+}
+
+bool CWindow2::OnCommand(WPARAM wParam, LPARAM lParam, LRESULT &result)
+{
+ return OnCommand(HIWORD(wParam), LOWORD(wParam), lParam, result);
+}
+
+bool CWindow2::OnCommand(int /* code */, int /* itemID */, LPARAM /* lParam */, LRESULT & /* result */)
+{
+ return false;
+ // return DefProc(message, wParam, lParam);
+ /*
+ if (code == BN_CLICKED)
+ return OnButtonClicked(itemID, (HWND)lParam);
+ */
+}
+
+/*
+bool CDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
+{
+ switch (buttonID)
+ {
+ case IDOK:
+ OnOK();
+ break;
+ case IDCANCEL:
+ OnCancel();
+ break;
+ case IDHELP:
+ OnHelp();
+ break;
+ default:
+ return false;
+ }
+ return true;
+}
+
+*/
+
+}}
diff --git a/3rdparty/lzma/CPP/Windows/Control/Window2.h b/3rdparty/lzma/CPP/Windows/Control/Window2.h
new file mode 100644
index 00000000000..7ac580cb071
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Control/Window2.h
@@ -0,0 +1,51 @@
+// Windows/Control/Window2.h
+
+#ifndef __WINDOWS_CONTROL_WINDOW2_H
+#define __WINDOWS_CONTROL_WINDOW2_H
+
+#include "../Window.h"
+
+namespace NWindows {
+namespace NControl {
+
+class CWindow2: public CWindow
+{
+ LRESULT DefProc(UINT message, WPARAM wParam, LPARAM lParam);
+public:
+ CWindow2(HWND newWindow = NULL): CWindow(newWindow){};
+ virtual ~CWindow2() {};
+
+ bool CreateEx(DWORD exStyle, LPCTSTR className, LPCTSTR windowName,
+ DWORD style, int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu, HINSTANCE instance);
+
+ #ifndef _UNICODE
+ bool CreateEx(DWORD exStyle, LPCWSTR className, LPCWSTR windowName,
+ DWORD style, int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu, HINSTANCE instance);
+ #endif
+
+ virtual LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
+ virtual bool OnCreate(CREATESTRUCT * /* createStruct */) { return true; }
+ // virtual LRESULT OnCommand(WPARAM wParam, LPARAM lParam);
+ virtual bool OnCommand(WPARAM wParam, LPARAM lParam, LRESULT &result);
+ virtual bool OnCommand(int code, int itemID, LPARAM lParam, LRESULT &result);
+ virtual bool OnSize(WPARAM /* wParam */, int /* xSize */, int /* ySize */) { return false; }
+ virtual bool OnNotify(UINT /* controlID */, LPNMHDR /* lParam */, LRESULT & /* result */) { return false; }
+ virtual void OnDestroy() { PostQuitMessage(0); }
+ virtual void OnClose() { Destroy(); }
+ /*
+ virtual LRESULT OnHelp(LPHELPINFO helpInfo) { OnHelp(); }
+ virtual LRESULT OnHelp() {};
+ virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
+ virtual void OnOK() {};
+ virtual void OnCancel() {};
+ */
+
+ LONG_PTR SetMsgResult(LONG_PTR newLongPtr) { return SetLongPtr(DWLP_MSGRESULT, newLongPtr); }
+ LONG_PTR GetMsgResult() const { return GetLongPtr(DWLP_MSGRESULT); }
+};
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/DLL.cpp b/3rdparty/lzma/CPP/Windows/DLL.cpp
index 81eec692182..a71a8017b87 100644
--- a/3rdparty/lzma/CPP/Windows/DLL.cpp
+++ b/3rdparty/lzma/CPP/Windows/DLL.cpp
@@ -13,7 +13,7 @@ extern HINSTANCE g_hInstance;
namespace NWindows {
namespace NDLL {
-bool CLibrary::Free()
+bool CLibrary::Free() throw()
{
if (_module == 0)
return true;
@@ -23,7 +23,7 @@ bool CLibrary::Free()
return true;
}
-bool CLibrary::LoadEx(CFSTR path, DWORD flags)
+bool CLibrary::LoadEx(CFSTR path, DWORD flags) throw()
{
if (!Free())
return false;
@@ -40,7 +40,7 @@ bool CLibrary::LoadEx(CFSTR path, DWORD flags)
return (_module != NULL);
}
-bool CLibrary::Load(CFSTR path)
+bool CLibrary::Load(CFSTR path) throw()
{
if (!Free())
return false;
@@ -93,11 +93,14 @@ bool MyGetModuleFileName(FString &path)
FString GetModuleDirPrefix()
{
FString s;
- if (NDLL::MyGetModuleFileName(s))
+ if (MyGetModuleFileName(s))
{
- int pos = s.ReverseFind(FCHAR_PATH_SEPARATOR);
+ int pos = s.ReverseFind_PathSepar();
if (pos >= 0)
- return s.Left(pos + 1);
+ {
+ s.DeleteFrom(pos + 1);
+ return s;
+ }
}
return FTEXT(".") FSTRING_PATH_SEPARATOR;
}
diff --git a/3rdparty/lzma/CPP/Windows/DLL.h b/3rdparty/lzma/CPP/Windows/DLL.h
index 9f0f5cd72f6..984a1d33b58 100644
--- a/3rdparty/lzma/CPP/Windows/DLL.h
+++ b/3rdparty/lzma/CPP/Windows/DLL.h
@@ -13,17 +13,23 @@ namespace NDLL {
#else
#define My_GetProcAddress(module, procName) ::GetProcAddress(module, procName)
#endif
-
+
+/* Win32: Don't call CLibrary::Free() and FreeLibrary() from another
+ FreeLibrary() code: detaching code in DLL entry-point or in
+ destructors of global objects in DLL module. */
+
class CLibrary
{
HMODULE _module;
+
+ // CLASS_NO_COPY(CLibrary);
public:
CLibrary(): _module(NULL) {};
~CLibrary() { Free(); }
operator HMODULE() const { return _module; }
HMODULE* operator&() { return &_module; }
- bool IsLoaded() const { return (_module != NULL); };
+ bool IsLoaded() const { return (_module != NULL); }
void Attach(HMODULE m)
{
@@ -37,9 +43,9 @@ public:
return m;
}
- bool Free();
- bool LoadEx(CFSTR path, DWORD flags = LOAD_LIBRARY_AS_DATAFILE);
- bool Load(CFSTR path);
+ bool Free() throw();
+ bool LoadEx(CFSTR path, DWORD flags = LOAD_LIBRARY_AS_DATAFILE) throw();
+ bool Load(CFSTR path) throw();
FARPROC GetProc(LPCSTR procName) const { return My_GetProcAddress(_module, procName); }
};
diff --git a/3rdparty/lzma/CPP/Windows/Error.h b/3rdparty/lzma/CPP/Windows/Error.h
deleted file mode 100644
index b7da3ca5e95..00000000000
--- a/3rdparty/lzma/CPP/Windows/Error.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Windows/Error.h
-
-#ifndef __WINDOWS_ERROR_H
-#define __WINDOWS_ERROR_H
-
-#include "Common/MyString.h"
-
-namespace NWindows {
-namespace NError {
-
-UString MyFormatMessageW(DWORD errorCode);
-
-}}
-
-#endif
diff --git a/3rdparty/lzma/CPP/Windows/Error.cpp b/3rdparty/lzma/CPP/Windows/ErrorMsg.cpp
index c02e3b9e59a..c9de4a6c0a7 100644
--- a/3rdparty/lzma/CPP/Windows/Error.cpp
+++ b/3rdparty/lzma/CPP/Windows/ErrorMsg.cpp
@@ -1,12 +1,13 @@
-// Windows/Error.h
+// Windows/ErrorMsg.h
#include "StdAfx.h"
-#include "Windows/Error.h"
#ifndef _UNICODE
-#include "Common/StringConvert.h"
+#include "../Common/StringConvert.h"
#endif
+#include "ErrorMsg.h"
+
#ifndef _UNICODE
extern bool g_IsNT;
#endif
@@ -39,22 +40,27 @@ static bool MyFormatMessage(DWORD errorCode, UString &message)
return true;
}
-UString MyFormatMessageW(DWORD errorCode)
+UString MyFormatMessage(DWORD errorCode)
{
- UString message;
- if (!MyFormatMessage(errorCode, message))
+ UString m;
+ if (!MyFormatMessage(errorCode, m) || m.IsEmpty())
{
- wchar_t s[16];
+ char s[16];
for (int i = 0; i < 8; i++)
{
- int t = errorCode & 0xF;
+ unsigned t = errorCode & 0xF;
errorCode >>= 4;
- s[7 - i] = (wchar_t)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
+ s[7 - i] = (char)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
}
- s[8] = '\0';
- message = (UString)L"Error #" + s;
+ s[8] = 0;
+ m.AddAscii("Error #");
+ m.AddAscii(s);
}
- return message;
+ else if (m.Len() >= 2
+ && m[m.Len() - 1] == 0x0A
+ && m[m.Len() - 2] == 0x0D)
+ m.DeleteFrom(m.Len() - 2);
+ return m;
}
}}
diff --git a/3rdparty/lzma/CPP/Windows/ErrorMsg.h b/3rdparty/lzma/CPP/Windows/ErrorMsg.h
new file mode 100644
index 00000000000..0957c696ad1
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/ErrorMsg.h
@@ -0,0 +1,15 @@
+// Windows/ErrorMsg.h
+
+#ifndef __WINDOWS_ERROR_MSG_H
+#define __WINDOWS_ERROR_MSG_H
+
+#include "../Common/MyString.h"
+
+namespace NWindows {
+namespace NError {
+
+UString MyFormatMessage(DWORD errorCode);
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/FileDir.cpp b/3rdparty/lzma/CPP/Windows/FileDir.cpp
index 88215faa2ad..da71b710bdc 100644
--- a/3rdparty/lzma/CPP/Windows/FileDir.cpp
+++ b/3rdparty/lzma/CPP/Windows/FileDir.cpp
@@ -14,21 +14,17 @@
extern bool g_IsNT;
#endif
+using namespace NWindows;
+using namespace NFile;
+using namespace NName;
+
namespace NWindows {
namespace NFile {
-
-// SetCurrentDirectory doesn't support \\?\ prefix
-
-#ifdef WIN_LONG_PATH
-bool GetLongPathBase(CFSTR fileName, UString &res);
-bool GetLongPath(CFSTR fileName, UString &res);
-#endif
-
-namespace NDirectory {
+namespace NDir {
#ifndef UNDER_CE
-bool MyGetWindowsDirectory(FString &path)
+bool GetWindowsDir(FString &path)
{
UINT needLength;
#ifndef _UNICODE
@@ -50,8 +46,7 @@ bool MyGetWindowsDirectory(FString &path)
return (needLength > 0 && needLength <= MAX_PATH);
}
-
-bool MyGetSystemDirectory(FString &path)
+bool GetSystemDir(FString &path)
{
UINT needLength;
#ifndef _UNICODE
@@ -74,7 +69,7 @@ bool MyGetSystemDirectory(FString &path)
}
#endif
-bool SetDirTime(CFSTR fileName, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime)
+bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime)
{
#ifndef _UNICODE
if (!g_IsNT)
@@ -83,14 +78,17 @@ bool SetDirTime(CFSTR fileName, const FILETIME *cTime, const FILETIME *aTime, co
return false;
}
#endif
- HANDLE hDir = ::CreateFileW(fs2us(fileName), GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
+
+ HANDLE hDir = INVALID_HANDLE_VALUE;
+ IF_USE_MAIN_PATH
+ hDir = ::CreateFileW(fs2us(path), GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
+ NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
#ifdef WIN_LONG_PATH
- if (hDir == INVALID_HANDLE_VALUE)
+ if (hDir == INVALID_HANDLE_VALUE && USE_SUPER_PATH)
{
- UString longPath;
- if (GetLongPath(fileName, longPath))
- hDir = ::CreateFileW(longPath, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ hDir = ::CreateFileW(superPath, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
}
#endif
@@ -104,87 +102,154 @@ bool SetDirTime(CFSTR fileName, const FILETIME *cTime, const FILETIME *aTime, co
return res;
}
-#ifdef WIN_LONG_PATH
-bool GetLongPaths(CFSTR s1, CFSTR s2, UString &d1, UString &d2)
+bool SetFileAttrib(CFSTR path, DWORD attrib)
{
- if (!GetLongPathBase(s1, d1) ||
- !GetLongPathBase(s2, d2))
- return false;
- if (d1.IsEmpty() && d2.IsEmpty())
- return false;
- if (d1.IsEmpty()) d1 = fs2us(s1);
- if (d2.IsEmpty()) d2 = fs2us(s2);
- return true;
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ if (::SetFileAttributes(fs2fas(path), attrib))
+ return true;
+ }
+ else
+ #endif
+ {
+ IF_USE_MAIN_PATH
+ if (::SetFileAttributesW(fs2us(path), attrib))
+ return true;
+ #ifdef WIN_LONG_PATH
+ if (USE_SUPER_PATH)
+ {
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ return BOOLToBool(::SetFileAttributesW(superPath, attrib));
+ }
+ #endif
+ }
+ return false;
}
-#endif
-bool MySetFileAttributes(CFSTR fileName, DWORD fileAttributes)
+bool RemoveDir(CFSTR path)
{
#ifndef _UNICODE
if (!g_IsNT)
{
- if (::SetFileAttributes(fs2fas(fileName), fileAttributes))
+ if (::RemoveDirectory(fs2fas(path)))
return true;
}
else
#endif
{
- if (::SetFileAttributesW(fs2us(fileName), fileAttributes))
- return true;
+ IF_USE_MAIN_PATH
+ if (::RemoveDirectoryW(fs2us(path)))
+ return true;
#ifdef WIN_LONG_PATH
- UString longPath;
- if (GetLongPath(fileName, longPath))
- return BOOLToBool(::SetFileAttributesW(longPath, fileAttributes));
+ if (USE_SUPER_PATH)
+ {
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ return BOOLToBool(::RemoveDirectoryW(superPath));
+ }
#endif
}
return false;
}
-bool MyRemoveDirectory(CFSTR path)
+bool MyMoveFile(CFSTR oldFile, CFSTR newFile)
{
#ifndef _UNICODE
if (!g_IsNT)
{
- if (::RemoveDirectory(fs2fas(path)))
+ if (::MoveFile(fs2fas(oldFile), fs2fas(newFile)))
return true;
}
else
#endif
{
- if (::RemoveDirectoryW(fs2us(path)))
- return true;
+ IF_USE_MAIN_PATH_2(oldFile, newFile)
+ if (::MoveFileW(fs2us(oldFile), fs2us(newFile)))
+ return true;
#ifdef WIN_LONG_PATH
- UString longPath;
- if (GetLongPath(path, longPath))
- return BOOLToBool(::RemoveDirectoryW(longPath));
+ if (USE_SUPER_PATH_2)
+ {
+ UString d1, d2;
+ if (GetSuperPaths(oldFile, newFile, d1, d2, USE_MAIN_PATH_2))
+ return BOOLToBool(::MoveFileW(d1, d2));
+ }
#endif
}
return false;
}
-bool MyMoveFile(CFSTR existFileName, CFSTR newFileName)
+#ifndef UNDER_CE
+
+EXTERN_C_BEGIN
+typedef BOOL (WINAPI *Func_CreateHardLinkW)(
+ LPCWSTR lpFileName,
+ LPCWSTR lpExistingFileName,
+ LPSECURITY_ATTRIBUTES lpSecurityAttributes
+ );
+EXTERN_C_END
+
+bool MyCreateHardLink(CFSTR newFileName, CFSTR existFileName)
{
#ifndef _UNICODE
if (!g_IsNT)
{
- if (::MoveFile(fs2fas(existFileName), fs2fas(newFileName)))
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return false;
+ /*
+ if (::CreateHardLink(fs2fas(newFileName), fs2fas(existFileName), NULL))
return true;
+ */
}
else
#endif
{
- if (::MoveFileW(fs2us(existFileName), fs2us(newFileName)))
- return true;
+ Func_CreateHardLinkW my_CreateHardLinkW = (Func_CreateHardLinkW)
+ ::GetProcAddress(::GetModuleHandleW(L"kernel32.dll"), "CreateHardLinkW");
+ if (!my_CreateHardLinkW)
+ return false;
+ IF_USE_MAIN_PATH_2(newFileName, existFileName)
+ if (my_CreateHardLinkW(fs2us(newFileName), fs2us(existFileName), NULL))
+ return true;
#ifdef WIN_LONG_PATH
- UString d1, d2;
- if (GetLongPaths(existFileName, newFileName, d1, d2))
- return BOOLToBool(::MoveFileW(d1, d2));
+ if (USE_SUPER_PATH_2)
+ {
+ UString d1, d2;
+ if (GetSuperPaths(newFileName, existFileName, d1, d2, USE_MAIN_PATH_2))
+ return BOOLToBool(my_CreateHardLinkW(d1, d2, NULL));
+ }
#endif
}
return false;
}
-bool MyCreateDirectory(CFSTR path)
+#endif
+
+/*
+WinXP-64 CreateDir():
+ "" - ERROR_PATH_NOT_FOUND
+ \ - ERROR_ACCESS_DENIED
+ C:\ - ERROR_ACCESS_DENIED, if there is such drive,
+
+ D:\folder - ERROR_PATH_NOT_FOUND, if there is no such drive,
+ C:\nonExistent\folder - ERROR_PATH_NOT_FOUND
+
+ C:\existFolder - ERROR_ALREADY_EXISTS
+ C:\existFolder\ - ERROR_ALREADY_EXISTS
+
+ C:\folder - OK
+ C:\folder\ - OK
+
+ \\Server\nonExistent - ERROR_BAD_NETPATH
+ \\Server\Share_Readonly - ERROR_ACCESS_DENIED
+ \\Server\Share - ERROR_ALREADY_EXISTS
+
+ \\Server\Share_NTFS_drive - ERROR_ACCESS_DENIED
+ \\Server\Share_FAT_drive - ERROR_ALREADY_EXISTS
+*/
+
+bool CreateDir(CFSTR path)
{
#ifndef _UNICODE
if (!g_IsNT)
@@ -195,200 +260,241 @@ bool MyCreateDirectory(CFSTR path)
else
#endif
{
- if (::CreateDirectoryW(fs2us(path), NULL))
- return true;
+ IF_USE_MAIN_PATH
+ if (::CreateDirectoryW(fs2us(path), NULL))
+ return true;
#ifdef WIN_LONG_PATH
- if (::GetLastError() != ERROR_ALREADY_EXISTS)
+ if ((!USE_MAIN_PATH || ::GetLastError() != ERROR_ALREADY_EXISTS) && USE_SUPER_PATH)
{
- UString longPath;
- if (GetLongPath(path, longPath))
- return BOOLToBool(::CreateDirectoryW(longPath, NULL));
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ return BOOLToBool(::CreateDirectoryW(superPath, NULL));
}
#endif
}
return false;
}
-bool CreateComplexDirectory(CFSTR _aPathName)
+/*
+ CreateDir2 returns true, if directory can contain files after the call (two cases):
+ 1) the directory already exists
+ 2) the directory was created
+ path must be WITHOUT trailing path separator.
+
+ We need CreateDir2, since fileInfo.Find() for reserved names like "com8"
+ returns FILE instead of DIRECTORY. And we need to use SuperPath */
+
+static bool CreateDir2(CFSTR path)
+{
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ if (::CreateDirectory(fs2fas(path), NULL))
+ return true;
+ }
+ else
+ #endif
+ {
+ IF_USE_MAIN_PATH
+ if (::CreateDirectoryW(fs2us(path), NULL))
+ return true;
+ #ifdef WIN_LONG_PATH
+ if ((!USE_MAIN_PATH || ::GetLastError() != ERROR_ALREADY_EXISTS) && USE_SUPER_PATH)
+ {
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ {
+ if (::CreateDirectoryW(superPath, NULL))
+ return true;
+ if (::GetLastError() != ERROR_ALREADY_EXISTS)
+ return false;
+ NFind::CFileInfo fi;
+ if (!fi.Find(us2fs(superPath)))
+ return false;
+ return fi.IsDir();
+ }
+ }
+ #endif
+ }
+ if (::GetLastError() != ERROR_ALREADY_EXISTS)
+ return false;
+ NFind::CFileInfo fi;
+ if (!fi.Find(path))
+ return false;
+ return fi.IsDir();
+}
+
+bool CreateComplexDir(CFSTR _path)
{
- FString pathName = _aPathName;
- int pos = pathName.ReverseFind(FCHAR_PATH_SEPARATOR);
- if (pos > 0 && pos == pathName.Length() - 1)
+ #ifdef _WIN32
+
{
- if (pathName.Length() == 3 && pathName[1] == L':')
- return true; // Disk folder;
- pathName.Delete(pos);
+ DWORD attrib = NFind::GetFileAttrib(_path);
+ if (attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_DIRECTORY) != 0)
+ return true;
}
- FString pathName2 = pathName;
- pos = pathName.Length();
+
+ #ifndef UNDER_CE
+
+ if (IsDriveRootPath_SuperAllowed(_path))
+ return false;
+
+ unsigned prefixSize = GetRootPrefixSize(_path);
+
+ #endif
+
+ #endif
+
+ FString path = _path;
+
+ int pos = path.ReverseFind_PathSepar();
+ if (pos >= 0 && (unsigned)pos == path.Len() - 1)
+ {
+ if (path.Len() == 1)
+ return true;
+ path.DeleteBack();
+ }
+
+ const FString path2 = path;
+ pos = path.Len();
+
for (;;)
{
- if (MyCreateDirectory(pathName))
+ if (CreateDir2(path))
break;
if (::GetLastError() == ERROR_ALREADY_EXISTS)
- {
- NFind::CFileInfo fileInfo;
- if (!fileInfo.Find(pathName)) // For network folders
- return true;
- if (!fileInfo.IsDir())
- return false;
- break;
- }
- pos = pathName.ReverseFind(FCHAR_PATH_SEPARATOR);
+ return false;
+ pos = path.ReverseFind_PathSepar();
if (pos < 0 || pos == 0)
return false;
- if (pathName[pos - 1] == L':')
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (pos == 1 && IS_PATH_SEPAR(path[0]))
+ return false;
+ if (prefixSize >= (unsigned)pos + 1)
return false;
- pathName = pathName.Left(pos);
+ #endif
+
+ path.DeleteFrom(pos);
}
- pathName = pathName2;
- while (pos < pathName.Length())
+
+ while (pos < (int)path2.Len())
{
- pos = pathName.Find(FCHAR_PATH_SEPARATOR, pos + 1);
- if (pos < 0)
- pos = pathName.Length();
- if (!MyCreateDirectory(pathName.Left(pos)))
+ int pos2 = NName::FindSepar(path2.Ptr(pos + 1));
+ if (pos2 < 0)
+ pos = path2.Len();
+ else
+ pos += 1 + pos2;
+ path.SetFrom(path2, pos);
+ if (!CreateDir(path))
return false;
}
+
return true;
}
-bool DeleteFileAlways(CFSTR name)
+bool DeleteFileAlways(CFSTR path)
{
- if (!MySetFileAttributes(name, 0))
- return false;
+ /* If alt stream, we also need to clear READ-ONLY attribute of main file before delete.
+ SetFileAttrib("name:stream", ) changes attributes of main file. */
+ {
+ DWORD attrib = NFind::GetFileAttrib(path);
+ if (attrib != INVALID_FILE_ATTRIBUTES
+ && (attrib & FILE_ATTRIBUTE_DIRECTORY) == 0
+ && (attrib & FILE_ATTRIBUTE_READONLY) != 0)
+ {
+ if (!SetFileAttrib(path, attrib & ~FILE_ATTRIBUTE_READONLY))
+ return false;
+ }
+ }
+
#ifndef _UNICODE
if (!g_IsNT)
{
- if (::DeleteFile(fs2fas(name)))
+ if (::DeleteFile(fs2fas(path)))
return true;
}
else
#endif
{
- if (::DeleteFileW(fs2us(name)))
- return true;
+ /* DeleteFile("name::$DATA") deletes all alt streams (same as delete DeleteFile("name")).
+ Maybe it's better to open "name::$DATA" and clear data for unnamed stream? */
+ IF_USE_MAIN_PATH
+ if (::DeleteFileW(fs2us(path)))
+ return true;
#ifdef WIN_LONG_PATH
- UString longPath;
- if (GetLongPath(name, longPath))
- return BOOLToBool(::DeleteFileW(longPath));
+ if (USE_SUPER_PATH)
+ {
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ return BOOLToBool(::DeleteFileW(superPath));
+ }
#endif
}
return false;
}
-static bool RemoveDirectorySubItems2(const FString pathPrefix, const NFind::CFileInfo &fileInfo)
-{
- if (fileInfo.IsDir())
- return RemoveDirectoryWithSubItems(pathPrefix + fileInfo.Name);
- return DeleteFileAlways(pathPrefix + fileInfo.Name);
-}
-bool RemoveDirectoryWithSubItems(const FString &path)
+bool RemoveDirWithSubItems(const FString &path)
{
- NFind::CFileInfo fileInfo;
- FString pathPrefix = path + FCHAR_PATH_SEPARATOR;
+ bool needRemoveSubItems = true;
{
- NFind::CEnumerator enumerator(pathPrefix + FCHAR_ANY_MASK);
- while (enumerator.Next(fileInfo))
- if (!RemoveDirectorySubItems2(pathPrefix, fileInfo))
+ NFind::CFileInfo fi;
+ if (!fi.Find(path))
+ return false;
+ if (!fi.IsDir())
+ {
+ ::SetLastError(ERROR_DIRECTORY);
+ return false;
+ }
+ if (fi.HasReparsePoint())
+ needRemoveSubItems = false;
+ }
+
+ if (needRemoveSubItems)
+ {
+ FString s = path;
+ s.Add_PathSepar();
+ unsigned prefixSize = s.Len();
+ s += FCHAR_ANY_MASK;
+ NFind::CEnumerator enumerator(s);
+ NFind::CFileInfo fi;
+ while (enumerator.Next(fi))
+ {
+ s.DeleteFrom(prefixSize);
+ s += fi.Name;
+ if (fi.IsDir())
+ {
+ if (!RemoveDirWithSubItems(s))
+ return false;
+ }
+ else if (!DeleteFileAlways(s))
return false;
+ }
}
- if (!MySetFileAttributes(path, 0))
+
+ if (!SetFileAttrib(path, 0))
return false;
- return MyRemoveDirectory(path);
+ return RemoveDir(path);
}
#ifdef UNDER_CE
-bool MyGetFullPathName(CFSTR fileName, FString &resFullPath)
+bool MyGetFullPathName(CFSTR path, FString &resFullPath)
{
- resFullPath = fileName;
+ resFullPath = path;
return true;
}
#else
-#ifdef WIN_LONG_PATH
-
-static FString GetLastPart(CFSTR path)
-{
- int i = MyStringLen(path);
- for (; i > 0; i--)
- {
- FChar c = path[i - 1];
- if (c == FCHAR_PATH_SEPARATOR || c == '/')
- break;
- }
- return path + i;
-}
-
-static void AddTrailingDots(CFSTR oldPath, FString &newPath)
+bool MyGetFullPathName(CFSTR path, FString &resFullPath)
{
- int len = MyStringLen(oldPath);
- int i;
- for (i = len; i > 0 && oldPath[i - 1] == '.'; i--);
- if (i == 0 || i == len)
- return;
- FString oldName = GetLastPart(oldPath);
- FString newName = GetLastPart(newPath);
- int nonDotsLen = oldName.Length() - (len - i);
- if (nonDotsLen == 0 || newName.CompareNoCase(oldName.Left(nonDotsLen)) != 0)
- return;
- for (; i != len; i++)
- newPath += '.';
-}
-
-#endif
-
-bool MyGetFullPathName(CFSTR fileName, FString &resFullPath)
-{
- resFullPath.Empty();
- #ifndef _UNICODE
- if (!g_IsNT)
- {
- TCHAR s[MAX_PATH + 2];
- s[0] = 0;
- LPTSTR fileNamePointer = 0;
- DWORD needLength = ::GetFullPathName(fs2fas(fileName), MAX_PATH + 1, s, &fileNamePointer);
- if (needLength == 0 || needLength > MAX_PATH)
- return false;
- resFullPath = fas2fs(s);
- return true;
- }
- else
- #endif
- {
- LPWSTR fileNamePointer = 0;
- WCHAR s[MAX_PATH + 2];
- s[0] = 0;
- DWORD needLength = ::GetFullPathNameW(fs2us(fileName), MAX_PATH + 1, s, &fileNamePointer);
- if (needLength == 0)
- return false;
- if (needLength <= MAX_PATH)
- {
- resFullPath = us2fs(s);
- return true;
- }
- #ifdef WIN_LONG_PATH
- needLength++;
- UString temp;
- LPWSTR buffer = temp.GetBuffer(needLength + 1);
- buffer[0] = 0;
- DWORD needLength2 = ::GetFullPathNameW(fs2us(fileName), needLength, buffer, &fileNamePointer);
- temp.ReleaseBuffer();
- if (needLength2 > 0 && needLength2 <= needLength)
- {
- resFullPath = us2fs(temp);
- AddTrailingDots(fileName, resFullPath);
- return true;
- }
- #endif
- return false;
- }
+ return GetFullPath(path, resFullPath);
}
-bool MySetCurrentDirectory(CFSTR path)
+bool SetCurrentDir(CFSTR path)
{
+ // SetCurrentDirectory doesn't support \\?\ prefix
#ifndef _UNICODE
if (!g_IsNT)
{
@@ -401,7 +507,7 @@ bool MySetCurrentDirectory(CFSTR path)
}
}
-bool MyGetCurrentDirectory(FString &path)
+bool GetCurrentDir(FString &path)
{
path.Empty();
DWORD needLength;
@@ -428,15 +534,12 @@ bool MyGetCurrentDirectory(FString &path)
bool GetFullPathAndSplit(CFSTR path, FString &resDirPrefix, FString &resFileName)
{
- bool res = MyGetFullPathName(path, resFileName);
+ bool res = MyGetFullPathName(path, resDirPrefix);
if (!res)
- resFileName = path;
- int pos = resFileName.ReverseFind(FCHAR_PATH_SEPARATOR);
- if (pos >= 0)
- {
- resDirPrefix = resFileName.Left(pos + 1);
- resFileName = resFileName.Mid(pos + 1);
- }
+ resDirPrefix = path;
+ int pos = resDirPrefix.ReverseFind_PathSepar();
+ resFileName = resDirPrefix.Ptr(pos + 1);
+ resDirPrefix.DeleteFrom(pos + 1);
return res;
}
@@ -484,7 +587,7 @@ static bool CreateTempFile(CFSTR prefix, bool addRandom, FString &path, NIO::COu
{
unsigned t = value & 0xF;
value >>= 4;
- s[k] = (char)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
+ s[k] = (FChar)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
}
s[k] = '\0';
if (outFile)
@@ -510,7 +613,7 @@ static bool CreateTempFile(CFSTR prefix, bool addRandom, FString &path, NIO::COu
}
else
{
- if (MyCreateDirectory(path))
+ if (CreateDir(path))
return true;
}
DWORD error = GetLastError();
@@ -580,7 +683,7 @@ bool CTempDir::Remove()
{
if (!_mustBeDeleted)
return true;
- _mustBeDeleted = !RemoveDirectoryWithSubItems(_path);
+ _mustBeDeleted = !RemoveDirWithSubItems(_path);
return !_mustBeDeleted;
}
diff --git a/3rdparty/lzma/CPP/Windows/FileDir.h b/3rdparty/lzma/CPP/Windows/FileDir.h
index e43c19bd8a6..b13d1ccada2 100644
--- a/3rdparty/lzma/CPP/Windows/FileDir.h
+++ b/3rdparty/lzma/CPP/Windows/FileDir.h
@@ -4,27 +4,36 @@
#define __WINDOWS_FILE_DIR_H
#include "../Common/MyString.h"
+
#include "FileIO.h"
namespace NWindows {
namespace NFile {
-namespace NDirectory {
+namespace NDir {
+
+bool GetWindowsDir(FString &path);
+bool GetSystemDir(FString &path);
+
+bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime);
+bool SetFileAttrib(CFSTR path, DWORD attrib);
+bool MyMoveFile(CFSTR existFileName, CFSTR newFileName);
-#ifdef WIN_LONG_PATH
-bool GetLongPaths(CFSTR s1, CFSTR s2, UString &d1, UString &d2);
+#ifndef UNDER_CE
+bool MyCreateHardLink(CFSTR newFileName, CFSTR existFileName);
#endif
-bool MyGetWindowsDirectory(FString &path);
-bool MyGetSystemDirectory(FString &path);
+bool RemoveDir(CFSTR path);
+bool CreateDir(CFSTR path);
+
+/* CreateComplexDir returns true, if directory can contain files after the call (two cases):
+ 1) the directory already exists (network shares and drive paths are supported)
+ 2) the directory was created
+ path can be WITH or WITHOUT trailing path separator. */
+
+bool CreateComplexDir(CFSTR path);
-bool SetDirTime(CFSTR fileName, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime);
-bool MySetFileAttributes(CFSTR fileName, DWORD fileAttributes);
-bool MyMoveFile(CFSTR existFileName, CFSTR newFileName);
-bool MyRemoveDirectory(CFSTR path);
-bool MyCreateDirectory(CFSTR path);
-bool CreateComplexDirectory(CFSTR path);
bool DeleteFileAlways(CFSTR name);
-bool RemoveDirectoryWithSubItems(const FString &path);
+bool RemoveDirWithSubItems(const FString &path);
bool MyGetFullPathName(CFSTR path, FString &resFullPath);
bool GetFullPathAndSplit(CFSTR path, FString &resDirPrefix, FString &resFileName);
@@ -32,8 +41,8 @@ bool GetOnlyDirPrefix(CFSTR path, FString &resDirPrefix);
#ifndef UNDER_CE
-bool MySetCurrentDirectory(CFSTR path);
-bool MyGetCurrentDirectory(FString &resultPath);
+bool SetCurrentDir(CFSTR path);
+bool GetCurrentDir(FString &resultPath);
#endif
@@ -67,6 +76,29 @@ public:
bool Remove();
};
+#if !defined(UNDER_CE)
+class CCurrentDirRestorer
+{
+ FString _path;
+public:
+ bool NeedRestore;
+
+ CCurrentDirRestorer(): NeedRestore(true)
+ {
+ GetCurrentDir(_path);
+ }
+ ~CCurrentDirRestorer()
+ {
+ if (!NeedRestore)
+ return;
+ FString s;
+ if (GetCurrentDir(s))
+ if (s != _path)
+ SetCurrentDir(_path);
+ }
+};
+#endif
+
}}}
#endif
diff --git a/3rdparty/lzma/CPP/Windows/FileFind.cpp b/3rdparty/lzma/CPP/Windows/FileFind.cpp
index 081bd9bc51d..94486977acd 100644
--- a/3rdparty/lzma/CPP/Windows/FileFind.cpp
+++ b/3rdparty/lzma/CPP/Windows/FileFind.cpp
@@ -2,36 +2,66 @@
#include "StdAfx.h"
-#include "FileFind.h"
-#include "FileIO.h"
#ifndef _UNICODE
#include "../Common/StringConvert.h"
#endif
+#include "FileFind.h"
+#include "FileIO.h"
+#include "FileName.h"
+
#ifndef _UNICODE
extern bool g_IsNT;
#endif
+using namespace NWindows;
+using namespace NFile;
+using namespace NName;
+
+#if defined(_WIN32) && !defined(UNDER_CE)
+
+EXTERN_C_BEGIN
+
+typedef enum
+{
+ My_FindStreamInfoStandard,
+ My_FindStreamInfoMaxInfoLevel
+} MY_STREAM_INFO_LEVELS;
+
+typedef struct
+{
+ LARGE_INTEGER StreamSize;
+ WCHAR cStreamName[MAX_PATH + 36];
+} MY_WIN32_FIND_STREAM_DATA, *MY_PWIN32_FIND_STREAM_DATA;
+
+typedef WINBASEAPI HANDLE (WINAPI *FindFirstStreamW_Ptr)(LPCWSTR fileName, MY_STREAM_INFO_LEVELS infoLevel,
+ LPVOID findStreamData, DWORD flags);
+
+typedef WINBASEAPI BOOL (APIENTRY *FindNextStreamW_Ptr)(HANDLE findStream, LPVOID findStreamData);
+
+EXTERN_C_END
+
+#endif
+
namespace NWindows {
namespace NFile {
#ifdef SUPPORT_DEVICE_FILE
-bool IsDeviceName(CFSTR n);
-#endif
-
-#if defined(WIN_LONG_PATH)
-bool GetLongPath(CFSTR fileName, UString &res);
+namespace NSystem
+{
+bool MyGetDiskFreeSpace(CFSTR rootPath, UInt64 &clusterSize, UInt64 &totalSize, UInt64 &freeSize);
+}
#endif
namespace NFind {
-bool CFileInfo::IsDots() const
+bool CFileInfo::IsDots() const throw()
{
if (!IsDir() || Name.IsEmpty())
return false;
- if (Name[0] != FTEXT('.'))
+ if (Name[0] != '.')
return false;
- return Name.Length() == 1 || (Name.Length() == 2 && Name[1] == FTEXT('.'));
+ return Name.Len() == 1 || (Name.Len() == 2 && Name[1] == '.');
}
#define WIN_FD_TO_MY_FI(fi, fd) \
@@ -40,6 +70,7 @@ bool CFileInfo::IsDots() const
fi.ATime = fd.ftLastAccessTime; \
fi.MTime = fd.ftLastWriteTime; \
fi.Size = (((UInt64)fd.nFileSizeHigh) << 32) + fd.nFileSizeLow; \
+ fi.IsAltStream = false; \
fi.IsDevice = false;
/*
@@ -50,27 +81,31 @@ bool CFileInfo::IsDots() const
#endif
*/
-static void ConvertWIN32_FIND_DATA_To_FileInfo(const WIN32_FIND_DATAW &fd, CFileInfo &fi)
+static void Convert_WIN32_FIND_DATA_to_FileInfo(const WIN32_FIND_DATAW &fd, CFileInfo &fi)
{
WIN_FD_TO_MY_FI(fi, fd);
fi.Name = us2fs(fd.cFileName);
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ // fi.ShortName = us2fs(fd.cAlternateFileName);
+ #endif
}
#ifndef _UNICODE
-static inline UINT GetCurrentCodePage() { return ::AreFileApisANSI() ? CP_ACP : CP_OEMCP; }
-
-static void ConvertWIN32_FIND_DATA_To_FileInfo(const WIN32_FIND_DATA &fd, CFileInfo &fi)
+static void Convert_WIN32_FIND_DATA_to_FileInfo(const WIN32_FIND_DATA &fd, CFileInfo &fi)
{
WIN_FD_TO_MY_FI(fi, fd);
fi.Name = fas2fs(fd.cFileName);
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ // fi.ShortName = fas2fs(fd.cAlternateFileName);
+ #endif
}
#endif
////////////////////////////////
// CFindFile
-bool CFindFile::Close()
+bool CFindFileBase::Close() throw()
{
if (_handle == INVALID_HANDLE_VALUE)
return true;
@@ -80,7 +115,35 @@ bool CFindFile::Close()
return true;
}
-bool CFindFile::FindFirst(CFSTR wildcard, CFileInfo &fi)
+/*
+WinXP-64 FindFirstFile():
+ "" - ERROR_PATH_NOT_FOUND
+ folder\ - ERROR_FILE_NOT_FOUND
+ \ - ERROR_FILE_NOT_FOUND
+ c:\ - ERROR_FILE_NOT_FOUND
+ c: - ERROR_FILE_NOT_FOUND, if current dir is ROOT ( c:\ )
+ c: - OK, if current dir is NOT ROOT ( c:\folder )
+ folder - OK
+
+ \\ - ERROR_INVALID_NAME
+ \\Server - ERROR_INVALID_NAME
+ \\Server\ - ERROR_INVALID_NAME
+
+ \\Server\Share - ERROR_BAD_NETPATH
+ \\Server\Share - ERROR_BAD_NET_NAME (Win7)
+ \\Server\Share\ - ERROR_FILE_NOT_FOUND
+
+ \\?\UNC\Server\Share - ERROR_INVALID_NAME
+ \\?\UNC\Server\Share - ERROR_BAD_PATHNAME (Win7)
+ \\?\UNC\Server\Share\ - ERROR_FILE_NOT_FOUND
+
+ \\Server\Share_RootDrive - ERROR_INVALID_NAME
+ \\Server\Share_RootDrive\ - ERROR_INVALID_NAME
+
+ c:\* - ERROR_FILE_NOT_FOUND, if thare are no item in that folder
+*/
+
+bool CFindFile::FindFirst(CFSTR path, CFileInfo &fi)
{
if (!Close())
return false;
@@ -88,27 +151,29 @@ bool CFindFile::FindFirst(CFSTR wildcard, CFileInfo &fi)
if (!g_IsNT)
{
WIN32_FIND_DATAA fd;
- _handle = ::FindFirstFileA(fs2fas(wildcard), &fd);
+ _handle = ::FindFirstFileA(fs2fas(path), &fd);
if (_handle == INVALID_HANDLE_VALUE)
return false;
- ConvertWIN32_FIND_DATA_To_FileInfo(fd, fi);
+ Convert_WIN32_FIND_DATA_to_FileInfo(fd, fi);
}
else
#endif
{
WIN32_FIND_DATAW fd;
- _handle = ::FindFirstFileW(fs2us(wildcard), &fd);
+
+ IF_USE_MAIN_PATH
+ _handle = ::FindFirstFileW(fs2us(path), &fd);
#ifdef WIN_LONG_PATH
- if (_handle == INVALID_HANDLE_VALUE)
+ if (_handle == INVALID_HANDLE_VALUE && USE_SUPER_PATH)
{
- UString longPath;
- if (GetLongPath(wildcard, longPath))
- _handle = ::FindFirstFileW(longPath, &fd);
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ _handle = ::FindFirstFileW(superPath, &fd);
}
#endif
if (_handle == INVALID_HANDLE_VALUE)
return false;
- ConvertWIN32_FIND_DATA_To_FileInfo(fd, fi);
+ Convert_WIN32_FIND_DATA_to_FileInfo(fd, fi);
}
return true;
}
@@ -121,7 +186,7 @@ bool CFindFile::FindNext(CFileInfo &fi)
WIN32_FIND_DATAA fd;
if (!::FindNextFileA(_handle, &fd))
return false;
- ConvertWIN32_FIND_DATA_To_FileInfo(fd, fi);
+ Convert_WIN32_FIND_DATA_to_FileInfo(fd, fi);
}
else
#endif
@@ -129,72 +194,395 @@ bool CFindFile::FindNext(CFileInfo &fi)
WIN32_FIND_DATAW fd;
if (!::FindNextFileW(_handle, &fd))
return false;
- ConvertWIN32_FIND_DATA_To_FileInfo(fd, fi);
+ Convert_WIN32_FIND_DATA_to_FileInfo(fd, fi);
}
return true;
}
+#if defined(_WIN32) && !defined(UNDER_CE)
+
+////////////////////////////////
+// AltStreams
+
+static FindFirstStreamW_Ptr g_FindFirstStreamW;
+static FindNextStreamW_Ptr g_FindNextStreamW;
+
+struct CFindStreamLoader
+{
+ CFindStreamLoader()
+ {
+ g_FindFirstStreamW = (FindFirstStreamW_Ptr)::GetProcAddress(::GetModuleHandleA("kernel32.dll"), "FindFirstStreamW");
+ g_FindNextStreamW = (FindNextStreamW_Ptr)::GetProcAddress(::GetModuleHandleA("kernel32.dll"), "FindNextStreamW");
+ }
+} g_FindStreamLoader;
+
+bool CStreamInfo::IsMainStream() const throw()
+{
+ return StringsAreEqualNoCase_Ascii(Name, "::$DATA");
+};
+
+UString CStreamInfo::GetReducedName() const
+{
+ // remove ":$DATA" postfix, but keep postfix, if Name is "::$DATA"
+ UString s = Name;
+ if (s.Len() > 6 + 1 && StringsAreEqualNoCase_Ascii(s.RightPtr(6), ":$DATA"))
+ s.DeleteFrom(s.Len() - 6);
+ return s;
+}
+
+/*
+UString CStreamInfo::GetReducedName2() const
+{
+ UString s = GetReducedName();
+ if (!s.IsEmpty() && s[0] == ':')
+ s.Delete(0);
+ return s;
+}
+*/
+
+static void Convert_WIN32_FIND_STREAM_DATA_to_StreamInfo(const MY_WIN32_FIND_STREAM_DATA &sd, CStreamInfo &si)
+{
+ si.Size = sd.StreamSize.QuadPart;
+ si.Name = sd.cStreamName;
+}
+
+/*
+ WinXP-64 FindFirstStream():
+ "" - ERROR_PATH_NOT_FOUND
+ folder\ - OK
+ folder - OK
+ \ - OK
+ c:\ - OK
+ c: - OK, if current dir is ROOT ( c:\ )
+ c: - OK, if current dir is NOT ROOT ( c:\folder )
+ \\Server\Share - OK
+ \\Server\Share\ - OK
+
+ \\ - ERROR_INVALID_NAME
+ \\Server - ERROR_INVALID_NAME
+ \\Server\ - ERROR_INVALID_NAME
+*/
+
+bool CFindStream::FindFirst(CFSTR path, CStreamInfo &si)
+{
+ if (!Close())
+ return false;
+ if (!g_FindFirstStreamW)
+ {
+ ::SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return false;
+ }
+ {
+ MY_WIN32_FIND_STREAM_DATA sd;
+ SetLastError(0);
+ IF_USE_MAIN_PATH
+ _handle = g_FindFirstStreamW(fs2us(path), My_FindStreamInfoStandard, &sd, 0);
+ if (_handle == INVALID_HANDLE_VALUE)
+ {
+ if (::GetLastError() == ERROR_HANDLE_EOF)
+ return false;
+ // long name can be tricky for path like ".\dirName".
+ #ifdef WIN_LONG_PATH
+ if (USE_SUPER_PATH)
+ {
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ _handle = g_FindFirstStreamW(superPath, My_FindStreamInfoStandard, &sd, 0);
+ }
+ #endif
+ }
+ if (_handle == INVALID_HANDLE_VALUE)
+ return false;
+ Convert_WIN32_FIND_STREAM_DATA_to_StreamInfo(sd, si);
+ }
+ return true;
+}
+
+bool CFindStream::FindNext(CStreamInfo &si)
+{
+ if (!g_FindNextStreamW)
+ {
+ ::SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return false;
+ }
+ {
+ MY_WIN32_FIND_STREAM_DATA sd;
+ if (!g_FindNextStreamW(_handle, &sd))
+ return false;
+ Convert_WIN32_FIND_STREAM_DATA_to_StreamInfo(sd, si);
+ }
+ return true;
+}
+
+bool CStreamEnumerator::Next(CStreamInfo &si, bool &found)
+{
+ bool res;
+ if (_find.IsHandleAllocated())
+ res = _find.FindNext(si);
+ else
+ res = _find.FindFirst(_filePath, si);
+ if (res)
+ {
+ found = true;
+ return true;
+ }
+ found = false;
+ return (::GetLastError() == ERROR_HANDLE_EOF);
+}
+
+#endif
+
+
#define MY_CLEAR_FILETIME(ft) ft.dwLowDateTime = ft.dwHighDateTime = 0;
-void CFileInfoBase::Clear()
+void CFileInfoBase::ClearBase() throw()
{
Size = 0;
MY_CLEAR_FILETIME(CTime);
MY_CLEAR_FILETIME(ATime);
MY_CLEAR_FILETIME(MTime);
Attrib = 0;
+ IsAltStream = false;
+ IsDevice = false;
}
-
-bool CFileInfo::Find(CFSTR wildcard)
+
+/*
+WinXP-64 GetFileAttributes():
+ If the function fails, it returns INVALID_FILE_ATTRIBUTES and use GetLastError() to get error code
+
+ \ - OK
+ C:\ - OK, if there is such drive,
+ D:\ - ERROR_PATH_NOT_FOUND, if there is no such drive,
+
+ C:\folder - OK
+ C:\folder\ - OK
+ C:\folderBad - ERROR_FILE_NOT_FOUND
+
+ \\Server\BadShare - ERROR_BAD_NETPATH
+ \\Server\Share - WORKS OK, but MSDN says:
+ GetFileAttributes for a network share, the function fails, and GetLastError
+ returns ERROR_BAD_NETPATH. You must specify a path to a subfolder on that share.
+*/
+
+DWORD GetFileAttrib(CFSTR path)
+{
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ return ::GetFileAttributes(fs2fas(path));
+ else
+ #endif
+ {
+ IF_USE_MAIN_PATH
+ {
+ DWORD dw = ::GetFileAttributesW(fs2us(path));
+ if (dw != INVALID_FILE_ATTRIBUTES)
+ return dw;
+ }
+ #ifdef WIN_LONG_PATH
+ if (USE_SUPER_PATH)
+ {
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ return ::GetFileAttributesW(superPath);
+ }
+ #endif
+ return INVALID_FILE_ATTRIBUTES;
+ }
+}
+
+/* if path is "c:" or "c::" then CFileInfo::Find() returns name of current folder for that disk
+ so instead of absolute path we have relative path in Name. That is not good in some calls */
+
+/* In CFileInfo::Find() we want to support same names for alt streams as in CreateFile(). */
+
+/* CFileInfo::Find()
+We alow the following paths (as FindFirstFile):
+ C:\folder
+ c: - if current dir is NOT ROOT ( c:\folder )
+
+also we support paths that are not supported by FindFirstFile:
+ \
+ \\.\c:
+ c:\ - Name will be without tail slash ( c: )
+ \\?\c:\ - Name will be without tail slash ( c: )
+ \\Server\Share
+ \\?\UNC\Server\Share
+
+ c:\folder:stream - Name = folder:stream
+ c:\:stream - Name = :stream
+ c::stream - Name = c::stream
+*/
+
+bool CFileInfo::Find(CFSTR path)
{
#ifdef SUPPORT_DEVICE_FILE
- if (IsDeviceName(wildcard))
+ if (IsDevicePath(path))
{
- Clear();
+ ClearBase();
+ Name = path + 4;
IsDevice = true;
+
+ if (NName::IsDrivePath2(path + 4) && path[6] == 0)
+ {
+ FChar drive[4] = { path[4], ':', '\\', 0 };
+ UInt64 clusterSize, totalSize, freeSize;
+ if (NSystem::MyGetDiskFreeSpace(drive, clusterSize, totalSize, freeSize))
+ {
+ Size = totalSize;
+ return true;
+ }
+ }
+
NIO::CInFile inFile;
- if (!inFile.Open(wildcard))
+ // ::OutputDebugStringW(path);
+ if (!inFile.Open(path))
return false;
- Name = wildcard + 4;
- if (inFile.LengthDefined)
- Size = inFile.Length;
+ // ::OutputDebugStringW(L"---");
+ if (inFile.SizeDefined)
+ Size = inFile.Size;
return true;
}
#endif
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
+
+ int colonPos = FindAltStreamColon(path);
+ if (colonPos >= 0 && path[(unsigned)colonPos + 1] != 0)
+ {
+ UString streamName = fs2us(path + (unsigned)colonPos);
+ FString filePath = path;
+ filePath.DeleteFrom(colonPos);
+ /* we allow both cases:
+ name:stream
+ name:stream:$DATA
+ */
+ const unsigned kPostfixSize = 6;
+ if (streamName.Len() <= kPostfixSize
+ || !StringsAreEqualNoCase_Ascii(streamName.RightPtr(kPostfixSize), ":$DATA"))
+ streamName += L":$DATA";
+
+ bool isOk = true;
+
+ if (IsDrivePath2(filePath) &&
+ (colonPos == 2 || colonPos == 3 && filePath[2] == '\\'))
+ {
+ // FindFirstFile doesn't work for "c:\" and for "c:" (if current dir is ROOT)
+ ClearBase();
+ Name.Empty();
+ if (colonPos == 2)
+ Name = filePath;
+ }
+ else
+ isOk = Find(filePath);
+
+ if (isOk)
+ {
+ Attrib &= ~(FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT);
+ Size = 0;
+ CStreamEnumerator enumerator(filePath);
+ for (;;)
+ {
+ CStreamInfo si;
+ bool found;
+ if (!enumerator.Next(si, found))
+ return false;
+ if (!found)
+ {
+ ::SetLastError(ERROR_FILE_NOT_FOUND);
+ return false;
+ }
+ if (si.Name.IsEqualTo_NoCase(streamName))
+ {
+ // we delete postfix, if alt stream name is not "::$DATA"
+ if (si.Name.Len() > kPostfixSize + 1)
+ si.Name.DeleteFrom(si.Name.Len() - kPostfixSize);
+ Name += us2fs(si.Name);
+ Size = si.Size;
+ IsAltStream = true;
+ return true;
+ }
+ }
+ }
+ }
+
+ #endif
+
CFindFile finder;
- if (finder.FindFirst(wildcard, *this))
+ if (finder.FindFirst(path, *this))
return true;
- #ifdef _WIN32
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
{
DWORD lastError = GetLastError();
- if (lastError == ERROR_BAD_NETPATH || lastError == ERROR_FILE_NOT_FOUND)
+ if (lastError == ERROR_FILE_NOT_FOUND
+ || lastError == ERROR_BAD_NETPATH // XP64: "\\Server\Share"
+ || lastError == ERROR_BAD_NET_NAME // Win7: "\\Server\Share"
+ || lastError == ERROR_INVALID_NAME // XP64: "\\?\UNC\Server\Share"
+ || lastError == ERROR_BAD_PATHNAME // Win7: "\\?\UNC\Server\Share"
+ )
{
- int len = MyStringLen(wildcard);
- if (len > 2 && wildcard[0] == '\\' && wildcard[1] == '\\')
+ unsigned rootSize = 0;
+ if (IsSuperPath(path))
+ rootSize = kSuperPathPrefixSize;
+ if (IS_PATH_SEPAR(path[0]) && path[1] == 0)
{
- int pos = FindCharPosInString(wildcard + 2, FTEXT('\\'));
- if (pos >= 0)
+ DWORD attrib = GetFileAttrib(path);
+ if (attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_DIRECTORY) != 0)
{
- pos += 2 + 1;
- len -= pos;
- CFSTR remString = wildcard + pos;
- int pos2 = FindCharPosInString(remString, FTEXT('\\'));
- FString s = wildcard;
- if (pos2 < 0 || pos2 == len - 1)
+ ClearBase();
+ Name.Empty();
+ Attrib = attrib;
+ return true;
+ }
+ }
+ else if (NName::IsDrivePath(path + rootSize) && path[rootSize + 3] == 0)
+ {
+ DWORD attrib = GetFileAttrib(path);
+ if (attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_DIRECTORY) != 0)
+ {
+ ClearBase();
+ Attrib = attrib;
+ Name = path + rootSize;
+ Name.DeleteFrom(2); // we don't need backslash (C:)
+ return true;
+ }
+ }
+ else
+ {
+ unsigned prefixSize = GetNetworkServerPrefixSize(path);
+ if (prefixSize > 0 && path[prefixSize] != 0)
+ {
+ if (NName::FindSepar(path + prefixSize) < 0)
{
- FString s = wildcard;
- if (pos2 < 0)
- {
- pos2 = len;
- s += FTEXT('\\');
- }
+ FString s = path;
+ s.Add_PathSepar();
s += FCHAR_ANY_MASK;
+
+ bool isOK = false;
if (finder.FindFirst(s, *this))
+ {
if (Name == FTEXT("."))
{
- Name = s.Mid(pos, pos2);
+ Name = path + prefixSize;;
+ return true;
+ }
+ isOK = true;
+ /* if "\\server\share" maps to root folder "d:\", there is no "." item.
+ But it's possible that there are another items */
+ }
+ {
+ DWORD attrib = GetFileAttrib(path);
+ if (isOK || attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_DIRECTORY) != 0)
+ {
+ ClearBase();
+ if (attrib != INVALID_FILE_ATTRIBUTES)
+ Attrib = attrib;
+ else
+ SetAsDir();
+ Name = path + prefixSize;
return true;
}
+ }
::SetLastError(lastError);
}
}
@@ -202,6 +590,7 @@ bool CFileInfo::Find(CFSTR wildcard)
}
}
#endif
+
return false;
}
@@ -216,12 +605,14 @@ bool DoesDirExist(CFSTR name)
CFileInfo fi;
return fi.Find(name) && fi.IsDir();
}
+
bool DoesFileOrDirExist(CFSTR name)
{
CFileInfo fi;
return fi.Find(name);
}
+
bool CEnumerator::NextAny(CFileInfo &fi)
{
if (_findFile.IsHandleAllocated())
@@ -256,7 +647,7 @@ bool CEnumerator::Next(CFileInfo &fi, bool &found)
// CFindChangeNotification
// FindFirstChangeNotification can return 0. MSDN doesn't tell about it.
-bool CFindChangeNotification::Close()
+bool CFindChangeNotification::Close() throw()
{
if (!IsHandleAllocated())
return true;
@@ -266,21 +657,22 @@ bool CFindChangeNotification::Close()
return true;
}
-HANDLE CFindChangeNotification::FindFirst(CFSTR pathName, bool watchSubtree, DWORD notifyFilter)
+HANDLE CFindChangeNotification::FindFirst(CFSTR path, bool watchSubtree, DWORD notifyFilter)
{
#ifndef _UNICODE
if (!g_IsNT)
- _handle = ::FindFirstChangeNotification(fs2fas(pathName), BoolToBOOL(watchSubtree), notifyFilter);
+ _handle = ::FindFirstChangeNotification(fs2fas(path), BoolToBOOL(watchSubtree), notifyFilter);
else
#endif
{
- _handle = ::FindFirstChangeNotificationW(fs2us(pathName), BoolToBOOL(watchSubtree), notifyFilter);
+ IF_USE_MAIN_PATH
+ _handle = ::FindFirstChangeNotificationW(fs2us(path), BoolToBOOL(watchSubtree), notifyFilter);
#ifdef WIN_LONG_PATH
if (!IsHandleAllocated())
{
- UString longPath;
- if (GetLongPath(pathName, longPath))
- _handle = ::FindFirstChangeNotificationW(longPath, BoolToBOOL(watchSubtree), notifyFilter);
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ _handle = ::FindFirstChangeNotificationW(superPath, BoolToBOOL(watchSubtree), notifyFilter);
}
#endif
}
@@ -299,23 +691,22 @@ bool MyGetLogicalDriveStrings(CObjectVector<FString> &driveStrings)
UINT32 size = GetLogicalDriveStrings(0, NULL);
if (size == 0)
return false;
- AString buf;
- UINT32 newSize = GetLogicalDriveStrings(size, buf.GetBuffer(size));
+ CObjArray<char> buf(size);
+ UINT32 newSize = GetLogicalDriveStrings(size, buf);
if (newSize == 0 || newSize > size)
return false;
AString s;
+ UINT32 prev = 0;
for (UINT32 i = 0; i < newSize; i++)
{
- char c = buf[i];
- if (c == '\0')
+ if (buf[i] == 0)
{
+ s = buf + prev;
+ prev = i + 1;
driveStrings.Add(fas2fs(s));
- s.Empty();
}
- else
- s += c;
}
- return s.IsEmpty();
+ return prev == newSize;;
}
else
#endif
@@ -323,23 +714,22 @@ bool MyGetLogicalDriveStrings(CObjectVector<FString> &driveStrings)
UINT32 size = GetLogicalDriveStringsW(0, NULL);
if (size == 0)
return false;
- UString buf;
- UINT32 newSize = GetLogicalDriveStringsW(size, buf.GetBuffer(size));
+ CObjArray<wchar_t> buf(size);
+ UINT32 newSize = GetLogicalDriveStringsW(size, buf);
if (newSize == 0 || newSize > size)
return false;
UString s;
+ UINT32 prev = 0;
for (UINT32 i = 0; i < newSize; i++)
{
- WCHAR c = buf[i];
- if (c == L'\0')
+ if (buf[i] == 0)
{
+ s = buf + prev;
+ prev = i + 1;
driveStrings.Add(us2fs(s));
- s.Empty();
}
- else
- s += c;
}
- return s.IsEmpty();
+ return prev == newSize;
}
}
diff --git a/3rdparty/lzma/CPP/Windows/FileFind.h b/3rdparty/lzma/CPP/Windows/FileFind.h
index 97a3b7c2a62..615c2dfe24c 100644
--- a/3rdparty/lzma/CPP/Windows/FileFind.h
+++ b/3rdparty/lzma/CPP/Windows/FileFind.h
@@ -4,7 +4,6 @@
#define __WINDOWS_FILE_FIND_H
#include "../Common/MyString.h"
-#include "../Common/Types.h"
#include "Defs.h"
namespace NWindows {
@@ -25,14 +24,13 @@ namespace NAttributes
class CFileInfoBase
{
bool MatchesMask(UINT32 mask) const { return ((Attrib & mask) != 0); }
-protected:
- void Clear();
public:
UInt64 Size;
FILETIME CTime;
FILETIME ATime;
FILETIME MTime;
DWORD Attrib;
+ bool IsAltStream;
bool IsDevice;
/*
@@ -43,6 +41,11 @@ public:
#endif
*/
+ CFileInfoBase() { ClearBase(); }
+ void ClearBase() throw();
+
+ void SetAsDir() { Attrib = FILE_ATTRIBUTE_DIRECTORY; }
+
bool IsArchived() const { return MatchesMask(FILE_ATTRIBUTE_ARCHIVE); }
bool IsCompressed() const { return MatchesMask(FILE_ATTRIBUTE_COMPRESSED); }
bool IsDir() const { return MatchesMask(FILE_ATTRIBUTE_DIRECTORY); }
@@ -60,28 +63,70 @@ public:
struct CFileInfo: public CFileInfoBase
{
FString Name;
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ // FString ShortName;
+ #endif
- bool IsDots() const;
- bool Find(CFSTR wildcard);
+ bool IsDots() const throw();
+ bool Find(CFSTR path);
};
-class CFindFile
+class CFindFileBase
{
- friend class CEnumerator;
+protected:
HANDLE _handle;
public:
bool IsHandleAllocated() const { return _handle != INVALID_HANDLE_VALUE; }
- CFindFile(): _handle(INVALID_HANDLE_VALUE) {}
- ~CFindFile() { Close(); }
+ CFindFileBase(): _handle(INVALID_HANDLE_VALUE) {}
+ ~CFindFileBase() { Close(); }
+ bool Close() throw();
+};
+
+class CFindFile: public CFindFileBase
+{
+public:
bool FindFirst(CFSTR wildcard, CFileInfo &fileInfo);
bool FindNext(CFileInfo &fileInfo);
- bool Close();
};
+#if defined(_WIN32) && !defined(UNDER_CE)
+
+struct CStreamInfo
+{
+ UString Name;
+ UInt64 Size;
+
+ UString GetReducedName() const; // returns ":Name"
+ // UString GetReducedName2() const; // returns "Name"
+ bool IsMainStream() const throw();
+};
+
+class CFindStream: public CFindFileBase
+{
+public:
+ bool FindFirst(CFSTR filePath, CStreamInfo &streamInfo);
+ bool FindNext(CStreamInfo &streamInfo);
+};
+
+class CStreamEnumerator
+{
+ CFindStream _find;
+ FString _filePath;
+
+ bool NextAny(CFileInfo &fileInfo);
+public:
+ CStreamEnumerator(const FString &filePath): _filePath(filePath) {}
+ bool Next(CStreamInfo &streamInfo, bool &found);
+};
+
+#endif
+
bool DoesFileExist(CFSTR name);
bool DoesDirExist(CFSTR name);
bool DoesFileOrDirExist(CFSTR name);
+DWORD GetFileAttrib(CFSTR path);
+
class CEnumerator
{
CFindFile _findFile;
@@ -102,7 +147,7 @@ public:
bool IsHandleAllocated() const { return _handle != INVALID_HANDLE_VALUE && _handle != 0; }
CFindChangeNotification(): _handle(INVALID_HANDLE_VALUE) {}
~CFindChangeNotification() { Close(); }
- bool Close();
+ bool Close() throw();
HANDLE FindFirst(CFSTR pathName, bool watchSubtree, DWORD notifyFilter);
bool FindNext() { return BOOLToBool(::FindNextChangeNotification(_handle)); }
};
diff --git a/3rdparty/lzma/CPP/Windows/FileIO.cpp b/3rdparty/lzma/CPP/Windows/FileIO.cpp
index e8f98747c8f..56e6ca45796 100644
--- a/3rdparty/lzma/CPP/Windows/FileIO.cpp
+++ b/3rdparty/lzma/CPP/Windows/FileIO.cpp
@@ -2,88 +2,51 @@
#include "StdAfx.h"
+#ifdef SUPPORT_DEVICE_FILE
+#include "../../C/Alloc.h"
+#endif
+
#include "FileIO.h"
+#include "FileName.h"
#ifndef _UNICODE
extern bool g_IsNT;
#endif
+using namespace NWindows;
+using namespace NFile;
+using namespace NName;
+
namespace NWindows {
namespace NFile {
#ifdef SUPPORT_DEVICE_FILE
-bool IsDeviceName(CFSTR n)
-{
- #ifdef UNDER_CE
- int len = (int)MyStringLen(n);
- if (len < 5 || len > 5 || memcmp(n, FTEXT("DSK"), 3 * sizeof(FCHAR)) != 0)
- return false;
- if (n[4] != ':')
- return false;
- // for reading use SG_REQ sg; if (DeviceIoControl(dsk, IOCTL_DISK_READ));
- #else
- if (n[0] != '\\' || n[1] != '\\' || n[2] != '.' || n[3] != '\\')
- return false;
- int len = (int)MyStringLen(n);
- if (len == 6 && n[5] == ':')
- return true;
- if (len < 18 || len > 22 || memcmp(n + 4, FTEXT("PhysicalDrive"), 13 * sizeof(FCHAR)) != 0)
- return false;
- for (int i = 17; i < len; i++)
- if (n[i] < '0' || n[i] > '9')
- return false;
- #endif
- return true;
-}
-
-#endif
-
-#if defined(WIN_LONG_PATH) && defined(_UNICODE)
-#define WIN_LONG_PATH2
-#endif
-
-#ifdef WIN_LONG_PATH
-bool GetLongPathBase(CFSTR s, UString &res)
-{
- res.Empty();
- int len = MyStringLen(s);
- FChar c = s[0];
- if (len < 1 || c == '\\' || c == '.' && (len == 1 || len == 2 && s[1] == '.'))
- return true;
- UString curDir;
- bool isAbs = false;
- if (len > 3)
- isAbs = (s[1] == ':' && s[2] == '\\' && (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z'));
-
- if (!isAbs)
- {
- WCHAR temp[MAX_PATH + 2];
- temp[0] = 0;
- DWORD needLength = ::GetCurrentDirectoryW(MAX_PATH + 1, temp);
- if (needLength == 0 || needLength > MAX_PATH)
- return false;
- curDir = temp;
- if (curDir.Back() != L'\\')
- curDir += L'\\';
- }
- res = UString(L"\\\\?\\") + curDir + fs2us(s);
- return true;
-}
-
-bool GetLongPath(CFSTR path, UString &longPath)
+namespace NSystem
{
- if (GetLongPathBase(path, longPath))
- return !longPath.IsEmpty();
- return false;
+bool MyGetDiskFreeSpace(CFSTR rootPath, UInt64 &clusterSize, UInt64 &totalSize, UInt64 &freeSize);
}
#endif
namespace NIO {
-CFileBase::~CFileBase() { Close(); }
+/*
+WinXP-64 CreateFile():
+ "" - ERROR_PATH_NOT_FOUND
+ :stream - OK
+ .:stream - ERROR_PATH_NOT_FOUND
+ .\:stream - OK
+
+ folder\:stream - ERROR_INVALID_NAME
+ folder:stream - OK
+
+ c:\:stream - OK
+
+ c::stream - ERROR_INVALID_NAME, if current dir is NOT ROOT ( c:\dir1 )
+ c::stream - OK, if current dir is ROOT ( c:\ )
+*/
-bool CFileBase::Create(CFSTR fileName, DWORD desiredAccess,
+bool CFileBase::Create(CFSTR path, DWORD desiredAccess,
DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes)
{
if (!Close())
@@ -96,20 +59,21 @@ bool CFileBase::Create(CFSTR fileName, DWORD desiredAccess,
#ifndef _UNICODE
if (!g_IsNT)
{
- _handle = ::CreateFile(fs2fas(fileName), desiredAccess, shareMode,
+ _handle = ::CreateFile(fs2fas(path), desiredAccess, shareMode,
(LPSECURITY_ATTRIBUTES)NULL, creationDisposition, flagsAndAttributes, (HANDLE)NULL);
}
else
#endif
{
- _handle = ::CreateFileW(fs2us(fileName), desiredAccess, shareMode,
+ IF_USE_MAIN_PATH
+ _handle = ::CreateFileW(fs2us(path), desiredAccess, shareMode,
(LPSECURITY_ATTRIBUTES)NULL, creationDisposition, flagsAndAttributes, (HANDLE)NULL);
#ifdef WIN_LONG_PATH
- if (_handle == INVALID_HANDLE_VALUE)
+ if (_handle == INVALID_HANDLE_VALUE && USE_SUPER_PATH)
{
- UString longPath;
- if (GetLongPath(fileName, longPath))
- _handle = ::CreateFileW(longPath, desiredAccess, shareMode,
+ UString superPath;
+ if (GetSuperPath(path, superPath, USE_MAIN_PATH))
+ _handle = ::CreateFileW(superPath, desiredAccess, shareMode,
(LPSECURITY_ATTRIBUTES)NULL, creationDisposition, flagsAndAttributes, (HANDLE)NULL);
}
#endif
@@ -117,7 +81,7 @@ bool CFileBase::Create(CFSTR fileName, DWORD desiredAccess,
return (_handle != INVALID_HANDLE_VALUE);
}
-bool CFileBase::Close()
+bool CFileBase::Close() throw()
{
if (_handle == INVALID_HANDLE_VALUE)
return true;
@@ -127,17 +91,17 @@ bool CFileBase::Close()
return true;
}
-bool CFileBase::GetPosition(UInt64 &position) const
+bool CFileBase::GetPosition(UInt64 &position) const throw()
{
return Seek(0, FILE_CURRENT, position);
}
-bool CFileBase::GetLength(UInt64 &length) const
+bool CFileBase::GetLength(UInt64 &length) const throw()
{
#ifdef SUPPORT_DEVICE_FILE
- if (IsDeviceFile && LengthDefined)
+ if (IsDeviceFile && SizeDefined)
{
- length = Length;
+ length = Size;
return true;
}
#endif
@@ -151,98 +115,195 @@ bool CFileBase::GetLength(UInt64 &length) const
return true;
}
-bool CFileBase::Seek(Int64 distanceToMove, DWORD moveMethod, UInt64 &newPosition) const
+bool CFileBase::Seek(Int64 distanceToMove, DWORD moveMethod, UInt64 &newPosition) const throw()
{
#ifdef SUPPORT_DEVICE_FILE
- if (IsDeviceFile && LengthDefined && moveMethod == FILE_END)
+ if (IsDeviceFile && SizeDefined && moveMethod == FILE_END)
{
- distanceToMove += Length;
+ distanceToMove += Size;
moveMethod = FILE_BEGIN;
}
#endif
- LARGE_INTEGER value;
- value.QuadPart = distanceToMove;
- value.LowPart = ::SetFilePointer(_handle, value.LowPart, &value.HighPart, moveMethod);
- if (value.LowPart == 0xFFFFFFFF)
+ LONG high = (LONG)(distanceToMove >> 32);
+ DWORD low = ::SetFilePointer(_handle, (LONG)(distanceToMove & 0xFFFFFFFF), &high, moveMethod);
+ if (low == 0xFFFFFFFF)
if (::GetLastError() != NO_ERROR)
return false;
- newPosition = value.QuadPart;
+ newPosition = (((UInt64)(UInt32)high) << 32) + low;
return true;
}
-bool CFileBase::Seek(UInt64 position, UInt64 &newPosition)
+bool CFileBase::Seek(UInt64 position, UInt64 &newPosition) const throw()
{
return Seek(position, FILE_BEGIN, newPosition);
}
-bool CFileBase::SeekToBegin()
+bool CFileBase::SeekToBegin() const throw()
{
UInt64 newPosition;
return Seek(0, newPosition);
}
-bool CFileBase::SeekToEnd(UInt64 &newPosition)
+bool CFileBase::SeekToEnd(UInt64 &newPosition) const throw()
{
return Seek(0, FILE_END, newPosition);
}
-/*
-bool CFileBase::GetFileInformation(CByHandleFileInfo &fi) const
-{
- BY_HANDLE_FILE_INFORMATION wfi;
- if (!::GetFileInformationByHandle(_handle, &wfi))
- return false;
- fi.Attrib = wfi.dwFileAttributes;
- fi.CTime = wfi.ftCreationTime;
- fi.ATime = wfi.ftLastAccessTime;
- fi.MTime = wfi.ftLastWriteTime;
- fi.Size = (((UInt64)wfi.nFileSizeHigh) << 32) + wfi.nFileSizeLow;
- fi.VolumeSerialNumber = wfi.dwVolumeSerialNumber;
- fi.NumLinks = wfi.nNumberOfLinks;
- fi.FileIndex = (((UInt64)wfi.nFileIndexHigh) << 32) + wfi.nFileIndexLow;
- return true;
-}
-*/
-
-/////////////////////////
-// CInFile
+// ---------- CInFile ---------
#ifdef SUPPORT_DEVICE_FILE
-void CInFile::GetDeviceLength()
+
+void CInFile::CorrectDeviceSize()
{
- if (_handle != INVALID_HANDLE_VALUE && IsDeviceFile)
+ // maybe we must decrease kClusterSize to 1 << 12, if we want correct size at tail
+ static const UInt32 kClusterSize = 1 << 14;
+ UInt64 pos = Size & ~(UInt64)(kClusterSize - 1);
+ UInt64 realNewPosition;
+ if (!Seek(pos, realNewPosition))
+ return;
+ Byte *buf = (Byte *)MidAlloc(kClusterSize);
+
+ bool needbackward = true;
+
+ for (;;)
+ {
+ UInt32 processed = 0;
+ // up test is slow for "PhysicalDrive".
+ // processed size for latest block for "PhysicalDrive0" is 0.
+ if (!Read1(buf, kClusterSize, processed))
+ break;
+ if (processed == 0)
+ break;
+ needbackward = false;
+ Size = pos + processed;
+ if (processed != kClusterSize)
+ break;
+ pos += kClusterSize;
+ }
+
+ if (needbackward && pos != 0)
{
- #ifdef UNDER_CE
- LengthDefined = true;
- Length = 128 << 20;
+ pos -= kClusterSize;
+ for (;;)
+ {
+ // break;
+ if (!Seek(pos, realNewPosition))
+ break;
+ if (!buf)
+ {
+ buf = (Byte *)MidAlloc(kClusterSize);
+ if (!buf)
+ break;
+ }
+ UInt32 processed = 0;
+ // that code doesn't work for "PhysicalDrive0"
+ if (!Read1(buf, kClusterSize, processed))
+ break;
+ if (processed != 0)
+ {
+ Size = pos + processed;
+ break;
+ }
+ if (pos == 0)
+ break;
+ pos -= kClusterSize;
+ }
+ }
+ MidFree(buf);
+}
+
- #else
- PARTITION_INFORMATION partInfo;
- LengthDefined = true;
- Length = 0;
+void CInFile::CalcDeviceSize(CFSTR s)
+{
+ SizeDefined = false;
+ Size = 0;
+ if (_handle == INVALID_HANDLE_VALUE || !IsDeviceFile)
+ return;
+ #ifdef UNDER_CE
- if (GetPartitionInfo(&partInfo))
- Length = partInfo.PartitionLength.QuadPart;
+ SizeDefined = true;
+ Size = 128 << 20;
+
+ #else
+
+ PARTITION_INFORMATION partInfo;
+ bool needCorrectSize = true;
+
+ /*
+ WinXP 64-bit:
+
+ HDD \\.\PhysicalDrive0 (MBR):
+ GetPartitionInfo == GeometryEx : corrrect size? (includes tail)
+ Geometry : smaller than GeometryEx (no tail, maybe correct too?)
+ MyGetDiskFreeSpace : FAIL
+ Size correction is slow and block size (kClusterSize) must be small?
+
+ HDD partition \\.\N: (NTFS):
+ MyGetDiskFreeSpace : Size of NTFS clusters. Same size can be calculated after correction
+ GetPartitionInfo : size of partition data: NTFS clusters + TAIL; TAIL contains extra empty sectors and copy of first sector of NTFS
+ Geometry / CdRomGeometry / GeometryEx : size of HDD (not that partition)
+
+ CD-ROM drive (ISO):
+ MyGetDiskFreeSpace : correct size. Same size can be calculated after correction
+ Geometry == CdRomGeometry : smaller than corrrect size
+ GetPartitionInfo == GeometryEx : larger than corrrect size
+
+ Floppy \\.\a: (FAT):
+ Geometry : correct size.
+ CdRomGeometry / GeometryEx / GetPartitionInfo / MyGetDiskFreeSpace - FAIL
+ correction works OK for FAT.
+ correction works OK for non-FAT, if kClusterSize = 512.
+ */
+
+ if (GetPartitionInfo(&partInfo))
+ {
+ Size = partInfo.PartitionLength.QuadPart;
+ SizeDefined = true;
+ needCorrectSize = false;
+ if ((s)[0] == '\\' && (s)[1] == '\\' && (s)[2] == '.' && (s)[3] == '\\' && (s)[5] == ':' && (s)[6] == 0)
+ {
+ FChar path[4] = { s[4], ':', '\\', 0 };
+ UInt64 clusterSize, totalSize, freeSize;
+ if (NSystem::MyGetDiskFreeSpace(path, clusterSize, totalSize, freeSize))
+ Size = totalSize;
+ else
+ needCorrectSize = true;
+ }
+ }
+
+ if (!SizeDefined)
+ {
+ my_DISK_GEOMETRY_EX geomEx;
+ SizeDefined = GetGeometryEx(&geomEx);
+ if (SizeDefined)
+ Size = geomEx.DiskSize.QuadPart;
else
{
DISK_GEOMETRY geom;
- if (!GetGeometry(&geom))
- if (!GetCdRomGeometry(&geom))
- LengthDefined = false;
- if (LengthDefined)
- Length = geom.Cylinders.QuadPart * geom.TracksPerCylinder * geom.SectorsPerTrack * geom.BytesPerSector;
+ SizeDefined = GetGeometry(&geom);
+ if (!SizeDefined)
+ SizeDefined = GetCdRomGeometry(&geom);
+ if (SizeDefined)
+ Size = geom.Cylinders.QuadPart * geom.TracksPerCylinder * geom.SectorsPerTrack * geom.BytesPerSector;
}
- // SeekToBegin();
- #endif
}
+
+ if (needCorrectSize && SizeDefined && Size != 0)
+ {
+ CorrectDeviceSize();
+ SeekToBegin();
+ }
+
+ // SeekToBegin();
+ #endif
}
// ((desiredAccess & (FILE_WRITE_DATA | FILE_APPEND_DATA | GENERIC_WRITE)) == 0 &&
#define MY_DEVICE_EXTRA_CODE \
- IsDeviceFile = IsDeviceName(fileName); \
- GetDeviceLength();
+ IsDeviceFile = IsDevicePath(fileName); \
+ CalcDeviceSize(fileName);
#else
#define MY_DEVICE_EXTRA_CODE
#endif
@@ -271,7 +332,7 @@ bool CInFile::Open(CFSTR fileName)
static UInt32 kChunkSizeMax = (1 << 22);
-bool CInFile::Read1(void *data, UInt32 size, UInt32 &processedSize)
+bool CInFile::Read1(void *data, UInt32 size, UInt32 &processedSize) throw()
{
DWORD processedLoc = 0;
bool res = BOOLToBool(::ReadFile(_handle, data, size, &processedLoc, NULL));
@@ -279,14 +340,14 @@ bool CInFile::Read1(void *data, UInt32 size, UInt32 &processedSize)
return res;
}
-bool CInFile::ReadPart(void *data, UInt32 size, UInt32 &processedSize)
+bool CInFile::ReadPart(void *data, UInt32 size, UInt32 &processedSize) throw()
{
if (size > kChunkSizeMax)
size = kChunkSizeMax;
return Read1(data, size, processedSize);
}
-bool CInFile::Read(void *data, UInt32 size, UInt32 &processedSize)
+bool CInFile::Read(void *data, UInt32 size, UInt32 &processedSize) throw()
{
processedSize = 0;
do
@@ -305,8 +366,7 @@ bool CInFile::Read(void *data, UInt32 size, UInt32 &processedSize)
return true;
}
-/////////////////////////
-// COutFile
+// ---------- COutFile ---------
static inline DWORD GetCreationDisposition(bool createAlways)
{ return createAlways? CREATE_ALWAYS: CREATE_NEW; }
@@ -320,12 +380,15 @@ bool COutFile::Open(CFSTR fileName, DWORD creationDisposition)
bool COutFile::Create(CFSTR fileName, bool createAlways)
{ return Open(fileName, GetCreationDisposition(createAlways)); }
-bool COutFile::SetTime(const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime)
+bool COutFile::CreateAlways(CFSTR fileName, DWORD flagsAndAttributes)
+ { return Open(fileName, FILE_SHARE_READ, GetCreationDisposition(true), flagsAndAttributes); }
+
+bool COutFile::SetTime(const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime) throw()
{ return BOOLToBool(::SetFileTime(_handle, cTime, aTime, mTime)); }
-bool COutFile::SetMTime(const FILETIME *mTime) { return SetTime(NULL, NULL, mTime); }
+bool COutFile::SetMTime(const FILETIME *mTime) throw() { return SetTime(NULL, NULL, mTime); }
-bool COutFile::WritePart(const void *data, UInt32 size, UInt32 &processedSize)
+bool COutFile::WritePart(const void *data, UInt32 size, UInt32 &processedSize) throw()
{
if (size > kChunkSizeMax)
size = kChunkSizeMax;
@@ -335,7 +398,7 @@ bool COutFile::WritePart(const void *data, UInt32 size, UInt32 &processedSize)
return res;
}
-bool COutFile::Write(const void *data, UInt32 size, UInt32 &processedSize)
+bool COutFile::Write(const void *data, UInt32 size, UInt32 &processedSize) throw()
{
processedSize = 0;
do
@@ -354,9 +417,9 @@ bool COutFile::Write(const void *data, UInt32 size, UInt32 &processedSize)
return true;
}
-bool COutFile::SetEndOfFile() { return BOOLToBool(::SetEndOfFile(_handle)); }
+bool COutFile::SetEndOfFile() throw() { return BOOLToBool(::SetEndOfFile(_handle)); }
-bool COutFile::SetLength(UInt64 length)
+bool COutFile::SetLength(UInt64 length) throw()
{
UInt64 newPosition;
if (!Seek(length, newPosition))
diff --git a/3rdparty/lzma/CPP/Windows/FileIO.h b/3rdparty/lzma/CPP/Windows/FileIO.h
index ecd7af964be..32c285fb9cc 100644
--- a/3rdparty/lzma/CPP/Windows/FileIO.h
+++ b/3rdparty/lzma/CPP/Windows/FileIO.h
@@ -3,96 +3,163 @@
#ifndef __WINDOWS_FILE_IO_H
#define __WINDOWS_FILE_IO_H
-#include "../Common/Types.h"
+#include "../Common/MyWindows.h"
+
+#if defined(_WIN32) && !defined(UNDER_CE)
+#include <winioctl.h>
+#endif
+
#include "../Common/MyString.h"
+#include "../Common/MyBuffer.h"
#include "Defs.h"
+#define _my_IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)
+#define _my_IO_REPARSE_TAG_SYMLINK (0xA000000CL)
+
+#define _my_SYMLINK_FLAG_RELATIVE 1
+
+#define my_FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 41, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) // REPARSE_DATA_BUFFER
+#define my_FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS) // REPARSE_DATA_BUFFER
+
namespace NWindows {
namespace NFile {
-namespace NIO {
-/*
-struct CByHandleFileInfo
+#if defined(_WIN32) && !defined(UNDER_CE)
+bool FillLinkData(CByteBuffer &dest, const wchar_t *path, bool isSymLink);
+#endif
+
+struct CReparseShortInfo
+{
+ unsigned Offset;
+ unsigned Size;
+
+ bool Parse(const Byte *p, size_t size);
+};
+
+struct CReparseAttr
{
- UInt64 Size;
- FILETIME CTime;
- FILETIME ATime;
- FILETIME MTime;
- DWORD Attrib;
- DWORD VolumeSerialNumber;
- DWORD NumLinks;
- UInt64 FileIndex;
+ UInt32 Tag;
+ UInt32 Flags;
+ UString SubsName;
+ UString PrintName;
+
+ CReparseAttr(): Tag(0), Flags(0) {}
+ bool Parse(const Byte *p, size_t size);
+
+ bool IsMountPoint() const { return Tag == _my_IO_REPARSE_TAG_MOUNT_POINT; } // it's Junction
+ bool IsSymLink() const { return Tag == _my_IO_REPARSE_TAG_SYMLINK; }
+ bool IsRelative() const { return Flags == _my_SYMLINK_FLAG_RELATIVE; }
+ // bool IsVolume() const;
+
+ bool IsOkNamePair() const;
+ UString GetPath() const;
};
-*/
+
+namespace NIO {
+
+bool GetReparseData(CFSTR path, CByteBuffer &reparseData, BY_HANDLE_FILE_INFORMATION *fileInfo = NULL);
+bool SetReparseData(CFSTR path, bool isDir, const void *data, DWORD size);
class CFileBase
{
protected:
HANDLE _handle;
- bool Create(CFSTR fileName, DWORD desiredAccess,
+ bool Create(CFSTR path, DWORD desiredAccess,
DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes);
public:
+
+ bool DeviceIoControl(DWORD controlCode, LPVOID inBuffer, DWORD inSize,
+ LPVOID outBuffer, DWORD outSize, LPDWORD bytesReturned, LPOVERLAPPED overlapped = NULL) const
+ {
+ return BOOLToBool(::DeviceIoControl(_handle, controlCode, inBuffer, inSize,
+ outBuffer, outSize, bytesReturned, overlapped));
+ }
+
+ bool DeviceIoControlOut(DWORD controlCode, LPVOID outBuffer, DWORD outSize, LPDWORD bytesReturned) const
+ {
+ return DeviceIoControl(controlCode, NULL, 0, outBuffer, outSize, bytesReturned);
+ }
+
+ bool DeviceIoControlOut(DWORD controlCode, LPVOID outBuffer, DWORD outSize) const
+ {
+ DWORD bytesReturned;
+ return DeviceIoControlOut(controlCode, outBuffer, outSize, &bytesReturned);
+ }
+
+public:
#ifdef SUPPORT_DEVICE_FILE
bool IsDeviceFile;
- bool LengthDefined;
- UInt64 Length;
+ bool SizeDefined;
+ UInt64 Size; // it can be larger than real available size
#endif
CFileBase(): _handle(INVALID_HANDLE_VALUE) {};
- ~CFileBase();
+ ~CFileBase() { Close(); }
- bool Close();
+ bool Close() throw();
- bool GetPosition(UInt64 &position) const;
- bool GetLength(UInt64 &length) const;
+ bool GetPosition(UInt64 &position) const throw();
+ bool GetLength(UInt64 &length) const throw();
- bool Seek(Int64 distanceToMove, DWORD moveMethod, UInt64 &newPosition) const;
- bool Seek(UInt64 position, UInt64 &newPosition);
- bool SeekToBegin();
- bool SeekToEnd(UInt64 &newPosition);
+ bool Seek(Int64 distanceToMove, DWORD moveMethod, UInt64 &newPosition) const throw();
+ bool Seek(UInt64 position, UInt64 &newPosition) const throw();
+ bool SeekToBegin() const throw();
+ bool SeekToEnd(UInt64 &newPosition) const throw();
- // bool GetFileInformation(CByHandleFileInfo &fileInfo) const;
+ bool GetFileInformation(BY_HANDLE_FILE_INFORMATION *info) const
+ { return BOOLToBool(GetFileInformationByHandle(_handle, info)); }
+
+ static bool GetFileInformation(CFSTR path, BY_HANDLE_FILE_INFORMATION *info)
+ {
+ NIO::CFileBase file;
+ if (!file.Create(path, 0, FILE_SHARE_READ, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS))
+ return false;
+ return file.GetFileInformation(info);
+ }
};
+#ifndef UNDER_CE
#define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM
#define IOCTL_CDROM_GET_DRIVE_GEOMETRY CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_MEDIA_REMOVAL CTL_CODE(IOCTL_CDROM_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
+// #define IOCTL_CDROM_MEDIA_REMOVAL CTL_CODE(IOCTL_CDROM_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
+
+// IOCTL_DISK_GET_DRIVE_GEOMETRY_EX works since WinXP
+#define my_IOCTL_DISK_GET_DRIVE_GEOMETRY_EX CTL_CODE(IOCTL_DISK_BASE, 0x0028, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+struct my_DISK_GEOMETRY_EX
+{
+ DISK_GEOMETRY Geometry;
+ LARGE_INTEGER DiskSize;
+ BYTE Data[1];
+};
+#endif
class CInFile: public CFileBase
{
#ifdef SUPPORT_DEVICE_FILE
- bool DeviceIoControl(DWORD controlCode, LPVOID inBuffer, DWORD inSize,
- LPVOID outBuffer, DWORD outSize, LPDWORD bytesReturned, LPOVERLAPPED overlapped) const
- {
- return BOOLToBool(::DeviceIoControl(_handle, controlCode, inBuffer, inSize,
- outBuffer, outSize, bytesReturned, overlapped));
- }
-
- bool DeviceIoControl(DWORD controlCode, LPVOID inBuffer,
- DWORD inSize, LPVOID outBuffer, DWORD outSize) const
- {
- DWORD ret;
- return DeviceIoControl(controlCode, inBuffer, inSize, outBuffer, outSize, &ret, 0);
- }
-
- bool DeviceIoControlOut(DWORD controlCode, LPVOID outBuffer, DWORD outSize) const
- { return DeviceIoControl(controlCode, NULL, 0, outBuffer, outSize); }
#ifndef UNDER_CE
+
bool GetGeometry(DISK_GEOMETRY *res) const
{ return DeviceIoControlOut(IOCTL_DISK_GET_DRIVE_GEOMETRY, res, sizeof(*res)); }
+ bool GetGeometryEx(my_DISK_GEOMETRY_EX *res) const
+ { return DeviceIoControlOut(my_IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, res, sizeof(*res)); }
+
bool GetCdRomGeometry(DISK_GEOMETRY *res) const
{ return DeviceIoControlOut(IOCTL_CDROM_GET_DRIVE_GEOMETRY, res, sizeof(*res)); }
bool GetPartitionInfo(PARTITION_INFORMATION *res)
{ return DeviceIoControlOut(IOCTL_DISK_GET_PARTITION_INFO, LPVOID(res), sizeof(*res)); }
+
#endif
- void GetDeviceLength();
+ void CorrectDeviceSize();
+ void CalcDeviceSize(CFSTR name);
+
#endif
public:
@@ -100,9 +167,19 @@ public:
bool OpenShared(CFSTR fileName, bool shareForWrite);
bool Open(CFSTR fileName);
- bool Read1(void *data, UInt32 size, UInt32 &processedSize);
- bool ReadPart(void *data, UInt32 size, UInt32 &processedSize);
- bool Read(void *data, UInt32 size, UInt32 &processedSize);
+ #ifndef UNDER_CE
+
+ bool OpenReparse(CFSTR fileName)
+ {
+ return Open(fileName, FILE_SHARE_READ, OPEN_EXISTING,
+ FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS);
+ }
+
+ #endif
+
+ bool Read1(void *data, UInt32 size, UInt32 &processedSize) throw();
+ bool ReadPart(void *data, UInt32 size, UInt32 &processedSize) throw();
+ bool Read(void *data, UInt32 size, UInt32 &processedSize) throw();
};
class COutFile: public CFileBase
@@ -111,13 +188,14 @@ public:
bool Open(CFSTR fileName, DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes);
bool Open(CFSTR fileName, DWORD creationDisposition);
bool Create(CFSTR fileName, bool createAlways);
-
- bool SetTime(const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime);
- bool SetMTime(const FILETIME *mTime);
- bool WritePart(const void *data, UInt32 size, UInt32 &processedSize);
- bool Write(const void *data, UInt32 size, UInt32 &processedSize);
- bool SetEndOfFile();
- bool SetLength(UInt64 length);
+ bool CreateAlways(CFSTR fileName, DWORD flagsAndAttributes);
+
+ bool SetTime(const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime) throw();
+ bool SetMTime(const FILETIME *mTime) throw();
+ bool WritePart(const void *data, UInt32 size, UInt32 &processedSize) throw();
+ bool Write(const void *data, UInt32 size, UInt32 &processedSize) throw();
+ bool SetEndOfFile() throw();
+ bool SetLength(UInt64 length) throw();
};
}}}
diff --git a/3rdparty/lzma/CPP/Windows/FileLink.cpp b/3rdparty/lzma/CPP/Windows/FileLink.cpp
new file mode 100644
index 00000000000..25d49ac3ed6
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/FileLink.cpp
@@ -0,0 +1,436 @@
+// Windows/FileLink.cpp
+
+#include "StdAfx.h"
+
+#include "../../C/CpuArch.h"
+
+#ifdef SUPPORT_DEVICE_FILE
+#include "../../C/Alloc.h"
+#endif
+
+#include "FileDir.h"
+#include "FileFind.h"
+#include "FileIO.h"
+#include "FileName.h"
+
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+namespace NFile {
+
+using namespace NName;
+
+/*
+ Reparse Points (Junctions and Symbolic Links):
+ struct
+ {
+ UInt32 Tag;
+ UInt16 Size; // not including starting 8 bytes
+ UInt16 Reserved; // = 0
+
+ UInt16 SubstituteOffset; // offset in bytes from start of namesChars
+ UInt16 SubstituteLen; // size in bytes, it doesn't include tailed NUL
+ UInt16 PrintOffset; // offset in bytes from start of namesChars
+ UInt16 PrintLen; // size in bytes, it doesn't include tailed NUL
+
+ [UInt32] Flags; // for Symbolic Links only.
+
+ UInt16 namesChars[]
+ }
+
+ MOUNT_POINT (Junction point):
+ 1) there is NUL wchar after path
+ 2) Default Order in table:
+ Substitute Path
+ Print Path
+ 3) pathnames can not contain dot directory names
+
+ SYMLINK:
+ 1) there is no NUL wchar after path
+ 2) Default Order in table:
+ Print Path
+ Substitute Path
+*/
+
+/*
+static const UInt32 kReparseFlags_Alias = (1 << 29);
+static const UInt32 kReparseFlags_HighLatency = (1 << 30);
+static const UInt32 kReparseFlags_Microsoft = ((UInt32)1 << 31);
+
+#define _my_IO_REPARSE_TAG_HSM (0xC0000004L)
+#define _my_IO_REPARSE_TAG_HSM2 (0x80000006L)
+#define _my_IO_REPARSE_TAG_SIS (0x80000007L)
+#define _my_IO_REPARSE_TAG_WIM (0x80000008L)
+#define _my_IO_REPARSE_TAG_CSV (0x80000009L)
+#define _my_IO_REPARSE_TAG_DFS (0x8000000AL)
+#define _my_IO_REPARSE_TAG_DFSR (0x80000012L)
+*/
+
+#define Get16(p) GetUi16(p)
+#define Get32(p) GetUi32(p)
+
+#define Set16(p, v) SetUi16(p, v)
+#define Set32(p, v) SetUi32(p, v)
+
+static const wchar_t *k_LinkPrefix = L"\\??\\";
+static const unsigned k_LinkPrefix_Size = 4;
+
+static const bool IsLinkPrefix(const wchar_t *s)
+{
+ return IsString1PrefixedByString2(s, k_LinkPrefix);
+}
+
+/*
+static const wchar_t *k_VolumePrefix = L"Volume{";
+static const bool IsVolumeName(const wchar_t *s)
+{
+ return IsString1PrefixedByString2(s, k_VolumePrefix);
+}
+*/
+
+void WriteString(Byte *dest, const wchar_t *path)
+{
+ for (;;)
+ {
+ wchar_t c = *path++;
+ if (c == 0)
+ return;
+ Set16(dest, (UInt16)c);
+ dest += 2;
+ }
+}
+
+#if defined(_WIN32) && !defined(UNDER_CE)
+
+bool FillLinkData(CByteBuffer &dest, const wchar_t *path, bool isSymLink)
+{
+ bool isAbs = IsAbsolutePath(path);
+ if (!isAbs && !isSymLink)
+ return false;
+
+ bool needPrintName = true;
+
+ if (IsSuperPath(path))
+ {
+ path += kSuperPathPrefixSize;
+ if (!IsDrivePath(path))
+ needPrintName = false;
+ }
+
+ const unsigned add_Prefix_Len = isAbs ? k_LinkPrefix_Size : 0;
+
+ unsigned len2 = MyStringLen(path) * 2;
+ const unsigned len1 = len2 + add_Prefix_Len * 2;
+ if (!needPrintName)
+ len2 = 0;
+
+ unsigned totalNamesSize = (len1 + len2);
+
+ /* some WIM imagex software uses old scheme for symbolic links.
+ so we can old scheme for byte to byte compatibility */
+
+ bool newOrderScheme = isSymLink;
+ // newOrderScheme = false;
+
+ if (!newOrderScheme)
+ totalNamesSize += 2 * 2;
+
+ const size_t size = 8 + 8 + (isSymLink ? 4 : 0) + totalNamesSize;
+ dest.Alloc(size);
+ memset(dest, 0, size);
+ const UInt32 tag = isSymLink ?
+ _my_IO_REPARSE_TAG_SYMLINK :
+ _my_IO_REPARSE_TAG_MOUNT_POINT;
+ Byte *p = dest;
+ Set32(p, tag);
+ Set16(p + 4, (UInt16)(size - 8));
+ Set16(p + 6, 0);
+ p += 8;
+
+ unsigned subOffs = 0;
+ unsigned printOffs = 0;
+ if (newOrderScheme)
+ subOffs = len2;
+ else
+ printOffs = len1 + 2;
+
+ Set16(p + 0, (UInt16)subOffs);
+ Set16(p + 2, (UInt16)len1);
+ Set16(p + 4, (UInt16)printOffs);
+ Set16(p + 6, (UInt16)len2);
+
+ p += 8;
+ if (isSymLink)
+ {
+ UInt32 flags = isAbs ? 0 : _my_SYMLINK_FLAG_RELATIVE;
+ Set32(p, flags);
+ p += 4;
+ }
+
+ if (add_Prefix_Len != 0)
+ WriteString(p + subOffs, k_LinkPrefix);
+ WriteString(p + subOffs + add_Prefix_Len * 2, path);
+ if (needPrintName)
+ WriteString(p + printOffs, path);
+ return true;
+}
+
+#endif
+
+static void GetString(const Byte *p, unsigned len, UString &res)
+{
+ wchar_t *s = res.GetBuf(len);
+ unsigned i;
+ for (i = 0; i < len; i++)
+ {
+ wchar_t c = Get16(p + i * 2);
+ if (c == 0)
+ break;
+ s[i] = c;
+ }
+ s[i] = 0;
+ res.ReleaseBuf_SetLen(i);
+}
+
+bool CReparseAttr::Parse(const Byte *p, size_t size)
+{
+ if (size < 8)
+ return false;
+ Tag = Get32(p);
+ UInt32 len = Get16(p + 4);
+ if (len + 8 > size)
+ return false;
+ /*
+ if ((type & kReparseFlags_Alias) == 0 ||
+ (type & kReparseFlags_Microsoft) == 0 ||
+ (type & 0xFFFF) != 3)
+ */
+ if (Tag != _my_IO_REPARSE_TAG_MOUNT_POINT &&
+ Tag != _my_IO_REPARSE_TAG_SYMLINK)
+ // return true;
+ return false;
+
+ if (Get16(p + 6) != 0) // padding
+ return false;
+
+ p += 8;
+ size -= 8;
+
+ if (len != size) // do we need that check?
+ return false;
+
+ if (len < 8)
+ return false;
+ unsigned subOffs = Get16(p);
+ unsigned subLen = Get16(p + 2);
+ unsigned printOffs = Get16(p + 4);
+ unsigned printLen = Get16(p + 6);
+ len -= 8;
+ p += 8;
+
+ Flags = 0;
+ if (Tag == _my_IO_REPARSE_TAG_SYMLINK)
+ {
+ if (len < 4)
+ return false;
+ Flags = Get32(p);
+ len -= 4;
+ p += 4;
+ }
+
+ if ((subOffs & 1) != 0 || subOffs > len || len - subOffs < subLen)
+ return false;
+ if ((printOffs & 1) != 0 || printOffs > len || len - printOffs < printLen)
+ return false;
+ GetString(p + subOffs, subLen >> 1, SubsName);
+ GetString(p + printOffs, printLen >> 1, PrintName);
+
+ return true;
+}
+
+bool CReparseShortInfo::Parse(const Byte *p, size_t size)
+{
+ const Byte *start = p;
+ Offset= 0;
+ Size = 0;
+ if (size < 8)
+ return false;
+ UInt32 Tag = Get32(p);
+ UInt32 len = Get16(p + 4);
+ if (len + 8 > size)
+ return false;
+ /*
+ if ((type & kReparseFlags_Alias) == 0 ||
+ (type & kReparseFlags_Microsoft) == 0 ||
+ (type & 0xFFFF) != 3)
+ */
+ if (Tag != _my_IO_REPARSE_TAG_MOUNT_POINT &&
+ Tag != _my_IO_REPARSE_TAG_SYMLINK)
+ // return true;
+ return false;
+
+ if (Get16(p + 6) != 0) // padding
+ return false;
+
+ p += 8;
+ size -= 8;
+
+ if (len != size) // do we need that check?
+ return false;
+
+ if (len < 8)
+ return false;
+ unsigned subOffs = Get16(p);
+ unsigned subLen = Get16(p + 2);
+ unsigned printOffs = Get16(p + 4);
+ unsigned printLen = Get16(p + 6);
+ len -= 8;
+ p += 8;
+
+ // UInt32 Flags = 0;
+ if (Tag == _my_IO_REPARSE_TAG_SYMLINK)
+ {
+ if (len < 4)
+ return false;
+ // Flags = Get32(p);
+ len -= 4;
+ p += 4;
+ }
+
+ if ((subOffs & 1) != 0 || subOffs > len || len - subOffs < subLen)
+ return false;
+ if ((printOffs & 1) != 0 || printOffs > len || len - printOffs < printLen)
+ return false;
+
+ Offset = (unsigned)(p - start) + subOffs;
+ Size = subLen;
+ return true;
+}
+
+bool CReparseAttr::IsOkNamePair() const
+{
+ if (IsLinkPrefix(SubsName))
+ {
+ if (!IsDrivePath(SubsName.Ptr(k_LinkPrefix_Size)))
+ return PrintName.IsEmpty();
+ if (wcscmp(SubsName.Ptr(k_LinkPrefix_Size), PrintName) == 0)
+ return true;
+ }
+ return wcscmp(SubsName, PrintName) == 0;
+}
+
+/*
+bool CReparseAttr::IsVolume() const
+{
+ if (!IsLinkPrefix(SubsName))
+ return false;
+ return IsVolumeName(SubsName.Ptr(k_LinkPrefix_Size));
+}
+*/
+
+UString CReparseAttr::GetPath() const
+{
+ UString s = SubsName;
+ if (IsLinkPrefix(s))
+ {
+ s.ReplaceOneCharAtPos(1, '\\');
+ if (IsDrivePath(s.Ptr(k_LinkPrefix_Size)))
+ s.DeleteFrontal(k_LinkPrefix_Size);
+ }
+ return s;
+}
+
+
+#ifdef SUPPORT_DEVICE_FILE
+
+namespace NSystem
+{
+bool MyGetDiskFreeSpace(CFSTR rootPath, UInt64 &clusterSize, UInt64 &totalSize, UInt64 &freeSize);
+}
+#endif
+
+#ifndef UNDER_CE
+
+namespace NIO {
+
+bool GetReparseData(CFSTR path, CByteBuffer &reparseData, BY_HANDLE_FILE_INFORMATION *fileInfo)
+{
+ reparseData.Free();
+ CInFile file;
+ if (!file.OpenReparse(path))
+ return false;
+
+ if (fileInfo)
+ file.GetFileInformation(fileInfo);
+
+ const unsigned kBufSize = MAXIMUM_REPARSE_DATA_BUFFER_SIZE;
+ CByteArr buf(kBufSize);
+ DWORD returnedSize;
+ if (!file.DeviceIoControlOut(my_FSCTL_GET_REPARSE_POINT, buf, kBufSize, &returnedSize))
+ return false;
+ reparseData.CopyFrom(buf, returnedSize);
+ return true;
+}
+
+static bool CreatePrefixDirOfFile(CFSTR path)
+{
+ FString path2 = path;
+ int pos = path2.ReverseFind_PathSepar();
+ if (pos < 0)
+ return true;
+ #ifdef _WIN32
+ if (pos == 2 && path2[1] == L':')
+ return true; // we don't create Disk folder;
+ #endif
+ path2.DeleteFrom(pos);
+ return NDir::CreateComplexDir(path2);
+}
+
+// If there is Reprase data already, it still writes new Reparse data
+bool SetReparseData(CFSTR path, bool isDir, const void *data, DWORD size)
+{
+ NFile::NFind::CFileInfo fi;
+ if (fi.Find(path))
+ {
+ if (fi.IsDir() != isDir)
+ {
+ ::SetLastError(ERROR_DIRECTORY);
+ return false;
+ }
+ }
+ else
+ {
+ if (isDir)
+ {
+ if (!NDir::CreateComplexDir(path))
+ return false;
+ }
+ else
+ {
+ CreatePrefixDirOfFile(path);
+ COutFile file;
+ if (!file.Create(path, CREATE_NEW))
+ return false;
+ }
+ }
+
+ COutFile file;
+ if (!file.Open(path,
+ FILE_SHARE_WRITE,
+ OPEN_EXISTING,
+ FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS))
+ return false;
+
+ DWORD returnedSize;
+ if (!file.DeviceIoControl(my_FSCTL_SET_REPARSE_POINT, (void *)data, size, NULL, 0, &returnedSize))
+ return false;
+ return true;
+}
+
+}
+
+#endif
+
+}}
diff --git a/3rdparty/lzma/CPP/Windows/FileMapping.cpp b/3rdparty/lzma/CPP/Windows/FileMapping.cpp
index 55048fdb239..1933f7c8b19 100644
--- a/3rdparty/lzma/CPP/Windows/FileMapping.cpp
+++ b/3rdparty/lzma/CPP/Windows/FileMapping.cpp
@@ -2,7 +2,7 @@
#include "StdAfx.h"
-#include "Windows/FileMapping.h"
+#include "FileMapping.h"
namespace NWindows {
namespace NFile {
diff --git a/3rdparty/lzma/CPP/Windows/FileMapping.h b/3rdparty/lzma/CPP/Windows/FileMapping.h
index 3f0ebd74cc6..f90c429f1d7 100644
--- a/3rdparty/lzma/CPP/Windows/FileMapping.h
+++ b/3rdparty/lzma/CPP/Windows/FileMapping.h
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_FILEMAPPING_H
#define __WINDOWS_FILEMAPPING_H
-#include "Common/Types.h"
+#include "../Common/MyTypes.h"
#include "Handle.h"
@@ -18,7 +18,11 @@ public:
return ::GetLastError();
}
- WRes Open(DWORD desiredAccess, LPCTSTR name)
+ WRes Open(DWORD
+ #ifndef UNDER_CE
+ desiredAccess
+ #endif
+ , LPCTSTR name)
{
#ifdef UNDER_CE
WRes res = Create(PAGE_READONLY, 0, name);
diff --git a/3rdparty/lzma/CPP/Windows/FileName.cpp b/3rdparty/lzma/CPP/Windows/FileName.cpp
index 8f464aa8681..382c2e56677 100644
--- a/3rdparty/lzma/CPP/Windows/FileName.cpp
+++ b/3rdparty/lzma/CPP/Windows/FileName.cpp
@@ -4,26 +4,826 @@
#include "FileName.h"
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
namespace NWindows {
namespace NFile {
namespace NName {
+#define IS_SEPAR(c) IS_PATH_SEPAR(c)
+
+int FindSepar(const wchar_t *s) throw()
+{
+ for (const wchar_t *p = s;; p++)
+ {
+ const wchar_t c = *p;
+ if (c == 0)
+ return -1;
+ if (IS_SEPAR(c))
+ return (int)(p - s);
+ }
+}
+
+#ifndef USE_UNICODE_FSTRING
+int FindSepar(const FChar *s) throw()
+{
+ for (const FChar *p = s;; p++)
+ {
+ const FChar c = *p;
+ if (c == 0)
+ return -1;
+ if (IS_SEPAR(c))
+ return (int)(p - s);
+ }
+}
+#endif
+
+#ifndef USE_UNICODE_FSTRING
void NormalizeDirPathPrefix(FString &dirPath)
{
if (dirPath.IsEmpty())
return;
- if (dirPath.ReverseFind(FCHAR_PATH_SEPARATOR) != dirPath.Length() - 1)
- dirPath += FCHAR_PATH_SEPARATOR;
+ if (!IsPathSepar(dirPath.Back()))
+ dirPath.Add_PathSepar();
}
+#endif
-#ifndef USE_UNICODE_FSTRING
void NormalizeDirPathPrefix(UString &dirPath)
{
if (dirPath.IsEmpty())
return;
- if (dirPath.ReverseFind(WCHAR_PATH_SEPARATOR) != dirPath.Length() - 1)
- dirPath += WCHAR_PATH_SEPARATOR;
+ if (!IsPathSepar(dirPath.Back()))
+ dirPath.Add_PathSepar();
+}
+
+#define IS_LETTER_CHAR(c) ((c) >= 'a' && (c) <= 'z' || (c) >= 'A' && (c) <= 'Z')
+
+bool IsDrivePath(const wchar_t *s) throw() { return IS_LETTER_CHAR(s[0]) && s[1] == ':' && IS_SEPAR(s[2]); }
+
+bool IsAltPathPrefix(CFSTR s) throw()
+{
+ unsigned len = MyStringLen(s);
+ if (len == 0)
+ return false;
+ if (s[len - 1] != ':')
+ return false;
+
+ #if defined(_WIN32) && !defined(UNDER_CE)
+ if (IsDevicePath(s))
+ return false;
+ if (IsSuperPath(s))
+ {
+ s += kSuperPathPrefixSize;
+ len -= kSuperPathPrefixSize;
+ }
+ if (len == 2 && IsDrivePath2(s))
+ return false;
+ #endif
+
+ return true;
+}
+
+#if defined(_WIN32) && !defined(UNDER_CE)
+
+const wchar_t *kSuperPathPrefix = L"\\\\?\\";
+static const wchar_t *kSuperUncPrefix = L"\\\\?\\UNC\\";
+
+#define IS_DEVICE_PATH(s) (IS_SEPAR((s)[0]) && IS_SEPAR((s)[1]) && (s)[2] == '.' && IS_SEPAR((s)[3]))
+#define IS_SUPER_PREFIX(s) (IS_SEPAR((s)[0]) && IS_SEPAR((s)[1]) && (s)[2] == '?' && IS_SEPAR((s)[3]))
+#define IS_SUPER_OR_DEVICE_PATH(s) (IS_SEPAR((s)[0]) && IS_SEPAR((s)[1]) && ((s)[2] == '?' || (s)[2] == '.') && IS_SEPAR((s)[3]))
+
+#define IS_UNC_WITH_SLASH(s) ( \
+ ((s)[0] == 'U' || (s)[0] == 'u') \
+ && ((s)[1] == 'N' || (s)[1] == 'n') \
+ && ((s)[2] == 'C' || (s)[2] == 'c') \
+ && IS_SEPAR((s)[3]))
+
+bool IsDevicePath(CFSTR s) throw()
+{
+ #ifdef UNDER_CE
+
+ s = s;
+ return false;
+ /*
+ // actually we don't know the way to open device file in WinCE.
+ unsigned len = MyStringLen(s);
+ if (len < 5 || len > 5 || memcmp(s, FTEXT("DSK"), 3 * sizeof(FChar)) != 0)
+ return false;
+ if (s[4] != ':')
+ return false;
+ // for reading use SG_REQ sg; if (DeviceIoControl(dsk, IOCTL_DISK_READ));
+ */
+
+ #else
+
+ if (!IS_DEVICE_PATH(s))
+ return false;
+ unsigned len = MyStringLen(s);
+ if (len == 6 && s[5] == ':')
+ return true;
+ if (len < 18 || len > 22 || memcmp(s + kDevicePathPrefixSize, FTEXT("PhysicalDrive"), 13 * sizeof(FChar)) != 0)
+ return false;
+ for (unsigned i = 17; i < len; i++)
+ if (s[i] < '0' || s[i] > '9')
+ return false;
+ return true;
+
+ #endif
+}
+
+bool IsSuperUncPath(CFSTR s) throw() { return (IS_SUPER_PREFIX(s) && IS_UNC_WITH_SLASH(s + kSuperPathPrefixSize)); }
+bool IsNetworkPath(CFSTR s) throw()
+{
+ if (!IS_SEPAR(s[0]) || !IS_SEPAR(s[1]))
+ return false;
+ if (IsSuperUncPath(s))
+ return true;
+ FChar c = s[2];
+ return (c != '.' && c != '?');
+}
+
+unsigned GetNetworkServerPrefixSize(CFSTR s) throw()
+{
+ if (!IS_SEPAR(s[0]) || !IS_SEPAR(s[1]))
+ return 0;
+ unsigned prefixSize = 2;
+ if (IsSuperUncPath(s))
+ prefixSize = kSuperUncPathPrefixSize;
+ else
+ {
+ FChar c = s[2];
+ if (c == '.' || c == '?')
+ return 0;
+ }
+ int pos = FindSepar(s + prefixSize);
+ if (pos < 0)
+ return 0;
+ return prefixSize + pos + 1;
+}
+
+bool IsNetworkShareRootPath(CFSTR s) throw()
+{
+ unsigned prefixSize = GetNetworkServerPrefixSize(s);
+ if (prefixSize == 0)
+ return false;
+ s += prefixSize;
+ int pos = FindSepar(s);
+ if (pos < 0)
+ return true;
+ return s[(unsigned)pos + 1] == 0;
+}
+
+static const unsigned kDrivePrefixSize = 3; /* c:\ */
+
+bool IsDrivePath2(const wchar_t *s) throw() { return IS_LETTER_CHAR(s[0]) && s[1] == ':'; }
+// bool IsDriveName2(const wchar_t *s) throw() { return IS_LETTER_CHAR(s[0]) && s[1] == ':' && s[2] == 0; }
+bool IsSuperPath(const wchar_t *s) throw() { return IS_SUPER_PREFIX(s); }
+bool IsSuperOrDevicePath(const wchar_t *s) throw() { return IS_SUPER_OR_DEVICE_PATH(s); }
+// bool IsSuperUncPath(const wchar_t *s) throw() { return (IS_SUPER_PREFIX(s) && IS_UNC_WITH_SLASH(s + kSuperPathPrefixSize)); }
+
+#ifndef USE_UNICODE_FSTRING
+bool IsDrivePath2(CFSTR s) throw() { return IS_LETTER_CHAR(s[0]) && s[1] == ':'; }
+// bool IsDriveName2(CFSTR s) throw() { return IS_LETTER_CHAR(s[0]) && s[1] == ':' && s[2] == 0; }
+bool IsDrivePath(CFSTR s) throw() { return IS_LETTER_CHAR(s[0]) && s[1] == ':' && IS_SEPAR(s[2]); }
+bool IsSuperPath(CFSTR s) throw() { return IS_SUPER_PREFIX(s); }
+bool IsSuperOrDevicePath(CFSTR s) throw() { return IS_SUPER_OR_DEVICE_PATH(s); }
+#endif // USE_UNICODE_FSTRING
+
+/*
+bool IsDrivePath_SuperAllowed(CFSTR s)
+{
+ if (IsSuperPath(s))
+ s += kSuperPathPrefixSize;
+ return IsDrivePath(s);
+}
+*/
+
+bool IsDriveRootPath_SuperAllowed(CFSTR s) throw()
+{
+ if (IsSuperPath(s))
+ s += kSuperPathPrefixSize;
+ return IsDrivePath(s) && s[kDrivePrefixSize] == 0;
+}
+
+bool IsAbsolutePath(const wchar_t *s) throw()
+{
+ return IS_SEPAR(s[0]) || IsDrivePath2(s);
+}
+
+int FindAltStreamColon(CFSTR path)
+{
+ unsigned i = 0;
+ if (IsDrivePath2(path))
+ i = 2;
+ int colonPos = -1;
+ for (;; i++)
+ {
+ FChar c = path[i];
+ if (c == 0)
+ return colonPos;
+ if (c == ':')
+ {
+ if (colonPos < 0)
+ colonPos = i;
+ continue;
+ }
+ if (IS_SEPAR(c))
+ colonPos = -1;
+ }
+}
+
+#ifndef USE_UNICODE_FSTRING
+
+static unsigned GetRootPrefixSize_Of_NetworkPath(CFSTR s)
+{
+ // Network path: we look "server\path\" as root prefix
+ int pos = FindSepar(s);
+ if (pos < 0)
+ return 0;
+ int pos2 = FindSepar(s + (unsigned)pos + 1);
+ if (pos2 < 0)
+ return 0;
+ return pos + pos2 + 2;
+}
+
+static unsigned GetRootPrefixSize_Of_SimplePath(CFSTR s)
+{
+ if (IsDrivePath(s))
+ return kDrivePrefixSize;
+ if (!IS_SEPAR(s[0]))
+ return 0;
+ if (s[1] == 0 || !IS_SEPAR(s[1]))
+ return 1;
+ unsigned size = GetRootPrefixSize_Of_NetworkPath(s + 2);
+ return (size == 0) ? 0 : 2 + size;
+}
+
+static unsigned GetRootPrefixSize_Of_SuperPath(CFSTR s)
+{
+ if (IS_UNC_WITH_SLASH(s + kSuperPathPrefixSize))
+ {
+ unsigned size = GetRootPrefixSize_Of_NetworkPath(s + kSuperUncPathPrefixSize);
+ return (size == 0) ? 0 : kSuperUncPathPrefixSize + size;
+ }
+ // we support \\?\c:\ paths and volume GUID paths \\?\Volume{GUID}\"
+ int pos = FindSepar(s + kSuperPathPrefixSize);
+ if (pos < 0)
+ return 0;
+ return kSuperPathPrefixSize + pos + 1;
+}
+
+unsigned GetRootPrefixSize(CFSTR s)
+{
+ if (IS_DEVICE_PATH(s))
+ return kDevicePathPrefixSize;
+ if (IsSuperPath(s))
+ return GetRootPrefixSize_Of_SuperPath(s);
+ return GetRootPrefixSize_Of_SimplePath(s);
+}
+
+#endif // USE_UNICODE_FSTRING
+
+static unsigned GetRootPrefixSize_Of_NetworkPath(const wchar_t *s)
+{
+ // Network path: we look "server\path\" as root prefix
+ int pos = FindSepar(s);
+ if (pos < 0)
+ return 0;
+ int pos2 = FindSepar(s + (unsigned)pos + 1);
+ if (pos2 < 0)
+ return 0;
+ return pos + pos2 + 2;
+}
+
+static unsigned GetRootPrefixSize_Of_SimplePath(const wchar_t *s)
+{
+ if (IsDrivePath(s))
+ return kDrivePrefixSize;
+ if (!IS_SEPAR(s[0]))
+ return 0;
+ if (s[1] == 0 || !IS_SEPAR(s[1]))
+ return 1;
+ unsigned size = GetRootPrefixSize_Of_NetworkPath(s + 2);
+ return (size == 0) ? 0 : 2 + size;
+}
+
+static unsigned GetRootPrefixSize_Of_SuperPath(const wchar_t *s)
+{
+ if (IS_UNC_WITH_SLASH(s + kSuperPathPrefixSize))
+ {
+ unsigned size = GetRootPrefixSize_Of_NetworkPath(s + kSuperUncPathPrefixSize);
+ return (size == 0) ? 0 : kSuperUncPathPrefixSize + size;
+ }
+ // we support \\?\c:\ paths and volume GUID paths \\?\Volume{GUID}\"
+ int pos = FindSepar(s + kSuperPathPrefixSize);
+ if (pos < 0)
+ return 0;
+ return kSuperPathPrefixSize + pos + 1;
}
+
+unsigned GetRootPrefixSize(const wchar_t *s) throw()
+{
+ if (IS_DEVICE_PATH(s))
+ return kDevicePathPrefixSize;
+ if (IsSuperPath(s))
+ return GetRootPrefixSize_Of_SuperPath(s);
+ return GetRootPrefixSize_Of_SimplePath(s);
+}
+
+#else // _WIN32
+
+bool IsAbsolutePath(const wchar_t *s) { return IS_SEPAR(s[0]); }
+
+#ifndef USE_UNICODE_FSTRING
+unsigned GetRootPrefixSize(CFSTR s) { return IS_SEPAR(s[0]) ? 1 : 0; }
#endif
+unsigned GetRootPrefixSize(const wchar_t *s) { return IS_SEPAR(s[0]) ? 1 : 0; }
+
+#endif // _WIN32
+
+
+#ifndef UNDER_CE
+
+static bool GetCurDir(UString &path)
+{
+ path.Empty();
+ DWORD needLength;
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ TCHAR s[MAX_PATH + 2];
+ s[0] = 0;
+ needLength = ::GetCurrentDirectory(MAX_PATH + 1, s);
+ path = fs2us(fas2fs(s));
+ }
+ else
+ #endif
+ {
+ WCHAR s[MAX_PATH + 2];
+ s[0] = 0;
+ needLength = ::GetCurrentDirectoryW(MAX_PATH + 1, s);
+ path = s;
+ }
+ return (needLength > 0 && needLength <= MAX_PATH);
+}
+
+static bool ResolveDotsFolders(UString &s)
+{
+ #ifdef _WIN32
+ // s.Replace(L'/', WCHAR_PATH_SEPARATOR);
+ #endif
+ for (unsigned i = 0;;)
+ {
+ wchar_t c = s[i];
+ if (c == 0)
+ return true;
+ if (c == '.' && (i == 0 || IS_SEPAR(s[i - 1])))
+ {
+ wchar_t c1 = s[i + 1];
+ if (c1 == '.')
+ {
+ wchar_t c2 = s[i + 2];
+ if (IS_SEPAR(c2) || c2 == 0)
+ {
+ if (i == 0)
+ return false;
+ int k = i - 2;
+ for (; k >= 0; k--)
+ if (IS_SEPAR(s[(unsigned)k]))
+ break;
+ unsigned num;
+ if (k >= 0)
+ {
+ num = i + 2 - k;
+ i = k;
+ }
+ else
+ {
+ num = (c2 == 0 ? (i + 2) : (i + 3));
+ i = 0;
+ }
+ s.Delete(i, num);
+ continue;
+ }
+ }
+ else
+ {
+ if (IS_SEPAR(c1) || c1 == 0)
+ {
+ unsigned num = 2;
+ if (i != 0)
+ i--;
+ else if (c1 == 0)
+ num = 1;
+ s.Delete(i, num);
+ continue;
+ }
+ }
+ }
+ i++;
+ }
+}
+
+#endif // UNDER_CE
+
+#define LONG_PATH_DOTS_FOLDERS_PARSING
+
+
+/*
+Windows (at least 64-bit XP) can't resolve "." or ".." in paths that start with SuperPrefix \\?\
+To solve that problem we check such path:
+ - super path contains "." or ".." - we use kSuperPathType_UseOnlySuper
+ - super path doesn't contain "." or ".." - we use kSuperPathType_UseOnlyMain
+*/
+#ifdef LONG_PATH_DOTS_FOLDERS_PARSING
+#ifndef UNDER_CE
+static bool AreThereDotsFolders(CFSTR s)
+{
+ for (unsigned i = 0;; i++)
+ {
+ FChar c = s[i];
+ if (c == 0)
+ return false;
+ if (c == '.' && (i == 0 || IS_SEPAR(s[i - 1])))
+ {
+ FChar c1 = s[i + 1];
+ if (c1 == 0 || IS_SEPAR(c1) ||
+ (c1 == '.' && (s[i + 2] == 0 || IS_SEPAR(s[i + 2]))))
+ return true;
+ }
+ }
+}
+#endif
+#endif // LONG_PATH_DOTS_FOLDERS_PARSING
+
+#ifdef WIN_LONG_PATH
+
+/*
+Most of Windows versions have problems, if some file or dir name
+contains '.' or ' ' at the end of name (Bad Path).
+To solve that problem, we always use Super Path ("\\?\" prefix and full path)
+in such cases. Note that "." and ".." are not bad names.
+
+There are 3 cases:
+ 1) If the path is already Super Path, we use that path
+ 2) If the path is not Super Path :
+ 2.1) Bad Path; we use only Super Path.
+ 2.2) Good Path; we use Main Path. If it fails, we use Super Path.
+
+ NeedToUseOriginalPath returns:
+ kSuperPathType_UseOnlyMain : Super already
+ kSuperPathType_UseOnlySuper : not Super, Bad Path
+ kSuperPathType_UseMainAndSuper : not Super, Good Path
+*/
+
+int GetUseSuperPathType(CFSTR s) throw()
+{
+ if (IsSuperOrDevicePath(s))
+ {
+ #ifdef LONG_PATH_DOTS_FOLDERS_PARSING
+ if ((s)[2] != '.')
+ if (AreThereDotsFolders(s + kSuperPathPrefixSize))
+ return kSuperPathType_UseOnlySuper;
+ #endif
+ return kSuperPathType_UseOnlyMain;
+ }
+
+ for (unsigned i = 0;; i++)
+ {
+ FChar c = s[i];
+ if (c == 0)
+ return kSuperPathType_UseMainAndSuper;
+ if (c == '.' || c == ' ')
+ {
+ FChar c2 = s[i + 1];
+ if (c2 == 0 || IS_SEPAR(c2))
+ {
+ // if it's "." or "..", it's not bad name.
+ if (c == '.')
+ {
+ if (i == 0 || IS_SEPAR(s[i - 1]))
+ continue;
+ if (s[i - 1] == '.')
+ {
+ if (i - 1 == 0 || IS_SEPAR(s[i - 2]))
+ continue;
+ }
+ }
+ return kSuperPathType_UseOnlySuper;
+ }
+ }
+ }
+}
+
+
+/*
+ returns false in two cases:
+ - if GetCurDir was used, and GetCurDir returned error.
+ - if we can't resolve ".." name.
+ if path is ".", "..", res is empty.
+ if it's Super Path already, res is empty.
+ for \**** , and if GetCurDir is not drive (c:\), res is empty
+ for absolute paths, returns true, res is Super path.
+*/
+
+
+static bool GetSuperPathBase(CFSTR s, UString &res)
+{
+ res.Empty();
+
+ FChar c = s[0];
+ if (c == 0)
+ return true;
+ if (c == '.' && (s[1] == 0 || (s[1] == '.' && s[2] == 0)))
+ return true;
+
+ if (IsSuperOrDevicePath(s))
+ {
+ #ifdef LONG_PATH_DOTS_FOLDERS_PARSING
+
+ if ((s)[2] == '.')
+ return true;
+
+ // we will return true here, so we will try to use these problem paths.
+
+ if (!AreThereDotsFolders(s + kSuperPathPrefixSize))
+ return true;
+
+ UString temp = fs2us(s);
+ unsigned fixedSize = GetRootPrefixSize_Of_SuperPath(temp);
+ if (fixedSize == 0)
+ return true;
+
+ UString rem = &temp[fixedSize];
+ if (!ResolveDotsFolders(rem))
+ return true;
+
+ temp.DeleteFrom(fixedSize);
+ res += temp;
+ res += rem;
+
+ #endif
+
+ return true;
+ }
+
+ if (IS_SEPAR(c))
+ {
+ if (IS_SEPAR(s[1]))
+ {
+ UString temp = fs2us(s + 2);
+ unsigned fixedSize = GetRootPrefixSize_Of_NetworkPath(temp);
+ // we ignore that error to allow short network paths server\share?
+ /*
+ if (fixedSize == 0)
+ return false;
+ */
+ UString rem = &temp[fixedSize];
+ if (!ResolveDotsFolders(rem))
+ return false;
+ res += kSuperUncPrefix;
+ temp.DeleteFrom(fixedSize);
+ res += temp;
+ res += rem;
+ return true;
+ }
+ }
+ else
+ {
+ if (IsDrivePath2(s))
+ {
+ UString temp = fs2us(s);
+ unsigned prefixSize = 2;
+ if (IsDrivePath(s))
+ prefixSize = kDrivePrefixSize;
+ UString rem = temp.Ptr(prefixSize);
+ if (!ResolveDotsFolders(rem))
+ return true;
+ res += kSuperPathPrefix;
+ temp.DeleteFrom(prefixSize);
+ res += temp;
+ res += rem;
+ return true;
+ }
+ }
+
+ UString curDir;
+ if (!GetCurDir(curDir))
+ return false;
+ NormalizeDirPathPrefix(curDir);
+
+ unsigned fixedSizeStart = 0;
+ unsigned fixedSize = 0;
+ const wchar_t *superMarker = NULL;
+ if (IsSuperPath(curDir))
+ {
+ fixedSize = GetRootPrefixSize_Of_SuperPath(curDir);
+ if (fixedSize == 0)
+ return false;
+ }
+ else
+ {
+ if (IsDrivePath(curDir))
+ {
+ superMarker = kSuperPathPrefix;
+ fixedSize = kDrivePrefixSize;
+ }
+ else
+ {
+ if (!IsPathSepar(curDir[0]) || !IsPathSepar(curDir[1]))
+ return false;
+ fixedSizeStart = 2;
+ fixedSize = GetRootPrefixSize_Of_NetworkPath(curDir.Ptr(2));
+ if (fixedSize == 0)
+ return false;
+ superMarker = kSuperUncPrefix;
+ }
+ }
+
+ UString temp;
+ if (IS_SEPAR(c))
+ {
+ temp = fs2us(s + 1);
+ }
+ else
+ {
+ temp += &curDir[fixedSizeStart + fixedSize];
+ temp += fs2us(s);
+ }
+ if (!ResolveDotsFolders(temp))
+ return false;
+ if (superMarker)
+ res += superMarker;
+ res += curDir.Mid(fixedSizeStart, fixedSize);
+ res += temp;
+ return true;
+}
+
+
+/*
+ In that case if GetSuperPathBase doesn't return new path, we don't need
+ to use same path that was used as main path
+
+ GetSuperPathBase superPath.IsEmpty() onlyIfNew
+ false * * GetCurDir Error
+ true false * use Super path
+ true true true don't use any path, we already used mainPath
+ true true false use main path as Super Path, we don't try mainMath
+ That case is possible now if GetCurDir returns unknow
+ type of path (not drive and not network)
+
+ We can change that code if we want to try mainPath, if GetSuperPathBase returns error,
+ and we didn't try mainPath still.
+ If we want to work that way, we don't need to use GetSuperPathBase return code.
+*/
+
+bool GetSuperPath(CFSTR path, UString &superPath, bool onlyIfNew)
+{
+ if (GetSuperPathBase(path, superPath))
+ {
+ if (superPath.IsEmpty())
+ {
+ // actually the only possible when onlyIfNew == true and superPath is empty
+ // is case when
+
+ if (onlyIfNew)
+ return false;
+ superPath = fs2us(path);
+ }
+ return true;
+ }
+ return false;
+}
+
+bool GetSuperPaths(CFSTR s1, CFSTR s2, UString &d1, UString &d2, bool onlyIfNew)
+{
+ if (!GetSuperPathBase(s1, d1) ||
+ !GetSuperPathBase(s2, d2))
+ return false;
+ if (d1.IsEmpty() && d2.IsEmpty() && onlyIfNew)
+ return false;
+ if (d1.IsEmpty()) d1 = fs2us(s1);
+ if (d2.IsEmpty()) d2 = fs2us(s2);
+ return true;
+}
+
+
+/*
+// returns true, if we need additional use with New Super path.
+bool GetSuperPath(CFSTR path, UString &superPath)
+{
+ if (GetSuperPathBase(path, superPath))
+ return !superPath.IsEmpty();
+ return false;
+}
+*/
+#endif // WIN_LONG_PATH
+
+bool GetFullPath(CFSTR dirPrefix, CFSTR s, FString &res)
+{
+ res = s;
+
+ #ifdef UNDER_CE
+
+ if (!IS_SEPAR(s[0]))
+ {
+ if (!dirPrefix)
+ return false;
+ res = dirPrefix;
+ res += s;
+ }
+
+ #else
+
+ unsigned prefixSize = GetRootPrefixSize(s);
+ if (prefixSize != 0)
+ {
+ if (!AreThereDotsFolders(s + prefixSize))
+ return true;
+
+ UString rem = fs2us(s + prefixSize);
+ if (!ResolveDotsFolders(rem))
+ return true; // maybe false;
+ res.DeleteFrom(prefixSize);
+ res += us2fs(rem);
+ return true;
+ }
+
+ /*
+ FChar c = s[0];
+ if (c == 0)
+ return true;
+ if (c == '.' && (s[1] == 0 || (s[1] == '.' && s[2] == 0)))
+ return true;
+ if (IS_SEPAR(c) && IS_SEPAR(s[1]))
+ return true;
+ if (IsDrivePath(s))
+ return true;
+ */
+
+ UString curDir;
+ if (dirPrefix)
+ curDir = fs2us(dirPrefix);
+ else
+ {
+ if (!GetCurDir(curDir))
+ return false;
+ }
+ NormalizeDirPathPrefix(curDir);
+
+ unsigned fixedSize = 0;
+
+ #ifdef _WIN32
+
+ if (IsSuperPath(curDir))
+ {
+ fixedSize = GetRootPrefixSize_Of_SuperPath(curDir);
+ if (fixedSize == 0)
+ return false;
+ }
+ else
+ {
+ if (IsDrivePath(curDir))
+ fixedSize = kDrivePrefixSize;
+ else
+ {
+ if (!IsPathSepar(curDir[0]) || !IsPathSepar(curDir[1]))
+ return false;
+ fixedSize = GetRootPrefixSize_Of_NetworkPath(curDir.Ptr(2));
+ if (fixedSize == 0)
+ return false;
+ fixedSize += 2;
+ }
+ }
+
+ #endif // _WIN32
+
+ UString temp;
+ if (IS_SEPAR(s[0]))
+ {
+ temp = fs2us(s + 1);
+ }
+ else
+ {
+ temp += curDir.Ptr(fixedSize);
+ temp += fs2us(s);
+ }
+ if (!ResolveDotsFolders(temp))
+ return false;
+ curDir.DeleteFrom(fixedSize);
+ res = us2fs(curDir);
+ res += us2fs(temp);
+
+ #endif // UNDER_CE
+
+ return true;
+}
+
+bool GetFullPath(CFSTR path, FString &fullPath)
+{
+ return GetFullPath(NULL, path, fullPath);
+}
}}}
diff --git a/3rdparty/lzma/CPP/Windows/FileName.h b/3rdparty/lzma/CPP/Windows/FileName.h
index 9ee57f9da17..6f9b6e03932 100644
--- a/3rdparty/lzma/CPP/Windows/FileName.h
+++ b/3rdparty/lzma/CPP/Windows/FileName.h
@@ -9,9 +9,107 @@ namespace NWindows {
namespace NFile {
namespace NName {
+int FindSepar(const wchar_t *s) throw();
+#ifndef USE_UNICODE_FSTRING
+int FindSepar(const FChar *s) throw();
+#endif
+
void NormalizeDirPathPrefix(FString &dirPath); // ensures that it ended with '\\', if dirPath is not epmty
void NormalizeDirPathPrefix(UString &dirPath);
+bool IsDrivePath(const wchar_t *s) throw(); // first 3 chars are drive chars like "a:\\"
+
+bool IsAltPathPrefix(CFSTR s) throw(); /* name: */
+
+#if defined(_WIN32) && !defined(UNDER_CE)
+
+extern const wchar_t *kSuperPathPrefix; /* \\?\ */
+const unsigned kDevicePathPrefixSize = 4;
+const unsigned kSuperPathPrefixSize = 4;
+const unsigned kSuperUncPathPrefixSize = kSuperPathPrefixSize + 4;
+
+bool IsDevicePath(CFSTR s) throw(); /* \\.\ */
+bool IsSuperUncPath(CFSTR s) throw(); /* \\?\UNC\ */
+bool IsNetworkPath(CFSTR s) throw(); /* \\?\UNC\ or \\SERVER */
+
+/* GetNetworkServerPrefixSize() returns size of server prefix:
+ \\?\UNC\SERVER\
+ \\SERVER\
+ in another cases it returns 0
+*/
+
+unsigned GetNetworkServerPrefixSize(CFSTR s) throw();
+
+bool IsNetworkShareRootPath(CFSTR s) throw(); /* \\?\UNC\SERVER\share or \\SERVER\share or with slash */
+
+// bool IsDrivePath_SuperAllowed(CFSTR s) throw(); // first chars are drive chars like "a:\" or "\\?\a:\"
+bool IsDriveRootPath_SuperAllowed(CFSTR s) throw(); // exact drive root path "a:\" or "\\?\a:\"
+
+bool IsDrivePath2(const wchar_t *s) throw(); // first 2 chars are drive chars like "a:"
+// bool IsDriveName2(const wchar_t *s) throw(); // is drive name like "a:"
+bool IsSuperPath(const wchar_t *s) throw();
+bool IsSuperOrDevicePath(const wchar_t *s) throw();
+
+#ifndef USE_UNICODE_FSTRING
+bool IsDrivePath2(CFSTR s) throw(); // first 2 chars are drive chars like "a:"
+// bool IsDriveName2(CFSTR s) throw(); // is drive name like "a:"
+bool IsDrivePath(CFSTR s) throw();
+bool IsSuperPath(CFSTR s) throw();
+bool IsSuperOrDevicePath(CFSTR s) throw();
+
+/* GetRootPrefixSize() returns size of ROOT PREFIX for cases:
+ \
+ \\.\
+ C:\
+ \\?\C:\
+ \\?\UNC\SERVER\Shared\
+ \\SERVER\Shared\
+ in another cases it returns 0
+*/
+
+unsigned GetRootPrefixSize(CFSTR s) throw();
+
+#endif
+
+int FindAltStreamColon(CFSTR path);
+
+#endif // _WIN32
+
+bool IsAbsolutePath(const wchar_t *s) throw();
+unsigned GetRootPrefixSize(const wchar_t *s) throw();
+
+#ifdef WIN_LONG_PATH
+
+const int kSuperPathType_UseOnlyMain = 0;
+const int kSuperPathType_UseOnlySuper = 1;
+const int kSuperPathType_UseMainAndSuper = 2;
+
+int GetUseSuperPathType(CFSTR s) throw();
+bool GetSuperPath(CFSTR path, UString &superPath, bool onlyIfNew);
+bool GetSuperPaths(CFSTR s1, CFSTR s2, UString &d1, UString &d2, bool onlyIfNew);
+
+#define USE_MAIN_PATH (__useSuperPathType != kSuperPathType_UseOnlySuper)
+#define USE_MAIN_PATH_2 (__useSuperPathType1 != kSuperPathType_UseOnlySuper && __useSuperPathType2 != kSuperPathType_UseOnlySuper)
+
+#define USE_SUPER_PATH (__useSuperPathType != kSuperPathType_UseOnlyMain)
+#define USE_SUPER_PATH_2 (__useSuperPathType1 != kSuperPathType_UseOnlyMain || __useSuperPathType2 != kSuperPathType_UseOnlyMain)
+
+#define IF_USE_MAIN_PATH int __useSuperPathType = GetUseSuperPathType(path); if (USE_MAIN_PATH)
+#define IF_USE_MAIN_PATH_2(x1, x2) \
+ int __useSuperPathType1 = GetUseSuperPathType(x1); \
+ int __useSuperPathType2 = GetUseSuperPathType(x2); \
+ if (USE_MAIN_PATH_2)
+
+#else
+
+#define IF_USE_MAIN_PATH
+#define IF_USE_MAIN_PATH_2(x1, x2)
+
+#endif // WIN_LONG_PATH
+
+bool GetFullPath(CFSTR dirPrefix, CFSTR path, FString &fullPath);
+bool GetFullPath(CFSTR path, FString &fullPath);
+
}}}
#endif
diff --git a/3rdparty/lzma/CPP/Windows/FileSystem.cpp b/3rdparty/lzma/CPP/Windows/FileSystem.cpp
new file mode 100644
index 00000000000..6c1f48a206c
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/FileSystem.cpp
@@ -0,0 +1,131 @@
+// Windows/FileSystem.cpp
+
+#include "StdAfx.h"
+
+#ifndef UNDER_CE
+
+#ifndef _UNICODE
+#include "../Common/StringConvert.h"
+#endif
+
+#include "FileSystem.h"
+#include "Defs.h"
+
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+namespace NFile {
+namespace NSystem {
+
+bool MyGetVolumeInformation(
+ CFSTR rootPath,
+ UString &volumeName,
+ LPDWORD volumeSerialNumber,
+ LPDWORD maximumComponentLength,
+ LPDWORD fileSystemFlags,
+ UString &fileSystemName)
+{
+ BOOL res;
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ TCHAR v[MAX_PATH + 2]; v[0] = 0;
+ TCHAR f[MAX_PATH + 2]; f[0] = 0;
+ res = GetVolumeInformation(fs2fas(rootPath),
+ v, MAX_PATH,
+ volumeSerialNumber, maximumComponentLength, fileSystemFlags,
+ f, MAX_PATH);
+ volumeName = MultiByteToUnicodeString(v);
+ fileSystemName = MultiByteToUnicodeString(f);
+ }
+ else
+ #endif
+ {
+ WCHAR v[MAX_PATH + 2]; v[0] = 0;
+ WCHAR f[MAX_PATH + 2]; f[0] = 0;
+ res = GetVolumeInformationW(fs2us(rootPath),
+ v, MAX_PATH,
+ volumeSerialNumber, maximumComponentLength, fileSystemFlags,
+ f, MAX_PATH);
+ volumeName = v;
+ fileSystemName = f;
+ }
+ return BOOLToBool(res);
+}
+
+UINT MyGetDriveType(CFSTR pathName)
+{
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ return GetDriveType(fs2fas(pathName));
+ }
+ else
+ #endif
+ {
+ return GetDriveTypeW(fs2us(pathName));
+ }
+}
+
+typedef BOOL (WINAPI * GetDiskFreeSpaceExA_Pointer)(
+ LPCSTR lpDirectoryName, // directory name
+ PULARGE_INTEGER lpFreeBytesAvailable, // bytes available to caller
+ PULARGE_INTEGER lpTotalNumberOfBytes, // bytes on disk
+ PULARGE_INTEGER lpTotalNumberOfFreeBytes // free bytes on disk
+);
+
+typedef BOOL (WINAPI * GetDiskFreeSpaceExW_Pointer)(
+ LPCWSTR lpDirectoryName, // directory name
+ PULARGE_INTEGER lpFreeBytesAvailable, // bytes available to caller
+ PULARGE_INTEGER lpTotalNumberOfBytes, // bytes on disk
+ PULARGE_INTEGER lpTotalNumberOfFreeBytes // free bytes on disk
+);
+
+bool MyGetDiskFreeSpace(CFSTR rootPath, UInt64 &clusterSize, UInt64 &totalSize, UInt64 &freeSize)
+{
+ DWORD numSectorsPerCluster, bytesPerSector, numFreeClusters, numClusters;
+ bool sizeIsDetected = false;
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ GetDiskFreeSpaceExA_Pointer pGetDiskFreeSpaceEx = (GetDiskFreeSpaceExA_Pointer)GetProcAddress(
+ GetModuleHandle(TEXT("kernel32.dll")), "GetDiskFreeSpaceExA");
+ if (pGetDiskFreeSpaceEx)
+ {
+ ULARGE_INTEGER freeBytesToCaller2, totalSize2, freeSize2;
+ sizeIsDetected = BOOLToBool(pGetDiskFreeSpaceEx(fs2fas(rootPath), &freeBytesToCaller2, &totalSize2, &freeSize2));
+ totalSize = totalSize2.QuadPart;
+ freeSize = freeSize2.QuadPart;
+ }
+ if (!::GetDiskFreeSpace(fs2fas(rootPath), &numSectorsPerCluster, &bytesPerSector, &numFreeClusters, &numClusters))
+ return false;
+ }
+ else
+ #endif
+ {
+ GetDiskFreeSpaceExW_Pointer pGetDiskFreeSpaceEx = (GetDiskFreeSpaceExW_Pointer)GetProcAddress(
+ GetModuleHandle(TEXT("kernel32.dll")), "GetDiskFreeSpaceExW");
+ if (pGetDiskFreeSpaceEx)
+ {
+ ULARGE_INTEGER freeBytesToCaller2, totalSize2, freeSize2;
+ sizeIsDetected = BOOLToBool(pGetDiskFreeSpaceEx(fs2us(rootPath), &freeBytesToCaller2, &totalSize2, &freeSize2));
+ totalSize = totalSize2.QuadPart;
+ freeSize = freeSize2.QuadPart;
+ }
+ if (!::GetDiskFreeSpaceW(fs2us(rootPath), &numSectorsPerCluster, &bytesPerSector, &numFreeClusters, &numClusters))
+ return false;
+ }
+ clusterSize = (UInt64)bytesPerSector * (UInt64)numSectorsPerCluster;
+ if (!sizeIsDetected)
+ {
+ totalSize = clusterSize * (UInt64)numClusters;
+ freeSize = clusterSize * (UInt64)numFreeClusters;
+ }
+ return true;
+}
+
+}}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/FileSystem.h b/3rdparty/lzma/CPP/Windows/FileSystem.h
new file mode 100644
index 00000000000..9076ea13f4f
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/FileSystem.h
@@ -0,0 +1,27 @@
+// Windows/FileSystem.h
+
+#ifndef __WINDOWS_FILE_SYSTEM_H
+#define __WINDOWS_FILE_SYSTEM_H
+
+#include "../Common/MyString.h"
+#include "../Common/MyTypes.h"
+
+namespace NWindows {
+namespace NFile {
+namespace NSystem {
+
+bool MyGetVolumeInformation(
+ CFSTR rootPath ,
+ UString &volumeName,
+ LPDWORD volumeSerialNumber,
+ LPDWORD maximumComponentLength,
+ LPDWORD fileSystemFlags,
+ UString &fileSystemName);
+
+UINT MyGetDriveType(CFSTR pathName);
+
+bool MyGetDiskFreeSpace(CFSTR rootPath, UInt64 &clusterSize, UInt64 &totalSize, UInt64 &freeSize);
+
+}}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/MemoryLock.cpp b/3rdparty/lzma/CPP/Windows/MemoryLock.cpp
index e0f43099672..b628a03e8f9 100644
--- a/3rdparty/lzma/CPP/Windows/MemoryLock.cpp
+++ b/3rdparty/lzma/CPP/Windows/MemoryLock.cpp
@@ -1,81 +1,71 @@
-// Common/MemoryLock.cpp
+// Windows/MemoryLock.cpp
#include "StdAfx.h"
+#include "MemoryLock.h"
+
namespace NWindows {
namespace NSecurity {
#ifndef UNDER_CE
-#ifndef _UNICODE
-typedef BOOL (WINAPI * OpenProcessTokenP)(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle);
-typedef BOOL (WINAPI * LookupPrivilegeValueP)(LPCTSTR lpSystemName, LPCTSTR lpName, PLUID lpLuid);
-typedef BOOL (WINAPI * AdjustTokenPrivilegesP)(HANDLE TokenHandle, BOOL DisableAllPrivileges,
- PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState,PDWORD ReturnLength);
-#endif
-
#ifdef _UNICODE
-bool EnableLockMemoryPrivilege(
+#define MY_FUNC_SELECT(f) :: f
#else
-static bool EnableLockMemoryPrivilege2(HMODULE hModule,
+#define MY_FUNC_SELECT(f) my_ ## f
+extern "C" {
+typedef BOOL (WINAPI * Func_OpenProcessToken)(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle);
+typedef BOOL (WINAPI * Func_LookupPrivilegeValue)(LPCTSTR lpSystemName, LPCTSTR lpName, PLUID lpLuid);
+typedef BOOL (WINAPI * Func_AdjustTokenPrivileges)(HANDLE TokenHandle, BOOL DisableAllPrivileges,
+ PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength);
+}
+#define GET_PROC_ADDR(fff, name) Func_ ## fff my_ ## fff = (Func_ ## fff)GetProcAddress(hModule, name)
#endif
-bool enable)
+
+bool EnablePrivilege(LPCTSTR privilegeName, bool enable)
{
+ bool res = false;
+
#ifndef _UNICODE
+
+ HMODULE hModule = ::LoadLibrary(TEXT("Advapi32.dll"));
if (hModule == NULL)
return false;
- OpenProcessTokenP openProcessToken = (OpenProcessTokenP)GetProcAddress(hModule, "OpenProcessToken");
- LookupPrivilegeValueP lookupPrivilegeValue = (LookupPrivilegeValueP)GetProcAddress(hModule, "LookupPrivilegeValueA" );
- AdjustTokenPrivilegesP adjustTokenPrivileges = (AdjustTokenPrivilegesP)GetProcAddress(hModule, "AdjustTokenPrivileges");
- if (openProcessToken == NULL || adjustTokenPrivileges == NULL || lookupPrivilegeValue == NULL)
- return false;
+
+ GET_PROC_ADDR(OpenProcessToken, "OpenProcessToken");
+ GET_PROC_ADDR(LookupPrivilegeValue, "LookupPrivilegeValueA");
+ GET_PROC_ADDR(AdjustTokenPrivileges, "AdjustTokenPrivileges");
+
+ if (my_OpenProcessToken &&
+ my_AdjustTokenPrivileges &&
+ my_LookupPrivilegeValue)
+
#endif
- HANDLE token;
- if (!
- #ifdef _UNICODE
- ::OpenProcessToken
- #else
- openProcessToken
- #endif
- (::GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &token))
- return false;
- TOKEN_PRIVILEGES tp;
- bool res = false;
- if (
- #ifdef _UNICODE
- ::LookupPrivilegeValue
- #else
- lookupPrivilegeValue
- #endif
- (NULL, SE_LOCK_MEMORY_NAME, &(tp.Privileges[0].Luid)))
{
- tp.PrivilegeCount = 1;
- tp.Privileges[0].Attributes = enable ? SE_PRIVILEGE_ENABLED: 0;
- if (
- #ifdef _UNICODE
- ::AdjustTokenPrivileges
- #else
- adjustTokenPrivileges
- #endif
- (token, FALSE, &tp, 0, NULL, NULL))
- res = (GetLastError() == ERROR_SUCCESS);
+ HANDLE token;
+ if (MY_FUNC_SELECT(OpenProcessToken)(::GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &token))
+ {
+ TOKEN_PRIVILEGES tp;
+ if (MY_FUNC_SELECT(LookupPrivilegeValue)(NULL, privilegeName, &(tp.Privileges[0].Luid)))
+ {
+ tp.PrivilegeCount = 1;
+ tp.Privileges[0].Attributes = (enable ? SE_PRIVILEGE_ENABLED : 0);
+ if (MY_FUNC_SELECT(AdjustTokenPrivileges)(token, FALSE, &tp, 0, NULL, NULL))
+ res = (GetLastError() == ERROR_SUCCESS);
+ }
+ ::CloseHandle(token);
+ }
}
- ::CloseHandle(token);
- return res;
-}
+
+ #ifndef _UNICODE
-#ifndef _UNICODE
-bool EnableLockMemoryPrivilege(bool enable)
-{
- HMODULE hModule = LoadLibrary(TEXT("Advapi32.dll"));
- if (hModule == NULL)
- return false;
- bool res = EnableLockMemoryPrivilege2(hModule, enable);
::FreeLibrary(hModule);
+
+ #endif
+
return res;
}
-#endif
#endif
diff --git a/3rdparty/lzma/CPP/Windows/MemoryLock.h b/3rdparty/lzma/CPP/Windows/MemoryLock.h
index 5fe619de05f..4a5dafcf01d 100644
--- a/3rdparty/lzma/CPP/Windows/MemoryLock.h
+++ b/3rdparty/lzma/CPP/Windows/MemoryLock.h
@@ -1,13 +1,36 @@
// Windows/MemoryLock.h
-#ifndef __WINDOWS_MEMORYLOCK_H
-#define __WINDOWS_MEMORYLOCK_H
+#ifndef __WINDOWS_MEMORY_LOCK_H
+#define __WINDOWS_MEMORY_LOCK_H
+
+#include "../Common/MyWindows.h"
namespace NWindows {
namespace NSecurity {
#ifndef UNDER_CE
-bool EnableLockMemoryPrivilege(bool enable = true);
+
+bool EnablePrivilege(LPCTSTR privilegeName, bool enable = true);
+
+inline bool EnablePrivilege_LockMemory(bool enable = true)
+{
+ return EnablePrivilege(SE_LOCK_MEMORY_NAME, enable);
+}
+
+inline void EnablePrivilege_SymLink()
+{
+ /* Probably we do not to set any Privilege for junction points.
+ But we need them for Symbolic links */
+ NSecurity::EnablePrivilege(SE_RESTORE_NAME);
+
+ /* Probably we need only SE_RESTORE_NAME, but there is also
+ SE_CREATE_SYMBOLIC_LINK_NAME. So we set it also. Do we need it? */
+
+ NSecurity::EnablePrivilege(TEXT("SeCreateSymbolicLinkPrivilege")); // SE_CREATE_SYMBOLIC_LINK_NAME
+
+ // Do we need to set SE_BACKUP_NAME ?
+}
+
#endif
}}
diff --git a/3rdparty/lzma/CPP/Windows/NtCheck.h b/3rdparty/lzma/CPP/Windows/NtCheck.h
index e56318f0093..a1b89ef2d1f 100644
--- a/3rdparty/lzma/CPP/Windows/NtCheck.h
+++ b/3rdparty/lzma/CPP/Windows/NtCheck.h
@@ -5,6 +5,8 @@
#ifdef _WIN32
+#include "../Common/MyWindows.h"
+
#if !defined(_WIN64) && !defined(UNDER_CE)
static inline bool IsItWindowsNT()
{
diff --git a/3rdparty/lzma/CPP/Windows/PropVariant.cpp b/3rdparty/lzma/CPP/Windows/PropVariant.cpp
index 90212e08fc6..e95cbd2b8d5 100644
--- a/3rdparty/lzma/CPP/Windows/PropVariant.cpp
+++ b/3rdparty/lzma/CPP/Windows/PropVariant.cpp
@@ -2,13 +2,53 @@
#include "StdAfx.h"
-#include "PropVariant.h"
-
#include "../Common/Defs.h"
+#include "PropVariant.h"
+
namespace NWindows {
namespace NCOM {
+BSTR AllocBstrFromAscii(const char *s) throw()
+{
+ if (!s)
+ return NULL;
+ UINT len = (UINT)strlen(s);
+ BSTR p = ::SysAllocStringLen(NULL, len);
+ if (p)
+ {
+ for (UINT i = 0; i <= len; i++)
+ p[i] = (Byte)s[i];
+ }
+ return p;
+}
+
+HRESULT PropVarEm_Alloc_Bstr(PROPVARIANT *p, unsigned numChars) throw()
+{
+ p->bstrVal = ::SysAllocStringLen(NULL, numChars);
+ if (!p->bstrVal)
+ {
+ p->vt = VT_ERROR;
+ p->scode = E_OUTOFMEMORY;
+ return E_OUTOFMEMORY;
+ }
+ p->vt = VT_BSTR;
+ return S_OK;
+}
+
+HRESULT PropVarEm_Set_Str(PROPVARIANT *p, const char *s) throw()
+{
+ p->bstrVal = AllocBstrFromAscii(s);
+ if (p->bstrVal)
+ {
+ p->vt = VT_BSTR;
+ return S_OK;
+ }
+ p->vt = VT_ERROR;
+ p->scode = E_OUTOFMEMORY;
+ return E_OUTOFMEMORY;
+}
+
CPropVariant::CPropVariant(const PROPVARIANT &varSrc)
{
vt = VT_EMPTY;
@@ -38,6 +78,7 @@ CPropVariant& CPropVariant::operator=(const CPropVariant &varSrc)
InternalCopy(&varSrc);
return *this;
}
+
CPropVariant& CPropVariant::operator=(const PROPVARIANT &varSrc)
{
InternalCopy(&varSrc);
@@ -58,7 +99,7 @@ CPropVariant& CPropVariant::operator=(LPCOLESTR lpszSrc)
vt = VT_BSTR;
wReserved1 = 0;
bstrVal = ::SysAllocString(lpszSrc);
- if (bstrVal == NULL && lpszSrc != NULL)
+ if (!bstrVal && lpszSrc)
{
throw kMemException;
// vt = VT_ERROR;
@@ -67,29 +108,64 @@ CPropVariant& CPropVariant::operator=(LPCOLESTR lpszSrc)
return *this;
}
+CPropVariant& CPropVariant::operator=(const UString &s)
+{
+ InternalClear();
+ vt = VT_BSTR;
+ wReserved1 = 0;
+ bstrVal = ::SysAllocStringLen(s, s.Len());
+ if (!bstrVal)
+ throw kMemException;
+ return *this;
+}
+
+CPropVariant& CPropVariant::operator=(const UString2 &s)
+{
+ /*
+ if (s.IsEmpty())
+ *this = L"";
+ else
+ */
+ {
+ InternalClear();
+ vt = VT_BSTR;
+ wReserved1 = 0;
+ bstrVal = ::SysAllocStringLen(s.GetRawPtr(), s.Len());
+ if (!bstrVal)
+ throw kMemException;
+ /* SysAllocStringLen probably appends a null-terminating character for NULL string.
+ But it doesn't specified in MSDN.
+ But we suppose that it works
+
+ if (!s.GetRawPtr())
+ {
+ *bstrVal = 0;
+ }
+ */
+
+ /* MSDN: Windows CE: SysAllocStringLen() : Passing invalid (and under some circumstances NULL)
+ pointers to this function causes an unexpected termination of the application.
+ Is it safe? Maybe we must chamnge the code for that case ? */
+ }
+ return *this;
+}
CPropVariant& CPropVariant::operator=(const char *s)
{
InternalClear();
vt = VT_BSTR;
wReserved1 = 0;
- UINT len = (UINT)strlen(s);
- bstrVal = ::SysAllocStringByteLen(0, (UINT)len * sizeof(OLECHAR));
- if (bstrVal == NULL)
+ bstrVal = AllocBstrFromAscii(s);
+ if (!bstrVal)
{
throw kMemException;
// vt = VT_ERROR;
// scode = E_OUTOFMEMORY;
}
- else
- {
- for (UINT i = 0; i <= len; i++)
- bstrVal[i] = s[i];
- }
return *this;
}
-CPropVariant& CPropVariant::operator=(bool bSrc)
+CPropVariant& CPropVariant::operator=(bool bSrc) throw()
{
if (vt != VT_BOOL)
{
@@ -100,22 +176,40 @@ CPropVariant& CPropVariant::operator=(bool bSrc)
return *this;
}
+BSTR CPropVariant::AllocBstr(unsigned numChars)
+{
+ if (vt != VT_EMPTY)
+ InternalClear();
+ vt = VT_BSTR;
+ wReserved1 = 0;
+ bstrVal = ::SysAllocStringLen(NULL, numChars);
+ if (!bstrVal)
+ {
+ throw kMemException;
+ // vt = VT_ERROR;
+ // scode = E_OUTOFMEMORY;
+ }
+ return bstrVal;
+}
+
#define SET_PROP_FUNC(type, id, dest) \
- CPropVariant& CPropVariant::operator=(type value) \
+ CPropVariant& CPropVariant::operator=(type value) throw() \
{ if (vt != id) { InternalClear(); vt = id; } \
dest = value; return *this; }
SET_PROP_FUNC(Byte, VT_UI1, bVal)
-SET_PROP_FUNC(Int16, VT_I2, iVal)
+// SET_PROP_FUNC(Int16, VT_I2, iVal)
SET_PROP_FUNC(Int32, VT_I4, lVal)
SET_PROP_FUNC(UInt32, VT_UI4, ulVal)
SET_PROP_FUNC(UInt64, VT_UI8, uhVal.QuadPart)
+SET_PROP_FUNC(Int64, VT_I8, hVal.QuadPart)
SET_PROP_FUNC(const FILETIME &, VT_FILETIME, filetime)
-static HRESULT MyPropVariantClear(PROPVARIANT *prop)
+HRESULT PropVariant_Clear(PROPVARIANT *prop) throw()
{
- switch(prop->vt)
+ switch (prop->vt)
{
+ case VT_EMPTY:
case VT_UI1:
case VT_I1:
case VT_I2:
@@ -134,20 +228,27 @@ static HRESULT MyPropVariantClear(PROPVARIANT *prop)
case VT_DATE:
prop->vt = VT_EMPTY;
prop->wReserved1 = 0;
+ prop->wReserved2 = 0;
+ prop->wReserved3 = 0;
+ prop->uhVal.QuadPart = 0;
return S_OK;
}
return ::VariantClear((VARIANTARG *)prop);
+ // return ::PropVariantClear(prop);
+ // PropVariantClear can clear VT_BLOB.
}
-HRESULT CPropVariant::Clear()
+HRESULT CPropVariant::Clear() throw()
{
- return MyPropVariantClear(this);
+ if (vt == VT_EMPTY)
+ return S_OK;
+ return PropVariant_Clear(this);
}
-HRESULT CPropVariant::Copy(const PROPVARIANT* pSrc)
+HRESULT CPropVariant::Copy(const PROPVARIANT* pSrc) throw()
{
::VariantClear((tagVARIANT *)this);
- switch(pSrc->vt)
+ switch (pSrc->vt)
{
case VT_UI1:
case VT_I1:
@@ -172,7 +273,7 @@ HRESULT CPropVariant::Copy(const PROPVARIANT* pSrc)
}
-HRESULT CPropVariant::Attach(PROPVARIANT *pSrc)
+HRESULT CPropVariant::Attach(PROPVARIANT *pSrc) throw()
{
HRESULT hr = Clear();
if (FAILED(hr))
@@ -182,18 +283,23 @@ HRESULT CPropVariant::Attach(PROPVARIANT *pSrc)
return S_OK;
}
-HRESULT CPropVariant::Detach(PROPVARIANT *pDest)
+HRESULT CPropVariant::Detach(PROPVARIANT *pDest) throw()
{
- HRESULT hr = MyPropVariantClear(pDest);
- if (FAILED(hr))
- return hr;
+ if (pDest->vt != VT_EMPTY)
+ {
+ HRESULT hr = PropVariant_Clear(pDest);
+ if (FAILED(hr))
+ return hr;
+ }
memcpy(pDest, this, sizeof(PROPVARIANT));
vt = VT_EMPTY;
return S_OK;
}
-HRESULT CPropVariant::InternalClear()
+HRESULT CPropVariant::InternalClear() throw()
{
+ if (vt == VT_EMPTY)
+ return S_OK;
HRESULT hr = Clear();
if (FAILED(hr))
{
@@ -215,7 +321,7 @@ void CPropVariant::InternalCopy(const PROPVARIANT *pSrc)
}
}
-int CPropVariant::Compare(const CPropVariant &a)
+int CPropVariant::Compare(const CPropVariant &a) throw()
{
if (vt != a.vt)
return MyCompare(vt, a.vt);
@@ -233,9 +339,7 @@ int CPropVariant::Compare(const CPropVariant &a)
case VT_UI8: return MyCompare(uhVal.QuadPart, a.uhVal.QuadPart);
case VT_BOOL: return -MyCompare(boolVal, a.boolVal);
case VT_FILETIME: return ::CompareFileTime(&filetime, &a.filetime);
- case VT_BSTR:
- return 0; // Not implemented
- // return MyCompare(aPropVarint.cVal);
+ case VT_BSTR: return 0; // Not implemented
default: return 0;
}
}
diff --git a/3rdparty/lzma/CPP/Windows/PropVariant.h b/3rdparty/lzma/CPP/Windows/PropVariant.h
index d018034ebcf..3610d6a8085 100644
--- a/3rdparty/lzma/CPP/Windows/PropVariant.h
+++ b/3rdparty/lzma/CPP/Windows/PropVariant.h
@@ -1,54 +1,110 @@
// Windows/PropVariant.h
-#ifndef __WINDOWS_PROPVARIANT_H
-#define __WINDOWS_PROPVARIANT_H
+#ifndef __WINDOWS_PROP_VARIANT_H
+#define __WINDOWS_PROP_VARIANT_H
+#include "../Common/MyTypes.h"
#include "../Common/MyWindows.h"
-#include "../Common/Types.h"
+#include "../Common/MyString.h"
namespace NWindows {
namespace NCOM {
+BSTR AllocBstrFromAscii(const char *s) throw();
+
+HRESULT PropVariant_Clear(PROPVARIANT *p) throw();
+
+HRESULT PropVarEm_Alloc_Bstr(PROPVARIANT *p, unsigned numChars) throw();
+HRESULT PropVarEm_Set_Str(PROPVARIANT *p, const char *s) throw();
+
+inline void PropVarEm_Set_UInt32(PROPVARIANT *p, UInt32 v) throw()
+{
+ p->vt = VT_UI4;
+ p->ulVal = v;
+}
+
+inline void PropVarEm_Set_UInt64(PROPVARIANT *p, UInt64 v) throw()
+{
+ p->vt = VT_UI8;
+ p->uhVal.QuadPart = v;
+}
+
+inline void PropVarEm_Set_FileTime64(PROPVARIANT *p, UInt64 v) throw()
+{
+ p->vt = VT_FILETIME;
+ p->filetime.dwLowDateTime = (DWORD)v;
+ p->filetime.dwHighDateTime = (DWORD)(v >> 32);
+}
+
+inline void PropVarEm_Set_Bool(PROPVARIANT *p, bool b) throw()
+{
+ p->vt = VT_BOOL;
+ p->boolVal = (b ? VARIANT_TRUE : VARIANT_FALSE);
+}
+
+
class CPropVariant : public tagPROPVARIANT
{
public:
- CPropVariant() { vt = VT_EMPTY; wReserved1 = 0; }
- ~CPropVariant() { Clear(); }
+ CPropVariant()
+ {
+ vt = VT_EMPTY;
+ wReserved1 = 0;
+ // wReserved2 = 0;
+ // wReserved3 = 0;
+ // uhVal.QuadPart = 0;
+ bstrVal = 0;
+ }
+ ~CPropVariant() throw() { Clear(); }
CPropVariant(const PROPVARIANT &varSrc);
CPropVariant(const CPropVariant &varSrc);
CPropVariant(BSTR bstrSrc);
CPropVariant(LPCOLESTR lpszSrc);
- CPropVariant(bool bSrc) { vt = VT_BOOL; wReserved1 = 0; boolVal = (bSrc ? VARIANT_TRUE : VARIANT_FALSE); };
+ CPropVariant(bool bSrc) { vt = VT_BOOL; wReserved1 = 0; boolVal = (bSrc ? VARIANT_TRUE : VARIANT_FALSE); }
CPropVariant(Byte value) { vt = VT_UI1; wReserved1 = 0; bVal = value; }
- CPropVariant(Int16 value) { vt = VT_I2; wReserved1 = 0; iVal = value; }
- CPropVariant(Int32 value) { vt = VT_I4; wReserved1 = 0; lVal = value; }
+
+private:
+ CPropVariant(Int16 value); // { vt = VT_I2; wReserved1 = 0; iVal = value; }
+ CPropVariant(Int32 value); // { vt = VT_I4; wReserved1 = 0; lVal = value; }
+
+public:
CPropVariant(UInt32 value) { vt = VT_UI4; wReserved1 = 0; ulVal = value; }
CPropVariant(UInt64 value) { vt = VT_UI8; wReserved1 = 0; uhVal.QuadPart = value; }
+ CPropVariant(Int64 value) { vt = VT_I8; wReserved1 = 0; hVal.QuadPart = value; }
CPropVariant(const FILETIME &value) { vt = VT_FILETIME; wReserved1 = 0; filetime = value; }
CPropVariant& operator=(const CPropVariant &varSrc);
CPropVariant& operator=(const PROPVARIANT &varSrc);
CPropVariant& operator=(BSTR bstrSrc);
CPropVariant& operator=(LPCOLESTR lpszSrc);
+ CPropVariant& operator=(const UString &s);
+ CPropVariant& operator=(const UString2 &s);
CPropVariant& operator=(const char *s);
- CPropVariant& operator=(bool bSrc);
- CPropVariant& operator=(Byte value);
- CPropVariant& operator=(Int16 value);
- CPropVariant& operator=(Int32 value);
- CPropVariant& operator=(UInt32 value);
- CPropVariant& operator=(Int64 value);
- CPropVariant& operator=(UInt64 value);
- CPropVariant& operator=(const FILETIME &value);
-
- HRESULT Clear();
- HRESULT Copy(const PROPVARIANT *pSrc);
- HRESULT Attach(PROPVARIANT *pSrc);
- HRESULT Detach(PROPVARIANT *pDest);
-
- HRESULT InternalClear();
+
+ CPropVariant& operator=(bool bSrc) throw();
+ CPropVariant& operator=(Byte value) throw();
+
+private:
+ CPropVariant& operator=(Int16 value) throw();
+
+public:
+ CPropVariant& operator=(Int32 value) throw();
+ CPropVariant& operator=(UInt32 value) throw();
+ CPropVariant& operator=(UInt64 value) throw();
+ CPropVariant& operator=(Int64 value) throw();
+ CPropVariant& operator=(const FILETIME &value) throw();
+
+ BSTR AllocBstr(unsigned numChars);
+
+ HRESULT Clear() throw();
+ HRESULT Copy(const PROPVARIANT *pSrc) throw();
+ HRESULT Attach(PROPVARIANT *pSrc) throw();
+ HRESULT Detach(PROPVARIANT *pDest) throw();
+
+ HRESULT InternalClear() throw();
void InternalCopy(const PROPVARIANT *pSrc);
- int Compare(const CPropVariant &a1);
+ int Compare(const CPropVariant &a) throw();
};
}}
diff --git a/3rdparty/lzma/CPP/Windows/PropVariantConv.cpp b/3rdparty/lzma/CPP/Windows/PropVariantConv.cpp
new file mode 100644
index 00000000000..fe86f9365f0
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/PropVariantConv.cpp
@@ -0,0 +1,109 @@
+// PropVariantConvert.cpp
+
+#include "StdAfx.h"
+
+#include "../Common/IntToString.h"
+
+#include "Defs.h"
+#include "PropVariantConv.h"
+
+#define UINT_TO_STR_2(c, val) { s[0] = (c); s[1] = (char)('0' + (val) / 10); s[2] = (char)('0' + (val) % 10); s += 3; }
+
+bool ConvertFileTimeToString(const FILETIME &ft, char *s, bool includeTime, bool includeSeconds) throw()
+{
+ SYSTEMTIME st;
+ if (!BOOLToBool(FileTimeToSystemTime(&ft, &st)))
+ {
+ *s = 0;
+ return false;
+ }
+ unsigned val = st.wYear;
+ if (val >= 10000)
+ {
+ *s++ = (char)('0' + val / 10000);
+ val %= 10000;
+ }
+ {
+ s[3] = (char)('0' + val % 10); val /= 10;
+ s[2] = (char)('0' + val % 10); val /= 10;
+ s[1] = (char)('0' + val % 10);
+ s[0] = (char)('0' + val / 10);
+ s += 4;
+ }
+ UINT_TO_STR_2('-', st.wMonth);
+ UINT_TO_STR_2('-', st.wDay);
+ if (includeTime)
+ {
+ UINT_TO_STR_2(' ', st.wHour);
+ UINT_TO_STR_2(':', st.wMinute);
+ if (includeSeconds)
+ {
+ UINT_TO_STR_2(':', st.wSecond);
+ /*
+ *s++ = '.';
+ unsigned val = st.wMilliseconds;
+ s[2] = (char)('0' + val % 10); val /= 10;
+ s[1] = (char)('0' + val % 10);
+ s[0] = (char)('0' + val / 10);
+ s += 3;
+ */
+ }
+ }
+ *s = 0;
+ return true;
+}
+
+void ConvertFileTimeToString(const FILETIME &ft, wchar_t *dest, bool includeTime, bool includeSeconds) throw()
+{
+ char s[32];
+ ConvertFileTimeToString(ft, s, includeTime, includeSeconds);
+ for (unsigned i = 0;; i++)
+ {
+ unsigned char c = s[i];
+ dest[i] = c;
+ if (c == 0)
+ return;
+ }
+}
+
+void ConvertPropVariantToShortString(const PROPVARIANT &prop, char *dest) throw()
+{
+ *dest = 0;
+ switch (prop.vt)
+ {
+ case VT_EMPTY: return;
+ case VT_BSTR: dest[0] = '?'; dest[1] = 0; return;
+ case VT_UI1: ConvertUInt32ToString(prop.bVal, dest); return;
+ case VT_UI2: ConvertUInt32ToString(prop.uiVal, dest); return;
+ case VT_UI4: ConvertUInt32ToString(prop.ulVal, dest); return;
+ case VT_UI8: ConvertUInt64ToString(prop.uhVal.QuadPart, dest); return;
+ case VT_FILETIME: ConvertFileTimeToString(prop.filetime, dest, true, true); return;
+ // case VT_I1: return ConvertInt64ToString(prop.cVal, dest); return;
+ case VT_I2: ConvertInt64ToString(prop.iVal, dest); return;
+ case VT_I4: ConvertInt64ToString(prop.lVal, dest); return;
+ case VT_I8: ConvertInt64ToString(prop.hVal.QuadPart, dest); return;
+ case VT_BOOL: dest[0] = VARIANT_BOOLToBool(prop.boolVal) ? '+' : '-'; dest[1] = 0; return;
+ default: dest[0] = '?'; dest[1] = ':'; ConvertUInt64ToString(prop.vt, dest + 2);
+ }
+}
+
+void ConvertPropVariantToShortString(const PROPVARIANT &prop, wchar_t *dest) throw()
+{
+ *dest = 0;
+ switch (prop.vt)
+ {
+ case VT_EMPTY: return;
+ case VT_BSTR: dest[0] = '?'; dest[1] = 0; return;
+ case VT_UI1: ConvertUInt32ToString(prop.bVal, dest); return;
+ case VT_UI2: ConvertUInt32ToString(prop.uiVal, dest); return;
+ case VT_UI4: ConvertUInt32ToString(prop.ulVal, dest); return;
+ case VT_UI8: ConvertUInt64ToString(prop.uhVal.QuadPart, dest); return;
+ case VT_FILETIME: ConvertFileTimeToString(prop.filetime, dest, true, true); return;
+ // case VT_I1: return ConvertInt64ToString(prop.cVal, dest); return;
+ case VT_I2: ConvertInt64ToString(prop.iVal, dest); return;
+ case VT_I4: ConvertInt64ToString(prop.lVal, dest); return;
+ case VT_I8: ConvertInt64ToString(prop.hVal.QuadPart, dest); return;
+ case VT_BOOL: dest[0] = VARIANT_BOOLToBool(prop.boolVal) ? (wchar_t)'+' : (wchar_t)'-'; dest[1] = 0; return;
+ default: dest[0] = '?'; dest[1] = ':'; ConvertUInt32ToString(prop.vt, dest + 2);
+ }
+}
diff --git a/3rdparty/lzma/CPP/Windows/PropVariantConv.h b/3rdparty/lzma/CPP/Windows/PropVariantConv.h
new file mode 100644
index 00000000000..5d26357f08d
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/PropVariantConv.h
@@ -0,0 +1,30 @@
+// Windows/PropVariantConv.h
+
+#ifndef __PROP_VARIANT_CONV_H
+#define __PROP_VARIANT_CONV_H
+
+#include "../Common/MyTypes.h"
+
+// provide at least 32 bytes for buffer including zero-end
+bool ConvertFileTimeToString(const FILETIME &ft, char *s, bool includeTime = true, bool includeSeconds = true) throw();
+void ConvertFileTimeToString(const FILETIME &ft, wchar_t *s, bool includeTime = true, bool includeSeconds = true) throw();
+
+// provide at least 32 bytes for buffer including zero-end
+// don't send VT_BSTR to these functions
+void ConvertPropVariantToShortString(const PROPVARIANT &prop, char *dest) throw();
+void ConvertPropVariantToShortString(const PROPVARIANT &prop, wchar_t *dest) throw();
+
+inline bool ConvertPropVariantToUInt64(const PROPVARIANT &prop, UInt64 &value)
+{
+ switch (prop.vt)
+ {
+ case VT_UI8: value = (UInt64)prop.uhVal.QuadPart; return true;
+ case VT_UI4: value = prop.ulVal; return true;
+ case VT_UI2: value = prop.uiVal; return true;
+ case VT_UI1: value = prop.bVal; return true;
+ case VT_EMPTY: return false;
+ default: throw 151199;
+ }
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/PropVariantConversions.cpp b/3rdparty/lzma/CPP/Windows/PropVariantConversions.cpp
deleted file mode 100644
index 2d8456cd691..00000000000
--- a/3rdparty/lzma/CPP/Windows/PropVariantConversions.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// PropVariantConversions.cpp
-
-#include "StdAfx.h"
-
-#include "Common/IntToString.h"
-#include "Common/StringConvert.h"
-
-#include "Windows/Defs.h"
-
-#include "PropVariantConversions.h"
-
-static UString ConvertUInt64ToString(UInt64 value)
-{
- wchar_t buffer[32];
- ConvertUInt64ToString(value, buffer);
- return buffer;
-}
-
-static UString ConvertInt64ToString(Int64 value)
-{
- wchar_t buffer[32];
- ConvertInt64ToString(value, buffer);
- return buffer;
-}
-
-static char *UIntToStringSpec(char c, UInt32 value, char *s, int numPos)
-{
- if (c != 0)
- *s++ = c;
- char temp[16];
- int pos = 0;
- do
- {
- temp[pos++] = (char)('0' + value % 10);
- value /= 10;
- }
- while (value != 0);
- int i;
- for (i = 0; i < numPos - pos; i++)
- *s++ = '0';
- do
- *s++ = temp[--pos];
- while (pos > 0);
- *s = '\0';
- return s;
-}
-
-bool ConvertFileTimeToString(const FILETIME &ft, char *s, bool includeTime, bool includeSeconds)
-{
- s[0] = '\0';
- SYSTEMTIME st;
- if (!BOOLToBool(FileTimeToSystemTime(&ft, &st)))
- return false;
- s = UIntToStringSpec(0, st.wYear, s, 4);
- s = UIntToStringSpec('-', st.wMonth, s, 2);
- s = UIntToStringSpec('-', st.wDay, s, 2);
- if (includeTime)
- {
- s = UIntToStringSpec(' ', st.wHour, s, 2);
- s = UIntToStringSpec(':', st.wMinute, s, 2);
- if (includeSeconds)
- UIntToStringSpec(':', st.wSecond, s, 2);
- }
- return true;
-}
-
-UString ConvertFileTimeToString(const FILETIME &ft, bool includeTime, bool includeSeconds)
-{
- char s[32];
- ConvertFileTimeToString(ft, s, includeTime, includeSeconds);
- return GetUnicodeString(s);
-}
-
-
-UString ConvertPropVariantToString(const PROPVARIANT &prop)
-{
- switch (prop.vt)
- {
- case VT_EMPTY: return UString();
- case VT_BSTR: return prop.bstrVal;
- case VT_UI1: return ConvertUInt64ToString(prop.bVal);
- case VT_UI2: return ConvertUInt64ToString(prop.uiVal);
- case VT_UI4: return ConvertUInt64ToString(prop.ulVal);
- case VT_UI8: return ConvertUInt64ToString(prop.uhVal.QuadPart);
- case VT_FILETIME: return ConvertFileTimeToString(prop.filetime, true, true);
- // case VT_I1: return ConvertInt64ToString(prop.cVal);
- case VT_I2: return ConvertInt64ToString(prop.iVal);
- case VT_I4: return ConvertInt64ToString(prop.lVal);
- case VT_I8: return ConvertInt64ToString(prop.hVal.QuadPart);
- case VT_BOOL: return VARIANT_BOOLToBool(prop.boolVal) ? L"+" : L"-";
- default: throw 150245;
- }
-}
-
-UInt64 ConvertPropVariantToUInt64(const PROPVARIANT &prop)
-{
- switch (prop.vt)
- {
- case VT_UI1: return prop.bVal;
- case VT_UI2: return prop.uiVal;
- case VT_UI4: return prop.ulVal;
- case VT_UI8: return (UInt64)prop.uhVal.QuadPart;
- default: throw 151199;
- }
-}
diff --git a/3rdparty/lzma/CPP/Windows/PropVariantConversions.h b/3rdparty/lzma/CPP/Windows/PropVariantConversions.h
deleted file mode 100644
index 3de4dedb3be..00000000000
--- a/3rdparty/lzma/CPP/Windows/PropVariantConversions.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// Windows/PropVariantConversions.h
-
-#ifndef __PROP_VARIANT_CONVERSIONS_H
-#define __PROP_VARIANT_CONVERSIONS_H
-
-#include "Common/MyString.h"
-#include "Common/Types.h"
-
-bool ConvertFileTimeToString(const FILETIME &ft, char *s, bool includeTime = true, bool includeSeconds = true);
-UString ConvertFileTimeToString(const FILETIME &ft, bool includeTime = true, bool includeSeconds = true);
-UString ConvertPropVariantToString(const PROPVARIANT &prop);
-UInt64 ConvertPropVariantToUInt64(const PROPVARIANT &prop);
-
-#endif
diff --git a/3rdparty/lzma/CPP/Windows/Registry.cpp b/3rdparty/lzma/CPP/Windows/Registry.cpp
index 8b25375d946..c000e62897d 100644
--- a/3rdparty/lzma/CPP/Windows/Registry.cpp
+++ b/3rdparty/lzma/CPP/Windows/Registry.cpp
@@ -2,10 +2,12 @@
#include "StdAfx.h"
+#include <wchar.h>
+
#ifndef _UNICODE
-#include "Common/StringConvert.h"
+#include "../Common/StringConvert.h"
#endif
-#include "Windows/Registry.h"
+#include "Registry.h"
#ifndef _UNICODE
extern bool g_IsNT;
@@ -18,7 +20,7 @@ namespace NRegistry {
LONG CKey::Create(HKEY parentKey, LPCTSTR keyName,
LPTSTR keyClass, DWORD options, REGSAM accessMask,
- LPSECURITY_ATTRIBUTES securityAttributes, LPDWORD disposition)
+ LPSECURITY_ATTRIBUTES securityAttributes, LPDWORD disposition) throw()
{
MYASSERT(parentKey != NULL);
DWORD dispositionReal;
@@ -35,7 +37,7 @@ LONG CKey::Create(HKEY parentKey, LPCTSTR keyName,
return res;
}
-LONG CKey::Open(HKEY parentKey, LPCTSTR keyName, REGSAM accessMask)
+LONG CKey::Open(HKEY parentKey, LPCTSTR keyName, REGSAM accessMask) throw()
{
MYASSERT(parentKey != NULL);
HKEY key = NULL;
@@ -49,7 +51,7 @@ LONG CKey::Open(HKEY parentKey, LPCTSTR keyName, REGSAM accessMask)
return res;
}
-LONG CKey::Close()
+LONG CKey::Close() throw()
{
LONG res = ERROR_SUCCESS;
if (_object != NULL)
@@ -62,28 +64,28 @@ LONG CKey::Close()
// win95, win98: deletes sunkey and all its subkeys
// winNT to be deleted must not have subkeys
-LONG CKey::DeleteSubKey(LPCTSTR subKeyName)
+LONG CKey::DeleteSubKey(LPCTSTR subKeyName) throw()
{
MYASSERT(_object != NULL);
return RegDeleteKey(_object, subKeyName);
}
-LONG CKey::RecurseDeleteKey(LPCTSTR subKeyName)
+LONG CKey::RecurseDeleteKey(LPCTSTR subKeyName) throw()
{
CKey key;
LONG res = key.Open(_object, subKeyName, KEY_READ | KEY_WRITE);
if (res != ERROR_SUCCESS)
return res;
FILETIME fileTime;
- const UInt32 kBufferSize = MAX_PATH + 1; // 256 in ATL
- DWORD size = kBufferSize;
- TCHAR buffer[kBufferSize];
+ const UInt32 kBufSize = MAX_PATH + 1; // 256 in ATL
+ DWORD size = kBufSize;
+ TCHAR buffer[kBufSize];
while (RegEnumKeyEx(key._object, 0, buffer, &size, NULL, NULL, NULL, &fileTime) == ERROR_SUCCESS)
{
res = key.RecurseDeleteKey(buffer);
if (res != ERROR_SUCCESS)
return res;
- size = kBufferSize;
+ size = kBufSize;
}
key.Close();
return DeleteSubKey(subKeyName);
@@ -97,7 +99,7 @@ static inline UInt32 BoolToUINT32(bool value) { return (value ? 1: 0); }
static inline bool UINT32ToBool(UInt32 value) { return (value != 0); }
-LONG CKey::DeleteValue(LPCTSTR name)
+LONG CKey::DeleteValue(LPCTSTR name) throw()
{
MYASSERT(_object != NULL);
return ::RegDeleteValue(_object, name);
@@ -113,23 +115,23 @@ LONG CKey::DeleteValue(LPCWSTR name)
}
#endif
-LONG CKey::SetValue(LPCTSTR name, UInt32 value)
+LONG CKey::SetValue(LPCTSTR name, UInt32 value) throw()
{
MYASSERT(_object != NULL);
- return RegSetValueEx(_object, name, NULL, REG_DWORD,
+ return RegSetValueEx(_object, name, 0, REG_DWORD,
(BYTE * const)&value, sizeof(UInt32));
}
-LONG CKey::SetValue(LPCTSTR name, bool value)
+LONG CKey::SetValue(LPCTSTR name, bool value) throw()
{
return SetValue(name, BoolToUINT32(value));
}
-LONG CKey::SetValue(LPCTSTR name, LPCTSTR value)
+LONG CKey::SetValue(LPCTSTR name, LPCTSTR value) throw()
{
MYASSERT(value != NULL);
MYASSERT(_object != NULL);
- return RegSetValueEx(_object, name, NULL, REG_SZ,
+ return RegSetValueEx(_object, name, 0, REG_SZ,
(const BYTE * )value, (lstrlen(value) + 1) * sizeof(TCHAR));
}
@@ -139,7 +141,7 @@ LONG CKey::SetValue(LPCTSTR name, const CSysString &value)
MYASSERT(value != NULL);
MYASSERT(_object != NULL);
return RegSetValueEx(_object, name, NULL, REG_SZ,
- (const BYTE *)(const TCHAR *)value, (value.Length() + 1) * sizeof(TCHAR));
+ (const BYTE *)(const TCHAR *)value, (value.Len() + 1) * sizeof(TCHAR));
}
*/
@@ -159,11 +161,11 @@ LONG CKey::SetValue(LPCWSTR name, LPCWSTR value)
#endif
-LONG CKey::SetValue(LPCTSTR name, const void *value, UInt32 size)
+LONG CKey::SetValue(LPCTSTR name, const void *value, UInt32 size) throw()
{
MYASSERT(value != NULL);
MYASSERT(_object != NULL);
- return RegSetValueEx(_object, name, NULL, REG_BINARY,
+ return RegSetValueEx(_object, name, 0, REG_BINARY,
(const BYTE *)value, size);
}
@@ -177,7 +179,7 @@ LONG SetValue(HKEY parentKey, LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value)
return res;
}
-LONG CKey::SetKeyValue(LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value)
+LONG CKey::SetKeyValue(LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value) throw()
{
MYASSERT(value != NULL);
CKey key;
@@ -187,18 +189,18 @@ LONG CKey::SetKeyValue(LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value)
return res;
}
-LONG CKey::QueryValue(LPCTSTR name, UInt32 &value)
+LONG CKey::QueryValue(LPCTSTR name, UInt32 &value) throw()
{
- DWORD type = NULL;
+ DWORD type = 0;
DWORD count = sizeof(DWORD);
LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type,
(LPBYTE)&value, &count);
- MYASSERT((res!=ERROR_SUCCESS) || (type == REG_DWORD));
- MYASSERT((res!=ERROR_SUCCESS) || (count == sizeof(UInt32)));
+ MYASSERT((res != ERROR_SUCCESS) || (type == REG_DWORD));
+ MYASSERT((res != ERROR_SUCCESS) || (count == sizeof(UInt32)));
return res;
}
-LONG CKey::QueryValue(LPCTSTR name, bool &value)
+LONG CKey::QueryValue(LPCTSTR name, bool &value) throw()
{
UInt32 uintValue = BoolToUINT32(value);
LONG res = QueryValue(name, uintValue);
@@ -206,7 +208,7 @@ LONG CKey::QueryValue(LPCTSTR name, bool &value)
return res;
}
-LONG CKey::GetValue_IfOk(LPCTSTR name, UInt32 &value)
+LONG CKey::GetValue_IfOk(LPCTSTR name, UInt32 &value) throw()
{
UInt32 newVal;
LONG res = QueryValue(name, newVal);
@@ -215,7 +217,7 @@ LONG CKey::GetValue_IfOk(LPCTSTR name, UInt32 &value)
return res;
}
-LONG CKey::GetValue_IfOk(LPCTSTR name, bool &value)
+LONG CKey::GetValue_IfOk(LPCTSTR name, bool &value) throw()
{
bool newVal;
LONG res = QueryValue(name, newVal);
@@ -224,51 +226,59 @@ LONG CKey::GetValue_IfOk(LPCTSTR name, bool &value)
return res;
}
-LONG CKey::QueryValue(LPCTSTR name, LPTSTR value, UInt32 &count)
+LONG CKey::QueryValue(LPCTSTR name, LPTSTR value, UInt32 &count) throw()
{
- MYASSERT(count != NULL);
- DWORD type = NULL;
+ DWORD type = 0;
LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type, (LPBYTE)value, (DWORD *)&count);
- MYASSERT((res!=ERROR_SUCCESS) || (type == REG_SZ) || (type == REG_MULTI_SZ) || (type == REG_EXPAND_SZ));
+ MYASSERT((res != ERROR_SUCCESS) || (type == REG_SZ) || (type == REG_MULTI_SZ) || (type == REG_EXPAND_SZ));
return res;
}
LONG CKey::QueryValue(LPCTSTR name, CSysString &value)
{
value.Empty();
- DWORD type = NULL;
- UInt32 currentSize = 0;
- LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type, NULL, (DWORD *)&currentSize);
+ DWORD type = 0;
+ UInt32 curSize = 0;
+ LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type, NULL, (DWORD *)&curSize);
if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA)
return res;
- res = QueryValue(name, value.GetBuffer(currentSize), currentSize);
- value.ReleaseBuffer();
+ UInt32 curSize2 = curSize;
+ res = QueryValue(name, value.GetBuf(curSize), curSize2);
+ if (curSize > curSize2)
+ curSize = curSize2;
+ value.ReleaseBuf_CalcLen(curSize / sizeof(TCHAR));
return res;
}
+
#ifndef _UNICODE
+
LONG CKey::QueryValue(LPCWSTR name, LPWSTR value, UInt32 &count)
{
- MYASSERT(count != NULL);
- DWORD type = NULL;
+ DWORD type = 0;
LONG res = RegQueryValueExW(_object, name, NULL, &type, (LPBYTE)value, (DWORD *)&count);
- MYASSERT((res!=ERROR_SUCCESS) || (type == REG_SZ) || (type == REG_MULTI_SZ) || (type == REG_EXPAND_SZ));
+ MYASSERT((res != ERROR_SUCCESS) || (type == REG_SZ) || (type == REG_MULTI_SZ) || (type == REG_EXPAND_SZ));
return res;
}
+
LONG CKey::QueryValue(LPCWSTR name, UString &value)
{
value.Empty();
- DWORD type = NULL;
- UInt32 currentSize = 0;
+ DWORD type = 0;
+ UInt32 curSize = 0;
LONG res;
+
if (g_IsNT)
{
- res = RegQueryValueExW(_object, name, NULL, &type, NULL, (DWORD *)&currentSize);
+ res = RegQueryValueExW(_object, name, NULL, &type, NULL, (DWORD *)&curSize);
if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA)
return res;
- res = QueryValue(name, value.GetBuffer(currentSize), currentSize);
- value.ReleaseBuffer();
+ UInt32 curSize2 = curSize;
+ res = QueryValue(name, value.GetBuf(curSize), curSize2);
+ if (curSize > curSize2)
+ curSize = curSize2;
+ value.ReleaseBuf_CalcLen(curSize / sizeof(wchar_t));
}
else
{
@@ -276,27 +286,30 @@ LONG CKey::QueryValue(LPCWSTR name, UString &value)
res = QueryValue(name == 0 ? 0 : (LPCSTR)GetSystemString(name), vTemp);
value = GetUnicodeString(vTemp);
}
+
return res;
}
+
#endif
-LONG CKey::QueryValue(LPCTSTR name, void *value, UInt32 &count)
+
+LONG CKey::QueryValue(LPCTSTR name, void *value, UInt32 &count) throw()
{
- DWORD type = NULL;
+ DWORD type = 0;
LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type, (LPBYTE)value, (DWORD *)&count);
- MYASSERT((res!=ERROR_SUCCESS) || (type == REG_BINARY));
+ MYASSERT((res != ERROR_SUCCESS) || (type == REG_BINARY));
return res;
}
LONG CKey::QueryValue(LPCTSTR name, CByteBuffer &value, UInt32 &dataSize)
{
- DWORD type = NULL;
+ DWORD type = 0;
dataSize = 0;
LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type, NULL, (DWORD *)&dataSize);
if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA)
return res;
- value.SetCapacity(dataSize);
+ value.Alloc(dataSize);
return QueryValue(name, (BYTE *)value, dataSize);
}
@@ -304,14 +317,14 @@ LONG CKey::EnumKeys(CSysStringVector &keyNames)
{
keyNames.Clear();
CSysString keyName;
- for (UInt32 index = 0; ; index++)
+ for (DWORD index = 0; ; index++)
{
- const UInt32 kBufferSize = MAX_PATH + 1; // 256 in ATL
+ const unsigned kBufSize = MAX_PATH + 1; // 256 in ATL
FILETIME lastWriteTime;
- UInt32 nameSize = kBufferSize;
- LONG result = ::RegEnumKeyEx(_object, index, keyName.GetBuffer(kBufferSize),
+ UInt32 nameSize = kBufSize;
+ LONG result = ::RegEnumKeyEx(_object, index, keyName.GetBuf(kBufSize),
(DWORD *)&nameSize, NULL, NULL, NULL, &lastWriteTime);
- keyName.ReleaseBuffer();
+ keyName.ReleaseBuf_CalcLen(kBufSize);
if (result == ERROR_NO_MORE_ITEMS)
break;
if (result != ERROR_SUCCESS)
@@ -323,46 +336,54 @@ LONG CKey::EnumKeys(CSysStringVector &keyNames)
LONG CKey::SetValue_Strings(LPCTSTR valueName, const UStringVector &strings)
{
- UInt32 numChars = 0;
- int i;
+ size_t numChars = 0;
+
+ unsigned i;
+
for (i = 0; i < strings.Size(); i++)
- numChars += strings[i].Length() + 1;
- CBuffer<wchar_t> buffer;
- buffer.SetCapacity(numChars);
- int pos = 0;
+ numChars += strings[i].Len() + 1;
+
+ CObjArray<wchar_t> buffer(numChars);
+ size_t pos = 0;
+
for (i = 0; i < strings.Size(); i++)
{
const UString &s = strings[i];
- MyStringCopy((wchar_t *)buffer + pos, (const wchar_t *)s);
- pos += s.Length() + 1;
+ size_t size = s.Len() + 1;
+ wmemcpy(buffer + pos, s, size);
+ pos += size;
}
- return SetValue(valueName, buffer, numChars * sizeof(wchar_t));
+ return SetValue(valueName, buffer, (UInt32)numChars * sizeof(wchar_t));
}
LONG CKey::GetValue_Strings(LPCTSTR valueName, UStringVector &strings)
{
strings.Clear();
CByteBuffer buffer;
- UInt32 dataSize;
+ UInt32 dataSize = 0;
LONG res = QueryValue(valueName, buffer, dataSize);
if (res != ERROR_SUCCESS)
return res;
+ if (dataSize > buffer.Size())
+ return E_FAIL;
if (dataSize % sizeof(wchar_t) != 0)
return E_FAIL;
+
const wchar_t *data = (const wchar_t *)(const Byte *)buffer;
- int numChars = dataSize / sizeof(wchar_t);
+ size_t numChars = dataSize / sizeof(wchar_t);
+ size_t prev = 0;
UString s;
- for (int i = 0; i < numChars; i++)
+
+ for (size_t i = 0; i < numChars; i++)
{
- wchar_t c = data[i];
- if (c == 0)
+ if (data[i] == 0)
{
+ s = data + prev;
strings.Add(s);
- s.Empty();
+ prev = i + 1;
}
- else
- s += c;
}
+
return res;
}
diff --git a/3rdparty/lzma/CPP/Windows/Registry.h b/3rdparty/lzma/CPP/Windows/Registry.h
index f0561e68856..ca79dfe3cda 100644
--- a/3rdparty/lzma/CPP/Windows/Registry.h
+++ b/3rdparty/lzma/CPP/Windows/Registry.h
@@ -3,9 +3,8 @@
#ifndef __WINDOWS_REGISTRY_H
#define __WINDOWS_REGISTRY_H
-#include "Common/Buffer.h"
-#include "Common/MyString.h"
-#include "Common/Types.h"
+#include "../Common/MyBuffer.h"
+#include "../Common/MyString.h"
namespace NWindows {
namespace NRegistry {
@@ -32,49 +31,49 @@ public:
LPTSTR keyClass = REG_NONE, DWORD options = REG_OPTION_NON_VOLATILE,
REGSAM accessMask = KEY_ALL_ACCESS,
LPSECURITY_ATTRIBUTES securityAttributes = NULL,
- LPDWORD disposition = NULL);
- LONG Open(HKEY parentKey, LPCTSTR keyName, REGSAM accessMask = KEY_ALL_ACCESS);
+ LPDWORD disposition = NULL) throw();
+ LONG Open(HKEY parentKey, LPCTSTR keyName, REGSAM accessMask = KEY_ALL_ACCESS) throw();
- LONG Close();
+ LONG Close() throw();
- LONG DeleteSubKey(LPCTSTR subKeyName);
- LONG RecurseDeleteKey(LPCTSTR subKeyName);
+ LONG DeleteSubKey(LPCTSTR subKeyName) throw();
+ LONG RecurseDeleteKey(LPCTSTR subKeyName) throw();
- LONG DeleteValue(LPCTSTR name);
+ LONG DeleteValue(LPCTSTR name) throw();
#ifndef _UNICODE
LONG DeleteValue(LPCWSTR name);
#endif
- LONG SetValue(LPCTSTR valueName, UInt32 value);
- LONG SetValue(LPCTSTR valueName, bool value);
- LONG SetValue(LPCTSTR valueName, LPCTSTR value);
+ LONG SetValue(LPCTSTR valueName, UInt32 value) throw();
+ LONG SetValue(LPCTSTR valueName, bool value) throw();
+ LONG SetValue(LPCTSTR valueName, LPCTSTR value) throw();
// LONG SetValue(LPCTSTR valueName, const CSysString &value);
#ifndef _UNICODE
LONG SetValue(LPCWSTR name, LPCWSTR value);
// LONG SetValue(LPCWSTR name, const UString &value);
#endif
- LONG SetValue(LPCTSTR name, const void *value, UInt32 size);
+ LONG SetValue(LPCTSTR name, const void *value, UInt32 size) throw();
LONG SetValue_Strings(LPCTSTR valueName, const UStringVector &strings);
LONG GetValue_Strings(LPCTSTR valueName, UStringVector &strings);
- LONG SetKeyValue(LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value);
+ LONG SetKeyValue(LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value) throw();
- LONG QueryValue(LPCTSTR name, UInt32 &value);
- LONG QueryValue(LPCTSTR name, bool &value);
- LONG QueryValue(LPCTSTR name, LPTSTR value, UInt32 &dataSize);
+ LONG QueryValue(LPCTSTR name, UInt32 &value) throw();
+ LONG QueryValue(LPCTSTR name, bool &value) throw();
+ LONG QueryValue(LPCTSTR name, LPTSTR value, UInt32 &dataSize) throw();
LONG QueryValue(LPCTSTR name, CSysString &value);
- LONG GetValue_IfOk(LPCTSTR name, UInt32 &value);
- LONG GetValue_IfOk(LPCTSTR name, bool &value);
+ LONG GetValue_IfOk(LPCTSTR name, UInt32 &value) throw();
+ LONG GetValue_IfOk(LPCTSTR name, bool &value) throw();
#ifndef _UNICODE
LONG QueryValue(LPCWSTR name, LPWSTR value, UInt32 &dataSize);
LONG QueryValue(LPCWSTR name, UString &value);
#endif
- LONG QueryValue(LPCTSTR name, void *value, UInt32 &dataSize);
+ LONG QueryValue(LPCTSTR name, void *value, UInt32 &dataSize) throw();
LONG QueryValue(LPCTSTR name, CByteBuffer &value, UInt32 &dataSize);
LONG EnumKeys(CSysStringVector &keyNames);
diff --git a/3rdparty/lzma/CPP/Windows/ResourceString.cpp b/3rdparty/lzma/CPP/Windows/ResourceString.cpp
new file mode 100644
index 00000000000..cc8b964a213
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/ResourceString.cpp
@@ -0,0 +1,103 @@
+// Windows/ResourceString.cpp
+
+#include "StdAfx.h"
+
+#ifndef _UNICODE
+#include "../Common/StringConvert.h"
+#endif
+
+#include "ResourceString.h"
+
+extern HINSTANCE g_hInstance;
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+
+#ifndef _UNICODE
+
+static CSysString MyLoadStringA(HINSTANCE hInstance, UINT resourceID)
+{
+ CSysString s;
+ int size = 128;
+ int len;
+ do
+ {
+ size <<= 1;
+ len = ::LoadString(hInstance, resourceID, s.GetBuf(size - 1), size);
+ }
+ while (size - len <= 1);
+ s.ReleaseBuf_CalcLen(len);
+ return s;
+}
+
+#endif
+
+static const int kStartSize = 256;
+
+static void MyLoadString2(HINSTANCE hInstance, UINT resourceID, UString &s)
+{
+ int size = kStartSize;
+ int len;
+ do
+ {
+ size <<= 1;
+ len = ::LoadStringW(hInstance, resourceID, s.GetBuf(size - 1), size);
+ }
+ while (size - len <= 1);
+ s.ReleaseBuf_CalcLen(len);
+}
+
+// NT4 doesn't support LoadStringW(,,, 0) to get pointer to resource string. So we don't use it.
+
+UString MyLoadString(UINT resourceID)
+{
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ return GetUnicodeString(MyLoadStringA(g_hInstance, resourceID));
+ else
+ #endif
+ {
+ {
+ wchar_t s[kStartSize];
+ s[0] = 0;
+ int len = ::LoadStringW(g_hInstance, resourceID, s, kStartSize);
+ if (kStartSize - len > 1)
+ return s;
+ }
+ UString dest;
+ MyLoadString2(g_hInstance, resourceID, dest);
+ return dest;
+ }
+}
+
+void MyLoadString(HINSTANCE hInstance, UINT resourceID, UString &dest)
+{
+ dest.Empty();
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ MultiByteToUnicodeString2(dest, MyLoadStringA(hInstance, resourceID));
+ else
+ #endif
+ {
+ {
+ wchar_t s[kStartSize];
+ s[0] = 0;
+ int len = ::LoadStringW(hInstance, resourceID, s, kStartSize);
+ if (kStartSize - len > 1)
+ {
+ dest = s;
+ return;
+ }
+ }
+ MyLoadString2(hInstance, resourceID, dest);
+ }
+}
+
+void MyLoadString(UINT resourceID, UString &dest)
+{
+ MyLoadString(g_hInstance, resourceID, dest);
+}
+
+}
diff --git a/3rdparty/lzma/CPP/Windows/ResourceString.h b/3rdparty/lzma/CPP/Windows/ResourceString.h
new file mode 100644
index 00000000000..f0bdabf47fe
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/ResourceString.h
@@ -0,0 +1,16 @@
+// Windows/ResourceString.h
+
+#ifndef __WINDOWS_RESOURCE_STRING_H
+#define __WINDOWS_RESOURCE_STRING_H
+
+#include "../Common/MyString.h"
+
+namespace NWindows {
+
+UString MyLoadString(UINT resourceID);
+void MyLoadString(HINSTANCE hInstance, UINT resourceID, UString &dest);
+void MyLoadString(UINT resourceID, UString &dest);
+
+}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/SecurityUtils.cpp b/3rdparty/lzma/CPP/Windows/SecurityUtils.cpp
new file mode 100644
index 00000000000..67a9d7fdcb3
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/SecurityUtils.cpp
@@ -0,0 +1,181 @@
+// Windows/SecurityUtils.cpp
+
+#include "StdAfx.h"
+
+#include "../Common/MyString.h"
+
+#include "SecurityUtils.h"
+
+namespace NWindows {
+namespace NSecurity {
+
+/*
+bool MyLookupAccountSid(LPCTSTR systemName, PSID sid,
+ CSysString &accountName, CSysString &domainName, PSID_NAME_USE sidNameUse)
+{
+ DWORD accountNameSize = 0, domainNameSize = 0;
+
+ if (!::LookupAccountSid(systemName, sid,
+ accountName.GetBuf(0), &accountNameSize,
+ domainName.GetBuf(0), &domainNameSize, sidNameUse))
+ {
+ if (::GetLastError() != ERROR_INSUFFICIENT_BUFFER)
+ return false;
+ }
+ DWORD accountNameSize2 = accountNameSize, domainNameSize2 = domainNameSize;
+ bool result = BOOLToBool(::LookupAccountSid(systemName, sid,
+ accountName.GetBuf(accountNameSize), &accountNameSize2,
+ domainName.GetBuf(domainNameSize), &domainNameSize2, sidNameUse));
+ accountName.ReleaseBuf_CalcLen(accountNameSize);
+ domainName.ReleaseBuf_CalcLen(domainNameSize);
+ return result;
+}
+*/
+
+static void SetLsaString(LPWSTR src, PLSA_UNICODE_STRING dest)
+{
+ int len = (int)wcslen(src);
+ dest->Length = (USHORT)(len * sizeof(WCHAR));
+ dest->MaximumLength = (USHORT)((len + 1) * sizeof(WCHAR));
+ dest->Buffer = src;
+}
+
+/*
+static void MyLookupSids(CPolicy &policy, PSID ps)
+{
+ LSA_REFERENCED_DOMAIN_LIST *referencedDomains = NULL;
+ LSA_TRANSLATED_NAME *names = NULL;
+ NTSTATUS nts = policy.LookupSids(1, &ps, &referencedDomains, &names);
+ int res = LsaNtStatusToWinError(nts);
+ LsaFreeMemory(referencedDomains);
+ LsaFreeMemory(names);
+}
+*/
+
+#ifndef _UNICODE
+typedef BOOL (WINAPI * LookupAccountNameWP)(
+ LPCWSTR lpSystemName,
+ LPCWSTR lpAccountName,
+ PSID Sid,
+ LPDWORD cbSid,
+ LPWSTR ReferencedDomainName,
+ LPDWORD cchReferencedDomainName,
+ PSID_NAME_USE peUse
+ );
+#endif
+
+static PSID GetSid(LPWSTR accountName)
+{
+ #ifndef _UNICODE
+ HMODULE hModule = GetModuleHandle(TEXT("Advapi32.dll"));
+ if (hModule == NULL)
+ return NULL;
+ LookupAccountNameWP lookupAccountNameW = (LookupAccountNameWP)GetProcAddress(hModule, "LookupAccountNameW");
+ if (lookupAccountNameW == NULL)
+ return NULL;
+ #endif
+
+ DWORD sidLen = 0, domainLen = 0;
+ SID_NAME_USE sidNameUse;
+ if (!
+ #ifdef _UNICODE
+ ::LookupAccountNameW
+ #else
+ lookupAccountNameW
+ #endif
+ (NULL, accountName, NULL, &sidLen, NULL, &domainLen, &sidNameUse))
+ {
+ if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER)
+ {
+ PSID pSid = ::HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sidLen);
+ LPWSTR domainName = (LPWSTR)::HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (domainLen + 1) * sizeof(WCHAR));
+ BOOL res =
+ #ifdef _UNICODE
+ ::LookupAccountNameW
+ #else
+ lookupAccountNameW
+ #endif
+ (NULL, accountName, pSid, &sidLen, domainName, &domainLen, &sidNameUse);
+ ::HeapFree(GetProcessHeap(), 0, domainName);
+ if (res)
+ return pSid;
+ }
+ }
+ return NULL;
+}
+
+#define MY__SE_LOCK_MEMORY_NAME L"SeLockMemoryPrivilege"
+
+bool AddLockMemoryPrivilege()
+{
+ CPolicy policy;
+ LSA_OBJECT_ATTRIBUTES attr;
+ attr.Length = sizeof(attr);
+ attr.RootDirectory = NULL;
+ attr.ObjectName = NULL;
+ attr.Attributes = 0;
+ attr.SecurityDescriptor = NULL;
+ attr.SecurityQualityOfService = NULL;
+ if (policy.Open(NULL, &attr,
+ // GENERIC_WRITE)
+ POLICY_ALL_ACCESS)
+ // STANDARD_RIGHTS_REQUIRED,
+ // GENERIC_READ | GENERIC_EXECUTE | POLICY_VIEW_LOCAL_INFORMATION | POLICY_LOOKUP_NAMES)
+ != 0)
+ return false;
+ LSA_UNICODE_STRING userRights;
+ wchar_t s[128] = MY__SE_LOCK_MEMORY_NAME;
+ SetLsaString(s, &userRights);
+ WCHAR userName[256 + 2];
+ DWORD size = 256;
+ if (!GetUserNameW(userName, &size))
+ return false;
+ PSID psid = GetSid(userName);
+ if (psid == NULL)
+ return false;
+ bool res = false;
+
+ /*
+ PLSA_UNICODE_STRING userRightsArray;
+ ULONG countOfRights;
+ NTSTATUS status = policy.EnumerateAccountRights(psid, &userRightsArray, &countOfRights);
+ if (status != 0)
+ return false;
+ bool finded = false;
+ for (ULONG i = 0; i < countOfRights; i++)
+ {
+ LSA_UNICODE_STRING &ur = userRightsArray[i];
+ if (ur.Length != s.Length() * sizeof(WCHAR))
+ continue;
+ if (wcsncmp(ur.Buffer, s, s.Length()) != 0)
+ continue;
+ finded = true;
+ res = true;
+ break;
+ }
+ if (!finded)
+ */
+ {
+ /*
+ LSA_ENUMERATION_INFORMATION *enums;
+ ULONG countReturned;
+ NTSTATUS status = policy.EnumerateAccountsWithUserRight(&userRights, &enums, &countReturned);
+ if (status == 0)
+ {
+ for (ULONG i = 0; i < countReturned; i++)
+ MyLookupSids(policy, enums[i].Sid);
+ if (enums)
+ ::LsaFreeMemory(enums);
+ res = true;
+ }
+ */
+ NTSTATUS status = policy.AddAccountRights(psid, &userRights);
+ if (status == 0)
+ res = true;
+ // ULONG res = LsaNtStatusToWinError(status);
+ }
+ HeapFree(GetProcessHeap(), 0, psid);
+ return res;
+}
+
+}}
diff --git a/3rdparty/lzma/CPP/Windows/SecurityUtils.h b/3rdparty/lzma/CPP/Windows/SecurityUtils.h
new file mode 100644
index 00000000000..8966dfd3b7d
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/SecurityUtils.h
@@ -0,0 +1,167 @@
+// Windows/SecurityUtils.h
+
+#ifndef __WINDOWS_SECURITY_UTILS_H
+#define __WINDOWS_SECURITY_UTILS_H
+
+#include <NTSecAPI.h>
+
+#include "Defs.h"
+
+namespace NWindows {
+namespace NSecurity {
+
+class CAccessToken
+{
+ HANDLE _handle;
+public:
+ CAccessToken(): _handle(NULL) {};
+ ~CAccessToken() { Close(); }
+ bool Close()
+ {
+ if (_handle == NULL)
+ return true;
+ bool res = BOOLToBool(::CloseHandle(_handle));
+ if (res)
+ _handle = NULL;
+ return res;
+ }
+
+ bool OpenProcessToken(HANDLE processHandle, DWORD desiredAccess)
+ {
+ Close();
+ return BOOLToBool(::OpenProcessToken(processHandle, desiredAccess, &_handle));
+ }
+
+ /*
+ bool OpenThreadToken(HANDLE threadHandle, DWORD desiredAccess, bool openAsSelf)
+ {
+ Close();
+ return BOOLToBool(::OpenTreadToken(threadHandle, desiredAccess, BoolToBOOL(anOpenAsSelf), &_handle));
+ }
+ */
+
+ bool AdjustPrivileges(bool disableAllPrivileges, PTOKEN_PRIVILEGES newState,
+ DWORD bufferLength, PTOKEN_PRIVILEGES previousState, PDWORD returnLength)
+ { return BOOLToBool(::AdjustTokenPrivileges(_handle, BoolToBOOL(disableAllPrivileges),
+ newState, bufferLength, previousState, returnLength)); }
+
+ bool AdjustPrivileges(bool disableAllPrivileges, PTOKEN_PRIVILEGES newState)
+ { return AdjustPrivileges(disableAllPrivileges, newState, 0, NULL, NULL); }
+
+ bool AdjustPrivileges(PTOKEN_PRIVILEGES newState)
+ { return AdjustPrivileges(false, newState); }
+
+};
+
+#ifndef _UNICODE
+typedef NTSTATUS (NTAPI *LsaOpenPolicyP)(PLSA_UNICODE_STRING SystemName,
+ PLSA_OBJECT_ATTRIBUTES ObjectAttributes, ACCESS_MASK DesiredAccess, PLSA_HANDLE PolicyHandle);
+typedef NTSTATUS (NTAPI *LsaCloseP)(LSA_HANDLE ObjectHandle);
+typedef NTSTATUS (NTAPI *LsaAddAccountRightsP)(LSA_HANDLE PolicyHandle,
+ PSID AccountSid, PLSA_UNICODE_STRING UserRights, ULONG CountOfRights );
+#define MY_STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L)
+#endif
+
+struct CPolicy
+{
+protected:
+ LSA_HANDLE _handle;
+ #ifndef _UNICODE
+ HMODULE hModule;
+ #endif
+public:
+ operator LSA_HANDLE() const { return _handle; }
+ CPolicy(): _handle(NULL)
+ {
+ #ifndef _UNICODE
+ hModule = GetModuleHandle(TEXT("Advapi32.dll"));
+ #endif
+ };
+ ~CPolicy() { Close(); }
+
+ NTSTATUS Open(PLSA_UNICODE_STRING systemName, PLSA_OBJECT_ATTRIBUTES objectAttributes,
+ ACCESS_MASK desiredAccess)
+ {
+ #ifndef _UNICODE
+ if (hModule == NULL)
+ return MY_STATUS_NOT_IMPLEMENTED;
+ LsaOpenPolicyP lsaOpenPolicy = (LsaOpenPolicyP)GetProcAddress(hModule, "LsaOpenPolicy");
+ if (lsaOpenPolicy == NULL)
+ return MY_STATUS_NOT_IMPLEMENTED;
+ #endif
+
+ Close();
+ return
+ #ifdef _UNICODE
+ ::LsaOpenPolicy
+ #else
+ lsaOpenPolicy
+ #endif
+ (systemName, objectAttributes, desiredAccess, &_handle);
+ }
+
+ NTSTATUS Close()
+ {
+ if (_handle == NULL)
+ return 0;
+
+ #ifndef _UNICODE
+ if (hModule == NULL)
+ return MY_STATUS_NOT_IMPLEMENTED;
+ LsaCloseP lsaClose = (LsaCloseP)GetProcAddress(hModule, "LsaClose");
+ if (lsaClose == NULL)
+ return MY_STATUS_NOT_IMPLEMENTED;
+ #endif
+
+ NTSTATUS res =
+ #ifdef _UNICODE
+ ::LsaClose
+ #else
+ lsaClose
+ #endif
+ (_handle);
+ _handle = NULL;
+ return res;
+ }
+
+ NTSTATUS EnumerateAccountsWithUserRight(PLSA_UNICODE_STRING userRights,
+ PLSA_ENUMERATION_INFORMATION *enumerationBuffer, PULONG countReturned)
+ { return LsaEnumerateAccountsWithUserRight(_handle, userRights, (void **)enumerationBuffer, countReturned); }
+
+ NTSTATUS EnumerateAccountRights(PSID sid, PLSA_UNICODE_STRING* userRights, PULONG countOfRights)
+ { return ::LsaEnumerateAccountRights(_handle, sid, userRights, countOfRights); }
+
+ NTSTATUS LookupSids(ULONG count, PSID* sids,
+ PLSA_REFERENCED_DOMAIN_LIST* referencedDomains, PLSA_TRANSLATED_NAME* names)
+ { return LsaLookupSids(_handle, count, sids, referencedDomains, names); }
+
+ NTSTATUS AddAccountRights(PSID accountSid, PLSA_UNICODE_STRING userRights, ULONG countOfRights)
+ {
+ #ifndef _UNICODE
+ if (hModule == NULL)
+ return MY_STATUS_NOT_IMPLEMENTED;
+ LsaAddAccountRightsP lsaAddAccountRights = (LsaAddAccountRightsP)GetProcAddress(hModule, "LsaAddAccountRights");
+ if (lsaAddAccountRights == NULL)
+ return MY_STATUS_NOT_IMPLEMENTED;
+ #endif
+
+ return
+ #ifdef _UNICODE
+ ::LsaAddAccountRights
+ #else
+ lsaAddAccountRights
+ #endif
+ (_handle, accountSid, userRights, countOfRights);
+ }
+ NTSTATUS AddAccountRights(PSID accountSid, PLSA_UNICODE_STRING userRights)
+ { return AddAccountRights(accountSid, userRights, 1); }
+
+ NTSTATUS RemoveAccountRights(PSID accountSid, bool allRights, PLSA_UNICODE_STRING userRights, ULONG countOfRights)
+ { return LsaRemoveAccountRights(_handle, accountSid, (BOOLEAN)(allRights ? TRUE : FALSE), userRights, countOfRights); }
+};
+
+bool AddLockMemoryPrivilege();
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Shell.cpp b/3rdparty/lzma/CPP/Windows/Shell.cpp
new file mode 100644
index 00000000000..8e82c14a726
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Shell.cpp
@@ -0,0 +1,340 @@
+// Windows/Shell.cpp
+
+#include "StdAfx.h"
+
+#include "../Common/MyCom.h"
+#ifndef _UNICODE
+#include "../Common/StringConvert.h"
+#endif
+
+#include "COM.h"
+#include "Shell.h"
+
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+namespace NShell {
+
+#ifndef UNDER_CE
+
+// SHGetMalloc is unsupported in Windows Mobile?
+
+void CItemIDList::Free()
+{
+ if (m_Object == NULL)
+ return;
+ CMyComPtr<IMalloc> shellMalloc;
+ if (::SHGetMalloc(&shellMalloc) != NOERROR)
+ throw 41099;
+ shellMalloc->Free(m_Object);
+ m_Object = NULL;
+}
+
+/*
+CItemIDList::(LPCITEMIDLIST itemIDList): m_Object(NULL)
+ { *this = itemIDList; }
+CItemIDList::(const CItemIDList& itemIDList): m_Object(NULL)
+ { *this = itemIDList; }
+
+CItemIDList& CItemIDList::operator=(LPCITEMIDLIST object)
+{
+ Free();
+ if (object != 0)
+ {
+ UINT32 size = GetSize(object);
+ m_Object = (LPITEMIDLIST)CoTaskMemAlloc(size);
+ if (m_Object != NULL)
+ MoveMemory(m_Object, object, size);
+ }
+ return *this;
+}
+
+CItemIDList& CItemIDList::operator=(const CItemIDList &object)
+{
+ Free();
+ if (object.m_Object != NULL)
+ {
+ UINT32 size = GetSize(object.m_Object);
+ m_Object = (LPITEMIDLIST)CoTaskMemAlloc(size);
+ if (m_Object != NULL)
+ MoveMemory(m_Object, object.m_Object, size);
+ }
+ return *this;
+}
+*/
+
+/////////////////////////////
+// CDrop
+
+void CDrop::Attach(HDROP object)
+{
+ Free();
+ m_Object = object;
+ m_Assigned = true;
+}
+
+void CDrop::Free()
+{
+ if (m_MustBeFinished && m_Assigned)
+ Finish();
+ m_Assigned = false;
+}
+
+UINT CDrop::QueryCountOfFiles()
+{
+ return QueryFile(0xFFFFFFFF, (LPTSTR)NULL, 0);
+}
+
+UString CDrop::QueryFileName(UINT fileIndex)
+{
+ UString fileName;
+ #ifndef _UNICODE
+ if (!g_IsNT)
+ {
+ AString fileNameA;
+ UINT bufferSize = QueryFile(fileIndex, (LPTSTR)NULL, 0);
+ const unsigned len = bufferSize + 2;
+ QueryFile(fileIndex, fileNameA.GetBuf(len), bufferSize + 1);
+ fileNameA.ReleaseBuf_CalcLen(len);
+ fileName = GetUnicodeString(fileNameA);
+ }
+ else
+ #endif
+ {
+ UINT bufferSize = QueryFile(fileIndex, (LPWSTR)NULL, 0);
+ const unsigned len = bufferSize + 2;
+ QueryFile(fileIndex, fileName.GetBuf(len), bufferSize + 1);
+ fileName.ReleaseBuf_CalcLen(len);
+ }
+ return fileName;
+}
+
+void CDrop::QueryFileNames(UStringVector &fileNames)
+{
+ UINT numFiles = QueryCountOfFiles();
+ fileNames.ClearAndReserve(numFiles);
+ for (UINT i = 0; i < numFiles; i++)
+ fileNames.AddInReserved(QueryFileName(i));
+}
+
+
+bool GetPathFromIDList(LPCITEMIDLIST itemIDList, CSysString &path)
+{
+ const unsigned len = MAX_PATH * 2;
+ bool result = BOOLToBool(::SHGetPathFromIDList(itemIDList, path.GetBuf(len)));
+ path.ReleaseBuf_CalcLen(len);
+ return result;
+}
+
+#endif
+
+#ifdef UNDER_CE
+
+bool BrowseForFolder(LPBROWSEINFO, CSysString)
+{
+ return false;
+}
+
+bool BrowseForFolder(HWND, LPCTSTR, UINT, LPCTSTR, CSysString &)
+{
+ return false;
+}
+
+bool BrowseForFolder(HWND /* owner */, LPCTSTR /* title */,
+ LPCTSTR /* initialFolder */, CSysString & /* resultPath */)
+{
+ /*
+ // SHBrowseForFolder doesn't work before CE 6.0 ?
+ if (GetProcAddress(LoadLibrary(L"ceshell.dll", L"SHBrowseForFolder") == 0)
+ MessageBoxW(0, L"no", L"", 0);
+ else
+ MessageBoxW(0, L"yes", L"", 0);
+ */
+ /*
+ UString s = L"all files";
+ s += L" (*.*)";
+ return MyGetOpenFileName(owner, title, initialFolder, s, resultPath, true);
+ */
+ return false;
+}
+
+#else
+
+bool BrowseForFolder(LPBROWSEINFO browseInfo, CSysString &resultPath)
+{
+ NWindows::NCOM::CComInitializer comInitializer;
+ LPITEMIDLIST itemIDList = ::SHBrowseForFolder(browseInfo);
+ if (itemIDList == NULL)
+ return false;
+ CItemIDList itemIDListHolder;
+ itemIDListHolder.Attach(itemIDList);
+ return GetPathFromIDList(itemIDList, resultPath);
+}
+
+
+int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM /* lp */, LPARAM data)
+{
+ #ifndef UNDER_CE
+ switch (uMsg)
+ {
+ case BFFM_INITIALIZED:
+ {
+ SendMessage(hwnd, BFFM_SETSELECTION, TRUE, data);
+ break;
+ }
+ /*
+ case BFFM_SELCHANGED:
+ {
+ TCHAR dir[MAX_PATH];
+ if (::SHGetPathFromIDList((LPITEMIDLIST) lp , dir))
+ SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM)dir);
+ else
+ SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM)TEXT(""));
+ break;
+ }
+ */
+ default:
+ break;
+ }
+ #endif
+ return 0;
+}
+
+
+bool BrowseForFolder(HWND owner, LPCTSTR title, UINT ulFlags,
+ LPCTSTR initialFolder, CSysString &resultPath)
+{
+ CSysString displayName;
+ BROWSEINFO browseInfo;
+ browseInfo.hwndOwner = owner;
+ browseInfo.pidlRoot = NULL;
+
+ // there are Unicode/Astring problems in some WinCE SDK ?
+ /*
+ #ifdef UNDER_CE
+ browseInfo.pszDisplayName = (LPSTR)displayName.GetBuf(MAX_PATH);
+ browseInfo.lpszTitle = (LPCSTR)title;
+ #else
+ */
+ browseInfo.pszDisplayName = displayName.GetBuf(MAX_PATH);
+ browseInfo.lpszTitle = title;
+ // #endif
+ browseInfo.ulFlags = ulFlags;
+ browseInfo.lpfn = (initialFolder != NULL) ? BrowseCallbackProc : NULL;
+ browseInfo.lParam = (LPARAM)initialFolder;
+ return BrowseForFolder(&browseInfo, resultPath);
+}
+
+bool BrowseForFolder(HWND owner, LPCTSTR title,
+ LPCTSTR initialFolder, CSysString &resultPath)
+{
+ return BrowseForFolder(owner, title,
+ #ifndef UNDER_CE
+ BIF_NEWDIALOGSTYLE |
+ #endif
+ BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT, initialFolder, resultPath);
+ // BIF_STATUSTEXT; BIF_USENEWUI (Version 5.0)
+}
+
+#ifndef _UNICODE
+
+typedef BOOL (WINAPI * SHGetPathFromIDListWP)(LPCITEMIDLIST pidl, LPWSTR pszPath);
+
+bool GetPathFromIDList(LPCITEMIDLIST itemIDList, UString &path)
+{
+ path.Empty();
+ SHGetPathFromIDListWP shGetPathFromIDListW = (SHGetPathFromIDListWP)
+ ::GetProcAddress(::GetModuleHandleW(L"shell32.dll"), "SHGetPathFromIDListW");
+ if (shGetPathFromIDListW == 0)
+ return false;
+ const unsigned len = MAX_PATH * 2;
+ bool result = BOOLToBool(shGetPathFromIDListW(itemIDList, path.GetBuf(len)));
+ path.ReleaseBuf_CalcLen(len);
+ return result;
+}
+
+typedef LPITEMIDLIST (WINAPI * SHBrowseForFolderWP)(LPBROWSEINFOW lpbi);
+
+bool BrowseForFolder(LPBROWSEINFOW browseInfo, UString &resultPath)
+{
+ NWindows::NCOM::CComInitializer comInitializer;
+ SHBrowseForFolderWP shBrowseForFolderW = (SHBrowseForFolderWP)
+ ::GetProcAddress(::GetModuleHandleW(L"shell32.dll"), "SHBrowseForFolderW");
+ if (shBrowseForFolderW == 0)
+ return false;
+ LPITEMIDLIST itemIDList = shBrowseForFolderW(browseInfo);
+ if (itemIDList == NULL)
+ return false;
+ CItemIDList itemIDListHolder;
+ itemIDListHolder.Attach(itemIDList);
+ return GetPathFromIDList(itemIDList, resultPath);
+}
+
+
+int CALLBACK BrowseCallbackProc2(HWND hwnd, UINT uMsg, LPARAM /* lp */, LPARAM data)
+{
+ switch (uMsg)
+ {
+ case BFFM_INITIALIZED:
+ {
+ SendMessageW(hwnd, BFFM_SETSELECTIONW, TRUE, data);
+ break;
+ }
+ /*
+ case BFFM_SELCHANGED:
+ {
+ wchar_t dir[MAX_PATH * 2];
+
+ if (shGetPathFromIDListW((LPITEMIDLIST)lp , dir))
+ SendMessageW(hwnd, BFFM_SETSTATUSTEXTW, 0, (LPARAM)dir);
+ else
+ SendMessageW(hwnd, BFFM_SETSTATUSTEXTW, 0, (LPARAM)L"");
+ break;
+ }
+ */
+ default:
+ break;
+ }
+ return 0;
+}
+
+
+static bool BrowseForFolder(HWND owner, LPCWSTR title, UINT ulFlags,
+ LPCWSTR initialFolder, UString &resultPath)
+{
+ UString displayName;
+ BROWSEINFOW browseInfo;
+ browseInfo.hwndOwner = owner;
+ browseInfo.pidlRoot = NULL;
+ browseInfo.pszDisplayName = displayName.GetBuf(MAX_PATH);
+ browseInfo.lpszTitle = title;
+ browseInfo.ulFlags = ulFlags;
+ browseInfo.lpfn = (initialFolder != NULL) ? BrowseCallbackProc2 : NULL;
+ browseInfo.lParam = (LPARAM)initialFolder;
+ return BrowseForFolder(&browseInfo, resultPath);
+}
+
+bool BrowseForFolder(HWND owner, LPCWSTR title, LPCWSTR initialFolder, UString &resultPath)
+{
+ if (g_IsNT)
+ return BrowseForFolder(owner, title,
+ BIF_NEWDIALOGSTYLE | BIF_RETURNONLYFSDIRS
+ // | BIF_STATUSTEXT // This flag is not supported when BIF_NEWDIALOGSTYLE is specified.
+ , initialFolder, resultPath);
+ // BIF_STATUSTEXT; BIF_USENEWUI (Version 5.0)
+ CSysString s;
+ bool res = BrowseForFolder(owner, GetSystemString(title),
+ BIF_NEWDIALOGSTYLE | BIF_RETURNONLYFSDIRS
+ // | BIF_STATUSTEXT // This flag is not supported when BIF_NEWDIALOGSTYLE is specified.
+ , GetSystemString(initialFolder), s);
+ resultPath = GetUnicodeString(s);
+ return res;
+}
+
+#endif
+
+#endif
+
+}}
diff --git a/3rdparty/lzma/CPP/Windows/Shell.h b/3rdparty/lzma/CPP/Windows/Shell.h
new file mode 100644
index 00000000000..4bff18cf99a
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Shell.h
@@ -0,0 +1,94 @@
+// Windows/Shell.h
+
+#ifndef __WINDOWS_SHELL_H
+#define __WINDOWS_SHELL_H
+
+#include <windows.h>
+#include <shlobj.h>
+
+#include "../Common/MyString.h"
+
+#include "Defs.h"
+
+namespace NWindows{
+namespace NShell{
+
+/////////////////////////
+// CItemIDList
+#ifndef UNDER_CE
+
+class CItemIDList
+{
+ LPITEMIDLIST m_Object;
+public:
+ CItemIDList(): m_Object(NULL) {}
+ // CItemIDList(LPCITEMIDLIST itemIDList);
+ // CItemIDList(const CItemIDList& itemIDList);
+ ~CItemIDList() { Free(); }
+ void Free();
+ void Attach(LPITEMIDLIST object)
+ {
+ Free();
+ m_Object = object;
+ }
+ LPITEMIDLIST Detach()
+ {
+ LPITEMIDLIST object = m_Object;
+ m_Object = NULL;
+ return object;
+ }
+ operator LPITEMIDLIST() { return m_Object;}
+ operator LPCITEMIDLIST() const { return m_Object;}
+ LPITEMIDLIST* operator&() { return &m_Object; }
+ LPITEMIDLIST operator->() { return m_Object; }
+
+ // CItemIDList& operator=(LPCITEMIDLIST object);
+ // CItemIDList& operator=(const CItemIDList &object);
+};
+
+/////////////////////////////
+// CDrop
+
+class CDrop
+{
+ HDROP m_Object;
+ bool m_MustBeFinished;
+ bool m_Assigned;
+ void Free();
+public:
+ CDrop(bool mustBeFinished) : m_MustBeFinished(mustBeFinished), m_Assigned(false) {}
+ ~CDrop() { Free(); }
+
+ void Attach(HDROP object);
+ operator HDROP() { return m_Object;}
+ bool QueryPoint(LPPOINT point)
+ { return BOOLToBool(::DragQueryPoint(m_Object, point)); }
+ void Finish() { ::DragFinish(m_Object); }
+ UINT QueryFile(UINT fileIndex, LPTSTR fileName, UINT fileNameSize)
+ { return ::DragQueryFile(m_Object, fileIndex, fileName, fileNameSize); }
+ #ifndef _UNICODE
+ UINT QueryFile(UINT fileIndex, LPWSTR fileName, UINT fileNameSize)
+ { return ::DragQueryFileW(m_Object, fileIndex, fileName, fileNameSize); }
+ #endif
+ UINT QueryCountOfFiles();
+ UString QueryFileName(UINT fileIndex);
+ void QueryFileNames(UStringVector &fileNames);
+};
+
+#endif
+
+/////////////////////////////
+// Functions
+
+bool GetPathFromIDList(LPCITEMIDLIST itemIDList, CSysString &path);
+bool BrowseForFolder(LPBROWSEINFO lpbi, CSysString &resultPath);
+bool BrowseForFolder(HWND owner, LPCTSTR title, LPCTSTR initialFolder, CSysString &resultPath);
+
+#ifndef _UNICODE
+bool GetPathFromIDList(LPCITEMIDLIST itemIDList, UString &path);
+bool BrowseForFolder(LPBROWSEINFO lpbi, UString &resultPath);
+bool BrowseForFolder(HWND owner, LPCWSTR title, LPCWSTR initialFolder, UString &resultPath);
+#endif
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/StdAfx.h b/3rdparty/lzma/CPP/Windows/StdAfx.h
index 8b383c5ba9b..1766dfa860a 100644
--- a/3rdparty/lzma/CPP/Windows/StdAfx.h
+++ b/3rdparty/lzma/CPP/Windows/StdAfx.h
@@ -3,7 +3,6 @@
#ifndef __STDAFX_H
#define __STDAFX_H
-#include "../Common/MyWindows.h"
-#include "../Common/NewHandler.h"
+#include "../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/Windows/System.cpp b/3rdparty/lzma/CPP/Windows/System.cpp
index 4bc8d2a3fa6..59cb7c0b4e8 100644
--- a/3rdparty/lzma/CPP/Windows/System.cpp
+++ b/3rdparty/lzma/CPP/Windows/System.cpp
@@ -2,6 +2,8 @@
#include "StdAfx.h"
+#include "../Common/MyWindows.h"
+
#include "../Common/Defs.h"
#include "System.h"
@@ -9,6 +11,8 @@
namespace NWindows {
namespace NSystem {
+#ifdef _WIN32
+
UInt32 GetNumberOfProcessors()
{
SYSTEM_INFO systemInfo;
@@ -16,6 +20,18 @@ UInt32 GetNumberOfProcessors()
return (UInt32)systemInfo.dwNumberOfProcessors;
}
+#else
+
+UInt32 GetNumberOfProcessors()
+{
+ return 1;
+}
+
+#endif
+
+
+#ifdef _WIN32
+
#ifndef UNDER_CE
#if !defined(_WIN64) && defined(__GNUC__)
@@ -43,29 +59,53 @@ typedef BOOL (WINAPI *GlobalMemoryStatusExP)(MY_LPMEMORYSTATUSEX lpBuffer);
#endif
-UInt64 GetRamSize()
+#endif
+
+
+bool GetRamSize(UInt64 &size)
{
+ size = (UInt64)(sizeof(size_t)) << 29;
+
+ #ifdef _WIN32
+
#ifndef UNDER_CE
- MY_MEMORYSTATUSEX stat;
- stat.dwLength = sizeof(stat);
+ MY_MEMORYSTATUSEX stat;
+ stat.dwLength = sizeof(stat);
#endif
+
#ifdef _WIN64
- if (!::GlobalMemoryStatusEx(&stat))
- return 0;
- return MyMin(stat.ullTotalVirtual, stat.ullTotalPhys);
+
+ if (!::GlobalMemoryStatusEx(&stat))
+ return false;
+ size = MyMin(stat.ullTotalVirtual, stat.ullTotalPhys);
+ return true;
+
#else
- #ifndef UNDER_CE
- GlobalMemoryStatusExP globalMemoryStatusEx = (GlobalMemoryStatusExP)
- ::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")), "GlobalMemoryStatusEx");
- if (globalMemoryStatusEx != 0 && globalMemoryStatusEx(&stat))
- return MyMin(stat.ullTotalVirtual, stat.ullTotalPhys);
+
+ #ifndef UNDER_CE
+ GlobalMemoryStatusExP globalMemoryStatusEx = (GlobalMemoryStatusExP)
+ ::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")), "GlobalMemoryStatusEx");
+ if (globalMemoryStatusEx && globalMemoryStatusEx(&stat))
+ {
+ size = MyMin(stat.ullTotalVirtual, stat.ullTotalPhys);
+ return true;
+ }
+ #endif
+
+ {
+ MEMORYSTATUS stat2;
+ stat2.dwLength = sizeof(stat2);
+ ::GlobalMemoryStatus(&stat2);
+ size = MyMin(stat2.dwTotalVirtual, stat2.dwTotalPhys);
+ return true;
+ }
+
#endif
- {
- MEMORYSTATUS stat;
- stat.dwLength = sizeof(stat);
- ::GlobalMemoryStatus(&stat);
- return MyMin(stat.dwTotalVirtual, stat.dwTotalPhys);
- }
+
+ #else
+
+ return false;
+
#endif
}
diff --git a/3rdparty/lzma/CPP/Windows/System.h b/3rdparty/lzma/CPP/Windows/System.h
index e0067158fd9..910bc7fd5f5 100644
--- a/3rdparty/lzma/CPP/Windows/System.h
+++ b/3rdparty/lzma/CPP/Windows/System.h
@@ -3,13 +3,14 @@
#ifndef __WINDOWS_SYSTEM_H
#define __WINDOWS_SYSTEM_H
-#include "../Common/Types.h"
+#include "../Common/MyTypes.h"
namespace NWindows {
namespace NSystem {
UInt32 GetNumberOfProcessors();
-UInt64 GetRamSize();
+
+bool GetRamSize(UInt64 &size); // returns false, if unknown ram size
}}
diff --git a/3rdparty/lzma/CPP/Windows/Time.h b/3rdparty/lzma/CPP/Windows/Time.h
deleted file mode 100644
index 537b80e6161..00000000000
--- a/3rdparty/lzma/CPP/Windows/Time.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Windows/Time.h
-
-#ifndef __WINDOWS_TIME_H
-#define __WINDOWS_TIME_H
-
-#include "Common/Types.h"
-
-namespace NWindows {
-namespace NTime {
-
-bool DosTimeToFileTime(UInt32 dosTime, FILETIME &fileTime);
-bool FileTimeToDosTime(const FILETIME &fileTime, UInt32 &dosTime);
-void UnixTimeToFileTime(UInt32 unixTime, FILETIME &fileTime);
-bool UnixTime64ToFileTime(Int64 unixTime, FILETIME &fileTime);
-bool FileTimeToUnixTime(const FILETIME &fileTime, UInt32 &unixTime);
-Int64 FileTimeToUnixTime64(const FILETIME &ft);
-bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day,
- unsigned hour, unsigned min, unsigned sec, UInt64 &resSeconds);
-void GetCurUtcFileTime(FILETIME &ft);
-
-}}
-
-#endif
diff --git a/3rdparty/lzma/CPP/Windows/Time.cpp b/3rdparty/lzma/CPP/Windows/TimeUtils.cpp
index 2cb028f9564..7ef44d9cc50 100644
--- a/3rdparty/lzma/CPP/Windows/Time.cpp
+++ b/3rdparty/lzma/CPP/Windows/TimeUtils.cpp
@@ -1,10 +1,9 @@
-// Windows/Time.cpp
+// Windows/TimeUtils.cpp
#include "StdAfx.h"
-#include "Windows/Defs.h"
-
-#include "Time.h"
+#include "Defs.h"
+#include "TimeUtils.h"
namespace NWindows {
namespace NTime {
@@ -17,7 +16,7 @@ static const UInt64 kUnixTimeOffset =
(UInt64)60 * 60 * 24 * (89 + 365 * (kUnixTimeStartYear - kFileTimeStartYear));
static const UInt64 kNumSecondsInFileTime = (UInt64)(Int64)-1 / kNumTimeQuantumsInSecond;
-bool DosTimeToFileTime(UInt32 dosTime, FILETIME &ft)
+bool DosTimeToFileTime(UInt32 dosTime, FILETIME &ft) throw()
{
#if defined(_WIN32) && !defined(UNDER_CE)
return BOOLToBool(::DosDateTimeToFileTime((UInt16)(dosTime >> 16), (UInt16)(dosTime & 0xFFFF), &ft));
@@ -42,7 +41,7 @@ static const UInt32 kLowDosTime = 0x210000;
#define PERIOD_100 (PERIOD_4 * 25 - 1)
#define PERIOD_400 (PERIOD_100 * 4 + 1)
-bool FileTimeToDosTime(const FILETIME &ft, UInt32 &dosTime)
+bool FileTimeToDosTime(const FILETIME &ft, UInt32 &dosTime) throw()
{
#if defined(_WIN32) && !defined(UNDER_CE)
@@ -116,31 +115,25 @@ bool FileTimeToDosTime(const FILETIME &ft, UInt32 &dosTime)
return true;
}
-void UnixTimeToFileTime(UInt32 unixTime, FILETIME &ft)
+void UnixTimeToFileTime(UInt32 unixTime, FILETIME &ft) throw()
{
UInt64 v = (kUnixTimeOffset + (UInt64)unixTime) * kNumTimeQuantumsInSecond;
ft.dwLowDateTime = (DWORD)v;
ft.dwHighDateTime = (DWORD)(v >> 32);
}
-bool UnixTime64ToFileTime(Int64 unixTime, FILETIME &ft)
+bool UnixTime64ToFileTime(Int64 unixTime, FILETIME &ft) throw()
{
- Int64 v = (Int64)kUnixTimeOffset + unixTime;
- if (unixTime < 0)
+ if (unixTime > kNumSecondsInFileTime - kUnixTimeOffset)
{
- if (v < 0)
- {
- ft.dwLowDateTime = ft.dwHighDateTime = 0;
- return false;
- }
+ ft.dwLowDateTime = ft.dwHighDateTime = (UInt32)(Int32)-1;
+ return false;
}
- else
+ Int64 v = (Int64)kUnixTimeOffset + unixTime;
+ if (v < 0)
{
- if (v < unixTime || v > kNumSecondsInFileTime)
- {
- ft.dwLowDateTime = ft.dwHighDateTime = (UInt32)(Int32)-1;
- return false;
- }
+ ft.dwLowDateTime = ft.dwHighDateTime = 0;
+ return false;
}
UInt64 v2 = (UInt64)v * kNumTimeQuantumsInSecond;
ft.dwLowDateTime = (DWORD)v2;
@@ -148,13 +141,13 @@ bool UnixTime64ToFileTime(Int64 unixTime, FILETIME &ft)
return true;
}
-Int64 FileTimeToUnixTime64(const FILETIME &ft)
+Int64 FileTimeToUnixTime64(const FILETIME &ft) throw()
{
UInt64 winTime = (((UInt64)ft.dwHighDateTime) << 32) + ft.dwLowDateTime;
return (Int64)(winTime / kNumTimeQuantumsInSecond) - kUnixTimeOffset;
}
-bool FileTimeToUnixTime(const FILETIME &ft, UInt32 &unixTime)
+bool FileTimeToUnixTime(const FILETIME &ft, UInt32 &unixTime) throw()
{
UInt64 winTime = (((UInt64)ft.dwHighDateTime) << 32) + ft.dwLowDateTime;
winTime /= kNumTimeQuantumsInSecond;
@@ -174,7 +167,7 @@ bool FileTimeToUnixTime(const FILETIME &ft, UInt32 &unixTime)
}
bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day,
- unsigned hour, unsigned min, unsigned sec, UInt64 &resSeconds)
+ unsigned hour, unsigned min, unsigned sec, UInt64 &resSeconds) throw()
{
resSeconds = 0;
if (year < kFileTimeStartYear || year >= 10000 || month < 1 || month > 12 ||
@@ -193,11 +186,18 @@ bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day,
return true;
}
-void GetCurUtcFileTime(FILETIME &ft)
+void GetCurUtcFileTime(FILETIME &ft) throw()
{
+ // Both variants provide same low resolution on WinXP: about 15 ms.
+ // But GetSystemTimeAsFileTime is much faster.
+
+ #ifdef UNDER_CE
SYSTEMTIME st;
GetSystemTime(&st);
SystemTimeToFileTime(&st, &ft);
+ #else
+ GetSystemTimeAsFileTime(&ft);
+ #endif
}
}}
diff --git a/3rdparty/lzma/CPP/Windows/TimeUtils.h b/3rdparty/lzma/CPP/Windows/TimeUtils.h
new file mode 100644
index 00000000000..d3033ede3ef
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/TimeUtils.h
@@ -0,0 +1,24 @@
+// Windows/TimeUtils.h
+
+#ifndef __WINDOWS_TIME_UTILS_H
+#define __WINDOWS_TIME_UTILS_H
+
+#include "../Common/MyTypes.h"
+#include "../Common/MyWindows.h"
+
+namespace NWindows {
+namespace NTime {
+
+bool DosTimeToFileTime(UInt32 dosTime, FILETIME &fileTime) throw();
+bool FileTimeToDosTime(const FILETIME &fileTime, UInt32 &dosTime) throw();
+void UnixTimeToFileTime(UInt32 unixTime, FILETIME &fileTime) throw();
+bool UnixTime64ToFileTime(Int64 unixTime, FILETIME &fileTime) throw();
+bool FileTimeToUnixTime(const FILETIME &fileTime, UInt32 &unixTime) throw();
+Int64 FileTimeToUnixTime64(const FILETIME &ft) throw();
+bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day,
+ unsigned hour, unsigned min, unsigned sec, UInt64 &resSeconds) throw();
+void GetCurUtcFileTime(FILETIME &ft) throw();
+
+}}
+
+#endif
diff --git a/3rdparty/lzma/CPP/Windows/Window.cpp b/3rdparty/lzma/CPP/Windows/Window.cpp
new file mode 100644
index 00000000000..365850223ce
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Window.cpp
@@ -0,0 +1,179 @@
+// Windows/Window.cpp
+
+#include "StdAfx.h"
+
+#ifndef _UNICODE
+#include "../Common/StringConvert.h"
+#endif
+#include "Window.h"
+
+#ifndef _UNICODE
+extern bool g_IsNT;
+#endif
+
+namespace NWindows {
+
+#ifndef _UNICODE
+ATOM MyRegisterClass(CONST WNDCLASSW *wndClass)
+{
+ if (g_IsNT)
+ return RegisterClassW(wndClass);
+ WNDCLASSA wndClassA;
+ wndClassA.style = wndClass->style;
+ wndClassA.lpfnWndProc = wndClass->lpfnWndProc;
+ wndClassA.cbClsExtra = wndClass->cbClsExtra;
+ wndClassA.cbWndExtra = wndClass->cbWndExtra;
+ wndClassA.hInstance = wndClass->hInstance;
+ wndClassA.hIcon = wndClass->hIcon;
+ wndClassA.hCursor = wndClass->hCursor;
+ wndClassA.hbrBackground = wndClass->hbrBackground;
+ AString menuName;
+ AString className;
+ if (IS_INTRESOURCE(wndClass->lpszMenuName))
+ wndClassA.lpszMenuName = (LPCSTR)wndClass->lpszMenuName;
+ else
+ {
+ menuName = GetSystemString(wndClass->lpszMenuName);
+ wndClassA.lpszMenuName = menuName;
+ }
+ if (IS_INTRESOURCE(wndClass->lpszClassName))
+ wndClassA.lpszClassName = (LPCSTR)wndClass->lpszClassName;
+ else
+ {
+ className = GetSystemString(wndClass->lpszClassName);
+ wndClassA.lpszClassName = className;
+ }
+ return RegisterClassA(&wndClassA);
+}
+
+bool CWindow::Create(LPCWSTR className,
+ LPCWSTR windowName, DWORD style,
+ int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu,
+ HINSTANCE instance, LPVOID createParam)
+{
+ if (g_IsNT)
+ {
+ _window = ::CreateWindowW(className, windowName,
+ style, x, y, width, height, parentWindow,
+ idOrHMenu, instance, createParam);
+ return (_window != NULL);
+ }
+ return Create(GetSystemString(className), GetSystemString(windowName),
+ style, x, y, width, height, parentWindow,
+ idOrHMenu, instance, createParam);
+}
+
+bool CWindow::CreateEx(DWORD exStyle, LPCWSTR className,
+ LPCWSTR windowName, DWORD style,
+ int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu,
+ HINSTANCE instance, LPVOID createParam)
+{
+ if (g_IsNT)
+ {
+ _window = ::CreateWindowExW(exStyle, className, windowName,
+ style, x, y, width, height, parentWindow,
+ idOrHMenu, instance, createParam);
+ return (_window != NULL);
+ }
+ AString classNameA;
+ LPCSTR classNameP;
+ if (IS_INTRESOURCE(className))
+ classNameP = (LPCSTR)className;
+ else
+ {
+ classNameA = GetSystemString(className);
+ classNameP = classNameA;
+ }
+ AString windowNameA;
+ LPCSTR windowNameP;
+ if (IS_INTRESOURCE(windowName))
+ windowNameP = (LPCSTR)windowName;
+ else
+ {
+ windowNameA = GetSystemString(windowName);
+ windowNameP = windowNameA;
+ }
+ return CreateEx(exStyle, classNameP, windowNameP,
+ style, x, y, width, height, parentWindow,
+ idOrHMenu, instance, createParam);
+}
+
+#endif
+
+#ifndef _UNICODE
+bool MySetWindowText(HWND wnd, LPCWSTR s)
+{
+ if (g_IsNT)
+ return BOOLToBool(::SetWindowTextW(wnd, s));
+ return BOOLToBool(::SetWindowTextA(wnd, UnicodeStringToMultiByte(s)));
+}
+#endif
+
+bool CWindow::GetText(CSysString &s)
+{
+ s.Empty();
+ int len = GetTextLength();
+ if (len == 0)
+ return (::GetLastError() == ERROR_SUCCESS);
+ TCHAR *p = s.GetBuf(len);
+ {
+ int len2 = GetText(p, len + 1);
+ if (len > len2)
+ len = len2;
+ }
+ s.ReleaseBuf_CalcLen(len);
+ if (len == 0)
+ return (::GetLastError() == ERROR_SUCCESS);
+ return true;
+}
+
+#ifndef _UNICODE
+bool CWindow::GetText(UString &s)
+{
+ if (g_IsNT)
+ {
+ s.Empty();
+ int len = GetWindowTextLengthW(_window);
+ if (len == 0)
+ return (::GetLastError() == ERROR_SUCCESS);
+ wchar_t *p = s.GetBuf(len);
+ {
+ int len2 = GetWindowTextW(_window, p, len + 1);
+ if (len > len2)
+ len = len2;
+ }
+ s.ReleaseBuf_CalcLen(len);
+ if (len == 0)
+ return (::GetLastError() == ERROR_SUCCESS);
+ return true;
+ }
+ CSysString sysString;
+ bool result = GetText(sysString);
+ MultiByteToUnicodeString2(s, sysString);
+ return result;
+}
+#endif
+
+
+/*
+bool CWindow::ModifyStyleBase(int styleOffset,
+ DWORD remove, DWORD add, UINT flags)
+{
+ DWORD style = GetWindowLong(styleOffset);
+ DWORD newStyle = (style & ~remove) | add;
+ if (style == newStyle)
+ return false; // it is not good
+
+ SetWindowLong(styleOffset, newStyle);
+ if (flags != 0)
+ {
+ ::SetWindowPos(_window, NULL, 0, 0, 0, 0,
+ SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | flags);
+ }
+ return TRUE;
+}
+*/
+
+}
diff --git a/3rdparty/lzma/CPP/Windows/Window.h b/3rdparty/lzma/CPP/Windows/Window.h
new file mode 100644
index 00000000000..3bda6795d0c
--- /dev/null
+++ b/3rdparty/lzma/CPP/Windows/Window.h
@@ -0,0 +1,284 @@
+// Windows/Window.h
+
+#ifndef __WINDOWS_WINDOW_H
+#define __WINDOWS_WINDOW_H
+
+#include "../Common/MyWindows.h"
+#include "../Common/MyString.h"
+
+#include "Defs.h"
+
+#ifndef UNDER_CE
+
+#define MY__WM_CHANGEUISTATE 0x0127
+#define MY__WM_UPDATEUISTATE 0x0128
+#define MY__WM_QUERYUISTATE 0x0129
+
+// LOWORD(wParam) values in WM_*UISTATE
+#define MY__UIS_SET 1
+#define MY__UIS_CLEAR 2
+#define MY__UIS_INITIALIZE 3
+
+// HIWORD(wParam) values in WM_*UISTATE
+#define MY__UISF_HIDEFOCUS 0x1
+#define MY__UISF_HIDEACCEL 0x2
+#define MY__UISF_ACTIVE 0x4
+
+#endif
+
+namespace NWindows {
+
+inline ATOM MyRegisterClass(CONST WNDCLASS *wndClass)
+ { return ::RegisterClass(wndClass); }
+
+#ifndef _UNICODE
+ATOM MyRegisterClass(CONST WNDCLASSW *wndClass);
+#endif
+
+#ifdef _UNICODE
+inline bool MySetWindowText(HWND wnd, LPCWSTR s) { return BOOLToBool(::SetWindowText(wnd, s)); }
+#else
+bool MySetWindowText(HWND wnd, LPCWSTR s);
+#endif
+
+
+#ifdef UNDER_CE
+#define GWLP_USERDATA GWL_USERDATA
+#define GWLP_WNDPROC GWL_WNDPROC
+#define BTNS_BUTTON TBSTYLE_BUTTON
+#define WC_COMBOBOXW L"ComboBox"
+#define DWLP_MSGRESULT DWL_MSGRESULT
+#endif
+
+class CWindow
+{
+private:
+ // bool ModifyStyleBase(int styleOffset, DWORD remove, DWORD add, UINT flags);
+protected:
+ HWND _window;
+public:
+ CWindow(HWND newWindow = NULL): _window(newWindow){};
+ CWindow& operator=(HWND newWindow)
+ {
+ _window = newWindow;
+ return *this;
+ }
+ operator HWND() const { return _window; }
+ void Attach(HWND newWindow) { _window = newWindow; }
+ HWND Detach()
+ {
+ HWND window = _window;
+ _window = NULL;
+ return window;
+ }
+
+ bool Foreground() { return BOOLToBool(::SetForegroundWindow(_window)); }
+
+ HWND GetParent() const { return ::GetParent(_window); }
+ bool GetWindowRect(LPRECT rect) const { return BOOLToBool(::GetWindowRect(_window,rect)); }
+ #ifndef UNDER_CE
+ bool IsZoomed() const { return BOOLToBool(::IsZoomed(_window)); }
+ #endif
+ bool ClientToScreen(LPPOINT point) const { return BOOLToBool(::ClientToScreen(_window, point)); }
+ bool ScreenToClient(LPPOINT point) const { return BOOLToBool(::ScreenToClient(_window, point)); }
+
+ bool CreateEx(DWORD exStyle, LPCTSTR className,
+ LPCTSTR windowName, DWORD style,
+ int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu,
+ HINSTANCE instance, LPVOID createParam)
+ {
+ _window = ::CreateWindowEx(exStyle, className, windowName,
+ style, x, y, width, height, parentWindow,
+ idOrHMenu, instance, createParam);
+ return (_window != NULL);
+ }
+
+ bool Create(LPCTSTR className,
+ LPCTSTR windowName, DWORD style,
+ int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu,
+ HINSTANCE instance, LPVOID createParam)
+ {
+ _window = ::CreateWindow(className, windowName,
+ style, x, y, width, height, parentWindow,
+ idOrHMenu, instance, createParam);
+ return (_window != NULL);
+ }
+
+ #ifndef _UNICODE
+ bool Create(LPCWSTR className,
+ LPCWSTR windowName, DWORD style,
+ int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu,
+ HINSTANCE instance, LPVOID createParam);
+ bool CreateEx(DWORD exStyle, LPCWSTR className,
+ LPCWSTR windowName, DWORD style,
+ int x, int y, int width, int height,
+ HWND parentWindow, HMENU idOrHMenu,
+ HINSTANCE instance, LPVOID createParam);
+ #endif
+
+
+ bool Destroy()
+ {
+ if (_window == NULL)
+ return true;
+ bool result = BOOLToBool(::DestroyWindow(_window));
+ if (result)
+ _window = NULL;
+ return result;
+ }
+ bool IsWindow() { return BOOLToBool(::IsWindow(_window)); }
+ bool Move(int x, int y, int width, int height, bool repaint = true)
+ { return BOOLToBool(::MoveWindow(_window, x, y, width, height, BoolToBOOL(repaint))); }
+
+ bool ChangeSubWindowSizeX(HWND hwnd, int xSize)
+ {
+ RECT rect;
+ ::GetWindowRect(hwnd, &rect);
+ POINT p1;
+ p1.x = rect.left;
+ p1.y = rect.top;
+ ScreenToClient(&p1);
+ return BOOLToBool(::MoveWindow(hwnd, p1.x, p1.y, xSize, rect.bottom - rect.top, TRUE));
+ }
+
+ void ScreenToClient(RECT *rect)
+ {
+ POINT p1, p2;
+ p1.x = rect->left;
+ p1.y = rect->top;
+ p2.x = rect->right;
+ p2.y = rect->bottom;
+ ScreenToClient(&p1);
+ ScreenToClient(&p2);
+
+ rect->left = p1.x;
+ rect->top = p1.y;
+ rect->right = p2.x;
+ rect->bottom = p2.y;
+ }
+
+ bool GetClientRect(LPRECT rect) { return BOOLToBool(::GetClientRect(_window, rect)); }
+ bool Show(int cmdShow) { return BOOLToBool(::ShowWindow(_window, cmdShow)); }
+ bool Show_Bool(bool show) { return Show(show ? SW_SHOW: SW_HIDE); }
+
+ #ifndef UNDER_CE
+ bool SetPlacement(CONST WINDOWPLACEMENT *placement) { return BOOLToBool(::SetWindowPlacement(_window, placement)); }
+ bool GetPlacement(WINDOWPLACEMENT *placement) { return BOOLToBool(::GetWindowPlacement(_window, placement)); }
+ #endif
+ bool Update() { return BOOLToBool(::UpdateWindow(_window)); }
+ bool InvalidateRect(LPCRECT rect, bool backgroundErase = true)
+ { return BOOLToBool(::InvalidateRect(_window, rect, BoolToBOOL(backgroundErase))); }
+ void SetRedraw(bool redraw = true) { SendMsg(WM_SETREDRAW, BoolToBOOL(redraw), 0); }
+
+ LONG_PTR SetStyle(LONG_PTR style) { return SetLongPtr(GWL_STYLE, style); }
+ LONG_PTR GetStyle() const { return GetLongPtr(GWL_STYLE); }
+ // bool MyIsMaximized() const { return ((GetStyle() & WS_MAXIMIZE) != 0); }
+
+ LONG_PTR SetLong(int index, LONG newLongPtr) { return ::SetWindowLong(_window, index, newLongPtr); }
+ LONG_PTR GetLong(int index) const { return ::GetWindowLong(_window, index); }
+ LONG_PTR SetUserDataLong(LONG newLongPtr) { return SetLong(GWLP_USERDATA, newLongPtr); }
+ LONG_PTR GetUserDataLong() const { return GetLong(GWLP_USERDATA); }
+
+
+ #ifdef UNDER_CE
+
+ LONG_PTR SetLongPtr(int index, LONG_PTR newLongPtr) { return SetLong(index, newLongPtr); }
+ LONG_PTR GetLongPtr(int index) const { return GetLong(index); }
+
+ LONG_PTR SetUserDataLongPtr(LONG_PTR newLongPtr) { return SetUserDataLong(newLongPtr); }
+ LONG_PTR GetUserDataLongPtr() const { return GetUserDataLong(); }
+
+ #else
+
+ LONG_PTR SetLongPtr(int index, LONG_PTR newLongPtr)
+ { return ::SetWindowLongPtr(_window, index,
+ #ifndef _WIN64
+ (LONG)
+ #endif
+ newLongPtr); }
+ #ifndef _UNICODE
+ LONG_PTR SetLongPtrW(int index, LONG_PTR newLongPtr)
+ { return ::SetWindowLongPtrW(_window, index,
+ #ifndef _WIN64
+ (LONG)
+ #endif
+ newLongPtr); }
+ #endif
+
+ LONG_PTR GetLongPtr(int index) const { return ::GetWindowLongPtr(_window, index); }
+ LONG_PTR SetUserDataLongPtr(LONG_PTR newLongPtr) { return SetLongPtr(GWLP_USERDATA, newLongPtr); }
+ LONG_PTR GetUserDataLongPtr() const { return GetLongPtr(GWLP_USERDATA); }
+
+ #endif
+
+ /*
+ bool ModifyStyle(HWND hWnd, DWORD remove, DWORD add, UINT flags = 0)
+ { return ModifyStyleBase(GWL_STYLE, remove, add, flags); }
+ bool ModifyStyleEx(HWND hWnd, DWORD remove, DWORD add, UINT flags = 0)
+ { return ModifyStyleBase(GWL_EXSTYLE, remove, add, flags); }
+ */
+
+ HWND SetFocus() { return ::SetFocus(_window); }
+
+ LRESULT SendMsg(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
+ { return ::SendMessage(_window, message, wParam, lParam); }
+ #ifndef _UNICODE
+ LRESULT SendMsgW(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
+ { return ::SendMessageW(_window, message, wParam, lParam); }
+ #endif
+
+ bool PostMsg(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
+ { return BOOLToBool(::PostMessage(_window, message, wParam, lParam)); }
+ #ifndef _UNICODE
+ bool PostMsgW(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
+ { return BOOLToBool(::PostMessageW(_window, message, wParam, lParam)); }
+ #endif
+
+ bool SetText(LPCTSTR s) { return BOOLToBool(::SetWindowText(_window, s)); }
+ #ifndef _UNICODE
+ bool SetText(LPCWSTR s) { return MySetWindowText(_window, s); }
+ #endif
+
+ int GetTextLength() const
+ { return GetWindowTextLength(_window); }
+ UINT GetText(LPTSTR string, int maxCount) const
+ { return GetWindowText(_window, string, maxCount); }
+ bool GetText(CSysString &s);
+ #ifndef _UNICODE
+ /*
+ UINT GetText(LPWSTR string, int maxCount) const
+ { return GetWindowTextW(_window, string, maxCount); }
+ */
+ bool GetText(UString &s);
+ #endif
+
+ bool Enable(bool enable)
+ { return BOOLToBool(::EnableWindow(_window, BoolToBOOL(enable))); }
+
+ bool IsEnabled()
+ { return BOOLToBool(::IsWindowEnabled(_window)); }
+
+ #ifndef UNDER_CE
+ HMENU GetSystemMenu(bool revert)
+ { return ::GetSystemMenu(_window, BoolToBOOL(revert)); }
+ #endif
+
+ UINT_PTR SetTimer(UINT_PTR idEvent, UINT elapse, TIMERPROC timerFunc = 0)
+ { return ::SetTimer(_window, idEvent, elapse, timerFunc); }
+ bool KillTimer(UINT_PTR idEvent)
+ {return BOOLToBool(::KillTimer(_window, idEvent)); }
+
+ HICON SetIcon(WPARAM sizeType, HICON icon) { return (HICON)SendMsg(WM_SETICON, sizeType, (LPARAM)icon); }
+};
+
+#define RECT_SIZE_X(r) ((r).right - (r).left)
+#define RECT_SIZE_Y(r) ((r).bottom - (r).top)
+
+inline bool IsKeyDown(int virtKey) { return (::GetKeyState(virtKey) & 0x8000) != 0; }
+
+}
+
+#endif
diff --git a/3rdparty/lzma/7zC.txt b/3rdparty/lzma/DOC/7zC.txt
index 5d5d06d7b44..939b720f986 100644
--- a/3rdparty/lzma/7zC.txt
+++ b/3rdparty/lzma/DOC/7zC.txt
@@ -1,4 +1,4 @@
-7z ANSI-C Decoder 4.62
+7z ANSI-C Decoder 9.35
----------------------
7z ANSI-C provides 7z/LZMA decoding.
@@ -29,11 +29,9 @@ Files
How To Use
----------
-You must download 7-Zip program from www.7-zip.org.
+You can create .7z archive with 7z.exe, 7za.exe or 7zr.exe:
-You can create .7z archive with 7z.exe or 7za.exe:
-
- 7za.exe a archive.7z *.htm -r -mx -m0fb=255
+ 7z.exe a archive.7z *.htm -r -mx -m0fb=255
If you have big number of files in archive, and you need fast extracting,
you can use partly-solid archives:
@@ -112,14 +110,9 @@ SzArEx_Open function allocates and frees temporary structures by "allocTemp" fun
Listing code:
~~~~~~~~~~~~~
- {
- UInt32 i;
- for (i = 0; i < db.db.NumFiles; i++)
- {
- CFileItem *f = db.db.Files + i;
- printf("%10d %s\n", (int)f->Size, f->Name);
- }
- }
+
+ Use SzArEx_GetFileNameUtf16 function. Look example code in C\Util\7z\7zMain.c file.
+
Extracting code:
~~~~~~~~~~~~~~~~
diff --git a/3rdparty/lzma/7zFormat.txt b/3rdparty/lzma/DOC/7zFormat.txt
index e1cf7380d24..55b52b1b9ca 100644
--- a/3rdparty/lzma/7zFormat.txt
+++ b/3rdparty/lzma/DOC/7zFormat.txt
@@ -1,5 +1,5 @@
-7z Format description (2.30 Beta 25)
------------------------------------
+7z Format description (4.59)
+----------------------------
This file contains description of 7z archive format.
7z archive can contain files compressed with any method.
@@ -126,40 +126,43 @@ UINT64 means real UINT64 encoded with the following scheme:
Property IDs
------------
-0x00 = kEnd,
+0x00 = kEnd
-0x01 = kHeader,
+0x01 = kHeader
-0x02 = kArchiveProperties,
+0x02 = kArchiveProperties
-0x03 = kAdditionalStreamsInfo,
-0x04 = kMainStreamsInfo,
-0x05 = kFilesInfo,
+0x03 = kAdditionalStreamsInfo
+0x04 = kMainStreamsInfo
+0x05 = kFilesInfo
-0x06 = kPackInfo,
-0x07 = kUnPackInfo,
-0x08 = kSubStreamsInfo,
+0x06 = kPackInfo
+0x07 = kUnPackInfo
+0x08 = kSubStreamsInfo
-0x09 = kSize,
-0x0A = kCRC,
+0x09 = kSize
+0x0A = kCRC
-0x0B = kFolder,
+0x0B = kFolder
-0x0C = kCodersUnPackSize,
-0x0D = kNumUnPackStream,
+0x0C = kCodersUnPackSize
+0x0D = kNumUnPackStream
-0x0E = kEmptyStream,
-0x0F = kEmptyFile,
-0x10 = kAnti,
+0x0E = kEmptyStream
+0x0F = kEmptyFile
+0x10 = kAnti
-0x11 = kName,
-0x12 = kCreationTime,
-0x13 = kLastAccessTime,
-0x14 = kLastWriteTime,
-0x15 = kWinAttributes,
-0x16 = kComment,
+0x11 = kName
+0x12 = kCTime
+0x13 = kATime
+0x14 = kMTime
+0x15 = kWinAttributes
+0x16 = kComment
-0x17 = kEncodedHeader,
+0x17 = kEncodedHeader
+
+0x18 = kStartPos
+0x19 = kDummy
7z format headers
@@ -238,24 +241,19 @@ Folder
{
BYTE
{
- 0:3 DecompressionMethod.IDSize
- 4:
- 0 - IsSimple
- 1 - Is not simple
- 5:
- 0 - No Attributes
- 1 - There Are Attributes
- 7:
- 0 - Last Method in Alternative_Method_List
- 1 - There are more alternative methods
+ 0:3 CodecIdSize
+ 4: Is Complex Coder
+ 5: There Are Attributes
+ 6: Reserved
+ 7: There are more alternative methods. (Not used anymore, must be 0).
}
- BYTE DecompressionMethod.ID[DecompressionMethod.IDSize]
- if (!IsSimple)
+ BYTE CodecId[CodecIdSize]
+ if (Is Complex Coder)
{
UINT64 NumInStreams;
UINT64 NumOutStreams;
}
- if (DecompressionMethod[0] != 0)
+ if (There Are Attributes)
{
UINT64 PropertiesSize
BYTE Properties[PropertiesSize]
@@ -387,9 +385,9 @@ FilesInfo
for(EmptyStreams)
BIT IsAntiFile
- case kCreationTime: (0x12)
- case kLastAccessTime: (0x13)
- case kLastWriteTime: (0x14)
+ case kCTime: (0x12)
+ case kATime: (0x13)
+ case kMTime: (0x14)
BYTE AllAreDefined
if (AllAreDefined == 0)
{
@@ -401,7 +399,7 @@ FilesInfo
UINT64 DataIndex
[]
for(Definded Items)
- UINT32 Time
+ UINT64 Time
[]
kNames: (0x11)
diff --git a/3rdparty/lzma/DOC/Methods.txt b/3rdparty/lzma/DOC/Methods.txt
new file mode 100644
index 00000000000..1a1c54c503f
--- /dev/null
+++ b/3rdparty/lzma/DOC/Methods.txt
@@ -0,0 +1,158 @@
+7-Zip method IDs for 7z and xz archives
+---------------------------------------
+
+Version: 15.06
+Date: 2015-06-23
+
+Each compression or crypto method in 7z is associated with unique binary value (ID).
+The length of ID in bytes is arbitrary but it can not exceed 63 bits (8 bytes).
+
+xz and 7z formats use same ID map.
+
+If you want to add some new ID, you have two ways:
+ 1) Write request for allocating IDs to 7-Zip developers.
+ 2) Generate 8-bytes ID:
+
+ 3F ZZ ZZ ZZ ZZ ZZ MM MM
+
+ 3F - Prefix for random IDs (1 byte)
+ ZZ ZZ ZZ ZZ ZZ - Developer ID (5 bytes). Use real random bytes.
+
+ MM MM - Method ID (2 bytes)
+
+ You can notify 7-Zip developers about your Developer ID / Method ID.
+
+ Note: Use new ID, if old codec can not decode data encoded with new version.
+
+
+List of defined IDs
+-------------------
+
+00 - Copy
+
+03 - Delta
+04 - BCJ (x86)
+05 - PPC (big-endian)
+06 - IA64
+07 - ARM (little-endian)
+08 - ARMT (little-endian)
+09 - SPARC
+
+21 - LZMA2
+
+02.. - Common
+ 03 [Swap]
+ - 2 Swap2
+ - 4 Swap4
+
+03.. - 7z
+ 01 -
+ 01 - LZMA
+
+ 03 - [Branch Codecs]
+ 01 - [x86 Codecs]
+ 03 - BCJ
+ 1B - BCJ2 (4 packed streams)
+ 02 -
+ 05 - PPC (big-endian)
+ 03 -
+ 01 - Alpha
+ 04 -
+ 01 - IA64
+ 05 -
+ 01 - ARM (little-endian)
+ 06 -
+ 05 - M68 (big-endian)
+ 07 -
+ 01 - ARMT (little-endian)
+ 08 -
+ 05 - SPARC
+
+ 04 -
+ 01 - PPMD
+
+ 7F -
+ 01 - experimental method.
+
+
+04.. - Misc codecs
+
+ 00 - Reserved
+
+ 01 - [Zip]
+ 00 - Copy (not used. Use {00} instead)
+ 01 - Shrink
+ 06 - Implode
+ 08 - Deflate
+ 09 - Deflate64
+ 0A - Imploding
+ 0C - BZip2 (not used. Use {040202} instead)
+ 0E - LZMA (LZMA-zip)
+ 5F - xz
+ 60 - Jpeg
+ 61 - WavPack
+ 62 - PPMd (PPMd-zip)
+ 63 - wzAES
+
+ 02 -
+ 02 - BZip2
+
+ 03 - [Rar]
+ 01 - Rar1
+ 02 - Rar2
+ 03 - Rar3
+ 05 - Rar5
+
+ 04 - [Arj]
+ 01 - Arj(1,2,3)
+ 02 - Arj4
+
+ 05 - [Z]
+
+ 06 - [Lzh]
+
+ 07 - Reserved for 7z
+
+ 08 - [Cab]
+
+ 09 - [NSIS]
+ 01 - DeflateNSIS
+ 02 - BZip2NSIS
+
+ F7 - External codecs (that are not included to 7-Zip)
+
+ 0x xx - reserved
+ 10 xx - reserved
+
+
+06.. - Crypto
+
+ F0 - Ciphers without hashing algo
+
+ 01 - [AES]
+ 0x - AES-128
+ 4x - AES-192
+ 8x - AES-256
+ Cx - AES
+
+ x0 - ECB
+ x1 - CBC
+ x2 - CFB
+ x3 - OFB
+ x4 - CTR
+
+ F1 - Combine Ciphers
+
+ 01 - [Zip]
+ 01 - ZipCrypto (Main Zip crypto algo)
+
+ 03 - [RAR]
+ 02 -
+ 03 - Rar29AES (AES-128 + modified SHA-1)
+
+ 07 - [7z]
+ 01 - 7zAES (AES-256 + SHA-256)
+
+
+---
+End of document
diff --git a/3rdparty/lzma/DOC/installer.txt b/3rdparty/lzma/DOC/installer.txt
new file mode 100644
index 00000000000..b99d21d24ff
--- /dev/null
+++ b/3rdparty/lzma/DOC/installer.txt
@@ -0,0 +1,166 @@
+7-Zip for installers 9.38
+-------------------------
+
+7-Zip is a file archiver for Windows NT/2000/2003/2008/XP/Vista/7/8/10.
+
+7-Zip for installers is part of LZMA SDK.
+LZMA SDK is written and placed in the public domain by Igor Pavlov.
+
+It's allowed to join 7-Zip SFX module with another software.
+It's allowed to change resources of 7-Zip's SFX modules.
+
+
+HOW to use
+-----------
+
+7zr.exe is reduced version of 7za.exe of 7-Zip.
+7zr.exe supports only format with these codecs: LZMA, LZMA2, BCJ, BCJ2, ARM, Copy.
+
+Example of compressing command for installation packages:
+
+7zr a archive.7z files
+
+7zSD.sfx is SFX module for installers. 7zSD.sfx uses msvcrt.dll.
+
+SFX modules for installers allow to create installation program.
+Such module extracts archive to temp folder and then runs specified program and removes
+temp files after program finishing. Self-extract archive for installers must be created
+as joining 3 files: SFX_Module, Installer_Config, 7z_Archive.
+Installer_Config is optional file. You can use the following command to create installer
+self-extract archive:
+
+copy /b 7zSD.sfx + config.txt + archive.7z archive.exe
+
+The smallest installation package size can be achieved, if installation files was
+uncompressed before including to 7z archive.
+
+-y switch for installer module (at runtime) specifies quiet mode for extracting.
+
+Installer Config file format
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Config file contains commands for Installer. File begins from string
+;!@Install@!UTF-8! and ends with ;!@InstallEnd@!. File must be written
+in UTF-8 encoding. File contains string pairs:
+
+ID_String="Value"
+
+ID_String Description
+
+Title Title for messages
+BeginPrompt Begin Prompt message
+Progress Value can be "yes" or "no". Default value is "yes".
+RunProgram Command for executing. Default value is "setup.exe".
+ Substring %%T will be replaced with path to temporary
+ folder, where files were extracted
+Directory Directory prefix for "RunProgram". Default value is ".\\"
+ExecuteFile Name of file for executing
+ExecuteParameters Parameters for "ExecuteFile"
+
+
+You can omit any string pair.
+
+There are two ways to run program: RunProgram and ExecuteFile.
+Use RunProgram, if you want to run some program from .7z archive.
+Use ExecuteFile, if you want to open some document from .7z archive or
+if you want to execute some command from Windows.
+
+If you use RunProgram and if you specify empty directory prefix: Directory="",
+the system searches for the executable file in the following sequence:
+
+1. The directory from which the application (installer) loaded.
+2. The temporary folder, where files were extracted.
+3. The Windows system directory.
+
+
+Config file Examples
+~~~~~~~~~~~~~~~~~~~~
+
+;!@Install@!UTF-8!
+Title="7-Zip 4.00"
+BeginPrompt="Do you want to install the 7-Zip 4.00?"
+RunProgram="setup.exe"
+;!@InstallEnd@!
+
+
+
+;!@Install@!UTF-8!
+Title="7-Zip 4.00"
+BeginPrompt="Do you want to install the 7-Zip 4.00?"
+ExecuteFile="7zip.msi"
+;!@InstallEnd@!
+
+
+
+;!@Install@!UTF-8!
+Title="7-Zip 4.01 Update"
+BeginPrompt="Do you want to install the 7-Zip 4.01 Update?"
+ExecuteFile="msiexec.exe"
+ExecuteParameters="/i 7zip.msi REINSTALL=ALL REINSTALLMODE=vomus"
+;!@InstallEnd@!
+
+
+
+Small SFX modules for installers
+--------------------------------
+
+7zS2.sfx - small SFX module (GUI version)
+7zS2con.sfx - small SFX module (Console version)
+
+Small SFX modules support this codecs: LZMA, LZMA2, BCJ, BCJ2, ARM, COPY
+
+Small SFX module is similar to common SFX module for installers.
+The difference (what's new in small version):
+ - Smaller size (30 KB vs 100 KB)
+ - C source code instead of Ñ++
+ - No installer Configuration file
+ - No extracting progress window
+ - It decompresses solid 7z blocks (it can be whole 7z archive) to RAM.
+ So user that calls SFX installer must have free RAM of size of largest
+ solid 7z block (size of 7z archive at simplest case).
+
+How to use
+----------
+
+copy /b 7zS2.sfx + archive.7z sfx.exe
+
+When you run installer sfx module (sfx.exe)
+1) It creates "7zNNNNNNNN" temp folder in system temp folder.
+2) It extracts .7z archive to that folder
+3) It executes one file from "7zNNNNNNNN" temp folder.
+4) It removes "7zNNNNNNNN" temp folder
+
+You can send parameters to installer, and installer will transfer them to extracted .exe file.
+
+Small SFX uses 3 levels of priorities to select file to execute:
+
+ 1) Files in root folder have higher priority than files in subfolders.
+ 2) File extension priorities (from high to low priority order):
+ bat, cmd, exe, inf, msi, cab (under Windows CE), html, htm
+ 3) File name priorities (from high to low priority order):
+ setup, install, run, start
+
+Windows CE (ARM) version of 7zS2.sfx is included to 7-Zip for Windows Mobile package.
+
+
+Examples
+--------
+
+1) To create compressed console 7-Zip:
+
+7zr a c.7z 7z.exe 7z.dll -mx
+copy /b 7zS2con.sfx + c.7z 7zCompr.exe
+7zCompr.exe b -md22
+
+
+2) To create compressed GUI 7-Zip:
+
+7zr a g.7z 7zg.exe 7z.dll -mx
+copy /b 7zS2.sfx + g.7z 7zgCompr.exe
+7zgCompr.exe b -md22
+
+
+3) To open some file:
+
+7zr a h.7z readme.txt -mx
+copy /b 7zS2.sfx + h.7z 7zTxt.exe
+7zTxt.exe
diff --git a/3rdparty/lzma/history.txt b/3rdparty/lzma/DOC/lzma-history.txt
index c6b77641500..9ce878cc743 100644
--- a/3rdparty/lzma/history.txt
+++ b/3rdparty/lzma/DOC/lzma-history.txt
@@ -1,6 +1,62 @@
HISTORY of the LZMA SDK
-----------------------
+15.12 2015-11-19
+-------------------------
+- The BUG in C version of 7z decoder was fixed:
+ 7zDec.c : SzDecodeLzma2()
+ 7z decoder could mistakenly report about decoding error for some 7z archives
+ that use LZMA2 compression method.
+ The probability to get that mistaken decoding error report was about
+ one error per 16384 solid blocks for solid blocks larger than 16 KB (compressed size).
+- The BUG (in 9.26-15.11) in C version of 7z decoder was fixed:
+ 7zArcIn.c : SzReadHeader2()
+ 7z decoder worked incorrectly for 7z archives that contain
+ empty solid blocks, that can be placed to 7z archive, if some file is
+ unavailable for reading during archive creation.
+
+
+15.09 beta 2015-10-16
+-------------------------
+- The BUG in LZMA / LZMA2 encoding code was fixed.
+ The BUG in LzFind.c::MatchFinder_ReadBlock() function.
+ If input data size is larger than (4 GiB - dictionary_size),
+ the following code worked incorrectly:
+ - LZMA : LzmaEnc_MemEncode(), LzmaEncode() : LZMA encoding functions
+ for compressing from memory to memory.
+ That BUG is not related to LZMA encoder version that works via streams.
+ - LZMA2 : multi-threaded version of LZMA2 encoder worked incorrectly, if
+ default value of chunk size (CLzma2EncProps::blockSize) is changed
+ to value larger than (4 GiB - dictionary_size).
+
+
+9.38 beta 2015-01-03
+-------------------------
+- The BUG in 9.31-9.37 was fixed:
+ IArchiveGetRawProps interface was disabled for 7z archives.
+- The BUG in 9.26-9.36 was fixed:
+ Some code in CPP\7zip\Archive\7z\ worked correctly only under Windows.
+
+
+9.36 beta 2014-12-26
+-------------------------
+- The BUG in command line version was fixed:
+ 7-Zip created temporary archive in current folder during update archive
+ operation, if -w{Path} switch was not specified.
+ The fixed 7-Zip creates temporary archive in folder that contains updated archive.
+- The BUG in 9.33-9.35 was fixed:
+ 7-Zip silently ignored file reading errors during 7z or gz archive creation,
+ and the created archive contained only part of file that was read before error.
+ The fixed 7-Zip stops archive creation and it reports about error.
+
+
+9.35 beta 2014-12-07
+-------------------------
+- 7zr.exe now support AES encryption.
+- SFX mudules were added to LZMA SDK
+- Some bugs were fixed.
+
+
9.21 beta 2011-04-11
-------------------------
- New class FString for file names at file systems.
diff --git a/3rdparty/lzma/DOC/lzma-sdk.txt b/3rdparty/lzma/DOC/lzma-sdk.txt
new file mode 100644
index 00000000000..0367867c725
--- /dev/null
+++ b/3rdparty/lzma/DOC/lzma-sdk.txt
@@ -0,0 +1,357 @@
+LZMA SDK 15.14
+--------------
+
+LZMA SDK provides the documentation, samples, header files,
+libraries, and tools you need to develop applications that
+use 7z / LZMA / LZMA2 / XZ compression.
+
+LZMA is an improved version of famous LZ77 compression algorithm.
+It was improved in way of maximum increasing of compression ratio,
+keeping high decompression speed and low memory requirements for
+decompressing.
+
+LZMA2 is a LZMA based compression method. LZMA2 provides better
+multithreading support for compression than LZMA and some other improvements.
+
+7z is a file format for data compression and file archiving.
+7z is a main file format for 7-Zip compression program (www.7-zip.org).
+7z format supports different compression methods: LZMA, LZMA2 and others.
+7z also supports AES-256 based encryption.
+
+XZ is a file format for data compression that uses LZMA2 compression.
+XZ format provides additional features: SHA/CRC check, filters for
+improved compression ratio, splitting to blocks and streams,
+
+
+
+LICENSE
+-------
+
+LZMA SDK is written and placed in the public domain by Igor Pavlov.
+
+Some code in LZMA SDK is based on public domain code from another developers:
+ 1) PPMd var.H (2001): Dmitry Shkarin
+ 2) SHA-256: Wei Dai (Crypto++ library)
+
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute the
+original LZMA SDK code, either in source code form or as a compiled binary, for
+any purpose, commercial or non-commercial, and by any means.
+
+LZMA SDK code is compatible with open source licenses, for example, you can
+include it to GNU GPL or GNU LGPL code.
+
+
+LZMA SDK Contents
+-----------------
+
+ Source code:
+
+ - C / C++ / C# / Java - LZMA compression and decompression
+ - C / C++ - LZMA2 compression and decompression
+ - C / C++ - XZ compression and decompression
+ - C - 7z decompression
+ - C++ - 7z compression and decompression
+ - C - small SFXs for installers (7z decompression)
+ - C++ - SFXs and SFXs for installers (7z decompression)
+
+ Precomiled binaries:
+
+ - console programs for lzma / 7z / xz compression and decompression
+ - SFX modules for installers.
+
+
+UNIX/Linux version
+------------------
+To compile C++ version of file->file LZMA encoding, go to directory
+CPP/7zip/Bundles/LzmaCon
+and call make to recompile it:
+ make -f makefile.gcc clean all
+
+In some UNIX/Linux versions you must compile LZMA with static libraries.
+To compile with static libraries, you can use
+LIB = -lm -static
+
+Also you can use p7zip (port of 7-Zip for POSIX systems like Unix or Linux):
+
+ http://p7zip.sourceforge.net/
+
+
+Files
+-----
+
+DOC/7zC.txt - 7z ANSI-C Decoder description
+DOC/7zFormat.txt - 7z Format description
+DOC/installer.txt - information about 7-Zip for installers
+DOC/lzma.txt - LZMA compression description
+DOC/lzma-sdk.txt - LZMA SDK description (this file)
+DOC/lzma-history.txt - history of LZMA SDK
+DOC/lzma-specification.txt - Specification of LZMA
+DOC/Methods.txt - Compression method IDs for .7z
+
+bin/installer/ - example script to create installer that uses SFX module,
+
+bin/7zdec.exe - simplified 7z archive decoder
+bin/7zr.exe - 7-Zip console program (reduced version)
+bin/x64/7zr.exe - 7-Zip console program (reduced version) (x64 version)
+bin/lzma.exe - file->file LZMA encoder/decoder for Windows
+bin/7zS2.sfx - small SFX module for installers (GUI version)
+bin/7zS2con.sfx - small SFX module for installers (Console version)
+bin/7zSD.sfx - SFX module for installers.
+
+
+7zDec.exe
+---------
+7zDec.exe is simplified 7z archive decoder.
+It supports only LZMA, LZMA2, and PPMd methods.
+7zDec decodes whole solid block from 7z archive to RAM.
+The RAM consumption can be high.
+
+
+
+
+Source code structure
+---------------------
+
+
+Asm/ - asm files (optimized code for CRC calculation and Intel-AES encryption)
+
+C/ - C files (compression / decompression and other)
+ Util/
+ 7z - 7z decoder program (decoding 7z files)
+ Lzma - LZMA program (file->file LZMA encoder/decoder).
+ LzmaLib - LZMA library (.DLL for Windows)
+ SfxSetup - small SFX module for installers
+
+CPP/ -- CPP files
+
+ Common - common files for C++ projects
+ Windows - common files for Windows related code
+
+ 7zip - files related to 7-Zip
+
+ Archive - files related to archiving
+
+ Common - common files for archive handling
+ 7z - 7z C++ Encoder/Decoder
+
+ Bundles - Modules that are bundles of other modules (files)
+
+ Alone7z - 7zr.exe: Standalone 7-Zip console program (reduced version)
+ Format7zExtractR - 7zxr.dll: Reduced version of 7z DLL: extracting from 7z/LZMA/BCJ/BCJ2.
+ Format7zR - 7zr.dll: Reduced version of 7z DLL: extracting/compressing to 7z/LZMA/BCJ/BCJ2
+ LzmaCon - lzma.exe: LZMA compression/decompression
+ LzmaSpec - example code for LZMA Specification
+ SFXCon - 7zCon.sfx: Console 7z SFX module
+ SFXSetup - 7zS.sfx: 7z SFX module for installers
+ SFXWin - 7z.sfx: GUI 7z SFX module
+
+ Common - common files for 7-Zip
+
+ Compress - files for compression/decompression
+
+ Crypto - files for encryption / decompression
+
+ UI - User Interface files
+
+ Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll
+ Common - Common UI files
+ Console - Code for console program (7z.exe)
+ Explorer - Some code from 7-Zip Shell extension
+ FileManager - Some GUI code from 7-Zip File Manager
+ GUI - Some GUI code from 7-Zip
+
+
+CS/ - C# files
+ 7zip
+ Common - some common files for 7-Zip
+ Compress - files related to compression/decompression
+ LZ - files related to LZ (Lempel-Ziv) compression algorithm
+ LZMA - LZMA compression/decompression
+ LzmaAlone - file->file LZMA compression/decompression
+ RangeCoder - Range Coder (special code of compression/decompression)
+
+Java/ - Java files
+ SevenZip
+ Compression - files related to compression/decompression
+ LZ - files related to LZ (Lempel-Ziv) compression algorithm
+ LZMA - LZMA compression/decompression
+ RangeCoder - Range Coder (special code of compression/decompression)
+
+
+Note:
+ Asm / C / C++ source code of LZMA SDK is part of 7-Zip's source code.
+ 7-Zip's source code can be downloaded from 7-Zip's SourceForge page:
+
+ http://sourceforge.net/projects/sevenzip/
+
+
+
+LZMA features
+-------------
+ - Variable dictionary size (up to 1 GB)
+ - Estimated compressing speed: about 2 MB/s on 2 GHz CPU
+ - Estimated decompressing speed:
+ - 20-30 MB/s on modern 2 GHz cpu
+ - 1-2 MB/s on 200 MHz simple RISC cpu: (ARM, MIPS, PowerPC)
+ - Small memory requirements for decompressing (16 KB + DictionarySize)
+ - Small code size for decompressing: 5-8 KB
+
+LZMA decoder uses only integer operations and can be
+implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions).
+
+Some critical operations that affect the speed of LZMA decompression:
+ 1) 32*16 bit integer multiply
+ 2) Mispredicted branches (penalty mostly depends from pipeline length)
+ 3) 32-bit shift and arithmetic operations
+
+The speed of LZMA decompressing mostly depends from CPU speed.
+Memory speed has no big meaning. But if your CPU has small data cache,
+overall weight of memory speed will slightly increase.
+
+
+How To Use
+----------
+
+Using LZMA encoder/decoder executable
+--------------------------------------
+
+Usage: LZMA <e|d> inputFile outputFile [<switches>...]
+
+ e: encode file
+
+ d: decode file
+
+ b: Benchmark. There are two tests: compressing and decompressing
+ with LZMA method. Benchmark shows rating in MIPS (million
+ instructions per second). Rating value is calculated from
+ measured speed and it is normalized with Intel's Core 2 results.
+ Also Benchmark checks possible hardware errors (RAM
+ errors in most cases). Benchmark uses these settings:
+ (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter.
+ Also you can change the number of iterations. Example for 30 iterations:
+ LZMA b 30
+ Default number of iterations is 10.
+
+<Switches>
+
+
+ -a{N}: set compression mode 0 = fast, 1 = normal
+ default: 1 (normal)
+
+ d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB)
+ The maximum value for dictionary size is 1 GB = 2^30 bytes.
+ Dictionary size is calculated as DictionarySize = 2^N bytes.
+ For decompressing file compressed by LZMA method with dictionary
+ size D = 2^N you need about D bytes of memory (RAM).
+
+ -fb{N}: set number of fast bytes - [5, 273], default: 128
+ Usually big number gives a little bit better compression ratio
+ and slower compression process.
+
+ -lc{N}: set number of literal context bits - [0, 8], default: 3
+ Sometimes lc=4 gives gain for big files.
+
+ -lp{N}: set number of literal pos bits - [0, 4], default: 0
+ lp switch is intended for periodical data when period is
+ equal 2^N. For example, for 32-bit (4 bytes)
+ periodical data you can use lp=2. Often it's better to set lc0,
+ if you change lp switch.
+
+ -pb{N}: set number of pos bits - [0, 4], default: 2
+ pb switch is intended for periodical data
+ when period is equal 2^N.
+
+ -mf{MF_ID}: set Match Finder. Default: bt4.
+ Algorithms from hc* group doesn't provide good compression
+ ratio, but they often works pretty fast in combination with
+ fast mode (-a0).
+
+ Memory requirements depend from dictionary size
+ (parameter "d" in table below).
+
+ MF_ID Memory Description
+
+ bt2 d * 9.5 + 4MB Binary Tree with 2 bytes hashing.
+ bt3 d * 11.5 + 4MB Binary Tree with 3 bytes hashing.
+ bt4 d * 11.5 + 4MB Binary Tree with 4 bytes hashing.
+ hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing.
+
+ -eos: write End Of Stream marker. By default LZMA doesn't write
+ eos marker, since LZMA decoder knows uncompressed size
+ stored in .lzma file header.
+
+ -si: Read data from stdin (it will write End Of Stream marker).
+ -so: Write data to stdout
+
+
+Examples:
+
+1) LZMA e file.bin file.lzma -d16 -lc0
+
+compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K)
+and 0 literal context bits. -lc0 allows to reduce memory requirements
+for decompression.
+
+
+2) LZMA e file.bin file.lzma -lc0 -lp2
+
+compresses file.bin to file.lzma with settings suitable
+for 32-bit periodical data (for example, ARM or MIPS code).
+
+3) LZMA d file.lzma file.bin
+
+decompresses file.lzma to file.bin.
+
+
+Compression ratio hints
+-----------------------
+
+Recommendations
+---------------
+
+To increase the compression ratio for LZMA compressing it's desirable
+to have aligned data (if it's possible) and also it's desirable to locate
+data in such order, where code is grouped in one place and data is
+grouped in other place (it's better than such mixing: code, data, code,
+data, ...).
+
+
+Filters
+-------
+You can increase the compression ratio for some data types, using
+special filters before compressing. For example, it's possible to
+increase the compression ratio on 5-10% for code for those CPU ISAs:
+x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC.
+
+You can find C source code of such filters in C/Bra*.* files
+
+You can check the compression ratio gain of these filters with such
+7-Zip commands (example for ARM code):
+No filter:
+ 7z a a1.7z a.bin -m0=lzma
+
+With filter for little-endian ARM code:
+ 7z a a2.7z a.bin -m0=arm -m1=lzma
+
+It works in such manner:
+Compressing = Filter_encoding + LZMA_encoding
+Decompressing = LZMA_decoding + Filter_decoding
+
+Compressing and decompressing speed of such filters is very high,
+so it will not increase decompressing time too much.
+Moreover, it reduces decompression time for LZMA_decoding,
+since compression ratio with filtering is higher.
+
+These filters convert CALL (calling procedure) instructions
+from relative offsets to absolute addresses, so such data becomes more
+compressible.
+
+For some ISAs (for example, for MIPS) it's impossible to get gain from such filter.
+
+
+
+---
+
+http://www.7-zip.org
+http://www.7-zip.org/sdk.html
+http://www.7-zip.org/support.html
diff --git a/3rdparty/lzma/DOC/lzma-specification.txt b/3rdparty/lzma/DOC/lzma-specification.txt
new file mode 100644
index 00000000000..ac0cce76a54
--- /dev/null
+++ b/3rdparty/lzma/DOC/lzma-specification.txt
@@ -0,0 +1,1176 @@
+LZMA specification (DRAFT version)
+----------------------------------
+
+Author: Igor Pavlov
+Date: 2015-06-14
+
+This specification defines the format of LZMA compressed data and lzma file format.
+
+Notation
+--------
+
+We use the syntax of C++ programming language.
+We use the following types in C++ code:
+ unsigned - unsigned integer, at least 16 bits in size
+ int - signed integer, at least 16 bits in size
+ UInt64 - 64-bit unsigned integer
+ UInt32 - 32-bit unsigned integer
+ UInt16 - 16-bit unsigned integer
+ Byte - 8-bit unsigned integer
+ bool - boolean type with two possible values: false, true
+
+
+lzma file format
+================
+
+The lzma file contains the raw LZMA stream and the header with related properties.
+
+The files in that format use ".lzma" extension.
+
+The lzma file format layout:
+
+Offset Size Description
+
+ 0 1 LZMA model properties (lc, lp, pb) in encoded form
+ 1 4 Dictionary size (32-bit unsigned integer, little-endian)
+ 5 8 Uncompressed size (64-bit unsigned integer, little-endian)
+ 13 Compressed data (LZMA stream)
+
+LZMA properties:
+
+ name Range Description
+
+ lc [0, 8] the number of "literal context" bits
+ lp [0, 4] the number of "literal pos" bits
+ pb [0, 4] the number of "pos" bits
+dictSize [0, 2^32 - 1] the dictionary size
+
+The following code encodes LZMA properties:
+
+void EncodeProperties(Byte *properties)
+{
+ properties[0] = (Byte)((pb * 5 + lp) * 9 + lc);
+ Set_UInt32_LittleEndian(properties + 1, dictSize);
+}
+
+If the value of dictionary size in properties is smaller than (1 << 12),
+the LZMA decoder must set the dictionary size variable to (1 << 12).
+
+#define LZMA_DIC_MIN (1 << 12)
+
+ unsigned lc, pb, lp;
+ UInt32 dictSize;
+ UInt32 dictSizeInProperties;
+
+ void DecodeProperties(const Byte *properties)
+ {
+ unsigned d = properties[0];
+ if (d >= (9 * 5 * 5))
+ throw "Incorrect LZMA properties";
+ lc = d % 9;
+ d /= 9;
+ pb = d / 5;
+ lp = d % 5;
+ dictSizeInProperties = 0;
+ for (int i = 0; i < 4; i++)
+ dictSizeInProperties |= (UInt32)properties[i + 1] << (8 * i);
+ dictSize = dictSizeInProperties;
+ if (dictSize < LZMA_DIC_MIN)
+ dictSize = LZMA_DIC_MIN;
+ }
+
+If "Uncompressed size" field contains ones in all 64 bits, it means that
+uncompressed size is unknown and there is the "end marker" in stream,
+that indicates the end of decoding point.
+In opposite case, if the value from "Uncompressed size" field is not
+equal to ((2^64) - 1), the LZMA stream decoding must be finished after
+specified number of bytes (Uncompressed size) is decoded. And if there
+is the "end marker", the LZMA decoder must read that marker also.
+
+
+The new scheme to encode LZMA properties
+----------------------------------------
+
+If LZMA compression is used for some another format, it's recommended to
+use a new improved scheme to encode LZMA properties. That new scheme was
+used in xz format that uses the LZMA2 compression algorithm.
+The LZMA2 is a new compression algorithm that is based on the LZMA algorithm.
+
+The dictionary size in LZMA2 is encoded with just one byte and LZMA2 supports
+only reduced set of dictionary sizes:
+ (2 << 11), (3 << 11),
+ (2 << 12), (3 << 12),
+ ...
+ (2 << 30), (3 << 30),
+ (2 << 31) - 1
+
+The dictionary size can be extracted from encoded value with the following code:
+
+ dictSize = (p == 40) ? 0xFFFFFFFF : (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11));
+
+Also there is additional limitation (lc + lp <= 4) in LZMA2 for values of
+"lc" and "lp" properties:
+
+ if (lc + lp > 4)
+ throw "Unsupported properties: (lc + lp) > 4";
+
+There are some advantages for LZMA decoder with such (lc + lp) value
+limitation. It reduces the maximum size of tables allocated by decoder.
+And it reduces the complexity of initialization procedure, that can be
+important to keep high speed of decoding of big number of small LZMA streams.
+
+It's recommended to use that limitation (lc + lp <= 4) for any new format
+that uses LZMA compression. Note that the combinations of "lc" and "lp"
+parameters, where (lc + lp > 4), can provide significant improvement in
+compression ratio only in some rare cases.
+
+The LZMA properties can be encoded into two bytes in new scheme:
+
+Offset Size Description
+
+ 0 1 The dictionary size encoded with LZMA2 scheme
+ 1 1 LZMA model properties (lc, lp, pb) in encoded form
+
+
+The RAM usage
+=============
+
+The RAM usage for LZMA decoder is determined by the following parts:
+
+1) The Sliding Window (from 4 KiB to 4 GiB).
+2) The probability model counter arrays (arrays of 16-bit variables).
+3) Some additional state variables (about 10 variables of 32-bit integers).
+
+
+The RAM usage for Sliding Window
+--------------------------------
+
+There are two main scenarios of decoding:
+
+1) The decoding of full stream to one RAM buffer.
+
+ If we decode full LZMA stream to one output buffer in RAM, the decoder
+ can use that output buffer as sliding window. So the decoder doesn't
+ need additional buffer allocated for sliding window.
+
+2) The decoding to some external storage.
+
+ If we decode LZMA stream to external storage, the decoder must allocate
+ the buffer for sliding window. The size of that buffer must be equal
+ or larger than the value of dictionary size from properties of LZMA stream.
+
+In this specification we describe the code for decoding to some external
+storage. The optimized version of code for decoding of full stream to one
+output RAM buffer can require some minor changes in code.
+
+
+The RAM usage for the probability model counters
+------------------------------------------------
+
+The size of the probability model counter arrays is calculated with the
+following formula:
+
+size_of_prob_arrays = 1846 + 768 * (1 << (lp + lc))
+
+Each probability model counter is 11-bit unsigned integer.
+If we use 16-bit integer variables (2-byte integers) for these probability
+model counters, the RAM usage required by probability model counter arrays
+can be estimated with the following formula:
+
+ RAM = 4 KiB + 1.5 KiB * (1 << (lp + lc))
+
+For example, for default LZMA parameters (lp = 0 and lc = 3), the RAM usage is
+
+ RAM_lc3_lp0 = 4 KiB + 1.5 KiB * 8 = 16 KiB
+
+The maximum RAM state usage is required for decoding the stream with lp = 4
+and lc = 8:
+
+ RAM_lc8_lp4 = 4 KiB + 1.5 KiB * 4096 = 6148 KiB
+
+If the decoder uses LZMA2's limited property condition
+(lc + lp <= 4), the RAM usage will be not larger than
+
+ RAM_lc_lp_4 = 4 KiB + 1.5 KiB * 16 = 28 KiB
+
+
+The RAM usage for encoder
+-------------------------
+
+There are many variants for LZMA encoding code.
+These variants have different values for memory consumption.
+Note that memory consumption for LZMA Encoder can not be
+smaller than memory consumption of LZMA Decoder for same stream.
+
+The RAM usage required by modern effective implementation of
+LZMA Encoder can be estimated with the following formula:
+
+ Encoder_RAM_Usage = 4 MiB + 11 * dictionarySize.
+
+But there are some modes of the encoder that require less memory.
+
+
+LZMA Decoding
+=============
+
+The LZMA compression algorithm uses LZ-based compression with Sliding Window
+and Range Encoding as entropy coding method.
+
+
+Sliding Window
+--------------
+
+LZMA uses Sliding Window compression similar to LZ77 algorithm.
+
+LZMA stream must be decoded to the sequence that consists
+of MATCHES and LITERALS:
+
+ - a LITERAL is a 8-bit character (one byte).
+ The decoder just puts that LITERAL to the uncompressed stream.
+
+ - a MATCH is a pair of two numbers (DISTANCE-LENGTH pair).
+ The decoder takes one byte exactly "DISTANCE" characters behind
+ current position in the uncompressed stream and puts it to
+ uncompressed stream. The decoder must repeat it "LENGTH" times.
+
+The "DISTANCE" can not be larger than dictionary size.
+And the "DISTANCE" can not be larger than the number of bytes in
+the uncompressed stream that were decoded before that match.
+
+In this specification we use cyclic buffer to implement Sliding Window
+for LZMA decoder:
+
+class COutWindow
+{
+ Byte *Buf;
+ UInt32 Pos;
+ UInt32 Size;
+ bool IsFull;
+
+public:
+ unsigned TotalPos;
+ COutStream OutStream;
+
+ COutWindow(): Buf(NULL) {}
+ ~COutWindow() { delete []Buf; }
+
+ void Create(UInt32 dictSize)
+ {
+ Buf = new Byte[dictSize];
+ Pos = 0;
+ Size = dictSize;
+ IsFull = false;
+ TotalPos = 0;
+ }
+
+ void PutByte(Byte b)
+ {
+ TotalPos++;
+ Buf[Pos++] = b;
+ if (Pos == Size)
+ {
+ Pos = 0;
+ IsFull = true;
+ }
+ OutStream.WriteByte(b);
+ }
+
+ Byte GetByte(UInt32 dist) const
+ {
+ return Buf[dist <= Pos ? Pos - dist : Size - dist + Pos];
+ }
+
+ void CopyMatch(UInt32 dist, unsigned len)
+ {
+ for (; len > 0; len--)
+ PutByte(GetByte(dist));
+ }
+
+ bool CheckDistance(UInt32 dist) const
+ {
+ return dist <= Pos || IsFull;
+ }
+
+ bool IsEmpty() const
+ {
+ return Pos == 0 && !IsFull;
+ }
+};
+
+
+In another implementation it's possible to use one buffer that contains
+Sliding Window and the whole data stream after uncompressing.
+
+
+Range Decoder
+-------------
+
+LZMA algorithm uses Range Encoding (1) as entropy coding method.
+
+LZMA stream contains just one very big number in big-endian encoding.
+LZMA decoder uses the Range Decoder to extract a sequence of binary
+symbols from that big number.
+
+The state of the Range Decoder:
+
+struct CRangeDecoder
+{
+ UInt32 Range;
+ UInt32 Code;
+ InputStream *InStream;
+
+ bool Corrupted;
+}
+
+The notes about UInt32 type for the "Range" and "Code" variables:
+
+ It's possible to use 64-bit (unsigned or signed) integer type
+ for the "Range" and the "Code" variables instead of 32-bit unsigned,
+ but some additional code must be used to truncate the values to
+ low 32-bits after some operations.
+
+ If the programming language does not support 32-bit unsigned integer type
+ (like in case of JAVA language), it's possible to use 32-bit signed integer,
+ but some code must be changed. For example, it's required to change the code
+ that uses comparison operations for UInt32 variables in this specification.
+
+The Range Decoder can be in some states that can be treated as
+"Corruption" in LZMA stream. The Range Decoder uses the variable "Corrupted":
+
+ (Corrupted == false), if the Range Decoder has not detected any corruption.
+ (Corrupted == true), if the Range Decoder has detected some corruption.
+
+The reference LZMA Decoder ignores the value of the "Corrupted" variable.
+So it continues to decode the stream, even if the corruption can be detected
+in the Range Decoder. To provide the full compatibility with output of the
+reference LZMA Decoder, another LZMA Decoder implementations must also
+ignore the value of the "Corrupted" variable.
+
+The LZMA Encoder is required to create only such LZMA streams, that will not
+lead the Range Decoder to states, where the "Corrupted" variable is set to true.
+
+The Range Decoder reads first 5 bytes from input stream to initialize
+the state:
+
+bool CRangeDecoder::Init()
+{
+ Corrupted = false;
+ Range = 0xFFFFFFFF;
+ Code = 0;
+
+ Byte b = InStream->ReadByte();
+
+ for (int i = 0; i < 4; i++)
+ Code = (Code << 8) | InStream->ReadByte();
+
+ if (b != 0 || Code == Range)
+ Corrupted = true;
+ return b == 0;
+}
+
+The LZMA Encoder always writes ZERO in initial byte of compressed stream.
+That scheme allows to simplify the code of the Range Encoder in the
+LZMA Encoder. If initial byte is not equal to ZERO, the LZMA Decoder must
+stop decoding and report error.
+
+After the last bit of data was decoded by Range Decoder, the value of the
+"Code" variable must be equal to 0. The LZMA Decoder must check it by
+calling the IsFinishedOK() function:
+
+ bool IsFinishedOK() const { return Code == 0; }
+
+If there is corruption in data stream, there is big probability that
+the "Code" value will be not equal to 0 in the Finish() function. So that
+check in the IsFinishedOK() function provides very good feature for
+corruption detection.
+
+The value of the "Range" variable before each bit decoding can not be smaller
+than ((UInt32)1 << 24). The Normalize() function keeps the "Range" value in
+described range.
+
+#define kTopValue ((UInt32)1 << 24)
+
+void CRangeDecoder::Normalize()
+{
+ if (Range < kTopValue)
+ {
+ Range <<= 8;
+ Code = (Code << 8) | InStream->ReadByte();
+ }
+}
+
+Notes: if the size of the "Code" variable is larger than 32 bits, it's
+required to keep only low 32 bits of the "Code" variable after the change
+in Normalize() function.
+
+If the LZMA Stream is not corrupted, the value of the "Code" variable is
+always smaller than value of the "Range" variable.
+But the Range Decoder ignores some types of corruptions, so the value of
+the "Code" variable can be equal or larger than value of the "Range" variable
+for some "Corrupted" archives.
+
+
+LZMA uses Range Encoding only with binary symbols of two types:
+ 1) binary symbols with fixed and equal probabilities (direct bits)
+ 2) binary symbols with predicted probabilities
+
+The DecodeDirectBits() function decodes the sequence of direct bits:
+
+UInt32 CRangeDecoder::DecodeDirectBits(unsigned numBits)
+{
+ UInt32 res = 0;
+ do
+ {
+ Range >>= 1;
+ Code -= Range;
+ UInt32 t = 0 - ((UInt32)Code >> 31);
+ Code += Range & t;
+
+ if (Code == Range)
+ Corrupted = true;
+
+ Normalize();
+ res <<= 1;
+ res += t + 1;
+ }
+ while (--numBits);
+ return res;
+}
+
+
+The Bit Decoding with Probability Model
+---------------------------------------
+
+The task of Bit Probability Model is to estimate probabilities of binary
+symbols. And then it provides the Range Decoder with that information.
+The better prediction provides better compression ratio.
+The Bit Probability Model uses statistical data of previous decoded
+symbols.
+
+That estimated probability is presented as 11-bit unsigned integer value
+that represents the probability of symbol "0".
+
+#define kNumBitModelTotalBits 11
+
+Mathematical probabilities can be presented with the following formulas:
+ probability(symbol_0) = prob / 2048.
+ probability(symbol_1) = 1 - Probability(symbol_0) =
+ = 1 - prob / 2048 =
+ = (2048 - prob) / 2048
+where the "prob" variable contains 11-bit integer probability counter.
+
+It's recommended to use 16-bit unsigned integer type, to store these 11-bit
+probability values:
+
+typedef UInt16 CProb;
+
+Each probability value must be initialized with value ((1 << 11) / 2),
+that represents the state, where probabilities of symbols 0 and 1
+are equal to 0.5:
+
+#define PROB_INIT_VAL ((1 << kNumBitModelTotalBits) / 2)
+
+The INIT_PROBS macro is used to initialize the array of CProb variables:
+
+#define INIT_PROBS(p) \
+ { for (unsigned i = 0; i < sizeof(p) / sizeof(p[0]); i++) p[i] = PROB_INIT_VAL; }
+
+
+The DecodeBit() function decodes one bit.
+The LZMA decoder provides the pointer to CProb variable that contains
+information about estimated probability for symbol 0 and the Range Decoder
+updates that CProb variable after decoding. The Range Decoder increases
+estimated probability of the symbol that was decoded:
+
+#define kNumMoveBits 5
+
+unsigned CRangeDecoder::DecodeBit(CProb *prob)
+{
+ unsigned v = *prob;
+ UInt32 bound = (Range >> kNumBitModelTotalBits) * v;
+ unsigned symbol;
+ if (Code < bound)
+ {
+ v += ((1 << kNumBitModelTotalBits) - v) >> kNumMoveBits;
+ Range = bound;
+ symbol = 0;
+ }
+ else
+ {
+ v -= v >> kNumMoveBits;
+ Code -= bound;
+ Range -= bound;
+ symbol = 1;
+ }
+ *prob = (CProb)v;
+ Normalize();
+ return symbol;
+}
+
+
+The Binary Tree of bit model counters
+-------------------------------------
+
+LZMA uses a tree of Bit model variables to decode symbol that needs
+several bits for storing. There are two versions of such trees in LZMA:
+ 1) the tree that decodes bits from high bit to low bit (the normal scheme).
+ 2) the tree that decodes bits from low bit to high bit (the reverse scheme).
+
+Each binary tree structure supports different size of decoded symbol
+(the size of binary sequence that contains value of symbol).
+If that size of decoded symbol is "NumBits" bits, the tree structure
+uses the array of (2 << NumBits) counters of CProb type.
+But only ((2 << NumBits) - 1) items are used by encoder and decoder.
+The first item (the item with index equal to 0) in array is unused.
+That scheme with unused array's item allows to simplify the code.
+
+unsigned BitTreeReverseDecode(CProb *probs, unsigned numBits, CRangeDecoder *rc)
+{
+ unsigned m = 1;
+ unsigned symbol = 0;
+ for (unsigned i = 0; i < numBits; i++)
+ {
+ unsigned bit = rc->DecodeBit(&probs[m]);
+ m <<= 1;
+ m += bit;
+ symbol |= (bit << i);
+ }
+ return symbol;
+}
+
+template <unsigned NumBits>
+class CBitTreeDecoder
+{
+ CProb Probs[(unsigned)1 << NumBits];
+
+public:
+
+ void Init()
+ {
+ INIT_PROBS(Probs);
+ }
+
+ unsigned Decode(CRangeDecoder *rc)
+ {
+ unsigned m = 1;
+ for (unsigned i = 0; i < NumBits; i++)
+ m = (m << 1) + rc->DecodeBit(&Probs[m]);
+ return m - ((unsigned)1 << NumBits);
+ }
+
+ unsigned ReverseDecode(CRangeDecoder *rc)
+ {
+ return BitTreeReverseDecode(Probs, NumBits, rc);
+ }
+};
+
+
+LZ part of LZMA
+---------------
+
+LZ part of LZMA describes details about the decoding of MATCHES and LITERALS.
+
+
+The Literal Decoding
+--------------------
+
+The LZMA Decoder uses (1 << (lc + lp)) tables with CProb values, where
+each table contains 0x300 CProb values:
+
+ CProb *LitProbs;
+
+ void CreateLiterals()
+ {
+ LitProbs = new CProb[(UInt32)0x300 << (lc + lp)];
+ }
+
+ void InitLiterals()
+ {
+ UInt32 num = (UInt32)0x300 << (lc + lp);
+ for (UInt32 i = 0; i < num; i++)
+ LitProbs[i] = PROB_INIT_VAL;
+ }
+
+To select the table for decoding it uses the context that consists of
+(lc) high bits from previous literal and (lp) low bits from value that
+represents current position in outputStream.
+
+If (State > 7), the Literal Decoder also uses "matchByte" that represents
+the byte in OutputStream at position the is the DISTANCE bytes before
+current position, where the DISTANCE is the distance in DISTANCE-LENGTH pair
+of latest decoded match.
+
+The following code decodes one literal and puts it to Sliding Window buffer:
+
+ void DecodeLiteral(unsigned state, UInt32 rep0)
+ {
+ unsigned prevByte = 0;
+ if (!OutWindow.IsEmpty())
+ prevByte = OutWindow.GetByte(1);
+
+ unsigned symbol = 1;
+ unsigned litState = ((OutWindow.TotalPos & ((1 << lp) - 1)) << lc) + (prevByte >> (8 - lc));
+ CProb *probs = &LitProbs[(UInt32)0x300 * litState];
+
+ if (state >= 7)
+ {
+ unsigned matchByte = OutWindow.GetByte(rep0 + 1);
+ do
+ {
+ unsigned matchBit = (matchByte >> 7) & 1;
+ matchByte <<= 1;
+ unsigned bit = RangeDec.DecodeBit(&probs[((1 + matchBit) << 8) + symbol]);
+ symbol = (symbol << 1) | bit;
+ if (matchBit != bit)
+ break;
+ }
+ while (symbol < 0x100);
+ }
+ while (symbol < 0x100)
+ symbol = (symbol << 1) | RangeDec.DecodeBit(&probs[symbol]);
+ OutWindow.PutByte((Byte)(symbol - 0x100));
+ }
+
+
+The match length decoding
+-------------------------
+
+The match length decoder returns normalized (zero-based value)
+length of match. That value can be converted to real length of the match
+with the following code:
+
+#define kMatchMinLen 2
+
+ matchLen = len + kMatchMinLen;
+
+The match length decoder can return the values from 0 to 271.
+And the corresponded real match length values can be in the range
+from 2 to 273.
+
+The following scheme is used for the match length encoding:
+
+ Binary encoding Binary Tree structure Zero-based match length
+ sequence (binary + decimal):
+
+ 0 xxx LowCoder[posState] xxx
+ 1 0 yyy MidCoder[posState] yyy + 8
+ 1 1 zzzzzzzz HighCoder zzzzzzzz + 16
+
+LZMA uses bit model variable "Choice" to decode the first selection bit.
+
+If the first selection bit is equal to 0, the decoder uses binary tree
+ LowCoder[posState] to decode 3-bit zero-based match length (xxx).
+
+If the first selection bit is equal to 1, the decoder uses bit model
+ variable "Choice2" to decode the second selection bit.
+
+ If the second selection bit is equal to 0, the decoder uses binary tree
+ MidCoder[posState] to decode 3-bit "yyy" value, and zero-based match
+ length is equal to (yyy + 8).
+
+ If the second selection bit is equal to 1, the decoder uses binary tree
+ HighCoder to decode 8-bit "zzzzzzzz" value, and zero-based
+ match length is equal to (zzzzzzzz + 16).
+
+LZMA uses "posState" value as context to select the binary tree
+from LowCoder and MidCoder binary tree arrays:
+
+ unsigned posState = OutWindow.TotalPos & ((1 << pb) - 1);
+
+The full code of the length decoder:
+
+class CLenDecoder
+{
+ CProb Choice;
+ CProb Choice2;
+ CBitTreeDecoder<3> LowCoder[1 << kNumPosBitsMax];
+ CBitTreeDecoder<3> MidCoder[1 << kNumPosBitsMax];
+ CBitTreeDecoder<8> HighCoder;
+
+public:
+
+ void Init()
+ {
+ Choice = PROB_INIT_VAL;
+ Choice2 = PROB_INIT_VAL;
+ HighCoder.Init();
+ for (unsigned i = 0; i < (1 << kNumPosBitsMax); i++)
+ {
+ LowCoder[i].Init();
+ MidCoder[i].Init();
+ }
+ }
+
+ unsigned Decode(CRangeDecoder *rc, unsigned posState)
+ {
+ if (rc->DecodeBit(&Choice) == 0)
+ return LowCoder[posState].Decode(rc);
+ if (rc->DecodeBit(&Choice2) == 0)
+ return 8 + MidCoder[posState].Decode(rc);
+ return 16 + HighCoder.Decode(rc);
+ }
+};
+
+The LZMA decoder uses two instances of CLenDecoder class.
+The first instance is for the matches of "Simple Match" type,
+and the second instance is for the matches of "Rep Match" type:
+
+ CLenDecoder LenDecoder;
+ CLenDecoder RepLenDecoder;
+
+
+The match distance decoding
+---------------------------
+
+LZMA supports dictionary sizes up to 4 GiB minus 1.
+The value of match distance (decoded by distance decoder) can be
+from 1 to 2^32. But the distance value that is equal to 2^32 is used to
+indicate the "End of stream" marker. So real largest match distance
+that is used for LZ-window match is (2^32 - 1).
+
+LZMA uses normalized match length (zero-based length)
+to calculate the context state "lenState" do decode the distance value:
+
+#define kNumLenToPosStates 4
+
+ unsigned lenState = len;
+ if (lenState > kNumLenToPosStates - 1)
+ lenState = kNumLenToPosStates - 1;
+
+The distance decoder returns the "dist" value that is zero-based value
+of match distance. The real match distance can be calculated with the
+following code:
+
+ matchDistance = dist + 1;
+
+The state of the distance decoder and the initialization code:
+
+ #define kEndPosModelIndex 14
+ #define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
+ #define kNumAlignBits 4
+
+ CBitTreeDecoder<6> PosSlotDecoder[kNumLenToPosStates];
+ CProb PosDecoders[1 + kNumFullDistances - kEndPosModelIndex];
+ CBitTreeDecoder<kNumAlignBits> AlignDecoder;
+
+ void InitDist()
+ {
+ for (unsigned i = 0; i < kNumLenToPosStates; i++)
+ PosSlotDecoder[i].Init();
+ AlignDecoder.Init();
+ INIT_PROBS(PosDecoders);
+ }
+
+At first stage the distance decoder decodes 6-bit "posSlot" value with bit
+tree decoder from PosSlotDecoder array. It's possible to get 2^6=64 different
+"posSlot" values.
+
+ unsigned posSlot = PosSlotDecoder[lenState].Decode(&RangeDec);
+
+The encoding scheme for distance value is shown in the following table:
+
+posSlot (decimal) /
+ zero-based distance (binary)
+ 0 0
+ 1 1
+ 2 10
+ 3 11
+
+ 4 10 x
+ 5 11 x
+ 6 10 xx
+ 7 11 xx
+ 8 10 xxx
+ 9 11 xxx
+10 10 xxxx
+11 11 xxxx
+12 10 xxxxx
+13 11 xxxxx
+
+14 10 yy zzzz
+15 11 yy zzzz
+16 10 yyy zzzz
+17 11 yyy zzzz
+...
+62 10 yyyyyyyyyyyyyyyyyyyyyyyyyy zzzz
+63 11 yyyyyyyyyyyyyyyyyyyyyyyyyy zzzz
+
+where
+ "x ... x" means the sequence of binary symbols encoded with binary tree and
+ "Reverse" scheme. It uses separated binary tree for each posSlot from 4 to 13.
+ "y" means direct bit encoded with range coder.
+ "zzzz" means the sequence of four binary symbols encoded with binary
+ tree with "Reverse" scheme, where one common binary tree "AlignDecoder"
+ is used for all posSlot values.
+
+If (posSlot < 4), the "dist" value is equal to posSlot value.
+
+If (posSlot >= 4), the decoder uses "posSlot" value to calculate the value of
+ the high bits of "dist" value and the number of the low bits.
+
+ If (4 <= posSlot < kEndPosModelIndex), the decoder uses bit tree decoders.
+ (one separated bit tree decoder per one posSlot value) and "Reverse" scheme.
+ In this implementation we use one CProb array "PosDecoders" that contains
+ all CProb variables for all these bit decoders.
+
+ if (posSlot >= kEndPosModelIndex), the middle bits are decoded as direct
+ bits from RangeDecoder and the low 4 bits are decoded with a bit tree
+ decoder "AlignDecoder" with "Reverse" scheme.
+
+The code to decode zero-based match distance:
+
+ unsigned DecodeDistance(unsigned len)
+ {
+ unsigned lenState = len;
+ if (lenState > kNumLenToPosStates - 1)
+ lenState = kNumLenToPosStates - 1;
+
+ unsigned posSlot = PosSlotDecoder[lenState].Decode(&RangeDec);
+ if (posSlot < 4)
+ return posSlot;
+
+ unsigned numDirectBits = (unsigned)((posSlot >> 1) - 1);
+ UInt32 dist = ((2 | (posSlot & 1)) << numDirectBits);
+ if (posSlot < kEndPosModelIndex)
+ dist += BitTreeReverseDecode(PosDecoders + dist - posSlot, numDirectBits, &RangeDec);
+ else
+ {
+ dist += RangeDec.DecodeDirectBits(numDirectBits - kNumAlignBits) << kNumAlignBits;
+ dist += AlignDecoder.ReverseDecode(&RangeDec);
+ }
+ return dist;
+ }
+
+
+
+LZMA Decoding modes
+-------------------
+
+There are 2 types of LZMA streams:
+
+1) The stream with "End of stream" marker.
+2) The stream without "End of stream" marker.
+
+And the LZMA Decoder supports 3 modes of decoding:
+
+1) The unpack size is undefined. The LZMA decoder stops decoding after
+ getting "End of stream" marker.
+ The input variables for that case:
+
+ markerIsMandatory = true
+ unpackSizeDefined = false
+ unpackSize contains any value
+
+2) The unpack size is defined and LZMA decoder supports both variants,
+ where the stream can contain "End of stream" marker or the stream is
+ finished without "End of stream" marker. The LZMA decoder must detect
+ any of these situations.
+ The input variables for that case:
+
+ markerIsMandatory = false
+ unpackSizeDefined = true
+ unpackSize contains unpack size
+
+3) The unpack size is defined and the LZMA stream must contain
+ "End of stream" marker
+ The input variables for that case:
+
+ markerIsMandatory = true
+ unpackSizeDefined = true
+ unpackSize contains unpack size
+
+
+The main loop of decoder
+------------------------
+
+The main loop of LZMA decoder:
+
+Initialize the LZMA state.
+loop
+{
+ // begin of loop
+ Check "end of stream" conditions.
+ Decode Type of MATCH / LITERAL.
+ If it's LITERAL, decode LITERAL value and put the LITERAL to Window.
+ If it's MATCH, decode the length of match and the match distance.
+ Check error conditions, check end of stream conditions and copy
+ the sequence of match bytes from sliding window to current position
+ in window.
+ Go to begin of loop
+}
+
+The reference implementation of LZMA decoder uses "unpackSize" variable
+to keep the number of remaining bytes in output stream. So it reduces
+"unpackSize" value after each decoded LITERAL or MATCH.
+
+The following code contains the "end of stream" condition check at the start
+of the loop:
+
+ if (unpackSizeDefined && unpackSize == 0 && !markerIsMandatory)
+ if (RangeDec.IsFinishedOK())
+ return LZMA_RES_FINISHED_WITHOUT_MARKER;
+
+LZMA uses three types of matches:
+
+1) "Simple Match" - the match with distance value encoded with bit models.
+
+2) "Rep Match" - the match that uses the distance from distance
+ history table.
+
+3) "Short Rep Match" - the match of single byte length, that uses the latest
+ distance from distance history table.
+
+The LZMA decoder keeps the history of latest 4 match distances that were used
+by decoder. That set of 4 variables contains zero-based match distances and
+these variables are initialized with zero values:
+
+ UInt32 rep0 = 0, rep1 = 0, rep2 = 0, rep3 = 0;
+
+The LZMA decoder uses binary model variables to select type of MATCH or LITERAL:
+
+#define kNumStates 12
+#define kNumPosBitsMax 4
+
+ CProb IsMatch[kNumStates << kNumPosBitsMax];
+ CProb IsRep[kNumStates];
+ CProb IsRepG0[kNumStates];
+ CProb IsRepG1[kNumStates];
+ CProb IsRepG2[kNumStates];
+ CProb IsRep0Long[kNumStates << kNumPosBitsMax];
+
+The decoder uses "state" variable value to select exact variable
+from "IsRep", "IsRepG0", "IsRepG1" and "IsRepG2" arrays.
+The "state" variable can get the value from 0 to 11.
+Initial value for "state" variable is zero:
+
+ unsigned state = 0;
+
+The "state" variable is updated after each LITERAL or MATCH with one of the
+following functions:
+
+unsigned UpdateState_Literal(unsigned state)
+{
+ if (state < 4) return 0;
+ else if (state < 10) return state - 3;
+ else return state - 6;
+}
+unsigned UpdateState_Match (unsigned state) { return state < 7 ? 7 : 10; }
+unsigned UpdateState_Rep (unsigned state) { return state < 7 ? 8 : 11; }
+unsigned UpdateState_ShortRep(unsigned state) { return state < 7 ? 9 : 11; }
+
+The decoder calculates "state2" variable value to select exact variable from
+"IsMatch" and "IsRep0Long" arrays:
+
+unsigned posState = OutWindow.TotalPos & ((1 << pb) - 1);
+unsigned state2 = (state << kNumPosBitsMax) + posState;
+
+The decoder uses the following code flow scheme to select exact
+type of LITERAL or MATCH:
+
+IsMatch[state2] decode
+ 0 - the Literal
+ 1 - the Match
+ IsRep[state] decode
+ 0 - Simple Match
+ 1 - Rep Match
+ IsRepG0[state] decode
+ 0 - the distance is rep0
+ IsRep0Long[state2] decode
+ 0 - Short Rep Match
+ 1 - Rep Match 0
+ 1 -
+ IsRepG1[state] decode
+ 0 - Rep Match 1
+ 1 -
+ IsRepG2[state] decode
+ 0 - Rep Match 2
+ 1 - Rep Match 3
+
+
+LITERAL symbol
+--------------
+If the value "0" was decoded with IsMatch[state2] decoding, we have "LITERAL" type.
+
+At first the LZMA decoder must check that it doesn't exceed
+specified uncompressed size:
+
+ if (unpackSizeDefined && unpackSize == 0)
+ return LZMA_RES_ERROR;
+
+Then it decodes literal value and puts it to sliding window:
+
+ DecodeLiteral(state, rep0);
+
+Then the decoder must update the "state" value and "unpackSize" value;
+
+ state = UpdateState_Literal(state);
+ unpackSize--;
+
+Then the decoder must go to the begin of main loop to decode next Match or Literal.
+
+
+Simple Match
+------------
+
+If the value "1" was decoded with IsMatch[state2] decoding,
+we have the "Simple Match" type.
+
+The distance history table is updated with the following scheme:
+
+ rep3 = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+
+The zero-based length is decoded with "LenDecoder":
+
+ len = LenDecoder.Decode(&RangeDec, posState);
+
+The state is update with UpdateState_Match function:
+
+ state = UpdateState_Match(state);
+
+and the new "rep0" value is decoded with DecodeDistance:
+
+ rep0 = DecodeDistance(len);
+
+That "rep0" will be used as zero-based distance for current match.
+
+If the value of "rep0" is equal to 0xFFFFFFFF, it means that we have
+"End of stream" marker, so we can stop decoding and check finishing
+condition in Range Decoder:
+
+ if (rep0 == 0xFFFFFFFF)
+ return RangeDec.IsFinishedOK() ?
+ LZMA_RES_FINISHED_WITH_MARKER :
+ LZMA_RES_ERROR;
+
+If uncompressed size is defined, LZMA decoder must check that it doesn't
+exceed that specified uncompressed size:
+
+ if (unpackSizeDefined && unpackSize == 0)
+ return LZMA_RES_ERROR;
+
+Also the decoder must check that "rep0" value is not larger than dictionary size
+and is not larger than the number of already decoded bytes:
+
+ if (rep0 >= dictSize || !OutWindow.CheckDistance(rep0))
+ return LZMA_RES_ERROR;
+
+Then the decoder must copy match bytes as described in
+"The match symbols copying" section.
+
+
+Rep Match
+---------
+
+If the LZMA decoder has decoded the value "1" with IsRep[state] variable,
+we have "Rep Match" type.
+
+At first the LZMA decoder must check that it doesn't exceed
+specified uncompressed size:
+
+ if (unpackSizeDefined && unpackSize == 0)
+ return LZMA_RES_ERROR;
+
+Also the decoder must return error, if the LZ window is empty:
+
+ if (OutWindow.IsEmpty())
+ return LZMA_RES_ERROR;
+
+If the match type is "Rep Match", the decoder uses one of the 4 variables of
+distance history table to get the value of distance for current match.
+And there are 4 corresponding ways of decoding flow.
+
+The decoder updates the distance history with the following scheme
+depending from type of match:
+
+- "Rep Match 0" or "Short Rep Match":
+ ; LZMA doesn't update the distance history
+
+- "Rep Match 1":
+ UInt32 dist = rep1;
+ rep1 = rep0;
+ rep0 = dist;
+
+- "Rep Match 2":
+ UInt32 dist = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+ rep0 = dist;
+
+- "Rep Match 3":
+ UInt32 dist = rep3;
+ rep3 = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+ rep0 = dist;
+
+Then the decoder decodes exact subtype of "Rep Match" using "IsRepG0", "IsRep0Long",
+"IsRepG1", "IsRepG2".
+
+If the subtype is "Short Rep Match", the decoder updates the state, puts
+the one byte from window to current position in window and goes to next
+MATCH/LITERAL symbol (the begin of main loop):
+
+ state = UpdateState_ShortRep(state);
+ OutWindow.PutByte(OutWindow.GetByte(rep0 + 1));
+ unpackSize--;
+ continue;
+
+In other cases (Rep Match 0/1/2/3), it decodes the zero-based
+length of match with "RepLenDecoder" decoder:
+
+ len = RepLenDecoder.Decode(&RangeDec, posState);
+
+Then it updates the state:
+
+ state = UpdateState_Rep(state);
+
+Then the decoder must copy match bytes as described in
+"The Match symbols copying" section.
+
+
+The match symbols copying
+-------------------------
+
+If we have the match (Simple Match or Rep Match 0/1/2/3), the decoder must
+copy the sequence of bytes with calculated match distance and match length.
+If uncompressed size is defined, LZMA decoder must check that it doesn't
+exceed that specified uncompressed size:
+
+ len += kMatchMinLen;
+ bool isError = false;
+ if (unpackSizeDefined && unpackSize < len)
+ {
+ len = (unsigned)unpackSize;
+ isError = true;
+ }
+ OutWindow.CopyMatch(rep0 + 1, len);
+ unpackSize -= len;
+ if (isError)
+ return LZMA_RES_ERROR;
+
+Then the decoder must go to the begin of main loop to decode next MATCH or LITERAL.
+
+
+
+NOTES
+-----
+
+This specification doesn't describe the variant of decoder implementation
+that supports partial decoding. Such partial decoding case can require some
+changes in "end of stream" condition checks code. Also such code
+can use additional status codes, returned by decoder.
+
+This specification uses C++ code with templates to simplify describing.
+The optimized version of LZMA decoder doesn't need templates.
+Such optimized version can use just two arrays of CProb variables:
+ 1) The dynamic array of CProb variables allocated for the Literal Decoder.
+ 2) The one common array that contains all other CProb variables.
+
+
+References:
+
+1. G. N. N. Martin, Range encoding: an algorithm for removing redundancy
+ from a digitized message, Video & Data Recording Conference,
+ Southampton, UK, July 24-27, 1979.
diff --git a/3rdparty/lzma/DOC/lzma.txt b/3rdparty/lzma/DOC/lzma.txt
new file mode 100644
index 00000000000..87d727b55b5
--- /dev/null
+++ b/3rdparty/lzma/DOC/lzma.txt
@@ -0,0 +1,328 @@
+LZMA compression
+----------------
+Version: 9.35
+
+This file describes LZMA encoding and decoding functions written in C language.
+
+LZMA is an improved version of famous LZ77 compression algorithm.
+It was improved in way of maximum increasing of compression ratio,
+keeping high decompression speed and low memory requirements for
+decompressing.
+
+Note: you can read also LZMA Specification (lzma-specification.txt from LZMA SDK)
+
+Also you can look source code for LZMA encoding and decoding:
+ C/Util/Lzma/LzmaUtil.c
+
+
+LZMA compressed file format
+---------------------------
+Offset Size Description
+ 0 1 Special LZMA properties (lc,lp, pb in encoded form)
+ 1 4 Dictionary size (little endian)
+ 5 8 Uncompressed size (little endian). -1 means unknown size
+ 13 Compressed data
+
+
+
+ANSI-C LZMA Decoder
+~~~~~~~~~~~~~~~~~~~
+
+Please note that interfaces for ANSI-C code were changed in LZMA SDK 4.58.
+If you want to use old interfaces you can download previous version of LZMA SDK
+from sourceforge.net site.
+
+To use ANSI-C LZMA Decoder you need the following files:
+1) LzmaDec.h + LzmaDec.c + Types.h
+
+Look example code:
+ C/Util/Lzma/LzmaUtil.c
+
+
+Memory requirements for LZMA decoding
+-------------------------------------
+
+Stack usage of LZMA decoding function for local variables is not
+larger than 200-400 bytes.
+
+LZMA Decoder uses dictionary buffer and internal state structure.
+Internal state structure consumes
+ state_size = (4 + (1.5 << (lc + lp))) KB
+by default (lc=3, lp=0), state_size = 16 KB.
+
+
+How To decompress data
+----------------------
+
+LZMA Decoder (ANSI-C version) now supports 2 interfaces:
+1) Single-call Decompressing
+2) Multi-call State Decompressing (zlib-like interface)
+
+You must use external allocator:
+Example:
+void *SzAlloc(void *p, size_t size) { p = p; return malloc(size); }
+void SzFree(void *p, void *address) { p = p; free(address); }
+ISzAlloc alloc = { SzAlloc, SzFree };
+
+You can use p = p; operator to disable compiler warnings.
+
+
+Single-call Decompressing
+-------------------------
+When to use: RAM->RAM decompressing
+Compile files: LzmaDec.h + LzmaDec.c + Types.h
+Compile defines: no defines
+Memory Requirements:
+ - Input buffer: compressed size
+ - Output buffer: uncompressed size
+ - LZMA Internal Structures: state_size (16 KB for default settings)
+
+Interface:
+ int LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
+ const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
+ ELzmaStatus *status, ISzAlloc *alloc);
+ In:
+ dest - output data
+ destLen - output data size
+ src - input data
+ srcLen - input data size
+ propData - LZMA properties (5 bytes)
+ propSize - size of propData buffer (5 bytes)
+ finishMode - It has meaning only if the decoding reaches output limit (*destLen).
+ LZMA_FINISH_ANY - Decode just destLen bytes.
+ LZMA_FINISH_END - Stream must be finished after (*destLen).
+ You can use LZMA_FINISH_END, when you know that
+ current output buffer covers last bytes of stream.
+ alloc - Memory allocator.
+
+ Out:
+ destLen - processed output size
+ srcLen - processed input size
+
+ Output:
+ SZ_OK
+ status:
+ LZMA_STATUS_FINISHED_WITH_MARK
+ LZMA_STATUS_NOT_FINISHED
+ LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
+ SZ_ERROR_DATA - Data error
+ SZ_ERROR_MEM - Memory allocation error
+ SZ_ERROR_UNSUPPORTED - Unsupported properties
+ SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
+
+ If LZMA decoder sees end_marker before reaching output limit, it returns OK result,
+ and output value of destLen will be less than output buffer size limit.
+
+ You can use multiple checks to test data integrity after full decompression:
+ 1) Check Result and "status" variable.
+ 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
+ 3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
+ You must use correct finish mode in that case. */
+
+
+Multi-call State Decompressing (zlib-like interface)
+----------------------------------------------------
+
+When to use: file->file decompressing
+Compile files: LzmaDec.h + LzmaDec.c + Types.h
+
+Memory Requirements:
+ - Buffer for input stream: any size (for example, 16 KB)
+ - Buffer for output stream: any size (for example, 16 KB)
+ - LZMA Internal Structures: state_size (16 KB for default settings)
+ - LZMA dictionary (dictionary size is encoded in LZMA properties header)
+
+1) read LZMA properties (5 bytes) and uncompressed size (8 bytes, little-endian) to header:
+ unsigned char header[LZMA_PROPS_SIZE + 8];
+ ReadFile(inFile, header, sizeof(header)
+
+2) Allocate CLzmaDec structures (state + dictionary) using LZMA properties
+
+ CLzmaDec state;
+ LzmaDec_Constr(&state);
+ res = LzmaDec_Allocate(&state, header, LZMA_PROPS_SIZE, &g_Alloc);
+ if (res != SZ_OK)
+ return res;
+
+3) Init LzmaDec structure before any new LZMA stream. And call LzmaDec_DecodeToBuf in loop
+
+ LzmaDec_Init(&state);
+ for (;;)
+ {
+ ...
+ int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
+ const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode);
+ ...
+ }
+
+
+4) Free all allocated structures
+ LzmaDec_Free(&state, &g_Alloc);
+
+Look example code:
+ C/Util/Lzma/LzmaUtil.c
+
+
+How To compress data
+--------------------
+
+Compile files:
+ Types.h
+ Threads.h
+ LzmaEnc.h
+ LzmaEnc.c
+ LzFind.h
+ LzFind.c
+ LzFindMt.h
+ LzFindMt.c
+ LzHash.h
+
+Memory Requirements:
+ - (dictSize * 11.5 + 6 MB) + state_size
+
+Lzma Encoder can use two memory allocators:
+1) alloc - for small arrays.
+2) allocBig - for big arrays.
+
+For example, you can use Large RAM Pages (2 MB) in allocBig allocator for
+better compression speed. Note that Windows has bad implementation for
+Large RAM Pages.
+It's OK to use same allocator for alloc and allocBig.
+
+
+Single-call Compression with callbacks
+--------------------------------------
+
+Look example code:
+ C/Util/Lzma/LzmaUtil.c
+
+When to use: file->file compressing
+
+1) you must implement callback structures for interfaces:
+ISeqInStream
+ISeqOutStream
+ICompressProgress
+ISzAlloc
+
+static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
+static void SzFree(void *p, void *address) { p = p; MyFree(address); }
+static ISzAlloc g_Alloc = { SzAlloc, SzFree };
+
+ CFileSeqInStream inStream;
+ CFileSeqOutStream outStream;
+
+ inStream.funcTable.Read = MyRead;
+ inStream.file = inFile;
+ outStream.funcTable.Write = MyWrite;
+ outStream.file = outFile;
+
+
+2) Create CLzmaEncHandle object;
+
+ CLzmaEncHandle enc;
+
+ enc = LzmaEnc_Create(&g_Alloc);
+ if (enc == 0)
+ return SZ_ERROR_MEM;
+
+
+3) initialize CLzmaEncProps properties;
+
+ LzmaEncProps_Init(&props);
+
+ Then you can change some properties in that structure.
+
+4) Send LZMA properties to LZMA Encoder
+
+ res = LzmaEnc_SetProps(enc, &props);
+
+5) Write encoded properties to header
+
+ Byte header[LZMA_PROPS_SIZE + 8];
+ size_t headerSize = LZMA_PROPS_SIZE;
+ UInt64 fileSize;
+ int i;
+
+ res = LzmaEnc_WriteProperties(enc, header, &headerSize);
+ fileSize = MyGetFileLength(inFile);
+ for (i = 0; i < 8; i++)
+ header[headerSize++] = (Byte)(fileSize >> (8 * i));
+ MyWriteFileAndCheck(outFile, header, headerSize)
+
+6) Call encoding function:
+ res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable,
+ NULL, &g_Alloc, &g_Alloc);
+
+7) Destroy LZMA Encoder Object
+ LzmaEnc_Destroy(enc, &g_Alloc, &g_Alloc);
+
+
+If callback function return some error code, LzmaEnc_Encode also returns that code
+or it can return the code like SZ_ERROR_READ, SZ_ERROR_WRITE or SZ_ERROR_PROGRESS.
+
+
+Single-call RAM->RAM Compression
+--------------------------------
+
+Single-call RAM->RAM Compression is similar to Compression with callbacks,
+but you provide pointers to buffers instead of pointers to stream callbacks:
+
+SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
+ const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
+ ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
+
+Return code:
+ SZ_OK - OK
+ SZ_ERROR_MEM - Memory allocation error
+ SZ_ERROR_PARAM - Incorrect paramater
+ SZ_ERROR_OUTPUT_EOF - output buffer overflow
+ SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
+
+
+
+Defines
+-------
+
+_LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code.
+
+_LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for
+ some structures will be doubled in that case.
+
+_LZMA_UINT32_IS_ULONG - Define it if int is 16-bit on your compiler and long is 32-bit.
+
+_LZMA_NO_SYSTEM_SIZE_T - Define it if you don't want to use size_t type.
+
+
+_7ZIP_PPMD_SUPPPORT - Define it if you don't want to support PPMD method in AMSI-C .7z decoder.
+
+
+C++ LZMA Encoder/Decoder
+~~~~~~~~~~~~~~~~~~~~~~~~
+C++ LZMA code use COM-like interfaces. So if you want to use it,
+you can study basics of COM/OLE.
+C++ LZMA code is just wrapper over ANSI-C code.
+
+
+C++ Notes
+~~~~~~~~~~~~~~~~~~~~~~~~
+If you use some C++ code folders in 7-Zip (for example, C++ code for .7z handling),
+you must check that you correctly work with "new" operator.
+7-Zip can be compiled with MSVC 6.0 that doesn't throw "exception" from "new" operator.
+So 7-Zip uses "CPP\Common\NewHandler.cpp" that redefines "new" operator:
+operator new(size_t size)
+{
+ void *p = ::malloc(size);
+ if (p == 0)
+ throw CNewException();
+ return p;
+}
+If you use MSCV that throws exception for "new" operator, you can compile without
+"NewHandler.cpp". So standard exception will be used. Actually some code of
+7-Zip catches any exception in internal code and converts it to HRESULT code.
+So you don't need to catch CNewException, if you call COM interfaces of 7-Zip.
+
+---
+
+http://www.7-zip.org
+http://www.7-zip.org/sdk.html
+http://www.7-zip.org/support.html
diff --git a/3rdparty/lzma/Methods.txt b/3rdparty/lzma/Methods.txt
deleted file mode 100644
index f52e7c3158e..00000000000
--- a/3rdparty/lzma/Methods.txt
+++ /dev/null
@@ -1,152 +0,0 @@
-7-Zip method IDs (9.18)
------------------------
-
-Each compression or crypto method in 7z has unique binary value (ID).
-The length of ID in bytes is arbitrary but it can not exceed 63 bits (8 bytes).
-
-If you want to add some new ID, you have two ways:
-1) Write request for allocating IDs to 7-zip developers.
-2) Generate 8-bytes ID:
-
- 3F ZZ ZZ ZZ ZZ ZZ MM MM
-
- 3F - Prefix for random IDs (1 byte)
- ZZ ZZ ZZ ZZ ZZ - Developer ID (5 bytes). Use real random bytes.
-
- MM MM - Method ID (2 bytes)
-
- You can notify 7-Zip developers about your Developer ID / Method ID.
-
- Note: Use new ID only if old codec can not decode data encoded with new version.
-
-
-List of defined IDs
--------------------
-
-00 - Copy
-
-03 - Delta
-04 - x86 (BCJ)
-05 - PPC (Big Endian)
-06 - IA64
-07 - ARM (little endian)
-08 - ARM Thumb (little endian)
-09 - SPARC
-21 - LZMA2
-
-02.. - Common
- 03 Swap
- - 2 Swap2
- - 4 Swap4
-
-03.. - 7z
- 01 - LZMA
- 01 - Version
-
- 03 - Branch
- 01 - x86
- 03 - BCJ
- 1B - BCJ2
- 02 - PPC
- 05 - PPC (Big Endian)
- 03 - Alpha
- 01 - Alpha
- 04 - IA64
- 01 - IA64
- 05 - ARM
- 01 - ARM
- 06 - M68
- 05 - M68 (Big Endian)
- 07 - ARM Thumb
- 01 - ARMT
- 08 - SPARC
- 05 - SPARC
-
- 04 - PPMD
- 01 - Version
-
- 7F -
- 01 - experimental methods.
-
-
-04.. - Misc
- 00 - Reserved
- 01 - Zip
- 00 - Copy (not used). Use {00} instead
- 01 - Shrink
- 06 - Implode
- 08 - Deflate
- 09 - Deflate64
- 10 - Imploding
- 12 - BZip2 (not used). Use {04 02 02} instead
- 14 - LZMA
- 60 - Jpeg
- 61 - WavPack
- 62 - PPMd
- 63 - wzAES
- 02 - BZip
- 02 - BZip2
- 03 - Rar
- 01 - Rar15
- 02 - Rar20
- 03 - Rar29
- 04 - Arj
- 01 - Arj (1,2,3)
- 02 - Arj 4
- 05 - Z
- 06 - Lzh
- 07 - Reserved for 7z
- 08 - Cab
- 09 - NSIS
- 01 - DeflateNSIS
- 02 - BZip2NSIS
-
-
-06.. - Crypto
- 00 -
- 01 - AES
- 0x - AES-128
- 4x - AES-192
- 8x - AES-256
- Cx - AES
-
- x0 - ECB
- x1 - CBC
- x2 - CFB
- x3 - OFB
-
- 07 - Reserved
- 0F - Reserved
-
- F0 - Misc Ciphers (Real Ciphers without hashing algo)
-
- F1 - Misc Ciphers (Combine)
- 01 - Zip
- 01 - Main Zip crypto algo
- 03 - RAR
- 02 -
- 03 - Rar29 AES-128 + (modified SHA-1)
- 07 - 7z
- 01 - AES-256 + SHA-256
-
-07.. - Hash (subject to change)
- 00 -
- 01 - CRC
- 02 - SHA-1
- 03 - SHA-256
- 04 - SHA-384
- 05 - SHA-512
-
- F0 - Misc Hash
-
- F1 - Misc
- 03 - RAR
- 03 - Rar29 Password Hashing (modified SHA1)
- 07 - 7z
- 01 - SHA-256 Password Hashing
-
-
-
-
----
-End of document
diff --git a/3rdparty/lzma/lzma.exe b/3rdparty/lzma/lzma.exe
deleted file mode 100644
index a1e8fa7a1e9..00000000000
--- a/3rdparty/lzma/lzma.exe
+++ /dev/null
Binary files differ
diff --git a/3rdparty/lzma/lzma.txt b/3rdparty/lzma/lzma.txt
deleted file mode 100644
index 77e5b61612a..00000000000
--- a/3rdparty/lzma/lzma.txt
+++ /dev/null
@@ -1,604 +0,0 @@
-LZMA SDK 9.22
--------------
-
-LZMA SDK provides the documentation, samples, header files, libraries,
-and tools you need to develop applications that use LZMA compression.
-
-LZMA is default and general compression method of 7z format
-in 7-Zip compression program (www.7-zip.org). LZMA provides high
-compression ratio and very fast decompression.
-
-LZMA is an improved version of famous LZ77 compression algorithm.
-It was improved in way of maximum increasing of compression ratio,
-keeping high decompression speed and low memory requirements for
-decompressing.
-
-
-
-LICENSE
--------
-
-LZMA SDK is written and placed in the public domain by Igor Pavlov.
-
-Some code in LZMA SDK is based on public domain code from another developers:
- 1) PPMd var.H (2001): Dmitry Shkarin
- 2) SHA-256: Wei Dai (Crypto++ library)
-
-You can copy, modify, distribute and perform LZMA SDK code, even for commercial purposes,
-all without asking permission.
-
-LZMA SDK code is compatible with open source licenses, for example, you can
-include it to GNU GPL or GNU LGPL code.
-
-
-LZMA SDK Contents
------------------
-
-LZMA SDK includes:
-
- - ANSI-C/C++/C#/Java source code for LZMA compressing and decompressing
- - Compiled file->file LZMA compressing/decompressing program for Windows system
-
-
-UNIX/Linux version
-------------------
-To compile C++ version of file->file LZMA encoding, go to directory
-CPP/7zip/Bundles/LzmaCon
-and call make to recompile it:
- make -f makefile.gcc clean all
-
-In some UNIX/Linux versions you must compile LZMA with static libraries.
-To compile with static libraries, you can use
-LIB = -lm -static
-
-
-Files
----------------------
-lzma.txt - LZMA SDK description (this file)
-7zFormat.txt - 7z Format description
-7zC.txt - 7z ANSI-C Decoder description
-methods.txt - Compression method IDs for .7z
-lzma.exe - Compiled file->file LZMA encoder/decoder for Windows
-7zr.exe - 7-Zip with 7z/lzma/xz support.
-history.txt - history of the LZMA SDK
-
-
-Source code structure
----------------------
-
-C/ - C files
- 7zCrc*.* - CRC code
- Alloc.* - Memory allocation functions
- Bra*.* - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code
- LzFind.* - Match finder for LZ (LZMA) encoders
- LzFindMt.* - Match finder for LZ (LZMA) encoders for multithreading encoding
- LzHash.h - Additional file for LZ match finder
- LzmaDec.* - LZMA decoding
- LzmaEnc.* - LZMA encoding
- LzmaLib.* - LZMA Library for DLL calling
- Types.h - Basic types for another .c files
- Threads.* - The code for multithreading.
-
- LzmaLib - LZMA Library (.DLL for Windows)
-
- LzmaUtil - LZMA Utility (file->file LZMA encoder/decoder).
-
- Archive - files related to archiving
- 7z - 7z ANSI-C Decoder
-
-CPP/ -- CPP files
-
- Common - common files for C++ projects
- Windows - common files for Windows related code
-
- 7zip - files related to 7-Zip Project
-
- Common - common files for 7-Zip
-
- Compress - files related to compression/decompression
-
- Archive - files related to archiving
-
- Common - common files for archive handling
- 7z - 7z C++ Encoder/Decoder
-
- Bundles - Modules that are bundles of other modules
-
- Alone7z - 7zr.exe: Standalone version of 7z.exe that supports only 7z/LZMA/BCJ/BCJ2
- LzmaCon - lzma.exe: LZMA compression/decompression
- Format7zR - 7zr.dll: Reduced version of 7za.dll: extracting/compressing to 7z/LZMA/BCJ/BCJ2
- Format7zExtractR - 7zxr.dll: Reduced version of 7zxa.dll: extracting from 7z/LZMA/BCJ/BCJ2.
-
- UI - User Interface files
-
- Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll
- Common - Common UI files
- Console - Code for console archiver
-
-
-
-CS/ - C# files
- 7zip
- Common - some common files for 7-Zip
- Compress - files related to compression/decompression
- LZ - files related to LZ (Lempel-Ziv) compression algorithm
- LZMA - LZMA compression/decompression
- LzmaAlone - file->file LZMA compression/decompression
- RangeCoder - Range Coder (special code of compression/decompression)
-
-Java/ - Java files
- SevenZip
- Compression - files related to compression/decompression
- LZ - files related to LZ (Lempel-Ziv) compression algorithm
- LZMA - LZMA compression/decompression
- RangeCoder - Range Coder (special code of compression/decompression)
-
-
-C/C++ source code of LZMA SDK is part of 7-Zip project.
-7-Zip source code can be downloaded from 7-Zip's SourceForge page:
-
- http://sourceforge.net/projects/sevenzip/
-
-
-
-LZMA features
--------------
- - Variable dictionary size (up to 1 GB)
- - Estimated compressing speed: about 2 MB/s on 2 GHz CPU
- - Estimated decompressing speed:
- - 20-30 MB/s on 2 GHz Core 2 or AMD Athlon 64
- - 1-2 MB/s on 200 MHz ARM, MIPS, PowerPC or other simple RISC
- - Small memory requirements for decompressing (16 KB + DictionarySize)
- - Small code size for decompressing: 5-8 KB
-
-LZMA decoder uses only integer operations and can be
-implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions).
-
-Some critical operations that affect the speed of LZMA decompression:
- 1) 32*16 bit integer multiply
- 2) Misspredicted branches (penalty mostly depends from pipeline length)
- 3) 32-bit shift and arithmetic operations
-
-The speed of LZMA decompressing mostly depends from CPU speed.
-Memory speed has no big meaning. But if your CPU has small data cache,
-overall weight of memory speed will slightly increase.
-
-
-How To Use
-----------
-
-Using LZMA encoder/decoder executable
---------------------------------------
-
-Usage: LZMA <e|d> inputFile outputFile [<switches>...]
-
- e: encode file
-
- d: decode file
-
- b: Benchmark. There are two tests: compressing and decompressing
- with LZMA method. Benchmark shows rating in MIPS (million
- instructions per second). Rating value is calculated from
- measured speed and it is normalized with Intel's Core 2 results.
- Also Benchmark checks possible hardware errors (RAM
- errors in most cases). Benchmark uses these settings:
- (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter.
- Also you can change the number of iterations. Example for 30 iterations:
- LZMA b 30
- Default number of iterations is 10.
-
-<Switches>
-
-
- -a{N}: set compression mode 0 = fast, 1 = normal
- default: 1 (normal)
-
- d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB)
- The maximum value for dictionary size is 1 GB = 2^30 bytes.
- Dictionary size is calculated as DictionarySize = 2^N bytes.
- For decompressing file compressed by LZMA method with dictionary
- size D = 2^N you need about D bytes of memory (RAM).
-
- -fb{N}: set number of fast bytes - [5, 273], default: 128
- Usually big number gives a little bit better compression ratio
- and slower compression process.
-
- -lc{N}: set number of literal context bits - [0, 8], default: 3
- Sometimes lc=4 gives gain for big files.
-
- -lp{N}: set number of literal pos bits - [0, 4], default: 0
- lp switch is intended for periodical data when period is
- equal 2^N. For example, for 32-bit (4 bytes)
- periodical data you can use lp=2. Often it's better to set lc0,
- if you change lp switch.
-
- -pb{N}: set number of pos bits - [0, 4], default: 2
- pb switch is intended for periodical data
- when period is equal 2^N.
-
- -mf{MF_ID}: set Match Finder. Default: bt4.
- Algorithms from hc* group doesn't provide good compression
- ratio, but they often works pretty fast in combination with
- fast mode (-a0).
-
- Memory requirements depend from dictionary size
- (parameter "d" in table below).
-
- MF_ID Memory Description
-
- bt2 d * 9.5 + 4MB Binary Tree with 2 bytes hashing.
- bt3 d * 11.5 + 4MB Binary Tree with 3 bytes hashing.
- bt4 d * 11.5 + 4MB Binary Tree with 4 bytes hashing.
- hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing.
-
- -eos: write End Of Stream marker. By default LZMA doesn't write
- eos marker, since LZMA decoder knows uncompressed size
- stored in .lzma file header.
-
- -si: Read data from stdin (it will write End Of Stream marker).
- -so: Write data to stdout
-
-
-Examples:
-
-1) LZMA e file.bin file.lzma -d16 -lc0
-
-compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K)
-and 0 literal context bits. -lc0 allows to reduce memory requirements
-for decompression.
-
-
-2) LZMA e file.bin file.lzma -lc0 -lp2
-
-compresses file.bin to file.lzma with settings suitable
-for 32-bit periodical data (for example, ARM or MIPS code).
-
-3) LZMA d file.lzma file.bin
-
-decompresses file.lzma to file.bin.
-
-
-Compression ratio hints
------------------------
-
-Recommendations
----------------
-
-To increase the compression ratio for LZMA compressing it's desirable
-to have aligned data (if it's possible) and also it's desirable to locate
-data in such order, where code is grouped in one place and data is
-grouped in other place (it's better than such mixing: code, data, code,
-data, ...).
-
-
-Filters
--------
-You can increase the compression ratio for some data types, using
-special filters before compressing. For example, it's possible to
-increase the compression ratio on 5-10% for code for those CPU ISAs:
-x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC.
-
-You can find C source code of such filters in C/Bra*.* files
-
-You can check the compression ratio gain of these filters with such
-7-Zip commands (example for ARM code):
-No filter:
- 7z a a1.7z a.bin -m0=lzma
-
-With filter for little-endian ARM code:
- 7z a a2.7z a.bin -m0=arm -m1=lzma
-
-It works in such manner:
-Compressing = Filter_encoding + LZMA_encoding
-Decompressing = LZMA_decoding + Filter_decoding
-
-Compressing and decompressing speed of such filters is very high,
-so it will not increase decompressing time too much.
-Moreover, it reduces decompression time for LZMA_decoding,
-since compression ratio with filtering is higher.
-
-These filters convert CALL (calling procedure) instructions
-from relative offsets to absolute addresses, so such data becomes more
-compressible.
-
-For some ISAs (for example, for MIPS) it's impossible to get gain from such filter.
-
-
-LZMA compressed file format
----------------------------
-Offset Size Description
- 0 1 Special LZMA properties (lc,lp, pb in encoded form)
- 1 4 Dictionary size (little endian)
- 5 8 Uncompressed size (little endian). -1 means unknown size
- 13 Compressed data
-
-
-ANSI-C LZMA Decoder
-~~~~~~~~~~~~~~~~~~~
-
-Please note that interfaces for ANSI-C code were changed in LZMA SDK 4.58.
-If you want to use old interfaces you can download previous version of LZMA SDK
-from sourceforge.net site.
-
-To use ANSI-C LZMA Decoder you need the following files:
-1) LzmaDec.h + LzmaDec.c + Types.h
-LzmaUtil/LzmaUtil.c is example application that uses these files.
-
-
-Memory requirements for LZMA decoding
--------------------------------------
-
-Stack usage of LZMA decoding function for local variables is not
-larger than 200-400 bytes.
-
-LZMA Decoder uses dictionary buffer and internal state structure.
-Internal state structure consumes
- state_size = (4 + (1.5 << (lc + lp))) KB
-by default (lc=3, lp=0), state_size = 16 KB.
-
-
-How To decompress data
-----------------------
-
-LZMA Decoder (ANSI-C version) now supports 2 interfaces:
-1) Single-call Decompressing
-2) Multi-call State Decompressing (zlib-like interface)
-
-You must use external allocator:
-Example:
-void *SzAlloc(void *p, size_t size) { p = p; return malloc(size); }
-void SzFree(void *p, void *address) { p = p; free(address); }
-ISzAlloc alloc = { SzAlloc, SzFree };
-
-You can use p = p; operator to disable compiler warnings.
-
-
-Single-call Decompressing
--------------------------
-When to use: RAM->RAM decompressing
-Compile files: LzmaDec.h + LzmaDec.c + Types.h
-Compile defines: no defines
-Memory Requirements:
- - Input buffer: compressed size
- - Output buffer: uncompressed size
- - LZMA Internal Structures: state_size (16 KB for default settings)
-
-Interface:
- int LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
- const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
- ELzmaStatus *status, ISzAlloc *alloc);
- In:
- dest - output data
- destLen - output data size
- src - input data
- srcLen - input data size
- propData - LZMA properties (5 bytes)
- propSize - size of propData buffer (5 bytes)
- finishMode - It has meaning only if the decoding reaches output limit (*destLen).
- LZMA_FINISH_ANY - Decode just destLen bytes.
- LZMA_FINISH_END - Stream must be finished after (*destLen).
- You can use LZMA_FINISH_END, when you know that
- current output buffer covers last bytes of stream.
- alloc - Memory allocator.
-
- Out:
- destLen - processed output size
- srcLen - processed input size
-
- Output:
- SZ_OK
- status:
- LZMA_STATUS_FINISHED_WITH_MARK
- LZMA_STATUS_NOT_FINISHED
- LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
- SZ_ERROR_DATA - Data error
- SZ_ERROR_MEM - Memory allocation error
- SZ_ERROR_UNSUPPORTED - Unsupported properties
- SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
-
- If LZMA decoder sees end_marker before reaching output limit, it returns OK result,
- and output value of destLen will be less than output buffer size limit.
-
- You can use multiple checks to test data integrity after full decompression:
- 1) Check Result and "status" variable.
- 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
- 3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
- You must use correct finish mode in that case. */
-
-
-Multi-call State Decompressing (zlib-like interface)
-----------------------------------------------------
-
-When to use: file->file decompressing
-Compile files: LzmaDec.h + LzmaDec.c + Types.h
-
-Memory Requirements:
- - Buffer for input stream: any size (for example, 16 KB)
- - Buffer for output stream: any size (for example, 16 KB)
- - LZMA Internal Structures: state_size (16 KB for default settings)
- - LZMA dictionary (dictionary size is encoded in LZMA properties header)
-
-1) read LZMA properties (5 bytes) and uncompressed size (8 bytes, little-endian) to header:
- unsigned char header[LZMA_PROPS_SIZE + 8];
- ReadFile(inFile, header, sizeof(header)
-
-2) Allocate CLzmaDec structures (state + dictionary) using LZMA properties
-
- CLzmaDec state;
- LzmaDec_Constr(&state);
- res = LzmaDec_Allocate(&state, header, LZMA_PROPS_SIZE, &g_Alloc);
- if (res != SZ_OK)
- return res;
-
-3) Init LzmaDec structure before any new LZMA stream. And call LzmaDec_DecodeToBuf in loop
-
- LzmaDec_Init(&state);
- for (;;)
- {
- ...
- int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
- const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode);
- ...
- }
-
-
-4) Free all allocated structures
- LzmaDec_Free(&state, &g_Alloc);
-
-For full code example, look at C/LzmaUtil/LzmaUtil.c code.
-
-
-How To compress data
---------------------
-
-Compile files: LzmaEnc.h + LzmaEnc.c + Types.h +
-LzFind.c + LzFind.h + LzFindMt.c + LzFindMt.h + LzHash.h
-
-Memory Requirements:
- - (dictSize * 11.5 + 6 MB) + state_size
-
-Lzma Encoder can use two memory allocators:
-1) alloc - for small arrays.
-2) allocBig - for big arrays.
-
-For example, you can use Large RAM Pages (2 MB) in allocBig allocator for
-better compression speed. Note that Windows has bad implementation for
-Large RAM Pages.
-It's OK to use same allocator for alloc and allocBig.
-
-
-Single-call Compression with callbacks
---------------------------------------
-
-Check C/LzmaUtil/LzmaUtil.c as example,
-
-When to use: file->file decompressing
-
-1) you must implement callback structures for interfaces:
-ISeqInStream
-ISeqOutStream
-ICompressProgress
-ISzAlloc
-
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
-
- CFileSeqInStream inStream;
- CFileSeqOutStream outStream;
-
- inStream.funcTable.Read = MyRead;
- inStream.file = inFile;
- outStream.funcTable.Write = MyWrite;
- outStream.file = outFile;
-
-
-2) Create CLzmaEncHandle object;
-
- CLzmaEncHandle enc;
-
- enc = LzmaEnc_Create(&g_Alloc);
- if (enc == 0)
- return SZ_ERROR_MEM;
-
-
-3) initialize CLzmaEncProps properties;
-
- LzmaEncProps_Init(&props);
-
- Then you can change some properties in that structure.
-
-4) Send LZMA properties to LZMA Encoder
-
- res = LzmaEnc_SetProps(enc, &props);
-
-5) Write encoded properties to header
-
- Byte header[LZMA_PROPS_SIZE + 8];
- size_t headerSize = LZMA_PROPS_SIZE;
- UInt64 fileSize;
- int i;
-
- res = LzmaEnc_WriteProperties(enc, header, &headerSize);
- fileSize = MyGetFileLength(inFile);
- for (i = 0; i < 8; i++)
- header[headerSize++] = (Byte)(fileSize >> (8 * i));
- MyWriteFileAndCheck(outFile, header, headerSize)
-
-6) Call encoding function:
- res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable,
- NULL, &g_Alloc, &g_Alloc);
-
-7) Destroy LZMA Encoder Object
- LzmaEnc_Destroy(enc, &g_Alloc, &g_Alloc);
-
-
-If callback function return some error code, LzmaEnc_Encode also returns that code
-or it can return the code like SZ_ERROR_READ, SZ_ERROR_WRITE or SZ_ERROR_PROGRESS.
-
-
-Single-call RAM->RAM Compression
---------------------------------
-
-Single-call RAM->RAM Compression is similar to Compression with callbacks,
-but you provide pointers to buffers instead of pointers to stream callbacks:
-
-HRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
- CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
- ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
-
-Return code:
- SZ_OK - OK
- SZ_ERROR_MEM - Memory allocation error
- SZ_ERROR_PARAM - Incorrect paramater
- SZ_ERROR_OUTPUT_EOF - output buffer overflow
- SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
-
-
-
-Defines
--------
-
-_LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code.
-
-_LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for
- some structures will be doubled in that case.
-
-_LZMA_UINT32_IS_ULONG - Define it if int is 16-bit on your compiler and long is 32-bit.
-
-_LZMA_NO_SYSTEM_SIZE_T - Define it if you don't want to use size_t type.
-
-
-_7ZIP_PPMD_SUPPPORT - Define it if you don't want to support PPMD method in AMSI-C .7z decoder.
-
-
-C++ LZMA Encoder/Decoder
-~~~~~~~~~~~~~~~~~~~~~~~~
-C++ LZMA code use COM-like interfaces. So if you want to use it,
-you can study basics of COM/OLE.
-C++ LZMA code is just wrapper over ANSI-C code.
-
-
-C++ Notes
-~~~~~~~~~~~~~~~~~~~~~~~~
-If you use some C++ code folders in 7-Zip (for example, C++ code for .7z handling),
-you must check that you correctly work with "new" operator.
-7-Zip can be compiled with MSVC 6.0 that doesn't throw "exception" from "new" operator.
-So 7-Zip uses "CPP\Common\NewHandler.cpp" that redefines "new" operator:
-operator new(size_t size)
-{
- void *p = ::malloc(size);
- if (p == 0)
- throw CNewException();
- return p;
-}
-If you use MSCV that throws exception for "new" operator, you can compile without
-"NewHandler.cpp". So standard exception will be used. Actually some code of
-7-Zip catches any exception in internal code and converts it to HRESULT code.
-So you don't need to catch CNewException, if you call COM interfaces of 7-Zip.
-
----
-
-http://www.7-zip.org
-http://www.7-zip.org/sdk.html
-http://www.7-zip.org/support.html
diff --git a/3rdparty/nanosvg/LICENSE.txt b/3rdparty/nanosvg/LICENSE.txt
new file mode 100644
index 00000000000..f896f2eb0f0
--- /dev/null
+++ b/3rdparty/nanosvg/LICENSE.txt
@@ -0,0 +1,18 @@
+Copyright (c) 2013-14 Mikko Mononen memon@inside.org
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
diff --git a/3rdparty/nanosvg/README.md b/3rdparty/nanosvg/README.md
new file mode 100644
index 00000000000..a672d6f60e6
--- /dev/null
+++ b/3rdparty/nanosvg/README.md
@@ -0,0 +1,100 @@
+Nano SVG
+==========
+
+## Parser
+
+![screenshot of some splines rendered witht the sample program](/example/screenshot-1.png?raw=true)
+
+NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes.
+
+The library suits well for anything from rendering scalable icons in your editor application to prototyping a game.
+
+NanoSVG supports a wide range of SVG features, but something may be missing, feel free to create a pull request!
+
+The shapes in the SVG images are transformed by the viewBox and converted to specified units.
+That is, you should get the same looking data as your designed in your favorite app.
+
+NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose
+to get the paths in pixels, or if you are feeding the data into a CNC-cutter, you may want to use millimeters.
+
+The units passed to NanoVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'.
+DPI (dots-per-inch) controls how the unit conversion is done.
+
+If you don't know or care about the units stuff, "px" and 96 should get you going.
+
+## Rasterizer
+
+![screenshot of tiger.svg rendered with NanoSVG rasterizer](/example/screenshot-2.png?raw=true)
+
+The parser library is accompanied with really simpler SVG rasterizer. Currently it only renders flat filled shapes.
+
+The intended usage for the rasterizer is to for example bake icons of different size into a texture. The rasterizer is not particular fast or accurate, but it's small and packed in one header file.
+
+
+## Example Usage
+
+``` C
+// Load
+struct NSVGimage* image;
+image = nsvgParseFromFile("test.svg", "px", 96);
+printf("size: %f x %f\n", image->width, image->height);
+// Use...
+for (shape = image->shapes; shape != NULL; shape = shape->next) {
+ for (path = shape->paths; path != NULL; path = path->next) {
+ for (i = 0; i < path->npts-1; i += 3) {
+ float* p = &path->pts[i*2];
+ drawCubicBez(p[0],p[1], p[2],p[3], p[4],p[5], p[6],p[7]);
+ }
+ }
+}
+// Delete
+nsvgDelete(image);
+```
+
+## Using NanoSVG in your project
+
+In order to use NanoSVG in your own project, just copy nanosvg.h to your project.
+In one C/C++ define `NANOSVG_IMPLEMENTATION` before including the library to expand the NanoSVG implementation in that file.
+NanoSVG depends on `stdio.h` ,`string.h` and `math.h`, they should be included where the implementation is expanded before including NanoSVG.
+
+``` C
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#define NANOSVG_IMPLEMENTATION // Expands implementation
+#include "nanosvg.h"
+```
+
+By default, NanoSVG parses only the most common colors. In order to get support for full list of [SVG color keywords](http://www.w3.org/TR/SVG11/types.html#ColorKeywords), define `NANOSVG_ALL_COLOR_KEYWORDS` before expanding the implementation.
+
+``` C
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#define NANOSVG_ALL_COLOR_KEYWORDS // Include full list of color keywords.
+#define NANOSVG_IMPLEMENTATION // Expands implementation
+#include "nanosvg.h"
+```
+
+## Compiling Example Project
+
+In order to compile the demo project, your will need to install [GLFW](http://www.glfw.org/) to compile.
+
+NanoSVG demo project uses [premake4](http://industriousone.com/premake) to build platform specific projects, now is good time to install it if you don't have it already. To build the example, navigate into the root folder in your favorite terminal, then:
+
+- *OS X*: `premake4 xcode4`
+- *Windows*: `premake4 vs2010`
+- *Linux*: `premake4 gmake`
+
+See premake4 documentation for full list of supported build file types. The projects will be created in `build` folder. An example of building and running the example on OS X:
+
+```bash
+$ premake4 gmake
+$ cd build/
+$ make
+$ ./example
+```
+
+# License
+
+The library is licensed under [zlib license](LICENSE.txt) \ No newline at end of file
diff --git a/3rdparty/nanosvg/example/23.svg b/3rdparty/nanosvg/example/23.svg
new file mode 100644
index 00000000000..983e57026e4
--- /dev/null
+++ b/3rdparty/nanosvg/example/23.svg
@@ -0,0 +1,730 @@
+<?xml version="1.0"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ height="800">
+ <g transform="translate(200,200)" style="fill-opacity:1; fill:none;">
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-122.304 84.285C-122.304 84.285 -122.203 86.179 -123.027 86.16C-123.851 86.141 -140.305 38.066 -160.833 40.309C-160.833 40.309 -143.05 32.956 -122.304 84.285z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-118.774 81.262C-118.774 81.262 -119.323 83.078 -120.092 82.779C-120.86 82.481 -119.977 31.675 -140.043 26.801C-140.043 26.801 -120.82 25.937 -118.774 81.262z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-91.284 123.59C-91.284 123.59 -89.648 124.55 -90.118 125.227C-90.589 125.904 -139.763 113.102 -149.218 131.459C-149.218 131.459 -145.539 112.572 -91.284 123.59z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-94.093 133.801C-94.093 133.801 -92.237 134.197 -92.471 134.988C-92.704 135.779 -143.407 139.121 -146.597 159.522C-146.597 159.522 -149.055 140.437 -94.093 133.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-98.304 128.276C-98.304 128.276 -96.526 128.939 -96.872 129.687C-97.218 130.435 -147.866 126.346 -153.998 146.064C-153.998 146.064 -153.646 126.825 -98.304 128.276z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-109.009 110.072C-109.009 110.072 -107.701 111.446 -108.34 111.967C-108.979 112.488 -152.722 86.634 -166.869 101.676C-166.869 101.676 -158.128 84.533 -109.009 110.072z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-116.554 114.263C-116.554 114.263 -115.098 115.48 -115.674 116.071C-116.25 116.661 -162.638 95.922 -174.992 112.469C-174.992 112.469 -168.247 94.447 -116.554 114.263z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-119.154 118.335C-119.154 118.335 -117.546 119.343 -118.036 120.006C-118.526 120.669 -167.308 106.446 -177.291 124.522C-177.291 124.522 -173.066 105.749 -119.154 118.335z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-108.42 118.949C-108.42 118.949 -107.298 120.48 -107.999 120.915C-108.7 121.35 -148.769 90.102 -164.727 103.207C-164.727 103.207 -153.862 87.326 -108.42 118.949z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-128.2 90C-128.2 90 -127.6 91.8 -128.4 92C-129.2 92.2 -157.8 50.2 -177.001 57.8C-177.001 57.8 -161.8 46 -128.2 90z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-127.505 96.979C-127.505 96.979 -126.53 98.608 -127.269 98.975C-128.007 99.343 -164.992 64.499 -182.101 76.061C-182.101 76.061 -169.804 61.261 -127.505 96.979z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-127.62 101.349C-127.62 101.349 -126.498 102.88 -127.199 103.315C-127.9 103.749 -167.969 72.502 -183.927 85.607C-183.927 85.607 -173.062 69.726 -127.62 101.349z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000">
+ <path d="M-129.83 103.065C-129.327 109.113 -128.339 115.682 -126.6 118.801C-126.6 118.801 -130.2 131.201 -121.4 144.401C-121.4 144.401 -121.8 151.601 -120.2 154.801C-120.2 154.801 -116.2 163.201 -111.4 164.001C-107.516 164.648 -98.793 167.717 -88.932 169.121C-88.932 169.121 -71.8 183.201 -75 196.001C-75 196.001 -75.4 212.401 -79 214.001C-79 214.001 -67.4 202.801 -77 219.601L-81.4 238.401C-81.4 238.401 -55.8 216.801 -71.4 235.201L-81.4 261.201C-81.4 261.201 -61.8 242.801 -69 251.201L-72.2 260.001C-72.2 260.001 -29 232.801 -59.8 262.401C-59.8 262.401 -51.8 258.801 -47.4 261.601C-47.4 261.601 -40.6 260.401 -41.4 262.001C-41.4 262.001 -62.2 272.401 -65.8 290.801C-65.8 290.801 -57.4 280.801 -60.6 291.601L-60.2 303.201C-60.2 303.201 -56.2 281.601 -56.6 319.201C-56.6 319.201 -37.4 301.201 -49 322.001L-49 338.801C-49 338.801 -33.8 322.401 -40.2 335.201C-40.2 335.201 -30.2 326.401 -34.2 341.601C-34.2 341.601 -35 352.001 -30.6 340.801C-30.6 340.801 -14.6 310.201 -20.6 336.401C-20.6 336.401 -21.4 355.601 -16.6 340.801C-16.6 340.801 -16.2 351.201 -7 358.401C-7 358.401 -8.2 307.601 4.6 343.601L8.6 360.001C8.6 360.001 11.4 350.801 11 345.601C11 345.601 25.8 329.201 19 353.601C19 353.601 34.2 330.801 31 344.001C31 344.001 23.4 360.001 25 364.801C25 364.801 41.8 330.001 43 328.401C43 328.401 41 370.802 51.8 334.801C51.8 334.801 57.4 346.801 54.6 351.201C54.6 351.201 62.6 343.201 61.8 340.001C61.8 340.001 66.4 331.801 69.2 345.401C69.2 345.401 71 354.801 72.6 351.601C72.6 351.601 76.6 375.602 77.8 352.801C77.8 352.801 79.4 339.201 72.2 327.601C72.2 327.601 73 324.401 70.2 320.401C70.2 320.401 83.8 342.001 76.6 313.201C76.6 313.201 87.801 321.201 89.001 321.201C89.001 321.201 75.4 298.001 84.2 302.801C84.2 302.801 79 292.401 97.001 304.401C97.001 304.401 81 288.401 98.601 298.001C98.601 298.001 106.601 304.401 99.001 294.401C99.001 294.401 84.6 278.401 106.601 296.401C106.601 296.401 118.201 312.801 119.001 315.601C119.001 315.601 109.001 286.401 104.601 283.601C104.601 283.601 113.001 247.201 154.201 262.801C154.201 262.801 161.001 280.001 165.401 261.601C165.401 261.601 178.201 255.201 189.401 282.801C189.401 282.801 193.401 269.201 192.601 266.401C192.601 266.401 199.401 267.601 198.601 266.401C198.601 266.401 211.801 270.801 213.001 270.001C213.001 270.001 219.801 276.801 220.201 273.201C220.201 273.201 229.401 276.001 227.401 272.401C227.401 272.401 236.201 288.001 236.601 291.601L239.001 277.601L241.001 280.401C241.001 280.401 242.601 272.801 241.801 271.601C241.001 270.401 261.801 278.401 266.601 299.201L268.601 307.601C268.601 307.601 274.601 292.801 273.001 288.801C273.001 288.801 278.201 289.601 278.601 294.001C278.601 294.001 282.601 270.801 277.801 264.801C277.801 264.801 282.201 264.001 283.401 267.601L283.401 260.401C283.401 260.401 290.601 261.201 290.601 258.801C290.601 258.801 295.001 254.801 297.001 259.601C297.001 259.601 284.601 224.401 303.001 243.601C303.001 243.601 310.201 254.401 306.601 235.601C303.001 216.801 299.001 215.201 303.801 214.801C303.801 214.801 304.601 211.201 302.601 209.601C300.601 208.001 303.801 209.601 303.801 209.601C303.801 209.601 308.601 213.601 303.401 191.601C303.401 191.601 309.801 193.201 297.801 164.001C297.801 164.001 300.601 161.601 296.601 153.201C296.601 153.201 304.601 157.601 307.401 156.001C307.401 156.001 307.001 154.401 303.801 150.401C303.801 150.401 282.201 95.6 302.601 117.601C302.601 117.601 314.451 131.151 308.051 108.351C308.051 108.351 298.94 84.341 299.717 80.045L-129.83 103.065z"/>
+ </g>
+ <g style="fill: #cc7226; stroke:#000000">
+ <path d="M299.717 80.245C300.345 80.426 302.551 81.55 303.801 83.2C303.801 83.2 310.601 94 305.401 75.6C305.401 75.6 296.201 46.8 305.001 58C305.001 58 311.001 65.2 307.801 51.6C303.936 35.173 301.401 28.8 301.401 28.8C301.401 28.8 313.001 33.6 286.201 -6L295.001 -2.4C295.001 -2.4 275.401 -42 253.801 -47.2L245.801 -53.2C245.801 -53.2 284.201 -91.2 271.401 -128C271.401 -128 264.601 -133.2 255.001 -124C255.001 -124 248.601 -119.2 242.601 -120.8C242.601 -120.8 211.801 -119.6 209.801 -119.6C207.801 -119.6 173.001 -156.8 107.401 -139.2C107.401 -139.2 102.201 -137.2 97.801 -138.4C97.801 -138.4 79.4 -154.4 30.6 -131.6C30.6 -131.6 20.6 -129.6 19 -129.6C17.4 -129.6 14.6 -129.6 6.6 -123.2C-1.4 -116.8 -1.8 -116 -3.8 -114.4C-3.8 -114.4 -20.2 -103.2 -25 -102.4C-25 -102.4 -36.6 -96 -41 -86L-44.6 -84.8C-44.6 -84.8 -46.2 -77.6 -46.6 -76.4C-46.6 -76.4 -51.4 -72.8 -52.2 -67.2C-52.2 -67.2 -61 -61.2 -60.6 -56.8C-60.6 -56.8 -62.2 -51.6 -63 -46.8C-63 -46.8 -70.2 -42 -69.4 -39.2C-69.4 -39.2 -77 -25.2 -75.8 -18.4C-75.8 -18.4 -82.2 -18.8 -85 -16.4C-85 -16.4 -85.8 -11.6 -87.4 -11.2C-87.4 -11.2 -90.2 -10 -87.8 -6C-87.8 -6 -89.4 -3.2 -89.8 -1.6C-89.8 -1.6 -89 1.2 -93.4 6.8C-93.4 6.8 -99.8 25.6 -97.8 30.8C-97.8 30.8 -97.4 35.6 -100.2 37.2C-100.2 37.2 -103.8 36.8 -95.4 48.8C-95.4 48.8 -94.6 50 -97.8 52.4C-97.8 52.4 -115 56 -117.4 72.4C-117.4 72.4 -131 87.2 -131 92.4C-131 94.705 -130.729 97.852 -130.03 102.465C-130.03 102.465 -130.6 110.801 -103 111.601C-75.4 112.401 299.717 80.245 299.717 80.245z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M-115.6 102.6C-140.6 63.2 -126.2 119.601 -126.2 119.601C-117.4 154.001 12.2 116.401 12.2 116.401C12.2 116.401 181.001 86 192.201 82C203.401 78 298.601 84.4 298.601 84.4L293.001 67.6C228.201 21.2 209.001 44.4 195.401 40.4C181.801 36.4 184.201 46 181.001 46.8C177.801 47.6 138.601 22.8 132.201 23.6C125.801 24.4 100.459 0.649 115.401 32.4C131.401 66.4 57 71.6 40.2 60.4C23.4 49.2 47.4 78.8 47.4 78.8C65.8 98.8 31.4 82 31.4 82C-3 69.2 -27 94.8 -30.2 95.6C-33.4 96.4 -38.2 99.6 -39 93.2C-39.8 86.8 -47.31 70.099 -79 96.4C-99 113.001 -112.8 91 -112.8 91L-115.6 102.6z"/>
+ </g>
+ <g style="fill: #e87f3a">
+ <path d="M133.51 25.346C127.11 26.146 101.743 2.407 116.71 34.146C133.31 69.346 58.31 73.346 41.51 62.146C24.709 50.946 48.71 80.546 48.71 80.546C67.11 100.546 32.709 83.746 32.709 83.746C-1.691 70.946 -25.691 96.546 -28.891 97.346C-32.091 98.146 -36.891 101.346 -37.691 94.946C-38.491 88.546 -45.87 72.012 -77.691 98.146C-98.927 115.492 -112.418 94.037 -112.418 94.037L-115.618 104.146C-140.618 64.346 -125.546 122.655 -125.546 122.655C-116.745 157.056 13.509 118.146 13.509 118.146C13.509 118.146 182.31 87.746 193.51 83.746C204.71 79.746 299.038 86.073 299.038 86.073L293.51 68.764C228.71 22.364 210.31 46.146 196.71 42.146C183.11 38.146 185.51 47.746 182.31 48.546C179.11 49.346 139.91 24.546 133.51 25.346z"/>
+ </g>
+ <g style="fill: #ea8c4d">
+ <path d="M134.819 27.091C128.419 27.891 103.685 3.862 118.019 35.891C134.219 72.092 59.619 75.092 42.819 63.892C26.019 52.692 50.019 82.292 50.019 82.292C68.419 102.292 34.019 85.492 34.019 85.492C-0.381 72.692 -24.382 98.292 -27.582 99.092C-30.782 99.892 -35.582 103.092 -36.382 96.692C-37.182 90.292 -44.43 73.925 -76.382 99.892C-98.855 117.983 -112.036 97.074 -112.036 97.074L-115.636 105.692C-139.436 66.692 -124.891 125.71 -124.891 125.71C-116.091 160.11 14.819 119.892 14.819 119.892C14.819 119.892 183.619 89.492 194.819 85.492C206.019 81.492 299.474 87.746 299.474 87.746L294.02 69.928C229.219 23.528 211.619 47.891 198.019 43.891C184.419 39.891 186.819 49.491 183.619 50.292C180.419 51.092 141.219 26.291 134.819 27.091z"/>
+ </g>
+ <g style="fill: #ec9961">
+ <path d="M136.128 28.837C129.728 29.637 104.999 5.605 119.328 37.637C136.128 75.193 60.394 76.482 44.128 65.637C27.328 54.437 51.328 84.037 51.328 84.037C69.728 104.037 35.328 87.237 35.328 87.237C0.928 74.437 -23.072 100.037 -26.272 100.837C-29.472 101.637 -34.272 104.837 -35.072 98.437C-35.872 92.037 -42.989 75.839 -75.073 101.637C-98.782 120.474 -111.655 100.11 -111.655 100.11L-115.655 107.237C-137.455 70.437 -124.236 128.765 -124.236 128.765C-115.436 163.165 16.128 121.637 16.128 121.637C16.128 121.637 184.928 91.237 196.129 87.237C207.329 83.237 299.911 89.419 299.911 89.419L294.529 71.092C229.729 24.691 212.929 49.637 199.329 45.637C185.728 41.637 188.128 51.237 184.928 52.037C181.728 52.837 142.528 28.037 136.128 28.837z"/>
+ </g>
+ <g style="fill: #eea575">
+ <path d="M137.438 30.583C131.037 31.383 106.814 7.129 120.637 39.383C137.438 78.583 62.237 78.583 45.437 67.383C28.637 56.183 52.637 85.783 52.637 85.783C71.037 105.783 36.637 88.983 36.637 88.983C2.237 76.183 -21.763 101.783 -24.963 102.583C-28.163 103.383 -32.963 106.583 -33.763 100.183C-34.563 93.783 -41.548 77.752 -73.763 103.383C-98.709 122.965 -111.273 103.146 -111.273 103.146L-115.673 108.783C-135.473 73.982 -123.582 131.819 -123.582 131.819C-114.782 166.22 17.437 123.383 17.437 123.383C17.437 123.383 186.238 92.983 197.438 88.983C208.638 84.983 300.347 91.092 300.347 91.092L295.038 72.255C230.238 25.855 214.238 51.383 200.638 47.383C187.038 43.383 189.438 52.983 186.238 53.783C183.038 54.583 143.838 29.783 137.438 30.583z"/>
+ </g>
+ <g style="fill: #f1b288">
+ <path d="M138.747 32.328C132.347 33.128 106.383 9.677 121.947 41.128C141.147 79.928 63.546 80.328 46.746 69.128C29.946 57.928 53.946 87.528 53.946 87.528C72.346 107.528 37.946 90.728 37.946 90.728C3.546 77.928 -20.454 103.528 -23.654 104.328C-26.854 105.128 -31.654 108.328 -32.454 101.928C-33.254 95.528 -40.108 79.665 -72.454 105.128C-98.636 125.456 -110.891 106.183 -110.891 106.183L-115.691 110.328C-133.691 77.128 -122.927 134.874 -122.927 134.874C-114.127 169.274 18.746 125.128 18.746 125.128C18.746 125.128 187.547 94.728 198.747 90.728C209.947 86.728 300.783 92.764 300.783 92.764L295.547 73.419C230.747 27.019 215.547 53.128 201.947 49.128C188.347 45.128 190.747 54.728 187.547 55.528C184.347 56.328 145.147 31.528 138.747 32.328z"/>
+ </g>
+ <g style="fill: #f3bf9c">
+ <path d="M140.056 34.073C133.655 34.873 107.313 11.613 123.255 42.873C143.656 82.874 64.855 82.074 48.055 70.874C31.255 59.674 55.255 89.274 55.255 89.274C73.655 109.274 39.255 92.474 39.255 92.474C4.855 79.674 -19.145 105.274 -22.345 106.074C-25.545 106.874 -30.345 110.074 -31.145 103.674C-31.945 97.274 -38.668 81.578 -71.145 106.874C-98.564 127.947 -110.509 109.219 -110.509 109.219L-115.709 111.874C-131.709 81.674 -122.273 137.929 -122.273 137.929C-113.473 172.329 20.055 126.874 20.055 126.874C20.055 126.874 188.856 96.474 200.056 92.474C211.256 88.474 301.22 94.437 301.22 94.437L296.056 74.583C231.256 28.183 216.856 54.874 203.256 50.874C189.656 46.873 192.056 56.474 188.856 57.274C185.656 58.074 146.456 33.273 140.056 34.073z"/>
+ </g>
+ <g style="fill: #f5ccb0">
+ <path d="M141.365 35.819C134.965 36.619 107.523 13.944 124.565 44.619C146.565 84.219 66.164 83.819 49.364 72.619C32.564 61.419 56.564 91.019 56.564 91.019C74.964 111.019 40.564 94.219 40.564 94.219C6.164 81.419 -17.836 107.019 -21.036 107.819C-24.236 108.619 -29.036 111.819 -29.836 105.419C-30.636 99.019 -37.227 83.492 -69.836 108.619C-98.491 130.438 -110.127 112.256 -110.127 112.256L-115.727 113.419C-130.128 85.019 -121.618 140.983 -121.618 140.983C-112.818 175.384 21.364 128.619 21.364 128.619C21.364 128.619 190.165 98.219 201.365 94.219C212.565 90.219 301.656 96.11 301.656 96.11L296.565 75.746C231.765 29.346 218.165 56.619 204.565 52.619C190.965 48.619 193.365 58.219 190.165 59.019C186.965 59.819 147.765 35.019 141.365 35.819z"/>
+ </g>
+ <g style="fill: #f8d8c4">
+ <path d="M142.674 37.565C136.274 38.365 108.832 15.689 125.874 46.365C147.874 85.965 67.474 85.565 50.674 74.365C33.874 63.165 57.874 92.765 57.874 92.765C76.274 112.765 41.874 95.965 41.874 95.965C7.473 83.165 -16.527 108.765 -19.727 109.565C-22.927 110.365 -27.727 113.565 -28.527 107.165C-29.327 100.765 -35.786 85.405 -68.527 110.365C-98.418 132.929 -109.745 115.293 -109.745 115.293L-115.745 114.965C-129.346 88.564 -120.963 144.038 -120.963 144.038C-112.163 178.438 22.673 130.365 22.673 130.365C22.673 130.365 191.474 99.965 202.674 95.965C213.874 91.965 302.093 97.783 302.093 97.783L297.075 76.91C232.274 30.51 219.474 58.365 205.874 54.365C192.274 50.365 194.674 59.965 191.474 60.765C188.274 61.565 149.074 36.765 142.674 37.565z"/>
+ </g>
+ <g style="fill: #fae5d7">
+ <path d="M143.983 39.31C137.583 40.11 110.529 17.223 127.183 48.11C149.183 88.91 68.783 87.31 51.983 76.11C35.183 64.91 59.183 94.51 59.183 94.51C77.583 114.51 43.183 97.71 43.183 97.71C8.783 84.91 -15.217 110.51 -18.417 111.31C-21.618 112.11 -26.418 115.31 -27.218 108.91C-28.018 102.51 -34.346 87.318 -67.218 112.11C-98.345 135.42 -109.363 118.329 -109.363 118.329L-115.764 116.51C-128.764 92.51 -120.309 147.093 -120.309 147.093C-111.509 181.493 23.983 132.11 23.983 132.11C23.983 132.11 192.783 101.71 203.983 97.71C215.183 93.71 302.529 99.456 302.529 99.456L297.583 78.074C232.783 31.673 220.783 60.11 207.183 56.11C193.583 52.11 195.983 61.71 192.783 62.51C189.583 63.31 150.383 38.51 143.983 39.31z"/>
+ </g>
+ <g style="fill: #fcf2eb">
+ <path d="M145.292 41.055C138.892 41.855 112.917 18.411 128.492 49.855C149.692 92.656 70.092 89.056 53.292 77.856C36.492 66.656 60.492 96.256 60.492 96.256C78.892 116.256 44.492 99.456 44.492 99.456C10.092 86.656 -13.908 112.256 -17.108 113.056C-20.308 113.856 -25.108 117.056 -25.908 110.656C-26.708 104.256 -32.905 89.232 -65.908 113.856C-98.273 137.911 -108.982 121.365 -108.982 121.365L-115.782 118.056C-128.582 94.856 -119.654 150.147 -119.654 150.147C-110.854 184.547 25.292 133.856 25.292 133.856C25.292 133.856 194.093 103.456 205.293 99.456C216.493 95.456 302.965 101.128 302.965 101.128L298.093 79.237C233.292 32.837 222.093 61.856 208.493 57.856C194.893 53.855 197.293 63.456 194.093 64.256C190.892 65.056 151.692 40.255 145.292 41.055z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-115.8 119.601C-128.6 97.6 -119 153.201 -119 153.201C-110.2 187.601 26.6 135.601 26.6 135.601C26.6 135.601 195.401 105.2 206.601 101.2C217.801 97.2 303.401 102.8 303.401 102.8L298.601 80.4C233.801 34 223.401 63.6 209.801 59.6C196.201 55.6 198.601 65.2 195.401 66C192.201 66.8 153.001 42 146.601 42.8C140.201 43.6 114.981 19.793 129.801 51.6C152.028 99.307 69.041 89.227 54.6 79.6C37.8 68.4 61.8 98 61.8 98C80.2 118.001 45.8 101.2 45.8 101.2C11.4 88.4 -12.6 114.001 -15.8 114.801C-19 115.601 -23.8 118.801 -24.6 112.401C-25.4 106 -31.465 91.144 -64.6 115.601C-98.2 140.401 -108.6 124.401 -108.6 124.401L-115.8 119.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-74.2 149.601C-74.2 149.601 -81.4 161.201 -60.6 174.401C-60.6 174.401 -59.2 175.801 -77.2 171.601C-77.2 171.601 -83.4 169.601 -85 159.201C-85 159.201 -89.8 154.801 -94.6 149.201C-99.4 143.601 -74.2 149.601 -74.2 149.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M65.8 102C65.8 102 83.498 128.821 82.9 133.601C81.6 144.001 81.4 153.601 84.6 157.601C87.801 161.601 96.601 194.801 96.601 194.801C96.601 194.801 96.201 196.001 108.601 158.001C108.601 158.001 120.201 142.001 100.201 123.601C100.201 123.601 65 94.8 65.8 102z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-54.2 176.401C-54.2 176.401 -43 183.601 -57.4 214.801L-51 212.401C-51 212.401 -51.8 223.601 -55 226.001L-47.8 222.801C-47.8 222.801 -43 230.801 -47 235.601C-47 235.601 -30.2 243.601 -31 250.001C-31 250.001 -24.6 242.001 -28.6 235.601C-32.6 229.201 -39.8 233.201 -39 214.801L-47.8 218.001C-47.8 218.001 -42.2 209.201 -42.2 202.801L-50.2 205.201C-50.2 205.201 -34.731 178.623 -45.4 177.201C-51.4 176.401 -54.2 176.401 -54.2 176.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-21.8 193.201C-21.8 193.201 -19 188.801 -21.8 189.601C-24.6 190.401 -55.8 205.201 -61.8 214.801C-61.8 214.801 -27.4 190.401 -21.8 193.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-11.4 201.201C-11.4 201.201 -8.6 196.801 -11.4 197.601C-14.2 198.401 -45.4 213.201 -51.4 222.801C-51.4 222.801 -17 198.401 -11.4 201.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M1.8 186.001C1.8 186.001 4.6 181.601 1.8 182.401C-1 183.201 -32.2 198.001 -38.2 207.601C-38.2 207.601 -3.8 183.201 1.8 186.001z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-21.4 229.601C-21.4 229.601 -21.4 223.601 -24.2 224.401C-27 225.201 -63 242.801 -69 252.401C-69 252.401 -27 226.801 -21.4 229.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-20.2 218.801C-20.2 218.801 -19 214.001 -21.8 214.801C-23.8 214.801 -50.2 226.401 -56.2 236.001C-56.2 236.001 -26.6 214.401 -20.2 218.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-34.6 266.401L-44.6 274.001C-44.6 274.001 -34.2 266.401 -30.6 267.601C-30.6 267.601 -37.4 278.801 -38.2 284.001C-38.2 284.001 -27.8 271.201 -22.2 271.601C-22.2 271.601 -14.6 272.001 -14.6 282.801C-14.6 282.801 -9 272.401 -5.8 272.801C-5.8 272.801 -4.6 279.201 -5.8 286.001C-5.8 286.001 -1.8 278.401 2.2 280.001C2.2 280.001 8.6 278.001 7.8 289.601C7.8 289.601 7.8 300.001 7 302.801C7 302.801 12.6 276.401 15 276.001C15 276.001 23 274.801 27.8 283.601C27.8 283.601 23.8 276.001 28.6 278.001C28.6 278.001 39.4 279.601 42.6 286.401C42.6 286.401 35.8 274.401 41.4 277.601C41.4 277.601 48.2 277.601 49.4 284.001C49.4 284.001 57.8 305.201 59.8 306.801C59.8 306.801 52.2 285.201 53.8 285.201C53.8 285.201 51.8 273.201 57 288.001C57 288.001 53.8 274.001 59.4 274.801C65 275.601 69.4 285.601 77.8 283.201C77.8 283.201 87.401 288.801 89.401 219.601L-34.6 266.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-29.8 173.601C-29.8 173.601 -15 167.601 25 173.601C25 173.601 32.2 174.001 39 165.201C45.8 156.401 72.6 149.201 79 151.201L88.601 157.601L89.401 158.801C89.401 158.801 101.801 169.201 102.201 176.801C102.601 184.401 87.801 232.401 78.2 248.401C68.6 264.401 59 276.801 39.8 274.401C39.8 274.401 19 270.401 -6.6 274.401C-6.6 274.401 -35.8 272.801 -38.6 264.801C-41.4 256.801 -27.4 241.601 -27.4 241.601C-27.4 241.601 -23 233.201 -24.2 218.801C-25.4 204.401 -25 176.401 -29.8 173.601z"/>
+ </g>
+ <g style="fill: #e5668c">
+ <path d="M-7.8 175.601C0.6 194.001 -29 259.201 -29 259.201C-31 260.801 -16.34 266.846 -6.2 264.401C4.746 261.763 45 266.001 45 266.001C68.6 250.401 81.4 206.001 81.4 206.001C81.4 206.001 91.801 182.001 74.2 178.801C56.6 175.601 -7.8 175.601 -7.8 175.601z"/>
+ </g>
+ <g style="fill: #b23259">
+ <path d="M-9.831 206.497C-6.505 193.707 -4.921 181.906 -7.8 175.601C-7.8 175.601 54.6 182.001 65.8 161.201C70.041 153.326 84.801 184.001 84.4 193.601C84.4 193.601 21.4 208.001 6.6 196.801L-9.831 206.497z"/>
+ </g>
+ <g style="fill: #a5264c">
+ <path d="M-5.4 222.801C-5.4 222.801 -3.4 230.001 -5.8 234.001C-5.8 234.001 -7.4 234.801 -8.6 235.201C-8.6 235.201 -7.4 238.801 -1.4 240.401C-1.4 240.401 0.6 244.801 3 245.201C5.4 245.601 10.2 251.201 14.2 250.001C18.2 248.801 29.4 244.801 29.4 244.801C29.4 244.801 35 241.601 43.8 245.201C43.8 245.201 46.175 244.399 46.6 240.401C47.1 235.701 50.2 232.001 52.2 230.001C54.2 228.001 63.8 215.201 62.6 214.801C61.4 214.401 -5.4 222.801 -5.4 222.801z"/>
+ </g>
+ <g style="fill: #ff727f; stroke:#000000">
+ <path d="M-9.8 174.401C-9.8 174.401 -12.6 196.801 -9.4 205.201C-6.2 213.601 -7 215.601 -7.8 219.601C-8.6 223.601 -4.2 233.601 1.4 239.601L13.4 241.201C13.4 241.201 28.6 237.601 37.8 240.401C37.8 240.401 46.794 241.744 50.2 226.801C50.2 226.801 55 220.401 62.2 217.601C69.4 214.801 76.6 173.201 72.6 165.201C68.6 157.201 54.2 152.801 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-8.2 249.201C-8.2 249.201 -9 247.201 -13.4 246.801C-13.4 246.801 -35.8 243.201 -44.2 230.801C-44.2 230.801 -51 225.201 -46.6 236.801C-46.6 236.801 -36.2 257.201 -29.4 260.001C-29.4 260.001 -13 264.001 -8.2 249.201z"/>
+ </g>
+ <g style="fill: #cc3f4c">
+ <path d="M71.742 185.229C72.401 177.323 74.354 168.709 72.6 165.201C66.154 152.307 49.181 157.695 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401C-9.8 174.401 -11.545 188.364 -10.705 198.376C-10.705 198.376 26.6 186.801 27.4 192.401C27.4 192.401 29 189.201 38.2 189.201C47.4 189.201 70.142 188.029 71.742 185.229z"/>
+ </g>
+ <g style="stroke:#a51926; stroke-width:2">
+ <path d="M28.6 175.201C28.6 175.201 33.4 180.001 29.8 189.601C29.8 189.601 15.4 205.601 17.4 219.601"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-19.4 260.001C-19.4 260.001 -23.8 247.201 -15 254.001C-15 254.001 -10.2 256.001 -11.4 257.601C-12.6 259.201 -18.2 263.201 -19.4 260.001z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-14.36 261.201C-14.36 261.201 -17.88 250.961 -10.84 256.401C-10.84 256.401 -6.419 258.849 -7.96 259.281C-12.52 260.561 -7.96 263.121 -14.36 261.201z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-9.56 261.201C-9.56 261.201 -13.08 250.961 -6.04 256.401C-6.04 256.401 -1.665 258.711 -3.16 259.281C-6.52 260.561 -3.16 263.121 -9.56 261.201z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-2.96 261.401C-2.96 261.401 -6.48 251.161 0.56 256.601C0.56 256.601 4.943 258.933 3.441 259.481C0.48 260.561 3.441 263.321 -2.96 261.401z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M3.52 261.321C3.52 261.321 0 251.081 7.041 256.521C7.041 256.521 10.881 258.121 9.921 259.401C8.961 260.681 9.921 263.241 3.52 261.321z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M10.2 262.001C10.2 262.001 5.4 249.601 14.6 256.001C14.6 256.001 19.4 258.001 18.2 259.601C17 261.201 18.2 264.401 10.2 262.001z"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M-18.2 244.801C-18.2 244.801 -5 242.001 1 245.201C1 245.201 7 246.401 8.2 246.001C9.4 245.601 12.6 245.201 12.6 245.201"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M15.8 253.601C15.8 253.601 27.8 240.001 39.8 244.401C46.816 246.974 45.8 243.601 46.6 240.801C47.4 238.001 47.6 233.801 52.6 230.801"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M33 237.601C33 237.601 29 226.801 26.2 239.601C23.4 252.401 20.2 256.001 18.6 258.801C18.6 258.801 18.6 264.001 27 263.601C27 263.601 37.8 263.201 38.2 260.401C38.6 257.601 37 246.001 33 237.601z"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M47 244.801C47 244.801 50.6 242.401 53 243.601"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M53.5 228.401C53.5 228.401 56.4 223.501 61.2 222.701"/>
+ </g>
+ <g style="fill: #b2b2b2">
+ <path d="M-25.8 265.201C-25.8 265.201 -7.8 268.401 -3.4 266.801C-3.4 266.801 5.4 266.801 -3 268.801C-3 268.801 -15.8 268.801 -23.8 267.601C-23.8 267.601 -35.4 262.001 -25.8 265.201z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-11.8 172.001C-11.8 172.001 5.8 172.001 7.8 172.801C7.8 172.801 15 203.601 11.4 211.201C11.4 211.201 10.2 214.001 7.4 208.401C7.4 208.401 -11 175.601 -14.2 173.601C-17.4 171.601 -13 172.001 -11.8 172.001z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-88.9 169.301C-88.9 169.301 -80 171.001 -67.4 173.601C-67.4 173.601 -62.6 196.001 -59.4 200.801C-56.2 205.601 -59.8 205.601 -63.4 202.801C-67 200.001 -81.8 186.001 -83.8 181.601C-85.8 177.201 -88.9 169.301 -88.9 169.301z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-67.039 173.818C-67.039 173.818 -61.239 175.366 -60.23 177.581C-59.222 179.795 -61.432 183.092 -61.432 183.092C-61.432 183.092 -62.432 186.397 -63.634 184.235C-64.836 182.072 -67.708 174.412 -67.039 173.818z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-67 173.601C-67 173.601 -63.4 178.801 -59.8 178.801C-56.2 178.801 -55.818 178.388 -53 179.001C-48.4 180.001 -48.8 178.001 -42.2 179.201C-39.56 179.681 -37 178.801 -34.2 180.001C-31.4 181.201 -28.2 180.401 -27 178.401C-25.8 176.401 -21 172.201 -21 172.201C-21 172.201 -33.8 174.001 -36.6 174.801C-36.6 174.801 -59 176.001 -67 173.601z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-22.4 173.801C-22.4 173.801 -28.85 177.301 -29.25 179.701C-29.65 182.101 -24 185.801 -24 185.801C-24 185.801 -21.25 190.401 -20.65 188.001C-20.05 185.601 -21.6 174.201 -22.4 173.801z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-59.885 179.265C-59.885 179.265 -52.878 190.453 -52.661 179.242C-52.661 179.242 -52.104 177.984 -53.864 177.962C-59.939 177.886 -58.418 173.784 -59.885 179.265z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-52.707 179.514C-52.707 179.514 -44.786 190.701 -45.422 179.421C-45.422 179.421 -45.415 179.089 -47.168 178.936C-51.915 178.522 -51.57 174.004 -52.707 179.514z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-45.494 179.522C-45.494 179.522 -37.534 190.15 -38.203 180.484C-38.203 180.484 -38.084 179.251 -39.738 178.95C-43.63 178.244 -43.841 174.995 -45.494 179.522z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-38.618 179.602C-38.618 179.602 -30.718 191.163 -30.37 181.382C-30.37 181.382 -28.726 180.004 -30.472 179.782C-36.29 179.042 -35.492 174.588 -38.618 179.602z"/>
+ </g>
+ <g style="fill: #e5e5b2">
+ <path d="M-74.792 183.132L-82.45 181.601C-85.05 176.601 -87.15 170.451 -87.15 170.451C-87.15 170.451 -80.8 171.451 -68.3 174.251C-68.3 174.251 -67.424 177.569 -65.952 183.364L-74.792 183.132z"/>
+ </g>
+ <g style="fill: #e5e5b2">
+ <path d="M-9.724 178.47C-11.39 175.964 -12.707 174.206 -13.357 173.8C-16.37 171.917 -12.227 172.294 -11.098 172.294C-11.098 172.294 5.473 172.294 7.356 173.047C7.356 173.047 7.88 175.289 8.564 178.68C8.564 178.68 -1.524 176.67 -9.724 178.47z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M43.88 40.321C71.601 44.281 97.121 8.641 98.881 -1.04C100.641 -10.72 90.521 -22.6 90.521 -22.6C91.841 -25.68 87.001 -39.76 81.721 -49C76.441 -58.24 60.54 -57.266 43 -58.24C27.16 -59.12 8.68 -35.8 7.36 -34.04C6.04 -32.28 12.2 6.001 13.52 11.721C14.84 17.441 12.2 43.841 12.2 43.841C46.44 34.741 16.16 36.361 43.88 40.321z"/>
+ </g>
+ <g style="fill: #ea8e51">
+ <path d="M8.088 -33.392C6.792 -31.664 12.84 5.921 14.136 11.537C15.432 17.153 12.84 43.073 12.84 43.073C45.512 34.193 16.728 35.729 43.944 39.617C71.161 43.505 96.217 8.513 97.945 -0.992C99.673 -10.496 89.737 -22.16 89.737 -22.16C91.033 -25.184 86.281 -39.008 81.097 -48.08C75.913 -57.152 60.302 -56.195 43.08 -57.152C27.528 -58.016 9.384 -35.12 8.088 -33.392z"/>
+ </g>
+ <g style="fill: #efaa7c">
+ <path d="M8.816 -32.744C7.544 -31.048 13.48 5.841 14.752 11.353C16.024 16.865 13.48 42.305 13.48 42.305C44.884 33.145 17.296 35.097 44.008 38.913C70.721 42.729 95.313 8.385 97.009 -0.944C98.705 -10.272 88.953 -21.72 88.953 -21.72C90.225 -24.688 85.561 -38.256 80.473 -47.16C75.385 -56.064 60.063 -55.125 43.16 -56.064C27.896 -56.912 10.088 -34.44 8.816 -32.744z"/>
+ </g>
+ <g style="fill: #f4c6a8">
+ <path d="M9.544 -32.096C8.296 -30.432 14.12 5.761 15.368 11.169C16.616 16.577 14.12 41.537 14.12 41.537C43.556 32.497 17.864 34.465 44.072 38.209C70.281 41.953 94.409 8.257 96.073 -0.895C97.737 -10.048 88.169 -21.28 88.169 -21.28C89.417 -24.192 84.841 -37.504 79.849 -46.24C74.857 -54.976 59.824 -54.055 43.24 -54.976C28.264 -55.808 10.792 -33.76 9.544 -32.096z"/>
+ </g>
+ <g style="fill: #f9e2d3">
+ <path d="M10.272 -31.448C9.048 -29.816 14.76 5.681 15.984 10.985C17.208 16.289 14.76 40.769 14.76 40.769C42.628 31.849 18.432 33.833 44.136 37.505C69.841 41.177 93.505 8.129 95.137 -0.848C96.769 -9.824 87.385 -20.84 87.385 -20.84C88.609 -23.696 84.121 -36.752 79.225 -45.32C74.329 -53.888 59.585 -52.985 43.32 -53.888C28.632 -54.704 11.496 -33.08 10.272 -31.448z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M44.2 36.8C69.4 40.4 92.601 8 94.201 -0.8C95.801 -9.6 86.601 -20.4 86.601 -20.4C87.801 -23.2 83.4 -36 78.6 -44.4C73.8 -52.8 59.346 -51.914 43.4 -52.8C29 -53.6 12.2 -32.4 11 -30.8C9.8 -29.2 15.4 5.6 16.6 10.8C17.8 16 15.4 40 15.4 40C40.9 31.4 19 33.2 44.2 36.8z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M90.601 2.8C90.601 2.8 62.8 10.4 51.2 8.8C51.2 8.8 35.4 2.2 26.6 24C26.6 24 23 31.2 21 33.2C19 35.2 90.601 2.8 90.601 2.8z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M94.401 0.6C94.401 0.6 65.4 12.8 55.4 12.4C55.4 12.4 39 7.8 30.6 22.4C30.6 22.4 22.2 31.6 19 33.2C19 33.2 18.6 34.8 25 30.8L35.4 36C35.4 36 50.2 45.6 59.8 29.6C59.8 29.6 63.8 18.4 63.8 16.4C63.8 14.4 85 8.8 86.601 8.4C88.201 8 94.801 3.8 94.401 0.6z"/>
+ </g>
+ <g style="fill: #99cc32">
+ <path d="M47 36.514C40.128 36.514 31.755 32.649 31.755 26.4C31.755 20.152 40.128 13.887 47 13.887C53.874 13.887 59.446 18.952 59.446 25.2C59.446 31.449 53.874 36.514 47 36.514z"/>
+ </g>
+ <g style="fill: #659900">
+ <path d="M43.377 19.83C38.531 20.552 33.442 22.055 33.514 21.839C35.054 17.22 41.415 13.887 47 13.887C51.296 13.887 55.084 15.865 57.32 18.875C57.32 18.875 52.004 18.545 43.377 19.83z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M55.4 19.6C55.4 19.6 51 16.4 51 18.6C51 18.6 54.6 23 55.4 19.6z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M45.4 27.726C42.901 27.726 40.875 25.7 40.875 23.2C40.875 20.701 42.901 18.675 45.4 18.675C47.9 18.675 49.926 20.701 49.926 23.2C49.926 25.7 47.9 27.726 45.4 27.726z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M-58.6 14.4C-58.6 14.4 -61.8 -6.8 -59.4 -11.2C-59.4 -11.2 -48.6 -21.2 -49 -24.8C-49 -24.8 -49.4 -42.8 -50.6 -43.6C-51.8 -44.4 -59.4 -50.4 -65.4 -44C-65.4 -44 -75.8 -26 -75 -19.6L-75 -17.6C-75 -17.6 -82.6 -18 -84.2 -16C-84.2 -16 -85.4 -10.8 -86.6 -10.4C-86.6 -10.4 -89.4 -8 -87.4 -5.2C-87.4 -5.2 -89.4 -2.8 -89 1.2L-81.4 5.2C-81.4 5.2 -79.4 19.6 -68.6 24.8C-63.764 27.129 -60.6 20.4 -58.6 14.4z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-59.6 12.56C-59.6 12.56 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.48 -40.36 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.96 -59.6 12.56z"/>
+ </g>
+ <g style="fill: #eb955c">
+ <path d="M-51.05 -42.61C-52.14 -43.47 -59.63 -49.24 -65.48 -43C-65.48 -43 -75.62 -25.45 -74.84 -19.21L-74.84 -17.26C-74.84 -17.26 -82.25 -17.65 -83.81 -15.7C-83.81 -15.7 -84.98 -10.63 -86.15 -10.24C-86.15 -10.24 -88.88 -7.9 -86.93 -5.17C-86.93 -5.17 -88.88 -2.83 -88.49 1.07L-81.08 4.97C-81.08 4.97 -79.13 19.01 -68.6 24.08C-63.886 26.35 -60.8 19.79 -58.85 13.94C-58.85 13.94 -61.97 -6.73 -59.63 -11.02C-59.63 -11.02 -49.1 -20.77 -49.49 -24.28C-49.49 -24.28 -49.88 -41.83 -51.05 -42.61z"/>
+ </g>
+ <g style="fill: #f2b892">
+ <path d="M-51.5 -41.62C-52.48 -42.54 -59.86 -48.08 -65.56 -42C-65.56 -42 -75.44 -24.9 -74.68 -18.82L-74.68 -16.92C-74.68 -16.92 -81.9 -17.3 -83.42 -15.4C-83.42 -15.4 -84.56 -10.46 -85.7 -10.08C-85.7 -10.08 -88.36 -7.8 -86.46 -5.14C-86.46 -5.14 -88.36 -2.86 -87.98 0.94L-80.76 4.74C-80.76 4.74 -78.86 18.42 -68.6 23.36C-64.006 25.572 -61 19.18 -59.1 13.48C-59.1 13.48 -62.14 -6.66 -59.86 -10.84C-59.86 -10.84 -49.6 -20.34 -49.98 -23.76C-49.98 -23.76 -50.36 -40.86 -51.5 -41.62z"/>
+ </g>
+ <g style="fill: #f8dcc8">
+ <path d="M-51.95 -40.63C-52.82 -41.61 -60.09 -46.92 -65.64 -41C-65.64 -41 -75.26 -24.35 -74.52 -18.43L-74.52 -16.58C-74.52 -16.58 -81.55 -16.95 -83.03 -15.1C-83.03 -15.1 -84.14 -10.29 -85.25 -9.92C-85.25 -9.92 -87.84 -7.7 -85.99 -5.11C-85.99 -5.11 -87.84 -2.89 -87.47 0.81L-80.44 4.51C-80.44 4.51 -78.59 17.83 -68.6 22.64C-64.127 24.794 -61.2 18.57 -59.35 13.02C-59.35 13.02 -62.31 -6.59 -60.09 -10.66C-60.09 -10.66 -50.1 -19.91 -50.47 -23.24C-50.47 -23.24 -50.84 -39.89 -51.95 -40.63z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-59.6 12.46C-59.6 12.46 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.16 -40.68 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.86 -59.6 12.46z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-62.7 6.2C-62.7 6.2 -84.3 -4 -85.2 -4.8C-85.2 -4.8 -76.1 3.4 -75.3 3.4C-74.5 3.4 -62.7 6.2 -62.7 6.2z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-79.8 0C-79.8 0 -61.4 3.6 -61.4 8C-61.4 10.912 -61.643 24.331 -67 22.8C-75.4 20.4 -71.8 6 -79.8 0z"/>
+ </g>
+ <g style="fill: #99cc32">
+ <path d="M-71.4 3.8C-71.4 3.8 -62.422 5.274 -61.4 8C-60.8 9.6 -60.137 17.908 -65.6 19C-70.152 19.911 -72.382 9.69 -71.4 3.8z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M14.595 46.349C14.098 44.607 15.409 44.738 17.2 44.2C19.2 43.6 31.4 39.8 32.2 37.2C33 34.6 46.2 39 46.2 39C48 39.8 52.4 42.4 52.4 42.4C57.2 43.6 63.8 44 63.8 44C66.2 45 69.6 47.8 69.6 47.8C84.2 58 96.601 50.8 96.601 50.8C116.601 44.2 110.601 27 110.601 27C107.601 18 110.801 14.6 110.801 14.6C111.001 10.8 118.201 17.2 118.201 17.2C120.801 21.4 121.601 26.4 121.601 26.4C129.601 37.6 126.201 19.8 126.201 19.8C126.401 18.8 123.601 15.2 123.601 14C123.601 12.8 121.801 9.4 121.801 9.4C118.801 6 121.201 -1 121.201 -1C123.001 -14.8 120.801 -13 120.801 -13C119.601 -14.8 110.401 -4.8 110.401 -4.8C108.201 -1.4 102.201 0.2 102.201 0.2C99.401 2 96.001 0.6 96.001 0.6C93.401 0.2 87.801 7.2 87.801 7.2C90.601 7 93.001 11.4 95.401 11.6C97.801 11.8 99.601 9.2 101.201 8.6C102.801 8 105.601 13.8 105.601 13.8C106.001 16.4 100.401 21.2 100.401 21.2C100.001 25.8 98.401 24.2 98.401 24.2C95.401 23.6 94.201 27.4 93.201 32C92.201 36.6 88.001 37 88.001 37C86.401 44.4 85.2 41.4 85.2 41.4C85 35.8 79 41.6 79 41.6C77.8 43.6 73.2 41.4 73.2 41.4C66.4 39.4 68.8 37.4 68.8 37.4C70.6 35.2 81.8 37.4 81.8 37.4C84 35.8 76 31.8 76 31.8C75.4 30 76.4 25.6 76.4 25.6C77.6 22.4 84.4 16.8 84.4 16.8C93.801 15.6 91.001 14 91.001 14C84.801 8.8 79 16.4 79 16.4C76.8 22.6 59.4 37.6 59.4 37.6C54.6 41 57.2 34.2 53.2 37.6C49.2 41 28.6 32 28.6 32C17.038 30.807 14.306 46.549 10.777 43.429C10.777 43.429 16.195 51.949 14.595 46.349z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M209.401 -120C209.401 -120 183.801 -112 181.001 -93.2C181.001 -93.2 178.601 -70.4 199.001 -52.8C199.001 -52.8 199.401 -46.4 201.401 -43.2C201.401 -43.2 199.801 -38.4 218.601 -46L245.801 -54.4C245.801 -54.4 252.201 -56.8 257.401 -65.6C262.601 -74.4 277.801 -93.2 274.201 -118.4C274.201 -118.4 275.401 -129.6 269.401 -130C269.401 -130 261.001 -131.6 253.801 -124C253.801 -124 247.001 -120.8 244.601 -121.2L209.401 -120z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M264.022 -120.99C264.022 -120.99 266.122 -129.92 261.282 -125.08C261.282 -125.08 254.242 -119.36 246.761 -119.36C246.761 -119.36 232.241 -117.16 227.841 -103.96C227.841 -103.96 223.881 -77.12 231.801 -71.4C231.801 -71.4 236.641 -63.92 243.681 -70.52C250.722 -77.12 266.222 -107.35 264.022 -120.99z"/>
+ </g>
+ <g style="fill: #323232">
+ <path d="M263.648 -120.632C263.648 -120.632 265.738 -129.376 260.986 -124.624C260.986 -124.624 254.074 -119.008 246.729 -119.008C246.729 -119.008 232.473 -116.848 228.153 -103.888C228.153 -103.888 224.265 -77.536 232.041 -71.92C232.041 -71.92 236.793 -64.576 243.705 -71.056C250.618 -77.536 265.808 -107.24 263.648 -120.632z"/>
+ </g>
+ <g style="fill: #666666">
+ <path d="M263.274 -120.274C263.274 -120.274 265.354 -128.832 260.69 -124.168C260.69 -124.168 253.906 -118.656 246.697 -118.656C246.697 -118.656 232.705 -116.536 228.465 -103.816C228.465 -103.816 224.649 -77.952 232.281 -72.44C232.281 -72.44 236.945 -65.232 243.729 -71.592C250.514 -77.952 265.394 -107.13 263.274 -120.274z"/>
+ </g>
+ <g style="fill: #999999">
+ <path d="M262.9 -119.916C262.9 -119.916 264.97 -128.288 260.394 -123.712C260.394 -123.712 253.738 -118.304 246.665 -118.304C246.665 -118.304 232.937 -116.224 228.777 -103.744C228.777 -103.744 225.033 -78.368 232.521 -72.96C232.521 -72.96 237.097 -65.888 243.753 -72.128C250.41 -78.368 264.98 -107.02 262.9 -119.916z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M262.526 -119.558C262.526 -119.558 264.586 -127.744 260.098 -123.256C260.098 -123.256 253.569 -117.952 246.633 -117.952C246.633 -117.952 233.169 -115.912 229.089 -103.672C229.089 -103.672 225.417 -78.784 232.761 -73.48C232.761 -73.48 237.249 -66.544 243.777 -72.664C250.305 -78.784 264.566 -106.91 262.526 -119.558z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M262.151 -119.2C262.151 -119.2 264.201 -127.2 259.801 -122.8C259.801 -122.8 253.401 -117.6 246.601 -117.6C246.601 -117.6 233.401 -115.6 229.401 -103.6C229.401 -103.6 225.801 -79.2 233.001 -74C233.001 -74 237.401 -67.2 243.801 -73.2C250.201 -79.2 264.151 -106.8 262.151 -119.2z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M50.6 84C50.6 84 30.2 64.8 22.2 64C22.2 64 -12.2 60 -27 78C-27 78 -9.4 57.6 18.2 63.2C18.2 63.2 -3.4 58.8 -15.8 62C-15.8 62 -32.6 62 -42.2 76L-45 80.8C-45 80.8 -41 66 -22.6 60C-22.6 60 0.2 55.2 11 60C11 60 -10.6 53.2 -20.6 55.2C-20.6 55.2 -51 52.8 -63.8 79.2C-63.8 79.2 -59.8 64.8 -45 57.6C-45 57.6 -31.4 48.8 -11 51.6C-11 51.6 3.4 54.8 8.6 57.2C13.8 59.6 12.6 56.8 4.2 52C4.2 52 -1.4 42 -15.4 42.4C-15.4 42.4 -58.2 46 -68.6 58C-68.6 58 -55 46.8 -44.6 44C-44.6 44 -22.2 36 -13.8 36.8C-13.8 36.8 11 37.8 18.6 33.8C18.6 33.8 7.4 38.8 10.6 42C13.8 45.2 20.6 52.8 20.6 54C20.6 55.2 44.8 77.3 48.4 81.7L50.6 84z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M189 278C189 278 173.5 241.5 161 232C161 232 187 248 190.5 266C190.5 266 190.5 276 189 278z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M236 285.5C236 285.5 209.5 230.5 191 206.5C191 206.5 234.5 244 239.5 270.5L240 276L237 273.5C237 273.5 236.5 282.5 236 285.5z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M292.5 237C292.5 237 230 177.5 228.5 175C228.5 175 289 241 292 248.5C292 248.5 290 239.5 292.5 237z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M104 280.5C104 280.5 123.5 228.5 142.5 251C142.5 251 157.5 261 157 264C157 264 153 257.5 135 258C135 258 116 255 104 280.5z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M294.5 153C294.5 153 249.5 124.5 242 123C230.193 120.639 291.5 152 296.5 162.5C296.5 162.5 298.5 160 294.5 153z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M143.801 259.601C143.801 259.601 164.201 257.601 171.001 250.801L175.401 254.401L193.001 216.001L196.601 221.201C196.601 221.201 211.001 206.401 210.201 198.401C209.401 190.401 223.001 204.401 223.001 204.401C223.001 204.401 222.201 192.801 229.401 199.601C229.401 199.601 227.001 184.001 235.401 192.001C235.401 192.001 224.864 161.844 247.401 187.601C253.001 194.001 248.601 187.201 248.601 187.201C248.601 187.201 222.601 139.201 244.201 153.601C244.201 153.601 246.201 130.801 245.001 126.401C243.801 122.001 241.801 99.6 237.001 94.4C232.201 89.2 237.401 87.6 243.001 92.8C243.001 92.8 231.801 68.8 245.001 80.8C245.001 80.8 241.401 65.6 237.001 62.8C237.001 62.8 231.401 45.6 246.601 56.4C246.601 56.4 242.201 44 239.001 40.8C239.001 40.8 227.401 13.2 234.601 18L239.001 21.6C239.001 21.6 232.201 7.6 238.601 12C245.001 16.4 245.001 16 245.001 16C245.001 16 223.801 -17.2 244.201 0.4C244.201 0.4 236.042 -13.518 232.601 -20.4C232.601 -20.4 213.801 -40.8 228.201 -34.4L233.001 -32.8C233.001 -32.8 224.201 -42.8 216.201 -44.4C208.201 -46 218.601 -52.4 225.001 -50.4C231.401 -48.4 247.001 -40.8 247.001 -40.8C247.001 -40.8 259.801 -22 263.801 -21.6C263.801 -21.6 243.801 -29.2 249.801 -21.2C249.801 -21.2 264.201 -7.2 257.001 -7.6C257.001 -7.6 251.001 -0.4 255.801 8.4C255.801 8.4 237.342 -9.991 252.201 15.6L259.001 32C259.001 32 234.601 7.2 245.801 29.2C245.801 29.2 263.001 52.8 265.001 53.2C267.001 53.6 271.401 62.4 271.401 62.4L267.001 60.4L272.201 69.2C272.201 69.2 261.001 57.2 267.001 70.4L272.601 84.8C272.601 84.8 252.201 62.8 265.801 92.4C265.801 92.4 249.401 87.2 258.201 104.4C258.201 104.4 256.601 120.401 257.001 125.601C257.401 130.801 258.601 159.201 254.201 167.201C249.801 175.201 260.201 194.401 262.201 198.401C264.201 202.401 267.801 213.201 259.001 204.001C250.201 194.801 254.601 200.401 256.601 209.201C258.601 218.001 264.601 233.601 263.801 239.201C263.801 239.201 262.601 240.401 259.401 236.801C259.401 236.801 244.601 214.001 246.201 228.401C246.201 228.401 245.001 236.401 241.801 245.201C241.801 245.201 238.601 256.001 238.601 247.201C238.601 247.201 235.401 230.401 232.601 238.001C229.801 245.601 226.201 251.601 223.401 254.001C220.601 256.401 215.401 233.601 214.201 244.001C214.201 244.001 202.201 231.601 197.401 248.001L185.801 264.401C185.801 264.401 185.401 252.001 184.201 258.001C184.201 258.001 154.201 264.001 143.801 259.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M109.401 -97.2C109.401 -97.2 97.801 -105.2 93.801 -104.8C89.801 -104.4 121.401 -113.6 162.601 -86C162.601 -86 167.401 -83.2 171.001 -83.6C171.001 -83.6 174.201 -81.2 171.401 -77.6C171.401 -77.6 162.601 -68 173.801 -56.8C173.801 -56.8 192.201 -50 186.601 -58.8C186.601 -58.8 197.401 -54.8 199.801 -50.8C202.201 -46.8 201.001 -50.8 201.001 -50.8C201.001 -50.8 194.601 -58 188.601 -63.2C188.601 -63.2 183.401 -65.2 180.601 -73.6C177.801 -82 175.401 -92 179.801 -95.2C179.801 -95.2 175.801 -90.8 176.601 -94.8C177.401 -98.8 181.001 -102.4 182.601 -102.8C184.201 -103.2 200.601 -119 207.401 -119.4C207.401 -119.4 198.201 -118 195.201 -119C192.201 -120 165.601 -131.4 159.601 -132.6C159.601 -132.6 142.801 -139.2 154.801 -137.2C154.801 -137.2 190.601 -133.4 208.801 -120.2C208.801 -120.2 201.601 -128.6 183.201 -135.6C183.201 -135.6 161.001 -148.2 125.801 -143.2C125.801 -143.2 108.001 -140 100.201 -138.2C100.201 -138.2 97.601 -138.8 97.001 -139.2C96.401 -139.6 84.6 -148.6 57 -141.6C57 -141.6 40 -137 31.4 -132.2C31.4 -132.2 16.2 -131 12.6 -127.8C12.6 -127.8 -6 -113.2 -8 -112.4C-10 -111.6 -21.4 -104 -22.2 -103.6C-22.2 -103.6 2.4 -110.2 4.8 -112.6C7.2 -115 24.6 -117.6 27 -116.2C29.4 -114.8 37.8 -115.4 28.2 -114.8C28.2 -114.8 103.801 -100 104.601 -98C105.401 -96 109.401 -97.2 109.401 -97.2z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M180.801 -106.4C180.801 -106.4 170.601 -113.8 168.601 -113.8C166.601 -113.8 154.201 -124 150.001 -123.6C145.801 -123.2 133.601 -133.2 106.201 -125C106.201 -125 105.601 -127 109.201 -127.8C109.201 -127.8 115.601 -130 116.001 -130.6C116.001 -130.6 136.201 -134.8 143.401 -131.2C143.401 -131.2 152.601 -128.6 158.801 -122.4C158.801 -122.4 170.001 -119.2 173.201 -120.2C173.201 -120.2 182.001 -118 182.401 -116.2C182.401 -116.2 188.201 -113.2 186.401 -110.6C186.401 -110.6 186.801 -109 180.801 -106.4z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M168.33 -108.509C169.137 -107.877 170.156 -107.779 170.761 -106.97C170.995 -106.656 170.706 -106.33 170.391 -106.233C169.348 -105.916 168.292 -106.486 167.15 -105.898C166.748 -105.691 166.106 -105.873 165.553 -106.022C163.921 -106.463 162.092 -106.488 160.401 -105.8C158.416 -106.929 156.056 -106.345 153.975 -107.346C153.917 -107.373 153.695 -107.027 153.621 -107.054C150.575 -108.199 146.832 -107.916 144.401 -110.2C141.973 -110.612 139.616 -111.074 137.188 -111.754C135.37 -112.263 133.961 -113.252 132.341 -114.084C130.964 -114.792 129.507 -115.314 127.973 -115.686C126.11 -116.138 124.279 -116.026 122.386 -116.546C122.293 -116.571 122.101 -116.227 122.019 -116.254C121.695 -116.362 121.405 -116.945 121.234 -116.892C119.553 -116.37 118.065 -117.342 116.401 -117C115.223 -118.224 113.495 -117.979 111.949 -118.421C108.985 -119.269 105.831 -117.999 102.801 -119C106.914 -120.842 111.601 -119.61 115.663 -121.679C117.991 -122.865 120.653 -121.763 123.223 -122.523C123.71 -122.667 124.401 -122.869 124.801 -122.2C124.935 -122.335 125.117 -122.574 125.175 -122.546C127.625 -121.389 129.94 -120.115 132.422 -119.049C132.763 -118.903 133.295 -119.135 133.547 -118.933C135.067 -117.717 137.01 -117.82 138.401 -116.6C140.099 -117.102 141.892 -116.722 143.621 -117.346C143.698 -117.373 143.932 -117.032 143.965 -117.054C145.095 -117.802 146.25 -117.531 147.142 -117.227C147.48 -117.112 148.143 -116.865 148.448 -116.791C149.574 -116.515 150.43 -116.035 151.609 -115.852C151.723 -115.834 151.908 -116.174 151.98 -116.146C153.103 -115.708 154.145 -115.764 154.801 -114.6C154.936 -114.735 155.101 -114.973 155.183 -114.946C156.21 -114.608 156.859 -113.853 157.96 -113.612C158.445 -113.506 159.057 -112.88 159.633 -112.704C162.025 -111.973 163.868 -110.444 166.062 -109.549C166.821 -109.239 167.697 -109.005 168.33 -108.509z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M91.696 -122.739C89.178 -124.464 86.81 -125.57 84.368 -127.356C84.187 -127.489 83.827 -127.319 83.625 -127.441C82.618 -128.05 81.73 -128.631 80.748 -129.327C80.209 -129.709 79.388 -129.698 78.88 -129.956C76.336 -131.248 73.707 -131.806 71.2 -133C71.882 -133.638 73.004 -133.394 73.6 -134.2C73.795 -133.92 74.033 -133.636 74.386 -133.827C76.064 -134.731 77.914 -134.884 79.59 -134.794C81.294 -134.702 83.014 -134.397 84.789 -134.125C85.096 -134.078 85.295 -133.555 85.618 -133.458C87.846 -132.795 90.235 -133.32 92.354 -132.482C93.945 -131.853 95.515 -131.03 96.754 -129.755C97.006 -129.495 96.681 -129.194 96.401 -129C96.789 -129.109 97.062 -128.903 97.173 -128.59C97.257 -128.351 97.257 -128.049 97.173 -127.81C97.061 -127.498 96.782 -127.397 96.408 -127.346C95.001 -127.156 96.773 -128.536 96.073 -128.088C94.8 -127.274 95.546 -125.868 94.801 -124.6C94.521 -124.794 94.291 -125.012 94.401 -125.4C94.635 -124.878 94.033 -124.588 93.865 -124.272C93.48 -123.547 92.581 -122.132 91.696 -122.739z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M59.198 -115.391C56.044 -116.185 52.994 -116.07 49.978 -117.346C49.911 -117.374 49.688 -117.027 49.624 -117.054C48.258 -117.648 47.34 -118.614 46.264 -119.66C45.351 -120.548 43.693 -120.161 42.419 -120.648C42.095 -120.772 41.892 -121.284 41.591 -121.323C40.372 -121.48 39.445 -122.429 38.4 -123C40.736 -123.795 43.147 -123.764 45.609 -124.148C45.722 -124.166 45.867 -123.845 46 -123.845C46.136 -123.845 46.266 -124.066 46.4 -124.2C46.595 -123.92 46.897 -123.594 47.154 -123.848C47.702 -124.388 48.258 -124.198 48.798 -124.158C48.942 -124.148 49.067 -123.845 49.2 -123.845C49.336 -123.845 49.467 -124.156 49.6 -124.156C49.736 -124.155 49.867 -123.845 50 -123.845C50.136 -123.845 50.266 -124.066 50.4 -124.2C51.092 -123.418 51.977 -123.972 52.799 -123.793C53.837 -123.566 54.104 -122.418 55.178 -122.12C59.893 -120.816 64.03 -118.671 68.393 -116.584C68.7 -116.437 68.91 -116.189 68.8 -115.8C69.067 -115.8 69.38 -115.888 69.57 -115.756C70.628 -115.024 71.669 -114.476 72.366 -113.378C72.582 -113.039 72.253 -112.632 72.02 -112.684C67.591 -113.679 63.585 -114.287 59.198 -115.391z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M45.338 -71.179C43.746 -72.398 43.162 -74.429 42.034 -76.221C41.82 -76.561 42.094 -76.875 42.411 -76.964C42.971 -77.123 43.514 -76.645 43.923 -76.443C45.668 -75.581 47.203 -74.339 49.2 -74.2C51.19 -71.966 55.45 -71.581 55.457 -68.2C55.458 -67.341 54.03 -68.259 53.6 -67.4C51.149 -68.403 48.76 -68.3 46.38 -69.767C45.763 -70.148 46.093 -70.601 45.338 -71.179z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M17.8 -123.756C17.935 -123.755 24.966 -123.522 24.949 -123.408C24.904 -123.099 17.174 -122.05 16.81 -122.22C16.646 -122.296 9.134 -119.866 9 -120C9.268 -120.135 17.534 -123.756 17.8 -123.756z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M33.2 -114C33.2 -114 18.4 -112.2 14 -111C9.6 -109.8 -9 -102.2 -12 -100.2C-12 -100.2 -25.4 -94.8 -42.4 -74.8C-42.4 -74.8 -34.8 -78.2 -32.6 -81C-32.6 -81 -19 -93.6 -19.2 -91C-19.2 -91 -7 -99.6 -7.6 -97.4C-7.6 -97.4 16.8 -108.6 14.8 -105.4C14.8 -105.4 36.4 -110 35.4 -108C35.4 -108 54.2 -103.6 51.4 -103.4C51.4 -103.4 45.6 -102.2 52 -98.6C52 -98.6 48.6 -94.2 43.2 -98.2C37.8 -102.2 40.8 -100 35.8 -99C35.8 -99 33.2 -98.2 28.6 -102.2C28.6 -102.2 23 -106.8 14.2 -103.2C14.2 -103.2 -16.4 -90.6 -18.4 -90C-18.4 -90 -22 -87.2 -24.4 -83.6C-24.4 -83.6 -30.2 -79.2 -33.2 -77.8C-33.2 -77.8 -46 -66.2 -47.2 -64.8C-47.2 -64.8 -50.6 -59.6 -51.4 -59.2C-51.4 -59.2 -45 -63 -43 -65C-43 -65 -29 -75 -23.6 -75.8C-23.6 -75.8 -19.2 -78.8 -18.4 -80.2C-18.4 -80.2 -4 -89.4 0.2 -89.4C0.2 -89.4 9.4 -84.2 11.8 -91.2C11.8 -91.2 17.6 -93 23.2 -91.8C23.2 -91.8 26.4 -94.4 25.6 -96.6C25.6 -96.6 27.2 -98.4 28.2 -94.6C28.2 -94.6 31.6 -91 36.4 -93C36.4 -93 40.4 -93.2 38.4 -90.8C38.4 -90.8 34 -87 22.2 -86.8C22.2 -86.8 9.8 -86.2 -6.6 -78.6C-6.6 -78.6 -36.4 -68.2 -45.6 -57.8C-45.6 -57.8 -52 -49 -57.4 -47.8C-57.4 -47.8 -63.2 -47 -69.2 -39.6C-69.2 -39.6 -59.4 -45.4 -50.4 -45.4C-50.4 -45.4 -46.4 -47.8 -50.2 -44.2C-50.2 -44.2 -53.8 -36.6 -52.2 -31.2C-52.2 -31.2 -52.8 -26 -53.6 -24.4C-53.6 -24.4 -61.4 -11.6 -61.4 -9.2C-61.4 -6.8 -60.2 3 -59.8 3.6C-59.4 4.2 -60.8 2 -57 4.4C-53.2 6.8 -50.4 8.4 -49.6 11.2C-48.8 14 -51.6 5.8 -51.8 4C-52 2.2 -56.2 -5 -55.4 -7.4C-55.4 -7.4 -54.4 -6.4 -53.6 -5C-53.6 -5 -54.2 -5.6 -53.6 -9.2C-53.6 -9.2 -52.8 -14.4 -51.4 -17.6C-50 -20.8 -48 -24.6 -47.6 -25.4C-47.2 -26.2 -47.2 -32 -45.8 -29.4L-42.4 -26.8C-42.4 -26.8 -45.2 -29.4 -43 -31.6C-43 -31.6 -44 -37.2 -42.2 -39.8C-42.2 -39.8 -35.2 -48.2 -33.6 -49.2C-32 -50.2 -33.4 -49.8 -33.4 -49.8C-33.4 -49.8 -27.4 -54 -33.2 -52.4C-33.2 -52.4 -37.2 -50.8 -40.2 -50.8C-40.2 -50.8 -47.8 -48.8 -43.8 -53C-39.8 -57.2 -29.8 -62.6 -26 -62.4L-25.2 -60.8L-14 -63.2L-15.2 -62.4C-15.2 -62.4 -15.4 -62.6 -11.2 -63C-7 -63.4 -1.2 -62 0.2 -63.8C1.6 -65.6 5 -66.6 4.6 -65.2C4.2 -63.8 4 -61.8 4 -61.8C4 -61.8 9 -67.6 8.4 -65.4C7.8 -63.2 -0.4 -58 -1.8 -51.8L8.6 -60L12.2 -63C12.2 -63 15.8 -60.8 16 -62.4C16.2 -64 20.8 -69.8 22 -69.6C23.2 -69.4 25.2 -72.2 25 -69.6C24.8 -67 32.4 -61.6 32.4 -61.6C32.4 -61.6 35.6 -63.4 37 -62C38.4 -60.6 42.6 -81.8 42.6 -81.8L67.6 -92.4L111.201 -95.8L94.201 -102.6L33.2 -114z"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M51.4 85C51.4 85 36.4 68.2 28 65.6C28 65.6 14.6 58.8 -10 66.6"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M24.8 64.2C24.8 64.2 -0.4 56.2 -15.8 60.4C-15.8 60.4 -34.2 62.4 -42.6 76.2"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M21.2 63C21.2 63 4.2 55.8 -10.6 53.6C-10.6 53.6 -27.2 51 -43.8 58.2C-43.8 58.2 -56 64.2 -61.4 74.4"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M22.2 63.4C22.2 63.4 6.8 52.4 5.8 51C5.8 51 -1.2 40 -14.2 39.6C-14.2 39.6 -35.6 40.4 -52.8 48.4"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M20.895 54.407C22.437 55.87 49.4 84.8 49.4 84.8C84.6 121.401 56.6 87.2 56.6 87.2C49 82.4 39.8 63.6 39.8 63.6C38.6 60.8 53.8 70.8 53.8 70.8C57.8 71.6 71.4 90.8 71.4 90.8C64.6 88.4 69.4 95.6 69.4 95.6C72.2 97.6 92.601 113.201 92.601 113.201C96.201 117.201 100.201 118.801 100.201 118.801C114.201 113.601 107.801 126.801 107.801 126.801C110.201 133.601 115.801 122.001 115.801 122.001C127.001 105.2 110.601 107.601 110.601 107.601C80.6 110.401 73.8 94.4 73.8 94.4C71.4 92 80.2 94.4 80.2 94.4C88.601 96.4 73 82 73 82C75.4 82 84.6 88.8 84.6 88.8C95.001 98 97.001 96 97.001 96C115.001 87.2 125.401 94.8 125.401 94.8C127.401 96.4 121.801 103.2 123.401 108.401C125.001 113.601 129.801 126.001 129.801 126.001C127.401 127.601 127.801 138.401 127.801 138.401C144.601 161.601 135.001 159.601 135.001 159.601C119.401 159.201 134.201 166.801 134.201 166.801C137.401 168.801 146.201 176.001 146.201 176.001C143.401 174.801 141.801 180.001 141.801 180.001C146.601 184.001 143.801 188.801 143.801 188.801C137.801 190.001 136.601 194.001 136.601 194.001C143.401 202.001 133.401 202.401 133.401 202.401C137.001 206.801 132.201 218.801 132.201 218.801C127.401 218.801 121.001 224.401 121.001 224.401C123.401 229.201 113.001 234.801 113.001 234.801C104.601 236.401 107.401 243.201 107.401 243.201C99.401 249.201 97.001 265.201 97.001 265.201C96.201 275.601 93.801 278.801 99.001 276.801C104.201 274.801 103.401 262.401 103.401 262.401C98.601 246.801 141.401 230.801 141.401 230.801C145.401 229.201 146.201 224.001 146.201 224.001C148.201 224.401 157.001 232.001 157.001 232.001C164.601 243.201 165.001 234.001 165.001 234.001C166.201 230.401 164.601 224.401 164.601 224.401C170.601 202.801 156.601 196.401 156.601 196.401C146.601 162.801 160.601 171.201 160.601 171.201C163.401 176.801 174.201 182.001 174.201 182.001L177.801 179.601C176.201 174.801 184.601 168.801 184.601 168.801C187.401 175.201 193.401 167.201 193.401 167.201C197.001 142.801 209.401 157.201 209.401 157.201C213.401 158.401 214.601 151.601 214.601 151.601C218.201 141.201 214.601 127.601 214.601 127.601C218.201 127.201 227.801 133.201 227.801 133.201C230.601 129.601 221.401 112.801 225.401 115.201C229.401 117.601 233.801 119.201 233.801 119.201C234.601 117.201 224.601 104.801 224.601 104.801C220.201 102 215.001 81.6 215.001 81.6C222.201 85.2 212.201 70 212.201 70C212.201 66.8 218.201 55.6 218.201 55.6C217.401 48.8 218.201 49.2 218.201 49.2C221.001 50.4 229.001 52 222.201 45.6C215.401 39.2 223.001 34.4 223.001 34.4C227.401 31.6 213.801 32 213.801 32C208.601 27.6 209.001 23.6 209.001 23.6C217.001 25.6 202.601 11.2 200.201 7.6C197.801 4 207.401 -1.2 207.401 -1.2C220.601 -4.8 209.001 -8 209.001 -8C189.401 -7.6 200.201 -18.4 200.201 -18.4C206.201 -18 204.601 -20.4 204.601 -20.4C199.401 -21.6 189.801 -28 189.801 -28C185.801 -31.6 189.401 -30.8 189.401 -30.8C206.201 -29.6 177.401 -40.8 177.401 -40.8C185.401 -40.8 167.401 -51.2 167.401 -51.2C165.401 -52.8 162.201 -60.4 162.201 -60.4C156.201 -65.6 151.401 -72.4 151.401 -72.4C151.001 -76.8 146.201 -81.6 146.201 -81.6C134.601 -95.2 129.001 -94.8 129.001 -94.8C114.201 -98.4 109.001 -97.6 109.001 -97.6L56.2 -93.2C29.8 -80.4 37.6 -59.4 37.6 -59.4C44 -51 53.2 -54.8 53.2 -54.8C57.8 -61 69.4 -58.8 69.4 -58.8C89.801 -55.6 87.201 -59.2 87.201 -59.2C84.801 -63.8 68.6 -70 68.4 -70.6C68.2 -71.2 59.4 -74.6 59.4 -74.6C56.4 -75.8 52 -85 52 -85C48.8 -88.4 64.6 -82.6 64.6 -82.6C63.4 -81.6 70.8 -77.6 70.8 -77.6C88.201 -78.6 98.801 -67.8 98.801 -67.8C109.601 -51.2 109.801 -59.4 109.801 -59.4C112.601 -68.8 100.801 -90 100.801 -90C101.201 -92 109.401 -85.4 109.401 -85.4C110.801 -87.4 111.601 -81.6 111.601 -81.6C111.801 -79.2 115.601 -71.2 115.601 -71.2C118.401 -58.2 122.001 -65.6 122.001 -65.6L126.601 -56.2C128.001 -53.6 122.001 -46 122.001 -46C121.801 -43.2 122.601 -43.4 117.001 -35.8C111.401 -28.2 114.801 -23.8 114.801 -23.8C113.401 -17.2 122.201 -17.6 122.201 -17.6C124.801 -15.4 128.201 -15.4 128.201 -15.4C130.001 -13.4 132.401 -14 132.401 -14C134.001 -17.8 140.201 -15.8 140.201 -15.8C141.601 -18.2 149.801 -18.6 149.801 -18.6C150.801 -21.2 151.201 -22.8 154.601 -23.4C158.001 -24 133.401 -67 133.401 -67C139.801 -67.8 131.601 -80.2 131.601 -80.2C129.401 -86.8 140.801 -72.2 143.001 -70.8C145.201 -69.4 146.201 -67.2 144.601 -67.4C143.001 -67.6 141.201 -65.4 142.601 -65.2C144.001 -65 157.001 -50 160.401 -39.8C163.801 -29.6 169.801 -25.6 176.001 -19.6C182.201 -13.6 181.401 10.6 181.401 10.6C181.001 19.4 187.001 30 187.001 30C189.001 33.8 184.801 52 184.801 52C182.801 54.2 184.201 55 184.201 55C185.201 56.2 192.001 69.4 192.001 69.4C190.201 69.2 193.801 72.8 193.801 72.8C199.001 78.8 192.601 75.8 192.601 75.8C186.601 74.2 193.601 84 193.601 84C194.801 85.8 185.801 81.2 185.801 81.2C176.601 80.6 188.201 87.8 188.201 87.8C196.801 95 185.401 90.6 185.401 90.6C180.801 88.8 184.001 95.6 184.001 95.6C187.201 97.2 204.401 104.2 204.401 104.2C204.801 108.001 201.801 113.001 201.801 113.001C202.201 117.001 200.001 120.401 200.001 120.401C198.801 128.601 198.201 129.401 198.201 129.401C194.001 129.601 186.601 143.401 186.601 143.401C184.801 146.001 174.601 158.001 174.601 158.001C172.601 165.001 154.601 157.801 154.601 157.801C148.001 161.201 150.001 157.801 150.001 157.801C149.601 155.601 154.401 149.601 154.401 149.601C161.401 147.001 158.801 136.201 158.801 136.201C162.801 134.801 151.601 132.001 151.801 130.801C152.001 129.601 157.801 128.201 157.801 128.201C165.801 126.201 161.401 123.801 161.401 123.801C160.801 119.801 163.801 114.201 163.801 114.201C175.401 113.401 163.801 97.2 163.801 97.2C153.001 89.6 152.001 83.8 152.001 83.8C164.601 75.6 156.401 63.2 156.601 59.6C156.801 56 158.001 34.4 158.001 34.4C156.001 28.2 153.001 14.6 153.001 14.6C155.201 9.4 162.601 -3.2 162.601 -3.2C165.401 -7.4 174.201 -12.2 172.001 -15.2C169.801 -18.2 162.001 -16.4 162.001 -16.4C154.201 -17.8 154.801 -12.6 154.801 -12.6C153.201 -11.6 152.401 -6.6 152.401 -6.6C151.68 1.333 142.801 7.6 142.801 7.6C131.601 13.8 140.801 17.8 140.801 17.8C146.801 24.4 137.001 24.6 137.001 24.6C126.001 22.8 134.201 33 134.201 33C145.001 45.8 142.001 48.6 142.001 48.6C131.801 49.6 144.401 58.8 144.401 58.8C144.401 58.8 143.601 56.8 143.801 58.6C144.001 60.4 147.001 64.6 147.801 66.6C148.601 68.6 144.601 68.8 144.601 68.8C145.201 78.4 129.801 74.2 129.801 74.2C129.801 74.2 129.801 74.2 128.201 74.4C126.601 74.6 115.401 73.8 109.601 71.6C103.801 69.4 97.001 69.4 97.001 69.4C97.001 69.4 93.001 71.2 85.4 71C77.8 70.8 69.8 73.6 69.8 73.6C65.4 73.2 74 68.8 74.2 69C74.4 69.2 80 63.6 72 64.2C50.203 65.835 39.4 55.6 39.4 55.6C37.4 54.2 34.8 51.4 34.8 51.4C24.8 49.4 36.2 63.8 36.2 63.8C37.4 65.2 36 66.2 36 66.2C35.2 64.6 27.4 59.2 27.4 59.2C24.589 58.227 23.226 56.893 20.895 54.407z"/>
+ </g>
+ <g style="fill: #4c0000">
+ <path d="M-3 42.8C-3 42.8 8.6 48.4 11.2 51.2C13.8 54 27.8 65.4 27.8 65.4C27.8 65.4 22.4 63.4 19.8 61.6C17.2 59.8 6.4 51.6 6.4 51.6C6.4 51.6 2.6 45.6 -3 42.8z"/>
+ </g>
+ <g style="fill: #99cc32">
+ <path d="M-61.009 11.603C-60.672 11.455 -61.196 8.743 -61.4 8.2C-62.422 5.474 -71.4 4 -71.4 4C-71.627 5.365 -71.682 6.961 -71.576 8.599C-71.576 8.599 -66.708 14.118 -61.009 11.603z"/>
+ </g>
+ <g style="fill: #659900">
+ <path d="M-61.009 11.403C-61.458 11.561 -61.024 8.669 -61.2 8.2C-62.222 5.474 -71.4 3.9 -71.4 3.9C-71.627 5.265 -71.682 6.861 -71.576 8.499C-71.576 8.499 -67.308 13.618 -61.009 11.403z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-65.4 11.546C-66.025 11.546 -66.531 10.406 -66.531 9C-66.531 7.595 -66.025 6.455 -65.4 6.455C-64.775 6.455 -64.268 7.595 -64.268 9C-64.268 10.406 -64.775 11.546 -65.4 11.546z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-65.4 9z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-111 109.601C-111 109.601 -116.6 119.601 -91.8 113.601C-91.8 113.601 -77.8 112.401 -75.4 110.001C-74.2 110.801 -65.834 113.734 -63 114.401C-56.2 116.001 -47.8 106 -47.8 106C-47.8 106 -43.2 95.5 -40.4 95.5C-37.6 95.5 -40.8 97.1 -40.8 97.1C-40.8 97.1 -47.4 107.201 -47 108.801C-47 108.801 -52.2 128.801 -68.2 129.601C-68.2 129.601 -84.35 130.551 -83 136.401C-83 136.401 -74.2 134.001 -71.8 136.401C-71.8 136.401 -61 136.001 -69 142.401L-75.8 154.001C-75.8 154.001 -75.66 157.919 -85.8 154.401C-95.6 151.001 -105.9 138.101 -105.9 138.101C-105.9 138.101 -121.85 123.551 -111 109.601z"/>
+ </g>
+ <g style="fill: #e59999">
+ <path d="M-112.2 113.601C-112.2 113.601 -114.2 123.201 -77.4 112.801C-77.4 112.801 -73 112.801 -70.6 113.601C-68.2 114.401 -56.2 117.201 -54.2 116.001C-54.2 116.001 -61.4 129.601 -73 128.001C-73 128.001 -86.2 129.601 -85.8 134.401C-85.8 134.401 -81.8 141.601 -77 144.001C-77 144.001 -74.2 146.401 -74.6 149.601C-75 152.801 -77.8 154.401 -79.8 155.201C-81.8 156.001 -85 152.801 -86.6 152.801C-88.2 152.801 -96.6 146.401 -101 141.601C-105.4 136.801 -113.8 124.801 -113.4 122.001C-113 119.201 -112.2 113.601 -112.2 113.601z"/>
+ </g>
+ <g style="fill: #b26565">
+ <path d="M-109 131.051C-106.4 135.001 -103.2 139.201 -101 141.601C-96.6 146.401 -88.2 152.801 -86.6 152.801C-85 152.801 -81.8 156.001 -79.8 155.201C-77.8 154.401 -75 152.801 -74.6 149.601C-74.2 146.401 -77 144.001 -77 144.001C-80.066 142.468 -82.806 138.976 -84.385 136.653C-84.385 136.653 -84.2 139.201 -89.4 138.401C-94.6 137.601 -99.8 134.801 -101.4 131.601C-103 128.401 -105.4 126.001 -103.8 129.601C-102.2 133.201 -99.8 136.801 -98.2 137.201C-96.6 137.601 -97 138.801 -99.4 138.401C-101.8 138.001 -104.6 137.601 -109 132.401z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-111.6 110.001C-111.6 110.001 -109.8 96.4 -108.6 92.4C-108.6 92.4 -109.4 85.6 -107 81.4C-104.6 77.2 -102.6 71 -99.6 65.6C-96.6 60.2 -96.4 56.2 -92.4 54.6C-88.4 53 -82.4 44.4 -79.6 43.4C-76.8 42.4 -77 43.2 -77 43.2C-77 43.2 -70.2 28.4 -56.6 32.4C-56.6 32.4 -72.8 29.6 -57 20.2C-57 20.2 -61.8 21.3 -58.5 14.3C-56.299 9.632 -56.8 16.4 -67.8 28.2C-67.8 28.2 -72.8 36.8 -78 39.8C-83.2 42.8 -95.2 49.8 -96.4 53.6C-97.6 57.4 -100.8 63.2 -102.8 64.8C-104.8 66.4 -107.6 70.6 -108 74C-108 74 -109.2 78 -110.6 79.2C-112 80.4 -112.2 83.6 -112.2 85.6C-112.2 87.6 -114.2 90.4 -114 92.8C-114 92.8 -113.2 111.801 -113.6 113.801L-111.6 110.001z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-120.2 114.601C-120.2 114.601 -122.2 113.201 -126.6 119.201C-126.6 119.201 -119.3 152.201 -119.3 153.601C-119.3 153.601 -118.2 151.501 -119.5 144.301C-120.8 137.101 -121.7 124.401 -121.7 124.401L-120.2 114.601z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-98.6 54C-98.6 54 -116.2 57.2 -115.8 86.4L-116.6 111.201C-116.6 111.201 -117.8 85.6 -119 84C-120.2 82.4 -116.2 71.2 -119.4 77.2C-119.4 77.2 -133.4 91.2 -125.4 112.401C-125.4 112.401 -123.9 115.701 -126.9 111.101C-126.9 111.101 -131.5 98.5 -130.4 92.1C-130.4 92.1 -130.2 89.9 -128.3 87.1C-128.3 87.1 -119.7 75.4 -117 73.1C-117 73.1 -115.2 58.7 -99.8 53.5C-99.8 53.5 -94.1 51.2 -98.6 54z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M40.8 -12.2C41.46 -12.554 41.451 -13.524 42.031 -13.697C43.18 -14.041 43.344 -15.108 43.862 -15.892C44.735 -17.211 44.928 -18.744 45.51 -20.235C45.782 -20.935 45.809 -21.89 45.496 -22.55C44.322 -25.031 43.62 -27.48 42.178 -29.906C41.91 -30.356 41.648 -31.15 41.447 -31.748C40.984 -33.132 39.727 -34.123 38.867 -35.443C38.579 -35.884 39.104 -36.809 38.388 -36.893C37.491 -36.998 36.042 -37.578 35.809 -36.552C35.221 -33.965 36.232 -31.442 37.2 -29C36.418 -28.308 36.752 -27.387 36.904 -26.62C37.614 -23.014 36.416 -19.662 35.655 -16.188C35.632 -16.084 35.974 -15.886 35.946 -15.824C34.724 -13.138 33.272 -10.693 31.453 -8.312C30.695 -7.32 29.823 -6.404 29.326 -5.341C28.958 -4.554 28.55 -3.588 28.8 -2.6C25.365 0.18 23.115 4.025 20.504 7.871C20.042 8.551 20.333 9.76 20.884 10.029C21.697 10.427 22.653 9.403 23.123 8.557C23.512 7.859 23.865 7.209 24.356 6.566C24.489 6.391 24.31 5.972 24.445 5.851C27.078 3.504 28.747 0.568 31.2 -1.8C33.15 -2.129 34.687 -3.127 36.435 -4.14C36.743 -4.319 37.267 -4.07 37.557 -4.265C39.31 -5.442 39.308 -7.478 39.414 -9.388C39.464 -10.272 39.66 -11.589 40.8 -12.2z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M31.959 -16.666C32.083 -16.743 31.928 -17.166 32.037 -17.382C32.199 -17.706 32.602 -17.894 32.764 -18.218C32.873 -18.434 32.71 -18.814 32.846 -18.956C35.179 -21.403 35.436 -24.427 34.4 -27.4C35.424 -28.02 35.485 -29.282 35.06 -30.129C34.207 -31.829 34.014 -33.755 33.039 -35.298C32.237 -36.567 30.659 -37.811 29.288 -36.508C28.867 -36.108 28.546 -35.321 28.824 -34.609C28.888 -34.446 29.173 -34.3 29.146 -34.218C29.039 -33.894 28.493 -33.67 28.487 -33.398C28.457 -31.902 27.503 -30.391 28.133 -29.062C28.905 -27.433 29.724 -25.576 30.4 -23.8C29.166 -21.684 30.199 -19.235 28.446 -17.358C28.31 -17.212 28.319 -16.826 28.441 -16.624C28.733 -16.138 29.139 -15.732 29.625 -15.44C29.827 -15.319 30.175 -15.317 30.375 -15.441C30.953 -15.803 31.351 -16.29 31.959 -16.666z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M94.771 -26.977C96.16 -25.185 96.45 -22.39 94.401 -21C94.951 -17.691 98.302 -19.67 100.401 -20.2C100.292 -20.588 100.519 -20.932 100.802 -20.937C101.859 -20.952 102.539 -21.984 103.601 -21.8C104.035 -23.357 105.673 -24.059 106.317 -25.439C108.043 -29.134 107.452 -33.407 104.868 -36.653C104.666 -36.907 104.883 -37.424 104.759 -37.786C104.003 -39.997 101.935 -40.312 100.001 -41C98.824 -44.875 98.163 -48.906 96.401 -52.6C94.787 -52.85 94.089 -54.589 92.752 -55.309C91.419 -56.028 90.851 -54.449 90.892 -53.403C90.899 -53.198 91.351 -52.974 91.181 -52.609C91.105 -52.445 90.845 -52.334 90.845 -52.2C90.846 -52.065 91.067 -51.934 91.201 -51.8C90.283 -50.98 88.86 -50.503 88.565 -49.358C87.611 -45.648 90.184 -42.523 91.852 -39.322C92.443 -38.187 91.707 -36.916 90.947 -35.708C90.509 -35.013 90.617 -33.886 90.893 -33.03C91.645 -30.699 93.236 -28.96 94.771 -26.977z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M57.611 -8.591C56.124 -6.74 52.712 -4.171 55.629 -2.243C55.823 -2.114 56.193 -2.11 56.366 -2.244C58.387 -3.809 60.39 -4.712 62.826 -5.294C62.95 -5.323 63.224 -4.856 63.593 -5.017C65.206 -5.72 67.216 -5.662 68.4 -7C72.167 -6.776 75.732 -7.892 79.123 -9.2C80.284 -9.648 81.554 -10.207 82.755 -10.709C84.131 -11.285 85.335 -12.213 86.447 -13.354C86.58 -13.49 86.934 -13.4 87.201 -13.4C87.161 -14.263 88.123 -14.39 88.37 -15.012C88.462 -15.244 88.312 -15.64 88.445 -15.742C90.583 -17.372 91.503 -19.39 90.334 -21.767C90.049 -22.345 89.8 -22.963 89.234 -23.439C88.149 -24.35 87.047 -23.496 86 -23.8C85.841 -23.172 85.112 -23.344 84.726 -23.146C83.867 -22.707 82.534 -23.292 81.675 -22.854C80.313 -22.159 79.072 -21.99 77.65 -21.613C77.338 -21.531 76.56 -21.627 76.4 -21C76.266 -21.134 76.118 -21.368 76.012 -21.346C74.104 -20.95 72.844 -20.736 71.543 -19.044C71.44 -18.911 70.998 -19.09 70.839 -18.955C69.882 -18.147 69.477 -16.913 68.376 -16.241C68.175 -16.118 67.823 -16.286 67.629 -16.157C66.983 -15.726 66.616 -15.085 65.974 -14.638C65.645 -14.409 65.245 -14.734 65.277 -14.99C65.522 -16.937 66.175 -18.724 65.6 -20.6C67.677 -23.12 70.194 -25.069 72 -27.8C72.015 -29.966 72.707 -32.112 72.594 -34.189C72.584 -34.382 72.296 -35.115 72.17 -35.462C71.858 -36.316 72.764 -37.382 71.92 -38.106C70.516 -39.309 69.224 -38.433 68.4 -37C66.562 -36.61 64.496 -35.917 62.918 -37.151C61.911 -37.938 61.333 -38.844 60.534 -39.9C59.549 -41.202 59.884 -42.638 59.954 -44.202C59.96 -44.33 59.645 -44.466 59.645 -44.6C59.646 -44.735 59.866 -44.866 60 -45C59.294 -45.626 59.019 -46.684 58 -47C58.305 -48.092 57.629 -48.976 56.758 -49.278C54.763 -49.969 53.086 -48.057 51.194 -47.984C50.68 -47.965 50.213 -49.003 49.564 -49.328C49.132 -49.544 48.428 -49.577 48.066 -49.311C47.378 -48.807 46.789 -48.693 46.031 -48.488C44.414 -48.052 43.136 -46.958 41.656 -46.103C40.171 -45.246 39.216 -43.809 38.136 -42.489C37.195 -41.337 37.059 -38.923 38.479 -38.423C40.322 -37.773 41.626 -40.476 43.592 -40.15C43.904 -40.099 44.11 -39.788 44 -39.4C44.389 -39.291 44.607 -39.52 44.8 -39.8C45.658 -38.781 46.822 -38.444 47.76 -37.571C48.73 -36.667 50.476 -37.085 51.491 -36.088C53.02 -34.586 52.461 -31.905 54.4 -30.6C53.814 -29.287 53.207 -28.01 52.872 -26.583C52.59 -25.377 53.584 -24.18 54.795 -24.271C56.053 -24.365 56.315 -25.124 56.8 -26.2C57.067 -25.933 57.536 -25.636 57.495 -25.42C57.038 -23.033 56.011 -21.04 55.553 -18.609C55.494 -18.292 55.189 -18.09 54.8 -18.2C54.332 -14.051 50.28 -11.657 47.735 -8.492C47.332 -7.99 47.328 -6.741 47.737 -6.338C49.14 -4.951 51.1 -6.497 52.8 -7C53.013 -8.206 53.872 -9.148 55.204 -9.092C55.46 -9.082 55.695 -9.624 56.019 -9.754C56.367 -9.892 56.869 -9.668 57.155 -9.866C58.884 -11.061 60.292 -12.167 62.03 -13.356C62.222 -13.487 62.566 -13.328 62.782 -13.436C63.107 -13.598 63.294 -13.985 63.617 -14.17C63.965 -14.37 64.207 -14.08 64.4 -13.8C63.754 -13.451 63.75 -12.494 63.168 -12.292C62.393 -12.024 61.832 -11.511 61.158 -11.064C60.866 -10.871 60.207 -11.119 60.103 -10.94C59.505 -9.912 58.321 -9.474 57.611 -8.591z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M2.2 -58C2.2 -58 -7.038 -60.872 -18.2 -35.2C-18.2 -35.2 -20.6 -30 -23 -28C-25.4 -26 -36.6 -22.4 -38.6 -18.4L-49 -2.4C-49 -2.4 -34.2 -18.4 -31 -20.8C-31 -20.8 -23 -29.2 -26.2 -22.4C-26.2 -22.4 -40.2 -11.6 -39 -2.4C-39 -2.4 -44.6 12 -45.4 14C-45.4 14 -29.4 -18 -27 -19.2C-24.6 -20.4 -23.4 -20.4 -24.6 -16.8C-25.8 -13.2 -26.2 3.2 -29 5.2C-29 5.2 -21 -15.2 -21.8 -18.4C-21.8 -18.4 -18.6 -22 -16.2 -16.8L-17.4 -0.8L-13 11.2C-13 11.2 -15.4 0 -13.8 -15.6C-13.8 -15.6 -15.8 -26 -11.8 -20.4C-7.8 -14.8 1.8 -8.8 1.8 -4C1.8 -4 -3.4 -21.6 -12.6 -26.4L-16.6 -20.4L-17.8 -22.4C-17.8 -22.4 -21.4 -23.2 -17 -30C-12.6 -36.8 -13 -37.6 -13 -37.6C-13 -37.6 -6.6 -30.4 -5 -30.4C-5 -30.4 8.2 -38 9.4 -13.6C9.4 -13.6 16.2 -28 7 -34.8C7 -34.8 -7.8 -36.8 -6.6 -42L0.6 -54.4C4.2 -59.6 2.6 -56.8 2.6 -56.8z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-17.8 -41.6C-17.8 -41.6 -30.6 -41.6 -33.8 -36.4L-41 -26.8C-41 -26.8 -23.8 -36.8 -19.8 -38C-15.8 -39.2 -17.8 -41.6 -17.8 -41.6z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-57.8 -35.2C-57.8 -35.2 -59.8 -34 -60.2 -31.2C-60.6 -28.4 -63 -28 -62.2 -25.2C-61.4 -22.4 -59.4 -20 -59.4 -24C-59.4 -28 -57.8 -30 -57 -31.2C-56.2 -32.4 -54.6 -36.8 -57.8 -35.2z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-66.6 26C-66.6 26 -75 22 -78.2 18.4C-81.4 14.8 -80.948 19.966 -85.8 19.6C-91.647 19.159 -90.6 3.2 -90.6 3.2L-94.6 10.8C-94.6 10.8 -95.8 25.2 -87.8 22.8C-83.893 21.628 -82.6 23.2 -84.2 24C-85.8 24.8 -78.6 25.2 -81.4 26.8C-84.2 28.4 -69.8 23.2 -72.2 33.6L-66.6 26z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-79.2 40.4C-79.2 40.4 -94.6 44.8 -98.2 35.2C-98.2 35.2 -103 37.6 -100.8 40.6C-98.6 43.6 -97.4 44 -97.4 44C-97.4 44 -92 45.2 -92.6 46C-93.2 46.8 -95.6 50.2 -95.6 50.2C-95.6 50.2 -85.4 44.2 -79.2 40.4z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M149.201 118.601C148.774 120.735 147.103 121.536 145.201 122.201C143.284 121.243 140.686 118.137 138.801 120.201C138.327 119.721 137.548 119.661 137.204 118.999C136.739 118.101 137.011 117.055 136.669 116.257C136.124 114.985 135.415 113.619 135.601 112.201C137.407 111.489 138.002 109.583 137.528 107.82C137.459 107.563 137.03 107.366 137.23 107.017C137.416 106.694 137.734 106.467 138.001 106.2C137.866 106.335 137.721 106.568 137.61 106.548C137 106.442 137.124 105.805 137.254 105.418C137.839 103.672 139.853 103.408 141.201 104.6C141.457 104.035 141.966 104.229 142.401 104.2C142.351 103.621 142.759 103.094 142.957 102.674C143.475 101.576 145.104 102.682 145.901 102.07C146.977 101.245 148.04 100.546 149.118 101.149C150.927 102.162 152.636 103.374 153.835 105.115C154.41 105.949 154.65 107.23 154.592 108.188C154.554 108.835 153.173 108.483 152.83 109.412C152.185 111.16 154.016 111.679 154.772 113.017C154.97 113.366 154.706 113.67 154.391 113.768C153.98 113.896 153.196 113.707 153.334 114.16C154.306 117.353 151.55 118.031 149.201 118.601z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M139.6 138.201C139.593 136.463 137.992 134.707 139.201 133.001C139.336 133.135 139.467 133.356 139.601 133.356C139.736 133.356 139.867 133.135 140.001 133.001C141.496 135.217 145.148 136.145 145.006 138.991C144.984 139.438 143.897 140.356 144.801 141.001C142.988 142.349 142.933 144.719 142.001 146.601C140.763 146.315 139.551 145.952 138.401 145.401C138.753 143.915 138.636 142.231 139.456 140.911C139.89 140.213 139.603 139.134 139.6 138.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-26.6 129.201C-26.6 129.201 -43.458 139.337 -29.4 124.001C-20.6 114.401 -10.6 108.801 -10.6 108.801C-10.6 108.801 -0.2 104.4 3.4 103.2C7 102 22.2 96.8 25.4 96.4C28.6 96 38.2 92 45 96C51.8 100 59.8 104.4 59.8 104.4C59.8 104.4 43.4 96 39.8 98.4C36.2 100.8 29 100.4 23 103.6C23 103.6 8.2 108.001 5 110.001C1.8 112.001 -8.6 123.601 -10.2 122.801C-11.8 122.001 -9.8 121.601 -8.6 118.801C-7.4 116.001 -9.4 114.401 -17.4 120.801C-25.4 127.201 -26.6 129.201 -26.6 129.201z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-19.195 123.234C-19.195 123.234 -17.785 110.194 -9.307 111.859C-9.307 111.859 -1.081 107.689 1.641 105.721C1.641 105.721 9.78 104.019 11.09 103.402C29.569 94.702 44.288 99.221 44.835 98.101C45.381 96.982 65.006 104.099 68.615 108.185C69.006 108.628 58.384 102.588 48.686 100.697C40.413 99.083 18.811 100.944 7.905 106.48C4.932 107.989 -4.013 113.773 -6.544 113.662C-9.075 113.55 -19.195 123.234 -19.195 123.234z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-23 148.801C-23 148.801 -38.2 146.401 -21.4 144.801C-21.4 144.801 -3.4 142.801 0.6 137.601C0.6 137.601 14.2 128.401 17 128.001C19.8 127.601 49.8 120.401 50.2 118.001C50.6 115.601 56.2 115.601 57.8 116.401C59.4 117.201 58.6 118.401 55.8 119.201C53 120.001 21.8 136.401 15.4 137.601C9 138.801 -2.6 146.401 -7.4 147.601C-12.2 148.801 -23 148.801 -23 148.801z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-3.48 141.403C-3.48 141.403 -12.062 140.574 -3.461 139.755C-3.461 139.755 5.355 136.331 7.403 133.668C7.403 133.668 14.367 128.957 15.8 128.753C17.234 128.548 31.194 124.861 31.399 123.633C31.604 122.404 65.67 109.823 70.09 113.013C73.001 115.114 63.1 113.437 53.466 117.847C52.111 118.467 18.258 133.054 14.981 133.668C11.704 134.283 5.765 138.174 3.307 138.788C0.85 139.403 -3.48 141.403 -3.48 141.403z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-11.4 143.601C-11.4 143.601 -6.2 143.201 -7.4 144.801C-8.6 146.401 -11 145.601 -11 145.601L-11.4 143.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-18.6 145.201C-18.6 145.201 -13.4 144.801 -14.6 146.401C-15.8 148.001 -18.2 147.201 -18.2 147.201L-18.6 145.201z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-29 146.801C-29 146.801 -23.8 146.401 -25 148.001C-26.2 149.601 -28.6 148.801 -28.6 148.801L-29 146.801z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-36.6 147.601C-36.6 147.601 -31.4 147.201 -32.6 148.801C-33.8 150.401 -36.2 149.601 -36.2 149.601L-36.6 147.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M1.8 108.001C1.8 108.001 6.2 108.001 5 109.601C3.8 111.201 0.6 110.801 0.6 110.801L1.8 108.001z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-8.2 113.601C-8.2 113.601 -1.694 111.46 -4.2 114.801C-5.4 116.401 -7.8 115.601 -7.8 115.601L-8.2 113.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-19.4 118.401C-19.4 118.401 -14.2 118.001 -15.4 119.601C-16.6 121.201 -19 120.401 -19 120.401L-19.4 118.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-27 124.401C-27 124.401 -21.8 124.001 -23 125.601C-24.2 127.201 -26.6 126.401 -26.6 126.401L-27 124.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-33.8 129.201C-33.8 129.201 -28.6 128.801 -29.8 130.401C-31 132.001 -33.4 131.201 -33.4 131.201L-33.8 129.201z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M5.282 135.598C5.282 135.598 12.203 135.066 10.606 137.195C9.009 139.325 5.814 138.26 5.814 138.26L5.282 135.598z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M15.682 130.798C15.682 130.798 22.603 130.266 21.006 132.395C19.409 134.525 16.214 133.46 16.214 133.46L15.682 130.798z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M26.482 126.398C26.482 126.398 33.403 125.866 31.806 127.995C30.209 130.125 27.014 129.06 27.014 129.06L26.482 126.398z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M36.882 121.598C36.882 121.598 43.803 121.066 42.206 123.195C40.609 125.325 37.414 124.26 37.414 124.26L36.882 121.598z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M9.282 103.598C9.282 103.598 16.203 103.066 14.606 105.195C13.009 107.325 9.014 107.06 9.014 107.06L9.282 103.598z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M19.282 100.398C19.282 100.398 26.203 99.866 24.606 101.995C23.009 104.125 18.614 103.86 18.614 103.86L19.282 100.398z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-3.4 140.401C-3.4 140.401 1.8 140.001 0.6 141.601C-0.6 143.201 -3 142.401 -3 142.401L-3.4 140.401z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-76.6 41.2C-76.6 41.2 -81 50 -81.4 53.2C-81.4 53.2 -80.6 44.4 -79.4 42.4C-78.2 40.4 -76.6 41.2 -76.6 41.2z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-95 55.2C-95 55.2 -98.2 69.6 -97.8 72.4C-97.8 72.4 -99 60.8 -98.6 59.6C-98.2 58.4 -95 55.2 -95 55.2z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-74.2 -19.4L-74.4 -16.2L-76.6 -16C-76.6 -16 -62.4 -3.4 -61.8 4.2C-61.8 4.2 -61 -4 -74.2 -19.4z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-70.216 -18.135C-70.647 -18.551 -70.428 -19.296 -70.836 -19.556C-71.645 -20.072 -69.538 -20.129 -69.766 -20.845C-70.149 -22.051 -69.962 -22.072 -70.084 -23.348C-70.141 -23.946 -69.553 -25.486 -69.168 -25.926C-67.722 -27.578 -69.046 -30.51 -67.406 -32.061C-67.102 -32.35 -66.726 -32.902 -66.441 -33.32C-65.782 -34.283 -64.598 -34.771 -63.648 -35.599C-63.33 -35.875 -63.531 -36.702 -62.962 -36.61C-62.248 -36.495 -61.007 -36.625 -61.052 -35.784C-61.165 -33.664 -62.494 -31.944 -63.774 -30.276C-63.323 -29.572 -63.781 -28.937 -64.065 -28.38C-65.4 -25.76 -65.211 -22.919 -65.385 -20.079C-65.39 -19.994 -65.697 -19.916 -65.689 -19.863C-65.336 -17.528 -64.752 -15.329 -63.873 -13.1C-63.507 -12.17 -63.036 -11.275 -62.886 -10.348C-62.775 -9.662 -62.672 -8.829 -63.08 -8.124C-61.045 -5.234 -62.354 -2.583 -61.185 0.948C-60.978 1.573 -59.286 3.487 -59.749 3.326C-62.262 2.455 -62.374 2.057 -62.551 1.304C-62.697 0.681 -63.027 -0.696 -63.264 -1.298C-63.328 -1.462 -63.499 -3.346 -63.577 -3.468C-65.09 -5.85 -63.732 -5.674 -65.102 -8.032C-66.53 -8.712 -67.496 -9.816 -68.619 -10.978C-68.817 -11.182 -67.674 -11.906 -67.855 -12.119C-68.947 -13.408 -70.1 -14.175 -69.764 -15.668C-69.609 -16.358 -69.472 -17.415 -70.216 -18.135z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-73.8 -16.4C-73.8 -16.4 -73.4 -9.6 -71 -8C-68.6 -6.4 -69.8 -7.2 -73 -8.4C-76.2 -9.6 -75 -10.4 -75 -10.4C-75 -10.4 -77.8 -10 -75.4 -8C-73 -6 -69.4 -3.6 -71 -3.6C-72.6 -3.6 -80.2 -7.6 -80.2 -10.4C-80.2 -13.2 -81.2 -17.3 -81.2 -17.3C-81.2 -17.3 -80.1 -18.1 -75.3 -18C-75.3 -18 -73.9 -17.3 -73.8 -16.4z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-74.6 2.2C-74.6 2.2 -83.12 -0.591 -101.6 2.8C-101.6 2.8 -92.569 0.722 -73.8 3C-63.5 4.25 -74.6 2.2 -74.6 2.2z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-72.502 2.129C-72.502 2.129 -80.748 -1.389 -99.453 0.392C-99.453 0.392 -90.275 -0.897 -71.774 2.995C-61.62 5.131 -72.502 2.129 -72.502 2.129z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-70.714 2.222C-70.714 2.222 -78.676 -1.899 -97.461 -1.514C-97.461 -1.514 -88.213 -2.118 -70.052 3.14C-60.086 6.025 -70.714 2.222 -70.714 2.222z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-69.444 2.445C-69.444 2.445 -76.268 -1.862 -93.142 -2.96C-93.142 -2.96 -84.803 -2.79 -68.922 3.319C-60.206 6.672 -69.444 2.445 -69.444 2.445z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M45.84 12.961C45.84 12.961 44.91 13.605 45.124 12.424C45.339 11.243 73.547 -1.927 77.161 -1.677C77.161 -1.677 46.913 11.529 45.84 12.961z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M42.446 13.6C42.446 13.6 41.57 14.315 41.691 13.121C41.812 11.927 68.899 -3.418 72.521 -3.452C72.521 -3.452 43.404 12.089 42.446 13.6z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M39.16 14.975C39.16 14.975 38.332 15.747 38.374 14.547C38.416 13.348 58.233 -2.149 68.045 -4.023C68.045 -4.023 50.015 4.104 39.16 14.975z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M36.284 16.838C36.284 16.838 35.539 17.532 35.577 16.453C35.615 15.373 53.449 1.426 62.28 -0.26C62.28 -0.26 46.054 7.054 36.284 16.838z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M4.6 164.801C4.6 164.801 -10.6 162.401 6.2 160.801C6.2 160.801 24.2 158.801 28.2 153.601C28.2 153.601 41.8 144.401 44.6 144.001C47.4 143.601 63.8 140.001 64.2 137.601C64.6 135.201 70.6 132.801 72.2 133.601C73.8 134.401 73.8 143.601 71 144.401C68.2 145.201 49.4 152.401 43 153.601C36.6 154.801 25 162.401 20.2 163.601C15.4 164.801 4.6 164.801 4.6 164.801z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M77.6 127.401C77.6 127.401 74.6 129.001 73.4 131.601C73.4 131.601 67 142.201 52.8 145.401C52.8 145.401 29.8 154.401 22 156.401C22 156.401 8.6 161.401 1.2 160.601C1.2 160.601 -5.8 160.801 0.4 162.401C0.4 162.401 20.6 160.401 24 158.601C24 158.601 39.6 153.401 42.6 150.801C45.6 148.201 63.8 143.201 66 141.201C68.2 139.201 78 130.801 77.6 127.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M18.882 158.911C18.882 158.911 24.111 158.685 22.958 160.234C21.805 161.784 19.357 160.91 19.357 160.91L18.882 158.911z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M11.68 160.263C11.68 160.263 16.908 160.037 15.756 161.586C14.603 163.136 12.155 162.263 12.155 162.263L11.68 160.263z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M1.251 161.511C1.251 161.511 6.48 161.284 5.327 162.834C4.174 164.383 1.726 163.51 1.726 163.51L1.251 161.511z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-6.383 162.055C-6.383 162.055 -1.154 161.829 -2.307 163.378C-3.46 164.928 -5.908 164.054 -5.908 164.054L-6.383 162.055z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M35.415 151.513C35.415 151.513 42.375 151.212 40.84 153.274C39.306 155.336 36.047 154.174 36.047 154.174L35.415 151.513z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M45.73 147.088C45.73 147.088 51.689 143.787 51.155 148.849C50.885 151.405 46.362 149.749 46.362 149.749L45.73 147.088z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M54.862 144.274C54.862 144.274 62.021 140.573 60.287 146.035C59.509 148.485 55.493 146.935 55.493 146.935L54.862 144.274z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M64.376 139.449C64.376 139.449 68.735 134.548 69.801 141.21C70.207 143.748 65.008 142.11 65.008 142.11L64.376 139.449z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M26.834 155.997C26.834 155.997 32.062 155.77 30.91 157.32C29.757 158.869 27.308 157.996 27.308 157.996L26.834 155.997z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M62.434 34.603C62.434 34.603 61.708 35.268 61.707 34.197C61.707 33.127 79.191 19.863 88.034 18.479C88.034 18.479 71.935 25.208 62.434 34.603z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M65.4 98.4C65.4 98.4 87.401 120.801 96.601 124.401C96.601 124.401 105.801 135.601 101.801 161.601C101.801 161.601 98.601 169.201 95.401 148.401C95.401 148.401 98.601 123.201 87.401 139.201C87.401 139.201 79 129.301 85.4 129.601C85.4 129.601 88.601 131.601 89.001 130.001C89.401 128.401 81.4 114.801 64.2 100.4C47 86 65.4 98.4 65.4 98.4z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M7 137.201C7 137.201 6.8 135.401 8.6 136.201C10.4 137.001 104.601 143.201 136.201 167.201C136.201 167.201 91.001 144.001 7 137.201z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M17.4 132.801C17.4 132.801 17.2 131.001 19 131.801C20.8 132.601 157.401 131.601 181.001 164.001C181.001 164.001 159.001 138.801 17.4 132.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M29 128.801C29 128.801 28.8 127.001 30.6 127.801C32.4 128.601 205.801 115.601 229.401 148.001C229.401 148.001 219.801 122.401 29 128.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M39 124.001C39 124.001 38.8 122.201 40.6 123.001C42.4 123.801 164.601 85.2 188.201 117.601C188.201 117.601 174.801 93 39 124.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-19 146.801C-19 146.801 -19.2 145.001 -17.4 145.801C-15.6 146.601 2.2 148.801 4.2 187.601C4.2 187.601 -3 145.601 -19 146.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-27.8 148.401C-27.8 148.401 -28 146.601 -26.2 147.401C-24.4 148.201 -10.2 143.601 -13 182.401C-13 182.401 -11.8 147.201 -27.8 148.401z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-35.8 148.801C-35.8 148.801 -36 147.001 -34.2 147.801C-32.4 148.601 -17 149.201 -29.4 171.601C-29.4 171.601 -19.8 147.601 -35.8 148.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M11.526 104.465C11.526 104.465 11.082 106.464 12.631 105.247C28.699 92.622 61.141 33.72 116.826 28.086C116.826 28.086 78.518 15.976 11.526 104.465z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M22.726 102.665C22.726 102.665 21.363 101.472 23.231 100.847C25.099 100.222 137.541 27.72 176.826 35.686C176.826 35.686 149.719 28.176 22.726 102.665z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M1.885 108.767C1.885 108.767 1.376 110.366 3.087 109.39C12.062 104.27 15.677 47.059 59.254 45.804C59.254 45.804 26.843 31.09 1.885 108.767z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-18.038 119.793C-18.038 119.793 -19.115 121.079 -17.162 120.825C-6.916 119.493 14.489 78.222 58.928 83.301C58.928 83.301 26.962 68.955 -18.038 119.793z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-6.8 113.667C-6.8 113.667 -7.611 115.136 -5.742 114.511C4.057 111.237 17.141 66.625 61.729 63.078C61.729 63.078 27.603 55.135 -6.8 113.667z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-25.078 124.912C-25.078 124.912 -25.951 125.954 -24.369 125.748C-16.07 124.669 1.268 91.24 37.264 95.354C37.264 95.354 11.371 83.734 -25.078 124.912z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-32.677 130.821C-32.677 130.821 -33.682 131.866 -32.091 131.748C-27.923 131.439 2.715 98.36 21.183 113.862C21.183 113.862 9.168 95.139 -32.677 130.821z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M36.855 98.898C36.855 98.898 35.654 97.543 37.586 97.158C39.518 96.774 160.221 39.061 198.184 51.927C198.184 51.927 172.243 41.053 36.855 98.898z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M3.4 163.201C3.4 163.201 3.2 161.401 5 162.201C6.8 163.001 22.2 163.601 9.8 186.001C9.8 186.001 19.4 162.001 3.4 163.201z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M13.8 161.601C13.8 161.601 13.6 159.801 15.4 160.601C17.2 161.401 35 163.601 37 202.401C37 202.401 29.8 160.401 13.8 161.601z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M20.6 160.001C20.6 160.001 20.4 158.201 22.2 159.001C24 159.801 48.6 163.201 72.2 195.601C72.2 195.601 36.6 158.801 20.6 160.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M28.225 157.972C28.225 157.972 27.788 156.214 29.678 156.768C31.568 157.322 52.002 155.423 90.099 189.599C90.099 189.599 43.924 154.656 28.225 157.972z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M38.625 153.572C38.625 153.572 38.188 151.814 40.078 152.368C41.968 152.922 76.802 157.423 128.499 192.399C128.499 192.399 54.324 150.256 38.625 153.572z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-1.8 142.001C-1.8 142.001 -2 140.201 -0.2 141.001C1.6 141.801 55 144.401 85.4 171.201C85.4 171.201 50.499 146.426 -1.8 142.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-11.8 146.001C-11.8 146.001 -12 144.201 -10.2 145.001C-8.4 145.801 16.2 149.201 39.8 181.601C39.8 181.601 4.2 144.801 -11.8 146.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M49.503 148.962C49.503 148.962 48.938 147.241 50.864 147.655C52.79 148.068 87.86 150.004 141.981 181.098C141.981 181.098 64.317 146.704 49.503 148.962z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M57.903 146.562C57.903 146.562 57.338 144.841 59.264 145.255C61.19 145.668 96.26 147.604 150.381 178.698C150.381 178.698 73.317 143.904 57.903 146.562z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M67.503 141.562C67.503 141.562 66.938 139.841 68.864 140.255C70.79 140.668 113.86 145.004 203.582 179.298C203.582 179.298 82.917 138.904 67.503 141.562z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-43.8 148.401C-43.8 148.401 -38.6 148.001 -39.8 149.601C-41 151.201 -43.4 150.401 -43.4 150.401L-43.8 148.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-13 162.401C-13 162.401 -7.8 162.001 -9 163.601C-10.2 165.201 -12.6 164.401 -12.6 164.401L-13 162.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-21.8 162.001C-21.8 162.001 -16.6 161.601 -17.8 163.201C-19 164.801 -21.4 164.001 -21.4 164.001L-21.8 162.001z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-117.169 150.182C-117.169 150.182 -112.124 151.505 -113.782 152.624C-115.439 153.744 -117.446 152.202 -117.446 152.202L-117.169 150.182z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-115.169 140.582C-115.169 140.582 -110.124 141.905 -111.782 143.024C-113.439 144.144 -115.446 142.602 -115.446 142.602L-115.169 140.582z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-122.369 136.182C-122.369 136.182 -117.324 137.505 -118.982 138.624C-120.639 139.744 -122.646 138.202 -122.646 138.202L-122.369 136.182z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-42.6 211.201C-42.6 211.201 -44.2 211.201 -48.2 213.201C-50.2 213.201 -61.4 216.801 -67 226.801C-67 226.801 -54.6 217.201 -42.6 211.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M45.116 303.847C45.257 304.105 45.312 304.525 45.604 304.542C46.262 304.582 47.495 304.883 47.37 304.247C46.522 299.941 45.648 295.004 41.515 293.197C40.876 292.918 39.434 293.331 39.36 294.215C39.233 295.739 39.116 297.088 39.425 298.554C39.725 299.975 41.883 299.985 42.8 298.601C43.736 300.273 44.168 302.116 45.116 303.847z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M34.038 308.581C34.786 309.994 34.659 311.853 36.074 312.416C36.814 312.71 38.664 311.735 38.246 310.661C37.444 308.6 37.056 306.361 35.667 304.55C35.467 304.288 35.707 303.755 35.547 303.427C34.953 302.207 33.808 301.472 32.4 301.801C31.285 304.004 32.433 306.133 33.955 307.842C34.091 307.994 33.925 308.37 34.038 308.581z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-5.564 303.391C-5.672 303.014 -5.71 302.551 -5.545 302.23C-5.014 301.197 -4.221 300.075 -4.558 299.053C-4.906 297.997 -6.022 298.179 -6.672 298.748C-7.807 299.742 -7.856 301.568 -8.547 302.927C-8.743 303.313 -8.692 303.886 -9.133 304.277C-9.607 304.698 -10.047 306.222 -9.951 306.793C-9.898 307.106 -10.081 317.014 -9.859 316.751C-9.24 316.018 -6.19 306.284 -6.121 305.392C-6.064 304.661 -5.332 304.196 -5.564 303.391z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-31.202 296.599C-28.568 294.1 -25.778 291.139 -26.22 287.427C-26.336 286.451 -28.111 286.978 -28.298 287.824C-29.1 291.449 -31.139 294.11 -33.707 296.502C-35.903 298.549 -37.765 304.893 -38 305.401C-34.303 300.145 -32.046 297.399 -31.202 296.599z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-44.776 290.635C-44.253 290.265 -44.555 289.774 -44.338 289.442C-43.385 287.984 -42.084 286.738 -42.066 285C-42.063 284.723 -42.441 284.414 -42.776 284.638C-43.053 284.822 -43.395 284.952 -43.503 285.082C-45.533 287.531 -46.933 290.202 -48.376 293.014C-48.559 293.371 -49.703 297.862 -49.39 297.973C-49.151 298.058 -47.431 293.877 -47.221 293.763C-45.958 293.077 -45.946 291.462 -44.776 290.635z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-28.043 310.179C-27.599 309.31 -26.023 308.108 -26.136 307.219C-26.254 306.291 -25.786 304.848 -26.698 305.536C-27.955 306.484 -31.404 307.833 -31.674 313.641C-31.7 314.212 -28.726 311.519 -28.043 310.179z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-13.6 293.001C-13.2 292.333 -12.492 292.806 -12.033 292.543C-11.385 292.171 -10.774 291.613 -10.482 290.964C-9.512 288.815 -7.743 286.995 -7.6 284.601C-9.091 283.196 -9.77 285.236 -10.4 286.201C-11.723 284.554 -12.722 286.428 -14.022 286.947C-14.092 286.975 -14.305 286.628 -14.38 286.655C-15.557 287.095 -16.237 288.176 -17.235 288.957C-17.406 289.091 -17.811 288.911 -17.958 289.047C-18.61 289.65 -19.583 289.975 -19.863 290.657C-20.973 293.364 -24.113 295.459 -26 303.001C-25.619 303.91 -21.488 296.359 -21.001 295.661C-20.165 294.465 -20.047 297.322 -18.771 296.656C-18.72 296.629 -18.534 296.867 -18.4 297.001C-18.206 296.721 -17.988 296.492 -17.6 296.601C-17.6 296.201 -17.734 295.645 -17.533 295.486C-16.296 294.509 -16.38 293.441 -15.6 292.201C-15.142 292.99 -14.081 292.271 -13.6 293.001z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M46.2 347.401C46.2 347.401 53.6 327.001 49.2 315.801C49.2 315.801 60.6 337.401 56 348.601C56 348.601 55.6 338.201 51.6 333.201C51.6 333.201 47.6 346.001 46.2 347.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M31.4 344.801C31.4 344.801 36.8 336.001 28.8 317.601C28.8 317.601 28 338.001 21.2 349.001C21.2 349.001 35.4 328.801 31.4 344.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M21.4 342.801C21.4 342.801 21.2 322.801 21.6 319.801C21.6 319.801 17.8 336.401 7.6 346.001C7.6 346.001 22 334.001 21.4 342.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M11.8 310.801C11.8 310.801 17.8 324.401 7.8 342.801C7.8 342.801 14.2 330.601 9.4 323.601C9.4 323.601 12 320.201 11.8 310.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-7.4 342.401C-7.4 342.401 -8.4 326.801 -6.6 324.601C-6.6 324.601 -6.4 318.201 -6.8 317.201C-6.8 317.201 -2.8 311.001 -2.6 318.401C-2.6 318.401 -1.2 326.201 1.6 330.801C1.6 330.801 5.2 336.201 5 342.601C5 342.601 -5 312.401 -7.4 342.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-11 314.801C-11 314.801 -17.6 325.601 -19.4 344.601C-19.4 344.601 -20.8 338.401 -17 324.001C-17 324.001 -12.8 308.601 -11 314.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-32.8 334.601C-32.8 334.601 -27.8 329.201 -26.4 324.201C-26.4 324.201 -22.8 308.401 -29.2 317.001C-29.2 317.001 -29 325.001 -37.2 332.401C-37.2 332.401 -32.4 330.001 -32.8 334.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-38.6 329.601C-38.6 329.601 -35.2 312.201 -34.4 311.401C-34.4 311.401 -32.6 308.001 -35.4 311.201C-35.4 311.201 -44.2 330.401 -48.2 337.001C-48.2 337.001 -40.2 327.801 -38.6 329.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-44.4 313.001C-44.4 313.001 -32.8 290.601 -54.6 316.401C-54.6 316.401 -43.6 306.601 -44.4 313.001z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-59.8 298.401C-59.8 298.401 -55 279.601 -52.4 279.801C-52.4 279.801 -44.2 270.801 -50.8 281.401C-50.8 281.401 -56.8 291.001 -56.2 300.801C-56.2 300.801 -56.8 291.201 -59.8 298.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M270.5 287C270.5 287 258.5 277 256 273.5C256 273.5 269.5 292 269.5 299C269.5 299 272 291.5 270.5 287z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M276 265C276 265 255 250 251.5 242.5C251.5 242.5 278 272 278 276.5C278 276.5 278.5 267.5 276 265z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M293 111C293 111 281 103 279.5 105C279.5 105 290 111.5 292.5 120C292.5 120 291 111 293 111z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M301.5 191.5L284 179.5C284 179.5 303 196.5 303.5 200.5L301.5 191.5z"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M-89.25 169L-67.25 173.75"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M-39 331C-39 331 -39.5 327.5 -48.5 338"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M-33.5 336C-33.5 336 -31.5 329.5 -38 334"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M20.5 344.5C20.5 344.5 22 333.5 10.5 346.5"/>
+ </g>
+</g>
+</svg>
+
diff --git a/3rdparty/nanosvg/example/drawing.svg b/3rdparty/nanosvg/example/drawing.svg
new file mode 100644
index 00000000000..428a8e13d30
--- /dev/null
+++ b/3rdparty/nanosvg/example/drawing.svg
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1000"
+ height="1000"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="drawing.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="375"
+ inkscape:cy="520"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="751"
+ inkscape:window-height="578"
+ inkscape:window-x="0"
+ inkscape:window-y="22"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-52.362183)">
+ <path
+ style="fill:#ff5555;stroke:#000000;stroke-width:10.62107277px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 131.73911,422.01626 c 0,146.85769 43.82213,215.39128 201.5818,141.96244 157.75968,-73.42885 188.43518,-107.69564 354.95926,78.32409 166.5241,186.01973 210.34624,244.76282 162.1419,-122.3814 -48.20435,-367.1442 -4.38221,34.26679 -131.46641,-24.47627 C 591.87149,436.70204 732.10231,191.93923 543.66715,187.04398 355.23198,182.14871 574.34264,265.36807 534.90271,368.16845 495.4628,470.96883 355.23198,627.61702 311.40985,475.8641 267.58772,324.11115 193.09009,333.90166 131.73911,422.01626 z"
+ id="path2985"
+ inkscape:connector-curvature="0" />
+ <rect
+ style="fill:#00ffff;stroke:#000000;stroke-width:10.62107277px;"
+ id="rect2987"
+ width="390.01697"
+ height="200.70551"
+ x="228.14781"
+ y="539.50238" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#00ffff"
+ id="path3008"
+ sodipodi:cx="157.14285"
+ sodipodi:cy="168.57143"
+ sodipodi:rx="57.142857"
+ sodipodi:ry="88.571426"
+ d="m 214.28571,168.57143 a 57.142857,88.571426 0 1 1 -114.285714,0 57.142857,88.571426 0 1 1 114.285714,0 z"
+ transform="translate(188.57143,138.07647)" />
+ <rect
+ style="fill:#00ff00"
+ id="rect3010"
+ width="371.42856"
+ height="145.71428"
+ x="261.66104"
+ y="945.44141"
+ transform="matrix(0.948958,-0.31540248,0.31540248,0.948958,0,0)"
+ ry="51.42857" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#00ff00"
+ id="path3038"
+ sodipodi:cx="200"
+ sodipodi:cy="177.14285"
+ sodipodi:rx="54.285713"
+ sodipodi:ry="54.285713"
+ d="m 254.28571,177.14285 a 54.285713,54.285713 0 1 1 -108.57142,0 54.285713,54.285713 0 1 1 108.57142,0 z"
+ transform="translate(0,52.362183)" />
+ </g>
+</svg>
diff --git a/3rdparty/nanosvg/example/example1.c b/3rdparty/nanosvg/example/example1.c
new file mode 100644
index 00000000000..100831be0a2
--- /dev/null
+++ b/3rdparty/nanosvg/example/example1.c
@@ -0,0 +1,258 @@
+//
+// Copyright (c) 2013 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <stdio.h>
+#include <string.h>
+#include <float.h>
+#include <GLFW/glfw3.h>
+
+#define NANOSVG_IMPLEMENTATION
+#include "nanosvg.h"
+
+NSVGimage* g_image = NULL;
+
+static unsigned char bgColor[4] = {205,202,200,255};
+static unsigned char lineColor[4] = {0,160,192,255};
+
+static float distPtSeg(float x, float y, float px, float py, float qx, float qy)
+{
+ float pqx, pqy, dx, dy, d, t;
+ pqx = qx-px;
+ pqy = qy-py;
+ dx = x-px;
+ dy = y-py;
+ d = pqx*pqx + pqy*pqy;
+ t = pqx*dx + pqy*dy;
+ if (d > 0) t /= d;
+ if (t < 0) t = 0;
+ else if (t > 1) t = 1;
+ dx = px + t*pqx - x;
+ dy = py + t*pqy - y;
+ return dx*dx + dy*dy;
+}
+
+static void cubicBez(float x1, float y1, float x2, float y2,
+ float x3, float y3, float x4, float y4,
+ float tol, int level)
+{
+ float x12,y12,x23,y23,x34,y34,x123,y123,x234,y234,x1234,y1234;
+ float d;
+
+ if (level > 12) return;
+
+ x12 = (x1+x2)*0.5f;
+ y12 = (y1+y2)*0.5f;
+ x23 = (x2+x3)*0.5f;
+ y23 = (y2+y3)*0.5f;
+ x34 = (x3+x4)*0.5f;
+ y34 = (y3+y4)*0.5f;
+ x123 = (x12+x23)*0.5f;
+ y123 = (y12+y23)*0.5f;
+ x234 = (x23+x34)*0.5f;
+ y234 = (y23+y34)*0.5f;
+ x1234 = (x123+x234)*0.5f;
+ y1234 = (y123+y234)*0.5f;
+
+ d = distPtSeg(x1234, y1234, x1,y1, x4,y4);
+ if (d > tol*tol) {
+ cubicBez(x1,y1, x12,y12, x123,y123, x1234,y1234, tol, level+1);
+ cubicBez(x1234,y1234, x234,y234, x34,y34, x4,y4, tol, level+1);
+ } else {
+ glVertex2f(x4, y4);
+ }
+}
+
+void drawPath(float* pts, int npts, char closed, float tol)
+{
+ int i;
+ glBegin(GL_LINE_STRIP);
+ glColor4ubv(lineColor);
+ glVertex2f(pts[0], pts[1]);
+ for (i = 0; i < npts-1; i += 3) {
+ float* p = &pts[i*2];
+ cubicBez(p[0],p[1], p[2],p[3], p[4],p[5], p[6],p[7], tol, 0);
+ }
+ if (closed) {
+ glVertex2f(pts[0], pts[1]);
+ }
+ glEnd();
+}
+
+void drawControlPts(float* pts, int npts)
+{
+ int i;
+
+ // Control lines
+ glColor4ubv(lineColor);
+ glBegin(GL_LINES);
+ for (i = 0; i < npts-1; i += 3) {
+ float* p = &pts[i*2];
+ glVertex2f(p[0],p[1]);
+ glVertex2f(p[2],p[3]);
+ glVertex2f(p[4],p[5]);
+ glVertex2f(p[6],p[7]);
+ }
+ glEnd();
+
+ // Points
+ glPointSize(6.0f);
+ glColor4ubv(lineColor);
+
+ glBegin(GL_POINTS);
+ glVertex2f(pts[0],pts[1]);
+ for (i = 0; i < npts-1; i += 3) {
+ float* p = &pts[i*2];
+ glVertex2f(p[6],p[7]);
+ }
+ glEnd();
+
+ // Points
+ glPointSize(3.0f);
+
+ glBegin(GL_POINTS);
+ glColor4ubv(bgColor);
+ glVertex2f(pts[0],pts[1]);
+ for (i = 0; i < npts-1; i += 3) {
+ float* p = &pts[i*2];
+ glColor4ubv(lineColor);
+ glVertex2f(p[2],p[3]);
+ glVertex2f(p[4],p[5]);
+ glColor4ubv(bgColor);
+ glVertex2f(p[6],p[7]);
+ }
+ glEnd();
+}
+
+void drawframe(GLFWwindow* window)
+{
+ int width = 0, height = 0;
+ float view[4], cx, cy, hw, hh, aspect, px;
+ NSVGshape* shape;
+ NSVGpath* path;
+
+ glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
+ glfwGetFramebufferSize(window, &width, &height);
+
+ glViewport(0, 0, width, height);
+ glClearColor(220.0f/255.0f, 220.0f/255.0f, 220.0f/255.0f, 1.0f);
+ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glDisable(GL_TEXTURE_2D);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+
+ // Fit view to bounds
+ cx = g_image->width*0.5f;
+ cy = g_image->height*0.5f;
+ hw = g_image->width*0.5f;
+ hh = g_image->height*0.5f;
+
+ if (width/hw < height/hh) {
+ aspect = (float)height / (float)width;
+ view[0] = cx - hw * 1.2f;
+ view[2] = cx + hw * 1.2f;
+ view[1] = cy - hw * 1.2f * aspect;
+ view[3] = cy + hw * 1.2f * aspect;
+ } else {
+ aspect = (float)width / (float)height;
+ view[0] = cx - hh * 1.2f * aspect;
+ view[2] = cx + hh * 1.2f * aspect;
+ view[1] = cy - hh * 1.2f;
+ view[3] = cy + hh * 1.2f;
+ }
+ // Size of one pixel.
+ px = (view[2] - view[1]) / (float)width;
+
+ glOrtho(view[0], view[2], view[3], view[1], -1, 1);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glDisable(GL_DEPTH_TEST);
+ glColor4ub(255,255,255,255);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+
+ // Draw bounds
+ glColor4ub(0,0,0,64);
+ glBegin(GL_LINE_LOOP);
+ glVertex2f(0, 0);
+ glVertex2f(g_image->width, 0);
+ glVertex2f(g_image->width, g_image->height);
+ glVertex2f(0, g_image->height);
+ glEnd();
+
+ for (shape = g_image->shapes; shape != NULL; shape = shape->next) {
+ for (path = shape->paths; path != NULL; path = path->next) {
+ drawPath(path->pts, path->npts, path->closed, px * 1.5f);
+ drawControlPts(path->pts, path->npts);
+ }
+ }
+
+ glfwSwapBuffers(window);
+}
+
+void resizecb(GLFWwindow* window, int width, int height)
+{
+ // Update and render
+ NSVG_NOTUSED(width);
+ NSVG_NOTUSED(height);
+ drawframe(window);
+}
+
+int main()
+{
+ GLFWwindow* window;
+ const GLFWvidmode* mode;
+
+ if (!glfwInit())
+ return -1;
+
+ mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
+ window = glfwCreateWindow(mode->width - 40, mode->height - 80, "Nano SVG", NULL, NULL);
+ if (!window)
+ {
+ printf("Could not open window\n");
+ glfwTerminate();
+ return -1;
+ }
+
+ glfwSetFramebufferSizeCallback(window, resizecb);
+ glfwMakeContextCurrent(window);
+ glEnable(GL_POINT_SMOOTH);
+ glEnable(GL_LINE_SMOOTH);
+
+
+ g_image = nsvgParseFromFile("../example/nano.svg", "px", 96.0f);
+ if (g_image == NULL) {
+ printf("Could not open SVG image.\n");
+ glfwTerminate();
+ return -1;
+ }
+
+ while (!glfwWindowShouldClose(window))
+ {
+ drawframe(window);
+ glfwPollEvents();
+ }
+
+ nsvgDelete(g_image);
+
+ glfwTerminate();
+ return 0;
+}
diff --git a/3rdparty/nanosvg/example/example2.c b/3rdparty/nanosvg/example/example2.c
new file mode 100644
index 00000000000..50fe2a4e12b
--- /dev/null
+++ b/3rdparty/nanosvg/example/example2.c
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2013 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <stdio.h>
+#include <string.h>
+#include <float.h>
+#define STB_IMAGE_WRITE_IMPLEMENTATION
+#include "stb_image_write.h"
+#define NANOSVG_IMPLEMENTATION
+#include "nanosvg.h"
+#define NANOSVGRAST_IMPLEMENTATION
+#include "nanosvgrast.h"
+
+int main()
+{
+ NSVGimage *image = NULL;
+ NSVGrasterizer *rast = NULL;
+ unsigned char* img = NULL;
+ int w, h;
+ const char* filename = "../example/_test.svg";
+
+ printf("parsing %s\n", filename);
+ image = nsvgParseFromFile(filename, "px", 96.0f);
+ if (image == NULL) {
+ printf("Could not open SVG image.\n");
+ goto error;
+ }
+ w = (int)image->width;
+ h = (int)image->height;
+
+ rast = nsvgCreateRasterizer();
+ if (rast == NULL) {
+ printf("Could not init rasterizer.\n");
+ goto error;
+ }
+
+ img = malloc(w*h*4);
+ if (img == NULL) {
+ printf("Could not alloc image buffer.\n");
+ goto error;
+ }
+
+ printf("rasterizing image %d x %d\n", w, h);
+ nsvgRasterize(rast, image, 0,0,1, img, w, h, w*4);
+
+ printf("writing svg.png\n");
+ stbi_write_png("svg.png", w, h, 4, img, w*4);
+
+error:
+ nsvgDeleteRasterizer(rast);
+ nsvgDelete(image);
+
+ return 0;
+}
diff --git a/3rdparty/nanosvg/example/nano.svg b/3rdparty/nanosvg/example/nano.svg
new file mode 100644
index 00000000000..882830f8df7
--- /dev/null
+++ b/3rdparty/nanosvg/example/nano.svg
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="640px" height="480px" viewBox="0 0 640 480" enable-background="new 0 0 640 480" xml:space="preserve">
+<path d="M282.658,250.271c0,5.31-1.031,10.156-3.087,14.543c-2.059,4.387-4.984,8.152-8.774,11.293
+ c-3.793,3.144-8.477,5.58-14.055,7.312c-5.581,1.731-11.836,2.601-18.767,2.601c-9.968,0-18.605-1.572-25.917-4.713
+ s-13.299-6.986-17.955-11.536l13.812-15.111c4.116,3.684,8.584,6.499,13.405,8.449c4.819,1.95,9.993,2.925,15.518,2.925
+ c5.525,0,9.856-1.219,12.999-3.656c3.141-2.438,4.712-5.769,4.712-9.993c0-2.056-0.3-3.844-0.894-5.361
+ c-0.596-1.517-1.653-2.925-3.168-4.226c-1.518-1.3-3.549-2.519-6.093-3.655c-2.546-1.138-5.768-2.301-9.668-3.494
+ c-6.5-2.056-11.943-4.25-16.33-6.58c-4.387-2.328-7.937-4.9-10.643-7.719c-2.709-2.815-4.659-5.931-5.849-9.343
+ c-1.193-3.412-1.788-7.23-1.788-11.455c0-5.2,1.082-9.831,3.25-13.893c2.166-4.062,5.144-7.5,8.937-10.318
+ c3.791-2.815,8.178-4.956,13.162-6.418c4.981-1.462,10.343-2.193,16.086-2.193c8.449,0,15.842,1.247,22.179,3.737
+ c6.337,2.493,11.997,6.121,16.98,10.887l-12.674,14.624c-7.583-6.281-15.655-9.424-24.21-9.424c-4.875,0-8.721,0.95-11.537,2.844
+ c-2.818,1.896-4.225,4.578-4.225,8.043c0,1.843,0.297,3.412,0.894,4.712c0.594,1.3,1.65,2.519,3.168,3.656
+ c1.516,1.137,3.656,2.249,6.418,3.331c2.763,1.084,6.309,2.33,10.643,3.736c5.306,1.734,10.046,3.631,14.218,5.688
+ c4.169,2.06,7.662,4.524,10.48,7.394c2.815,2.871,4.981,6.174,6.5,9.911C281.898,240.603,282.658,245.071,282.658,250.271z
+ M335.953,260.833l20.637-90.181h27.46l-32.011,112.604h-33.634l-32.173-112.604h28.598l20.311,90.181H335.953z M437.832,286.019
+ c-16.357,0-28.896-5.01-37.615-15.03c-8.722-10.019-13.081-24.779-13.081-44.278c0-9.531,1.407-17.98,4.225-25.348
+ c2.815-7.366,6.688-13.54,11.618-18.524c4.928-4.981,10.668-8.747,17.223-11.293c6.555-2.544,13.568-3.818,21.043-3.818
+ c8.23,0,15.436,1.3,21.611,3.899c6.174,2.6,11.537,5.959,16.086,10.075l-14.137,14.624c-3.467-3.032-6.906-5.281-10.318-6.744
+ s-7.393-2.193-11.941-2.193c-4.01,0-7.693,0.731-11.051,2.193s-6.256,3.793-8.691,6.987c-2.438,3.196-4.334,7.287-5.688,12.268
+ c-1.355,4.984-2.031,10.996-2.031,18.037c0,7.367,0.486,13.567,1.463,18.604c0.975,5.037,2.408,9.1,4.305,12.187
+ c1.895,3.087,4.307,5.309,7.23,6.662c2.926,1.355,6.338,2.031,10.238,2.031c5.631,0,10.613-1.244,14.947-3.737v-25.186h-14.785
+ l-2.6-18.849h43.547v55.57c-5.85,3.793-12.297,6.718-19.336,8.774C453.051,284.987,445.631,286.019,437.832,286.019z M523.5,151.5
+ c0-6.627-5.373-12-12-12h-343c-6.627,0-12,5.373-12,12v150c0,6.627,5.373,12,12,12h343c6.627,0,12-5.373,12-12V151.5z"/>
+</svg>
diff --git a/3rdparty/nanosvg/example/screenshot-1.png b/3rdparty/nanosvg/example/screenshot-1.png
new file mode 100644
index 00000000000..f6526cfb47c
--- /dev/null
+++ b/3rdparty/nanosvg/example/screenshot-1.png
Binary files differ
diff --git a/3rdparty/nanosvg/example/screenshot-2.png b/3rdparty/nanosvg/example/screenshot-2.png
new file mode 100644
index 00000000000..a4641f8ea0b
--- /dev/null
+++ b/3rdparty/nanosvg/example/screenshot-2.png
Binary files differ
diff --git a/3rdparty/nanosvg/example/stb_image_write.h b/3rdparty/nanosvg/example/stb_image_write.h
new file mode 100644
index 00000000000..b9f7aaebc2c
--- /dev/null
+++ b/3rdparty/nanosvg/example/stb_image_write.h
@@ -0,0 +1,511 @@
+/* stbiw-0.92 - public domain - http://nothings.org/stb/stb_image_write.h
+ writes out PNG/BMP/TGA images to C stdio - Sean Barrett 2010
+ no warranty implied; use at your own risk
+
+
+Before including,
+
+ #define STB_IMAGE_WRITE_IMPLEMENTATION
+
+in the file that you want to have the implementation.
+
+
+ABOUT:
+
+ This header file is a library for writing images to C stdio. It could be
+ adapted to write to memory or a general streaming interface; let me know.
+
+ The PNG output is not optimal; it is 20-50% larger than the file
+ written by a decent optimizing implementation. This library is designed
+ for source code compactness and simplicitly, not optimal image file size
+ or run-time performance.
+
+USAGE:
+
+ There are three functions, one for each image file format:
+
+ int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);
+ int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);
+ int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);
+
+ Each function returns 0 on failure and non-0 on success.
+
+ The functions create an image file defined by the parameters. The image
+ is a rectangle of pixels stored from left-to-right, top-to-bottom.
+ Each pixel contains 'comp' channels of data stored interleaved with 8-bits
+ per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is
+ monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall.
+ The *data pointer points to the first byte of the top-left-most pixel.
+ For PNG, "stride_in_bytes" is the distance in bytes from the first byte of
+ a row of pixels to the first byte of the next row of pixels.
+
+ PNG creates output files with the same number of components as the input.
+ The BMP and TGA formats expand Y to RGB in the file format. BMP does not
+ output alpha.
+
+ PNG supports writing rectangles of data even when the bytes storing rows of
+ data are not consecutive in memory (e.g. sub-rectangles of a larger image),
+ by supplying the stride between the beginning of adjacent rows. The other
+ formats do not. (Thus you cannot write a native-format BMP through the BMP
+ writer, both because it is in BGR order and because it may have padding
+ at the end of the line.)
+*/
+
+#ifndef INCLUDE_STB_IMAGE_WRITE_H
+#define INCLUDE_STB_IMAGE_WRITE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);
+extern int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);
+extern int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif//INCLUDE_STB_IMAGE_WRITE_H
+
+#ifdef STB_IMAGE_WRITE_IMPLEMENTATION
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+typedef unsigned int stbiw_uint32;
+typedef int stb_image_write_test[sizeof(stbiw_uint32)==4 ? 1 : -1];
+
+static void writefv(FILE *f, const char *fmt, va_list v)
+{
+ while (*fmt) {
+ switch (*fmt++) {
+ case ' ': break;
+ case '1': { unsigned char x = (unsigned char) va_arg(v, int); fputc(x,f); break; }
+ case '2': { int x = va_arg(v,int); unsigned char b[2];
+ b[0] = (unsigned char) x; b[1] = (unsigned char) (x>>8);
+ fwrite(b,2,1,f); break; }
+ case '4': { stbiw_uint32 x = va_arg(v,int); unsigned char b[4];
+ b[0]=(unsigned char)x; b[1]=(unsigned char)(x>>8);
+ b[2]=(unsigned char)(x>>16); b[3]=(unsigned char)(x>>24);
+ fwrite(b,4,1,f); break; }
+ default:
+ assert(0);
+ return;
+ }
+ }
+}
+
+static void write3(FILE *f, unsigned char a, unsigned char b, unsigned char c)
+{
+ unsigned char arr[3];
+ arr[0] = a, arr[1] = b, arr[2] = c;
+ fwrite(arr, 3, 1, f);
+}
+
+static void write_pixels(FILE *f, int rgb_dir, int vdir, int x, int y, int comp, void *data, int write_alpha, int scanline_pad)
+{
+ unsigned char bg[3] = { 255, 0, 255}, px[3];
+ stbiw_uint32 zero = 0;
+ int i,j,k, j_end;
+
+ if (y <= 0)
+ return;
+
+ if (vdir < 0)
+ j_end = -1, j = y-1;
+ else
+ j_end = y, j = 0;
+
+ for (; j != j_end; j += vdir) {
+ for (i=0; i < x; ++i) {
+ unsigned char *d = (unsigned char *) data + (j*x+i)*comp;
+ if (write_alpha < 0)
+ fwrite(&d[comp-1], 1, 1, f);
+ switch (comp) {
+ case 1:
+ case 2: write3(f, d[0],d[0],d[0]);
+ break;
+ case 4:
+ if (!write_alpha) {
+ // composite against pink background
+ for (k=0; k < 3; ++k)
+ px[k] = bg[k] + ((d[k] - bg[k]) * d[3])/255;
+ write3(f, px[1-rgb_dir],px[1],px[1+rgb_dir]);
+ break;
+ }
+ /* FALLTHROUGH */
+ case 3:
+ write3(f, d[1-rgb_dir],d[1],d[1+rgb_dir]);
+ break;
+ }
+ if (write_alpha > 0)
+ fwrite(&d[comp-1], 1, 1, f);
+ }
+ fwrite(&zero,scanline_pad,1,f);
+ }
+}
+
+static int outfile(char const *filename, int rgb_dir, int vdir, int x, int y, int comp, void *data, int alpha, int pad, const char *fmt, ...)
+{
+ FILE *f;
+ if (y < 0 || x < 0) return 0;
+ f = fopen(filename, "wb");
+ if (f) {
+ va_list v;
+ va_start(v, fmt);
+ writefv(f, fmt, v);
+ va_end(v);
+ write_pixels(f,rgb_dir,vdir,x,y,comp,data,alpha,pad);
+ fclose(f);
+ }
+ return f != NULL;
+}
+
+int stbi_write_bmp(char const *filename, int x, int y, int comp, const void *data)
+{
+ int pad = (-x*3) & 3;
+ return outfile(filename,-1,-1,x,y,comp,(void *) data,0,pad,
+ "11 4 22 4" "4 44 22 444444",
+ 'B', 'M', 14+40+(x*3+pad)*y, 0,0, 14+40, // file header
+ 40, x,y, 1,24, 0,0,0,0,0,0); // bitmap header
+}
+
+int stbi_write_tga(char const *filename, int x, int y, int comp, const void *data)
+{
+ int has_alpha = !(comp & 1);
+ return outfile(filename, -1,-1, x, y, comp, (void *) data, has_alpha, 0,
+ "111 221 2222 11", 0,0,2, 0,0,0, 0,0,x,y, 24+8*has_alpha, 8*has_alpha);
+}
+
+// stretchy buffer; stbi__sbpush() == vector<>::push_back() -- stbi__sbcount() == vector<>::size()
+#define stbi__sbraw(a) ((int *) (a) - 2)
+#define stbi__sbm(a) stbi__sbraw(a)[0]
+#define stbi__sbn(a) stbi__sbraw(a)[1]
+
+#define stbi__sbneedgrow(a,n) ((a)==0 || stbi__sbn(a)+n >= stbi__sbm(a))
+#define stbi__sbmaybegrow(a,n) (stbi__sbneedgrow(a,(n)) ? stbi__sbgrow(a,n) : 0)
+#define stbi__sbgrow(a,n) stbi__sbgrowf((void **) &(a), (n), sizeof(*(a)))
+
+#define stbi__sbpush(a, v) (stbi__sbmaybegrow(a,1), (a)[stbi__sbn(a)++] = (v))
+#define stbi__sbcount(a) ((a) ? stbi__sbn(a) : 0)
+#define stbi__sbfree(a) ((a) ? free(stbi__sbraw(a)),0 : 0)
+
+static void *stbi__sbgrowf(void **arr, int increment, int itemsize)
+{
+ int m = *arr ? 2*stbi__sbm(*arr)+increment : increment+1;
+ void *p = realloc(*arr ? stbi__sbraw(*arr) : 0, itemsize * m + sizeof(int)*2);
+ assert(p);
+ if (p) {
+ if (!*arr) ((int *) p)[1] = 0;
+ *arr = (void *) ((int *) p + 2);
+ stbi__sbm(*arr) = m;
+ }
+ return *arr;
+}
+
+static unsigned char *stbi__zlib_flushf(unsigned char *data, unsigned int *bitbuffer, int *bitcount)
+{
+ while (*bitcount >= 8) {
+ stbi__sbpush(data, (unsigned char) *bitbuffer);
+ *bitbuffer >>= 8;
+ *bitcount -= 8;
+ }
+ return data;
+}
+
+static int stbi__zlib_bitrev(int code, int codebits)
+{
+ int res=0;
+ while (codebits--) {
+ res = (res << 1) | (code & 1);
+ code >>= 1;
+ }
+ return res;
+}
+
+static unsigned int stbi__zlib_countm(unsigned char *a, unsigned char *b, int limit)
+{
+ int i;
+ for (i=0; i < limit && i < 258; ++i)
+ if (a[i] != b[i]) break;
+ return i;
+}
+
+static unsigned int stbi__zhash(unsigned char *data)
+{
+ stbiw_uint32 hash = data[0] + (data[1] << 8) + (data[2] << 16);
+ hash ^= hash << 3;
+ hash += hash >> 5;
+ hash ^= hash << 4;
+ hash += hash >> 17;
+ hash ^= hash << 25;
+ hash += hash >> 6;
+ return hash;
+}
+
+#define stbi__zlib_flush() (out = stbi__zlib_flushf(out, &bitbuf, &bitcount))
+#define stbi__zlib_add(code,codebits) \
+ (bitbuf |= (code) << bitcount, bitcount += (codebits), stbi__zlib_flush())
+#define stbi__zlib_huffa(b,c) stbi__zlib_add(stbi__zlib_bitrev(b,c),c)
+// default huffman tables
+#define stbi__zlib_huff1(n) stbi__zlib_huffa(0x30 + (n), 8)
+#define stbi__zlib_huff2(n) stbi__zlib_huffa(0x190 + (n)-144, 9)
+#define stbi__zlib_huff3(n) stbi__zlib_huffa(0 + (n)-256,7)
+#define stbi__zlib_huff4(n) stbi__zlib_huffa(0xc0 + (n)-280,8)
+#define stbi__zlib_huff(n) ((n) <= 143 ? stbi__zlib_huff1(n) : (n) <= 255 ? stbi__zlib_huff2(n) : (n) <= 279 ? stbi__zlib_huff3(n) : stbi__zlib_huff4(n))
+#define stbi__zlib_huffb(n) ((n) <= 143 ? stbi__zlib_huff1(n) : stbi__zlib_huff2(n))
+
+#define stbi__ZHASH 16384
+
+unsigned char * stbi_zlib_compress(unsigned char *data, int data_len, int *out_len, int quality)
+{
+ static unsigned short lengthc[] = { 3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258, 259 };
+ static unsigned char lengtheb[]= { 0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 };
+ static unsigned short distc[] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 32768 };
+ static unsigned char disteb[] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 };
+ unsigned int bitbuf=0;
+ int i,j, bitcount=0;
+ unsigned char *out = NULL;
+ unsigned char **hash_table[stbi__ZHASH]; // 64KB on the stack!
+ if (quality < 5) quality = 5;
+
+ stbi__sbpush(out, 0x78); // DEFLATE 32K window
+ stbi__sbpush(out, 0x5e); // FLEVEL = 1
+ stbi__zlib_add(1,1); // BFINAL = 1
+ stbi__zlib_add(1,2); // BTYPE = 1 -- fixed huffman
+
+ for (i=0; i < stbi__ZHASH; ++i)
+ hash_table[i] = NULL;
+
+ i=0;
+ while (i < data_len-3) {
+ // hash next 3 bytes of data to be compressed
+ int h = stbi__zhash(data+i)&(stbi__ZHASH-1), best=3;
+ unsigned char *bestloc = 0;
+ unsigned char **hlist = hash_table[h];
+ int n = stbi__sbcount(hlist);
+ for (j=0; j < n; ++j) {
+ if (hlist[j]-data > i-32768) { // if entry lies within window
+ int d = stbi__zlib_countm(hlist[j], data+i, data_len-i);
+ if (d >= best) best=d,bestloc=hlist[j];
+ }
+ }
+ // when hash table entry is too long, delete half the entries
+ if (hash_table[h] && stbi__sbn(hash_table[h]) == 2*quality) {
+ memcpy(hash_table[h], hash_table[h]+quality, sizeof(hash_table[h][0])*quality);
+ stbi__sbn(hash_table[h]) = quality;
+ }
+ stbi__sbpush(hash_table[h],data+i);
+
+ if (bestloc) {
+ // "lazy matching" - check match at *next* byte, and if it's better, do cur byte as literal
+ h = stbi__zhash(data+i+1)&(stbi__ZHASH-1);
+ hlist = hash_table[h];
+ n = stbi__sbcount(hlist);
+ for (j=0; j < n; ++j) {
+ if (hlist[j]-data > i-32767) {
+ int e = stbi__zlib_countm(hlist[j], data+i+1, data_len-i-1);
+ if (e > best) { // if next match is better, bail on current match
+ bestloc = NULL;
+ break;
+ }
+ }
+ }
+ }
+
+ if (bestloc) {
+ int d = data+i - bestloc; // distance back
+ assert(d <= 32767 && best <= 258);
+ for (j=0; best > lengthc[j+1]-1; ++j);
+ stbi__zlib_huff(j+257);
+ if (lengtheb[j]) stbi__zlib_add(best - lengthc[j], lengtheb[j]);
+ for (j=0; d > distc[j+1]-1; ++j);
+ stbi__zlib_add(stbi__zlib_bitrev(j,5),5);
+ if (disteb[j]) stbi__zlib_add(d - distc[j], disteb[j]);
+ i += best;
+ } else {
+ stbi__zlib_huffb(data[i]);
+ ++i;
+ }
+ }
+ // write out final bytes
+ for (;i < data_len; ++i)
+ stbi__zlib_huffb(data[i]);
+ stbi__zlib_huff(256); // end of block
+ // pad with 0 bits to byte boundary
+ while (bitcount)
+ stbi__zlib_add(0,1);
+
+ for (i=0; i < stbi__ZHASH; ++i)
+ (void) stbi__sbfree(hash_table[i]);
+
+ {
+ // compute adler32 on input
+ unsigned int i=0, s1=1, s2=0, blocklen = data_len % 5552;
+ int j=0;
+ while (j < data_len) {
+ for (i=0; i < blocklen; ++i) s1 += data[j+i], s2 += s1;
+ s1 %= 65521, s2 %= 65521;
+ j += blocklen;
+ blocklen = 5552;
+ }
+ stbi__sbpush(out, (unsigned char) (s2 >> 8));
+ stbi__sbpush(out, (unsigned char) s2);
+ stbi__sbpush(out, (unsigned char) (s1 >> 8));
+ stbi__sbpush(out, (unsigned char) s1);
+ }
+ *out_len = stbi__sbn(out);
+ // make returned pointer freeable
+ memmove(stbi__sbraw(out), out, *out_len);
+ return (unsigned char *) stbi__sbraw(out);
+}
+
+unsigned int stbi__crc32(unsigned char *buffer, int len)
+{
+ static unsigned int crc_table[256];
+ unsigned int crc = ~0u;
+ int i,j;
+ if (crc_table[1] == 0)
+ for(i=0; i < 256; i++)
+ for (crc_table[i]=i, j=0; j < 8; ++j)
+ crc_table[i] = (crc_table[i] >> 1) ^ (crc_table[i] & 1 ? 0xedb88320 : 0);
+ for (i=0; i < len; ++i)
+ crc = (crc >> 8) ^ crc_table[buffer[i] ^ (crc & 0xff)];
+ return ~crc;
+}
+
+#define stbi__wpng4(o,a,b,c,d) ((o)[0]=(unsigned char)(a),(o)[1]=(unsigned char)(b),(o)[2]=(unsigned char)(c),(o)[3]=(unsigned char)(d),(o)+=4)
+#define stbi__wp32(data,v) stbi__wpng4(data, (v)>>24,(v)>>16,(v)>>8,(v));
+#define stbi__wptag(data,s) stbi__wpng4(data, s[0],s[1],s[2],s[3])
+
+static void stbi__wpcrc(unsigned char **data, int len)
+{
+ unsigned int crc = stbi__crc32(*data - len - 4, len+4);
+ stbi__wp32(*data, crc);
+}
+
+static unsigned char stbi__paeth(int a, int b, int c)
+{
+ int p = a + b - c, pa = abs(p-a), pb = abs(p-b), pc = abs(p-c);
+ if (pa <= pb && pa <= pc) return (unsigned char) a;
+ if (pb <= pc) return (unsigned char) b;
+ return (unsigned char) c;
+}
+
+unsigned char *stbi_write_png_to_mem(unsigned char *pixels, int stride_bytes, int x, int y, int n, int *out_len)
+{
+ int ctype[5] = { -1, 0, 4, 2, 6 };
+ unsigned char sig[8] = { 137,80,78,71,13,10,26,10 };
+ unsigned char *out,*o, *filt, *zlib;
+ signed char *line_buffer;
+ int i,j,k,p,zlen;
+
+ if (stride_bytes == 0)
+ stride_bytes = x * n;
+
+ filt = (unsigned char *) malloc((x*n+1) * y); if (!filt) return 0;
+ line_buffer = (signed char *) malloc(x * n); if (!line_buffer) { free(filt); return 0; }
+ for (j=0; j < y; ++j) {
+ static int mapping[] = { 0,1,2,3,4 };
+ static int firstmap[] = { 0,1,0,5,6 };
+ int *mymap = j ? mapping : firstmap;
+ int best = 0, bestval = 0x7fffffff;
+ for (p=0; p < 2; ++p) {
+ for (k= p?best:0; k < 5; ++k) {
+ int type = mymap[k],est=0;
+ unsigned char *z = pixels + stride_bytes*j;
+ for (i=0; i < n; ++i)
+ switch (type) {
+ case 0: line_buffer[i] = z[i]; break;
+ case 1: line_buffer[i] = z[i]; break;
+ case 2: line_buffer[i] = z[i] - z[i-stride_bytes]; break;
+ case 3: line_buffer[i] = z[i] - (z[i-stride_bytes]>>1); break;
+ case 4: line_buffer[i] = (signed char) (z[i] - stbi__paeth(0,z[i-stride_bytes],0)); break;
+ case 5: line_buffer[i] = z[i]; break;
+ case 6: line_buffer[i] = z[i]; break;
+ }
+ for (i=n; i < x*n; ++i) {
+ switch (type) {
+ case 0: line_buffer[i] = z[i]; break;
+ case 1: line_buffer[i] = z[i] - z[i-n]; break;
+ case 2: line_buffer[i] = z[i] - z[i-stride_bytes]; break;
+ case 3: line_buffer[i] = z[i] - ((z[i-n] + z[i-stride_bytes])>>1); break;
+ case 4: line_buffer[i] = z[i] - stbi__paeth(z[i-n], z[i-stride_bytes], z[i-stride_bytes-n]); break;
+ case 5: line_buffer[i] = z[i] - (z[i-n]>>1); break;
+ case 6: line_buffer[i] = z[i] - stbi__paeth(z[i-n], 0,0); break;
+ }
+ }
+ if (p) break;
+ for (i=0; i < x*n; ++i)
+ est += abs((signed char) line_buffer[i]);
+ if (est < bestval) { bestval = est; best = k; }
+ }
+ }
+ // when we get here, best contains the filter type, and line_buffer contains the data
+ filt[j*(x*n+1)] = (unsigned char) best;
+ memcpy(filt+j*(x*n+1)+1, line_buffer, x*n);
+ }
+ free(line_buffer);
+ zlib = stbi_zlib_compress(filt, y*( x*n+1), &zlen, 8); // increase 8 to get smaller but use more memory
+ free(filt);
+ if (!zlib) return 0;
+
+ // each tag requires 12 bytes of overhead
+ out = (unsigned char *) malloc(8 + 12+13 + 12+zlen + 12);
+ if (!out) return 0;
+ *out_len = 8 + 12+13 + 12+zlen + 12;
+
+ o=out;
+ memcpy(o,sig,8); o+= 8;
+ stbi__wp32(o, 13); // header length
+ stbi__wptag(o, "IHDR");
+ stbi__wp32(o, x);
+ stbi__wp32(o, y);
+ *o++ = 8;
+ *o++ = (unsigned char) ctype[n];
+ *o++ = 0;
+ *o++ = 0;
+ *o++ = 0;
+ stbi__wpcrc(&o,13);
+
+ stbi__wp32(o, zlen);
+ stbi__wptag(o, "IDAT");
+ memcpy(o, zlib, zlen); o += zlen; free(zlib);
+ stbi__wpcrc(&o, zlen);
+
+ stbi__wp32(o,0);
+ stbi__wptag(o, "IEND");
+ stbi__wpcrc(&o,0);
+
+ assert(o == out + *out_len);
+
+ return out;
+}
+
+int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)
+{
+ FILE *f;
+ int len;
+ unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);
+ if (!png) return 0;
+ f = fopen(filename, "wb");
+ if (!f) { free(png); return 0; }
+ fwrite(png, 1, len, f);
+ fclose(f);
+ free(png);
+ return 1;
+}
+#endif // STB_IMAGE_WRITE_IMPLEMENTATION
+
+/* Revision history
+
+ 0.92 (2010-08-01)
+ casts to unsigned char to fix warnings
+ 0.91 (2010-07-17)
+ first public release
+ 0.90 first internal release
+*/
diff --git a/3rdparty/nanosvg/premake4.lua b/3rdparty/nanosvg/premake4.lua
new file mode 100644
index 00000000000..2c6cfd4210e
--- /dev/null
+++ b/3rdparty/nanosvg/premake4.lua
@@ -0,0 +1,56 @@
+
+local action = _ACTION or ""
+
+solution "nanosvg"
+ location ( "build" )
+ configurations { "Debug", "Release" }
+ platforms {"native", "x64", "x32"}
+
+ project "example1"
+ kind "ConsoleApp"
+ language "C++"
+ files { "example/example1.c", "example/*.h", "src/*.h" }
+ includedirs { "example", "src" }
+ targetdir("build")
+
+ configuration { "linux" }
+ links { "X11","Xrandr", "rt", "GL", "GLU", "pthread" }
+
+ configuration { "windows" }
+ links { "glu32","opengl32", "gdi32", "winmm", "user32" }
+
+ configuration { "macosx" }
+ links { "glfw3" }
+ linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
+
+ configuration "Debug"
+ defines { "DEBUG" }
+ flags { "Symbols", "ExtraWarnings"}
+
+ configuration "Release"
+ defines { "NDEBUG" }
+ flags { "Optimize", "ExtraWarnings"}
+
+ project "example2"
+ kind "ConsoleApp"
+ language "C++"
+ files { "example/example2.c", "example/*.h", "src/*.h" }
+ includedirs { "example", "src" }
+ targetdir("build")
+
+ configuration { "linux" }
+ links { "X11","Xrandr", "rt", "pthread" }
+
+ configuration { "windows" }
+ links { "winmm", "user32" }
+
+ configuration { "macosx" }
+ linkoptions { "-framework Cocoa", "-framework IOKit" }
+
+ configuration "Debug"
+ defines { "DEBUG" }
+ flags { "Symbols", "ExtraWarnings"}
+
+ configuration "Release"
+ defines { "NDEBUG" }
+ flags { "Optimize", "ExtraWarnings"}
diff --git a/3rdparty/nanosvg/src/nanosvg.h b/3rdparty/nanosvg/src/nanosvg.h
new file mode 100644
index 00000000000..e41e093a97c
--- /dev/null
+++ b/3rdparty/nanosvg/src/nanosvg.h
@@ -0,0 +1,2892 @@
+/*
+ * Copyright (c) 2013-14 Mikko Mononen memon@inside.org
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ *
+ * The SVG parser is based on Anti-Grain Geometry 2.4 SVG example
+ * Copyright (C) 2002-2004 Maxim Shemanarev (McSeem) (http://www.antigrain.com/)
+ *
+ * Arc calculation code based on canvg (https://code.google.com/p/canvg/)
+ *
+ * Bounding box calculation based on http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
+ *
+ */
+
+#ifndef NANOSVG_H
+#define NANOSVG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes.
+//
+// The library suits well for anything from rendering scalable icons in your editor application to prototyping a game.
+//
+// NanoSVG supports a wide range of SVG features, but something may be missing, feel free to create a pull request!
+//
+// The shapes in the SVG images are transformed by the viewBox and converted to specified units.
+// That is, you should get the same looking data as your designed in your favorite app.
+//
+// NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose
+// to get the paths in pixels, or if you are feeding the data into a CNC-cutter, you may want to use millimeters.
+//
+// The units passed to NanoVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'.
+// DPI (dots-per-inch) controls how the unit conversion is done.
+//
+// If you don't know or care about the units stuff, "px" and 96 should get you going.
+
+
+/* Example Usage:
+ // Load
+ NSVGImage* image;
+ image = nsvgParseFromFile("test.svg", "px", 96);
+ printf("size: %f x %f\n", image->width, image->height);
+ // Use...
+ for (NSVGshape *shape = image->shapes; shape != NULL; shape = shape->next) {
+ for (NSVGpath *path = shape->paths; path != NULL; path = path->next) {
+ for (int i = 0; i < path->npts-1; i += 3) {
+ float* p = &path->pts[i*2];
+ drawCubicBez(p[0],p[1], p[2],p[3], p[4],p[5], p[6],p[7]);
+ }
+ }
+ }
+ // Delete
+ nsvgDelete(image);
+*/
+
+enum NSVGpaintType {
+ NSVG_PAINT_NONE = 0,
+ NSVG_PAINT_COLOR = 1,
+ NSVG_PAINT_LINEAR_GRADIENT = 2,
+ NSVG_PAINT_RADIAL_GRADIENT = 3,
+};
+
+enum NSVGspreadType {
+ NSVG_SPREAD_PAD = 0,
+ NSVG_SPREAD_REFLECT = 1,
+ NSVG_SPREAD_REPEAT = 2,
+};
+
+enum NSVGlineJoin {
+ NSVG_JOIN_MITER = 0,
+ NSVG_JOIN_ROUND = 1,
+ NSVG_JOIN_BEVEL = 2,
+};
+
+enum NSVGlineCap {
+ NSVG_CAP_BUTT = 0,
+ NSVG_CAP_ROUND = 1,
+ NSVG_CAP_SQUARE = 2,
+};
+
+enum NSVGfillRule {
+ NSVG_FILLRULE_NONZERO = 0,
+ NSVG_FILLRULE_EVENODD = 1,
+};
+
+enum NSVGflags {
+ NSVG_FLAGS_VISIBLE = 0x01
+};
+
+typedef struct NSVGgradientStop {
+ unsigned int color;
+ float offset;
+} NSVGgradientStop;
+
+typedef struct NSVGgradient {
+ float xform[6];
+ char spread;
+ float fx, fy;
+ int nstops;
+ NSVGgradientStop stops[1];
+} NSVGgradient;
+
+typedef struct NSVGpaint {
+ char type;
+ union {
+ unsigned int color;
+ NSVGgradient* gradient;
+ };
+} NSVGpaint;
+
+typedef struct NSVGpath
+{
+ float* pts; // Cubic bezier points: x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ...
+ int npts; // Total number of bezier points.
+ char closed; // Flag indicating if shapes should be treated as closed.
+ float bounds[4]; // Tight bounding box of the shape [minx,miny,maxx,maxy].
+ struct NSVGpath* next; // Pointer to next path, or NULL if last element.
+} NSVGpath;
+
+typedef struct NSVGshape
+{
+ char id[64]; // Optional 'id' attr of the shape or its group
+ char title[64]; // Optional 'title' of the shape or its ancestor(s)
+ NSVGpaint fill; // Fill paint
+ NSVGpaint stroke; // Stroke paint
+ float opacity; // Opacity of the shape.
+ float strokeWidth; // Stroke width (scaled).
+ float strokeDashOffset; // Stroke dash offset (scaled).
+ float strokeDashArray[8]; // Stroke dash array (scaled).
+ char strokeDashCount; // Number of dash values in dash array.
+ char strokeLineJoin; // Stroke join type.
+ char strokeLineCap; // Stroke cap type.
+ char fillRule; // Fill rule, see NSVGfillRule.
+ unsigned char flags; // Logical or of NSVG_FLAGS_* flags
+ float bounds[4]; // Tight bounding box of the shape [minx,miny,maxx,maxy].
+ NSVGpath* paths; // Linked list of paths in the image.
+ struct NSVGshape* next; // Pointer to next shape, or NULL if last element.
+} NSVGshape;
+
+typedef struct NSVGimage
+{
+ float width; // Width of the image.
+ float height; // Height of the image.
+ NSVGshape* shapes; // Linked list of shapes in the image.
+} NSVGimage;
+
+// Parses SVG file from a file, returns SVG image as paths.
+NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi);
+
+// Parses SVG file from a null terminated string, returns SVG image as paths.
+// Important note: changes the string.
+NSVGimage* nsvgParse(char* input, const char* units, float dpi);
+
+// Deletes list of paths.
+void nsvgDelete(NSVGimage* image);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // NANOSVG_H
+
+#ifdef NANOSVG_IMPLEMENTATION
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+
+#define NSVG_PI (3.14159265358979323846264338327f)
+#define NSVG_KAPPA90 (0.5522847493f) // Lenght proportional to radius of a cubic bezier handle for 90deg arcs.
+
+#define NSVG_ALIGN_MIN 0
+#define NSVG_ALIGN_MID 1
+#define NSVG_ALIGN_MAX 2
+#define NSVG_ALIGN_NONE 0
+#define NSVG_ALIGN_MEET 1
+#define NSVG_ALIGN_SLICE 2
+
+#define NSVG_NOTUSED(v) do { (void)(1 ? (void)0 : ( (void)(v) ) ); } while(0)
+#define NSVG_RGB(r, g, b) (((unsigned int)r) | ((unsigned int)g << 8) | ((unsigned int)b << 16))
+
+#ifdef _MSC_VER
+ #pragma warning (disable: 4996) // Switch off security warnings
+ #pragma warning (disable: 4100) // Switch off unreferenced formal parameter warnings
+ #ifdef __cplusplus
+ #define NSVG_INLINE inline
+ #else
+ #define NSVG_INLINE
+ #endif
+#else
+ #define NSVG_INLINE inline
+#endif
+
+
+static int nsvg__isspace(char c)
+{
+ return strchr(" \t\n\v\f\r", c) != 0;
+}
+
+static int nsvg__isdigit(char c)
+{
+ return strchr("0123456789", c) != 0;
+}
+
+static int nsvg__isnum(char c)
+{
+ return strchr("0123456789+-.eE", c) != 0;
+}
+
+static NSVG_INLINE float nsvg__minf(float a, float b) { return a < b ? a : b; }
+static NSVG_INLINE float nsvg__maxf(float a, float b) { return a > b ? a : b; }
+
+
+// Simple XML parser
+
+#define NSVG_XML_TAG 1
+#define NSVG_XML_CONTENT 2
+#define NSVG_XML_MAX_ATTRIBS 256
+
+static void nsvg__parseContent(char* s,
+ void (*contentCb)(void* ud, const char* s),
+ void* ud)
+{
+ // Trim start white spaces
+ while (*s && nsvg__isspace(*s)) s++;
+ if (!*s) return;
+
+ if (contentCb)
+ (*contentCb)(ud, s);
+}
+
+static void nsvg__parseElement(char* s,
+ void (*startelCb)(void* ud, const char* el, const char** attr),
+ void (*endelCb)(void* ud, const char* el),
+ void* ud)
+{
+ const char* attr[NSVG_XML_MAX_ATTRIBS];
+ int nattr = 0;
+ char* name;
+ int start = 0;
+ int end = 0;
+ char quote;
+
+ // Skip white space after the '<'
+ while (*s && nsvg__isspace(*s)) s++;
+
+ // Check if the tag is end tag
+ if (*s == '/') {
+ s++;
+ end = 1;
+ } else {
+ start = 1;
+ }
+
+ // Skip comments, data and preprocessor stuff.
+ if (!*s || *s == '?' || *s == '!')
+ return;
+
+ // Get tag name
+ name = s;
+ while (*s && !nsvg__isspace(*s)) s++;
+ if (*s) { *s++ = '\0'; }
+
+ // Get attribs
+ while (!end && *s && nattr < NSVG_XML_MAX_ATTRIBS-3) {
+ // Skip white space before the attrib name
+ while (*s && nsvg__isspace(*s)) s++;
+ if (!*s) break;
+ if (*s == '/') {
+ end = 1;
+ break;
+ }
+ attr[nattr++] = s;
+ // Find end of the attrib name.
+ while (*s && !nsvg__isspace(*s) && *s != '=') s++;
+ if (*s) { *s++ = '\0'; }
+ // Skip until the beginning of the value.
+ while (*s && *s != '\"' && *s != '\'') s++;
+ if (!*s) break;
+ quote = *s;
+ s++;
+ // Store value and find the end of it.
+ attr[nattr++] = s;
+ while (*s && *s != quote) s++;
+ if (*s) { *s++ = '\0'; }
+ }
+
+ // List terminator
+ attr[nattr++] = 0;
+ attr[nattr++] = 0;
+
+ // Call callbacks.
+ if (start && startelCb)
+ (*startelCb)(ud, name, attr);
+ if (end && endelCb)
+ (*endelCb)(ud, name);
+}
+
+int nsvg__parseXML(char* input,
+ void (*startelCb)(void* ud, const char* el, const char** attr),
+ void (*endelCb)(void* ud, const char* el),
+ void (*contentCb)(void* ud, const char* s),
+ void* ud)
+{
+ char* s = input;
+ char* mark = s;
+ int state = NSVG_XML_CONTENT;
+ while (*s) {
+ if (*s == '<' && state == NSVG_XML_CONTENT) {
+ // Start of a tag
+ *s++ = '\0';
+ nsvg__parseContent(mark, contentCb, ud);
+ mark = s;
+ state = NSVG_XML_TAG;
+ } else if (*s == '>' && state == NSVG_XML_TAG) {
+ // Start of a content or new tag.
+ *s++ = '\0';
+ nsvg__parseElement(mark, startelCb, endelCb, ud);
+ mark = s;
+ state = NSVG_XML_CONTENT;
+ } else {
+ s++;
+ }
+ }
+
+ return 1;
+}
+
+
+/* Simple SVG parser. */
+
+#define NSVG_MAX_ATTR 128
+
+enum NSVGgradientUnits {
+ NSVG_USER_SPACE = 0,
+ NSVG_OBJECT_SPACE = 1,
+};
+
+#define NSVG_MAX_DASHES 8
+
+enum NSVGunits {
+ NSVG_UNITS_USER,
+ NSVG_UNITS_PX,
+ NSVG_UNITS_PT,
+ NSVG_UNITS_PC,
+ NSVG_UNITS_MM,
+ NSVG_UNITS_CM,
+ NSVG_UNITS_IN,
+ NSVG_UNITS_PERCENT,
+ NSVG_UNITS_EM,
+ NSVG_UNITS_EX,
+};
+
+typedef struct NSVGcoordinate {
+ float value;
+ int units;
+} NSVGcoordinate;
+
+typedef struct NSVGlinearData {
+ NSVGcoordinate x1, y1, x2, y2;
+} NSVGlinearData;
+
+typedef struct NSVGradialData {
+ NSVGcoordinate cx, cy, r, fx, fy;
+} NSVGradialData;
+
+typedef struct NSVGgradientData
+{
+ char id[64];
+ char ref[64];
+ char type;
+ union {
+ NSVGlinearData linear;
+ NSVGradialData radial;
+ };
+ char spread;
+ char units;
+ float xform[6];
+ int nstops;
+ NSVGgradientStop* stops;
+ struct NSVGgradientData* next;
+} NSVGgradientData;
+
+typedef struct NSVGattrib
+{
+ char id[64];
+ char title[64];
+ float xform[6];
+ unsigned int fillColor;
+ unsigned int strokeColor;
+ float opacity;
+ float fillOpacity;
+ float strokeOpacity;
+ char fillGradient[64];
+ char strokeGradient[64];
+ float strokeWidth;
+ float strokeDashOffset;
+ float strokeDashArray[NSVG_MAX_DASHES];
+ int strokeDashCount;
+ char strokeLineJoin;
+ char strokeLineCap;
+ char fillRule;
+ float fontSize;
+ unsigned int stopColor;
+ float stopOpacity;
+ float stopOffset;
+ char hasFill;
+ char hasStroke;
+ char visible;
+} NSVGattrib;
+
+typedef struct NSVGparser
+{
+ NSVGattrib attr[NSVG_MAX_ATTR];
+ int attrHead;
+ float* pts;
+ int npts;
+ int cpts;
+ NSVGpath* plist;
+ NSVGimage* image;
+ NSVGgradientData* gradients;
+ float viewMinx, viewMiny, viewWidth, viewHeight;
+ int alignX, alignY, alignType;
+ float dpi;
+ char pathFlag;
+ char defsFlag;
+ char titleFlag;
+ char shapeFlag;
+} NSVGparser;
+
+static void nsvg__xformIdentity(float* t)
+{
+ t[0] = 1.0f; t[1] = 0.0f;
+ t[2] = 0.0f; t[3] = 1.0f;
+ t[4] = 0.0f; t[5] = 0.0f;
+}
+
+static void nsvg__xformSetTranslation(float* t, float tx, float ty)
+{
+ t[0] = 1.0f; t[1] = 0.0f;
+ t[2] = 0.0f; t[3] = 1.0f;
+ t[4] = tx; t[5] = ty;
+}
+
+static void nsvg__xformSetScale(float* t, float sx, float sy)
+{
+ t[0] = sx; t[1] = 0.0f;
+ t[2] = 0.0f; t[3] = sy;
+ t[4] = 0.0f; t[5] = 0.0f;
+}
+
+static void nsvg__xformSetSkewX(float* t, float a)
+{
+ t[0] = 1.0f; t[1] = 0.0f;
+ t[2] = tanf(a); t[3] = 1.0f;
+ t[4] = 0.0f; t[5] = 0.0f;
+}
+
+static void nsvg__xformSetSkewY(float* t, float a)
+{
+ t[0] = 1.0f; t[1] = tanf(a);
+ t[2] = 0.0f; t[3] = 1.0f;
+ t[4] = 0.0f; t[5] = 0.0f;
+}
+
+static void nsvg__xformSetRotation(float* t, float a)
+{
+ float cs = cosf(a), sn = sinf(a);
+ t[0] = cs; t[1] = sn;
+ t[2] = -sn; t[3] = cs;
+ t[4] = 0.0f; t[5] = 0.0f;
+}
+
+static void nsvg__xformMultiply(float* t, float* s)
+{
+ float t0 = t[0] * s[0] + t[1] * s[2];
+ float t2 = t[2] * s[0] + t[3] * s[2];
+ float t4 = t[4] * s[0] + t[5] * s[2] + s[4];
+ t[1] = t[0] * s[1] + t[1] * s[3];
+ t[3] = t[2] * s[1] + t[3] * s[3];
+ t[5] = t[4] * s[1] + t[5] * s[3] + s[5];
+ t[0] = t0;
+ t[2] = t2;
+ t[4] = t4;
+}
+
+static void nsvg__xformInverse(float* inv, float* t)
+{
+ double invdet, det = (double)t[0] * t[3] - (double)t[2] * t[1];
+ if (det > -1e-6 && det < 1e-6) {
+ nsvg__xformIdentity(t);
+ return;
+ }
+ invdet = 1.0 / det;
+ inv[0] = (float)(t[3] * invdet);
+ inv[2] = (float)(-t[2] * invdet);
+ inv[4] = (float)(((double)t[2] * t[5] - (double)t[3] * t[4]) * invdet);
+ inv[1] = (float)(-t[1] * invdet);
+ inv[3] = (float)(t[0] * invdet);
+ inv[5] = (float)(((double)t[1] * t[4] - (double)t[0] * t[5]) * invdet);
+}
+
+static void nsvg__xformPremultiply(float* t, float* s)
+{
+ float s2[6];
+ memcpy(s2, s, sizeof(float)*6);
+ nsvg__xformMultiply(s2, t);
+ memcpy(t, s2, sizeof(float)*6);
+}
+
+static void nsvg__xformPoint(float* dx, float* dy, float x, float y, float* t)
+{
+ *dx = x*t[0] + y*t[2] + t[4];
+ *dy = x*t[1] + y*t[3] + t[5];
+}
+
+static void nsvg__xformVec(float* dx, float* dy, float x, float y, float* t)
+{
+ *dx = x*t[0] + y*t[2];
+ *dy = x*t[1] + y*t[3];
+}
+
+#define NSVG_EPSILON (1e-12)
+
+static int nsvg__ptInBounds(float* pt, float* bounds)
+{
+ return pt[0] >= bounds[0] && pt[0] <= bounds[2] && pt[1] >= bounds[1] && pt[1] <= bounds[3];
+}
+
+
+static double nsvg__evalBezier(double t, double p0, double p1, double p2, double p3)
+{
+ double it = 1.0-t;
+ return it*it*it*p0 + 3.0*it*it*t*p1 + 3.0*it*t*t*p2 + t*t*t*p3;
+}
+
+static void nsvg__curveBounds(float* bounds, float* curve)
+{
+ int i, j, count;
+ double roots[2], a, b, c, b2ac, t, v;
+ float* v0 = &curve[0];
+ float* v1 = &curve[2];
+ float* v2 = &curve[4];
+ float* v3 = &curve[6];
+
+ // Start the bounding box by end points
+ bounds[0] = nsvg__minf(v0[0], v3[0]);
+ bounds[1] = nsvg__minf(v0[1], v3[1]);
+ bounds[2] = nsvg__maxf(v0[0], v3[0]);
+ bounds[3] = nsvg__maxf(v0[1], v3[1]);
+
+ // Bezier curve fits inside the convex hull of it's control points.
+ // If control points are inside the bounds, we're done.
+ if (nsvg__ptInBounds(v1, bounds) && nsvg__ptInBounds(v2, bounds))
+ return;
+
+ // Add bezier curve inflection points in X and Y.
+ for (i = 0; i < 2; i++) {
+ a = -3.0 * v0[i] + 9.0 * v1[i] - 9.0 * v2[i] + 3.0 * v3[i];
+ b = 6.0 * v0[i] - 12.0 * v1[i] + 6.0 * v2[i];
+ c = 3.0 * v1[i] - 3.0 * v0[i];
+ count = 0;
+ if (fabs(a) < NSVG_EPSILON) {
+ if (fabs(b) > NSVG_EPSILON) {
+ t = -c / b;
+ if (t > NSVG_EPSILON && t < 1.0-NSVG_EPSILON)
+ roots[count++] = t;
+ }
+ } else {
+ b2ac = b*b - 4.0*c*a;
+ if (b2ac > NSVG_EPSILON) {
+ t = (-b + sqrt(b2ac)) / (2.0 * a);
+ if (t > NSVG_EPSILON && t < 1.0-NSVG_EPSILON)
+ roots[count++] = t;
+ t = (-b - sqrt(b2ac)) / (2.0 * a);
+ if (t > NSVG_EPSILON && t < 1.0-NSVG_EPSILON)
+ roots[count++] = t;
+ }
+ }
+ for (j = 0; j < count; j++) {
+ v = nsvg__evalBezier(roots[j], v0[i], v1[i], v2[i], v3[i]);
+ bounds[0+i] = nsvg__minf(bounds[0+i], (float)v);
+ bounds[2+i] = nsvg__maxf(bounds[2+i], (float)v);
+ }
+ }
+}
+
+static NSVGparser* nsvg__createParser()
+{
+ NSVGparser* p;
+ p = (NSVGparser*)malloc(sizeof(NSVGparser));
+ if (p == NULL) goto error;
+ memset(p, 0, sizeof(NSVGparser));
+
+ p->image = (NSVGimage*)malloc(sizeof(NSVGimage));
+ if (p->image == NULL) goto error;
+ memset(p->image, 0, sizeof(NSVGimage));
+
+ // Init style
+ nsvg__xformIdentity(p->attr[0].xform);
+ memset(p->attr[0].id, 0, sizeof p->attr[0].id);
+ p->attr[0].fillColor = NSVG_RGB(0,0,0);
+ p->attr[0].strokeColor = NSVG_RGB(0,0,0);
+ p->attr[0].opacity = 1;
+ p->attr[0].fillOpacity = 1;
+ p->attr[0].strokeOpacity = 1;
+ p->attr[0].stopOpacity = 1;
+ p->attr[0].strokeWidth = 1;
+ p->attr[0].strokeLineJoin = NSVG_JOIN_MITER;
+ p->attr[0].strokeLineCap = NSVG_CAP_BUTT;
+ p->attr[0].fillRule = NSVG_FILLRULE_NONZERO;
+ p->attr[0].hasFill = 1;
+ p->attr[0].visible = 1;
+
+ return p;
+
+error:
+ if (p) {
+ if (p->image) free(p->image);
+ free(p);
+ }
+ return NULL;
+}
+
+static void nsvg__deletePaths(NSVGpath* path)
+{
+ while (path) {
+ NSVGpath *next = path->next;
+ if (path->pts != NULL)
+ free(path->pts);
+ free(path);
+ path = next;
+ }
+}
+
+static void nsvg__deletePaint(NSVGpaint* paint)
+{
+ if (paint->type == NSVG_PAINT_LINEAR_GRADIENT || paint->type == NSVG_PAINT_RADIAL_GRADIENT)
+ free(paint->gradient);
+}
+
+static void nsvg__deleteGradientData(NSVGgradientData* grad)
+{
+ NSVGgradientData* next;
+ while (grad != NULL) {
+ next = grad->next;
+ free(grad->stops);
+ free(grad);
+ grad = next;
+ }
+}
+
+static void nsvg__deleteParser(NSVGparser* p)
+{
+ if (p != NULL) {
+ nsvg__deletePaths(p->plist);
+ nsvg__deleteGradientData(p->gradients);
+ nsvgDelete(p->image);
+ free(p->pts);
+ free(p);
+ }
+}
+
+static void nsvg__resetPath(NSVGparser* p)
+{
+ p->npts = 0;
+}
+
+static void nsvg__addPoint(NSVGparser* p, float x, float y)
+{
+ if (p->npts+1 > p->cpts) {
+ p->cpts = p->cpts ? p->cpts*2 : 8;
+ p->pts = (float*)realloc(p->pts, p->cpts*2*sizeof(float));
+ if (!p->pts) return;
+ }
+ p->pts[p->npts*2+0] = x;
+ p->pts[p->npts*2+1] = y;
+ p->npts++;
+}
+
+static void nsvg__moveTo(NSVGparser* p, float x, float y)
+{
+ if (p->npts > 0) {
+ p->pts[(p->npts-1)*2+0] = x;
+ p->pts[(p->npts-1)*2+1] = y;
+ } else {
+ nsvg__addPoint(p, x, y);
+ }
+}
+
+static void nsvg__lineTo(NSVGparser* p, float x, float y)
+{
+ float px,py, dx,dy;
+ if (p->npts > 0) {
+ px = p->pts[(p->npts-1)*2+0];
+ py = p->pts[(p->npts-1)*2+1];
+ dx = x - px;
+ dy = y - py;
+ nsvg__addPoint(p, px + dx/3.0f, py + dy/3.0f);
+ nsvg__addPoint(p, x - dx/3.0f, y - dy/3.0f);
+ nsvg__addPoint(p, x, y);
+ }
+}
+
+static void nsvg__cubicBezTo(NSVGparser* p, float cpx1, float cpy1, float cpx2, float cpy2, float x, float y)
+{
+ nsvg__addPoint(p, cpx1, cpy1);
+ nsvg__addPoint(p, cpx2, cpy2);
+ nsvg__addPoint(p, x, y);
+}
+
+static NSVGattrib* nsvg__getAttr(NSVGparser* p)
+{
+ return &p->attr[p->attrHead];
+}
+
+static void nsvg__pushAttr(NSVGparser* p)
+{
+ if (p->attrHead < NSVG_MAX_ATTR-1) {
+ p->attrHead++;
+ memcpy(&p->attr[p->attrHead], &p->attr[p->attrHead-1], sizeof(NSVGattrib));
+ }
+}
+
+static void nsvg__popAttr(NSVGparser* p)
+{
+ if (p->attrHead > 0)
+ p->attrHead--;
+}
+
+static float nsvg__actualOrigX(NSVGparser* p)
+{
+ return p->viewMinx;
+}
+
+static float nsvg__actualOrigY(NSVGparser* p)
+{
+ return p->viewMiny;
+}
+
+static float nsvg__actualWidth(NSVGparser* p)
+{
+ return p->viewWidth;
+}
+
+static float nsvg__actualHeight(NSVGparser* p)
+{
+ return p->viewHeight;
+}
+
+static float nsvg__actualLength(NSVGparser* p)
+{
+ float w = nsvg__actualWidth(p), h = nsvg__actualHeight(p);
+ return sqrtf(w*w + h*h) / sqrtf(2.0f);
+}
+
+static float nsvg__convertToPixels(NSVGparser* p, NSVGcoordinate c, float orig, float length)
+{
+ NSVGattrib* attr = nsvg__getAttr(p);
+ switch (c.units) {
+ case NSVG_UNITS_USER: return c.value;
+ case NSVG_UNITS_PX: return c.value;
+ case NSVG_UNITS_PT: return c.value / 72.0f * p->dpi;
+ case NSVG_UNITS_PC: return c.value / 6.0f * p->dpi;
+ case NSVG_UNITS_MM: return c.value / 25.4f * p->dpi;
+ case NSVG_UNITS_CM: return c.value / 2.54f * p->dpi;
+ case NSVG_UNITS_IN: return c.value * p->dpi;
+ case NSVG_UNITS_EM: return c.value * attr->fontSize;
+ case NSVG_UNITS_EX: return c.value * attr->fontSize * 0.52f; // x-height of Helvetica.
+ case NSVG_UNITS_PERCENT: return orig + c.value / 100.0f * length;
+ default: return c.value;
+ }
+ return c.value;
+}
+
+static NSVGgradientData* nsvg__findGradientData(NSVGparser* p, const char* id)
+{
+ NSVGgradientData* grad = p->gradients;
+ while (grad) {
+ if (strcmp(grad->id, id) == 0)
+ return grad;
+ grad = grad->next;
+ }
+ return NULL;
+}
+
+static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const float* localBounds, char* paintType)
+{
+ NSVGattrib* attr = nsvg__getAttr(p);
+ NSVGgradientData* data = NULL;
+ NSVGgradientData* ref = NULL;
+ NSVGgradientStop* stops = NULL;
+ NSVGgradient* grad;
+ float ox, oy, sw, sh, sl;
+ int nstops = 0;
+
+ data = nsvg__findGradientData(p, id);
+ if (data == NULL) return NULL;
+
+ // TODO: use ref to fill in all unset values too.
+ ref = data;
+ while (ref != NULL) {
+ if (stops == NULL && ref->stops != NULL) {
+ stops = ref->stops;
+ nstops = ref->nstops;
+ break;
+ }
+ ref = nsvg__findGradientData(p, ref->ref);
+ }
+ if (stops == NULL) return NULL;
+
+ grad = (NSVGgradient*)malloc(sizeof(NSVGgradient) + sizeof(NSVGgradientStop)*(nstops-1));
+ if (grad == NULL) return NULL;
+
+ // The shape width and height.
+ if (data->units == NSVG_OBJECT_SPACE) {
+ ox = localBounds[0];
+ oy = localBounds[1];
+ sw = localBounds[2] - localBounds[0];
+ sh = localBounds[3] - localBounds[1];
+ } else {
+ ox = nsvg__actualOrigX(p);
+ oy = nsvg__actualOrigY(p);
+ sw = nsvg__actualWidth(p);
+ sh = nsvg__actualHeight(p);
+ }
+ sl = sqrtf(sw*sw + sh*sh) / sqrtf(2.0f);
+
+ if (data->type == NSVG_PAINT_LINEAR_GRADIENT) {
+ float x1, y1, x2, y2, dx, dy;
+ x1 = nsvg__convertToPixels(p, data->linear.x1, ox, sw);
+ y1 = nsvg__convertToPixels(p, data->linear.y1, oy, sh);
+ x2 = nsvg__convertToPixels(p, data->linear.x2, ox, sw);
+ y2 = nsvg__convertToPixels(p, data->linear.y2, oy, sh);
+ // Calculate transform aligned to the line
+ dx = x2 - x1;
+ dy = y2 - y1;
+ grad->xform[0] = dy; grad->xform[1] = -dx;
+ grad->xform[2] = dx; grad->xform[3] = dy;
+ grad->xform[4] = x1; grad->xform[5] = y1;
+ } else {
+ float cx, cy, fx, fy, r;
+ cx = nsvg__convertToPixels(p, data->radial.cx, ox, sw);
+ cy = nsvg__convertToPixels(p, data->radial.cy, oy, sh);
+ fx = nsvg__convertToPixels(p, data->radial.fx, ox, sw);
+ fy = nsvg__convertToPixels(p, data->radial.fy, oy, sh);
+ r = nsvg__convertToPixels(p, data->radial.r, 0, sl);
+ // Calculate transform aligned to the circle
+ grad->xform[0] = r; grad->xform[1] = 0;
+ grad->xform[2] = 0; grad->xform[3] = r;
+ grad->xform[4] = cx; grad->xform[5] = cy;
+ grad->fx = fx / r;
+ grad->fy = fy / r;
+ }
+
+ nsvg__xformMultiply(grad->xform, data->xform);
+ nsvg__xformMultiply(grad->xform, attr->xform);
+
+ grad->spread = data->spread;
+ memcpy(grad->stops, stops, nstops*sizeof(NSVGgradientStop));
+ grad->nstops = nstops;
+
+ *paintType = data->type;
+
+ return grad;
+}
+
+static float nsvg__getAverageScale(float* t)
+{
+ float sx = sqrtf(t[0]*t[0] + t[2]*t[2]);
+ float sy = sqrtf(t[1]*t[1] + t[3]*t[3]);
+ return (sx + sy) * 0.5f;
+}
+
+static void nsvg__getLocalBounds(float* bounds, NSVGshape *shape, float* xform)
+{
+ NSVGpath* path;
+ float curve[4*2], curveBounds[4];
+ int i, first = 1;
+ for (path = shape->paths; path != NULL; path = path->next) {
+ nsvg__xformPoint(&curve[0], &curve[1], path->pts[0], path->pts[1], xform);
+ for (i = 0; i < path->npts-1; i += 3) {
+ nsvg__xformPoint(&curve[2], &curve[3], path->pts[(i+1)*2], path->pts[(i+1)*2+1], xform);
+ nsvg__xformPoint(&curve[4], &curve[5], path->pts[(i+2)*2], path->pts[(i+2)*2+1], xform);
+ nsvg__xformPoint(&curve[6], &curve[7], path->pts[(i+3)*2], path->pts[(i+3)*2+1], xform);
+ nsvg__curveBounds(curveBounds, curve);
+ if (first) {
+ bounds[0] = curveBounds[0];
+ bounds[1] = curveBounds[1];
+ bounds[2] = curveBounds[2];
+ bounds[3] = curveBounds[3];
+ first = 0;
+ } else {
+ bounds[0] = nsvg__minf(bounds[0], curveBounds[0]);
+ bounds[1] = nsvg__minf(bounds[1], curveBounds[1]);
+ bounds[2] = nsvg__maxf(bounds[2], curveBounds[2]);
+ bounds[3] = nsvg__maxf(bounds[3], curveBounds[3]);
+ }
+ curve[0] = curve[6];
+ curve[1] = curve[7];
+ }
+ }
+}
+
+static void nsvg__addShape(NSVGparser* p)
+{
+ NSVGattrib* attr = nsvg__getAttr(p);
+ float scale = 1.0f;
+ NSVGshape *shape, *cur, *prev;
+ NSVGpath* path;
+ int i;
+
+ if (p->plist == NULL)
+ return;
+
+ shape = (NSVGshape*)malloc(sizeof(NSVGshape));
+ if (shape == NULL) goto error;
+ memset(shape, 0, sizeof(NSVGshape));
+
+ memcpy(shape->id, attr->id, sizeof shape->id);
+ memcpy(shape->title, attr->title, sizeof shape->title);
+ scale = nsvg__getAverageScale(attr->xform);
+ shape->strokeWidth = attr->strokeWidth * scale;
+ shape->strokeDashOffset = attr->strokeDashOffset * scale;
+ shape->strokeDashCount = attr->strokeDashCount;
+ for (i = 0; i < attr->strokeDashCount; i++)
+ shape->strokeDashArray[i] = attr->strokeDashArray[i] * scale;
+ shape->strokeLineJoin = attr->strokeLineJoin;
+ shape->strokeLineCap = attr->strokeLineCap;
+ shape->fillRule = attr->fillRule;
+ shape->opacity = attr->opacity;
+
+ shape->paths = p->plist;
+ p->plist = NULL;
+
+ // Calculate shape bounds
+ shape->bounds[0] = shape->paths->bounds[0];
+ shape->bounds[1] = shape->paths->bounds[1];
+ shape->bounds[2] = shape->paths->bounds[2];
+ shape->bounds[3] = shape->paths->bounds[3];
+ for (path = shape->paths->next; path != NULL; path = path->next) {
+ shape->bounds[0] = nsvg__minf(shape->bounds[0], path->bounds[0]);
+ shape->bounds[1] = nsvg__minf(shape->bounds[1], path->bounds[1]);
+ shape->bounds[2] = nsvg__maxf(shape->bounds[2], path->bounds[2]);
+ shape->bounds[3] = nsvg__maxf(shape->bounds[3], path->bounds[3]);
+ }
+
+ // Set fill
+ if (attr->hasFill == 0) {
+ shape->fill.type = NSVG_PAINT_NONE;
+ } else if (attr->hasFill == 1) {
+ shape->fill.type = NSVG_PAINT_COLOR;
+ shape->fill.color = attr->fillColor;
+ shape->fill.color |= (unsigned int)(attr->fillOpacity*255) << 24;
+ } else if (attr->hasFill == 2) {
+ float inv[6], localBounds[4];
+ nsvg__xformInverse(inv, attr->xform);
+ nsvg__getLocalBounds(localBounds, shape, inv);
+ shape->fill.gradient = nsvg__createGradient(p, attr->fillGradient, localBounds, &shape->fill.type);
+ if (shape->fill.gradient == NULL) {
+ shape->fill.type = NSVG_PAINT_NONE;
+ }
+ }
+
+ // Set stroke
+ if (attr->hasStroke == 0) {
+ shape->stroke.type = NSVG_PAINT_NONE;
+ } else if (attr->hasStroke == 1) {
+ shape->stroke.type = NSVG_PAINT_COLOR;
+ shape->stroke.color = attr->strokeColor;
+ shape->stroke.color |= (unsigned int)(attr->strokeOpacity*255) << 24;
+ } else if (attr->hasStroke == 2) {
+ float inv[6], localBounds[4];
+ nsvg__xformInverse(inv, attr->xform);
+ nsvg__getLocalBounds(localBounds, shape, inv);
+ shape->stroke.gradient = nsvg__createGradient(p, attr->strokeGradient, localBounds, &shape->stroke.type);
+ if (shape->stroke.gradient == NULL)
+ shape->stroke.type = NSVG_PAINT_NONE;
+ }
+
+ // Set flags
+ shape->flags = (attr->visible ? NSVG_FLAGS_VISIBLE : 0x00);
+
+ // Add to tail
+ prev = NULL;
+ cur = p->image->shapes;
+ while (cur != NULL) {
+ prev = cur;
+ cur = cur->next;
+ }
+ if (prev == NULL)
+ p->image->shapes = shape;
+ else
+ prev->next = shape;
+
+ return;
+
+error:
+ if (shape) free(shape);
+}
+
+static void nsvg__addPath(NSVGparser* p, char closed)
+{
+ NSVGattrib* attr = nsvg__getAttr(p);
+ NSVGpath* path = NULL;
+ float bounds[4];
+ float* curve;
+ int i;
+
+ if (p->npts < 4)
+ return;
+
+ if (closed)
+ nsvg__lineTo(p, p->pts[0], p->pts[1]);
+
+ path = (NSVGpath*)malloc(sizeof(NSVGpath));
+ if (path == NULL) goto error;
+ memset(path, 0, sizeof(NSVGpath));
+
+ path->pts = (float*)malloc(p->npts*2*sizeof(float));
+ if (path->pts == NULL) goto error;
+ path->closed = closed;
+ path->npts = p->npts;
+
+ // Transform path.
+ for (i = 0; i < p->npts; ++i)
+ nsvg__xformPoint(&path->pts[i*2], &path->pts[i*2+1], p->pts[i*2], p->pts[i*2+1], attr->xform);
+
+ // Find bounds
+ for (i = 0; i < path->npts-1; i += 3) {
+ curve = &path->pts[i*2];
+ nsvg__curveBounds(bounds, curve);
+ if (i == 0) {
+ path->bounds[0] = bounds[0];
+ path->bounds[1] = bounds[1];
+ path->bounds[2] = bounds[2];
+ path->bounds[3] = bounds[3];
+ } else {
+ path->bounds[0] = nsvg__minf(path->bounds[0], bounds[0]);
+ path->bounds[1] = nsvg__minf(path->bounds[1], bounds[1]);
+ path->bounds[2] = nsvg__maxf(path->bounds[2], bounds[2]);
+ path->bounds[3] = nsvg__maxf(path->bounds[3], bounds[3]);
+ }
+ }
+
+ path->next = p->plist;
+ p->plist = path;
+
+ return;
+
+error:
+ if (path != NULL) {
+ if (path->pts != NULL) free(path->pts);
+ free(path);
+ }
+}
+
+static const char* nsvg__parseNumber(const char* s, char* it, const int size)
+{
+ const int last = size-1;
+ int i = 0;
+
+ // sign
+ if (*s == '-' || *s == '+') {
+ if (i < last) it[i++] = *s;
+ s++;
+ }
+ // integer part
+ while (*s && nsvg__isdigit(*s)) {
+ if (i < last) it[i++] = *s;
+ s++;
+ }
+ if (*s == '.') {
+ // decimal point
+ if (i < last) it[i++] = *s;
+ s++;
+ // fraction part
+ while (*s && nsvg__isdigit(*s)) {
+ if (i < last) it[i++] = *s;
+ s++;
+ }
+ }
+ // exponent
+ if (*s == 'e' || *s == 'E') {
+ if (i < last) it[i++] = *s;
+ s++;
+ if (*s == '-' || *s == '+') {
+ if (i < last) it[i++] = *s;
+ s++;
+ }
+ while (*s && nsvg__isdigit(*s)) {
+ if (i < last) it[i++] = *s;
+ s++;
+ }
+ }
+ it[i] = '\0';
+
+ return s;
+}
+
+static const char* nsvg__getNextPathItem(const char* s, char* it)
+{
+ it[0] = '\0';
+ // Skip white spaces and commas
+ while (*s && (nsvg__isspace(*s) || *s == ',')) s++;
+ if (!*s) return s;
+ if (*s == '-' || *s == '+' || *s == '.' || nsvg__isdigit(*s)) {
+ s = nsvg__parseNumber(s, it, 64);
+ } else {
+ // Parse command
+ it[0] = *s++;
+ it[1] = '\0';
+ return s;
+ }
+
+ return s;
+}
+
+static unsigned int nsvg__parseColorHex(const char* str)
+{
+ unsigned int c = 0, r = 0, g = 0, b = 0;
+ int n = 0;
+ str++; // skip #
+ // Calculate number of characters.
+ while(str[n] && !nsvg__isspace(str[n]))
+ n++;
+ if (n == 6) {
+ sscanf(str, "%x", &c);
+ } else if (n == 3) {
+ sscanf(str, "%x", &c);
+ c = (c&0xf) | ((c&0xf0) << 4) | ((c&0xf00) << 8);
+ c |= c<<4;
+ }
+ r = (c >> 16) & 0xff;
+ g = (c >> 8) & 0xff;
+ b = c & 0xff;
+ return NSVG_RGB(r,g,b);
+}
+
+static unsigned int nsvg__parseColorRGB(const char* str)
+{
+ int r = -1, g = -1, b = -1;
+ char s1[32]="", s2[32]="";
+ sscanf(str + 4, "%d%[%%, \t]%d%[%%, \t]%d", &r, s1, &g, s2, &b);
+ if (strchr(s1, '%')) {
+ return NSVG_RGB((r*255)/100,(g*255)/100,(b*255)/100);
+ } else {
+ return NSVG_RGB(r,g,b);
+ }
+}
+
+typedef struct NSVGNamedColor {
+ const char* name;
+ unsigned int color;
+} NSVGNamedColor;
+
+NSVGNamedColor nsvg__colors[] = {
+
+ { "red", NSVG_RGB(255, 0, 0) },
+ { "green", NSVG_RGB( 0, 128, 0) },
+ { "blue", NSVG_RGB( 0, 0, 255) },
+ { "yellow", NSVG_RGB(255, 255, 0) },
+ { "cyan", NSVG_RGB( 0, 255, 255) },
+ { "magenta", NSVG_RGB(255, 0, 255) },
+ { "black", NSVG_RGB( 0, 0, 0) },
+ { "grey", NSVG_RGB(128, 128, 128) },
+ { "gray", NSVG_RGB(128, 128, 128) },
+ { "white", NSVG_RGB(255, 255, 255) },
+
+#ifdef NANOSVG_ALL_COLOR_KEYWORDS
+ { "aliceblue", NSVG_RGB(240, 248, 255) },
+ { "antiquewhite", NSVG_RGB(250, 235, 215) },
+ { "aqua", NSVG_RGB( 0, 255, 255) },
+ { "aquamarine", NSVG_RGB(127, 255, 212) },
+ { "azure", NSVG_RGB(240, 255, 255) },
+ { "beige", NSVG_RGB(245, 245, 220) },
+ { "bisque", NSVG_RGB(255, 228, 196) },
+ { "blanchedalmond", NSVG_RGB(255, 235, 205) },
+ { "blueviolet", NSVG_RGB(138, 43, 226) },
+ { "brown", NSVG_RGB(165, 42, 42) },
+ { "burlywood", NSVG_RGB(222, 184, 135) },
+ { "cadetblue", NSVG_RGB( 95, 158, 160) },
+ { "chartreuse", NSVG_RGB(127, 255, 0) },
+ { "chocolate", NSVG_RGB(210, 105, 30) },
+ { "coral", NSVG_RGB(255, 127, 80) },
+ { "cornflowerblue", NSVG_RGB(100, 149, 237) },
+ { "cornsilk", NSVG_RGB(255, 248, 220) },
+ { "crimson", NSVG_RGB(220, 20, 60) },
+ { "darkblue", NSVG_RGB( 0, 0, 139) },
+ { "darkcyan", NSVG_RGB( 0, 139, 139) },
+ { "darkgoldenrod", NSVG_RGB(184, 134, 11) },
+ { "darkgray", NSVG_RGB(169, 169, 169) },
+ { "darkgreen", NSVG_RGB( 0, 100, 0) },
+ { "darkgrey", NSVG_RGB(169, 169, 169) },
+ { "darkkhaki", NSVG_RGB(189, 183, 107) },
+ { "darkmagenta", NSVG_RGB(139, 0, 139) },
+ { "darkolivegreen", NSVG_RGB( 85, 107, 47) },
+ { "darkorange", NSVG_RGB(255, 140, 0) },
+ { "darkorchid", NSVG_RGB(153, 50, 204) },
+ { "darkred", NSVG_RGB(139, 0, 0) },
+ { "darksalmon", NSVG_RGB(233, 150, 122) },
+ { "darkseagreen", NSVG_RGB(143, 188, 143) },
+ { "darkslateblue", NSVG_RGB( 72, 61, 139) },
+ { "darkslategray", NSVG_RGB( 47, 79, 79) },
+ { "darkslategrey", NSVG_RGB( 47, 79, 79) },
+ { "darkturquoise", NSVG_RGB( 0, 206, 209) },
+ { "darkviolet", NSVG_RGB(148, 0, 211) },
+ { "deeppink", NSVG_RGB(255, 20, 147) },
+ { "deepskyblue", NSVG_RGB( 0, 191, 255) },
+ { "dimgray", NSVG_RGB(105, 105, 105) },
+ { "dimgrey", NSVG_RGB(105, 105, 105) },
+ { "dodgerblue", NSVG_RGB( 30, 144, 255) },
+ { "firebrick", NSVG_RGB(178, 34, 34) },
+ { "floralwhite", NSVG_RGB(255, 250, 240) },
+ { "forestgreen", NSVG_RGB( 34, 139, 34) },
+ { "fuchsia", NSVG_RGB(255, 0, 255) },
+ { "gainsboro", NSVG_RGB(220, 220, 220) },
+ { "ghostwhite", NSVG_RGB(248, 248, 255) },
+ { "gold", NSVG_RGB(255, 215, 0) },
+ { "goldenrod", NSVG_RGB(218, 165, 32) },
+ { "greenyellow", NSVG_RGB(173, 255, 47) },
+ { "honeydew", NSVG_RGB(240, 255, 240) },
+ { "hotpink", NSVG_RGB(255, 105, 180) },
+ { "indianred", NSVG_RGB(205, 92, 92) },
+ { "indigo", NSVG_RGB( 75, 0, 130) },
+ { "ivory", NSVG_RGB(255, 255, 240) },
+ { "khaki", NSVG_RGB(240, 230, 140) },
+ { "lavender", NSVG_RGB(230, 230, 250) },
+ { "lavenderblush", NSVG_RGB(255, 240, 245) },
+ { "lawngreen", NSVG_RGB(124, 252, 0) },
+ { "lemonchiffon", NSVG_RGB(255, 250, 205) },
+ { "lightblue", NSVG_RGB(173, 216, 230) },
+ { "lightcoral", NSVG_RGB(240, 128, 128) },
+ { "lightcyan", NSVG_RGB(224, 255, 255) },
+ { "lightgoldenrodyellow", NSVG_RGB(250, 250, 210) },
+ { "lightgray", NSVG_RGB(211, 211, 211) },
+ { "lightgreen", NSVG_RGB(144, 238, 144) },
+ { "lightgrey", NSVG_RGB(211, 211, 211) },
+ { "lightpink", NSVG_RGB(255, 182, 193) },
+ { "lightsalmon", NSVG_RGB(255, 160, 122) },
+ { "lightseagreen", NSVG_RGB( 32, 178, 170) },
+ { "lightskyblue", NSVG_RGB(135, 206, 250) },
+ { "lightslategray", NSVG_RGB(119, 136, 153) },
+ { "lightslategrey", NSVG_RGB(119, 136, 153) },
+ { "lightsteelblue", NSVG_RGB(176, 196, 222) },
+ { "lightyellow", NSVG_RGB(255, 255, 224) },
+ { "lime", NSVG_RGB( 0, 255, 0) },
+ { "limegreen", NSVG_RGB( 50, 205, 50) },
+ { "linen", NSVG_RGB(250, 240, 230) },
+ { "maroon", NSVG_RGB(128, 0, 0) },
+ { "mediumaquamarine", NSVG_RGB(102, 205, 170) },
+ { "mediumblue", NSVG_RGB( 0, 0, 205) },
+ { "mediumorchid", NSVG_RGB(186, 85, 211) },
+ { "mediumpurple", NSVG_RGB(147, 112, 219) },
+ { "mediumseagreen", NSVG_RGB( 60, 179, 113) },
+ { "mediumslateblue", NSVG_RGB(123, 104, 238) },
+ { "mediumspringgreen", NSVG_RGB( 0, 250, 154) },
+ { "mediumturquoise", NSVG_RGB( 72, 209, 204) },
+ { "mediumvioletred", NSVG_RGB(199, 21, 133) },
+ { "midnightblue", NSVG_RGB( 25, 25, 112) },
+ { "mintcream", NSVG_RGB(245, 255, 250) },
+ { "mistyrose", NSVG_RGB(255, 228, 225) },
+ { "moccasin", NSVG_RGB(255, 228, 181) },
+ { "navajowhite", NSVG_RGB(255, 222, 173) },
+ { "navy", NSVG_RGB( 0, 0, 128) },
+ { "oldlace", NSVG_RGB(253, 245, 230) },
+ { "olive", NSVG_RGB(128, 128, 0) },
+ { "olivedrab", NSVG_RGB(107, 142, 35) },
+ { "orange", NSVG_RGB(255, 165, 0) },
+ { "orangered", NSVG_RGB(255, 69, 0) },
+ { "orchid", NSVG_RGB(218, 112, 214) },
+ { "palegoldenrod", NSVG_RGB(238, 232, 170) },
+ { "palegreen", NSVG_RGB(152, 251, 152) },
+ { "paleturquoise", NSVG_RGB(175, 238, 238) },
+ { "palevioletred", NSVG_RGB(219, 112, 147) },
+ { "papayawhip", NSVG_RGB(255, 239, 213) },
+ { "peachpuff", NSVG_RGB(255, 218, 185) },
+ { "peru", NSVG_RGB(205, 133, 63) },
+ { "pink", NSVG_RGB(255, 192, 203) },
+ { "plum", NSVG_RGB(221, 160, 221) },
+ { "powderblue", NSVG_RGB(176, 224, 230) },
+ { "purple", NSVG_RGB(128, 0, 128) },
+ { "rosybrown", NSVG_RGB(188, 143, 143) },
+ { "royalblue", NSVG_RGB( 65, 105, 225) },
+ { "saddlebrown", NSVG_RGB(139, 69, 19) },
+ { "salmon", NSVG_RGB(250, 128, 114) },
+ { "sandybrown", NSVG_RGB(244, 164, 96) },
+ { "seagreen", NSVG_RGB( 46, 139, 87) },
+ { "seashell", NSVG_RGB(255, 245, 238) },
+ { "sienna", NSVG_RGB(160, 82, 45) },
+ { "silver", NSVG_RGB(192, 192, 192) },
+ { "skyblue", NSVG_RGB(135, 206, 235) },
+ { "slateblue", NSVG_RGB(106, 90, 205) },
+ { "slategray", NSVG_RGB(112, 128, 144) },
+ { "slategrey", NSVG_RGB(112, 128, 144) },
+ { "snow", NSVG_RGB(255, 250, 250) },
+ { "springgreen", NSVG_RGB( 0, 255, 127) },
+ { "steelblue", NSVG_RGB( 70, 130, 180) },
+ { "tan", NSVG_RGB(210, 180, 140) },
+ { "teal", NSVG_RGB( 0, 128, 128) },
+ { "thistle", NSVG_RGB(216, 191, 216) },
+ { "tomato", NSVG_RGB(255, 99, 71) },
+ { "turquoise", NSVG_RGB( 64, 224, 208) },
+ { "violet", NSVG_RGB(238, 130, 238) },
+ { "wheat", NSVG_RGB(245, 222, 179) },
+ { "whitesmoke", NSVG_RGB(245, 245, 245) },
+ { "yellowgreen", NSVG_RGB(154, 205, 50) },
+#endif
+};
+
+static unsigned int nsvg__parseColorName(const char* str)
+{
+ int i, ncolors = sizeof(nsvg__colors) / sizeof(NSVGNamedColor);
+
+ for (i = 0; i < ncolors; i++) {
+ if (strcmp(nsvg__colors[i].name, str) == 0) {
+ return nsvg__colors[i].color;
+ }
+ }
+
+ return NSVG_RGB(128, 128, 128);
+}
+
+static unsigned int nsvg__parseColor(const char* str)
+{
+ size_t len = 0;
+ while(*str == ' ') ++str;
+ len = strlen(str);
+ if (len >= 1 && *str == '#')
+ return nsvg__parseColorHex(str);
+ else if (len >= 4 && str[0] == 'r' && str[1] == 'g' && str[2] == 'b' && str[3] == '(')
+ return nsvg__parseColorRGB(str);
+ return nsvg__parseColorName(str);
+}
+
+static float nsvg__parseOpacity(const char* str)
+{
+ float val = 0;
+ sscanf(str, "%f", &val);
+ if (val < 0.0f) val = 0.0f;
+ if (val > 1.0f) val = 1.0f;
+ return val;
+}
+
+static int nsvg__parseUnits(const char* units)
+{
+ if (units[0] == 'p' && units[1] == 'x')
+ return NSVG_UNITS_PX;
+ else if (units[0] == 'p' && units[1] == 't')
+ return NSVG_UNITS_PT;
+ else if (units[0] == 'p' && units[1] == 'c')
+ return NSVG_UNITS_PC;
+ else if (units[0] == 'm' && units[1] == 'm')
+ return NSVG_UNITS_MM;
+ else if (units[0] == 'c' && units[1] == 'm')
+ return NSVG_UNITS_CM;
+ else if (units[0] == 'i' && units[1] == 'n')
+ return NSVG_UNITS_IN;
+ else if (units[0] == '%')
+ return NSVG_UNITS_PERCENT;
+ else if (units[0] == 'e' && units[1] == 'm')
+ return NSVG_UNITS_EM;
+ else if (units[0] == 'e' && units[1] == 'x')
+ return NSVG_UNITS_EX;
+ return NSVG_UNITS_USER;
+}
+
+static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str)
+{
+ NSVGcoordinate coord = {0, NSVG_UNITS_USER};
+ char units[32]="";
+ sscanf(str, "%f%s", &coord.value, units);
+ coord.units = nsvg__parseUnits(units);
+ return coord;
+}
+
+static NSVGcoordinate nsvg__coord(float v, int units)
+{
+ NSVGcoordinate coord = {v, units};
+ return coord;
+}
+
+static float nsvg__parseCoordinate(NSVGparser* p, const char* str, float orig, float length)
+{
+ NSVGcoordinate coord = nsvg__parseCoordinateRaw(str);
+ return nsvg__convertToPixels(p, coord, orig, length);
+}
+
+static int nsvg__parseTransformArgs(const char* str, float* args, int maxNa, int* na)
+{
+ const char* end;
+ const char* ptr;
+ char it[64];
+
+ *na = 0;
+ ptr = str;
+ while (*ptr && *ptr != '(') ++ptr;
+ if (*ptr == 0)
+ return 1;
+ end = ptr;
+ while (*end && *end != ')') ++end;
+ if (*end == 0)
+ return 1;
+
+ while (ptr < end) {
+ if (*ptr == '-' || *ptr == '+' || *ptr == '.' || nsvg__isdigit(*ptr)) {
+ if (*na >= maxNa) return 0;
+ ptr = nsvg__parseNumber(ptr, it, 64);
+ args[(*na)++] = (float)atof(it);
+ } else {
+ ++ptr;
+ }
+ }
+ return (int)(end - str);
+}
+
+
+static int nsvg__parseMatrix(float* xform, const char* str)
+{
+ float t[6];
+ int na = 0;
+ int len = nsvg__parseTransformArgs(str, t, 6, &na);
+ if (na != 6) return len;
+ memcpy(xform, t, sizeof(float)*6);
+ return len;
+}
+
+static int nsvg__parseTranslate(float* xform, const char* str)
+{
+ float args[2];
+ float t[6];
+ int na = 0;
+ int len = nsvg__parseTransformArgs(str, args, 2, &na);
+ if (na == 1) args[1] = 0.0;
+
+ nsvg__xformSetTranslation(t, args[0], args[1]);
+ memcpy(xform, t, sizeof(float)*6);
+ return len;
+}
+
+static int nsvg__parseScale(float* xform, const char* str)
+{
+ float args[2];
+ int na = 0;
+ float t[6];
+ int len = nsvg__parseTransformArgs(str, args, 2, &na);
+ if (na == 1) args[1] = args[0];
+ nsvg__xformSetScale(t, args[0], args[1]);
+ memcpy(xform, t, sizeof(float)*6);
+ return len;
+}
+
+static int nsvg__parseSkewX(float* xform, const char* str)
+{
+ float args[1];
+ int na = 0;
+ float t[6];
+ int len = nsvg__parseTransformArgs(str, args, 1, &na);
+ nsvg__xformSetSkewX(t, args[0]/180.0f*NSVG_PI);
+ memcpy(xform, t, sizeof(float)*6);
+ return len;
+}
+
+static int nsvg__parseSkewY(float* xform, const char* str)
+{
+ float args[1];
+ int na = 0;
+ float t[6];
+ int len = nsvg__parseTransformArgs(str, args, 1, &na);
+ nsvg__xformSetSkewY(t, args[0]/180.0f*NSVG_PI);
+ memcpy(xform, t, sizeof(float)*6);
+ return len;
+}
+
+static int nsvg__parseRotate(float* xform, const char* str)
+{
+ float args[3];
+ int na = 0;
+ float m[6];
+ float t[6];
+ int len = nsvg__parseTransformArgs(str, args, 3, &na);
+ if (na == 1)
+ args[1] = args[2] = 0.0f;
+ nsvg__xformIdentity(m);
+
+ if (na > 1) {
+ nsvg__xformSetTranslation(t, -args[1], -args[2]);
+ nsvg__xformMultiply(m, t);
+ }
+
+ nsvg__xformSetRotation(t, args[0]/180.0f*NSVG_PI);
+ nsvg__xformMultiply(m, t);
+
+ if (na > 1) {
+ nsvg__xformSetTranslation(t, args[1], args[2]);
+ nsvg__xformMultiply(m, t);
+ }
+
+ memcpy(xform, m, sizeof(float)*6);
+
+ return len;
+}
+
+static void nsvg__parseTransform(float* xform, const char* str)
+{
+ float t[6];
+ nsvg__xformIdentity(xform);
+ while (*str)
+ {
+ if (strncmp(str, "matrix", 6) == 0)
+ str += nsvg__parseMatrix(t, str);
+ else if (strncmp(str, "translate", 9) == 0)
+ str += nsvg__parseTranslate(t, str);
+ else if (strncmp(str, "scale", 5) == 0)
+ str += nsvg__parseScale(t, str);
+ else if (strncmp(str, "rotate", 6) == 0)
+ str += nsvg__parseRotate(t, str);
+ else if (strncmp(str, "skewX", 5) == 0)
+ str += nsvg__parseSkewX(t, str);
+ else if (strncmp(str, "skewY", 5) == 0)
+ str += nsvg__parseSkewY(t, str);
+ else{
+ ++str;
+ continue;
+ }
+
+ nsvg__xformPremultiply(xform, t);
+ }
+}
+
+static void nsvg__parseUrl(char* id, const char* str)
+{
+ int i = 0;
+ str += 4; // "url(";
+ if (*str == '#')
+ str++;
+ while (i < 63 && *str != ')') {
+ id[i] = *str++;
+ i++;
+ }
+ id[i] = '\0';
+}
+
+static char nsvg__parseLineCap(const char* str)
+{
+ if (strcmp(str, "butt") == 0)
+ return NSVG_CAP_BUTT;
+ else if (strcmp(str, "round") == 0)
+ return NSVG_CAP_ROUND;
+ else if (strcmp(str, "square") == 0)
+ return NSVG_CAP_SQUARE;
+ // TODO: handle inherit.
+ return NSVG_CAP_BUTT;
+}
+
+static char nsvg__parseLineJoin(const char* str)
+{
+ if (strcmp(str, "miter") == 0)
+ return NSVG_JOIN_MITER;
+ else if (strcmp(str, "round") == 0)
+ return NSVG_JOIN_ROUND;
+ else if (strcmp(str, "bevel") == 0)
+ return NSVG_JOIN_BEVEL;
+ // TODO: handle inherit.
+ return NSVG_CAP_BUTT;
+}
+
+static char nsvg__parseFillRule(const char* str)
+{
+ if (strcmp(str, "nonzero") == 0)
+ return NSVG_FILLRULE_NONZERO;
+ else if (strcmp(str, "evenodd") == 0)
+ return NSVG_FILLRULE_EVENODD;
+ // TODO: handle inherit.
+ return NSVG_FILLRULE_NONZERO;
+}
+
+static const char* nsvg__getNextDashItem(const char* s, char* it)
+{
+ int n = 0;
+ it[0] = '\0';
+ // Skip white spaces and commas
+ while (*s && (nsvg__isspace(*s) || *s == ',')) s++;
+ // Advance until whitespace, comma or end.
+ while (*s && (!nsvg__isspace(*s) && *s != ',')) {
+ if (n < 63)
+ it[n++] = *s;
+ s++;
+ }
+ it[n++] = '\0';
+ return s;
+}
+
+static int nsvg__parseStrokeDashArray(NSVGparser* p, const char* str, float* strokeDashArray)
+{
+ char item[64];
+ int count = 0, i;
+ float sum = 0.0f;
+
+ // Handle "none"
+ if (str[0] == 'n')
+ return 0;
+
+ // Parse dashes
+ while (*str) {
+ str = nsvg__getNextDashItem(str, item);
+ if (!*item) break;
+ if (count < NSVG_MAX_DASHES)
+ strokeDashArray[count++] = fabsf(nsvg__parseCoordinate(p, item, 0.0f, nsvg__actualLength(p)));
+ }
+
+ for (i = 0; i < count; i++)
+ sum += strokeDashArray[i];
+ if (sum <= 1e-6f)
+ count = 0;
+
+ return count;
+}
+
+static void nsvg__parseStyle(NSVGparser* p, const char* str);
+
+static int nsvg__parseAttr(NSVGparser* p, const char* name, const char* value)
+{
+ float xform[6];
+ NSVGattrib* attr = nsvg__getAttr(p);
+ if (!attr) return 0;
+
+ if (strcmp(name, "style") == 0) {
+ nsvg__parseStyle(p, value);
+ } else if (strcmp(name, "display") == 0) {
+ if (strcmp(value, "none") == 0)
+ attr->visible = 0;
+ // Don't reset ->visible on display:inline, one display:none hides the whole subtree
+
+ } else if (strcmp(name, "fill") == 0) {
+ if (strcmp(value, "none") == 0) {
+ attr->hasFill = 0;
+ } else if (strncmp(value, "url(", 4) == 0) {
+ attr->hasFill = 2;
+ nsvg__parseUrl(attr->fillGradient, value);
+ } else {
+ attr->hasFill = 1;
+ attr->fillColor = nsvg__parseColor(value);
+ }
+ } else if (strcmp(name, "opacity") == 0) {
+ attr->opacity = nsvg__parseOpacity(value);
+ } else if (strcmp(name, "fill-opacity") == 0) {
+ attr->fillOpacity = nsvg__parseOpacity(value);
+ } else if (strcmp(name, "stroke") == 0) {
+ if (strcmp(value, "none") == 0) {
+ attr->hasStroke = 0;
+ } else if (strncmp(value, "url(", 4) == 0) {
+ attr->hasStroke = 2;
+ nsvg__parseUrl(attr->strokeGradient, value);
+ } else {
+ attr->hasStroke = 1;
+ attr->strokeColor = nsvg__parseColor(value);
+ }
+ } else if (strcmp(name, "stroke-width") == 0) {
+ attr->strokeWidth = nsvg__parseCoordinate(p, value, 0.0f, nsvg__actualLength(p));
+ } else if (strcmp(name, "stroke-dasharray") == 0) {
+ attr->strokeDashCount = nsvg__parseStrokeDashArray(p, value, attr->strokeDashArray);
+ } else if (strcmp(name, "stroke-dashoffset") == 0) {
+ attr->strokeDashOffset = nsvg__parseCoordinate(p, value, 0.0f, nsvg__actualLength(p));
+ } else if (strcmp(name, "stroke-opacity") == 0) {
+ attr->strokeOpacity = nsvg__parseOpacity(value);
+ } else if (strcmp(name, "stroke-linecap") == 0) {
+ attr->strokeLineCap = nsvg__parseLineCap(value);
+ } else if (strcmp(name, "stroke-linejoin") == 0) {
+ attr->strokeLineJoin = nsvg__parseLineJoin(value);
+ } else if (strcmp(name, "fill-rule") == 0) {
+ attr->fillRule = nsvg__parseFillRule(value);
+ } else if (strcmp(name, "font-size") == 0) {
+ attr->fontSize = nsvg__parseCoordinate(p, value, 0.0f, nsvg__actualLength(p));
+ } else if (strcmp(name, "transform") == 0) {
+ nsvg__parseTransform(xform, value);
+ nsvg__xformPremultiply(attr->xform, xform);
+ } else if (strcmp(name, "stop-color") == 0) {
+ attr->stopColor = nsvg__parseColor(value);
+ } else if (strcmp(name, "stop-opacity") == 0) {
+ attr->stopOpacity = nsvg__parseOpacity(value);
+ } else if (strcmp(name, "offset") == 0) {
+ attr->stopOffset = nsvg__parseCoordinate(p, value, 0.0f, 1.0f);
+ } else if (strcmp(name, "id") == 0) {
+ strncpy(attr->id, value, 63);
+ attr->id[63] = '\0';
+ } else {
+ return 0;
+ }
+ return 1;
+}
+
+static int nsvg__parseNameValue(NSVGparser* p, const char* start, const char* end)
+{
+ const char* str;
+ const char* val;
+ char name[512];
+ char value[512];
+ int n;
+
+ str = start;
+ while (str < end && *str != ':') ++str;
+
+ val = str;
+
+ // Right Trim
+ while (str > start && (*str == ':' || nsvg__isspace(*str))) --str;
+ ++str;
+
+ n = (int)(str - start);
+ if (n > 511) n = 511;
+ if (n) memcpy(name, start, n);
+ name[n] = 0;
+
+ while (val < end && (*val == ':' || nsvg__isspace(*val))) ++val;
+
+ n = (int)(end - val);
+ if (n > 511) n = 511;
+ if (n) memcpy(value, val, n);
+ value[n] = 0;
+
+ return nsvg__parseAttr(p, name, value);
+}
+
+static void nsvg__parseStyle(NSVGparser* p, const char* str)
+{
+ const char* start;
+ const char* end;
+
+ while (*str) {
+ // Left Trim
+ while(*str && nsvg__isspace(*str)) ++str;
+ start = str;
+ while(*str && *str != ';') ++str;
+ end = str;
+
+ // Right Trim
+ while (end > start && (*end == ';' || nsvg__isspace(*end))) --end;
+ ++end;
+
+ nsvg__parseNameValue(p, start, end);
+ if (*str) ++str;
+ }
+}
+
+static void nsvg__parseAttribs(NSVGparser* p, const char** attr)
+{
+ int i;
+ for (i = 0; attr[i]; i += 2)
+ {
+ if (strcmp(attr[i], "style") == 0)
+ nsvg__parseStyle(p, attr[i + 1]);
+ else
+ nsvg__parseAttr(p, attr[i], attr[i + 1]);
+ }
+}
+
+static int nsvg__getArgsPerElement(char cmd)
+{
+ switch (cmd) {
+ case 'v':
+ case 'V':
+ case 'h':
+ case 'H':
+ return 1;
+ case 'm':
+ case 'M':
+ case 'l':
+ case 'L':
+ case 't':
+ case 'T':
+ return 2;
+ case 'q':
+ case 'Q':
+ case 's':
+ case 'S':
+ return 4;
+ case 'c':
+ case 'C':
+ return 6;
+ case 'a':
+ case 'A':
+ return 7;
+ }
+ return 0;
+}
+
+static void nsvg__pathMoveTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
+{
+ if (rel) {
+ *cpx += args[0];
+ *cpy += args[1];
+ } else {
+ *cpx = args[0];
+ *cpy = args[1];
+ }
+ nsvg__moveTo(p, *cpx, *cpy);
+}
+
+static void nsvg__pathLineTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
+{
+ if (rel) {
+ *cpx += args[0];
+ *cpy += args[1];
+ } else {
+ *cpx = args[0];
+ *cpy = args[1];
+ }
+ nsvg__lineTo(p, *cpx, *cpy);
+}
+
+static void nsvg__pathHLineTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
+{
+ if (rel)
+ *cpx += args[0];
+ else
+ *cpx = args[0];
+ nsvg__lineTo(p, *cpx, *cpy);
+}
+
+static void nsvg__pathVLineTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
+{
+ if (rel)
+ *cpy += args[0];
+ else
+ *cpy = args[0];
+ nsvg__lineTo(p, *cpx, *cpy);
+}
+
+static void nsvg__pathCubicBezTo(NSVGparser* p, float* cpx, float* cpy,
+ float* cpx2, float* cpy2, float* args, int rel)
+{
+ float x2, y2, cx1, cy1, cx2, cy2;
+
+ if (rel) {
+ cx1 = *cpx + args[0];
+ cy1 = *cpy + args[1];
+ cx2 = *cpx + args[2];
+ cy2 = *cpy + args[3];
+ x2 = *cpx + args[4];
+ y2 = *cpy + args[5];
+ } else {
+ cx1 = args[0];
+ cy1 = args[1];
+ cx2 = args[2];
+ cy2 = args[3];
+ x2 = args[4];
+ y2 = args[5];
+ }
+
+ nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2);
+
+ *cpx2 = cx2;
+ *cpy2 = cy2;
+ *cpx = x2;
+ *cpy = y2;
+}
+
+static void nsvg__pathCubicBezShortTo(NSVGparser* p, float* cpx, float* cpy,
+ float* cpx2, float* cpy2, float* args, int rel)
+{
+ float x1, y1, x2, y2, cx1, cy1, cx2, cy2;
+
+ x1 = *cpx;
+ y1 = *cpy;
+ if (rel) {
+ cx2 = *cpx + args[0];
+ cy2 = *cpy + args[1];
+ x2 = *cpx + args[2];
+ y2 = *cpy + args[3];
+ } else {
+ cx2 = args[0];
+ cy2 = args[1];
+ x2 = args[2];
+ y2 = args[3];
+ }
+
+ cx1 = 2*x1 - *cpx2;
+ cy1 = 2*y1 - *cpy2;
+
+ nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2);
+
+ *cpx2 = cx2;
+ *cpy2 = cy2;
+ *cpx = x2;
+ *cpy = y2;
+}
+
+static void nsvg__pathQuadBezTo(NSVGparser* p, float* cpx, float* cpy,
+ float* cpx2, float* cpy2, float* args, int rel)
+{
+ float x1, y1, x2, y2, cx, cy;
+ float cx1, cy1, cx2, cy2;
+
+ x1 = *cpx;
+ y1 = *cpy;
+ if (rel) {
+ cx = *cpx + args[0];
+ cy = *cpy + args[1];
+ x2 = *cpx + args[2];
+ y2 = *cpy + args[3];
+ } else {
+ cx = args[0];
+ cy = args[1];
+ x2 = args[2];
+ y2 = args[3];
+ }
+
+ // Convert to cubic bezier
+ cx1 = x1 + 2.0f/3.0f*(cx - x1);
+ cy1 = y1 + 2.0f/3.0f*(cy - y1);
+ cx2 = x2 + 2.0f/3.0f*(cx - x2);
+ cy2 = y2 + 2.0f/3.0f*(cy - y2);
+
+ nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2);
+
+ *cpx2 = cx;
+ *cpy2 = cy;
+ *cpx = x2;
+ *cpy = y2;
+}
+
+static void nsvg__pathQuadBezShortTo(NSVGparser* p, float* cpx, float* cpy,
+ float* cpx2, float* cpy2, float* args, int rel)
+{
+ float x1, y1, x2, y2, cx, cy;
+ float cx1, cy1, cx2, cy2;
+
+ x1 = *cpx;
+ y1 = *cpy;
+ if (rel) {
+ x2 = *cpx + args[0];
+ y2 = *cpy + args[1];
+ } else {
+ x2 = args[0];
+ y2 = args[1];
+ }
+
+ cx = 2*x1 - *cpx2;
+ cy = 2*y1 - *cpy2;
+
+ // Convert to cubix bezier
+ cx1 = x1 + 2.0f/3.0f*(cx - x1);
+ cy1 = y1 + 2.0f/3.0f*(cy - y1);
+ cx2 = x2 + 2.0f/3.0f*(cx - x2);
+ cy2 = y2 + 2.0f/3.0f*(cy - y2);
+
+ nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2);
+
+ *cpx2 = cx;
+ *cpy2 = cy;
+ *cpx = x2;
+ *cpy = y2;
+}
+
+static float nsvg__sqr(float x) { return x*x; }
+static float nsvg__vmag(float x, float y) { return sqrtf(x*x + y*y); }
+
+static float nsvg__vecrat(float ux, float uy, float vx, float vy)
+{
+ return (ux*vx + uy*vy) / (nsvg__vmag(ux,uy) * nsvg__vmag(vx,vy));
+}
+
+static float nsvg__vecang(float ux, float uy, float vx, float vy)
+{
+ float r = nsvg__vecrat(ux,uy, vx,vy);
+ if (r < -1.0f) r = -1.0f;
+ if (r > 1.0f) r = 1.0f;
+ return ((ux*vy < uy*vx) ? -1.0f : 1.0f) * acosf(r);
+}
+
+static void nsvg__pathArcTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
+{
+ // Ported from canvg (https://code.google.com/p/canvg/)
+ float rx, ry, rotx;
+ float x1, y1, x2, y2, cx, cy, dx, dy, d;
+ float x1p, y1p, cxp, cyp, s, sa, sb;
+ float ux, uy, vx, vy, a1, da;
+ float x, y, tanx, tany, a, px = 0, py = 0, ptanx = 0, ptany = 0, t[6];
+ float sinrx, cosrx;
+ int fa, fs;
+ int i, ndivs;
+ float hda, kappa;
+
+ rx = fabsf(args[0]); // y radius
+ ry = fabsf(args[1]); // x radius
+ rotx = args[2] / 180.0f * NSVG_PI; // x rotation engle
+ fa = fabsf(args[3]) > 1e-6 ? 1 : 0; // Large arc
+ fs = fabsf(args[4]) > 1e-6 ? 1 : 0; // Sweep direction
+ x1 = *cpx; // start point
+ y1 = *cpy;
+ if (rel) { // end point
+ x2 = *cpx + args[5];
+ y2 = *cpy + args[6];
+ } else {
+ x2 = args[5];
+ y2 = args[6];
+ }
+
+ dx = x1 - x2;
+ dy = y1 - y2;
+ d = sqrtf(dx*dx + dy*dy);
+ if (d < 1e-6f || rx < 1e-6f || ry < 1e-6f) {
+ // The arc degenerates to a line
+ nsvg__lineTo(p, x2, y2);
+ *cpx = x2;
+ *cpy = y2;
+ return;
+ }
+
+ sinrx = sinf(rotx);
+ cosrx = cosf(rotx);
+
+ // Convert to center point parameterization.
+ // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
+ // 1) Compute x1', y1'
+ x1p = cosrx * dx / 2.0f + sinrx * dy / 2.0f;
+ y1p = -sinrx * dx / 2.0f + cosrx * dy / 2.0f;
+ d = nsvg__sqr(x1p)/nsvg__sqr(rx) + nsvg__sqr(y1p)/nsvg__sqr(ry);
+ if (d > 1) {
+ d = sqrtf(d);
+ rx *= d;
+ ry *= d;
+ }
+ // 2) Compute cx', cy'
+ s = 0.0f;
+ sa = nsvg__sqr(rx)*nsvg__sqr(ry) - nsvg__sqr(rx)*nsvg__sqr(y1p) - nsvg__sqr(ry)*nsvg__sqr(x1p);
+ sb = nsvg__sqr(rx)*nsvg__sqr(y1p) + nsvg__sqr(ry)*nsvg__sqr(x1p);
+ if (sa < 0.0f) sa = 0.0f;
+ if (sb > 0.0f)
+ s = sqrtf(sa / sb);
+ if (fa == fs)
+ s = -s;
+ cxp = s * rx * y1p / ry;
+ cyp = s * -ry * x1p / rx;
+
+ // 3) Compute cx,cy from cx',cy'
+ cx = (x1 + x2)/2.0f + cosrx*cxp - sinrx*cyp;
+ cy = (y1 + y2)/2.0f + sinrx*cxp + cosrx*cyp;
+
+ // 4) Calculate theta1, and delta theta.
+ ux = (x1p - cxp) / rx;
+ uy = (y1p - cyp) / ry;
+ vx = (-x1p - cxp) / rx;
+ vy = (-y1p - cyp) / ry;
+ a1 = nsvg__vecang(1.0f,0.0f, ux,uy); // Initial angle
+ da = nsvg__vecang(ux,uy, vx,vy); // Delta angle
+
+// if (vecrat(ux,uy,vx,vy) <= -1.0f) da = NSVG_PI;
+// if (vecrat(ux,uy,vx,vy) >= 1.0f) da = 0;
+
+ if (fa) {
+ // Choose large arc
+ if (da > 0.0f)
+ da = da - 2*NSVG_PI;
+ else
+ da = 2*NSVG_PI + da;
+ }
+
+ // Approximate the arc using cubic spline segments.
+ t[0] = cosrx; t[1] = sinrx;
+ t[2] = -sinrx; t[3] = cosrx;
+ t[4] = cx; t[5] = cy;
+
+ // Split arc into max 90 degree segments.
+ // The loop assumes an iteration per end point (including start and end), this +1.
+ ndivs = (int)(fabsf(da) / (NSVG_PI*0.5f) + 1.0f);
+ hda = (da / (float)ndivs) / 2.0f;
+ kappa = fabsf(4.0f / 3.0f * (1.0f - cosf(hda)) / sinf(hda));
+ if (da < 0.0f)
+ kappa = -kappa;
+
+ for (i = 0; i <= ndivs; i++) {
+ a = a1 + da * (i/(float)ndivs);
+ dx = cosf(a);
+ dy = sinf(a);
+ nsvg__xformPoint(&x, &y, dx*rx, dy*ry, t); // position
+ nsvg__xformVec(&tanx, &tany, -dy*rx * kappa, dx*ry * kappa, t); // tangent
+ if (i > 0)
+ nsvg__cubicBezTo(p, px+ptanx,py+ptany, x-tanx, y-tany, x, y);
+ px = x;
+ py = y;
+ ptanx = tanx;
+ ptany = tany;
+ }
+
+ *cpx = x2;
+ *cpy = y2;
+}
+
+static void nsvg__parsePath(NSVGparser* p, const char** attr)
+{
+ const char* s = NULL;
+ char cmd = '\0';
+ float args[10];
+ int nargs;
+ int rargs = 0;
+ float cpx, cpy, cpx2, cpy2;
+ const char* tmp[4];
+ char closedFlag;
+ int i;
+ char item[64];
+
+ for (i = 0; attr[i]; i += 2) {
+ if (strcmp(attr[i], "d") == 0) {
+ s = attr[i + 1];
+ } else {
+ tmp[0] = attr[i];
+ tmp[1] = attr[i + 1];
+ tmp[2] = 0;
+ tmp[3] = 0;
+ nsvg__parseAttribs(p, tmp);
+ }
+ }
+
+ if (s) {
+ nsvg__resetPath(p);
+ cpx = 0; cpy = 0;
+ cpx2 = 0; cpy2 = 0;
+ closedFlag = 0;
+ nargs = 0;
+
+ while (*s) {
+ s = nsvg__getNextPathItem(s, item);
+ if (!*item) break;
+ if (nsvg__isnum(item[0])) {
+ if (nargs < 10)
+ args[nargs++] = (float)atof(item);
+ if (nargs >= rargs) {
+ switch (cmd) {
+ case 'm':
+ case 'M':
+ nsvg__pathMoveTo(p, &cpx, &cpy, args, cmd == 'm' ? 1 : 0);
+ // Moveto can be followed by multiple coordinate pairs,
+ // which should be treated as linetos.
+ cmd = (cmd == 'm') ? 'l' : 'L';
+ rargs = nsvg__getArgsPerElement(cmd);
+ cpx2 = cpx; cpy2 = cpy;
+ break;
+ case 'l':
+ case 'L':
+ nsvg__pathLineTo(p, &cpx, &cpy, args, cmd == 'l' ? 1 : 0);
+ cpx2 = cpx; cpy2 = cpy;
+ break;
+ case 'H':
+ case 'h':
+ nsvg__pathHLineTo(p, &cpx, &cpy, args, cmd == 'h' ? 1 : 0);
+ cpx2 = cpx; cpy2 = cpy;
+ break;
+ case 'V':
+ case 'v':
+ nsvg__pathVLineTo(p, &cpx, &cpy, args, cmd == 'v' ? 1 : 0);
+ cpx2 = cpx; cpy2 = cpy;
+ break;
+ case 'C':
+ case 'c':
+ nsvg__pathCubicBezTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 'c' ? 1 : 0);
+ break;
+ case 'S':
+ case 's':
+ nsvg__pathCubicBezShortTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 's' ? 1 : 0);
+ break;
+ case 'Q':
+ case 'q':
+ nsvg__pathQuadBezTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 'q' ? 1 : 0);
+ break;
+ case 'T':
+ case 't':
+ nsvg__pathQuadBezShortTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 't' ? 1 : 0);
+ break;
+ case 'A':
+ case 'a':
+ nsvg__pathArcTo(p, &cpx, &cpy, args, cmd == 'a' ? 1 : 0);
+ cpx2 = cpx; cpy2 = cpy;
+ break;
+ default:
+ if (nargs >= 2) {
+ cpx = args[nargs-2];
+ cpy = args[nargs-1];
+ cpx2 = cpx; cpy2 = cpy;
+ }
+ break;
+ }
+ nargs = 0;
+ }
+ } else {
+ cmd = item[0];
+ rargs = nsvg__getArgsPerElement(cmd);
+ if (cmd == 'M' || cmd == 'm') {
+ // Commit path.
+ if (p->npts > 0)
+ nsvg__addPath(p, closedFlag);
+ // Start new subpath.
+ nsvg__resetPath(p);
+ closedFlag = 0;
+ nargs = 0;
+ } else if (cmd == 'Z' || cmd == 'z') {
+ closedFlag = 1;
+ // Commit path.
+ if (p->npts > 0) {
+ // Move current point to first point
+ cpx = p->pts[0];
+ cpy = p->pts[1];
+ cpx2 = cpx; cpy2 = cpy;
+ nsvg__addPath(p, closedFlag);
+ }
+ // Start new subpath.
+ nsvg__resetPath(p);
+ nsvg__moveTo(p, cpx, cpy);
+ closedFlag = 0;
+ nargs = 0;
+ }
+ }
+ }
+ // Commit path.
+ if (p->npts)
+ nsvg__addPath(p, closedFlag);
+ }
+
+ nsvg__addShape(p);
+}
+
+static void nsvg__parseRect(NSVGparser* p, const char** attr)
+{
+ float x = 0.0f;
+ float y = 0.0f;
+ float w = 0.0f;
+ float h = 0.0f;
+ float rx = -1.0f; // marks not set
+ float ry = -1.0f;
+ int i;
+
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "x") == 0) x = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
+ if (strcmp(attr[i], "y") == 0) y = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
+ if (strcmp(attr[i], "width") == 0) w = nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p));
+ if (strcmp(attr[i], "height") == 0) h = nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p));
+ if (strcmp(attr[i], "rx") == 0) rx = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p)));
+ if (strcmp(attr[i], "ry") == 0) ry = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p)));
+ }
+ }
+
+ if (rx < 0.0f && ry > 0.0f) rx = ry;
+ if (ry < 0.0f && rx > 0.0f) ry = rx;
+ if (rx < 0.0f) rx = 0.0f;
+ if (ry < 0.0f) ry = 0.0f;
+ if (rx > w/2.0f) rx = w/2.0f;
+ if (ry > h/2.0f) ry = h/2.0f;
+
+ if (w != 0.0f && h != 0.0f) {
+ nsvg__resetPath(p);
+
+ if (rx < 0.00001f || ry < 0.0001f) {
+ nsvg__moveTo(p, x, y);
+ nsvg__lineTo(p, x+w, y);
+ nsvg__lineTo(p, x+w, y+h);
+ nsvg__lineTo(p, x, y+h);
+ } else {
+ // Rounded rectangle
+ nsvg__moveTo(p, x+rx, y);
+ nsvg__lineTo(p, x+w-rx, y);
+ nsvg__cubicBezTo(p, x+w-rx*(1-NSVG_KAPPA90), y, x+w, y+ry*(1-NSVG_KAPPA90), x+w, y+ry);
+ nsvg__lineTo(p, x+w, y+h-ry);
+ nsvg__cubicBezTo(p, x+w, y+h-ry*(1-NSVG_KAPPA90), x+w-rx*(1-NSVG_KAPPA90), y+h, x+w-rx, y+h);
+ nsvg__lineTo(p, x+rx, y+h);
+ nsvg__cubicBezTo(p, x+rx*(1-NSVG_KAPPA90), y+h, x, y+h-ry*(1-NSVG_KAPPA90), x, y+h-ry);
+ nsvg__lineTo(p, x, y+ry);
+ nsvg__cubicBezTo(p, x, y+ry*(1-NSVG_KAPPA90), x+rx*(1-NSVG_KAPPA90), y, x+rx, y);
+ }
+
+ nsvg__addPath(p, 1);
+
+ nsvg__addShape(p);
+ }
+}
+
+static void nsvg__parseCircle(NSVGparser* p, const char** attr)
+{
+ float cx = 0.0f;
+ float cy = 0.0f;
+ float r = 0.0f;
+ int i;
+
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "cx") == 0) cx = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
+ if (strcmp(attr[i], "cy") == 0) cy = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
+ if (strcmp(attr[i], "r") == 0) r = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualLength(p)));
+ }
+ }
+
+ if (r > 0.0f) {
+ nsvg__resetPath(p);
+
+ nsvg__moveTo(p, cx+r, cy);
+ nsvg__cubicBezTo(p, cx+r, cy+r*NSVG_KAPPA90, cx+r*NSVG_KAPPA90, cy+r, cx, cy+r);
+ nsvg__cubicBezTo(p, cx-r*NSVG_KAPPA90, cy+r, cx-r, cy+r*NSVG_KAPPA90, cx-r, cy);
+ nsvg__cubicBezTo(p, cx-r, cy-r*NSVG_KAPPA90, cx-r*NSVG_KAPPA90, cy-r, cx, cy-r);
+ nsvg__cubicBezTo(p, cx+r*NSVG_KAPPA90, cy-r, cx+r, cy-r*NSVG_KAPPA90, cx+r, cy);
+
+ nsvg__addPath(p, 1);
+
+ nsvg__addShape(p);
+ }
+}
+
+static void nsvg__parseEllipse(NSVGparser* p, const char** attr)
+{
+ float cx = 0.0f;
+ float cy = 0.0f;
+ float rx = 0.0f;
+ float ry = 0.0f;
+ int i;
+
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "cx") == 0) cx = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
+ if (strcmp(attr[i], "cy") == 0) cy = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
+ if (strcmp(attr[i], "rx") == 0) rx = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p)));
+ if (strcmp(attr[i], "ry") == 0) ry = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p)));
+ }
+ }
+
+ if (rx > 0.0f && ry > 0.0f) {
+
+ nsvg__resetPath(p);
+
+ nsvg__moveTo(p, cx+rx, cy);
+ nsvg__cubicBezTo(p, cx+rx, cy+ry*NSVG_KAPPA90, cx+rx*NSVG_KAPPA90, cy+ry, cx, cy+ry);
+ nsvg__cubicBezTo(p, cx-rx*NSVG_KAPPA90, cy+ry, cx-rx, cy+ry*NSVG_KAPPA90, cx-rx, cy);
+ nsvg__cubicBezTo(p, cx-rx, cy-ry*NSVG_KAPPA90, cx-rx*NSVG_KAPPA90, cy-ry, cx, cy-ry);
+ nsvg__cubicBezTo(p, cx+rx*NSVG_KAPPA90, cy-ry, cx+rx, cy-ry*NSVG_KAPPA90, cx+rx, cy);
+
+ nsvg__addPath(p, 1);
+
+ nsvg__addShape(p);
+ }
+}
+
+static void nsvg__parseLine(NSVGparser* p, const char** attr)
+{
+ float x1 = 0.0;
+ float y1 = 0.0;
+ float x2 = 0.0;
+ float y2 = 0.0;
+ int i;
+
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "x1") == 0) x1 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
+ if (strcmp(attr[i], "y1") == 0) y1 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
+ if (strcmp(attr[i], "x2") == 0) x2 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
+ if (strcmp(attr[i], "y2") == 0) y2 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
+ }
+ }
+
+ nsvg__resetPath(p);
+
+ nsvg__moveTo(p, x1, y1);
+ nsvg__lineTo(p, x2, y2);
+
+ nsvg__addPath(p, 0);
+
+ nsvg__addShape(p);
+}
+
+static void nsvg__parsePoly(NSVGparser* p, const char** attr, int closeFlag)
+{
+ int i;
+ const char* s;
+ float args[2];
+ int nargs, npts = 0;
+ char item[64];
+
+ nsvg__resetPath(p);
+
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "points") == 0) {
+ s = attr[i + 1];
+ nargs = 0;
+ while (*s) {
+ s = nsvg__getNextPathItem(s, item);
+ args[nargs++] = (float)atof(item);
+ if (nargs >= 2) {
+ if (npts == 0)
+ nsvg__moveTo(p, args[0], args[1]);
+ else
+ nsvg__lineTo(p, args[0], args[1]);
+ nargs = 0;
+ npts++;
+ }
+ }
+ }
+ }
+ }
+
+ nsvg__addPath(p, (char)closeFlag);
+
+ nsvg__addShape(p);
+}
+
+static void nsvg__parseSVG(NSVGparser* p, const char** attr)
+{
+ int i;
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "width") == 0) {
+ p->image->width = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 1.0f);
+ } else if (strcmp(attr[i], "height") == 0) {
+ p->image->height = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 1.0f);
+ } else if (strcmp(attr[i], "viewBox") == 0) {
+ sscanf(attr[i + 1], "%f%*[%%, \t]%f%*[%%, \t]%f%*[%%, \t]%f", &p->viewMinx, &p->viewMiny, &p->viewWidth, &p->viewHeight);
+ } else if (strcmp(attr[i], "preserveAspectRatio") == 0) {
+ if (strstr(attr[i + 1], "none") != 0) {
+ // No uniform scaling
+ p->alignType = NSVG_ALIGN_NONE;
+ } else {
+ // Parse X align
+ if (strstr(attr[i + 1], "xMin") != 0)
+ p->alignX = NSVG_ALIGN_MIN;
+ else if (strstr(attr[i + 1], "xMid") != 0)
+ p->alignX = NSVG_ALIGN_MID;
+ else if (strstr(attr[i + 1], "xMax") != 0)
+ p->alignX = NSVG_ALIGN_MAX;
+ // Parse X align
+ if (strstr(attr[i + 1], "yMin") != 0)
+ p->alignY = NSVG_ALIGN_MIN;
+ else if (strstr(attr[i + 1], "yMid") != 0)
+ p->alignY = NSVG_ALIGN_MID;
+ else if (strstr(attr[i + 1], "yMax") != 0)
+ p->alignY = NSVG_ALIGN_MAX;
+ // Parse meet/slice
+ p->alignType = NSVG_ALIGN_MEET;
+ if (strstr(attr[i + 1], "slice") != 0)
+ p->alignType = NSVG_ALIGN_SLICE;
+ }
+ }
+ }
+ }
+}
+
+static void nsvg__parseGradient(NSVGparser* p, const char** attr, char type)
+{
+ int i;
+ NSVGgradientData* grad = (NSVGgradientData*)malloc(sizeof(NSVGgradientData));
+ if (grad == NULL) return;
+ memset(grad, 0, sizeof(NSVGgradientData));
+ grad->units = NSVG_OBJECT_SPACE;
+ grad->type = type;
+ if (grad->type == NSVG_PAINT_LINEAR_GRADIENT) {
+ grad->linear.x1 = nsvg__coord(0.0f, NSVG_UNITS_PERCENT);
+ grad->linear.y1 = nsvg__coord(0.0f, NSVG_UNITS_PERCENT);
+ grad->linear.x2 = nsvg__coord(100.0f, NSVG_UNITS_PERCENT);
+ grad->linear.y2 = nsvg__coord(0.0f, NSVG_UNITS_PERCENT);
+ } else if (grad->type == NSVG_PAINT_RADIAL_GRADIENT) {
+ grad->radial.cx = nsvg__coord(50.0f, NSVG_UNITS_PERCENT);
+ grad->radial.cy = nsvg__coord(50.0f, NSVG_UNITS_PERCENT);
+ grad->radial.r = nsvg__coord(50.0f, NSVG_UNITS_PERCENT);
+ }
+
+ nsvg__xformIdentity(grad->xform);
+
+ for (i = 0; attr[i]; i += 2) {
+ if (strcmp(attr[i], "id") == 0) {
+ strncpy(grad->id, attr[i+1], 63);
+ grad->id[63] = '\0';
+ } else if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "gradientUnits") == 0) {
+ if (strcmp(attr[i+1], "objectBoundingBox") == 0)
+ grad->units = NSVG_OBJECT_SPACE;
+ else
+ grad->units = NSVG_USER_SPACE;
+ } else if (strcmp(attr[i], "gradientTransform") == 0) {
+ nsvg__parseTransform(grad->xform, attr[i + 1]);
+ } else if (strcmp(attr[i], "cx") == 0) {
+ grad->radial.cx = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "cy") == 0) {
+ grad->radial.cy = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "r") == 0) {
+ grad->radial.r = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "fx") == 0) {
+ grad->radial.fx = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "fy") == 0) {
+ grad->radial.fy = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "x1") == 0) {
+ grad->linear.x1 = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "y1") == 0) {
+ grad->linear.y1 = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "x2") == 0) {
+ grad->linear.x2 = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "y2") == 0) {
+ grad->linear.y2 = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "spreadMethod") == 0) {
+ if (strcmp(attr[i+1], "pad") == 0)
+ grad->spread = NSVG_SPREAD_PAD;
+ else if (strcmp(attr[i+1], "reflect") == 0)
+ grad->spread = NSVG_SPREAD_REFLECT;
+ else if (strcmp(attr[i+1], "repeat") == 0)
+ grad->spread = NSVG_SPREAD_REPEAT;
+ } else if (strcmp(attr[i], "xlink:href") == 0) {
+ const char *href = attr[i+1];
+ strncpy(grad->ref, href+1, 62);
+ grad->ref[62] = '\0';
+ }
+ }
+ }
+
+ grad->next = p->gradients;
+ p->gradients = grad;
+}
+
+static void nsvg__parseGradientStop(NSVGparser* p, const char** attr)
+{
+ NSVGattrib* curAttr = nsvg__getAttr(p);
+ NSVGgradientData* grad;
+ NSVGgradientStop* stop;
+ int i, idx;
+
+ curAttr->stopOffset = 0;
+ curAttr->stopColor = 0;
+ curAttr->stopOpacity = 1.0f;
+
+ for (i = 0; attr[i]; i += 2) {
+ nsvg__parseAttr(p, attr[i], attr[i + 1]);
+ }
+
+ // Add stop to the last gradient.
+ grad = p->gradients;
+ if (grad == NULL) return;
+
+ grad->nstops++;
+ grad->stops = (NSVGgradientStop*)realloc(grad->stops, sizeof(NSVGgradientStop)*grad->nstops);
+ if (grad->stops == NULL) return;
+
+ // Insert
+ idx = grad->nstops-1;
+ for (i = 0; i < grad->nstops-1; i++) {
+ if (curAttr->stopOffset < grad->stops[i].offset) {
+ idx = i;
+ break;
+ }
+ }
+ if (idx != grad->nstops-1) {
+ for (i = grad->nstops-1; i > idx; i--)
+ grad->stops[i] = grad->stops[i-1];
+ }
+
+ stop = &grad->stops[idx];
+ stop->color = curAttr->stopColor;
+ stop->color |= (unsigned int)(curAttr->stopOpacity*255) << 24;
+ stop->offset = curAttr->stopOffset;
+}
+
+static void nsvg__startElement(void* ud, const char* el, const char** attr)
+{
+ NSVGparser* p = (NSVGparser*)ud;
+
+ if (p->defsFlag) {
+ // Skip everything but gradients in defs
+ if (strcmp(el, "linearGradient") == 0) {
+ nsvg__parseGradient(p, attr, NSVG_PAINT_LINEAR_GRADIENT);
+ } else if (strcmp(el, "radialGradient") == 0) {
+ nsvg__parseGradient(p, attr, NSVG_PAINT_RADIAL_GRADIENT);
+ } else if (strcmp(el, "stop") == 0) {
+ nsvg__parseGradientStop(p, attr);
+ }
+ return;
+ }
+
+ if (strcmp(el, "g") == 0) {
+ nsvg__pushAttr(p);
+ nsvg__parseAttribs(p, attr);
+ } else if (strcmp(el, "path") == 0) {
+ if (p->pathFlag) // Do not allow nested paths.
+ return;
+ nsvg__pushAttr(p);
+ p->pathFlag = 1;
+ p->shapeFlag = 1;
+ nsvg__parsePath(p, attr);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "rect") == 0) {
+ nsvg__pushAttr(p);
+ p->shapeFlag = 1;
+ nsvg__parseRect(p, attr);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "circle") == 0) {
+ nsvg__pushAttr(p);
+ p->shapeFlag = 1;
+ nsvg__parseCircle(p, attr);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "ellipse") == 0) {
+ nsvg__pushAttr(p);
+ p->shapeFlag = 1;
+ nsvg__parseEllipse(p, attr);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "line") == 0) {
+ nsvg__pushAttr(p);
+ p->shapeFlag = 1;
+ nsvg__parseLine(p, attr);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "polyline") == 0) {
+ nsvg__pushAttr(p);
+ p->shapeFlag = 1;
+ nsvg__parsePoly(p, attr, 0);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "polygon") == 0) {
+ nsvg__pushAttr(p);
+ p->shapeFlag = 1;
+ nsvg__parsePoly(p, attr, 1);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "linearGradient") == 0) {
+ nsvg__parseGradient(p, attr, NSVG_PAINT_LINEAR_GRADIENT);
+ } else if (strcmp(el, "radialGradient") == 0) {
+ nsvg__parseGradient(p, attr, NSVG_PAINT_RADIAL_GRADIENT);
+ } else if (strcmp(el, "stop") == 0) {
+ nsvg__parseGradientStop(p, attr);
+ } else if (strcmp(el, "defs") == 0) {
+ p->defsFlag = 1;
+ } else if (strcmp(el, "svg") == 0) {
+ nsvg__parseSVG(p, attr);
+ } else if (strcmp(el, "title") == 0) {
+ p->titleFlag = 1;
+ }
+}
+
+static void nsvg__endElement(void* ud, const char* el)
+{
+ NSVGparser* p = (NSVGparser*)ud;
+
+ if (strcmp(el, "g") == 0) {
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "path") == 0) {
+ p->pathFlag = 0;
+ p->shapeFlag = 0;
+ } else if (strcmp(el, "defs") == 0) {
+ p->defsFlag = 0;
+ } else if (strcmp(el, "title") == 0) {
+ p->titleFlag = 0;
+ } else if (strcmp(el, "rect") == 0 ||
+ strcmp(el, "circle") == 0 ||
+ strcmp(el, "ellipse") == 0 ||
+ strcmp(el, "line") == 0 ||
+ strcmp(el, "polyline") == 0 ||
+ strcmp(el, "polygon") == 0) {
+ p->shapeFlag = 0;
+ }
+}
+
+static void nsvg__content(void* ud, const char* s)
+{
+ NSVGparser* p = (NSVGparser*)ud;
+ if (p->titleFlag) {
+ int len = strlen(s);
+ const int lim = sizeof(((NSVGshape *)(nullptr))->title);
+ if(len > lim-1)
+ len = lim-1;
+ if (p->shapeFlag) {
+ NSVGshape *shape = p->image->shapes;
+ while (shape->next)
+ shape = shape->next;
+ if (shape) {
+ memcpy(shape->title, s, len);
+ memset(shape->title + len, 0, lim-len);
+ }
+ } else {
+ NSVGattrib* attr = nsvg__getAttr(p);
+ memcpy(attr->title, s, len);
+ memset(attr->title + len, 0, lim-len);
+ }
+ }
+}
+
+static void nsvg__imageBounds(NSVGparser* p, float* bounds)
+{
+ NSVGshape* shape;
+ shape = p->image->shapes;
+ if (shape == NULL) {
+ bounds[0] = bounds[1] = bounds[2] = bounds[3] = 0.0;
+ return;
+ }
+ bounds[0] = shape->bounds[0];
+ bounds[1] = shape->bounds[1];
+ bounds[2] = shape->bounds[2];
+ bounds[3] = shape->bounds[3];
+ for (shape = shape->next; shape != NULL; shape = shape->next) {
+ bounds[0] = nsvg__minf(bounds[0], shape->bounds[0]);
+ bounds[1] = nsvg__minf(bounds[1], shape->bounds[1]);
+ bounds[2] = nsvg__maxf(bounds[2], shape->bounds[2]);
+ bounds[3] = nsvg__maxf(bounds[3], shape->bounds[3]);
+ }
+}
+
+static float nsvg__viewAlign(float content, float container, int type)
+{
+ if (type == NSVG_ALIGN_MIN)
+ return 0;
+ else if (type == NSVG_ALIGN_MAX)
+ return container - content;
+ // mid
+ return (container - content) * 0.5f;
+}
+
+static void nsvg__scaleGradient(NSVGgradient* grad, float tx, float ty, float sx, float sy)
+{
+ grad->xform[0] *= sx;
+ grad->xform[1] *= sx;
+ grad->xform[2] *= sy;
+ grad->xform[3] *= sy;
+ grad->xform[4] += tx*sx;
+ grad->xform[5] += ty*sx;
+}
+
+static void nsvg__scaleToViewbox(NSVGparser* p, const char* units)
+{
+ NSVGshape* shape;
+ NSVGpath* path;
+ float tx, ty, sx, sy, us, bounds[4], t[6], avgs;
+ int i;
+ float* pt;
+
+ // Guess image size if not set completely.
+ nsvg__imageBounds(p, bounds);
+
+ if (p->viewWidth == 0) {
+ if (p->image->width > 0) {
+ p->viewWidth = p->image->width;
+ } else {
+ p->viewMinx = bounds[0];
+ p->viewWidth = bounds[2] - bounds[0];
+ }
+ }
+ if (p->viewHeight == 0) {
+ if (p->image->height > 0) {
+ p->viewHeight = p->image->height;
+ } else {
+ p->viewMiny = bounds[1];
+ p->viewHeight = bounds[3] - bounds[1];
+ }
+ }
+ if (p->image->width == 0)
+ p->image->width = p->viewWidth;
+ if (p->image->height == 0)
+ p->image->height = p->viewHeight;
+
+ tx = -p->viewMinx;
+ ty = -p->viewMiny;
+ sx = p->viewWidth > 0 ? p->image->width / p->viewWidth : 0;
+ sy = p->viewHeight > 0 ? p->image->height / p->viewHeight : 0;
+ // Unit scaling
+ us = 1.0f / nsvg__convertToPixels(p, nsvg__coord(1.0f, nsvg__parseUnits(units)), 0.0f, 1.0f);
+
+ // Fix aspect ratio
+ if (p->alignType == NSVG_ALIGN_MEET) {
+ // fit whole image into viewbox
+ sx = sy = nsvg__minf(sx, sy);
+ tx += nsvg__viewAlign(p->viewWidth*sx, p->image->width, p->alignX) / sx;
+ ty += nsvg__viewAlign(p->viewHeight*sy, p->image->height, p->alignY) / sy;
+ } else if (p->alignType == NSVG_ALIGN_SLICE) {
+ // fill whole viewbox with image
+ sx = sy = nsvg__maxf(sx, sy);
+ tx += nsvg__viewAlign(p->viewWidth*sx, p->image->width, p->alignX) / sx;
+ ty += nsvg__viewAlign(p->viewHeight*sy, p->image->height, p->alignY) / sy;
+ }
+
+ // Transform
+ sx *= us;
+ sy *= us;
+ avgs = (sx+sy) / 2.0f;
+ for (shape = p->image->shapes; shape != NULL; shape = shape->next) {
+ shape->bounds[0] = (shape->bounds[0] + tx) * sx;
+ shape->bounds[1] = (shape->bounds[1] + ty) * sy;
+ shape->bounds[2] = (shape->bounds[2] + tx) * sx;
+ shape->bounds[3] = (shape->bounds[3] + ty) * sy;
+ for (path = shape->paths; path != NULL; path = path->next) {
+ path->bounds[0] = (path->bounds[0] + tx) * sx;
+ path->bounds[1] = (path->bounds[1] + ty) * sy;
+ path->bounds[2] = (path->bounds[2] + tx) * sx;
+ path->bounds[3] = (path->bounds[3] + ty) * sy;
+ for (i =0; i < path->npts; i++) {
+ pt = &path->pts[i*2];
+ pt[0] = (pt[0] + tx) * sx;
+ pt[1] = (pt[1] + ty) * sy;
+ }
+ }
+
+ if (shape->fill.type == NSVG_PAINT_LINEAR_GRADIENT || shape->fill.type == NSVG_PAINT_RADIAL_GRADIENT) {
+ nsvg__scaleGradient(shape->fill.gradient, tx,ty, sx,sy);
+ memcpy(t, shape->fill.gradient->xform, sizeof(float)*6);
+ nsvg__xformInverse(shape->fill.gradient->xform, t);
+ }
+ if (shape->stroke.type == NSVG_PAINT_LINEAR_GRADIENT || shape->stroke.type == NSVG_PAINT_RADIAL_GRADIENT) {
+ nsvg__scaleGradient(shape->stroke.gradient, tx,ty, sx,sy);
+ memcpy(t, shape->stroke.gradient->xform, sizeof(float)*6);
+ nsvg__xformInverse(shape->stroke.gradient->xform, t);
+ }
+
+ shape->strokeWidth *= avgs;
+ shape->strokeDashOffset *= avgs;
+ for (i = 0; i < shape->strokeDashCount; i++)
+ shape->strokeDashArray[i] *= avgs;
+ }
+}
+
+NSVGimage* nsvgParse(char* input, const char* units, float dpi)
+{
+ NSVGparser* p;
+ NSVGimage* ret = 0;
+
+ p = nsvg__createParser();
+ if (p == NULL) {
+ return NULL;
+ }
+ p->dpi = dpi;
+
+ nsvg__parseXML(input, nsvg__startElement, nsvg__endElement, nsvg__content, p);
+
+ // Scale to viewBox
+ nsvg__scaleToViewbox(p, units);
+
+ ret = p->image;
+ p->image = NULL;
+
+ nsvg__deleteParser(p);
+
+ return ret;
+}
+
+NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi)
+{
+ FILE* fp = NULL;
+ size_t size;
+ char* data = NULL;
+ NSVGimage* image = NULL;
+
+ fp = fopen(filename, "rb");
+ if (!fp) goto error;
+ fseek(fp, 0, SEEK_END);
+ size = ftell(fp);
+ fseek(fp, 0, SEEK_SET);
+ data = (char*)malloc(size+1);
+ if (data == NULL) goto error;
+ if (fread(data, 1, size, fp) != size) goto error;
+ data[size] = '\0'; // Must be null terminated.
+ fclose(fp);
+ image = nsvgParse(data, units, dpi);
+ free(data);
+
+ return image;
+
+error:
+ if (fp) fclose(fp);
+ if (data) free(data);
+ if (image) nsvgDelete(image);
+ return NULL;
+}
+
+void nsvgDelete(NSVGimage* image)
+{
+ NSVGshape *snext, *shape;
+ if (image == NULL) return;
+ shape = image->shapes;
+ while (shape != NULL) {
+ snext = shape->next;
+ nsvg__deletePaths(shape->paths);
+ nsvg__deletePaint(&shape->fill);
+ nsvg__deletePaint(&shape->stroke);
+ free(shape);
+ shape = snext;
+ }
+ free(image);
+}
+
+#endif
diff --git a/3rdparty/nanosvg/src/nanosvgrast.h b/3rdparty/nanosvg/src/nanosvgrast.h
new file mode 100644
index 00000000000..c71d7b4a7c1
--- /dev/null
+++ b/3rdparty/nanosvg/src/nanosvgrast.h
@@ -0,0 +1,1447 @@
+/*
+ * Copyright (c) 2013-14 Mikko Mononen memon@inside.org
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ *
+ * The polygon rasterization is heavily based on stb_truetype rasterizer
+ * by Sean Barrett - http://nothings.org/
+ *
+ */
+
+#ifndef NANOSVGRAST_H
+#define NANOSVGRAST_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct NSVGrasterizer NSVGrasterizer;
+
+/* Example Usage:
+ // Load SVG
+ struct SNVGImage* image = nsvgParseFromFile("test.svg.");
+
+ // Create rasterizer (can be used to render multiple images).
+ struct NSVGrasterizer* rast = nsvgCreateRasterizer();
+ // Allocate memory for image
+ unsigned char* img = malloc(w*h*4);
+ // Rasterize
+ nsvgRasterize(rast, image, 0,0,1, img, w, h, w*4);
+*/
+
+// Allocated rasterizer context.
+NSVGrasterizer* nsvgCreateRasterizer();
+
+// Rasterizes SVG image, returns RGBA image (non-premultiplied alpha)
+// r - pointer to rasterizer context
+// image - pointer to image to rasterize
+// tx,ty - image offset (applied after scaling)
+// scale - image scale
+// dst - pointer to destination image data, 4 bytes per pixel (RGBA)
+// w - width of the image to render
+// h - height of the image to render
+// stride - number of bytes per scaleline in the destination buffer
+void nsvgRasterize(NSVGrasterizer* r,
+ NSVGimage* image, float tx, float ty, float scale,
+ unsigned char* dst, int w, int h, int stride);
+
+// Deletes rasterizer context.
+void nsvgDeleteRasterizer(NSVGrasterizer*);
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // NANOSVGRAST_H
+
+#ifdef NANOSVGRAST_IMPLEMENTATION
+
+#include <math.h>
+
+#define NSVG__SUBSAMPLES 5
+#define NSVG__FIXSHIFT 10
+#define NSVG__FIX (1 << NSVG__FIXSHIFT)
+#define NSVG__FIXMASK (NSVG__FIX-1)
+#define NSVG__MEMPAGE_SIZE 1024
+
+typedef struct NSVGedge {
+ float x0,y0, x1,y1;
+ int dir;
+ struct NSVGedge* next;
+} NSVGedge;
+
+typedef struct NSVGpoint {
+ float x, y;
+ float dx, dy;
+ float len;
+ float dmx, dmy;
+ unsigned char flags;
+} NSVGpoint;
+
+typedef struct NSVGactiveEdge {
+ int x,dx;
+ float ey;
+ int dir;
+ struct NSVGactiveEdge *next;
+} NSVGactiveEdge;
+
+typedef struct NSVGmemPage {
+ unsigned char mem[NSVG__MEMPAGE_SIZE];
+ int size;
+ struct NSVGmemPage* next;
+} NSVGmemPage;
+
+typedef struct NSVGcachedPaint {
+ char type;
+ char spread;
+ float xform[6];
+ unsigned int colors[256];
+} NSVGcachedPaint;
+
+struct NSVGrasterizer
+{
+ float px, py;
+
+ float tessTol;
+ float distTol;
+
+ NSVGedge* edges;
+ int nedges;
+ int cedges;
+
+ NSVGpoint* points;
+ int npoints;
+ int cpoints;
+
+ NSVGpoint* points2;
+ int npoints2;
+ int cpoints2;
+
+ NSVGactiveEdge* freelist;
+ NSVGmemPage* pages;
+ NSVGmemPage* curpage;
+
+ unsigned char* scanline;
+ int cscanline;
+
+ unsigned char* bitmap;
+ int width, height, stride;
+};
+
+NSVGrasterizer* nsvgCreateRasterizer()
+{
+ NSVGrasterizer* r = (NSVGrasterizer*)malloc(sizeof(NSVGrasterizer));
+ if (r == NULL) goto error;
+ memset(r, 0, sizeof(NSVGrasterizer));
+
+ r->tessTol = 0.25f;
+ r->distTol = 0.01f;
+
+ return r;
+
+error:
+ nsvgDeleteRasterizer(r);
+ return NULL;
+}
+
+void nsvgDeleteRasterizer(NSVGrasterizer* r)
+{
+ NSVGmemPage* p;
+
+ if (r == NULL) return;
+
+ p = r->pages;
+ while (p != NULL) {
+ NSVGmemPage* next = p->next;
+ free(p);
+ p = next;
+ }
+
+ if (r->edges) free(r->edges);
+ if (r->points) free(r->points);
+ if (r->points2) free(r->points2);
+ if (r->scanline) free(r->scanline);
+
+ free(r);
+}
+
+static NSVGmemPage* nsvg__nextPage(NSVGrasterizer* r, NSVGmemPage* cur)
+{
+ NSVGmemPage *newp;
+
+ // If using existing chain, return the next page in chain
+ if (cur != NULL && cur->next != NULL) {
+ return cur->next;
+ }
+
+ // Alloc new page
+ newp = (NSVGmemPage*)malloc(sizeof(NSVGmemPage));
+ if (newp == NULL) return NULL;
+ memset(newp, 0, sizeof(NSVGmemPage));
+
+ // Add to linked list
+ if (cur != NULL)
+ cur->next = newp;
+ else
+ r->pages = newp;
+
+ return newp;
+}
+
+static void nsvg__resetPool(NSVGrasterizer* r)
+{
+ NSVGmemPage* p = r->pages;
+ while (p != NULL) {
+ p->size = 0;
+ p = p->next;
+ }
+ r->curpage = r->pages;
+}
+
+static unsigned char* nsvg__alloc(NSVGrasterizer* r, int size)
+{
+ unsigned char* buf;
+ if (size > NSVG__MEMPAGE_SIZE) return NULL;
+ if (r->curpage == NULL || r->curpage->size+size > NSVG__MEMPAGE_SIZE) {
+ r->curpage = nsvg__nextPage(r, r->curpage);
+ }
+ buf = &r->curpage->mem[r->curpage->size];
+ r->curpage->size += size;
+ return buf;
+}
+
+static int nsvg__ptEquals(float x1, float y1, float x2, float y2, float tol)
+{
+ float dx = x2 - x1;
+ float dy = y2 - y1;
+ return dx*dx + dy*dy < tol*tol;
+}
+
+static void nsvg__addPathPoint(NSVGrasterizer* r, float x, float y, int flags)
+{
+ NSVGpoint* pt;
+
+ if (r->npoints > 0) {
+ pt = &r->points[r->npoints-1];
+ if (nsvg__ptEquals(pt->x,pt->y, x,y, r->distTol)) {
+ pt->flags |= flags;
+ return;
+ }
+ }
+
+ if (r->npoints+1 > r->cpoints) {
+ r->cpoints = r->cpoints > 0 ? r->cpoints * 2 : 64;
+ r->points = (NSVGpoint*)realloc(r->points, sizeof(NSVGpoint) * r->cpoints);
+ if (r->points == NULL) return;
+ }
+
+ pt = &r->points[r->npoints];
+ pt->x = x;
+ pt->y = y;
+ pt->flags = (unsigned char)flags;
+ r->npoints++;
+}
+
+static void nsvg__appendPathPoint(NSVGrasterizer* r, NSVGpoint pt)
+{
+ if (r->npoints+1 > r->cpoints) {
+ r->cpoints = r->cpoints > 0 ? r->cpoints * 2 : 64;
+ r->points = (NSVGpoint*)realloc(r->points, sizeof(NSVGpoint) * r->cpoints);
+ if (r->points == NULL) return;
+ }
+ r->points[r->npoints] = pt;
+ r->npoints++;
+}
+
+static void nsvg__duplicatePoints(NSVGrasterizer* r)
+{
+ if (r->npoints > r->cpoints2) {
+ r->cpoints2 = r->npoints;
+ r->points2 = (NSVGpoint*)realloc(r->points2, sizeof(NSVGpoint) * r->cpoints2);
+ if (r->points2 == NULL) return;
+ }
+
+ memcpy(r->points2, r->points, sizeof(NSVGpoint) * r->npoints);
+ r->npoints2 = r->npoints;
+}
+
+static void nsvg__addEdge(NSVGrasterizer* r, float x0, float y0, float x1, float y1)
+{
+ NSVGedge* e;
+
+ // Skip horizontal edges
+ if (y0 == y1)
+ return;
+
+ if (r->nedges+1 > r->cedges) {
+ r->cedges = r->cedges > 0 ? r->cedges * 2 : 64;
+ r->edges = (NSVGedge*)realloc(r->edges, sizeof(NSVGedge) * r->cedges);
+ if (r->edges == NULL) return;
+ }
+
+ e = &r->edges[r->nedges];
+ r->nedges++;
+
+ if (y0 < y1) {
+ e->x0 = x0;
+ e->y0 = y0;
+ e->x1 = x1;
+ e->y1 = y1;
+ e->dir = 1;
+ } else {
+ e->x0 = x1;
+ e->y0 = y1;
+ e->x1 = x0;
+ e->y1 = y0;
+ e->dir = -1;
+ }
+}
+
+static float nsvg__normalize(float *x, float* y)
+{
+ float d = sqrtf((*x)*(*x) + (*y)*(*y));
+ if (d > 1e-6f) {
+ float id = 1.0f / d;
+ *x *= id;
+ *y *= id;
+ }
+ return d;
+}
+
+static float nsvg__absf(float x) { return x < 0 ? -x : x; }
+
+static void nsvg__flattenCubicBez(NSVGrasterizer* r,
+ float x1, float y1, float x2, float y2,
+ float x3, float y3, float x4, float y4,
+ int level, int type)
+{
+ float x12,y12,x23,y23,x34,y34,x123,y123,x234,y234,x1234,y1234;
+ float dx,dy,d2,d3;
+
+ if (level > 10) return;
+
+ x12 = (x1+x2)*0.5f;
+ y12 = (y1+y2)*0.5f;
+ x23 = (x2+x3)*0.5f;
+ y23 = (y2+y3)*0.5f;
+ x34 = (x3+x4)*0.5f;
+ y34 = (y3+y4)*0.5f;
+ x123 = (x12+x23)*0.5f;
+ y123 = (y12+y23)*0.5f;
+
+ dx = x4 - x1;
+ dy = y4 - y1;
+ d2 = nsvg__absf(((x2 - x4) * dy - (y2 - y4) * dx));
+ d3 = nsvg__absf(((x3 - x4) * dy - (y3 - y4) * dx));
+
+ if ((d2 + d3)*(d2 + d3) < r->tessTol * (dx*dx + dy*dy)) {
+ nsvg__addPathPoint(r, x4, y4, type);
+ return;
+ }
+
+ x234 = (x23+x34)*0.5f;
+ y234 = (y23+y34)*0.5f;
+ x1234 = (x123+x234)*0.5f;
+ y1234 = (y123+y234)*0.5f;
+
+ nsvg__flattenCubicBez(r, x1,y1, x12,y12, x123,y123, x1234,y1234, level+1, 0);
+ nsvg__flattenCubicBez(r, x1234,y1234, x234,y234, x34,y34, x4,y4, level+1, type);
+}
+
+static void nsvg__flattenShape(NSVGrasterizer* r, NSVGshape* shape, float scale)
+{
+ int i, j;
+ NSVGpath* path;
+
+ for (path = shape->paths; path != NULL; path = path->next) {
+ r->npoints = 0;
+ // Flatten path
+ nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, 0);
+ for (i = 0; i < path->npts-1; i += 3) {
+ float* p = &path->pts[i*2];
+ nsvg__flattenCubicBez(r, p[0]*scale,p[1]*scale, p[2]*scale,p[3]*scale, p[4]*scale,p[5]*scale, p[6]*scale,p[7]*scale, 0, 0);
+ }
+ // Close path
+ nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, 0);
+ // Build edges
+ for (i = 0, j = r->npoints-1; i < r->npoints; j = i++)
+ nsvg__addEdge(r, r->points[j].x, r->points[j].y, r->points[i].x, r->points[i].y);
+ }
+}
+
+enum NSVGpointFlags
+{
+ NSVG_PT_CORNER = 0x01,
+ NSVG_PT_BEVEL = 0x02,
+ NSVG_PT_LEFT = 0x04,
+};
+
+static void nsvg__initClosed(NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth)
+{
+ float w = lineWidth * 0.5f;
+ float dx = p1->x - p0->x;
+ float dy = p1->y - p0->y;
+ float len = nsvg__normalize(&dx, &dy);
+ float px = p0->x + dx*len*0.5f, py = p0->y + dy*len*0.5f;
+ float dlx = dy, dly = -dx;
+ float lx = px - dlx*w, ly = py - dly*w;
+ float rx = px + dlx*w, ry = py + dly*w;
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+static void nsvg__buttCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p, float dx, float dy, float lineWidth, int connect)
+{
+ float w = lineWidth * 0.5f;
+ float px = p->x, py = p->y;
+ float dlx = dy, dly = -dx;
+ float lx = px - dlx*w, ly = py - dly*w;
+ float rx = px + dlx*w, ry = py + dly*w;
+
+ nsvg__addEdge(r, lx, ly, rx, ry);
+
+ if (connect) {
+ nsvg__addEdge(r, left->x, left->y, lx, ly);
+ nsvg__addEdge(r, rx, ry, right->x, right->y);
+ }
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+static void nsvg__squareCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p, float dx, float dy, float lineWidth, int connect)
+{
+ float w = lineWidth * 0.5f;
+ float px = p->x - dx*w, py = p->y - dy*w;
+ float dlx = dy, dly = -dx;
+ float lx = px - dlx*w, ly = py - dly*w;
+ float rx = px + dlx*w, ry = py + dly*w;
+
+ nsvg__addEdge(r, lx, ly, rx, ry);
+
+ if (connect) {
+ nsvg__addEdge(r, left->x, left->y, lx, ly);
+ nsvg__addEdge(r, rx, ry, right->x, right->y);
+ }
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+#ifndef NSVG_PI
+#define NSVG_PI (3.14159265358979323846264338327f)
+#endif
+
+static void nsvg__roundCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p, float dx, float dy, float lineWidth, int ncap, int connect)
+{
+ int i;
+ float w = lineWidth * 0.5f;
+ float px = p->x, py = p->y;
+ float dlx = dy, dly = -dx;
+ float lx = 0, ly = 0, rx = 0, ry = 0, prevx = 0, prevy = 0;
+
+ for (i = 0; i < ncap; i++) {
+ float a = i/(float)(ncap-1)*NSVG_PI;
+ float ax = cosf(a) * w, ay = sinf(a) * w;
+ float x = px - dlx*ax - dx*ay;
+ float y = py - dly*ax - dy*ay;
+
+ if (i > 0)
+ nsvg__addEdge(r, prevx, prevy, x, y);
+
+ prevx = x;
+ prevy = y;
+
+ if (i == 0) {
+ lx = x; ly = y;
+ } else if (i == ncap-1) {
+ rx = x; ry = y;
+ }
+ }
+
+ if (connect) {
+ nsvg__addEdge(r, left->x, left->y, lx, ly);
+ nsvg__addEdge(r, rx, ry, right->x, right->y);
+ }
+
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+static void nsvg__bevelJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth)
+{
+ float w = lineWidth * 0.5f;
+ float dlx0 = p0->dy, dly0 = -p0->dx;
+ float dlx1 = p1->dy, dly1 = -p1->dx;
+ float lx0 = p1->x - (dlx0 * w), ly0 = p1->y - (dly0 * w);
+ float rx0 = p1->x + (dlx0 * w), ry0 = p1->y + (dly0 * w);
+ float lx1 = p1->x - (dlx1 * w), ly1 = p1->y - (dly1 * w);
+ float rx1 = p1->x + (dlx1 * w), ry1 = p1->y + (dly1 * w);
+
+ nsvg__addEdge(r, lx0, ly0, left->x, left->y);
+ nsvg__addEdge(r, lx1, ly1, lx0, ly0);
+
+ nsvg__addEdge(r, right->x, right->y, rx0, ry0);
+ nsvg__addEdge(r, rx0, ry0, rx1, ry1);
+
+ left->x = lx1; left->y = ly1;
+ right->x = rx1; right->y = ry1;
+}
+
+static void nsvg__miterJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth)
+{
+ float w = lineWidth * 0.5f;
+ float dlx0 = p0->dy, dly0 = -p0->dx;
+ float dlx1 = p1->dy, dly1 = -p1->dx;
+ float lx0, rx0, lx1, rx1;
+ float ly0, ry0, ly1, ry1;
+
+ if (p1->flags & NSVG_PT_LEFT) {
+ lx0 = lx1 = p1->x - p1->dmx * w;
+ ly0 = ly1 = p1->y - p1->dmy * w;
+ nsvg__addEdge(r, lx1, ly1, left->x, left->y);
+
+ rx0 = p1->x + (dlx0 * w);
+ ry0 = p1->y + (dly0 * w);
+ rx1 = p1->x + (dlx1 * w);
+ ry1 = p1->y + (dly1 * w);
+ nsvg__addEdge(r, right->x, right->y, rx0, ry0);
+ nsvg__addEdge(r, rx0, ry0, rx1, ry1);
+ } else {
+ lx0 = p1->x - (dlx0 * w);
+ ly0 = p1->y - (dly0 * w);
+ lx1 = p1->x - (dlx1 * w);
+ ly1 = p1->y - (dly1 * w);
+ nsvg__addEdge(r, lx0, ly0, left->x, left->y);
+ nsvg__addEdge(r, lx1, ly1, lx0, ly0);
+
+ rx0 = rx1 = p1->x + p1->dmx * w;
+ ry0 = ry1 = p1->y + p1->dmy * w;
+ nsvg__addEdge(r, right->x, right->y, rx1, ry1);
+ }
+
+ left->x = lx1; left->y = ly1;
+ right->x = rx1; right->y = ry1;
+}
+
+static void nsvg__roundJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth, int ncap)
+{
+ int i, n;
+ float w = lineWidth * 0.5f;
+ float dlx0 = p0->dy, dly0 = -p0->dx;
+ float dlx1 = p1->dy, dly1 = -p1->dx;
+ float a0 = atan2f(dly0, dlx0);
+ float a1 = atan2f(dly1, dlx1);
+ float da = a1 - a0;
+ float lx, ly, rx, ry;
+
+ if (da < NSVG_PI) da += NSVG_PI*2;
+ if (da > NSVG_PI) da -= NSVG_PI*2;
+
+ n = (int)ceilf((nsvg__absf(da) / NSVG_PI) * ncap);
+ if (n < 2) n = 2;
+ if (n > ncap) n = ncap;
+
+ lx = left->x;
+ ly = left->y;
+ rx = right->x;
+ ry = right->y;
+
+ for (i = 0; i < n; i++) {
+ float u = i/(float)(n-1);
+ float a = a0 + u*da;
+ float ax = cosf(a) * w, ay = sinf(a) * w;
+ float lx1 = p1->x - ax, ly1 = p1->y - ay;
+ float rx1 = p1->x + ax, ry1 = p1->y + ay;
+
+ nsvg__addEdge(r, lx1, ly1, lx, ly);
+ nsvg__addEdge(r, rx, ry, rx1, ry1);
+
+ lx = lx1; ly = ly1;
+ rx = rx1; ry = ry1;
+ }
+
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+static void nsvg__straightJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p1, float lineWidth)
+{
+ float w = lineWidth * 0.5f;
+ float lx = p1->x - (p1->dmx * w), ly = p1->y - (p1->dmy * w);
+ float rx = p1->x + (p1->dmx * w), ry = p1->y + (p1->dmy * w);
+
+ nsvg__addEdge(r, lx, ly, left->x, left->y);
+ nsvg__addEdge(r, right->x, right->y, rx, ry);
+
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+static int nsvg__curveDivs(float r, float arc, float tol)
+{
+ float da = acosf(r / (r + tol)) * 2.0f;
+ int divs = (int)ceilf(arc / da);
+ if (divs < 2) divs = 2;
+ return divs;
+}
+
+static void nsvg__expandStroke(NSVGrasterizer* r, NSVGpoint* points, int npoints, int closed, int lineJoin, int lineCap, float lineWidth)
+{
+ int ncap = nsvg__curveDivs(lineWidth*0.5f, NSVG_PI, r->tessTol); // Calculate divisions per half circle.
+ NSVGpoint left = {0,0,0,0,0,0,0,0}, right = {0,0,0,0,0,0,0,0}, firstLeft = {0,0,0,0,0,0,0,0}, firstRight = {0,0,0,0,0,0,0,0};
+ NSVGpoint* p0, *p1;
+ int j, s, e;
+
+ // Build stroke edges
+ if (closed) {
+ // Looping
+ p0 = &points[npoints-1];
+ p1 = &points[0];
+ s = 0;
+ e = npoints;
+ } else {
+ // Add cap
+ p0 = &points[0];
+ p1 = &points[1];
+ s = 1;
+ e = npoints-1;
+ }
+
+ if (closed) {
+ nsvg__initClosed(&left, &right, p0, p1, lineWidth);
+ firstLeft = left;
+ firstRight = right;
+ } else {
+ // Add cap
+ float dx = p1->x - p0->x;
+ float dy = p1->y - p0->y;
+ nsvg__normalize(&dx, &dy);
+ if (lineCap == NSVG_CAP_BUTT)
+ nsvg__buttCap(r, &left, &right, p0, dx, dy, lineWidth, 0);
+ else if (lineCap == NSVG_CAP_SQUARE)
+ nsvg__squareCap(r, &left, &right, p0, dx, dy, lineWidth, 0);
+ else if (lineCap == NSVG_CAP_ROUND)
+ nsvg__roundCap(r, &left, &right, p0, dx, dy, lineWidth, ncap, 0);
+ }
+
+ for (j = s; j < e; ++j) {
+ if (p1->flags & NSVG_PT_CORNER) {
+ if (lineJoin == NSVG_JOIN_ROUND)
+ nsvg__roundJoin(r, &left, &right, p0, p1, lineWidth, ncap);
+ else if (lineJoin == NSVG_JOIN_BEVEL || (p1->flags & NSVG_PT_BEVEL))
+ nsvg__bevelJoin(r, &left, &right, p0, p1, lineWidth);
+ else
+ nsvg__miterJoin(r, &left, &right, p0, p1, lineWidth);
+ } else {
+ nsvg__straightJoin(r, &left, &right, p1, lineWidth);
+ }
+ p0 = p1++;
+ }
+
+ if (closed) {
+ // Loop it
+ nsvg__addEdge(r, firstLeft.x, firstLeft.y, left.x, left.y);
+ nsvg__addEdge(r, right.x, right.y, firstRight.x, firstRight.y);
+ } else {
+ // Add cap
+ float dx = p1->x - p0->x;
+ float dy = p1->y - p0->y;
+ nsvg__normalize(&dx, &dy);
+ if (lineCap == NSVG_CAP_BUTT)
+ nsvg__buttCap(r, &right, &left, p1, -dx, -dy, lineWidth, 1);
+ else if (lineCap == NSVG_CAP_SQUARE)
+ nsvg__squareCap(r, &right, &left, p1, -dx, -dy, lineWidth, 1);
+ else if (lineCap == NSVG_CAP_ROUND)
+ nsvg__roundCap(r, &right, &left, p1, -dx, -dy, lineWidth, ncap, 1);
+ }
+}
+
+static void nsvg__prepareStroke(NSVGrasterizer* r, float miterLimit, int lineJoin)
+{
+ int i, j;
+ NSVGpoint* p0, *p1;
+
+ p0 = &r->points[r->npoints-1];
+ p1 = &r->points[0];
+ for (i = 0; i < r->npoints; i++) {
+ // Calculate segment direction and length
+ p0->dx = p1->x - p0->x;
+ p0->dy = p1->y - p0->y;
+ p0->len = nsvg__normalize(&p0->dx, &p0->dy);
+ // Advance
+ p0 = p1++;
+ }
+
+ // calculate joins
+ p0 = &r->points[r->npoints-1];
+ p1 = &r->points[0];
+ for (j = 0; j < r->npoints; j++) {
+ float dlx0, dly0, dlx1, dly1, dmr2, cross;
+ dlx0 = p0->dy;
+ dly0 = -p0->dx;
+ dlx1 = p1->dy;
+ dly1 = -p1->dx;
+ // Calculate extrusions
+ p1->dmx = (dlx0 + dlx1) * 0.5f;
+ p1->dmy = (dly0 + dly1) * 0.5f;
+ dmr2 = p1->dmx*p1->dmx + p1->dmy*p1->dmy;
+ if (dmr2 > 0.000001f) {
+ float s2 = 1.0f / dmr2;
+ if (s2 > 600.0f) {
+ s2 = 600.0f;
+ }
+ p1->dmx *= s2;
+ p1->dmy *= s2;
+ }
+
+ // Clear flags, but keep the corner.
+ p1->flags = (p1->flags & NSVG_PT_CORNER) ? NSVG_PT_CORNER : 0;
+
+ // Keep track of left turns.
+ cross = p1->dx * p0->dy - p0->dx * p1->dy;
+ if (cross > 0.0f)
+ p1->flags |= NSVG_PT_LEFT;
+
+ // Check to see if the corner needs to be beveled.
+ if (p1->flags & NSVG_PT_CORNER) {
+ if ((dmr2 * miterLimit*miterLimit) < 1.0f || lineJoin == NSVG_JOIN_BEVEL || lineJoin == NSVG_JOIN_ROUND) {
+ p1->flags |= NSVG_PT_BEVEL;
+ }
+ }
+
+ p0 = p1++;
+ }
+}
+
+static void nsvg__flattenShapeStroke(NSVGrasterizer* r, NSVGshape* shape, float scale)
+{
+ int i, j, closed;
+ NSVGpath* path;
+ NSVGpoint* p0, *p1;
+ float miterLimit = 4;
+ int lineJoin = shape->strokeLineJoin;
+ int lineCap = shape->strokeLineCap;
+ float lineWidth = shape->strokeWidth * scale;
+
+ for (path = shape->paths; path != NULL; path = path->next) {
+ // Flatten path
+ r->npoints = 0;
+ nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, NSVG_PT_CORNER);
+ for (i = 0; i < path->npts-1; i += 3) {
+ float* p = &path->pts[i*2];
+ nsvg__flattenCubicBez(r, p[0]*scale,p[1]*scale, p[2]*scale,p[3]*scale, p[4]*scale,p[5]*scale, p[6]*scale,p[7]*scale, 0, NSVG_PT_CORNER);
+ }
+ if (r->npoints < 2)
+ continue;
+
+ closed = path->closed;
+
+ // If the first and last points are the same, remove the last, mark as closed path.
+ p0 = &r->points[r->npoints-1];
+ p1 = &r->points[0];
+ if (nsvg__ptEquals(p0->x,p0->y, p1->x,p1->y, r->distTol)) {
+ r->npoints--;
+ p0 = &r->points[r->npoints-1];
+ closed = 1;
+ }
+
+ if (shape->strokeDashCount > 0) {
+ int idash = 0, dashState = 1;
+ float totalDist = 0, dashLen, allDashLen, dashOffset;
+ NSVGpoint cur;
+
+ if (closed)
+ nsvg__appendPathPoint(r, r->points[0]);
+
+ // Duplicate points -> points2.
+ nsvg__duplicatePoints(r);
+
+ r->npoints = 0;
+ cur = r->points2[0];
+ nsvg__appendPathPoint(r, cur);
+
+ // Figure out dash offset.
+ allDashLen = 0;
+ for (j = 0; j < shape->strokeDashCount; j++)
+ allDashLen += shape->strokeDashArray[j];
+ if (shape->strokeDashCount & 1)
+ allDashLen *= 2.0f;
+ // Find location inside pattern
+ dashOffset = fmodf(shape->strokeDashOffset, allDashLen);
+ if (dashOffset < 0.0f)
+ dashOffset += allDashLen;
+
+ while (dashOffset > shape->strokeDashArray[idash]) {
+ dashOffset -= shape->strokeDashArray[idash];
+ idash = (idash + 1) % shape->strokeDashCount;
+ }
+ dashLen = (shape->strokeDashArray[idash] - dashOffset) * scale;
+
+ for (j = 1; j < r->npoints2; ) {
+ float dx = r->points2[j].x - cur.x;
+ float dy = r->points2[j].y - cur.y;
+ float dist = sqrtf(dx*dx + dy*dy);
+
+ if ((totalDist + dist) > dashLen) {
+ // Calculate intermediate point
+ float d = (dashLen - totalDist) / dist;
+ float x = cur.x + dx * d;
+ float y = cur.y + dy * d;
+ nsvg__addPathPoint(r, x, y, NSVG_PT_CORNER);
+
+ // Stroke
+ if (r->npoints > 1 && dashState) {
+ nsvg__prepareStroke(r, miterLimit, lineJoin);
+ nsvg__expandStroke(r, r->points, r->npoints, 0, lineJoin, lineCap, lineWidth);
+ }
+ // Advance dash pattern
+ dashState = !dashState;
+ idash = (idash+1) % shape->strokeDashCount;
+ dashLen = shape->strokeDashArray[idash] * scale;
+ // Restart
+ cur.x = x;
+ cur.y = y;
+ cur.flags = NSVG_PT_CORNER;
+ totalDist = 0.0f;
+ r->npoints = 0;
+ nsvg__appendPathPoint(r, cur);
+ } else {
+ totalDist += dist;
+ cur = r->points2[j];
+ nsvg__appendPathPoint(r, cur);
+ j++;
+ }
+ }
+ // Stroke any leftover path
+ if (r->npoints > 1 && dashState)
+ nsvg__expandStroke(r, r->points, r->npoints, 0, lineJoin, lineCap, lineWidth);
+ } else {
+ nsvg__prepareStroke(r, miterLimit, lineJoin);
+ nsvg__expandStroke(r, r->points, r->npoints, closed, lineJoin, lineCap, lineWidth);
+ }
+ }
+}
+
+static int nsvg__cmpEdge(const void *p, const void *q)
+{
+ NSVGedge* a = (NSVGedge*)p;
+ NSVGedge* b = (NSVGedge*)q;
+
+ if (a->y0 < b->y0) return -1;
+ if (a->y0 > b->y0) return 1;
+ return 0;
+}
+
+
+static NSVGactiveEdge* nsvg__addActive(NSVGrasterizer* r, NSVGedge* e, float startPoint)
+{
+ NSVGactiveEdge* z;
+
+ if (r->freelist != NULL) {
+ // Restore from freelist.
+ z = r->freelist;
+ r->freelist = z->next;
+ } else {
+ // Alloc new edge.
+ z = (NSVGactiveEdge*)nsvg__alloc(r, sizeof(NSVGactiveEdge));
+ if (z == NULL) return NULL;
+ }
+
+ float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
+// STBTT_assert(e->y0 <= start_point);
+ // round dx down to avoid going too far
+ if (dxdy < 0)
+ z->dx = (int)(-floorf(NSVG__FIX * -dxdy));
+ else
+ z->dx = (int)floorf(NSVG__FIX * dxdy);
+ z->x = (int)floorf(NSVG__FIX * (e->x0 + dxdy * (startPoint - e->y0)));
+// z->x -= off_x * FIX;
+ z->ey = e->y1;
+ z->next = 0;
+ z->dir = e->dir;
+
+ return z;
+}
+
+static void nsvg__freeActive(NSVGrasterizer* r, NSVGactiveEdge* z)
+{
+ z->next = r->freelist;
+ r->freelist = z;
+}
+
+static void nsvg__fillScanline(unsigned char* scanline, int len, int x0, int x1, int maxWeight, int* xmin, int* xmax)
+{
+ int i = x0 >> NSVG__FIXSHIFT;
+ int j = x1 >> NSVG__FIXSHIFT;
+ if (i < *xmin) *xmin = i;
+ if (j > *xmax) *xmax = j;
+ if (i < len && j >= 0) {
+ if (i == j) {
+ // x0,x1 are the same pixel, so compute combined coverage
+ scanline[i] += (unsigned char)((x1 - x0) * maxWeight >> NSVG__FIXSHIFT);
+ } else {
+ if (i >= 0) // add antialiasing for x0
+ scanline[i] += (unsigned char)(((NSVG__FIX - (x0 & NSVG__FIXMASK)) * maxWeight) >> NSVG__FIXSHIFT);
+ else
+ i = -1; // clip
+
+ if (j < len) // add antialiasing for x1
+ scanline[j] += (unsigned char)(((x1 & NSVG__FIXMASK) * maxWeight) >> NSVG__FIXSHIFT);
+ else
+ j = len; // clip
+
+ for (++i; i < j; ++i) // fill pixels between x0 and x1
+ scanline[i] += (unsigned char)maxWeight;
+ }
+ }
+}
+
+// note: this routine clips fills that extend off the edges... ideally this
+// wouldn't happen, but it could happen if the truetype glyph bounding boxes
+// are wrong, or if the user supplies a too-small bitmap
+static void nsvg__fillActiveEdges(unsigned char* scanline, int len, NSVGactiveEdge* e, int maxWeight, int* xmin, int* xmax, char fillRule)
+{
+ // non-zero winding fill
+ int x0 = 0, w = 0;
+
+ if (fillRule == NSVG_FILLRULE_NONZERO) {
+ // Non-zero
+ while (e != NULL) {
+ if (w == 0) {
+ // if we're currently at zero, we need to record the edge start point
+ x0 = e->x; w += e->dir;
+ } else {
+ int x1 = e->x; w += e->dir;
+ // if we went to zero, we need to draw
+ if (w == 0)
+ nsvg__fillScanline(scanline, len, x0, x1, maxWeight, xmin, xmax);
+ }
+ e = e->next;
+ }
+ } else if (fillRule == NSVG_FILLRULE_EVENODD) {
+ // Even-odd
+ while (e != NULL) {
+ if (w == 0) {
+ // if we're currently at zero, we need to record the edge start point
+ x0 = e->x; w = 1;
+ } else {
+ int x1 = e->x; w = 0;
+ nsvg__fillScanline(scanline, len, x0, x1, maxWeight, xmin, xmax);
+ }
+ e = e->next;
+ }
+ }
+}
+
+static float nsvg__clampf(float a, float mn, float mx) { return a < mn ? mn : (a > mx ? mx : a); }
+
+static unsigned int nsvg__RGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
+{
+ return (r) | (g << 8) | (b << 16) | (a << 24);
+}
+
+static unsigned int nsvg__lerpRGBA(unsigned int c0, unsigned int c1, float u)
+{
+ int iu = (int)(nsvg__clampf(u, 0.0f, 1.0f) * 256.0f);
+ int r = (((c0) & 0xff)*(256-iu) + (((c1) & 0xff)*iu)) >> 8;
+ int g = (((c0>>8) & 0xff)*(256-iu) + (((c1>>8) & 0xff)*iu)) >> 8;
+ int b = (((c0>>16) & 0xff)*(256-iu) + (((c1>>16) & 0xff)*iu)) >> 8;
+ int a = (((c0>>24) & 0xff)*(256-iu) + (((c1>>24) & 0xff)*iu)) >> 8;
+ return nsvg__RGBA((unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a);
+}
+
+static unsigned int nsvg__applyOpacity(unsigned int c, float u)
+{
+ int iu = (int)(nsvg__clampf(u, 0.0f, 1.0f) * 256.0f);
+ int r = (c) & 0xff;
+ int g = (c>>8) & 0xff;
+ int b = (c>>16) & 0xff;
+ int a = (((c>>24) & 0xff)*iu) >> 8;
+ return nsvg__RGBA((unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a);
+}
+
+static inline int nsvg__div255(int x)
+{
+ return ((x+1) * 257) >> 16;
+}
+
+static void nsvg__scanlineSolid(unsigned char* dst, int count, unsigned char* cover, int x, int y,
+ float tx, float ty, float scale, NSVGcachedPaint* cache)
+{
+
+ if (cache->type == NSVG_PAINT_COLOR) {
+ int i, cr, cg, cb, ca;
+ cr = cache->colors[0] & 0xff;
+ cg = (cache->colors[0] >> 8) & 0xff;
+ cb = (cache->colors[0] >> 16) & 0xff;
+ ca = (cache->colors[0] >> 24) & 0xff;
+
+ for (i = 0; i < count; i++) {
+ int r,g,b;
+ int a = nsvg__div255((int)cover[0] * ca);
+ int ia = 255 - a;
+ // Premultiply
+ r = nsvg__div255(cr * a);
+ g = nsvg__div255(cg * a);
+ b = nsvg__div255(cb * a);
+
+ // Blend over
+ r += nsvg__div255(ia * (int)dst[0]);
+ g += nsvg__div255(ia * (int)dst[1]);
+ b += nsvg__div255(ia * (int)dst[2]);
+ a += nsvg__div255(ia * (int)dst[3]);
+
+ dst[0] = (unsigned char)r;
+ dst[1] = (unsigned char)g;
+ dst[2] = (unsigned char)b;
+ dst[3] = (unsigned char)a;
+
+ cover++;
+ dst += 4;
+ }
+ } else if (cache->type == NSVG_PAINT_LINEAR_GRADIENT) {
+ // TODO: spread modes.
+ // TODO: plenty of opportunities to optimize.
+ float fx, fy, dx, gy;
+ float* t = cache->xform;
+ int i, cr, cg, cb, ca;
+ unsigned int c;
+
+ fx = (x - tx) / scale;
+ fy = (y - ty) / scale;
+ dx = 1.0f / scale;
+
+ for (i = 0; i < count; i++) {
+ int r,g,b,a,ia;
+ gy = fx*t[1] + fy*t[3] + t[5];
+ c = cache->colors[(int)nsvg__clampf(gy*255.0f, 0, 255.0f)];
+ cr = (c) & 0xff;
+ cg = (c >> 8) & 0xff;
+ cb = (c >> 16) & 0xff;
+ ca = (c >> 24) & 0xff;
+
+ a = nsvg__div255((int)cover[0] * ca);
+ ia = 255 - a;
+
+ // Premultiply
+ r = nsvg__div255(cr * a);
+ g = nsvg__div255(cg * a);
+ b = nsvg__div255(cb * a);
+
+ // Blend over
+ r += nsvg__div255(ia * (int)dst[0]);
+ g += nsvg__div255(ia * (int)dst[1]);
+ b += nsvg__div255(ia * (int)dst[2]);
+ a += nsvg__div255(ia * (int)dst[3]);
+
+ dst[0] = (unsigned char)r;
+ dst[1] = (unsigned char)g;
+ dst[2] = (unsigned char)b;
+ dst[3] = (unsigned char)a;
+
+ cover++;
+ dst += 4;
+ fx += dx;
+ }
+ } else if (cache->type == NSVG_PAINT_RADIAL_GRADIENT) {
+ // TODO: spread modes.
+ // TODO: plenty of opportunities to optimize.
+ // TODO: focus (fx,fy)
+ float fx, fy, dx, gx, gy, gd;
+ float* t = cache->xform;
+ int i, cr, cg, cb, ca;
+ unsigned int c;
+
+ fx = (x - tx) / scale;
+ fy = (y - ty) / scale;
+ dx = 1.0f / scale;
+
+ for (i = 0; i < count; i++) {
+ int r,g,b,a,ia;
+ gx = fx*t[0] + fy*t[2] + t[4];
+ gy = fx*t[1] + fy*t[3] + t[5];
+ gd = sqrtf(gx*gx + gy*gy);
+ c = cache->colors[(int)nsvg__clampf(gd*255.0f, 0, 255.0f)];
+ cr = (c) & 0xff;
+ cg = (c >> 8) & 0xff;
+ cb = (c >> 16) & 0xff;
+ ca = (c >> 24) & 0xff;
+
+ a = nsvg__div255((int)cover[0] * ca);
+ ia = 255 - a;
+
+ // Premultiply
+ r = nsvg__div255(cr * a);
+ g = nsvg__div255(cg * a);
+ b = nsvg__div255(cb * a);
+
+ // Blend over
+ r += nsvg__div255(ia * (int)dst[0]);
+ g += nsvg__div255(ia * (int)dst[1]);
+ b += nsvg__div255(ia * (int)dst[2]);
+ a += nsvg__div255(ia * (int)dst[3]);
+
+ dst[0] = (unsigned char)r;
+ dst[1] = (unsigned char)g;
+ dst[2] = (unsigned char)b;
+ dst[3] = (unsigned char)a;
+
+ cover++;
+ dst += 4;
+ fx += dx;
+ }
+ }
+}
+
+static void nsvg__rasterizeSortedEdges(NSVGrasterizer *r, float tx, float ty, float scale, NSVGcachedPaint* cache, char fillRule)
+{
+ NSVGactiveEdge *active = NULL;
+ int y, s;
+ int e = 0;
+ int maxWeight = (255 / NSVG__SUBSAMPLES); // weight per vertical scanline
+ int xmin, xmax;
+
+ for (y = 0; y < r->height; y++) {
+ memset(r->scanline, 0, r->width);
+ xmin = r->width;
+ xmax = 0;
+ for (s = 0; s < NSVG__SUBSAMPLES; ++s) {
+ // find center of pixel for this scanline
+ float scany = y*NSVG__SUBSAMPLES + s + 0.5f;
+ NSVGactiveEdge **step = &active;
+
+ // update all active edges;
+ // remove all active edges that terminate before the center of this scanline
+ while (*step) {
+ NSVGactiveEdge *z = *step;
+ if (z->ey <= scany) {
+ *step = z->next; // delete from list
+// NSVG__assert(z->valid);
+ nsvg__freeActive(r, z);
+ } else {
+ z->x += z->dx; // advance to position for current scanline
+ step = &((*step)->next); // advance through list
+ }
+ }
+
+ // resort the list if needed
+ for (;;) {
+ int changed = 0;
+ step = &active;
+ while (*step && (*step)->next) {
+ if ((*step)->x > (*step)->next->x) {
+ NSVGactiveEdge* t = *step;
+ NSVGactiveEdge* q = t->next;
+ t->next = q->next;
+ q->next = t;
+ *step = q;
+ changed = 1;
+ }
+ step = &(*step)->next;
+ }
+ if (!changed) break;
+ }
+
+ // insert all edges that start before the center of this scanline -- omit ones that also end on this scanline
+ while (e < r->nedges && r->edges[e].y0 <= scany) {
+ if (r->edges[e].y1 > scany) {
+ NSVGactiveEdge* z = nsvg__addActive(r, &r->edges[e], scany);
+ if (z == NULL) break;
+ // find insertion point
+ if (active == NULL) {
+ active = z;
+ } else if (z->x < active->x) {
+ // insert at front
+ z->next = active;
+ active = z;
+ } else {
+ // find thing to insert AFTER
+ NSVGactiveEdge* p = active;
+ while (p->next && p->next->x < z->x)
+ p = p->next;
+ // at this point, p->next->x is NOT < z->x
+ z->next = p->next;
+ p->next = z;
+ }
+ }
+ e++;
+ }
+
+ // now process all active edges in non-zero fashion
+ if (active != NULL)
+ nsvg__fillActiveEdges(r->scanline, r->width, active, maxWeight, &xmin, &xmax, fillRule);
+ }
+ // Blit
+ if (xmin < 0) xmin = 0;
+ if (xmax > r->width-1) xmax = r->width-1;
+ if (xmin <= xmax) {
+ nsvg__scanlineSolid(&r->bitmap[y * r->stride] + xmin*4, xmax-xmin+1, &r->scanline[xmin], xmin, y, tx,ty, scale, cache);
+ }
+ }
+
+}
+
+static void nsvg__unpremultiplyAlpha(unsigned char* image, int w, int h, int stride)
+{
+ int x,y;
+
+ // Unpremultiply
+ for (y = 0; y < h; y++) {
+ unsigned char *row = &image[y*stride];
+ for (x = 0; x < w; x++) {
+ int r = row[0], g = row[1], b = row[2], a = row[3];
+ if (a != 0) {
+ row[0] = (unsigned char)(r*255/a);
+ row[1] = (unsigned char)(g*255/a);
+ row[2] = (unsigned char)(b*255/a);
+ }
+ row += 4;
+ }
+ }
+
+ // Defringe
+ for (y = 0; y < h; y++) {
+ unsigned char *row = &image[y*stride];
+ for (x = 0; x < w; x++) {
+ int r = 0, g = 0, b = 0, a = row[3], n = 0;
+ if (a == 0) {
+ if (x-1 > 0 && row[-1] != 0) {
+ r += row[-4];
+ g += row[-3];
+ b += row[-2];
+ n++;
+ }
+ if (x+1 < w && row[7] != 0) {
+ r += row[4];
+ g += row[5];
+ b += row[6];
+ n++;
+ }
+ if (y-1 > 0 && row[-stride+3] != 0) {
+ r += row[-stride];
+ g += row[-stride+1];
+ b += row[-stride+2];
+ n++;
+ }
+ if (y+1 < h && row[stride+3] != 0) {
+ r += row[stride];
+ g += row[stride+1];
+ b += row[stride+2];
+ n++;
+ }
+ if (n > 0) {
+ row[0] = (unsigned char)(r/n);
+ row[1] = (unsigned char)(g/n);
+ row[2] = (unsigned char)(b/n);
+ }
+ }
+ row += 4;
+ }
+ }
+}
+
+
+static void nsvg__initPaint(NSVGcachedPaint* cache, NSVGpaint* paint, float opacity)
+{
+ int i, j;
+ NSVGgradient* grad;
+
+ cache->type = paint->type;
+
+ if (paint->type == NSVG_PAINT_COLOR) {
+ cache->colors[0] = nsvg__applyOpacity(paint->color, opacity);
+ return;
+ }
+
+ grad = paint->gradient;
+
+ cache->spread = grad->spread;
+ memcpy(cache->xform, grad->xform, sizeof(float)*6);
+
+ if (grad->nstops == 0) {
+ for (i = 0; i < 256; i++)
+ cache->colors[i] = 0;
+ } if (grad->nstops == 1) {
+ for (i = 0; i < 256; i++)
+ cache->colors[i] = nsvg__applyOpacity(grad->stops[i].color, opacity);
+ } else {
+ unsigned int ca, cb = 0;
+ float ua, ub, du, u;
+ int ia, ib, count;
+
+ ca = nsvg__applyOpacity(grad->stops[0].color, opacity);
+ ua = nsvg__clampf(grad->stops[0].offset, 0, 1);
+ ub = nsvg__clampf(grad->stops[grad->nstops-1].offset, ua, 1);
+ ia = (int)(ua * 255.0f);
+ ib = (int)(ub * 255.0f);
+ for (i = 0; i < ia; i++) {
+ cache->colors[i] = ca;
+ }
+
+ for (i = 0; i < grad->nstops-1; i++) {
+ ca = nsvg__applyOpacity(grad->stops[i].color, opacity);
+ cb = nsvg__applyOpacity(grad->stops[i+1].color, opacity);
+ ua = nsvg__clampf(grad->stops[i].offset, 0, 1);
+ ub = nsvg__clampf(grad->stops[i+1].offset, 0, 1);
+ ia = (int)(ua * 255.0f);
+ ib = (int)(ub * 255.0f);
+ count = ib - ia;
+ if (count <= 0) continue;
+ u = 0;
+ du = 1.0f / (float)count;
+ for (j = 0; j < count; j++) {
+ cache->colors[ia+j] = nsvg__lerpRGBA(ca,cb,u);
+ u += du;
+ }
+ }
+
+ for (i = ib; i < 256; i++)
+ cache->colors[i] = cb;
+ }
+
+}
+
+/*
+static void dumpEdges(NSVGrasterizer* r, const char* name)
+{
+ float xmin = 0, xmax = 0, ymin = 0, ymax = 0;
+ NSVGedge *e = NULL;
+ int i;
+ if (r->nedges == 0) return;
+ FILE* fp = fopen(name, "w");
+ if (fp == NULL) return;
+
+ xmin = xmax = r->edges[0].x0;
+ ymin = ymax = r->edges[0].y0;
+ for (i = 0; i < r->nedges; i++) {
+ e = &r->edges[i];
+ xmin = nsvg__minf(xmin, e->x0);
+ xmin = nsvg__minf(xmin, e->x1);
+ xmax = nsvg__maxf(xmax, e->x0);
+ xmax = nsvg__maxf(xmax, e->x1);
+ ymin = nsvg__minf(ymin, e->y0);
+ ymin = nsvg__minf(ymin, e->y1);
+ ymax = nsvg__maxf(ymax, e->y0);
+ ymax = nsvg__maxf(ymax, e->y1);
+ }
+
+ fprintf(fp, "<svg viewBox=\"%f %f %f %f\" xmlns=\"http://www.w3.org/2000/svg\">", xmin, ymin, (xmax - xmin), (ymax - ymin));
+
+ for (i = 0; i < r->nedges; i++) {
+ e = &r->edges[i];
+ fprintf(fp ,"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" style=\"stroke:#000;\" />", e->x0,e->y0, e->x1,e->y1);
+ }
+
+ for (i = 0; i < r->npoints; i++) {
+ if (i+1 < r->npoints)
+ fprintf(fp ,"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" style=\"stroke:#f00;\" />", r->points[i].x, r->points[i].y, r->points[i+1].x, r->points[i+1].y);
+ fprintf(fp ,"<circle cx=\"%f\" cy=\"%f\" r=\"1\" style=\"fill:%s;\" />", r->points[i].x, r->points[i].y, r->points[i].flags == 0 ? "#f00" : "#0f0");
+ }
+
+ fprintf(fp, "</svg>");
+ fclose(fp);
+}
+*/
+
+void nsvgRasterize(NSVGrasterizer* r,
+ NSVGimage* image, float tx, float ty, float scale,
+ unsigned char* dst, int w, int h, int stride)
+{
+ NSVGshape *shape = NULL;
+ NSVGedge *e = NULL;
+ NSVGcachedPaint cache;
+ int i;
+
+ r->bitmap = dst;
+ r->width = w;
+ r->height = h;
+ r->stride = stride;
+
+ if (w > r->cscanline) {
+ r->cscanline = w;
+ r->scanline = (unsigned char*)realloc(r->scanline, w);
+ if (r->scanline == NULL) return;
+ }
+
+ for (i = 0; i < h; i++)
+ memset(&dst[i*stride], 0, w*4);
+
+ for (shape = image->shapes; shape != NULL; shape = shape->next) {
+ if (!(shape->flags & NSVG_FLAGS_VISIBLE))
+ continue;
+
+ if (shape->fill.type != NSVG_PAINT_NONE) {
+ nsvg__resetPool(r);
+ r->freelist = NULL;
+ r->nedges = 0;
+
+ nsvg__flattenShape(r, shape, scale);
+
+ // Scale and translate edges
+ for (i = 0; i < r->nedges; i++) {
+ e = &r->edges[i];
+ e->x0 = tx + e->x0;
+ e->y0 = (ty + e->y0) * NSVG__SUBSAMPLES;
+ e->x1 = tx + e->x1;
+ e->y1 = (ty + e->y1) * NSVG__SUBSAMPLES;
+ }
+
+ // Rasterize edges
+ qsort(r->edges, r->nedges, sizeof(NSVGedge), nsvg__cmpEdge);
+
+ // now, traverse the scanlines and find the intersections on each scanline, use non-zero rule
+ nsvg__initPaint(&cache, &shape->fill, shape->opacity);
+
+ nsvg__rasterizeSortedEdges(r, tx,ty,scale, &cache, shape->fillRule);
+ }
+ if (shape->stroke.type != NSVG_PAINT_NONE && (shape->strokeWidth * scale) > 0.01f) {
+ nsvg__resetPool(r);
+ r->freelist = NULL;
+ r->nedges = 0;
+
+ nsvg__flattenShapeStroke(r, shape, scale);
+
+// dumpEdges(r, "edge.svg");
+
+ // Scale and translate edges
+ for (i = 0; i < r->nedges; i++) {
+ e = &r->edges[i];
+ e->x0 = tx + e->x0;
+ e->y0 = (ty + e->y0) * NSVG__SUBSAMPLES;
+ e->x1 = tx + e->x1;
+ e->y1 = (ty + e->y1) * NSVG__SUBSAMPLES;
+ }
+
+ // Rasterize edges
+ qsort(r->edges, r->nedges, sizeof(NSVGedge), nsvg__cmpEdge);
+
+ // now, traverse the scanlines and find the intersections on each scanline, use non-zero rule
+ nsvg__initPaint(&cache, &shape->stroke, shape->opacity);
+
+ nsvg__rasterizeSortedEdges(r, tx,ty,scale, &cache, NSVG_FILLRULE_NONZERO);
+ }
+ }
+
+ nsvg__unpremultiplyAlpha(dst, w, h, stride);
+
+ r->bitmap = NULL;
+ r->width = 0;
+ r->height = 0;
+ r->stride = 0;
+}
+
+#endif
diff --git a/bgfx/shaders/dx11/chains/default/fs_blit.bin b/bgfx/shaders/dx11/chains/default/fs_blit.bin
new file mode 100644
index 00000000000..80d85fb1107
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/default/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/default/vs_blit.bin b/bgfx/shaders/dx11/chains/default/vs_blit.bin
new file mode 100644
index 00000000000..b0bebf9da4c
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/default/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_blit.bin b/bgfx/shaders/dx11/fs_blit.bin
index 0a2c7a979f6..80d85fb1107 100644
--- a/bgfx/shaders/dx11/fs_blit.bin
+++ b/bgfx/shaders/dx11/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_color.bin b/bgfx/shaders/dx11/fs_color.bin
index 86da7f9fde7..e70c00970e0 100644
--- a/bgfx/shaders/dx11/fs_color.bin
+++ b/bgfx/shaders/dx11/fs_color.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_deconverge.bin b/bgfx/shaders/dx11/fs_deconverge.bin
index e85b211b5f7..6409659a035 100644
--- a/bgfx/shaders/dx11/fs_deconverge.bin
+++ b/bgfx/shaders/dx11/fs_deconverge.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_defocus.bin b/bgfx/shaders/dx11/fs_defocus.bin
index 894cc151994..1636abdef10 100644
--- a/bgfx/shaders/dx11/fs_defocus.bin
+++ b/bgfx/shaders/dx11/fs_defocus.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_distortion.bin b/bgfx/shaders/dx11/fs_distortion.bin
index 13e60b64c34..a989980df37 100644
--- a/bgfx/shaders/dx11/fs_distortion.bin
+++ b/bgfx/shaders/dx11/fs_distortion.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_gui.bin b/bgfx/shaders/dx11/fs_gui.bin
index 207238153b0..80d85fb1107 100644
--- a/bgfx/shaders/dx11/fs_gui.bin
+++ b/bgfx/shaders/dx11/fs_gui.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_ntsc_decode.bin b/bgfx/shaders/dx11/fs_ntsc_decode.bin
index a63dd82f051..ded01d9cefa 100644
--- a/bgfx/shaders/dx11/fs_ntsc_decode.bin
+++ b/bgfx/shaders/dx11/fs_ntsc_decode.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_ntsc_encode.bin b/bgfx/shaders/dx11/fs_ntsc_encode.bin
index bbf6cf59f69..805958817ab 100644
--- a/bgfx/shaders/dx11/fs_ntsc_encode.bin
+++ b/bgfx/shaders/dx11/fs_ntsc_encode.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_phosphor.bin b/bgfx/shaders/dx11/fs_phosphor.bin
index 96ed99bf58f..aedfd3dead3 100644
--- a/bgfx/shaders/dx11/fs_phosphor.bin
+++ b/bgfx/shaders/dx11/fs_phosphor.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_post.bin b/bgfx/shaders/dx11/fs_post.bin
index dbc2df6f5e2..b436f6b57eb 100644
--- a/bgfx/shaders/dx11/fs_post.bin
+++ b/bgfx/shaders/dx11/fs_post.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_prescale.bin b/bgfx/shaders/dx11/fs_prescale.bin
index 775efb02666..80d85fb1107 100644
--- a/bgfx/shaders/dx11/fs_prescale.bin
+++ b/bgfx/shaders/dx11/fs_prescale.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/fs_screen.bin b/bgfx/shaders/dx11/fs_screen.bin
index d233a876afe..80d85fb1107 100644
--- a/bgfx/shaders/dx11/fs_screen.bin
+++ b/bgfx/shaders/dx11/fs_screen.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_blit.bin b/bgfx/shaders/dx11/vs_blit.bin
index dbdd427c139..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_blit.bin
+++ b/bgfx/shaders/dx11/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_color.bin b/bgfx/shaders/dx11/vs_color.bin
index 1ac6da1c4b7..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_color.bin
+++ b/bgfx/shaders/dx11/vs_color.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_deconverge.bin b/bgfx/shaders/dx11/vs_deconverge.bin
index 07831863c5e..d7604280bc2 100644
--- a/bgfx/shaders/dx11/vs_deconverge.bin
+++ b/bgfx/shaders/dx11/vs_deconverge.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_defocus.bin b/bgfx/shaders/dx11/vs_defocus.bin
index a2f278b3a0e..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_defocus.bin
+++ b/bgfx/shaders/dx11/vs_defocus.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_distortion.bin b/bgfx/shaders/dx11/vs_distortion.bin
index cb7e87ac0a8..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_distortion.bin
+++ b/bgfx/shaders/dx11/vs_distortion.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_gui.bin b/bgfx/shaders/dx11/vs_gui.bin
index 8fe988ac52e..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_gui.bin
+++ b/bgfx/shaders/dx11/vs_gui.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_ntsc_decode.bin b/bgfx/shaders/dx11/vs_ntsc_decode.bin
index 3aced6dceb1..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_ntsc_decode.bin
+++ b/bgfx/shaders/dx11/vs_ntsc_decode.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_ntsc_encode.bin b/bgfx/shaders/dx11/vs_ntsc_encode.bin
index 0b269c0314f..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_ntsc_encode.bin
+++ b/bgfx/shaders/dx11/vs_ntsc_encode.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_phosphor.bin b/bgfx/shaders/dx11/vs_phosphor.bin
index 4d5113f78cf..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_phosphor.bin
+++ b/bgfx/shaders/dx11/vs_phosphor.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_post.bin b/bgfx/shaders/dx11/vs_post.bin
index dfabae70ba2..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_post.bin
+++ b/bgfx/shaders/dx11/vs_post.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_prescale.bin b/bgfx/shaders/dx11/vs_prescale.bin
index a26188bb295..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_prescale.bin
+++ b/bgfx/shaders/dx11/vs_prescale.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/vs_screen.bin b/bgfx/shaders/dx11/vs_screen.bin
index e2c93936309..b0bebf9da4c 100644
--- a/bgfx/shaders/dx11/vs_screen.bin
+++ b/bgfx/shaders/dx11/vs_screen.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/default/fs_blit.bin b/bgfx/shaders/dx9/chains/default/fs_blit.bin
new file mode 100644
index 00000000000..ef8fa0730c3
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/default/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/default/vs_blit.bin b/bgfx/shaders/dx9/chains/default/vs_blit.bin
new file mode 100644
index 00000000000..ea94c83e62d
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/default/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_blit.bin b/bgfx/shaders/dx9/fs_blit.bin
index b0f01ee708c..ef8fa0730c3 100644
--- a/bgfx/shaders/dx9/fs_blit.bin
+++ b/bgfx/shaders/dx9/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_color.bin b/bgfx/shaders/dx9/fs_color.bin
index 68f1eae9dc0..985cf1bc91a 100644
--- a/bgfx/shaders/dx9/fs_color.bin
+++ b/bgfx/shaders/dx9/fs_color.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_deconverge.bin b/bgfx/shaders/dx9/fs_deconverge.bin
index 5092fcd9fc8..8f85b74868b 100644
--- a/bgfx/shaders/dx9/fs_deconverge.bin
+++ b/bgfx/shaders/dx9/fs_deconverge.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_defocus.bin b/bgfx/shaders/dx9/fs_defocus.bin
index 602dcf53c64..fe909ee1f26 100644
--- a/bgfx/shaders/dx9/fs_defocus.bin
+++ b/bgfx/shaders/dx9/fs_defocus.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_distortion.bin b/bgfx/shaders/dx9/fs_distortion.bin
index becf5b0d597..0c2025bbcc6 100644
--- a/bgfx/shaders/dx9/fs_distortion.bin
+++ b/bgfx/shaders/dx9/fs_distortion.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_gui.bin b/bgfx/shaders/dx9/fs_gui.bin
index b64c72268cc..ef8fa0730c3 100644
--- a/bgfx/shaders/dx9/fs_gui.bin
+++ b/bgfx/shaders/dx9/fs_gui.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_ntsc_decode.bin b/bgfx/shaders/dx9/fs_ntsc_decode.bin
index 5d2a3329b6f..ec66f2a38a9 100644
--- a/bgfx/shaders/dx9/fs_ntsc_decode.bin
+++ b/bgfx/shaders/dx9/fs_ntsc_decode.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_ntsc_encode.bin b/bgfx/shaders/dx9/fs_ntsc_encode.bin
index 019a55a80ab..ad313e3da19 100644
--- a/bgfx/shaders/dx9/fs_ntsc_encode.bin
+++ b/bgfx/shaders/dx9/fs_ntsc_encode.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_phosphor.bin b/bgfx/shaders/dx9/fs_phosphor.bin
index eafc92b4ecf..cfbdd71f188 100644
--- a/bgfx/shaders/dx9/fs_phosphor.bin
+++ b/bgfx/shaders/dx9/fs_phosphor.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_post.bin b/bgfx/shaders/dx9/fs_post.bin
index 96408926fbe..f8f79b90ab6 100644
--- a/bgfx/shaders/dx9/fs_post.bin
+++ b/bgfx/shaders/dx9/fs_post.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_prescale.bin b/bgfx/shaders/dx9/fs_prescale.bin
index b4b71f80099..ef8fa0730c3 100644
--- a/bgfx/shaders/dx9/fs_prescale.bin
+++ b/bgfx/shaders/dx9/fs_prescale.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/fs_screen.bin b/bgfx/shaders/dx9/fs_screen.bin
index 81f469b607b..ef8fa0730c3 100644
--- a/bgfx/shaders/dx9/fs_screen.bin
+++ b/bgfx/shaders/dx9/fs_screen.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_blit.bin b/bgfx/shaders/dx9/vs_blit.bin
index 63d53341092..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_blit.bin
+++ b/bgfx/shaders/dx9/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_color.bin b/bgfx/shaders/dx9/vs_color.bin
index 1dd85de84ae..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_color.bin
+++ b/bgfx/shaders/dx9/vs_color.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_deconverge.bin b/bgfx/shaders/dx9/vs_deconverge.bin
index c514e5f8cd0..3d90ec3803a 100644
--- a/bgfx/shaders/dx9/vs_deconverge.bin
+++ b/bgfx/shaders/dx9/vs_deconverge.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_defocus.bin b/bgfx/shaders/dx9/vs_defocus.bin
index 90eedcc43eb..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_defocus.bin
+++ b/bgfx/shaders/dx9/vs_defocus.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_distortion.bin b/bgfx/shaders/dx9/vs_distortion.bin
index 72faf4cd3df..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_distortion.bin
+++ b/bgfx/shaders/dx9/vs_distortion.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_gui.bin b/bgfx/shaders/dx9/vs_gui.bin
index c1c19c4b95e..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_gui.bin
+++ b/bgfx/shaders/dx9/vs_gui.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_ntsc_decode.bin b/bgfx/shaders/dx9/vs_ntsc_decode.bin
index 5030b370e69..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_ntsc_decode.bin
+++ b/bgfx/shaders/dx9/vs_ntsc_decode.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_ntsc_encode.bin b/bgfx/shaders/dx9/vs_ntsc_encode.bin
index 1db3699e541..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_ntsc_encode.bin
+++ b/bgfx/shaders/dx9/vs_ntsc_encode.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_phosphor.bin b/bgfx/shaders/dx9/vs_phosphor.bin
index 441a155b3db..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_phosphor.bin
+++ b/bgfx/shaders/dx9/vs_phosphor.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_post.bin b/bgfx/shaders/dx9/vs_post.bin
index 66dec862e4c..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_post.bin
+++ b/bgfx/shaders/dx9/vs_post.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_prescale.bin b/bgfx/shaders/dx9/vs_prescale.bin
index a79c9e2b7e4..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_prescale.bin
+++ b/bgfx/shaders/dx9/vs_prescale.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/vs_screen.bin b/bgfx/shaders/dx9/vs_screen.bin
index e3bd9417ad8..ea94c83e62d 100644
--- a/bgfx/shaders/dx9/vs_screen.bin
+++ b/bgfx/shaders/dx9/vs_screen.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/default/fs_blit.bin b/bgfx/shaders/gles/chains/default/fs_blit.bin
new file mode 100644
index 00000000000..22e2f0c23d0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/default/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/default/vs_blit.bin b/bgfx/shaders/gles/chains/default/vs_blit.bin
new file mode 100644
index 00000000000..9dd618de8a0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/default/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/default/fs_blit.bin b/bgfx/shaders/glsl/chains/default/fs_blit.bin
new file mode 100644
index 00000000000..db0fe2b487b
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/default/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/default/vs_blit.bin b/bgfx/shaders/glsl/chains/default/vs_blit.bin
new file mode 100644
index 00000000000..af6c9349f41
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/default/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/default/fs_blit.bin b/bgfx/shaders/metal/chains/default/fs_blit.bin
new file mode 100644
index 00000000000..6a3da392480
--- /dev/null
+++ b/bgfx/shaders/metal/chains/default/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/default/vs_blit.bin b/bgfx/shaders/metal/chains/default/vs_blit.bin
new file mode 100644
index 00000000000..122b7dee5c3
--- /dev/null
+++ b/bgfx/shaders/metal/chains/default/vs_blit.bin
Binary files differ
diff --git a/src/osd/sdl/man/LICENSE b/docs/man/LICENSE
index 670154e3538..670154e3538 100644
--- a/src/osd/sdl/man/LICENSE
+++ b/docs/man/LICENSE
diff --git a/src/osd/sdl/man/README.md b/docs/man/README.md
index 61036986e6a..61036986e6a 100644
--- a/src/osd/sdl/man/README.md
+++ b/docs/man/README.md
diff --git a/src/osd/sdl/man/castool.1 b/docs/man/castool.1
index 1dd96b6eb3f..1dd96b6eb3f 100644
--- a/src/osd/sdl/man/castool.1
+++ b/docs/man/castool.1
diff --git a/src/osd/sdl/man/chdman.1 b/docs/man/chdman.1
index f81b48abdea..f81b48abdea 100644
--- a/src/osd/sdl/man/chdman.1
+++ b/docs/man/chdman.1
diff --git a/src/osd/sdl/man/floptool.1 b/docs/man/floptool.1
index 24d8e97c46a..24d8e97c46a 100644
--- a/src/osd/sdl/man/floptool.1
+++ b/docs/man/floptool.1
diff --git a/src/osd/sdl/man/imgtool.1 b/docs/man/imgtool.1
index 819da84de06..819da84de06 100644
--- a/src/osd/sdl/man/imgtool.1
+++ b/docs/man/imgtool.1
diff --git a/src/osd/sdl/man/jedutil.1 b/docs/man/jedutil.1
index e93d07a8e22..e93d07a8e22 100644
--- a/src/osd/sdl/man/jedutil.1
+++ b/docs/man/jedutil.1
diff --git a/src/osd/sdl/man/ldplayer.1 b/docs/man/ldplayer.1
index 40c0cb34794..40c0cb34794 100644
--- a/src/osd/sdl/man/ldplayer.1
+++ b/docs/man/ldplayer.1
diff --git a/src/osd/sdl/man/ldresample.1 b/docs/man/ldresample.1
index c56b8af2c06..c56b8af2c06 100644
--- a/src/osd/sdl/man/ldresample.1
+++ b/docs/man/ldresample.1
diff --git a/src/osd/sdl/man/ldverify.1 b/docs/man/ldverify.1
index aae404164cb..aae404164cb 100644
--- a/src/osd/sdl/man/ldverify.1
+++ b/docs/man/ldverify.1
diff --git a/src/osd/sdl/man/mame.6 b/docs/man/mame.6
index 87e260ced5b..87e260ced5b 100644
--- a/src/osd/sdl/man/mame.6
+++ b/docs/man/mame.6
diff --git a/src/osd/sdl/man/mess.6 b/docs/man/mess.6
index 3062b2a613b..3062b2a613b 100644
--- a/src/osd/sdl/man/mess.6
+++ b/docs/man/mess.6
diff --git a/src/osd/sdl/man/romcmp.1 b/docs/man/romcmp.1
index d7a89f92e80..d7a89f92e80 100644
--- a/src/osd/sdl/man/romcmp.1
+++ b/docs/man/romcmp.1
diff --git a/src/osd/sdl/man/testkeys.1 b/docs/man/testkeys.1
index 91ddd1eb93d..91ddd1eb93d 100644
--- a/src/osd/sdl/man/testkeys.1
+++ b/docs/man/testkeys.1
diff --git a/hash/coco_flop.xml b/hash/coco_flop.xml
index e6431938fae..e1089ad62a2 100644
--- a/hash/coco_flop.xml
+++ b/hash/coco_flop.xml
@@ -3,7 +3,7 @@
<softwarelist name="coco_flop" description="Tandy Radio Shack Color Computer disk images">
- <!-- coco3 only requires 512Kb, audio is a farty, run best with a 6309? - coco3h driver) -->
+ <!-- coco3 only requires 512Kb, run best with a 6309? - coco3h driver) -->
<!-- RUN"DONKEY" -->
<software name="dkong" supported ="partial">
<description>Donkey Kong (Sock Master's Donkey Kong Emulator for CoCo 3) (512Kb)</description>
@@ -18,4 +18,20 @@
</part>
</software>
+ <!-- coco3 only requires 512Kb, run best with a 6309? - coco3h driver) -->
+ <!-- LOADM"DKREMIX" -->
+ <!-- EXEC -->
+ <software name="dkremix" supported ="partial">
+ <description>Donkey Kong Remix (Sock Master's Donkey Kong Remix Emulator for CoCo 3) (512Kb)</description>
+ <year>2015</year>
+ <publisher>Sock Master</publisher>
+ <info name="author" value="Sock Master" />
+ <info name="usage" value="CoCo 3 Only" />
+ <part name="flop0" interface="floppy_5_25">
+ <dataarea name="flop" size="161280">
+ <rom name="dkremix.dsk" size="161280" crc="639d71af" sha1="ee1584807eb8f28744e1f1c5fc1031abd80a0548" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
</softwarelist>
diff --git a/hash/sms.xml b/hash/sms.xml
index 03d0930f9f7..a5e70ea41e8 100644
--- a/hash/sms.xml
+++ b/hash/sms.xml
@@ -6128,6 +6128,7 @@
</part>
</software>
+ <!-- Notes: This has a player 2 input bug: it reads part of player 1 data instead (see sportsjp.cpp) -->
<software name="sportssc" cloneof="worldsoc">
<description>Sports Pad Soccer (Jpn)</description>
<year>1988</year>
diff --git a/language/Afrikaans/strings.po b/language/Afrikaans/strings.po
index 9fc78e87309..f01bf10ea12 100644
--- a/language/Afrikaans/strings.po
+++ b/language/Afrikaans/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Albanian/strings.po b/language/Albanian/strings.po
index 103406497b6..83a89b1b267 100644
--- a/language/Albanian/strings.po
+++ b/language/Albanian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Arabic/strings.po b/language/Arabic/strings.po
index 0cbffed36c5..a0e0e043426 100644
--- a/language/Arabic/strings.po
+++ b/language/Arabic/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Basque/strings.po b/language/Basque/strings.po
index f8049df77cb..f8d0d4f026c 100644
--- a/language/Basque/strings.po
+++ b/language/Basque/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -56,393 +56,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -474,35 +435,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -518,7 +479,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,7 +487,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -534,23 +495,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -594,132 +555,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -737,7 +649,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -753,705 +665,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,33 +1331,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1495,15 +1366,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1572,80 +1443,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1524,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1532,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1556,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1656,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1665,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1675,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1993,10 +1864,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Belarusian/strings.po b/language/Belarusian/strings.po
index 58ce868f9c9..8b5d9b83f95 100644
--- a/language/Belarusian/strings.po
+++ b/language/Belarusian/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -58,393 +58,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -476,35 +437,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -520,7 +481,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -528,7 +489,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -536,23 +497,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -596,132 +557,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -739,7 +651,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -755,705 +667,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1462,33 +1333,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1497,15 +1368,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1574,80 +1445,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1655,7 +1526,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1663,21 +1534,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1687,98 +1558,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1787,7 +1658,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1796,7 +1667,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1806,154 +1677,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1995,10 +1866,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Bosnian/strings.po b/language/Bosnian/strings.po
index c9ef3444210..1fa98e3f77e 100644
--- a/language/Bosnian/strings.po
+++ b/language/Bosnian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Bulgarian/strings.po b/language/Bulgarian/strings.po
index 08aac218aed..6b88334404b 100644
--- a/language/Bulgarian/strings.po
+++ b/language/Bulgarian/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Burmese/strings.po b/language/Burmese/strings.po
index ff2e30a8ddc..e19b8e3a16c 100644
--- a/language/Burmese/strings.po
+++ b/language/Burmese/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Catalan/strings.po b/language/Catalan/strings.po
index af52c00a958..a5c76376088 100644
--- a/language/Catalan/strings.po
+++ b/language/Catalan/strings.po
@@ -1,17 +1,16 @@
-# Catalan translations for PACKAGE package
-# Traduccions al català del paquet «PACKAGE».
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
+# Catalan translations for MAME package
+# Copyright © 2016 The MAME team.
+# This file is distributed under the same license as the MAME package.
+# Jordi Mallach <jordi@debian.org>, 2016
#
msgid ""
msgstr ""
-"Project-Id-Version: MAME\n"
+"Project-Id-Version: MAME 0.171\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
+"PO-Revision-Date: 2016-03-29 14:54+0200\n"
+"Last-Translator: Jordi Mallach <jordi@debian.org>\n"
+"Language-Team: Catalan <ca@dodds.net>\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,19 +18,19 @@ msgstr ""
#: src/emu/ui/auditmenu.cpp:115
msgid "Audit in progress..."
-msgstr ""
+msgstr "L'auditoria està en curs…"
#: src/emu/ui/barcode.cpp:72
msgid "New Barcode:"
-msgstr ""
+msgstr "Codi de barres nou:"
#: src/emu/ui/barcode.cpp:76
msgid "Enter Code"
-msgstr ""
+msgstr "Introduiu un codi"
#: src/emu/ui/barcode.cpp:118
msgid "Barcode length invalid!"
-msgstr ""
+msgstr "La mida del codi de barres no és vàlid!"
#: src/emu/ui/cheatopt.cpp:77
#, c-format
@@ -46,479 +45,440 @@ msgstr ""
#: src/emu/ui/cheatopt.cpp:121
msgid "Autofire Settings"
-msgstr ""
+msgstr "Paràmetres d'autotret"
#: src/emu/ui/cheatopt.cpp:139
msgid "Reset All"
-msgstr ""
+msgstr "Reinicialitza'ls tots"
#: src/emu/ui/cheatopt.cpp:142
msgid "Reload All"
-msgstr ""
+msgstr "Torna a carregar-ho tot"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
-msgstr ""
+msgstr "Estat d'autotret"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
-msgstr ""
+msgstr "Inhabilitat"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
-msgstr ""
+msgstr "Habilitat"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
-msgstr ""
+msgstr "Encès"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
-msgstr ""
+msgstr "Apagat"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
-msgstr ""
+msgstr "No s'ha trobat cap botó en aquesta màquina!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
+msgstr "Retard d'autotret"
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
-msgstr ""
+msgstr "Filtre principal"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
-msgstr ""
+msgstr "Altres filtres"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
-msgstr ""
+msgstr "^!Fabricant"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
-msgstr ""
+msgstr "^!Any"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
-msgstr ""
+msgstr "Suprimeix el darrer filtre"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
-msgstr ""
+msgstr "Afegeix un filtre"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
-msgstr ""
+msgstr "Selecciona filtres personalitzats:"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
-msgstr ""
+msgstr "^!Publicador"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
-msgstr ""
+msgstr "^!Llista de programari"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
-msgstr ""
+msgstr "^!Tipus de dispositiu"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
-msgstr ""
+msgstr "^!Regió"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
-msgstr ""
+msgstr "Mostra'ls tots"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
-msgstr ""
+msgstr "Amaga els filtres"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
-msgstr ""
+msgstr "Amaga la info/imatge"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
-msgstr ""
+msgstr "Amaga ambdós"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
-msgstr ""
+msgstr "Tipus de lletra"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
-msgstr ""
+msgstr "Colors"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
-msgstr ""
+msgstr "Llengua"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
-msgstr ""
+msgstr "Mostra els panells laterals"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
-msgstr ""
+msgstr "Paràmetres personalitzats de la IU"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
-msgstr ""
+msgstr "per defecte"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
-msgstr ""
+msgstr "Tipus de lletra de la IU"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
-msgstr ""
+msgstr "Negreta"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
-msgstr ""
+msgstr "Cursiva"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
-msgstr ""
+msgstr "Línies"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
-msgstr ""
+msgstr "Mida del text de la info"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
-msgstr ""
+msgstr "Paràmetres del tipus de lletra de la IU"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
-msgstr ""
+msgstr "Text normal"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
-msgstr ""
+msgstr "Color seleccionat"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
-msgstr ""
+msgstr "Fons del text normal"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
-msgstr ""
+msgstr "Color de fons seleccionat"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
-msgstr ""
+msgstr "Color del subelement"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
-msgstr ""
+msgstr "Clona"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
-msgstr ""
+msgstr "Vora"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
-msgstr ""
+msgstr "Fons"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
-msgstr ""
+msgstr "Color no disponible"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
-msgstr ""
+msgstr "Color del lliscador"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
-msgstr ""
+msgstr "Previsualització del menú"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
-msgstr ""
+msgstr "Normal"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
-msgstr ""
+msgstr "Subelement"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
-msgstr ""
+msgstr "Seleccionat"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
-msgstr ""
+msgstr "Ratolí a sobre"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
-msgstr ""
+msgstr "Alfa"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
-msgstr ""
+msgstr "Vermell"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
-msgstr ""
+msgstr "Verd"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
-msgstr ""
+msgstr "Blau"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
-msgstr ""
+msgstr "Selecciona des de la paleta"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
-msgstr ""
+msgstr " - Paràmetres d'ARGB"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
-msgstr ""
+msgstr "Previsualització de color ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
-msgstr ""
+msgstr "Blanc"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
-msgstr ""
+msgstr "Plata"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
-msgstr ""
+msgstr "Gris"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
-msgstr ""
+msgstr "Negre"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
-msgstr ""
+msgstr "Taronja"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
-msgstr ""
+msgstr "Groc"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
-msgstr ""
+msgstr "Violeta"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
-msgstr ""
+msgstr "Història del programari"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
-msgstr ""
+msgstr "Ús del programari"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
-msgstr ""
+msgstr "Revisió: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
-msgstr ""
+msgstr "Història"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
-msgstr ""
+msgstr "Mameinfo"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
-msgstr ""
+msgstr "Messinfo"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
-msgstr ""
+msgstr "Sysinfo"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
-msgstr ""
+msgstr "Mamescore"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
-msgstr ""
+msgstr "Ordre"
#: src/emu/ui/dirmenu.cpp:31
msgid "ROMs"
-msgstr ""
+msgstr "ROM"
#: src/emu/ui/dirmenu.cpp:32
msgid "UI"
-msgstr ""
+msgstr "IU"
#: src/emu/ui/dirmenu.cpp:34
msgid "Samples"
-msgstr ""
+msgstr "Mostres"
#: src/emu/ui/dirmenu.cpp:35
msgid "DATs"
-msgstr ""
+msgstr "DAT"
#: src/emu/ui/dirmenu.cpp:36
msgid "INIs"
-msgstr ""
+msgstr "INI"
#: src/emu/ui/dirmenu.cpp:37
msgid "Extra INIs"
-msgstr ""
+msgstr "INI extra"
#: src/emu/ui/dirmenu.cpp:38
msgid "Icons"
-msgstr ""
+msgstr "Icones"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
-msgstr ""
+msgstr "Trampes"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
-msgstr ""
+msgstr "Instantànies"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
-msgstr ""
+msgstr "Cabines"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
-msgstr ""
+msgstr "Díptics"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
-msgstr ""
+msgstr "Títols"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
-msgstr ""
+msgstr "Finals"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
-msgstr ""
+msgstr "PCB"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
#: src/emu/ui/dirmenu.cpp:47
msgid "Controls Panels"
-msgstr ""
+msgstr "Quadres de control"
#: src/emu/ui/dirmenu.cpp:48
msgid "Crosshairs"
-msgstr ""
+msgstr "Mirilles"
#: src/emu/ui/dirmenu.cpp:49
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,54 +486,54 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
-msgstr ""
+msgstr "Selecciona"
#: src/emu/ui/dirmenu.cpp:53
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
-msgstr ""
+msgstr "ComEsFa"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
-msgstr ""
+msgstr "Logotips"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
-msgstr ""
+msgstr "Puntuacions"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
-msgstr ""
+msgstr "Versus"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
#: src/emu/ui/dirmenu.cpp:116 src/emu/ui/dirmenu.cpp:136
msgid "Folders Setup"
-msgstr ""
+msgstr "Paràmetres de carpetes"
#: src/emu/ui/dirmenu.cpp:183
#, c-format
msgid "Current %1$s Folders"
-msgstr ""
+msgstr "Carpetes %1$s actuals"
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
-msgstr ""
+msgstr "Canvia de carpeta"
#: src/emu/ui/dirmenu.cpp:195
msgid "Add Folder"
-msgstr ""
+msgstr "Afegeix una carpeta"
#: src/emu/ui/dirmenu.cpp:198
msgid "Remove Folder"
-msgstr ""
+msgstr "Suprimeix una carpeta"
#: src/emu/ui/dirmenu.cpp:496
#, c-format
@@ -592,134 +552,85 @@ msgstr ""
#: src/emu/ui/dirmenu.cpp:640
#, c-format
msgid "Remove %1$s Folder"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
+msgstr "Suprimeix la carpeta %1$s"
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
-msgstr ""
+msgstr "El fitxer ja existeix. Voleu sobreescriure'l?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
-msgstr ""
+msgstr "No"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
-msgstr ""
+msgstr "Sí"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
-msgstr ""
+msgstr "Nom de la imatge nova:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
-msgstr ""
+msgstr "Format de la imatge:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
-msgstr ""
+msgstr "Crea"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
-msgstr ""
+msgstr "[crea]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
-msgstr ""
+msgstr "[llista de programari]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
-msgstr ""
+msgstr "Seleccioneu el format de la imatge"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
-msgstr ""
+msgstr "Seleccioneu el mode d'accés"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
-msgstr ""
+msgstr "Només lectura"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
-msgstr ""
+msgstr "Lectura i escriptura"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -727,19 +638,19 @@ msgstr ""
#: src/emu/ui/info.cpp:98
msgid "Not supported"
-msgstr ""
+msgstr "No suportat"
#: src/emu/ui/info.cpp:101
msgid "Partially supported"
-msgstr ""
+msgstr "Parcialment suportat"
#: src/emu/ui/info.cpp:109
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
-msgstr ""
+msgstr "Pseudo terminals"
#: src/emu/ui/info_pty.cpp:35
msgid "[failed]"
@@ -747,711 +658,670 @@ msgstr ""
#: src/emu/ui/inputmap.cpp:52
msgid "User Interface"
-msgstr ""
+msgstr "Interfície d'usuari"
#: src/emu/ui/inputmap.cpp:59
msgid "Other Controls"
-msgstr ""
+msgstr "Altres controls"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
-msgstr ""
+msgstr "Reinicialitza"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
-msgstr ""
+msgstr "Entrada (general)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
-msgstr ""
+msgstr "Entrada (aquesta màquina)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
-msgstr ""
+msgstr "Controls analògics"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
-msgstr ""
+msgstr "Configuració de la màquina"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
-msgstr ""
+msgstr "Informació de la màquina"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
-msgstr ""
+msgstr "Informació de la imatge"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
-msgstr ""
+msgstr "Gestor de fitxers"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
-msgstr ""
+msgstr "Control de cinta"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
-msgstr ""
+msgstr "Selecció de BIOS"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
-msgstr ""
+msgstr "Lector de codi de barres"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
-msgstr ""
+msgstr "Dispositius de xarxa"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
-msgstr ""
+msgstr "Mode de teclat"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
-msgstr ""
+msgstr "Controls dels lliscadors"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
-msgstr ""
+msgstr "Opcions de vídeo"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
-msgstr ""
+msgstr "Afegeix als favorits"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
-msgstr ""
+msgstr "Suprimeix dels favorits"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
-msgstr ""
+msgstr "Selecciona una màquina nova"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
-msgstr ""
+msgstr "Quadres de control"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
-msgstr ""
+msgstr "Game Over"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
-msgstr ""
+msgstr "Torna a la màquina"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
-msgstr ""
+msgstr "Surt"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
-msgstr ""
+msgstr "Torna al menú anterior"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
-msgstr ""
+msgstr "Auto"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
-msgstr ""
+msgstr "Imatges"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
-msgstr ""
+msgstr " (blocat)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
-msgstr ""
+msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
-msgstr ""
+msgstr "Cerca %1$s: %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
-msgstr ""
+msgstr "Conjunt de roms: %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
-msgstr ""
+msgstr "%1$s, %2$-.100s"
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
-msgstr ""
+msgstr "El control·lador és un clon de: %1$-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
-msgstr ""
+msgstr "El controlador és el pare"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
-msgstr ""
+msgstr "En resum: NO FUNCIONA"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
-msgstr ""
+msgstr "Resum: Protecció no emulada"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
-msgstr ""
+msgstr "En resum: Funciona"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
-msgstr ""
+msgstr "Gràfics: Imperfectes, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
-msgstr ""
+msgstr "Gràfics: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
-msgstr ""
+msgstr "So: No implementat"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
-msgstr ""
+msgstr "So: Imperfecte"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
-msgstr ""
+msgstr "So: OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
-msgstr ""
+msgstr "Sistema: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
-msgstr ""
+msgstr "El programari és un clon de: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
-msgstr ""
+msgstr "El programari és el pare"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
-msgstr ""
+msgstr "Suportat: No"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
-msgstr ""
+msgstr "Suportat: Parcialment"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
-msgstr ""
+msgstr "Suportat: Sí"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
-msgstr ""
+msgstr "Conjunt de ROM: %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
-msgstr ""
+msgstr "%1$s %2$s"
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
-msgstr ""
+msgstr "Conjunt de ROM: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
-msgstr ""
+msgstr "Any: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
-msgstr ""
+msgstr "Fabricant: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
-msgstr ""
+msgstr "El control·lador és un clon de: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
-msgstr ""
+msgstr "El controlador és el pare\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
-msgstr ""
+msgstr "En resum: NO FUNCIONA\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
-msgstr ""
+msgstr "En resum: Protecció no emulada\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
-msgstr ""
+msgstr "En resum: Funciona\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
-msgstr ""
+msgstr "Gràfics: Colors imperfectes\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
-msgstr ""
+msgstr "Gràfics: imperfectes\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
-msgstr ""
+msgstr "Gràfics: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
-msgstr ""
+msgstr "So: No implementat\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
-msgstr ""
+msgstr "So: Imperfecte\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
-msgstr ""
+msgstr "So: OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
-msgstr ""
+msgstr "El control·lador és un esquelet: %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
-msgstr ""
+msgstr "El joc és mecànic: %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
-msgstr ""
+msgstr "Suporta cocktail: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
-msgstr ""
+msgstr "El control·lador és una BIOS: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
-msgstr ""
+msgstr "Suporta desar: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
-msgstr ""
+msgstr "Orientació de la pantalla: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
-msgstr ""
+msgstr "Vertical"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
-msgstr ""
+msgstr "Horitzontal"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
-msgstr ""
+msgstr "Ús"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
-msgstr ""
+msgstr " (per defecte)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
-msgstr ""
+msgstr "%1$s %2$s ( %3$d / %4$d programaris )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
-msgstr ""
+msgstr "Regió: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
-msgstr ""
+msgstr "Editor: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
-msgstr ""
+msgstr "Any: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
-msgstr ""
+msgstr "Tipus de dispositiu: %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
-msgstr ""
+msgstr "Selecció de BIOS:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,56 +1330,56 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
-msgstr ""
+msgstr "D'acord"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
-msgstr ""
+msgstr "No implementat"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
#: src/emu/ui/slotopt.cpp:166
msgid " [internal]"
-msgstr ""
+msgstr " [intern]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
-msgstr ""
+msgstr "So"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
#: src/emu/ui/swlist.cpp:70
msgid "[file manager]"
-msgstr ""
+msgstr "[gestor de fitxers]"
#: src/emu/ui/swlist.cpp:235
msgid "Switch Item Ordering"
@@ -1522,11 +1392,11 @@ msgstr ""
#: src/emu/ui/swlist.cpp:268
msgid "shortname"
-msgstr ""
+msgstr "nom curt"
#: src/emu/ui/swlist.cpp:268
msgid "description"
-msgstr ""
+msgstr "descripció"
#: src/emu/ui/swlist.cpp:436
msgid "[compatible lists]"
@@ -1534,118 +1404,118 @@ msgstr ""
#: src/emu/ui/tapectrl.cpp:84
msgid "stopped"
-msgstr ""
+msgstr "aturat"
#: src/emu/ui/tapectrl.cpp:86
msgid "playing"
-msgstr ""
+msgstr "reproduint"
#: src/emu/ui/tapectrl.cpp:86
msgid "(playing)"
-msgstr ""
+msgstr "(reproduint)"
#: src/emu/ui/tapectrl.cpp:87
msgid "recording"
-msgstr ""
+msgstr "enregistrant"
#: src/emu/ui/tapectrl.cpp:87
msgid "(recording)"
-msgstr ""
+msgstr "(enregistrant)"
#: src/emu/ui/tapectrl.cpp:94
msgid "Pause/Stop"
-msgstr ""
+msgstr "Pausa/Atura"
#: src/emu/ui/tapectrl.cpp:97
msgid "Play"
-msgstr ""
+msgstr "Reprodueix"
#: src/emu/ui/tapectrl.cpp:100
msgid "Record"
-msgstr ""
+msgstr "Enregistra"
#: src/emu/ui/tapectrl.cpp:103
msgid "Rewind"
-msgstr ""
+msgstr "Rebobina"
#: src/emu/ui/tapectrl.cpp:106
msgid "Fast Forward"
-msgstr ""
+msgstr "Avanç ràpid"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
-msgstr ""
+msgstr "Els colors no són 100% acurats.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
-msgstr ""
+msgstr "La màquina manca so.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1555,102 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
-msgstr ""
+msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
-msgstr ""
+msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
+"\n"
+"So:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
+"\n"
+"Vídeo:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
-msgstr ""
+msgstr "Cap\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
-msgstr ""
+msgstr "Vector"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
-msgstr ""
+msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
-msgstr ""
+msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1659,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1668,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1678,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
-msgstr ""
+msgstr "X"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
-msgstr ""
+msgstr "Y"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
-msgstr ""
+msgstr "%1$3ddB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
-msgstr ""
+msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
-msgstr ""
+msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
-msgstr ""
+msgstr "%1$.3ffps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
-msgstr ""
+msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
-msgstr ""
+msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
-msgstr ""
+msgstr "Pantalla «%1$s»"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
-msgstr ""
+msgstr "Pantalla"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1963,7 +1837,7 @@ msgstr ""
#: src/emu/ui/videoopt.cpp:203
msgid "Rotate"
-msgstr ""
+msgstr "Rota"
#: src/emu/ui/videoopt.cpp:207
msgid "Backdrops"
@@ -1983,20 +1857,55 @@ msgstr ""
#: src/emu/ui/videoopt.cpp:227
msgid "View"
-msgstr ""
+msgstr "Visualització"
#: src/emu/ui/videoopt.cpp:227
msgid "Cropped"
-msgstr ""
+msgstr "Escapçada"
#: src/emu/ui/videoopt.cpp:227
msgid "Full"
-msgstr ""
+msgstr "Completa"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
-msgstr ""
+msgstr " COLORS"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
+
+#~ msgid "Device Mapping"
+#~ msgstr "Mapeig de dispositius"
+
+#~ msgid "Video Mode"
+#~ msgstr "Mode de vídeo"
+
+#~ msgid "HLSL"
+#~ msgstr "HLSL"
+
+#~ msgid "GLSL"
+#~ msgstr "GLSL"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Filtratge biliniar"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "Preescalat de mapa de bits"
+
+#~ msgid "Window Mode"
+#~ msgstr "Mode de finestra"
+
+#~ msgid "Display Options"
+#~ msgstr "Opcions de visualització"
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "El programari seleccionat manca un o més fitxers requerits. Seleccioneu "
+#~ "un altre programari.\n"
+#~ "\n"
+#~ "Premeu qualsevol tecla (tret d'ESC) per continuar."
diff --git a/language/Chinese_Simplified/strings.po b/language/Chinese_Simplified/strings.po
index 6872834ffca..6676a424d9e 100644
--- a/language/Chinese_Simplified/strings.po
+++ b/language/Chinese_Simplified/strings.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
-"PO-Revision-Date: 2016-03-28 16:32+0800\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
+"PO-Revision-Date: 2016-04-11 14:17+0800\n"
"Last-Translator: YuiFAN\n"
"Language-Team: MAME Language Team\n"
"Language: zh\n"
@@ -58,393 +58,354 @@ msgstr "全部é‡è®¾"
msgid "Reload All"
msgstr "å…¨éƒ¨é‡æ–°è½½å…¥"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "连å‘状æ€"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "å·²åœç”¨"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "å·²å¯ç”¨"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "å¼€"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "å…³"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "在此机器上找ä¸åˆ°æŒ‰é’®!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "连å‘延迟"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "é…置光枪设备"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "é…置轨迹çƒè®¾å¤‡"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "é…ç½®è¸æ¿è®¾å¤‡"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "é…ç½® AD æ¸¸æˆæ†è®¾å¤‡"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "é…ç½®æ“纵æ†è®¾å¤‡"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "é…置方å‘盘设备"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "é…置定ä½è®¾å¤‡"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "é…置鼠标设备"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "装置映对"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "主è¦è¿‡æ»¤å™¨"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "其他过滤器"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!制造商"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!年代"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "移除最åŽè¿‡æ»¤å™¨"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "新增过滤器"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "选择自订过滤器:"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!出版商"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!软件清å•"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!装置类别"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!区域"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "显示全部"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "éšè—过滤器"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "éšè—ä¿¡æ¯/图片"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "éšè—两者"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "字体"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "颜色"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "语言"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "显示侧é¢ç‰ˆ"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "连å‘设定"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "缺çœ"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "UI 字体"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "粗体"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "斜体"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "行"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "ä¿¡æ¯å­—体大å°"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "UI 字体设定"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr "采样文字 - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "一般文本"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "选择色彩"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "一般文本背景"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "选择背景颜色"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "å­é¡¹ç›®é¢œè‰²"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "克隆"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "边框"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "背景"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "机械设定开关"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "未拥有游æˆé¢œè‰²"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "傿•°è°ƒæ•´"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "图形检视器背景"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "é¼ æ ‡ç»è¿‡é¢œè‰²"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "é¼ æ ‡ç»è¿‡èƒŒæ™¯é¢œè‰²"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "鼠标按下颜色"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "鼠标按下背景颜色"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "还原至原本颜色"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "UI 色彩设定"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "åŒå‡»æˆ–按下 %1$s 以改å˜é¢œè‰²å€¼"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "èœå•预览"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "一般"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "å­é¡¹ç›®"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "已选择"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "é¼ æ ‡ç»è¿‡"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "逿˜Žåº¦"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "红"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "绿"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "è“"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "从色盘选择"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr " - ARGB 设定"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "颜色预览ï¼"
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "白"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "é“¶"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "ç°"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "黑"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "橘"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "黄"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "ç´«"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "软件历å²"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "软件用法"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "版本: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "历å²"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "Mameinfo"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "Messinfo"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "Sysinfo"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "Mamescore"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr "Gameinit"
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "出招表"
@@ -476,35 +437,35 @@ msgstr "é¢å¤–çš„ INI"
msgid "Icons"
msgstr "图示"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "ä½œå¼Šç æ–‡ä»¶ (cheat)"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "å¿«ç…§ (snap)"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "机械图 (cabinets)"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "广告图 (flyers)"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "标题图 (titles)"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "结æŸå›¾ (ends)"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "PCB"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr "è´´ç”» (marquees)"
@@ -520,7 +481,7 @@ msgstr "å字准星"
msgid "Artworks"
msgstr "装饰图"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "首领"
@@ -528,7 +489,7 @@ msgstr "首领"
msgid "Artworks Preview"
msgstr "装饰图预览"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "选择"
@@ -536,23 +497,23 @@ msgstr "选择"
msgid "GameOver"
msgstr "游æˆç»“æŸ"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "说明"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "标题图"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "得分"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr "对战"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "å°é¢"
@@ -596,132 +557,83 @@ msgstr "按下 TAB 键设定"
msgid "Remove %1$s Folder"
msgstr "移除 %1$s 文件夹"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "视讯模å¼"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "三é‡ç¼“冲"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr "HLSL"
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr "GLSL"
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "åŒçº¿è¿‡æ»¤"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "点阵预缩放"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "视窗模å¼"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "强制长宽比例"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "å¯åŠ¨æ—¶æœ€å¤§åŒ–"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "åŒæ­¥æ›´æ–°"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "ç­‰å¾…åž‚ç›´åŒæ­¥"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "视讯选项"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "档案已存在 — 是å¦è¦†å†™ï¼Ÿ"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "å¦"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "是"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "新映象档å称:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "æ˜ åƒæ¡£æ ¼å¼"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "建立"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "请一并输入副档å"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[ ç©ºæ’æ§½ ]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[ 建立 ]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[ è½¯ä»¶æ¸…å• ]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "é€‰æ‹©æ˜ åƒæ¡£æ ¼å¼"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "é€‰æ‹©å­˜å–æ¨¡å¼"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "唯读"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "读写"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "è¯»å–æ­¤æ˜ åƒæ¡£ï¼Œå†™å…¥è‡³å…¶ä»–æ˜ åƒæ¡£"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "è¯»å–æ­¤æ˜ åƒæ¡£ï¼Œå†™å…¥å·®å¼‚æ¡£"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "无法跨目录储存"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -739,7 +651,7 @@ msgstr "部分支æ´"
msgid "[empty]"
msgstr "[ 空 ]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "伪终端"
@@ -755,164 +667,168 @@ msgstr "使用者介é¢"
msgid "Other Controls"
msgstr "其他控制"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "é‡è®¾"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "输入设定 (一般)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "输入设定 (本机器)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "类比控制"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "机械设定开关"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "机器设定"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "收入信æ¯"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "机器信æ¯"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "æ˜ åƒæ¡£ä¿¡æ¯"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "文件管ç†å™¨"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "ç£å¸¦æŽ§åˆ¶"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "选择 BIOS"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "æ’æ§½è®¾å¤‡"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "æ¡ç è¯»å–器"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "网路装置"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "键盘模å¼"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "傿•°è°ƒæ•´"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "视频选项"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "å字准星选项"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "游æˆä½œå¼Š"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr "æ’件选项"
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "檢視外部文件"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "新增至最爱"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "从最爱移除"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "选择新机器"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "æŽ§åˆ¶é¢æ¿"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "装饰图预览"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "游æˆç»“æŸ"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "新增或移除最爱"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "汇出显示的清å•至档案"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "显示文件检视"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "回到机械"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "结æŸ"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "回上一层èœå•"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "自动"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "图åƒ"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "ä¿¡æ¯"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "键盘模å¼:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "自然"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "模拟"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
@@ -921,7 +837,7 @@ msgstr ""
"执行时间: %1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
@@ -930,7 +846,7 @@ msgstr ""
"执行时间: %1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -939,154 +855,109 @@ msgstr ""
"å½©ç¥¨åˆ†é…æ•°ï¼š %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "æŠ•å¸æ•° %1$c: NA%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "æŠ•å¸æ•° %1$c: %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (已é”定)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "å¯è§åº¦å»¶è¿Ÿ"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "釿–°é€‰æ‹©å‰ä¸€æ¬¡æ‰§è¡Œçš„æœºæ¢°"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "å³ä¾§é¢ç‰ˆæ”¾å¤§å›¾ç‰‡"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "文件信æ¯"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "显示鼠标指标"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "从机械退出时需确认"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "略过å¯åŠ¨æ—¶çš„æ˜¾ç¤ºèµ„è®¯ç”»é¢"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "强制 4:3 外观供软件撷图"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "使用图片作为背景"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "略过 BIOS 选择èœå•"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "略过软件部分选择èœå•"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "æ‚项选项"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xml 已储存于 ui 文件夹。"
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "å称: æè¿°ï¼š\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt 已储存于 ui 资料夹下。"
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "汇出为 XML æ ¼å¼ ï¼ˆåŒ -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "汇出为 TXT æ ¼å¼ ï¼ˆåŒ -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr "Dummy"
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "ä¿å­˜æœºæ¢°è®¾å®š"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "æ’ä»¶"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "筛选"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr " ^!文件"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!类别"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!设定自订筛选"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "自订 UI"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "设定目录"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "声音选项"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "一般输入"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "ä¿å­˜è®¾å®š"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "设定"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**ä¿å­˜ ui.ini 时错误**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**ä¿å­˜ %s.ini 时错误**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1096,20 +967,20 @@ msgstr ""
" 设定已ä¿å­˜ \n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "é€‰é¡¹æ¸…å• - æœå¯»ï¼š "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "åŒå‡»æˆ–按下 %1$s 以选择"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "一般信æ¯"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1118,275 +989,275 @@ msgstr ""
"%s\n"
" 已新增至最爱清å•。"
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr " 从最爱清å•移除。"
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
"选定的机械缺少一个至多个必è¦çš„ ROM 或 CHD æ˜ åƒæ¡£ï¼Œè¯·é€‰æ‹©å…¶ä»–机械。\n"
"\n"
-"按任æ„é”® (除 ESC 键) 继续。"
+"按任æ„键继续。"
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "设定选项"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d 机械 (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr "%1$s (%2$s - %3$s) - "
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s æœå¯»ï¼š %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "Rom组: %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr "%1$s, %2$-.100s"
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "驱动相容于: %-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "驱动为主档"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "整体: ä¸å¯æ‰§è¡Œ"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "整体: æœªæ¨¡æ‹Ÿä¿æŠ¤"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "整体: å¯ä»¥æ‰§è¡Œ"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "图形: ä¸å®Œç¾Žï¼Œ "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "图形: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "声音: 无法执行"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "声音: ä¸å®Œç¾Ž"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "声音: OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "系统: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "软件相容于: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "软件为主档"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "已支æ´ï¼š å¦"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "已支æ´ï¼š 部分"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "已支æ´ï¼š 是"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "Rom套: %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr "%1$s %2$s"
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "Rom套: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "年份: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "制造商: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "驱动程å¼ç›¸å®¹äºŽï¼š %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "驱动程å¼ä¸ºä¸»æ¡£\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "整体: ä¸å¯æ‰§è¡Œ\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "整体: æœªæ¨¡æ‹Ÿä¿æŠ¤\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "整体: å¯ä»¥æ‰§è¡Œ\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "图形: 色彩ä¸å®Œç¾Ž\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "图形: ä¸å®Œç¾Ž\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "图形: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "声音: 无法执行\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "声音: ä¸å®Œç¾Ž\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "声音: OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "驱动程å¼å°šæœªå®Œæ•´ï¼š %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "游æˆä¸ºæœºæ¢°å¼ï¼š %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "需è¦è£…饰图: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "å¿…è¦å¯ç‚¹å‡»çš„装饰图: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "支æ´å°é¢åž‹ç­ä½“: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "驱动为 BIOS: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "支æ´å³æ—¶å­˜æ¡£ï¼š %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "ç”»é¢æ–¹å‘: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "垂直"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "æ°´å¹³"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "éœ€è¦ CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "ROM 验è¯é€šè¿‡ï¼š OK\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "ROM 验è¯é€šè¿‡ï¼š 错误\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "样本档验è¯é€šè¿‡ï¼š ä¸éœ€è¦\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "样本档验è¯é€šè¿‡ï¼š OK\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "样本档验è¯é€šè¿‡ï¼š 错误\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1394,85 +1265,85 @@ msgstr ""
"ROM 验è¯é€šè¿‡ï¼š å·²åœç”¨\n"
"样本档验è¯é€šè¿‡ï¼š å·²åœç”¨\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "æ— å¯ç”¨ä¿¡æ¯"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "用法"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (缺çœ)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
"选定的软件缺少一个至多个必è¦çš„ ROM 或 CHD æ˜ åƒæ¡£ï¼Œè¯·é€‰æ‹©å…¶ä»–软件。\n"
"\n"
-"按任æ„é”® (除 ESC 键) 继续。"
+"按任æ„键继续。"
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d 软件 )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr "驱动: \"%1$s\" è½¯ä»¶æ¸…å• "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "区域: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "出版商: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "年代: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "软件清å•: %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "装置类别: %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s æœå¯»ï¼š %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "软件部分选项: "
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "选择 BIOS:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1485,33 +1356,33 @@ msgstr ""
"如果此为首次使用 %2$s,请å‚阅 docs 目录中的 config.txt 以å–得设定 %2$s 的相关"
"ä¿¡æ¯ã€‚"
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "输入å称或选择: %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "输入å称或选择: (éšæœº)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr "驱动: %-.100s\n"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "ä¸å®Œç¾Ž"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr "确认"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "无法执行"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "图形: %s, 声音: %s"
@@ -1520,15 +1391,15 @@ msgstr "图形: %s, 声音: %s"
msgid " [internal]"
msgstr " [内部]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "声音"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "采样率"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "使用外部采样率"
@@ -1597,17 +1468,17 @@ msgstr "倒带"
msgid "Fast Forward"
msgstr "å¿«è¿›"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr "此驱动需è¦é¢å¤–è½½å…¥ä¸‹åˆ—è£…ç½®çš„æ˜ åƒæ¡£: "
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr "本机械有一个或更多的 ROM/CHD æ˜¯ä¸æ­£ç¡®çš„。此机械å¯èƒ½æ— æ³•正确执行。\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1615,64 +1486,64 @@ msgstr ""
"本机械已知具有下列的问题\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr "本机械有一个或更多的 ROM/CHD 尚未正确地被 DUMP。\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "键盘模拟å¯èƒ½æœªè¾¾åˆ° 100% 精确。"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "色彩是完全错误的。"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "色彩尚未达到 100% 精确。"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "视讯模拟尚未达到 100% 精确。"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "声音模拟尚未达到 100% 精确。"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "机械缺少声音。"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "尚未支æ´å°é¢åž‹ç­ä½“模å¼çš„ç”»é¢ç¿»è½¬ã€‚"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "机械需è¦å¤–部装饰图档案"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr "本机械无法完æˆï¼Œå¹¶éžæ¨¡æ‹Ÿä¸­çš„错误而å¯èƒ½å‘ˆçŽ°æ€ªå¼‚çš„è¡Œä¸ºæˆ–ç¼ºå°‘å…ƒä»¶ã€‚\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr "本机械无声音硬体,故 MAME å°†ä¸ä¼šäº§ç”Ÿå£°éŸ³ï¼Œè¿™æ˜¯å¯é¢„期的行为。\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr "æœºæ¢°å…·æœ‰ä¿æŠ¤å°šæœªå®Œå…¨æ¨¡æ‹Ÿã€‚"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1682,7 +1553,7 @@ msgstr ""
"此机械无法执行,机械的模拟还ä¸å®Œå…¨ã€‚除了等待开å‘人员改良模拟之外,没有方法å¯"
"以解决这个问题。\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1693,7 +1564,7 @@ msgstr ""
"本机械的的部分元件无法模拟,因其需è¦å®žé™…活动的互动或机械装置的组åˆã€‚故无法完"
"æˆæ­¤æ¸¸æˆçš„æ‰§è¡Œã€‚\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1703,14 +1574,14 @@ msgstr ""
"\n"
"æœ¬æœºæ¢°å°šæœ‰å¯æ‰§è¡Œçš„仿制版: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr "æŒ‰ä»»æ„æŒ‰é”®ç»§ç»­"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1725,15 +1596,15 @@ msgstr ""
"\n"
"CPU:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1741,7 +1612,7 @@ msgstr ""
"\n"
"声音:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1749,78 +1620,78 @@ msgstr ""
"\n"
"视讯:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "æ— \n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "å‘é‡"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "键盘模拟状æ€"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "模å¼ï¼š 部分模拟"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "UI: å·²å¯ç”¨"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**使用 ScrLock 键切æ¢**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "模å¼ï¼š 完整模拟"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "UI: å·²åœç”¨"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "无法å¯ç”¨è¿žå‘"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "选择ä¿å­˜ä½ç½®"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "选择载入ä½ç½®"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "å–æ¶ˆä¿å­˜"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "å–æ¶ˆè½½å…¥"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "ä¿å­˜è‡³ä½ç½® %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "从ä½ç½® %s 载入"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1833,7 +1704,7 @@ msgstr ""
"按 ''%1$s'' 退出,\n"
"按 ''%2$s'' 继续模拟。"
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "主音é‡"
@@ -1842,7 +1713,7 @@ msgstr "主音é‡"
msgid "%1$s Volume"
msgstr "%1$s 音é‡"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "超频 CPU %1$s"
@@ -1852,154 +1723,154 @@ msgstr "超频 CPU %1$s"
msgid "%1$s Refresh Rate"
msgstr "%1$s 刷新率"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$s 亮度"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$s 对比"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "%1$s 迦玛值"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "%1$s 水平延展"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "%1$s æ°´å¹³ä½ç½®"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "%1$s 垂直延展"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "%1$s 垂直ä½ç½®"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "激光影碟 %1$s 水平延展"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "激光影碟 %1$s æ°´å¹³ä½ç½®"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "激光影碟 %1$s 垂直延展"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "激光影碟 %1$s 垂直ä½ç½®"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "å‘é‡é—ªçƒåº¦"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "最å°å…‰æŸå®½åº¦"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "最大光æŸå®½åº¦"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "å…‰æŸå¼ºåº¦"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "å字准星尺度 %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr "X"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr "Y"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "å字准星ä½ç§» %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr "%1$3ddB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr "%1$.3ffps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
-msgstr ""
+msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "ç”»é¢ '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "ç”»é¢"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "å字准星尺度 X %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "å字准星尺度 Y %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "å字准星ä½ç§» X %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "å字准星ä½ç§» Y %1$1.3f"
@@ -2041,10 +1912,73 @@ msgstr "è£åˆ‡"
msgid "Full"
msgstr "全部"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " 色彩"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " PENS"
+
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "é…置光枪设备"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "é…置轨迹çƒè®¾å¤‡"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "é…ç½®è¸æ¿è®¾å¤‡"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "é…ç½® AD æ¸¸æˆæ†è®¾å¤‡"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "é…ç½®æ“纵æ†è®¾å¤‡"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "é…置方å‘盘设备"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "é…置定ä½è®¾å¤‡"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "é…置鼠标设备"
+
+#~ msgid "Device Mapping"
+#~ msgstr "装置映对"
+
+#~ msgid "Video Mode"
+#~ msgstr "视讯模å¼"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "三é‡ç¼“冲"
+
+#~ msgid "HLSL"
+#~ msgstr "HLSL"
+
+#~ msgid "GLSL"
+#~ msgstr "GLSL"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "åŒçº¿è¿‡æ»¤"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "点阵预缩放"
+
+#~ msgid "Window Mode"
+#~ msgstr "视窗模å¼"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "强制长宽比例"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "å¯åŠ¨æ—¶æœ€å¤§åŒ–"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "åŒæ­¥æ›´æ–°"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "ç­‰å¾…åž‚ç›´åŒæ­¥"
+
+#~ msgid "Display Options"
+#~ msgstr "视讯选项"
diff --git a/language/Chinese_Traditional/strings.po b/language/Chinese_Traditional/strings.po
index bdba0a5e52c..7d152ae09f4 100644
--- a/language/Chinese_Traditional/strings.po
+++ b/language/Chinese_Traditional/strings.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
-"PO-Revision-Date: 2016-03-28 16:32+0800\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
+"PO-Revision-Date: 2016-04-11 14:14+0800\n"
"Last-Translator: YuiFAN\n"
"Language-Team: MAME Language Team\n"
"Language: zh_TW\n"
@@ -58,393 +58,354 @@ msgstr "全部é‡è¨­"
msgid "Reload All"
msgstr "å…¨éƒ¨é‡æ–°è¼‰å…¥"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "連射狀態"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "å·²åœç”¨"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "已啟用"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "é–‹"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "關"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "此機å°ä¸Šç„¡å¯ç”¨æŒ‰éµï¼"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "連射延é²"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "指派光線æ§è£ç½®"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "指派軌跡çƒè£ç½®"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "æŒ‡æ´¾è¸æ¿è£ç½®"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "指派 AD æ–æ¡¿è£ç½®"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "指派æ“縱桿è£ç½®"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "指派轉盤è£ç½®"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "指派定ä½è£ç½®"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "指派滑鼠è£ç½®"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "è£ç½®æ˜ å°"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "主è¦ç¯©é¸"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "其他篩é¸"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!製造商"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!年代"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "移除最後篩é¸"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "新增篩é¸"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "鏿“‡è‡ªè¨‚篩é¸ï¼š"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!出版商"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!軟體清單"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!è£ç½®é¡žåˆ¥"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!å€åŸŸ"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "顯示全部"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "éš±è—篩é¸"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "éš±è—資訊/圖片"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "éš±è—兩者"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "å­—é«”"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "é¡è‰²"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "語言"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "顯示å´é¢ç‰ˆ"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "連射設定"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "é è¨­"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "UI å­—é«”"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "ç²—é«”"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "斜體"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "行"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "資訊字體大å°"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "UI 字體設定"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr "文字樣本~永æ±åœ‹é…¬æ„›é¬±éˆé·¹è¢‹ã€å—去經三國,æ±ä¾†éŽäº”湖。"
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "一般文字"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "鏿“‡è‰²å½©"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "一般文字背景"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "已鏿“‡èƒŒæ™¯é¡è‰²"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "å­é …ç›®é¡è‰²"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "相容版本"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "邊框"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "背景"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "機å°è¨­å®šé–‹é—œ"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "æœªæ“æœ‰éŠæˆ²é¡è‰²"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "åƒæ•¸èª¿æ•´"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "圖形檢視器背景"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "滑鼠經éŽé¡è‰²"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "滑鼠經éŽèƒŒæ™¯é¡è‰²"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "滑鼠按下é¡è‰²"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "滑鼠按下背景é¡è‰²"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "還原至原本é¡è‰²"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "UI 色彩設定"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "雙擊或按下 %1$s 以改變é¡è‰²å€¼"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "é¸å–®é è¦½"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "一般項目"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "å­é …ç›®"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "已鏿“‡"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "滑鼠經éŽ"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "逿˜Žåº¦"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "ç´…"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "ç¶ "
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "è—"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "å¾žè‰²ç›¤é¸æ“‡"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr " - ARGB 設定"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "é¡è‰²é è¦½ï¼"
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "白"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "銀"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "ç°"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "黑"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "橘"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "黃"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "ç´«"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "軟體歷å²"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "軟體用法"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "版本: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "æ­·å²"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "Mameinfo"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "Messinfo"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "系統資訊"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "Mamescore"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr "Gameinit"
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "指令集"
@@ -476,35 +437,35 @@ msgstr "é¡å¤–çš„ INI"
msgid "Icons"
msgstr "圖示"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "作弊引擎"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "擷圖"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "ç­é«”圖"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "廣告圖"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "標題圖"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "çµæŸåœ–"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "PCB 圖"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr "標籤圖"
@@ -520,7 +481,7 @@ msgstr "å字準星"
msgid "Artworks"
msgstr "è£é£¾åœ–"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "首領"
@@ -528,7 +489,7 @@ msgstr "首領"
msgid "Artworks Preview"
msgstr "è£é£¾åœ–é è¦½"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "鏿“‡"
@@ -536,23 +497,23 @@ msgstr "鏿“‡"
msgid "GameOver"
msgstr "éŠæˆ²çµæŸ"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "說明圖"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "標題圖"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "得分"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr "å°æˆ°"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "å°é¢"
@@ -596,132 +557,83 @@ msgstr "按下 TAB éµè¨­å®š"
msgid "Remove %1$s Folder"
msgstr "移除 %1$s 資料夾"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "視訊模å¼"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "三é‡ç·©è¡"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr "HLSL"
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr "GLSL"
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "é›™ç·šéŽæ¿¾"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "點陣é ç¸®æ”¾"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "視窗模å¼"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "強制長寬比例"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "啟動時最大化"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "åŒæ­¥æ›´æ–°"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "ç­‰å¾…åž‚ç›´åŒæ­¥"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "視訊é¸é …"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "檔案已存在 — 是å¦è¦†è“‹ï¼Ÿ"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "å¦"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "是"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "新映象檔å稱:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "æ˜ åƒæª”æ ¼å¼"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "建立"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "請一併輸入副檔å"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[ ç©ºæ’æ§½ ]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[ 建立 ]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[ 軟體清單 ]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "鏿“‡æ˜ åƒæª”æ ¼å¼"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "鏿“‡å­˜å–模å¼"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "唯讀"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "讀寫"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "è®€å–æ­¤æ˜ åƒæª”ï¼Œå¯«å…¥è‡³å…¶ä»–æ˜ åƒæª”"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "è®€å–æ­¤æ˜ åƒæª”,寫入差異檔"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "無法跨目錄儲存"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -739,7 +651,7 @@ msgstr "部分支æ´"
msgid "[empty]"
msgstr "[ 空 ]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "å½çµ‚端"
@@ -755,164 +667,168 @@ msgstr "使用者介é¢"
msgid "Other Controls"
msgstr "其他控制"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "é‡è¨­"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "輸入設定 (一般)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "輸入設定 (本機å°ï¼‰"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "類比控制"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "機å°è¨­å®šé–‹é—œ"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "機å°è¨­å®š"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "收入資訊"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "機å°è³‡è¨Š"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "æ˜ åƒæª”資訊"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "檔案管ç†å“¡"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "ç£å¸¶æŽ§åˆ¶"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "鏿“‡ BIOS"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "æ’æ§½è£ç½®"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "æ¢ç¢¼è®€å–器"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "網路è£ç½®"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "éµç›¤æ¨¡å¼"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "åƒæ•¸èª¿æ•´"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "視訊é¸é …"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "å字準星é¸é …"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "作弊引擎"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr "外掛é¸é …"
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "查閱外部文件"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "新增至最愛"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "從最愛移除"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "鏿“‡æ–°æ©Ÿå°"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "æ“作檯"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "è£é£¾åœ–é è¦½"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "éŠæˆ²çµæŸ"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "新增或移除最愛"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "匯出顯示的清單至檔案"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "顯示文件檢視"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "回到機å°"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "çµæŸ"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "回上一層é¸å–®"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "自動"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "圖片"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "資訊"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "éµç›¤æ¨¡å¼:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "自然"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "模擬"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
@@ -921,7 +837,7 @@ msgstr ""
"執行時間: %1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
@@ -930,7 +846,7 @@ msgstr ""
"執行時間: %1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -939,154 +855,109 @@ msgstr ""
"å½©ç¥¨åˆ†é…æ•¸ï¼š %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "投幣數 %1$c: NA%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "投幣數 %1$c: %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (已鎖定)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "å¯è¦‹åº¦å»¶é²"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "釿–°é¸æ“‡å‰ä¸€æ¬¡åŸ·è¡Œçš„æ©Ÿå°"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "å³å´é¢ç‰ˆæ”¾å¤§åœ–片"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "文件資訊"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "顯示滑鼠指標"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "從機å°é€€å‡ºæ™‚需確èª"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "ç•¥éŽå•Ÿå‹•時的顯示資訊畫é¢"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "強制 4:3 外觀供軟體擷圖"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "使用圖片作為背景"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "ç•¥éŽ BIOS 鏿“‡é¸å–®"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "ç•¥éŽè»Ÿé«”éƒ¨åˆ†é¸æ“‡é¸å–®"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "雜項é¸é …"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xml 已儲存於 ui 資料夾下。"
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "å稱: æè¿°ï¼š\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt 已儲存於 ui 資料夾下。"
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "匯出為 XML æ ¼å¼ ï¼ˆåŒ -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "匯出為 TXT æ ¼å¼ ï¼ˆåŒ -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr "Dummy"
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "儲存機å°è¨­å®š"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "外掛"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "篩é¸"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr " ^!檔案"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!類別"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!設定自訂篩é¸"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "自訂 UI"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "設定目錄"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "è²éŸ³é¸é …"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "一般輸入"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "儲存設定"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "設定"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**儲存 ui.ini 時發生錯誤**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**儲存 %s.ini 時發生錯誤**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1096,20 +967,20 @@ msgstr ""
" 設定已儲存 \n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "é¸é …清單 - æœå°‹ï¼š "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "雙擊或按下 %1$s 以鏿“‡"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "一般資訊"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1118,275 +989,275 @@ msgstr ""
"%s\n"
" 已新增至最愛清單。"
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr " 從最愛清單移除。"
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
"é¸å®šçš„æ©Ÿå°ç¼ºå°‘一個至多個必è¦çš„ ROM 或 CHD æ˜ åƒæª”ï¼Œè«‹é¸æ“‡å…¶ä»–機å°ã€‚\n"
"\n"
-"按任æ„éµ ï¼ˆé™¤ ESC éµï¼‰ 繼續。"
+"按任æ„éµç¹¼çºŒã€‚"
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "設定é¸é …"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d æ©Ÿå° (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr "%1$s (%2$s - %3$s) - "
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s æœå°‹ï¼š %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "Rom組: %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr "%1$s, %2$-.100s"
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "驅動程å¼ç›¸å®¹æ–¼ï¼š %-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "驅動程å¼ç‚ºä¸»æª”"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "整體: ä¸å¯åŸ·è¡Œ"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "整體: 未模擬ä¿è­·"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "整體: å¯ä»¥åŸ·è¡Œ"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "圖形: ä¸å®Œç¾Žï¼Œ "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "圖形: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "è²éŸ³ï¼š 無法執行"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "è²éŸ³ï¼š ä¸å®Œç¾Ž"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "è²éŸ³ï¼š OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "系統: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "軟體相容於: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "軟體為主檔"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "已支æ´ï¼š å¦"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "已支æ´ï¼š 部分"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "已支æ´ï¼š 是"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "Rom組: %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr "%1$s %2$s"
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "Rom組: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "年份: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "製造商: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "驅動程å¼ç›¸å®¹æ–¼ï¼š %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "驅動程å¼ç‚ºä¸»æª”\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "整體: ä¸å¯åŸ·è¡Œ\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "整體: 未模擬ä¿è­·\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "æ•´é«”: å¯ä»¥åŸ·è¡Œ\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "圖形: 色彩ä¸å®Œç¾Ž\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "圖形: ä¸å®Œç¾Ž\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "圖形: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "è²éŸ³ï¼š 無法執行\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "è²éŸ³ï¼š ä¸å®Œç¾Ž\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "è²éŸ³ï¼š OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "驅動程å¼å°šæœªå®Œæ•´ï¼š %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "éŠæˆ²ç‚ºæ©Ÿæ¢°å¼ï¼š %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "需è¦è£é£¾åœ–: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "需è¦å¯é»žæ“Šçš„è£é£¾åœ–: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "æ”¯æ´æª¯é¢åž‹ç­é«”: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "驅動程å¼ç‚º BIOS: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "支æ´å³æ™‚存檔: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "ç•«é¢æ–¹å‘: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "垂直"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "æ°´å¹³"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "éœ€è¦ CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "ROM 驗證通éŽï¼š OK\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "ROM 驗證通éŽï¼š 錯誤\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "樣本檔驗證通éŽï¼š ä¸éœ€è¦\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "樣本檔驗證通éŽï¼š OK\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "樣本檔驗證通éŽï¼š 錯誤\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1394,85 +1265,85 @@ msgstr ""
"ROM 驗證通éŽï¼š å·²åœç”¨\n"
"樣本檔驗證通éŽï¼š å·²åœç”¨\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "ç„¡å¯ç”¨è³‡è¨Š"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "用法"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (é è¨­ï¼‰"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
"é¸å®šçš„軟體缺少一個至多個必è¦çš„ ROM 或 CHD æ˜ åƒæª”ï¼Œè«‹é¸æ“‡å…¶ä»–軟體。\n"
"\n"
-"按任æ„éµ ï¼ˆé™¤ ESC éµï¼‰ 繼續。"
+"按任æ„éµç¹¼çºŒã€‚"
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d 軟體 )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr "驅動程å¼ï¼š \"%1$s\" 軟體清單 "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "å€åŸŸï¼š %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "出版商: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "年代: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "軟體清單: %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "è£ç½®é¡žåˆ¥ï¼š %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s æœå°‹ï¼š %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "軟體部分é¸é …: "
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "鏿“‡ BIOS:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1485,33 +1356,33 @@ msgstr ""
"如果這是首次使用 %2$s,請åƒé–± docs 目錄中的 config.txt 以å–得設定 %2$s 的相關"
"資訊。"
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "輸入åç¨±æˆ–é¸æ“‡ï¼š %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "輸入åç¨±æˆ–é¸æ“‡ï¼š (隨機)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr "驅動程å¼ï¼š %-.100s\n"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "ä¸å®Œç¾Ž"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr "確èª"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "無法執行"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "圖形: %s, è²éŸ³: %s"
@@ -1520,15 +1391,15 @@ msgstr "圖形: %s, è²éŸ³: %s"
msgid " [internal]"
msgstr " [內部]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "è²éŸ³"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "å–æ¨£é »çއ"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "使用外部樣本檔"
@@ -1597,17 +1468,17 @@ msgstr "倒帶"
msgid "Fast Forward"
msgstr "快進"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr "此驅動需è¦é¡å¤–載入下列è£ç½®çš„æ˜ åƒæª”: "
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr "æœ¬æ©Ÿå°æœ‰ä¸€å€‹æˆ–更多的 ROM/CHD æ˜¯ä¸æ­£ç¢ºçš„。此機å°å¯èƒ½ç„¡æ³•正確執行。\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1615,64 +1486,64 @@ msgstr ""
"本機å°å·²çŸ¥å…·æœ‰ä¸‹åˆ—çš„å•題\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr "æœ¬æ©Ÿå°æœ‰ä¸€å€‹æˆ–更多的 ROM/CHD 尚未正確地被 DUMP。\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "éµç›¤æ¨¡æ“¬å¯èƒ½æœªé”到 100% 精確。"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "色彩是完全錯誤的。"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "色彩尚未é”到 100% 精確。"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "視訊模擬尚未é”到 100% 精確。"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "è²éŸ³æ¨¡æ“¬å°šæœªé”到 100% 精確。"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "機å°ç¼ºå°‘è²éŸ³ã€‚"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "å°šæœªæ”¯æ´æª¯é¢åž‹ç­é«”模å¼çš„ç•«é¢ç¿»è½‰ã€‚"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "機å°éœ€è¦å¤–部è£é£¾åœ–檔案"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr "本機å°ç„¡æ³•完æˆï¼Œä¸¦éžæ¨¡æ“¬æ™‚的錯誤而å¯èƒ½å‘ˆç¾æ€ªç•°çš„行為或缺少元件。\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr "本機å°ç„¡è²éŸ³ç¡¬é«”,故 MAME 將䏿œƒç”¢ç”Ÿè²éŸ³ï¼Œé€™æ˜¯å¯é æœŸçš„行為。\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr "機å°å…·æœ‰ä¿è­·å°šæœªå®Œå…¨æ¨¡æ“¬ã€‚"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1682,7 +1553,7 @@ msgstr ""
"此機å°ç„¡æ³•執行,機å°çš„æ¨¡æ“¬é‚„ä¸å®Œå…¨ã€‚除了等待開發人員改良模擬之外,沒有方法å¯"
"以解決這個å•題。\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1693,7 +1564,7 @@ msgstr ""
"本機å°çš„的部分元件無法模擬,因其需è¦å¯¦é𛿴»å‹•的互動或機械è£ç½®çš„組åˆã€‚故無法完"
"æˆæ­¤éŠæˆ²çš„執行。\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1703,14 +1574,14 @@ msgstr ""
"\n"
"本機å°å°šæœ‰å¯åŸ·è¡Œçš„仿製版: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr "按任æ„éµç¹¼çºŒ"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1725,15 +1596,15 @@ msgstr ""
"\n"
"CPU:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1741,7 +1612,7 @@ msgstr ""
"\n"
"è²éŸ³ï¼š\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1749,78 +1620,78 @@ msgstr ""
"\n"
"視訊:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "ç„¡\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "å‘é‡"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "éµç›¤æ¨¡æ“¬ç‹€æ…‹"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "模å¼ï¼š 部分模擬"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "UI: 已啟用"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**使用 ScrLock éµåˆ‡æ›**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "模å¼ï¼š 完整模擬"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "UI: å·²åœç”¨"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "無法啟用連射"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "鏿“‡å„²å­˜ä½ç½®"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "鏿“‡è¼‰å…¥ä½ç½®"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "å–æ¶ˆå„²å­˜"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "å–æ¶ˆè¼‰å…¥"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "儲存至ä½ç½® %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "從ä½ç½® %s 載入"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1833,7 +1704,7 @@ msgstr ""
"按『%1$sã€é€€å‡ºï¼Œ\n"
"按『%2$sã€ç¹¼çºŒæ¨¡æ“¬ã€‚"
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "主音é‡"
@@ -1842,7 +1713,7 @@ msgstr "主音é‡"
msgid "%1$s Volume"
msgstr "%1$s 音é‡"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "è¶…é » CPU %1$s"
@@ -1852,154 +1723,154 @@ msgstr "è¶…é » CPU %1$s"
msgid "%1$s Refresh Rate"
msgstr "%1$s 更新率"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$s 亮度"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$s å°æ¯”"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "%1$s Gamma 值"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "%1$s 水平延展"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "%1$s æ°´å¹³ä½ç½®"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "%1$s 垂直延展"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "%1$s 垂直ä½ç½®"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "雷射影碟 %1$s 水平延展"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "雷射影碟 %1$s æ°´å¹³ä½ç½®"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "雷射影碟 %1$s 垂直延展"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "雷射影碟 %1$s 垂直ä½ç½®"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "å‘é‡é–ƒçˆåº¦"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "最å°å…‰æŸå¯¬åº¦"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "最大光æŸå¯¬åº¦"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "å…‰æŸå¼·åº¦"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "å字準星尺度 %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr "X"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr "Y"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "å字準星ä½ç§» %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr "%1$3ddB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr "%1$.3ffps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
-msgstr ""
+msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "ç•«é¢ '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "ç•«é¢"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "å字準星尺度 X %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "å字準星尺度 Y %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "å字準星ä½ç§» X %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "å字準星ä½ç§» Y %1$1.3f"
@@ -2041,10 +1912,73 @@ msgstr "è£åˆ‡"
msgid "Full"
msgstr "全部"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " 色彩"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " PENS"
+
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "指派光線æ§è£ç½®"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "指派軌跡çƒè£ç½®"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "æŒ‡æ´¾è¸æ¿è£ç½®"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "指派 AD æ–æ¡¿è£ç½®"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "指派æ“縱桿è£ç½®"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "指派轉盤è£ç½®"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "指派定ä½è£ç½®"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "指派滑鼠è£ç½®"
+
+#~ msgid "Device Mapping"
+#~ msgstr "è£ç½®æ˜ å°"
+
+#~ msgid "Video Mode"
+#~ msgstr "視訊模å¼"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "三é‡ç·©è¡"
+
+#~ msgid "HLSL"
+#~ msgstr "HLSL"
+
+#~ msgid "GLSL"
+#~ msgstr "GLSL"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "é›™ç·šéŽæ¿¾"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "點陣é ç¸®æ”¾"
+
+#~ msgid "Window Mode"
+#~ msgstr "視窗模å¼"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "強制長寬比例"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "啟動時最大化"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "åŒæ­¥æ›´æ–°"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "ç­‰å¾…åž‚ç›´åŒæ­¥"
+
+#~ msgid "Display Options"
+#~ msgstr "視訊é¸é …"
diff --git a/language/Croatian/strings.po b/language/Croatian/strings.po
index 2425b2d03f0..490b591c84f 100644
--- a/language/Croatian/strings.po
+++ b/language/Croatian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Czech/strings.po b/language/Czech/strings.po
index 15e007cc05b..e053a5d2564 100644
--- a/language/Czech/strings.po
+++ b/language/Czech/strings.po
@@ -7,31 +7,32 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
+"PO-Revision-Date: 2016-04-01 16:38+0200\n"
+"Last-Translator: Karel Brejcha <pankabre@gmail.com>\n"
"Language-Team: MAME Language Team\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+"X-Generator: Poedit 1.8.7\n"
#: src/emu/ui/auditmenu.cpp:115
msgid "Audit in progress..."
-msgstr ""
+msgstr "Probíhá audit..."
#: src/emu/ui/barcode.cpp:72
msgid "New Barcode:"
-msgstr ""
+msgstr "Nový Äárový kód:"
#: src/emu/ui/barcode.cpp:76
msgid "Enter Code"
-msgstr ""
+msgstr "Vložit kód"
#: src/emu/ui/barcode.cpp:118
msgid "Barcode length invalid!"
-msgstr ""
+msgstr "Å patná délka Äárového kódu!"
#: src/emu/ui/cheatopt.cpp:77
#, c-format
@@ -39,1419 +40,1312 @@ msgid ""
"Cheat Comment:\n"
"%s"
msgstr ""
+"Cheat komentář:\n"
+"%s"
#: src/emu/ui/cheatopt.cpp:90
msgid "All cheats reloaded"
-msgstr ""
+msgstr "VÅ¡echny cheaty znovu naÄteny"
#: src/emu/ui/cheatopt.cpp:121
msgid "Autofire Settings"
-msgstr ""
+msgstr "Nastavení automatické střelby"
#: src/emu/ui/cheatopt.cpp:139
msgid "Reset All"
-msgstr ""
+msgstr "Resetovat vše"
#: src/emu/ui/cheatopt.cpp:142
msgid "Reload All"
-msgstr ""
+msgstr "Znovu naÄíst vÅ¡e"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
-msgstr ""
+msgstr "Stav automatické střelby"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
-msgstr ""
+msgstr "Deaktivováno"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
-msgstr ""
+msgstr "Aktivováno"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
-msgstr ""
+msgstr "Zapnuto"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
-msgstr ""
+msgstr "Vypnuto"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
-msgstr ""
+msgstr "Žádná tlaÄítka na tomto zařízení nenalezena!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
+msgstr "Zpoždění autostřelby"
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
-msgstr ""
+msgstr "Základní filtr"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
-msgstr ""
+msgstr "Další filtr"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
-msgstr ""
+msgstr "^!Výrobce"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
-msgstr ""
+msgstr "^!Rok"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
-msgstr ""
+msgstr "Odstranit poslední filtr"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
-msgstr ""
+msgstr "Přidat filtr"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
-msgstr ""
+msgstr "Vyber uživatelský filtr:"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
-msgstr ""
+msgstr "^!Vydavatel"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
-msgstr ""
+msgstr "^!Software List"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
-msgstr ""
+msgstr "^!Typ zařízení"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
-msgstr ""
+msgstr "^!Region"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
-msgstr ""
+msgstr "Zobrazit vše"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
-msgstr ""
+msgstr "Skrýt filtry"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
-msgstr ""
+msgstr "Skrýt info/obrázek"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
-msgstr ""
+msgstr "Skrýt obojí"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
-msgstr ""
+msgstr "Písma"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
-msgstr ""
+msgstr "Barvy"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
-msgstr ""
+msgstr "Jazyk"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
-msgstr ""
+msgstr "Zobraz postranní panely"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
-msgstr ""
+msgstr "Uživatelská nastavení UI"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
-msgstr ""
+msgstr "standardní"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
-msgstr ""
+msgstr "UI Písmo"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
-msgstr ""
+msgstr "TuÄné"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
-msgstr ""
+msgstr "Kurzíva"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
-msgstr ""
+msgstr "Linie"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
-msgstr ""
+msgstr "Velikost info textů"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
-msgstr ""
+msgstr "Nastavení písma UI"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
+"Ukázkový text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
-msgstr ""
+msgstr "Normální text"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
-msgstr ""
+msgstr "Vybraná barva"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
-msgstr ""
+msgstr "Pozadí normálního textu"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
-msgstr ""
+msgstr "Barva pozadí vybraného textu"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
-msgstr ""
+msgstr "Barva podpoložky"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
-msgstr ""
+msgstr "Klon"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
-msgstr ""
+msgstr "Okraj"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
-msgstr ""
+msgstr "Pozadí"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
-msgstr ""
+msgstr "DIP pÅ™epínaÄ"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
-msgstr ""
+msgstr "Barva nedostupné položky"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
-msgstr ""
+msgstr "Barva posuvníku"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
-msgstr ""
+msgstr "Pozadí Gfx prohlížeÄe"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
-msgstr ""
+msgstr "Barva při přejetí myši"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
-msgstr ""
+msgstr "Barva pozadí při přejetí myši"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
-msgstr ""
+msgstr "Barva při stisku myši"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
-msgstr ""
+msgstr "Barva pozadí při stisku myši"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
-msgstr ""
+msgstr "Obnovit původní barvy"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
-msgstr ""
+msgstr "Nastavení barev UI"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
-msgstr ""
+msgstr "Dvojklik nebo stisk %1$s pro změnu barvy"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
-msgstr ""
+msgstr "Menu náhled"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
-msgstr ""
+msgstr "Normální"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
-msgstr ""
+msgstr "Podpoložka"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
-msgstr ""
+msgstr "Vybraný"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
-msgstr ""
+msgstr "Přejetí myši"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
-msgstr ""
+msgstr "Průhlednost"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
-msgstr ""
+msgstr "Červená"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
-msgstr ""
+msgstr "Zelená"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
-msgstr ""
+msgstr "Modrá"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
-msgstr ""
+msgstr "Výběr z palety"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
-msgstr ""
+msgstr " - ARGB nastavení"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
-msgstr ""
+msgstr "Barevný náhled ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
-msgstr ""
+msgstr "Bílá"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
-msgstr ""
+msgstr "Stříbrná"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
-msgstr ""
+msgstr "Šedá"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
-msgstr ""
+msgstr "Černá"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
-msgstr ""
+msgstr "Oranžová"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
-msgstr ""
+msgstr "Žlutá"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
-msgstr ""
+msgstr "Fialová"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
-msgstr ""
+msgstr "Software historie"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
-msgstr ""
+msgstr "Software použití"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
-msgstr ""
+msgstr "Verze: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
-msgstr ""
+msgstr "Historie"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
-msgstr ""
+msgstr "Mameinfo"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
-msgstr ""
+msgstr "Messinfo"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
-msgstr ""
+msgstr "Sysinfo"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
-msgstr ""
+msgstr "Mameskóre"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
-msgstr ""
+msgstr "Gameinit"
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
-msgstr ""
+msgstr "Příkaz"
#: src/emu/ui/dirmenu.cpp:31
msgid "ROMs"
-msgstr ""
+msgstr "ROMs"
#: src/emu/ui/dirmenu.cpp:32
msgid "UI"
-msgstr ""
+msgstr "UI"
#: src/emu/ui/dirmenu.cpp:34
msgid "Samples"
-msgstr ""
+msgstr "Samply"
#: src/emu/ui/dirmenu.cpp:35
msgid "DATs"
-msgstr ""
+msgstr "DATs"
#: src/emu/ui/dirmenu.cpp:36
msgid "INIs"
-msgstr ""
+msgstr "INIs"
#: src/emu/ui/dirmenu.cpp:37
msgid "Extra INIs"
-msgstr ""
+msgstr "Extra INIs"
#: src/emu/ui/dirmenu.cpp:38
msgid "Icons"
-msgstr ""
+msgstr "Ikony"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
-msgstr ""
+msgstr "Cheaty"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
-msgstr ""
+msgstr "Náhledy"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
-msgstr ""
+msgstr "Kastle"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
-msgstr ""
+msgstr "Plakáty"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
-msgstr ""
+msgstr "Titulky"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
-msgstr ""
+msgstr "ZakonÄení"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
-msgstr ""
+msgstr "Desky spojů"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
-msgstr ""
+msgstr "Marquees"
#: src/emu/ui/dirmenu.cpp:47
msgid "Controls Panels"
-msgstr ""
+msgstr "Ovládací panely"
#: src/emu/ui/dirmenu.cpp:48
msgid "Crosshairs"
-msgstr ""
+msgstr "ZaměřovaÄe"
#: src/emu/ui/dirmenu.cpp:49
msgid "Artworks"
-msgstr ""
+msgstr "Artworky"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
-msgstr ""
+msgstr "Bossové"
#: src/emu/ui/dirmenu.cpp:51
msgid "Artworks Preview"
-msgstr ""
+msgstr "Náhledy artworků"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
-msgstr ""
+msgstr "Výběr"
#: src/emu/ui/dirmenu.cpp:53
msgid "GameOver"
-msgstr ""
+msgstr "GameOver"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
-msgstr ""
+msgstr "Jak na to"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
-msgstr ""
+msgstr "Loga"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
-msgstr ""
+msgstr "Skóre"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
-msgstr ""
+msgstr "Versus"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
-msgstr ""
+msgstr "Obaly"
#: src/emu/ui/dirmenu.cpp:116 src/emu/ui/dirmenu.cpp:136
msgid "Folders Setup"
-msgstr ""
+msgstr "Nastavení složek"
#: src/emu/ui/dirmenu.cpp:183
#, c-format
msgid "Current %1$s Folders"
-msgstr ""
+msgstr "Aktuální %1$s složky"
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
-msgstr ""
+msgstr "Změnit složku"
#: src/emu/ui/dirmenu.cpp:195
msgid "Add Folder"
-msgstr ""
+msgstr "Přidat složku"
#: src/emu/ui/dirmenu.cpp:198
msgid "Remove Folder"
-msgstr ""
+msgstr "Odstranit složku"
#: src/emu/ui/dirmenu.cpp:496
#, c-format
msgid "Change %1$s Folder - Search: %2$s_"
-msgstr ""
+msgstr "Změnit %1$s Složku - Hledat: %2$s_"
#: src/emu/ui/dirmenu.cpp:497
#, c-format
msgid "Add %1$s Folder - Search: %2$s_"
-msgstr ""
+msgstr "Přidat %1$s Složku - Hledat: %2$s_"
#: src/emu/ui/dirmenu.cpp:534
msgid "Press TAB to set"
-msgstr ""
+msgstr "Stiskni TAB pro nastavení"
#: src/emu/ui/dirmenu.cpp:640
#, c-format
msgid "Remove %1$s Folder"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
+msgstr "Odstranit %1$s Složku"
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
-msgstr ""
+msgstr "Soubor již existuje - Přepsat?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
-msgstr ""
+msgstr "Ne"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
-msgstr ""
+msgstr "Ano"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
-msgstr ""
+msgstr "Nové jméno obrázku:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
-msgstr ""
+msgstr "Formát obrázku:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
-msgstr ""
+msgstr "Vytvořit"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
-msgstr ""
+msgstr "Prosím vložte i příponu souboru"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
-msgstr ""
+msgstr "[prázdný slot]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
-msgstr ""
+msgstr "[vytvořit]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
-msgstr ""
+msgstr "[software list]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
-msgstr ""
+msgstr "Vyber formát obrázku"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
-msgstr ""
+msgstr "Vyber přístupový režim"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
-msgstr ""
+msgstr "Pouze Ätení"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
-msgstr ""
+msgstr "Čtení-Zápis"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
-msgstr ""
+msgstr "Číst tento obrázek, zapsat do jiného obrázku"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
-msgstr ""
+msgstr "Číst tento obrázek, zapsat do diff"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
-msgstr ""
+msgstr "Nemohu zapisovat do složky"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
msgstr ""
+"Vybranému softwaru chybí jedna nebo více požadovaných ROM nebo CHD. Prosím, "
+"vyberte jiný."
#: src/emu/ui/info.cpp:98
msgid "Not supported"
-msgstr ""
+msgstr "Nepodporováno"
#: src/emu/ui/info.cpp:101
msgid "Partially supported"
-msgstr ""
+msgstr "ČásteÄná podpora"
#: src/emu/ui/info.cpp:109
msgid "[empty]"
-msgstr ""
+msgstr "[prázdný]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
-msgstr ""
+msgstr "Pseudo terminály"
#: src/emu/ui/info_pty.cpp:35
msgid "[failed]"
-msgstr ""
+msgstr "[chybný]"
#: src/emu/ui/inputmap.cpp:52
msgid "User Interface"
-msgstr ""
+msgstr "Uživatelské rozhraní"
#: src/emu/ui/inputmap.cpp:59
msgid "Other Controls"
-msgstr ""
+msgstr "Ostatní ovládání"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
-msgstr ""
+msgstr "Reset"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
-msgstr ""
+msgstr "Vstup (vše)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
-msgstr ""
+msgstr "Vstup (toto zařízení)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
-msgstr ""
+msgstr "Analogové ovladaÄe"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
-msgstr ""
+msgstr "DIP pÅ™epínaÄe"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
-msgstr ""
+msgstr "Nastavení zařízení"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
-msgstr ""
+msgstr "Zapsané informace"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
-msgstr ""
+msgstr "Informace o zařízení"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
-msgstr ""
+msgstr "Informace o programu"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
-msgstr ""
+msgstr "Souborový manažer"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
-msgstr ""
+msgstr "Ovládání kazetového pÅ™ehrávaÄe"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
-msgstr ""
+msgstr "Výběr BIOSu"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
-msgstr ""
+msgstr "Zásuvná zařízení"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
-msgstr ""
+msgstr "ÄŒteÄka Äárového kódu"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
-msgstr ""
+msgstr "Síťová zařízení"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
-msgstr ""
+msgstr "Režim klávesnice"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
-msgstr ""
+msgstr "Posuvné ovladaÄe"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
-msgstr ""
+msgstr "Nastavení videa"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
-msgstr ""
+msgstr "Nastavení zameÅ™ovaÄe"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
-msgstr ""
+msgstr "Cheat"
#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
+msgid "Plugin Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:140
+msgid "External DAT View"
+msgstr "Externí DAT zobrazení"
+
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
-msgstr ""
+msgstr "Přidat do oblíbených"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
-msgstr ""
+msgstr "Odstranit z oblíbených"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
-msgstr ""
+msgstr "Vyber nové zařízení"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
-msgstr ""
+msgstr "Panely ovládání"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
-msgstr ""
+msgstr "Náhled artworku"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
-msgstr ""
+msgstr "Konec hry"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
-msgstr ""
+msgstr "Přidat nebo odebrat z oblíbených"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
-msgstr ""
+msgstr "Export zobrazeného seznamu do souboru"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
-msgstr ""
+msgstr "Zobraz DAT pohled"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
-msgstr ""
+msgstr "Zpět na zařízení"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
-msgstr ""
+msgstr "UkonÄení"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
-msgstr ""
+msgstr "Zpět na předchozí menu"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
-msgstr ""
+msgstr "Automaticky"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
-msgstr ""
+msgstr "Obrázky"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
-msgstr ""
+msgstr "Informace"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
-msgstr ""
+msgstr "Režim klávesnice:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
-msgstr ""
+msgstr "Přirozená"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
-msgstr ""
+msgstr "Emulovaná"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
+"Čas běhu: %1$d:%2$02d:%3$02d\n"
+"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
+"Čas běhu: %1$d:%2$02d\n"
+"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
+"Lístků zahozeno: %1$d\n"
+"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
-msgstr ""
+msgstr "Mince %1$c: NA%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
-msgstr ""
+msgstr "Mince %1$c: %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
-msgstr ""
+msgstr " (zamÄeno)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
+msgstr "Viditelné zpoždění"
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
-msgstr ""
+msgstr "%s.xml uložen v ui složce."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
-msgstr ""
+msgstr "Jméno: Popis:\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
-msgstr ""
+msgstr "%s.txt uložen v ui složce."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
-msgstr ""
+msgstr "Exportuj XML formát (jako -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
-msgstr ""
+msgstr "Exportuj TXT formát (jako -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
-msgstr ""
+msgstr "Prázdný"
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
-msgstr ""
+msgstr "Ulož konfiguraci zařízení"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
-msgstr ""
+msgstr "Pluginy"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
-msgstr ""
+msgstr "Filtr"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
-msgstr ""
+msgstr " ^!Soubor"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
-msgstr ""
+msgstr " ^!Kategorie"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
-msgstr ""
+msgstr "^!Nastav uživatelský filtr"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
-msgstr ""
+msgstr "Upravení UI"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
-msgstr ""
+msgstr "Konfigurace složek"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
-msgstr ""
+msgstr "Možnosti zvuku"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
-msgstr ""
+msgstr "Základní vstupy"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
-msgstr ""
+msgstr "Ulož konfiguraci"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
-msgstr ""
+msgstr "Nastavení"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
-msgstr ""
+msgstr "**Chyba ukládání ui.ini**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
-msgstr ""
+msgstr "**Chyba ukládání %s.ini**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
+"\n"
+" Configurace uložena \n"
+"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
-msgstr ""
+msgstr "Seznam výběru - Hledání: "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
-msgstr ""
+msgstr "Dvojklik nebo stisk %1$s pro výběr"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
-msgstr ""
+msgstr "Základní informace"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
+"%s\n"
+" přidán do seznamu oblíbených."
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
+"%s\n"
+" odstraněn ze seznamu oblíbených."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
-msgstr ""
+msgstr "Možnosti konfigurace"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
-msgstr ""
+msgstr "%1$s %2$s ( %3$d / %4$d zařízení (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
-msgstr ""
+msgstr "%1$s (%2$s - %3$s) - "
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
-msgstr ""
+msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
-msgstr ""
+msgstr "%1$s Hledání: %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
-msgstr ""
+msgstr "Romset: %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
-msgstr ""
+msgstr "%1$s, %2$-.100s"
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
-msgstr ""
+msgstr "Driver je klon: %1$-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
-msgstr ""
+msgstr "Driver je parent"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
-msgstr ""
+msgstr "CelkovÄ›: NEFUNGUJE"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
-msgstr ""
+msgstr "Celkově: Neemulovaná ochrana"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
-msgstr ""
+msgstr "CelkovÄ›: Funguje"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
-msgstr ""
+msgstr "Grafika: Nedokonalá, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
-msgstr ""
+msgstr "Grafika: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
-msgstr ""
+msgstr "Zvuk: Neimplementován"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
-msgstr ""
+msgstr "Zvuk: Nedokonalý"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
-msgstr ""
+msgstr "Zvuk: OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
-msgstr ""
+msgstr "Systém: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
-msgstr ""
+msgstr "Software je klon: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
-msgstr ""
+msgstr "Software je parent"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
-msgstr ""
+msgstr "Podpora: Ne"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
-msgstr ""
+msgstr "Podpora: ČásteÄnÄ›"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
-msgstr ""
+msgstr "Podpora: Ano"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
-msgstr ""
+msgstr "romset: %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
-msgstr ""
+msgstr "%1$s %2$s"
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
-msgstr ""
+msgstr "Romset: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
-msgstr ""
+msgstr "Rok: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
-msgstr ""
+msgstr "Výrobce: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
-msgstr ""
+msgstr "Driver je Klon: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
-msgstr ""
+msgstr "Driver je Parent\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
-msgstr ""
+msgstr "CelkovÄ›: NEFUNGUJE\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
-msgstr ""
+msgstr "Celkově: Neemulovaná ochrana\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
-msgstr ""
+msgstr "CelkovÄ›: Funguje\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
-msgstr ""
+msgstr "Grafika: Nedokonalé barvy\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
-msgstr ""
+msgstr "Grafika: Nedokonalá\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
-msgstr ""
+msgstr "Grafika: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
-msgstr ""
+msgstr "Zvuk: Neimplementován\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
-msgstr ""
+msgstr "Zvuk: Nedokonalý\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
-msgstr ""
+msgstr "Zvuk: OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
-msgstr ""
+msgstr "Driver je Kostra: %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
-msgstr ""
+msgstr "Hra je mechanická: %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
-msgstr ""
+msgstr "Vyžaduje artwork: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
-msgstr ""
+msgstr "Vyžaduje klikatelný artwork: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
-msgstr ""
+msgstr "Podporuje Cocktail: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
-msgstr ""
+msgstr "Driver je Bios: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
-msgstr ""
+msgstr "Podpora Save: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
-msgstr ""
+msgstr "Orientace obrazovky: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
-msgstr ""
+msgstr "Vertikální"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
-msgstr ""
+msgstr "Horizontální"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
-msgstr ""
+msgstr "Vyžaduje CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
+"Audit ROM proběhl: OK\n"
+"\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
-msgstr ""
+msgstr "Audit ROM proběhl: ŠPATNĚ\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
-msgstr ""
+msgstr "Samples Audit Pass: None Needed\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
-msgstr ""
+msgstr "Audit samplů proběhl: OK\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
-msgstr ""
+msgstr "Audit samplů proběhl: ŠPATNĚ\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
+"Audit ROM: Vypnutý\n"
+"Audit samplů: Vypnutý\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
-msgstr ""
+msgstr "Žádné dostupné informace"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
-msgstr ""
+msgstr "Využití"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
-msgstr ""
+msgstr " (standardní)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
-msgstr ""
+msgstr "%1$s %2$s ( %3$d / %4$d softwares )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
-msgstr ""
+msgstr "Driver: \"%1$s\" software list "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
-msgstr ""
+msgstr "Region: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
-msgstr ""
+msgstr "Vydavatel: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
-msgstr ""
+msgstr "Rok: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
-msgstr ""
+msgstr "Software List: %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
-msgstr ""
+msgstr "Typ zařízení: %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
-msgstr ""
+msgstr "%s Hledání: %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
-msgstr ""
+msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
-msgstr ""
+msgstr "VýbÄ›r Äásti software:"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
-msgstr ""
+msgstr "Výběr BIOSu:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,223 +1353,252 @@ msgid ""
"If this is your first time using %2$s, please see the config.txt file in the "
"docs directory for information on configuring %2$s."
msgstr ""
+"Žádná zařízení nenalezena. Prosím zkontrolujte rompath v %1$s.ini souboru.\n"
+"\n"
+"Pokud používáte %2$s poprvé, prosím podívejte se na config.txt soubor ve "
+"složce docs na informace o konfiguraci %2$s."
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
-msgstr ""
+msgstr "Napiš jméno nebo vyber: %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
-msgstr ""
+msgstr "Napiš jméno nebo vyber: (náhodně)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
-msgstr ""
+msgstr "Driver: %1$-.100s"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
-msgstr ""
+msgstr "Nedokonalý"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
-msgstr ""
+msgstr "OK"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
-msgstr ""
+msgstr "Neimplementovaný"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
-msgstr ""
+msgstr "Gfx: %s, Zvuk: %s"
#: src/emu/ui/slotopt.cpp:166
msgid " [internal]"
-msgstr ""
+msgstr " [interní]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
-msgstr ""
+msgstr "Zvuk"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
-msgstr ""
+msgstr "Vzorkovací frekvence"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
-msgstr ""
+msgstr "Použít externí samply"
#: src/emu/ui/swlist.cpp:70
msgid "[file manager]"
-msgstr ""
+msgstr "[souborový manažer]"
#: src/emu/ui/swlist.cpp:235
msgid "Switch Item Ordering"
-msgstr ""
+msgstr "Přepnout řazení"
#: src/emu/ui/swlist.cpp:268
#, c-format
msgid "Switched Order: entries now ordered by %s"
-msgstr ""
+msgstr "Přepnuté řazení: záznamy nyní řazeny podle %s"
#: src/emu/ui/swlist.cpp:268
msgid "shortname"
-msgstr ""
+msgstr "shortname"
#: src/emu/ui/swlist.cpp:268
msgid "description"
-msgstr ""
+msgstr "popis"
#: src/emu/ui/swlist.cpp:436
msgid "[compatible lists]"
-msgstr ""
+msgstr "[kompatibilní seznamy]"
#: src/emu/ui/tapectrl.cpp:84
msgid "stopped"
-msgstr ""
+msgstr "zastaveno"
#: src/emu/ui/tapectrl.cpp:86
msgid "playing"
-msgstr ""
+msgstr "přehrává"
#: src/emu/ui/tapectrl.cpp:86
msgid "(playing)"
-msgstr ""
+msgstr "(přehrává)"
#: src/emu/ui/tapectrl.cpp:87
msgid "recording"
-msgstr ""
+msgstr "nahrává"
#: src/emu/ui/tapectrl.cpp:87
msgid "(recording)"
-msgstr ""
+msgstr "(nahrává)"
#: src/emu/ui/tapectrl.cpp:94
msgid "Pause/Stop"
-msgstr ""
+msgstr "Pauza/Stop"
#: src/emu/ui/tapectrl.cpp:97
msgid "Play"
-msgstr ""
+msgstr "Přehrát"
#: src/emu/ui/tapectrl.cpp:100
msgid "Record"
-msgstr ""
+msgstr "Nahrát"
#: src/emu/ui/tapectrl.cpp:103
msgid "Rewind"
-msgstr ""
+msgstr "PÅ™etoÄit zpÄ›t"
#: src/emu/ui/tapectrl.cpp:106
msgid "Fast Forward"
-msgstr ""
+msgstr "PÅ™etoÄit dopÅ™edu"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
+"Tento ovladaÄ vyžaduje aby byl obraz media nahrán do následujících zařízení: "
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
+"Jedna nebo více ROMs/CHDs pro toto zařízení je nekorektních. Zařízení nemusí "
+"fungovat správně.\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
+"S tímto zařízením jsou známy problémy\n"
+"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
+"Jedna nebo více ROM/CHD pro toto zařízení je špatně stažena (dumpnuta).\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
-msgstr ""
+msgstr "Emulace klávesnice nemusí být na 100% autentická.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
-msgstr ""
+msgstr "Barvy nejsou 100% autentické.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
-msgstr ""
+msgstr "Barvy jsou úplně špatné.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
-msgstr ""
+msgstr "Emulace videa není 100% autentická.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
+"Emulace zvuku není 100% autentická.\n"
+"\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
-msgstr ""
+msgstr "Zařízení postrádá zvuky.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
-msgstr ""
+msgstr "OtoÄení obrazu v koktail módu není podporováno.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
-msgstr ""
+msgstr "Zařízení vyžaduje externí artworky\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
+"Zařízení nebylo nikdy dokonÄeno. Může se objevit zvláštní chování nebo "
+"chybÄ›jící Äásti, jež nejsou chybou emulace.\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
+"Zařízení nemá zvukový hardware, MAME nebyde přehrávat zvuky, toto je "
+"oÄekávané chování.\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
-msgstr ""
+msgstr "Zařízení má ochranu která není plně emulovaná.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
"complete. There is nothing you can do to fix this problem except wait for "
"the developers to improve the emulation.\n"
msgstr ""
+"\n"
+"ZAŘÃZENà NEFUNGUJE. Emulace tohoto zařízení není jeÅ¡tÄ› kompletní. Nic s tím "
+"nemůžete udÄ›lat, jen Äekat na vývojáře až vylepší emulaci.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
"physical interaction or consists of mechanical devices. It is not possible "
"to fully play this machine.\n"
msgstr ""
+"\n"
+"Části tohoto zařízení nemohou být emulovány neboť vyžadují fyzickou "
+"interakci nebo se skládají z mechanických zařízení. Není možné naplno "
+"rozeběhnout toto zařízení.\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
+"\n"
+"\n"
+"Existují funkÄní klony tohoto zařízení: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
+"\n"
+"\n"
+"Stiskni klávesu pro pokraÄování"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,99 +1607,108 @@ msgid ""
"\n"
"CPU:\n"
msgstr ""
+"%1$s\n"
+"%2$s %3$s\n"
+"Driver: %4$s\n"
+"\n"
+"CPU:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
-msgstr ""
+msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
-msgstr ""
+msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
+"\n"
+"Zvuk:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
+"\n"
+"Video:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
-msgstr ""
+msgstr "Žádný\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
-msgstr ""
+msgstr "Vektor"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
-msgstr ""
+msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
-msgstr ""
+msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
-msgstr ""
+msgstr "Stav emulace klávesnice"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
-msgstr ""
+msgstr "Režim: ÄŒÃSTEÄŒNà Emulace"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
-msgstr ""
+msgstr "UI: Povoleno"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
-msgstr ""
+msgstr "**Použij ScrLock pro přepnutí**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
-msgstr ""
+msgstr "Režim: PLNà Emulace"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
-msgstr ""
+msgstr "UI: Zakázáno"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
-msgstr ""
+msgstr "Autostřelba nemůže být povolena"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
-msgstr ""
+msgstr "Vyber pozici pro uložení"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
-msgstr ""
+msgstr "Vyber pozici pro naÄtení"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
-msgstr ""
+msgstr "Ukládání zrušeno"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
-msgstr ""
+msgstr "NaÄítání zruÅ¡eno"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
-msgstr ""
+msgstr "Uložení do pozice %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
-msgstr ""
+msgstr "NaÄtení z pozice %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,219 +1716,341 @@ msgid ""
"Press ''%1$s'' to quit,\n"
"Press ''%2$s'' to return to emulation."
msgstr ""
+"UrÄitÄ› chcete odejít?\n"
+"\n"
+"Stiskni ''%1$s'' pro ukonÄení,\n"
+"Stiskni ''%2$s'' pro návrat do emulace."
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
-msgstr ""
+msgstr "Hlavní hlasitost"
#: src/emu/ui/ui.cpp:1926
#, c-format
msgid "%1$s Volume"
-msgstr ""
+msgstr "%1$s hlasitost"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
-msgstr ""
+msgstr "Přetakt CPU %1$s"
#: src/emu/ui/ui.cpp:1968
#, c-format
msgid "%1$s Refresh Rate"
-msgstr ""
+msgstr "%1$s Obnovovací frekvence"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
-msgstr ""
+msgstr "%1$s Jas"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
-msgstr ""
+msgstr "%1$s Kontrast"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
-msgstr ""
+msgstr "%1$s Gamma"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
-msgstr ""
+msgstr "%1$s Horiz Roztah"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
-msgstr ""
+msgstr "%1$s Horiz Pozice"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
-msgstr ""
+msgstr "%1$s Vert Roztah"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
-msgstr ""
+msgstr "%1$s Vert Pozice"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
-msgstr ""
+msgstr "Laserdisc '%1$s' Horiz Roztah"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
-msgstr ""
+msgstr "Laserdisc '%1$s' Horiz Pozice"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
-msgstr ""
+msgstr "Laserdisc '%1$s' Vert Roztah"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
-msgstr ""
+msgstr "Laserdisc '%1$s' Vert Pozice"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
-msgstr ""
+msgstr "Vektor BlikaÄ"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
-msgstr ""
+msgstr "Minimální šířka svazku"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
-msgstr ""
+msgstr "Maximální šířka svazku"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
-msgstr ""
+msgstr "Váha intenzity svazku"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
-msgstr ""
+msgstr "ZaměřovaÄ Å¡kála %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
-msgstr ""
+msgstr "X"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
-msgstr ""
+msgstr "Y"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
-msgstr ""
+msgstr "ZaměřovaÄ posun %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
-msgstr ""
+msgstr "%1$3ddB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
-msgstr ""
+msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
-msgstr ""
+msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
-msgstr ""
+msgstr "%1$.3ffps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
-msgstr ""
+msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
-msgstr ""
+msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
-msgstr ""
+msgstr "Obraz '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
-msgstr ""
+msgstr "Obraz"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
-msgstr ""
+msgstr "ZaměřovaÄ Å¡kála X %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
-msgstr ""
+msgstr "ZaměřovaÄ Å¡kála Y %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
-msgstr ""
+msgstr "ZaměřovaÄ posun X %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
-msgstr ""
+msgstr "ZaměřovaÄ posun Y %1$1.3f"
#: src/emu/ui/videoopt.cpp:55
#, c-format
msgid "Screen #%d"
-msgstr ""
+msgstr "Obraz #%d"
#: src/emu/ui/videoopt.cpp:203
msgid "Rotate"
-msgstr ""
+msgstr "Rotace"
#: src/emu/ui/videoopt.cpp:207
msgid "Backdrops"
-msgstr ""
+msgstr "Pozadí"
#: src/emu/ui/videoopt.cpp:211
msgid "Overlays"
-msgstr ""
+msgstr "Popředí"
#: src/emu/ui/videoopt.cpp:215
msgid "Bezels"
-msgstr ""
+msgstr "Bezels"
#: src/emu/ui/videoopt.cpp:219
msgid "CPanels"
-msgstr ""
+msgstr "CPanely"
#: src/emu/ui/videoopt.cpp:227
msgid "View"
-msgstr ""
+msgstr "Pohled"
#: src/emu/ui/videoopt.cpp:227
msgid "Cropped"
-msgstr ""
+msgstr "Ořezaný"
#: src/emu/ui/videoopt.cpp:227
msgid "Full"
-msgstr ""
+msgstr "Plný"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
-msgstr ""
+msgstr " BARVY"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
-msgstr ""
+msgstr " PERA"
+
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "Lightgun zařízení přiřazení"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "Trackball zařízení přiřazení"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "Pedál zařízení přiřazení"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "ADStick zařízení přiřazení"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "Pádlo zařízení přiřazení"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "VytáÄecí zařízení pÅ™iÅ™azení"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "PoziÄní zařízení pÅ™iÅ™azení"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "Myš zařízení přiřazení"
+
+#~ msgid "Device Mapping"
+#~ msgstr "Mapování zařízení"
+
+#~ msgid "Video Mode"
+#~ msgstr "Video Mód"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "Triple Buffering"
+
+#~ msgid "HLSL"
+#~ msgstr "HLSL"
+
+#~ msgid "GLSL"
+#~ msgstr "GLSL"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Bilineární filtrování"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "Bitmap Prescaling"
+
+#~ msgid "Window Mode"
+#~ msgstr "Okenní mód"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "Vynutit poměr stran"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "Spustit maximalizovanÄ›"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "Synchronizované obnovení"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "ÄŒekat na V-Sync"
+
+#~ msgid "Display Options"
+#~ msgstr "Nastavení zobrazení"
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Znovu-vyber poslední spuštěné zařízení"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Zvětši obrázky v pravém panelu"
+
+#~ msgid "DATs info"
+#~ msgstr "DAT informace"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Zobraz ukazatel myši"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "PotvrÄ odchod ze zařízení"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "PÅ™eskoÄ informaÄní obrazovku pÅ™i startu"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "Vynuť 4:3 vzhled pro software snapshot"
+
+#~ msgid "Use image as background"
+#~ msgstr "Použij obrázek jako pozadí"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "PÅ™eskoÄ menu s výbÄ›rem BIOSu"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "PÅ™eskoÄ menu s výbÄ›rem Äástí software"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "Různé možnosti"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Vybranému zařízení chybí jedna nebo více požadovaných ROM nebo CHD. "
+#~ "Prosím, vyberte jiné zařízení.\n"
+#~ "\n"
+#~ "Stiskni nÄ›jakou klávesu (kromÄ› ESC) pro pokraÄování."
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Vybraný software postrádá jeden nebo více požadovaných soborů. Prosím, "
+#~ "vyberte jiný.\n"
+#~ "\n"
+#~ "Stiskni nÄ›jakou klávesu (kromÄ› ESC) pro pokraÄování."
diff --git a/language/Danish/strings.po b/language/Danish/strings.po
index e7c6d9f99af..5354094a599 100644
--- a/language/Danish/strings.po
+++ b/language/Danish/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Dutch/strings.po b/language/Dutch/strings.po
index c71de261aab..61ed73f4968 100644
--- a/language/Dutch/strings.po
+++ b/language/Dutch/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -59,394 +59,355 @@ msgstr "Reset alles"
msgid "Reload All"
msgstr "Alles opnieuw inlezen"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "Autofire status"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "Uitgeschakeld"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "Ingeschakeld"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "Aan"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "Uit"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "Geen knoppen gevonden op deze machine!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "Vertraging autofire"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "Lightgun toewijzing"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "Trackball toewijzing"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "Pedaal toewijzing"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "Adstick toewijzing"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "Paddle toewijzing"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "Dial-apparaat toewijzing"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "Positie-apparaat toewijzing"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "Muis toewijzing"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "Invoerapparaat mapping"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "Hoofdfilter"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "Ander filter"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!Fabrikant"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!Jaar"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "Verwijder laatste filter"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "Voeg filter toe"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "Kies custom filter:"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!Uitgever"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!Softwarelijst"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!Device type"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!Regio"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "Toon alles"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "Verberg filters"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "Verberg info/plaatje"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "Verberg beide"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "Lettertypes"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "Kleuren"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "Taal"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "Toon zijpanelen"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "Instellingen gebruikersinterface"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "standaard"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "Lettertype gebruikersinterface"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "Vet"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "Cursief"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "Lijnen"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "Tekstgrootte informatie"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "Instellingen lettertype gebruikersinterface"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
"Voorbeeldtekst - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "Normale tekst"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "Geselecteerde kleur"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "Normale tekst achtergrond"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "Geselecteerde achtergrondkleur"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "Kleur subitem"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "Clone/Variant"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "Rand"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "Achtergrond"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "Dipswitch"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "Niet beschikbaar kleur"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "Slider kleur"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "Gfx-viewer achtergrond"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "Muis-over kleur"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "Muis-over achtergrond kleur"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "Muis-down kleur"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "Muis-down achtergrond kleur"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "Herstel originele kleuren"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "Kleurinstellingen gebruikersinterface"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "Dubbelklik of druk op %1$s om de kleurwaarde te wijzigen"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "Menu Voorbeeld"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "Normaal"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "Onderdeel"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "Geselecteerd"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "Muis-over"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "Alpha"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "Rood"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "Groen"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "Blauw"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "Kies uit palet"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr " - ARGB Instellingen"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "Kleur voorbeeld ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "Wit"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "Zilver"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "Grijs"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "Zwart"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "Oranje"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "Geel"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "Violet"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "Softwaregeschiedenis"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "Softwaregebruik"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "Revisie: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "Geschiedenis"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "Mameinfo"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "Messinfo"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "Sysinfo"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "Mamescore"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "Commando"
@@ -478,35 +439,35 @@ msgstr "Extra INIs"
msgid "Icons"
msgstr "Iconen"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "Cheats"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "Schermafbeeldingen"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "Kasten"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "Flyers"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "Titels"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "Eindes"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "Printplaten"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr "Marquees"
@@ -522,7 +483,7 @@ msgstr "Vizier"
msgid "Artworks"
msgstr "Artwork"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "Eindbazen"
@@ -530,7 +491,7 @@ msgstr "Eindbazen"
msgid "Artworks Preview"
msgstr "Artworkvoorvertoning"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "Selecteer"
@@ -538,23 +499,23 @@ msgstr "Selecteer"
msgid "GameOver"
msgstr "Game over"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "Hoe te bedienen"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "Logos"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "Scores"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr "Tegen"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "Hoesjes"
@@ -598,132 +559,83 @@ msgstr "Druk op TAB om te kiezen"
msgid "Remove %1$s Folder"
msgstr "Verwijder %1$s map"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "Video modus"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "Drievoudige buffering"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr "HLSL"
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr "GLSL"
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "Bilineaire filtering"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "Bitmap prescaling"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "Schermmodus"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "Forceer aspectratio"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "Start gemaximaliseerd"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "Gesynchroniseerde verversing"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "Wacht V-Sync"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "Video-opties"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "Bestand bestaat al - Overschrijven?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "Nee"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "Ja"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "Nieuwe bestandsnaam:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "Bestandsformaat:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "Aanmaken"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "Vul ook een bestandsextensie in"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[lege plek]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[aanmaken]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[software lijst]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "Selecteer bestandsformaat"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "Selecteer toegangsmodus"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "Alleen lezen"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "Lezen en schrijven"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "Lees dit bestamd, schrijf naar een ander bestand"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "Lees dit bestand, schrijf naar een diff"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "Kan geen map vervangen"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -743,7 +655,7 @@ msgstr "Gedeeltelijk ondersteund"
msgid "[empty]"
msgstr "[leeg]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "Pseudoterminals"
@@ -759,164 +671,168 @@ msgstr "Gebruikersinterface"
msgid "Other Controls"
msgstr "Andere controls"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "Herstel"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "Invoer (algemeen)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "Invoer (deze machine)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "Analoge controls"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "DIP-schakelaars"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "Machineconfiguratie"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "Boekhoudinginformatie"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "Machineinformatie"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "Bestandsinformatie"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "Bestandsbeheer"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "Cassettebediening"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "Biosselectie"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "Insteekapparaten"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "Barcodelezer"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "Netwerkapparaten"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "Keyboardmodus"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "Schuifinstellingen"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "Videoopties"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "Vizieropties"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "Cheat"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "Externe DAT overzicht"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "Voeg toe aan favorieten"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "Verwijder van favorieten"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "Selecteer nieuwe machine"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "Bedieningspanelen"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "Voorvertoning Artwork"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "Game over"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "Naar of van favorietenlijst"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "Exporteer getoonde lijst naar bestand"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "Laat DATs zien"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "Terug naar machine"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "Afsluiten"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "Terug naar vorig menu"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "Automatisch"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "Plaatjes"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "Informatie"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "Toetsenboordmodus:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "Natuurlijk"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "Geëmuleerd"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
@@ -925,7 +841,7 @@ msgstr ""
"In bedrijf: %1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
@@ -934,7 +850,7 @@ msgstr ""
"In bedrijf: %1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -943,154 +859,109 @@ msgstr ""
"Kaartjes uitgegeven: %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "Munt %1$c: n.v.t.%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "Munt %1$c: %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (afgeschermd)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "Vertraging zichtbaarheid"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "Kies laatst gespeelde machine opnieuw"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "Vergroot plaatjes in het rechter paneel"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "DATs informatie"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "Toon muispointer"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "Machine afsluiten bevestigen"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "Sla informatiescherm bij het opstarten over"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "Toon software snapshot altijd in 4:3 formaat"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "Gebruik plaatje als achtergrond"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "Sla bios selectie menu over"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "Sla software onderdelen selectie menu over"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "Overige opties"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xml is opgeslagen in de map 'ui'."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "Naam: Omschrijving:\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt is opgeslagen in de map 'ui'."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "Exporteer in XML formaat (zoals -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "Exporteer in TXT formaat (zoals -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr "Dummie"
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "Sla machineconfiguratie op"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "Plugins"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "Filter"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr " ^!Bestand"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!Categorie"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!Stel eigen filter in"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "Pas gebruikersinterface aan"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "Configureer mappen"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "Geluidsopties"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "Algemene invoer"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "Sla configuratie op"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "Instellingen"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**Fout bij het opslaan van ui.ini**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**Fout bij het opslaan van %s.ini**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1100,20 +971,20 @@ msgstr ""
" Configuratie opgeslagen\n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "Selectielijst - Zoeken: "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "Dubbelklik of druk %1$s om te selecteren"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "Algemene informatie"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1122,8 +993,8 @@ msgstr ""
"%s\n"
" toegevoegd aan favorietenlijst."
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
@@ -1132,268 +1003,264 @@ msgstr ""
"%s\n"
" verwijderd van favorietenlijst."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"De geselecteerde machine mist één of meerdere benodigde ROM of CHD "
-"bestanden. Selecteer een andere machine.\n"
-"\n"
-"Druk een toets (behalve ESC) om verder te gaan."
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "Configureer opties"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d machines (waarvan %5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr "%1$s (%2$s - %3$s) - "
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s Zoek: %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "Romset: %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr "%1$s, %2$-.100s"
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "Driver is een variant van: %1$-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "Driver is hoofddriver"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "Status: WERKT NIET"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "Status: Beveiliging niet geëmuleerd"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "Status: Werkt"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "Beeld: Niet volledig, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "Beeld: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "Geluid: Niet geïmplementeerd"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "Geluid: Niet volledig"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "Geluid: OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "Systeem: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "Software is een variant van: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "Software is hoofdsoftware"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "Ondersteund: Nee"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "Ondersteund: Gedeeltelijk"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "Ondersteund: Ja"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "romset: %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr "%1$s %2$s"
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "Romset: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "Jaar: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "Fabrikant: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "Driver is een variant van: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "Driver is hoofddriver\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "Status: WERKT NIET\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "Status: Beveiliging niet geëmuleerd\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "Status: Werkt\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "Beeld: Kleuren niet juist\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "Beeld: Onvolledig\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "Beeld: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "Geluid: Niet geïmplementeerd\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "Geluid: Onvolledig\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "Geluid: OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "Raamwerkdriver: %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "Machine heeft mechanische onderdelen: %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "Vereist artwork: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "Vereist klikbare artwork: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "Ondersteunt cocktail: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "Driver is een BIOS-driver: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "Ondersteund opslag: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "Schermoriëntatie: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "Verticaal"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "Horizontaal"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "Vereist CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "Roms controle: OK\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "Roms controle: FOUT\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "Samples controle: Niet nodig\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "Samples controle: OK\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "Samples controle: FOUT\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1401,86 +1268,82 @@ msgstr ""
"Roms controle: Uitgeschakeld\n"
"Samples controle: Uitgeschakeld\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "Geen informatie beschikbaar"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "Gebruik"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (standaard)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"De geselecteerde software mist één of meerdere benodigde bestanden. "
-"Selecteer een andere software.\n"
-"\n"
-"Druk een toets (behalve ESC) om verder te gaan."
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d software )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr "Driver: \"%1$s\" softwarelijst "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "Regio: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "Uitgever: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "Jaar: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "Softwarelijst: %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "Apparaattype: %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s Zoek: %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "Softwareonderdeel selectie:"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "Bios selectie:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1494,33 +1357,33 @@ msgstr ""
"Als dit de eerste keer is dat je %2$s gebruikt, lees dan het bestand config."
"txt in de docs map voor informatie hoe %2$s te configureren."
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "Type naam of selecteer: %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "Type naam of selecteer: (willekeurig)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr "Driver: %1$-.100s"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "Onvolledig"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr "OK"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "Niet geïmplementeerd"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "Beeld: %s, Geluid: %s"
@@ -1529,15 +1392,15 @@ msgstr "Beeld: %s, Geluid: %s"
msgid " [internal]"
msgstr " [intern]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "Geluid"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "Samplesnelheid"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "Gebruik externe samples"
@@ -1606,11 +1469,11 @@ msgstr "Terug spoelen"
msgid "Fast Forward"
msgstr "Vooruit spoelen"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr "Deze driver vereist software ingelezen in de volgende device(s): "
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1618,7 +1481,7 @@ msgstr ""
"Één of meerdere ROMs/CHDs voor deze machine zijn niet correct. De machine "
"kan mogelijk niet goed functioneren.\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1626,49 +1489,49 @@ msgstr ""
"Er zijn problemen bekend met de emulatie van deze machine\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
"Één of meerdere ROMs/CHDs voor deze machine zijn niet correct gedumpt.\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "De toetsenbordemulatie is mogelijk niet 100% accuraat.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "De kleuren zijn niet 100% accuraat.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "De kleuren zijn zeker fout.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "De beeldemulatie is niet 100% accuraat.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "De geluidsemulatie is niet 100% accuraat.\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "Deze machine heeft geen geluid.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "Schermflippen wordt in cocktailmodus niet ondersteund.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "Deze machine vereist externe artwork bestanden\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1676,7 +1539,7 @@ msgstr ""
"Deze machine was nooit afgemaakt. Het kan vreemd gedrag vertonen of "
"elementen missen; dit zijn geen fouten van de emulatie.\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1684,12 +1547,12 @@ msgstr ""
"Deze machine heeft geen geluidshardware, MAME zal geen geluid produceren, "
"dit is verwacht gedrag.\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
"Deze machine heeft een beveiliging die nog niet volledig is geëmuleerd.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1700,7 +1563,7 @@ msgstr ""
"compleet. Er is niets wat je kunt doen om dit probleem te verhelpen afgezien "
"van het afwachten tot ontwikkelaars de emulatie verder verbeteren.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1712,7 +1575,7 @@ msgstr ""
"verband met fysieke interactie of het gebruik van mechanische componenten. "
"Het is niet mogelijk om deze machine volledig te spelen.\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1722,14 +1585,14 @@ msgstr ""
"\n"
"Dit zijn werkende klonen van de machine: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1744,15 +1607,15 @@ msgstr ""
"\n"
"Processor:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1760,7 +1623,7 @@ msgstr ""
"\n"
"Geluid:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1768,78 +1631,78 @@ msgstr ""
"\n"
"Beeld:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "Geen\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "Vector"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "Toetsenbord emulatiestatus"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "Modus: GEDEELTELIJKE emulatie"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "UI: Ingeschakeld"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**Gebruik ScrLock om te wisselen**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "Modus: VOLLEDIGE emulatie"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "UI: Uitgeschakeld"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "Autofire kan niet worden ingeschakeld"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "Selecteer positie om naar op te slaan"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "Selecteer positie om van in te lezen"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "Opslaan afgebroken"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "Inlezen afgebroken"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "Opslaan naar positie %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "Inlezen van positie %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1852,7 +1715,7 @@ msgstr ""
"Druk op ''%1%s'' om te stoppen,\n"
"druk op ''%2$s'' om terug te keren naar de emulatie."
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "Hoofdvolume"
@@ -1861,7 +1724,7 @@ msgstr "Hoofdvolume"
msgid "%1$s Volume"
msgstr "%1$s volume"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "Overklok CPU %1$s"
@@ -1871,154 +1734,154 @@ msgstr "Overklok CPU %1$s"
msgid "%1$s Refresh Rate"
msgstr "%1$s verversingfrequentie"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$s helderheid"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$s contrast"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "%1$s gamma"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "%1$s horizontale stretch"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "%1$s horizontale positie"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "%1$s verticale stretch"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "%1$s verticale positie"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "Laserdisc '%1$s' horizontale stretch"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "Laserdisc '%1$s' horizontale positie"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "Laserdic '%1$s' verticale stretch"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "Laserdisc '%1$s' verticale positie"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "Minimale straalbreedte"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "Maximale straalbreedte"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "Gewicht straalintensiteit"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "Vizier schaal %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr "X"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr "Y"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "Vizier offset %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr "%1$3d dB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr "%1$.3f fps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "Scherm '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "Scherm"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "Vizier X-schaal %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "Vizier Y-schaal %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "Vizier X-offset %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "Vizier Y-offset %1$1.3f"
@@ -2060,14 +1923,132 @@ msgstr ""
msgid "Full"
msgstr "Volledig"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " KLEUREN"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " PENNEN"
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "Lightgun toewijzing"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "Trackball toewijzing"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "Pedaal toewijzing"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "Adstick toewijzing"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "Paddle toewijzing"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "Dial-apparaat toewijzing"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "Positie-apparaat toewijzing"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "Muis toewijzing"
+
+#~ msgid "Device Mapping"
+#~ msgstr "Invoerapparaat mapping"
+
+#~ msgid "Video Mode"
+#~ msgstr "Video modus"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "Drievoudige buffering"
+
+#~ msgid "HLSL"
+#~ msgstr "HLSL"
+
+#~ msgid "GLSL"
+#~ msgstr "GLSL"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Bilineaire filtering"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "Bitmap prescaling"
+
+#~ msgid "Window Mode"
+#~ msgstr "Schermmodus"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "Forceer aspectratio"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "Start gemaximaliseerd"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "Gesynchroniseerde verversing"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "Wacht V-Sync"
+
+#~ msgid "Display Options"
+#~ msgstr "Video-opties"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "De geselecteerde machine mist één of meerdere benodigde ROM of CHD "
+#~ "bestanden. Selecteer een andere machine.\n"
+#~ "\n"
+#~ "Druk een toets (behalve ESC) om verder te gaan."
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "De geselecteerde software mist één of meerdere benodigde bestanden. "
+#~ "Selecteer een andere software.\n"
+#~ "\n"
+#~ "Druk een toets (behalve ESC) om verder te gaan."
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Kies laatst gespeelde machine opnieuw"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Vergroot plaatjes in het rechter paneel"
+
+#~ msgid "DATs info"
+#~ msgstr "DATs informatie"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Toon muispointer"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "Machine afsluiten bevestigen"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "Sla informatiescherm bij het opstarten over"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "Toon software snapshot altijd in 4:3 formaat"
+
+#~ msgid "Use image as background"
+#~ msgstr "Gebruik plaatje als achtergrond"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "Sla bios selectie menu over"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "Sla software onderdelen selectie menu over"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "Overige opties"
+
#~ msgid ""
#~ "\n"
#~ "\n"
diff --git a/language/English/strings.po b/language/English/strings.po
index 31576b9cd7a..a0303649f78 100644
--- a/language/English/strings.po
+++ b/language/English/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -56,393 +56,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -474,35 +435,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -518,7 +479,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,7 +487,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -534,23 +495,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -594,132 +555,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -737,7 +649,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -753,705 +665,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,33 +1331,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1495,15 +1366,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1572,80 +1443,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1524,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1532,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1556,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1656,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1665,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1675,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1993,10 +1864,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Estonian/strings.po b/language/Estonian/strings.po
index 7567f51accf..05c7c86a85b 100644
--- a/language/Estonian/strings.po
+++ b/language/Estonian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -56,393 +56,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -474,35 +435,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -518,7 +479,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,7 +487,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -534,23 +495,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -594,132 +555,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -737,7 +649,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -753,705 +665,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,33 +1331,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1495,15 +1366,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1572,80 +1443,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1524,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1532,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1556,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1656,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1665,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1675,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1993,10 +1864,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Finnish/strings.po b/language/Finnish/strings.po
index 3df2bdf8528..9ab54cac8bb 100644
--- a/language/Finnish/strings.po
+++ b/language/Finnish/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/French/strings.po b/language/French/strings.po
index 037e7947971..6d81238f085 100644
--- a/language/French/strings.po
+++ b/language/French/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/French_Belgium/strings.po b/language/French_Belgium/strings.po
index 0fec558c7ac..cbdc68051a6 100644
--- a/language/French_Belgium/strings.po
+++ b/language/French_Belgium/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-03-28 23:49+0200\n"
"Last-Translator: Mevi <mevi.mame@gmail.com>\n"
"Language-Team: MAME Language Team\n"
@@ -58,395 +58,356 @@ msgstr "Tout réinitialiser"
msgid "Reload All"
msgstr "Tout recharger"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "Statut du tir automatique"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "Désactivé"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "Activé"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "Actif"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "Inactif"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "Aucun bouton trouvé sur cette machine !"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "Attente du tir automatique"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "Affecter au périphérique Pistolet"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "Affecter au périphérique Trackball"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "Affecter au périphérique Pédale"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "Affecter au périphérique Adstick"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "Affecter au périphérique Paddle"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "Affecter au périphérique Dial"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "Affecter au périphérique Positional"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "Affecter au périphérique Souris"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "Mappage des périphériques"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "Filtre principal"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "Autre filtre"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!Constructeur"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!Année"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "Supprimer le dernier filtre"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "Ajouter un filtre"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "Sélectionner les filtres personnalisés :"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!Éditeur"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!Liste de logiciels"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!Type de périphérique"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!Région"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "Tout afficher"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "Cacher les filtres"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "Cacher Images/Infos"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "Cacher les deux"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "Polices"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "Couleurs"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "Langue"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "Afficher les panneaux latéraux"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "Paramètres personnalisés de l'interface"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "par défaut"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "Police de l'interface"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "Gras"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "Italique"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "Lignes"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "Taille du texte des infos"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "Paramètres des polices de l'interface"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
"Exemple de texte - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "Texte normal"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "Couleur sélectionnée"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "Arrière-plan du texte normal"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "Couleur de fond sélectionnée"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "Couleur du sous-élément"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "Clone"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "Bordure"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "Arrière-plan"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "DIP Switch"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "Couleur non disponible"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "Couleur du curseur"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "Arrière-plan du visualiseur GFX"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "Couleur lors du passage de la souris"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "Couleur de fond lors du passage de la souris"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "Couleur lorsque le bouton de la souris est enfoncé"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "Couleur de fond lorsque le bouton de la souris est enfoncé"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "Restaurer les couleurs d'origine"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "Paramètres des couleurs de l'interface"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
"Double-cliquez ou appuyez sur %1$s pour changer la valeur de la couleur"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "Aperçu du menu"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "Sous-élément"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "Sélectionné"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "Passage de la souris"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "Rouge"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "Vert"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "Bleu"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "Choisir parmi la palette"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr " - Paramètres ARVB"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "Aperçu de la couleur ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "Blanc"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "Argent"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "Gris"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "Noir"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "Jaune"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "Historique du logiciel"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "Utilisation du logiciel"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "Révision : "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "Aperçu history.dat"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "Aperçu mameinfo.dat"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "Aperçu messinfo.dat"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "Aperçu sysinfo.dat"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "Aperçu story.dat"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr "Aperçu gameinit.dat"
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "Aperçu command.dat"
@@ -478,35 +439,35 @@ msgstr "Fichiers INI supplémentaires"
msgid "Icons"
msgstr "Icônes"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "Cheats (Codes de triche)"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "Snapshots (Captures d'écran)"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "Cabinets (Bornes)"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "Flyers (Prospectus)"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "Titles (Écrans-titre)"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "Ends (Fins de jeu)"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "PCBs (Circuits imprimés)"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -522,7 +483,7 @@ msgstr "Crosshairs (Viseurs)"
msgid "Artworks"
msgstr "Artworks (Illustrations)"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "Bosses (Ennemis et adversaires)"
@@ -530,7 +491,7 @@ msgstr "Bosses (Ennemis et adversaires)"
msgid "Artworks Preview"
msgstr "Artworks Preview (Aperçu des illustrations)"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "Select (Écrans de sélection)"
@@ -538,23 +499,23 @@ msgstr "Select (Écrans de sélection)"
msgid "GameOver"
msgstr "GameOver (Écrans GAME OVER)"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "HowTo (Comment faire)"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "Covers (Boîtiers et emballages)"
@@ -598,132 +559,83 @@ msgstr "Appuyez sur TAB pour définir"
msgid "Remove %1$s Folder"
msgstr "Supprimer le dossier %1$s"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "Mode vidéo"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "Filtrage bilinéaire"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "Prescaling de l'image"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "Mode fenêtré"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "Respecter le ratio d'affichage"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "Démarrer en mode plein écran"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "Synchroniser le rafraîchissement de l'écran"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "Attendre V-Sync"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "Options d'affichage"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "Ce fichier existe déjà - Écraser ?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "Non"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "Oui"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "Nouveau nom de l'image :"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "Format de l'image :"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "Créer"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "Veuillez entrer également l'extension du fichier"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[emplacement vide]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[créer]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[liste des logiciels]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "Sélectionner le format de l'image"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "Sélectionner le mode d'accès"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "Lecture seule"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "Lecture-écriture"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "Lire cette image, écrire dans une autre image"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "Lire cette image, écrire vers diff"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "Impossible de sauvegarder sous ce répertoire"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -743,7 +655,7 @@ msgstr "Partiellement supporté"
msgid "[empty]"
msgstr "[vide]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -759,164 +671,168 @@ msgstr "Interface"
msgid "Other Controls"
msgstr "Autres contrôles"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "Réinitialiser"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "Périphériques d'entrée (généraux)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "Périphériques d'entrée (cette machine)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "Contrôles analogiques"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "DIP Switch"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "Configuration de la machine"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "Infos statistiques"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "Informations sur la machine"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "Informations sur l'image"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "Gestionnaire de fichiers"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "Contrôle de la cassette"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "Sélection du BIOS"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "Slot Devices (Périphériques d'emplacement)"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "Lecteur de code-barres"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "Périphériques réseau"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "Mode clavier"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "Contrôles du curseur"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "Options vidéo"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "Options du viseur"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "Codes de triche"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "Visualiser un DAT externe"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "Ajouter aux favoris"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "Supprimer des favoris"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "Sélectionner une nouvelle machine"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "Control Panels (Commandes)"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "Aperçu de l'artwork"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "Ajouter ou supprimer des favoris"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "Exporter la liste affichée vers un fichier"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "Afficher vue des fichiers DATs"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "Retour à la machine actuelle"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "Quitter MAME"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "Retour au menu précédent"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "Mode clavier :"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "Naturel"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "Émulé"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
@@ -925,7 +841,7 @@ msgstr ""
"Temps écoulé : %1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
@@ -934,7 +850,7 @@ msgstr ""
"Temps écoulé : %1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -943,154 +859,109 @@ msgstr ""
"Tickets distribués : %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "Monnayeur %1$c : ND%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "Monnayeur %1$c : %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (verrouillé)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "Attente visible"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "Resélectionner la dernière machine utilisée"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "Agrandir les images dans l'onglet de droite"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "Info sur les DATs"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "Montrer le pointeur de la souris"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "Confirmer l'arrêt depuis les machines"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "Passer l'affichage des infos au démarrage"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "Forcer l'aspect 4:3 pour la capture d'écran"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "Utiliser l'image comme fond d'écran"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "Passer le menu de sélection du BIOS"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "Passer le menu de sélection des logiciels"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "Autres options"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xml sauvegardé dans le dossier ui."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "Nom : Description :\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt sauvegardé dans le dossier ui."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "Exporter au format XML (comme -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "Exporter au format TXT (comme -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr "Fictif - Non chargé"
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "Sauvegarder la configuration de la machine"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "Plugins (modules d'extension)"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "Filtre"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr "^!Fichier"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr "^!Catégorie"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!Définir un filtre personnalisé"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "Personnaliser l'interface"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "Configurer les dossiers"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "Options du son"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "Périphériques d'entrée généraux"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "Sauvegarder la configuration"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "Paramètres"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**Erreur de sauvegarde du fichier ui.ini**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**Erreur de sauvegarde du fichier %s.ini**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1100,20 +971,20 @@ msgstr ""
" Configuration sauvegardée \n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "Liste de sélection - Recherche : "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "Double-cliquez ou appuyez sur %1$s pour sélectionner"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "Informations générales"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1122,8 +993,8 @@ msgstr ""
"%s\n"
" ajouté à la liste des favoris."
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
@@ -1132,268 +1003,264 @@ msgstr ""
"%s\n"
" supprimé de la liste des favoris."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Il manque un ou plusieurs fichiers de ROMs ou d'images CHD pour utiliser "
-"cette machine. Veuillez en sélectionner une autre.\n"
-"\n"
-"Appuyez sur une touche (excepté ESC) pour continuer."
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "Configurer les options"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s Recherche : %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "Romset : %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "Ce driver est un clone de : %1$-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "Ce driver est le parent"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "En résumé : NE FONCTIONNE PAS"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "En résumé : Protection non émulée"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "En résumé : Fonctionne correctement"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "Graphismes : Imparfaits, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "Graphismes : OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "Son : Non implémenté"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "Son : Imparfait"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "Son : OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "Système : %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "Ce logiciel est un clone de : %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "Ce logiciel est le parent"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "Supporté : Non"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "Supporté : Partiellement"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "Supporté : Oui"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "romset : %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "Romset : %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "Année : %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "Constructeur : %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "Ce driver est un clone de : %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "Ce driver est le parent\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "En résumé : NE FONCTIONNE PAS\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "En résumé : Protection non émulée\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "En résumé : Fonctionne correctement\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "Graphismes : Couleurs imparfaites\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "Graphismes : Imparfaits\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "Graphismes : OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "Son : Non implémenté\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "Son : Imparfait\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "Son : OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "Ce driver est embryonnaire : %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "Jeu comportant des éléments mécaniques : %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "Artwork nécessaire : %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "Artwork cliquable nécessaire : %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "Support du mode cocktail : %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "Ce driver est un BIOS : %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "Supporte les sauvegardes : %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "Orientation de l'écran: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "Verticale"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "Horizontale"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "CHD nécessaire : %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "Vérification des ROMs : OK\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "Vérification des ROMs : PAS OK\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "Vérification des samples : aucun n'est nécessaire\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "Vérification des samples : OK\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "Vérification des samples : PAS OK\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1401,86 +1268,82 @@ msgstr ""
"Vérification des ROMs: Désactivée\n"
"Vérification des samples : Désactivée\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "Aucune information disponible"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "Utilisation"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (par défaut)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Il manque un ou plusieurs fichiers nécessaires à l'utilisation de ce "
-"logiciel. Veuillez en sélectionner un autre.\n"
-"\n"
-"Appuyez sur une touche (excepté ESC) pour continuer."
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d logiciels )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr "Liste de logiciels pour le driver : \"%1$s\" "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "Région : %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "Éditeur : %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "Année : %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "Liste de logiciels : %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "Type de périphérique : %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s Recherche : %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "Sélection du logiciel :"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "Sélection du BIOS :"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1495,33 +1358,33 @@ msgstr ""
"config.txt dans le répertoire docs pour obtenir de plus amples informations "
"sur la configuration de %2$s."
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "Entrez un nom ou sélectionnez : %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "Entrez un nom ou sélectionnez : (au hasard)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr "Driver : %1$-.100s"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "Imparfait"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "Non implémenté"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "GFX : %s, Son : %s"
@@ -1530,15 +1393,15 @@ msgstr "GFX : %s, Son : %s"
msgid " [internal]"
msgstr "[interne]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "Son"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "Fréquence d'échantillonnage"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "Utiliser des samples externes"
@@ -1608,13 +1471,13 @@ msgstr "Rembobiner"
msgid "Fast Forward"
msgstr "Avance rapide"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
"Ce driver nécessite le chargement d'images dans le(s) périphérique(s) "
"suivant(s) : "
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1623,7 +1486,7 @@ msgstr ""
"cette machine sont incorrects. Il est possible qu'elle ne fonctionne pas "
"correctement.\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1631,50 +1494,50 @@ msgstr ""
"On rencontre les problèmes suivants avec cette machine :\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
"Un ou plusieurs fichiers ROMs/CHDs nécessaires à l'utilisation de cette "
"machine n'ont pas été dumpés correctement.\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "L'émulation du clavier peut ne pas être fidèle à 100%.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "Les couleurs ne sont pas fidèles à 100%.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "Les couleurs sont complètement fausses.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "L'émulation vidéo n'est pas fidèle à 100%.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "L'émulation du son n'est pas fidèle à 100%.\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "La machine n'a pas de son.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "Le retournement de l'écran en mode cocktail n'est pas supporté.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "La machine nécessite l'utilisation de fichiers artwork externes\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1683,7 +1546,7 @@ msgstr ""
"bizarrement ou que certains composants soient manquants. Cela ne constitue "
"en aucun cas des bugs d'émulation.\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1691,11 +1554,11 @@ msgstr ""
"Cette machine n'a pas de dispositif sonore. Par conséquent, MAME ne produira "
"aucun son. Il s'agit d'un comportement attendu.\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr "La machine possède une protection qui n'est pas complètement émulée.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1707,7 +1570,7 @@ msgstr ""
"encore complète. Il n'y a rien que vous puissiez faire pour résoudre ce "
"problème sauf attendre que les développeurs améliorent l'émulation.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1719,7 +1582,7 @@ msgstr ""
"nécessitent une interaction physique ou comportent des éléments mécaniques. "
"Il n'est donc pas possible d'y jouer complètement.\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1729,7 +1592,7 @@ msgstr ""
"\n"
"Il existe des clones de cette machine qui fonctionnent correctement : "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
@@ -1739,7 +1602,7 @@ msgstr ""
"\n"
"Appuyez sur une touche pour continuer"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1754,15 +1617,15 @@ msgstr ""
"\n"
"Processeur(s) :\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1770,7 +1633,7 @@ msgstr ""
"\n"
"Son :\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1778,78 +1641,78 @@ msgstr ""
"\n"
"Vidéo :\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "Aucun\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "Graphismes vectoriels"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr "%1$s : %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "Statut de l'émulation du clavier"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "Mode : Émulation PARTIELLE"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "Interface : Activée"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**Utiliser ScrLock pour basculer**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "Mode : Émulation COMPLÈTE"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "Interface : désactivée"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "Le tir automatique ne peut pas être activé"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "Sauvegarder à la position"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "Charger depuis la position"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "Sauvegarde annulée"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "Chargement annulé"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "Sauvegarde à la position %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "Chargement depuis la position %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1862,7 +1725,7 @@ msgstr ""
"Appuyez sur ''%1$s'' pour quitter,\n"
"Appuyez sur ''%2$s'' pour retourner à l'émulation."
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "Volume principal"
@@ -1871,7 +1734,7 @@ msgstr "Volume principal"
msgid "%1$s Volume"
msgstr "Volume %1$s"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "Overclock du processeur %1$s"
@@ -1881,154 +1744,154 @@ msgstr "Overclock du processeur %1$s"
msgid "%1$s Refresh Rate"
msgstr "%1$s - Taux de rafraîchissement"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$s - Luminosité"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$s - Contraste"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "%1$s - Gamma"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "%1$s - Stretch horizontal"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "%1$s - Position horizontale"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "%1$s - Stretch vertical"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "%1$s - Position verticale"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "'%1$s' Laserdisc - Stretch horizontal"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "'%1$s' Laserdisc - Position horizontale"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "'%1$s' Laserdisc - Stretch vertical"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "'%1$s' Laserdisc - Position verticale"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "Scintillement de l'affichage vectoriel"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "Largeur de rayon minimum"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "Largeur de rayon maximum"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "Intensité du rayon"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "Viseur - Échelle %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "Viseur - Offset %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "Écran '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "Écran"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "Viseur - Échelle X %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "Viseur - Échelle Y %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "Viseur - Offset X %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "Viseur - Offset Y %1$1.3f"
@@ -2070,10 +1933,119 @@ msgstr "Tronquée"
msgid "Full"
msgstr "Complète"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " COULEURS"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " MARQUEURS"
+
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "Affecter au périphérique Pistolet"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "Affecter au périphérique Trackball"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "Affecter au périphérique Pédale"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "Affecter au périphérique Adstick"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "Affecter au périphérique Paddle"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "Affecter au périphérique Dial"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "Affecter au périphérique Positional"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "Affecter au périphérique Souris"
+
+#~ msgid "Device Mapping"
+#~ msgstr "Mappage des périphériques"
+
+#~ msgid "Video Mode"
+#~ msgstr "Mode vidéo"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Filtrage bilinéaire"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "Prescaling de l'image"
+
+#~ msgid "Window Mode"
+#~ msgstr "Mode fenêtré"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "Respecter le ratio d'affichage"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "Démarrer en mode plein écran"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "Synchroniser le rafraîchissement de l'écran"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "Attendre V-Sync"
+
+#~ msgid "Display Options"
+#~ msgstr "Options d'affichage"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Il manque un ou plusieurs fichiers de ROMs ou d'images CHD pour utiliser "
+#~ "cette machine. Veuillez en sélectionner une autre.\n"
+#~ "\n"
+#~ "Appuyez sur une touche (excepté ESC) pour continuer."
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Il manque un ou plusieurs fichiers nécessaires à l'utilisation de ce "
+#~ "logiciel. Veuillez en sélectionner un autre.\n"
+#~ "\n"
+#~ "Appuyez sur une touche (excepté ESC) pour continuer."
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Resélectionner la dernière machine utilisée"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Agrandir les images dans l'onglet de droite"
+
+#~ msgid "DATs info"
+#~ msgstr "Info sur les DATs"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Montrer le pointeur de la souris"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "Confirmer l'arrêt depuis les machines"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "Passer l'affichage des infos au démarrage"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "Forcer l'aspect 4:3 pour la capture d'écran"
+
+#~ msgid "Use image as background"
+#~ msgstr "Utiliser l'image comme fond d'écran"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "Passer le menu de sélection du BIOS"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "Passer le menu de sélection des logiciels"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "Autres options"
diff --git a/language/French_Canada/strings.po b/language/French_Canada/strings.po
index 029e1fa02f2..beaeaece0e8 100644
--- a/language/French_Canada/strings.po
+++ b/language/French_Canada/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Georgian/strings.po b/language/Georgian/strings.po
index 47e70366e0b..bdb5db66592 100644
--- a/language/Georgian/strings.po
+++ b/language/Georgian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/German/strings.po b/language/German/strings.po
index 1726fa1dcfa..73df5b5a440 100644
--- a/language/German/strings.po
+++ b/language/German/strings.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
-"PO-Revision-Date: 2016-03-28 11:54+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
+"PO-Revision-Date: 2016-04-11 09:57+0200\n"
"Last-Translator: Lothar Serra Mari <scummvm@rootfather.de>\n"
"Language-Team: MAME Language Team\n"
"Language: de\n"
@@ -60,394 +60,355 @@ msgstr "Alle zurücksetzen"
msgid "Reload All"
msgstr "Alle neu laden"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "Dauerfeuer-Status"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "Deaktiviert"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "Aktiviert"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "An"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "Aus"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "Keine Knöpfe für diese Maschine gefunden!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "Verzögerung für Dauerfeuer"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "Lightgun-Zuordnung"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "Trackball-Zuordnung"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "Pedal-Zuordnung"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "ADStick-Zuordnung"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "Paddle-Zuordnung"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "Wählscheiben-Zuordnung"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "Positionsgeräte-Zuordnung"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "Maus-Zuordnung"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "Gerätezuordnung"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "Hauptfilter"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "Weiterer Filter"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!Hersteller"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "Jahr: "
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "Letzten Filter entfernen"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "Filter hinzufügen"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "Filter auswählen"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!Herausgeber"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!Softwareliste"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!Gerätetyp"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!Region"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "Alle anzeigen"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "Filter ausblenden"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "Info/Bild ausblenden"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "Beide ausblenden"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "Schriftarten"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "Farben"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "Sprache"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "Seitenbereiche anzeigen"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "Einstellungen Benutzeroberfläche"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "Standard"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "Schriftart für Benutzeroberfläche"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "Fett"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "Kursiv"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "Linien"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "Textgröße für Informationen"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "Schriftart-Einstellungen für Benutzeroberfläche"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
"Beispieltext - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "Normaler Text"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "Farbe für Auswahl"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "Normaler Texthintergrund"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "Hintergrundfarbe für Auswahl"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "Farbe für Unterelement"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "Klon"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "Rand"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "Hintergrund"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "DIP-Schalter"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "Nicht verfügbare Farbe"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "Schieberegler-Farbe"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "Hintergrund Gfx-Anzeige"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "Farbe für Mouseover"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "Hintergrundfarbe für Mouseover"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "Farbe für Mausklick"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "Hintergrundfarbe für Mausklick"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "Auf Originalfarben zurücksetzen"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "Farbeinstellungen für Benutzeroberfläche"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "Doppelklicken oder drücken Sie %1$s, um den Farbwert zu ändern"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "Menüvorschau"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "Normal"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "Unterelement"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "Auswahl"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "Mouseover"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "Alpha"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "Rot"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "Grün"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "Blau"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "Aus Palette wählen"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr " - ARGB-Einstellungen"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "Farbvorschau ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "Weiß"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "Silber"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "Grau"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "Schwarz"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "Orange"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "Gelb"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "Violett"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "Geschichte der Software"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "Verwendung der Software"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "Version: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "Geschichte"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "Mameinfo"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "Messinfo"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "Sysinfo"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "Mamespielstand"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr "Gameinit"
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "Befehl"
@@ -479,35 +440,35 @@ msgstr "Zusätzliche INIs"
msgid "Icons"
msgstr "Icons"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "Cheats"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "Schnappschüsse"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "Gehäuse"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "Flyer"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "Titelbilder"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "Enden"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "Platinen"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr "Marquees"
@@ -523,7 +484,7 @@ msgstr "Fadenkreuze"
msgid "Artworks"
msgstr "Illustrationen"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "Bosse"
@@ -531,7 +492,7 @@ msgstr "Bosse"
msgid "Artworks Preview"
msgstr "Vorschau Illustrationen"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "Auswahl"
@@ -539,23 +500,23 @@ msgstr "Auswahl"
msgid "GameOver"
msgstr "GameOver"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "Handbuch"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "Logos"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "Spielstände"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr "Gegen"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "Cover"
@@ -599,132 +560,83 @@ msgstr "Zum Setzen drücken Sie TAB"
msgid "Remove %1$s Folder"
msgstr "%1$s-Ordner entfernen"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "Videomodus"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "Dreifache Pufferung"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr "HLSL"
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr "GLSL"
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "Bilineare Filterung"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "Bitmap-Vorskalierung"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "Fenstermodus"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "Seitenverhältnis erzwingen"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "Maximiert starten"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "Synchronisierter Bildneuaufbau"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "Warten auf vertikalen Synchronisationsimpuls"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "Anzeigeeinstellungen"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "Datei existiert bereits - Überschreiben?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "Nein"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "Ja"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "Neuer Image-Name:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "Image-Format"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "Erzeugen"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "Bitte geben Sie auch eine Dateierweiterung ein"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[leerer Steckplatz]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[erzeugen]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[Softwareliste]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "Image-Format auswählen"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "Zugriffsart wählen"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "Nur lesend"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "Lesend und schreibend"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "Lesen von diesem Image, Schreiben auf ein anderes Image"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "Lesen von diesem Image, Schreiben in diff"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "Kann Verzeichnis nicht überschreiben"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -744,7 +656,7 @@ msgstr "Teilweise unterstützt"
msgid "[empty]"
msgstr "[leer]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "Pseudoterminals"
@@ -760,164 +672,168 @@ msgstr "Benutzerschnittstelle"
msgid "Other Controls"
msgstr "Weitere Bedienelemente"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "Zurücksetzen"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "Eingabe (allgemein)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "Eingabe (für diese Maschine)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "Analoge Bedienelemente"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "DIP-Schalter"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "Konfiguration der Maschine"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "Buchhaltungsinformationen"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "Informationen über diese Maschine"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "Informationen über diese Software"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "Dateimanager"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "Bedienung Cassettendeck"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "BIOS-Auswahl"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "Steckplatzgeräte"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "Barcodeleser"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "Netzwerkgeräte"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "Tastaturmodus"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "Schieberegler"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "Videoeinstellungen"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "Fadenkreuzeinstellungen"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "Cheat"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr "Erweiterungs-Optionen"
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "Externe DAT-Anzeige"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "Zu Favoriten hinzufügen"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "Aus Favoriten entfernen"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "Neue Maschine auswählen"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "Bedienfelder"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "Vorschau Illustrationen"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "Game Over"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "Favoriten verwalten"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "Angezeigte Liste in Datei exportieren"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "DATs Ansicht anzeigen"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "Zurück zur Maschine"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "Verlassen"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "Zurück zum vorherigen Menü"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "Auto"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "Images"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "Informationen"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "Tastaturmodus:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "Natürlich"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "Emuliert"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
@@ -926,7 +842,7 @@ msgstr ""
"Laufzeit: %1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
@@ -935,7 +851,7 @@ msgstr ""
"Laufzeit: %1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -944,154 +860,109 @@ msgstr ""
"Ausgegebene Tickets: %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "Münzen %1$c: NA%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "Münzen %1$c: %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (gesperrt)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "Sichtbare Verzögerung"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "Zuletzt verwendete Maschine erneut auswählen"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "Bilder im rechten Bereich vergrößern"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "DAT-Informationen"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "Mauszeiger anzeigen"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "Beim Verlassen Bestätigung fordern"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "Informationsbildschirm beim Start überspringen"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "4:3-Ansicht für Bildschirmfoto erzwingen"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "Bild als Hintergrund verwenden"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "Menü zur BIOS-Auswahl überspringen"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "Menü zur Softwareauswahl überspringen"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "Verschiedene Einstellungen"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xml im Ordner der Benutzeroberfläche gespeichert."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "Name: Beschreibung:\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt im Ordner der Benutzeroberfläche gespeichert."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "Im XML-Format exportieren"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "Im TXT-Format exportieren"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr "Platzhalter"
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "Konfiguration der Maschine speichern"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "Erweiterungen"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "Filter"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr " ^!Datei"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!Kategorie"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!Filter konfigurieren"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "Benutzeroberfläche anpassen"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "Verzeichnisse konfigurieren"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "Soundeinstellungen"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "Haupteingaben"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "Konfiguration speichern"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "Einstellungen"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**Fehler beim Speichern von ui.ini**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**Fehler beim Speichern von %s.ini**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1101,20 +972,20 @@ msgstr ""
" Konfiguration gespeichert \n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "Auswahlliste - Suche: "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "Zum Auswählen, doppelklicken oder drücken Sie %1$s"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "Allgemeine Informationen"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1123,8 +994,8 @@ msgstr ""
"%s\n"
" zur Favoritenliste hinzugefügt."
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
@@ -1133,268 +1004,268 @@ msgstr ""
"%s\n"
" von der Favoritenliste entfernt."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
"Der gewählten Maschine fehlen ein oder mehrere benötigte ROM- oder CHD-"
"Abbilder. Bitte wählen Sie eine andere Maschine aus.\n"
"\n"
-"Drücken Sie eine beliebige Taste (außer ESC) zum Fortfahren."
+"Drücken Sie eine beliebige Taste, um fortzufahren."
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "Optionen konfigurieren"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d Maschinen (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr "%1$s (%2$s - %3$s) - "
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s Suche: %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "ROM-Satz: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr "%1$s, %2$-.100s"
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "Treiber ist ein Klon von: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "Treiber ist Ursprungs-Treiber"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "Insgesamt: FUNKTIONIERT NICHT\n"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "Insgesamt: Nicht emulierter Kopierschutz\n"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "Insgesamt: Funktioniert\n"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "Grafik: Fehlerhaft, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "Grafik: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "Sound: nicht implementiert"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "Sound: Fehlerhaft"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "Sound: OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "System: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "Programm ist ein Klon von: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "Programm ist Ursprungs-Programm"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "Unterstützt: Nein"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "Unterstützt: Teilweise"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "Unterstützt: Ja"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "ROM-Satz: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr "%1$s %2$s"
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "ROM-Satz: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "Jahr: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "Hersteller: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "Treiber ist ein Klon von: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "Treiber ist Ursprungs-Treiber\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "Insgesamt: FUNKTIONIERT NICHT\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "Insgesamt: Nicht emulierter Kopierschutz\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "Insgesamt: Funktioniert\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "Grafik: Fehlerhafte Farben\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "Grafik: Fehlerhaft\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "Grafik: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "Sound: nicht implementiert\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "Sound: Fehlerhaft\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "Sound: OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "Treiber ist ein \"Skelett\": %s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "Spiel ist mechanisch: %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "Benötigt Illustrationen: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "Benötigt klickbare Illustrationen: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "Unterstützt Cocktail-Modus: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "Treiber ist BIOS: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "Unterstützt Speichern: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "Bildschirm-Ausrichtung: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "Vertikal"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "Horizontal"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "Benötigt CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "ROM-Überprüfung: OK\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "ROM-Überprüfung: FEHLERHAFT\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "Samples-Überprüfung: Nicht nötig\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "Samples-Überprüfung: OK\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "Samples-Überprüfung: FEHLERHAFT\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1402,86 +1273,86 @@ msgstr ""
"ROM-Überprüfung: Deaktiviert\n"
"Samples-Überprüfung: Deaktiviert\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "Keine Informationen verfügbar"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "Verwendung"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (Standard)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Dem gewählten Programm fehlen ein oder mehrere benötigte ROM- oder CHD-"
-"Abbilder. Bitte wählen Sie ein anderes Programm aus.\n"
+"Dem gewählten Programm fehlen eine oder mehrere Dateien. Bitte wählen Sie "
+"ein anderes Programm aus.\n"
"\n"
-"Drücken Sie eine beliebige Taste (außer ESC) zum Fortfahren."
+"Drücken Sie eine beliebige Taste, um fortzufahren."
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d Programme )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr "Treiber: \"%1$s\" Softwareliste "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "Region: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "Herausgeber: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "Jahr: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "Softwareliste: %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "Gerätetyp: %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s Suche: %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "Softwareauswahl:"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "BIOS-Auswahl"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1495,33 +1366,33 @@ msgstr ""
" Wenn Sie %2$s zum ersten Mal verwenden, lesen Sie bitte die Datei config."
"txt im Verzeichnis \"docs\" zur Konfiguration von %2$s."
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "Geben Sie den Namen ein oder wählen Sie: %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "Geben Sie den Namen ein oder wählen Sie: (zufällige Auswahl)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr "Treiber: %1$-.100s\n"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "Unvollständig"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr "OK"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "Nicht implementiert"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "Grafik: %s, Sound: %s"
@@ -1530,15 +1401,15 @@ msgstr "Grafik: %s, Sound: %s"
msgid " [internal]"
msgstr " [intern]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "Sound"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "Samplerate"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "Verwende externe Samples"
@@ -1607,12 +1478,12 @@ msgstr "Zurückspulen"
msgid "Fast Forward"
msgstr "Vorspulen"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
"Für diese Maschine müssen Abbilder in die folgenden Geräte eingehängt werden:"
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1620,7 +1491,7 @@ msgstr ""
"Ein oder mehrere ROMs/CHDs für diese Maschine sind nicht korrekt. Eventuell "
"wird die Maschine nicht richtig laufen.\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1628,49 +1499,49 @@ msgstr ""
"Es gibt bekannte Probleme mit dieser Maschine\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
"Ein oder mehrere ROMs/CHDs dieser Maschine wurden nicht korrekt ausgelesen.\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "Die Tastaturemulation könnte nicht 100% korrekt sein.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "Die Farben sind nicht 100% korrekt.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "Die Farben sind völlig falsch.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "Die Videoemulation ist nicht 100% korrekt.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "Die Soundemulation ist nicht 100% korrekt.\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "Der Maschine fehlt die Soundemulation.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "Die Bildschirmdrehung im Cocktailmodus wird nicht unterstützt.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "Die Maschine benötigt externe Illustrationsdateien\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1679,7 +1550,7 @@ msgstr ""
"oder fehlende Elemente aufweisen, die nicht auf Fehler der Emulation "
"zurückzuführen sind.\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1687,13 +1558,13 @@ msgstr ""
"Diese Maschine besitzt keine Sound-Hardware; MAME wird erwartungsgemäß keine "
"Töne ausgeben.\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
"Die Maschine besitzt einen Kopierschutz, der nicht vollständig emuliert "
"ist.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1705,7 +1576,7 @@ msgstr ""
"nicht vollständig. Sie können nur darauf warten, dass die Entwickler die "
"Emulation verbessern.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1717,7 +1588,7 @@ msgstr ""
"echte physische Interaktion voraussetzen oder mechanische Komponenten "
"beinhalten. Es ist nicht möglich, diese Maschine vollständig zu verwenden.\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1727,7 +1598,7 @@ msgstr ""
"\n"
"Es gibt funktionsfähige Klone dieser Maschine: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
@@ -1737,7 +1608,7 @@ msgstr ""
"\n"
"Drücken Sie eine beliebige Taste zum Fortfahren."
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1752,15 +1623,15 @@ msgstr ""
"\n"
"CPU:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1768,7 +1639,7 @@ msgstr ""
"\n"
"Sound:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1776,78 +1647,78 @@ msgstr ""
"\n"
"Video:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "Keine\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "Vektor"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "Status Tastaturemulation"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "Modus: TEILWEISE Emulation"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "Benutzeroberfläche: Aktiviert"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "** Verwenden Sie ScrLock zum Umschalten**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "Modus: VOLLSTÄNDIGE Emulation"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "Benutzeroberfläche: Deaktiviert"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "Dauerfeuer kann nicht aktiviert werden"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "Speicherposition wählen"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "Ladeposition wählen"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "Speichern abgebrochen"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "Laden abgebrochen"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "Speichere an Position %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "Lade von Position %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1860,7 +1731,7 @@ msgstr ""
"Zum Beenden drücken Sie ''%1$s''.\n"
"Um zur Emulation zurückzukehren drücken Sie ''%2$s''."
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "Gesamtlautstärke"
@@ -1869,7 +1740,7 @@ msgstr "Gesamtlautstärke"
msgid "%1$s Volume"
msgstr "%1$s Lautstärke"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "CPU %1$s übertakten"
@@ -1879,154 +1750,154 @@ msgstr "CPU %1$s übertakten"
msgid "%1$s Refresh Rate"
msgstr "%1$s Aktualisierungsrate"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$s Helligkeit"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$s Kontrast"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "%1$s Gamma"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "%1$s Horizontale Streckung"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "%1$s Horizontale Position"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "%1$s Vertikale Streckung"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "%1$s Vertikale Position"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "Laserdisc '%1$s' Horizontale Streckung"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "Laserdisc '%1$s' Horizontale Position"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "Laserdisc '%1$s' Vertikale Streckung"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "Laserdisc '%1$s' Vertikale Position"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "Vektorflimmern"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "Minimale Strahlbreite"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "Maximale Strahlbreite"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "Gewichtung der Strahlintensität"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "Fadenkreuzskalierung %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr "X"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr "Y"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "Fadenkreuzversatz %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr "%1$3ddB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr "%1$.3ffps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "Bildschirm '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "Bildschirm"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "Fadenkreuzskalierung X %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "Fadenkreuzskalierung Y %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "Fadenkreuzversatz X %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "Fadenkreuzversatz Y %1$1.3f"
@@ -2068,14 +1939,132 @@ msgstr "Beschnitten"
msgid "Full"
msgstr "Voll"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " FARBEN"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " STIFTE"
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "Lightgun-Zuordnung"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "Trackball-Zuordnung"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "Pedal-Zuordnung"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "ADStick-Zuordnung"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "Paddle-Zuordnung"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "Wählscheiben-Zuordnung"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "Positionsgeräte-Zuordnung"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "Maus-Zuordnung"
+
+#~ msgid "Device Mapping"
+#~ msgstr "Gerätezuordnung"
+
+#~ msgid "Video Mode"
+#~ msgstr "Videomodus"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "Dreifache Pufferung"
+
+#~ msgid "HLSL"
+#~ msgstr "HLSL"
+
+#~ msgid "GLSL"
+#~ msgstr "GLSL"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Bilineare Filterung"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "Bitmap-Vorskalierung"
+
+#~ msgid "Window Mode"
+#~ msgstr "Fenstermodus"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "Seitenverhältnis erzwingen"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "Maximiert starten"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "Synchronisierter Bildneuaufbau"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "Warten auf vertikalen Synchronisationsimpuls"
+
+#~ msgid "Display Options"
+#~ msgstr "Anzeigeeinstellungen"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Der gewählten Maschine fehlen ein oder mehrere benötigte ROM- oder CHD-"
+#~ "Abbilder. Bitte wählen Sie eine andere Maschine aus.\n"
+#~ "\n"
+#~ "Drücken Sie eine beliebige Taste (außer ESC) zum Fortfahren."
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Dem gewählten Programm fehlen ein oder mehrere benötigte ROM- oder CHD-"
+#~ "Abbilder. Bitte wählen Sie ein anderes Programm aus.\n"
+#~ "\n"
+#~ "Drücken Sie eine beliebige Taste (außer ESC) zum Fortfahren."
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Zuletzt verwendete Maschine erneut auswählen"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Bilder im rechten Bereich vergrößern"
+
+#~ msgid "DATs info"
+#~ msgstr "DAT-Informationen"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Mauszeiger anzeigen"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "Beim Verlassen Bestätigung fordern"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "Informationsbildschirm beim Start überspringen"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "4:3-Ansicht für Bildschirmfoto erzwingen"
+
+#~ msgid "Use image as background"
+#~ msgstr "Bild als Hintergrund verwenden"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "Menü zur BIOS-Auswahl überspringen"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "Menü zur Softwareauswahl überspringen"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "Verschiedene Einstellungen"
+
#~ msgid ""
#~ "Usage of emulators in conjunction with ROMs you don't own is forbidden by "
#~ "copyright law.\n"
diff --git a/language/Greek/strings.po b/language/Greek/strings.po
index 3d3edc71a83..084154c820d 100644
--- a/language/Greek/strings.po
+++ b/language/Greek/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-03-28 15:32+0300\n"
"Last-Translator: Mame.gr\n"
"Language-Team: MAME Language Team\n"
@@ -58,394 +58,355 @@ msgstr "ΕπαναφοÏά Όλων"
msgid "Reload All"
msgstr "ΕπαναφόÏτωση όλων"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "Κατάσταση Autofire"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "ΑπενεÏγοποιημένο"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "ΕνεÏγοποιημένο"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "On"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "Off"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "Δεν βÏέθηκαν κουμπιά σε αυτό το μηχάνημα!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "ΚαθυστέÏηση Autofire"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "Ανάθεση συσκευής Lightgun"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "Ανάθεση συσκευής Trackball"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "Ανάθεση συσκευής Pedal"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "Ανάθεση συσκευής Adstick"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "Ανάθεση συσκευής Paddle"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "Ανάθεση συσκευής Dial"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "Ανάθεση συσκευής θέσης"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "Ανάθεση συσκευής ΠοντικιοÏ"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "Αντιστοίχιση Συσκευής"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "ΚÏÏιο φίλτÏο"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "Άλλο φίλτÏο"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!Κατασκευαστής"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!Έτος"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "ΑφαίÏεση τελευταίου φίλτÏου"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "ΠÏοσθήκη φίλτÏου"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "Επιλογή Ï€ÏοσαÏμοσμένων φίλτÏων:"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!Εκδότης"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!Λίστα ΛογισμικοÏ"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!ΤÏπος συσκευής"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!ΠεÏιοχή"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "ΠÏοβολή όλων"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "ΑπόκÏυψη ΦίλτÏων"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "ΑπόκÏυψη ΠληÏοφοÏίων/Εικόνας"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "ΑπόκÏυψη Όλων"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "ΓÏαμματοσειÏές"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "ΧÏώματα"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "Γλώσσα"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "Εμφάνιση πλευÏικών πάνελ"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "ΠÏοσαÏμοσμένες Ρυθμίσεις UI"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "Ï€Ïοεπιλογή"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "ΓÏαμματοσειÏά UI"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "Έντονα"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "Πλάγια"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "ΓÏαμμές"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "Μέγεθος κειμένου πληÏοφοÏιών"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "Ρυθμίσεις γÏαμματοσειÏών UI"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
"Δείγμα κειμένου - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "Κανονικό κείμενο"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "ΧÏώμα επιλεγμένου"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "Φόντο ÎºÎ±Î½Î¿Î½Î¹ÎºÎ¿Ï ÎºÎµÎ¹Î¼Î­Î½Î¿Ï…"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "ΧÏώμα φόντου επιλεγμένου"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "ΧÏώμα δευτεÏεÏοντος στοιχείου"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "Κλώνος"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "ΠεÏίγÏαμμα"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "Φόντο"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "ΜικÏοδιακόπτης"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "ΧÏώμα μη διαθέσιμου"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "ΧÏώμα Slider"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "Φόντο Gfx Ï€Ïοβολής"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "ΧÏώμα Mouse over"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "ΧÏώμα φόντου Mouse over"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "ΧÏώμα Mouse down"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "ΧÏώμα φόντου Mouse down"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "ΕπαναφοÏά αÏχικών χÏωμάτων"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "Ρυθμίσεις χÏωμάτων UI"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "Κάντε διπλό κλικ ή πατήστε %1$s για να αλλάξετε την τιμή του χÏώματος"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "ΠÏοεπισκόπηση του μενοÏ"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "Κανονικό"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "ΔευτεÏεÏον στοιχείο "
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "Επιλεγμένο"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "Mouse Over"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "Άλφα"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "Κόκκινο"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "ΠÏάσινο"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "Μπλε"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "Επιλέξτε από την παλέτα"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr " - Ρυθμίσεις ARGB"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "ΠÏοεπισκόπηση χÏώματος="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "Λευκό"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "Ασημί"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "ΓκÏίζο"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "ΜαÏÏο"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "ΠοÏτοκαλί"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "ΚίτÏινο"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "Βιολετί"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "ΙστοÏικό ΛογισμικοÏ"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "ΧÏήση λογισμικοÏ"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "ΑναθεώÏηση: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "ΙστοÏία"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "Mameinfo"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "Messinfo"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "Sysinfo"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "Mamescore"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr "Gameinit"
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "Εντολή"
@@ -477,35 +438,35 @@ msgstr "Επιπλέον INIs"
msgid "Icons"
msgstr "Εικονίδια"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "Cheats"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "Στιγμιότυπα"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "Καμπίνες"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "Flyers"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "Τίτλοι"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "ΤεÏματισμοί"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "PCBs"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr "ΜαÏκίζες"
@@ -521,7 +482,7 @@ msgstr "ΣτόχαστÏα"
msgid "Artworks"
msgstr "Artworks"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "ΑÏχηγοί"
@@ -529,7 +490,7 @@ msgstr "ΑÏχηγοί"
msgid "Artworks Preview"
msgstr "ΠÏοεπισκόπηση Artworks"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "Επιλογή"
@@ -537,23 +498,23 @@ msgstr "Επιλογή"
msgid "GameOver"
msgstr "GameOver"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "Πως να"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "Λογότυπα"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "Βαθμολογία"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr "Versus"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "Εξώφυλλα"
@@ -597,132 +558,83 @@ msgstr "Πιέστε το πλήκτÏο TAB για να οÏίσετε"
msgid "Remove %1$s Folder"
msgstr "ΑφαίÏεση Φακέλου %1$s"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "ΛειτουÏγία Βίντεο"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "Triple Buffering"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr "HLSL"
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr "GLSL"
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "Bilinear Filtering"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "Bitmap Prescaling"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "ΛειτουÏγία ΠαÏαθÏÏου"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "Επιβολή Αναλογίας Εικόνας"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "Εκκίνηση Μεγιστοποιημένο"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "ΣυγχÏονισμένη Ανανέωση"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "Αναμονή για Κάθετο ΣυγχÏονισμό"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "Επιλογές ΓÏαφικών"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "Το ΑÏχείο ΥπάÏχει Ήδη - Îα Αντικατασταθεί;"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "Όχι"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "Îαι"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "Îέο Όνομα Εικόνας:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "ΜοÏφή Εικόνας:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "ΔημιουÏγία"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "ΠαÏακαλοÏμε εισάγετε μια επέκταση αÏχείου"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[κενή υποδοχή]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[δημιουÏγία]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[λίστα λογισμικοÏ]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "Επιλέξτε μοÏφή εικόνας"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "Επιλέξτε λειτουÏγία Ï€Ïόσβασης"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "Μόνο για Ανάγνωση"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "Ανάγνωσης-εγγÏαφής"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "Ανάγνωση αυτής της εικόνας, εγγÏαφή σε άλλη"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "Ανάγνωση αυτής της εικόνας, εγγÏαφή σε αÏχείο αλλαγών"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "Δεν μποÏεί να αποθηκευτεί στο Ï„Ïέχων κατάλογο"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -742,7 +654,7 @@ msgstr "ΥποστηÏίζεται μεÏικώς"
msgid "[empty]"
msgstr "[κενό]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "Ψευδο τεÏματικά"
@@ -758,164 +670,168 @@ msgstr "ΠεÏιβάλλον ΧÏήστη"
msgid "Other Controls"
msgstr "Άλλα Στοιχεία Ελέγχου"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "ΕπαναφοÏά"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "ΧειÏισμός (γενικά)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "ΧειÏισμός (Ï„Ïέχων Μηχάνημα)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "Αναλογικά ΧειÏιστήÏια "
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "ΜικÏοδιακόπτες"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "ΠαÏαμετÏοποίηση Μηχανήματος"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "Λογιστικές ΠληÏοφοÏίες"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "ΠληÏοφοÏίες Μηχανήματος"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "ΠληÏοφοÏίες Τίτλου"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "ΔιαχείÏιση ΑÏχείων"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "Έλεγχος Κασσέτας"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "Επιλογή BIOS"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "Συσκευές Υποδοχής"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "Συσκευή Ανάγνωσης ΓÏÎ±Î¼Î¼Ï‰Ï„Î¿Ï ÎšÏŽÎ´Î¹ÎºÎ±"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "Συσκευές ΔικτÏου"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "ΛειτουÏγία ΠληκτÏολογίου"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "Έλεγχος Slider "
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "Επιλογές Βίντεο"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "Επιλογές ΣτόχαστÏου"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "Cheat"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "ΠÏοβολή ΕξωτεÏÎ¹ÎºÎ¿Ï DAT"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "ΠÏοσθήκη Στα Αγαπημένα"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "ΑφαίÏεση Από Τα Αγαπημένα"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "Επιλέξτε Îέο Μηχάνημα"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "Πίνακες Ελέγχου"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "ΠÏοεπισκόπηση Artworks"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "Game Over"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "ΠÏοσθήκη ή αφαίÏεση από τα αγαπημένα"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "Εξαγωγή λίστας σε αÏχείο"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "Εμφάνιση Ï€Ïοβολής DATs"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "ΕπιστÏοφή στο Μηχάνημα"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "Έξοδος"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "ΕπιστÏοφή στο ΠÏοηγοÏμενο ΜενοÏ"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "Αυτόματο"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "Εικόνες"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "ΠληÏοφοÏίες"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "ΛειτουÏγία ΠληκτÏολογίου:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "Φυσικό"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "Εξομοιωμένο"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
@@ -924,7 +840,7 @@ msgstr ""
"ÎÏα λειτουÏγίας: %1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
@@ -933,7 +849,7 @@ msgstr ""
"ÎÏα λειτουÏγίας: %1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -942,154 +858,109 @@ msgstr ""
"ΕισιτήÏια που διανέμονται: %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "ΚέÏμα %1$c: NA%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "ΚέÏμα %1$c: %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (κλειδωμένο)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "ΟÏατή ΚαθυστέÏηση"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "Επιλογή του τελευταίου μηχανήματος που έπαιζε"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "Μεγέθυνση εικόνων στο δεξιό πίνακα"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "ΠληÏοφοÏίες DATs"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "Εμφάνιση δείκτη ποντικιοÏ"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "Επιβεβαίωση εγκατάληψης από μηχάνημα"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "Îα μην εμφανίζεται η οθόνη πληÏοφοÏιών κατά την εκκίνηση"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "Επιβολή 4:3 Εμφάνισης για το στιγμιότυπο"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "ΧÏήση εικόνας ως φόντου"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "ΠαÏάλειψη Î¼ÎµÎ½Î¿Ï ÎµÏ€Î¹Î»Î¿Î³Î®Ï‚ bios"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "ΠαÏάλειψη Î¼ÎµÎ½Î¿Ï ÎµÏ€Î¹Î»Î¿Î³Î®Ï‚ τμημάτων λογισμικοÏ"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "ΔιάφοÏες Επιλογές"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.XML αποθηκεÏτηκε στο φάκελο ui."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "Όνομα: ΠεÏιγÏαφή:\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt αποθηκεÏτηκε στο φάκελο ui."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "Εξαγωγή σε μοÏφή XML (όπως -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "Εξαγωγή σε μοÏφή XML TXT(όπως -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr "Dummy"
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "Αποθήκευση παÏαμετÏοποίησης μηχανήματος"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "ΠÏόσθετα"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "ΦίλτÏο"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr " ^!ΑÏχείο"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!ΚατηγοÏία"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!ΡÏθμιση Ï€ÏοσαÏμοσμένου φίλτÏου"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "ΠÏοσαÏμογή UI"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "ΡÏθμιση Φακέλων"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "Επιλογές Ήχου"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "Γενικός ΧειÏισμός"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "Αποθήκευση Ρυθμίσεων"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "Ρυθμίσεις"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**Σφάλμα αποθήκευσης ui.ini**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**Σφάλμα αποθήκευσης %s.ini**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1099,20 +970,20 @@ msgstr ""
" Οι Ïυθμίσεις αποθηκεÏτηκαν \n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "Λίστα Επιλογής- Αναζήτηση: "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "Κάντε διπλό κλικ ή πατήστε %1$s για να επιλέξετε"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "Γενικές ΠληÏοφοÏίες"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1121,8 +992,8 @@ msgstr ""
"%s\n"
" Ï€Ïοστέθηκε στη λίστα αγαπημένων."
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
@@ -1131,268 +1002,264 @@ msgstr ""
"%s\n"
" αφαιÏέθηκε από τη λίστα αγαπημένων."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Στο επιλεγμένο μηχάνημα λείπει μία ή πεÏισσότεÏες ROMs ή εικόνες CHD. "
-"ΠαÏακαλοÏμε επιλέξτε ένα άλλο μηχάνημα.\n"
-"\n"
-"Πιέστε οποιοδήποτε πλήκτÏο (εκτός από το ESC) για να συνεχίσετε."
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "ΡÏθμιση Επιλογών"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d μηχανήματα (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr "%1$s (%2$s - %3$s) - "
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s Αναζήτηση: %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "Romset: %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr "%1$s, %2$-.100s"
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "Ο Οδηγός είναι κλώνος του: %1$-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "Ο Οδηγός είναι γονικός"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "Συνολικά: ΔΕΠΛΕΙΤΟΥΡΓΕΙ"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "Συνολικά: ΠÏοστασία Μη Εξομοιωμένη"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "Συνολικά: ΛειτουÏγεί"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "ΓÏαφικά: Ατελή, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "ΓÏαφικά: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "Ήχος: Δεν Έχει Υλοποιηθεί"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "Ήχος: Ατελής"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "Ήχος: OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "ΣÏστημα: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "Το Λογισμικό είναι κλώνος του: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "Το λογισμικό είναι γονικό"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "ΥποστηÏίζεται: Όχι"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "ΥποστηÏίζεται: ΜεÏικώς"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "ΥποστηÏίζεται: Îαι"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "romset: %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr "%1$s %2$s"
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "Romset: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "Έτος: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "Κατασκευαστής: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "Ο Οδηγός είναι Κλώνος του: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "Ο Οδηγός είναι Γονικός\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "Συνολικά: ΔΕΠΛΕΙΤΟΥΡΓΕΙ\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "Συνολικά: ΠÏοστασία Μη Εξομοιωμένη\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "Συνολικά: ΛειτουÏγεί\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "ΓÏαφικά: Ατελή ΧÏώματα\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "ΓÏαφικά: Ατελή\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "ΓÏαφικά: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "Ήχος: Δεν Έχει Υλοποιηθεί\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "Ήχος: Ατελής\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "Ήχος: OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "Ο Οδηγός είναι Σκελετός: %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "Το παιχνίδι είναι Μηχανικό: %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "Απαιτεί Artwork: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "Απαιτεί Artwork για κλικ: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "ΥποστήÏιξη Κοκτέιλ: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "Ο Οδηγός είναι Bios: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "ΥποστηÏίζει Αποθήκευση: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "ΠÏοσανατολισμός Οθόνης: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "Κάθετος"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "ΟÏιζόντιος"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "Απαιτεί CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "Έλεγχος ROMs: OK\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "Έλεγχος ROMs: Λάθος\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "Έλεγχος Δειγμάτων Ήχου: Δεν απαιτείται\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "Έλεγχος Δειγμάτων Ήχου: OK\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "Έλεγχος Δειγμάτων Ήχου: Λάθος\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1400,86 +1267,82 @@ msgstr ""
"Έλεγχος ROMs: ΑπενεÏγοποιημένος\n"
"Έλεγχος Δειγμάτων Ήχου: ΑπενεÏγοποιημένος\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "Καμία διαθέσιμη πληÏοφοÏία"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "ΧÏήση"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (Ï€Ïοεπιλογή)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Στο επιλεγμένο λογισμικό λείπει μία ή πεÏισσότεÏες ROMs ή εικόνες CHD. "
-"ΠαÏακαλοÏμε επιλέξτε ένα άλλο λογισμικό.\n"
-"\n"
-"Πιέστε οποιοδήποτε πλήκτÏο (εκτός από το ESC) για να συνεχίσετε."
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d λογισμικό )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr "Οδηγός: \"%1$s\" λίστα Î»Î¿Î³Î¹ÏƒÎ¼Î¹ÎºÎ¿Ï "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "ΠεÏιοχή: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "Εκδότης: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "Έτος: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "Λίστα ΛογισμικοÏ: %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "ΤÏπος συσκευής: %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s Αναζήτηση: %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "Επιλογή τμημάτων λογισμικοÏ:"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "Επιλογή BIOS:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1494,33 +1357,33 @@ msgstr ""
"αÏχείο config.txt στον κατάλογο docs για πληÏοφοÏίες σχετικά με τη "
"διαμόÏφωση %2$s.."
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "ΠληκτÏολογήστε όνομα ή επιλέξτε: %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "ΠληκτÏολογήστε όνομα ή επιλέξτε: (τυχαίο)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr "Οδηγός: %1$-.100s"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "Ατελής"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr "OK"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "Δεν έχει υλοποιηθεί"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "Gfx: %s, Ήχος: %s"
@@ -1529,15 +1392,15 @@ msgstr "Gfx: %s, Ήχος: %s"
msgid " [internal]"
msgstr " [εσωτεÏικό]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "Ήχος"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "Ρυθμός Δειγματοληψίας"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "ΧÏήση ΕξωτεÏικών Δειγμάτων Ήχου"
@@ -1606,12 +1469,12 @@ msgstr "ΕπαναφοÏά"
msgid "Fast Forward"
msgstr "ΓÏήγοÏη ΠÏοώθηση"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
"Αυτός ο οδηγός απαιτεί εικόνες να φοÏτωθοÏν στην ακόλουθη συσκευή (ες): "
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1619,7 +1482,7 @@ msgstr ""
"Μία ή πεÏισσότεÏες ROMs/CHDs για αυτό το μηχάνημα είναι εσφαλμένες. Το "
"μηχάνημα μποÏεί να μην εκτελείται σωστά.\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1627,51 +1490,51 @@ msgstr ""
"ΥπάÏχουν γνωστά Ï€Ïοβλήματα με αυτό το μηχάνημα\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
"Μία ή πεÏισσότεÏες ROMs/CHDs για αυτό το μηχάνημα δεν έχουν γίνει dump "
"σωστά.\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "Η εξομοίωση πληκτÏολογίου δεν είναι σωστή 100%.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "Τα χÏώματα δεν είναι σωστά 100%.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "Τα χÏώματα είναι εντελώς λάθος.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "Η εξομοίωση βίντεο δεν είναι σωστή 100%.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "Η εξομοίωση ήχου δεν είναι σωστή 100%.\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "Το μηχάνημα δεν έχει ήχο.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
"Το αναποδογÏÏισμα της οθόνης σε κοκτέιλ λειτουÏγία δεν υποστηÏίζεται.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "Το μηχάνημα απαιτεί εξωτεÏικό αÏχείο Artwork\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1679,7 +1542,7 @@ msgstr ""
"Αυτό το μηχάνημα δεν ολοκληÏώθηκε ποτέ. Αυτό μποÏεί να εμφανίσει ασυνήθιστη "
"συμπεÏιφοÏά ή στοιχεία να λείπουν που δεν είναι σφάλματα στην εξομοίωση.\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1687,12 +1550,12 @@ msgstr ""
"Αυτό το μηχάνημα δεν έχει κανένα υλικό ήχου, το MAME δεν θα παÏάγει κανένα "
"ήχο, αυτή είναι αναμενόμενη συμπεÏιφοÏά.\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
"Αυτό το μηχάνημα έχει Ï€Ïοστασία η οποία δεν είναι πλήÏως εξομοιωμένη.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1705,7 +1568,7 @@ msgstr ""
"αυτό το Ï€Ïόβλημα εκτός από την αναμονή για τους Ï€ÏογÏαμματιστές να "
"βελτιώσουν την εξομοίωση.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1717,7 +1580,7 @@ msgstr ""
"καθώς απαιτείται Ï€Ïαγματική φυσική αλληλεπίδÏαση ή αποτελείται από μηχανικές "
"συσκευές. Δεν είναι δυνατόν να παιχτεί πλήÏως αυτό το μηχάνημα.\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1727,7 +1590,7 @@ msgstr ""
"\n"
"ΥπάÏχουν κλώνοι Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… μηχανήματος που λειτουÏγοÏν: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
@@ -1737,7 +1600,7 @@ msgstr ""
"\n"
"Πιέστε ένα πλήκτÏο για συνέχεια"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1752,15 +1615,15 @@ msgstr ""
"\n"
"CPU:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1768,7 +1631,7 @@ msgstr ""
"\n"
"Ήχος:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1776,78 +1639,78 @@ msgstr ""
"\n"
"Βίντεο:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "Κανένα\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "Διάνυσμα"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "Κατάσταση Εξομοίωσης ΠληκτÏολογίου"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "ΛειτουÏγία: ΜΕΡΙΚΗ Εξομοίωση"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "UI: ΕνεÏγοποιημένο"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**ΧÏήση ScrLock να εναλλαγή**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "ΛειτουÏγία: ΠΛΗΡΗΣ Εξομοίωση"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "UI: ΑπενεÏγοποιημένο"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "Δεν μποÏεί να ενεÏγοποιηθεί το Autofire"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "Επιλέξτε τη θέση για αποθήκευση σε"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "Επιλέξτε τη θέση φόÏτωσης από"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "Η αποθήκευση ακυÏώθηκε"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "Η φόÏτωση ακυÏώθηκε"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "Αποθήκευση σε θέση %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "ΦόÏτωση από θέση %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1860,7 +1723,7 @@ msgstr ""
"Πατήστε ''%1$s'' για να εγκαταλείψετε,\n"
"Πατήστε ''%2$s'' για να επιστÏέψετε στην εξομοίωση."
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "ΚÏÏια Ένταση"
@@ -1869,7 +1732,7 @@ msgstr "ΚÏÏια Ένταση"
msgid "%1$s Volume"
msgstr "%1$s Ένταση"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "ΥπεÏχÏονισμός CPU %1$s"
@@ -1879,154 +1742,154 @@ msgstr "ΥπεÏχÏονισμός CPU %1$s"
msgid "%1$s Refresh Rate"
msgstr "%1$s Ρυθμός Ανανέωσης"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$s Φωτεινότητα"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$s Αντίθεση"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "%1$s Γάμμα"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "%1$s ΟÏιζόντια Επέκταση"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "%1$s ΟÏιζόντια Θέση"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "%1$s Κάθετη Επέκταση"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "%1$s Κάθετη Θέση"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "Laserdisc '%1$s' ΟÏιζόντια Επέκταση"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "Laserdisc '%1$s' ΟÏιζόντια Θέση"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "Laserdisc '%1$s' Κάθετη Επέκταση"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "Laserdisc '%1$s' Κάθετη Θέση"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "ΤÏεμόπαιγμα ΔιανÏσματος"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "Ελάχιστο Πλάτος Ακτινών"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "Μέγιστο Πλάτος Ακτινών"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "ΒάÏος Έντασης Ακτίνας"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "Κλίμακα ΣτόχαστÏου %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr "X"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr "Y"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "Μετατόπιση ΣτοχάστÏου %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr "%1$3ddB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr "%1$.3ffps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "Οθόνη '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "Οθόνη"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "Κλίμακα ΣτόχαστÏου X %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "Κλίμακα ΣτόχαστÏου Y %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "Μετατόπιση ΣτοχάστÏου X %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "Μετατόπιση ΣτοχάστÏου Y %1$1.3f"
@@ -2068,10 +1931,128 @@ msgstr "ΠεÏικοπή"
msgid "Full"
msgstr "ΠλήÏες"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " ΧΡΩΜΑΤΑ"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " ΓΡΑΦΙΔΕΣ"
+
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "Ανάθεση συσκευής Lightgun"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "Ανάθεση συσκευής Trackball"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "Ανάθεση συσκευής Pedal"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "Ανάθεση συσκευής Adstick"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "Ανάθεση συσκευής Paddle"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "Ανάθεση συσκευής Dial"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "Ανάθεση συσκευής θέσης"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "Ανάθεση συσκευής ΠοντικιοÏ"
+
+#~ msgid "Device Mapping"
+#~ msgstr "Αντιστοίχιση Συσκευής"
+
+#~ msgid "Video Mode"
+#~ msgstr "ΛειτουÏγία Βίντεο"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "Triple Buffering"
+
+#~ msgid "HLSL"
+#~ msgstr "HLSL"
+
+#~ msgid "GLSL"
+#~ msgstr "GLSL"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Bilinear Filtering"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "Bitmap Prescaling"
+
+#~ msgid "Window Mode"
+#~ msgstr "ΛειτουÏγία ΠαÏαθÏÏου"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "Επιβολή Αναλογίας Εικόνας"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "Εκκίνηση Μεγιστοποιημένο"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "ΣυγχÏονισμένη Ανανέωση"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "Αναμονή για Κάθετο ΣυγχÏονισμό"
+
+#~ msgid "Display Options"
+#~ msgstr "Επιλογές ΓÏαφικών"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Στο επιλεγμένο μηχάνημα λείπει μία ή πεÏισσότεÏες ROMs ή εικόνες CHD. "
+#~ "ΠαÏακαλοÏμε επιλέξτε ένα άλλο μηχάνημα.\n"
+#~ "\n"
+#~ "Πιέστε οποιοδήποτε πλήκτÏο (εκτός από το ESC) για να συνεχίσετε."
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Στο επιλεγμένο λογισμικό λείπει μία ή πεÏισσότεÏες ROMs ή εικόνες CHD. "
+#~ "ΠαÏακαλοÏμε επιλέξτε ένα άλλο λογισμικό.\n"
+#~ "\n"
+#~ "Πιέστε οποιοδήποτε πλήκτÏο (εκτός από το ESC) για να συνεχίσετε."
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Επιλογή του τελευταίου μηχανήματος που έπαιζε"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Μεγέθυνση εικόνων στο δεξιό πίνακα"
+
+#~ msgid "DATs info"
+#~ msgstr "ΠληÏοφοÏίες DATs"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Εμφάνιση δείκτη ποντικιοÏ"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "Επιβεβαίωση εγκατάληψης από μηχάνημα"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "Îα μην εμφανίζεται η οθόνη πληÏοφοÏιών κατά την εκκίνηση"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "Επιβολή 4:3 Εμφάνισης για το στιγμιότυπο"
+
+#~ msgid "Use image as background"
+#~ msgstr "ΧÏήση εικόνας ως φόντου"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "ΠαÏάλειψη Î¼ÎµÎ½Î¿Ï ÎµÏ€Î¹Î»Î¿Î³Î®Ï‚ bios"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "ΠαÏάλειψη Î¼ÎµÎ½Î¿Ï ÎµÏ€Î¹Î»Î¿Î³Î®Ï‚ τμημάτων λογισμικοÏ"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "ΔιάφοÏες Επιλογές"
diff --git a/language/Hebrew/strings.po b/language/Hebrew/strings.po
index 8f0a4e9ceb4..8ed4ffd182e 100644
--- a/language/Hebrew/strings.po
+++ b/language/Hebrew/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -56,393 +56,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -474,35 +435,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -518,7 +479,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,7 +487,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -534,23 +495,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -594,132 +555,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -737,7 +649,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -753,705 +665,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,33 +1331,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1495,15 +1366,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1572,80 +1443,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1524,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1532,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1556,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1656,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1665,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1675,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1993,10 +1864,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Hindi/strings.po b/language/Hindi/strings.po
index 39e376a59fd..a7e5e7c1804 100644
--- a/language/Hindi/strings.po
+++ b/language/Hindi/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Hungarian/strings.po b/language/Hungarian/strings.po
index df2290c9552..75ed66915bc 100644
--- a/language/Hungarian/strings.po
+++ b/language/Hungarian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -56,393 +56,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -474,35 +435,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -518,7 +479,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,7 +487,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -534,23 +495,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -594,132 +555,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -737,7 +649,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -753,705 +665,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,33 +1331,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1495,15 +1366,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1572,80 +1443,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1524,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1532,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1556,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1656,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1665,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1675,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1993,10 +1864,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Indonesian/strings.po b/language/Indonesian/strings.po
index 6fe83a37672..0ffdd1a4431 100644
--- a/language/Indonesian/strings.po
+++ b/language/Indonesian/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -56,393 +56,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -474,35 +435,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -518,7 +479,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,7 +487,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -534,23 +495,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -594,132 +555,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -737,7 +649,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -753,705 +665,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,33 +1331,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1495,15 +1366,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1572,80 +1443,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1524,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1532,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1556,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1656,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1665,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1675,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1993,10 +1864,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Italian/strings.po b/language/Italian/strings.po
index 9700372d8e6..406b24e78e9 100644
--- a/language/Italian/strings.po
+++ b/language/Italian/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Angelo Salese,Antonio Paradossi,Fabio Priuli\n"
"Language-Team: MAME Language Team\n"
@@ -59,393 +59,355 @@ msgstr "Ripristina Tutto"
msgid "Reload All"
msgstr "Ricarica Tutto"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "Stato Autofire"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "Disabilitato"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "Abilitato"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "Attivo"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "Non Attivo"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "Nessun tasto/pulsante trovato per questa macchina!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "Ritardo Autofire"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "Assegnazione Dispositivo Lightgun"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "Assegnazione Dispositivo Trackball"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "Assegnazione Dispositivo Pedaliera"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "Assegnazione Dispositivo Adstick"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "Assegnazione Dispositivo Paddle"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "Assegnazione Dispositivo Dial"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "Assegnazione Dispositivo Posizionale"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "Assegnazione Dispositivo Mouse"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "Mappatura Dispositivo"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "Filtro principale"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "Altri filtri"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!Produttore"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!Anno"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "Rimuovi ultimo filtro"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "Aggiungi filtro"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "Seleziona filtro personalizzato:"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!Editore"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!Lista Software"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!Tipo Dispositivo"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!Regione"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "Mostra Tutti"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "Nascondi Filtri"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "Nascondi Info/Immagine"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "Nascondi Entrambi"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "Font"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "Colori"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "Lingua"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "Mostra pannelli laterali"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "Impostazioni UI Personalizzate"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "predefinito"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "Font UI"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "Grassetto"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "Corsivo"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "Linee"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "Dimensione testo info"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "Impostazioni Font UI"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-msgstr "Testo di esempio - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
+msgstr ""
+"Testo di esempio - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "Testo normale"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "Colore selezionato"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "Sfondo testo normale"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "Colore sfondo selezionato"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "Colore opzione menu"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "Bordo"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "Sfondo"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "Dip-Switch"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "Colore non disponibile"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "Colore cursore"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "Sfondo visualizzatore Gfx"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "Colore mouse over"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "Colore sfondo mouse over"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "Colore mouse down"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "Colore sfondo mouse down"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "Ripristina colori originali"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "Impostazione Colori UI"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "Doppio click o premi %1$s per cambiare colore"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "Anteprima Menu"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "Normale"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "Opzione menu"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "Selezionato"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "Alfa"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "Rosso"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "Verde"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "Blu"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "Seleziona dalla tavolozza"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr " - Impostazioni ARGB"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "Anteprima colore ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "Bianco"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "Argento"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "Grigio"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "Nero"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "Arancio"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "Giallo"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "Viola"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "History Software"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "Utilizzo Software"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "Revisione: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -477,35 +439,35 @@ msgstr "INI Aggiuntivi"
msgid "Icons"
msgstr "Icone"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "Cheat"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "PCB"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -521,7 +483,7 @@ msgstr "Puntatori"
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -529,7 +491,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -537,23 +499,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "Logo"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -597,151 +559,103 @@ msgstr "Premi TAB per impostare"
msgid "Remove %1$s Folder"
msgstr "Rimuovi Cartella %1$sr"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "Modalità Video"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "Triplo Buffering"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "Filtro Bilineare"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "Modalità a Finestra"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "Forza Proporzioni Video"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "Avvia Massimizzato"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "Aggiornamento Sincronizzato"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "Attendi la Sincronizzazione Verticale"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "Opzioni Display"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "File Già Esistente - Sovrascrivo?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "Si"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "Nuovo Nome Immagine:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "Formato Immagine:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "Crea"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "Inserisci anche l'estensione"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[slot vuoto]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[crea]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[lista software]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "Seleziona formato immagine"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "Selezione modalità di accesso"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "Sola-Lettura"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "Lettura-Scrittura"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "Leggi da questo file, scrivi su un altro"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "Leggi da questo file, scrivi su diff"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "Non posso salvare in questa cartella"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
-msgstr "Nel software selezionato mancano una o più ROM o immagini CHD. "
-"Selezionane un'altra."
+msgstr ""
+"Nel software selezionato mancano una o più ROM o immagini CHD. Selezionane "
+"un'altra."
#: src/emu/ui/info.cpp:98
-msgid "Not Supported"
-msgstr "Non Supportato"
+msgid "Not supported"
+msgstr ""
#: src/emu/ui/info.cpp:101
-msgid "Partially Supported"
-msgstr "Parzialmente Supportato"
+msgid "Partially supported"
+msgstr ""
#: src/emu/ui/info.cpp:109
msgid "[empty]"
msgstr "[vuoto]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "Pseudo terminali"
@@ -757,180 +671,186 @@ msgstr "Interfaccia Utente"
msgid "Other Controls"
msgstr "Altri Controlli"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "Azzera"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "Input (generali)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "Input (questa Macchina)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "Controlli Analogici"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "Dip-Switch"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "Configurazione Macchina"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "Info Crediti e Tempi d'Utilizzo"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "Informazioni Macchina"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "Informazioni Software"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "Controllo Cassetta"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "Selezione BIOS"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "Slot"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "Lettore Codice a Barre"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "Dispositivi di Rete"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "Modalità Tastiera"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "Regolazione Cursori"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "Opzioni Video"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "Opzioni Puntamento"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "Visualizza DAT Aggiuntivi"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "Aggiungi ai Preferiti"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "Rimuovi dai Preferiti"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "Seleziona Nuova Macchina"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "Aggiungi o rimuovi preferiti"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "Esporta la lista visualizzata in un file"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "Mostra viste DAT"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "Ritorna alla Macchina"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "Esci"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "Torna al Menu Precedente"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "Immagini"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "Informazioni"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "Modalità Tastiera:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "Naturale"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "Emulata"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
-msgstr "Tempo di utilizzo: %1$d:%2$02d:%3$02d\n"
+msgstr ""
+"Tempo di utilizzo: %1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
-msgstr "Tempo di utilizzo: %1$d:%2$02d\n"
+msgstr ""
+"Tempo di utilizzo: %1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -939,154 +859,109 @@ msgstr ""
"Biglietti emessi: %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (bloccati)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "Ritardo Visibilità"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "Riseleziona l'ultima macchina emulata"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "Ingrandisci immagini nel pannello di destra"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "Info DAT"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "Mostra puntatore mouse"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "Confermi l'uscita"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "Non mostrare le schermate informative all'avvio"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "Forza rapporto 4:3 per le schermate"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "Usa immagine come sfondo"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "Non mostrare il menu di selezione BIOS"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "Non mostrare il menu di selezione del software"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "Opzioni Varie"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xml salvato nella cartella UI."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "Nome: Descrizione:\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt salvato nella cartella UI."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "Esporta in formato XML (come -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "Esporta in formato TXT (come -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr "Fittizio"
-#: src/emu/ui/miscmenu.cpp:856
-msgid "Save Machine Configuration"
-msgstr "Salva Configurazione Macchina"
+#: src/emu/ui/miscmenu.cpp:736
+msgid "Save machine configuration"
+msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "Plugin"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "Filtri"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!Categoria"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!Configura filtri personali"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "Personalizza UI"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "Configura Cartelle"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "Opzioni Audio"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "Input Generali"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "Salva Configurazione"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "Impostazioni"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**Errore nel salvataggio del file ui.ini**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**Errore nel salvataggio del file %s.ini**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1096,20 +971,20 @@ msgstr ""
" Configurazione salvata \n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "Lista Selezione - Cerca: "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "Doppio click o premi %1$s per selezionare"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "Informazioni Generali"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1118,8 +993,8 @@ msgstr ""
"%s\n"
" aggiunto ai preferiti."
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
@@ -1128,268 +1003,264 @@ msgstr ""
"%s\n"
" rimosso dai preferiti."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Nella macchina selezionata mancano uno o più file ROM o CHD. "
-"Seleziona un'altra macchina.\n"
-"\n"
-"Premi un tasto (tranne ESC) per continuare."
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "Configura Opzioni"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d macchine (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s Cerca: %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "Il Driver è un clone di: %-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
-msgid "Driver is parent\n"
-msgstr "Il Driver è un Parent\n"
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
+msgid "Driver is parent"
+msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "Complessivamente: NON FUNZIONANTE"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "Complessivamente: Protezione Non Emulata"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "Complessivamente: Funzionante"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "Grafica: Non Perfetta, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "Grafica: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "Audio: Non Implementato"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "Audio: Non Perfetto"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "Audio: OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "Sistema: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "Il software è clone di: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "Il software è parent"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "Supportato: No"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "Supportato: Parzialmente"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "Supportato: Si"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "Anno: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "Produttore: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "Il Driver è un Clone di: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "Il Driver è un Parent\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "Complessivamente: NON FUNZIONANTE\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "Complessivamente: Protezione Non Emulata\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "Complessivamente: Funzionante\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "Grafica: Colori Non Perfetti\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "Grafica: Non Perfetta\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "Grafica: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "Audio: Non Implementato\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "Audio: Non Perfetto\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "Audio: OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "Il Driver è Skeleton: %s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "Il gioco è Meccanico: %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "Richiede Artwork: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "Richiede Artwork Cliccabile: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "Supporta Modalità Cocktail: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "Il Driver è un Bios: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "Salvataggio Supportato: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "Orientamento Schermo: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "Verticale"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "Orizzontale"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "Richiede CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "Esito Audit Rom: OK\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "Esito Audit Rom: BAD\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "Esito Audit Sample: Non Necessario\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "Esito Audit Sample: OK\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "Esito Audit Sample: BAD\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1397,86 +1268,82 @@ msgstr ""
"Esito Audit Rom: Disabilitato\n"
"Esito Audit Sample: Disabilitato\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "Nessuna Informazione Disponibile"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "Utilizzo"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (predefinito)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Nel software selezionato mancano uno o più file. Seleziona un "
-"software differente.\n"
-"\n"
-"Premi un tasto (escluso ESC) per proseguire."
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d software )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "Regione: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "Editore: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "Anno: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "Lista Software: %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "Tipo di Dispositivo: %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s Cerca: %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "Selezione parte software:"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "Selezione BIOS:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1490,33 +1357,33 @@ msgstr ""
"Se questa è la prima volta che usi %2$s, si prega di consultare il file "
"config.txt nella cartella docs per le informazioni sulla configurazine %2$s."
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "Digita il nome o seleziona: %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "Digita il nome o seleziona: (casuale)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "Non Perfetto"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "Non Implementato"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "Gfx: %s, Audio: %s"
@@ -1525,15 +1392,15 @@ msgstr "Gfx: %s, Audio: %s"
msgid " [internal]"
msgstr " [interno]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "Audio"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "Frequenza di Campionamento"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "Usa Sample Aggiuntivi"
@@ -1602,12 +1469,12 @@ msgstr ""
msgid "Fast Forward"
msgstr "Avanti Veloce"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
"Questo driver richiede software caricato nel(i) dispositivo(i) seguente(i): "
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1615,7 +1482,7 @@ msgstr ""
"Uno o più ROM/CHD per questa macchina non sono corretti. La macchina "
"potrebbe non funzionare correttamente.\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1623,48 +1490,48 @@ msgstr ""
"Ci sono problemi noti per questa macchina\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr "Uno o più ROM/CHD per questa macchina non è dumpato correttamente.\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "L'emulazione della tastiera potrebbe non essere corretta al 100%.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "I colori non sono corretti al 100%.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "I colori sono completamente sbagliati.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "L'emulazione video non è corretta al 100%.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "L'emulazione audio non è corretta al 100%.\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "La macchina non ha audio.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "L'inversione dello schermo in modalità cocktail non è supportata.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "La macchina richiede file di artwork extra\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1672,7 +1539,7 @@ msgstr ""
"Questa macchina non è mai stata completata. Potrebbe mostrare comportamenti "
"strani o elementi mancanti che non sono bug nell'emulazione.\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1680,11 +1547,11 @@ msgstr ""
"Questa macchina non ha alcun componente audio, MAME non produrrà alcun suono "
"e questo è il comportamento atteso e non un bug.\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr "La macchina ha delle protezioni che non sono emulate completamente.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1696,7 +1563,7 @@ msgstr ""
"completa. Non c'è nulla che tu possa fare per risolvere questo problema "
"eccetto aspettare che gli sviluppatori migliorino l'emulazione.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1708,7 +1575,7 @@ msgstr ""
"richiedono interazioni fisiche oppure dispositivi meccanici. Non è possibile "
"giocare in maniera completa con questa macchina.\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1718,7 +1585,7 @@ msgstr ""
"\n"
"Ci sono cloni funzionanti di questa macchina: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
@@ -1728,7 +1595,7 @@ msgstr ""
"\n"
"Premi un tasto per proseguire"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1738,15 +1605,15 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1754,7 +1621,7 @@ msgstr ""
"\n"
"Audio:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1762,78 +1629,78 @@ msgstr ""
"\n"
"Video:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "Nessuno\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "Vettoriale"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "Stato Emulazione Tastiera"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "Modalità: Emulazione PARZIALE"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "UI: Abilitato"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**Usa ScrLock per cambiare**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "Modalità: Emulazione COMPLETA"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "UI: Disabilitato"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "Autofire non può essere abilitato"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "Seleziona la posizione in cui salvare"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "Seleziona la posizione da cui caricare"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "Salvataggio annullato"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "Caricamento annullato"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "Salva in %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "Carica da %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1846,7 +1713,7 @@ msgstr ""
"Premi ''%1$s'' per uscire,\n"
"Premi ''%2$s'' per contrinuare l'emulazione."
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "Volume Principale"
@@ -1855,7 +1722,7 @@ msgstr "Volume Principale"
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1865,154 +1732,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr "%1$s Frequenza di aggiornamento"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$s Luminosità"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$s Contrasto"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "%1$s Allungamento Orizzontale"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "%1$s Posizione Orizzontale"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "%1$s Allungamento Verticale"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "%1$s Posizione Verticale"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "Laserdisc '%1$s' Allungamento Orizzontale"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "Laserdisc '%1$s' Posizione Orizzontale"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "Laserdisc '%1$s' Allungamento Verticale"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "Laserdisc '%1$s' Posizione Verticale"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "Larghezza Minima del Raggio"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "Larghezza Massima del Raggio"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "Peso intensità del Raggio"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "Scala del Puntatore %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "Offset del Puntatore %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "Schermo '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "Schermo"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "Scala del Puntatore X %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "Scala del Puntatore Y %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "Offset del Puntatore X %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "Offset del Puntatore Y %1$1.3f"
@@ -2054,14 +1921,135 @@ msgstr "Tagliata"
msgid "Full"
msgstr "Completa"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " COLORI"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " PEN"
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "Assegnazione Dispositivo Lightgun"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "Assegnazione Dispositivo Trackball"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "Assegnazione Dispositivo Pedaliera"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "Assegnazione Dispositivo Adstick"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "Assegnazione Dispositivo Paddle"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "Assegnazione Dispositivo Dial"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "Assegnazione Dispositivo Posizionale"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "Assegnazione Dispositivo Mouse"
+
+#~ msgid "Device Mapping"
+#~ msgstr "Mappatura Dispositivo"
+
+#~ msgid "Video Mode"
+#~ msgstr "Modalità Video"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "Triplo Buffering"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Filtro Bilineare"
+
+#~ msgid "Window Mode"
+#~ msgstr "Modalità a Finestra"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "Forza Proporzioni Video"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "Avvia Massimizzato"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "Aggiornamento Sincronizzato"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "Attendi la Sincronizzazione Verticale"
+
+#~ msgid "Display Options"
+#~ msgstr "Opzioni Display"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Nella macchina selezionata mancano uno o più file ROM o CHD. Seleziona "
+#~ "un'altra macchina.\n"
+#~ "\n"
+#~ "Premi un tasto (tranne ESC) per continuare."
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Nel software selezionato mancano uno o più file. Seleziona un software "
+#~ "differente.\n"
+#~ "\n"
+#~ "Premi un tasto (escluso ESC) per proseguire."
+
+#~ msgid "Not Supported"
+#~ msgstr "Non Supportato"
+
+#~ msgid "Partially Supported"
+#~ msgstr "Parzialmente Supportato"
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Riseleziona l'ultima macchina emulata"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Ingrandisci immagini nel pannello di destra"
+
+#~ msgid "DATs info"
+#~ msgstr "Info DAT"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Mostra puntatore mouse"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "Confermi l'uscita"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "Non mostrare le schermate informative all'avvio"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "Forza rapporto 4:3 per le schermate"
+
+#~ msgid "Use image as background"
+#~ msgstr "Usa immagine come sfondo"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "Non mostrare il menu di selezione BIOS"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "Non mostrare il menu di selezione del software"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "Opzioni Varie"
+
+#~ msgid "Save Machine Configuration"
+#~ msgstr "Salva Configurazione Macchina"
+
+#~ msgid "Driver is parent\n"
+#~ msgstr "Il Driver è un Parent\n"
+
#~ msgid ""
#~ "Usage of emulators in conjunction with ROMs you don't own is forbidden by "
#~ "copyright law.\n"
@@ -2071,8 +2059,8 @@ msgstr " PEN"
#~ "\n"
#~ "Otherwise, type OK or move the joystick left then right to continue"
#~ msgstr ""
-#~ "L'utilizzo di emulatori combinati con ROM che non possiedi è proibito dalle "
-#~ "leggi sul diritto d'autore.\n"
+#~ "L'utilizzo di emulatori combinati con ROM che non possiedi è proibito "
+#~ "dalle leggi sul diritto d'autore.\n"
#~ "\n"
#~ "SE NON SEI LEGALMENTE AUTORIZZATO A GIOCARE \"%1$s\" CON QUESTO "
#~ "EMULATORE, PREMI ESC.\n"
@@ -2131,8 +2119,8 @@ msgstr " PEN"
#~ "copyright law.\n"
#~ "\n"
#~ msgstr ""
-#~ "L'utilizzo di emulatori combinati con ROM che non possiedi è proibito dalle "
-#~ "leggi sul diritto d'autore.\n"
+#~ "L'utilizzo di emulatori combinati con ROM che non possiedi è proibito "
+#~ "dalle leggi sul diritto d'autore.\n"
#~ "\n"
#~ msgid ""
diff --git a/language/Japanese/strings.po b/language/Japanese/strings.po
index a624275611e..23b174e9043 100644
--- a/language/Japanese/strings.po
+++ b/language/Japanese/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-23 01:39+0900\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -59,394 +59,355 @@ msgstr "å…¨ã¦ãƒªã‚»ãƒƒãƒˆ"
msgid "Reload All"
msgstr "å…¨ã¦å†èª­ã¿è¾¼ã¿"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "連射設定ステータス"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "無効"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "有効"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "オン"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "オフ"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "ã“ã®ãƒžã‚·ãƒ³ã«ã¯ãƒœã‚¿ãƒ³ãŒã‚りã¾ã›ã‚“ï¼"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "連射間隔"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "光線銃デãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "トラックボールデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "ペダルデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "アナログスティックデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "パドルデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "ダイヤルデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "ä½ç½®ãƒ‡ãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "マウスデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "デãƒã‚¤ã‚¹ãƒžãƒƒãƒ”ング"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "メインフィルタ"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "ä»–ã®ãƒ•ィルタ"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!製造元"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!年度"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "最後ã®ãƒ•ィルタを削除"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "フィルタを追加"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "ã‚«ã‚¹ã‚¿ãƒ ãƒ•ã‚£ãƒ«ã‚¿é¸æŠž:"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!発売元"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!ソフトウェアリスト"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!デãƒã‚¤ã‚¹ã‚¿ã‚¤ãƒ—"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!リージョン"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "å…¨ã¦è¡¨ç¤º"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "フィルタをéžè¡¨ç¤ºã«ã™ã‚‹"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "情報・画åƒã‚’éžè¡¨ç¤ºã«ã™ã‚‹"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "両方をéžè¡¨ç¤ºã«ã™ã‚‹"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "フォント"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "色"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "言語"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "サイドパãƒãƒ«ã‚’表示"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "カスタムUI設定"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "デフォルト"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "UIフォント"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "太字"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "イタリック"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "行数"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "情報ã®ãƒ†ã‚­ã‚¹ãƒˆã‚µã‚¤ã‚º"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "UIフォント設定"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
"サンプルテキスト - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "通常ã®ãƒ†ã‚­ã‚¹ãƒˆ"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "é¸æŠžè‰²"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "通常テキストã®èƒŒæ™¯"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "é¸æŠžæ¸ˆãƒ†ã‚­ã‚¹ãƒˆã®èƒŒæ™¯"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "サブ項目ã®è‰²"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "クローン"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "æž ç·š"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "背景"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "DIPスイッãƒ"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "動作ä¸å¯ã®è‰²"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "スライダã®è‰²"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "グラフィックビューアã®èƒŒæ™¯"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "マウスオーãƒãƒ¼æ™‚ã®è‰²"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "マウスオーãƒãƒ¼æ™‚ã®èƒŒæ™¯è‰²"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "マウスダウン時ã®è‰²"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "マウスダウン時ã®èƒŒæ™¯è‰²"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "å…ƒã®è‰²ã«æˆ»ã™"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "UIã®è‰²è¨­å®š"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "色ã®å€¤ã‚’変更ã™ã‚‹ã«ã¯%1$sを押ã™ã‹ãƒ€ãƒ–ルクリックã—ã¦ãã ã•ã„"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "メニューã®ãƒ—レビュー"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "通常項目"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "サブ項目"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "é¸æŠžæ¸ˆã®é …ç›®"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "マウスオーãƒãƒ¼"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "アルファ"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "赤"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "ç·‘"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "é’"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "パレットã‹ã‚‰é¸ã¶"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr "ã®ARGB設定"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "色ã®ãƒ—レビュー ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "白"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "銀色"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "ç°è‰²"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "é»’"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "オレンジ"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "黄"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "ç´«"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "ソフトウェアã®ãƒ’ストリ"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "ソフトウェアã®ä½¿ã„æ–¹"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "リビジョン:"
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "ヒストリファイル"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "Mameinfoファイル"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "Messinfoファイル"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "Sysinfoファイル"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "Mamescoreファイル"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr "Gameinitファイル"
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "コマンドファイル"
@@ -478,35 +439,35 @@ msgstr "追加ã®INIファイル"
msgid "Icons"
msgstr "アイコンファイル"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "ãƒãƒ¼ãƒˆãƒ•ァイル"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "スクリーンショット"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "ç­ä½“ç”»åƒãƒ•ァイル"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "フライヤー画åƒ"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "タイトル画åƒ"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "終了画åƒ"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "基æ¿ç”»åƒ"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr "マーキー画åƒ"
@@ -522,7 +483,7 @@ msgstr "照準画åƒãƒ•ァイル"
msgid "Artworks"
msgstr "アートワークファイル"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "ボス画åƒãƒ•ァイル"
@@ -530,7 +491,7 @@ msgstr "ボス画åƒãƒ•ァイル"
msgid "Artworks Preview"
msgstr "アートワークã®ãƒ—レビュー"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "é¸æŠž"
@@ -538,23 +499,23 @@ msgstr "é¸æŠž"
msgid "GameOver"
msgstr "ゲームオーãƒãƒ¼"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "HOWTO"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "ロゴ"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "スコア"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr "ãƒãƒ¼ã‚µã‚¹"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "ã‚«ãƒãƒ¼"
@@ -598,132 +559,83 @@ msgstr "TABキーを押ã—ã¦è¨­å®š"
msgid "Remove %1$s Folder"
msgstr "%1$sフォルダを削除"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "ビデオモード"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "トリプルãƒãƒƒãƒ•ã‚¡"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr "HLSL"
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr "GLSL"
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "ãƒã‚¤ãƒªãƒ‹ã‚¢ãƒ•ィルタリング"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "ビットマッププレスケール"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "ウィンドウモード"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "アスペクト比を維æŒã™ã‚‹"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "é–‹å§‹æ™‚ã«æœ€å¤§åŒ–ã™ã‚‹"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã‚’åŒæœŸ"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "V-Syncã‚’å¾…ã¤"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "表示オプション"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "ファイルãŒå­˜åœ¨ã—ã¾ã™ï¼ä¸Šæ›¸ãã—ã¾ã™ã‹ï¼Ÿ"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "ã„ã„ãˆ"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "ã¯ã„"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "æ–°ã—ã„イメージå:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "イメージ形å¼:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "作æˆ"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µå­ã‚’入力ã—ã¦ãã ã•ã„"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "〔空ã®ã‚¹ãƒ­ãƒƒãƒˆã€•"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "〔作æˆã€•"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "〔ソフトウェアリスト〕"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "イメージ形å¼ã®é¸æŠž"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "アクセスモードã®é¸æŠž"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "読ã¿å–り専用"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "読ã¿å–ã‚Šï¼æ›¸ãè¾¼ã¿"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "ã“ã®ã‚¤ãƒ¡ãƒ¼ã‚¸ã‹ã‚‰èª­ã¿å–りã€åˆ¥ã®ã‚¤ãƒ¡ãƒ¼ã‚¸ã«æ›¸ã込む"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "ã“ã®ã‚¤ãƒ¡ãƒ¼ã‚¸ã‹ã‚‰èª­ã¿å–りã€å·®åˆ†ï¼ˆdiffï¼‰ã«æ›¸ã込む"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "別ã®ãƒ•ォルダã«ã¯ä¿å­˜ã§ãã¾ã›ã‚“"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -743,7 +655,7 @@ msgstr "部分的ã«å¯¾å¿œ"
msgid "[empty]"
msgstr "〔空〕"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "擬似ターミナル"
@@ -759,164 +671,168 @@ msgstr "ユーザーインターフェイス"
msgid "Other Controls"
msgstr "ãã®ä»–ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "リセット"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "入力(共通)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "入力(ç¾åœ¨ã®ãƒžã‚·ãƒ³ï¼‰"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "アナログæ“作"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "DIPスイッãƒ"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "マシン設定"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "ブックキーピング情報"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "マシン情報"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "イメージ情報"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "ファイルマãƒãƒ¼ã‚¸ãƒ£"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "テープæ“作"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "BIOSé¸æŠž"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "スロットデãƒã‚¤ã‚¹"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "ãƒãƒ¼ã‚³ãƒ¼ãƒ‰ãƒªãƒ¼ãƒ€"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ‡ãƒã‚¤ã‚¹"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "キーボードモード"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "スライダ設定"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "表示設定"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "照準設定"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "ãƒãƒ¼ãƒˆ"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "外部DATビュー"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "ãŠæ°—ã«å…¥ã‚Šã«è¿½åŠ "
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "ãŠæ°—ã«å…¥ã‚Šã‹ã‚‰å‰Šé™¤"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "æ–°ã—ã„ãƒžã‚·ãƒ³ã‚’é¸æŠž"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "æ“作パãƒãƒ«ç”»åƒ"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "アートワークã®ãƒ—レビュー"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "ゲームオーãƒãƒ¼"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "ãŠæ°—ã«å…¥ã‚Šã«è¿½åŠ ã¾ãŸã¯å‰Šé™¤"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "表示ã•れã¦ã„るリストをファイルã«å‡ºåŠ›"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "DATビューを表示"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "ãƒžã‚·ãƒ³ã«æˆ»ã‚‹"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "終了"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "å‰ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«æˆ»ã‚‹"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "自動"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "ç”»åƒ"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "情報"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "キーボードモード:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "ナãƒãƒ¥ãƒ©ãƒ«"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "エミュレート"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
@@ -925,7 +841,7 @@ msgstr ""
"ç¨¼åƒæ™‚間:%1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
@@ -934,7 +850,7 @@ msgstr ""
"ç¨¼åƒæ™‚間:%1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -943,154 +859,109 @@ msgstr ""
"ãƒã‚±ãƒƒãƒˆç™ºè¡Œ: %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "コイン%1$c:NA%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "コイン%1$c:%2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr "(ロック)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "表示ã™ã‚‹é•·ã•"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "最後ã«ãƒ—レイã—ãŸãƒžã‚·ãƒ³ã‚’å†é¸æŠž"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "å³ãƒ‘ãƒãƒ«ã®ç”»åƒã‚’拡大ã™ã‚‹"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "DAT情報"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "マウスãƒã‚¤ãƒ³ã‚¿ã‚’表示"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "マシン終了時ã«ç¢ºèª"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "èµ·å‹•æ™‚ã«æƒ…報画é¢ã‚’スキップ"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "スクリーンショットを4:3ã®æ¯”率ã§ä¿å­˜ã™ã‚‹"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "ç”»åƒã‚’背景ã«ä½¿ç”¨ã™ã‚‹"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "BIOSé¸æŠžãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ãƒ‘ãƒ¼ãƒ„é¸æŠžãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "ãã®ä»–ã®è¨­å®š"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xmlã‚’uiフォルダーã«ä¿å­˜ã—ã¾ã—ãŸã€‚"
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "ROMセット: åå‰ï¼š\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txtã‚’uiフォルダーã«ä¿å­˜ã—ã¾ã—ãŸã€‚"
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "XMLå½¢å¼ã§å‡ºåŠ›ï¼ˆ-listxmlåŒæ§˜ï¼‰"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "TXTå½¢å¼ã§å‡ºåŠ›ï¼ˆ-listfullåŒæ§˜ï¼‰"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr "ダミー"
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "マシン設定をä¿å­˜ã™ã‚‹"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "プラグイン"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "フィルタ"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr "^!ファイル"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!カテゴリ"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!カスタムフィルタを設定ã™ã‚‹"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "UIをカスタマイズã™ã‚‹"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "フォルダ設定"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "サウンド設定"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "共通ã®å…¥åŠ›è¨­å®š"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "設定をä¿å­˜ã™ã‚‹"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "設定"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "*** ui.iniã®ä¿å­˜ã‚¨ãƒ©ãƒ¼ ***"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "*** %s.iniã®ä¿å­˜ã‚¨ãƒ©ãƒ¼ ***"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1100,20 +971,20 @@ msgstr ""
" 設定をä¿å­˜ã—ã¾ã—㟠\n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "é¸æŠžãƒªã‚¹ãƒˆ - 検索:"
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "%1$sを押ã™ã‹ãƒ€ãƒ–ルクリックã§é¸æŠžã—ã¦ãã ã•ã„"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "一般情報"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1122,8 +993,8 @@ msgstr ""
"「%sã€ã‚’\n"
"ãŠæ°—ã«å…¥ã‚Šã«è¿½åŠ ã—ã¾ã—ãŸã€‚"
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
@@ -1132,268 +1003,264 @@ msgstr ""
"「%sã€ã‚’\n"
"ãŠæ°—ã«å…¥ã‚Šã‹ã‚‰å‰Šé™¤ã—ã¾ã—ãŸã€‚"
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"é¸æŠžã—ãŸãƒžã‚·ãƒ³ã«å¿…è¦ãª1ã¤ä»¥ä¸Šã®ROMã¾ãŸã¯CHDãŒä¸è¶³ã—ã¦ã„ã¾ã™ã€‚別ã®ãƒžã‚·ãƒ³ã‚’é¸æŠž"
-"ã—ã¦ãã ã•ã„。\n"
-"\n"
-"進ã‚ã‚‹ã«ã¯ã€ä½•ã‹ã‚­ãƒ¼ï¼ˆESC以外)を押ã—ã¦ãã ã•ã„。"
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "オプションã®è¨­å®š"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d マシン (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr "%1$s(%2$s〜%3$s)〜"
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr "%1$s(%2$s)〜"
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s検索:%2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "ROMセット:%1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "次ã®ã‚¯ãƒ­ãƒ¼ãƒ³ã®ãƒ‰ãƒ©ã‚¤ãƒï¼š%1$-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "親セットã®ãƒ‰ãƒ©ã‚¤ãƒ"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "概略:動作ä¸å¯"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "æ¦‚ç•¥ï¼šãƒ—ãƒ­ãƒ†ã‚¯ãƒˆãŒæœªã‚¨ãƒŸãƒ¥ãƒ¬ãƒ¼ãƒˆ"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "概略:動作å¯"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "グラフィック:ä¸å®Œå…¨ã€"
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "グラフィック:正常ã€"
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "サウンド:未実装"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "サウンド:ä¸å®Œå…¨"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "サウンド:正常"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "システム:%1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "次ã®ã‚¯ãƒ­ãƒ¼ãƒ³ã®ã‚½ãƒ•トウェア:%1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "親セットã®ã‚½ãƒ•トウェア"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "対応状æ³ï¼šã„ã„ãˆ"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "対応状æ³ï¼šéƒ¨åˆ†çš„"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "対応状æ³ï¼šã¯ã„"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "ソフト:%1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "ROMセット: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "年度: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "製造元: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "次ã®ã‚¯ãƒ­ãƒ¼ãƒ³ã®ãƒ‰ãƒ©ã‚¤ãƒ: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "親セットã®ãƒ‰ãƒ©ã‚¤ãƒ\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "概略: 動作ä¸å¯\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "概略: ãƒ—ãƒ­ãƒ†ã‚¯ãƒˆãŒæœªã‚¨ãƒŸãƒ¥ãƒ¬ãƒ¼ãƒˆ\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "概略: 動作å¯\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "グラフィック: 色ãŒä¸å®Œå…¨\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "グラフィック: ä¸å®Œå…¨\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "グラフィック: 正常\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "サウンド: 未実装\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "サウンド: ä¸å®Œå…¨\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "サウンド: 正常\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "スケルトンドライãƒ: %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "機械仕掛ã‘ã®ã‚²ãƒ¼ãƒ : %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "アートワークãŒå¿…è¦: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "クリックå¯ã®ã‚¢ãƒ¼ãƒˆãƒ¯ãƒ¼ã‚¯ãŒå¿…è¦: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "カクテルモード対応: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "BIOSドライãƒ: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "セーブ対応: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "ç”»é¢ã®å‘ã: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "縦"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "横"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "CHDãŒå¿…è¦: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "ROMæ¤œè¨¼çµæžœ: 正常\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "ROMæ¤œè¨¼çµæžœ: 異常\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "ã‚µãƒ³ãƒ—ãƒ«æ¤œè¨¼çµæžœ: ä¸è¦\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "ã‚µãƒ³ãƒ—ãƒ«æ¤œè¨¼çµæžœ: 正常\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "ã‚µãƒ³ãƒ—ãƒ«æ¤œè¨¼çµæžœ: 異常\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1401,86 +1268,82 @@ msgstr ""
"ROMæ¤œè¨¼çµæžœ: 無効\n"
"ã‚µãƒ³ãƒ—ãƒ«æ¤œè¨¼çµæžœ: 無効\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "利用å¯èƒ½ãªæƒ…å ±ã¯ã‚りã¾ã›ã‚“"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "ä½¿ã„æ–¹"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr "(デフォルト)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"é¸æŠžã—ãŸã‚½ãƒ•トウェアã«å¿…è¦ãª1ã¤ä»¥ä¸Šã®ãƒ•ァイルãŒä¸è¶³ã—ã¦ã„ã¾ã™ã€‚別ã®ã‚½ãƒ•トウェ"
-"ã‚¢ã‚’é¸æŠžã—ã¦ãã ã•ã„。\n"
-"\n"
-"進ã‚ã‚‹ã«ã¯ã€ä½•ã‹ã‚­ãƒ¼ï¼ˆESC以外)を押ã—ã¦ãã ã•ã„。"
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d ソフトウェア )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr "ドライãƒï¼šã€Œ%1$sã€ã€€ã‚½ãƒ•トウェアリスト"
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "リージョン:%1$s〜"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "発売元:%1$s〜"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "年度:%1$s〜"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "ソフトウェアリスト:%1$s〜"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "デãƒã‚¤ã‚¹ã‚¿ã‚¤ãƒ—:%1$s〜"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%1$s検索:%2$s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "é¸æŠžä¸­ã®ã‚½ãƒ•トウェアパーツ:"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "BIOSé¸æŠžï¼š"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1494,33 +1357,33 @@ msgstr ""
"ã‚‚ã— %2$s ã®åˆ©ç”¨ãŒåˆã‚ã¦ãªã‚‰ã€%2$s ã®è¨­å®šæ–¹æ³•ã«ã¤ã„ã¦docsフォルダã®config.txt"
"ファイルをã”覧ãã ã•ã„。"
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "åå‰ã‚’入力もã—ãã¯é¸æŠžï¼š %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "åå‰ã‚’入力もã—ãã¯é¸æŠžï¼š (ランダム)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr "ドライãƒï¼š%1$-.100s"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "ä¸å®Œå…¨"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr "正常"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "未実装"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "グラフィックス:%s サウンド:%s"
@@ -1529,15 +1392,15 @@ msgstr "グラフィックス:%s サウンド:%s"
msgid " [internal]"
msgstr " [内部]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "サウンド"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "サンプルレート"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "外部サンプル使用"
@@ -1606,11 +1469,11 @@ msgstr "å·»ãæˆ»ã™"
msgid "Fast Forward"
msgstr "æ—©é€ã‚Š"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr "ã“ã®ãƒ‰ãƒ©ã‚¤ãƒã¯ä»¥ä¸‹ã®ãƒ‡ãƒã‚¤ã‚¹ã§ã‚¤ãƒ¡ãƒ¼ã‚¸ã®èª­ã¿è¾¼ã¿ãŒå¿…è¦ã§ã™:"
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1618,7 +1481,7 @@ msgstr ""
"ã“ã®ãƒžã‚·ãƒ³ç”¨ã®ROM/CHDãŒæ­£ã—ãã‚りã¾ã›ã‚“。ãã®ãŸã‚æ­£ã—ã動作ã—ãªã„å¯èƒ½æ€§ãŒã‚り"
"ã¾ã™ã€‚\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1626,50 +1489,50 @@ msgstr ""
"ã“ã®ãƒžã‚·ãƒ³ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªå•題点ãŒã‚りã¾ã™\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
"ã“ã®ãƒžã‚·ãƒ³ç”¨ã®ROM/CHDã¯å…¨ã¦æ­£ã—ãå¸ã„出ã•れã¦ã„ã¾ã›ã‚“。\n"
"\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "キーボードエミュレーションãŒ100%正確ã§ã¯ã‚りã¾ã›ã‚“。\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "表示色ãŒ100%正確ã§ã¯ã‚りã¾ã›ã‚“。\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "表示色ãŒå®Œå…¨ã«é–“é•ã£ã¦ã„ã¾ã™ã€‚\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "表示系ã®ã‚¨ãƒŸãƒ¥ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãŒ100%正確ã§ã¯ã‚りã¾ã›ã‚“。\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "サウンドエミュレーションãŒ100%正確ã§ã¯ã‚りã¾ã›ã‚“。\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "ã“ã®ãƒžã‚·ãƒ³ã¯éŸ³ãŒé³´ã‚Šã¾ã›ã‚“。\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "カクテルモードã§ã®ç”»é¢å転表示ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "ã“ã®ãƒžã‚·ãƒ³ã¯åˆ¥é€”アートワークファイルãŒå¿…è¦ã§ã™ã€‚\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1677,7 +1540,7 @@ msgstr ""
"ã“ã®ãƒžã‚·ãƒ³ã¯æœªå®Œæˆã§ã™ã€‚動作ã®ä¸å…·åˆã‚„ä¸è¶³ã—ãŸè¦ç´ ãŒã‚ã£ã¦ã‚‚エミュレーション"
"ã®ãƒã‚°ã§ã¯ã‚りã¾ã›ã‚“。\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1685,11 +1548,11 @@ msgstr ""
"ã“ã®ãƒžã‚·ãƒ³ã«ã¯ã‚µã‚¦ãƒ³ãƒ‰ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ãŒã‚りã¾ã›ã‚“。音ãŒå‡ºãªãã¦ã‚‚正常ãªå‹•作ã§"
"ã™ã€‚\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr "ã“ã®ãƒžã‚·ãƒ³ã®ãƒ—ロテクトã¯å®Œå…¨ã«ã‚¨ãƒŸãƒ¥ãƒ¬ãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1700,7 +1563,7 @@ msgstr ""
"ã“ã®ãƒžã‚·ãƒ³ã¯å‹•作ã—ã¾ã›ã‚“ã€‚ã‚¨ãƒŸãƒ¥ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã¯æœªå®Œæˆã§ã™ã€‚開発者ãŒã‚¨ãƒŸãƒ¥ãƒ¬ãƒ¼"
"ションを改良ã™ã‚‹ã®ã‚’ãŠå¾…ã¡ä¸‹ã•ã„。\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1711,7 +1574,7 @@ msgstr ""
"ã“ã®ãƒžã‚·ãƒ³ã®ä¸€éƒ¨ã®è¦ç´ ã¯ã€æ©Ÿæ¢°çš„デãƒã‚¤ã‚¹ã«ã‚ˆã‚‹å®Ÿéš›ã®å‹•作ãŒå¿…è¦ãªãŸã‚エミュ"
"レートã§ãã¾ã›ã‚“。ãã®ãŸã‚ã€ã“ã®ãƒžã‚·ãƒ³ã‚’完全ã«ãƒ—レイã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1721,7 +1584,7 @@ msgstr ""
"\n"
"ã“ã®ãƒžã‚·ãƒ³ã®å‹•作å¯èƒ½ãªã‚¯ãƒ­ãƒ¼ãƒ³ã‚»ãƒƒãƒˆ:"
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
@@ -1731,7 +1594,7 @@ msgstr ""
"\n"
"進ã‚ã‚‹ã«ã¯ã€ä½•ã‹ã‚­ãƒ¼ã‚’押ã—ã¦ãã ã•ã„。"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1746,15 +1609,15 @@ msgstr ""
"\n"
"CPU:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1762,7 +1625,7 @@ msgstr ""
"\n"
"サウンド:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1770,78 +1633,78 @@ msgstr ""
"\n"
"表示:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "ãªã—\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "ベクター"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr "%1$s:%2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "キーボードエミュレーションステータス"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "モード: 部分的エミュレーション"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "UI: 有効"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "** ScrLockキーã§åˆ‡ã‚Šæ›¿ãˆ **"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "モード:完全エミュレーション"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "UI: 無効"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "é€£å°„æ©Ÿèƒ½ã¯æœ‰åйã«ã§ãã¾ã›ã‚“"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "ã‚»ãƒ¼ãƒ–å…ˆã‚’é¸æŠž"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "ã‚»ãƒ¼ãƒ–å…ƒã‚’é¸æŠž"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "セーブã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã¾ã—ãŸ"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "ロードã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã¾ã—ãŸ"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "%sã«ã‚»ãƒ¼ãƒ–ã—ã¾ã—ãŸ"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "%sã‹ã‚‰ãƒ­ãƒ¼ãƒ‰ã—ã¾ã—ãŸ"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1854,7 +1717,7 @@ msgstr ""
"「%1$sã€ã§çµ‚了\n"
"「%2$sã€ã§ã‚¨ãƒŸãƒ¥ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã«æˆ»ã‚‹"
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "マスター音é‡"
@@ -1863,7 +1726,7 @@ msgstr "マスター音é‡"
msgid "%1$s Volume"
msgstr "%1$sã®éŸ³é‡"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "CPU %1$sã®ã‚ªãƒ¼ãƒãƒ¼ã‚¯ãƒ­ãƒƒã‚¯"
@@ -1873,154 +1736,154 @@ msgstr "CPU %1$sã®ã‚ªãƒ¼ãƒãƒ¼ã‚¯ãƒ­ãƒƒã‚¯"
msgid "%1$s Refresh Rate"
msgstr "%1$sã®ãƒªãƒ•レッシュレート"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$sã®è¼åº¦"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$sã®ã‚³ãƒ³ãƒˆãƒ©ã‚¹ãƒˆ"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "%1$sã®ã‚¬ãƒ³ãƒž"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "%1$s 横方å‘ã®æ‹¡å¤§"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "%1$s 横方å‘ã®ä½ç½®"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "%1$s 縦方å‘ã®æ‹¡å¤§"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "%1$s 縦方å‘ã®ä½ç½®"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "レーザーディスク '%1$s' 横方å‘ã®æ‹¡å¤§"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "レーザーディスク '%1$s' 横方å‘ã®ä½ç½®"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "レーザーディスク '%1$s' 縦方å‘ã®æ‹¡å¤§"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "レーザーディスク '%1$s' 縦方å‘ã®ä½ç½®"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "ベクターã®ã¡ã‚‰ã¤ã"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "ビーム幅(最å°ï¼‰"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "ビーム幅(最大)"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "ビーム強度比é‡"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "照準ã®å¤§ãã• %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "照準ã®ã‚ªãƒ•セット %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "ç”»é¢ã€Œ%1$sã€"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "ç”»é¢"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "照準ã®å¤§ãã• X %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "照準ã®å¤§ãã• Y %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "照準ã®ã‚ªãƒ•セット X %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "照準ã®ã‚ªãƒ•セット Y %1$1.3f"
@@ -2062,14 +1925,132 @@ msgstr "切りè½ã¨ã—"
msgid "Full"
msgstr "全体"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " 色"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " ペン"
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "光線銃デãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "トラックボールデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "ペダルデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "アナログスティックデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "パドルデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "ダイヤルデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "ä½ç½®ãƒ‡ãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "マウスデãƒã‚¤ã‚¹å‰²ã‚Šå½“ã¦"
+
+#~ msgid "Device Mapping"
+#~ msgstr "デãƒã‚¤ã‚¹ãƒžãƒƒãƒ”ング"
+
+#~ msgid "Video Mode"
+#~ msgstr "ビデオモード"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "トリプルãƒãƒƒãƒ•ã‚¡"
+
+#~ msgid "HLSL"
+#~ msgstr "HLSL"
+
+#~ msgid "GLSL"
+#~ msgstr "GLSL"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "ãƒã‚¤ãƒªãƒ‹ã‚¢ãƒ•ィルタリング"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "ビットマッププレスケール"
+
+#~ msgid "Window Mode"
+#~ msgstr "ウィンドウモード"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "アスペクト比を維æŒã™ã‚‹"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "é–‹å§‹æ™‚ã«æœ€å¤§åŒ–ã™ã‚‹"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã‚’åŒæœŸ"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "V-Syncã‚’å¾…ã¤"
+
+#~ msgid "Display Options"
+#~ msgstr "表示オプション"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "é¸æŠžã—ãŸãƒžã‚·ãƒ³ã«å¿…è¦ãª1ã¤ä»¥ä¸Šã®ROMã¾ãŸã¯CHDãŒä¸è¶³ã—ã¦ã„ã¾ã™ã€‚別ã®ãƒžã‚·ãƒ³ã‚’"
+#~ "é¸æŠžã—ã¦ãã ã•ã„。\n"
+#~ "\n"
+#~ "進ã‚ã‚‹ã«ã¯ã€ä½•ã‹ã‚­ãƒ¼ï¼ˆESC以外)を押ã—ã¦ãã ã•ã„。"
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "é¸æŠžã—ãŸã‚½ãƒ•トウェアã«å¿…è¦ãª1ã¤ä»¥ä¸Šã®ãƒ•ァイルãŒä¸è¶³ã—ã¦ã„ã¾ã™ã€‚別ã®ã‚½ãƒ•ト"
+#~ "ã‚¦ã‚§ã‚¢ã‚’é¸æŠžã—ã¦ãã ã•ã„。\n"
+#~ "\n"
+#~ "進ã‚ã‚‹ã«ã¯ã€ä½•ã‹ã‚­ãƒ¼ï¼ˆESC以外)を押ã—ã¦ãã ã•ã„。"
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "最後ã«ãƒ—レイã—ãŸãƒžã‚·ãƒ³ã‚’å†é¸æŠž"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "å³ãƒ‘ãƒãƒ«ã®ç”»åƒã‚’拡大ã™ã‚‹"
+
+#~ msgid "DATs info"
+#~ msgstr "DAT情報"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "マウスãƒã‚¤ãƒ³ã‚¿ã‚’表示"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "マシン終了時ã«ç¢ºèª"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "èµ·å‹•æ™‚ã«æƒ…報画é¢ã‚’スキップ"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "スクリーンショットを4:3ã®æ¯”率ã§ä¿å­˜ã™ã‚‹"
+
+#~ msgid "Use image as background"
+#~ msgstr "ç”»åƒã‚’背景ã«ä½¿ç”¨ã™ã‚‹"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "BIOSé¸æŠžãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ãƒ‘ãƒ¼ãƒ„é¸æŠžãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "ãã®ä»–ã®è¨­å®š"
+
#~ msgid ""
#~ "Usage of emulators in conjunction with ROMs you don't own is forbidden by "
#~ "copyright law.\n"
diff --git a/language/Korean/strings.po b/language/Korean/strings.po
index 198a73fcb65..99667df3918 100644
--- a/language/Korean/strings.po
+++ b/language/Korean/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Latvian/strings.po b/language/Latvian/strings.po
index 4bb6f42d893..6d2cf55bde0 100644
--- a/language/Latvian/strings.po
+++ b/language/Latvian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Lithuanian/strings.po b/language/Lithuanian/strings.po
index 39030f0d506..3114e518767 100644
--- a/language/Lithuanian/strings.po
+++ b/language/Lithuanian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Macedonian/strings.po b/language/Macedonian/strings.po
index 25c4119eadc..9f5c71ebfb6 100644
--- a/language/Macedonian/strings.po
+++ b/language/Macedonian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Norwegian/strings.po b/language/Norwegian/strings.po
index 704a8f42c75..805e11beed6 100644
--- a/language/Norwegian/strings.po
+++ b/language/Norwegian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -56,393 +56,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -474,35 +435,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -518,7 +479,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,7 +487,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -534,23 +495,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -594,132 +555,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -737,7 +649,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -753,705 +665,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,33 +1331,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1495,15 +1366,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1572,80 +1443,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1524,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1532,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1556,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1656,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1665,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1675,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1993,10 +1864,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Persian/strings.po b/language/Persian/strings.po
index 559837e17b5..c9b51faa763 100644
--- a/language/Persian/strings.po
+++ b/language/Persian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Polish/strings.po b/language/Polish/strings.po
index 23989fede0a..a77314ec6d7 100644
--- a/language/Polish/strings.po
+++ b/language/Polish/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -58,393 +58,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -476,35 +437,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -520,7 +481,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -528,7 +489,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -536,23 +497,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -596,132 +557,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -739,7 +651,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -755,705 +667,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1462,33 +1333,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1497,15 +1368,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1574,80 +1445,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1655,7 +1526,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1663,21 +1534,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1687,98 +1558,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1787,7 +1658,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1796,7 +1667,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1806,154 +1677,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1995,10 +1866,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Portuguese/strings.po b/language/Portuguese/strings.po
index d950b6320b0..e23528b295e 100644
--- a/language/Portuguese/strings.po
+++ b/language/Portuguese/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -56,393 +56,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -474,35 +435,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -518,7 +479,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,7 +487,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -534,23 +495,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -594,132 +555,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -737,7 +649,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -753,705 +665,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,33 +1331,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1495,15 +1366,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1572,80 +1443,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1524,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1532,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1556,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1656,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1665,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1675,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1993,10 +1864,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Portuguese_Brazil/strings.po b/language/Portuguese_Brazil/strings.po
index 2522a63b58b..044f0766978 100644
--- a/language/Portuguese_Brazil/strings.po
+++ b/language/Portuguese_Brazil/strings.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
-"PO-Revision-Date: 2016-03-02 14:00+0100\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
+"PO-Revision-Date: 2016-04-04 09:05+0100\n"
"Last-Translator: Ashura-X\n"
"Language-Team: MAME Language Team\n"
"Language: pt_BR\n"
@@ -57,394 +57,355 @@ msgstr "Reiniciar Tudo"
msgid "Reload All"
msgstr "Recarregar Tudo"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "Situação do Autodisparo"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "Desativado"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "Ativado"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "Ligado"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "Desligado"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "Nenhum botão encontrado nesta máquina!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "Atraso do Autodisparo"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "Atribuição do Dispositivo Pistola de Luz"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "Atribuição do Dispositivo Trackball"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "Atribuição do Dispositivo Pedal"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "Atribuição do Dispositivo Adstick"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "Atribuição do Dispositivo Paddle"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "Atribuição do Dispositivo Dial"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "Atribuição do Dispositivo Posicional"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "Atribuição do Dispositivo Mouse"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "Mapeamento de Dispositivo"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "Filtro Principal"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "Outro filtro"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!Fabricante"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!Ano"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "Remover o último filtro"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "Adicionar filtro"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "Selecionar filtros customizáveis:"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!Editor"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
-msgstr "^!Lista de Software"
+msgstr "^!Lista de Programas"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
-msgstr ""
+msgstr "^!Tipo de dispositivo"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
-msgstr ""
+msgstr "^!Região"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "Mostrar Tudo"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "Esconder Filtros"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "Esconder Info/Imagem"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "Esconder Ambos"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "Fontes"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "Cores"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "Linguagem"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "Mostrar painéis laterais"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "Configurações Customizadas do UI"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "padrão"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "Fonte do UI"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "Negrito"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "Itálico"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "Linhas"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "Infos do tamanho do texto"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "Configurações das fontes do UI"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
"Texto de amostra - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "Texto Normal"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "Cor Selecionada"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "Fundo do texto normal"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "Cor de fundo selecionada"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "Cor do Sub-item"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "Clone"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "Borda"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "Fundo"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "Chave DIP"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "Cor indisponível"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "Cor do controle deslizante"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "Fundo do visualizador GFX"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "Cor do Mouse over"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "Cor de fundo do Mouse over"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "Cor do Mouse down"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "Cor de fundo do Mouse down"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "Restaurar as cores originais"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "Configurações de cores do UI"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "Duplo-clique ou pressione %1$s para mudar o valor da cor"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "Menu de Visualização"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "Normal"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "Sub-item"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "Selecionado"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "Mouse Over"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "Opacidade"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "Vermelho"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "Verde"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "Azul"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "Escolha da paleta"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr "Configurações ARGB"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "Visualização da cor"
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "Branco"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "Prata"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "Cinza"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "Preto"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "Laranja"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "Amarelo"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "Violeta"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
-msgstr "História do Software"
+msgstr "História do Programa"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
-msgstr "Uso do Software"
+msgstr "Uso do Programa"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "Revisão: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "História"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "Mameinfo"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "Messinfo"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "Sysinfo"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "Mamescore"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
-msgstr ""
+msgstr "Gameinit"
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "Command"
@@ -476,35 +437,35 @@ msgstr "Extra INIs"
msgid "Icons"
msgstr "Ãcones"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "Truques"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "Snapshots"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "Gabinetes"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "Flyers"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "Títulos"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "Ends"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "PCBs"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr "Marquees"
@@ -520,7 +481,7 @@ msgstr "Mira"
msgid "Artworks"
msgstr "Artworks"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "Chefes"
@@ -528,7 +489,7 @@ msgstr "Chefes"
msgid "Artworks Preview"
msgstr "Amostra de Artworks"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "Selecionado"
@@ -536,25 +497,25 @@ msgstr "Selecionado"
msgid "GameOver"
msgstr "Fim do Jogo"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "Como"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "Logos"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "Placares"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr "Versus"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
-msgstr ""
+msgstr "Capas"
#: src/emu/ui/dirmenu.cpp:116 src/emu/ui/dirmenu.cpp:136
msgid "Folders Setup"
@@ -563,7 +524,7 @@ msgstr "Configurar Pastas"
#: src/emu/ui/dirmenu.cpp:183
#, c-format
msgid "Current %1$s Folders"
-msgstr ""
+msgstr "Pastas %1$s Atuais"
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -580,12 +541,12 @@ msgstr "Remover Pasta"
#: src/emu/ui/dirmenu.cpp:496
#, c-format
msgid "Change %1$s Folder - Search: %2$s_"
-msgstr ""
+msgstr "Mudar %1$s Pasta - Busca: %2$s_"
#: src/emu/ui/dirmenu.cpp:497
#, c-format
msgid "Add %1$s Folder - Search: %2$s_"
-msgstr ""
+msgstr "Adicionar %1$s Pasta - Busca: %2$s_"
#: src/emu/ui/dirmenu.cpp:534
msgid "Press TAB to set"
@@ -594,870 +555,793 @@ msgstr "Pressione TAB para definir"
#: src/emu/ui/dirmenu.cpp:640
#, c-format
msgid "Remove %1$s Folder"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "Modo do Vídeo"
+msgstr "Remover %1$s Pasta"
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "Buffering Triplo"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr "HLSL"
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr "GLSL"
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "Filtragem Bilinear"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "Pré-escala de Bitmap"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "Modo Janela"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "Forçar Razão de Aspecto"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "Iniciar Maximizado"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "Atualização de Quadros Sincronizada"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "Aguardar Sincronismo Vertical"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "Opções de Tela"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "Arquivo Já Existe - Sobrescrever?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
-msgstr ""
+msgstr "Não"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
-msgstr ""
+msgstr "Sim"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
-msgstr ""
+msgstr "Novo Nome da Imagem:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
-msgstr ""
+msgstr "Formato da Imagem:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
-msgstr ""
+msgstr "Criar"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
-msgstr ""
+msgstr "Por favor entre também com uma extensão do arquivo"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
-msgstr ""
+msgstr "[slot vazio]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
-msgstr ""
+msgstr "[criar]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
-msgstr ""
+msgstr "[lista de programa]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
-msgstr ""
+msgstr "Selecione o formato da imagem"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
-msgstr ""
+msgstr "Selecione o modo de acesso"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
-msgstr ""
+msgstr "Somente-leitura"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
-msgstr ""
+msgstr "Somente-escrita"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
-msgstr ""
+msgstr "Ler esta imagem, escrever para outra imagem"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
-msgstr ""
+msgstr "Ler esta imagem, escrever para diff"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
-msgstr ""
+msgstr "Não pode salvar sobre o diretório"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
msgstr ""
+"O programa selecionado não possui uma ou mais ROM necessárias ou imagens "
+"CHD. Por favor selecione uma diferente"
#: src/emu/ui/info.cpp:98
msgid "Not supported"
-msgstr ""
+msgstr "Não suportado"
#: src/emu/ui/info.cpp:101
msgid "Partially supported"
-msgstr ""
+msgstr "Parcialmente suportado"
#: src/emu/ui/info.cpp:109
msgid "[empty]"
-msgstr ""
+msgstr "[vazio]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "Pseudo terminais"
#: src/emu/ui/info_pty.cpp:35
msgid "[failed]"
-msgstr ""
+msgstr "[falhou]"
#: src/emu/ui/inputmap.cpp:52
msgid "User Interface"
-msgstr ""
+msgstr "Interface do usuário"
#: src/emu/ui/inputmap.cpp:59
msgid "Other Controls"
-msgstr ""
+msgstr "Outros Controles"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "Reiniciar"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "Entrada (geral)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "Entrada (esta máquina)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "Controles Analógicos"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "Chaves DIP"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "Configuração da Máquina"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "Info de Bookkeeping"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "Informação da Máquina"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "Informação da Imagem"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "Gerenciador de Arquivos"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "Controle da Fita"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "Seleção da Bios"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "Dispositivos de Slot"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "Leitor de código de barras"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "Dispositivos de rede"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "Modo Teclado"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "Controles Deslizantes"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "Opções de Vídeo"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "Opções de Mira"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "Truques"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr "Opções dos Plugins"
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "Visualização de DAT Externa"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "Adicionar aos Favoritos"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "Remover dos Favoritos"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "Selecionar Nova Máquina"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
-msgstr ""
+msgstr "Painéis de Controle"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "Pré-Visualização da Arte"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "Fim de Jogo"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "Adicionar ou remover favoritos"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "Exportar lista exibida para arquivo"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "Exibir visualização de DATs"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "Voltar à Máquina"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "Sair"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "Voltar ao Menu Anterior"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "Automático"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "Imagens"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "Informações"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "Modo Teclado"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "Natural"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "Emulado"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr "Tempo em execução: %1$d:%2$02d:%3$02d\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr "Tempo em execução: %1$d:%2$02d\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
+"Tickets emitidos: %1$d\n"
+"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "Ficha %1$c: NA%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "Ficha %1$c: %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr "(travado)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "Atraso Visível"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "Re-selecione a última máquina jogada"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "Aumentar as imagens no painel direito"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "Info dos DATs"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "Mostrar ponteiro do mouse"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "Confirmar saída das máquinas"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "Pular a tela de informações ao iniciar"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "Forçar aparência de 4:3 para o snapshot do software"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "Usar imagem como plano de fundo"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "Pular menu de seleção da bios"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "Pular menu de seleção para o software em partes"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "Opções Diversas"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%/.xml salvo no diretório ui."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "Nome: Descrição:\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt salvo no diretório ui."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "Exportar em formato XML (como -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "Exportar em formato TXT (como -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
-msgstr ""
+msgstr "Simulado"
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "Salvar Configuração da Máquina"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
-msgstr ""
+msgstr "Plugins"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "Filtro"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr " ^!Arquivo"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!Categoria"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!Configurar filtro personalizado"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "Customizar Interface"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "Configurar Diretórios"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "Opções de Som"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "Entradas Gerais"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "Salvar Configuração"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "Configurações"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**Erro ao salvar ui.ini**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**Erro ao salvar %s.ini**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
+"\n"
+" Configuração salva \n"
+"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "Lista de Seleção - Busca: "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "Pressione %1$s ou clique duas vezes para selecionar"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "Informações Gerais"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr " adicionado à lista de favoritos."
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr " removido da lista de favoritos."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Faltam arquivos ROM ou CHD correspondentes à máquina selecionada. Por favor, "
-"selecione uma outra máquina.\n"
+"A máquina selecionada está faltando uma ou mais imagens CHD ou ROMS necessárias. "
+"Por favor selecione uma máquina diferente.\n"
"\n"
-"Pressione qualquer tecla (exceto ESC) para continuar."
+"Pressione qualquer tecla para continuar."
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "Opções de configuração"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d máquinas (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr "%1$s (%2$s - %3$s) -"
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s Busca: %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "Romset: %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr "%1$s, %2$-.100s"
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "Driver é clone de: %1$-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "Driver é o principal"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "Geral: NÃO FUNCIONA"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "Geral: Proteção Não Emulada"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "Geral: Funcionando"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "Gráficos: Imperfeitos, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "Gráficos: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "Som: Não Implementado"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "Som: Imperfeito"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "Som: OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
-msgstr ""
+msgstr "Sistema: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
-msgstr ""
+msgstr "Programa é clone de: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
-msgstr "Software é o principal"
+msgstr "Programa é o principal"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "Suportado: Não"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "Suportado: Parcialmente"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "Suportado: Sim"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "romset: %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr "%1$s %2$s"
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "Romset: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "Ano: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "Fabricante: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "Driver é Clone de: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "Driver é o Principal\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "Geral: NÃO FUNCIONA\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "Geral: Proteção Não Emulada\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "Geral: Funcionando\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "Gráficos: Cores Imperfeitas\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "Gráficos: Imperfeitos\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "Gráficos: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "Som: Não Implementado\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "Som: Imperfeito\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "Som: OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "Driver é Preliminar: %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "Jogo é Mecânico: %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "Requer Arte: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "Requer Arte Clicável: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "Suporta Cocktail: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "Driver é Bios: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "Suporta Salvar: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "Orientação da Tela: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
-msgstr ""
+msgstr "Vertical"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "Horizontal"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "Requer CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "Checagem de Roms: OK\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "Checagem de Roms: ERRO\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "Checagem de Amostras Sonoras: Não Necessárias\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "Checagem de Amostras Sonoras: OK\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "Checagem de Amostras Sonoras: ERRO\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
+"Progresso da Auditoria de Roms: Desativado\n"
+"Progresso da Auditoria de Amostras: Desativado\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "Sem Informação Disponível"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "Uso"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (padrão)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
+"O programa selecionado está faltando um ou mais arquivos necessários. Por favor selecione um"
+"programa diferente.\n"
+"\n"
+"Pressione qualquer tecla para continuar."
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
-msgstr ""
+msgstr "%1$s %2$s ( %3$d / %4$d programas )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
-msgstr ""
+msgstr "Driver: \"%1$s\" lista de programas "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "Região: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "Editor: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "Ano: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
-msgstr "Lista de Software: %1$s -"
+msgstr "Lista de Programa: %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "Tipo de Dispositivo"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s Busca: %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
-msgstr ""
+msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
-msgstr "Seleção por parte de Software"
+msgstr "Seleção por parte de Programa"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "Seleção da Bios"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1465,51 +1349,56 @@ msgid ""
"If this is your first time using %2$s, please see the config.txt file in the "
"docs directory for information on configuring %2$s."
msgstr ""
+"Nenhuma máquina encontrada. Por favor cheque o caminho da rom especificado "
+"no arquivo %1$s.ini .\n"
+"\n"
+"Se esta é a sua primeira vez usando %2$s, por favor veja o arquivo config."
+"txt no diretório de documentos para informação em configurar o %2$s."
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
-msgstr ""
+msgstr "Digite o nome ou selecione: %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
-msgstr ""
+msgstr "Digite o nome ou selecione: (aleatório)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
-msgstr ""
+msgstr "Driver: %1$-.100s"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
-msgstr ""
+msgstr "Imperfeito"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
-msgstr ""
+msgstr "OK"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
-msgstr ""
+msgstr "Não-implementado"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
-msgstr ""
+msgstr "Gfx: %s, Som: %s"
#: src/emu/ui/slotopt.cpp:166
msgid " [internal]"
msgstr " [interno]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "Som"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "Taxa de Amostragem"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "Usar Amostras Externas"
@@ -1578,13 +1467,13 @@ msgstr "Rebobinar"
msgid "Fast Forward"
msgstr "Avanço Rápido"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
"Este driver necessita de imagens para ser carregado nos seguintes "
"dispositivo(s): "
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1592,56 +1481,56 @@ msgstr ""
"Uma ou mais ROMs/CHDs para esta máquina estão incorretas. A máquina não irá "
"funcionar corretamente"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr "Existem problemas conhecidos com esta máquina"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
"Uma ou mais ROMs/CHDs para esta máquina não foram corretamente dumpadas. \n"
" "
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "A emulação do teclado talvez não seja 100% perfeita.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "As cores não são 100% perfeitas.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "As cores são completamente erradas.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "A emulação do vídeo não é 100% perfeita.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "A emulação do som não é 100% perfeita.\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "A máquina tem problemas no som.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "Inversão de tela no modo coquetel não é suportada.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "Esta máquina requer arquivos externos de artwork\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1649,7 +1538,7 @@ msgstr ""
"Esta máquina nunca foi completada. Ela poderá ter um comportamento estranho "
"or faltar elementos que não são bugs na emulação"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1657,11 +1546,11 @@ msgstr ""
"Esta máquina não tem hardware de som, MAME não irá produzir som algum, isto "
"já é esperado."
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr "A máquina possui proteção a qual não é completamente emulada.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1672,7 +1561,7 @@ msgstr ""
"Não há nada que você possa fazer para fixar isto exceto aguardar os "
"desenvolvedores improvisarem a emulação.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1683,21 +1572,21 @@ msgstr ""
"interação física ou de dispositivos mecânicos. Não é possível jogar esta "
"máquina plenamente.\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr "Existem clones funcionando para esta máquina: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
-msgstr ""
+msgstr "Pressione qualquer tecla para continuar"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1706,99 +1595,104 @@ msgid ""
"\n"
"CPU:\n"
msgstr ""
+"%1$s\n"
+"%2$s %3$s\n"
+"Driver: %4$s\n"
+"\n"
+"CPU:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr "Som:"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr "Vídeo:"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "Nada"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "Vetorial"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
-msgstr ""
+msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
-msgstr ""
+msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "Situação da Emulação do Teclado"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "Modo: Emulação PARCIAL"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "UI: Ativo"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**Usar ScrLock para alternar"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "Modo: Emulação COMPLETA"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "UI: Desativado"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "Autodisparo não pode ser ativado"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "Selecione a posição para salvar em"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "Selecione a posição para carregar de"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "Salvar cancelado"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "Carregar cancelado"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "Salvar para a posição %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "Carregar da posição %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1811,7 +1705,7 @@ msgstr ""
"Pressione ''%1$s'' para sair,\n"
"Pressione ''%2$s'' para retornar à emulação."
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "Volume Mestre"
@@ -1820,7 +1714,7 @@ msgstr "Volume Mestre"
msgid "%1$s Volume"
msgstr "%1$s Volume"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "Overclock CPU %1$s"
@@ -1830,154 +1724,154 @@ msgstr "Overclock CPU %1$s"
msgid "%1$s Refresh Rate"
msgstr "Taxa de Atualização da %1$s"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "Brilho da %1$s"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "Contraste da %1$s"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "Gama da %1$s"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "Extensão Horizontal da %1$s"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "Posição Horizontal %1$s"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "Extensão Vertical da %1$s"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "Posição Vertical da %1$s"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "Laserdisc '%1$s' Extensão Horizontal"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "Laserdisc '%1$s' Posição Horizontal"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "Laserdisc '%1$s' Extensão Vertical"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "Laserdisc '%1$s' Posição Vertical"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "Flicker Vetorial"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "Largura Mínima do Feixe de Luz"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "Largura Máxima do Feixe de Luz"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "Intensidade do tamanho do Feixe de Luz"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "Escala da Mira %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr "X"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr "Y"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "Ajuste da Mira"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr "%1$3ddB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr "%1$.3ffps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "Tela '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "Tela"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "Escala da Mira X %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "Escala da Mira Y %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "Ajuste da Mira X %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "Ajuste da Mira Y %1$1.3f"
@@ -2019,14 +1913,132 @@ msgstr "Cortado"
msgid "Full"
msgstr "Cheio"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " CORES"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " CANETAS"
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "Atribuição do Dispositivo Pistola de Luz"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "Atribuição do Dispositivo Trackball"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "Atribuição do Dispositivo Pedal"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "Atribuição do Dispositivo Adstick"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "Atribuição do Dispositivo Paddle"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "Atribuição do Dispositivo Dial"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "Atribuição do Dispositivo Posicional"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "Atribuição do Dispositivo Mouse"
+
+#~ msgid "Device Mapping"
+#~ msgstr "Mapeamento de Dispositivo"
+
+#~ msgid "Video Mode"
+#~ msgstr "Modo do Vídeo"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "Buffering Triplo"
+
+#~ msgid "HLSL"
+#~ msgstr "HLSL"
+
+#~ msgid "GLSL"
+#~ msgstr "GLSL"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Filtragem Bilinear"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "Pré-escala de Bitmap"
+
+#~ msgid "Window Mode"
+#~ msgstr "Modo Janela"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "Forçar Razão de Aspecto"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "Iniciar Maximizado"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "Atualização de Quadros Sincronizada"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "Aguardar Sincronismo Vertical"
+
+#~ msgid "Display Options"
+#~ msgstr "Opções de Tela"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Faltam arquivos ROM ou CHD correspondentes à máquina selecionada. Por "
+#~ "favor, selecione uma outra máquina.\n"
+#~ "\n"
+#~ "Pressione qualquer tecla (exceto ESC) para continuar."
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "O programa selecionado está faltando um ou mais arquivos necessários. Por "
+#~ "favor selecione um programa diferente.\n"
+#~ "\n"
+#~ "Pressione qualquer tecla (exceto ESC) para continuar."
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Re-selecione a última máquina jogada"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Aumentar as imagens no painel direito"
+
+#~ msgid "DATs info"
+#~ msgstr "Info dos DATs"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Mostrar ponteiro do mouse"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "Confirmar saída das máquinas"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "Pular a tela de informações ao iniciar"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "Forçar aparência de 4:3 para o snapshot do programa"
+
+#~ msgid "Use image as background"
+#~ msgstr "Usar imagem como plano de fundo"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "Pular menu de seleção da bios"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "Pular menu de seleção para o programa em partes"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "Opções Diversas"
+
#~ msgid ""
#~ "Usage of emulators in conjunction with ROMs you don't own is forbidden by "
#~ "copyright law.\n"
diff --git a/language/Romanian/strings.po b/language/Romanian/strings.po
index d954640fa81..d9f999eb051 100644
--- a/language/Romanian/strings.po
+++ b/language/Romanian/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -58,393 +58,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -476,35 +437,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -520,7 +481,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -528,7 +489,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -536,23 +497,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -596,132 +557,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -739,7 +651,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -755,705 +667,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1462,33 +1333,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1497,15 +1368,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1574,80 +1445,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1655,7 +1526,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1663,21 +1534,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1687,98 +1558,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1787,7 +1658,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1796,7 +1667,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1806,154 +1677,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1995,10 +1866,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Russian/strings.po b/language/Russian/strings.po
index e873fed4bbb..d2c9902beb0 100644
--- a/language/Russian/strings.po
+++ b/language/Russian/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -60,393 +60,354 @@ msgstr "СброÑить вÑе"
msgid "Reload All"
msgstr "Перезагрузить вÑе"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "СоÑтоÑние"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "Выключен"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "Включен"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "Вкл"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "Выкл"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "У Ñтой ÑиÑтемы нет кнопок огонь!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "ЧаÑтота"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "УÑтройÑтва управленÑ"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "ОÑновной фильтр"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "Дополнительные фильтры"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!Производитель"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!Год"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "Удалить поÑледний фильтр"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "Добавить фильтр"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "Выберите пользовательÑкие фильтры:"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!Издатель"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!СпиÑок ПО"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!Тип уÑтройÑтва"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!Регион"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "Показать вÑе"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "Скрыть фильтры"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "Скрыть информацию / изображение"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "Скрыть оба"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "Шрифты"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "Цвета"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "Язык"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "Скрыть боковые панели"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "ПользовательÑкие наÑтройки интерфейÑа"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "по-умолчанию"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "Шрифт интерфейÑа"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "Жирный"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "Ðаклонный"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "Линии"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "ÐаÑтройки шрифта интерфейÑа"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "Обычный текÑÑ‚"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "Выделенный цвет"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "Обычный текÑÑ‚ задника"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "Выделенный цвет задника"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "Клон"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "Задний фон"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "DIP-переключатель"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "ВоÑÑтановить изначальные цвета"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "ÐаÑтройка цветов интерфейÑа"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "Кликните два раза или нажмите %1$s Ð´Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñ†Ð²ÐµÑ‚Ð°"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "ПредпроÑмотр меню"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "Обычный"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "Подпункт"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "Выделенный"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "Под мышью"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "Ðльфа"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "КраÑный"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "Зеленый"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "Синий"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "Выберите из палитры"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr "- ÐаÑтройки ARGB"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "ПредпроÑмотр цвета ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "Белый"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "СеребриÑтый"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "Серый"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "Черный"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "Оранжевый"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "Желтый"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "Фиолетовый"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "ИÑÑ‚Ð¾Ñ€Ð¸Ñ ÐŸÐž"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "ИÑпользование ПО"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "РевизиÑ: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -478,35 +439,35 @@ msgstr "Дополнительные INI-файлы"
msgid "Icons"
msgstr "Иконки"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "Читы"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "Скриншоты"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "Кабинеты"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "Буклеты"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "Титулы"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "Концовки"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "Платы"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -522,7 +483,7 @@ msgstr "Прицелы"
msgid "Artworks"
msgstr "Элементы оформлениÑ"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "БоÑÑÑ‹"
@@ -530,7 +491,7 @@ msgstr "БоÑÑÑ‹"
msgid "Artworks Preview"
msgstr "ПредпроÑмотр оформлениÑ"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "Выбор"
@@ -538,23 +499,23 @@ msgstr "Выбор"
msgid "GameOver"
msgstr "КонецИгры"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "Обучение"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "Логотипы"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "Таблицы рекордов"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "Обложки"
@@ -598,132 +559,83 @@ msgstr "Ðажмите TAB Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€Ð°"
msgid "Remove %1$s Folder"
msgstr "Убрать папку %1$s"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "Видео режим"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "Ð¢Ñ€Ð¾Ð¹Ð½Ð°Ñ Ð±ÑƒÑ„ÐµÑ€Ð¸Ð·Ð°Ñ†Ð¸Ñ"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "Ð‘Ð¸Ð»Ð¸Ð½ÐµÐ¹Ð½Ð°Ñ Ñ„Ð¸ÑŒÑ‚Ñ€Ð°Ñ†Ð¸Ñ"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "Оконный режим"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "СохранÑть пропорции"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "ÐаÑтройки видео"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "Файл уже ÑущеÑтвует - Заменить?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "Ðет"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "Да"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "Ðовый образ:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "Формат образа:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "Создать"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "Введите также раÑширение файла"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[пуÑтой Ñлот]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[Ñоздать]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[ÑпиÑок ПО]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "Выберите формат образа"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "Выберите режим доÑтупа"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "Только чтение"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "Чтение-запиÑÑŒ"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "Чтение из Ñтого образа, запиÑÑŒ в другой"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "Чтение из Ñтого образа, запиÑÑŒ в diff"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -741,7 +653,7 @@ msgstr "ЧаÑтично поддерживаетÑÑ"
msgid "[empty]"
msgstr "[пуÑто]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "ПÑевдо-терминалы"
@@ -757,332 +669,291 @@ msgstr "Ð˜Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ"
msgid "Other Controls"
msgstr "Дополнительное управление"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "СброÑ"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "Управление (общее)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "Управление (Ñта ÑиÑтема)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "Ðналоговое управление"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "DIP-переключатели"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "ÐаÑтройки ÑиÑтемы"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "СтатиÑтика игры"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ ÑиÑтеме"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ образах"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "Файловый менеджер"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "Управление лентой"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "Выбор BIOS"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "Подключаемые уÑтройÑтва"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "Сканер штрих-кодов"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "Сетевые уÑтройÑтва"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "Режим клавиатуры"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "ÐаÑтройки видео"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "ÐаÑтройки прицела"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "Читы"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "ПроÑмотр DAT-файлов"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "Добавить в Избранное"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "Удалить из Избранного"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "Выбрать новую ÑиÑтему"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "Панели управлениÑ"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "ПредпроÑмотр оформлениÑ"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "Игра Окончена"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "Добавить или удалить избранное"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "ЭкÑпорт отображаемого ÑпиÑка в файл"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "Возврат к ÑмулÑции"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "Выход"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "Возврат в предыдущее меню"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "Ðвто"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "Режим клавиатуры:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "ОбычнаÑ"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "ЭмулируетÑÑ"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (закрыт)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "Видимый Ñкран"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "Пере-выбрать поÑледнюю ÑиÑтему"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "Увеличивать Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð½Ð° правой панели"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "Отображать указатель мыши"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "Подтверждать выход"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "ПропуÑкать Ñкран Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸ÐµÐ¹"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "Принудительно 4:3 при программном Ñнимке Ñкрана"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "ИÑпользовать изображение как задний фон"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "ПропуÑкать меню выбора BIOS"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "Дополнительные наÑтройки"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xml Ñохранен в папку ui."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "ИмÑ: ОпиÑание:\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt Ñохранен в папку ui."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "ЭкÑпорт в формат XML (как -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "ЭкÑпорт в формат TXT (как -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "Сохранить наÑтройки Ñтой ÑиÑтемы"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "Плагины"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "Фильтр"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr " ^!Файл"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!КатегориÑ"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!Задать Ñвой фильтр"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "ÐаÑтройка интерфейÑа"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "ÐаÑтройки путей"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "ÐаÑтройки звука"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "Управление (общее)"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "Сохранить наÑтройки"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "ÐаÑтройки"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**Ошибка ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ ui.ini**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**Ошибка ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ %s.ini**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1092,20 +963,20 @@ msgstr ""
" ÐаÑтройки Ñохранены \n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "СпиÑок выбора - ПоиÑк: "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "Кликние два раза или нажмите %1$s Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€Ð°"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "ÐžÐ±Ñ‰Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1114,8 +985,8 @@ msgstr ""
"%s\n"
" добавлен в ÑпиÑок избранного."
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
@@ -1124,349 +995,345 @@ msgstr ""
"%s\n"
" убран из ÑпиÑка избранного."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"ОтÑутÑвует один или неÑколько ROM или CHD необходимых Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ выбранной ÑиÑтемы. "
-"ПожалуйÑта выберите другую ÑиÑтему.\n"
-"\n"
-"Ðажмите любую клавишу (кроме ESC) Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð´Ð¾Ð»Ð¶ÐµÐ½Ð¸Ñ."
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "Изменение наÑтроек"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "Ð’ целом: ÐЕ РÐБОТÐЕТ"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "Ð’ целом: Ðе ÑмулируетÑÑ Ð·Ð°Ñ‰Ð¸Ñ‚Ð°"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "В целом: Работает"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "Графика: Ðе идеально, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "Графика: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "Звук: Ðе реализован"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "Звук: Ðе идеально"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "Звук: OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "ПоддерживаетÑÑ: Ðет"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "ПоддерживаетÑÑ: ЧаÑтично"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "ПоддерживаетÑÑ: Да"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "Ð’ целом: ÐЕ РÐБОТÐЕТ\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "Ð’ целом: Ðе ÑмулируетÑÑ Ð·Ð°Ñ‰Ð¸Ñ‚Ð°\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "В целом: Работает\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "Графика: Ðе точные цвета"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "Графика: Ðе идеально\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "Графика: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "Звук: Ðе реализован\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "Звук: Ðе идеально\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "Звук: OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "Ðет информации"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "ИÑпользование"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (по-умолчанию)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "Выбор BIOS:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1475,33 +1342,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1510,15 +1377,15 @@ msgstr ""
msgid " [internal]"
msgstr " [внутренний]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "Звук"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "ЧаÑтота звука"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "ИÑпользовать внешние звуки"
@@ -1587,11 +1454,11 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1599,7 +1466,7 @@ msgstr ""
"Один или неÑколько ROMов/CHD Ñтой ÑиÑтемы не верные. Эта ÑиÑтема может "
"работать не правильно.\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1607,48 +1474,48 @@ msgstr ""
"ИмеютÑÑ Ð¸Ð·Ð²ÐµÑтные проблемы Ñ Ñтой ÑиÑтемой\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr "Один или неÑколько ROM/CHD Ñтой ÑиÑтемы не были нормально Ñдамплены.\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "ЭмулÑÑ†Ð¸Ñ ÐºÐ»Ð°Ð²Ð¸Ð°Ñ‚ÑƒÑ€Ñ‹ не 100% точнаÑ.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "Цвета не 100% точные.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "Цвета ÑовÑем не правильные.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "ЭмулÑÑ†Ð¸Ñ Ð²Ð¸Ð´ÐµÐ¾ не 100% точнаÑ.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "ЭмулÑÑ†Ð¸Ñ Ð·Ð²ÑƒÐºÐ° не 100% точнаÑ.\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "Звук не ÑмулируетÑÑ.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "Переворот Ñкрана в режиме коктейль-Ñтола не поддерживаетÑÑ.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "Этой ÑиÑтеме нужны внешние файлы оформлениÑ\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1656,7 +1523,7 @@ msgstr ""
"Разработка Ñтой ÑиÑтемы так и не была завершена. Может наблюдатьÑÑ Ñтранное "
"поведение или отÑутÑвующие Ñлементы. Это не ÑвлÑетÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°Ð¼Ð¸ ÑмулÑции.\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1664,11 +1531,11 @@ msgstr ""
"У Ñтой ÑиÑтемы нет звукового оборудованиÑ, в процеÑÑе ÑмулÑции не будет "
"никаких звуков, так и должно быть.\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr "Защита Ñтой ÑиÑтемы ÑмулируетÑÑ Ð½Ðµ полноÑтью.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1679,7 +1546,7 @@ msgstr ""
"ЭТРСИСТЕМРÐЕ РÐБОТÐЕТ. ЭмулÑÑ†Ð¸Ñ Ñтой ÑиÑтемы не завершена. Ð’Ñ‹ никак не "
"Ñможете иÑправить проблемы, лишь ждать когда разработчики улучшат ÑмулÑцию.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1687,7 +1554,7 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1697,7 +1564,7 @@ msgstr ""
"\n"
"ИзвеÑтные работающие клоны Ñтой ÑиÑтемы: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
@@ -1707,7 +1574,7 @@ msgstr ""
"\n"
"Ðажмите любую клавишу Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð´Ð¾Ð»Ð¶ÐµÐ½Ð¸Ñ"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1717,15 +1584,15 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "МГц"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "кГц"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1733,7 +1600,7 @@ msgstr ""
"\n"
"Звук:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1741,78 +1608,78 @@ msgstr ""
"\n"
"Видео:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "Ðет\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "СоÑтоÑние ÑмулÑции клавиатуры"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "Режим: ЧаÑÑ‚Ð¸Ñ‡Ð½Ð°Ñ ÑмулÑциÑ"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "UI: Включен"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**Ðажмите ScrLock Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "Режим: ÐŸÐ¾Ð»Ð½Ð°Ñ ÑмулÑциÑ"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "UI: Выключен"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "Ðвто-огонь не может быть включен"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "Укажите Ñлот ÑохранениÑ"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "Укажите Ñлот загрузки"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "Сохранение отменено"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "Загрузка отменена"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "Сохранение ÑоÑтоÑÐ½Ð¸Ñ %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "Загрузка ÑоÑтоÑÐ½Ð¸Ñ %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1821,7 +1688,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "ÐžÐ±Ñ‰Ð°Ñ Ð³Ñ€Ð¾Ð¼ÐºÐ¾Ñть"
@@ -1830,7 +1697,7 @@ msgstr "ÐžÐ±Ñ‰Ð°Ñ Ð³Ñ€Ð¾Ð¼ÐºÐ¾Ñть"
msgid "%1$s Volume"
msgstr "%1$s ГромкоÑть"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "Разгон процеÑÑора %1$s"
@@ -1840,154 +1707,154 @@ msgstr "Разгон процеÑÑора %1$s"
msgid "%1$s Refresh Rate"
msgstr "%1$s ЧаÑтота обновлениÑ"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$s ЯркоÑть"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$s КонтраÑÑ‚"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "%1$s Гамма"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "Мерцание луча"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð° луча"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "МакÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð° луча"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "ÐаÑыщенноÑть луча"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "Экран"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -2029,10 +1896,69 @@ msgstr "Урезанный"
msgid "Full"
msgstr "Полный"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " ЦВЕТÐ"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
+
+#~ msgid "Device Mapping"
+#~ msgstr "УÑтройÑтва управленÑ"
+
+#~ msgid "Video Mode"
+#~ msgstr "Видео режим"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "Ð¢Ñ€Ð¾Ð¹Ð½Ð°Ñ Ð±ÑƒÑ„ÐµÑ€Ð¸Ð·Ð°Ñ†Ð¸Ñ"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Ð‘Ð¸Ð»Ð¸Ð½ÐµÐ¹Ð½Ð°Ñ Ñ„Ð¸ÑŒÑ‚Ñ€Ð°Ñ†Ð¸Ñ"
+
+#~ msgid "Window Mode"
+#~ msgstr "Оконный режим"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "СохранÑть пропорции"
+
+#~ msgid "Display Options"
+#~ msgstr "ÐаÑтройки видео"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "ОтÑутÑвует один или неÑколько ROM или CHD необходимых Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ "
+#~ "выбранной ÑиÑтемы. ПожалуйÑта выберите другую ÑиÑтему.\n"
+#~ "\n"
+#~ "Ðажмите любую клавишу (кроме ESC) Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð´Ð¾Ð»Ð¶ÐµÐ½Ð¸Ñ."
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Пере-выбрать поÑледнюю ÑиÑтему"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Увеличивать Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð½Ð° правой панели"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Отображать указатель мыши"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "Подтверждать выход"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "ПропуÑкать Ñкран Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸ÐµÐ¹"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "Принудительно 4:3 при программном Ñнимке Ñкрана"
+
+#~ msgid "Use image as background"
+#~ msgstr "ИÑпользовать изображение как задний фон"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "ПропуÑкать меню выбора BIOS"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "Дополнительные наÑтройки"
diff --git a/language/Serbian/strings.po b/language/Serbian/strings.po
index f21e76216e0..eb7957cac6d 100644
--- a/language/Serbian/strings.po
+++ b/language/Serbian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-03-02 21:46+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -60,394 +60,355 @@ msgstr "Resetuji sve"
msgid "Reload All"
msgstr "Ponovo uÄitaj sve"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "Stanje automatskog pucanja"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "Onemogućeno"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "Omogućeno"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "UkljuÄeno"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "IskljuÄeno"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "Nema tastera na ovoj mašini!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "Zadrška automatskog pucanja"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "Dodeljivanje Lightgun uređaja"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "Dodeljivanje Trackball uređaja"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "Dodeljivanje pedale"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "Dodeljivanje analogne upravljaÄke palice (džojstika)"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "Dodeljivanje rotacionog upravljaÄa s tasterom"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "Dodeljivanje rotacionog upravljaÄa"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "Dodeljivanje uređaja za pozicioniranje"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "Dodeljivanje miša"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "Mapiranje uređaja"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "Glavni filter"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "Drugi filter"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!ProizvoÄ‘aÄ"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!Godina"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "Ukloni poslednji filter"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "Dodaj filter"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "Izbor proizvoljnih filtera"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!IzdavaÄ"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!Lista programa"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!Tip uredjaja"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!Region"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "Prikaži sve"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "Sakrij filtere"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "Sakrij Info/Sliku"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "Sakrij oboje"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "Fontovi"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "Boje"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "Jezici"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "Prikaži boÄne panele"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "PodeÅ¡avanja korisniÄkog interfejsa"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "uobiÄajeno"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "Font korisniÄkog interfejsa"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "Podebljano"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "Iskošeno"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "Linije"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "Visina teksta za informacije"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "PodeÅ¡avanje fontova za korisniÄki interfejs"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
"Primer teksta - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "Normalni tekst"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "Boja izabranog"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "Pozadina normalnog teksta"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "Boja pozadine za izabranu stavku"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "Boja pod-stavke"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "Kloniraj"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "Granica"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "Pozadina"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "DIP prekidaÄ"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "Boja za nedostupno"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "Boja klizaÄa"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "GrafiÄki prikaz pozadine"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "Boja pri prelasku miša"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "Boja pozadine pri prelasku miša"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "Boja pri pritisku miša"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "Boja pozadine miša"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "Vrati originalne boje"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "PodeÅ¡avanje boja korisniÄkog interfejsa"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "Dupli klik ili pritisnite %1$s da promenite boju"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "Probni prikaz menija"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "Normalno"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "Pod-stavka"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "Izabrano"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "Prelay mišem"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "Alfa"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "Crvenа"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "Zelenа"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "Plavа"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "Izabrati iz palete"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr " - ARGB podešavanja"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "Prikaz boja ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "Bela"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "Srebrna"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "Siva"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "Crna"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "Narandžasta"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "Žuta"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "LjubiÄasta"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "Istorija softvera"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "Upotreba softvera"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "Revizija"
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "Istorija"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "МÐМЕ - informacije"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "МESS - informacije"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "Systemske informacije"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "Mamescore"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr "Inicijalizacija"
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "Komanda"
@@ -479,35 +440,35 @@ msgstr "Dodatni INI fajlovi"
msgid "Icons"
msgstr "Ikone"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "Varanja"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "Snimci ekrana"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "Kabineti"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "Letci"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "Naslovni ekrani"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "Ekrani završetka igre"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "PCB (Å¡tampane ploÄice)"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr "Posteri iznad kabineta"
@@ -523,7 +484,7 @@ msgstr "Nišani"
msgid "Artworks"
msgstr "Ilustracije"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "Finalni protivnici"
@@ -531,7 +492,7 @@ msgstr "Finalni protivnici"
msgid "Artworks Preview"
msgstr "Umanjeni prikaz ilustracija"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "Izborni ekrani"
@@ -539,23 +500,23 @@ msgstr "Izborni ekrani"
msgid "GameOver"
msgstr "Neuspešan kraj igre"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "Uputstvo"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "Logoi"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "Najbolji rezultata"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr "Versus ekrani"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "Maske"
@@ -599,138 +560,89 @@ msgstr "Pritisnite TAB da podesite"
msgid "Remove %1$s Folder"
msgstr "Ukloni %1$s direktorijum"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "Video mod"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "Trostruko baferovanje"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "Bilinearni filter"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "Pre-skaliranje"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "Izvršavaj u prozoru"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "Forsiraj odnos stranica"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "Startuj maksimizovano"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "Sinhronizovano osvežavanje"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "ÄŒekaj vertikalnu sinhronizaciju"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "Opcije prikaza"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "Fajl već postoji - prepiši?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "Ne"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "Da"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "Novo ime:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "Format zapisa:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "Kreiraj"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "Molim unesite i ekstenziju"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[prazan slot]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[kreiraj]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[lista programa]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "Odaberi format"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "Odaberi mod pristupa"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "Samo Äitanje"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "ÄŒitanje-pisanje"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "Čitaj ovaj fajl, piši u drugi"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "Čitaj ovaj fajl, piši razlike"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "Nemoguće snimiti preko direktorijuma"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
msgstr ""
-"Odabranom programu nedostaje jedan ili više ROM ili CHD fajlova. "
-"Molim odaberite drugi."
+"Odabranom programu nedostaje jedan ili više ROM ili CHD fajlova. Molim "
+"odaberite drugi."
#: src/emu/ui/info.cpp:98
msgid "Not supported"
@@ -744,7 +656,7 @@ msgstr "DelimiÄno podržano"
msgid "[empty]"
msgstr "[prazno]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "Pseudo terminali"
@@ -760,164 +672,168 @@ msgstr "KorisniÄki interfejs"
msgid "Other Controls"
msgstr "Ostale kontrole"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "Resetuj"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "Podešavanje kontrola (globalno)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "Podešavanje kontrola (ova mašina)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "Analogne kontrole"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "DIP prekidaÄi"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "Konfiguracija mašine"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "Informacije o statistici mašine"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "Informacije o mašini"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "Informacije o programu"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "Upravljanje fajlovima"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "Kontrola trake"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "Izbor BIOS-a"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "Slot uređaji"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "Barkod ÄitaÄ"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "Mrežni uređaji"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "Mod tastature"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "Kontrole klizaÄa"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "Video opcije"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "Opcije nišana"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "Varanje"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "Prikaz spoljašnjeg DAT"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "Dodaj u listu omiljenih"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "Izbriši iz liste omiljenih"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "Izaberi novu mašinu"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "Kontrolni panel"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "Pregled artwork-a"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "Završni ekran igre"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "Dodavanje ili uklanjanje omiljenih"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "Eksportuj prikazanu listu u fajl"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "Prikaži DAT"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "Podešavanje kontrola (ova mašina)"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "Izlaz"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "Povratak u prethodni meni"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "Automatski"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "Programi"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "Informacije"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "Mod tastature:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "Prirodni"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "Emulirani"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
@@ -926,7 +842,7 @@ msgstr ""
"Vreme rada: %1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
@@ -935,7 +851,7 @@ msgstr ""
"Vreme rada: %1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -944,154 +860,109 @@ msgstr ""
"Izdate karte: %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "Žeton %1$c: NA%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "Žeton %1$c: %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (zakljuÄano)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "Vidljivo kašnjenje"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "Ponovo izaberi poslednju mašinu na kojoj se igralo"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "Uvećaj slike na desnom panelu"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "Informacije o DAT-u"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "Prikaži pokazivaÄ miÅ¡a"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "Potvrdite izlazak iz mašina"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "PreskoÄi prikazivanje informacionog ekrana na poÄetku"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "Koristi 4:3 prikaz za snimke ekrana programa"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "Koristi sliku kao pozadinu"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "PreskoÄi meni sa izborom BIOS-a"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "PreskoÄi meni sa izborom softverskih delova"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "Razne opcije"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xml saÄuvan u ui direktorijum."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "Ime: Opis:\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt saÄuvan u ui direktorijum."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "Izvezi XML format (kao -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "Izvezi TXT format (kao -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "SaÄuvaj konfiguraciju maÅ¡ine"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "Dodatci"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "Filter"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr " ^!Fajl"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!Kategorija"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!Pripremi filter"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "Prilagodi korisniÄki interfejs"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "Konfiguracija direktorijuma"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "Opcije za zvuk"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "Globalne kontrole"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "SaÄuvaj konfiguraciju"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "Podešavanja"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**Greška prilikom snimanja ui.ini**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**Greška prlikom zapisivanja %s.ini**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1101,20 +972,20 @@ msgstr ""
" Konfiguracija saÄuvana \n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "Izborna lista - pretraga:"
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "Dupli klik ili pritisnite %1$s za selektovanje"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "Opšte informacije"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1123,8 +994,8 @@ msgstr ""
"%s\n"
" dodato u listu omiljenih"
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
@@ -1133,268 +1004,264 @@ msgstr ""
"%s\n"
" izbrisano iz liste omiljenih."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Izabrana mašina nestoaje jedan ili više neophodnih ROM ili CHD rezervnih "
-"kopija. Molimo Vas izaberiti drugu mašinu.\n"
-"\n"
-"Pritisnite bilo koji taster (osim ESC) za nastavak."
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "Konfiguracija opcija"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d mašine (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr "%1$s (%2$s - %3$s) - "
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s Pretraga: %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "ROM skup: %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr "%1$s, %2$-.100s"
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "Drajver je klon od: %1$-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "Drajver je osnovni"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "Uopšteno: NE RADI"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "Uopšteno: Zaštita nije emulirana"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "Uopšteno: radi"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "Grafika: nesavršena, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "Grafika: OK, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "Zvuk: nije implementiran"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "Zvuk: nesavršen"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "Zvuk: OK"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "Sistem: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "Softver je klon od: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "Softver je predak"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "Podržano: ne"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "Podržano: delimiÄno"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "Podržano: da"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "ROM skup: %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr "%1$s %2$s"
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "ROM skup: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "Godina: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "ProizvoÄ‘aÄ: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "Drajver je klon od: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "Drajver je predak\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "Uopšteno: NE RADI\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "Uopšteno: Zaštita nije emulirana\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "Uopšteno: radi\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "Grafika: nesavršene boje\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "Grafika: nesavršena\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "Grafika: OK\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "Zvuk: nije implementiran\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "Zvuk: nesavršen\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "Zvuk: OK\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "Drajver je \"skelet\": %s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "Igra je mehaniÄka: %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "Zahteva ilustracije: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "Zahteva klik ilustracije: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "Podržava \"koktel\" mod: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "Drajver je BIOS: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "Podržava snimanje stanja igre: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "Orijentacija ekrana: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "Vertikalno"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "Horizontalno"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "Zahteva CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "Provera ROM-ova: OK\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "Provera ROM-ova: neuspešna\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "Provera semplova: nije neophodna\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "Provera semplova: OK\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "Provera semplova: neuspešna\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1402,86 +1269,82 @@ msgstr ""
"Provera ROM-ova: onemogućena\n"
"Provera semplova: onemogućena\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "Informacije nisu dostupne"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "Upotreba"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (uobiÄajeno)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Selektovanom programu nedostaje jedan ili više fajlova. Molim selektujte "
-"drugi program.\n"
-"\n"
-"Pritisnite bilo koji taster (osim ESC) za nastavak."
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d softveri )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr "Drajver: \"%1$s\" lista softvera "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "Oblast: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "IzdavaÄ: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "Godina: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "Lista softvera : %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "Tip uređaja: %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s Pretraga: %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "Izbor dela softvera:"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "Izbor BIOS-a:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1495,33 +1358,33 @@ msgstr ""
"Ako je ovo Vaš prvi put da koristite %2$s, molimo Vas pogledajte config.txt "
"fajl u docs direktorijumu za informacije o podešavanju %2$s."
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "Otkucajte ime ili izaberite: %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "Otkucajte ime ili izaberite: (nasumiÄan izbor)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr "Drajver: %1$-.100s"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "Nesavršeno"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr "OK"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "Nije implementirano"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "Grafika: %s, zvuk: %s"
@@ -1530,15 +1393,15 @@ msgstr "Grafika: %s, zvuk: %s"
msgid " [internal]"
msgstr " [interno]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "Zvuk"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "UÄestalost uzorkovanja"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "Koristi dodatne semplove"
@@ -1607,11 +1470,11 @@ msgstr "Premotaj"
msgid "Fast Forward"
msgstr "Premotaj u napred"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr "Za ovaj drajver je neophodno da slike budu uÄitane u sledeće ureÄ‘aje:"
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1619,7 +1482,7 @@ msgstr ""
"Jedan ili više ROM/CHD fajlova za ovu mašinu su neispravni. Mašina možda "
"neće ispravno raditi.\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1627,49 +1490,49 @@ msgstr ""
"Postoje poznati problemi s ovom mašinom\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
"Jedan ili više ROM/CHD fajlova za ovu mašinu nisu ispravno napravljeni.\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "Emulacija tastature možda nije 100% taÄna.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "Boje nisu 100% taÄne.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "Boje su potpuno pogrešne.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "Video emulacija nije 100% taÄna.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "Emulacija zvuka nije 100% taÄna.\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "Mašini nedostaje zvuk.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "Obrtanje ekrana u \"koktel\" modu nije podržano.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "Mašina zahteva dodatne ilustracione fajlove\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1677,7 +1540,7 @@ msgstr ""
"MaÅ¡sina nije nikad zavrÅ¡ena. Može se javiti Äudno ponaÅ¡anje ili nedostatak "
"elemenata sto ne predstavlja problem s emulacijom.\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1685,11 +1548,11 @@ msgstr ""
"MaÅ¡ina ne poseduje ureÄ‘aj za zvuk, MAME neće puÅ¡tati zvuk, ovo je oÄekivano "
"ponašanje.\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr "Mašina ima zaštitu koja nije potpuno emulirana.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1700,7 +1563,7 @@ msgstr ""
"OVA MAŠINA NE RADI. Emulacija ove mašine još nije potpuna. Ne možete ništa "
"uraditi u vezi s tim, osim da saÄekate programere da unaprede emulaciju.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1712,7 +1575,7 @@ msgstr ""
"interakciju ili se sastoje od mehaniÄkih ureÄ‘aja. Nemoguće je igrati se na "
"ovoj mašini u potpunosti.\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1722,7 +1585,7 @@ msgstr ""
"\n"
"Postoji klonovi ove mašine koji rade: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
@@ -1732,7 +1595,7 @@ msgstr ""
"\n"
"Pritsnite bilo koji taster za nastavak"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1747,15 +1610,15 @@ msgstr ""
"\n"
"CPU:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1763,7 +1626,7 @@ msgstr ""
"\n"
"Zvuk:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1771,80 +1634,80 @@ msgstr ""
"\n"
"Video:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
"Nijedan\n"
"\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "Vektor"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "Stanje emulacije tastature"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "Mod: DELIMIÄŒNA emulacija"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "KorisniÄki interfejs: omogućen"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**Koristite ScrLock da promenite radno stanje**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "Mod: POTPUNA emulacija"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "KorisniÄki interfejs: onesposobljen"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "Automatsko pucanje ne može da se omogući"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "Izaberite poziciju na koju želite da snimite"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "Izaberite poziciju sa koje želite da uÄitate"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "ÄŒuvanje stanja igre otkazano"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "UÄitavanje stanja igre otkazano"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "SaÄuvaj na poziciju %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "UÄitaj sa pozicije %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1857,7 +1720,7 @@ msgstr ""
"Pritisnite ''%s'' za napuštanje programa,\n"
"Pritisnite ''%s'' za nastavak emulacije."
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "Glavna jaÄina zvuka"
@@ -1866,7 +1729,7 @@ msgstr "Glavna jaÄina zvuka"
msgid "%1$s Volume"
msgstr "%1$s jaÄina zvuka"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "Ubrzanje osnovnog takta CPU %1$s"
@@ -1876,154 +1739,154 @@ msgstr "Ubrzanje osnovnog takta CPU %1$s"
msgid "%1$s Refresh Rate"
msgstr "%1$s frekvencija osvežavanja"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$s osvetljenost"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$s kontrast"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "%1$s gama"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "%1$s rastezanje po horizontali"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "%1$s horizontalna pozicija"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "%1$s rastezanje po vertikali"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "%1$s vertikalna pozicija"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "Laserdisc '%1$s' rastezanje po horizontali"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "Laserdisc '%1$s' horizontalna pozicija"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "Laserdisc '%1$s' rastezanje po vertikali"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "Laserdisc '%1$s' vertikalna pozicija"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "Treperenje vektora"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "Minimalna širina snopa"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "Maksimalna širinia snopa"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "Intenzitet snopa"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "Razmera nišana %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr "X"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr "Y"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "Pomeraj nišana %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr "%1$3ddB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr "%1$.3ffps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "Ekran '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "Ekran"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "Razmera nišana X %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "Razmera nišana Y %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "Pomeraj nišana X %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "Pomeraj nišana Y %1$1.3f"
@@ -2065,10 +1928,122 @@ msgstr "OdseÄeno"
msgid "Full"
msgstr "Potpuno"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " BOJE"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " OLOVKE"
+
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "Dodeljivanje Lightgun uređaja"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "Dodeljivanje Trackball uređaja"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "Dodeljivanje pedale"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "Dodeljivanje analogne upravljaÄke palice (džojstika)"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "Dodeljivanje rotacionog upravljaÄa s tasterom"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "Dodeljivanje rotacionog upravljaÄa"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "Dodeljivanje uređaja za pozicioniranje"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "Dodeljivanje miša"
+
+#~ msgid "Device Mapping"
+#~ msgstr "Mapiranje uređaja"
+
+#~ msgid "Video Mode"
+#~ msgstr "Video mod"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "Trostruko baferovanje"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Bilinearni filter"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "Pre-skaliranje"
+
+#~ msgid "Window Mode"
+#~ msgstr "Izvršavaj u prozoru"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "Forsiraj odnos stranica"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "Startuj maksimizovano"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "Sinhronizovano osvežavanje"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "ÄŒekaj vertikalnu sinhronizaciju"
+
+#~ msgid "Display Options"
+#~ msgstr "Opcije prikaza"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Izabrana mašina nestoaje jedan ili više neophodnih ROM ili CHD rezervnih "
+#~ "kopija. Molimo Vas izaberiti drugu mašinu.\n"
+#~ "\n"
+#~ "Pritisnite bilo koji taster (osim ESC) za nastavak."
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Selektovanom programu nedostaje jedan ili više fajlova. Molim selektujte "
+#~ "drugi program.\n"
+#~ "\n"
+#~ "Pritisnite bilo koji taster (osim ESC) za nastavak."
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Ponovo izaberi poslednju mašinu na kojoj se igralo"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Uvećaj slike na desnom panelu"
+
+#~ msgid "DATs info"
+#~ msgstr "Informacije o DAT-u"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Prikaži pokazivaÄ miÅ¡a"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "Potvrdite izlazak iz mašina"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "PreskoÄi prikazivanje informacionog ekrana na poÄetku"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "Koristi 4:3 prikaz za snimke ekrana programa"
+
+#~ msgid "Use image as background"
+#~ msgstr "Koristi sliku kao pozadinu"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "PreskoÄi meni sa izborom BIOS-a"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "PreskoÄi meni sa izborom softverskih delova"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "Razne opcije"
diff --git a/language/Serbian_Cyrillic/strings.po b/language/Serbian_Cyrillic/strings.po
index 87eef55b6e4..14b94e24978 100644
--- a/language/Serbian_Cyrillic/strings.po
+++ b/language/Serbian_Cyrillic/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-23 12:43+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -60,394 +60,355 @@ msgstr "РeÑeтуjи Ñвe"
msgid "Reload All"
msgstr "Поново учитаj Ñвe"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "Стањe аутоматÑког пуцања"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "Онeмогућeно"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "Омогућeно"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "Укључeно"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "ИÑкључeно"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "Ðeма таÑÑ‚eра на овоj машини!"
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "Задршка аутоматÑког пуцања"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "Додeљивањe Lightgun урeђаjа"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "Додeљивањe Trackball урeђаjа"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "Додeљивањe пeдалe"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "Додeљивањe аналогнe управљачкe палицe (џоjÑтика)"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "Додeљивањe ротационог управљача Ñ Ñ‚Ð°ÑÑ‚eром"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "Додeљивањe ротационог управљача"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "Додeљивањe урeђаjа за позиционирањe"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "Додeљивањe миша"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "Мапирањe урeђаjа"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "Главни филтeр"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "Други филтeр"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!Произвођач"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!Година"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "Уклони поÑлeдњи филтeÑ€"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "Додаj филтeр"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "Избор произвољних филтeра"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!Издавач"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!ЛиÑта програма"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!Тип уређаја"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!Регион"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "Прикажи Ñвe"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "Сакриj филтeрe"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "Сакриj Инфо/Слику"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "Сакриj обоje"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "Фонтови"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "Боje"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "Јeзици"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "Прикажи бочнe панeлe"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "Подeшавања кориÑничког интeрфejÑа"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "уобичаjeно"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "Фонт кориÑничког интeрфejÑа"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "Подeбљано"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "ИÑкошeно"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "Линиje"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "ВиÑина Ñ‚eкÑта за информациje"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "Подeшавање фонтова за кориÑнички интeрфejÑ"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
"ПримeÑ€ Ñ‚eкÑта - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "Ðормални Ñ‚eкÑÑ‚"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "Боjа изабраног"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "Позадина нормалног Ñ‚eкÑта"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "Боjа позадинe за изабрану Ñтавку"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "Боjа подÑтавкe"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "Клонираj"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "Граница"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "Позадина"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "DIP прeкидач"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "Боjа за нeдоÑтупно"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "Боjа клизача"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "Графички приказ позадине"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "Боjа при прeлаÑку миша"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "Боjа позадинe при прeлаÑку миша"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "Боја при притиÑку миша"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "Боја позадине миша"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "Врати оригиналнe боje"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "Подeшавање боjа кориÑничког интeрфejÑа"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "Дупли клик или притиÑните %1$s да промените боју"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "Пробни приказ мeниjа"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "Ðормално"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "Под-Ñтавка"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "Изабрано"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "Прeлаз мишeм"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "Ðлфа"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "Црвена"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "Зелена"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "Плава"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "Изабрати из палeтe"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr " - ARGB подeшавања"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "Пробни приказ боjа ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "Бела"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "Сребрна"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "Сива"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "Црна"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "ÐаранџаÑта"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "Жута"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "ЉубичаÑта"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "ИÑториjа Ñофтвeра"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "Употрeба Ñофтвeра"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "Рeвизиjа"
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "ИÑториjа"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "MAME - информациje"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "MESS - информациje"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "СиÑÑ‚eмÑкe информациje"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "МамeÑцорe"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr "Иницијализација"
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "Команда"
@@ -479,35 +440,35 @@ msgstr "Додатни INI фаjлови"
msgid "Icons"
msgstr "Иконe"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "Варања"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "Снимци eкрана"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "Кабинeти"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "Лeтци"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "ÐаÑловни eкрани"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "Екрани завршeтка игрe"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "PCB (штампанe плочицe)"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr "ПоÑÑ‚eри изнад кабинeта"
@@ -523,7 +484,7 @@ msgstr "Ðишани"
msgid "Artworks"
msgstr "ИлуÑтрациje"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "Финални противници"
@@ -531,7 +492,7 @@ msgstr "Финални противници"
msgid "Artworks Preview"
msgstr "Умањeни приказ илуÑтрациjа"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "Изборни eкрани"
@@ -539,23 +500,23 @@ msgstr "Изборни eкрани"
msgid "GameOver"
msgstr "ÐeуÑпeшан краj игрe"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "УпутÑтво"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "Логои"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "Ðаjбољи Ñ€eзултати"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr "Ð’eÑ€ÑÑƒÑ eкрани"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "МаÑке"
@@ -599,138 +560,89 @@ msgstr "ПритиÑнитe TAB да подeÑитe"
msgid "Remove %1$s Folder"
msgstr "Уклони %1$s дирeкториjум"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "Видео мод"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "ТроÑтруко баферовање"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "Билинеарни филтер"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "Пре-Ñкалирање"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "Извршавај у прозору"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "ФорÑирај Ð¾Ð´Ð½Ð¾Ñ Ñтраница"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "Стартуј макÑимизовано"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "Синхронизовано оÑвежавање"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "Чекај вертикалну Ñинхронизацију"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "Опциje приказа"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "Фајл већ поÑтоји - препиши?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "Ðe"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "Да"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "Ðово име:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "Формат запиÑа:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "Креирај"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "Молим унеÑите и екÑтензију"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[празан Ñлот]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[креирај]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[лиÑта програма]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "Одабери формат"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "Одабери мод приÑтупа"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "Само читање"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "Читање-пиÑање"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "Читај овај фајл, пиши у други"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "Читај овај фајл, пиши разлике"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "Ðемогуће Ñнимити преко директоријума"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
msgstr ""
-"Одабраном програму недоÑтаје један или више ROM или CHD фајлова. "
-"Молим одаберите други."
+"Одабраном програму недоÑтаје један или више ROM или CHD фајлова. Молим "
+"одаберите други."
#: src/emu/ui/info.cpp:98
msgid "Not supported"
@@ -744,7 +656,7 @@ msgstr "Делимично подржано"
msgid "[empty]"
msgstr "[празно]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "ПÑeудо Ñ‚eрминали"
@@ -760,164 +672,168 @@ msgstr "КориÑнички интерфејÑ"
msgid "Other Controls"
msgstr "ОÑтале контроле"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "РeÑeтуj"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "Подeшавање контрола (глобално)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "Подeшавање контрола (ова машина)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "Ðналогнe контролe"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "DIP прeкидачи"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "Конфигурациjа машинe"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "Информациje о књиговодÑтву машинe"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "Информациje о машини"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "Информациje о Ñлици"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "Управљање фајловима"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "Контрола тракe"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "Избор BIOS-а"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "Слот уређаји"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "Баркод читач"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "Мрeжни урeђаjи"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "Мод таÑтатурe"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "Контролe клизача"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "Видeо опциje"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "Опциje нишана"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "Варањe"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "Приказ Ñпољашњeг DAT"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "Додаj у лиÑту омиљeних"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "Избриши из лиÑÑ‚e омиљeних"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "Изабeри нову машину"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "Контролни панел"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "Преглед artwork-a"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "Завршни екран игре"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "Додавање или уклањање омиљених"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "ЕкÑпортуј приказану лиÑту у фајл"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "Прижи DAT"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "Подeшавање контрола (ова машина)"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "Излаз"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "Повратак у прeтходни мeни"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "ÐутоматÑки"
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "Програми"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "Информације"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "Мод таÑтатурe:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "Природни"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "Емулирани"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
@@ -926,7 +842,7 @@ msgstr ""
"Врeмe рада: %1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
@@ -935,7 +851,7 @@ msgstr ""
"Врeмe рада: %1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -944,154 +860,109 @@ msgstr ""
"Издатe картe: %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "Жeтон %1$c: NA%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "Жeтон %1$c: %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (закључано)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "Видљиво кашњeњe"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "Поново изабeри поÑлeдњу машину на коjоj Ñe играло"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "Увeћаj Ñликe на дeÑном панeлу"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "Информациje из Dat-a"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "Прикажи показивач миша"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "Потврдитe излазак из машина"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "ПрeÑкочи приказивањe информационог eкрана на почeтку"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "КориÑти 4:3 приказ за Ñнимкe eкрана програма"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "КориÑти Ñлику као позадину"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "ПрeÑкочи мeни Ñа избором БИОС-а"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "ПрeÑкочи мeни Ñа избором ÑофтвeÑ€Ñких дeлова"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "Разнe опциje"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xml Ñачуван у уи дирeкториjум."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "Имe: ОпиÑ:\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt Ñачуван у ui дирeкториjум."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "Извeзи XML формат (као -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "Извeзи ТXТ формат (као -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "Сачуваj конфигурациjу машинe"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr "Додатци"
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "Филтeр"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr " ^!Фајл"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!Категорија"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!Припреми филтер"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "Прилагоди кориÑнички интeрфejÑ"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "Конфигурациjа дирeкториjума"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "Опциje за звук"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "Глобалнe контролe"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "Сачуваj конфигурациjу"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "Подeшавања"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**Грeшка приликом Ñнимања ui.ini**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "**Грeшка прликом запиÑивања %s.ini**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1101,20 +972,20 @@ msgstr ""
" Конфигурациjа Ñачувана \n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "Изборна лиÑта - прeтрага:"
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "Дупли клик или притиÑните %1$s за Ñелектовање"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "Општe информациje"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1123,8 +994,8 @@ msgstr ""
"%s\n"
" додато у лиÑту омиљeних"
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
@@ -1133,268 +1004,264 @@ msgstr ""
"%Ñ\n"
" избриÑано из лиÑÑ‚e омиљeних."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Изабрана машина нeÑтоаje jeдан или вишe нeопходних РОМ или ЦХД Ñ€eзeрвних "
-"копиjа. Молимо Ð’Ð°Ñ Ð¸Ð·Ð°Ð±eрити другу машину.\n"
-"\n"
-"ПритиÑнитe било коjи таÑÑ‚eÑ€ (оÑим ESC) за наÑтавак."
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "Конфигурациjа опциjа"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d машинe (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr "%1$s (%2$s - %3$s) - "
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s Прeтрага: %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "ROM Ñкуп: %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "Драjвeр je клон од: %1$-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "ДраjвeÑ€ je оÑновни"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "Уопштeно: ÐЕ РÐДИ"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "Уопштeно: Заштита ниje eмулирана"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "Уопштeно: ради"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "Графика: нeÑавршeна, "
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "Графика: ОК, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "Звук: ниje имплeмeнтиран"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "Звук: нeÑавршeн"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "Звук: ОК"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "СиÑÑ‚eм: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "Софтвeр je клон од: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "Софтвeр je прeдак"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "Подржано: нe"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "Подржано: дeлимично"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "Подржано: да"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "РОМ Ñкуп: %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "РОМ Ñкуп: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "Година: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "Произвођач: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "Драjвeр je клон од: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "Драjвeр je прeдак\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "Уопштeно: ÐЕ РÐДИ\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "Уопштeно: Заштита ниje eмулирана\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "Уопштeно: ради\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "Графика: нeÑавршeнe боje\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "Графика: нeÑавршeна\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "Графика: ОК\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "Звук: ниje имплeмeнтиран\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "Звук: нeÑавршeн\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "Звук: ОК\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "ДраjвeÑ€ je \"Ñкелет\": %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "Игра je мeханичка: %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "Захтeва илуÑтрациje: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "Захтeва клик илуÑтрациje: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "Подржава \"коктeл\" мод: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "Драjвeр je BIOS: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "Подржава Ñнимањe Ñтања игрe: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "Ориjeнтациjа eкрана: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "Вeртикално"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "Хоризонтално"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "Захтeва CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "Провeра ROM-ова: ОК\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "Провeра ROM-ова: нeуÑпeшна\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "Провeра Ñeмплова: ниje нeопходна\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "Провeра Ñeмплова: ОК\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "Провeра Ñeмплова: нeуÑпeшна\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1402,86 +1269,82 @@ msgstr ""
"Провeра РОМ-ова: онeмогућeна\n"
"Провeра Ñeмплова: онeмогућeна\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "Информациje ниÑу доÑтупнe"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "Употрeба"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (уобичаjeно)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Селектованом програму недоÑтаје један или више фајлова. Молим Ñелектујте "
-"други програм.\n"
-"\n"
-"ПритиÑните било који таÑтер (оÑим ESC) за наÑтавак."
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d Ñофтвeри )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr "ДраjвeÑ€: \"%1$s\" лиÑта Ñофтвeра "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "ОблаÑÑ‚: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "Издавач: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "Година: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "ЛиÑта Ñофтвeра : %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "Тип урeђаjа: %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s Прeтрага: %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "Избор дeла Ñофтвeра:"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "Избор BIOS-а:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1495,33 +1358,33 @@ msgstr ""
"Ðко je ово Ваш први пут да кориÑтитe %2$s, молимо Ð’Ð°Ñ Ð¿Ð¾Ð³Ð»eдаjÑ‚e config.txt "
"фаjл у docs дирeкториjуму за информациje о подeшавању %2$s."
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "Откуцаjтe имe или изабeритe: %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "ОткуцаjÑ‚e имe или изабeритe: (наÑумичан избор)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr "Драjвeр: %1$-.100s"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "ÐeÑавршeно"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr "ОК"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "Ðиje имплeмeнтирано"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "Графика: %s, звук: %s"
@@ -1530,15 +1393,15 @@ msgstr "Графика: %s, звук: %s"
msgid " [internal]"
msgstr " [интeрно]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "Звук"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "УчeÑталоÑÑ‚ узорковања"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "КориÑти додатнe Ñeмпловe"
@@ -1607,11 +1470,11 @@ msgstr "Премотај"
msgid "Fast Forward"
msgstr "Премотај у напред"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr "За оваj драjвeÑ€ je нeопходно да Ñликe буду учитанe у ÑлeдeÑ›e урeђаje:"
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1619,7 +1482,7 @@ msgstr ""
"Јeдан или вишe ROM/CHD фаjлова за ову машину Ñу нeиÑправни. Машина можда "
"нeÑ›e иÑправно радити.\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1627,49 +1490,49 @@ msgstr ""
"ПоÑтоje познати проблeми Ñ Ð¾Ð²Ð¾Ð¼ машином\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
"Јeдан или вишe ROM/CHD фаjлова за ову машину ниÑу иÑправно направљeни.\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "Емулациjа таÑтатурe можда ниje 100% тачна.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "Боje ниÑу 100% тачнe.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "Боje Ñу потпуно погрeшнe.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "Видeо eмулациjа ниje 100% тачна.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "Емулациjа звука ниje 100% тачна.\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "Машини нeдоÑтаje звук.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "Обртањe eкрана у \"коктeл\" моду ниje подржано.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "Машина захтeва додатнe илуÑтрационe фаjловe\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1677,7 +1540,7 @@ msgstr ""
"МашÑина ниje никад завршeна. Можe Ñe jавити чудно понашањe или нeдоÑтатак "
"eлeмeната Ñто нe прeдÑтавља проблeм Ñ eмулациjом.\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1685,11 +1548,11 @@ msgstr ""
"Машина нe поÑeдуje урeђаj за звук, МÐМЕ нeÑ›e пуштати звук, ово je очeкивано "
"понашањe.\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr "Машина има заштиту коjа ниje потпуно eмулирана.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1700,7 +1563,7 @@ msgstr ""
"ОВРМÐШИÐÐ ÐЕ РÐДИ. Емулациjа овe машинe jош ниje потпуна. Ðe можeÑ‚e ништа "
"урадити у вeзи Ñ Ñ‚Ð¸Ð¼, оÑим да Ñачeкатe програмeÑ€e да унапрeдe eмулациjу.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1712,7 +1575,7 @@ msgstr ""
"интeракциjу или Ñe ÑаÑтоje од мeханичких урeђаjа. Ðeмогућe je играти Ñe на "
"овоj машини у потпуноÑти.\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1722,7 +1585,7 @@ msgstr ""
"\n"
"ПоÑтоjи клонови овe машинe коjи радe: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
@@ -1732,7 +1595,7 @@ msgstr ""
"\n"
"ПритиÑните било који таÑтер за наÑтавак"
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1747,15 +1610,15 @@ msgstr ""
"\n"
"ЦПУ:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1763,7 +1626,7 @@ msgstr ""
"\n"
"Звук:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1771,78 +1634,78 @@ msgstr ""
"\n"
"Видeо:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "Ðиjeдан\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "Вeктор"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "Стањe eмулациje таÑтатурe"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "Мод: ДЕЛИМИЧÐÐ eмулациjа"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "КориÑнички интeрфejÑ: омогућeн"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**КориÑтитe ScrLock да промeнитe радно Ñтањe**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "Мод: ПОТПУÐÐ eмулациjа"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "КориÑнички интeрфejÑ: онeÑпоÑобљeн"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "ÐутоматÑко пуцањe нe можe да Ñe омогући"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "Изабeритe позициjу на коjу жeлитe да Ñнимитe"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "Изабeритe позициjу Ñа коje жeлитe да учитатe"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "Чувањe Ñтања игрe отказано"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "Учитавањe Ñтања игрe отказано"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "Сачуваj на позициjу %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "Учитаj Ñа позициje %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1855,7 +1718,7 @@ msgstr ""
"ПритиÑнитe ''%s'' за напуштањe програма,\n"
"ПритиÑнитe ''%s'' за наÑтавак eмулациje."
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "Главна jачина звука"
@@ -1864,7 +1727,7 @@ msgstr "Главна jачина звука"
msgid "%1$s Volume"
msgstr "%1$s jачина звука"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "Убрзањe оÑновног такта CPU %1$s"
@@ -1874,154 +1737,154 @@ msgstr "Убрзањe оÑновног такта CPU %1$s"
msgid "%1$s Refresh Rate"
msgstr "%1$s фрeквeнциjа оÑвeжавања"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "%1$s оÑвeтљeноÑÑ‚"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "%1$s контраÑÑ‚"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "%1$s гама"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "%1$s раÑÑ‚eзањe по хоризонтали"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "%1$s хоризонтална позициjа"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "%1$s раÑÑ‚eзањe по вeртикали"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "%1$s вeртикална позициjа"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "Laserdisc '%1$s' раÑÑ‚eзањe по хоризонтали"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "Laserdisc '%1$s' хоризонтална позициjа"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "Laserdisc '%1$s' раÑÑ‚eзањe по вeртикали"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "Laserdisc '%1$s' вeртикална позициjа"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "Трeпeрeњe вeктора"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "Минимална ширина Ñнопа"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "МакÑимална шириниа Ñнопа"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "ИнтeнзитeÑ‚ Ñнопа"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "Размeра нишана %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr "X"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr "Y"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "Помeраj нишана %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr "%1$3ddB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr "%1$.3ffps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "Екран '%1$s'"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "Екран"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "Размeра нишана КС %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "Размeра нишана И %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "Помeраj нишана КС %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "Помeраj нишана И %1$1.3f"
@@ -2063,10 +1926,122 @@ msgstr "ОдÑeчeно"
msgid "Full"
msgstr "Потпуно"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " БОЈЕ"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr "ОЛОВКЕ"
+
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "Додeљивањe Lightgun урeђаjа"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "Додeљивањe Trackball урeђаjа"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "Додeљивањe пeдалe"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "Додeљивањe аналогнe управљачкe палицe (џоjÑтика)"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "Додeљивањe ротационог управљача Ñ Ñ‚Ð°ÑÑ‚eром"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "Додeљивањe ротационог управљача"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "Додeљивањe урeђаjа за позиционирањe"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "Додeљивањe миша"
+
+#~ msgid "Device Mapping"
+#~ msgstr "Мапирањe урeђаjа"
+
+#~ msgid "Video Mode"
+#~ msgstr "Видео мод"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "ТроÑтруко баферовање"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Билинеарни филтер"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "Пре-Ñкалирање"
+
+#~ msgid "Window Mode"
+#~ msgstr "Извршавај у прозору"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "ФорÑирај Ð¾Ð´Ð½Ð¾Ñ Ñтраница"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "Стартуј макÑимизовано"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "Синхронизовано оÑвежавање"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "Чекај вертикалну Ñинхронизацију"
+
+#~ msgid "Display Options"
+#~ msgstr "Опциje приказа"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Изабрана машина нeÑтоаje jeдан или вишe нeопходних РОМ или ЦХД Ñ€eзeрвних "
+#~ "копиjа. Молимо Ð’Ð°Ñ Ð¸Ð·Ð°Ð±eрити другу машину.\n"
+#~ "\n"
+#~ "ПритиÑнитe било коjи таÑÑ‚eÑ€ (оÑим ESC) за наÑтавак."
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Селектованом програму недоÑтаје један или више фајлова. Молим Ñелектујте "
+#~ "други програм.\n"
+#~ "\n"
+#~ "ПритиÑните било који таÑтер (оÑим ESC) за наÑтавак."
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Поново изабeри поÑлeдњу машину на коjоj Ñe играло"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Увeћаj Ñликe на дeÑном панeлу"
+
+#~ msgid "DATs info"
+#~ msgstr "Информациje из Dat-a"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Прикажи показивач миша"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "Потврдитe излазак из машина"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "ПрeÑкочи приказивањe информационог eкрана на почeтку"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "КориÑти 4:3 приказ за Ñнимкe eкрана програма"
+
+#~ msgid "Use image as background"
+#~ msgstr "КориÑти Ñлику као позадину"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "ПрeÑкочи мeни Ñа избором БИОС-а"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "ПрeÑкочи мeни Ñа избором ÑофтвeÑ€Ñких дeлова"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "Разнe опциje"
diff --git a/language/Slovak/strings.po b/language/Slovak/strings.po
index beeb13ab2a9..ccf189ab1bf 100644
--- a/language/Slovak/strings.po
+++ b/language/Slovak/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Slovenian/strings.po b/language/Slovenian/strings.po
index 36c560beabd..50b3bce048c 100644
--- a/language/Slovenian/strings.po
+++ b/language/Slovenian/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -58,393 +58,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -476,35 +437,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -520,7 +481,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -528,7 +489,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -536,23 +497,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -596,132 +557,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -739,7 +651,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -755,705 +667,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1462,33 +1333,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1497,15 +1368,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1574,80 +1445,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1655,7 +1526,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1663,21 +1534,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1687,98 +1558,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1787,7 +1658,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1796,7 +1667,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1806,154 +1677,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1995,10 +1866,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Spanish/strings.po b/language/Spanish/strings.po
index da444f4d2bd..460706224a4 100644
--- a/language/Spanish/strings.po
+++ b/language/Spanish/strings.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-03-05 13:02+0100\n"
"Last-Translator: aviloria\n"
"Language-Team: Español; Castellano <>\n"
@@ -61,395 +61,356 @@ msgstr "Reiniciar todo"
msgid "Reload All"
msgstr "Recargar todo"
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr "Estado del disparo automático"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr "Desactivado"
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr "Activado"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr "Sí"
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr "No"
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr "No se han encontrado botones en esta máquina."
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr "Retardo del disparo automático"
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr "Asignación de pistolas de luz"
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr "Asignación de trackballs"
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr "Asignación de pedales"
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr "Asignación de palancas"
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr "Asignación de paletas"
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr "Asignación de diales"
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr "Asignación de disp. posicionales"
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr "Asignación de ratones"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr "Mapeado de mandos"
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr "Filtro principal"
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr "Otros filtros"
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr "^!Fabricante"
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr "^!Año"
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr "Eliminar último filtro"
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr "Añadir filtro"
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr "Seleccionar filtros personalizados:"
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr "^!Editor"
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr "^!Lista de software"
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr "^!Tipo de dispositivo"
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr "^!Región"
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr "Mostrar todo"
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr "Ocultar filtros"
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr "Ocultar detalles/imagen"
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr "Ocultar ambos"
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr "Tipografía"
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr "Colores"
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr "Idioma"
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr "Mostrar paneles laterales"
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr "Ajustes de interfaz"
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr "predeterminado"
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr "Tipografía de interfaz"
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr "Negrita"
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr "Cursiva"
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr "Líneas"
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr "Tamaño del texto informativo"
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr "Ajustes tipográficos de interfaz"
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
"Texto de ejemplo - Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
"La cigüeña olía el paté de atún del camión más lejano."
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr "Texto normal"
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr "Texto seleccionado"
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr "Fondo del texto normal"
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr "Fondo del texto seleccionado"
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr "Color elem. secundarios"
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr "Copiar"
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr "Borde"
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr "Fondo"
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr "Interruptor DIP"
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr "Color no disponible"
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr "Color del control deslizante"
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr "Fondo del visor de efectos"
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr "Color al resaltar con ratón"
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr "Fondo al resaltar con ratón"
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr "Color al seleccionar con ratón"
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr "Fondo al seleccionar con ratón"
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr "Restaurar colores originales"
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr "Ajustes de color de interfaz"
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr "Haz doble clic o pulsa %1$s para cambiar el color"
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr "Vista previa"
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr "Normal"
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr "Elem. secundario"
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr "Seleccionado"
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr "Resaltado"
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr "Transparencia"
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr "Rojo"
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr "Verde"
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr "Azul"
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr "Elegir colores más básicos"
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr " - Ajustes ARGB"
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr "Vista previa ="
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr "Blanco"
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr "Plateado"
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr "Gris"
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr "Negro"
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr "Naranja"
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr "Amarillo"
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr "Violeta"
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr "Historial de cambios"
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr "Forma de uso"
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr "Revisión: "
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr "Historial"
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr "Información de MAME"
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr "Información de MESS"
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr "Información del sistema"
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr "Puntuación MAME"
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr "Orden"
@@ -481,35 +442,35 @@ msgstr "INIs adicionales"
msgid "Icons"
msgstr "Iconos"
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr "Trucos"
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr "Capturas"
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr "Cabinas arcade"
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr "Folletos"
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr "Títulos"
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr "Finales"
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr "Circuitos impresos"
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr "Marquesinas"
@@ -525,7 +486,7 @@ msgstr "Dianas"
msgid "Artworks"
msgstr "Arte"
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr "Jefes"
@@ -533,7 +494,7 @@ msgstr "Jefes"
msgid "Artworks Preview"
msgstr "Vista previa de arte"
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr "Elegir"
@@ -541,23 +502,23 @@ msgstr "Elegir"
msgid "GameOver"
msgstr "Fin de partida"
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr "Manual"
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr "Logos"
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr "Puntuaciones"
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr "Versus"
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr "Cubiertas"
@@ -601,132 +562,83 @@ msgstr "Pulsa TAB para establecer"
msgid "Remove %1$s Folder"
msgstr "Borrar carpeta %1$s"
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr "Modo de vídeo"
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr "Triple búfer"
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr "HLSL"
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr "GLSL"
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr "Filtrado bilineal"
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr "Preescalado de texturas"
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr "Modo de ventana"
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr "Bloquear forma de pantalla"
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr "Comenzar maximizada"
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr "Actualización síncrona"
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr "Esperar a la sincronización vertical"
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr "Ajustes visuales"
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr "El archivo ya existe ¿Quieres sobreescribirlo?"
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr "No"
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr "Sí"
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr "Nuevo nombre de imagen:"
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr "Formato de imagen:"
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr "Crear"
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr "Por favor, introduzca también la extensión del fichero"
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr "[ranura vacía]"
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr "[crear]"
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr "[lista de software]"
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr "Elige el formato de imagen"
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr "Elige el modo de acceso"
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr "Sólo lectura"
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr "Lectura y escritura"
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr "Leer esta imagen, escribir en otra imagen"
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr "Leer esta imagen, escribir en diferencial"
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr "No se puede guardar en la carpeta"
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -746,7 +658,7 @@ msgstr "Soportado parcialmente"
msgid "[empty]"
msgstr "[vacío]"
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr "Pseudoterminales"
@@ -762,164 +674,168 @@ msgstr "Interfaz de usuario"
msgid "Other Controls"
msgstr "Otros controles"
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr "Restablecer"
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr "Entrada (general)"
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr "Entrada (esta máquina)"
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr "Controles analógicos"
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr "Interruptores DIP"
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr "Configuración de máquina"
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr "Información contable"
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr "Información de máquina"
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr "Información de imagen"
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr "Administrador de archivos"
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr "Control de cinta"
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr "Selección de BIOS"
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr "Ranuras de monedas"
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr "Lector de código de barras"
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr "Dispositivos de red"
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr "Modo del teclado"
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr "Controles deslizantes"
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr "Opciones de vídeo"
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr "Opciones de diana"
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr "Truco"
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr "Vista DAT externa"
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr "Añadir a favoritos"
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr "Borrar de favoritos"
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr "Elegir máquina nueva"
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr "Paneles de control"
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr "Vista previa de arte"
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr "Fin del juego"
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr "Añadir o borrar de favoritos"
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr "Exportar esta lista a un archivo"
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr "Mostrar vista de DATs"
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr "Volver a la máquina"
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr "Salir"
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr "Volver al menú anterior"
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr "Automát."
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr "Imágenes"
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr "Informaciones"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr "Modo del teclado:"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr "Natural"
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr "Emulado"
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
@@ -928,7 +844,7 @@ msgstr ""
"Tiempo encendido: %1$d:%2$02d:%3$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
@@ -937,7 +853,7 @@ msgstr ""
"Tiempo encendido: %1$d:%2$02d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
@@ -946,154 +862,109 @@ msgstr ""
"Boletos emitidos: %1$d\n"
"\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr "Moneda %1$c: NA%3$s\n"
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr "Moneda %1$c: %2$d%3$s\n"
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr " (bloqueado)"
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr "Retardo visible"
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr "Elegir última máquina emulada"
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr "Agrandar imágenes en el panel derecho"
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr "Info de los DATs"
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr "Mostrar puntero del ratón"
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr "Confirmar salida de máquina"
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr "No mostrar la pantalla de información al inicio"
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr "Forzar apariencia 4:3 para las capturas en software"
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr "Utilizar imagen de fondo"
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr "Saltar el menú de selección de BIOS"
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr "Saltar el menú de selección de software"
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr "Otras opciones"
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr "%s.xml guardado en la carpeta «ui»."
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr "Nombre: Descripción:\n"
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr "%s.txt guardado en la carpeta «ui»."
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr "Exportar en formato XML (como -listxml)"
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr "Exportar en formato TXT (como -listfull)"
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr "De ejemplo"
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr "Guardar ajustes de máquina"
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr "Filtro"
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr " ^!Archivo"
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr " ^!Categoría"
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr "^!Aplicar filtro personalizado"
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr "Personalizar interfaz"
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr "Configurar carpetas"
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr "Opciones de sonido"
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr "Entrada general"
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr "Guardar configuración"
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr "Ajustes"
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr "**Error al guardar «ui.ini»**"
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr "Error al guardar «%s.ini»**"
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
@@ -1103,20 +974,20 @@ msgstr ""
" Se ha guardado la configuración \n"
"\n"
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr "Lista de selección - Buscar: "
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr "Haz doble clic o pulsa %1$s para elegir"
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr "Información general"
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
@@ -1125,8 +996,8 @@ msgstr ""
"%s\n"
" añadido a la lista de favoritos."
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
@@ -1135,268 +1006,264 @@ msgstr ""
"%s\n"
" eliminado de la lista de favoritos."
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Falta la máquina seleccionada o una o más de sus ROMs o imágenes CHD. Por "
-"favor, elige otra máquina.\n"
-"\n"
-"Pulsa cualquier tecla (menos ESC) para continuar."
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr "Configurar opciones"
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr "%1$s %2$s ( %3$d / %4$d máquinas (%5$d BIOS) )"
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr "%1$s (%2$s - %3$s) - "
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr "%1$s (%2$s) - "
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr "%1$s Buscar: %2$s_"
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr "Conjunto de ROMs: %1$-.100s"
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr "%1$s, %2$-.100s"
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr "El controlador es un clon de: %1$-.100s"
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr "Es un controlador padre"
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr "En general: NO FUNCIONA"
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr "En general: Protección sin emular"
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr "En general: Funcionando"
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr "Gráficos: Imperfectos,"
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr "Gráficos: Aceptables, "
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr "Sonido: Sin implementar"
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr "Sonido: Imperfecto"
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr "Sonido: Aceptable"
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr "Sistema: %1$-.100s"
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr "El software es un clon de: %1$-.100s"
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr "Es un software padre"
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr "Soportado: No"
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr "Soportado: Parcialmente"
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr "Soportado: Sí"
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr "conjunto de ROMs: %1$-.100s"
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr "%1$s %2$s"
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr "Conjunto de ROMs: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr "Año: %1$s\n"
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr "Fabricante: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr "El controlador es un clon de: %1$-.100s\n"
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr "Es un controlador padre\n"
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr "En general: NO FUNCIONA\n"
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr "En general: Protección sin emular\n"
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr "En general: Funcionando\n"
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr "Gráficos: Colores imperfectos\n"
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr "Gráficos: Imperfectos\n"
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr "Gráficos: Aceptables\n"
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr "Sonido: Sin implementar\n"
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr "Sonido: Imperfecto\n"
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr "Sonido: Aceptable\n"
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr "El controlador es esqueleto: %1$s\n"
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr "El juego es mecánico: %1$s\n"
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr "Requiere arte: %1$s\n"
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr "Requiere arte clicable: %1$s\n"
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr "Soporta cóctel: %1$s\n"
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr "El controlador es una BIOS: %1$s\n"
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr "Permite guardar: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr "Orientación de pantalla: %1$s\n"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr "Vertical"
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr "Horizontal"
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr "Necesita CHD: %1$s\n"
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr "Auditoría de ROMs: CORRECTA\n"
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr "Auditoría de ROMs: INCORRECTA\n"
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr "Auditoría de las muestras: No Necesaria\n"
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr "Auditoría de las muestras: CORRECTA\n"
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr "Auditoría de las muestras: INCORRECTA\n"
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
@@ -1404,86 +1271,82 @@ msgstr ""
"Auditoría de las ROMs: Desactivado\n"
"Auditoría de las muestras: Desactivado\n"
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr "No hay información disponible"
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr "Utilización"
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr " (predeterminado)"
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-"Al software elegido le falta uno o varios archivos necesarios. Por favor, "
-"elige otro software.\n"
-"\n"
-"Pulsa cualquier tecla (menos ESC) para continuar."
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr "%1$s %2$s ( %3$d / %4$d softwares )"
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr "Controlador: \"%1$s\" lista de software "
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr "Región: %1$s -"
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr "Editor: %1$s -"
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr "Año: %1$s -"
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr "Lista de software: %1$s -"
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr "Tipo de dispositivo: %1$s -"
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr "%s Buscar: %s_"
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr "%1$-.100s"
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr "Selección de partes de software:"
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr "Selección de BIOS:"
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1498,33 +1361,33 @@ msgstr ""
"archivo «config.txt» de la carpeta «docs» para informarte sobre cómo "
"configurar %2$s."
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr "Escribe un nombre o elige: %1$s_"
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr "Escribe un nombre o elige: (aleatorio)"
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr "Controlador: %1$-.100s"
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr "Imperfecto"
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr "Aceptable"
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr "No implementado"
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr "Gráficos: %s, Sonido: %s"
@@ -1533,15 +1396,15 @@ msgstr "Gráficos: %s, Sonido: %s"
msgid " [internal]"
msgstr " [interno]"
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr "Sonido"
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr "Tasa de muestreo"
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr "Utilizar muestras externas"
@@ -1610,13 +1473,13 @@ msgstr "Rebobinar"
msgid "Fast Forward"
msgstr "Avance rápido"
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
"Este controlador necesita que se carguen imágenes en los siguientes "
"dispositivos: "
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
@@ -1624,7 +1487,7 @@ msgstr ""
"Uno o más ROMs/CHDs de esta máquina son incorrectos. La máquina podría no "
"funcionar correctamente.\n"
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
@@ -1632,48 +1495,48 @@ msgstr ""
"Existen problemas conocidos con esta máquina\n"
"\n"
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr "Uno o más ROMs/CHDs de esta máquina no se han volcado correctamente.\n"
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr "La emulación del teclado puede no ser del todo precisa.\n"
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr "Los colores no son del todo precisos.\n"
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr "Los colores son completamente erróneos.\n"
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr "La emulación de vídeo no es del todo precisa.\n"
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr "La emulación de sonido no es del todo precisa.\n"
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr "A esta máquina le falta el sonido.\n"
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr "Voltear la pantalla en modo cóctel no está soportado.\n"
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr "La máquina requiere ficheros de arte externos\n"
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
@@ -1681,7 +1544,7 @@ msgstr ""
"Esta máquina nunca se terminó. Podría comportarse de forma extraña o mostrar "
"signos de mal funcionamiento que en ningún caso son defectos de emulación.\n"
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
@@ -1689,11 +1552,11 @@ msgstr ""
"Esta máquina no soporta sonido, por lo que MAME no reproducirá audio, este "
"es el comportamiento esperado.\n"
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr "La máquina todavía no emula completamente el sistema de protección.\n"
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1704,7 +1567,7 @@ msgstr ""
"completada. No hay nada que se pueda hacer para arreglar el problema salvo "
"esperar a que los desarrolladores mejoren la emulación.\n"
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1715,7 +1578,7 @@ msgstr ""
"una interacción física o se basan en dispositivos mecánicos. Por lo que no "
"esposible reproducir completamente el funcionamiento de la máquina.\n"
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
@@ -1725,14 +1588,14 @@ msgstr ""
"\n"
"Existen clones funcionales de esta máquina: "
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1747,15 +1610,15 @@ msgstr ""
"\n"
"Procesador:\n"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr "MHz"
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr "kHz"
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
@@ -1763,7 +1626,7 @@ msgstr ""
"\n"
"Sonido:\n"
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
@@ -1771,78 +1634,78 @@ msgstr ""
"\n"
"Vídeo:\n"
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr "Ninguno\n"
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr "Vector"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr "%1$s: %2$s\n"
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr "%2$s\n"
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr "Estado de la emulación del teclado"
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr "Modo: Emulación PARCIAL"
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr "Interfaz: Activada"
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr "**Utiliza ScrLock para activar y desactivar**"
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr "Modo: Emulación COMPLETA"
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr "Interfaz: Desactivada"
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr "No se puede activar el disparo automático"
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr "Selecciona la posición a la que guardar"
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr "Selecciona la posición desde la que cargar"
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr "Guardado cancelado"
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr "Lectura cancelada"
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr "Guardar en posición %s"
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr "Lectura desde posición %s"
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1855,7 +1718,7 @@ msgstr ""
"Presiona «%1$s» para salir,\n"
"Presiona «%2$s» para volver al emulador."
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr "Volumen principal"
@@ -1864,7 +1727,7 @@ msgstr "Volumen principal"
msgid "%1$s Volume"
msgstr "Volumen %1$s"
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr "Acelerar CPU %1$s"
@@ -1874,154 +1737,154 @@ msgstr "Acelerar CPU %1$s"
msgid "%1$s Refresh Rate"
msgstr "Tasa de refresco %1$s"
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr "Brillo %1$s"
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr "Contraste %1$s"
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr "Gamma %1$s"
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr "Estiramiento horizontal %1$s"
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr "Posición horizontal %1$s"
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr "Estiramiento vertical %1$s"
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr "Posición vertical %1$s"
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr "Estiramiento horizontal de Laserdisc «%1$s»"
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr "Posición horizontal de Laserdisc «%1$s»"
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr "Estiramiento vertical de Laserdisc «%1$s»"
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr "Posición vertical de Laserdisc «%1$s»"
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr "Vector de parpadeo"
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr "Anchura mín. del haz"
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr "Anchura max. del haz"
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr "Peso de intensidad del haz"
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr "Escala de diana %1$s"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr "Horizontal"
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr "Vertical"
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr "Posición de diana %1$s"
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr "%1$3ddB"
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr "%1$d%%"
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr "%1$3.0f%%"
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr "%1$.3ffps"
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr "%1$.3f"
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr "%1$1.2f"
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr "Pantalla «%1$s»"
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr "Pantalla"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr "Escala horizontal de diana %1$1.3f"
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr "Escala vertical de diana %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr "Posición horizontal de diana %1$1.3f"
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr "Posición vertical de diana %1$1.3f"
@@ -2063,14 +1926,132 @@ msgstr "Recortado"
msgid "Full"
msgstr "Completo"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr " COLORES"
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr " PLUMAS"
+#~ msgid "Lightgun Device Assignment"
+#~ msgstr "Asignación de pistolas de luz"
+
+#~ msgid "Trackball Device Assignment"
+#~ msgstr "Asignación de trackballs"
+
+#~ msgid "Pedal Device Assignment"
+#~ msgstr "Asignación de pedales"
+
+#~ msgid "Adstick Device Assignment"
+#~ msgstr "Asignación de palancas"
+
+#~ msgid "Paddle Device Assignment"
+#~ msgstr "Asignación de paletas"
+
+#~ msgid "Dial Device Assignment"
+#~ msgstr "Asignación de diales"
+
+#~ msgid "Positional Device Assignment"
+#~ msgstr "Asignación de disp. posicionales"
+
+#~ msgid "Mouse Device Assignment"
+#~ msgstr "Asignación de ratones"
+
+#~ msgid "Device Mapping"
+#~ msgstr "Mapeado de mandos"
+
+#~ msgid "Video Mode"
+#~ msgstr "Modo de vídeo"
+
+#~ msgid "Triple Buffering"
+#~ msgstr "Triple búfer"
+
+#~ msgid "HLSL"
+#~ msgstr "HLSL"
+
+#~ msgid "GLSL"
+#~ msgstr "GLSL"
+
+#~ msgid "Bilinear Filtering"
+#~ msgstr "Filtrado bilineal"
+
+#~ msgid "Bitmap Prescaling"
+#~ msgstr "Preescalado de texturas"
+
+#~ msgid "Window Mode"
+#~ msgstr "Modo de ventana"
+
+#~ msgid "Enforce Aspect Ratio"
+#~ msgstr "Bloquear forma de pantalla"
+
+#~ msgid "Start Out Maximized"
+#~ msgstr "Comenzar maximizada"
+
+#~ msgid "Synchronized Refresh"
+#~ msgstr "Actualización síncrona"
+
+#~ msgid "Wait Vertical Sync"
+#~ msgstr "Esperar a la sincronización vertical"
+
+#~ msgid "Display Options"
+#~ msgstr "Ajustes visuales"
+
+#~ msgid ""
+#~ "The selected machine is missing one or more required ROM or CHD images. "
+#~ "Please select a different machine.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Falta la máquina seleccionada o una o más de sus ROMs o imágenes CHD. Por "
+#~ "favor, elige otra máquina.\n"
+#~ "\n"
+#~ "Pulsa cualquier tecla (menos ESC) para continuar."
+
+#~ msgid ""
+#~ "The selected software is missing one or more required files. Please "
+#~ "select a different software.\n"
+#~ "\n"
+#~ "Press any key (except ESC) to continue."
+#~ msgstr ""
+#~ "Al software elegido le falta uno o varios archivos necesarios. Por favor, "
+#~ "elige otro software.\n"
+#~ "\n"
+#~ "Pulsa cualquier tecla (menos ESC) para continuar."
+
+#~ msgid "Re-select last machine played"
+#~ msgstr "Elegir última máquina emulada"
+
+#~ msgid "Enlarge images in the right panel"
+#~ msgstr "Agrandar imágenes en el panel derecho"
+
+#~ msgid "DATs info"
+#~ msgstr "Info de los DATs"
+
+#~ msgid "Show mouse pointer"
+#~ msgstr "Mostrar puntero del ratón"
+
+#~ msgid "Confirm quit from machines"
+#~ msgstr "Confirmar salida de máquina"
+
+#~ msgid "Skip displaying information's screen at startup"
+#~ msgstr "No mostrar la pantalla de información al inicio"
+
+#~ msgid "Force 4:3 appearance for software snapshot"
+#~ msgstr "Forzar apariencia 4:3 para las capturas en software"
+
+#~ msgid "Use image as background"
+#~ msgstr "Utilizar imagen de fondo"
+
+#~ msgid "Skip bios selection menu"
+#~ msgstr "Saltar el menú de selección de BIOS"
+
+#~ msgid "Skip software parts selection menu"
+#~ msgstr "Saltar el menú de selección de software"
+
+#~ msgid "Miscellaneous Options"
+#~ msgstr "Otras opciones"
+
#~ msgid ""
#~ "Usage of emulators in conjunction with ROMs you don't own is forbidden by "
#~ "copyright law.\n"
diff --git a/language/Spanish_Mexico/strings.po b/language/Spanish_Mexico/strings.po
index 73ab0238885..de32afdf053 100644
--- a/language/Spanish_Mexico/strings.po
+++ b/language/Spanish_Mexico/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Swedish/strings.po b/language/Swedish/strings.po
index a7d5f498e7b..13b70b048d1 100644
--- a/language/Swedish/strings.po
+++ b/language/Swedish/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -56,393 +56,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -474,35 +435,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -518,7 +479,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,7 +487,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -534,23 +495,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -594,132 +555,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -737,7 +649,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -753,705 +665,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,33 +1331,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1495,15 +1366,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1572,80 +1443,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1524,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1532,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1556,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1656,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1665,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1675,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1993,10 +1864,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Thai/strings.po b/language/Thai/strings.po
index 3509e49e298..86beb17193b 100644
--- a/language/Thai/strings.po
+++ b/language/Thai/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -55,393 +55,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -473,35 +434,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -517,7 +478,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -525,7 +486,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -533,23 +494,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -593,132 +554,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -736,7 +648,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -752,705 +664,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1459,33 +1330,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1494,15 +1365,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1571,80 +1442,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1652,7 +1523,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1660,21 +1531,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1684,98 +1555,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1784,7 +1655,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1793,7 +1664,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1803,154 +1674,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1992,10 +1863,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Turkish/strings.po b/language/Turkish/strings.po
index 49b2461f3ad..1480096bdeb 100644
--- a/language/Turkish/strings.po
+++ b/language/Turkish/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Ukrainian/strings.po b/language/Ukrainian/strings.po
index dc8ff9c6003..f0067609255 100644
--- a/language/Ukrainian/strings.po
+++ b/language/Ukrainian/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -57,393 +57,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -475,35 +436,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -519,7 +480,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -527,7 +488,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -535,23 +496,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -595,132 +556,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -738,7 +650,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -754,705 +666,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1461,33 +1332,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1496,15 +1367,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1573,80 +1444,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1654,7 +1525,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1662,21 +1533,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1686,98 +1557,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1786,7 +1657,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1795,7 +1666,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1805,154 +1676,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1994,10 +1865,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/language/Vietnamese/strings.po b/language/Vietnamese/strings.po
index 9d158d320df..2010a5e0f74 100644
--- a/language/Vietnamese/strings.po
+++ b/language/Vietnamese/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-28 09:02+0200\n"
+"POT-Creation-Date: 2016-04-11 03:33+0200\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -56,393 +56,354 @@ msgstr ""
msgid "Reload All"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258
+#: src/emu/ui/cheatopt.cpp:256
msgid "Autofire Status"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Disabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:258 src/emu/ui/ui.cpp:1692
+#: src/emu/ui/cheatopt.cpp:256 src/emu/ui/ui.cpp:1698
#: src/emu/ui/videoopt.cpp:207 src/emu/ui/videoopt.cpp:211
#: src/emu/ui/videoopt.cpp:215 src/emu/ui/videoopt.cpp:219
#: src/emu/ui/videoopt.cpp:223
msgid "Enabled"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:675
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:710 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "On"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:284 src/emu/ui/cheatopt.cpp:290
-#: src/emu/ui/dsplmenu.cpp:182 src/emu/ui/menu.cpp:678
-#: src/emu/ui/miscmenu.cpp:637 src/emu/ui/miscmenu.cpp:950
-#: src/emu/ui/sndmenu.cpp:134 src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/cheatopt.cpp:282 src/emu/ui/cheatopt.cpp:288
+#: src/emu/ui/menu.cpp:713 src/emu/ui/miscmenu.cpp:831
+#: src/emu/ui/sndmenu.cpp:135 src/emu/ui/sndmenu.cpp:137
msgid "Off"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:301
+#: src/emu/ui/cheatopt.cpp:299
msgid "No buttons found on this machine!"
msgstr ""
-#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
+#: src/emu/ui/cheatopt.cpp:310 src/emu/ui/cheatopt.cpp:314
msgid "Autofire Delay"
msgstr ""
-#: src/emu/ui/ctrlmenu.cpp:20
-msgid "Lightgun Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:21
-msgid "Trackball Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:22
-msgid "Pedal Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:23
-msgid "Adstick Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:24
-msgid "Paddle Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:25
-msgid "Dial Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:26
-msgid "Positional Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:27
-msgid "Mouse Device Assignment"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-#: src/emu/ui/optsmenu.cpp:264
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:157 src/emu/ui/custmenu.cpp:445
+#: src/emu/ui/custmenu.cpp:158 src/emu/ui/custmenu.cpp:447
msgid "Main filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:166 src/emu/ui/custmenu.cpp:454
+#: src/emu/ui/custmenu.cpp:167 src/emu/ui/custmenu.cpp:456
msgid "Other filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:175 src/emu/ui/optsmenu.cpp:235
+#: src/emu/ui/custmenu.cpp:176 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
msgstr ""
-#: src/emu/ui/custmenu.cpp:184 src/emu/ui/custmenu.cpp:472
-#: src/emu/ui/optsmenu.cpp:243
+#: src/emu/ui/custmenu.cpp:185 src/emu/ui/custmenu.cpp:474
+#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
msgstr ""
-#: src/emu/ui/custmenu.cpp:193 src/emu/ui/custmenu.cpp:508
+#: src/emu/ui/custmenu.cpp:194 src/emu/ui/custmenu.cpp:510
msgid "Remove last filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:196 src/emu/ui/custmenu.cpp:511
+#: src/emu/ui/custmenu.cpp:197 src/emu/ui/custmenu.cpp:513
msgid "Add filter"
msgstr ""
-#: src/emu/ui/custmenu.cpp:211 src/emu/ui/custmenu.cpp:231
-#: src/emu/ui/custmenu.cpp:527 src/emu/ui/custmenu.cpp:547
+#: src/emu/ui/custmenu.cpp:212 src/emu/ui/custmenu.cpp:233
+#: src/emu/ui/custmenu.cpp:529 src/emu/ui/custmenu.cpp:550
msgid "Select custom filters:"
msgstr ""
-#: src/emu/ui/custmenu.cpp:463
+#: src/emu/ui/custmenu.cpp:465
msgid "^!Publisher"
msgstr ""
-#: src/emu/ui/custmenu.cpp:481
+#: src/emu/ui/custmenu.cpp:483
msgid "^!Software List"
msgstr ""
-#: src/emu/ui/custmenu.cpp:490
+#: src/emu/ui/custmenu.cpp:492
msgid "^!Device type"
msgstr ""
-#: src/emu/ui/custmenu.cpp:499
+#: src/emu/ui/custmenu.cpp:501
msgid "^!Region"
msgstr ""
-#: src/emu/ui/custui.cpp:22
+#: src/emu/ui/custui.cpp:23
msgid "Show All"
msgstr ""
-#: src/emu/ui/custui.cpp:23
+#: src/emu/ui/custui.cpp:24
msgid "Hide Filters"
msgstr ""
-#: src/emu/ui/custui.cpp:24
+#: src/emu/ui/custui.cpp:25
msgid "Hide Info/Image"
msgstr ""
-#: src/emu/ui/custui.cpp:25
+#: src/emu/ui/custui.cpp:26
msgid "Hide Both"
msgstr ""
-#: src/emu/ui/custui.cpp:141
+#: src/emu/ui/custui.cpp:142
msgid "Fonts"
msgstr ""
-#: src/emu/ui/custui.cpp:142
+#: src/emu/ui/custui.cpp:143
msgid "Colors"
msgstr ""
-#: src/emu/ui/custui.cpp:147 src/emu/ui/dirmenu.cpp:33
+#: src/emu/ui/custui.cpp:148 src/emu/ui/dirmenu.cpp:33
msgid "Language"
msgstr ""
-#: src/emu/ui/custui.cpp:151
+#: src/emu/ui/custui.cpp:152
msgid "Show side panels"
msgstr ""
-#: src/emu/ui/custui.cpp:166 src/emu/ui/custui.cpp:186
+#: src/emu/ui/custui.cpp:167 src/emu/ui/custui.cpp:188
msgid "Custom UI Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:244
+#: src/emu/ui/custui.cpp:246
msgid "default"
msgstr ""
-#: src/emu/ui/custui.cpp:347
+#: src/emu/ui/custui.cpp:349
msgid "UI Font"
msgstr ""
-#: src/emu/ui/custui.cpp:352
+#: src/emu/ui/custui.cpp:354
msgid "Bold"
msgstr ""
-#: src/emu/ui/custui.cpp:353
+#: src/emu/ui/custui.cpp:355
msgid "Italic"
msgstr ""
-#: src/emu/ui/custui.cpp:358
+#: src/emu/ui/custui.cpp:360
msgid "Lines"
msgstr ""
-#: src/emu/ui/custui.cpp:364
+#: src/emu/ui/custui.cpp:366
msgid "Infos text size"
msgstr ""
-#: src/emu/ui/custui.cpp:381
+#: src/emu/ui/custui.cpp:383
msgid "UI Fonts Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:408
+#: src/emu/ui/custui.cpp:411
msgid "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
msgstr ""
-#: src/emu/ui/custui.cpp:506
+#: src/emu/ui/custui.cpp:509
msgid "Normal text"
msgstr ""
-#: src/emu/ui/custui.cpp:507
+#: src/emu/ui/custui.cpp:510
msgid "Selected color"
msgstr ""
-#: src/emu/ui/custui.cpp:508
+#: src/emu/ui/custui.cpp:511
msgid "Normal text background"
msgstr ""
-#: src/emu/ui/custui.cpp:509
+#: src/emu/ui/custui.cpp:512
msgid "Selected background color"
msgstr ""
-#: src/emu/ui/custui.cpp:510
+#: src/emu/ui/custui.cpp:513
msgid "Subitem color"
msgstr ""
-#: src/emu/ui/custui.cpp:511 src/emu/ui/custui.cpp:606
+#: src/emu/ui/custui.cpp:514 src/emu/ui/custui.cpp:610
msgid "Clone"
msgstr ""
-#: src/emu/ui/custui.cpp:512
+#: src/emu/ui/custui.cpp:515
msgid "Border"
msgstr ""
-#: src/emu/ui/custui.cpp:513
+#: src/emu/ui/custui.cpp:516
msgid "Background"
msgstr ""
-#: src/emu/ui/custui.cpp:514
+#: src/emu/ui/custui.cpp:517
msgid "Dipswitch"
msgstr ""
-#: src/emu/ui/custui.cpp:515
+#: src/emu/ui/custui.cpp:518
msgid "Unavailable color"
msgstr ""
-#: src/emu/ui/custui.cpp:516
+#: src/emu/ui/custui.cpp:519
msgid "Slider color"
msgstr ""
-#: src/emu/ui/custui.cpp:517
+#: src/emu/ui/custui.cpp:520
msgid "Gfx viewer background"
msgstr ""
-#: src/emu/ui/custui.cpp:518
+#: src/emu/ui/custui.cpp:521
msgid "Mouse over color"
msgstr ""
-#: src/emu/ui/custui.cpp:519
+#: src/emu/ui/custui.cpp:522
msgid "Mouse over background color"
msgstr ""
-#: src/emu/ui/custui.cpp:520
+#: src/emu/ui/custui.cpp:523
msgid "Mouse down color"
msgstr ""
-#: src/emu/ui/custui.cpp:521
+#: src/emu/ui/custui.cpp:524
msgid "Mouse down background color"
msgstr ""
-#: src/emu/ui/custui.cpp:524
+#: src/emu/ui/custui.cpp:527
msgid "Restore originals colors"
msgstr ""
-#: src/emu/ui/custui.cpp:540
+#: src/emu/ui/custui.cpp:543
msgid "UI Colors Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:568
+#: src/emu/ui/custui.cpp:572
#, c-format
msgid "Double click or press %1$s to change the color value"
msgstr ""
-#: src/emu/ui/custui.cpp:594
+#: src/emu/ui/custui.cpp:598
msgid "Menu Preview"
msgstr ""
-#: src/emu/ui/custui.cpp:602
+#: src/emu/ui/custui.cpp:606
msgid "Normal"
msgstr ""
-#: src/emu/ui/custui.cpp:603
+#: src/emu/ui/custui.cpp:607
msgid "Subitem"
msgstr ""
-#: src/emu/ui/custui.cpp:604
+#: src/emu/ui/custui.cpp:608
msgid "Selected"
msgstr ""
-#: src/emu/ui/custui.cpp:605
+#: src/emu/ui/custui.cpp:609
msgid "Mouse Over"
msgstr ""
-#: src/emu/ui/custui.cpp:837 src/emu/ui/custui.cpp:840
+#: src/emu/ui/custui.cpp:841 src/emu/ui/custui.cpp:844
msgid "Alpha"
msgstr ""
-#: src/emu/ui/custui.cpp:845 src/emu/ui/custui.cpp:848
-#: src/emu/ui/custui.cpp:1007
+#: src/emu/ui/custui.cpp:849 src/emu/ui/custui.cpp:852
+#: src/emu/ui/custui.cpp:1013
msgid "Red"
msgstr ""
-#: src/emu/ui/custui.cpp:853 src/emu/ui/custui.cpp:856
-#: src/emu/ui/custui.cpp:1010
+#: src/emu/ui/custui.cpp:857 src/emu/ui/custui.cpp:860
+#: src/emu/ui/custui.cpp:1016
msgid "Green"
msgstr ""
-#: src/emu/ui/custui.cpp:861 src/emu/ui/custui.cpp:864
-#: src/emu/ui/custui.cpp:1011
+#: src/emu/ui/custui.cpp:865 src/emu/ui/custui.cpp:868
+#: src/emu/ui/custui.cpp:1017
msgid "Blue"
msgstr ""
-#: src/emu/ui/custui.cpp:867
+#: src/emu/ui/custui.cpp:871
msgid "Choose from palette"
msgstr ""
-#: src/emu/ui/custui.cpp:883
+#: src/emu/ui/custui.cpp:887
msgid " - ARGB Settings"
msgstr ""
-#: src/emu/ui/custui.cpp:907
+#: src/emu/ui/custui.cpp:912
msgid "Color preview ="
msgstr ""
-#: src/emu/ui/custui.cpp:1003
+#: src/emu/ui/custui.cpp:1009
msgid "White"
msgstr ""
-#: src/emu/ui/custui.cpp:1004
+#: src/emu/ui/custui.cpp:1010
msgid "Silver"
msgstr ""
-#: src/emu/ui/custui.cpp:1005
+#: src/emu/ui/custui.cpp:1011
msgid "Gray"
msgstr ""
-#: src/emu/ui/custui.cpp:1006
+#: src/emu/ui/custui.cpp:1012
msgid "Black"
msgstr ""
-#: src/emu/ui/custui.cpp:1008
+#: src/emu/ui/custui.cpp:1014
msgid "Orange"
msgstr ""
-#: src/emu/ui/custui.cpp:1009
+#: src/emu/ui/custui.cpp:1015
msgid "Yellow"
msgstr ""
-#: src/emu/ui/custui.cpp:1012
+#: src/emu/ui/custui.cpp:1018
msgid "Violet"
msgstr ""
-#: src/emu/ui/datmenu.cpp:64
+#: src/emu/ui/datmenu.cpp:65
msgid "Software History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:66
+#: src/emu/ui/datmenu.cpp:67
msgid "Software Usage"
msgstr ""
-#: src/emu/ui/datmenu.cpp:196
+#: src/emu/ui/datmenu.cpp:199
msgid "Revision: "
msgstr ""
-#: src/emu/ui/datmenu.cpp:284 src/emu/ui/selgame.cpp:39
-#: src/emu/ui/selgame.cpp:2142 src/emu/ui/selgame.cpp:2151
-#: src/emu/ui/selsoft.cpp:1576 src/emu/ui/selsoft.cpp:1594
-#: src/emu/ui/selsoft.cpp:1603
+#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selgame.cpp:2161
+#: src/emu/ui/selsoft.cpp:1577 src/emu/ui/selsoft.cpp:1597
+#: src/emu/ui/selsoft.cpp:1606
msgid "History"
msgstr ""
-#: src/emu/ui/datmenu.cpp:286 src/emu/ui/selgame.cpp:40
+#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:41
msgid "Mameinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:288 src/emu/ui/selgame.cpp:42
+#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:43
msgid "Messinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:290 src/emu/ui/selgame.cpp:41
+#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:42
msgid "Sysinfo"
msgstr ""
-#: src/emu/ui/datmenu.cpp:292 src/emu/ui/selgame.cpp:45
+#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:46
msgid "Mamescore"
msgstr ""
-#: src/emu/ui/datmenu.cpp:294 src/emu/ui/selgame.cpp:44
+#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:45
msgid "Gameinit"
msgstr ""
-#: src/emu/ui/datmenu.cpp:296 src/emu/ui/selgame.cpp:43
+#: src/emu/ui/datmenu.cpp:299 src/emu/ui/selgame.cpp:44
msgid "Command"
msgstr ""
@@ -474,35 +435,35 @@ msgstr ""
msgid "Icons"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
+#: src/emu/ui/dirmenu.cpp:39
msgid "Cheats"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
+#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:44
msgid "Snapshots"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
+#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:45
msgid "Cabinets"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
+#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:48
msgid "Flyers"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
+#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:49
msgid "Titles"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
+#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:50
msgid "Ends"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
+#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:47
msgid "PCBs"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
+#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:59 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
msgstr ""
@@ -518,7 +479,7 @@ msgstr ""
msgid "Artworks"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
+#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:52
msgid "Bosses"
msgstr ""
@@ -526,7 +487,7 @@ msgstr ""
msgid "Artworks Preview"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
+#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:58
msgid "Select"
msgstr ""
@@ -534,23 +495,23 @@ msgstr ""
msgid "GameOver"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
+#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:56
msgid "HowTo"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
+#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:53
msgid "Logos"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:56
+#: src/emu/ui/dirmenu.cpp:56 src/emu/ui/menu.cpp:57
msgid "Scores"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:53
+#: src/emu/ui/dirmenu.cpp:57 src/emu/ui/menu.cpp:54
msgid "Versus"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:59
+#: src/emu/ui/dirmenu.cpp:58 src/emu/ui/menu.cpp:60
msgid "Covers"
msgstr ""
@@ -594,132 +555,83 @@ msgstr ""
msgid "Remove %1$s Folder"
msgstr ""
-#: src/emu/ui/dsplmenu.cpp:38
-msgid "Video Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:40
-msgid "Triple Buffering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:41
-msgid "HLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:43
-msgid "GLSL"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:44
-msgid "Bilinear Filtering"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:45
-msgid "Bitmap Prescaling"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:46
-msgid "Window Mode"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:47
-msgid "Enforce Aspect Ratio"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:48
-msgid "Start Out Maximized"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:49
-msgid "Synchronized Refresh"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:50
-msgid "Wait Vertical Sync"
-msgstr ""
-
-#: src/emu/ui/dsplmenu.cpp:202 src/emu/ui/dsplmenu.cpp:222
-#: src/emu/ui/optsmenu.cpp:261
-msgid "Display Options"
-msgstr ""
-
-#: src/emu/ui/filesel.cpp:161
+#: src/emu/ui/filesel.cpp:158
msgid "File Already Exists - Override?"
msgstr ""
-#: src/emu/ui/filesel.cpp:163 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:160 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "No"
msgstr ""
-#: src/emu/ui/filesel.cpp:164 src/emu/ui/selgame.cpp:1560
-#: src/emu/ui/selgame.cpp:1561 src/emu/ui/selgame.cpp:1562
-#: src/emu/ui/selgame.cpp:1563 src/emu/ui/selgame.cpp:1564
-#: src/emu/ui/selgame.cpp:1565 src/emu/ui/selgame.cpp:1566
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1568
+#: src/emu/ui/selgame.cpp:1569 src/emu/ui/selgame.cpp:1570
+#: src/emu/ui/selgame.cpp:1571 src/emu/ui/selgame.cpp:1572
+#: src/emu/ui/selgame.cpp:1573 src/emu/ui/selgame.cpp:1574
+#: src/emu/ui/selgame.cpp:1583
msgid "Yes"
msgstr ""
-#: src/emu/ui/filesel.cpp:275
+#: src/emu/ui/filesel.cpp:272
msgid "New Image Name:"
msgstr ""
-#: src/emu/ui/filesel.cpp:281
+#: src/emu/ui/filesel.cpp:278
msgid "Image Format:"
msgstr ""
-#: src/emu/ui/filesel.cpp:287
+#: src/emu/ui/filesel.cpp:284
msgid "Create"
msgstr ""
-#: src/emu/ui/filesel.cpp:318
+#: src/emu/ui/filesel.cpp:315
msgid "Please enter a file extension too"
msgstr ""
-#: src/emu/ui/filesel.cpp:506 src/emu/ui/swlist.cpp:65
+#: src/emu/ui/filesel.cpp:503 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
msgstr ""
-#: src/emu/ui/filesel.cpp:510
+#: src/emu/ui/filesel.cpp:507
msgid "[create]"
msgstr ""
-#: src/emu/ui/filesel.cpp:514 src/emu/ui/swlist.cpp:76
+#: src/emu/ui/filesel.cpp:511 src/emu/ui/swlist.cpp:76
msgid "[software list]"
msgstr ""
-#: src/emu/ui/filesel.cpp:806
+#: src/emu/ui/filesel.cpp:803
msgid "Select image format"
msgstr ""
-#: src/emu/ui/filesel.cpp:866
+#: src/emu/ui/filesel.cpp:863
msgid "Select access mode"
msgstr ""
-#: src/emu/ui/filesel.cpp:867
+#: src/emu/ui/filesel.cpp:864
msgid "Read-only"
msgstr ""
-#: src/emu/ui/filesel.cpp:869
+#: src/emu/ui/filesel.cpp:866
msgid "Read-write"
msgstr ""
-#: src/emu/ui/filesel.cpp:870
+#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to another image"
msgstr ""
-#: src/emu/ui/filesel.cpp:871
+#: src/emu/ui/filesel.cpp:868
msgid "Read this image, write to diff"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:115
+#: src/emu/ui/imgcntrl.cpp:116
msgid "Cannot save over directory"
msgstr ""
-#: src/emu/ui/imgcntrl.cpp:149
+#: src/emu/ui/imgcntrl.cpp:150
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
@@ -737,7 +649,7 @@ msgstr ""
msgid "[empty]"
msgstr ""
-#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
+#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:91
msgid "Pseudo terminals"
msgstr ""
@@ -753,705 +665,664 @@ msgstr ""
msgid "Other Controls"
msgstr ""
-#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
+#: src/emu/ui/inputmap.cpp:622 src/emu/ui/miscmenu.cpp:91
#: src/emu/ui/slotopt.cpp:172
msgid "Reset"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:53
+#: src/emu/ui/mainmenu.cpp:54
msgid "Input (general)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:55
+#: src/emu/ui/mainmenu.cpp:56
msgid "Input (this Machine)"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:59
+#: src/emu/ui/mainmenu.cpp:60
msgid "Analog Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:61
+#: src/emu/ui/mainmenu.cpp:62
msgid "Dip Switches"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:64
+#: src/emu/ui/mainmenu.cpp:65
msgid "Machine Configuration"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:68
+#: src/emu/ui/mainmenu.cpp:69
msgid "Bookkeeping Info"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:71
+#: src/emu/ui/mainmenu.cpp:72
msgid "Machine Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:77
+#: src/emu/ui/mainmenu.cpp:78
msgid "Image Information"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:80
+#: src/emu/ui/mainmenu.cpp:81
msgid "File Manager"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:85
+#: src/emu/ui/mainmenu.cpp:86
msgid "Tape Control"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:93
+#: src/emu/ui/mainmenu.cpp:94
msgid "Bios Selection"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:99
+#: src/emu/ui/mainmenu.cpp:100
msgid "Slot Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:106
+#: src/emu/ui/mainmenu.cpp:107
msgid "Barcode Reader"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:113
+#: src/emu/ui/mainmenu.cpp:114
msgid "Network Devices"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:118
+#: src/emu/ui/mainmenu.cpp:119
msgid "Keyboard Mode"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:121
+#: src/emu/ui/mainmenu.cpp:122
msgid "Slider Controls"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:124
+#: src/emu/ui/mainmenu.cpp:125
msgid "Video Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:128
+#: src/emu/ui/mainmenu.cpp:129
msgid "Crosshair Options"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:132
+#: src/emu/ui/mainmenu.cpp:133
msgid "Cheat"
msgstr ""
#: src/emu/ui/mainmenu.cpp:136
+msgid "Plugin Options"
+msgstr ""
+
+#: src/emu/ui/mainmenu.cpp:140
msgid "External DAT View"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:142
+#: src/emu/ui/mainmenu.cpp:146
msgid "Add To Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:144
+#: src/emu/ui/mainmenu.cpp:148
msgid "Remove From Favorites"
msgstr ""
-#: src/emu/ui/mainmenu.cpp:151
+#: src/emu/ui/mainmenu.cpp:155
msgid "Select New Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:45
+#: src/emu/ui/menu.cpp:46
msgid "Control Panels"
msgstr ""
-#: src/emu/ui/menu.cpp:50
+#: src/emu/ui/menu.cpp:51
msgid "Artwork Preview"
msgstr ""
-#: src/emu/ui/menu.cpp:54
+#: src/emu/ui/menu.cpp:55
msgid "Game Over"
msgstr ""
-#: src/emu/ui/menu.cpp:64
+#: src/emu/ui/menu.cpp:65
msgid "Add or remove favorites"
msgstr ""
-#: src/emu/ui/menu.cpp:65
+#: src/emu/ui/menu.cpp:66
msgid "Export displayed list to file"
msgstr ""
-#: src/emu/ui/menu.cpp:66
+#: src/emu/ui/menu.cpp:67
msgid "Show DATs view"
msgstr ""
-#: src/emu/ui/menu.cpp:253
+#: src/emu/ui/menu.cpp:254
msgid "Return to Machine"
msgstr ""
-#: src/emu/ui/menu.cpp:257 src/emu/ui/menu.cpp:259
+#: src/emu/ui/menu.cpp:258 src/emu/ui/menu.cpp:260
msgid "Exit"
msgstr ""
-#: src/emu/ui/menu.cpp:264 src/emu/ui/menu.cpp:266
+#: src/emu/ui/menu.cpp:265 src/emu/ui/menu.cpp:267
msgid "Return to Previous Menu"
msgstr ""
-#: src/emu/ui/menu.cpp:681
+#: src/emu/ui/menu.cpp:716
msgid "Auto"
msgstr ""
-#: src/emu/ui/menu.cpp:2098
+#: src/emu/ui/menu.cpp:2133
msgid "Images"
msgstr ""
-#: src/emu/ui/menu.cpp:2099
+#: src/emu/ui/menu.cpp:2134
msgid "Infos"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Keyboard Mode:"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Natural"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:36
+#: src/emu/ui/miscmenu.cpp:37
msgid "Emulated"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:239
+#: src/emu/ui/miscmenu.cpp:240
#, c-format
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:241
+#: src/emu/ui/miscmenu.cpp:242
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:245
+#: src/emu/ui/miscmenu.cpp:246
#, c-format
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
msgid "Coin %1$c: NA%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:256
+#: src/emu/ui/miscmenu.cpp:257
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:259
+#: src/emu/ui/miscmenu.cpp:260
msgid " (locked)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:518
+#: src/emu/ui/miscmenu.cpp:519
msgid "Visible Delay"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:557
-msgid "Re-select last machine played"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:558
-msgid "Enlarge images in the right panel"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:559
-msgid "DATs info"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:561
-msgid "Show mouse pointer"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:562
-msgid "Confirm quit from machines"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:563
-msgid "Skip displaying information's screen at startup"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:564
-msgid "Force 4:3 appearance for software snapshot"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:565
-msgid "Use image as background"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:566
-msgid "Skip bios selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:567
-msgid "Skip software parts selection menu"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:652 src/emu/ui/miscmenu.cpp:672
-#: src/emu/ui/optsmenu.cpp:263
-msgid "Miscellaneous Options"
-msgstr ""
-
-#: src/emu/ui/miscmenu.cpp:737
+#: src/emu/ui/miscmenu.cpp:617
#, c-format
msgid "%s.xml saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:765
+#: src/emu/ui/miscmenu.cpp:645
msgid "Name: Description:\n"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:777
+#: src/emu/ui/miscmenu.cpp:657
#, c-format
msgid "%s.txt saved under ui folder."
msgstr ""
-#: src/emu/ui/miscmenu.cpp:795
+#: src/emu/ui/miscmenu.cpp:675
msgid "Export XML format (like -listxml)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:796
+#: src/emu/ui/miscmenu.cpp:676
msgid "Export TXT format (like -listfull)"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:854
+#: src/emu/ui/miscmenu.cpp:734
msgid "Dummy"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:856
+#: src/emu/ui/miscmenu.cpp:736
msgid "Save machine configuration"
msgstr ""
-#: src/emu/ui/miscmenu.cpp:967 src/emu/ui/miscmenu.cpp:987
-#: src/emu/ui/selgame.cpp:587
+#: src/emu/ui/miscmenu.cpp:848 src/emu/ui/miscmenu.cpp:869
+#: src/emu/ui/selgame.cpp:594
msgid "Plugins"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:214
+#: src/emu/ui/optsmenu.cpp:218
msgid "Filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:222
+#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:227
+#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:250
+#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:258
+#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:259
+#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:262 src/emu/ui/sndmenu.cpp:150
-#: src/emu/ui/sndmenu.cpp:170
+#: src/emu/ui/optsmenu.cpp:266 src/emu/ui/sndmenu.cpp:151
+#: src/emu/ui/sndmenu.cpp:172
msgid "Sound Options"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:265
+#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:267
+#: src/emu/ui/optsmenu.cpp:272
msgid "Save Configuration"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:281 src/emu/ui/optsmenu.cpp:301
+#: src/emu/ui/optsmenu.cpp:286 src/emu/ui/optsmenu.cpp:307
msgid "Settings"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:321
+#: src/emu/ui/optsmenu.cpp:327
msgid "**Error saving ui.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:368
+#: src/emu/ui/optsmenu.cpp:374
#, c-format
msgid "**Error saving %s.ini**"
msgstr ""
-#: src/emu/ui/optsmenu.cpp:372
+#: src/emu/ui/optsmenu.cpp:378
msgid ""
"\n"
" Configuration saved \n"
"\n"
msgstr ""
-#: src/emu/ui/selector.cpp:165
+#: src/emu/ui/selector.cpp:166
msgid "Selection List - Search: "
msgstr ""
-#: src/emu/ui/selector.cpp:194
+#: src/emu/ui/selector.cpp:196
#, c-format
msgid "Double click or press %1$s to select"
msgstr ""
-#: src/emu/ui/selgame.cpp:38
+#: src/emu/ui/selgame.cpp:39
msgid "General Info"
msgstr ""
-#: src/emu/ui/selgame.cpp:370 src/emu/ui/selsoft.cpp:278
+#: src/emu/ui/selgame.cpp:374 src/emu/ui/selsoft.cpp:282
#, c-format
msgid ""
"%s\n"
" added to favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:376 src/emu/ui/selgame.cpp:385
-#: src/emu/ui/selsoft.cpp:283
+#: src/emu/ui/selgame.cpp:380 src/emu/ui/selgame.cpp:389
+#: src/emu/ui/selsoft.cpp:287
#, c-format
msgid ""
"%s\n"
" removed from favorites list."
msgstr ""
-#: src/emu/ui/selgame.cpp:446
+#: src/emu/ui/selgame.cpp:450
msgid ""
"The selected machine is missing one or more required ROM or CHD images. "
"Please select a different machine.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selgame.cpp:585 src/emu/ui/simpleselgame.cpp:262
+#: src/emu/ui/selgame.cpp:589 src/emu/ui/simpleselgame.cpp:265
msgid "Configure Options"
msgstr ""
-#: src/emu/ui/selgame.cpp:744
+#: src/emu/ui/selgame.cpp:752
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
msgstr ""
-#: src/emu/ui/selgame.cpp:754
+#: src/emu/ui/selgame.cpp:762
#, c-format
msgid "%1$s (%2$s - %3$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:761 src/emu/ui/selgame.cpp:767
+#: src/emu/ui/selgame.cpp:769 src/emu/ui/selgame.cpp:775
#, c-format
msgid "%1$s (%2$s) - "
msgstr ""
-#: src/emu/ui/selgame.cpp:776
+#: src/emu/ui/selgame.cpp:784
#, c-format
msgid "%1$s Search: %2$s_"
msgstr ""
-#: src/emu/ui/selgame.cpp:830
+#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:833 src/emu/ui/selgame.cpp:882
-#: src/emu/ui/selsoft.cpp:749 src/emu/ui/selsoft.cpp:799
-#: src/emu/ui/simpleselgame.cpp:325
+#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
+#: src/emu/ui/selsoft.cpp:751 src/emu/ui/selsoft.cpp:801
+#: src/emu/ui/simpleselgame.cpp:328
#, c-format
msgid "%1$s, %2$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:839 src/emu/ui/selsoft.cpp:755
+#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:757
#, c-format
msgid "Driver is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:841 src/emu/ui/selsoft.cpp:757
+#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:759
msgid "Driver is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:845 src/emu/ui/selsoft.cpp:761
-#: src/emu/ui/simpleselgame.cpp:332
+#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:763
+#: src/emu/ui/simpleselgame.cpp:335
msgid "Overall: NOT WORKING"
msgstr ""
-#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:763
-#: src/emu/ui/simpleselgame.cpp:334
+#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:765
+#: src/emu/ui/simpleselgame.cpp:337
msgid "Overall: Unemulated Protection"
msgstr ""
-#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:765
-#: src/emu/ui/simpleselgame.cpp:336
+#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:767
+#: src/emu/ui/simpleselgame.cpp:339
msgid "Overall: Working"
msgstr ""
-#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:769
+#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:771
msgid "Graphics: Imperfect, "
msgstr ""
-#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:771
+#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:773
msgid "Graphics: OK, "
msgstr ""
-#: src/emu/ui/selgame.cpp:858 src/emu/ui/selsoft.cpp:774
+#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:776
msgid "Sound: Unimplemented"
msgstr ""
-#: src/emu/ui/selgame.cpp:860 src/emu/ui/selsoft.cpp:776
+#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:778
msgid "Sound: Imperfect"
msgstr ""
-#: src/emu/ui/selgame.cpp:862 src/emu/ui/selsoft.cpp:778
+#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:780
msgid "Sound: OK"
msgstr ""
-#: src/emu/ui/selgame.cpp:879
+#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:886 src/emu/ui/selsoft.cpp:803
+#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:805
#, c-format
msgid "Software is clone of: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:888 src/emu/ui/selsoft.cpp:805
+#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:807
msgid "Software is parent"
msgstr ""
-#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:810
+#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:812
msgid "Supported: No"
msgstr ""
-#: src/emu/ui/selgame.cpp:898 src/emu/ui/selsoft.cpp:815
+#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:817
msgid "Supported: Partial"
msgstr ""
-#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:820
+#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:822
msgid "Supported: Yes"
msgstr ""
-#: src/emu/ui/selgame.cpp:908 src/emu/ui/selsoft.cpp:825
+#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:827
#, c-format
msgid "romset: %1$-.100s"
msgstr ""
-#: src/emu/ui/selgame.cpp:915
+#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
msgstr ""
-#: src/emu/ui/selgame.cpp:1527
+#: src/emu/ui/selgame.cpp:1535
#, c-format
msgid "Romset: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1528
+#: src/emu/ui/selgame.cpp:1536
#, c-format
msgid "Year: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1529
+#: src/emu/ui/selgame.cpp:1537
#, c-format
msgid "Manufacturer: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1533
+#: src/emu/ui/selgame.cpp:1541
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1535
+#: src/emu/ui/selgame.cpp:1543
msgid "Driver is Parent\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1538
+#: src/emu/ui/selgame.cpp:1546
msgid "Overall: NOT WORKING\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1540
+#: src/emu/ui/selgame.cpp:1548
msgid "Overall: Unemulated Protection\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1542
+#: src/emu/ui/selgame.cpp:1550
msgid "Overall: Working\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1545
+#: src/emu/ui/selgame.cpp:1553
msgid "Graphics: Imperfect Colors\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1549
+#: src/emu/ui/selgame.cpp:1557
msgid "Graphics: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1551
+#: src/emu/ui/selgame.cpp:1559
msgid "Graphics: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1554
+#: src/emu/ui/selgame.cpp:1562
msgid "Sound: Unimplemented\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1556
+#: src/emu/ui/selgame.cpp:1564
msgid "Sound: Imperfect\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1558
+#: src/emu/ui/selgame.cpp:1566
msgid "Sound: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1560
+#: src/emu/ui/selgame.cpp:1568
#, c-format
msgid "Driver is Skeleton: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1561
+#: src/emu/ui/selgame.cpp:1569
#, c-format
msgid "Game is Mechanical: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1562
+#: src/emu/ui/selgame.cpp:1570
#, c-format
msgid "Requires Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1563
+#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1564
+#: src/emu/ui/selgame.cpp:1572
#, c-format
msgid "Support Cocktail: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1565
+#: src/emu/ui/selgame.cpp:1573
#, c-format
msgid "Driver is Bios: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1566
+#: src/emu/ui/selgame.cpp:1574
#, c-format
msgid "Support Save: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
#, c-format
msgid "Screen Orientation: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Vertical"
msgstr ""
-#: src/emu/ui/selgame.cpp:1567
+#: src/emu/ui/selgame.cpp:1575
msgid "Horizontal"
msgstr ""
-#: src/emu/ui/selgame.cpp:1575
+#: src/emu/ui/selgame.cpp:1583
#, c-format
msgid "Requires CHD: %1$s\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1588
+#: src/emu/ui/selgame.cpp:1596
msgid "Roms Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1590
+#: src/emu/ui/selgame.cpp:1598
msgid "Roms Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1593
+#: src/emu/ui/selgame.cpp:1601
msgid "Samples Audit Pass: None Needed\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1595
+#: src/emu/ui/selgame.cpp:1603
msgid "Samples Audit Pass: OK\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1597
+#: src/emu/ui/selgame.cpp:1605
msgid "Samples Audit Pass: BAD\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:1600
+#: src/emu/ui/selgame.cpp:1608
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
-#: src/emu/ui/selgame.cpp:2039 src/emu/ui/selgame.cpp:2200
-#: src/emu/ui/selsoft.cpp:1657
+#: src/emu/ui/selgame.cpp:2049 src/emu/ui/selgame.cpp:2212
+#: src/emu/ui/selsoft.cpp:1662
msgid "No Infos Available"
msgstr ""
-#: src/emu/ui/selgame.cpp:2152 src/emu/ui/selsoft.cpp:1604
+#: src/emu/ui/selgame.cpp:2162 src/emu/ui/selsoft.cpp:1607
msgid "Usage"
msgstr ""
-#: src/emu/ui/selsoft.cpp:109
+#: src/emu/ui/selsoft.cpp:110
msgid " (default)"
msgstr ""
-#: src/emu/ui/selsoft.cpp:378
+#: src/emu/ui/selsoft.cpp:381
msgid ""
"The selected software is missing one or more required files. Please select a "
"different software.\n"
"\n"
-"Press any key (except ESC) to continue."
+"Press any key to continue."
msgstr ""
-#: src/emu/ui/selsoft.cpp:682
+#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
msgstr ""
-#: src/emu/ui/selsoft.cpp:683
+#: src/emu/ui/selsoft.cpp:685
#, c-format
msgid "Driver: \"%1$s\" software list "
msgstr ""
-#: src/emu/ui/selsoft.cpp:686
+#: src/emu/ui/selsoft.cpp:688
#, c-format
msgid "Region: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:688
+#: src/emu/ui/selsoft.cpp:690
#, c-format
msgid "Publisher: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:690
+#: src/emu/ui/selsoft.cpp:692
#, c-format
msgid "Year: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:692
+#: src/emu/ui/selsoft.cpp:694
#, c-format
msgid "Software List: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:694
+#: src/emu/ui/selsoft.cpp:696
#, c-format
msgid "Device type: %1$s -"
msgstr ""
-#: src/emu/ui/selsoft.cpp:696
+#: src/emu/ui/selsoft.cpp:698
#, c-format
msgid "%s Search: %s_"
msgstr ""
-#: src/emu/ui/selsoft.cpp:746 src/emu/ui/selsoft.cpp:796
-#: src/emu/ui/simpleselgame.cpp:322
+#: src/emu/ui/selsoft.cpp:748 src/emu/ui/selsoft.cpp:798
+#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$-.100s"
msgstr ""
-#: src/emu/ui/selsoft.cpp:1994 src/emu/ui/selsoft.cpp:2014
+#: src/emu/ui/selsoft.cpp:1998 src/emu/ui/selsoft.cpp:2018
msgid "Software part selection:"
msgstr ""
-#: src/emu/ui/selsoft.cpp:2132 src/emu/ui/selsoft.cpp:2152
+#: src/emu/ui/selsoft.cpp:2136 src/emu/ui/selsoft.cpp:2156
msgid "Bios selection:"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:232
+#: src/emu/ui/simpleselgame.cpp:235
#, c-format
msgid ""
"No machines found. Please check the rompath specified in the %1$s.ini file.\n"
@@ -1460,33 +1331,33 @@ msgid ""
"docs directory for information on configuring %2$s."
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:287
+#: src/emu/ui/simpleselgame.cpp:290
#, c-format
msgid "Type name or select: %1$s_"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:289
+#: src/emu/ui/simpleselgame.cpp:292
msgid "Type name or select: (random)"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:328
+#: src/emu/ui/simpleselgame.cpp:331
#, c-format
msgid "Driver: %1$-.100s"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
+#: src/emu/ui/simpleselgame.cpp:343 src/emu/ui/simpleselgame.cpp:350
msgid "Imperfect"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
+#: src/emu/ui/simpleselgame.cpp:345 src/emu/ui/simpleselgame.cpp:352
msgid "OK"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:345
+#: src/emu/ui/simpleselgame.cpp:348
msgid "Unimplemented"
msgstr ""
-#: src/emu/ui/simpleselgame.cpp:351
+#: src/emu/ui/simpleselgame.cpp:354
#, c-format
msgid "Gfx: %s, Sound: %s"
msgstr ""
@@ -1495,15 +1366,15 @@ msgstr ""
msgid " [internal]"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:134
+#: src/emu/ui/sndmenu.cpp:135
msgid "Sound"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:135
+#: src/emu/ui/sndmenu.cpp:136
msgid "Sample Rate"
msgstr ""
-#: src/emu/ui/sndmenu.cpp:136
+#: src/emu/ui/sndmenu.cpp:137
msgid "Use External Samples"
msgstr ""
@@ -1572,80 +1443,80 @@ msgstr ""
msgid "Fast Forward"
msgstr ""
-#: src/emu/ui/ui.cpp:410
+#: src/emu/ui/ui.cpp:419
msgid "This driver requires images to be loaded in the following device(s): "
msgstr ""
-#: src/emu/ui/ui.cpp:1060
+#: src/emu/ui/ui.cpp:1074
msgid ""
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
"run correctly.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1073
+#: src/emu/ui/ui.cpp:1087
msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1077
+#: src/emu/ui/ui.cpp:1091
msgid ""
"One or more ROMs/CHDs for this machine have not been correctly dumped.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1081
+#: src/emu/ui/ui.cpp:1095
#, c-format
msgid "The keyboard emulation may not be 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1083
+#: src/emu/ui/ui.cpp:1097
#, c-format
msgid "The colors aren't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1085
+#: src/emu/ui/ui.cpp:1099
msgid "The colors are completely wrong.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1087
+#: src/emu/ui/ui.cpp:1101
#, c-format
msgid "The video emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1089
+#: src/emu/ui/ui.cpp:1103
#, c-format
msgid "The sound emulation isn't 100% accurate.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1091
+#: src/emu/ui/ui.cpp:1105
msgid "The machine lacks sound.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1094
+#: src/emu/ui/ui.cpp:1108
msgid "Screen flipping in cocktail mode is not supported.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1098
+#: src/emu/ui/ui.cpp:1112
msgid "The machine requires external artwork files\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1103
+#: src/emu/ui/ui.cpp:1117
msgid ""
"This machine was never completed. It may exhibit strange behavior or missing "
"elements that are not bugs in the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1108
+#: src/emu/ui/ui.cpp:1122
msgid ""
"This machine has no sound hardware, MAME will produce no sounds, this is "
"expected behaviour.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1116
+#: src/emu/ui/ui.cpp:1130
msgid "The machine has protection which isn't fully emulated.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1119
+#: src/emu/ui/ui.cpp:1133
msgid ""
"\n"
"THIS MACHINE DOESN'T WORK. The emulation for this machine is not yet "
@@ -1653,7 +1524,7 @@ msgid ""
"the developers to improve the emulation.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1123
+#: src/emu/ui/ui.cpp:1137
msgid ""
"\n"
"Certain elements of this machine cannot be emulated as it requires actual "
@@ -1661,21 +1532,21 @@ msgid ""
"to fully play this machine.\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1142
+#: src/emu/ui/ui.cpp:1156
msgid ""
"\n"
"\n"
"There are working clones of this machine: "
msgstr ""
-#: src/emu/ui/ui.cpp:1156
+#: src/emu/ui/ui.cpp:1170
msgid ""
"\n"
"\n"
"Press any key to continue"
msgstr ""
-#: src/emu/ui/ui.cpp:1171
+#: src/emu/ui/ui.cpp:1185
#, c-format
msgid ""
"%1$s\n"
@@ -1685,98 +1556,98 @@ msgid ""
"CPU:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "MHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1207 src/emu/ui/ui.cpp:1246
+#: src/emu/ui/ui.cpp:1221 src/emu/ui/ui.cpp:1260
msgid "kHz"
msgstr ""
-#: src/emu/ui/ui.cpp:1221
+#: src/emu/ui/ui.cpp:1235
msgid ""
"\n"
"Sound:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1250
+#: src/emu/ui/ui.cpp:1264
msgid ""
"\n"
"Video:\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1254
+#: src/emu/ui/ui.cpp:1268
msgid "None\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1261
+#: src/emu/ui/ui.cpp:1275
msgid "Vector"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
#, c-format
msgid "%1$s: %2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1272
+#: src/emu/ui/ui.cpp:1286
msgid "%2$s\n"
msgstr ""
-#: src/emu/ui/ui.cpp:1527 src/emu/ui/ui.cpp:1537
+#: src/emu/ui/ui.cpp:1541 src/emu/ui/ui.cpp:1551
msgid "Keyboard Emulation Status"
msgstr ""
-#: src/emu/ui/ui.cpp:1529
+#: src/emu/ui/ui.cpp:1543
msgid "Mode: PARTIAL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1530
+#: src/emu/ui/ui.cpp:1544
msgid "UI: Enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1532 src/emu/ui/ui.cpp:1542
+#: src/emu/ui/ui.cpp:1546 src/emu/ui/ui.cpp:1556
msgid "**Use ScrLock to toggle**"
msgstr ""
-#: src/emu/ui/ui.cpp:1539
+#: src/emu/ui/ui.cpp:1553
msgid "Mode: FULL Emulation"
msgstr ""
-#: src/emu/ui/ui.cpp:1540
+#: src/emu/ui/ui.cpp:1554
msgid "UI: Disabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1686
+#: src/emu/ui/ui.cpp:1692
msgid "Autofire can't be enabled"
msgstr ""
-#: src/emu/ui/ui.cpp:1725
+#: src/emu/ui/ui.cpp:1731
msgid "Select position to save to"
msgstr ""
-#: src/emu/ui/ui.cpp:1727
+#: src/emu/ui/ui.cpp:1733
msgid "Select position to load from"
msgstr ""
-#: src/emu/ui/ui.cpp:1751
+#: src/emu/ui/ui.cpp:1757
msgid "Save cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1753
+#: src/emu/ui/ui.cpp:1759
msgid "Load cancelled"
msgstr ""
-#: src/emu/ui/ui.cpp:1796
+#: src/emu/ui/ui.cpp:1802
#, c-format
msgid "Save to position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1801
+#: src/emu/ui/ui.cpp:1807
#, c-format
msgid "Load from position %s"
msgstr ""
-#: src/emu/ui/ui.cpp:1841
+#: src/emu/ui/ui.cpp:1847
#, c-format
msgid ""
"Are you sure you want to quit?\n"
@@ -1785,7 +1656,7 @@ msgid ""
"Press ''%2$s'' to return to emulation."
msgstr ""
-#: src/emu/ui/ui.cpp:1916
+#: src/emu/ui/ui.cpp:1917
msgid "Master Volume"
msgstr ""
@@ -1794,7 +1665,7 @@ msgstr ""
msgid "%1$s Volume"
msgstr ""
-#: src/emu/ui/ui.cpp:1948
+#: src/emu/ui/ui.cpp:1949
#, c-format
msgid "Overclock CPU %1$s"
msgstr ""
@@ -1804,154 +1675,154 @@ msgstr ""
msgid "%1$s Refresh Rate"
msgstr ""
-#: src/emu/ui/ui.cpp:1974
+#: src/emu/ui/ui.cpp:1973
#, c-format
msgid "%1$s Brightness"
msgstr ""
-#: src/emu/ui/ui.cpp:1977
+#: src/emu/ui/ui.cpp:1975
#, c-format
msgid "%1$s Contrast"
msgstr ""
-#: src/emu/ui/ui.cpp:1980
+#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Gamma"
msgstr ""
-#: src/emu/ui/ui.cpp:1985
+#: src/emu/ui/ui.cpp:1981
#, c-format
msgid "%1$s Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1988
+#: src/emu/ui/ui.cpp:1983
#, c-format
msgid "%1$s Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:1991
+#: src/emu/ui/ui.cpp:1985
#, c-format
msgid "%1$s Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:1994
+#: src/emu/ui/ui.cpp:1987
#, c-format
msgid "%1$s Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2012
+#: src/emu/ui/ui.cpp:2005
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2015
+#: src/emu/ui/ui.cpp:2007
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2018
+#: src/emu/ui/ui.cpp:2009
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
msgstr ""
-#: src/emu/ui/ui.cpp:2021
+#: src/emu/ui/ui.cpp:2011
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
msgstr ""
-#: src/emu/ui/ui.cpp:2030
+#: src/emu/ui/ui.cpp:2021
msgid "Vector Flicker"
msgstr ""
-#: src/emu/ui/ui.cpp:2032
+#: src/emu/ui/ui.cpp:2022
msgid "Beam Width Minimum"
msgstr ""
-#: src/emu/ui/ui.cpp:2034
+#: src/emu/ui/ui.cpp:2023
msgid "Beam Width Maximum"
msgstr ""
-#: src/emu/ui/ui.cpp:2036
+#: src/emu/ui/ui.cpp:2024
msgid "Beam Intensity Weight"
msgstr ""
-#: src/emu/ui/ui.cpp:2048
+#: src/emu/ui/ui.cpp:2037
#, c-format
msgid "Crosshair Scale %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "X"
msgstr ""
-#: src/emu/ui/ui.cpp:2048 src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2037 src/emu/ui/ui.cpp:2039
msgid "Y"
msgstr ""
-#: src/emu/ui/ui.cpp:2051
+#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "Crosshair Offset %1$s"
msgstr ""
-#: src/emu/ui/ui.cpp:2070
+#: src/emu/ui/ui.cpp:2071
#, c-format
msgid "%1$3ddB"
msgstr ""
-#: src/emu/ui/ui.cpp:2114
+#: src/emu/ui/ui.cpp:2115
#, c-format
msgid "%1$d%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2130
+#: src/emu/ui/ui.cpp:2131
#, c-format
msgid "%1$3.0f%%"
msgstr ""
-#: src/emu/ui/ui.cpp:2153
+#: src/emu/ui/ui.cpp:2154
#, c-format
msgid "%1$.3ffps"
msgstr ""
-#: src/emu/ui/ui.cpp:2176 src/emu/ui/ui.cpp:2198 src/emu/ui/ui.cpp:2219
-#: src/emu/ui/ui.cpp:2241 src/emu/ui/ui.cpp:2263 src/emu/ui/ui.cpp:2285
-#: src/emu/ui/ui.cpp:2307 src/emu/ui/ui.cpp:2329 src/emu/ui/ui.cpp:2351
-#: src/emu/ui/ui.cpp:2373 src/emu/ui/ui.cpp:2395
+#: src/emu/ui/ui.cpp:2177 src/emu/ui/ui.cpp:2199 src/emu/ui/ui.cpp:2220
+#: src/emu/ui/ui.cpp:2242 src/emu/ui/ui.cpp:2264 src/emu/ui/ui.cpp:2286
+#: src/emu/ui/ui.cpp:2308 src/emu/ui/ui.cpp:2330 src/emu/ui/ui.cpp:2352
+#: src/emu/ui/ui.cpp:2374 src/emu/ui/ui.cpp:2396
#, c-format
msgid "%1$.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2411 src/emu/ui/ui.cpp:2427 src/emu/ui/ui.cpp:2443
-#: src/emu/ui/ui.cpp:2459
+#: src/emu/ui/ui.cpp:2412 src/emu/ui/ui.cpp:2428 src/emu/ui/ui.cpp:2444
+#: src/emu/ui/ui.cpp:2460
#, c-format
msgid "%1$1.2f"
msgstr ""
-#: src/emu/ui/ui.cpp:2475
+#: src/emu/ui/ui.cpp:2476
#, c-format
msgid "Screen '%1$s'"
msgstr ""
-#: src/emu/ui/ui.cpp:2477
+#: src/emu/ui/ui.cpp:2478
msgid "Screen"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2493
+#: src/emu/ui/ui.cpp:2494
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset X %1$1.3f"
msgstr ""
-#: src/emu/ui/ui.cpp:2512
+#: src/emu/ui/ui.cpp:2513
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
msgstr ""
@@ -1993,10 +1864,10 @@ msgstr ""
msgid "Full"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " COLORS"
msgstr ""
-#: src/emu/ui/viewgfx.cpp:391
+#: src/emu/ui/viewgfx.cpp:392
msgid " PENS"
msgstr ""
diff --git a/makefile b/makefile
index c8673db1e24..8a4258c595e 100644
--- a/makefile
+++ b/makefile
@@ -98,6 +98,7 @@
# MSBUILD = 1
# USE_LIBUV = 1
# IGNORE_BAD_LOCALISATION=1
+# PRECOMPILE = 0
ifdef PREFIX_MAKEFILE
include $(PREFIX_MAKEFILE)
@@ -497,16 +498,22 @@ endif
endif
ifdef TOOLS
+ifneq '$(TOOLS)' '0'
PARAMS += --with-tools
endif
+endif
ifdef TESTS
+ifneq '$(TESTS)' '0'
PARAMS += --with-tests
endif
+endif
ifdef BENCHMARKS
+ifneq '$(BENCHMARKS)' '0'
PARAMS += --with-benchmarks
endif
+endif
ifdef SYMBOLS
PARAMS += --SYMBOLS='$(SYMBOLS)'
@@ -712,6 +719,10 @@ ifdef USE_LIBUV
PARAMS += --USE_LIBUV='$(USE_LIBUV)'
endif
+ifdef PRECOMPILE
+PARAMS += --precompile='$(PRECOMPILE)'
+endif
+
#-------------------------------------------------
# All scripts
#-------------------------------------------------
diff --git a/nl_examples/kidniki.c b/nl_examples/kidniki.c
index 0b558514b0b..c4ae39f68d9 100644
--- a/nl_examples/kidniki.c
+++ b/nl_examples/kidniki.c
@@ -14,8 +14,8 @@ NETLIST_START(dummy)
PARAM(Solver.NR_LOOPS, 300)
PARAM(Solver.GS_LOOPS, 1)
PARAM(Solver.GS_THRESHOLD, 6)
- PARAM(Solver.ITERATIVE, "W")
- //PARAM(Solver.ITERATIVE, "MAT")
+ //PARAM(Solver.ITERATIVE, "W")
+ PARAM(Solver.ITERATIVE, "MAT")
//PARAM(Solver.ITERATIVE, "GMRES")
//PARAM(Solver.ITERATIVE, "SOR")
PARAM(Solver.DYNAMIC_TS, 0)
diff --git a/plugins/cheat/conv_cheat.lua b/plugins/cheat/conv_cheat.lua
new file mode 100644
index 00000000000..afc87bc55b6
--- /dev/null
+++ b/plugins/cheat/conv_cheat.lua
@@ -0,0 +1,11 @@
+xml = require("xml_conv")
+json = dofile("../json/init.lua")
+
+function readAll(file)
+ local f = io.open(file, "rb")
+ local content = f:read("*all")
+ f:close()
+ return content
+end
+
+print(json.stringify(xml.conv_cheat(readAll(arg[1]))))
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua
new file mode 100644
index 00000000000..ecaf6237377
--- /dev/null
+++ b/plugins/cheat/init.lua
@@ -0,0 +1,469 @@
+-- license:BSD-3-Clause
+-- copyright-holders:Carl
+--
+-- json cheat file format
+-- [{
+-- "desc": "text",
+-- "parameter": {
+-- "min": "minval(0)",
+-- "max": "maxval(numitems)",
+-- "step": "stepval(1)",
+-- "item" [{
+-- "value": "itemval(index*stepval+minval)",
+-- "text": "text"
+-- },
+-- ... ]
+-- },
+-- "space": {
+-- "varname": {
+-- "tag": "tag",
+-- "type": "program|data|io"
+-- },
+-- ...
+-- },
+-- "screen": {
+-- "varname": "tag",
+-- ...
+-- },
+-- "region": {
+-- "varname": "tag",
+-- ...
+-- },
+-- "ram": {
+-- "varname": "tag",
+-- ...
+-- },
+-- "script": {
+-- "on|off|run|change": "script",
+-- ...
+-- },
+-- "comment": "text"
+-- },
+-- ... ]
+--
+-- Scripts are lua scripts with a limited api. Most library functions are unavailable.
+-- Like the XML cheats, param is the current parameter value and variables are shared between scripts within a cheat
+-- Differences from XML cheats:
+-- - actions are only one line which include the entire script
+-- - "condexpr" is replaced with lua control statements (if-then-else-end)
+-- - variables are only limited by the limits of the lua interperter, you can have strings and tables
+-- - the address spaces in the "space" blocks are accessible to the script if included,
+-- same with regions (the "m" space in debug expr)
+-- - frame is replaced by screen:frame_number() so if you use frame a screen needs to be in the device section
+-- - output is a function and argindex isn't supported, output args need to be explicit and a screen device
+-- must be provided
+
+local exports = {}
+exports.name = "cheat"
+exports.version = "0.0.1"
+exports.description = "Cheat plugin"
+exports.license = "The BSD 3-Clause License"
+exports.author = { name = "Carl" }
+
+local cheat = exports
+
+function cheat.startplugin()
+ local cheats = {}
+ local output = {}
+ local line = 0
+
+ local function load_cheats()
+ local filename = emu.romname()
+ local json = require("json")
+ local file = emu.file(manager:machine():options().entries.cheatpath:value():gsub("([^;]+)", "%1;%1/cheat"), 1)
+
+ if emu.softname() ~= "" then
+ for name, image in pairs(manager:machine().images) do
+ if image:exists() and image:software_list_name() ~= "" then
+ filename = image:software_list_name() .. "/" .. emu.softname()
+ end
+ end
+ end
+
+ if file:open(filename .. ".json") then
+ local xml = require("cheat/xml_conv")
+
+ if file:open(filename .. ".xml") then
+ return {}
+ end
+ return xml.conv_cheat(file:read(file:size()))
+ end
+
+ return json.parse(file:read(file:size()))
+ end
+
+ local function draw_text(screen, x, y, color, form, ...)
+ local str = form:format(...)
+ if y == "auto" then
+ y = line
+ line = line + 1
+ end
+ if not screen then
+ print("draw_text: invalid screen")
+ return
+ end
+ if type(x) == "string" then
+ y = y * manager:machine():ui():get_line_height()
+ end
+ output[#output + 1] = { type = "text", scr = screen, x = x, y = y, str = str, color = color }
+ end
+
+ local function draw_line(screen, x1, y1, x2, y2, color)
+ if not screen then
+ print("draw_line: invalid screen")
+ return
+ end
+ output[#output + 1] = { type = "line", scr = screen, x1 = x1, x2 = x2, y1 = y1, y2 = y2, color = color }
+ end
+
+ local function draw_box(screen, x1, y1, x2, y2, bgcolor, linecolor)
+ if not screen then
+ print("draw_box: invalid screen")
+ return
+ end
+ output[#output + 1] = { type = "box", scr = screen, x1 = x1, x2 = x2, y1 = y1, y2 = y2, bgcolor = bgcolor, linecolor = linecolor }
+ end
+
+ local function tobcd(val)
+ local result = 0
+ local shift = 0
+ while val ~= 0 do
+ result = result + ((val % 10) << shift)
+ val = val / 10
+ shift = shift + 4
+ end
+ return result
+ end
+
+ local function frombcd(val)
+ local result = 0
+ local mul = 1
+ while val ~= 0 do
+ result = result + ((val % 16) * mul)
+ val = val >> 4
+ mul = mul * 10
+ end
+ return result
+ end
+
+ local function parse_cheat(cheat)
+ cheat.cheat_env = { draw_text = draw_text,
+ draw_line = draw_line,
+ draw_box = draw_box,
+ tobcd = tobcd,
+ frombcd = frombcd,
+ pairs = pairs,
+ ipairs = ipairs,
+ table_insert = table.insert,
+ table_remove = table.remove }
+ cheat.enabled = false
+ -- verify scripts are valid first
+ if not cheat.script then
+ return
+ end
+ for name, script in pairs(cheat.script) do
+ script, err = load(script, cheat.desc .. name, "t", cheat.cheat_env)
+ if not script then
+ print("error loading cheat script: " .. cheat.desc .. " " .. err)
+ cheat = { desc = cheat.desc .. " error" }
+ return
+ end
+ cheat.script[name] = script
+ end
+ -- initialize temp[0-9] for backward compatbility reasons
+ for i = 0, 9 do
+ cheat.cheat_env["temp" .. i] = 0
+ end
+ if cheat.space then
+ for name, space in pairs(cheat.space) do
+ local cpu, mem
+ cpu = manager:machine().devices[space.tag]
+ if not cpu then
+ print("error loading cheat script: " .. cheat.desc)
+ cheat = { desc = cheat.desc .. " error" }
+ return
+ end
+ if space.type then
+ mem = cpu.spaces[space.type]
+ else
+ mem = cpu.spaces["program"]
+ end
+ if not mem then
+ print("error loading cheat script: " .. cheat.desc)
+ cheat = { desc = cheat.desc .. " error" }
+ return
+ end
+ cheat.cheat_env[name] = mem
+ end
+ end
+ if cheat.screen then
+ for name, screen in pairs(cheat.screen) do
+ local scr
+ scr = manager:machine().screens[screen]
+ if not scr then
+ local tag
+ tag, scr = next(manager:machine().screens) -- get any screen
+ end
+ cheat.cheat_env[name] = scr
+ end
+ end
+ if cheat.region then
+ for name, region in pairs(cheat.region) do
+ local mem
+ mem = manager:machine():memory().regions[region]
+ if not mem then
+ print("error loading cheat script: " .. cheat.desc)
+ cheat = { desc = cheat.desc .. " error" }
+ return
+ end
+ cheat.cheat_env[name] = mem
+ end
+ end
+ if cheat.ram then
+ for name, ram in pairs(cheat.ram) do
+ local ram
+ ram = manager:machine().devices[ram]
+ if not ram then
+ print("error loading cheat script: " .. cheat.desc)
+ cheat = { desc = cheat.desc .. " error" }
+ return
+ end
+ cheat.cheat_env[name] = emu.item(ram.items["0/pointer"])
+ end
+ end
+ local param = cheat.parameter
+ if not param then
+ return
+ end
+ param.min = tonumber(param.min) or 0
+ param.min = tonumber(param.min) or #param.item
+ param.step = tonumber(param.step) or 1
+ if param.item then
+ for count, item in pairs(param.item) do
+ if not item.value then
+ item.value = (count * param.step) + param.min
+ else
+ item.value = tonumber(item.value)
+ end
+ end
+ param.last = #param.item
+ else
+ param.last = ((param.max - param.min) / param.step) + 1
+ end
+ param.index = 0
+ param.value = param.min
+ cheat.cheat_env.param = param.min
+ end
+
+ local function menu_populate()
+ local menu = {}
+ for num, cheat in ipairs(cheats) do
+ menu[num] = {}
+ menu[num][1] = cheat.desc
+ if not cheat.parameter then
+ if not cheat.script then
+ if cheat.desc == "" then
+ menu[num][1] = "---"
+ end
+ menu[num][2] = ""
+ menu[num][3] = "off"
+ elseif not cheat.script.run and not cheat.script.off then
+ menu[num][2] = "Set"
+ menu[num][3] = 0
+ else
+ if cheat.enabled then
+ menu[num][2] = "On"
+ menu[num][3] = "l"
+ else
+ menu[num][2] = "Off"
+ menu[num][3] = "r"
+ end
+ end
+ else
+ if cheat.parameter.index == 0 then
+ if not cheat.script.run and not cheat.script.off then
+ menu[num][2] = "Set"
+ else
+ menu[num][2] = "Off"
+ end
+ menu[num][3] = "r"
+ else
+ if cheat.parameter.item then
+ menu[num][2] = cheat.parameter.item[cheat.parameter.index].text
+ else
+ menu[num][2] = cheat.parameter.value
+ end
+ menu[num][3] = "l"
+ if cheat.parameter.index < cheat.parameter.last then
+ menu[num][3] = "lr"
+ end
+ end
+ end
+ end
+ return menu
+ end
+
+ local function menu_callback(index, event)
+ local function param_calc(param)
+ if param.item then
+ if not param.item[param.index] then -- uh oh
+ param.index = 1
+ end
+ param.value = param.item[param.index].value
+ return
+ end
+ param.value = param.min + (param.step * (param.index - 1))
+ if param.value > param.max then
+ param.value = param.max
+ end
+ end
+
+ local cheat = cheats[index]
+ if not cheat then
+ return false
+ end
+ if event == "up" or event == "down" or event == "comment" then
+ if cheat.comment then
+ manager:machine():popmessage("Cheat Comment:\n" .. cheat.comment)
+ end
+ elseif event == "left" then
+ if cheat.parameter then
+ local param = cheat.parameter
+ if param.index == 1 then
+ param.index = 0
+ cheat.enabled = false
+ cheat.cheat_env.param = param.min
+ if cheat.script.off then
+ cheat.script.off()
+ end
+ return true
+ elseif param.index == 0 then
+ return false
+ end
+ param.index = param.index - 1
+ param_calc(param)
+ cheat.cheat_env.param = param.value
+ if cheat.script.change and (cheat.script.run or cheat.script.off) then
+ cheat.script.change()
+ end
+ return true
+ else
+ if not cheat.script.run and not cheat.script.off then
+ return false
+ end
+ if cheat.enabled then
+ cheat.enabled = false
+ if cheat.script.off then
+ cheat.script.off()
+ end
+ return true
+ end
+ return false
+ end
+ elseif event == "right" then
+ if cheat.parameter then
+ local param = cheat.parameter
+ if param.index == 0 then
+ cheat.enabled = true
+ if cheat.script.on then
+ cheat.script.on()
+ end
+ elseif param.index == param.last then
+ return false
+ end
+ param.index = param.index + 1
+ param_calc(param)
+ cheat.cheat_env.param = param.value
+ if cheat.script.change and (cheat.script.run or cheat.script.off) then
+ cheat.script.change()
+ end
+ return true
+ else
+ if not cheat.script.run and not cheat.script.off then
+ return false
+ end
+ if not cheat.enabled then
+ cheat.enabled = true
+ if cheat.script.on then
+ cheat.script.on()
+ end
+ return true
+ end
+ return false
+ end
+ elseif event == "select" then
+ if not cheat.script.run and not cheat.script.off then
+ if cheat.parameter and cheat.script.change and cheat.parameter.index ~= 0 then
+ param_calc(cheat.parameter)
+ cheat.cheat_env.param = cheat.parameter.value
+ cheat.script.change()
+ local subtext
+ if cheat.parameter.item then
+ subtext = cheat.parameter.item[cheat.parameter.index]
+ else
+ subtext = cheat.parameter.value
+ end
+ manager:machine():popmessage("Activated: " .. cheat.desc .. " = " .. subtext)
+ elseif not cheat.parameter and cheat.script.on then
+ cheat.script.on()
+ manager:machine():popmessage("Activated: " .. cheat.desc)
+ end
+ end
+ end
+ return false
+ end
+
+ emu.register_menu(function(index, event)
+ return menu_callback(index, event)
+ end,
+ function()
+ return menu_populate()
+ end, "Cheat")
+
+ emu.register_start(function()
+ cheats = load_cheats()
+ for num, cheat in pairs(cheats) do
+ parse_cheat(cheat)
+ end
+ end)
+
+ emu.register_frame(function()
+ for num, cheat in pairs(cheats) do
+ if cheat.enabled and cheat.script.run then
+ cheat.script.run()
+ end
+ end
+ end)
+
+ emu.register_frame_done(function()
+ line = 0
+ for num, draw in pairs(output) do
+ if draw.type == "text" then
+ if not draw.color then
+ draw.scr:draw_text(draw.x, draw.y, draw.str)
+ else
+ draw.scr:draw_text(draw.x, draw.y, draw.str, draw.color)
+ end
+ elseif draw.type == "line" then
+ draw.scr:draw_line(draw.x1, draw.y1, draw.x2, draw.y2, draw.color)
+ elseif draw.type == "box" then
+ draw.scr:draw_box(draw.x1, draw.y1, draw.x2, draw.y2, draw.bgcolor, draw.linecolor)
+ end
+ end
+ output = {}
+ end)
+
+ local ce = {}
+
+ -- interface to script cheat engine
+ function ce.inject(newcheat)
+ cheats[#cheats + 1] = newcheat
+ parse_cheat(newcheat)
+ manager:machine():popmessage(newcheat.desc .. " added")
+ end
+
+ _G.ce = ce
+
+end
+
+return exports
diff --git a/plugins/cheat/plugin.json b/plugins/cheat/plugin.json
new file mode 100644
index 00000000000..4067fdbc479
--- /dev/null
+++ b/plugins/cheat/plugin.json
@@ -0,0 +1,10 @@
+{
+ "plugin": {
+ "name": "cheat",
+ "description": "Cheat plugin",
+ "version": "0.0.1",
+ "author": "Carl",
+ "type": "plugin",
+ "start": "false"
+ }
+}
diff --git a/plugins/cheat/xml_conv.lua b/plugins/cheat/xml_conv.lua
new file mode 100644
index 00000000000..712e4027c15
--- /dev/null
+++ b/plugins/cheat/xml_conv.lua
@@ -0,0 +1,244 @@
+local xml = {}
+
+-- basic xml parser for mamecheat only
+local function xml_parse(data)
+ local function fix_gt(str)
+ str = str:gsub(">=", " ge ")
+ str = str:gsub(">", " gt ")
+ return str
+ end
+ data = data:gsub("(condition=%b\"\")", fix_gt)
+ local cheat_str = data:match("<mamecheat.->(.*)</ *mamecheat>")
+
+ local function get_tags(str)
+ local arr = {}
+ while str ~= "" do
+ local tag, attr, stop
+ tag, attr, stop, str = str:match("<([%w!-]+) ?(.-)(/?)[ -]->(.*)")
+
+ if not tag then
+ return arr
+ end
+ if tag:sub(0, 3) ~= "!--" then
+ local block = {}
+ if stop ~= "/" then
+ local nest
+ nest, str = str:match("(.-)</ *" .. tag .. " *>(.*)")
+ local children = get_tags(nest)
+ if not next(children) then
+ nest = nest:gsub("<!--.--->", "")
+ nest = nest:gsub("^%s*(.-)%s*$", "%1")
+ block["text"] = nest
+ else
+ block = children
+ end
+ end
+ if attr then
+ for name, value in attr:gmatch("(%w-)=\"(.-)\"") do
+ block[name] = value:gsub("^%s*(.-)%s*$", "%1")
+ end
+ end
+ if not arr[tag] then
+ arr[tag] = {}
+ end
+ arr[tag][#arr[tag] + 1] = block
+ end
+ end
+ return arr
+ end
+ local xml_table = get_tags(cheat_str)
+ return xml_table
+end
+
+function xml.conv_cheat(data)
+ local spaces, regions, output
+ data = xml_parse(data)
+ local function convert_expr(data)
+ local write = false
+
+ local function convert_memref(cpu, space, width, addr, rw)
+ local direct = ""
+ local count
+ if space == "p" then
+ fullspace = "program"
+ elseif space == "d" then
+ fullspace = "data"
+ elseif space == "i" then
+ fullspace = "io"
+ elseif space == "r" or space == "o" then
+ fullspace = "program"
+ direct = "direct_"
+ space = "p"
+ end
+ if width == "b" then
+ width = "u8"
+ elseif width == "w" then
+ width = "u16"
+ elseif width == "d" then
+ width = "u32"
+ elseif width == "q" then
+ width = "u64"
+ end
+ local cpuname = cpu:gsub(":", "_")
+ if space == "m" then
+ regions[cpuname .. space] = ":" .. cpu
+ else
+ spaces[cpuname .. space] = { tag = ":" .. cpu, type = fullspace }
+ end
+ if rw == "=" then
+ write = true
+ ret = cpuname .. space .. ":" .. "write_" .. direct .. width .. "(" .. addr .. ","
+ else
+ ret = cpuname .. space .. ":" .. "read_" .. direct .. width .. "(" .. addr .. ")"
+ end
+ if rw == "==" then
+ ret = ret .. "=="
+ end
+ return ret
+ end
+
+ local function frame()
+ output = true
+ return "screen:frame_number()"
+ end
+
+ data = data:lower()
+ data = data:gsub("^[(](.-)[)]$", "%1")
+ data = data:gsub("%f[%w]lt%f[%W]", "<")
+ data = data:gsub("%f[%w]ge%f[%W]", ">=")
+ data = data:gsub("%f[%w]gt%f[%W]", ">")
+ data = data:gsub("%f[%w]le%f[%W]", "<=")
+ data = data:gsub("%f[%w]eq%f[%W]", "==")
+ data = data:gsub("%f[%w]ne%f[%W]", "~=")
+ data = data:gsub("!=", "~=")
+ data = data:gsub("||", " or ")
+ data = data:gsub("%f[%w]frame%f[%W]", frame)
+ data = data:gsub("%f[%w]band%f[%W]", "&")
+ data = data:gsub("%f[%w]bor%f[%W]", "|")
+ data = data:gsub("%f[%w]rshift%f[%W]", ">>")
+ data = data:gsub("%f[%w]lshift%f[%W]", "<<")
+ data = data:gsub("(%w-)%+%+", "%1 = %1 + 1")
+ data = data:gsub("%f[%w](%x+)%f[%W]", "0x%1")
+ data = data:gsub("([%w_:]-)%.([pmrodi3]-)([bwdq])@(%w+) *(=*)", convert_memref)
+ repeat
+ data, count = data:gsub("([%w_:]-)%.([pmrodi3]-)([bwdq])@(%b()) *(=*)", convert_memref)
+ until count == 0
+ if write then
+ data = data .. ")"
+ end
+ return data
+ end
+
+ local function convert_output(data)
+ local str = "draw_text(screen,"
+ if data["align"] then
+ str = str .. data["align"]
+ else
+ str = str .. "\"left\""
+ end
+ if data["line"] then
+ str = str .. ",\"" .. data["line"] .. "\""
+ else
+ str = str .. ", \"auto\""
+ end
+ str = str .. ", nil,\"" .. data["format"] .. "\""
+ if data["argument"] then
+ for count, block in pairs(data["argument"]) do
+ local expr = convert_expr(block["text"])
+ if block["count"] then
+ for i = 0, block["count"] - 1 do
+ str = str .. "," .. expr:gsub("argindex", i)
+ end
+ else
+ str = str .. "," .. expr
+ end
+ end
+ end
+ return str .. ")"
+ end
+
+ local function convert_script(data)
+ local str = ""
+ local state = "run"
+ for tag, block in pairs(data) do
+ if tag == "state" then
+ state = block
+ elseif tag == "action" then
+ for count, action in pairs(block) do
+ if action["condition"] then
+ str = str .. " if (" .. convert_expr(action["condition"]) .. ") then "
+ for expr in action["text"]:gmatch("([^,]+)") do
+ str = str .. convert_expr(expr) .. " "
+ end
+ str = str .. "end"
+ else
+ for expr in action["text"]:gmatch("([^,]+)") do
+ str = str .. " " .. convert_expr(expr) .. " "
+ end
+ end
+ end
+ elseif tag == "output" then
+ output = true
+ for count, output in pairs(block) do
+ if output["condition"] then
+ str = str .. " if " .. convert_expr(output["condition"]) .. " then "
+ str = str .. convert_output(output) .. " end "
+ else
+ str = str .. " " .. convert_output(output) .. " "
+ end
+ end
+ end
+ end
+ return state, str
+ end
+
+ for count, cheat in pairs(data["cheat"]) do
+ spaces = {}
+ regions = {}
+ output = false
+ for tag, block in pairs(cheat) do
+ if tag == "comment" then
+ data["cheat"][count]["comment"] = block[1]["text"]
+ elseif tag == "script" then
+ local scripts = {}
+ for count2, script in pairs(block) do
+ local state, str = convert_script(script)
+ scripts[state] = str
+ end
+ data["cheat"][count]["script"] = scripts
+ elseif tag == "parameter" then
+ if block[1]["min"] then
+ block[1]["min"] = block[1]["min"]:gsub("%$","0x")
+ end
+ if block[1]["max"] then
+ block[1]["max"] = block[1]["max"]:gsub("%$","0x")
+ end
+ if block[1]["step"] then
+ block[1]["step"] = block[1]["step"]:gsub("%$","0x")
+ end
+ data["cheat"][count]["parameter"] = block[1]
+ end
+ end
+ if next(spaces) then
+ data["cheat"][count]["space"] = {}
+ for name, space in pairs(spaces) do
+ data["cheat"][count]["space"] = {}
+ data["cheat"][count]["space"][name] = { type = space["type"], tag = space["tag"] }
+ end
+ end
+ if next(regions) then
+ data["cheat"][count]["region"] = {}
+ for name, region in pairs(regions) do
+ data["cheat"][count]["region"] = {}
+ data["cheat"][count]["region"][name] = region
+ end
+ end
+ if output then
+ data["cheat"][count]["screen"] = {}
+ data["cheat"][count]["screen"]["screen"] = ":screen"
+ end
+ end
+ return data["cheat"]
+end
+
+return xml
diff --git a/plugins/cheatfind/init.lua b/plugins/cheatfind/init.lua
new file mode 100644
index 00000000000..eadcb5b6c42
--- /dev/null
+++ b/plugins/cheatfind/init.lua
@@ -0,0 +1,498 @@
+-- license:BSD-3-Clause
+-- copyright-holders:Carl
+-- This includes a library of functions to be used at the Lua console as cf.getspaces() etc...
+local exports = {}
+exports.name = "cheatfind"
+exports.version = "0.0.1"
+exports.description = "Cheat finder helper library"
+exports.license = "The BSD 3-Clause License"
+exports.author = { name = "Carl" }
+
+local cheatfind = exports
+
+function cheatfind.startplugin()
+ local cheat = {}
+
+ -- return table of devices and spaces
+ function cheat.getspaces()
+ local spaces = {}
+ for tag, device in pairs(manager:machine().devices) do
+ if device.spaces then
+ spaces[tag] = {}
+ for name, space in pairs(device.spaces) do
+ spaces[tag][name] = space
+ end
+ end
+ end
+ return spaces
+ end
+
+ -- return table of ram devices
+ function cheat.getram()
+ local ram = {}
+ for tag, device in pairs(manager:machine().devices) do
+ if device:shortname() == "ram" then
+ ram[tag] = {}
+ ram[tag].dev = device
+ ram[tag].size = emu.item(device.items["0/m_size"]):read(0)
+ end
+ end
+ return ram
+ end
+
+ -- save data block
+ function cheat.save(space, start, size)
+ local data = { block = "", start = start, size = size, space = space }
+ if space.shortname then
+ if space:shortname() == "ram" then
+ data.block = emu.item(space.items["0/m_pointer"]):read_block(start, size)
+ if not data.block then
+ return nil
+ end
+ end
+ else
+ local block = ""
+ for i = start, start + size do
+ block = block .. string.pack("B", space:read_u8(i))
+ end
+ data.block = block
+ end
+ return data
+ end
+
+ -- compare two data blocks
+ function cheat.comp(olddata, newdata, oper, val, signed, width, endian)
+ local ret = {}
+ local ref = {} -- this is a helper for comparing two match lists
+ local format = ""
+ local size = olddata.size
+
+ if endian == 1 then
+ format = format .. ">"
+ else
+ format = format .. "<"
+ end
+ if width == 16 then
+ size = size & 0xfffe
+ if signed == 1 then
+ format = format .. "h"
+ else
+ format = format .. "H"
+ end
+ elseif width == 32 then
+ size = size & 0xfffc
+ if signed == 1 then
+ format = format .. "l"
+ else
+ format = format .. "L"
+ end
+ elseif width == 64 then
+ size = size & 0xfff8
+ if signed == 1 then
+ format = format .. "j"
+ else
+ format = format .. "J"
+ end
+ else
+ if signed == 1 then
+ format = format .. "b"
+ else
+ format = format .. "B"
+ end
+ end
+
+ if olddata.start ~= newdata.start or olddata.size ~= newdata.size then
+ return {}
+ end
+ if not val then
+ val = 0
+ end
+ if oper == "+" or oper == "inc" or oper == "<" or oper == "lt" then
+ for i = 1, size do
+ local old = string.unpack(format, olddata.block, i)
+ local new = string.unpack(format, newdata.block, i)
+ if old < new then
+ if (val > 0 and (old + val) == new) or val == 0 then
+ ret[#ret + 1] = { addr = olddata.start + i - 1,
+ oldval = old,
+ newval = new}
+ ref[ret[#ret].addr] = #ret
+ end
+ end
+ end
+ elseif oper == "-" or oper == "dec" or oper == ">" or oper == "gt" then
+ for i = 1, size do
+ local old = string.unpack(format, olddata.block, i)
+ local new = string.unpack(format, newdata.block, i)
+ if old > new then
+ if (val > 0 and (old - val) == new) or val == 0 then
+ ret[#ret + 1] = { addr = olddata.start + i - 1,
+ oldval = old,
+ newval = new}
+ ref[ret[#ret].addr] = #ret
+ end
+ end
+ end
+ elseif oper == "=" or oper == "eq" then
+ for i = 1, size do
+ local old = string.unpack(format, olddata.block, i)
+ local new = string.unpack(format, newdata.block, i)
+ if old == new then
+ ret[#ret + 1] = { addr = olddata.start + i - 1,
+ oldval = old,
+ newval = new}
+ ref[ret[#ret].addr] = #ret
+ end
+ end
+ elseif oper == "!" or oper == "ne" then
+ for i = 1, size do
+ local old = string.unpack(format, olddata.block, i)
+ local new = string.unpack(format, newdata.block, i)
+ if old ~= new then
+ ret[#ret + 1] = { addr = olddata.start + i - 1,
+ oldval = old,
+ newval = new}
+ ref[ret[#ret].addr] = #ret
+ end
+ end
+ elseif oper == "^" or oper == "xor" then
+ if val >= width then
+ return {}
+ end
+ for i = 1, size do
+ local old = string.unpack(format, olddata.block, i)
+ local new = string.unpack(format, newdata.block, i)
+ if ((old ~ new) & (1 << val)) ~= 0 then
+ ret[#ret + 1] = { addr = olddata.start + i - 1,
+ oldval = old,
+ newval = new}
+ ref[ret[#ret].addr] = #ret
+ end
+ end
+ end
+ return ret, ref
+ end
+
+ -- compare successive pairs of blocks from a table returning only addresses that match every comparison
+ function cheat.compall(dattable, oper, val, signed, width, endian)
+ if #dattable < 2 then
+ return {}
+ end
+ local matches, refs = cheat.comp(dattable[1], dattable[2], oper, val, signed, width, endian)
+ local nonmatch = {}
+ for i = 2, #dattable - 1 do
+ local matchnext, refsnext = cheat.comp(dattable[i], dattable[i+1], oper, val, signed, width, endian)
+ for addr, ref in pairs(refs) do
+ if not refsnext[addr] then
+ nonmatch[ref] = true
+ refs[addr] = nil
+ else
+ matches[ref].newval = matchnext[refsnext[addr]].newval
+ end
+ end
+ end
+ local resort = {}
+ for num, match in pairs(matches) do
+ if not nonmatch[num] then
+ resort[#resort + 1] = match
+ end
+ end
+ return resort
+ end
+
+
+ -- compare a data block to the current state
+ function cheat.compcur(olddata, oper, val, signed, width, endian)
+ local newdata = cheat.save(olddata.space, olddata.start, olddata.size, olddata.space)
+ return cheat.comp(olddata, newdata, oper, val, signed, width, endian)
+ end
+
+ _G.cf = cheat
+
+ local devtable = {}
+ local devsel = 1
+ local devcur = 1
+ local bitwidth = 3
+ local signed = 0
+ local endian = 0
+ local optable = { "<", ">", "=", "!", "^" }
+ local opsel = 1
+ local bit = 0
+ local value = 0
+ local leftop = 1
+ local rightop = 0
+ local matches = {}
+ local matchsel = 1
+ local menu_blocks = {}
+ local midx = { region = 1, init = 2, save = 3, width = 5, signed = 6, endian = 7, op = 8, val = 9,
+ lop = 10, rop = 11, comp = 12, match = 14 }
+
+ local function start()
+ devtable = {}
+ devsel = 1
+ devcur = 1
+ bitwidth = 3
+ signed = 0
+ endian = 0
+ opsel = 1
+ bit = 0
+ value = 0
+ leftop = 1
+ rightop = 1
+ matches = {}
+ matchsel = 1
+ menu_blocks = {}
+
+ table = cheat.getspaces()
+ for tag, list in pairs(table) do
+ if list.program then
+ local ram = {}
+ for num, entry in pairs(list.program.map) do
+ if entry.writetype == "ram" then
+ ram[#ram + 1] = { offset = entry.offset, size = entry.endoff - entry.offset }
+ end
+ end
+ if next(ram) then
+ devtable[#devtable + 1] = { tag = tag, space = list.program, ram = ram }
+ end
+ end
+ end
+ table = cheat.getram()
+ for tag, ram in pairs(table) do
+ devtable[#devtable + 1] = { tag = tag, space = ram.dev, ram = {{ offset = 0, size = ram.size }} }
+ end
+ end
+
+ emu.register_start(start)
+
+ local function menu_populate()
+ local menu = {}
+
+ local function menu_lim(val, min, max, menuitem)
+ if val == min then
+ menuitem[3] = "r"
+ elseif val == max then
+ menuitem[3] = "l"
+ else
+ menuitem[3] = "lr"
+ end
+ end
+
+ menu[midx.region] = { "CPU or RAM", devtable[devsel].tag, 0 }
+ if #devtable == 1 then
+ menu[midx.region][3] = 0
+ else
+ menu_lim(devsel, 1, #devtable, menu[midx.region])
+ end
+ menu[midx.init] = { "Init", "", 0 }
+ if #menu_blocks ~= 0 then
+ menu[midx.save] = { "Save current", "", 0 }
+ menu[midx.save + 1] = { "---", "", "off" }
+ menu[midx.width] = { "Bit Width", 1 << bitwidth , 0 }
+ menu_lim(bitwidth, 3, 6, menu[midx.width])
+ menu[midx.signed] = { "Signed", "false", 0 }
+ menu_lim(signed, 0, 1, menu[midx.signed])
+ if signed == 1 then
+ menu[midx.signed][2] = "true"
+ end
+ menu[midx.endian] = { "Endian", "little", 0 }
+ menu_lim(endian, 0, 1, menu[midx.endian])
+ if endian == 1 then
+ menu[midx.endian][2] = "big"
+ end
+ menu[midx.op] = { "Operator", optable[opsel], "" }
+ menu_lim(opsel, 1, #optable, menu[midx.op])
+ if optable[opsel] == "^" then
+ menu[midx.val] = { "Bit", bit, "" }
+ menu_lim(bit, 0, (1 << bitwidth), menu[midx.val])
+ else
+ menu[midx.val] = { "Value", value, "" }
+ menu_lim(value, 0, 100, menu[midx.val]) -- max value?
+ if value == 0 then
+ menu[midx.val][2] = "Any"
+ end
+ end
+ menu[midx.lop] = { "Left operand", leftop, "" }
+ menu_lim(leftop, 1, #menu_blocks[1] + 1, menu[midx.lop])
+ if leftop == #menu_blocks[1] + 1 then
+ menu[midx.lop][2] = "All"
+ end
+ menu[midx.rop] = { "Right operand", rightop, "" }
+ menu_lim(rightop, 1, #menu_blocks[1] + 1, menu[midx.rop])
+ if rightop == #menu_blocks[1] + 1 then
+ menu[midx.rop][2] = "Current"
+ end
+ menu[midx.comp] = { "Compare", "", 0 }
+ if #matches ~= 0 then
+ menu[midx.comp + 1] = { "---", "", "off" }
+ menu[midx.match] = { "Match block", matchsel, "" }
+ if #matches == 1 then
+ menu[midx.match][3] = 0
+ else
+ menu_lim(matchsel, 1, #matches, menu[midx.match])
+ end
+ for num2, match in ipairs(matches[matchsel]) do
+ if #menu > 50 then
+ break
+ end
+ local numform = ""
+ if bitwidth == 4 then
+ numform = " %04x"
+ elseif bitwidth == 5 then
+ numform = " %08x"
+ elseif bitwidth == 6 then
+ numform = " %016x"
+ else
+ numform = " %02x"
+ end
+ menu[#menu + 1] = { string.format("%08x" .. numform .. numform, match.addr, match.oldval,
+ match.newval), "", 0 }
+ if not match.mode then
+ match.mode = 1
+ end
+ if match.mode == 1 then
+ menu[#menu][2] = "Test"
+ else
+ menu[#menu][2] = "Write"
+ end
+ menu_lim(match.mode, 1, 2, menu[#menu])
+ end
+ end
+ end
+ return menu
+ end
+
+ local function menu_callback(index, event)
+ local ret = false
+
+ local function incdec(val, min, max)
+ if event == "left" and val ~= min then
+ val = val - 1
+ ret = true
+ elseif event == "right" and val ~= max then
+ val = val + 1
+ ret = true
+ end
+ return val
+ end
+
+ if index == midx.region then
+ if (event == "left" or event == "right") and #menu_blocks ~= 0 then
+ manager:machine():popmessage("Changes to this only take effect when Init is selected")
+ end
+ devsel = incdec(devsel, 1, #devtable)
+ return true
+ elseif index == midx.init then
+ if event == "select" then
+ menu_blocks = {}
+ matches = {}
+ for num, region in ipairs(devtable[devcur].ram) do
+ menu_blocks[num] = {}
+ menu_blocks[num][1] = cheat.save(devtable[devcur].space, region.offset, region.size)
+ end
+ manager:machine():popmessage("Data cleared and current state saved")
+ ret = true
+ end
+ devcur = devsel
+ elseif index == midx.save then
+ if event == "select" then
+ for num, region in ipairs(devtable[devcur].ram) do
+ menu_blocks[num][#menu_blocks[num] + 1] = cheat.save(devtable[devcur].space, region.offset, region.size)
+ end
+ manager:machine():popmessage("Current state saved")
+ ret = true
+ end
+ elseif index == midx.width then
+ bitwidth = incdec(bitwidth, 3, 6)
+ if event == "left" or event == "right" then
+ bit = 0
+ end
+ elseif index == midx.signed then
+ signed = incdec(signed, 0, 1)
+ elseif index == midx.endian then
+ endian = incdec(endian, 0, 1)
+ elseif index == midx.op then
+ if event == "left" or event == "right" or event == "comment" then
+ if optable[opsel] == "<" then
+ manager:machine():popmessage("Left less than right, value is difference")
+ elseif optable[opsel] == ">" then
+ manager:machine():popmessage("Left greater than right, value is difference")
+ elseif optable[opsel] == "=" then
+ manager:machine():popmessage("Left equal to right, value is ignored")
+ elseif optable[opsel] == "!" then
+ manager:machine():popmessage("Left not equal to right, value is ignored")
+ elseif optable[opsel] == "^" then
+ manager:machine():popmessage("Left bit different than right")
+ end
+ end
+ opsel = incdec(opsel, 1, #optable)
+ elseif index == midx.val then
+ if optable[opsel] == "^" then
+ bit = incdec(bit, 0, (1 << bitwidth))
+ else
+ value = incdec(value, 0, 100)
+ end
+ elseif index == midx.lop then
+ leftop = incdec(leftop, 1, #menu_blocks[1] + 1)
+ if (event == "left" or event == "right" or event == "comment") and leftop == #menu_blocks[1] + 1 then
+ manager:machine():popmessage("Any compares every saved data pair and returns only matches that are true for all. Right operand is ignored.")
+ end
+ elseif index == midx.rop then
+ rightop = incdec(rightop, 1, #menu_blocks[1] + 1)
+ elseif index == midx.comp then
+ if event == "select" then
+ matches = {}
+ local val
+ if optable[opsel] == "^" then
+ val = bit
+ else
+ val = value
+ end
+ for num = 1, #menu_blocks do
+ if leftop == #menu_blocks[1] + 1 then
+ matches[#matches + 1] = cheat.compall(menu_blocks[num], optable[opsel], val, signed,
+ 1 << bitwidth, endian)
+ elseif rightop == #menu_blocks[1] + 1 then
+ matches[#matches + 1] = cheat.compcur(menu_blocks[num][leftop], optable[opsel], val,
+ signed, 1 << bitwidth, endian)
+ else
+ matches[#matches + 1] = cheat.comp(menu_blocks[num][leftop], menu_blocks[num][rightop],
+ optable[opsel], val, signed, 1 << bitwidth, endian)
+ end
+ end
+ ret = true
+ end
+ elseif index == midx.match then
+ matchsel = incdec(matchsel, 0, #matches)
+ elseif index > midx.match then
+ local match = matches[matchsel][index - midx.match]
+ match.mode = incdec(match.mode, 1, 2)
+ if event == "select" then
+ local dev = devtable[devcur]
+ local cheat = { desc = string.format("Test cheat at addr %08x", match.addr), script = {} }
+ if dev.space.shortname then
+ cheat.ram = dev.tag
+ cheat.script.on = "ram:write(" .. match.addr .. "," .. match.newval .. ")"
+ else
+ cheat.space = { cpu = { tag = dev.tag, type = "program" } }
+ cheat.script.on = "cpu:write_u8(" .. match.addr .. "," .. match.newval .. ")"
+ end
+ if match.mode == 1 then
+ if not _G.ce then
+ manager:machine():popmessage("Cheat engine not available")
+ else
+ ce.inject(cheat)
+ end
+ else
+
+ end
+
+ end
+ end
+ devsel = devcur
+ return ret
+ end
+ emu.register_menu(menu_callback, menu_populate, "Cheat Finder")
+end
+
+return exports
diff --git a/plugins/cheatfind/plugin.json b/plugins/cheatfind/plugin.json
new file mode 100644
index 00000000000..8316cb5f334
--- /dev/null
+++ b/plugins/cheatfind/plugin.json
@@ -0,0 +1,10 @@
+{
+ "plugin": {
+ "name": "cheatfind",
+ "description": "Cheat finder helper library",
+ "version": "0.0.1",
+ "author": "Carl",
+ "type": "plugin",
+ "start": "false"
+ }
+}
diff --git a/plugins/dummy/init.lua b/plugins/dummy/init.lua
index 3ef8fe3fc0b..8058bcad452 100644
--- a/plugins/dummy/init.lua
+++ b/plugins/dummy/init.lua
@@ -17,6 +17,17 @@ function dummy.startplugin()
emu.register_stop(function()
print("Exiting " .. emu.gamename())
end)
+
+ local function menu_populate()
+ return {{ "This is a", "test", 32 }, { "Also a", "test", 0 }} -- 32 is MENU_FLAG_DISABLE
+ end
+
+ local function menu_callback(index, event)
+ print("index: " .. index .. " event: " .. event)
+ return false
+ end
+
+ emu.register_menu(menu_callback, menu_populate, "Dummy")
end
return exports
diff --git a/plugins/timer/init.lua b/plugins/timer/init.lua
new file mode 100644
index 00000000000..3a96f019f0d
--- /dev/null
+++ b/plugins/timer/init.lua
@@ -0,0 +1,93 @@
+-- license:BSD-3-Clause
+-- copyright-holders:Carl
+require('lfs')
+local exports = {}
+exports.name = "timer"
+exports.version = "0.0.1"
+exports.description = "Game play timer"
+exports.license = "The BSD 3-Clause License"
+exports.author = { name = "Carl" }
+
+local timer = exports
+
+function timer.startplugin()
+ local timer_path = "timer"
+ local timer_started = false
+ local total_time = 0
+ local start_time = 0
+ local play_count = 0
+
+ local function get_filename()
+ local path
+ if emu.softname() ~= "" then
+ path = timer_path .. '/' .. emu.romname() .. "_" .. emu.softname() .. ".time"
+ else
+ path = timer_path .. '/' .. emu.romname() .. ".time"
+ end
+ return path
+ end
+
+ local function save()
+ total_time = total_time + (os.time() - start_time)
+ os.remove(get_filename()) -- truncate file
+ file = io.open(get_filename(), "w")
+ if not file then
+ lfs.mkdir(timer_path)
+ file = io.open(get_filename(), "w")
+ end
+ if file then
+ file:write(total_time .. "\n")
+ file:write(play_count)
+ file:close()
+ end
+ end
+
+
+ emu.register_start(function()
+ local file
+ if timer_started then
+ save()
+ end
+ timer_started = true
+ local file = io.open(get_filename(), "r")
+ if file then
+ total_time = file:read("n")
+ play_count = file:read("n")
+ file:close()
+ end
+ start_time = os.time()
+ play_count = play_count + 1
+ end)
+
+ emu.register_stop(function()
+ timer_started = false
+ save()
+ total_time = 0
+ play_count = 0
+ end)
+
+ local function sectohms(time)
+ local hrs = math.floor(time / 3600)
+ local min = math.floor((time % 3600) / 60)
+ local sec = time % 60
+ return string.format("%03d:%02d:%02d", hrs, min, sec)
+ end
+
+ local function menu_populate()
+ local time = os.time() - start_time
+ return {{ "Current time", "", "off" },
+ { sectohms(time), "", "off" },
+ { "Total time", "", "off" },
+ { sectohms(total_time + time), "", "off" },
+ { "Play Count", "", "off" },
+ { play_count, "", "off" }}
+ end
+
+ local function menu_callback(index, event)
+ return true
+ end
+
+ emu.register_menu(menu_callback, menu_populate, "Timer")
+end
+
+return exports
diff --git a/plugins/timer/plugin.json b/plugins/timer/plugin.json
new file mode 100644
index 00000000000..3c4629ba60d
--- /dev/null
+++ b/plugins/timer/plugin.json
@@ -0,0 +1,10 @@
+{
+ "plugin": {
+ "name": "timer",
+ "description": "Timer plugin",
+ "version": "0.0.1",
+ "author": "Carl",
+ "type": "plugin",
+ "start": "false"
+ }
+}
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 08cf0aa381d..a3c59ca7462 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -16,6 +16,14 @@ MAME_DIR = (path.getabsolute("..") .. "/")
local MAME_BUILD_DIR = (MAME_DIR .. _OPTIONS["build-dir"] .. "/")
local naclToolchain = ""
+newoption {
+ trigger = "precompile",
+ description = "Precompiled headers generation.",
+ allowed = {
+ { "0", "Disabled" },
+ { "1", "Enabled" },
+ }
+}
function backtick(cmd)
result = string.gsub(string.gsub(os.outputof(cmd), "\r?\n$", ""), " $", "")
@@ -57,9 +65,11 @@ function layoutbuildtask(_folder, _name)
end
function precompiledheaders()
- configuration { "not xcode4" }
- pchheader("emu.h")
- configuration { }
+ if _OPTIONS["precompile"]==nil or (_OPTIONS["precompile"]~=nil and _OPTIONS["precompile"]=="1") then
+ configuration { "not xcode4" }
+ pchheader("emu.h")
+ configuration { }
+ end
end
function addprojectflags()
@@ -943,6 +953,7 @@ end
"-Wno-inline-new-delete",
"-Wno-constant-logical-operand",
"-Wno-deprecated-register",
+ "-fdiagnostics-show-note-include-stack",
}
if (version >= 30500) then
buildoptions {
diff --git a/src/osd/sdl/emscripten_post.js b/scripts/resources/emscripten/emscripten_post.js
index 6bfad8790cb..6bfad8790cb 100644
--- a/src/osd/sdl/emscripten_post.js
+++ b/scripts/resources/emscripten/emscripten_post.js
diff --git a/src/mame/osd/windows/mame/mame.ico b/scripts/resources/windows/mame/mame.ico
index 62761447fc2..62761447fc2 100644
--- a/src/mame/osd/windows/mame/mame.ico
+++ b/scripts/resources/windows/mame/mame.ico
Binary files differ
diff --git a/src/mame/osd/windows/mame/mame.man b/scripts/resources/windows/mame/mame.man
index e08eba181cb..e08eba181cb 100644
--- a/src/mame/osd/windows/mame/mame.man
+++ b/scripts/resources/windows/mame/mame.man
diff --git a/src/mame/osd/windows/mame/mame.rc b/scripts/resources/windows/mame/mame.rc
index 8156b424c64..8156b424c64 100644
--- a/src/mame/osd/windows/mame/mame.rc
+++ b/scripts/resources/windows/mame/mame.rc
diff --git a/src/mame/osd/windows/mess/mess.ico b/scripts/resources/windows/mess/mess.ico
index bab67dd6195..bab67dd6195 100644
--- a/src/mame/osd/windows/mess/mess.ico
+++ b/scripts/resources/windows/mess/mess.ico
Binary files differ
diff --git a/src/mame/osd/windows/mess/mess.man b/scripts/resources/windows/mess/mess.man
index 67ba3aced37..67ba3aced37 100644
--- a/src/mame/osd/windows/mess/mess.man
+++ b/scripts/resources/windows/mess/mess.man
diff --git a/src/mame/osd/windows/mess/mess.rc b/scripts/resources/windows/mess/mess.rc
index 1329bcd6fb8..1329bcd6fb8 100644
--- a/src/mame/osd/windows/mess/mess.rc
+++ b/scripts/resources/windows/mess/mess.rc
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 30cb3770a4a..26d5c687cd0 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -18,6 +18,34 @@ project "expat"
uuid "f4cd40b1-c37c-452d-9785-640f26f0bf54"
kind "StaticLib"
+ -- fake out the enough of expat_config.h to get by
+ defines {
+ "HAVE_MEMMOVE",
+ "HAVE_STDINT_H",
+ "HAVE_STDLIB_H",
+ "HAVE_STRING_H",
+ "PACKAGE_BUGREPORT=\"expat-bugs@libexpat.org\"",
+ "PACKAGE_NAME=\"expat\"",
+ "PACKAGE_STRING=\"expat 2.1.1\"",
+ "PACKAGE_TARNAME=\"expat\"",
+ "PACKAGE_URL=\"\"",
+ "PACKAGE_VERSION=\"2.1.1\"",
+ "STDC_HEADERS",
+ "XML_CONTEXT_BYTES=1024",
+ "XML_DTD",
+ "XML_NS",
+ }
+if _OPTIONS["BIGENDIAN"]=="1" then
+ defines {
+ "BYTEORDER=4321",
+ "WORDS_BIGENDIAN",
+ }
+else
+ defines {
+ "BYTEORDER=1234",
+ }
+end
+
configuration { "vs*" }
buildoptions {
"/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter
@@ -271,7 +299,7 @@ end
"HAVE_CONFIG_H=1",
}
- configuration { "gmake"}
+ configuration { "gmake" }
buildoptions_c {
"-Wno-unused-function",
"-O0",
@@ -324,6 +352,17 @@ project "7z"
uuid "ad573d62-e76a-4b11-ae34-5110a6789a42"
kind "StaticLib"
+ configuration { "gmake" }
+ buildoptions_c {
+ "-Wno-undef",
+ "-Wno-strict-prototypes",
+ }
+
+ configuration { "mingw*" }
+ buildoptions_c {
+ "-Wno-strict-prototypes",
+ }
+
configuration { "vs*" }
buildoptions {
"/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter
@@ -346,24 +385,47 @@ end
}
files {
+ MAME_DIR .. "3rdparty/lzma/C/7zAlloc.c",
+ MAME_DIR .. "3rdparty/lzma/C/7zArcIn.c",
MAME_DIR .. "3rdparty/lzma/C/7zBuf.c",
MAME_DIR .. "3rdparty/lzma/C/7zBuf2.c",
MAME_DIR .. "3rdparty/lzma/C/7zCrc.c",
MAME_DIR .. "3rdparty/lzma/C/7zCrcOpt.c",
MAME_DIR .. "3rdparty/lzma/C/7zDec.c",
- MAME_DIR .. "3rdparty/lzma/C/7zIn.c",
+ MAME_DIR .. "3rdparty/lzma/C/7zFile.c",
+ MAME_DIR .. "3rdparty/lzma/C/7zStream.c",
+ MAME_DIR .. "3rdparty/lzma/C/Aes.c",
+ MAME_DIR .. "3rdparty/lzma/C/AesOpt.c",
+ MAME_DIR .. "3rdparty/lzma/C/Alloc.c",
+ MAME_DIR .. "3rdparty/lzma/C/Bcj2.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/Bcj2Enc.c",
+ MAME_DIR .. "3rdparty/lzma/C/Bra.c",
+ MAME_DIR .. "3rdparty/lzma/C/Bra86.c",
+ MAME_DIR .. "3rdparty/lzma/C/BraIA64.c",
MAME_DIR .. "3rdparty/lzma/C/CpuArch.c",
- MAME_DIR .. "3rdparty/lzma/C/LzmaDec.c",
+ MAME_DIR .. "3rdparty/lzma/C/Delta.c",
+ MAME_DIR .. "3rdparty/lzma/C/LzFind.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/LzFindMt.c",
MAME_DIR .. "3rdparty/lzma/C/Lzma2Dec.c",
- MAME_DIR .. "3rdparty/lzma/C/LzmaEnc.c",
MAME_DIR .. "3rdparty/lzma/C/Lzma2Enc.c",
- MAME_DIR .. "3rdparty/lzma/C/LzFind.c",
- MAME_DIR .. "3rdparty/lzma/C/Bra.c",
- MAME_DIR .. "3rdparty/lzma/C/Bra86.c",
- MAME_DIR .. "3rdparty/lzma/C/Bcj2.c",
+ MAME_DIR .. "3rdparty/lzma/C/Lzma86Dec.c",
+ MAME_DIR .. "3rdparty/lzma/C/Lzma86Enc.c",
+ MAME_DIR .. "3rdparty/lzma/C/LzmaDec.c",
+ MAME_DIR .. "3rdparty/lzma/C/LzmaEnc.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/LzmaLib.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/MtCoder.c",
MAME_DIR .. "3rdparty/lzma/C/Ppmd7.c",
MAME_DIR .. "3rdparty/lzma/C/Ppmd7Dec.c",
- MAME_DIR .. "3rdparty/lzma/C/7zStream.c",
+ MAME_DIR .. "3rdparty/lzma/C/Ppmd7Enc.c",
+ MAME_DIR .. "3rdparty/lzma/C/Sha256.c",
+ MAME_DIR .. "3rdparty/lzma/C/Sort.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/Threads.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/Xz.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/XzCrc64.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/XzCrc64Opt.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/XzDec.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/XzEnc.c",
+ -- MAME_DIR .. "3rdparty/lzma/C/XzIn.c",
}
--------------------------------------------------
@@ -720,6 +782,7 @@ end
buildoptions {
"-Wno-uninitialized",
"-Wno-unused-function",
+ "-Wno-unused-but-set-variable",
}
configuration { "rpi" }
buildoptions {
@@ -765,14 +828,15 @@ end
MAME_DIR .. "3rdparty/bgfx/src/glcontext_ppapi.cpp",
MAME_DIR .. "3rdparty/bgfx/src/glcontext_wgl.cpp",
MAME_DIR .. "3rdparty/bgfx/src/image.cpp",
- MAME_DIR .. "3rdparty/bgfx/src/ovr.cpp",
+ MAME_DIR .. "3rdparty/bgfx/src/hmd_ovr.cpp",
+ MAME_DIR .. "3rdparty/bgfx/src/hmd_openvr.cpp",
MAME_DIR .. "3rdparty/bgfx/src/renderer_d3d12.cpp",
MAME_DIR .. "3rdparty/bgfx/src/renderer_d3d11.cpp",
MAME_DIR .. "3rdparty/bgfx/src/renderer_d3d9.cpp",
MAME_DIR .. "3rdparty/bgfx/src/renderer_gl.cpp",
MAME_DIR .. "3rdparty/bgfx/src/renderer_null.cpp",
MAME_DIR .. "3rdparty/bgfx/src/renderer_vk.cpp",
- MAME_DIR .. "3rdparty/bgfx/src/renderdoc.cpp",
+ MAME_DIR .. "3rdparty/bgfx/src/debug_renderdoc.cpp",
MAME_DIR .. "3rdparty/bgfx/src/shader.cpp",
MAME_DIR .. "3rdparty/bgfx/src/shader_dxbc.cpp",
MAME_DIR .. "3rdparty/bgfx/src/shader_dx9bc.cpp",
@@ -788,8 +852,17 @@ end
MAME_DIR .. "3rdparty/bgfx/examples/common/font/text_metrics.cpp",
MAME_DIR .. "3rdparty/bgfx/examples/common/font/utf8.cpp",
MAME_DIR .. "3rdparty/bgfx/examples/common/imgui/imgui.cpp",
+ MAME_DIR .. "3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp",
+ MAME_DIR .. "3rdparty/bgfx/examples/common/imgui/scintilla.cpp",
MAME_DIR .. "3rdparty/bgfx/examples/common/nanovg/nanovg.cpp",
MAME_DIR .. "3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/ib-compress/indexbuffercompression.cpp",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/ib-compress/indexbufferdecompression.cpp",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_node_graph_test.cpp",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp",
}
if _OPTIONS["targetos"]=="macosx" then
files {
@@ -1187,7 +1260,7 @@ if _OPTIONS["targetos"]=="android" then
"log",
}
linkoptions {
- "-Wl,-soname,liSDL2.so"
+ "-Wl,-soname,libSDL2.so"
}
if _OPTIONS["SEPARATE_BIN"]~="1" then
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index 5423c224127..43a86be74c2 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -705,6 +705,23 @@ end
---------------------------------------------------
--
+--@src/devices/bus/intv/slot.h,BUSES["INTV_CTRL"] = true
+---------------------------------------------------
+
+if (BUSES["INTV_CTRL"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/bus/intv_ctrl/ctrl.cpp",
+ MAME_DIR .. "src/devices/bus/intv_ctrl/ctrl.h",
+ MAME_DIR .. "src/devices/bus/intv_ctrl/handctrl.cpp",
+ MAME_DIR .. "src/devices/bus/intv_ctrl/handctrl.h",
+ MAME_DIR .. "src/devices/bus/intv_ctrl/ecs_ctrl.cpp",
+ MAME_DIR .. "src/devices/bus/intv_ctrl/ecs_ctrl.h",
+ }
+end
+
+
+---------------------------------------------------
+--
--@src/devices/bus/isa/isa.h,BUSES["ISA"] = true
---------------------------------------------------
@@ -2029,8 +2046,6 @@ if (BUSES["TI99X"]~=null) then
MAME_DIR .. "src/devices/bus/ti99x/datamux.h",
MAME_DIR .. "src/devices/bus/ti99x/genboard.cpp",
MAME_DIR .. "src/devices/bus/ti99x/genboard.h",
- MAME_DIR .. "src/devices/bus/ti99x/grom.cpp",
- MAME_DIR .. "src/devices/bus/ti99x/grom.h",
MAME_DIR .. "src/devices/bus/ti99x/gromport.cpp",
MAME_DIR .. "src/devices/bus/ti99x/gromport.h",
MAME_DIR .. "src/devices/bus/ti99x/handset.cpp",
@@ -2454,6 +2469,8 @@ if (BUSES["VTECH_MEMEXP"]~=null) then
MAME_DIR .. "src/devices/bus/vtech/memexp/memory.h",
MAME_DIR .. "src/devices/bus/vtech/memexp/rs232.cpp",
MAME_DIR .. "src/devices/bus/vtech/memexp/rs232.h",
+ MAME_DIR .. "src/devices/bus/vtech/memexp/rtty.cpp",
+ MAME_DIR .. "src/devices/bus/vtech/memexp/rtty.h",
MAME_DIR .. "src/devices/bus/vtech/memexp/wordpro.cpp",
MAME_DIR .. "src/devices/bus/vtech/memexp/wordpro.h",
}
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index 113d3962110..143cf78b4d0 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -1716,6 +1716,12 @@ if (CPUS["SM510"]~=null) then
MAME_DIR .. "src/devices/cpu/sm510/sm510op.cpp",
MAME_DIR .. "src/devices/cpu/sm510/sm510core.cpp",
MAME_DIR .. "src/devices/cpu/sm510/sm511core.cpp",
+ MAME_DIR .. "src/devices/cpu/sm510/sm500.h",
+ MAME_DIR .. "src/devices/cpu/sm510/sm500op.cpp",
+ MAME_DIR .. "src/devices/cpu/sm510/sm500core.cpp",
+ MAME_DIR .. "src/devices/cpu/sm510/kb1013vk1-2.h",
+ MAME_DIR .. "src/devices/cpu/sm510/kb1013vk1-2op.cpp",
+ MAME_DIR .. "src/devices/cpu/sm510/kb1013vk1-2core.cpp",
}
end
diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua
index efe30edbb1d..61563970d1b 100644
--- a/scripts/src/emu.lua
+++ b/scripts/src/emu.lua
@@ -34,6 +34,7 @@ includedirs {
includedirs {
ext_includedir("expat"),
ext_includedir("lua"),
+ ext_includedir("zlib"),
ext_includedir("flac"),
}
@@ -130,6 +131,8 @@ files {
MAME_DIR .. "src/emu/emualloc.h",
MAME_DIR .. "src/emu/emucore.cpp",
MAME_DIR .. "src/emu/emucore.h",
+ MAME_DIR .. "src/emu/emumem.cpp",
+ MAME_DIR .. "src/emu/emumem.h",
MAME_DIR .. "src/emu/emuopts.cpp",
MAME_DIR .. "src/emu/emuopts.h",
MAME_DIR .. "src/emu/emupal.cpp",
@@ -155,13 +158,10 @@ files {
MAME_DIR .. "src/emu/mame.h",
MAME_DIR .. "src/emu/machine.cpp",
MAME_DIR .. "src/emu/machine.h",
- MAME_DIR .. "src/emu/machine.ipp",
MAME_DIR .. "src/emu/mconfig.cpp",
MAME_DIR .. "src/emu/mconfig.h",
MAME_DIR .. "src/emu/memarray.cpp",
MAME_DIR .. "src/emu/memarray.h",
- MAME_DIR .. "src/emu/memory.cpp",
- MAME_DIR .. "src/emu/memory.h",
MAME_DIR .. "src/emu/network.cpp",
MAME_DIR .. "src/emu/network.h",
MAME_DIR .. "src/emu/parameters.cpp",
@@ -205,6 +205,8 @@ files {
MAME_DIR .. "src/emu/ui/devctrl.h",
MAME_DIR .. "src/emu/ui/menu.cpp",
MAME_DIR .. "src/emu/ui/menu.h",
+ MAME_DIR .. "src/emu/ui/submenu.cpp",
+ MAME_DIR .. "src/emu/ui/submenu.h",
MAME_DIR .. "src/emu/ui/mainmenu.cpp",
MAME_DIR .. "src/emu/ui/mainmenu.h",
MAME_DIR .. "src/emu/ui/miscmenu.cpp",
@@ -213,6 +215,8 @@ files {
MAME_DIR .. "src/emu/ui/barcode.h",
MAME_DIR .. "src/emu/ui/cheatopt.cpp",
MAME_DIR .. "src/emu/ui/cheatopt.h",
+ MAME_DIR .. "src/emu/ui/pluginopt.cpp",
+ MAME_DIR .. "src/emu/ui/pluginopt.h",
MAME_DIR .. "src/emu/ui/devopt.cpp",
MAME_DIR .. "src/emu/ui/devopt.h",
MAME_DIR .. "src/emu/ui/filemngr.cpp",
@@ -243,8 +247,6 @@ files {
MAME_DIR .. "src/emu/ui/auditmenu.h",
MAME_DIR .. "src/emu/ui/cmddata.h",
MAME_DIR .. "src/emu/ui/cmdrender.h",
- MAME_DIR .. "src/emu/ui/ctrlmenu.cpp",
- MAME_DIR .. "src/emu/ui/ctrlmenu.h",
MAME_DIR .. "src/emu/ui/custmenu.cpp",
MAME_DIR .. "src/emu/ui/custmenu.h",
MAME_DIR .. "src/emu/ui/custui.cpp",
@@ -256,8 +258,6 @@ files {
MAME_DIR .. "src/emu/ui/defimg.h",
MAME_DIR .. "src/emu/ui/dirmenu.cpp",
MAME_DIR .. "src/emu/ui/dirmenu.h",
- MAME_DIR .. "src/emu/ui/dsplmenu.cpp",
- MAME_DIR .. "src/emu/ui/dsplmenu.h",
MAME_DIR .. "src/emu/ui/icorender.h",
MAME_DIR .. "src/emu/ui/inifile.cpp",
MAME_DIR .. "src/emu/ui/inifile.h",
@@ -405,6 +405,7 @@ dependency {
{ MAME_DIR .. "src/emu/rendlay.cpp", GEN_DIR .. "emu/layout/vertical.lh" },
{ MAME_DIR .. "src/emu/rendlay.cpp", GEN_DIR .. "emu/layout/lcd.lh" },
{ MAME_DIR .. "src/emu/rendlay.cpp", GEN_DIR .. "emu/layout/lcd_rot.lh" },
+ { MAME_DIR .. "src/emu/rendlay.cpp", GEN_DIR .. "emu/layout/svg.lh" },
{ MAME_DIR .. "src/emu/rendlay.cpp", GEN_DIR .. "emu/layout/noscreens.lh" },
{ MAME_DIR .. "src/emu/video.cpp", GEN_DIR .. "emu/layout/snap.lh" },
@@ -427,6 +428,7 @@ custombuildtask {
layoutbuildtask("emu/layout", "vertical"),
layoutbuildtask("emu/layout", "lcd"),
layoutbuildtask("emu/layout", "lcd_rot"),
+ layoutbuildtask("emu/layout", "svg"),
layoutbuildtask("emu/layout", "noscreens"),
layoutbuildtask("emu/layout", "snap"),
}
diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua
index c43bbecb291..3c84b7a9ac9 100644
--- a/scripts/src/lib.lua
+++ b/scripts/src/lib.lua
@@ -64,6 +64,7 @@ project "utils"
MAME_DIR .. "src/lib/util/jedparse.h",
MAME_DIR .. "src/lib/util/md5.cpp",
MAME_DIR .. "src/lib/util/md5.h",
+ MAME_DIR .. "src/lib/util/nanosvg.cpp",
MAME_DIR .. "src/lib/util/opresolv.cpp",
MAME_DIR .. "src/lib/util/opresolv.h",
MAME_DIR .. "src/lib/util/options.cpp",
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 93c0dd12140..7d97eae1c1c 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -125,7 +125,7 @@ end
emccopts = emccopts .. " -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\",\"__ZN12cli_frontend7executeEiPPc\"]'"
emccopts = emccopts .. " -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\""
emccopts = emccopts .. " --pre-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/modules/sound/js_sound.js"
- emccopts = emccopts .. " --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js"
+ emccopts = emccopts .. " --post-js " .. _MAKE.esc(MAME_DIR) .. "scripts/resources/emscripten/emscripten_post.js"
emccopts = emccopts .. " --embed-file " .. _MAKE.esc(MAME_DIR) .. "bgfx/chains@bgfx/chains"
emccopts = emccopts .. " --embed-file " .. _MAKE.esc(MAME_DIR) .. "bgfx/effects@bgfx/effects"
emccopts = emccopts .. " --embed-file " .. _MAKE.esc(MAME_DIR) .. "bgfx/shaders/gles@bgfx/shaders/gles"
@@ -255,10 +255,7 @@ end
local rctarget = _subtarget
if _OPTIONS["targetos"]=="windows" and (not override_resources) then
- local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/".._OPTIONS["osd"].."/" .. _subtarget .. "/" .. rctarget ..".rc"
- if not os.isfile(rcfile) then
- rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _subtarget .. "/" .. rctarget ..".rc"
- end
+ rcfile = MAME_DIR .. "scripts/resources/windows/" .. _subtarget .. "/" .. rctarget ..".rc"
if os.isfile(rcfile) then
files {
rcfile,
@@ -269,7 +266,7 @@ end
else
rctarget = "mame"
files {
- MAME_DIR .. "src/mame/osd/windows/mame/mame.rc",
+ MAME_DIR .. "scripts/resources/windows/mame/mame.rc",
}
dependency {
{ "$(OBJDIR)/mame.res" , GEN_DIR .. "resource/" .. rctarget .. "vers.rc", true },
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
index f1bfab95b08..91eaa395ba1 100644
--- a/scripts/src/osd/modules.lua
+++ b/scripts/src/osd/modules.lua
@@ -74,6 +74,7 @@ function osdmodulesbuild()
MAME_DIR .. "src/osd/modules/input/input_common.cpp",
MAME_DIR .. "src/osd/modules/input/input_common.h",
MAME_DIR .. "src/osd/modules/input/input_dinput.cpp",
+ MAME_DIR .. "src/osd/modules/input/input_dinput.h",
MAME_DIR .. "src/osd/modules/input/input_none.cpp",
MAME_DIR .. "src/osd/modules/input/input_rawinput.cpp",
MAME_DIR .. "src/osd/modules/input/input_win32.cpp",
@@ -84,6 +85,27 @@ function osdmodulesbuild()
MAME_DIR .. "src/osd/modules/input/input_windows.cpp",
MAME_DIR .. "src/osd/modules/input/input_windows.h",
MAME_DIR .. "src/osd/modules/input/input_xinput.cpp",
+ MAME_DIR .. "src/osd/modules/input/input_xinput.h",
+ MAME_DIR .. "src/osd/modules/input/input_winhybrid.cpp",
+ MAME_DIR .. "src/osd/modules/output/output_module.h",
+ MAME_DIR .. "src/osd/modules/output/none.cpp",
+ MAME_DIR .. "src/osd/modules/output/console.cpp",
+ MAME_DIR .. "src/osd/modules/output/network.cpp",
+ MAME_DIR .. "src/osd/modules/ipc/tcp_connection.cpp",
+ MAME_DIR .. "src/osd/modules/ipc/tcp_connection.h",
+ MAME_DIR .. "src/osd/modules/ipc/tcp_server.cpp",
+ MAME_DIR .. "src/osd/modules/ipc/tcp_server.h",
+ MAME_DIR .. "src/osd/modules/ipc/raw_tcp_connection.cpp",
+ MAME_DIR .. "src/osd/modules/ipc/raw_tcp_connection.h",
+ MAME_DIR .. "src/osd/modules/ipc/raw_tcp_server.cpp",
+ MAME_DIR .. "src/osd/modules/ipc/raw_tcp_server.h",
+ MAME_DIR .. "src/osd/modules/ipc/rtc_tcp_connection.cpp",
+ MAME_DIR .. "src/osd/modules/ipc/rtc_tcp_connection.h",
+ MAME_DIR .. "src/osd/modules/ipc/rtc_tcp_server.cpp",
+ MAME_DIR .. "src/osd/modules/ipc/rtc_tcp_server.h",
+ }
+ includedirs {
+ ext_includedir("uv"),
}
if _OPTIONS["targetos"]=="windows" then
@@ -126,10 +148,13 @@ function osdmodulesbuild()
"__STDC_LIMIT_MACROS",
"__STDC_FORMAT_MACROS",
"__STDC_CONSTANT_MACROS",
+ "IMGUI_DISABLE_OBSOLETE_FUNCTIONS",
}
files {
MAME_DIR .. "src/osd/modules/render/drawbgfx.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfxutil.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfxutil.h",
MAME_DIR .. "src/osd/modules/render/binpacker.cpp",
MAME_DIR .. "src/osd/modules/render/bgfx/blendreader.cpp",
MAME_DIR .. "src/osd/modules/render/bgfx/chain.cpp",
@@ -169,7 +194,9 @@ function osdmodulesbuild()
MAME_DIR .. "src/osd/modules/render/bgfx/writereader.cpp",
}
includedirs {
+ MAME_DIR .. "3rdparty/bgfx/examples/common",
MAME_DIR .. "3rdparty/bgfx/include",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty",
MAME_DIR .. "3rdparty/bx/include",
MAME_DIR .. "3rdparty/rapidjson/include",
}
@@ -393,6 +420,7 @@ function osdmodulestargetconf()
"gdi32",
"dsound",
"dxguid",
+ "oleaut32",
}
elseif _OPTIONS["targetos"]=="macosx" then
links {
diff --git a/scripts/src/osd/osdmini.lua b/scripts/src/osd/osdmini.lua
index 4869ec8716d..efdb28bd9c0 100644
--- a/scripts/src/osd/osdmini.lua
+++ b/scripts/src/osd/osdmini.lua
@@ -93,6 +93,10 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/input/input_windows.cpp",
MAME_DIR .. "src/osd/modules/input/input_windows.h",
MAME_DIR .. "src/osd/modules/input/input_xinput.cpp",
+ MAME_DIR .. "src/osd/modules/output/output_module.h",
+ MAME_DIR .. "src/osd/modules/output/none.cpp",
+ MAME_DIR .. "src/osd/modules/output/console.cpp",
+ MAME_DIR .. "src/osd/modules/output/network.cpp",
}
project ("ocore_" .. _OPTIONS["osd"])
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index f1d307b8cab..c42d9ab23ad 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -368,7 +368,7 @@ project ("osd_" .. _OPTIONS["osd"])
if _OPTIONS["targetos"]=="windows" then
files {
- MAME_DIR .. "src/osd/sdl/main.cpp",
+ MAME_DIR .. "src/osd/windows/main.cpp",
}
end
@@ -425,7 +425,6 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/sdl/window.h",
MAME_DIR .. "src/osd/modules/osdwindow.cpp",
MAME_DIR .. "src/osd/modules/osdwindow.h",
- MAME_DIR .. "src/osd/sdl/output.cpp",
MAME_DIR .. "src/osd/sdl/watchdog.cpp",
MAME_DIR .. "src/osd/sdl/watchdog.h",
MAME_DIR .. "src/osd/modules/render/drawsdl.cpp",
@@ -461,7 +460,6 @@ project ("ocore_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/strconv.cpp",
MAME_DIR .. "src/osd/strconv.h",
MAME_DIR .. "src/osd/sdl/sdldir.cpp",
- MAME_DIR .. "src/osd/sdl/sdlos_" .. SDLOS_TARGETOS .. ".cpp",
MAME_DIR .. "src/osd/modules/osdmodule.cpp",
MAME_DIR .. "src/osd/modules/osdmodule.h",
MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".cpp",
@@ -495,123 +493,4 @@ project ("ocore_" .. _OPTIONS["osd"])
}
end
- if _OPTIONS["targetos"]=="macosx" then
- files {
- MAME_DIR .. "src/osd/sdl/osxutils.h",
- MAME_DIR .. "src/osd/sdl/osxutils.mm",
- }
- end
-
-
---------------------------------------------------
--- testkeys
---------------------------------------------------
-
-if _OPTIONS["with-tools"] then
- project("testkeys")
- uuid ("744cec21-c3b6-4d69-93cb-6811fed0ffe3")
- kind "ConsoleApp"
-
- flags {
- "Symbols", -- always include minimum symbols for executables
- }
-
- dofile("sdl_cfg.lua")
-
- includedirs {
- MAME_DIR .. "src/osd",
- MAME_DIR .. "src/lib/util",
- }
-
- if _OPTIONS["SEPARATE_BIN"]~="1" then
- targetdir(MAME_DIR)
- end
-
- links {
- "utils",
- "ocore_" .. _OPTIONS["osd"],
- }
-
- files {
- MAME_DIR .. "src/osd/sdl/testkeys.cpp",
- }
-
- if _OPTIONS["targetos"] == "windows" then
- if _OPTIONS["USE_LIBSDL"]~="1" then
- configuration { "mingw*"}
- links {
- "SDL2.dll",
- }
- configuration { "vs*" }
- links {
- "SDL2",
- "Imm32",
- "Version",
- }
- configuration { }
- else
- local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
- addlibfromstring(str)
- addoptionsfromstring(str)
- end
- links {
- "psapi",
- }
- linkoptions{
- "-municode",
- }
- files {
- MAME_DIR .. "src/osd/sdl/main.cpp",
- }
- end
-
- configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
- configuration { }
-
- strip()
-end
-
-
---------------------------------------------------
--- aueffectutil
---------------------------------------------------
-
-if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then
- project("aueffectutil")
- uuid ("3db8316d-fad7-4f5b-b46a-99373c91550e")
- kind "ConsoleApp"
- flags {
- "Symbols", -- always include minimum symbols for executables
- }
-
- dofile("sdl_cfg.lua")
-
- if _OPTIONS["SEPARATE_BIN"]~="1" then
- targetdir(MAME_DIR)
- end
-
- linkoptions {
- "-sectcreate __TEXT __info_plist " .. MAME_DIR .. "src/osd/sdl/aueffectutil-Info.plist",
- }
-
- dependency {
- { "aueffectutil", MAME_DIR .. "src/osd/sdl/aueffectutil-Info.plist", true },
- }
-
- links {
- "AudioUnit.framework",
- "AudioToolbox.framework",
- "CoreAudio.framework",
- "CoreAudioKit.framework",
- "CoreServices.framework",
- }
-
- files {
- MAME_DIR .. "src/osd/sdl/aueffectutil.mm",
- }
-
- strip()
-end
diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua
index f9a886dc176..e4be22d6e55 100644
--- a/scripts/src/osd/windows.lua
+++ b/scripts/src/osd/windows.lua
@@ -165,8 +165,6 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/render/drawgdi.h",
MAME_DIR .. "src/osd/modules/render/drawnone.cpp",
MAME_DIR .. "src/osd/modules/render/drawnone.h",
- MAME_DIR .. "src/osd/windows/output.cpp",
- MAME_DIR .. "src/osd/windows/output.h",
MAME_DIR .. "src/osd/windows/video.cpp",
MAME_DIR .. "src/osd/windows/video.h",
MAME_DIR .. "src/osd/windows/window.cpp",
@@ -253,7 +251,6 @@ project ("ocore_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/windows/winutf8.h",
MAME_DIR .. "src/osd/windows/winutil.cpp",
MAME_DIR .. "src/osd/windows/winutil.h",
- MAME_DIR .. "src/osd/windows/winclip.cpp",
MAME_DIR .. "src/osd/modules/osdmodule.cpp",
MAME_DIR .. "src/osd/modules/osdmodule.h",
MAME_DIR .. "src/osd/modules/file/winfile.cpp",
@@ -263,34 +260,3 @@ project ("ocore_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/lib/osdlib_win32.cpp",
MAME_DIR .. "src/osd/modules/sync/work_osd.cpp",
}
-
-
---------------------------------------------------
--- ledutil
---------------------------------------------------
-
-if _OPTIONS["with-tools"] then
- project("ledutil")
- uuid ("061293ca-7290-44ac-b2b5-5913ae8dc9c0")
- kind "ConsoleApp"
-
- flags {
- "Symbols", -- always include minimum symbols for executables
- }
-
- if _OPTIONS["SEPARATE_BIN"]~="1" then
- targetdir(MAME_DIR)
- end
-
- links {
- "ocore_" .. _OPTIONS["osd"],
- }
-
- includedirs {
- MAME_DIR .. "src/osd",
- }
-
- files {
- MAME_DIR .. "src/osd/windows/ledutil.cpp",
- }
-end
diff --git a/scripts/src/sound.lua b/scripts/src/sound.lua
index 428974c23df..03859da4e0a 100644
--- a/scripts/src/sound.lua
+++ b/scripts/src/sound.lua
@@ -1285,6 +1285,16 @@ if (SOUNDS["YMZ770"]~=null) then
files {
MAME_DIR .. "src/devices/sound/ymz770.cpp",
MAME_DIR .. "src/devices/sound/ymz770.h",
+ }
+end
+
+---------------------------------------------------
+-- MPEG AUDIO
+--@src/devices/sound/mpeg_audio.h,SOUNDS["MPEG_AUDIO"] = true
+---------------------------------------------------
+
+if (SOUNDS["MPEG_AUDIO"]~=null) then
+ files {
MAME_DIR .. "src/devices/sound/mpeg_audio.cpp",
MAME_DIR .. "src/devices/sound/mpeg_audio.h",
}
diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua
index 913358f1d20..a2e5ad73496 100644
--- a/scripts/src/tools.lua
+++ b/scripts/src/tools.lua
@@ -741,3 +741,45 @@ configuration { "mingw*" or "vs*" }
configuration { }
strip()
+
+--------------------------------------------------
+-- aueffectutil
+--------------------------------------------------
+
+if _OPTIONS["targetos"] == "macosx" then
+ project("aueffectutil")
+ uuid ("3db8316d-fad7-4f5b-b46a-99373c91550e")
+ kind "ConsoleApp"
+
+ flags {
+ "Symbols", -- always include minimum symbols for executables
+ }
+
+ if _OPTIONS["SEPARATE_BIN"]~="1" then
+ targetdir(MAME_DIR)
+ end
+
+ linkoptions {
+ "-sectcreate __TEXT __info_plist " .. MAME_DIR .. "src/tools/aueffectutil-Info.plist",
+ }
+
+ dependency {
+ { "aueffectutil", MAME_DIR .. "src/tools/aueffectutil-Info.plist", true },
+ }
+
+ links {
+ "AudioUnit.framework",
+ "AudioToolbox.framework",
+ "CoreAudio.framework",
+ "CoreAudioKit.framework",
+ "CoreServices.framework",
+ }
+
+ files {
+ MAME_DIR .. "src/tools/aueffectutil.mm",
+ }
+
+ configuration { }
+
+ strip()
+end
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index f5df5c70280..b56343e389b 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -249,6 +249,7 @@ SOUNDS["TMS5110A"] = true
SOUNDS["LMC1992"] = true
SOUNDS["AWACS"] = true
SOUNDS["YMZ770"] = true
+SOUNDS["MPEG_AUDIO"] = true
SOUNDS["T6721A"] = true
SOUNDS["MOS7360"] = true
--SOUNDS["ESQPUMP"] = true
@@ -600,6 +601,7 @@ BUSES["CENTRONICS"] = true
--BUSES["EP64"] = true
--BUSES["EPSON_SIO"] = true
--BUSES["GAMEBOY"] = true
+BUSES["GAMEGEAR"] = true
--BUSES["GBA"] = true
BUSES["GENERIC"] = true
--BUSES["IEEE488"] = true
@@ -631,7 +633,7 @@ BUSES["RS232"] = true
--BUSES["SATURN"] = true
BUSES["SCSI"] = true
--BUSES["SCV"] = true
---BUSES["SEGA8"] = true
+BUSES["SEGA8"] = true
BUSES["SMS_CTRL"] = true
BUSES["SMS_EXP"] = true
--BUSES["SNES"] = true
@@ -801,10 +803,8 @@ files {
MAME_DIR .. "src/mame/machine/nmk112.h",
MAME_DIR .. "src/mame/machine/pcshare.cpp",
MAME_DIR .. "src/mame/machine/pcshare.h",
- MAME_DIR .. "src/mame/machine/segacrpt.cpp",
- MAME_DIR .. "src/mame/machine/segacrpt.h",
- MAME_DIR .. "src/mame/machine/segacrp2.cpp",
- MAME_DIR .. "src/mame/machine/segacrp2.h",
+ MAME_DIR .. "src/mame/machine/segacrpt_device.cpp",
+ MAME_DIR .. "src/mame/machine/segacrpt_device.h",
MAME_DIR .. "src/mame/machine/ticket.cpp",
MAME_DIR .. "src/mame/machine/ticket.h",
MAME_DIR .. "src/mame/video/avgdvg.cpp",
@@ -3044,6 +3044,8 @@ files {
MAME_DIR .. "src/mame/machine/naomim2.h",
MAME_DIR .. "src/mame/machine/naomim4.cpp",
MAME_DIR .. "src/mame/machine/naomim4.h",
+ MAME_DIR .. "src/mame/machine/m3comm.cpp",
+ MAME_DIR .. "src/mame/machine/m3comm.h",
MAME_DIR .. "src/mame/machine/315-5881_crypt.cpp",
MAME_DIR .. "src/mame/machine/315-5881_crypt.h",
MAME_DIR .. "src/mame/machine/awboard.cpp",
@@ -3125,6 +3127,8 @@ files {
MAME_DIR .. "src/mame/video/suprloco.cpp",
MAME_DIR .. "src/mame/drivers/system1.cpp",
MAME_DIR .. "src/mame/includes/system1.h",
+ MAME_DIR .. "src/mame/machine/segacrp2_device.cpp",
+ MAME_DIR .. "src/mame/machine/segacrp2_device.h",
MAME_DIR .. "src/mame/video/system1.cpp",
MAME_DIR .. "src/mame/drivers/system16.cpp",
MAME_DIR .. "src/mame/includes/system16.h",
@@ -4354,6 +4358,7 @@ files {
MAME_DIR .. "src/mame/drivers/jongkyo.cpp",
MAME_DIR .. "src/mame/drivers/joystand.cpp",
MAME_DIR .. "src/mame/drivers/jubilee.cpp",
+ MAME_DIR .. "src/mame/drivers/jungleyo.cpp",
MAME_DIR .. "src/mame/drivers/kas89.cpp",
MAME_DIR .. "src/mame/drivers/kingpin.cpp",
MAME_DIR .. "src/mame/drivers/koikoi.cpp",
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index cc5721040d7..854493641a6 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -251,6 +251,7 @@ SOUNDS["TMS5110A"] = true
SOUNDS["LMC1992"] = true
SOUNDS["AWACS"] = true
--SOUNDS["YMZ770"] = true
+--SOUNDS["MPEG_AUDIO"] = true
SOUNDS["T6721A"] = true
SOUNDS["MOS7360"] = true
SOUNDS["ESQPUMP"] = true
@@ -617,6 +618,7 @@ BUSES["GENERIC"] = true
BUSES["IEEE488"] = true
BUSES["IMI7000"] = true
BUSES["INTV"] = true
+BUSES["INTV_CTRL"] = true
BUSES["IQ151"] = true
BUSES["ISA"] = true
BUSES["ISBX"] = true
diff --git a/scripts/target/mame/nl.lua b/scripts/target/mame/nl.lua
index bf0fd462beb..3409ce3eb44 100644
--- a/scripts/target/mame/nl.lua
+++ b/scripts/target/mame/nl.lua
@@ -17,7 +17,9 @@
--------------------------------------------------
CPUS["Z80"] = true
---CPUS["M6502"] = true
+CPUS["M6800"] = true
+CPUS["M6803"] = true
+CPUS["M6809"] = true
--CPUS["MCS48"] = true
--CPUS["MCS51"] = true
--CPUS["M6800"] = true
@@ -33,9 +35,9 @@ CPUS["Z80"] = true
--SOUNDS["SAMPLES"] = true
SOUNDS["DAC"] = true
---SOUNDS["DISCRETE"] = true
+SOUNDS["DISCRETE"] = true
SOUNDS["AY8910"] = true
---SOUNDS["YM2151"] = true
+SOUNDS["MSM5205"] = true
--SOUNDS["ASTROCADE"] = true
--SOUNDS["TMS5220"] = true
--SOUNDS["OKIM6295"] = true
@@ -84,6 +86,8 @@ function createProjects_mame_nl(_target, _subtarget)
targetsubdir(_target .."_" .. _subtarget)
kind (LIBTYPE)
uuid (os.uuid("drv-mame-nl"))
+ addprojectflags()
+ precompiledheaders()
includedirs {
MAME_DIR .. "src/osd",
@@ -109,6 +113,12 @@ files{
MAME_DIR .. "src/mame/drivers/popeye.cpp",
MAME_DIR .. "src/mame/includes/popeye.h",
MAME_DIR .. "src/mame/video/popeye.cpp",
+
+ MAME_DIR .. "src/mame/drivers/m62.cpp",
+ MAME_DIR .. "src/mame/includes/m62.h",
+ MAME_DIR .. "src/mame/video/m62.cpp",
+ MAME_DIR .. "src/mame/audio/irem.cpp",
+ MAME_DIR .. "src/mame/audio/irem.h",
}
end
diff --git a/src/devices/bus/a1bus/a1bus.cpp b/src/devices/bus/a1bus/a1bus.cpp
index c3ebc73c6de..5b29e44049f 100644
--- a/src/devices/bus/a1bus/a1bus.cpp
+++ b/src/devices/bus/a1bus/a1bus.cpp
@@ -7,7 +7,6 @@
***************************************************************************/
#include "emu.h"
-#include "emuopts.h"
#include "a1bus.h"
@@ -146,7 +145,7 @@ void a1bus_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mi
m_maincpu = machine().device<cpu_device>(m_cputag);
address_space &space = m_maincpu->space(AS_PROGRAM);
space.install_readwrite_bank(start, end, mask, mirror, tag );
- machine().root_device().membank(tag)->set_base(data);
+ machine().root_device().membank(siblingtag(tag).c_str())->set_base(data);
}
// interrupt request from a1bus card
diff --git a/src/devices/bus/a2bus/a2bus.cpp b/src/devices/bus/a2bus/a2bus.cpp
index 5fd03495c87..2083a607690 100644
--- a/src/devices/bus/a2bus/a2bus.cpp
+++ b/src/devices/bus/a2bus/a2bus.cpp
@@ -71,7 +71,6 @@
***************************************************************************/
#include "emu.h"
-#include "emuopts.h"
#include "a2bus.h"
diff --git a/src/devices/bus/a2bus/a2eauxslot.cpp b/src/devices/bus/a2bus/a2eauxslot.cpp
index f1d4836d37b..c362c23abe5 100644
--- a/src/devices/bus/a2bus/a2eauxslot.cpp
+++ b/src/devices/bus/a2bus/a2eauxslot.cpp
@@ -9,7 +9,6 @@
***************************************************************************/
#include "emu.h"
-#include "emuopts.h"
#include "a2eauxslot.h"
diff --git a/src/devices/bus/a2bus/pc_xporter.cpp b/src/devices/bus/a2bus/pc_xporter.cpp
index 8159a5bd9b2..49d71fe455a 100644
--- a/src/devices/bus/a2bus/pc_xporter.cpp
+++ b/src/devices/bus/a2bus/pc_xporter.cpp
@@ -5,7 +5,7 @@
pcxporter.cpp
Implementation of the Applied Engineering PC Transporter card
- Preliminary version by R. Belmont
+ Preliminary version by R. Belmont, additional reverse-engineering by Peter Ferrie
The PC Transporter is basically a PC-XT on an Apple II card.
Features include:
@@ -37,18 +37,42 @@
plus used for general storage by the system.
RAM from 0xB0000-0xBFFFF is the CGA framebuffer as usual.
+ C800-CBFF?: RAM, used as scratchpad space by the software
CF00: PC memory pointer (bits 0-7)
CF01: PC memory pointer (bits 8-15)
CF02: PC memory pointer (bits 16-23)
CF03: read/write PC memory at the pointer and increment the pointer
CF04: read/write PC memory at the pointer and *don't* increment the pointer
+ CF2C: CGA 6845 register select (port 3D0/3D2/3D4/3D6)
+ CF2D: CGA 6845 data read/write (port 3D1/3D3/3D5/3D7)
+ CF2E: CGA mode select (port 3D8)
+ CF2F: CGA color select (port 3D9)
TODO:
- - A2 probably also can access the V30's I/O space: where's that at? CF0E/CF0F
- are suspects...
+ - What's going on at CF0E/CF0F?
+ - How is the V30 started/stopped?
- There's likely A2 ROM at CnXX and C800-CBFF to support the "Slinky" memory
expansion card emulation function inside one of the custom ASICs. Need to
dump this...
+
+ The final stages before the software settles into its loop are:
+
+ 20 to C800 at cf30
+ 00 to C800 at cf31
+ 12 to C800 at cf2b
+ 21 to C800 at cf25
+ 33 to C800 at cf24
+ 80 to C800 at cf31
+ 20 to C800 at cf30
+ loop:
+ Read $C800 at cf36
+ Read $C800 at cf31
+ Read $C800 at cf31
+ Read $C800 at cf36
+ Read $C800 at cf31
+ Read $C800 at cf31
+ 80 to C800 at cf31
+ loop end: (return to loop)
*********************************************************************/
@@ -176,7 +200,7 @@ UINT8 a2bus_pcxporter_device::read_c800(address_space &space, UINT16 offset)
if (offset < 0x400)
{
- return 0xff;
+ return m_c800_ram[offset];
}
else
{
@@ -195,12 +219,20 @@ UINT8 a2bus_pcxporter_device::read_c800(address_space &space, UINT16 offset)
case 0x703: // read with increment
rv = m_ram[m_offset];
- m_offset++;
+ // don't increment if the debugger's reading
+ if (!space.debugger_access())
+ {
+ m_offset++;
+ }
return rv;
case 0x704: // read w/o increment
rv = m_ram[m_offset];
- return rv;
+ return rv;
+
+ default:
+ printf("Read $C800 at %x\n", offset + 0xc800);
+ break;
}
return m_regs[offset];
@@ -214,6 +246,7 @@ void a2bus_pcxporter_device::write_c800(address_space &space, UINT16 offset, UIN
{
if (offset < 0x400)
{
+ m_c800_ram[offset] = data;
}
else
{
@@ -245,6 +278,11 @@ void a2bus_pcxporter_device::write_c800(address_space &space, UINT16 offset, UIN
case 0x704: // write w/o increment
m_ram[m_offset] = data;
break;
+
+ case 0x72c: // CGA 6845 register select
+ case 0x72d: // CGA 6845 data read/write
+ case 0x72e: // CGA mode select
+ break;
default:
printf("%02x to C800 at %x\n", data, offset + 0xc800);
diff --git a/src/devices/bus/a2bus/pc_xporter.h b/src/devices/bus/a2bus/pc_xporter.h
index f7359de699a..36675c09c04 100644
--- a/src/devices/bus/a2bus/pc_xporter.h
+++ b/src/devices/bus/a2bus/pc_xporter.h
@@ -44,6 +44,7 @@ protected:
private:
UINT8 m_ram[768*1024];
+ UINT8 m_c800_ram[0x400];
UINT8 m_regs[0x400];
UINT32 m_offset;
};
diff --git a/src/devices/bus/bml3/bml3bus.cpp b/src/devices/bus/bml3/bml3bus.cpp
index 0438cc58997..620743dbe68 100644
--- a/src/devices/bus/bml3/bml3bus.cpp
+++ b/src/devices/bus/bml3/bml3bus.cpp
@@ -43,7 +43,6 @@
***************************************************************************/
#include "emu.h"
-#include "emuopts.h"
#include "bml3bus.h"
diff --git a/src/devices/bus/coco/cococart.cpp b/src/devices/bus/coco/cococart.cpp
index 66cbc1dc121..3e6b2ee2c6f 100644
--- a/src/devices/bus/coco/cococart.cpp
+++ b/src/devices/bus/coco/cococart.cpp
@@ -10,7 +10,6 @@
#include "emu.h"
#include "cococart.h"
-#include "emuopts.h"
/***************************************************************************
PARAMETERS
diff --git a/src/devices/bus/comx35/clm.cpp b/src/devices/bus/comx35/clm.cpp
index 15aa7f88295..6929a01d6eb 100644
--- a/src/devices/bus/comx35/clm.cpp
+++ b/src/devices/bus/comx35/clm.cpp
@@ -175,6 +175,7 @@ machine_config_constructor comx_clm_device::device_mconfig_additions() const
comx_clm_device::comx_clm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, COMX_CLM, "COMX 80 Column Card", tag, owner, clock, "comx_clm", __FILE__),
device_comx_expansion_card_interface(mconfig, *this),
+ device_gfx_interface(mconfig, *this, nullptr, "palette"),
m_crtc(*this, MC6845_TAG),
m_palette(*this, "palette"),
m_rom(*this, "c000"),
diff --git a/src/devices/bus/comx35/clm.h b/src/devices/bus/comx35/clm.h
index 131a57b2cd9..5b2da54d905 100644
--- a/src/devices/bus/comx35/clm.h
+++ b/src/devices/bus/comx35/clm.h
@@ -24,7 +24,8 @@
// ======================> comx_clm_device
class comx_clm_device : public device_t,
- public device_comx_expansion_card_interface
+ public device_comx_expansion_card_interface,
+ public device_gfx_interface
{
public:
// construction/destruction
diff --git a/src/devices/bus/cpc/cpcexp.cpp b/src/devices/bus/cpc/cpcexp.cpp
index 69ad0887282..43b35ac57f2 100644
--- a/src/devices/bus/cpc/cpcexp.cpp
+++ b/src/devices/bus/cpc/cpcexp.cpp
@@ -9,7 +9,6 @@
#include "emu.h"
-#include "emuopts.h"
#include "cpcexp.h"
diff --git a/src/devices/bus/gameboy/gb_slot.cpp b/src/devices/bus/gameboy/gb_slot.cpp
index 47236928fb7..18f2ca83c21 100644
--- a/src/devices/bus/gameboy/gb_slot.cpp
+++ b/src/devices/bus/gameboy/gb_slot.cpp
@@ -783,8 +783,7 @@ void base_gb_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len)
{0x5A01, "Bitmap Brothers/Mindscape"},
{0x5301, "American Sammy"},
{0x4701, "Spectrum Holobyte"},
- {0x1801, "Hudson Soft"},
- {0x0000, nullptr}
+ {0x1801, "Hudson Soft"}
};
static const int ramsize[8] = { 0, 2, 8, 32, 128, 64, 0, 0 };
@@ -817,24 +816,23 @@ void base_gb_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len)
soft[16] = '\0';
logerror("Cart Information\n");
logerror("\tName: %s\n", soft);
- logerror("\tType: %s [0x%2X]\n", (ROM[0x0147] <= 32) ? cart_types[ROM[0x0147]] : "", ROM[0x0147] );
+ logerror("\tType: %s [0x%02X]\n", (ROM[0x0147] <= 32) ? cart_types[ROM[0x0147]] : "", ROM[0x0147] );
logerror("\tGame Boy: %s\n", (ROM[0x0143] == 0xc0) ? "No" : "Yes" );
- logerror("\tSuper GB: %s [0x%2X]\n", (ROM[0x0146] == 0x03) ? "Yes" : "No", ROM[0x0146] );
- logerror("\tColor GB: %s [0x%2X]\n", (ROM[0x0143] == 0x80 || ROM[0x0143] == 0xc0) ? "Yes" : "No", ROM[0x0143] );
- logerror("\tROM Size: %d 16kB Banks [0x%2X]\n", rom_banks, ROM[0x0148]);
- logerror("\tRAM Size: %d kB [0x%2X]\n", ramsize[ROM[0x0149] & 0x07], ROM[0x0149]);
- logerror("\tLicense code: 0x%2X%2X\n", ROM[0x0145], ROM[0x0144] );
+ logerror("\tSuper GB: %s [0x%02X]\n", (ROM[0x0146] == 0x03) ? "Yes" : "No", ROM[0x0146] );
+ logerror("\tColor GB: %s [0x%02X]\n", (ROM[0x0143] == 0x80 || ROM[0x0143] == 0xc0) ? "Yes" : "No", ROM[0x0143] );
+ logerror("\tROM Size: %d 16kB Banks [0x%02X]\n", rom_banks, ROM[0x0148]);
+ logerror("\tRAM Size: %d kB [0x%02X]\n", ramsize[ROM[0x0149] & 0x07], ROM[0x0149]);
+ logerror("\tLicense code: 0x%02X%02X\n", ROM[0x0145], ROM[0x0144] );
tmp = (ROM[0x014b] << 8) + ROM[0x014a];
for (i = 0; i < ARRAY_LENGTH(companies); i++)
if (tmp == companies[i].code)
break;
- logerror("\tManufacturer ID: 0x%2X", tmp);
- logerror(" [%s]\n", (i < ARRAY_LENGTH(companies)) ? companies[i].name : "?");
- logerror("\tVersion Number: 0x%2X\n", ROM[0x014c]);
- logerror("\tComplement Check: 0x%2X\n", ROM[0x014d]);
- logerror("\tChecksum: 0x%2X\n", ((ROM[0x014e] << 8) + ROM[0x014f]));
+ logerror("\tManufacturer ID: 0x%02X [%s]\n", tmp, (i < ARRAY_LENGTH(companies)) ? companies[i].name : "?");
+ logerror("\tVersion Number: 0x%02X\n", ROM[0x014c]);
+ logerror("\tComplement Check: 0x%02X\n", ROM[0x014d]);
+ logerror("\tChecksum: 0x%04X\n", ((ROM[0x014e] << 8) + ROM[0x014f]));
tmp = (ROM[0x0103] << 8) + ROM[0x0102];
- logerror("\tStart Address: 0x%2X\n", tmp);
+ logerror("\tStart Address: 0x%04X\n", tmp);
// Additional checks
if (rom_banks == 256)
@@ -851,6 +849,6 @@ void base_gb_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len)
csum &= 0xffff;
if (csum != tmp)
- logerror("\nWarning loading cartridge: Checksum is wrong (Actual %X vs Internal %X)\n", csum, tmp);
+ logerror("\nWarning loading cartridge: Checksum is wrong (Actual 0x%04X vs Internal 0x%04X)\n", csum, tmp);
}
diff --git a/src/devices/bus/generic/slot.cpp b/src/devices/bus/generic/slot.cpp
index 4f3af4df411..5ac81616206 100644
--- a/src/devices/bus/generic/slot.cpp
+++ b/src/devices/bus/generic/slot.cpp
@@ -38,7 +38,8 @@ const device_type GENERIC_SOCKET = &device_creator<generic_slot_device>;
device_generic_cart_interface::device_generic_cart_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device),
m_rom(nullptr),
- m_rom_size(0)
+ m_rom_size(0),
+ m_region(*this, DEVICE_SELF)
{
}
diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h
index 6a12c1cd84c..eaf901fd310 100644
--- a/src/devices/bus/generic/slot.h
+++ b/src/devices/bus/generic/slot.h
@@ -28,8 +28,8 @@ public:
virtual void rom_alloc(size_t size, int width, endianness_t end, const char *tag);
virtual void ram_alloc(UINT32 size);
- UINT8* get_rom_base() { return m_rom; }
- UINT32 get_rom_size() { return m_rom_size; }
+ UINT8* get_rom_base() { if (m_region.found()) return m_region->base(); return m_rom; }
+ UINT32 get_rom_size() { if (m_region.found()) return m_region->bytes(); return m_rom_size; }
UINT8* get_ram_base() { return &m_ram[0]; }
UINT32 get_ram_size() { return m_ram.size(); }
@@ -40,6 +40,9 @@ public:
UINT8 *m_rom;
UINT32 m_rom_size;
dynamic_buffer m_ram;
+
+ // this replaces m_rom for non-user configurable carts!
+ optional_memory_region m_region;
};
@@ -137,8 +140,8 @@ public:
virtual void rom_alloc(size_t size, int width, endianness_t end) { if (m_cart) m_cart->rom_alloc(size, width, end, tag()); }
virtual void ram_alloc(UINT32 size) { if (m_cart) m_cart->ram_alloc(size); }
- UINT8* get_rom_base() { if (m_cart) return m_cart->get_rom_base(); return nullptr; }
- UINT8* get_ram_base() { if (m_cart) return m_cart->get_ram_base(); return nullptr; }
+ UINT8* get_rom_base() { if (m_cart) return m_cart->get_rom_base(); return nullptr; }
+ UINT8* get_ram_base() { if (m_cart) return m_cart->get_ram_base(); return nullptr; }
UINT32 get_rom_size() { if (m_cart) return m_cart->get_rom_size(); return 0; }
void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); }
@@ -173,4 +176,9 @@ extern const device_type GENERIC_SOCKET;
MCFG_DEVICE_ADD(_tag, GENERIC_SOCKET, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false) \
MCFG_GENERIC_INTERFACE(_dev_intf)
+
+#define MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT(_tag, _slot_intf, _dev_intf, _default) \
+ MCFG_DEVICE_ADD(_tag, GENERIC_SOCKET, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _default, false) \
+ MCFG_GENERIC_INTERFACE(_dev_intf)
#endif
diff --git a/src/devices/bus/intv/ecs.cpp b/src/devices/bus/intv/ecs.cpp
index b9da2d9803b..bbee4f3074b 100644
--- a/src/devices/bus/intv/ecs.cpp
+++ b/src/devices/bus/intv/ecs.cpp
@@ -31,15 +31,6 @@ intv_ecs_device::intv_ecs_device(const machine_config &mconfig, const char *tag,
: intv_rom_device(mconfig, INTV_ROM_ECS, "Intellivision ECS Expansion", tag, owner, clock, "intv_ecs", __FILE__),
m_snd(*this, "ay8914"),
m_subslot(*this, "subslot"),
- m_keybd(*this, "ROW"),
- m_synth(*this, "SYNTH"),
- m_cntrlsel(*this, "CNTRLSEL"),
- m_options(*this, "OPTIONS"),
- m_keypad(*this, "KEYPAD"),
- m_disc(*this, "DISC"),
- m_discx(*this, "DISCX"),
- m_discy(*this, "DISCY"),
- m_psg_porta(0),
m_voice_enabled(false),
m_ramd0_enabled(false),
m_ram88_enabled(false)
@@ -65,7 +56,6 @@ void intv_ecs_device::device_start()
}
save_item(NAME(m_bank_base));
- save_item(NAME(m_psg_porta));
}
void intv_ecs_device::device_reset()
@@ -102,135 +92,17 @@ void intv_ecs_device::late_subslot_setup()
// MACHINE_CONFIG_FRAGMENT( sub_slot )
//-------------------------------------------------
-UINT8 intv_ecs_device::intv_control_r(int hand)
-{
- static const UINT8 keypad_table[] =
- {
- 0xFF, 0x3F, 0x9F, 0x5F, 0xD7, 0xB7, 0x77, 0xDB,
- 0xBB, 0x7B, 0xDD, 0xBD, 0x7D, 0xDE, 0xBE, 0x7E
- };
-
- static const UINT8 disc_table[] =
- {
- 0xF3, 0xE3, 0xE7, 0xF7, 0xF6, 0xE6, 0xEE, 0xFE,
- 0xFC, 0xEC, 0xED, 0xFD, 0xF9, 0xE9, 0xEB, 0xFB
- };
-
- static const UINT8 discyx_table[5][5] =
- {
- { 0xE3, 0xF3, 0xFB, 0xEB, 0xE9 },
- { 0xE7, 0xE3, 0xFB, 0xE9, 0xF9 },
- { 0xF7, 0xF7, 0xFF, 0xFD, 0xFD },
- { 0xF6, 0xE6, 0xFE, 0xEC, 0xED },
- { 0xE6, 0xEE, 0xFE, 0xFC, 0xEC }
- };
-
- int x, y;
- UINT8 val = 0xff;
-
- /* keypad */
- x = m_keypad[hand]->read();
- for (y = 0; y < 16; y++)
- {
- if (x & (1 << y))
- {
- val &= keypad_table[y];
- }
- }
-
- y = (m_options->read() >> ((hand + 2) * 2)) & 3;
- switch (y)
- {
- case 0: /* disc == digital 8-way */
- case 1: /* disc == digital 16-way */
- default:
-
- x = m_disc[hand]->read();
- if (!!x && (!y || !(x & 0x7777)))
- {
- // merge cardinals to form true diagonals
- y = ((x >> 2) & (x << 2)) | ((x >> (16 - 2)) & (x >> 2));
- x = y | (x & ~((y << 2) | (y >> 2) | (y << (16 - 2))));
- }
-
- // only one disc direction is allowed
- x &= -x;
-
- for (y = 0; y < 16; y++)
- {
- if (x & (1 << y))
- {
- val &= disc_table[y];
- }
- }
- break;
-
- case 2: /* disc == _fake_ analog */
-
- x = m_discx[hand]->read();
- y = m_discy[hand]->read();
- val &= discyx_table[y / 32][x / 32];
- }
-
- return val;
-}
-
-READ8_MEMBER( intv_ecs_device::ay_porta_r )
-{
- if (m_cntrlsel->read() == 0)
- return intv_control_r(0);
- else
- return 0xff; // not sure what to return here, maybe it should be last output?
-}
-
-READ8_MEMBER( intv_ecs_device::ay_portb_r )
-{
- switch (m_cntrlsel->read())
- {
- case 0x00: // hand controller
- return intv_control_r(1);
-
- case 0x01: // synthesizer keyboard
- {
- UINT8 val = 0xff;
- // return correct result if more than one bit of 0xFE is set
- for (int i = 0; i < 7; i++)
- {
- if (BIT(m_psg_porta, i))
- val &= m_synth[i]->read();
- }
- return val;
- }
- case 0x02: // ecs keyboard
- {
- UINT8 val = 0xff;
- // return correct result if more than one bit of 0xFE is set
- for (int i = 0; i < 7; i++)
- {
- if (BIT(m_psg_porta, i))
- val &= m_keybd[i]->read();
- }
- return val;
- }
- default:
- return 0xff;
- }
-}
-
-WRITE8_MEMBER( intv_ecs_device::ay_porta_w )
-{
- m_psg_porta = (~data) & 0xff;
-}
static MACHINE_CONFIG_FRAGMENT( sub_slot )
MCFG_SPEAKER_STANDARD_MONO("mono_ecs")
MCFG_SOUND_ADD("ay8914", AY8914, XTAL_3_579545MHz/2)
- MCFG_AY8910_PORT_A_READ_CB(READ8(intv_ecs_device, ay_porta_r))
- MCFG_AY8910_PORT_B_READ_CB(READ8(intv_ecs_device, ay_portb_r))
- MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(intv_ecs_device, ay_porta_w))
+ MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("ctrl_port", intvecs_control_port_device, portA_r))
+ MCFG_AY8910_PORT_B_READ_CB(DEVREAD8("ctrl_port", intvecs_control_port_device, portB_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("ctrl_port", intvecs_control_port_device, portA_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono_ecs", 0.33)
+ MCFG_INTVECS_CONTROL_PORT_ADD("ctrl_port", intvecs_control_port_devices, "keybd")
MCFG_INTV_CARTRIDGE_ADD("subslot", intv_cart, nullptr)
MACHINE_CONFIG_END
@@ -254,294 +126,6 @@ const rom_entry *intv_ecs_device::device_rom_region() const
}
-static INPUT_PORTS_START( intv_ecs_kbd )
-/*
- ECS matrix scanned by setting 0xFE bits to output and reading 0xFF
- ECS Keyboard Layout:
- FF\FE Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
- Bit 0 NC RTN 0 ESC P ; . (left)
- Bit 1 L O 8 9 I K M ,
- Bit 2 J U 6 7 Y H B N
- Bit 3 G T 4 5 R F C V
- Bit 4 D E 2 3 W S Z X
- Bit 5 A CTL (right) 1 Q (up) (down) (space)
- Bit 6 SHIFT NC NC NC NC NC NC NC
-
- Shifted keys that differ from pc:
- Key : 1 2 5 6 7 (left) (right) (up) (down)
- Shift + key: = " + - / % ' ^ ?
- */
-
- PORT_START("ROW.0")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RTN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHAR('%') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
-
- PORT_START("ROW.1")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
-
- PORT_START("ROW.2")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('-') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
-
- PORT_START("ROW.3")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
-
- PORT_START("ROW.4")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
-
- PORT_START("ROW.5")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_RCONTROL) PORT_CODE(KEYCODE_LCONTROL) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR('\'') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('=') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHAR('^') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR('?') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
-
- PORT_START("ROW.6")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x02)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( intv_ecs_synth )
-/*
- ECS Synthesizer Layout:
- FF\FE Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
- Bit 0 G2 Gb2 F2 E2 Eb2 D2 Db2 C2
- Bit 1 Eb3 D3 Db3 C3 B2 Bb2 A2 Ab2
- Bit 2 B3 Bb3 A3 Ab3 G3 Gb3 F3 E3
- Bit 3 G4 Gb4 F4 E4 Eb4 D4 Db4 C4
- Bit 4 Eb5 D5 Db5 C5 B4 Bb4 A4 Ab4
- Bit 5 B5 Bb5 A5 Ab5 G5 Gb5 F5 E5
- Bit 6 C6 NC NC NC NC NC NC NC
- */
- PORT_START("SYNTH.0")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
-
- PORT_START("SYNTH.1")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
-
- PORT_START("SYNTH.2")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
-
- PORT_START("SYNTH.3")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
-
- PORT_START("SYNTH.4")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
-
- PORT_START("SYNTH.5")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
-
- PORT_START("SYNTH.6")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C6") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x01)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( intv_ecs_pads )
- // First ECS Hand Controller
- PORT_START("KEYPAD.0")
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 1") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 6") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 7") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 8") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 9") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 Clear") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 0") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 Enter") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3 Upper") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3 Lower-Left") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P3 Lower-Right") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED )
-
- PORT_START("DISC.0")
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P3 Up") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,NOTEQUALS,0x20)
- PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Up-Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Right-Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P3 Right") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,NOTEQUALS,0x20)
- PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Right-Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Down-Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P3 Down") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,NOTEQUALS,0x20)
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Down-Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Left-Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("P3 Left") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,NOTEQUALS,0x20)
- PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Left-Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Up-Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
-
- PORT_START("DISCX.0")
- PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("P3 X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x20)
-
- PORT_START("DISCY.0")
- PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("P3 Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x20)
-
- // Second ECS Hand Controller
- PORT_START("KEYPAD.1")
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 1") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 6") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 7") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 8") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 9") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 Clear") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 0") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 Enter") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4 Upper") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4 Lower-Left") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P4 Lower-Right") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED )
-
- PORT_START("DISC.1")
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P4 Up") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,NOTEQUALS,0x80)
- PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Up-Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Right-Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P4 Right") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,NOTEQUALS,0x80)
- PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Right-Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Down-Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P4 Down") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,NOTEQUALS,0x80)
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Down-Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Left-Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("P4 Left") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,NOTEQUALS,0x80)
- PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Left-Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Up-Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
-
- PORT_START("DISCX.1")
- PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("P4 X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_D) PORT_CODE_INC(KEYCODE_G) PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x80)
-
- PORT_START("DISCY.1")
- PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("P4 Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_R) PORT_CODE_INC(KEYCODE_F) PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x80)
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( intv_ecs )
- PORT_INCLUDE( intv_ecs_pads )
- PORT_INCLUDE( intv_ecs_synth )
- PORT_INCLUDE( intv_ecs_kbd )
-
- PORT_START("OPTIONS")
- PORT_CONFNAME( 0x30, 0x00, "ECS P3 Disc" ) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_CONFSETTING( 0x00, "Digital 8-way" )
- PORT_CONFSETTING( 0x10, "Digital 16-way" )
- PORT_CONFSETTING( 0x20, "Analog" )
- PORT_CONFNAME( 0xC0, 0x00, "ECS P4 Disc" ) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
- PORT_CONFSETTING( 0x00, "Digital 8-way" )
- PORT_CONFSETTING( 0x40, "Digital 16-way" )
- PORT_CONFSETTING( 0x80, "Analog" )
-
- PORT_START("CNTRLSEL")
- PORT_CONFNAME( 0x0F, 0x02, "ECS Controller")
- PORT_CONFSETTING( 0x00, "Gamepads" )
- PORT_CONFSETTING( 0x01, "Piano" )
- PORT_CONFSETTING( 0x02, "Keyboard" )
-INPUT_PORTS_END
-
-ioport_constructor intv_ecs_device::device_input_ports() const
-{
- return INPUT_PORTS_NAME( intv_ecs );
-}
-
-
/*-------------------------------------------------
Paged ROM handling
-------------------------------------------------*/
diff --git a/src/devices/bus/intv/ecs.h b/src/devices/bus/intv/ecs.h
index 3dc2f37e7b6..ce22d4f7481 100644
--- a/src/devices/bus/intv/ecs.h
+++ b/src/devices/bus/intv/ecs.h
@@ -6,7 +6,7 @@
#include "slot.h"
#include "rom.h"
#include "sound/ay8910.h"
-
+#include "bus/intv_ctrl/ecs_ctrl.h"
// ======================> intv_ecs_device
@@ -21,7 +21,6 @@ public:
virtual void device_start() override;
virtual void device_reset() override;
virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
virtual const rom_entry *device_rom_region() const override;
// reading and writing
@@ -38,9 +37,6 @@ public:
// AY8914
virtual DECLARE_READ16_MEMBER(read_ay) override;
virtual DECLARE_WRITE16_MEMBER(write_ay) override;
- DECLARE_READ8_MEMBER(ay_porta_r);
- DECLARE_READ8_MEMBER(ay_portb_r);
- DECLARE_WRITE8_MEMBER(ay_porta_w);
// passthru accesses
virtual DECLARE_READ16_MEMBER(read_rom04) override { return m_subslot->read_rom04(space, offset, mem_mask); }
@@ -117,30 +113,16 @@ public:
virtual void late_subslot_setup() override;
- UINT8 intv_control_r(int hand);
-
private:
required_device<ay8914_device> m_snd;
required_device<intv_cart_slot_device> m_subslot;
- required_ioport_array<7> m_keybd;
- required_ioport_array<7> m_synth;
- required_ioport m_cntrlsel;
- required_ioport m_options;
- required_ioport_array<2> m_keypad;
- required_ioport_array<2> m_disc;
- required_ioport_array<2> m_discx;
- required_ioport_array<2> m_discy;
int m_bank_base[0x10];
- UINT8 m_psg_porta;
bool m_voice_enabled, m_ramd0_enabled, m_ram88_enabled;
};
-
-
-
// device type definition
extern const device_type INTV_ROM_ECS;
diff --git a/src/devices/bus/intv_ctrl/ctrl.cpp b/src/devices/bus/intv_ctrl/ctrl.cpp
new file mode 100644
index 00000000000..4d57c558d0e
--- /dev/null
+++ b/src/devices/bus/intv_ctrl/ctrl.cpp
@@ -0,0 +1,95 @@
+// license:BSD-3-Clause
+// copyright-holders:Fabio Priuli
+/**********************************************************************
+
+ Mattel Intellivision controller port emulation
+
+**********************************************************************/
+
+#include "ctrl.h"
+// slot devices
+#include "handctrl.h"
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+const device_type INTV_CONTROL_PORT = &device_creator<intv_control_port_device>;
+
+
+//**************************************************************************
+// CARD INTERFACE
+//**************************************************************************
+
+//-------------------------------------------------
+// device_intv_control_port_interface - constructor
+//-------------------------------------------------
+
+device_intv_control_port_interface::device_intv_control_port_interface(const machine_config &mconfig, device_t &device)
+ : device_slot_card_interface(mconfig,device)
+{
+ m_port = dynamic_cast<intv_control_port_device *>(device.owner());
+}
+
+
+//-------------------------------------------------
+// ~device_intv_control_port_interface - destructor
+//-------------------------------------------------
+
+device_intv_control_port_interface::~device_intv_control_port_interface()
+{
+}
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// intv_control_port_device - constructor
+//-------------------------------------------------
+
+intv_control_port_device::intv_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, INTV_CONTROL_PORT, "Mattel Intellivision control port", tag, owner, clock, "intv_control_port", __FILE__),
+ device_slot_interface(mconfig, *this), m_device(nullptr)
+{
+}
+
+
+//-------------------------------------------------
+// intv_control_port_device - destructor
+//-------------------------------------------------
+
+intv_control_port_device::~intv_control_port_device()
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void intv_control_port_device::device_start()
+{
+ m_device = dynamic_cast<device_intv_control_port_interface *>(get_card_device());
+}
+
+
+UINT8 intv_control_port_device::read_ctrl()
+{
+ UINT8 data = 0;
+ if (m_device)
+ data |= m_device->read_ctrl();
+ return data;
+}
+
+
+//-------------------------------------------------
+// SLOT_INTERFACE( intv_control_port_devices )
+//-------------------------------------------------
+
+SLOT_INTERFACE_START( intv_control_port_devices )
+ SLOT_INTERFACE("handctrl", INTV_HANDCTRL)
+SLOT_INTERFACE_END
+
diff --git a/src/devices/bus/intv_ctrl/ctrl.h b/src/devices/bus/intv_ctrl/ctrl.h
new file mode 100644
index 00000000000..b29891efe87
--- /dev/null
+++ b/src/devices/bus/intv_ctrl/ctrl.h
@@ -0,0 +1,76 @@
+// license:BSD-3-Clause
+// copyright-holders:Fabio Priuli
+/**********************************************************************
+
+ Mattel Intellivision controller port emulation
+
+**********************************************************************/
+
+
+#pragma once
+
+#ifndef __INTV_CONTROL_PORT__
+#define __INTV_CONTROL_PORT__
+
+#include "emu.h"
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+class intv_control_port_device;
+
+// ======================> device_intv_control_port_interface
+
+class device_intv_control_port_interface : public device_slot_card_interface
+{
+public:
+ // construction/destruction
+ device_intv_control_port_interface(const machine_config &mconfig, device_t &device);
+ virtual ~device_intv_control_port_interface();
+
+ virtual UINT8 read_ctrl() { return 0; };
+
+protected:
+ intv_control_port_device *m_port;
+};
+
+// ======================> intv_control_port_device
+
+class intv_control_port_device : public device_t,
+ public device_slot_interface
+{
+public:
+ // construction/destruction
+ intv_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~intv_control_port_device();
+
+ DECLARE_READ8_MEMBER( ctrl_r ) { return read_ctrl(); }
+ UINT8 read_ctrl();
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+
+ device_intv_control_port_interface *m_device;
+};
+
+
+// device type definition
+extern const device_type INTV_CONTROL_PORT;
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_INTV_CONTROL_PORT_ADD(_tag, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, INTV_CONTROL_PORT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
+
+
+
+SLOT_INTERFACE_EXTERN( intv_control_port_devices );
+
+
+#endif
diff --git a/src/devices/bus/intv_ctrl/ecs_ctrl.cpp b/src/devices/bus/intv_ctrl/ecs_ctrl.cpp
new file mode 100644
index 00000000000..19bc059531a
--- /dev/null
+++ b/src/devices/bus/intv_ctrl/ecs_ctrl.cpp
@@ -0,0 +1,448 @@
+// license:BSD-3-Clause
+// copyright-holders:Fabio Priuli
+/**********************************************************************
+
+ Mattel Intellivision ECS hack for controller port emulation
+
+ FIXME: This device is the best I could come up with to emulate
+ the fact that Keyboard and Synth controllers for the ECS should be
+ plugged in both ECS control ports, while the 3rd and 4th additional
+ hand controller should only be plugged in a single port.
+ Since the core currently does not allow a single device mounted
+ in more than a slot, this has been worked around with this device
+ which supports as options
+ - ECS keyboard
+ - ECS synth
+ - a pair of Intellivision controller
+
+ All the code for both the controller port and the slot devices has
+ been included in this single source file to make easier to clean
+ them up once we extend the core to support this kind of setup
+ (necessary for Atari 2600 Compumate as well)
+
+**********************************************************************/
+
+#include "ecs_ctrl.h"
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+const device_type INTVECS_CONTROL_PORT = &device_creator<intvecs_control_port_device>;
+
+
+//**************************************************************************
+// CARD INTERFACE
+//**************************************************************************
+
+//-------------------------------------------------
+// device_intvecs_control_port_interface - constructor
+//-------------------------------------------------
+
+device_intvecs_control_port_interface::device_intvecs_control_port_interface(const machine_config &mconfig, device_t &device)
+ : device_slot_card_interface(mconfig,device)
+{
+ m_port = dynamic_cast<intvecs_control_port_device *>(device.owner());
+}
+
+
+//-------------------------------------------------
+// ~device_intvecs_control_port_interface - destructor
+//-------------------------------------------------
+
+device_intvecs_control_port_interface::~device_intvecs_control_port_interface()
+{
+}
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// intvecs_control_port_device - constructor
+//-------------------------------------------------
+
+intvecs_control_port_device::intvecs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, INTVECS_CONTROL_PORT, "Mattel Intellivision ECS control port (HACK)", tag, owner, clock, "intvecs_control_port", __FILE__),
+ device_slot_interface(mconfig, *this), m_device(nullptr)
+{
+}
+
+
+//-------------------------------------------------
+// intvecs_control_port_device - destructor
+//-------------------------------------------------
+
+intvecs_control_port_device::~intvecs_control_port_device()
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void intvecs_control_port_device::device_start()
+{
+ m_device = dynamic_cast<device_intvecs_control_port_interface *>(get_card_device());
+}
+
+
+UINT8 intvecs_control_port_device::read_portA()
+{
+ UINT8 data = 0;
+ if (m_device)
+ data |= m_device->read_portA();
+ return data;
+}
+
+UINT8 intvecs_control_port_device::read_portB()
+{
+ UINT8 data = 0;
+ if (m_device)
+ data |= m_device->read_portB();
+ return data;
+}
+
+void intvecs_control_port_device::write_portA(UINT8 data)
+{
+ if (m_device)
+ m_device->write_portA(data);
+}
+
+
+//-------------------------------------------------
+// SLOT_INTERFACE( intvecs_control_port_devices )
+//-------------------------------------------------
+
+SLOT_INTERFACE_START( intvecs_control_port_devices )
+ SLOT_INTERFACE("ctrls", ECS_CTRLS)
+ SLOT_INTERFACE("keybd", ECS_KEYBD)
+ SLOT_INTERFACE("synth", ECS_SYNTH)
+SLOT_INTERFACE_END
+
+
+
+
+
+//**************************************************************************
+// ACTUAL SLOT DEVICES - included here until core issues are solved...
+//**************************************************************************
+
+
+//-------------------------------------------------
+// ECS_CTRLS - A pair of hand controllers
+//-------------------------------------------------
+
+const device_type ECS_CTRLS = &device_creator<intvecs_ctrls_device>;
+
+static SLOT_INTERFACE_START( intvecs_controller )
+ SLOT_INTERFACE("handctrl", INTV_HANDCTRL)
+SLOT_INTERFACE_END
+
+static MACHINE_CONFIG_FRAGMENT( intvecs_ctrls )
+ MCFG_INTV_CONTROL_PORT_ADD("port1", intvecs_controller, "handctrl")
+ MCFG_INTV_CONTROL_PORT_ADD("port2", intvecs_controller, "handctrl")
+MACHINE_CONFIG_END
+
+
+machine_config_constructor intvecs_ctrls_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( intvecs_ctrls );
+}
+
+intvecs_ctrls_device::intvecs_ctrls_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, ECS_CTRLS, "Mattel Intellivision ECS Hand Controller x2 (HACK)", tag, owner, clock, "intvecs_ctrls", __FILE__),
+ device_intvecs_control_port_interface(mconfig, *this),
+ m_hand1(*this, "port1"),
+ m_hand2(*this, "port2")
+{
+}
+
+void intvecs_ctrls_device::device_start()
+{
+}
+
+void intvecs_ctrls_device::device_reset()
+{
+}
+
+UINT8 intvecs_ctrls_device::read_portA()
+{
+ return m_hand1->read_ctrl();
+}
+
+UINT8 intvecs_ctrls_device::read_portB()
+{
+ return m_hand2->read_ctrl();
+}
+
+//-------------------------------------------------
+// ECS_KEYBD - Keyboard
+//-------------------------------------------------
+
+const device_type ECS_KEYBD = &device_creator<intvecs_keybd_device>;
+
+static INPUT_PORTS_START( intvecs_keybd )
+/*
+ ECS matrix scanned by setting 0xFE bits to output and reading 0xFF
+ ECS Keyboard Layout:
+ FF\FE Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
+ Bit 0 NC RTN 0 ESC P ; . (left)
+ Bit 1 L O 8 9 I K M ,
+ Bit 2 J U 6 7 Y H B N
+ Bit 3 G T 4 5 R F C V
+ Bit 4 D E 2 3 W S Z X
+ Bit 5 A CTL (right) 1 Q (up) (down) (space)
+ Bit 6 SHIFT NC NC NC NC NC NC NC
+
+ Shifted keys that differ from pc:
+ Key : 1 2 5 6 7 (left) (right) (up) (down)
+ Shift + key: = " + - / % ' ^ ?
+ */
+
+ PORT_START("ROW.0")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RTN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.')
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHAR('%')
+
+ PORT_START("ROW.1")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')
+
+ PORT_START("ROW.2")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('-')
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/')
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
+
+ PORT_START("ROW.3")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
+
+ PORT_START("ROW.4")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
+
+ PORT_START("ROW.5")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_RCONTROL) PORT_CODE(KEYCODE_LCONTROL)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR('\'')
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('=')
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHAR('^')
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR('?')
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
+
+ PORT_START("ROW.6")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+INPUT_PORTS_END
+
+ioport_constructor intvecs_keybd_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( intvecs_keybd );
+}
+
+intvecs_keybd_device::intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, ECS_KEYBD, "Mattel Intellivision ECS Keyboard", tag, owner, clock, "intvecs_keybd", __FILE__),
+ device_intvecs_control_port_interface(mconfig, *this),
+ m_keybd(*this, "ROW")
+{
+}
+
+void intvecs_keybd_device::device_start()
+{
+ save_item(NAME(m_psg_portA));
+}
+
+void intvecs_keybd_device::device_reset()
+{
+ m_psg_portA = 0;
+}
+
+UINT8 intvecs_keybd_device::read_portB()
+{
+ UINT8 val = 0xff;
+ // return correct result if more than one bit of 0xFE is set
+ for (int i = 0; i < 7; i++)
+ {
+ if (BIT(m_psg_portA, i))
+ val &= m_keybd[i]->read();
+ }
+ return val;
+}
+
+void intvecs_keybd_device::write_portA(UINT8 data)
+{
+ m_psg_portA = (~data) & 0xff;
+}
+
+
+
+//-------------------------------------------------
+// ECS_SYNTH - Synth
+//-------------------------------------------------
+
+const device_type ECS_SYNTH = &device_creator<intvecs_synth_device>;
+
+
+static INPUT_PORTS_START( intvecs_synth )
+/*
+ ECS Synthesizer Layout:
+ FF\FE Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
+ Bit 0 G2 Gb2 F2 E2 Eb2 D2 Db2 C2
+ Bit 1 Eb3 D3 Db3 C3 B2 Bb2 A2 Ab2
+ Bit 2 B3 Bb3 A3 Ab3 G3 Gb3 F3 E3
+ Bit 3 G4 Gb4 F4 E4 Eb4 D4 Db4 C4
+ Bit 4 Eb5 D5 Db5 C5 B4 Bb4 A4 Ab4
+ Bit 5 B5 Bb5 A5 Ab5 G5 Gb5 F5 E5
+ Bit 6 C6 NC NC NC NC NC NC NC
+ */
+ PORT_START("SYNTH.0")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G2")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb2")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E2")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb2")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D2")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C2")
+
+ PORT_START("SYNTH.1")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb3")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D3")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db3")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C3")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B2")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb2")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab2")
+
+ PORT_START("SYNTH.2")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B3")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb3")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A3")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab3")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G3")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb3")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E3")
+
+ PORT_START("SYNTH.3")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G4")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb4")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E4")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb4")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D4")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db4")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C4")
+
+ PORT_START("SYNTH.4")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb5")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D5")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db5")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C5")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B4")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb4")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A4")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab4")
+
+ PORT_START("SYNTH.5")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B5")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb5")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A5")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab5")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G5")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb5")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E5")
+
+ PORT_START("SYNTH.6")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C6")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+INPUT_PORTS_END
+
+
+ioport_constructor intvecs_synth_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( intvecs_synth );
+}
+
+
+intvecs_synth_device::intvecs_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, ECS_SYNTH, "Mattel Intellivision ECS Synthetizer", tag, owner, clock, "intvecs_synth", __FILE__),
+ device_intvecs_control_port_interface(mconfig, *this),
+ m_synth(*this, "SYNTH")
+{
+}
+
+void intvecs_synth_device::device_start()
+{
+ save_item(NAME(m_psg_portA));
+}
+
+void intvecs_synth_device::device_reset()
+{
+ m_psg_portA = 0;
+}
+
+UINT8 intvecs_synth_device::read_portB()
+{
+ UINT8 val = 0xff;
+ // return correct result if more than one bit of 0xFE is set
+ for (int i = 0; i < 7; i++)
+ {
+ if (BIT(m_psg_portA, i))
+ val &= m_synth[i]->read();
+ }
+ return val;
+}
+
+void intvecs_synth_device::write_portA(UINT8 data)
+{
+ m_psg_portA = (~data) & 0xff;
+}
+
diff --git a/src/devices/bus/intv_ctrl/ecs_ctrl.h b/src/devices/bus/intv_ctrl/ecs_ctrl.h
new file mode 100644
index 00000000000..40d94ca5d1b
--- /dev/null
+++ b/src/devices/bus/intv_ctrl/ecs_ctrl.h
@@ -0,0 +1,171 @@
+// license:BSD-3-Clause
+// copyright-holders:Fabio Priuli
+/**********************************************************************
+
+ Mattel Intellivision ECS hack for controller port emulation
+
+**********************************************************************/
+
+
+#pragma once
+
+#ifndef __INTVECS_CONTROL_PORT__
+#define __INTVECS_CONTROL_PORT__
+
+#include "emu.h"
+#include "bus/intv_ctrl/ctrl.h"
+#include "bus/intv_ctrl/handctrl.h"
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+class intvecs_control_port_device;
+
+// ======================> device_intvecs_control_port_interface
+
+class device_intvecs_control_port_interface : public device_slot_card_interface
+{
+public:
+ // construction/destruction
+ device_intvecs_control_port_interface(const machine_config &mconfig, device_t &device);
+ virtual ~device_intvecs_control_port_interface();
+
+ virtual UINT8 read_portA() { return 0xff; };
+ virtual UINT8 read_portB() { return 0xff; };
+ virtual void write_portA(UINT8 data) { };
+
+protected:
+ intvecs_control_port_device *m_port;
+};
+
+// ======================> intvecs_control_port_device
+
+class intvecs_control_port_device : public device_t,
+ public device_slot_interface
+{
+public:
+ // construction/destruction
+ intvecs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~intvecs_control_port_device();
+
+ DECLARE_READ8_MEMBER( portA_r ) { return read_portA(); }
+ DECLARE_READ8_MEMBER( portB_r ) { return read_portB(); }
+ DECLARE_WRITE8_MEMBER( portA_w ) { return write_portA(data); }
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ UINT8 read_portA();
+ UINT8 read_portB();
+ void write_portA(UINT8 data);
+
+ device_intvecs_control_port_interface *m_device;
+};
+
+
+// device type definition
+extern const device_type INTVECS_CONTROL_PORT;
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_INTVECS_CONTROL_PORT_ADD(_tag, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, INTVECS_CONTROL_PORT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
+
+
+
+SLOT_INTERFACE_EXTERN( intvecs_control_port_devices );
+
+
+//**************************************************************************
+// ACTUAL SLOT DEVICES - included here until core issues are solved...
+//**************************************************************************
+
+// ======================> intvecs_ctrls_device
+
+class intvecs_ctrls_device : public device_t,
+ public device_intvecs_control_port_interface
+{
+public:
+ // construction/destruction
+ intvecs_ctrls_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // optional information overrides
+ virtual machine_config_constructor device_mconfig_additions() const override;
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ virtual UINT8 read_portA() override;
+ virtual UINT8 read_portB() override;
+
+private:
+ required_device<intv_control_port_device> m_hand1;
+ required_device<intv_control_port_device> m_hand2;
+};
+
+// ======================> intvecs_keybd_device
+
+class intvecs_keybd_device : public device_t,
+ public device_intvecs_control_port_interface
+{
+public:
+ // construction/destruction
+ intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // optional information overrides
+ virtual ioport_constructor device_input_ports() const override;
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ virtual UINT8 read_portB() override;
+ virtual void write_portA(UINT8 data) override;
+
+private:
+ UINT8 m_psg_portA;
+ required_ioport_array<7> m_keybd;
+};
+
+// ======================> intvecs_synth_device
+
+class intvecs_synth_device : public device_t,
+ public device_intvecs_control_port_interface
+{
+public:
+ // construction/destruction
+ intvecs_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // optional information overrides
+ virtual ioport_constructor device_input_ports() const override;
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ virtual UINT8 read_portB() override;
+ virtual void write_portA(UINT8 data) override;
+
+private:
+ UINT8 m_psg_portA;
+ required_ioport_array<7> m_synth;
+};
+
+
+// device type definition
+extern const device_type ECS_CTRLS;
+extern const device_type ECS_KEYBD;
+extern const device_type ECS_SYNTH;
+
+
+
+#endif
diff --git a/src/devices/bus/intv_ctrl/handctrl.cpp b/src/devices/bus/intv_ctrl/handctrl.cpp
new file mode 100644
index 00000000000..512f9f32adc
--- /dev/null
+++ b/src/devices/bus/intv_ctrl/handctrl.cpp
@@ -0,0 +1,179 @@
+// license:BSD-3-Clause
+// copyright-holders:Fabio Priuli
+/**********************************************************************
+
+ Mattel Intellivision Hand Controllers
+
+**********************************************************************/
+
+#include "handctrl.h"
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type INTV_HANDCTRL = &device_creator<intv_handctrl_device>;
+
+
+static INPUT_PORTS_START( intv_handctrl )
+ PORT_START("KEYPAD")
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD)
+ PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("2") PORT_CODE(KEYCODE_2_PAD)
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("3") PORT_CODE(KEYCODE_3_PAD)
+ PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("4") PORT_CODE(KEYCODE_4_PAD)
+ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD)
+ PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("6") PORT_CODE(KEYCODE_6_PAD)
+ PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("7") PORT_CODE(KEYCODE_7_PAD)
+ PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("8") PORT_CODE(KEYCODE_8_PAD)
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("9") PORT_CODE(KEYCODE_9_PAD)
+ PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Clear") PORT_CODE(KEYCODE_DEL_PAD)
+ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("0") PORT_CODE(KEYCODE_0_PAD)
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER_PAD)
+ PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Upper") PORT_PLAYER(1)
+ PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Lower-Left") PORT_PLAYER(1)
+ PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Lower-Right") PORT_PLAYER(1)
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("DISC_DG")
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Up") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right-Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("Right") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right-Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Down") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left-Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("Left") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left-Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
+
+ PORT_START("DISC_AN_X")
+ PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x01)
+
+ PORT_START("DISC_AN_Y")
+ PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x01)
+
+
+ PORT_START("OPTIONS")
+ PORT_CONFNAME( 0x01, 0x01, "Controller Disc Emulation" )
+ PORT_CONFSETTING( 0x00, "Digital" )
+ PORT_CONFSETTING( 0x01, "Analog" )
+INPUT_PORTS_END
+
+
+//-------------------------------------------------
+// input_ports - device-specific input ports
+//-------------------------------------------------
+
+ioport_constructor intv_handctrl_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( intv_handctrl );
+}
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// intv_handctrl_device - constructor
+//-------------------------------------------------
+
+intv_handctrl_device::intv_handctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, INTV_HANDCTRL, "Mattel Intellivision Hand Controller", tag, owner, clock, "intv_hand", __FILE__),
+ device_intv_control_port_interface(mconfig, *this),
+ m_cfg(*this, "OPTIONS"),
+ m_keypad(*this, "KEYPAD"),
+ m_disc_dig(*this, "DISC_DG"),
+ m_disc_anx(*this, "DISC_AN_X"),
+ m_disc_any(*this, "DISC_AN_Y")
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void intv_handctrl_device::device_start()
+{
+}
+
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void intv_handctrl_device::device_reset()
+{
+}
+
+
+//-------------------------------------------------
+// read_ctrl
+//-------------------------------------------------
+
+UINT8 intv_handctrl_device::read_ctrl()
+{
+ static const UINT8 keypad_table[] =
+ {
+ 0xff, 0x3f, 0x9f, 0x5f, 0xd7, 0xb7, 0x77, 0xdb,
+ 0xbb, 0x7b, 0xdd, 0xbd, 0x7d, 0xde, 0xbe, 0x7e
+ };
+
+ static const UINT8 disc_table[] =
+ {
+ 0xf3, 0xe3, 0xe7, 0xf7, 0xf6, 0xe6, 0xee, 0xfe,
+ 0xfc, 0xec, 0xed, 0xfd, 0xf9, 0xe9, 0xeb, 0xfb
+ };
+
+ static const UINT8 discyx_table[5][5] =
+ {
+ { 0xe3, 0xf3, 0xfb, 0xeb, 0xe9 },
+ { 0xe7, 0xe3, 0xfb, 0xe9, 0xf9 },
+ { 0xf7, 0xf7, 0xff, 0xfd, 0xfd },
+ { 0xf6, 0xe6, 0xfe, 0xec, 0xed },
+ { 0xe6, 0xee, 0xfe, 0xfc, 0xec }
+ };
+
+ int x, y;
+ UINT8 res = 0xff;
+
+ /* keypad */
+ x = m_keypad->read();
+ for (int i = 0; i < 16; i++)
+ {
+ if (BIT(x, i))
+ res &= keypad_table[i];
+ }
+
+ switch (m_cfg->read() & 1)
+ {
+ /* disc == digital */
+ case 0:
+ default:
+ x = m_disc_dig->read();
+ for (int i = 0; i < 16; i++)
+ {
+ if (BIT(x, i))
+ res &= disc_table[i];
+ }
+ break;
+
+ /* disc == _fake_ analog */
+ case 1:
+ x = m_disc_anx->read();
+ y = m_disc_any->read();
+ res &= discyx_table[y / 32][x / 32];
+ break;
+ }
+
+ return res;
+}
+
diff --git a/src/devices/bus/intv_ctrl/handctrl.h b/src/devices/bus/intv_ctrl/handctrl.h
new file mode 100644
index 00000000000..5b6fc4a3fb9
--- /dev/null
+++ b/src/devices/bus/intv_ctrl/handctrl.h
@@ -0,0 +1,55 @@
+// license:BSD-3-Clause
+// copyright-holders:Fabio Priuli
+/**********************************************************************
+
+ Mattel Intellivision Hand Controller
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __INTV_HANDCTRL__
+#define __INTV_HANDCTRL__
+
+
+#include "emu.h"
+#include "ctrl.h"
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> intv_handctrl_device
+
+class intv_handctrl_device : public device_t,
+ public device_intv_control_port_interface
+{
+public:
+ // construction/destruction
+ intv_handctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // optional information overrides
+ virtual ioport_constructor device_input_ports() const override;
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ // device_intv_control_port_interface overrides
+ virtual UINT8 read_ctrl() override;
+
+private:
+ required_ioport m_cfg;
+ required_ioport m_keypad;
+ required_ioport m_disc_dig;
+ required_ioport m_disc_anx;
+ required_ioport m_disc_any;
+};
+
+
+// device type definition
+extern const device_type INTV_HANDCTRL;
+
+
+#endif
diff --git a/src/devices/bus/iq151/iq151.cpp b/src/devices/bus/iq151/iq151.cpp
index 3d4ef7abe05..16839150b5a 100644
--- a/src/devices/bus/iq151/iq151.cpp
+++ b/src/devices/bus/iq151/iq151.cpp
@@ -8,7 +8,6 @@
#include "emu.h"
#include "iq151.h"
-#include "emuopts.h"
#define LOG 0
diff --git a/src/devices/bus/iq151/video32.cpp b/src/devices/bus/iq151/video32.cpp
index a5ce59a51db..91724700a03 100644
--- a/src/devices/bus/iq151/video32.cpp
+++ b/src/devices/bus/iq151/video32.cpp
@@ -36,13 +36,6 @@ static const gfx_layout iq151_video32_charlayout =
8*8 /* every char takes 8 bytes */
};
-static GFXDECODE_START( video32 )
-GFXDECODE_END
-
-static MACHINE_CONFIG_FRAGMENT( video32 )
- MCFG_GFXDECODE_ADD("gfxdecode", "^^palette", video32)
-MACHINE_CONFIG_END
-
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
@@ -59,9 +52,8 @@ const device_type IQ151_VIDEO32 = &device_creator<iq151_video32_device>;
iq151_video32_device::iq151_video32_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, IQ151_VIDEO32, "IQ151 video32", tag, owner, clock, "iq151_video32", __FILE__),
- device_iq151cart_interface( mconfig, *this ), m_videoram(nullptr), m_chargen(nullptr),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "^^palette")
+ device_gfx_interface(mconfig, *this, nullptr, "^^palette"),
+ device_iq151cart_interface( mconfig, *this ), m_videoram(nullptr), m_chargen(nullptr)
{
}
@@ -75,7 +67,7 @@ void iq151_video32_device::device_start()
m_videoram = (UINT8*)memregion("videoram")->base();
m_chargen = (UINT8*)memregion("chargen")->base();
- m_gfxdecode->set_gfx(0, std::make_unique<gfx_element>(m_palette, iq151_video32_charlayout, m_chargen, 0, 1, 0));
+ set_gfx(0, std::make_unique<gfx_element>(palette(), iq151_video32_charlayout, m_chargen, 0, 1, 0));
}
//-------------------------------------------------
@@ -92,16 +84,6 @@ void iq151_video32_device::device_reset()
}
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor iq151_video32_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( video32 );
-}
-
-//-------------------------------------------------
// device_rom_region
//-------------------------------------------------
diff --git a/src/devices/bus/iq151/video32.h b/src/devices/bus/iq151/video32.h
index d8b3a1e93eb..10937728696 100644
--- a/src/devices/bus/iq151/video32.h
+++ b/src/devices/bus/iq151/video32.h
@@ -16,6 +16,7 @@
class iq151_video32_device :
public device_t,
+ public device_gfx_interface,
public device_iq151cart_interface
{
public:
@@ -24,7 +25,6 @@ public:
// optional information overrides
virtual const rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
protected:
// device-level overrides
@@ -39,8 +39,6 @@ protected:
private:
UINT8 * m_videoram;
UINT8 * m_chargen;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
diff --git a/src/devices/bus/iq151/video64.cpp b/src/devices/bus/iq151/video64.cpp
index d58cca76aec..afb7462804d 100644
--- a/src/devices/bus/iq151/video64.cpp
+++ b/src/devices/bus/iq151/video64.cpp
@@ -36,13 +36,6 @@ static const gfx_layout iq151_video64_charlayout =
8*8 /* every char takes 8 bytes */
};
-static GFXDECODE_START( video64 )
-GFXDECODE_END
-
-static MACHINE_CONFIG_FRAGMENT( video64 )
- MCFG_GFXDECODE_ADD("gfxdecode", "^^palette", video64)
-MACHINE_CONFIG_END
-
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
@@ -59,9 +52,8 @@ const device_type IQ151_VIDEO64 = &device_creator<iq151_video64_device>;
iq151_video64_device::iq151_video64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, IQ151_VIDEO64, "IQ151 video64", tag, owner, clock, "iq151_video64", __FILE__),
- device_iq151cart_interface( mconfig, *this ), m_videoram(nullptr), m_chargen(nullptr),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "^^palette")
+ device_gfx_interface(mconfig, *this, nullptr, "^^palette"),
+ device_iq151cart_interface( mconfig, *this ), m_videoram(nullptr), m_chargen(nullptr)
{
}
@@ -74,7 +66,7 @@ void iq151_video64_device::device_start()
m_videoram = (UINT8*)memregion("videoram")->base();
m_chargen = (UINT8*)memregion("chargen")->base();
- m_gfxdecode->set_gfx(0,std::make_unique<gfx_element>(m_palette, iq151_video64_charlayout, m_chargen, 0, 1, 0));
+ set_gfx(0,std::make_unique<gfx_element>(palette(), iq151_video64_charlayout, m_chargen, 0, 1, 0));
}
//-------------------------------------------------
@@ -91,16 +83,6 @@ void iq151_video64_device::device_reset()
}
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor iq151_video64_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( video64 );
-}
-
-//-------------------------------------------------
// device_rom_region
//-------------------------------------------------
diff --git a/src/devices/bus/iq151/video64.h b/src/devices/bus/iq151/video64.h
index 0162e107e31..f8d6d675f45 100644
--- a/src/devices/bus/iq151/video64.h
+++ b/src/devices/bus/iq151/video64.h
@@ -16,6 +16,7 @@
class iq151_video64_device :
public device_t,
+ public device_gfx_interface,
public device_iq151cart_interface
{
public:
@@ -24,7 +25,6 @@ public:
// optional information overrides
virtual const rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
protected:
// device-level overrides
@@ -40,8 +40,6 @@ protected:
private:
UINT8 * m_videoram;
UINT8 * m_chargen;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
diff --git a/src/devices/bus/isa/isa.cpp b/src/devices/bus/isa/isa.cpp
index 9b07bdce8e0..8f1dac61ccb 100644
--- a/src/devices/bus/isa/isa.cpp
+++ b/src/devices/bus/isa/isa.cpp
@@ -7,7 +7,6 @@
***************************************************************************/
#include "emu.h"
-#include "emuopts.h"
#include "isa.h"
@@ -323,7 +322,7 @@ void isa8_device::install_device(offs_t start, offs_t end, offs_t mask, offs_t m
void isa8_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data)
{
m_prgspace->install_readwrite_bank(start, end, mask, mirror, tag );
- machine().root_device().membank(tag)->set_base(data);
+ machine().root_device().membank(siblingtag(tag).c_str())->set_base(data);
}
void isa8_device::unmap_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror)
@@ -340,7 +339,7 @@ void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, offs_t ma
} else {
m_prgspace->install_read_bank(start, end, mask, mirror, tag);
m_prgspace->unmap_write(start, end, mask, mirror);
- machine().root_device().membank(tag)->set_base(machine().root_device().memregion(dev->subtag(region).c_str())->base());
+ machine().root_device().membank(siblingtag(tag).c_str())->set_base(machine().root_device().memregion(dev->subtag(region).c_str())->base());
}
}
diff --git a/src/devices/bus/kc/kc.cpp b/src/devices/bus/kc/kc.cpp
index a5a46802998..05afba8ed7a 100644
--- a/src/devices/bus/kc/kc.cpp
+++ b/src/devices/bus/kc/kc.cpp
@@ -106,7 +106,6 @@
#include "emu.h"
#include "kc.h"
-#include "emuopts.h"
#define LOG 0
diff --git a/src/devices/bus/kc/rom.cpp b/src/devices/bus/kc/rom.cpp
index 404089110a0..883b36eb739 100644
--- a/src/devices/bus/kc/rom.cpp
+++ b/src/devices/bus/kc/rom.cpp
@@ -43,7 +43,7 @@ const device_type KC_M033 = &device_creator<kc_m033_device>;
//-------------------------------------------------
kc_8k_device::kc_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, KC_STANDARD, "Standard", tag, owner, clock, "kc_8k", __FILE__),
+ : device_t(mconfig, KC_STANDARD, "Standard 8K ROM module", tag, owner, clock, "kc_8k", __FILE__),
device_kcexp_interface( mconfig, *this ), m_slot(nullptr), m_mei(0), m_rom(nullptr), m_enabled(0), m_base(0)
{
}
diff --git a/src/devices/bus/macpds/macpds.cpp b/src/devices/bus/macpds/macpds.cpp
index 61fae5f3a17..bc626ac1831 100644
--- a/src/devices/bus/macpds/macpds.cpp
+++ b/src/devices/bus/macpds/macpds.cpp
@@ -9,7 +9,6 @@
***************************************************************************/
#include "emu.h"
-#include "emuopts.h"
#include "macpds.h"
@@ -127,7 +126,7 @@ void macpds_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t m
m_maincpu = machine().device<cpu_device>(m_cputag);
address_space &space = m_maincpu->space(AS_PROGRAM);
space.install_readwrite_bank(start, end, mask, mirror, tag );
- machine().root_device().membank(tag)->set_base(data);
+ machine().root_device().membank(siblingtag(tag).c_str())->set_base(data);
}
void macpds_device::set_irq_line(int line, int state)
diff --git a/src/devices/bus/msx_slot/bunsetsu.cpp b/src/devices/bus/msx_slot/bunsetsu.cpp
index 1289a84704b..e7cc47e4c2a 100644
--- a/src/devices/bus/msx_slot/bunsetsu.cpp
+++ b/src/devices/bus/msx_slot/bunsetsu.cpp
@@ -13,36 +13,12 @@ const device_type MSX_SLOT_BUNSETSU = &device_creator<msx_slot_bunsetsu_device>;
msx_slot_bunsetsu_device::msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: msx_slot_rom_device(mconfig, MSX_SLOT_BUNSETSU, "MSX Internal BUNSETSU", tag, owner, clock, "msx_slot_bunsetsu", __FILE__)
- , m_bunsetsu_region(nullptr)
- , m_bunsetsu_region_tag(nullptr)
+ , m_bunsetsu_region(*this, 0x20000)
, m_bunsetsu_address(0)
{
}
-void msx_slot_bunsetsu_device::device_start()
-{
- msx_slot_rom_device::device_start();
-
- if (m_bunsetsu_region_tag == nullptr)
- {
- fatalerror("msx_slot_bunsetsu_device: no bunsetsu region tag specified\n");
- }
-
- m_bunsetsu_region = owner()->memregion(m_bunsetsu_region_tag);
-
- if (m_bunsetsu_region == nullptr)
- {
- fatalerror("msx_slot_bunsetsu_device: Unable to find region with tag '%s'\n", m_bunsetsu_region_tag);
- }
-
- if (m_bunsetsu_region->bytes() != 0x20000)
- {
- fatalerror("msx_slot_bunsetsu_device: Bunsetsu region must be 0x20000 bytes.\n");
- }
-}
-
-
void msx_slot_bunsetsu_device::device_reset()
{
m_bunsetsu_address = 0;
@@ -53,7 +29,7 @@ READ8_MEMBER(msx_slot_bunsetsu_device::read)
{
if (offset == 0xbfff)
{
- return m_bunsetsu_region->u8(m_bunsetsu_address++ & 0x1ffff);
+ return m_bunsetsu_region[m_bunsetsu_address++ & 0x1ffff];
}
return msx_slot_rom_device::read(space, offset);
}
diff --git a/src/devices/bus/msx_slot/bunsetsu.h b/src/devices/bus/msx_slot/bunsetsu.h
index 701e6bb8640..90e1cbd5bf5 100644
--- a/src/devices/bus/msx_slot/bunsetsu.h
+++ b/src/devices/bus/msx_slot/bunsetsu.h
@@ -12,25 +12,23 @@ extern const device_type MSX_SLOT_BUNSETSU;
#define MCFG_MSX_SLOT_BUNSETSU_ADD(_tag, _startpage, _numpages, _region, _offset, _bunsetsu_region_tag) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_BUNSETSU, _startpage, _numpages) \
- msx_slot_rom_device::set_rom_start(*device, _region, _offset); \
- msx_slot_bunsetsu_device::set_bunsetsu_region_tag(*device, _bunsetsu_region_tag);
+ msx_slot_rom_device::set_rom_start(*device, "^" _region, _offset); \
+ msx_slot_bunsetsu_device::set_bunsetsu_region_tag(*device, "^" _bunsetsu_region_tag);
class msx_slot_bunsetsu_device : public msx_slot_rom_device
{
public:
msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// static configuration helpers
- static void set_bunsetsu_region_tag(device_t &device, const char *tag) { dynamic_cast<msx_slot_bunsetsu_device &>(device).m_bunsetsu_region_tag = tag; }
+ static void set_bunsetsu_region_tag(device_t &device, const char *tag) { dynamic_cast<msx_slot_bunsetsu_device &>(device).m_bunsetsu_region.set_tag(tag); }
- virtual void device_start() override;
virtual void device_reset() override;
virtual DECLARE_READ8_MEMBER(read) override;
virtual DECLARE_WRITE8_MEMBER(write) override;
private:
- memory_region *m_bunsetsu_region;
- const char *m_bunsetsu_region_tag;
+ required_region_ptr<UINT8> m_bunsetsu_region;
UINT32 m_bunsetsu_address;
};
diff --git a/src/devices/bus/msx_slot/disk.h b/src/devices/bus/msx_slot/disk.h
index fb0bdad5cdf..d5ce0982f82 100644
--- a/src/devices/bus/msx_slot/disk.h
+++ b/src/devices/bus/msx_slot/disk.h
@@ -27,35 +27,35 @@ extern const device_type MSX_SLOT_DISK6;
#define MCFG_MSX_SLOT_DISK1_ADD(_tag, _startpage, _numpages, _region, _offset, _fdc_tag, _floppy0_tag, _floppy1_tag) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_DISK1, _startpage, _numpages) \
- msx_slot_rom_device::set_rom_start(*device, _region, _offset); \
+ msx_slot_rom_device::set_rom_start(*device, "^" _region, _offset); \
msx_slot_disk_device::set_fdc_tag(*device, _fdc_tag); \
msx_slot_disk_device::set_floppy0_tag(*device, _floppy0_tag); \
msx_slot_disk_device::set_floppy1_tag(*device, _floppy1_tag);
#define MCFG_MSX_SLOT_DISK2_ADD(_tag, _startpage, _numpages, _region, _offset, _fdc_tag, _floppy0_tag, _floppy1_tag) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_DISK2, _startpage, _numpages) \
- msx_slot_rom_device::set_rom_start(*device, _region, _offset); \
+ msx_slot_rom_device::set_rom_start(*device, "^" _region, _offset); \
msx_slot_disk_device::set_fdc_tag(*device, _fdc_tag); \
msx_slot_disk_device::set_floppy0_tag(*device, _floppy0_tag); \
msx_slot_disk_device::set_floppy1_tag(*device, _floppy1_tag);
#define MCFG_MSX_SLOT_DISK3_ADD(_tag, _startpage, _numpages, _region, _offset, _fdc_tag, _floppy0_tag, _floppy1_tag) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_DISK3, _startpage, _numpages) \
- msx_slot_rom_device::set_rom_start(*device, _region, _offset); \
+ msx_slot_rom_device::set_rom_start(*device, "^" _region, _offset); \
msx_slot_disk_device::set_fdc_tag(*device, _fdc_tag); \
msx_slot_disk_device::set_floppy0_tag(*device, _floppy0_tag); \
msx_slot_disk_device::set_floppy1_tag(*device, _floppy1_tag);
#define MCFG_MSX_SLOT_DISK4_ADD(_tag, _startpage, _numpages, _region, _offset, _fdc_tag, _floppy0_tag, _floppy1_tag) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_DISK4, _startpage, _numpages) \
- msx_slot_rom_device::set_rom_start(*device, _region, _offset); \
+ msx_slot_rom_device::set_rom_start(*device, "^" _region, _offset); \
msx_slot_disk_device::set_fdc_tag(*device, _fdc_tag); \
msx_slot_disk_device::set_floppy0_tag(*device, _floppy0_tag); \
msx_slot_disk_device::set_floppy1_tag(*device, _floppy1_tag);
#define MCFG_MSX_SLOT_DISK5_ADD(_tag, _startpage, _numpages, _region, _offset, _fdc_tag, _floppy0_tag, _floppy1_tag, _floppy2_tag, _floppy3_tag) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_DISK5, _startpage, _numpages) \
- msx_slot_rom_device::set_rom_start(*device, _region, _offset); \
+ msx_slot_rom_device::set_rom_start(*device, "^" _region, _offset); \
msx_slot_disk_device::set_fdc_tag(*device, _fdc_tag); \
msx_slot_disk_device::set_floppy0_tag(*device, _floppy0_tag); \
msx_slot_disk_device::set_floppy1_tag(*device, _floppy1_tag); \
@@ -64,7 +64,7 @@ extern const device_type MSX_SLOT_DISK6;
#define MCFG_MSX_SLOT_DISK6_ADD(_tag, _startpage, _numpages, _region, _offset, _fdc_tag, _floppy0_tag, _floppy1_tag) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_DISK6, _startpage, _numpages) \
- msx_slot_rom_device::set_rom_start(*device, _region, _offset); \
+ msx_slot_rom_device::set_rom_start(*device, "^" _region, _offset); \
msx_slot_disk_device::set_fdc_tag(*device, _fdc_tag); \
msx_slot_disk_device::set_floppy0_tag(*device, _floppy0_tag); \
msx_slot_disk_device::set_floppy1_tag(*device, _floppy1_tag);
diff --git a/src/devices/bus/msx_slot/fs4600.cpp b/src/devices/bus/msx_slot/fs4600.cpp
index e6d6d8b9b9f..8c33b51a692 100644
--- a/src/devices/bus/msx_slot/fs4600.cpp
+++ b/src/devices/bus/msx_slot/fs4600.cpp
@@ -15,7 +15,7 @@ msx_slot_fs4600_device::msx_slot_fs4600_device(const machine_config &mconfig, co
: device_t(mconfig, MSX_SLOT_FS4600, "MSX Internal FS4600 Firmware", tag, owner, clock, "msx_slot_fs4600", __FILE__)
, msx_internal_slot_interface()
, m_nvram(*this, "nvram")
- , m_region(nullptr)
+ , m_rom_region(*this)
, m_region_offset(0)
, m_rom(nullptr)
, m_sram_address(0)
@@ -45,25 +45,17 @@ void msx_slot_fs4600_device::set_rom_start(device_t &device, const char *region,
{
msx_slot_fs4600_device &dev = downcast<msx_slot_fs4600_device &>(device);
- dev.m_region = region;
+ dev.m_rom_region.set_tag(region);
dev.m_region_offset = offset;
}
void msx_slot_fs4600_device::device_start()
{
- assert(m_region != nullptr );
-
- memory_region *m_rom_region = owner()->memregion(m_region);
-
// Sanity checks
- if (m_rom_region == nullptr )
- {
- fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region);
- }
if (m_rom_region->bytes() < m_region_offset + 0x100000)
{
- fatalerror("Memory region '%s' is too small for the FS4600 firmware\n", m_region);
+ fatalerror("Memory region '%s' is too small for the FS4600 firmware\n", m_rom_region.finder_tag());
}
m_rom = m_rom_region->base() + m_region_offset;
diff --git a/src/devices/bus/msx_slot/fs4600.h b/src/devices/bus/msx_slot/fs4600.h
index 57ae25aa47e..a1b0cdb4792 100644
--- a/src/devices/bus/msx_slot/fs4600.h
+++ b/src/devices/bus/msx_slot/fs4600.h
@@ -12,7 +12,7 @@ extern const device_type MSX_SLOT_FS4600;
#define MCFG_MSX_SLOT_FS4600_ADD(_tag, _startpage, _numpages, _region, _offset) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_FS4600, _startpage, _numpages) \
- msx_slot_fs4600_device::set_rom_start(*device, _region, _offset);
+ msx_slot_fs4600_device::set_rom_start(*device, "^" _region, _offset);
class msx_slot_fs4600_device : public device_t,
public msx_internal_slot_interface
@@ -33,7 +33,7 @@ public:
private:
required_device<nvram_device> m_nvram;
- const char *m_region;
+ required_memory_region m_rom_region;
UINT32 m_region_offset;
const UINT8 *m_rom;
UINT8 m_selected_bank[4];
diff --git a/src/devices/bus/msx_slot/music.h b/src/devices/bus/msx_slot/music.h
index eb2501b6746..3165982aaf0 100644
--- a/src/devices/bus/msx_slot/music.h
+++ b/src/devices/bus/msx_slot/music.h
@@ -14,7 +14,7 @@ extern const device_type MSX_SLOT_MUSIC;
#define MCFG_MSX_SLOT_MUSIC_ADD(_tag, _startpage, _numpages, _region, _offset, _ym2413_tag) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_MUSIC, _startpage, _numpages) \
- msx_slot_rom_device::set_rom_start(*device, _region, _offset); \
+ msx_slot_rom_device::set_rom_start(*device, "^" _region, _offset); \
msx_slot_music_device::set_ym2413_tag(*device, _ym2413_tag);
class msx_slot_music_device : public msx_slot_rom_device
{
diff --git a/src/devices/bus/msx_slot/panasonic08.cpp b/src/devices/bus/msx_slot/panasonic08.cpp
index ec9fdcf20ea..b6da40189e7 100644
--- a/src/devices/bus/msx_slot/panasonic08.cpp
+++ b/src/devices/bus/msx_slot/panasonic08.cpp
@@ -20,7 +20,7 @@ msx_slot_panasonic08_device::msx_slot_panasonic08_device(const machine_config &m
: device_t(mconfig, MSX_SLOT_PANASONIC08, "MSX Internal Panasonic08", tag, owner, clock, "msx_slot_panasonic08", __FILE__)
, msx_internal_slot_interface()
, m_nvram(*this, "nvram")
- , m_region(nullptr)
+ , m_rom_region(*this)
, m_region_offset(0)
, m_rom(nullptr)
, m_control(0)
@@ -48,25 +48,17 @@ void msx_slot_panasonic08_device::set_rom_start(device_t &device, const char *re
{
msx_slot_panasonic08_device &dev = downcast<msx_slot_panasonic08_device &>(device);
- dev.m_region = region;
+ dev.m_rom_region.set_tag(region);
dev.m_region_offset = offset;
}
void msx_slot_panasonic08_device::device_start()
{
- assert(m_region != nullptr );
-
- memory_region *m_rom_region = owner()->memregion(m_region);
-
// Sanity checks
- if (m_rom_region == nullptr )
- {
- fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region);
- }
if (m_rom_region->bytes() < m_region_offset + 0x200000)
{
- fatalerror("Memory region '%s' is too small for the FS4600 firmware\n", m_region);
+ fatalerror("Memory region '%s' is too small for the FS4600 firmware\n", m_rom_region.finder_tag());
}
m_sram.resize(0x4000);
diff --git a/src/devices/bus/msx_slot/panasonic08.h b/src/devices/bus/msx_slot/panasonic08.h
index d42ebd308f5..18295c78598 100644
--- a/src/devices/bus/msx_slot/panasonic08.h
+++ b/src/devices/bus/msx_slot/panasonic08.h
@@ -12,7 +12,7 @@ extern const device_type MSX_SLOT_PANASONIC08;
#define MCFG_MSX_SLOT_PANASONIC08_ADD(_tag, _startpage, _numpages, _region, _offset) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_PANASONIC08, _startpage, _numpages) \
- msx_slot_panasonic08_device::set_rom_start(*device, _region, _offset);
+ msx_slot_panasonic08_device::set_rom_start(*device, "^" _region, _offset);
class msx_slot_panasonic08_device : public device_t,
public msx_internal_slot_interface
@@ -33,7 +33,7 @@ public:
private:
required_device<nvram_device> m_nvram;
- const char *m_region;
+ required_memory_region m_rom_region;
UINT32 m_region_offset;
const UINT8 *m_rom;
UINT8 m_selected_bank[8];
diff --git a/src/devices/bus/msx_slot/rom.cpp b/src/devices/bus/msx_slot/rom.cpp
index 2d4593bed2b..5a6bef72e91 100644
--- a/src/devices/bus/msx_slot/rom.cpp
+++ b/src/devices/bus/msx_slot/rom.cpp
@@ -10,7 +10,7 @@ const device_type MSX_SLOT_ROM = &device_creator<msx_slot_rom_device>;
msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MSX_SLOT_ROM, "MSX Internal ROM", tag, owner, clock, "msx_slot_rom", __FILE__)
, msx_internal_slot_interface()
- , m_region(nullptr)
+ , m_rom_region(*this)
, m_region_offset(0)
, m_rom(nullptr)
{
@@ -20,7 +20,7 @@ msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, const ch
msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
, msx_internal_slot_interface()
- , m_region(nullptr)
+ , m_rom_region(*this)
, m_region_offset(0)
, m_rom(nullptr)
{
@@ -31,25 +31,17 @@ void msx_slot_rom_device::set_rom_start(device_t &device, const char *region, UI
{
msx_slot_rom_device &dev = downcast<msx_slot_rom_device &>(device);
- dev.m_region = region;
+ dev.m_rom_region.set_tag(region);
dev.m_region_offset = offset;
}
void msx_slot_rom_device::device_start()
{
- assert(m_region != nullptr );
-
- memory_region *m_rom_region = owner()->memregion(m_region);
-
// Sanity checks
- if (m_rom_region == nullptr )
- {
- fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region);
- }
if (m_rom_region->bytes() < m_region_offset + m_size)
{
- fatalerror("Memory region '%s' is too small for rom slot '%s'\n", m_region, tag());
+ fatalerror("Memory region '%s' is too small for rom slot '%s'\n", m_rom_region.finder_tag(), tag());
}
m_rom = m_rom_region->base() + m_region_offset;
diff --git a/src/devices/bus/msx_slot/rom.h b/src/devices/bus/msx_slot/rom.h
index e46fea28186..98679eaa452 100644
--- a/src/devices/bus/msx_slot/rom.h
+++ b/src/devices/bus/msx_slot/rom.h
@@ -7,7 +7,7 @@
#define MCFG_MSX_SLOT_ROM_ADD(_tag, _startpage, _numpages, _region, _offset) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_ROM, _startpage, _numpages) \
- msx_slot_rom_device::set_rom_start(*device, _region, _offset);
+ msx_slot_rom_device::set_rom_start(*device, "^" _region, _offset);
class msx_slot_rom_device : public device_t,
public msx_internal_slot_interface
@@ -24,7 +24,7 @@ public:
virtual DECLARE_READ8_MEMBER(read) override;
private:
- const char *m_region;
+ required_memory_region m_rom_region;
UINT32 m_region_offset;
const UINT8 *m_rom;
};
diff --git a/src/devices/bus/msx_slot/sony08.cpp b/src/devices/bus/msx_slot/sony08.cpp
index 2f48869c291..551f69062a7 100644
--- a/src/devices/bus/msx_slot/sony08.cpp
+++ b/src/devices/bus/msx_slot/sony08.cpp
@@ -17,7 +17,7 @@ msx_slot_sony08_device::msx_slot_sony08_device(const machine_config &mconfig, co
: device_t(mconfig, MSX_SLOT_SONY08, "MSX Internal SONY08", tag, owner, clock, "msx_slot_sony08", __FILE__)
, msx_internal_slot_interface()
, m_nvram(*this, "nvram")
- , m_region(nullptr)
+ , m_rom_region(*this)
, m_region_offset(0)
, m_rom(nullptr)
{
@@ -45,25 +45,17 @@ void msx_slot_sony08_device::set_rom_start(device_t &device, const char *region,
{
msx_slot_sony08_device &dev = downcast<msx_slot_sony08_device &>(device);
- dev.m_region = region;
+ dev.m_rom_region.set_tag(region);
dev.m_region_offset = offset;
}
void msx_slot_sony08_device::device_start()
{
- assert(m_region != nullptr );
-
- memory_region *m_rom_region = owner()->memregion(m_region);
-
// Sanity checks
- if (m_rom_region == nullptr )
- {
- fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region);
- }
if (m_rom_region->bytes() < m_region_offset + 0x100000)
{
- fatalerror("Memory region '%s' is too small for the SONY08 firmware\n", m_region);
+ fatalerror("Memory region '%s' is too small for the SONY08 firmware\n", m_rom_region.finder_tag());
}
m_rom = m_rom_region->base() + m_region_offset;
diff --git a/src/devices/bus/msx_slot/sony08.h b/src/devices/bus/msx_slot/sony08.h
index ebef6145c4f..87b10934511 100644
--- a/src/devices/bus/msx_slot/sony08.h
+++ b/src/devices/bus/msx_slot/sony08.h
@@ -12,7 +12,7 @@ extern const device_type MSX_SLOT_SONY08;
#define MCFG_MSX_SLOT_SONY08_ADD(_tag, _startpage, _numpages, _region, _offset) \
MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_SONY08, _startpage, _numpages) \
- msx_slot_sony08_device::set_rom_start(*device, _region, _offset);
+ msx_slot_sony08_device::set_rom_start(*device, "^" _region, _offset);
class msx_slot_sony08_device : public device_t,
public msx_internal_slot_interface
@@ -33,7 +33,7 @@ public:
private:
required_device<nvram_device> m_nvram;
- const char *m_region;
+ required_memory_region m_rom_region;
UINT32 m_region_offset;
const UINT8 *m_rom;
UINT8 m_selected_bank[8];
diff --git a/src/devices/bus/nubus/nubus.cpp b/src/devices/bus/nubus/nubus.cpp
index 175139f19c2..50206fe1422 100644
--- a/src/devices/bus/nubus/nubus.cpp
+++ b/src/devices/bus/nubus/nubus.cpp
@@ -9,7 +9,6 @@
***************************************************************************/
#include "emu.h"
-#include "emuopts.h"
#include "nubus.h"
@@ -219,7 +218,7 @@ void nubus_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mi
m_maincpu = machine().device<cpu_device>(m_cputag);
address_space &space = m_maincpu->space(AS_PROGRAM);
space.install_readwrite_bank(start, end, mask, mirror, tag );
- machine().root_device().membank(tag)->set_base(data);
+ machine().root_device().membank(siblingtag(tag).c_str())->set_base(data);
}
void nubus_device::set_irq_line(int slot, int state)
diff --git a/src/devices/bus/pc_kbd/pc_kbdc.cpp b/src/devices/bus/pc_kbd/pc_kbdc.cpp
index 9f920c6d5dd..987c51eda63 100644
--- a/src/devices/bus/pc_kbd/pc_kbdc.cpp
+++ b/src/devices/bus/pc_kbd/pc_kbdc.cpp
@@ -14,7 +14,6 @@ The following basic program can be useful for identifying scancodes:
#include "emu.h"
-#include "emuopts.h"
#include "pc_kbdc.h"
diff --git a/src/devices/bus/sms_ctrl/lphaser.cpp b/src/devices/bus/sms_ctrl/lphaser.cpp
index 8a49c9a1554..ccf240d9eec 100644
--- a/src/devices/bus/sms_ctrl/lphaser.cpp
+++ b/src/devices/bus/sms_ctrl/lphaser.cpp
@@ -12,6 +12,13 @@ Release data from the Sega Retro project:
Year: 1989 Country/region: BR Model code: 010470
Year: 198? Country/region: KR Model code: ?
+Notes:
+
+ The Light Phaser gun doesn't work with the Japanese SMS and Sega Mark III.
+ There are reports about Light Phaser working on the second Korean SMS
+ version, and a Korean advert shows support on the first version (Gam*Boy I,
+ although based on Japanese SMS).
+
**********************************************************************/
#include "lphaser.h"
@@ -29,7 +36,7 @@ const device_type SMS_LIGHT_PHASER = &device_creator<sms_light_phaser_device>;
#define LGUN_X_INTERVAL 4
-CUSTOM_INPUT_MEMBER( sms_light_phaser_device::th_pin_r )
+READ_LINE_MEMBER( sms_light_phaser_device::th_pin_r )
{
// The returned value is inverted due to IP_ACTIVE_LOW mapping.
return ~m_sensor_last_state;
@@ -46,7 +53,7 @@ INPUT_CHANGED_MEMBER( sms_light_phaser_device::position_changed )
static INPUT_PORTS_START( sms_light_phaser )
PORT_START("CTRL_PORT")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL (trigger)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_light_phaser_device, th_pin_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER(DEVICE_SELF, sms_light_phaser_device, th_pin_r)
PORT_BIT( 0x9f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("LPHASER_X")
diff --git a/src/devices/bus/sms_ctrl/lphaser.h b/src/devices/bus/sms_ctrl/lphaser.h
index 7d2f9ca1ed6..860b8d4007f 100644
--- a/src/devices/bus/sms_ctrl/lphaser.h
+++ b/src/devices/bus/sms_ctrl/lphaser.h
@@ -34,7 +34,7 @@ public:
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
- DECLARE_CUSTOM_INPUT_MEMBER( th_pin_r );
+ DECLARE_READ_LINE_MEMBER( th_pin_r );
DECLARE_INPUT_CHANGED_MEMBER( position_changed );
protected:
diff --git a/src/devices/bus/sms_ctrl/paddle.cpp b/src/devices/bus/sms_ctrl/paddle.cpp
index f502b9ad196..964a00f5133 100644
--- a/src/devices/bus/sms_ctrl/paddle.cpp
+++ b/src/devices/bus/sms_ctrl/paddle.cpp
@@ -38,7 +38,7 @@ const device_type SMS_PADDLE = &device_creator<sms_paddle_device>;
#define PADDLE_INTERVAL attotime::from_hz(XTAL_53_693175MHz/15/100)
-CUSTOM_INPUT_MEMBER( sms_paddle_device::dir_pins_r )
+CUSTOM_INPUT_MEMBER( sms_paddle_device::rldu_pins_r )
{
UINT8 data = m_paddle_x->read();
@@ -50,7 +50,7 @@ CUSTOM_INPUT_MEMBER( sms_paddle_device::dir_pins_r )
}
-CUSTOM_INPUT_MEMBER( sms_paddle_device::tr_pin_r )
+READ_LINE_MEMBER( sms_paddle_device::tr_pin_r )
{
// The returned value is inverted due to IP_ACTIVE_LOW mapping.
return ~m_read_state;
@@ -59,11 +59,11 @@ CUSTOM_INPUT_MEMBER( sms_paddle_device::tr_pin_r )
static INPUT_PORTS_START( sms_paddle )
PORT_START("CTRL_PORT")
- PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_paddle_device, dir_pins_r, nullptr) // Directional pins
+ PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_paddle_device, rldu_pins_r, nullptr) // R,L,D,U
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // TH
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_paddle_device, tr_pin_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER( DEVICE_SELF, sms_paddle_device, tr_pin_r ) // TR
PORT_START("PADDLE_X") // Paddle knob
PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255)
diff --git a/src/devices/bus/sms_ctrl/paddle.h b/src/devices/bus/sms_ctrl/paddle.h
index fae7a93fb19..968abe1b345 100644
--- a/src/devices/bus/sms_ctrl/paddle.h
+++ b/src/devices/bus/sms_ctrl/paddle.h
@@ -33,8 +33,8 @@ public:
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
- DECLARE_CUSTOM_INPUT_MEMBER( dir_pins_r );
- DECLARE_CUSTOM_INPUT_MEMBER( tr_pin_r );
+ DECLARE_CUSTOM_INPUT_MEMBER( rldu_pins_r ); // Right, Left, Down and Up lines.
+ DECLARE_READ_LINE_MEMBER( tr_pin_r );
protected:
// device-level overrides
diff --git a/src/devices/bus/sms_ctrl/sports.cpp b/src/devices/bus/sms_ctrl/sports.cpp
index b4bd54d81a1..54fa867a8c1 100644
--- a/src/devices/bus/sms_ctrl/sports.cpp
+++ b/src/devices/bus/sms_ctrl/sports.cpp
@@ -82,21 +82,21 @@ void sms_sports_pad_device::device_timer(emu_timer &timer, device_timer_id id, i
}
-CUSTOM_INPUT_MEMBER( sms_sports_pad_device::th_pin_r )
+READ_LINE_MEMBER( sms_sports_pad_device::th_pin_r )
{
- return m_last_data;
+ return m_th_pin_state;
}
-INPUT_CHANGED_MEMBER( sms_sports_pad_device::th_pin_w )
+WRITE_LINE_MEMBER( sms_sports_pad_device::th_pin_w )
{
m_read_state = (m_read_state + 1) & 3;
m_sportspad_timer->adjust(m_interval);
- m_last_data = newval;
+ m_th_pin_state = state;
}
-CUSTOM_INPUT_MEMBER( sms_sports_pad_device::dir_pins_r )
+CUSTOM_INPUT_MEMBER( sms_sports_pad_device::rldu_pins_r )
{
UINT8 data = 0;
@@ -123,17 +123,17 @@ CUSTOM_INPUT_MEMBER( sms_sports_pad_device::dir_pins_r )
static INPUT_PORTS_START( sms_sports_pad )
PORT_START("SPORTS_IN")
- PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_device, dir_pins_r, nullptr) // Directional pins
+ PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_device, rldu_pins_r, nullptr) // R,L,D,U
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL (Button 1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_r) // TH
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) // TR (Button 2)
PORT_START("SPORTS_OUT")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) // Directional pins
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // TL (Button 1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_CHANGED_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_w, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_w) // TH
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) // TR (Button 2)
PORT_START("SPORTS_X") /* Sports Pad X axis */
@@ -171,7 +171,7 @@ sms_sports_pad_device::sms_sports_pad_device(const machine_config &mconfig, cons
m_sports_x(*this, "SPORTS_X"),
m_sports_y(*this, "SPORTS_Y"),
m_read_state(0),
- m_last_data(0),
+ m_th_pin_state(0),
m_x_axis_reset_value(0x80), // value 0x80 helps when start playing paddle games.
m_y_axis_reset_value(0x80),
m_interval(SPORTS_PAD_INTERVAL), m_sportspad_timer(nullptr)
@@ -188,7 +188,7 @@ void sms_sports_pad_device::device_start()
m_sportspad_timer = timer_alloc(TIMER_SPORTSPAD);
save_item(NAME(m_read_state));
- save_item(NAME(m_last_data));
+ save_item(NAME(m_th_pin_state));
save_item(NAME(m_x_axis_reset_value));
save_item(NAME(m_y_axis_reset_value));
}
diff --git a/src/devices/bus/sms_ctrl/sports.h b/src/devices/bus/sms_ctrl/sports.h
index fe98c9e5e70..5ca209e748d 100644
--- a/src/devices/bus/sms_ctrl/sports.h
+++ b/src/devices/bus/sms_ctrl/sports.h
@@ -33,9 +33,9 @@ public:
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
- DECLARE_CUSTOM_INPUT_MEMBER( dir_pins_r );
- DECLARE_CUSTOM_INPUT_MEMBER( th_pin_r );
- DECLARE_INPUT_CHANGED_MEMBER( th_pin_w );
+ DECLARE_CUSTOM_INPUT_MEMBER( rldu_pins_r ); // Right, Left, Down and Up lines.
+ DECLARE_READ_LINE_MEMBER( th_pin_r );
+ DECLARE_WRITE_LINE_MEMBER( th_pin_w );
protected:
// device-level overrides
@@ -52,7 +52,7 @@ private:
required_ioport m_sports_y;
UINT8 m_read_state;
- UINT8 m_last_data;
+ UINT8 m_th_pin_state;
UINT8 m_x_axis_reset_value;
UINT8 m_y_axis_reset_value;
const attotime m_interval;
diff --git a/src/devices/bus/sms_ctrl/sportsjp.cpp b/src/devices/bus/sms_ctrl/sportsjp.cpp
index fef04df69e8..e9b148c19e9 100644
--- a/src/devices/bus/sms_ctrl/sportsjp.cpp
+++ b/src/devices/bus/sms_ctrl/sportsjp.cpp
@@ -22,6 +22,13 @@ Notes:
used by the US model, due to the missing TH line on Sega Mark III
controller ports.
+ A bug was discovered in the player 2 input handling code of the only known
+ good ROM dump of Sports Pad Soccer (JP):
+ size="131072" crc="41c948bf" sha1="7634ce39e87049dad1ee4f32a80d728e4bd1f81f"
+ At address $12D1, instead read the upper 2 bits of port $DC and lower 2 bits
+ of port $DD (to obtain the lower nibble of the current axis for player 2),
+ the code wrongly reads the lower nibble of port $DC, that is player 1 data.
+
**********************************************************************/
#include "sportsjp.h"
@@ -39,38 +46,24 @@ const device_type SMS_SPORTS_PAD_JP = &device_creator<sms_sports_pad_jp_device>;
-DECLARE_CUSTOM_INPUT_MEMBER( sms_sports_pad_jp_device::dir_pins_r )
-{
- UINT8 data = 0;
-
- switch (m_read_state)
- {
- case 0:
- data = m_sports_jp_x->read() >> 4;
- break;
- case 1:
- data = m_sports_jp_x->read();
- break;
- case 2:
- data = m_sports_jp_y->read() >> 4;
- break;
- case 3:
- data = m_sports_jp_y->read();
- break;
- }
-
- // The returned value is inverted due to IP_ACTIVE_LOW mapping.
- return ~(data & 0x0f);
-}
+// The returned value is inverted due to IP_ACTIVE_LOW mapping.
+READ_LINE_MEMBER( sms_sports_pad_jp_device::tl_pin_r ) { return ~m_tl_pin_state; }
+READ_LINE_MEMBER( sms_sports_pad_jp_device::tr_pin_r ) { return ~m_tr_pin_state; }
+CUSTOM_INPUT_MEMBER( sms_sports_pad_jp_device::rldu_pins_r ) { return ~(m_rldu_pins_state & 0x0f); }
static INPUT_PORTS_START( sms_sports_pad_jp )
PORT_START("SPORTS_JP_IN")
- PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_jp_device, dir_pins_r, nullptr) // Directional pins
+ PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_jp_device, rldu_pins_r, nullptr) // R,L,D,U
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL (Button 1)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER( DEVICE_SELF, sms_sports_pad_jp_device, tl_pin_r ) // TL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // TH
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) // TR (Button 2)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER( DEVICE_SELF, sms_sports_pad_jp_device, tr_pin_r ) // TR
+
+ PORT_START("SPORTS_JP_BT") /* Sports Pad buttons nibble */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SPORTS_JP_X") /* Sports Pad X axis */
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40)
@@ -103,9 +96,12 @@ sms_sports_pad_jp_device::sms_sports_pad_jp_device(const machine_config &mconfig
device_t(mconfig, SMS_SPORTS_PAD_JP, "Sega SMS Sports Pad JP", tag, owner, clock, "sms_sports_pad_jp", __FILE__),
device_sms_control_port_interface(mconfig, *this),
m_sports_jp_in(*this, "SPORTS_JP_IN"),
+ m_sports_jp_bt(*this, "SPORTS_JP_BT"),
m_sports_jp_x(*this, "SPORTS_JP_X"),
m_sports_jp_y(*this, "SPORTS_JP_Y"),
- m_read_state(0),
+ m_rldu_pins_state(0x0f),
+ m_tl_pin_state(1),
+ m_tr_pin_state(1),
m_interval(SPORTS_PAD_JP_INTERVAL)
{
}
@@ -120,7 +116,9 @@ void sms_sports_pad_jp_device::device_start()
m_start_time = machine().time();
save_item(NAME(m_start_time));
- save_item(NAME(m_read_state));
+ save_item(NAME(m_rldu_pins_state));
+ save_item(NAME(m_tl_pin_state));
+ save_item(NAME(m_tr_pin_state));
}
@@ -130,41 +128,41 @@ void sms_sports_pad_jp_device::device_start()
UINT8 sms_sports_pad_jp_device::peripheral_r()
{
- UINT8 data;
int num_intervals = (machine().time() - m_start_time).as_double() / m_interval.as_double();
- m_read_state = num_intervals % 5;
-
- data = m_sports_jp_in->read();
- switch (m_read_state)
+ switch (num_intervals % 5)
{
case 0:
// X high nibble
- data &= ~0x20; // TL 0
- data &= ~0x80; // TR 0
+ m_rldu_pins_state = m_sports_jp_x->read() >> 4;
+ m_tl_pin_state = 0;
+ m_tr_pin_state = 0;
break;
case 1:
// X low nibble
- data |= 0x20; // TL 1
- data &= ~0x80; // TR 0
+ m_rldu_pins_state = m_sports_jp_x->read();
+ m_tl_pin_state = 1;
+ m_tr_pin_state = 0;
break;
case 2:
// Y high nibble
- data &= ~0x20; // TL 0
- data &= ~0x80; // TR 0
+ m_rldu_pins_state = m_sports_jp_y->read() >> 4;
+ m_tl_pin_state = 0;
+ m_tr_pin_state = 0;
break;
case 3:
// Y low nibble
- data |= 0x20; // TL 1
- data &= ~0x80; // TR 0
+ m_rldu_pins_state = m_sports_jp_y->read();
+ m_tl_pin_state = 1;
+ m_tr_pin_state = 0;
break;
case 4:
// buttons 1 and 2
- data = (data & 0x20) >> 5 | (data & 0x80) >> 6 | 0xfc;
- data |= 0x20; // TL 1
- data |= 0x80; // TR 1
+ m_rldu_pins_state = m_sports_jp_bt->read();
+ m_tl_pin_state = 1;
+ m_tr_pin_state = 1;
break;
}
- return data;
+ return m_sports_jp_in->read();
}
diff --git a/src/devices/bus/sms_ctrl/sportsjp.h b/src/devices/bus/sms_ctrl/sportsjp.h
index ad438d12bb1..3e82c18dd85 100644
--- a/src/devices/bus/sms_ctrl/sportsjp.h
+++ b/src/devices/bus/sms_ctrl/sportsjp.h
@@ -33,7 +33,9 @@ public:
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
- CUSTOM_INPUT_MEMBER( dir_pins_r );
+ DECLARE_CUSTOM_INPUT_MEMBER( rldu_pins_r ); // Right, Left, Down and Up lines.
+ DECLARE_READ_LINE_MEMBER( tl_pin_r );
+ DECLARE_READ_LINE_MEMBER( tr_pin_r );
protected:
// device-level overrides
@@ -44,10 +46,13 @@ protected:
private:
required_ioport m_sports_jp_in;
+ required_ioport m_sports_jp_bt;
required_ioport m_sports_jp_x;
required_ioport m_sports_jp_y;
- UINT8 m_read_state;
+ UINT8 m_rldu_pins_state;
+ UINT8 m_tl_pin_state;
+ UINT8 m_tr_pin_state;
attotime m_start_time;
const attotime m_interval;
};
diff --git a/src/devices/bus/snes_ctrl/joypad.h b/src/devices/bus/snes_ctrl/joypad.h
index 8daa922f20a..7ba3ea3e514 100644
--- a/src/devices/bus/snes_ctrl/joypad.h
+++ b/src/devices/bus/snes_ctrl/joypad.h
@@ -36,7 +36,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- // device_sms_control_port_interface overrides
+ // device_snes_control_port_interface overrides
virtual UINT8 read_pin4() override;
virtual void write_strobe(UINT8 data) override;
virtual void port_poll() override;
diff --git a/src/devices/bus/snes_ctrl/mouse.h b/src/devices/bus/snes_ctrl/mouse.h
index 53602b96be3..39daae165d2 100644
--- a/src/devices/bus/snes_ctrl/mouse.h
+++ b/src/devices/bus/snes_ctrl/mouse.h
@@ -36,7 +36,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- // device_sms_control_port_interface overrides
+ // device_snes_control_port_interface overrides
virtual UINT8 read_pin4() override;
virtual void write_strobe(UINT8 data) override;
virtual void port_poll() override;
diff --git a/src/devices/bus/snes_ctrl/multitap.h b/src/devices/bus/snes_ctrl/multitap.h
index e978a9d13ca..edc6ee110dc 100644
--- a/src/devices/bus/snes_ctrl/multitap.h
+++ b/src/devices/bus/snes_ctrl/multitap.h
@@ -37,7 +37,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- // device_sms_control_port_interface overrides
+ // device_snes_control_port_interface overrides
virtual UINT8 read_pin4() override;
virtual UINT8 read_pin5() override;
virtual void write_strobe(UINT8 data) override;
diff --git a/src/devices/bus/snes_ctrl/pachinko.h b/src/devices/bus/snes_ctrl/pachinko.h
index 149d5775157..d340a1c8689 100644
--- a/src/devices/bus/snes_ctrl/pachinko.h
+++ b/src/devices/bus/snes_ctrl/pachinko.h
@@ -36,7 +36,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- // device_sms_control_port_interface overrides
+ // device_snes_control_port_interface overrides
virtual UINT8 read_pin4() override;
virtual void write_strobe(UINT8 data) override;
virtual void port_poll() override;
diff --git a/src/devices/bus/snes_ctrl/sscope.h b/src/devices/bus/snes_ctrl/sscope.h
index 064ee0c941d..d625bc237ea 100644
--- a/src/devices/bus/snes_ctrl/sscope.h
+++ b/src/devices/bus/snes_ctrl/sscope.h
@@ -36,7 +36,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- // device_sms_control_port_interface overrides
+ // device_snes_control_port_interface overrides
virtual UINT8 read_pin4() override;
virtual void write_strobe(UINT8 data) override;
virtual void port_poll() override;
diff --git a/src/devices/bus/snes_ctrl/twintap.h b/src/devices/bus/snes_ctrl/twintap.h
index 5adf0bf1cc1..085a9ead09c 100644
--- a/src/devices/bus/snes_ctrl/twintap.h
+++ b/src/devices/bus/snes_ctrl/twintap.h
@@ -36,7 +36,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- // device_sms_control_port_interface overrides
+ // device_snes_control_port_interface overrides
virtual UINT8 read_pin4() override;
virtual void write_strobe(UINT8 data) override;
virtual void port_poll() override;
diff --git a/src/devices/bus/ti99_peb/pcode.cpp b/src/devices/bus/ti99_peb/pcode.cpp
index 57ee6462874..ff0d9b4c9d5 100644
--- a/src/devices/bus/ti99_peb/pcode.cpp
+++ b/src/devices/bus/ti99_peb/pcode.cpp
@@ -92,43 +92,87 @@
#define ACTIVE_TAG "ACTIVE"
-#define LOG logerror
-#define VERBOSE 1
+#define TRACE_ROM 0
+#define TRACE_GROM 0
+#define TRACE_CRU 0
+#define TRACE_SWITCH 0
ti_pcode_card_device::ti_pcode_card_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
-: ti_expansion_card_device(mconfig, TI99_P_CODE, "TI-99 P-Code Card", tag, owner, clock, "ti99_pcode", __FILE__), m_rom(nullptr), m_bank_select(0), m_switch(false)
+: ti_expansion_card_device(mconfig, TI99_P_CODE, "TI-99 P-Code Card", tag, owner, clock, "ti99_pcode", __FILE__),
+ m_rom(nullptr),
+ m_bank_select(0),
+ m_active(false),
+ m_clock_count(0),
+ m_clockhigh(false),
+ m_inDsrArea(false),
+ m_isrom0(false),
+ m_isrom12(false),
+ m_isgrom(false),
+ m_address(0)
{
}
+SETADDRESS_DBIN_MEMBER( ti_pcode_card_device::setaddress_dbin )
+{
+ // Do not allow setaddress for the debugger. It will mess up the
+ // setaddress/memory access pairs when the CPU enters wait states.
+ if (space.debugger_access()) return;
+
+ m_address = offset;
+ m_inDsrArea = ((m_address & m_select_mask)==m_select_value);
+
+ line_state a14 = ((m_address & 2)!=0)? ASSERT_LINE : CLEAR_LINE;
+
+ m_isrom0 = ((m_address & 0xf000)==0x4000);
+ m_isrom12 = ((m_address & 0xf000)==0x5000);
+
+ // Valid access (GROM write with DBIN=0 or read with DBIN=1)
+ bool validaccess = (state==CLEAR_LINE || (m_address & 0x0400)==0);
+
+ // GROM access 0101 1011 1111 1100
+ m_isgrom = ((m_address & 0xfbfd)==0x5bfc) && validaccess;
+
+ if (validaccess)
+ {
+ int lines = (state==ASSERT_LINE)? 1 : 0;
+ if (a14==ASSERT_LINE) lines |= 2;
+ line_state select = m_isgrom? ASSERT_LINE : CLEAR_LINE;
+
+ // always deliver to GROM so that the select line may be cleared
+ for (int i=0; i < 8; i++)
+ m_grom[i]->set_lines(space, lines, select);
+ }
+}
+
READ8Z_MEMBER( ti_pcode_card_device::readz )
{
- if (m_switch && m_selected && ((offset & m_select_mask)==m_select_value))
+ if (m_active && m_inDsrArea && m_selected)
{
- // GROM access
- if ((offset & GROMMASK)==GROMREAD)
+ if (m_isrom0)
{
- for (auto & elem : m_grom) elem->readz(space, offset, value, mem_mask);
- if (VERBOSE>5) LOG("ti99_pcode: read from grom %04x: %02x\n", offset&0xffff, *value);
+ *value = m_rom[m_address & 0x0fff];
+ if (TRACE_ROM) logerror("Read from rom %04x: %02x\n", offset&0xffff, *value);
}
else
{
- if ((offset & 0x1000) == 0x0000)
+ if (m_isgrom)
{
- /* Accesses ROM 4732 (4K) */
- // 0000 xxxx xxxx xxxx
- *value = m_rom[offset & 0x0fff];
- if (VERBOSE>5) LOG("ti99_pcode: read from rom %04x: %02x\n", offset&0xffff, *value);
+ for (auto& elem : m_grom) elem->readz(space, m_address, value);
+ if (TRACE_GROM) logerror("Read from grom %04x: %02x\n", m_address&0xffff, *value);
}
else
{
- // Accesses ROM 4764 (2*4K)
- // We have two banks here which are activated according
- // to the setting of CRU bit 4
- // Bank 0 is the ROM above
- // 0001 xxxx xxxx xxxx Bank 1
- // 0010 xxxx xxxx xxxx Bank 2
- *value = m_rom[(m_bank_select<<12) | (offset & 0x0fff)];
- if (VERBOSE>5) LOG("ti99_pcode: read from rom %04x (%02x): %02x\n", offset&0xffff, m_bank_select, *value);
+ if (m_isrom12)
+ {
+ // Accesses ROM 4764 (2*4K)
+ // We have two banks here which are activated according
+ // to the setting of CRU bit 4
+ // Bank 0 is the ROM above
+ // 0001 xxxx xxxx xxxx Bank 1
+ // 0010 xxxx xxxx xxxx Bank 2
+ *value = m_rom[(m_bank_select<<12) | (m_address & 0x0fff)];
+ if (TRACE_ROM) logerror("Read from rom %04x (%02x): %02x\n", m_address&0xffff, m_bank_select, *value);
+ }
}
}
}
@@ -140,28 +184,14 @@ READ8Z_MEMBER( ti_pcode_card_device::readz )
*/
WRITE8_MEMBER( ti_pcode_card_device::write )
{
- if (m_switch && m_selected)
+ if (m_active && m_isgrom && m_selected)
{
- if ((offset & m_select_mask)==m_select_value)
- {
- if (VERBOSE>5) LOG("ti99_pcode: write to address %04x: %02x\n", offset & 0xffff, data);
- // 0101 1111 1111 11x0
- if ((offset & GROMMASK) == GROMWRITE)
- {
- for (auto & elem : m_grom) elem->write(space, offset, data, mem_mask);
- }
- }
+ for (auto & elem : m_grom) elem->write(space, m_address, data);
}
}
/*
Common READY* line from the GROMs.
- At this time we do not emulate GROM READY* since the CPU emulation does
- not yet process READY*. If it did, however, we would have to do a similar
- handling as in peribox (with INTA*): The common READY* line is a logical
- AND of all single READY lines. If any GROM pulls it down, the line goes
- down, and only if all GROMs release it, it pulls up again. We should think
- about a general solution.
*/
WRITE_LINE_MEMBER( ti_pcode_card_device::ready_line )
{
@@ -169,6 +199,22 @@ WRITE_LINE_MEMBER( ti_pcode_card_device::ready_line )
}
/*
+ CLKOUT line from the CPU. This line is divided by 8 to generate a 375 Khz
+ clock input for the GROMs, which are thus running at a lower rate than
+ those in the console driven by the VDP (477 kHz).
+*/
+WRITE_LINE_MEMBER( ti_pcode_card_device::clock_in)
+{
+ m_clock_count = (m_clock_count+1) & 0x03; // four pulses high, four pulses low
+ if (m_clock_count==0)
+ {
+ // Toggle
+ m_clockhigh = !m_clockhigh;
+ for (auto & elem : m_grom) elem->gclock_in(m_clockhigh? ASSERT_LINE : CLEAR_LINE);
+ }
+}
+
+/*
CRU read handler. The P-Code card does not offer CRU read lines, so
we just ignore any request. (Note that CRU lines are not like memory; you
may be able to write to them, but not necessarily read them again.)
@@ -198,55 +244,22 @@ WRITE8_MEMBER(ti_pcode_card_device::cruwrite)
if (addr==0x80) // Bit 4 is on address line 8
{
m_bank_select = (data+1); // we're calling this bank 1 and bank 2
- if (VERBOSE>5) LOG("ti99_pcode: select rom bank %d\n", m_bank_select);
+ if (TRACE_CRU) logerror("Select rom bank %d\n", m_bank_select);
}
}
}
-static GROM_CONFIG(pgrom0_config)
-{
- false, 0, PCODE_GROM_TAG, 0x0000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(pgrom1_config)
-{
- false, 1, PCODE_GROM_TAG, 0x2000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(pgrom2_config)
-{
- false, 2, PCODE_GROM_TAG, 0x4000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(pgrom3_config)
-{
- false, 3, PCODE_GROM_TAG, 0x6000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(pgrom4_config)
-{
- false, 4, PCODE_GROM_TAG, 0x8000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(pgrom5_config)
-{
- false, 5, PCODE_GROM_TAG, 0xa000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(pgrom6_config)
-{
- false, 6, PCODE_GROM_TAG, 0xc000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(pgrom7_config)
-{
- false, 7, PCODE_GROM_TAG, 0xe000, 0x1800, GROMFREQ
-};
-
void ti_pcode_card_device::device_start()
{
m_cru_base = 0x1f00;
- m_grom[0] = static_cast<ti99_grom_device*>(subdevice(PGROM0_TAG));
- m_grom[1] = static_cast<ti99_grom_device*>(subdevice(PGROM1_TAG));
- m_grom[2] = static_cast<ti99_grom_device*>(subdevice(PGROM2_TAG));
- m_grom[3] = static_cast<ti99_grom_device*>(subdevice(PGROM3_TAG));
- m_grom[4] = static_cast<ti99_grom_device*>(subdevice(PGROM4_TAG));
- m_grom[5] = static_cast<ti99_grom_device*>(subdevice(PGROM5_TAG));
- m_grom[6] = static_cast<ti99_grom_device*>(subdevice(PGROM6_TAG));
- m_grom[7] = static_cast<ti99_grom_device*>(subdevice(PGROM7_TAG));
+ m_grom[0] = downcast<tmc0430_device*>(subdevice(PGROM0_TAG));
+ m_grom[1] = downcast<tmc0430_device*>(subdevice(PGROM1_TAG));
+ m_grom[2] = downcast<tmc0430_device*>(subdevice(PGROM2_TAG));
+ m_grom[3] = downcast<tmc0430_device*>(subdevice(PGROM3_TAG));
+ m_grom[4] = downcast<tmc0430_device*>(subdevice(PGROM4_TAG));
+ m_grom[5] = downcast<tmc0430_device*>(subdevice(PGROM5_TAG));
+ m_grom[6] = downcast<tmc0430_device*>(subdevice(PGROM6_TAG));
+ m_grom[7] = downcast<tmc0430_device*>(subdevice(PGROM7_TAG));
m_rom = memregion(PCODE_ROM_TAG)->base();
}
@@ -264,8 +277,15 @@ void ti_pcode_card_device::device_reset()
}
m_bank_select = 1;
m_selected = false;
+ m_clock_count = 0;
+ m_clockhigh = false;
+
+ m_active = ioport(ACTIVE_TAG)->read();
- m_switch = ioport(ACTIVE_TAG)->read();
+ m_isrom0 = false;
+ m_isrom12 = false;
+ m_isgrom = false;
+ m_address = 0;
}
void ti_pcode_card_device::device_config_complete()
@@ -274,28 +294,20 @@ void ti_pcode_card_device::device_config_complete()
INPUT_CHANGED_MEMBER( ti_pcode_card_device::switch_changed )
{
- if (VERBOSE>7) LOG("ti_pcode_card_device: switch changed to %d\n", newval);
- m_switch = (newval != 0);
+ if (TRACE_SWITCH) logerror("Switch changed to %d\n", newval);
+ m_active = (newval != 0);
}
MACHINE_CONFIG_FRAGMENT( ti99_pcode )
- MCFG_GROM_ADD( PGROM0_TAG, pgrom0_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti_pcode_card_device, ready_line))
- MCFG_GROM_ADD( PGROM1_TAG, pgrom1_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti_pcode_card_device, ready_line))
- MCFG_GROM_ADD( PGROM2_TAG, pgrom2_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti_pcode_card_device, ready_line))
- MCFG_GROM_ADD( PGROM3_TAG, pgrom3_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti_pcode_card_device, ready_line))
- MCFG_GROM_ADD( PGROM4_TAG, pgrom4_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti_pcode_card_device, ready_line))
- MCFG_GROM_ADD( PGROM5_TAG, pgrom5_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti_pcode_card_device, ready_line))
- MCFG_GROM_ADD( PGROM6_TAG, pgrom6_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti_pcode_card_device, ready_line))
- MCFG_GROM_ADD( PGROM7_TAG, pgrom7_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti_pcode_card_device, ready_line))
+ MCFG_GROM_ADD( PGROM0_TAG, 0, PCODE_GROM_TAG, 0x0000, WRITELINE(ti_pcode_card_device, ready_line))
+ MCFG_GROM_ADD( PGROM1_TAG, 1, PCODE_GROM_TAG, 0x2000, WRITELINE(ti_pcode_card_device, ready_line))
+ MCFG_GROM_ADD( PGROM2_TAG, 2, PCODE_GROM_TAG, 0x4000, WRITELINE(ti_pcode_card_device, ready_line))
+ MCFG_GROM_ADD( PGROM3_TAG, 3, PCODE_GROM_TAG, 0x6000, WRITELINE(ti_pcode_card_device, ready_line))
+ MCFG_GROM_ADD( PGROM4_TAG, 4, PCODE_GROM_TAG, 0x8000, WRITELINE(ti_pcode_card_device, ready_line))
+ MCFG_GROM_ADD( PGROM5_TAG, 5, PCODE_GROM_TAG, 0xa000, WRITELINE(ti_pcode_card_device, ready_line))
+ MCFG_GROM_ADD( PGROM6_TAG, 6, PCODE_GROM_TAG, 0xc000, WRITELINE(ti_pcode_card_device, ready_line))
+ MCFG_GROM_ADD( PGROM7_TAG, 7, PCODE_GROM_TAG, 0xe000, WRITELINE(ti_pcode_card_device, ready_line))
MACHINE_CONFIG_END
INPUT_PORTS_START( ti99_pcode )
diff --git a/src/devices/bus/ti99_peb/pcode.h b/src/devices/bus/ti99_peb/pcode.h
index c2a81a1395c..71664682261 100644
--- a/src/devices/bus/ti99_peb/pcode.h
+++ b/src/devices/bus/ti99_peb/pcode.h
@@ -17,7 +17,7 @@
#include "emu.h"
#include "peribox.h"
-#include "bus/ti99x/grom.h"
+#include "machine/tmc0430.h"
extern const device_type TI99_P_CODE;
@@ -29,6 +29,9 @@ public:
DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
DECLARE_WRITE8_MEMBER(cruwrite) override;
+ DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin) override;
+
+ DECLARE_WRITE_LINE_MEMBER(clock_in) override;
DECLARE_WRITE_LINE_MEMBER( ready_line );
DECLARE_INPUT_CHANGED_MEMBER( switch_changed );
@@ -42,10 +45,22 @@ protected:
virtual ioport_constructor device_input_ports() const override;
private:
- ti99_grom_device* m_grom[8];
+ tmc0430_device* m_grom[8];
UINT8* m_rom;
int m_bank_select;
- bool m_switch;
+ bool m_active;
+ int m_clock_count;
+ bool m_clockhigh;
+
+ // Address in card area
+ bool m_inDsrArea;
+
+ bool m_isrom0;
+ bool m_isrom12;
+ bool m_isgrom;
+
+ // Recent address
+ int m_address;
};
#endif
diff --git a/src/devices/bus/ti99_peb/peribox.cpp b/src/devices/bus/ti99_peb/peribox.cpp
index a89f86d13ef..52274505533 100644
--- a/src/devices/bus/ti99_peb/peribox.cpp
+++ b/src/devices/bus/ti99_peb/peribox.cpp
@@ -259,7 +259,7 @@ WRITE8_MEMBER(peribox_device::write)
SETADDRESS_DBIN_MEMBER(peribox_device::setaddress_dbin)
{
// Ignore the address when the TI-99/8 transmits the high-order 8 bits
- // if (!m_memen) return;
+ if (!m_memen) return;
for (int i=2; i <= 8; i++)
{
diff --git a/src/devices/bus/ti99_peb/spchsyn.cpp b/src/devices/bus/ti99_peb/spchsyn.cpp
index 1fb447f6d17..76c94cc7842 100644
--- a/src/devices/bus/ti99_peb/spchsyn.cpp
+++ b/src/devices/bus/ti99_peb/spchsyn.cpp
@@ -25,15 +25,15 @@
#include "sound/wave.h"
#include "machine/spchrom.h"
-#define TMS5220_ADDRESS_MASK 0x3FFFFUL /* 18-bit mask for tms5220 address */
-
-#define VERBOSE 1
-#define LOG logerror
+#define TRACE_MEM 0
+#define TRACE_ADDR 0
+#define TRACE_READY 0
/****************************************************************************/
ti_speech_synthesizer_device::ti_speech_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
-: ti_expansion_card_device(mconfig, TI99_SPEECH, "TI-99 Speech synthesizer (on adapter card)", tag, owner, clock, "ti99_speech", __FILE__), m_vsp(nullptr), m_read_mode(false)
+: ti_expansion_card_device(mconfig, TI99_SPEECH, "TI-99 Speech synthesizer (on adapter card)", tag, owner, clock, "ti99_speech", __FILE__),
+ m_vsp(nullptr), m_reading(false), m_sbe(false)
{
}
@@ -45,16 +45,15 @@ READ8Z_MEMBER( ti_speech_synthesizer_device::readz )
{
if (space.debugger_access()) return;
- if ((offset & m_select_mask)==m_select_value)
+ if (m_sbe)
{
- *value = m_vsp->status_r(space, offset, 0xff) & 0xff;
- if (VERBOSE>4) LOG("spchsyn: read value = %02x\n", *value);
+ *value = m_vsp->status_r(space, 0, 0xff) & 0xff;
+ if (TRACE_MEM) logerror("read value = %02x\n", *value);
// We should clear the lines at this point. The TI-99/4A clears the
// lines by setting the address bus to a different value, but the
// Geneve may behave differently. This may not 100% reflect the real
// situation, but it ensures a safe processing.
- m_vsp->rsq_w(TRUE);
- m_vsp->wsq_w(TRUE);
+ m_vsp->combined_rsq_wsq_w(space, 0, ~0);
}
}
@@ -65,10 +64,10 @@ WRITE8_MEMBER( ti_speech_synthesizer_device::write )
{
if (space.debugger_access()) return;
- if ((offset & m_select_mask)==(m_select_value | 0x0400))
+ if (m_sbe)
{
- if (VERBOSE>4) LOG("spchsyn: write value = %02x\n", data);
- m_vsp->data_w(space, offset, data);
+ if (TRACE_MEM) logerror("write value = %02x\n", data);
+ m_vsp->data_w(space, 0, data);
// Note that we must NOT clear the lines here. Find the lines in the
// READY callback below.
}
@@ -76,41 +75,29 @@ WRITE8_MEMBER( ti_speech_synthesizer_device::write )
SETADDRESS_DBIN_MEMBER( ti_speech_synthesizer_device::setaddress_dbin )
{
- if ((offset & m_select_mask & ~0x0400)==m_select_value)
+ // 1001 00xx xxxx xxx0 DBIN=1
+ // 1001 01xx xxxx xxx0 DBIN=0
+ // 1111 1000 0000 0001 mask
+ m_space = &space;
+ m_reading = (state==ASSERT_LINE);
+
+ bool valid = (((offset & 0x0400)==0) == m_reading);
+ m_sbe = ((offset & m_select_mask)==m_select_value) && valid;
+
+ if (m_sbe)
{
- if (VERBOSE>4) LOG("spchsyn: set address = %04x, dbin = %d\n", offset, state);
- m_read_mode = (state==ASSERT_LINE);
- bool readop = (offset & 0x0400)==0;
-
- if (m_read_mode != readop)
- {
- // reset all; this is not a valid access
- m_vsp->rsq_w(TRUE);
- m_vsp->wsq_w(TRUE);
- }
- else
- {
- if (readop)
- {
- // Caution: We MUST first clear (TRUE) one line to avoid
- // both RS* and WS* be asserted (otherwise tms5220 will report "illegal")
- m_vsp->wsq_w(TRUE);
- m_vsp->rsq_w(FALSE);
- }
- else
- {
- m_vsp->rsq_w(TRUE);
- m_vsp->wsq_w(FALSE);
- }
- }
+ if (TRACE_ADDR) logerror("set address = %04x, dbin = %d\n", offset, state);
+
+ // Caution: In the current tms5220 emulation, care must be taken
+ // to clear one line before asserting the other line, or otherwise
+ // both RS* and WS* are active, which is illegal.
+ // Alternatively, we'll use the combined settings method
+
+ m_vsp->combined_rsq_wsq_w(space, 0, m_reading? ~RS : ~WS);
}
else
- {
// If other address, turn off RS* and WS* (negative logic!)
- m_vsp->rsq_w(TRUE);
- m_vsp->wsq_w(TRUE);
- return;
- }
+ m_vsp->combined_rsq_wsq_w(space, 0, ~0);
}
/****************************************************************************/
@@ -121,40 +108,41 @@ WRITE_LINE_MEMBER( ti_speech_synthesizer_device::speech_ready )
// and we have to adapt a /READY to a READY line.
// The real synthesizer board uses a transistor for that purpose.
m_slot->set_ready((state==0)? ASSERT_LINE : CLEAR_LINE);
- if (VERBOSE>5) LOG("spchsyn: READY = %d\n", (state==0));
+ if (TRACE_READY) logerror("READY = %d\n", (state==0));
- if ((state==0) && !m_read_mode)
- {
+ if ((state==0) && !m_reading)
// Clear the lines only when we are done with writing.
- m_vsp->rsq_w(TRUE);
- m_vsp->wsq_w(TRUE);
- }
+ m_vsp->combined_rsq_wsq_w(*m_space, 0, ~0);
}
void ti_speech_synthesizer_device::device_start()
{
- m_read_mode = false;
}
void ti_speech_synthesizer_device::device_config_complete()
{
m_vsp = subdevice<cd2501e_device>("speechsyn");
+
+ // Need to configure the speech ROM for inverse bit order
+ speechrom_device* mem = subdevice<speechrom_device>("vsm");
+ mem->set_reverse_bit_order(true);
}
void ti_speech_synthesizer_device::device_reset()
{
- if (VERBOSE>5) LOG("spchsyn: reset\n");
if (m_genmod)
{
- m_select_mask = 0x1ffc01;
+ m_select_mask = 0x1ff801;
m_select_value = 0x179000;
}
else
{
- m_select_mask = 0x7fc01;
+ m_select_mask = 0x7f801;
m_select_value = 0x79000;
}
- m_read_mode = false;
+
+ m_reading = false;
+ m_sbe = false;
}
MACHINE_CONFIG_FRAGMENT( ti99_speech )
@@ -169,11 +157,8 @@ MACHINE_CONFIG_END
ROM_START( ti99_speech )
ROM_REGION(0x8000, "vsm", 0)
- // Note: the following line is actually wrong; the speech roms in the ti 99/4a and 99/8 are two VSM roms labeled CD2325A and CD2326A, and contain the same data as the following line rom does, but with the byte bit order reversed. This bit ordering issue needs to be fixed elsewhere in the code here before the original/real roms can be used.
- ROM_LOAD_OPTIONAL("spchrom.bin", 0x0000, 0x8000, CRC(58b155f7) SHA1(382292295c00dff348d7e17c5ce4da12a1d87763)) /* system speech ROM */
- // correct lines are:
- // ROM_LOAD_OPTIONAL("cd2325a.u2a", 0x0000, 0x4000, CRC(1f58b571) SHA1(0ef4f178716b575a1c0c970c56af8a8d97561ffe)) // at location u2, bottom of stack
- // ROM_LOAD_OPTIONAL("cd2326a.u2b", 0x4000, 0x4000, CRC(65d00401) SHA1(a367242c2c96cebf0e2bf21862f3f6734b2b3020)) // at location u2, top of stack
+ ROM_LOAD("cd2325a.u2a", 0x0000, 0x4000, CRC(1f58b571) SHA1(0ef4f178716b575a1c0c970c56af8a8d97561ffe)) // at location u2, bottom of stack
+ ROM_LOAD("cd2326a.u2b", 0x4000, 0x4000, CRC(65d00401) SHA1(a367242c2c96cebf0e2bf21862f3f6734b2b3020)) // at location u2, top of stack
ROM_END
machine_config_constructor ti_speech_synthesizer_device::device_mconfig_additions() const
diff --git a/src/devices/bus/ti99_peb/spchsyn.h b/src/devices/bus/ti99_peb/spchsyn.h
index 44e7aca54c4..e5c8d19f49b 100644
--- a/src/devices/bus/ti99_peb/spchsyn.h
+++ b/src/devices/bus/ti99_peb/spchsyn.h
@@ -40,8 +40,10 @@ protected:
virtual void device_config_complete() override;
private:
- cd2501e_device *m_vsp;
- bool m_read_mode;
+ address_space* m_space;
+ cd2501e_device* m_vsp;
+ bool m_reading;
+ bool m_sbe; // Signal "Speech block enable"
};
#endif
diff --git a/src/devices/bus/ti99x/998board.cpp b/src/devices/bus/ti99x/998board.cpp
index 0d1f081ed1b..89d7224fc98 100644
--- a/src/devices/bus/ti99x/998board.cpp
+++ b/src/devices/bus/ti99x/998board.cpp
@@ -14,71 +14,797 @@
Note: The TI-99/8's internal codename was "Armadillo"
-==============================
- Mapper (codename "Amigo")
-==============================
- Initial setting of mapper (as defined in the power-up routine, TI-99/4A mode)
+ +-------+ +--------+
+ | CPU |========LogAddrBus======| Mapper |====PhysAddrBus==========
+ | TMS | || | AMIGO | ||
+ | 9995 | +----------+ | | +----------+
+ | | | Logical | +--------+ | Physical |
+ +-------+ | space | | | space |
+ | decoder | | | decoder |
+ | VAQUERRO | | | MOFETTA |
+ +----------+ | +----------+
+ | | |
+ +--------------------+ | +---------------------+
+ | Devices | | | Devices |
+ | +-------+ | | |
+ | ROM0 | SRAM | | | DRAM (POLLO) |
+ | Video | ---- | | | ROM1 |
+ | Speech | Maps--+--+ | Cartridge port |
+ | GROM +-------+ | PEB |
+ | Sound | | Hexbus (OSO) |
+ +--------------------+ +---------------------+
+
+ Custom chips
+ ------------
+ The chipset of the TI-99/8 consists of five specifically programmed chips.
+ All are nicknamed after some Spanish words (albeit sometimes misspelled)
+
+ VAQUERRO: Logical Address Space decoder ("Vaquero" = "Cowboy")
+ MOFETTA : Physical Address Space decoder ("Mofeta" = "Skunk")
+ AMIGO : Mapper ("Amigo" = "Friend")
+ OSO : Hexbus adapter ("Oso" = "Bear")
+ POLLO : DRAM controller (Not emulated) ("Pollo" = "Chicken")
+
+ See the comments for the respective chip implementation for details.
+
+
+ ROM contents
+ ------------
+ The ROM0 chip is accessible at addresses 0000-1FFF in the logical address
+ space of the compatibility mode. It contains the GPL interpreter. In
+ native mode the ROM0 chip is invisible.
+
+ ROM0
+ offset Logical address Name
+ -----------------------------------
+ 0000 0000-1FFF ROM0
+
+
+ The ROM1 chip contains 32 KiB of various system software. It is located in
+ the physical address space, so it must be mapped into the logical address
+ space by defining an appropriate map.
+
+ ROM1
+ offset Physical address Name
+ ----------------------------------------------------------
+ 0000 FFA000-FFDFFF ROM1
+ 4000 FF4000-FF5FFF @CRU>2700 Text-to-speech ROM/DSR
+ 6000 FF4000-FF5FFF @CRU>1700 Hexbus DSR
+
+ The DSR portions have to be selected via the CRU bits >1700 or >2700.
- 0 00ff0000 -> Unmapped; logical address 0000...0fff = ROM0
- 1 00ff0000 -> Unmapped; logical address 1000...1fff = ROM0
- 2 00000800 -> DRAM; 2000 = 000800, 2fff = 0017ff
- 3 00001800 -> DRAM; 3000 = 001800, 3fff = 0027ff
- 4 00ff4000 -> DSR space (internal / ioport)
- 5 00ff5000 -> DSR space (internal / ioport)
- 6 00ff6000 -> Cartridge space (6000..6fff)
- 7 00ff7000 -> Cartridge space (7000..7fff)
- 8 00ff0000 -> Unmapped; device ports (VDP) and SRAM
- 9 00ff0000 -> Unmapped; device ports (Speech, GROM)
- A 00002800 -> DRAM; a000 = 002800, afff = 0037ff
- B 00003800 -> DRAM; b000 = 003800, bfff = 0047ff
- C 00004800 -> DRAM; c000 = 004800, cfff = 0057ff
- D 00005800 -> DRAM; d000 = 005800, dfff = 0067ff
- E 00006800 -> DRAM; e000 = 006800, efff = 0077ff
- F 00007800 -> DRAM; f000 = 007800, ffff = 0087ff
- Format of map table entry (not emulated)
+ CRU map (I/O address space)
+ ===========================
+ 0000-003e: TMS9901 system interface (see ti99_8.c)
+ 1700-17fe: Hexbus
+ 2000-26fe: Future external devices
+ 2700-27fe: Additional ROM ("internal DSR")
+ 2702 : System reset (when set to 1)
+ 2800-3ffe: Future external devices
+ 4000-fffe: Future external devices
- +------+------+------+------+---+---+---+---------+----------+---------+
- | WProt| XProt| RProt| * | 0 | 0 | 0 | Upper | High | Low |
- +------+------+------+------+---+---+---+---------+----------+---------+
+ The TMS9995 offers the full 15-bit CRU address space. Devices designed for
+ the TI-99/4A should only be accessed in the area 1000-1ffe. They will (by
+ design) incompletely decode the CRU address and be mirrored in the higher
+ areas.
- WProt: Write protection if set to 1
- XProt: Execute protection if set to 1
- RProt: Read protection if set to 1
+ Note that the cartridge port of the TI-99/8 offers support for 16K ROM
+ cartridges, but lacks CRU support.
- When a protection violation occurs, the tms9901 INT1* pin is pulled low
- (active). The pin remains low until the mapper status register is read.
+ Michael Zapf, October 2010
+ February 2012: Rewritten as class
+ March 2016: Redesigned for custom chip emulation
- Address handling
- ----------------
- Physical address is (Upper * 2^16) + (High * 2^8) + Low
+ Informations taken from
+ [1] ARMADILLO PRODUCT SPECIFICATIONS
+ [2] TI-99/8 Graphics Programming Language interpreter
- The mapper calculates the actual physical address by looking up the
- table entry from the first four bits of the logical address and then
- *adding* the remaining 12 bits of the logical address on the map value.
+***************************************************************************/
- The value 0xff0000 is used to indicate a non-mapped area.
+// TODO:
+// - PEB
- Mapper control register
- -----------------------
- The mapper control register is used to initiate a map load/save operation.
+#include "998board.h"
- +---+---+---+---+---+---+---+---+
- | 0 | 0 | 0 | 0 | Map File | RW|
- +---+---+---+---+---+---+---+---+
+#define TRACE_CRU 0
+#define TRACE_ADDRESS 0
+#define TRACE_MAP 0
+#define TRACE_OSO 0
+#define TRACE_DECODE 0
+#define TRACE_READY 0
+#define TRACE_MEM 0
+#define TRACE_CLOCK 0
+#define TRACE_DETAIL 0
+#define TRACE_MOFETTA 0
+#define TRACE_AMIGO 0
+#define TRACE_WS 0
+#define TRACE_CPURY 0
+#define TRACE_GROM 0
+#define TRACE_PUNMAP 0
- The map file is a number from 0-7 indicating the set of map values for the
- operation, which means the location in SRAM where the next 64 values are
- loaded from or stored into.
+mainboard8_device::mainboard8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : device_t(mconfig, MAINBOARD8, "TI-99/8 Mainboard", tag, owner, clock, "ti998_mainboard", __FILE__),
+ m_A14_set(false),
+ m_pending_write(false),
+ m_speech_ready(true),
+ m_sound_ready(true),
+ m_pbox_ready(true),
+ m_ready(*this),
+ m_console_reset(*this),
+ m_hold_line(*this),
+ m_vaquerro(*this, VAQUERRO_TAG),
+ m_mofetta(*this, MOFETTA_TAG),
+ m_amigo(*this, AMIGO_TAG),
+ m_oso(*this, OSO_TAG)
+{
+}
- RW = 1: load from SRAM into mapper
- RW = 0: store from mapper into SRAM
+// =============== CRU bus access ==================
- When read, the mapper register returns the violation flags:
- +------+------+------+---+---+---+---+---+
- | WProt| XProt| RProt| 0 | 0 | 0 | 0 | 0 |
- +------+------+------+---+---+---+---+---+
+READ8Z_MEMBER(mainboard8_device::crureadz)
+{
+ m_peb->crureadz(space, offset, value);
+}
+
+/*
+ CRU handling. Mofetta is the only chip that bothers to handle it, beside the PEB
+*/
+WRITE8_MEMBER(mainboard8_device::cruwrite)
+{
+ m_mofetta->cruwrite(space, offset, data);
+ m_peb->cruwrite(space, offset, data);
+}
+
+// =============== Memory bus access ==================
+
+WRITE_LINE_MEMBER( mainboard8_device::dbin_in )
+{
+ m_dbin_level = (line_state)state;
+}
+
+SETOFFSET_MEMBER( mainboard8_device::setoffset )
+{
+ if (TRACE_ADDRESS) logerror("set %s %04x\n", (m_dbin_level==ASSERT_LINE)? "R" : "W", offset);
+
+ // No data is waiting on the data bus
+ m_pending_write = false;
+
+ // Memory cycle begins
+ m_vaquerro->memen_in(ASSERT_LINE);
+ m_amigo->memen_in(ASSERT_LINE);
+
+ // Save the logical address
+ m_logical_address = offset;
+ m_physical_address = 0;
+
+ // In TI's bit order, A14 is the second line from the right side (2^1)
+ m_A14_set = ((m_logical_address & 2)!=0); // Needed for clock_in
+
+ // Check for match in logical space
+ m_vaquerro->set_address(space, m_logical_address, m_dbin_level);
+
+ // Select GROMs if addressed
+ select_groms();
+
+ // Speech select lines will always be asserted/cleared as soon as the address is available
+ m_speech->wsq_w((m_vaquerro->spwt_out() == ASSERT_LINE)? FALSE : TRUE);
+ m_speech->rsq_w((m_vaquerro->sprd_out() == ASSERT_LINE)? FALSE : TRUE);
+
+ // If it is a logical space address, tell the mapper to stay inactive
+ line_state lasreq = (line_state)m_vaquerro->lascsq_out();
+ m_amigo->lascs_in(lasreq);
+ m_mofetta->lascs_in(lasreq);
+
+ // Need to set the address in any case so that the lines can be cleared
+ m_amigo->set_address(space, m_logical_address);
+
+ // AMIGO is the one to control the READY line to the CPU
+ // MOFETTA does not contribute to READY
+ m_ready(m_amigo->cpury_out());
+}
+
+WRITE_LINE_MEMBER( mainboard8_device::reset_console )
+{
+ m_console_reset(state);
+}
+
+WRITE_LINE_MEMBER( mainboard8_device::hold_cpu )
+{
+ m_hold_line(state);
+}
+
+/*
+ HOLD Acknowledge from the CPU
+*/
+WRITE_LINE_MEMBER( mainboard8_device::holda_line )
+{
+ m_amigo->holda_in(state);
+}
+
+/*
+ Clock line from the CPU. Forward to the custom chips.
+*/
+WRITE_LINE_MEMBER( mainboard8_device::clock_in )
+{
+ if (TRACE_CLOCK) logerror("CLKOUT = %d\n", state);
+
+ // Propagate to Vaquerro; may change GGRDY (trailing edge) and the GROM select lines
+ m_vaquerro->clock_in((line_state)state);
+
+ // Set the incoming ready line of Amigo (Mapper) before the clock
+ bool readycomb = ((m_vaquerro->ggrdy_out()==ASSERT_LINE) && m_speech_ready && m_sound_ready && m_pbox_ready);
+ m_amigo->srdy_in(readycomb? ASSERT_LINE : CLEAR_LINE);
+
+ // This may change the incoming READY lines of Vaquerro
+ if (state==CLEAR_LINE) select_groms();
+
+ m_amigo->clock_in((line_state)state);
+
+ // Mofetta only needs the clock to produce the GROM clock
+ m_mofetta->clock_in(state);
+
+ m_mofetta->skdrcs_in(m_amigo->skdrcs_out());
+
+ int gromclk = m_mofetta->gromclk_out();
+
+ if (gromclk != m_gromclk) // when it changed, propagate to the GROMs
+ {
+ m_gromclk = gromclk;
+ for (int i=0; i < 8; i++)
+ {
+ if (i < 3)
+ {
+ m_sgrom[i]->gclock_in(gromclk);
+ m_p3grom[i]->gclock_in(gromclk);
+ }
+ m_tsgrom[i]->gclock_in(gromclk);
+ m_p8grom[i]->gclock_in(gromclk);
+ }
+ m_gromport->gclock_in(gromclk);
+ }
+
+ // Check video for writing
+ if (m_pending_write && m_vaquerro->vdpwt_out()==ASSERT_LINE)
+ {
+ if (m_A14_set) m_video->register_write(*m_space, 0, m_latched_data);
+ else m_video->vram_write(*m_space, 0, m_latched_data);
+ m_pending_write = false;
+ if (TRACE_MEM) logerror("Write %04x (video) <- %02x\n", m_logical_address, m_latched_data);
+ cycle_end();
+ return;
+ }
+
+ // Propagate the READY signal
+ m_ready(m_amigo->cpury_out());
+
+ // In case we're reading, the CPU will now do the READ operation.
+ // Otherwise we must do the write operation now which we postponed before.
+
+ if (m_pending_write && (state==CLEAR_LINE))
+ {
+ if (m_amigo->skdrcs_out()==ASSERT_LINE)
+ {
+ m_dram[m_physical_address & 0xffff] = m_latched_data;
+ m_pending_write = false;
+ if (TRACE_MEM) logerror("Write %04x (phys %06x, DRAM) <- %02x\n", m_logical_address, m_physical_address, m_latched_data);
+ }
+
+ if (m_mofetta->alccs_out()==ASSERT_LINE)
+ {
+ m_oso->write(*m_space, m_physical_address>>1, m_latched_data);
+ m_pending_write = false;
+ if (TRACE_MEM) logerror("Write %04x (phys %06x, OSO) <- %02x\n", m_logical_address, m_physical_address, m_latched_data);
+ }
+
+ if (m_mofetta->cmas_out()==ASSERT_LINE)
+ {
+ m_gromport->romgq_line(ASSERT_LINE);
+ m_gromport->write(*m_space, m_physical_address & 0x3fff, m_latched_data);
+ m_pending_write = false;
+ if (TRACE_MEM) logerror("Write %04x (phys %06x, cartridge) <- %02x\n", m_logical_address, m_physical_address, m_latched_data);
+ }
+ else
+ {
+ m_gromport->romgq_line(CLEAR_LINE);
+ }
+
+ if (m_mofetta->dbc_out()==ASSERT_LINE)
+ {
+ m_peb->write(*m_space, m_physical_address, m_latched_data);
+ m_pending_write = false;
+ if (TRACE_MEM) logerror("Write %04x (phys %06x, PEB) <- %02x\n", m_logical_address, m_physical_address, m_latched_data);
+ }
+ }
+
+ if (m_dbin_level==CLEAR_LINE && !m_pending_write) // Memory cycle ends
+ cycle_end();
+}
+
+void mainboard8_device::select_groms()
+{
+ // Select the GROM libs
+ // Note that we must also deselect them again, so we have to visit each
+ // one of them
+
+ int select = m_vaquerro->gromcs_out();
+
+ // Avoid to be called too often; this would have a bad penalty on emulation performance
+ // This simple check actually increases bench performance from 120% to 240%
+ if (select != m_prev_grom)
+ {
+ m_prev_grom = select;
+ int lines = (m_dbin_level==ASSERT_LINE)? GROM_M_LINE : 0;
+ if (m_A14_set) lines |= GROM_MO_LINE;
+
+ for (int i=0; i < 8; i++)
+ {
+ if (i < 3)
+ {
+ m_sgrom[i]->set_lines(*m_space, lines, select & SGMSEL);
+ m_p3grom[i]->set_lines(*m_space, lines, select & P3GSEL);
+ }
+ m_tsgrom[i]->set_lines(*m_space, lines, select & TSGSEL);
+ m_p8grom[i]->set_lines(*m_space, lines, select & P8GSEL);
+ }
+ // Write to the cartridge port. The GROMs on cartridges are accesses as system GROMs
+ if (select & SGMSEL) m_gromport->romgq_line(CLEAR_LINE);
+ m_gromport->set_gromlines(*m_space, lines, select & SGMSEL);
+ }
+
+ // If we're planning to write to the GROMs, let's do it right now
+ if (select !=0 && m_pending_write)
+ {
+ m_pending_write = false;
+ switch (select)
+ {
+ case SGMSEL:
+ for (int i=0; i < 3; i++)
+ {
+ m_sgrom[i]->write(*m_space, 0, m_latched_data);
+ }
+ if (TRACE_MEM) logerror("Write GS <- %02x\n", m_latched_data);
+ m_gromport->write(*m_space, 0, m_latched_data);
+ break;
+
+ case TSGSEL:
+ for (int i=0; i < 8; i++)
+ {
+ m_tsgrom[i]->write(*m_space, 0, m_latched_data);
+ }
+ if (TRACE_MEM) logerror("Write GT <- %02x\n", m_latched_data);
+ break;
+
+ case P8GSEL:
+ for (int i=0; i < 8; i++)
+ {
+ m_p8grom[i]->write(*m_space, 0, m_latched_data);
+ }
+ if (TRACE_MEM) logerror("Write G8 <- %02x\n", m_latched_data);
+ break;
+
+ case P3GSEL:
+ for (int i=0; i < 3; i++)
+ {
+ m_p3grom[i]->write(*m_space, 0, m_latched_data);
+ }
+ if (TRACE_MEM) logerror("Write G3 <- %02x\n", m_latched_data);
+ break;
+
+ default:
+ logerror("Error: Multiple GROM libs selected: SGM=%d TSG=%d P8G=%d P3G=%d\n", (select & SGMSEL)!=0, (select & TSGSEL)!=0, (select & P8GSEL)!=0, (select & P3GSEL)!=0);
+ break;
+ }
+ }
+}
+
+void mainboard8_device::set_paddress(int address)
+{
+ // Keep this value as the current address
+ m_physical_address = (m_physical_address << 16) | address;
+ if (TRACE_DETAIL) logerror("Setting physical address %06x\n", m_physical_address);
+
+ m_mofetta->set_address(*m_space, address, m_dbin_level);
+ m_peb->setaddress_dbin(*m_space, address, m_dbin_level);
+}
+
+WRITE_LINE_MEMBER( mainboard8_device::msast_in )
+{
+ if (TRACE_DETAIL) logerror("msast = %d\n", state);
+
+ // Start physical space cycle on the trailing edge
+ if (state==CLEAR_LINE)
+ {
+ m_mofetta->pmemen_in(ASSERT_LINE);
+ m_peb->memen_in(ASSERT_LINE);
+ }
+ m_mofetta->msast_in(state);
+ m_peb->msast_in(state);
+}
+
+
+READ8_MEMBER( mainboard8_device::read )
+{
+ UINT8 value = 0;
+ const char* what;
+
+ // =================================================
+ // Logical space
+ // =================================================
+ if (m_amigo->mapper_accessed())
+ {
+ value = m_amigo->read(space, 0);
+ what = "mapper";
+ goto readdone;
+ }
+
+ if (m_amigo->sramcs_out()==ASSERT_LINE)
+ {
+ value = m_sram[m_logical_address & 0x07ff];
+ what = "SRAM";
+ goto readdone;
+ }
+
+ if (m_vaquerro->lascsq_out()==ASSERT_LINE)
+ {
+ // VDP access
+ if (m_vaquerro->vdprd_out()==ASSERT_LINE)
+ {
+ value = m_A14_set? m_video->register_read(space, 0) : m_video->vram_read(space, 0);
+ what = "video";
+ goto readdone;
+ }
+
+ // System ROM0
+ if (m_vaquerro->sromcs_out()==ASSERT_LINE)
+ {
+ value = m_rom0[m_logical_address & 0x1fff];
+ what = "ROM0";
+ goto readdone;
+ }
+
+ // Speech
+ if (m_vaquerro->sprd_out()==ASSERT_LINE)
+ {
+ value = m_speech->status_r(space, 0) & 0xff;
+ what = "speech";
+ goto readdone;
+ }
+
+ // GROMs
+ switch (m_vaquerro->gromcs_out())
+ {
+ case SGMSEL:
+ for (int i=0; i < 3; i++)
+ {
+ m_sgrom[i]->readz(space, 0, &value);
+ }
+ m_gromport->readz(space, 0, &value);
+ if (TRACE_GROM && !m_A14_set) logerror("GS>%04x\n", m_sgrom[0]->debug_get_address()-1);
+ what = "system GROM";
+ goto readdone;
+
+ case TSGSEL:
+ for (int i=0; i < 8; i++)
+ {
+ m_tsgrom[i]->readz(space, 0, &value);
+ }
+ if (TRACE_GROM && !m_A14_set) logerror("GT>%04x\n", m_tsgrom[0]->debug_get_address()-1);
+ what = "TTS GROM";
+ goto readdone;
+
+ case P8GSEL:
+ for (int i=0; i < 8; i++)
+ {
+ m_p8grom[i]->readz(space, 0, &value);
+ }
+ if (TRACE_GROM && !m_A14_set) logerror("G8>%04x\n", m_p8grom[0]->debug_get_address()-1);
+ what = "P8 GROM";
+ goto readdone;
+
+ case P3GSEL:
+ for (int i=0; i < 3; i++)
+ {
+ m_p3grom[i]->readz(space, 0, &value);
+ }
+ if (TRACE_GROM && !m_A14_set) logerror("G3>%04x\n", m_p3grom[0]->debug_get_address()-1);
+ what = "P3 GROM";
+ goto readdone;
+ default:
+ break;
+ }
+
+ // These messages appear in fact every time that a GPL command writes
+ // an immediate value to a write-only address (like 9400) because the
+ // GPL interpreter always tries to load the value from the provided memory address first
+
+ logerror("Read %04x (unmapped) ignored\n", m_logical_address);
+
+ // Memory cycle ends
+ cycle_end();
+ return 0;
+ }
+ else
+ {
+ // =================================================
+ // Physical space
+ // =================================================
+ if (m_amigo->skdrcs_out()==ASSERT_LINE)
+ {
+ value = m_dram[m_physical_address & 0xffff];
+ what = "DRAM";
+ goto readdonephys;
+ }
+
+ if (m_mofetta->rom1cs_out()==ASSERT_LINE)
+ {
+ int address = (m_physical_address & 0x1fff);
+ if (m_mofetta->rom1am_out()==ASSERT_LINE) address |= 0x4000;
+ if (m_mofetta->rom1al_out()==ASSERT_LINE) address |= 0x2000;
+ value = m_rom1[address];
+
+ if (TRACE_MEM) logerror("Read %04x (ROM1@%04x) -> %02x\n", m_logical_address, address, value);
+ cycle_end();
+ return value;
+ }
+
+ if (m_mofetta->alccs_out()==ASSERT_LINE)
+ {
+ value = m_oso->read(*m_space, m_physical_address>>1);
+ what = "OSO";
+ goto readdonephys;
+ }
+
+ if (m_mofetta->prcs_out()==ASSERT_LINE)
+ {
+ value = m_pascalrom[m_physical_address & 0x3fff];
+ what = "PASCAL";
+ goto readdonephys;
+ }
+
+ if (m_mofetta->cmas_out()==ASSERT_LINE)
+ {
+ m_gromport->romgq_line(ASSERT_LINE);
+ m_gromport->readz(*m_space, m_physical_address & 0x3fff, &value);
+ what = "Cartridge";
+ goto readdonephys;
+ }
+
+ if (m_mofetta->dbc_out()==ASSERT_LINE)
+ {
+ m_peb->readz(*m_space, m_physical_address & 0xffff, &value);
+ what = "PEB";
+ goto readdonephys;
+ }
+
+ if (TRACE_PUNMAP) logerror("Read %04x (phys %06x, unmapped) ignored\n", m_logical_address, m_physical_address);
+
+ // Memory cycle ends
+ cycle_end();
+ return 0;
+ }
+
+
+readdone:
+ if (TRACE_MEM) logerror("Read %04x (%s) -> %02x\n", m_logical_address, what, value);
+ cycle_end();
+ return value;
+
+readdonephys:
+ if (TRACE_MEM) logerror("Read %04x (phys %06x, %s) -> %02x\n", m_logical_address, m_physical_address, what, value);
+ cycle_end();
+ return value;
+}
+
+void mainboard8_device::cycle_end()
+{
+ // Memory cycle ends
+ m_vaquerro->memen_in(CLEAR_LINE);
+ m_amigo->memen_in(CLEAR_LINE);
+ m_mofetta->pmemen_in(CLEAR_LINE);
+ m_peb->memen_in(CLEAR_LINE);
+}
+
+/*
+ When writing, the emulation relies on a push mechanism; the write
+ operation follows the setaddress operation immediately.
+
+ If the READY line is pulled down due to the mapping process, we must
+ store the data bus value until the physical address is available.
+*/
+WRITE8_MEMBER( mainboard8_device::write )
+{
+ m_latched_data = data;
+ m_space = &space;
+ m_pending_write = true;
+
+ // Some logical space devices can be written immediately
+ // GROMs and video must wait to be selected
+ if (m_amigo->mapper_accessed())
+ {
+ if (TRACE_MEM) logerror("Write %04x (mapper) <- %02x\n", m_logical_address, data);
+ m_amigo->write(space, 0, data);
+ m_pending_write = false;
+ }
+
+ // Sound ... we have to put it before SRAM because in compatibility mode the
+ // sound address lies within the SRAM area
+ if (m_vaquerro->sccs_out()==ASSERT_LINE)
+ {
+ if (TRACE_MEM) logerror("Write %04x (sound) <- %02x\n", m_logical_address, data);
+ m_sound->write(space, 0, data); // Sound chip will lower READY after this access
+ m_pending_write = false;
+ }
+ else
+ {
+ // SRAM
+ if (m_amigo->sramcs_out()==ASSERT_LINE)
+ {
+ if (TRACE_MEM) logerror("Write %04x (SRAM) <- %02x\n", m_logical_address, data);
+ m_sram[m_logical_address & 0x07ff] = data;
+ m_pending_write = false;
+ }
+ }
+
+ // Speech
+ if (m_vaquerro->spwt_out()==ASSERT_LINE)
+ {
+ if (TRACE_MEM) logerror("Write %04x (speech) <- %02x\n", m_logical_address, data);
+ m_speech->data_w(space, 0, data);
+ m_pending_write = false;
+ }
+
+ if (!m_pending_write)
+ cycle_end();
+
+ // The remaining physical devices will respond as soon as the physical address is completely set
+}
+
+/*
+ Set 99/4A compatibility mode (CRUS=1)
+*/
+WRITE_LINE_MEMBER( mainboard8_device::crus_in )
+{
+ if (TRACE_CRU) logerror("%s CRUS\n", (state==1)? "Assert" : "Clear");
+ m_vaquerro->crus_in(state);
+ m_amigo->crus_in(state);
+}
+
+/*
+ Set mapper /PTGEN line ("Pascal and Text-to-speech GROMs enable").
+ Note that PTGEN is negative logic.
+*/
+WRITE_LINE_MEMBER( mainboard8_device::ptgen_in )
+{
+ if (TRACE_CRU) logerror("%s PTGEN*\n", (state==0)? "Assert" : "Clear");
+ m_vaquerro->crusgl_in((state==0)? ASSERT_LINE : CLEAR_LINE);
+}
+
+
+/*
+ READY lines, to be combined
+*/
+WRITE_LINE_MEMBER( mainboard8_device::system_grom_ready )
+{
+ m_vaquerro->sgmry(state);
+}
+
+WRITE_LINE_MEMBER( mainboard8_device::ptts_grom_ready )
+{
+ m_vaquerro->tsgry(state);
+}
+
+WRITE_LINE_MEMBER( mainboard8_device::p8_grom_ready )
+{
+ m_vaquerro->p8gry(state);
+}
+
+WRITE_LINE_MEMBER( mainboard8_device::p3_grom_ready )
+{
+ m_vaquerro->p3gry(state);
+}
+
+WRITE_LINE_MEMBER( mainboard8_device::sound_ready )
+{
+ m_sound_ready = state;
+}
+
+WRITE_LINE_MEMBER( mainboard8_device::speech_ready )
+{
+ // The TMS5200 implementation uses TRUE/FALSE, not ASSERT/CLEAR semantics
+ m_speech_ready = (state==FALSE)? ASSERT_LINE : CLEAR_LINE;
+}
+
+WRITE_LINE_MEMBER( mainboard8_device::pbox_ready )
+{
+ m_pbox_ready = state;
+}
+
+WRITE_LINE_MEMBER( mainboard8_device::ggrdy_in )
+{
+ m_amigo->srdy_in((state==ASSERT_LINE && m_speech_ready && m_sound_ready && m_pbox_ready)? ASSERT_LINE : CLEAR_LINE);
+}
+
+static const char *const glib0[] = { SYSGROM0_TAG, SYSGROM1_TAG, SYSGROM2_TAG };
+static const char *const glib1[] = { GLIB10_TAG, GLIB11_TAG, GLIB12_TAG, GLIB13_TAG, GLIB14_TAG, GLIB15_TAG, GLIB16_TAG, GLIB17_TAG };
+static const char *const glib2[] = { GLIB20_TAG, GLIB21_TAG, GLIB22_TAG, GLIB23_TAG, GLIB24_TAG, GLIB25_TAG, GLIB26_TAG, GLIB27_TAG };
+static const char *const glib3[] = { GLIB30_TAG, GLIB31_TAG, GLIB32_TAG };
+
+void mainboard8_device::device_start()
+{
+ logerror("Starting main board\n");
+ // Lines going to the main driver class, then to the CPU
+ m_ready.resolve_safe(); // READY
+ m_console_reset.resolve_safe(); // RESET
+ m_hold_line.resolve_safe(); // HOLD
+
+ // Setting up the links to the GROMs
+ for (int i=0; i < 8; i++)
+ {
+ if (i < 3)
+ {
+ m_sgrom[i] = downcast<tmc0430_device*>(machine().device(glib0[i]));
+ m_p3grom[i] = downcast<tmc0430_device*>(machine().device(glib3[i]));
+ }
+ m_tsgrom[i] = downcast<tmc0430_device*>(machine().device(glib1[i]));
+ m_p8grom[i] = downcast<tmc0430_device*>(machine().device(glib2[i]));
+ }
+
+ // Link to speech synthesizer
+ m_speech = downcast<cd2501ecd_device*>(machine().device(SPEECHSYN_TAG));
+
+ // Link to sound chip
+ m_sound = downcast<sn76496_base_device*>(machine().device(TISOUNDCHIP_TAG));
+
+ // Link to video
+ m_video = downcast<tms9118_device*>(machine().device(VDP_TAG));
+
+ // Link to cartridge port
+ m_gromport = downcast<gromport_device*>(machine().device(GROMPORT_TAG));
+
+ // Link to PEB
+ m_peb = downcast<peribox_device*>(machine().device(PERIBOX_TAG));
+
+ // Configure RAM and AMIGO
+ m_sram = std::make_unique<UINT8[]>(SRAM_SIZE);
+ m_dram = std::make_unique<UINT8[]>(DRAM_SIZE);
+
+ m_amigo->connect_sram(m_sram.get());
+
+ m_rom0 = machine().root_device().memregion(ROM0_REG)->base();
+ m_rom1 = machine().root_device().memregion(ROM1_REG)->base();
+ m_pascalrom = machine().root_device().memregion(PASCAL_REG)->base();
+}
+
+void mainboard8_device::device_reset()
+{
+ logerror("Resetting main board\n");
+ m_last_ready = CLEAR_LINE;
+ m_speech_ready = true;
+ m_sound_ready = true;
+ m_pbox_ready = true;
+ m_pending_write = false;
+ m_prev_grom = 0;
+ m_A14_set = false;
+}
+
+MACHINE_CONFIG_FRAGMENT( ti998_mainboard )
+ MCFG_DEVICE_ADD(VAQUERRO_TAG, VAQUERRO, 0)
+ MCFG_DEVICE_ADD(MOFETTA_TAG, MOFETTA, 0)
+ MCFG_DEVICE_ADD(AMIGO_TAG, AMIGO, 0)
+ MCFG_DEVICE_ADD(OSO_TAG, OSO, 0)
+MACHINE_CONFIG_END
+
+machine_config_constructor mainboard8_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( ti998_mainboard );
+}
+const device_type MAINBOARD8 = &device_creator<mainboard8_device>;
+
+
+/***************************************************************************
+ ===== VAQUERRO: Logical Address Space decoder =====
Logical address space (LAS)
===========================
@@ -150,649 +876,976 @@
f850-f85f: P-Code library #1 GROM read/write
f860-f86f: P-Code library #2 GROM read/write
- Physical address space (PAS)
- ============================
- The PAS is 24 bits wide and accessed via the custom mapper chip nicknamed
- "Amigo". The mapper exchanges map definitions with SRAM (see LAS). That
- means, a map can be prepared in SRAM, and for activating it, the mapper
- is accessed on its port, telling it to load or save a map.
-
- 000000-00ffff: 64 KiB console DRAM
- 010000-efffff: undefined
- f00000-f03fff: P-Code ROM (not mentioned in [1])
- f04000-feffff: undefined
- ff0000 : unmapped (code for mapper)
- ff0001-ff3fff: undefined
- ff4000-ff5fff: DSR ROM in Peripheral Box, Hexbus DSR (CRU 1700) or additional ROM (CRU 2700)
- ff6000-ff9fff: Cartridge ROM space
- ffa000-ffdfff: 16 KiB ROM1
- ffe000-ffe00f: Interrupt level sense
- ffe010-ffffff: undefined
+***************************************************************************/
- CRU map (I/O address space)
- ===========================
- 0000-003e: TMS9901 system interface (see ti99_8.c)
- 1700-17fe: Hexbus
- 2000-26fe: Future external devices
- 2700-27fe: Additional ROM ("internal DSR")
- 2702: System reset (when set to 1)
- 2800-3ffe: Future external devices
- 4000-fffe: Future external devices
+vaquerro_device::vaquerro_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+: device_t(mconfig, VAQUERRO, "Logical Address Space Decoder", tag, owner, clock, "ti998_vaquerro", __FILE__),
+ m_crus(ASSERT_LINE),
+ m_crugl(ASSERT_LINE),
+ m_ggrdy(ASSERT_LINE)
+{
+}
- The TMS9995 offers the full 15-bit CRU address space. Devices designed for
- the TI-99/4A should only be accessed in the area 1000-1ffe. They will (by
- design) incompletely decode the CRU address and be mirrored in the higher areas.
+SETADDRESS_DBIN_MEMBER( vaquerro_device::set_address )
+{
+ // Do the decoding
+ // state = dbin, offset = address
- Michael Zapf, October 2010
- February 2012: Rewritten as class
+ bool reading = (state==ASSERT_LINE);
+ bool sgfap = false;
+ bool tsgfap = false;
+ bool p8gfap = false;
+ bool p3gfap = false;
+ bool vfap = false;
- Informations taken from
- [1] ARMADILLO PRODUCT SPECIFICATIONS
- [2] TI-99/8 Graphics Programming Language interpreter
+ m_a14 = ((offset & 2)!=0)? ASSERT_LINE : CLEAR_LINE; // Needed for clock_in
-***************************************************************************/
+ m_dbin_level = (line_state)state;
-#include "998board.h"
+ int offbase = (offset & 0xfff1);
-#define TRACE_CRU 0
-#define TRACE_MEM 0
-#define TRACE_MAP 0
-#define TRACE_CONFIG 0
-#define TRACE_OSO 0
-#define TRACE_SPEECH 0
-#define TRACE_DETAIL 0
+ // =================== TI (compatibility) mode ======================
+ if (m_crus == ASSERT_LINE)
+ {
+ if (TRACE_DETAIL) logerror("Compatibility mode\n");
-mainboard8_device::mainboard8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : bus8z_device(mconfig, MAINBOARD8, "TI-99/8 Main board", tag, owner, clock, "ti998_mainboard", __FILE__),
- m_ready(*this), m_dsr_selected(false), m_hexbus_selected(false), m_CRUS(false), m_PTGE(false), m_waitcount(0), m_sram(nullptr), m_dram(nullptr), m_rom0(nullptr), m_rom1(nullptr), m_pcode(nullptr),
- m_oso(*this, OSO_TAG)
- { }
+ // SPRD (Speech read)
+ m_sprd = ((offbase==0x9000) && reading);
-/***************************************************************************
- CRU access
-***************************************************************************/
+ // SPWT (Speech write)
+ m_spwt = ((offbase==0x9400) && !reading);
-#define HEXBUS_CRU_BASE 0x1700
-#define MAPPER_CRU_BASE 0x2700
+ // Sound
+ m_sccs = ((offbase==0x8400)&& !reading);
-READ8Z_MEMBER(mainboard8_device::crureadz)
+ // ROM0
+ m_sromcs = (((offset & 0xe000)==0x0000) && reading);
+
+ // Video select
+ vfap = ((offbase==0x8800) && reading) || ((offbase==0x8c00) && !reading);
+
+ // System GROM
+ sgfap = ((offbase==0x9800) && reading) || ((offbase==0x9c00) && !reading);
+ }
+ // ====================== Native mode ======================
+ else
+ {
+ if (TRACE_DETAIL) logerror("Native mode\n");
+
+ // SPRD (Speech read)
+ m_sprd = ((offbase==0xf820) && reading);
+
+ // SPWT (Speech write)
+ m_spwt = ((offbase==0xf820) && !reading);
+
+ // Sound
+ m_sccs = ((offbase==0xf800) && !reading);
+
+ // Video
+ vfap = (offbase==0xf810);
+
+ // System GROM (read and write)
+ sgfap = (offbase==0xf830);
+ }
+
+ // These lines are not decoded for compatibility or native mode, only
+ // the line CRUGL determines whether they become visible.
+ tsgfap = (offbase==0xf840) && m_crugl;
+ p8gfap = (offbase==0xf850) && m_crugl;
+ p3gfap = (offbase==0xf860) && m_crugl;
+
+ // The LASREQ line says whether Vaquerro does the job, or whether it is Mofetta's turn.
+ m_grom_or_video = sgfap || tsgfap || p8gfap || p3gfap || vfap ;
+
+ m_lasreq = (m_sprd || m_spwt || m_sccs || m_sromcs || m_grom_or_video);
+
+ if (TRACE_DETAIL) logerror("sgfap=%d tsgfap=%d p8gfap=%d p3gfap=%d vfap=%d\n", sgfap, tsgfap, p8gfap, p3gfap, vfap);
+
+ // Pass the selection to the wait state generators
+ // and pick up the current select line states
+ m_sgmws.select_in(sgfap);
+ m_tsgws.select_in(tsgfap);
+ m_p8gws.select_in(p8gfap);
+ m_p3gws.select_in(p3gfap);
+ m_vidws.select_in(vfap);
+
+ m_gromsel = m_sgmws.select_out() | m_tsgws.select_out() | m_p8gws.select_out() | m_p3gws.select_out();
+
+ m_vdprd = (reading && (m_vidws.select_out()!=0));
+ m_vdpwt = (!reading && (m_vidws.select_out()!=0));
+
+ if (m_grom_or_video)
+ {
+ // We don't see the current selection now; only with next clock pulse.
+ m_mainboard->ggrdy_in(m_sry);
+ if (TRACE_READY) logerror("GGRDY = %d\n", m_sry);
+ }
+}
+
+WRITE_LINE_MEMBER( vaquerro_device::crusgl_in )
+{
+ m_crugl = (state==ASSERT_LINE);
+}
+
+WRITE_LINE_MEMBER( vaquerro_device::crus_in )
+{
+ m_crus = (line_state)state;
+}
+
+WRITE_LINE_MEMBER( vaquerro_device::memen_in )
{
- if (TRACE_CRU) logerror("%s: read CRU %04x ignored\n", tag(), offset);
- // Nothing here.
+ m_memen = (state==ASSERT_LINE);
}
/*
- CRU handling. We handle the internal device at CRU address 0x2700 via
- this mapper component.
+ Called by Mofetta
*/
-WRITE8_MEMBER(mainboard8_device::cruwrite)
+READ_LINE_MEMBER( vaquerro_device::lascsq_out )
{
- if ((offset & 0xff00)==MAPPER_CRU_BASE)
- {
- int bit = (offset & 0xff)>>1;
- switch (bit)
- {
- case 0:
- // Turn on/off the internal DSR
- m_dsr_selected = (data!=0);
- if (TRACE_CRU) logerror("%s: DSR select = %d\n", tag(), data);
- break;
- case 1:
- if (TRACE_CRU) logerror("%s: System reset by CRU request\n", tag());
- machine().schedule_soft_reset();
- break;
- }
- return;
- }
+ return (m_lasreq && m_memen)? ASSERT_LINE : CLEAR_LINE;
+}
- if ((offset & 0xff00)==HEXBUS_CRU_BASE)
- {
- int bit = (offset & 0xff)>>1;
- switch (bit)
- {
- case 0:
- // Turn on/off the Hexbus DSR
- m_hexbus_selected = (data!=0);
- if (TRACE_CRU) logerror("%s: Hexbus select = %d\n", tag(), data);
- break;
- default:
- if (TRACE_CRU) logerror("%s: Set CRU>%04x (Hexbus) to %d\n", tag(), offset,data);
- break;
- }
- return;
- }
+/*
+ Incoming ready lines from the GROM library
+*/
+WRITE_LINE_MEMBER( vaquerro_device::sgmry )
+{
+ if (TRACE_READY) logerror("Incoming SGMRY = %d\n", state);
+ m_sgmws.ready_in((line_state)state);
+}
- if ((offset & 0xff00)>=0x0100)
- {
- if (TRACE_CRU) logerror("%s: Set CRU>%04x (unknown) to %d\n", tag(), offset,data);
- return;
- }
+WRITE_LINE_MEMBER( vaquerro_device::tsgry )
+{
+ if (TRACE_READY) logerror("Incoming TSGRY = %d\n", state);
+ m_tsgws.ready_in((line_state)state);
}
-void mainboard8_device::CRUS_set(bool state)
+WRITE_LINE_MEMBER( vaquerro_device::p8gry )
{
- if (TRACE_CRU) logerror("%s: set CRUS=%d\n", tag(), state);
- m_CRUS = state;
+ if (TRACE_READY) logerror("Incoming 8GRY = %d\n", state);
+ m_p8gws.ready_in((line_state)state);
+}
+
+WRITE_LINE_MEMBER( vaquerro_device::p3gry )
+{
+ if (TRACE_READY) logerror("Incoming P3GRY = %d\n", state);
+ m_p3gws.ready_in((line_state)state);
}
/*
- Note that PTGEN is negative logic. We invert these semantics here.
+ Outgoing READY
*/
-void mainboard8_device::PTGE_set(bool state)
+READ_LINE_MEMBER( vaquerro_device::ggrdy_out )
{
- if (TRACE_CRU) logerror("%s: set PTGEN=%d\n", tag(), state? 1:0);
- m_PTGE = state;
+ if (TRACE_READY) logerror("GGRDY out = %d\n", m_ggrdy);
+ return m_ggrdy;
}
-/***************************************************************************
- Access by address map
-***************************************************************************/
+/*
+ Select lines
+*/
+
+// =========================
+
+int vaquerro_device::gromcs_out()
+{
+ return m_gromsel;
+}
+
+// =========================
+
+READ_LINE_MEMBER( vaquerro_device::vdprd_out )
+{
+ return (m_vdprd && m_memen)? ASSERT_LINE : CLEAR_LINE;
+}
+
+READ_LINE_MEMBER( vaquerro_device::vdpwt_out )
+{
+ return (m_vdpwt && m_memen)? ASSERT_LINE : CLEAR_LINE;
+}
+
+READ_LINE_MEMBER( vaquerro_device::sprd_out )
+{
+ return (m_sprd && m_memen)? ASSERT_LINE : CLEAR_LINE;
+}
+
+READ_LINE_MEMBER( vaquerro_device::spwt_out )
+{
+ return (m_spwt && m_memen)? ASSERT_LINE : CLEAR_LINE;
+}
+
+READ_LINE_MEMBER( vaquerro_device::sromcs_out )
+{
+ return (m_sromcs && m_memen)? ASSERT_LINE : CLEAR_LINE;
+}
+
+READ_LINE_MEMBER( vaquerro_device::sccs_out )
+{
+ return (m_sccs && m_memen)? ASSERT_LINE : CLEAR_LINE;
+}
/*
- This method is called via the address map.
+ Incoming clock signal.
+
+ The Vaquerro has a Wait State generation logic circuit for the video
+ processor and all 4 GROM libraries. Each one has its separate generator.
+ The GROMs get a 16 cycle wait period after their access, while the video
+ processors gets an 8 cycle wait period. If during that period another
+ access occurs, the system READY line will be cleared, triggering wait
+ states in the CPU.
*/
-READ8_MEMBER( mainboard8_device::readm )
+WRITE_LINE_MEMBER( vaquerro_device::clock_in )
{
- UINT8 value = 0;
- bool found;
- if (TRACE_DETAIL) logerror("%s: read from %04x\n", tag(), offset);
- found = access_logical_r(space, offset, &value, mem_mask);
- m_waitcount = 2;
+ line_state level = (line_state)state;
- if (!found)
- {
- // In that case, the address decoder could not find a suitable device.
- // This means the logical address is transformed by the mapper.
- // NOTE: Use "+", not OR. The offset is not a prefix.
- UINT32 pas_address = m_pas_offset[(offset & 0xf000)>>12] + (offset & 0xfff);
+ // Propagate to the wait state generators (note that we need both clock levels)
+ m_sgmws.clock_in(level);
+ m_tsgws.clock_in(level);
+ m_p8gws.clock_in(level);
+ m_p3gws.clock_in(level);
+ m_vidws.clock_in(level);
+
+ // Collect the selections
+ // Each one has its own indication, defined at init time
+ m_gromsel = m_sgmws.select_out() | m_tsgws.select_out() | m_p8gws.select_out() | m_p3gws.select_out();
+
+ bool reading = (m_dbin_level==ASSERT_LINE);
- // So now let's do the same as above with physical addresses
- access_physical_r(space, pas_address, &value, mem_mask);
+ m_vdprd = (reading && (m_vidws.select_out()!=0));
+ m_vdpwt = (!reading && (m_vidws.select_out()!=0));
- // The PAS area requires one more wait state, as the address bus
- // is multiplexed
- m_waitcount = 3;
+ // Get the READY levels from the GROMs
+ if (level==CLEAR_LINE)
+ {
+ m_sry = m_sgmws.ready_out() || m_tsgws.ready_out() || m_p8gws.ready_out() || m_p3gws.ready_out() || m_vidws.ready_out();
+ if (TRACE_WS) logerror("ready_out = (%d, %d, %d, %d, %d)\n", m_sgmws.ready_out(), m_tsgws.ready_out(), m_p8gws.ready_out(), m_p3gws.ready_out(),m_vidws.ready_out());
}
- // Insert wait states and let CPU enter wait state
- m_ready(CLEAR_LINE);
+ // If the output gate is closed, propagate ASSERT_LINE (pulled up)
+ m_ggrdy = (!m_grom_or_video || m_sry)? ASSERT_LINE : CLEAR_LINE;
+}
- return value;
+
+void vaquerro_device::device_start()
+{
+ logerror("Starting\n");
+ m_mainboard = downcast<mainboard8_device*>(owner());
+ m_sgmws.init(SGMSEL);
+ m_tsgws.init(TSGSEL);
+ m_p8gws.init(P8GSEL);
+ m_p3gws.init(P3GSEL);
+ m_vidws.init(VIDSEL);
}
-WRITE8_MEMBER( mainboard8_device::writem )
+void vaquerro_device::device_reset()
{
- bool found;
+ m_ggrdy = ASSERT_LINE;
+ m_vdpwt = m_vdprd = CLEAR_LINE;
+ m_gromsel = 0;
+ m_sgmws.treset_in(ASSERT_LINE);
+ m_tsgws.treset_in(ASSERT_LINE);
+ m_p8gws.treset_in(ASSERT_LINE);
+ m_p3gws.treset_in(ASSERT_LINE);
+ m_vidws.treset_in(ASSERT_LINE);
+}
- // Look for components responding to the logical address
- found = access_logical_w(space, offset, data, mem_mask);
- m_waitcount = 2;
+/*
+ Wait state generation logic inside Vaquerro
+
+ Analysis of the logic diagram of the Vaquerro delivers the following
+ behavior (for the first GROM library; similar behavior applies for the
+ other libraries). Note that the CLKOUT line is inverted.
+
+ 1. When the GROMs are unselected by address (SGFAP), the SRY line is Z
+ (System READY). The GROM ready line (SGMRY) has no effect.
+ 2. When SGFAP is asserted while the internal counter is off, the
+ READY line changes from Z to Low and the GROM select line (SGCS) is
+ asserted (both immediately, before the next tick edge). SGMRY has no effect.
+ The circuit state is constant during further clock ticks.
+ 3. After being selected, when SGMRY is asserted (GROM is ready), SRY
+ changes to High on the next trailing edge. This will allow the
+ CPU to complete the GROM access on the next cycle,
+ and the address bus will change, typically deselecting the GROMs.
+ Until this deselection, the circuit state remains constant
+ (SGCS asserted, READY=H).
+ 4. When the GROMs are deselected, SRY changes to Z, and SGCS is cleared
+ (immediately). A counter is started at 0 that is incremented on each clock
+ tick (leading edge).
+ 5. When SGFAP is asserted while the counter is less that 15, SRY changes
+ to Low immediately. SGCS remains cleared, so the GROMs are not selected.
+ While SGFAP stays cleared, the counter completes its way to 15,
+ then 0, and turns off.
+ 6. When the counter reaches 15, it returns to 0 on the next tick
+ (leading). On the following trailing edge, the GROM select line is
+ asserted, while the READY line remains Low.
+ 7. Continue at 3.
+*/
+void waitstate_generator::select_in(bool addressed)
+{
+ m_addressed = addressed;
+}
- if (!found)
- {
- // In that case, the address decoder could not find a suitable device.
- // This means the logical address is transformed by the mapper.
- // NOTE: Use "+", not OR. The offset is not a prefix.
- UINT32 pas_address = m_pas_offset[(offset & 0xf000)>>12] + (offset & 0xfff);
+int waitstate_generator::select_out()
+{
+ return (!m_counting && m_addressed)? m_selvalue : 0;
+}
- // So now let's do the same as above with physical addresses
- access_physical_w(space, pas_address, data, mem_mask);
+/*
+ Should be low by default.
+*/
+line_state waitstate_generator::ready_out()
+{
+ return (m_ready && !m_counting && m_generate)? ASSERT_LINE : CLEAR_LINE;
+}
- // The PAS area requires one more wait state, as the address bus
- // is multiplexed
- m_waitcount = 3;
- }
+bool waitstate_generator::is_counting()
+{
+ return m_counting;
+}
- // Insert wait states and let CPU enter wait state
- m_ready(CLEAR_LINE);
+bool waitstate_generator::is_generating()
+{
+ return m_generate;
+}
+
+bool waitstate_generator::is_ready()
+{
+ return m_ready;
}
-/***************************************************************************
- Indirect calls (mapper calls itself)
-***************************************************************************/
/*
- This method is called by the mapper itself for
- f870 (NATIVE): mapper: ignore
- 8810 (TI99EM): mapper: ignore
- ff4000 (PHYSIC): DSR
+ READY in. This may only show an effect with the next trailing edge of CLKOUT.
*/
-READ8Z_MEMBER( mainboard8_device::readz )
+void grom_waitstate_generator::ready_in(line_state ready)
{
- if ((offset & 0xffe000)==0xff4000)
+ m_ready = (ready==ASSERT_LINE);
+}
+
+void grom_waitstate_generator::clock_in(line_state clkout)
+{
+ if (clkout == ASSERT_LINE)
+ {
+ if (m_counting) m_counter++;
+ }
+ else
{
- if (m_dsr_selected)
+ if (m_counting && m_counter==16)
{
- // Starts at 0x4000 in the image
- *value = m_rom1[0x4000 | (offset & 0x1fff)];
- if (TRACE_MEM) logerror("%s: (intDSR) %04x -> %02x\n", tag(), offset, *value);
+ m_counter = 0;
+ m_counting = false;
}
else
{
- if (m_hexbus_selected)
- {
- if ((offset & 0x1ff0)==0x1ff0)
- {
- *value = m_oso->read(space, (offset>>1) & 0x0003);
- }
- else
- {
- // Starts at 0x6000 in the image
- *value = m_rom1[0x6000 | (offset & 0x1fff)];
- if (TRACE_MEM) logerror("%s: (HexDSR) %04x -> %02x\n", tag(), offset, *value);
- }
- }
+ if (!m_addressed && m_generate) m_counting = true;
+ m_generate = ((m_addressed || m_counting) && (m_counter != 15));
}
}
+}
+
+void waitstate_generator::treset_in(line_state reset)
+{
+ if (reset==ASSERT_LINE)
+ {
+ m_counter = 0;
+ m_generate = m_counting = m_addressed = false;
+ }
+}
+
+void video_waitstate_generator::clock_in(line_state clkout)
+{
+ if (clkout == ASSERT_LINE)
+ {
+ if (m_counting) m_counter++;
+ }
else
{
- if (((offset & 0xfff0)==0xf870 && m_CRUS==false)||(((offset & 0xfff0)==0x8810 && m_CRUS==true)))
+ if (m_counting && m_counter==7)
+ {
+ m_counter = 0;
+ m_counting = false;
+ }
+ else
{
- if (TRACE_MEM) logerror("%s: read access to mapper ignored: %04x\n", tag(), offset);
+ if (!m_addressed && m_generate) m_counting = true;
+ m_generate = ((m_addressed || m_counting) && (m_counter != 6));
}
}
}
+const device_type VAQUERRO = &device_creator<vaquerro_device>;
+
+/***************************************************************************
+ ===== MOFETTA: Physical Address Space decoder =====
+
+ Physical address space (PAS)
+ ============================
+ The PAS is 24 bits wide and accessed via the custom mapper chip nicknamed
+ "Amigo". The mapper exchanges map definitions with SRAM (see LAS). That
+ means, a map can be prepared in SRAM, and for activating it, the mapper
+ is accessed on its port, telling it to load or save a map.
+
+ 000000-00ffff: 64 KiB console DRAM
+ 010000-efffff: undefined
+
+ f00000-f03fff: PASCAL support ROM (not mentioned in [1])
+
+ f04000-feffff: undefined
+ ff0000 : unmapped (code for mapper)
+ ff0001-ff3fff: undefined
+ ff4000-ff5fff: DSR ROM in Peripheral Box, Hexbus DSR (CRU 1700) or additional ROM (CRU 2700)
+ ff6000-ff9fff: Cartridge ROM space
+ ffa000-ffdfff: 16 KiB ROM1
+ ffe000-ffe00f: Interrupt level sense
+ ffe010-ffffff: undefined
+
+
+***************************************************************************/
+
+enum
+{
+ UNDEF=0,
+ DRAM,
+ PASCAL,
+ INTERNAL
+};
+
+mofetta_device::mofetta_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : device_t(mconfig, MOFETTA, "Physical Address Space Decoder", tag, owner, clock, "ti998_mofetta", __FILE__),
+ m_gotfirstword(false)
+{
+}
+
+SETADDRESS_DBIN_MEMBER( mofetta_device::set_address )
+{
+ if (!m_gotfirstword)
+ {
+ // Store the first word and wait for clearing of MSAST
+ if (TRACE_MOFETTA) logerror("Got the upper word of the address: %04x\n", offset);
+ m_address_latch = offset;
+ }
+ else
+ {
+ // Second part - now decode the address
+ if (TRACE_MOFETTA) logerror("Got the lower word of the address: %04x\n", offset);
+
+ bool acs, tcs, rcs, acsx;
+ bool reading = (state==ASSERT_LINE);
+ int offbase = (offset & 0xe000);
+
+ // PASCAL ROM select (16K)
+ m_prcs = (m_prefix == 0xf0) && ((offset & 0xc000) == 0x0000);
+
+ // Hexbus select
+ acs = (m_prefix == 0xff) && (offbase == 0x4000) && m_alcpg;
+
+ // Internal DSR select (ff4000-ff5fff @ CRU>2700)
+ tcs = (m_prefix == 0xff) && (offbase == 0x4000) && m_txspg;
+
+ // Hexbus select (ff4000-ff5fef @ CRU>1700), excluding OSO
+ acsx = acs && ((offset & 0x1ff0)!=0x1ff0);
+
+ // Upper 16K of ROM1
+ m_rom1am = !((offbase == 0xa000) || (offbase == 0xc000));
+
+ // ROM select
+ rcs = (m_prefix == 0xff) && reading && !m_rom1am;
+
+ // ROM1 select (containing 16K ROM, 8K TTS, 8K ACS)
+ m_rom1cs = tcs || rcs || acsx;
+
+ // Accessing OSO (ff5ff0 @ CRU>1700)
+ m_alccs = acs && ((offset & 0x1ff0)==0x1ff0);
+
+ // Second half of ROM or ACS
+ m_rom1al = reading && (m_prefix == 0xff) && ((offbase == 0xc000) || acs);
+
+ // Cartridge port (ff6000-ff9fff)
+ m_cmas = (m_prefix == 0xff) && ((offbase == 0x6000) || (offbase == 0x8000));
+
+ m_gotfirstword = false;
+ }
+}
+
/*
- This method is called by the mapper itself for
- ff4000 (PHYSIC): DSR. ignore
+ Mofetta delivers the GROMCLK. In the 99/4A, this clock is produced by the VDP.
+ Apart from that, Mofetta does not need the CLKOUT.
+*/
+WRITE_LINE_MEMBER( mofetta_device::clock_in )
+{
+ if (state == CLEAR_LINE) // TODO: Correct edge?
+ {
+ m_gromclock_count++;
+ if (m_gromclock_count >=3)
+ {
+ m_gromclk_up = !m_gromclk_up;
+ m_gromclock_count = 0;
+ }
+ }
+}
+
+READ_LINE_MEMBER( mofetta_device::alccs_out )
+{
+ return (m_alccs && m_pmemen)? ASSERT_LINE : CLEAR_LINE;
+}
+
+READ_LINE_MEMBER( mofetta_device::gromclk_out )
+{
+ return m_gromclk_up? ASSERT_LINE : CLEAR_LINE;
+}
+
+READ_LINE_MEMBER( mofetta_device::rom1cs_out )
+{
+ return (m_rom1cs && m_pmemen)? ASSERT_LINE : CLEAR_LINE;
+}
+READ_LINE_MEMBER( mofetta_device::rom1am_out )
+{
+ return (m_rom1am && m_pmemen)? ASSERT_LINE : CLEAR_LINE;
+}
+
+READ_LINE_MEMBER( mofetta_device::rom1al_out )
+{
+ return (m_rom1al && m_pmemen)? ASSERT_LINE : CLEAR_LINE;
+}
+
+READ_LINE_MEMBER( mofetta_device::prcs_out )
+{
+ return (m_prcs && m_pmemen)? ASSERT_LINE : CLEAR_LINE;
+}
+
+READ_LINE_MEMBER( mofetta_device::cmas_out )
+{
+ return (m_cmas && m_pmemen)? ASSERT_LINE : CLEAR_LINE;
+}
+
+/*
+ Asserted when a PEB access occurs
*/
-WRITE8_MEMBER( mainboard8_device::write )
+READ_LINE_MEMBER( mofetta_device::dbc_out )
+{
+ return (m_lasreq || m_cmas || m_rom1cs || m_skdrcs || !m_pmemen)? CLEAR_LINE : ASSERT_LINE;
+}
+
+WRITE8_MEMBER(mofetta_device::cruwrite)
{
- if ((offset & 0xffe000)==0xff4000)
+ if ((offset & 0xff00)==0x2700)
{
- if (m_hexbus_selected)
+ if ((offset & 0x0002)!=0)
{
- if ((offset & 0x1ff0)==0x1ff0)
- {
- m_oso->write(space, (offset>>1) & 0x0003, data);
- }
- else
- {
- logerror("%s: Write access to Hexbus DSR address %06x ignored\n", tag(), offset);
- }
+ // SWRST (Software reset)
+ // Value seems to be irrelevant
+ if (TRACE_CRU) logerror("Doing a software reset by SBO 2702\n");
+ m_mainboard->reset_console(ASSERT_LINE);
+ m_mainboard->reset_console(CLEAR_LINE);
}
else
{
- if (m_dsr_selected)
- {
- logerror("%s: Write access to internal DSR address %06x ignored\n", tag(), offset);
- }
- else
- {
- logerror("%s: Write access to unmapped DSR space at address %06x ignored\n", tag(), offset);
- }
+ m_txspg = (data!=0); // CRU>2700
+ if (TRACE_CRU) logerror("Turning %s CRU>2700\n", m_txspg? "on" : "off");
}
}
else
{
- if (((offset & 0xfff0)==0xf870 && m_CRUS==false)||(((offset & 0xfff0)==0x8810 && m_CRUS==true)))
+ if ((offset & 0xff00)==0x1700)
{
- mapwrite(offset, data);
+ m_alcpg = (data!=0); // CRU>1700
+ if (TRACE_CRU) logerror("Turning %s CRU>1700\n", m_alcpg? "on" : "off");
}
}
}
/*
- Reconfigure mapper. Writing to this address copies the values in the
- SRAM into the mapper and vice versa.
- Format:
- 0000 bbbl; bbb=bank, l=load
-
- TODO: Emulate properly, making use of HOLD
+ Setting or clearing the MSAST line.
*/
-void mainboard8_device::mapwrite(int offset, UINT8 data)
+WRITE_LINE_MEMBER( mofetta_device::msast_in )
{
- if ((data & 0xf0)==0x00)
+ if (state == ASSERT_LINE)
{
- int bankindx = (data & 0x0e)>>1;
- if (data & 1)
+ if (m_msast == CLEAR_LINE) // Leading edge
{
- if (TRACE_MAP) logerror("%s: load mapper from SRAM, bank %d\n", tag(), bankindx);
- // Load from SRAM
- // In reality the CPU is put on HOLD during this transfer
- for (int i=0; i < 16; i++)
- {
- int ptr = (bankindx << 6);
- m_pas_offset[i] = (m_sram[(i<<2) + ptr] << 24) | (m_sram[(i<<2)+ ptr+1] << 16)
- | (m_sram[(i<<2) + ptr+2] << 8) | (m_sram[(i<<2) + ptr+3]);
- if (TRACE_MAP) logerror("%s: load %d=%08x\n", tag(), i, m_pas_offset[i]);
- }
- }
- else
- {
- if (TRACE_MAP) logerror("%s: store mapper to SRAM, bank %d\n", tag(), bankindx);
- // Store in SRAM
- for (int i=0; i < 16; i++)
- {
- int ptr = (bankindx << 6);
- m_sram[(i<<2) + ptr] = (m_pas_offset[i] >> 24)& 0xff;
- m_sram[(i<<2) + ptr +1] = (m_pas_offset[i] >> 16)& 0xff;
- m_sram[(i<<2) + ptr +2] = (m_pas_offset[i] >> 8)& 0xff;
- m_sram[(i<<2) + ptr +3] = (m_pas_offset[i])& 0xff;
- if (TRACE_MAP) logerror("%s: save %d=%08x\n", tag(), i, m_pas_offset[i]);
- }
+ m_gotfirstword = true; // Process first word
+ // We now have the first part, containing the flags and the upper byte.
+ m_prefix = m_address_latch & 0xff;
}
}
+ // TODO: Evaluate the first three bits
+ m_msast = (line_state)state;
}
-/***************************************************************************
- Lookup methods.
-***************************************************************************/
+WRITE_LINE_MEMBER( mofetta_device::pmemen_in )
+{
+ m_pmemen = (state==ASSERT_LINE);
+}
-bool mainboard8_device::access_logical_r(address_space& space, offs_t offset, UINT8 *value, UINT8 mem_mask )
+WRITE_LINE_MEMBER( mofetta_device::lascs_in )
{
- bool found = false;
- logically_addressed_device *ldev = m_logcomp.first();
- bus8z_device *bdev;
+ m_lasreq = (state==ASSERT_LINE);
+}
- if (TRACE_DETAIL) logerror("%s: offset=%04x; CRUS=%d, PTGEN=%d\n", tag(), offset, m_CRUS? 1:0, m_PTGE? 0:1);
- while (ldev != nullptr)
- {
- if (TRACE_DETAIL) logerror("%s: checking node=%s\n", tag(), ldev->m_config->name);
- // Check the mode
- if (((ldev->m_config->mode == NATIVE) && (m_CRUS==false))
- || ((ldev->m_config->mode == TI99EM) && (m_CRUS==true))
- || ((ldev->m_config->mode == PATGEN) && (m_PTGE==true)))
- {
- if ((offset & ldev->m_config->address_mask)==ldev->m_config->select_pattern)
- {
- switch (ldev->m_kind)
- {
- case MAP8_SRAM:
- *value = m_sram[offset & ~ldev->m_config->address_mask];
- if (TRACE_MEM) logerror("%s: (SRAM) %04x -> %02x\n", tag(), offset, *value);
- break;
- case MAP8_ROM0:
- // Starts at 0000
- *value = m_rom0[offset & ~ldev->m_config->address_mask];
- if (TRACE_MEM) logerror("%s: (ROM0) %04x -> %02x\n", tag(), offset, *value);
- break;
- case MAP8_DEV:
- // device
- bdev = static_cast<bus8z_device*>(ldev->m_device);
- bdev->readz(space, offset, value, mem_mask);
- if (TRACE_MEM) logerror("%s: (dev %s) %04x -> %02x\n", tag(), ldev->m_config->name, offset, *value);
- break;
- default:
- if (TRACE_MEM) logerror("%s: Invalid kind for read access: %d\n", tag(), ldev->m_kind);
- }
- found = true;
- if (ldev->m_config->stop==STOP) break;
- }
- }
- ldev = ldev->m_next;
- }
- return found;
+WRITE_LINE_MEMBER( mofetta_device::skdrcs_in )
+{
+ m_skdrcs = (state==ASSERT_LINE);
}
-bool mainboard8_device::access_logical_w(address_space& space, offs_t offset, UINT8 data, UINT8 mem_mask )
+void mofetta_device::device_start()
{
- bool found = false;
- logically_addressed_device *ldev = m_logcomp.first();
- bus8z_device *bdev;
+ logerror("Starting\n");
+ m_mainboard = downcast<mainboard8_device*>(owner());
+}
- while (ldev != nullptr)
- {
- // Check the mode
- if (((ldev->m_config->mode == NATIVE) && (m_CRUS==false))
- || ((ldev->m_config->mode == TI99EM) && (m_CRUS==true))
- || ((ldev->m_config->mode == PATGEN) && (m_PTGE==true)))
- {
- if ((offset & ldev->m_config->address_mask)==(ldev->m_config->select_pattern | ldev->m_config->write_select))
- {
- switch (ldev->m_kind)
- {
- case MAP8_SRAM:
- m_sram[offset & ~ldev->m_config->address_mask] = data;
- if (TRACE_MEM) logerror("%s: (SRAM) %04x <- %02x\n", tag(), offset, data);
- break;
- case MAP8_ROM0:
- if (TRACE_MEM) logerror("%s: (ROM0) %04x <- %02x (ignored)\n", tag(), offset, data);
- break;
- case MAP8_DEV:
- // device
- bdev = static_cast<bus8z_device*>(ldev->m_device);
- bdev->write(space, offset, data, mem_mask);
- if (TRACE_MEM) logerror("%s: (dev %s) %04x <- %02x\n", tag(), ldev->m_config->name, offset, data);
- break;
- default:
- if (TRACE_MEM) logerror("%s: Invalid kind for write access: %d\n", tag(), ldev->m_kind);
- }
- found = true;
- if (ldev->m_config->stop==STOP) break;
- }
- }
- ldev = ldev->m_next;
- }
- return found;
+void mofetta_device::device_reset()
+{
+ m_gotfirstword = false;
+ m_alcpg = false;
+ m_txspg = false;
+ m_prefix = 0;
+}
+
+
+const device_type MOFETTA = &device_creator<mofetta_device>;
+
+/***************************************************************************
+
+ ==============================
+ Mapper (codename "Amigo")
+ ==============================
+
+ Unfortunately, we do not have logic diagrams for Amigo, so we have to
+ guess how it is actually working.
+
+ Initial setting of mapper (as defined in the power-up routine, TI-99/4A mode)
+
+ 0 00ff0000 -> Unmapped; logical address 0000...0fff = ROM0
+ 1 00ff0000 -> Unmapped; logical address 1000...1fff = ROM0
+ 2 00000800 -> DRAM; 2000 = 000800, 2fff = 0017ff
+ 3 00001800 -> DRAM; 3000 = 001800, 3fff = 0027ff
+ 4 00ff4000 -> DSR space (internal / ioport)
+ 5 00ff5000 -> DSR space (internal / ioport)
+ 6 00ff6000 -> Cartridge space (6000..6fff)
+ 7 00ff7000 -> Cartridge space (7000..7fff)
+ 8 00ff0000 -> Unmapped; device ports (VDP) and SRAM
+ 9 00ff0000 -> Unmapped; device ports (Speech, GROM)
+ A 00002800 -> DRAM; a000 = 002800, afff = 0037ff
+ B 00003800 -> DRAM; b000 = 003800, bfff = 0047ff
+ C 00004800 -> DRAM; c000 = 004800, cfff = 0057ff
+ D 00005800 -> DRAM; d000 = 005800, dfff = 0067ff
+ E 00006800 -> DRAM; e000 = 006800, efff = 0077ff
+ F 00007800 -> DRAM; f000 = 007800, ffff = 0087ff
+
+ Format of map table entry
+
+ +--+---+---+---+---+---+---+---+ +-----------+ +----------+ +---------+
+ | W| X | R | 0 | 0 | 0 | 0 | 0 | | Upper (8) | | High (8) | | Low (8) |
+ +--+---+---+---+---+---+---+---+ +-----------+ +----------+ +---------+
+
+ W: Write protection if set to 1
+ X: Execute protection if set to 1
+ R: Read protection if set to 1
+
+ When a protection violation occurs, the tms9901 INT1* pin is pulled low
+ (active). The pin remains low until the mapper status register is read.
+
+ Address handling
+ ----------------
+ Physical address is (Upper * 2^16) + (High * 2^8) + Low
+
+ The mapper calculates the actual physical address by looking up the
+ table entry from the first four bits of the logical address and then
+ *adding* the remaining 12 bits of the logical address on the map value.
+
+ The value 0xff0000 is used to indicate a non-mapped area.
+
+ Mapper control register
+ -----------------------
+ The mapper control register is used to initiate a map load/save operation.
+
+ +---+---+---+---+---+---+---+---+
+ | 0 | 0 | 0 | 0 | Map File | RW|
+ +---+---+---+---+---+---+---+---+
+
+ The map file is a number from 0-7 indicating the set of map values for the
+ operation, which means the location in SRAM where the next 64 values are
+ loaded from or stored into.
+
+ RW = 1: load from SRAM into mapper
+ RW = 0: store from mapper into SRAM
+
+ When read, the mapper register returns the violation flags:
+ +---+---+---+---+---+---+---+---+
+ | W | X | R | 0 | 0 | 0 | 0 | 0 |
+ +---+---+---+---+---+---+---+---+
+
+***************************************************************************/
+
+amigo_device::amigo_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+: device_t(mconfig, AMIGO, "Address space mapper", tag, owner, clock, "ti998_amigo", __FILE__),
+ m_logical_space(true),
+ m_crus(ASSERT_LINE)
+{
}
+enum
+{
+ IDLE = 0,
+ CREATE_PADDR,
+ ADDR_MSW,
+ ADDR_LSW,
+ SRAMLOAD,
+ SRAMSAVE
+};
-void mainboard8_device::access_physical_r( address_space& space, offs_t pas_address, UINT8 *value, UINT8 mem_mask )
+/*
+ Incoming READY line (SRDY)
+*/
+WRITE_LINE_MEMBER( amigo_device::srdy_in )
{
- physically_addressed_device *pdev = m_physcomp.first();
- bus8z_device *bdev;
+ if (TRACE_READY) logerror("Incoming SRDY = %d\n", state);
+ m_srdy = (line_state)state;
- while (pdev != nullptr)
+ // If the access is going to logical space, pass through the READY line
+ if (m_logical_space)
{
- if ((pas_address & pdev->m_config->address_mask)==pdev->m_config->select_pattern)
- {
- switch (pdev->m_kind)
- {
- case MAP8_DRAM:
- *value = m_dram[pas_address & ~pdev->m_config->address_mask];
- if (TRACE_MEM) logerror("%s: (DRAM) %06x -> %02x\n", tag(), pas_address, *value);
- break;
- case MAP8_ROM1A0:
- // Starts at 0000 in the image, 8K
- *value = m_rom1[pas_address & 0x1fff];
- if (TRACE_MEM) logerror("%s: (ROM) %06x -> %02x\n", tag(), pas_address, *value);
- break;
- case MAP8_ROM1C0:
- // Starts at 2000 in the image, 8K
- *value = m_rom1[0x2000 | (pas_address & 0x1fff)];
- if (TRACE_MEM) logerror("%s: (ROM) %06x -> %02x\n", tag(), pas_address, *value);
- break;
- case MAP8_PCODE:
- *value = m_pcode[pas_address & 0x3fff];
- if (TRACE_MEM) logerror("%s: (PCODE) %06x -> %02x\n", tag(), pas_address, *value);
- break;
- case MAP8_INTS:
- // Interrupt sense
- logerror("%s: ILSENSE not implemented.\n", tag());
- break;
- case MAP8_DEV:
- // devices
- bdev = static_cast<bus8z_device*>(pdev->m_device);
- bdev->readz(space, pas_address, value, mem_mask);
- if (TRACE_MEM) logerror("%s: (dev %s) %06x -> %02x\n", tag(), pdev->m_config->name, pas_address, *value);
- break;
- default:
- logerror("%s: Invalid kind for physical read access: %d\n", tag(), pdev->m_kind);
- }
- if (pdev->m_config->stop==STOP) break;
- }
- pdev = pdev->m_next;
+ if (TRACE_CPURY) logerror("Setting CPURY = %d (SRDY)\n", m_ready_out);
+ m_ready_out = m_srdy;
}
}
-void mainboard8_device::access_physical_w( address_space& space, offs_t pas_address, UINT8 data, UINT8 mem_mask )
+WRITE_LINE_MEMBER( amigo_device::memen_in )
{
- physically_addressed_device *pdev = m_physcomp.first();
- bus8z_device *bdev;
+ m_memen = (state==ASSERT_LINE);
+}
- while (pdev != nullptr)
- {
- if ((pas_address & pdev->m_config->address_mask)==(pdev->m_config->select_pattern | pdev->m_config->write_select))
- {
- switch (pdev->m_kind)
- {
- case MAP8_DRAM:
- m_dram[pas_address & ~pdev->m_config->address_mask] = data;
- if (TRACE_MEM) logerror("%s: (DRAM) %06x <- %02x\n", tag(), pas_address, data);
- break;
- case MAP8_ROM1A0:
- case MAP8_ROM1C0:
- if (TRACE_MEM) logerror("%s: (ROM1) %06x <- %02x (ignored)\n", tag(), pas_address, data);
- break;
- case MAP8_PCODE:
- if (TRACE_MEM) logerror("%s: (PCODE) %06x <- %02x (ignored)\n", tag(), pas_address, data);
- break;
- case MAP8_INTS:
- // Interrupt sense
- logerror("%s: write to ilsense ignored\n", tag());
- break;
- case MAP8_DEV:
- // devices
- bdev = static_cast<bus8z_device*>(pdev->m_device);
- if (TRACE_MEM) logerror("%s: (dev %s) %06x <- %02x\n", tag(), pdev->m_config->name, pas_address, data);
- bdev->write(space, pas_address, data, mem_mask);
- break;
- default:
- logerror("%s: Invalid kind for physical write access: %d\n", tag(), pdev->m_kind);
- }
- if (pdev->m_config->stop==STOP) break;
- }
- pdev = pdev->m_next;
- }
+/*
+ Polled from the mainboard
+*/
+READ_LINE_MEMBER( amigo_device::cpury_out )
+{
+ return m_ready_out;
}
/*
- The mapper is connected to the clock line in order to operate
- the wait state counter.
+ Polled from the mainboard
*/
-void mainboard8_device::clock_in(int clock)
+READ_LINE_MEMBER( amigo_device::sramcs_out )
{
- if (clock==ASSERT_LINE && m_waitcount!=0)
- {
- m_waitcount--;
- if (m_waitcount==0) m_ready(ASSERT_LINE);
- }
+ return m_sram_accessed && m_memen? ASSERT_LINE : CLEAR_LINE;
}
+/*
+ SKDRCS line (maybe "Sixty-four Kilobyte DRam Chip Select"). We assume that
+ Amigo asserts the select line not before the whole address was written.
+ This is actually more than needed because we only have 64K DRAM (which
+ would only need a 16 bit address), and Amigo itself selects it.
+*/
+READ_LINE_MEMBER( amigo_device::skdrcs_out )
+{
+ return m_dram_accessed && (m_amstate == IDLE) && m_memen? ASSERT_LINE : CLEAR_LINE;
+}
-/***************************************************************************
- DEVICE LIFECYCLE FUNCTIONS
-***************************************************************************/
/*
- We need to do all of the configuration in device_start since we don't have all
- required links earlier.
+ Incoming CRUS line. Needed to set the mapper config addresses.
+*/
+WRITE_LINE_MEMBER( amigo_device::crus_in )
+{
+ m_crus = (line_state)state;
+}
- Note that device_reset is too late; the initial context switch occurs earlier.
+/*
+ Incoming LASCS line.
*/
-void mainboard8_device::device_start()
+WRITE_LINE_MEMBER( amigo_device::lascs_in )
{
- logerror("%s: Starting mapper\n", tag());
+ m_logical_space = (state==ASSERT_LINE);
+}
+
+/*
+ The logical address bus has been set. The Amigo chip now has to map this
+ address to a physical address. There are three phases (3 clock ticks):
+ 1. Sample the logical address lines, determine the map register
+ (first four bits), create the physical address by adding the remaining
+ 12 bits and the map register contents
+ 2. Set the physical address bus with the first 16 bits of the physical
+ address. Assert the MSAST line.
+ 3. Set the physical address bus with the second 16 bits of the physical
+ address. Clear the MSAST line. Forward any incoming READY=0 to the CPU.
+*/
+SETOFFSET_MEMBER( amigo_device::set_address )
+{
+ // Check whether the mapper itself is accessed
+ int mapaddr = (m_crus==ASSERT_LINE)? 0x8810 : 0xf870;
+ m_mapper_accessed = ((offset & 0xfff1)==mapaddr);
+
+ // or SRAM
+ int sramaddr = (m_crus==ASSERT_LINE)? 0x8000 : 0xf000;
+ m_sram_accessed = ((offset & 0xf800)==sramaddr);
+
+ m_logical_space |= (m_mapper_accessed || m_sram_accessed);
+
+ // Is the address not in the logical address space?
+ if (!m_logical_space)
+ {
+ if (TRACE_AMIGO) logerror("Amigo decoding; %04x is a physical address.\n", offset);
+ // Build the physical address
+ // The first three bits are the protection bits (Write, Execute, Read)
+ // Theoretically, the addition of the logical address could mess up those
+ // first three bits, but the physical address is only 24 bits wide, so we
+ // have a space of 5 zeros between the protection bits and the address.
+ // We should just clear those five bits after the addition.
+
+ m_physical_address = ((offset & 0x0fff) + m_base_register[(offset >> 12) & 0x000f]) & 0x00ffffff;
- // String values of the pseudo constants, used in the configuration.
- const char *const pseudodev[7] = { SRAMNAME, ROM0NAME, ROM1A0NAME, ROM1C0NAME, DRAMNAME, PCODENAME, INTSNAME };
+ // TODO: Process flags
- const mapper8_config *conf = reinterpret_cast<const mapper8_config *>(static_config());
+ // Is it DRAM?
+ m_dram_accessed = (m_physical_address & 0x00ff0000)==0;
- const mapper8_list_entry *entry = conf->devlist;
- m_ready.resolve_safe();
+ // This takes one clock pulse.
+ m_amstate = CREATE_PADDR;
- m_sram = machine().root_device().memregion(SRAM_TAG)->base();
- m_dram = machine().root_device().memregion(DRAM_TAG)->base();
- m_rom0 = machine().root_device().memregion(ROM0_TAG)->base();
- m_rom1 = machine().root_device().memregion(ROM1_TAG)->base();
- m_pcode = machine().root_device().memregion(PCODEROM_TAG)->base();
+ // Pull down READY
+ m_ready_out = CLEAR_LINE;
+
+ if (TRACE_CPURY) logerror("Setting CPURY = %d (PAS)\n", m_ready_out);
+ }
+ else
+ {
+ // This was a logical space access. Pass through READY.
+ m_dram_accessed = false;
+ m_amstate = IDLE;
+ m_ready_out = m_srdy;
+ if (TRACE_CPURY) logerror("Setting CPURY = %d (LAS)\n", m_ready_out);
+ }
+}
+
+/*
+ Read the mapper status bits
+*/
+READ8_MEMBER( amigo_device::read )
+{
+ // Read the protection status bits and reset them
+ UINT8 value = m_protflag;
+ m_protflag = 0;
+ return value;
+}
- // Clear the lists
- m_logcomp.reset();
- m_physcomp.reset();
+/*
+ Configure the mapper. This is the only reason to write to the AMIGO.
+*/
+WRITE8_MEMBER( amigo_device::write )
+{
+ // Load or save map file
+ if ((data & 0xf0)==0x00)
+ {
+ // Need to HOLD the CPU
+ m_amstate = ((data & 1)==1)? SRAMLOAD : SRAMSAVE;
+ m_sram_address = (data & 0x0e) << 5;
+ m_hold_acknowledged = false;
+ m_basereg = 0;
+ m_mapvalue = 0;
+ m_mainboard->hold_cpu(ASSERT_LINE);
+ }
+ else logerror("Invalid value written to Amigo: %02x\n", data);
+}
- // Now building the list of active devices at this mapper.
- // Coyping partly from datamux.c.
- if ( entry != nullptr )
+WRITE_LINE_MEMBER( amigo_device::clock_in )
+{
+ if (state==CLEAR_LINE)
{
- bool done = false;
- for (int i=0; !done; i++)
+ switch (m_amstate)
{
- if (entry[i].name == nullptr)
- {
- done = true;
- }
- else
- {
- device_t *dev = nullptr;
- mapper8_device_kind kind = MAP8_UNDEF;
-
- for (int j=1; (j < 8) && (kind == MAP8_UNDEF); j++)
- {
- // Pseudo devices are enumerated as 1 ... 6 (see MAP8_SRAM etc.)
- if (strcmp(entry[i].name, pseudodev[j-1])==0) kind = (mapper8_device_kind)j;
- }
- if (kind==MAP8_UNDEF)
- {
- // This entry points to a "real" device, not to a special constant
- kind = MAP8_DEV;
- dev = machine().device(entry[i].name);
- }
- if (kind != MAP8_DEV || dev != nullptr)
- {
- if (entry[i].mode != PHYSIC)
- {
- auto ad = new logically_addressed_device(kind, (device_t*)dev, entry[i]);
- m_logcomp.append(*ad);
- if (TRACE_CONFIG) logerror("%s: Device %s mounted into logical address space.\n", tag(), entry[i].name);
- }
- else
- {
- auto ad = new physically_addressed_device(kind, (device_t*)dev, entry[i]);
- m_physcomp.append(*ad);
- if (TRACE_CONFIG) logerror("%s: Device %s mounted into physical address space.\n", tag(), entry[i].name);
- }
- }
- else
- {
- if (TRACE_CONFIG) logerror("%s: Device %s not found.\n", tag(), entry[i].name);
- }
- }
+ case IDLE:
+ break;
+ case CREATE_PADDR:
+ // Address has been created
+ m_amstate = ADDR_MSW;
+ break;
+ case ADDR_MSW:
+ // Transmit the first word (without the protection bits)
+ m_mainboard->set_paddress((m_physical_address >> 16) & 0x00ff);
+ m_amstate = ADDR_LSW;
+ break;
+ case ADDR_LSW:
+ m_mainboard->msast_in(ASSERT_LINE); // Pulse MSAST
+ m_mainboard->msast_in(CLEAR_LINE);
+ m_mainboard->set_paddress(m_physical_address & 0xffff);
+ m_amstate = IDLE;
+ m_ready_out = m_srdy; // Propagate incoming READY
+ break;
+
+ case SRAMLOAD:
+ if (m_hold_acknowledged) mapper_load();
+ break;
+
+ case SRAMSAVE:
+ if (m_hold_acknowledged) mapper_save();
+ break;
+
+ default:
+ logerror("Invalid state in mapper: %d\n", m_amstate);
}
}
- if (TRACE_CONFIG) logerror("%s: Mapper logical device count = %d\n", tag(), m_logcomp.count());
- if (TRACE_CONFIG) logerror("%s: Mapper physical device count = %d\n", tag(), m_physcomp.count());
+}
- m_dsr_selected = false;
- m_CRUS = true;
- m_PTGE = false;
+void amigo_device::mapper_load()
+{
+ m_mapvalue = (m_mapvalue << 8) | m_sram[m_sram_address++];
- // Clean mapper
- for (auto & elem : m_pas_offset) elem = 0;
+ if ((m_sram_address & 0x03)==0)
+ {
+ if (TRACE_MAP) logerror("Loaded basereg %02d = %08x\n", m_basereg, m_mapvalue);
+ m_base_register[m_basereg++] = m_mapvalue;
+ }
+ if (m_basereg == 16)
+ {
+ m_amstate = IDLE;
+ m_mainboard->hold_cpu(CLEAR_LINE);
+ }
}
-void mainboard8_device::device_reset()
+void amigo_device::mapper_save()
{
- m_dsr_selected = false;
- m_CRUS = true;
- m_PTGE = false;
- m_waitcount = 0;
- m_hexbus_selected = false;
+ if ((m_sram_address & 0x03)==0)
+ {
+ if (m_basereg == 16)
+ {
+ m_amstate = IDLE;
+ m_mainboard->hold_cpu(CLEAR_LINE);
+ return;
+ }
+ else
+ {
+ m_mapvalue = m_base_register[m_basereg];
+ if (TRACE_MAP) logerror("Saving basereg %02d = %08x\n", m_basereg, m_mapvalue);
+ m_basereg++;
+ }
+ }
- // Clean mapper
- for (auto & elem : m_pas_offset) elem = 0;
+ m_sram[m_sram_address++] = (m_mapvalue >> 24) & 0xff;
+ m_mapvalue = m_mapvalue << 8;
+}
- m_ready(ASSERT_LINE);
+WRITE_LINE_MEMBER( amigo_device::holda_in )
+{
+ if (TRACE_MAP) logerror("HOLD acknowledged = %d\n", state);
+ m_hold_acknowledged = (state==ASSERT_LINE);
}
-MACHINE_CONFIG_FRAGMENT( ti998_mainboard )
- MCFG_DEVICE_ADD(OSO_TAG, OSO, 0)
-MACHINE_CONFIG_END
+void amigo_device::device_start()
+{
+ logerror("Starting\n");
+ m_mainboard = downcast<mainboard8_device*>(owner());
+}
-machine_config_constructor mainboard8_device::device_mconfig_additions() const
+void amigo_device::device_reset()
{
- return MACHINE_CONFIG_NAME( ti998_mainboard );
+ m_logical_space = true;
}
-const device_type MAINBOARD8 = &device_creator<mainboard8_device>;
+const device_type AMIGO = &device_creator<amigo_device>;
/***************************************************************************
- Custom chips of the TI-99/8
-
===== OSO: Hexbus interface =====
The Hexbus is a 4-bit peripheral bus with master/slave coordination. Bytes
@@ -858,12 +1911,12 @@ enum
SHSK = 0x01
};
-ti998_oso_device::ti998_oso_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
-: device_t(mconfig, OSO, "OSO Hexbus interface", tag, owner, clock, "ti998_oso", __FILE__), m_data(0), m_status(0), m_control(0), m_xmit(0)
+oso_device::oso_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+: device_t(mconfig, OSO, "Hexbus interface", tag, owner, clock, "oso", __FILE__), m_data(0), m_status(0), m_control(0), m_xmit(0)
{
}
-READ8_MEMBER( ti998_oso_device::read )
+READ8_MEMBER( oso_device::read )
{
int value = 0;
offset &= 0x03;
@@ -871,36 +1924,36 @@ READ8_MEMBER( ti998_oso_device::read )
{
case 0:
// read 5FF8: read data register
- if (TRACE_OSO) logerror("%s: Read data register = %02x\n", tag(), value);
+ if (TRACE_OSO) logerror("Read data register = %02x\n", value);
value = m_data;
break;
case 1:
// read 5FFA: read status register
value = m_status;
- if (TRACE_OSO) logerror("%s: Read status %02x\n", tag(), value);
+ if (TRACE_OSO) logerror("Read status %02x\n", value);
break;
case 2:
// read 5FFC: read control register
value = m_control;
- if (TRACE_OSO) logerror("%s: Read control register = %02x\n", tag(), value);
+ if (TRACE_OSO) logerror("Read control register = %02x\n", value);
break;
case 3:
// read 5FFE: read transmit register
value = m_xmit;
- if (TRACE_OSO) logerror("%s: Read transmit register = %02x\n", tag(), value);
+ if (TRACE_OSO) logerror("Read transmit register = %02x\n", value);
break;
}
return value;
}
-WRITE8_MEMBER( ti998_oso_device::write )
+WRITE8_MEMBER( oso_device::write )
{
offset &= 0x03;
switch (offset)
{
case 0:
// write 5FF8: write transmit register
- if (TRACE_OSO) logerror("%s: Write transmit register %02x\n", tag(), data);
+ if (TRACE_OSO) logerror("Write transmit register %02x\n", data);
m_xmit = data;
// We set the status register directly in order to prevent lock-ups
// until we have a complete Hexbus implementation
@@ -908,169 +1961,20 @@ WRITE8_MEMBER( ti998_oso_device::write )
break;
case 1:
// write 5FFA: write control register
- if (TRACE_OSO) logerror("%s: Write control register %02x\n", tag(), data);
+ if (TRACE_OSO) logerror("Write control register %02x\n", data);
m_control = data;
break;
default:
// write 5FFC, 5FFE: undefined
- if (TRACE_OSO) logerror("%s: Invalid write on %04x: %02x\n", tag(), (offset<<1) | 0x5ff0, data);
+ if (TRACE_OSO) logerror("Invalid write on %04x: %02x\n", (offset<<1) | 0x5ff0, data);
break;
}
}
-void ti998_oso_device::device_start()
+void oso_device::device_start()
{
+ logerror("Starting\n");
m_status = m_xmit = m_control = m_data = 0;
}
-const device_type OSO = &device_creator<ti998_oso_device>;
-
-
-// ========================================================================
-
-/****************************************************************************
-
- TI-99/8 Speech synthesizer subsystem
-
- The TI-99/8 contains a speech synthesizer inside the console, so we cannot
- reuse the spchsyn implementation of the P-Box speech synthesizer.
- Accordingly, this is not a ti_expansion_card_device.
-
- For comments on real timing see ti99/spchsyn.c
-
- Note that before the REAL_TIMING can be used we must first establish
- the set_address logic in 998board.
-
-*****************************************************************************/
-
-#define TMS5220_ADDRESS_MASK 0x3FFFFUL /* 18-bit mask for tms5220 address */
-#define SPEECHSYN_TAG "speechsyn"
-#define REAL_TIMING 0
-
-ti998_spsyn_device::ti998_spsyn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
-: bus8z_device(mconfig, SPEECH8, "TI-99/8 Onboard Speech synthesizer", tag, owner, clock, "ti998_speech", __FILE__), m_vsp(nullptr),
- m_ready(*this)
-{
-}
-
-/*
- Memory read
-*/
-#if REAL_TIMING
-// ====== This is the version with real timing =======
-READ8Z_MEMBER( ti998_spsyn_device::readz )
-{
- m_vsp->wsq_w(TRUE);
- m_vsp->rsq_w(FALSE);
- *value = m_vsp->read(offset) & 0xff;
- if (TRACE_SPEECH) logerror("%s: read value = %02x\n", tag(), *value);
-}
-
-/*
- Memory write
-*/
-WRITE8_MEMBER( ti998_spsyn_device::write )
-{
- m_vsp->rsq_w(m_vsp, TRUE);
- m_vsp->wsq_w(m_vsp, FALSE);
- if (TRACE_SPEECH) logerror("%s: write value = %02x\n", tag(), data);
- m_vsp->write(offset, data);
-}
-
-#else
-// ====== This is the version without real timing =======
-
-READ8Z_MEMBER( ti998_spsyn_device::readz )
-{
- machine().device("maincpu")->execute().adjust_icount(-(18+3)); /* this is just a minimum, it can be more */
- *value = m_vsp->status_r(space, offset, 0xff) & 0xff;
- if (TRACE_SPEECH) logerror("%s: read value = %02x\n", tag(), *value);
-}
-
-/*
- Memory write
-*/
-WRITE8_MEMBER( ti998_spsyn_device::write )
-{
- machine().device("maincpu")->execute().adjust_icount(-(54+3)); /* this is just an approx. minimum, it can be much more */
-
- /* RN: the stupid design of the tms5220 core means that ready is cleared */
- /* when there are 15 bytes in FIFO. It should be 16. Of course, if */
- /* it were the case, we would need to store the value on the bus, */
- /* which would be more complex. */
- if (!m_vsp->readyq_r())
- {
- attotime time_to_ready = attotime::from_double(m_vsp->time_to_ready());
- int cycles_to_ready = machine().device<cpu_device>("maincpu")->attotime_to_cycles(time_to_ready);
- if (TRACE_SPEECH && TRACE_DETAIL) logerror("%s: time to ready: %f -> %d\n", tag(), time_to_ready.as_double(), (int) cycles_to_ready);
-
- machine().device("maincpu")->execute().adjust_icount(-cycles_to_ready);
- machine().scheduler().timer_set(attotime::zero, FUNC_NULL);
- }
- if (TRACE_SPEECH) logerror("%s: write value = %02x\n", tag(), data);
- m_vsp->data_w(space, offset, data);
-}
-#endif
-
-/**************************************************************************/
-
-WRITE_LINE_MEMBER( ti998_spsyn_device::speech8_ready )
-{
- // The TMS5200 implementation uses TRUE/FALSE, not ASSERT/CLEAR semantics
- m_ready((state==0)? ASSERT_LINE : CLEAR_LINE);
- if (TRACE_SPEECH) logerror("%s: READY = %d\n", tag(), (state==0));
-
-#if REAL_TIMING
- // Need to do that here (see explanations in spchsyn.c)
- if (state==0)
- {
- m_vsp->rsq_w(TRUE);
- m_vsp->wsq_w(TRUE);
- }
-#endif
-}
-
-void ti998_spsyn_device::device_start()
-{
- m_ready.resolve_safe();
- m_vsp = subdevice<tms5220_device>(SPEECHSYN_TAG);
- speechrom_device* mem = subdevice<speechrom_device>("vsm");
- mem->set_reverse_bit_order(true);
-}
-
-void ti998_spsyn_device::device_reset()
-{
- if (TRACE_SPEECH) logerror("%s: reset\n", tag());
-}
-
-// Unlike the TI-99/4A, the 99/8 uses the CD2501ECD
-// The CD2501ECD is a tms5200/cd2501e with the rate control from the tms5220c added in.
-// (it's probably actually a tms5220c die with the cd2501e/tms5200 lpc rom masked onto it)
-MACHINE_CONFIG_FRAGMENT( ti998_speech )
- MCFG_DEVICE_ADD("vsm", SPEECHROM, 0)
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD(SPEECHSYN_TAG, CD2501ECD, 640000L)
- MCFG_TMS52XX_READYQ_HANDLER(WRITELINE(ti998_spsyn_device, speech8_ready))
- MCFG_TMS52XX_SPEECHROM("vsm")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
-
-/* Verified on a real machine: TI-99/8 uses the same speech rom contents
- as the TI speech synthesizer. */
-ROM_START( ti998_speech )
- ROM_REGION(0x8000, "vsm", 0)
- ROM_LOAD("cd2325a.vsm", 0x0000, 0x4000, CRC(1f58b571) SHA1(0ef4f178716b575a1c0c970c56af8a8d97561ffe))
- ROM_LOAD("cd2326a.vsm", 0x4000, 0x4000, CRC(65d00401) SHA1(a367242c2c96cebf0e2bf21862f3f6734b2b3020))
-ROM_END
-
-machine_config_constructor ti998_spsyn_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( ti998_speech );
-}
-
-const rom_entry *ti998_spsyn_device::device_rom_region() const
-{
- return ROM_NAME( ti998_speech );
-}
-const device_type SPEECH8 = &device_creator<ti998_spsyn_device>;
+const device_type OSO = &device_creator<oso_device>;
diff --git a/src/devices/bus/ti99x/998board.h b/src/devices/bus/ti99x/998board.h
index 9231d9be647..0a9367953c5 100644
--- a/src/devices/bus/ti99x/998board.h
+++ b/src/devices/bus/ti99x/998board.h
@@ -18,113 +18,365 @@
#include "emu.h"
#include "ti99defs.h"
+#include "machine/tmc0430.h"
+#include "video/tms9928a.h"
+#include "sound/sn76496.h"
#include "sound/tms5220.h"
+#include "gromport.h"
+#include "bus/ti99_peb/peribox.h"
extern const device_type MAINBOARD8;
-extern const device_type OSO;
-extern const device_type SPEECH8;
+#define VAQUERRO_TAG "vaquerro"
+#define MOFETTA_TAG "mofetta"
+#define AMIGO_TAG "amigo"
#define OSO_TAG "oso"
-#define SPEECHSYN_TAG "speechsyn"
-
-#define NATIVE 0
-#define TI99EM 1
-#define PATGEN 2
-#define PHYSIC 3
-#define CONT 0
-#define STOP 1
-
-#define SRAMNAME "SRAM"
-#define ROM0NAME "ROM0"
-#define ROM1A0NAME "ROM1A"
-#define ROM1C0NAME "ROM1C"
-#define INTSNAME "INTS"
-#define DRAMNAME "DRAM"
-#define PCODENAME "PCODE"
#define SRAM_SIZE 2048
#define DRAM_SIZE 65536
-// We use these constants in the read/write functions.
-enum mapper8_device_kind
+class mainboard8_device;
+extern const device_type VAQUERRO;
+extern const device_type MOFETTA;
+extern const device_type AMIGO;
+extern const device_type OSO;
+
+
+enum
{
- MAP8_UNDEF = 0,
- MAP8_SRAM,
- MAP8_ROM0,
- MAP8_ROM1A0,
- MAP8_ROM1C0,
- MAP8_DRAM,
- MAP8_PCODE,
- MAP8_INTS,
- MAP8_DEV // device by name
+ SGMSEL = 1,
+ TSGSEL = 2,
+ P8GSEL = 4,
+ P3GSEL = 8,
+ VIDSEL = 16
};
-struct mapper8_list_entry
+/*
+ Wait state generator (part of Vaquerro)
+*/
+class waitstate_generator
{
- const char* name; // Name of the device (used for looking up the device)
- int mode; // Mode of the system which applies to this entry
- int stop; // Mapper shall stop searching for a matching device when this entry applies
- UINT32 select_pattern; // State of the address line bits when addressing this device
- UINT32 address_mask; // Bits of the address bus used to address this device
- UINT32 write_select; // Additional bits set when doing write accesses to this device
-};
+public:
+ waitstate_generator() :
+ m_counting(false),
+ m_generate(false),
+ m_counter(0),
+ m_addressed(true),
+ m_ready(true) { };
+ void select_in(bool addressed);
+ virtual void ready_in(line_state ready) =0;
+ virtual void clock_in(line_state clkout) =0;
+ void treset_in(line_state reset);
+
+ int select_out();
+ void init(int select_value) { m_selvalue = select_value; }
+
+ line_state ready_out();
+
+ bool is_counting();
+ bool is_generating();
+ bool is_ready();
-#define MAPPER8_CONFIG(name) \
- const mapper8_config(name) =
+protected:
+ // Two flipflops
+ bool m_counting;
+ bool m_generate;
+ // Counter
+ int m_counter;
+
+ // Select value (indicates selected line)
+ int m_selvalue;
+
+ // Line state flags
+ bool m_addressed;
+ bool m_ready;
+};
-#define MCFG_MAINBOARD8_READY_CALLBACK(_write) \
- devcb = &mainboard8_device::set_ready_wr_callback(*device, DEVCB_##_write);
+class grom_waitstate_generator : public waitstate_generator
+{
+public:
+ void ready_in(line_state ready) override;
+ void clock_in(line_state clkout) override;
+};
-struct mapper8_config
+class video_waitstate_generator : public waitstate_generator
{
- const mapper8_list_entry *devlist;
+public:
+ void ready_in(line_state ready) override { };
+ void clock_in(line_state clkout) override;
};
/*
- Device list of the mapper.
+ Custom chip: Vaquerro
*/
-class logically_addressed_device
+class vaquerro_device : public device_t
{
- friend class simple_list<logically_addressed_device>;
- friend class mainboard8_device;
-
public:
- logically_addressed_device(mapper8_device_kind kind, device_t *busdevice, const mapper8_list_entry &entry)
- : m_next(nullptr), m_kind(kind), m_device(busdevice), m_config(&entry) { };
+ vaquerro_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ void device_start() override;
+ void device_reset() override;
+
+ line_state ready();
+ void treset();
+
+ DECLARE_READ8_MEMBER( read );
+ DECLARE_SETADDRESS_DBIN_MEMBER( set_address );
+
+ DECLARE_READ_LINE_MEMBER( sprd_out );
+ DECLARE_READ_LINE_MEMBER( spwt_out );
+ DECLARE_READ_LINE_MEMBER( sccs_out );
+ DECLARE_READ_LINE_MEMBER( sromcs_out );
+
+ // Collective select line query
+ int gromcs_out();
+
+ DECLARE_READ_LINE_MEMBER( vdprd_out );
+ DECLARE_READ_LINE_MEMBER( vdpwt_out );
+ DECLARE_READ_LINE_MEMBER( lascsq_out );
+ DECLARE_READ_LINE_MEMBER( ggrdy_out );
+ DECLARE_WRITE_LINE_MEMBER( hold_cpu );
+
+ DECLARE_WRITE_LINE_MEMBER( crus_in );
+ DECLARE_WRITE_LINE_MEMBER( crusgl_in );
+ DECLARE_WRITE_LINE_MEMBER( clock_in );
+ DECLARE_WRITE_LINE_MEMBER( memen_in );
+
+ DECLARE_WRITE_LINE_MEMBER( sgmry );
+ DECLARE_WRITE_LINE_MEMBER( tsgry );
+ DECLARE_WRITE_LINE_MEMBER( p8gry );
+ DECLARE_WRITE_LINE_MEMBER( p3gry );
private:
- logically_addressed_device *m_next; // needed for simple_list
- mapper8_device_kind m_kind; // named device or predefined
- device_t *m_device; // the actual device
- const mapper8_list_entry *m_config;
+ // Memory cycle state
+ bool m_memen;
+
+ // Waiting for video
+ bool m_video_wait;
+
+ // State of the CRUS line
+ line_state m_crus;
+
+ // Are the GROM libraries turned on?
+ bool m_crugl;
+
+ // Do we have a logical address space match?
+ bool m_lasreq = false;
+
+ // Keep the decoding result (opens the SRY gate)
+ bool m_grom_or_video = false;
+
+ // Select lines
+ bool m_spwt;
+ bool m_sccs;
+ bool m_sromcs;
+ bool m_sprd;
+ bool m_vdprd;
+ bool m_vdpwt;
+
+ // Collective GROM select state
+ int m_gromsel;
+
+ // Outgoing READY
+ line_state m_ggrdy;
+
+ // Outgoing READY latch (common flipflop driving SRY)
+ bool m_sry;
+
+ // Holds the A14 address line state. We need this for the clock_in method.
+ line_state m_a14;
+
+ // Keeps the recent DBIN level
+ line_state m_dbin_level;
+
+ // Wait state logic components
+ grom_waitstate_generator m_sgmws, m_tsgws, m_p8gws, m_p3gws;
+ video_waitstate_generator m_vidws;
+
+ // Pointer to mainboard
+ mainboard8_device* m_mainboard;
};
/*
- Device list of the mapper.
+ Custom chip: Mofetta
*/
-class physically_addressed_device
+class mofetta_device : public device_t
{
- friend class simple_list<physically_addressed_device>;
- friend class mainboard8_device;
+public:
+ mofetta_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ void device_start() override;
+ void device_reset() override;
+
+ DECLARE_WRITE8_MEMBER( cruwrite );
+ DECLARE_SETADDRESS_DBIN_MEMBER( set_address );
+
+ DECLARE_WRITE_LINE_MEMBER( clock_in );
+ DECLARE_WRITE_LINE_MEMBER( msast_in );
+ DECLARE_WRITE_LINE_MEMBER( lascs_in );
+ DECLARE_WRITE_LINE_MEMBER( pmemen_in );
+ DECLARE_WRITE_LINE_MEMBER( skdrcs_in );
+
+ DECLARE_READ8_MEMBER( rom1cs_out );
+ DECLARE_READ_LINE_MEMBER( gromclk_out );
+
+ DECLARE_READ_LINE_MEMBER( alccs_out );
+ DECLARE_READ_LINE_MEMBER( prcs_out );
+ DECLARE_READ_LINE_MEMBER( cmas_out );
+ DECLARE_READ_LINE_MEMBER( dbc_out );
+
+ DECLARE_READ_LINE_MEMBER( rom1cs_out );
+ DECLARE_READ_LINE_MEMBER( rom1am_out );
+ DECLARE_READ_LINE_MEMBER( rom1al_out );
+
+private:
+ // Memory cycle state
+ bool m_pmemen;
+
+ // Logical access
+ bool m_lasreq;
+ // DRAM access
+ bool m_skdrcs;
+
+ // Holds the decoding result; essentially names the selected line
+ bool m_gromclk_up;
+
+ // Have we got the upper word of the address?
+ bool m_gotfirstword;
+
+ // Address latch
+ int m_address_latch;
+
+ // Most significant byte of the 24-bit address
+ int m_prefix;
+
+ // CRU select of the 1700 device
+ bool m_alcpg;
+
+ // CRU select of the 2700 device
+ bool m_txspg;
+
+ // ROM1 select lines
+ bool m_rom1cs;
+ bool m_rom1am;
+ bool m_rom1al;
+
+ // OSO select
+ bool m_alccs;
+
+ // Pascal ROM select line
+ bool m_prcs;
+
+ // Cartridge port select line
+ bool m_cmas;
+
+ // GROM clock count (as frequency divider)
+ int m_gromclock_count;
+
+ // Remember last msast state for edge detection
+ line_state m_msast;
+
+ // Pointer to mainboard
+ mainboard8_device* m_mainboard;
+};
+
+/*
+ Custom chip: Amigo
+*/
+class amigo_device : public device_t
+{
public:
- physically_addressed_device(mapper8_device_kind kind, device_t *busdevice, const mapper8_list_entry &entry)
- : m_next(nullptr), m_kind(kind), m_device(busdevice), m_config(&entry) { };
+ amigo_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ void device_start() override;
+ void device_reset() override;
+
+ DECLARE_READ8_MEMBER( read );
+ DECLARE_WRITE8_MEMBER( write );
+ DECLARE_SETOFFSET_MEMBER( set_address );
+
+ DECLARE_WRITE_LINE_MEMBER( srdy_in );
+ DECLARE_WRITE_LINE_MEMBER( clock_in );
+ DECLARE_WRITE_LINE_MEMBER( crus_in );
+ DECLARE_WRITE_LINE_MEMBER( lascs_in );
+ DECLARE_WRITE_LINE_MEMBER( memen_in );
+
+ DECLARE_WRITE_LINE_MEMBER( holda_in );
+
+ DECLARE_READ_LINE_MEMBER( cpury_out );
+ DECLARE_READ_LINE_MEMBER( sramcs_out );
+ DECLARE_READ_LINE_MEMBER( skdrcs_out );
+
+ void connect_sram(UINT8* sram) { m_sram = sram; }
+ bool mapper_accessed() { return m_mapper_accessed; }
private:
- physically_addressed_device *m_next; // needed for simple_list
- mapper8_device_kind m_kind; // named device or predefined
- device_t *m_device; // the actual device
- const mapper8_list_entry *m_config;
+ // Memory cycle state
+ bool m_memen;
+
+ // DMA methods for loading/saving maps
+ void mapper_load();
+ void mapper_save();
+
+ // Address mapper registers. Each offset is selected by the first 4 bits
+ // of the logical address.
+ UINT32 m_base_register[16];
+
+ // Indicates a logical space access
+ bool m_logical_space;
+
+ // Physical address
+ UINT32 m_physical_address;
+
+ // Pointer to SRAM where AMIGO needs to upload/download its map values
+ UINT8* m_sram;
+
+ // Pointer to mainboard
+ mainboard8_device* m_mainboard;
+
+ // Keep the system ready state
+ line_state m_srdy;
+
+ // Outgoing READY level
+ line_state m_ready_out;
+
+ // Keep the CRUS setting
+ line_state m_crus;
+
+ // State of the address creation
+ int m_amstate;
+
+ // Protection flags
+ int m_protflag;
+
+ // Accessing SRAM
+ bool m_sram_accessed;
+
+ // Accessing DRAM
+ bool m_dram_accessed;
+
+ // Accessing the mapper
+ bool m_mapper_accessed;
+
+ // HOLDA flag
+ bool m_hold_acknowledged;
+
+ // Address in SRAM during DMA
+ UINT32 m_sram_address;
+
+ // Number of the currently loaded/save base register
+ int m_basereg;
+
+ // Latched value for mapper DMA transfer
+ UINT32 m_mapvalue;
};
/*
Custom chip: OSO
*/
-class ti998_oso_device : public device_t
+class oso_device : public device_t
{
public:
- ti998_oso_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ oso_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
void device_start() override;
@@ -136,139 +388,169 @@ private:
UINT8 m_xmit;
};
-/*
- Speech support
-*/
-#define MCFG_SPEECH8_READY_CALLBACK(_write) \
- devcb = &ti998_spsyn_device::set_ready_wr_callback(*device, DEVCB_##_write);
-
-class ti998_spsyn_device : public bus8z_device
+class mainboard8_device : public device_t
{
public:
- ti998_spsyn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- template<class _Object> static devcb_base &set_ready_wr_callback(device_t &device, _Object object) { return downcast<ti998_spsyn_device &>(device).m_ready.set_callback(object); }
-
- DECLARE_READ8Z_MEMBER(readz) override;
- DECLARE_WRITE8_MEMBER(write) override;
-
- DECLARE_READ8Z_MEMBER(crureadz) { };
- DECLARE_WRITE8_MEMBER(cruwrite) { };
+ mainboard8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- DECLARE_WRITE_LINE_MEMBER( speech8_ready );
+ // Memory space
+ DECLARE_READ8_MEMBER( read );
+ DECLARE_WRITE8_MEMBER( write );
+ DECLARE_SETOFFSET_MEMBER( setoffset );
+
+ // I/O space
+ DECLARE_READ8Z_MEMBER( crureadz );
+ DECLARE_WRITE8_MEMBER( cruwrite );
+
+ // Control lines
+ DECLARE_WRITE_LINE_MEMBER( clock_in );
+ DECLARE_WRITE_LINE_MEMBER( dbin_in );
+ DECLARE_WRITE_LINE_MEMBER( msast_in );
+ DECLARE_WRITE_LINE_MEMBER( crus_in );
+ DECLARE_WRITE_LINE_MEMBER( ptgen_in );
+ DECLARE_WRITE_LINE_MEMBER( reset_console );
+ DECLARE_WRITE_LINE_MEMBER( hold_cpu );
+ DECLARE_WRITE_LINE_MEMBER( ggrdy_in );
+
+ DECLARE_WRITE_LINE_MEMBER( holda_line );
+
+ template<class _Object> static devcb_base &set_ready_wr_callback(device_t &device, _Object object)
+ {
+ return downcast<mainboard8_device &>(device).m_ready.set_callback(object);
+ }
+
+ template<class _Object> static devcb_base &set_reset_wr_callback(device_t &device, _Object object)
+ {
+ return downcast<mainboard8_device &>(device).m_console_reset.set_callback(object);
+ }
+
+ template<class _Object> static devcb_base &set_hold_wr_callback(device_t &device, _Object object)
+ {
+ return downcast<mainboard8_device &>(device).m_hold_line.set_callback(object);
+ }
+
+ void set_paddress(int address);
+
+ // Ready lines from GROMs
+ DECLARE_WRITE_LINE_MEMBER( system_grom_ready );
+ DECLARE_WRITE_LINE_MEMBER( ptts_grom_ready );
+ DECLARE_WRITE_LINE_MEMBER( p8_grom_ready );
+ DECLARE_WRITE_LINE_MEMBER( p3_grom_ready );
+ DECLARE_WRITE_LINE_MEMBER( sound_ready );
+ DECLARE_WRITE_LINE_MEMBER( speech_ready );
+ DECLARE_WRITE_LINE_MEMBER( pbox_ready );
+
+ // Emulation
+ // void set_gromport(gromport_device* dev) { m_gromport = dev; }
protected:
- virtual void device_start() override;
- virtual void device_reset(void) override;
- virtual const rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ void device_start(void) override;
+ void device_reset(void) override;
+ machine_config_constructor device_mconfig_additions() const override;
private:
- tms5220_device *m_vsp;
-// UINT8 *m_speechrom; // pointer to speech ROM data
-// int m_load_pointer; // which 4-bit nibble will be affected by load address
-// int m_rombits_count; // current bit position in ROM
-// UINT32 m_sprom_address; // 18 bit pointer in ROM
-// UINT32 m_sprom_length; // length of data pointed by speechrom_data, from 0 to 2^18
-
- // Ready line to the CPU
- devcb_write_line m_ready;
-};
+ // Holds the state of the A14 line
+ bool m_A14_set;
-#define MCFG_TISPEECH8_ADD(_tag, _conf) \
- MCFG_DEVICE_ADD(_tag, TI99_SPEECH8, 0) \
- MCFG_DEVICE_CONFIG(_conf)
+ // Propagates the end of the memory cycle
+ void cycle_end();
+ // Original logical address.
+ int m_logical_address;
-/*
- Main class
-*/
-class mainboard8_device : public bus8z_device
-{
-public:
- mainboard8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ // Mapped physical address.
+ int m_physical_address;
- template<class _Object> static devcb_base &set_ready_wr_callback(device_t &device, _Object object) { return downcast<mainboard8_device &>(device).m_ready.set_callback(object); }
+ // Hold the address space value so that we can use it in other methods.
+ address_space* m_space;
- DECLARE_READ8_MEMBER( readm); // used from address map
- DECLARE_WRITE8_MEMBER( writem ); // used from address map
+ // Indicates that a byte is waiting on the data bus (see m_latched_data)
+ bool m_pending_write;
- DECLARE_READ8Z_MEMBER( readz ) override;
- DECLARE_WRITE8_MEMBER( write ) override;
+ // Hold the value of the data bus. In a real machine, the data bus continues
+ // to show that value, but in this emulation we have a push mechanism.
+ UINT8 m_latched_data;
- DECLARE_READ8Z_MEMBER(crureadz);
- DECLARE_WRITE8_MEMBER(cruwrite);
+ // Hold the level of the GROMCLK line
+ int m_gromclk;
- void CRUS_set(bool state);
- void PTGE_set(bool state);
+ // Selecting GROM libraries
+ void select_groms();
- void clock_in(int state);
+ // Previous select state
+ int m_prev_grom;
-protected:
- void device_start(void) override;
- void device_reset(void) override;
- machine_config_constructor device_mconfig_additions() const override;
+ // Ready states
+ bool m_speech_ready;
+ bool m_sound_ready;
+ bool m_pbox_ready;
-private:
- bool access_logical_r(address_space& space, offs_t offset, UINT8 *value, UINT8 mem_mask );
- bool access_logical_w(address_space& space, offs_t offset, UINT8 data, UINT8 mem_mask );
- void access_physical_r(address_space& space, offs_t offset, UINT8 *value, UINT8 mem_mask );
- void access_physical_w(address_space& space, offs_t offset, UINT8 data, UINT8 mem_mask );
- void mapwrite(int offset, UINT8 data);
+ // Keeps the recent DBIN level
+ line_state m_dbin_level;
// Ready line to the CPU
devcb_write_line m_ready;
- // All devices that are attached to the 16-bit address bus.
- simple_list<logically_addressed_device> m_logcomp;
+ // Reset line to the main system
+ devcb_write_line m_console_reset;
+
+ // Hold line to the main system
+ devcb_write_line m_hold_line;
- // All devices that are attached to the 24-bit mapped address bus.
- simple_list<physically_addressed_device> m_physcomp;
+ // Custom chips
+ required_device<vaquerro_device> m_vaquerro;
+ required_device<mofetta_device> m_mofetta;
+ required_device<amigo_device> m_amigo;
+ required_device<oso_device> m_oso;
- // Select bit for the internal DSR.
- bool m_dsr_selected;
+ // Debugging
+ line_state m_last_ready;
- // Select bit for the Hexbus DSR.
- bool m_hexbus_selected;
+ // Video processor
+ tms9118_device* m_video;
- // 99/4A compatibility mode. Name is taken from the spec. If 1, 99/4A compatibility is active.
- bool m_CRUS;
+ // Sound generator
+ sn76496_base_device* m_sound;
- // P-Code mode. Name is taken from the spec. If 0, P-Code libraries are available.
- // May be read as "Pascal and Text-to-speech GROM libraries Enable (Negative)"
- // Note: this is negative logic. GROMs are present only for PTGEN=0
- // We use PTGE as the inverse signal.
- bool m_PTGE;
+ // Speech processor
+ cd2501ecd_device* m_speech;
- // Counter for the wait states.
- int m_waitcount;
+ // System GROM library
+ tmc0430_device* m_sgrom[3];
- // Address mapper registers. Each offset is selected by the first 4 bits
- // of the logical address.
- UINT32 m_pas_offset[16];
+ // Text-to-speech GROM library
+ tmc0430_device* m_tsgrom[8];
- // SRAM area of the system. Directly connected to the address decoder.
- UINT8 *m_sram;
+ // Pascal 8 GROM library
+ tmc0430_device* m_p8grom[8];
- // DRAM area of the system. Connected to the mapped address bus.
- UINT8 *m_dram;
+ // Pascal 3 GROM library
+ tmc0430_device* m_p3grom[3];
- // ROM area of the system. Directly connected to the logical address decoder.
- UINT8 *m_rom0;
+ // Gromport (cartridge port)
+ gromport_device* m_gromport;
- // ROM area of the system. Directly connected to the physical address decoder.
- UINT8 *m_rom1;
+ // Peripheral box
+ peribox_device* m_peb;
- // P-Code ROM area of the system. Directly connected to the physical address decoder.
- UINT8 *m_pcode;
+ // Memory
+ std::unique_ptr<UINT8[]> m_sram;
+ std::unique_ptr<UINT8[]> m_dram;
- // Custom chips
- required_device<ti998_oso_device> m_oso;
+ // ROM area of the system.
+ UINT8* m_rom0;
+ UINT8* m_rom1;
+ UINT8* m_pascalrom;
};
+#define MCFG_MAINBOARD8_READY_CALLBACK(_write) \
+ devcb = &mainboard8_device::set_ready_wr_callback(*device, DEVCB_##_write);
+
+#define MCFG_MAINBOARD8_RESET_CALLBACK(_write) \
+ devcb = &mainboard8_device::set_reset_wr_callback(*device, DEVCB_##_write);
+
+#define MCFG_MAINBOARD8_HOLD_CALLBACK(_write) \
+ devcb = &mainboard8_device::set_hold_wr_callback(*device, DEVCB_##_write);
-#define MCFG_MAINBOARD8_ADD(_tag, _devices) \
- MCFG_DEVICE_ADD(_tag, MAINBOARD8, 0) \
- MCFG_DEVICE_CONFIG( _devices )
#endif
diff --git a/src/devices/bus/ti99x/datamux.cpp b/src/devices/bus/ti99x/datamux.cpp
index 1b8ec8de02f..034ecfe114d 100644
--- a/src/devices/bus/ti99x/datamux.cpp
+++ b/src/devices/bus/ti99x/datamux.cpp
@@ -75,9 +75,20 @@
Constructor
*/
ti99_datamux_device::ti99_datamux_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
-: device_t(mconfig, DATAMUX, "Databus multiplexer", tag, owner, clock, "ti99_datamux", __FILE__), m_spacep(nullptr),
- m_ready(*this), m_muxready(), m_sysready(), m_addr_buf(0), m_read_mode(false), m_latch(0), m_waitcount(0), m_ram16b(nullptr), m_use32k(false), m_base32k(0), m_cpu(nullptr)
-{ }
+ : device_t(mconfig, DATAMUX, "Databus multiplexer", tag, owner, clock, "ti99_datamux", __FILE__),
+ m_spacep(nullptr),
+ m_ready(*this),
+ m_addr_buf(0),
+ m_dbin(CLEAR_LINE),
+ m_muxready(CLEAR_LINE),
+ m_sysready(CLEAR_LINE),
+ m_latch(0),
+ m_waitcount(0),
+ m_ram16b(nullptr),
+ m_use32k(false),
+ m_base32k(0),
+ m_console_groms_present(false)
+ { }
#define TRACE_READY 0
#define TRACE_ACCESS 0
@@ -89,140 +100,239 @@ ti99_datamux_device::ti99_datamux_device(const machine_config &mconfig, const ch
DEVICE ACCESSOR FUNCTIONS
***************************************************************************/
-void ti99_datamux_device::read_all(address_space& space, UINT16 addr, UINT8 *target)
+void ti99_datamux_device::read_all(address_space& space, UINT16 addr, UINT8 *value)
{
- attached_device *dev = m_devices.first();
+ // Valid access
+ bool validaccess = ((addr & 0x0400)==0);
- // Reading the odd address first (addr+1)
- while (dev != nullptr)
+ if (validaccess)
{
- if (dev->m_config->write_select != 0xffff) // write-only
+ // GROM access
+ if ((addr & 0xf801)==0x9800)
{
- if ((addr & dev->m_config->address_mask)==dev->m_config->select)
+ if (m_console_groms_present)
{
- // Cast to the bus8z_device (see ti99defs.h)
- bus8z_device *devz = static_cast<bus8z_device *>(dev->m_device);
- devz->readz(space, addr, target);
+ for (int i=0; i < 3; i++)
+ {
+ m_grom[i]->readz(space, addr, value);
+ }
}
- // hope we don't have two devices answering...
- // consider something like a logical OR and maybe some artificial smoke
+ // GROMport (GROMs)
+ m_gromport->readz(space, addr, value);
+ }
+
+ // Video
+ if ((addr & 0xf801)==0x8800)
+ {
+ m_video->readz(space, addr, value);
}
- dev = dev->m_next;
}
+
+ // GROMport (ROMs)
+ if ((addr & 0xe000)==0x6000) m_gromport->readz(space, addr, value);
+
+ // PEB gets all accesses
+ m_peb->readz(space, addr, value);
+ m_peb->memen_in(CLEAR_LINE);
}
void ti99_datamux_device::write_all(address_space& space, UINT16 addr, UINT8 value)
{
- attached_device *dev = m_devices.first();
- while (dev != nullptr)
+ // GROM access
+ if ((addr & 0xf801)==0x9800)
{
- if ((addr & dev->m_config->address_mask)==(dev->m_config->select | dev->m_config->write_select))
+ if (m_console_groms_present)
{
- bus8z_device *devz = static_cast<bus8z_device *>(dev->m_device);
- devz->write(space, addr, value);
+ for (int i=0; i < 3; i++)
+ m_grom[i]->write(space, addr, value);
}
- dev = dev->m_next;
+ // GROMport
+ m_gromport->write(space, addr, value);
+ }
+
+ // Cartridge port and sound
+ if ((addr & 0xe000)==0x6000) m_gromport->write(space, addr, value);
+ if ((addr & 0xfc01)==0x8400) m_sound->write(space, 0, value);
+
+ // Video
+ if ((addr & 0xf801)==0x8800)
+ {
+ m_video->write(space, addr, value);
}
+
+ // PEB gets all accesses
+ m_peb->write(space, addr, value);
+ m_peb->memen_in(CLEAR_LINE);
}
void ti99_datamux_device::setaddress_all(address_space& space, UINT16 addr)
{
- attached_device *dev = m_devices.first();
- while (dev != nullptr)
- {
- if ((addr & dev->m_config->address_mask)==(dev->m_config->select | dev->m_config->write_select))
- {
- bus8z_device *devz = static_cast<bus8z_device *>(dev->m_device);
- devz->setaddress_dbin(space, addr, m_read_mode? ASSERT_LINE : CLEAR_LINE);
- }
- dev = dev->m_next;
- }
+ line_state a14 = ((addr & 2)!=0)? ASSERT_LINE : CLEAR_LINE;
+
+ // Valid access = not(DBIN and A5)
+ bool validaccess = (m_dbin==CLEAR_LINE || (addr & 0x0400)==0);
+
+ // GROM access
+ bool isgrom = ((addr & 0xf801)==0x9800) && validaccess;
+
+ // Cartridge ROM
+ bool iscartrom = ((addr & 0xe000)==0x6000);
+
+ // Always deliver to GROM so that the select line may be cleared
+ int lines = (m_dbin==ASSERT_LINE)? 1 : 0;
+ if (a14==ASSERT_LINE) lines |= 2;
+ line_state select = isgrom? ASSERT_LINE : CLEAR_LINE;
+
+ if (m_console_groms_present)
+ for (int i=0; i < 3; i++)
+ m_grom[i]->set_lines(space, lines, select);
+
+ // GROMport (GROMs)
+ m_gromport->set_gromlines(space, lines, select);
+
+ // Sound chip and video chip do not require the address to be set before access
+
+ // GROMport (ROMs)
+ m_gromport->romgq_line(iscartrom? ASSERT_LINE : CLEAR_LINE);
+
+ // PEB gets all accesses
+ m_peb->memen_in(ASSERT_LINE);
+ m_peb->setaddress_dbin(space, addr, m_dbin);
}
/*
- Special debugger access; these routines have no influence on the wait
- state generation.
+ Special debugger access. The access is similar to the normal access,
+ but it bypasses the wait state circuitry. Also, access ports of memory-
+ mapped devices are excluded because their state would be changed
+ unpredictably by the debugger access.
*/
UINT16 ti99_datamux_device::debugger_read(address_space& space, UINT16 addr)
{
- UINT16 base32k = 0;
- UINT8 lval, hval;
-
UINT16 addrb = addr << 1;
- if (m_use32k)
- {
- if ((addrb & 0xe000)==0x2000) base32k = 0x1000;
- if (((addrb & 0xe000)==0xa000) || ((addrb & 0xc000)==0xc000)) base32k = 0x4000;
- }
- if (base32k != 0)
- {
- return m_ram16b[addr - base32k];
- }
+ UINT16 value = 0;
+
+ if ((addrb & 0xe000)==0x0000) value = m_consolerom[(addrb & 0x1fff)>>1];
else
{
- lval = hval = 0;
- read_all(space, addrb+1, &lval);
- read_all(space, addrb, &hval);
- return ((hval << 8)&0xff00) | (lval & 0xff);
+ if ((addrb & 0xfc00)==0x8000) value = m_padram[(addrb & 0x00ff)>>1];
+ else
+ {
+ int base32k = 0;
+ if (m_use32k)
+ {
+ if ((addrb & 0xe000)==0x2000) base32k = 0x2000;
+ if (((addrb & 0xe000)==0xa000) || ((addrb & 0xc000)==0xc000)) base32k = 0x8000;
+ }
+
+ if (base32k != 0) value = m_ram16b[(addrb-base32k)>>1];
+ else
+ {
+ UINT8 lval = 0;
+ UINT8 hval = 0;
+
+ if ((addr & 0xe000)==0x6000)
+ {
+ m_gromport->readz(space, addrb+1, &lval);
+ m_gromport->readz(space, addrb, &hval);
+ }
+ m_peb->memen_in(ASSERT_LINE);
+ m_peb->readz(space, addrb+1, &lval);
+ m_peb->readz(space, addrb, &hval);
+ m_peb->memen_in(CLEAR_LINE);
+ value = ((hval << 8)&0xff00) | (lval & 0xff);
+ }
+ }
}
+ return value;
}
void ti99_datamux_device::debugger_write(address_space& space, UINT16 addr, UINT16 data)
{
- UINT16 base32k = 0;
-
UINT16 addrb = addr << 1;
- if (m_use32k)
- {
- if ((addrb & 0xe000)==0x2000) base32k = 0x1000;
- if (((addrb & 0xe000)==0xa000) || ((addrb & 0xc000)==0xc000)) base32k = 0x4000;
- }
- if (base32k != 0)
- {
- m_ram16b[addr - base32k] = data;
- }
+
+ if ((addrb & 0xe000)==0x0000) return;
+
+ if ((addrb & 0xfc00)==0x8000) m_padram[(addrb & 0x00ff)>>1] = data;
else
{
- write_all(space, addrb+1, data & 0xff);
- write_all(space, addrb, (data >> 8) & 0xff);
+ int base32k = 0;
+ if (m_use32k)
+ {
+ if ((addrb & 0xe000)==0x2000) base32k = 0x2000;
+ if (((addrb & 0xe000)==0xa000) || ((addrb & 0xc000)==0xc000)) base32k = 0x8000;
+ }
+
+ if (base32k != 0) m_ram16b[(addrb-base32k)>>1] = data;
+ else
+ {
+ if ((addr & 0xe000)==0x6000)
+ {
+ m_gromport->write(space, addr+1, data & 0xff);
+ m_gromport->write(space, addr, (data>>8) & 0xff);
+ }
+
+ m_peb->memen_in(ASSERT_LINE);
+ m_peb->write(space, addr+1, data & 0xff);
+ m_peb->write(space, addr, (data>>8) & 0xff);
+ m_peb->memen_in(CLEAR_LINE);
+ }
}
}
/*
Read access. We are using two loops because the delay between both
accesses must not occur within the loop. So we have one access on the bus,
- a delay, and then the second access (each one with possibly many attached
- devices)
+ a delay, and then the second access.
+
+ mem_mask is always ffff on TMS processors (cannot control bus width)
*/
READ16_MEMBER( ti99_datamux_device::read )
{
+ UINT16 value = 0;
+
// Care for debugger
if (space.debugger_access())
{
return debugger_read(space, offset);
}
- // Looks ugly, but this is close to the real thing. If the 16bit
- // memory expansion is installed in the console, and the access hits its
- // space, just respond to the memory access and don't bother the
- // datamux in any way. In particular, do not make the datamux insert wait
- // states.
-
- if (m_base32k != 0)
+ // Addresses below 0x2000 are ROM (no wait states)
+ if ((m_addr_buf & 0xe000)==0x0000)
{
- UINT16 reply = m_ram16b[offset-m_base32k];
- return reply & mem_mask;
+ value = m_consolerom[(m_addr_buf & 0x1fff)>>1];
}
else
{
- // The byte from the odd address has already been read into the latch
- // Reading the even address now (addr)
- UINT8 hbyte = 0;
- read_all(space, m_addr_buf, &hbyte);
- if (TRACE_ACCESS) logerror("datamux: read even byte from address %04x -> %02x\n", m_addr_buf, hbyte);
+ // Addresses from 8300-83ff (mirrors at 8000, 8100, 8200) are console RAM (no wait states)
+ if ((m_addr_buf & 0xfc00)==0x8000)
+ {
+ value = m_padram[(m_addr_buf & 0x00ff)>>1];
+ }
+ else
+ {
+ // Looks ugly, but this is close to the real thing. If the 16bit
+ // memory expansion is installed in the console, and the access hits its
+ // space, just respond to the memory access and don't bother the
+ // datamux in any way. In particular, do not make the datamux insert wait
+ // states.
+
+ if (m_base32k != 0)
+ {
+ value = m_ram16b[(m_addr_buf-m_base32k)>>1];
+ }
+ else
+ {
+ // The byte from the odd address has already been read into the latch
+ // Reading the even address now (addr)
+ UINT8 hbyte = 0;
+ read_all(space, m_addr_buf, &hbyte);
+ if (TRACE_ACCESS) logerror("Read even byte from address %04x -> %02x\n", m_addr_buf, hbyte);
- return ((hbyte<<8) | m_latch) & mem_mask;
+ value = (hbyte<<8) | m_latch;
+ }
+ }
}
+ return value;
}
/*
@@ -230,21 +340,29 @@ READ16_MEMBER( ti99_datamux_device::read )
*/
WRITE16_MEMBER( ti99_datamux_device::write )
{
- // Addresses below 0x2000 are ROM and should be handled in the address map
- // by the ROM entry, but as the write handler for ROM is not mapped, we end up
- // here when there are invalid accesses, and this will mess up everything.
- if (offset < 0x1000) return;
-
if (space.debugger_access())
{
debugger_write(space, offset, data);
return;
}
+ // Addresses below 0x2000 are ROM
+ if ((m_addr_buf & 0xe000)==0x0000)
+ {
+ return;
+ }
+
+ // Addresses from 8300-83ff (mirrors at 8000, 8100, 8200) are console RAM
+ if ((m_addr_buf & 0xfc00)==0x8000)
+ {
+ m_padram[(m_addr_buf & 0x00ff)>>1] = data;
+ return;
+ }
+
// Handle the internal 32K expansion
if (m_base32k != 0)
{
- m_ram16b[offset-m_base32k] = data;
+ m_ram16b[(m_addr_buf-m_base32k)>>1] = data;
}
else
{
@@ -264,21 +382,34 @@ WRITE16_MEMBER( ti99_datamux_device::write )
*/
SETOFFSET_MEMBER( ti99_datamux_device::setoffset )
{
- if (TRACE_ADDRESS) logerror("datamux: set address %04x\n", offset << 1);
+ m_addr_buf = offset << 1;
+ m_waitcount = 0;
+
+ if (TRACE_ADDRESS) logerror("set address %04x\n", m_addr_buf);
+
+ if ((m_addr_buf & 0xe000) == 0x0000)
+ {
+ return; // console ROM
+ }
+
+ if ((m_addr_buf & 0xfc00) == 0x8000)
+ {
+ return; // console RAM
+ }
+
// Initialize counter
// 1 cycle for loading into the datamux
// 2 subsequent wait states (LSB)
// 2 subsequent wait states (MSB)
// clock cycle 6 is the nominal follower of the last wait state
m_waitcount = 5;
- m_addr_buf = offset << 1;
m_spacep = &space;
m_base32k = 0;
if (m_use32k)
{
- if ((m_addr_buf & 0xe000)==0x2000) m_base32k = 0x1000;
- if (((m_addr_buf & 0xe000)==0xa000) || ((m_addr_buf & 0xc000)==0xc000)) m_base32k = 0x4000;
+ if ((m_addr_buf & 0xe000)==0x2000) m_base32k = 0x2000;
+ if (((m_addr_buf & 0xe000)==0xa000) || ((m_addr_buf & 0xc000)==0xc000)) m_base32k = 0x8000;
}
// Suspend the CPU if not using the 32K
@@ -308,13 +439,13 @@ WRITE_LINE_MEMBER( ti99_datamux_device::clock_in )
if (TRACE_READY) logerror("datamux: stalled due to external READY=0\n");
return;
}
- if (m_read_mode)
+
+ if (m_dbin==ASSERT_LINE)
{
// Reading
if (state==ASSERT_LINE)
{ // raising edge
- m_waitcount--;
- if (m_waitcount==0)
+ if (--m_waitcount==0)
{
m_muxready = ASSERT_LINE;
ready_join();
@@ -333,8 +464,7 @@ WRITE_LINE_MEMBER( ti99_datamux_device::clock_in )
{
if (state==ASSERT_LINE)
{ // raising edge
- m_waitcount--;
- if (m_waitcount==0)
+ if (--m_waitcount==0)
{
m_muxready = ASSERT_LINE;
ready_join();
@@ -365,21 +495,31 @@ void ti99_datamux_device::ready_join()
WRITE_LINE_MEMBER( ti99_datamux_device::dbin_in )
{
- m_read_mode = (state==ASSERT_LINE);
- if (TRACE_ADDRESS) logerror("datamux: data bus in = %d\n", m_read_mode? 1:0 );
+ m_dbin = (line_state)state;
+ if (TRACE_ADDRESS) logerror("data bus in = %d\n", (m_dbin==ASSERT_LINE)? 1:0 );
}
WRITE_LINE_MEMBER( ti99_datamux_device::ready_line )
{
if (TRACE_READY)
{
- if (state != m_sysready) logerror("datamux: READY line from PBox = %d\n", state);
+ if (state != m_sysready) logerror("READY line from PBox = %d\n", state);
}
m_sysready = (line_state)state;
// Also propagate to CPU via driver
ready_join();
}
+WRITE_LINE_MEMBER( ti99_datamux_device::gromclk_in )
+{
+ // Propagate to the GROMs
+ if (m_console_groms_present)
+ {
+ for (int i=0; i < 3; i++) m_grom[i]->gclock_in(state);
+ }
+ m_gromport->gclock_in(state);
+}
+
/***************************************************************************
DEVICE LIFECYCLE FUNCTIONS
***************************************************************************/
@@ -398,15 +538,9 @@ void ti99_datamux_device::device_stop(void)
void ti99_datamux_device::device_reset(void)
{
- const datamux_config *conf = reinterpret_cast<const datamux_config *>(static_config());
-
- const dmux_device_list_entry *list = conf->devlist;
-
- m_cpu = machine().device("maincpu");
- // m_space = &m_cpu->memory().space(AS_PROGRAM);
-
- m_devices.reset(); // clear the list
+ m_consolerom = (UINT16*)owner()->memregion(CONSOLEROM)->base();
m_use32k = (ioport("RAM")->read()==1);
+ m_console_groms_present = (ioport("GROMENA")->read()==1);
// better use a region?
if (m_ram16b==nullptr)
@@ -414,51 +548,6 @@ void ti99_datamux_device::device_reset(void)
m_ram16b = make_unique_clear<UINT16[]>(32768/2);
}
- // Now building the list of active devices at this databus multiplex.
- // We allow for turning off devices according to configuration switch settings.
- // In particular, the HSGPL card cannot function unless the console GROMs are
- // removed.
- if ( list != nullptr )
- {
- bool done = false;
- for (int i=0; !done; i++)
- {
- if (list[i].name == nullptr)
- {
- done = true;
- }
- else
- {
- UINT32 set;
- bool active_device = true;
- if (list[i].setting!=nullptr)
- {
- set = ioport(list[i].setting)->read();
- active_device = ((set & list[i].set)==list[i].set) && ((set & list[i].unset)==0);
- }
- if (active_device)
- {
- device_t *dev = machine().device(list[i].name);
- if (dev != nullptr)
- {
- auto ad = new attached_device(dev, list[i]);
- m_devices.append(*ad);
- if (TRACE_SETUP) logerror("datamux: Device %s mounted at index %d.\n", list[i].name, i);
- }
- else
- {
- if (TRACE_SETUP) logerror("datamux: Device %s not found.\n", list[i].name);
- }
- }
- else
- {
- if (TRACE_SETUP) logerror("datamux: Device %s not mounted due to configuration setting %s.\n", list[i].name, list[i].setting);
- }
- }
- }
- }
- if (TRACE_SETUP) logerror("datamux: Device count = %d\n", m_devices.count());
-
m_sysready = ASSERT_LINE;
m_muxready = ASSERT_LINE;
ready_join();
@@ -466,9 +555,22 @@ void ti99_datamux_device::device_reset(void)
m_waitcount = 0;
m_latch = 0;
- m_read_mode = true;
+ m_dbin = CLEAR_LINE;
}
+void ti99_datamux_device::device_config_complete()
+{
+ m_video = downcast<bus8z_device*>(owner()->subdevice(VIDEO_SYSTEM_TAG));
+ m_sound = downcast<sn76496_base_device*>(owner()->subdevice(TISOUNDCHIP_TAG));
+ m_gromport = downcast<gromport_device*>(owner()->subdevice(GROMPORT_TAG));
+ m_peb = downcast<peribox_device*>(owner()->subdevice(PERIBOX_TAG));
+ m_grom[0] = downcast<tmc0430_device*>(owner()->subdevice(GROM0_TAG));
+ m_grom[1] = downcast<tmc0430_device*>(owner()->subdevice(GROM1_TAG));
+ m_grom[2] = downcast<tmc0430_device*>(owner()->subdevice(GROM2_TAG));
+ m_padram = make_unique_clear<UINT16[]>(256/2);
+}
+
+
INPUT_PORTS_START( datamux )
PORT_START( "RAM" ) /* config */
PORT_CONFNAME( 0x01, 0x00, "Console 32 KiB RAM upgrade (16 bit)" )
diff --git a/src/devices/bus/ti99x/datamux.h b/src/devices/bus/ti99x/datamux.h
index 604dfb2e62f..5b59ea7d134 100644
--- a/src/devices/bus/ti99x/datamux.h
+++ b/src/devices/bus/ti99x/datamux.h
@@ -15,54 +15,16 @@
#define __DMUX__
#include "ti99defs.h"
+#include "machine/tmc0430.h"
+#include "gromport.h"
+#include "bus/ti99_peb/peribox.h"
+#include "sound/sn76496.h"
+#include "video/tms9928a.h"
+#include "bus/ti99x/videowrp.h"
extern const device_type DATAMUX;
/*
- Device that is attached to this datamux.
- The configuration setting is used for certain configurations
- where devices may only be used if others are turned off. In particular,
- if the HGSPL expansion card is used, the GROMs in the console must be
- removed.
-*/
-struct dmux_device_list_entry
-{
- const char *name; // Name of the device (used for looking up the device)
- UINT16 select; // State of the address line bits when addressing this device
- UINT16 address_mask; // Bits of the address bus used to address this device
- UINT16 write_select; // Bits set when doing write accesses to this device (ffff = write-only)
- const char *setting; // configuration switch that may have an effect for the presence of this device
- UINT8 set; // bits that must be set for this switch so that this device is present
- UINT8 unset; // bits that must be reset for this switch so that this device is present
-};
-
-#define DMUX_CONFIG(name) \
- const datamux_config(name) =
-
-struct datamux_config
-{
- const dmux_device_list_entry *devlist;
-};
-
-/*
- Device list of this datamux.
-*/
-class attached_device
-{
- friend class simple_list<attached_device>;
- friend class ti99_datamux_device;
-
-public:
- attached_device(device_t *busdevice, const dmux_device_list_entry &entry)
- : m_next(nullptr), m_device(busdevice), m_config(&entry) { };
-
-private:
- attached_device *m_next;
- device_t *m_device; // the actual device
- const dmux_device_list_entry *m_config;
-};
-
-/*
Main class
*/
class ti99_datamux_device : public device_t
@@ -77,6 +39,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( dbin_in );
DECLARE_WRITE_LINE_MEMBER( ready_line );
+ DECLARE_WRITE_LINE_MEMBER( gromclk_in );
+
template<class _Object> static devcb_base &static_set_ready_callback(device_t &device, _Object object)
{
return downcast<ti99_datamux_device &>(device).m_ready.set_callback(object);
@@ -87,9 +51,22 @@ protected:
void device_start() override;
void device_stop() override;
void device_reset() override;
+ void device_config_complete() override;
ioport_constructor device_input_ports() const override;
private:
+ // Link to the video processor
+ bus8z_device* m_video;
+
+ // Link to the sound processor
+ sn76496_base_device* m_sound;
+
+ // Link to the peripheral expansion box
+ peribox_device* m_peb;
+
+ // Link to the cartridge port (aka GROM port)
+ gromport_device* m_gromport;
+
// Keeps the address space pointer
address_space* m_spacep;
@@ -112,21 +89,18 @@ private:
// Ready line to the CPU
devcb_write_line m_ready;
+ // Address latch (emu). In reality, the address bus remains constant.
+ UINT16 m_addr_buf;
+
+ // DBIN line
+ line_state m_dbin;
+
// Own ready state.
line_state m_muxready;
// Ready state. Needed to control wait state generation via inbound READY
line_state m_sysready;
- /* Address latch (emu). In reality, the address bus remains constant. */
- UINT16 m_addr_buf;
-
- /* Stores the state of the DBIN line. */
- bool m_read_mode;
-
- /* All devices that are attached to the 8-bit bus. */
- simple_list<attached_device> m_devices;
-
/* Latch which stores the first (odd) byte */
UINT8 m_latch;
@@ -136,22 +110,28 @@ private:
/* Memory expansion (internal, 16 bit). */
std::unique_ptr<UINT16[]> m_ram16b;
+ // Console RAM
+ std::unique_ptr<UINT16[]> m_padram;
+
+ // Console ROM
+ UINT16* m_consolerom;
+
+ // Console GROMs
+ tmc0430_device* m_grom[3];
+
/* Use the memory expansion? */
bool m_use32k;
/* Memory base for piggy-back 32K expansion. If 0, expansion is not used. */
UINT16 m_base32k;
- /* Reference to the CPU; avoid lookups. */
- device_t *m_cpu;
+ // Console GROMs are available (the HSGPL expects them to be removed)
+ bool m_console_groms_present;
};
/******************************************************************************/
-#define MCFG_DMUX_ADD(_tag, _devices) \
- MCFG_DEVICE_ADD(_tag, DATAMUX, 0) \
- MCFG_DEVICE_CONFIG( _devices )
-#endif
-
#define MCFG_DMUX_READY_HANDLER( _intcallb ) \
devcb = &ti99_datamux_device::static_set_ready_callback( *device, DEVCB_##_intcallb );
+
+#endif
diff --git a/src/devices/bus/ti99x/genboard.cpp b/src/devices/bus/ti99x/genboard.cpp
index 9d6aeef7e76..10f560ce6bd 100644
--- a/src/devices/bus/ti99x/genboard.cpp
+++ b/src/devices/bus/ti99x/genboard.cpp
@@ -207,7 +207,10 @@
geneve_mapper_device::geneve_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, GENEVE_MAPPER, "Geneve Gate Array", tag, owner, clock, "geneve_mapper", __FILE__), m_gromwaddr_LSB(false), m_gromraddr_LSB(false), m_grom_address(0), m_video_waitstates(false), m_extra_waitstates(false), m_ready_asserted(false), m_read_mode(false), m_debug_no_ws(false), m_geneve_mode(false), m_direct_mode(false), m_cartridge_size(0), m_cartridge_secondpage(false), m_cartridge6_writable(false), m_cartridge7_writable(false), m_turbo(false), m_genmod(false), m_timode(false), m_pfm_mode(0), m_pfm_bank(0), m_pfm_output_enable(false), m_sram_mask(0), m_sram_val(0),
- m_ready(*this), m_waitcount(0), m_ext_waitcount(0), m_clock(nullptr), m_cpu(nullptr), m_pfm512(nullptr), m_pfm512a(nullptr), m_keyboard(nullptr), m_video(nullptr), m_peribox(nullptr), m_sound(nullptr), m_sram(nullptr), m_dram(nullptr)
+ m_ready(*this), m_waitcount(0), m_ext_waitcount(0),
+ m_clock(nullptr), m_cpu(nullptr), m_pfm512(nullptr),
+ m_pfm512a(nullptr), m_sound(nullptr), m_keyboard(nullptr),
+ m_video(nullptr), m_peribox(nullptr), m_sram(nullptr), m_dram(nullptr)
{
m_eprom = nullptr;
}
@@ -466,11 +469,14 @@ READ8_MEMBER( geneve_mapper_device::readm )
switch (dec->function)
{
case MLGVIDEO:
- m_video->readz(space, dec->offset, &value, 0xff);
- if (TRACE_READ) logerror("%s: Read video %04x -> %02x\n", tag(), dec->offset, value);
- // Video wait states are created *after* the access
- // Accordingly, they have no effect when execution is in onchip RAM
- if (m_video_waitstates) set_ext_wait(15);
+ if (!space.debugger_access())
+ {
+ value = m_video->read(space, dec->offset>>1);
+ if (TRACE_READ) logerror("%s: Read video %04x -> %02x\n", tag(), dec->offset, value);
+ // Video wait states are created *after* the access
+ // Accordingly, they have no effect when execution is in onchip RAM
+ if (m_video_waitstates) set_ext_wait(15);
+ }
break;
case MLGMAPPER:
@@ -523,10 +529,13 @@ READ8_MEMBER( geneve_mapper_device::readm )
// video
// ++++ ++-- ---- ---+
// 1000 1000 0000 00x0
- m_video->readz(space, dec->offset, &value, 0xff);
- if (TRACE_READ) logerror("%s: Read video %04x -> %02x\n", tag(), dec->offset, value);
- // See above
- if (m_video_waitstates) set_ext_wait(15);
+ if (!space.debugger_access())
+ {
+ value = m_video->read(space, dec->offset>>1);
+ if (TRACE_READ) logerror("%s: Read video %04x -> %02x\n", tag(), dec->offset, value);
+ // See above
+ if (m_video_waitstates) set_ext_wait(15);
+ }
break;
case MLTSPEECH:
@@ -535,6 +544,7 @@ READ8_MEMBER( geneve_mapper_device::readm )
// 1001 0000 0000 0000
// We need to add the address prefix bits
m_peribox->readz(space, dec->offset, &value, 0xff);
+ m_peribox->memen_in(CLEAR_LINE);
if (TRACE_READ) logerror("%s: Read speech -> %02x\n", tag(), value);
break;
@@ -594,6 +604,7 @@ READ8_MEMBER( geneve_mapper_device::readm )
// 0x000000-0x1fffff for the GenMod.(AME,AMD,AMC,AMB,AMA,A0 ...,A15)
m_peribox->readz(space, dec->physaddr, &value, 0xff);
+ m_peribox->memen_in(CLEAR_LINE);
if (TRACE_READ) logerror("%s: Read P-Box %04x (%06x) -> %02x\n", tag(), dec->offset, dec->physaddr, value);
break;
@@ -616,6 +627,7 @@ READ8_MEMBER( geneve_mapper_device::readm )
case MPGMBOX:
// Route everything else to the P-Box
m_peribox->readz(space, dec->physaddr, &value, 0xff);
+ m_peribox->memen_in(CLEAR_LINE);
break;
}
return value;
@@ -646,10 +658,14 @@ WRITE8_MEMBER( geneve_mapper_device::writem )
// video
// ++++ ++++ ++++ ---+
// 1111 0001 0000 .cc0
- m_video->write(space, dec->offset, data, 0xff);
- if (TRACE_WRITE) logerror("%s: Write video %04x <- %02x\n", tag(), offset, data);
- // See above
- if (m_video_waitstates) set_ext_wait(15);
+
+ if (!space.debugger_access())
+ {
+ m_video->write(space, dec->offset>>1, data);
+ if (TRACE_WRITE) logerror("%s: Write video %04x <- %02x\n", tag(), offset, data);
+ // See above
+ if (m_video_waitstates) set_ext_wait(15);
+ }
break;
case MLGMAPPER:
@@ -689,10 +705,13 @@ WRITE8_MEMBER( geneve_mapper_device::writem )
// ++++ ++-- ---- ---+
// 1000 1100 0000 00c0
// Initialize waitstate timer
- m_video->write(space, dec->offset, data, 0xff);
- if (TRACE_WRITE) logerror("%s: Write video %04x <- %02x\n", tag(), offset, data);
- // See above
- if (m_video_waitstates) set_ext_wait(15);
+ if (!space.debugger_access())
+ {
+ m_video->write(space, dec->offset>>1, data);
+ if (TRACE_WRITE) logerror("%s: Write video %04x <- %02x\n", tag(), offset, data);
+ // See above
+ if (m_video_waitstates) set_ext_wait(15);
+ }
break;
case MLTSPEECH:
@@ -701,6 +720,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem )
// 1001 0100 0000 0000
// We need to add the address prefix bits
m_peribox->write(space, dec->offset, data, 0xff);
+ m_peribox->memen_in(CLEAR_LINE);
if (TRACE_WRITE) logerror("%s: Write speech <- %02x\n", tag(), data);
break;
@@ -756,6 +776,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem )
dec->physaddr = (dec->physaddr & 0x0007ffff); // 19 bit address
if (TRACE_WRITE) logerror("%s: Write P-Box %04x (%06x) <- %02x\n", tag(), offset, dec->physaddr, data);
m_peribox->write(space, dec->physaddr, data, 0xff);
+ m_peribox->memen_in(CLEAR_LINE);
break;
case MPGMDRAM:
@@ -775,6 +796,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem )
case MPGMBOX:
// Route everything else to the P-Box
m_peribox->write(space, dec->physaddr, data, 0xff);
+ m_peribox->memen_in(CLEAR_LINE);
break;
}
}
@@ -875,6 +897,7 @@ void geneve_mapper_device::decode(address_space& space, offs_t offset, bool read
// We need to add the address prefix bits
dec->function = MLTSPEECH;
dec->offset = offset | ((m_genmod)? 0x170000 : 0x070000);
+ m_peribox->memen_in(ASSERT_LINE);
m_peribox->setaddress_dbin(space, dec->offset, read_mode);
set_wait(1);
return;
@@ -954,6 +977,7 @@ void geneve_mapper_device::decode(address_space& space, offs_t offset, bool read
dec->function = MPGBOX;
dec->physaddr = (dec->physaddr & 0x0007ffff); // 19 bit address (with AMA..AMC)
+ m_peribox->memen_in(ASSERT_LINE);
m_peribox->setaddress_dbin(space, dec->physaddr, read_mode);
return;
}
@@ -986,6 +1010,7 @@ void geneve_mapper_device::decode(address_space& space, offs_t offset, bool read
// Check: Are waitstates completely turned off for turbo mode, or
// merely the waitstates for DRAM memory access and box access?
+ m_peribox->memen_in(ASSERT_LINE);
m_peribox->setaddress_dbin(space, dec->physaddr, read_mode);
return;
}
@@ -1072,6 +1097,7 @@ void geneve_mapper_device::decode(address_space& space, offs_t offset, bool read
{
dec->function = MLTSPEECH;
dec->offset = dec->offset | ((m_genmod)? 0x170000 : 0x070000);
+ m_peribox->memen_in(ASSERT_LINE);
m_peribox->setaddress_dbin(space, dec->offset, read_mode);
set_wait(1);
return;
@@ -1151,6 +1177,7 @@ void geneve_mapper_device::decode(address_space& space, offs_t offset, bool read
// only AMA, AMB, AMC are used; AMD and AME are not used
dec->function = MPGBOX;
dec->physaddr = (dec->physaddr & 0x0007ffff); // 19 bit address
+ m_peribox->memen_in(ASSERT_LINE);
m_peribox->setaddress_dbin(space, dec->physaddr, read_mode);
set_wait(1);
}
@@ -1175,6 +1202,7 @@ void geneve_mapper_device::decode(address_space& space, offs_t offset, bool read
// Route everything else to the P-Box
dec->function = MPGMBOX;
dec->physaddr = (dec->physaddr & 0x001fffff); // 21 bit address for Genmod
+ m_peribox->memen_in(ASSERT_LINE);
m_peribox->setaddress_dbin(space, dec->physaddr, read_mode);
if (!m_turbo) set_wait(1);
}
@@ -1346,10 +1374,10 @@ WRITE_LINE_MEMBER( geneve_mapper_device::pfm_output_enable )
void geneve_mapper_device::device_start()
{
// Get pointers
- m_peribox = machine().device<bus8z_device>(PERIBOX_TAG);
+ m_peribox = machine().device<peribox_device>(PERIBOX_TAG);
m_keyboard = machine().device<geneve_keyboard_device>(GKEYBOARD_TAG);
- m_video = machine().device<bus8z_device>(VIDEO_SYSTEM_TAG);
- m_sound = machine().device<bus8z_device>(TISOUND_TAG);
+ m_video = machine().device<v9938_device>(VDP_TAG);
+ m_sound = machine().device<sn76496_base_device>(TISOUNDCHIP_TAG);
m_clock = machine().device<mm58274c_device>(GCLOCK_TAG);
// PFM expansion
diff --git a/src/devices/bus/ti99x/genboard.h b/src/devices/bus/ti99x/genboard.h
index 2248c64f9fe..4f9c5da7f27 100644
--- a/src/devices/bus/ti99x/genboard.h
+++ b/src/devices/bus/ti99x/genboard.h
@@ -19,6 +19,8 @@
#include "video/v9938.h"
#include "cpu/tms9900/tms9995.h"
#include "machine/at29x.h"
+#include "bus/ti99_peb/peribox.h"
+#include "sound/sn76496.h"
extern const device_type GENEVE_MOUSE;
extern const device_type GENEVE_KEYBOARD;
@@ -204,11 +206,11 @@ private:
tms9995_device* m_cpu;
at29c040_device* m_pfm512;
at29c040a_device* m_pfm512a;
+ sn76496_base_device* m_sound;
geneve_keyboard_device* m_keyboard;
- bus8z_device* m_video;
- bus8z_device* m_peribox;
- bus8z_device* m_sound;
+ v9938_device* m_video;
+ peribox_device* m_peribox;
UINT8* m_eprom;
UINT8* m_sram;
UINT8* m_dram;
diff --git a/src/devices/bus/ti99x/grom.cpp b/src/devices/bus/ti99x/grom.cpp
deleted file mode 100644
index 1ecb0168d80..00000000000
--- a/src/devices/bus/ti99x/grom.cpp
+++ /dev/null
@@ -1,269 +0,0 @@
-// license:LGPL-2.1+
-// copyright-holders:Michael Zapf
-/***************************************************************************
-
- GROM emulation (aka TMC0430)
-
- +----+--+----+
- AD7 |1 G 16| Vss
- AD6 |2 R 15| GR
- AD5 |3 O 14| Vdd
- AD4 |4 M 13| GRC
- AD3 |5 12| M
- AD2 |6 11| MO
- AD1 |7 10| GS*
- AD0 |8 9| Vcc
- +------------+
-
- GR = GROM Ready. Should be connected to processor's READY/HOLD*.
- GRC = GROM clock. Typically in the range of 400-500 kHz.
- M = Direction. 1=read, 0=write
- MO = Mode. 1=address counter access, 0=data access
- GS* = GROM select. 0=select, 1=deselect
-
- GROMs are slow ROM devices, which are
- interfaced via a 8-bit data bus, and include an internal address pointer
- which is incremented after each read. This implies that accesses are
- faster when reading consecutive bytes, although the address pointer can be
- read and written at any time.
-
- GROMs are generally used to store programs written in GPL (Graphic Programming
- Language): a proprietary, interpreted language. The GPL interpreter takes
- most space of the TI-99/4A system ROMs.
-
- Both TI-99/4 and TI-99/4A include three GROMs, with some start-up code,
- system routines and TI-Basic. TI99/4 includes an additional Equation
- Editor. According to the preliminary schematics found on ftp.whtech.com,
- TI-99/8 includes the three standard GROMs and 16 GROMs for the UCSD
- p-system. TI99/2 does not include GROMs at all, and was not designed to
- support any, although it should be relatively easy to create an expansion
- card with the GPL interpreter and a /4a cartridge port.
-
- Communication with GROM is done by writing and reading data over the
- AD0-AD7 lines. Within the TI-99 systems, the address bus is decoded for
- the M, GS*, and MO lines: Writing a byte to address 9c02 asserts the GS* and
- MO line, and clears the M line, which means the transmitted byte is put into
- the internal address register. Two bytes must be written to set up the
- complete address.
-
- It was obviously planned to offer GRAM circuits as well, since the
- programming manuals refer to writing to a special address, clearing the MO
- line. Although the TI-99 systems reserve a port in the memory space, no one
- has ever seen a GRAM circuit in the wild. However, third-party products like
- HSGPL or GRAM Kracker simulate GRAMs using conventional RAM with some
- addressing circuitry, usually in a custom chip.
-
- Each GROM is logically 8 KiB long. Original TI-built GROM are 6 KiB long;
- the extra 2kb can be read, and follow the following formula:
-
- GROM[0x1800+offset] = GROM[0x0800+offset] | GROM[0x1000+offset];
-
- (sounds like address decoding is incomplete - we are lucky we don't burn
- any silicon when doing so... Needless to say, some hackers simulated 8kb
- GRAMs and GROMs with normal RAM/PROM chips and glue logic.)
-
- The address pointer is incremented after each GROM operation, but it will
- always remain within the bounds of the currently selected GROM (e.g. after
- 0x3fff comes 0x2000).
-
- Since address are 16-bit long, you can have up to 8 GROMs. Accordingly,
- a cartridge may include up to 5 GROMs.
-
- Every GROM has an internal ID which represents the high-order three
- address bits. The address counter can be set to any value from 0
- to 0xffff; the GROM will only react when selected and when the current
- address counter's high-order bits match the ID of the chip.
- Example: When the ID is 6, the GROM will react when the address
- counter contains a value from 0xc000 to 0xdfff.
-
- CHECK: Reading the address increases the counter only once. The first access
- returns the MSB, the second (and all following accesses) return the LSB.
-
- Michael Zapf, August 2010
- January 2012: rewritten as class
-
-***************************************************************************/
-
-#include "emu.h"
-#include "grom.h"
-
-#define TRACE_ADDRESS 0
-
-/*
- Constructor.
-*/
-ti99_grom_device::ti99_grom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
-: bus8z_device(mconfig, GROM, "TI-99 GROM device", tag, owner, clock, "ti99_grom", __FILE__), m_writable(false), m_ident(0), m_size(0),
- m_gromready(*this), m_clockrate(0), m_address(0), m_buffer(0), m_raddr_LSB(false), m_waddr_LSB(false), m_memptr(nullptr), m_timer(nullptr)
-{
-}
-
-/*
- Reading from the chip. Represents an access with M=1, GS*=0. The MO bit is
- defined by the offset (0 or 1). This is the enhanced read function with
- Z state.
-*/
-READ8Z_MEMBER( ti99_grom_device::readz )
-{
- // Prevent debugger access
- if (space.debugger_access()) return;
-
- if (offset & 2)
- {
- // GROMs generally answer the address read request
- // (important if GROM simulators do not serve the request but rely on
- // the console GROMs) so we don't check the ident
-
- /* When reading, reset the hi/lo flag byte for writing. */
- /* TODO: Verify this with a real machine. */
- m_waddr_LSB = false;
-
- /* Address reading is done in two steps; first, the high byte */
- /* is transferred, then the low byte. */
- if (m_raddr_LSB)
- {
- /* second pass */
- *value = m_address & 0x00ff;
- m_raddr_LSB = false;
- }
- else
- {
- /* first pass */
- *value = (m_address & 0xff00)>>8;
- m_raddr_LSB = true;
- }
- }
- else
- {
- if (((m_address >> 13)&0x07)==m_ident)
- {
- // GROMs are buffered. Data is retrieved from a buffer,
- // while the buffer is replaced with the next cell content.
- if (TRACE_ADDRESS) if (m_ident==0) logerror("grom0: %04x = %02x\n", m_address-1, m_buffer);
- *value = m_buffer;
- // Get next value, put it in buffer. Note that the GROM
- // wraps at 8K boundaries.
- UINT16 addr = m_address-(m_ident<<13);
-
- if (m_size == 0x1800 && ((m_address&0x1fff)>=0x1800))
- m_buffer = m_memptr[addr-0x1000] | m_memptr[addr-0x0800];
- else
- m_buffer = m_memptr[addr];
- }
- // Note that all GROMs update their address counter.
- // TODO: Check this on a real console
- m_address = (m_address & 0xE000) | ((m_address + 1)&0x1FFF);
-
- // Reset the read and write address flipflops.
- m_raddr_LSB = m_waddr_LSB = false;
-
- // Maybe the timer is also required for address reading/setting, but
- // we don't have such technical details on GROMs.
- clear_ready();
- }
-}
-
-/*
- Writing to the chip. Represents an access with M=0, GS*=0. The MO bit is
- defined by the offset (0 or 1).
-*/
-WRITE8_MEMBER( ti99_grom_device::write )
-{
- // Prevent debugger access
- if (space.debugger_access()) return;
-
- if (offset & 2)
- {
- /* write GROM address */
- /* see comments above */
- m_raddr_LSB = false;
-
- /* Implements the internal flipflop. */
- /* The Editor/Assembler manuals says that the current address */
- /* plus one is returned. This effect is properly emulated */
- /* by using a read-ahead buffer. */
- if (m_waddr_LSB)
- {
- /* Accept low byte (2nd write) */
- m_address = (m_address & 0xFF00) | data;
- /* Setting the address causes a new prefetch */
- if (is_selected())
- {
- m_buffer = m_memptr[m_address-(m_ident<<13)];
- }
- m_waddr_LSB = false;
- if (TRACE_ADDRESS) if (m_ident==0) logerror("grom0: %04x\n", m_address);
- }
- else
- {
- /* Accept high byte (1st write). Do not advance the address conter. */
- m_address = (data << 8) | (m_address & 0xFF);
- m_waddr_LSB = true;
- return;
- }
- }
- else
- {
- /* write GRAM data */
- if ((((m_address >> 13)&0x07)==m_ident) && m_writable)
- {
- UINT16 write_addr;
- // We need to rewind by 1 because the read address has already advanced.
- // However, do not change the address counter!
- write_addr = (m_address & 0xE000) | ((m_address - 1)&0x1FFF);
-
- // UINT16 addr = m_address-(m_ident<<13);
- if (m_size > 0x1800 || ((m_address&0x1fff)<0x1800))
- m_memptr[write_addr-(m_ident<<13)] = data;
- }
- m_raddr_LSB = m_waddr_LSB = false;
- clear_ready();
- }
- m_address = (m_address & 0xE000) | ((m_address + 1)&0x1FFF);
-}
-
-/*
- Timing. We assume that each data read results in READY going down for
- one cycle at the given frequency.
-*/
-void ti99_grom_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
-{
- m_gromready(ASSERT_LINE);
-}
-
-void ti99_grom_device::clear_ready()
-{
- m_gromready(CLEAR_LINE);
- m_timer->adjust(attotime::from_hz(m_clockrate));
-}
-
-/***************************************************************************
- DEVICE FUNCTIONS
-***************************************************************************/
-
-void ti99_grom_device::device_start(void)
-{
- const ti99grom_config *conf = reinterpret_cast<const ti99grom_config *>(static_config());
-
- m_memptr = owner()->memregion(conf->regionname)->base();
- assert (m_memptr!=nullptr);
- m_memptr += conf->offset_reg;
-
- m_size = conf->size;
- m_clockrate = conf->clockrate;
- m_writable = conf->writable;
- m_ident = conf->ident;
- m_gromready.resolve_safe();
-
- m_timer = timer_alloc(0);
-}
-
-void ti99_grom_device::device_reset(void)
-{
- m_address = 0;
- m_raddr_LSB = false;
- m_waddr_LSB = false;
- m_buffer = 0;
-}
-
-const device_type GROM = &device_creator<ti99_grom_device>;
diff --git a/src/devices/bus/ti99x/grom.h b/src/devices/bus/ti99x/grom.h
deleted file mode 100644
index a3129b6997f..00000000000
--- a/src/devices/bus/ti99x/grom.h
+++ /dev/null
@@ -1,108 +0,0 @@
-// license:LGPL-2.1+
-// copyright-holders:Michael Zapf
-/***************************************************************************
-
- GROM emulation
- See grom.c for documentation,
-
- Michael Zapf
-
- February 2012: Rewritten as class
-
-***************************************************************************/
-#ifndef __TI99GROM__
-#define __TI99GROM__
-
-#include "ti99defs.h"
-
-struct ti99grom_config
-{
- bool writable;
- int ident;
- const char *regionname;
- offs_t offset_reg;
- int size;
- int clockrate;
-};
-
-#define GROM_CONFIG(name) \
- const ti99grom_config(name) =
-
-#define MCFG_GROM_READY_CALLBACK(_write) \
- devcb = &ti99_grom_device::set_ready_wr_callback(*device, DEVCB_##_write);
-
-extern const device_type GROM;
-
-/*
- ti99_grom. For bus8z_device see ti99defs.h
-*/
-class ti99_grom_device : public bus8z_device, ti99grom_config
-{
-public:
- ti99_grom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- template<class _Object> static devcb_base &set_ready_wr_callback(device_t &device, _Object object) { return downcast<ti99_grom_device &>(device).m_gromready.set_callback(object); }
-
- DECLARE_READ8Z_MEMBER(readz) override;
- DECLARE_WRITE8_MEMBER(write) override;
-
-private:
- // Is this a GRAM (never seen actually, but obviously planned)
- bool m_writable;
-
- // Identification of this GROM (0-7)
- int m_ident;
-
- // If the GROM has only 6 KiB, the remaining 2 KiB are filled with a
- // specific byte pattern which is created by a logical OR of lower
- // regions
- int m_size;
-
- // Ready callback. This line is usually connected to the READY pin of the CPU.
- devcb_write_line m_gromready;
-
- // Frequency of the incoming GROM clock. In most application cases the
- // GROM gets its clock from the video display processor (TMS9918)
- int m_clockrate;
-
- /* Address pointer. */
- // This value is always expected to be in the range 0x0000 - 0xffff, even
- // when this GROM is not addressed.
- UINT16 m_address;
-
- /* GROM data buffer. */
- UINT8 m_buffer;
-
- /* Internal flip-flop. Used when retrieving the address counter. */
- bool m_raddr_LSB;
-
- /* Internal flip-flops. Used when writing the address counter.*/
- bool m_waddr_LSB;
-
- /* Pointer to the memory region contained in this GROM. */
- UINT8 *m_memptr;
-
- // Timer for READY line operation
- emu_timer *m_timer;
-
- /* Indicates whether this device will react on the next read/write data access. */
- inline int is_selected()
- {
- return (((m_address >> 13)&0x07)==m_ident);
- }
-
- // Calling this method causes the READY line to be cleared, which puts the
- // CPU into wait state mode. A timer is set to raise READY again.
- void clear_ready();
-
- virtual void device_start(void) override;
- virtual void device_reset(void) override;
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-};
-
-
-#define MCFG_GROM_ADD(_tag, _config) \
- MCFG_DEVICE_ADD(_tag, GROM, 0) \
- MCFG_DEVICE_CONFIG(_config)
-
-#endif
diff --git a/src/devices/bus/ti99x/gromport.cpp b/src/devices/bus/ti99x/gromport.cpp
index 33ef82ae2a7..0109c15708d 100644
--- a/src/devices/bus/ti99x/gromport.cpp
+++ b/src/devices/bus/ti99x/gromport.cpp
@@ -40,7 +40,7 @@
This means that a maximum of 8 KiB of direct memory space can be accessed.
The /GS line is used to enable GROM circuits on the board (serial ROMs with
- own address counter, see grom.h).
+ own address counter, see tmc0430.h).
When a cartridge is inserted the /RESET line is pulled to ground, which
via a R/C component pulls down the /RESET input of the timer circuit for
@@ -111,6 +111,7 @@
***************************************************************************/
#include "gromport.h"
+#include "emuopts.h"
#include "image.h"
#include "softlist.h"
@@ -119,6 +120,7 @@
#define TRACE_ILLWRITE 0
#define TRACE_CONFIG 0
#define TRACE_READ 0
+#define TRACE_WRITE 0
#define TRACE_GROM 0
#define TRACE_GKRACKER 0
#define TRACE_CRU 0
@@ -186,20 +188,33 @@ gromport_device::gromport_device(const machine_config &mconfig, const char *tag,
m_connector(nullptr),
m_reset_on_insert(true),
m_console_ready(*this),
- m_console_reset(*this), m_grombase(0), m_grommask(0)
+ m_console_reset(*this) // , m_grombase(0), m_grommask(0)
{ }
-/* Only called for addresses 6000-7fff and GROM addresses (see datamux config) */
+/*
+ Reading via the GROM port. Only 13 address lines are passed through
+ on the TI-99/4A, and 14 lines on the TI-99/8.
+*/
READ8Z_MEMBER(gromport_device::readz)
{
if (m_connector != nullptr)
- m_connector->readz(space, offset, value);
+ {
+ m_connector->readz(space, offset & m_mask, value);
+ if (TRACE_READ) if (m_romgq) logerror("Read %04x -> %02x\n", offset, *value);
+ }
}
+/*
+ Writing via the GROM port. Only 13 address lines are passed through
+ on the TI-99/4A, and 14 lines on the TI-99/8.
+*/
WRITE8_MEMBER(gromport_device::write)
{
if (m_connector != nullptr)
- m_connector->write(space, offset, data);
+ {
+ if (TRACE_WRITE) if (m_romgq) logerror("Write %04x <- %02x\n", offset, data);
+ m_connector->write(space, offset & m_mask, data);
+ }
}
READ8Z_MEMBER(gromport_device::crureadz)
@@ -219,6 +234,31 @@ WRITE_LINE_MEMBER(gromport_device::ready_line)
m_console_ready(state);
}
+/*
+ Asserted when the console addresses cartridge rom.
+*/
+WRITE_LINE_MEMBER(gromport_device::romgq_line)
+{
+ m_romgq = state;
+ if (m_connector != nullptr)
+ m_connector->romgq_line(state);
+}
+
+WRITE_LINE_MEMBER(gromport_device::gclock_in)
+{
+ if (m_connector != nullptr)
+ m_connector->gclock_in(state);
+}
+
+/*
+ Combined GROM control lines.
+*/
+WRITE8_MEMBER( gromport_device::set_gromlines )
+{
+ if (m_connector != nullptr)
+ m_connector->set_gromlines(space, offset, data);
+}
+
void gromport_device::device_start()
{
m_console_ready.resolve();
@@ -230,11 +270,11 @@ void gromport_device::device_reset()
m_reset_on_insert = (ioport("CARTRESET")->read()==0x01);
}
-void gromport_device::set_grom_base(UINT16 grombase, UINT16 grommask)
-{
- m_grombase = grombase;
- m_grommask = grommask;
-}
+// void gromport_device::set_grom_base(UINT16 grombase, UINT16 grommask)
+// {
+ // m_grombase = grombase;
+ // m_grommask = grommask;
+// }
/*
Shall we reset the console when a cartridge has been inserted?
@@ -255,15 +295,18 @@ void gromport_device::cartridge_inserted()
void gromport_device::device_config_complete()
{
m_connector = static_cast<ti99_cartridge_connector_device*>(subdevices().first());
- set_grom_base(0x9800, 0xf800);
}
-SLOT_INTERFACE_START( gromport )
+SLOT_INTERFACE_START( gromport4 )
SLOT_INTERFACE("single", GROMPORT_SINGLE)
SLOT_INTERFACE("multi", GROMPORT_MULTI)
SLOT_INTERFACE("gkracker", GROMPORT_GK)
SLOT_INTERFACE_END
+SLOT_INTERFACE_START( gromport8 )
+ SLOT_INTERFACE("single", GROMPORT_SINGLE)
+ SLOT_INTERFACE("multi", GROMPORT_MULTI)
+SLOT_INTERFACE_END
INPUT_PORTS_START(gromport)
PORT_START( "CARTRESET" )
@@ -310,16 +353,6 @@ void ti99_cartridge_connector_device::device_config_complete()
m_gromport = static_cast<gromport_device*>(owner());
}
-UINT16 ti99_cartridge_connector_device::grom_base()
-{
- return m_gromport->get_grom_base();
-}
-
-UINT16 ti99_cartridge_connector_device::grom_mask()
-{
- return m_gromport->get_grom_mask();
-}
-
single_conn_device::single_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: ti99_cartridge_connector_device(mconfig, GROMPORT_SINGLE, "Standard cartridge connector", tag, owner, clock, "single", __FILE__),
m_cartridge(nullptr)
@@ -350,6 +383,28 @@ WRITE8_MEMBER(single_conn_device::cruwrite)
m_cartridge->cruwrite(space, offset, data);
}
+WRITE_LINE_MEMBER(single_conn_device::romgq_line)
+{
+ // Pass through
+ m_cartridge->romgq_line(state);
+}
+
+/*
+ Combined select lines
+*/
+WRITE8_MEMBER(single_conn_device::set_gromlines)
+{
+ // Pass through
+ m_cartridge->set_gromlines(space, offset, data);
+}
+
+
+WRITE_LINE_MEMBER(single_conn_device::gclock_in)
+{
+ // Pass through
+ m_cartridge->gclock_in(state);
+}
+
void single_conn_device::device_start()
{
m_cartridge = static_cast<ti99_cartridge_device*>(subdevices().first());
@@ -475,10 +530,8 @@ int multi_conn_device::get_active_slot(bool changebase, offs_t offset)
int slot;
if (changebase)
{
- if ((offset & grom_mask()) == grom_base())
- {
- set_slot((offset>>2) & 0x00ff);
- }
+ // GROM selected?
+ if (m_gsel != 0) set_slot((offset>>2) & 0x00ff);
}
slot = m_active_slot;
return slot;
@@ -497,6 +550,50 @@ void multi_conn_device::remove(int index)
m_cartridge[index] = nullptr;
}
+WRITE_LINE_MEMBER(multi_conn_device::romgq_line)
+{
+ m_readrom = state;
+
+ // Propagate to all slots
+ for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++)
+ {
+ if (m_cartridge[i] != nullptr)
+ {
+ m_cartridge[i]->romgq_line(state);
+ }
+ }
+}
+
+/*
+ Combined select lines
+*/
+WRITE8_MEMBER(multi_conn_device::set_gromlines)
+{
+ // GROM selected?
+ m_gsel = data;
+
+ // Propagate to all slots
+ for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++)
+ {
+ if (m_cartridge[i] != nullptr)
+ {
+ m_cartridge[i]->set_gromlines(space, offset, data);
+ }
+ }
+}
+
+WRITE_LINE_MEMBER(multi_conn_device::gclock_in)
+{
+ // Propagate to all slots
+ for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++)
+ {
+ if (m_cartridge[i] != nullptr)
+ {
+ m_cartridge[i]->gclock_in(state);
+ }
+ }
+}
+
READ8Z_MEMBER(multi_conn_device::readz)
{
int slot = get_active_slot(true, offset);
@@ -504,14 +601,14 @@ READ8Z_MEMBER(multi_conn_device::readz)
// If we have a GROM access, we need to send the read request to all
// attached cartridges so the slot is irrelevant here. Each GROM
// contains an internal address counter, and we must make sure they all stay in sync.
- if ((offset & grom_mask()) == grom_base())
+ if (m_gsel != 0)
{
for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++)
{
if (m_cartridge[i] != nullptr)
{
UINT8 newval = *value;
- m_cartridge[i]->readz(space, offset, &newval, mem_mask);
+ m_cartridge[i]->readz(space, offset, &newval, 0xff);
if (i==slot)
{
*value = newval;
@@ -523,33 +620,32 @@ READ8Z_MEMBER(multi_conn_device::readz)
{
if (slot < NUMBER_OF_CARTRIDGE_SLOTS && m_cartridge[slot] != nullptr)
{
- m_cartridge[slot]->readz(space, offset, value, mem_mask);
+ m_cartridge[slot]->readz(space, offset, value, 0xff);
}
}
}
WRITE8_MEMBER(multi_conn_device::write)
{
- int slot = get_active_slot(true, offset);
-
// Same issue as above (read)
// We don't have GRAM cartridges, anyway, so it's just used for setting the address.
- if ((offset & grom_mask()) == grom_base())
+ if (m_gsel != 0)
{
for (auto & elem : m_cartridge)
{
if (elem != nullptr)
{
- elem->write(space, offset, data, mem_mask);
+ elem->write(space, offset, data, 0xff);
}
}
}
else
{
+ int slot = get_active_slot(true, offset);
if (slot < NUMBER_OF_CARTRIDGE_SLOTS && m_cartridge[slot] != nullptr)
{
- // logerror("%s: try it on slot %d\n", tag(), slot);
- m_cartridge[slot]->write(space, offset, data, mem_mask);
+ // logerror("writing %04x (slot %d) <- %02x\n", offset, slot, data);
+ m_cartridge[slot]->write(space, offset, data, 0xff);
}
}
}
@@ -595,6 +691,7 @@ void multi_conn_device::device_reset(void)
{
m_active_slot = 0;
m_fixed_slot = ioport("CARTSLOT")->read() - 1;
+ m_gsel = 0;
}
static MACHINE_CONFIG_FRAGMENT( multi_slot )
@@ -751,9 +848,40 @@ gkracker_device::gkracker_device(const machine_config &mconfig, const char *tag,
{
}
+WRITE_LINE_MEMBER(gkracker_device::romgq_line)
+{
+ if (m_cartridge != nullptr)
+ {
+ // Propagate to the guest
+ m_cartridge->romgq_line(state);
+ }
+}
+
+/*
+ Combined select lines
+*/
+WRITE8_MEMBER(gkracker_device::set_gromlines)
+{
+ m_gsel = data;
+ if (m_cartridge != nullptr)
+ {
+ // Propagate to the guest
+ m_cartridge->set_gromlines(space, offset, data);
+ }
+}
+
+WRITE_LINE_MEMBER(gkracker_device::gclock_in)
+{
+ if (m_cartridge != nullptr)
+ {
+ // Propagate to the guest
+ m_cartridge->gclock_in(state);
+ }
+}
+
READ8Z_MEMBER(gkracker_device::readz)
{
- if ((offset & grom_mask()) == grom_base())
+ if (m_gsel != 0)
{
// Reads from the GRAM space of the GRAM Kracker.
@@ -863,7 +991,7 @@ WRITE8_MEMBER(gkracker_device::write)
m_cartridge->write(space, offset, data, mem_mask);
}
- if ((offset & grom_mask()) == grom_base())
+ if (m_gsel != 0)
{
// Write to the GRAM space of the GRAM Kracker.
if ((offset & 0x0002)==0x0002)
@@ -1056,6 +1184,7 @@ void gkracker_device::device_reset()
m_grom_address = 0; // for the GROM emulation
m_ram_page = 0;
m_waddr_LSB = false;
+ m_gsel = 0;
}
static MACHINE_CONFIG_FRAGMENT( gkracker_slot )
@@ -1270,15 +1399,15 @@ bool ti99_cartridge_device::has_grom()
return m_pcb->m_grom_size>0;
}
-UINT16 ti99_cartridge_device::grom_base()
-{
- return m_connector->grom_base();
-}
-
-UINT16 ti99_cartridge_device::grom_mask()
-{
- return m_connector->grom_mask();
-}
+// UINT16 ti99_cartridge_device::grom_base()
+// {
+ // return m_connector->grom_base();
+// }
+//
+// UINT16 ti99_cartridge_device::grom_mask()
+// {
+ // return m_connector->grom_mask();
+// }
bool ti99_cartridge_device::call_load()
{
@@ -1401,12 +1530,14 @@ bool ti99_cartridge_device::call_softlist_load(software_list_device &swlist, con
READ8Z_MEMBER(ti99_cartridge_device::readz)
{
- if (m_pcb != nullptr) m_pcb->readz(space, offset, value);
+ if (m_pcb != nullptr)
+ m_pcb->readz(space, offset, value);
}
WRITE8_MEMBER(ti99_cartridge_device::write)
{
- if (m_pcb != nullptr) m_pcb->write(space, offset, data);
+ if (m_pcb != nullptr)
+ m_pcb->write(space, offset, data);
}
READ8Z_MEMBER(ti99_cartridge_device::crureadz)
@@ -1424,48 +1555,44 @@ WRITE_LINE_MEMBER( ti99_cartridge_device::ready_line )
m_connector->ready_line(state);
}
-void ti99_cartridge_device::device_config_complete()
+WRITE_LINE_MEMBER( ti99_cartridge_device::romgq_line )
{
- update_names();
- m_softlist = false;
- m_connector = static_cast<ti99_cartridge_connector_device*>(owner());
+ if (m_pcb != nullptr)
+ {
+ m_pcb->romgq_line(state);
+ m_readrom = state;
+ }
}
-static GROM_CONFIG(grom3_config)
-{
- false, 3, CARTGROM_TAG, 0x0000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(grom4_config)
-{
- false, 4, CARTGROM_TAG, 0x2000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(grom5_config)
+/*
+ Combined select lines
+*/
+WRITE8_MEMBER(ti99_cartridge_device::set_gromlines)
{
- false, 5, CARTGROM_TAG, 0x4000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(grom6_config)
+ if (m_pcb != nullptr) m_pcb->set_gromlines(space, offset, data);
+}
+
+WRITE_LINE_MEMBER(ti99_cartridge_device::gclock_in)
{
- false, 6, CARTGROM_TAG, 0x6000, 0x1800, GROMFREQ
-};
-static GROM_CONFIG(grom7_config)
+ if (m_pcb != nullptr) m_pcb->gclock_in(state);
+}
+
+void ti99_cartridge_device::device_config_complete()
{
- false, 7, CARTGROM_TAG, 0x8000, 0x1800, GROMFREQ
-};
+ update_names();
+ m_softlist = false;
+ m_connector = static_cast<ti99_cartridge_connector_device*>(owner());
+}
/*
5 GROMs that may be contained in a cartridge
*/
static MACHINE_CONFIG_FRAGMENT( ti99_cartridge )
- MCFG_GROM_ADD( GROM3_TAG, grom3_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_cartridge_device, ready_line))
- MCFG_GROM_ADD( GROM4_TAG, grom4_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_cartridge_device, ready_line))
- MCFG_GROM_ADD( GROM5_TAG, grom5_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_cartridge_device, ready_line))
- MCFG_GROM_ADD( GROM6_TAG, grom6_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_cartridge_device, ready_line))
- MCFG_GROM_ADD( GROM7_TAG, grom7_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_cartridge_device, ready_line))
+ MCFG_GROM_ADD( GROM3_TAG, 3, CARTGROM_TAG, 0x0000, WRITELINE(ti99_cartridge_device, ready_line))
+ MCFG_GROM_ADD( GROM4_TAG, 4, CARTGROM_TAG, 0x2000, WRITELINE(ti99_cartridge_device, ready_line))
+ MCFG_GROM_ADD( GROM5_TAG, 5, CARTGROM_TAG, 0x4000, WRITELINE(ti99_cartridge_device, ready_line))
+ MCFG_GROM_ADD( GROM6_TAG, 6, CARTGROM_TAG, 0x6000, WRITELINE(ti99_cartridge_device, ready_line))
+ MCFG_GROM_ADD( GROM7_TAG, 7, CARTGROM_TAG, 0x8000, WRITELINE(ti99_cartridge_device, ready_line))
MACHINE_CONFIG_END
machine_config_constructor ti99_cartridge_device::device_mconfig_additions() const
@@ -1499,19 +1626,31 @@ const device_type TI99CART = &device_creator<ti99_cartridge_device>;
Unlike in the previous implementation we do not model it as a full device.
***************************************************************************/
-ti99_cartridge_pcb::ti99_cartridge_pcb(): m_cart(nullptr), m_grom_size(0), m_rom_size(0), m_ram_size(0), m_rom_ptr(nullptr), m_ram_ptr(nullptr), m_rom_page(0), m_grom_ptr(nullptr), m_grom_address(0), m_ram_page(0), m_tag(nullptr)
-{
-}
-
-UINT16 ti99_cartridge_pcb::grom_base()
+ti99_cartridge_pcb::ti99_cartridge_pcb()
+ : m_cart(nullptr),
+ m_grom_size(0),
+ m_rom_size(0),
+ m_ram_size(0),
+ m_rom_ptr(nullptr),
+ m_ram_ptr(nullptr),
+ m_access_cartspace(false),
+ m_rom_page(0),
+ m_grom_ptr(nullptr),
+ m_grom_address(0),
+ m_ram_page(0),
+ m_tag(nullptr)
{
- return m_cart->grom_base();
}
-UINT16 ti99_cartridge_pcb::grom_mask()
-{
- return m_cart->grom_mask();
-}
+// UINT16 ti99_cartridge_pcb::grom_base()
+// {
+ // return m_cart->grom_base();
+// }
+//
+// UINT16 ti99_cartridge_pcb::grom_mask()
+// {
+ // return m_cart->grom_mask();
+// }
void ti99_cartridge_pcb::set_cartridge(ti99_cartridge_device *cart)
{
@@ -1540,31 +1679,38 @@ WRITE8_MEMBER(ti99_cartridge_pcb::gromwrite)
}
}
+/*
+ TI-99/4A cartridges can only occupy 8 KiB of CPU RAM space. For TI-99/8
+ cartridges with up to 16 KiB we need a new PCB type. Unfortunately, such
+ cartridges were never developed.
+*/
READ8Z_MEMBER(ti99_cartridge_pcb::readz)
{
- if ((offset & grom_mask())==grom_base())
- gromreadz(space, offset, value, mem_mask);
- else
+ if (m_access_cartspace)
{
if (m_rom_ptr!=nullptr)
{
- // For TI-99/8 we should plan for 16K cartridges. However, none was ever produced.
- // Well, forget about that.
*value = m_rom_ptr[offset & 0x1fff];
- // logerror("%s: read cartridge rom space %04x = %02x\n", tag(), offset, *value);
}
}
+ else
+ {
+ // Will not return anything when not selected (preceding gsq=ASSERT)
+ gromreadz(space, offset, value, mem_mask);
+ }
}
WRITE8_MEMBER(ti99_cartridge_pcb::write)
{
- // logerror("%s: write standard\n", tag());
- if ((offset & grom_mask())==grom_base())
- gromwrite(space, offset, data, mem_mask);
- else
+ if (m_access_cartspace)
{
if (TRACE_ILLWRITE) space.device().logerror("%s: Cannot write to ROM space at %04x\n", tag(), offset);
}
+ else
+ {
+ // Will not change anything when not selected (preceding gsq=ASSERT)
+ gromwrite(space, offset, data, mem_mask);
+ }
}
READ8Z_MEMBER(ti99_cartridge_pcb::crureadz)
@@ -1575,11 +1721,35 @@ WRITE8_MEMBER(ti99_cartridge_pcb::cruwrite)
{
}
-inline void ti99_cartridge_pcb::set_grom_pointer(int number, device_t *dev)
+void ti99_cartridge_pcb::set_grom_pointer(int number, device_t *dev)
{
- m_grom[number] = static_cast<ti99_grom_device*>(dev);
+ m_grom[number] = static_cast<tmc0430_device*>(dev);
}
+
+WRITE_LINE_MEMBER( ti99_cartridge_pcb::romgq_line )
+{
+ m_access_cartspace = (state==ASSERT_LINE);
+}
+
+// Propagate to all GROMs
+
+/*
+ Combined select lines
+*/
+WRITE8_MEMBER(ti99_cartridge_pcb::set_gromlines)
+{
+ for (auto& elem : m_grom)
+ if (elem != nullptr) elem->set_lines(space, offset, data);
+}
+
+WRITE_LINE_MEMBER(ti99_cartridge_pcb::gclock_in)
+{
+ for (auto& elem : m_grom)
+ if (elem != nullptr) elem->gclock_in(state);
+}
+
+
/*****************************************************************************
Cartridge type: Paged (Extended Basic)
This cartridge consists of GROM memory and 2 pages of standard ROM.
@@ -1591,23 +1761,28 @@ inline void ti99_cartridge_pcb::set_grom_pointer(int number, device_t *dev)
READ8Z_MEMBER(ti99_paged_cartridge::readz)
{
- if ((offset & grom_mask())==grom_base())
- gromreadz(space, offset, value, mem_mask);
- else
+ if (m_access_cartspace)
{
*value = m_rom_ptr[(offset & 0x1fff) | (m_rom_page << 13)];
}
+ else
+ {
+ // Will not return anything when not selected (preceding gsq=ASSERT)
+ gromreadz(space, offset, value, mem_mask);
+ }
}
WRITE8_MEMBER(ti99_paged_cartridge::write)
{
- // logerror("%s: write standard\n", tag());
- if ((offset & grom_mask())==grom_base())
- gromwrite(space, offset, data, mem_mask);
-
- else {
+ if (m_access_cartspace)
+ {
m_rom_page = (offset >> 1) & 1;
}
+ else
+ {
+ // Will not change anything when not selected (preceding gsq=ASSERT)
+ gromwrite(space, offset, data, mem_mask);
+ }
}
/*****************************************************************************
@@ -1620,10 +1795,7 @@ WRITE8_MEMBER(ti99_paged_cartridge::write)
/* Read function for the minimem cartridge. */
READ8Z_MEMBER(ti99_minimem_cartridge::readz)
{
- if ((offset & grom_mask())==grom_base())
- gromreadz(space, offset, value, mem_mask);
-
- else
+ if (m_access_cartspace)
{
if ((offset & 0x1000)==0x0000)
{
@@ -1637,16 +1809,16 @@ READ8Z_MEMBER(ti99_minimem_cartridge::readz)
*value = m_ram_ptr[offset & 0x0fff];
}
}
+ else
+ {
+ gromreadz(space, offset, value, mem_mask);
+ }
}
/* Write function for the minimem cartridge. */
WRITE8_MEMBER(ti99_minimem_cartridge::write)
{
- // logerror("%s: write standard\n", tag());
- if ((offset & grom_mask())==grom_base())
- gromwrite(space, offset, data, mem_mask);
-
- else
+ if (m_access_cartspace)
{
if ((offset & 0x1000)==0x0000)
{
@@ -1657,6 +1829,10 @@ WRITE8_MEMBER(ti99_minimem_cartridge::write)
m_ram_ptr[offset & 0x0fff] = data;
}
}
+ else
+ {
+ gromwrite(space, offset, data, mem_mask);
+ }
}
/*****************************************************************************
@@ -1678,26 +1854,30 @@ WRITE8_MEMBER(ti99_minimem_cartridge::write)
/* Read function for the super cartridge. */
READ8Z_MEMBER(ti99_super_cartridge::readz)
{
- if ((offset & grom_mask())==grom_base())
- gromreadz(space, offset, value, mem_mask);
- else
+ if (m_access_cartspace)
{
if (m_ram_ptr != nullptr)
{
*value = m_ram_ptr[(m_ram_page << 13) | (offset & 0x1fff)];
}
}
+ else
+ {
+ gromreadz(space, offset, value, mem_mask);
+ }
}
/* Write function for the super cartridge. */
WRITE8_MEMBER(ti99_super_cartridge::write)
{
- if ((offset & grom_mask())==grom_base())
- gromwrite(space, offset, data, mem_mask);
- else
+ if (m_access_cartspace)
{
m_ram_ptr[(m_ram_page << 13) | (offset & 0x1fff)] = data;
}
+ else
+ {
+ gromwrite(space, offset, data, mem_mask);
+ }
}
READ8Z_MEMBER(ti99_super_cartridge::crureadz)
@@ -1763,9 +1943,7 @@ WRITE8_MEMBER(ti99_super_cartridge::cruwrite)
/* Read function for the mbx cartridge. */
READ8Z_MEMBER(ti99_mbx_cartridge::readz)
{
- if ((offset & grom_mask())==grom_base())
- gromreadz(space, offset, value, mem_mask);
- else
+ if (m_access_cartspace)
{
if ((offset & 0x1c00)==0x0c00)
{
@@ -1781,14 +1959,16 @@ READ8Z_MEMBER(ti99_mbx_cartridge::readz)
*value = m_rom_ptr[(offset & 0x1fff) | (m_rom_page<<13)];
}
}
+ else
+ {
+ gromreadz(space, offset, value, mem_mask);
+ }
}
/* Write function for the mbx cartridge. */
WRITE8_MEMBER(ti99_mbx_cartridge::write)
{
- if ((offset & grom_mask())==grom_base())
- gromwrite(space, offset, data, mem_mask);
- else
+ if (m_access_cartspace)
{
if (offset == 0x6ffe)
{
@@ -1802,6 +1982,10 @@ WRITE8_MEMBER(ti99_mbx_cartridge::write)
m_ram_ptr[offset & 0x03ff] = data;
}
}
+ else
+ {
+ gromwrite(space, offset, data, mem_mask);
+ }
}
/*****************************************************************************
@@ -2032,9 +2216,15 @@ WRITE8_MEMBER(ti99_pagedcru_cartridge::cruwrite)
******************************************************************************/
+WRITE_LINE_MEMBER(ti99_gromemu_cartridge::gsq_line)
+{
+ m_grom_space = (state==ASSERT_LINE);
+}
+
+
READ8Z_MEMBER(ti99_gromemu_cartridge::readz)
{
- if ((offset & grom_mask())==grom_base())
+ if (m_grom_space)
gromemureadz(space, offset, value, mem_mask);
else
{
@@ -2055,8 +2245,7 @@ READ8Z_MEMBER(ti99_gromemu_cartridge::readz)
WRITE8_MEMBER(ti99_gromemu_cartridge::write)
{
- // logerror("%s: write standard\n", tag());
- if ((offset & grom_mask())==grom_base())
+ if (m_grom_space)
gromemuwrite(space, offset, data, mem_mask);
else {
@@ -2179,7 +2368,7 @@ rpk::rpk(emu_options& options, const char* sysname)
rpk::~rpk()
{
- //if (TRACE_RPK) logerror("gromport/RPK: Destroy RPK\n");
+ if (TRACE_RPK) printf("gromport/RPK: Destroy RPK\n");
}
/*
@@ -2290,7 +2479,7 @@ rpk_socket* rpk_reader::load_rom_resource(util::archive_file &zip, xml_data_node
file = xml_get_attribute_string(rom_resource_node, "file", nullptr);
if (file == nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "<rom> must have a 'file' attribute");
- //if (TRACE_RPK) logerror("gromport/RPK: Loading ROM contents for socket '%s' from file %s\n", socketname, file);
+ if (TRACE_RPK) printf("gromport/RPK: Loading ROM contents for socket '%s' from file %s\n", socketname, file);
// check for crc
crcstr = xml_get_attribute_string(rom_resource_node, "crc", nullptr);
@@ -2378,7 +2567,7 @@ rpk_socket* rpk_reader::load_ram_resource(emu_options &options, xml_data_node* r
contents = global_alloc_array_clear<UINT8>(length);
if (contents==nullptr) throw rpk_exception(RPK_OUT_OF_MEMORY);
- //if (TRACE_RPK) logerror("gromport/RPK: Allocating RAM buffer (%d bytes) for socket '%s'\n", length, socketname);
+ if (TRACE_RPK) printf("gromport/RPK: Allocating RAM buffer (%d bytes) for socket '%s'\n", length, socketname);
ram_pname = nullptr;
@@ -2400,7 +2589,7 @@ rpk_socket* rpk_reader::load_ram_resource(emu_options &options, xml_data_node* r
std::string ram_pathname = std::string(system_name).append(PATH_SEPARATOR).append(ram_filename);
ram_pname = core_strdup(ram_pathname.c_str());
// load, and fill rest with 00
- //if (TRACE_RPK) logerror("gromport/RPK: Loading NVRAM contents from '%s'\n", ram_pname);
+ if (TRACE_RPK) printf("gromport/RPK: Loading NVRAM contents from '%s'\n", ram_pname);
image_battery_load_by_name(options, ram_pname, contents, length, 0x00);
}
}
@@ -2488,7 +2677,7 @@ rpk* rpk_reader::open(emu_options &options, const char *filename, const char *sy
// We'll try to find the PCB type on the provided type list.
pcb_type = xml_get_attribute_string(pcb_node, "type", nullptr);
if (pcb_type==nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "<pcb> must have a 'type' attribute");
- //if (TRACE_RPK) logerror("gromport/RPK: Cartridge says it has PCB type '%s'\n", pcb_type);
+ if (TRACE_RPK) printf("gromport/RPK: Cartridge says it has PCB type '%s'\n", pcb_type);
i=0;
do
diff --git a/src/devices/bus/ti99x/gromport.h b/src/devices/bus/ti99x/gromport.h
index 36900c40045..8f49a7f98d4 100644
--- a/src/devices/bus/ti99x/gromport.h
+++ b/src/devices/bus/ti99x/gromport.h
@@ -13,7 +13,7 @@
#include "emu.h"
#include "ti99defs.h"
-#include "grom.h"
+#include "machine/tmc0430.h"
extern const device_type GROMPORT;
@@ -29,13 +29,22 @@ public:
DECLARE_WRITE8_MEMBER(cruwrite);
DECLARE_WRITE_LINE_MEMBER(ready_line);
+ DECLARE_WRITE_LINE_MEMBER(romgq_line);
+
+ // Combined GROM select lines
+ DECLARE_WRITE8_MEMBER(set_gromlines);
+
+ DECLARE_WRITE_LINE_MEMBER(gclock_in);
+
+ static void set_mask(device_t &device, int mask) { downcast<gromport_device &>(device).m_mask = mask; }
+
template<class _Object> static devcb_base &static_set_ready_callback(device_t &device, _Object object) { return downcast<gromport_device &>(device).m_console_ready.set_callback(object); }
template<class _Object> static devcb_base &static_set_reset_callback(device_t &device, _Object object) { return downcast<gromport_device &>(device).m_console_reset.set_callback(object); }
void cartridge_inserted();
- void set_grom_base(UINT16 grombase, UINT16 grommask);
- UINT16 get_grom_base() { return m_grombase; }
- UINT16 get_grom_mask() { return m_grommask; }
+ // void set_grom_base(UINT16 grombase, UINT16 grommask);
+ // UINT16 get_grom_base() { return m_grombase; }
+ // UINT16 get_grom_mask() { return m_grommask; }
protected:
virtual void device_start() override;
@@ -48,15 +57,24 @@ private:
bool m_reset_on_insert;
devcb_write_line m_console_ready;
devcb_write_line m_console_reset;
- UINT16 m_grombase;
- UINT16 m_grommask;
+ int m_mask;
+ int m_romgq;
+ // UINT16 m_grombase;
+ // UINT16 m_grommask;
};
-SLOT_INTERFACE_EXTERN(gromport);
+SLOT_INTERFACE_EXTERN(gromport4);
+SLOT_INTERFACE_EXTERN(gromport8);
-#define MCFG_TI99_GROMPORT_ADD( _tag ) \
+#define MCFG_GROMPORT4_ADD( _tag ) \
MCFG_DEVICE_ADD(_tag, GROMPORT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(gromport, "single", false)
+ gromport_device::set_mask(*device, 0x1fff); \
+ MCFG_DEVICE_SLOT_INTERFACE(gromport4, "single", false)
+
+#define MCFG_GROMPORT8_ADD( _tag ) \
+ MCFG_DEVICE_ADD(_tag, GROMPORT, 0) \
+ gromport_device::set_mask(*device, 0x3fff); \
+ MCFG_DEVICE_SLOT_INTERFACE(gromport8, "single", false)
#define MCFG_GROMPORT_READY_HANDLER( _ready ) \
devcb = &gromport_device::static_set_ready_callback( *device, DEVCB_##_ready );
@@ -80,11 +98,16 @@ public:
DECLARE_WRITE8_MEMBER(cruwrite);
DECLARE_WRITE_LINE_MEMBER(ready_line);
+ DECLARE_WRITE_LINE_MEMBER(romgq_line);
+ DECLARE_WRITE8_MEMBER(set_gromlines);
+
+ DECLARE_WRITE_LINE_MEMBER(gclock_in);
+
bool is_available() { return m_pcb != nullptr; }
bool has_grom();
void set_slot(int i);
- UINT16 grom_base();
- UINT16 grom_mask();
+ // UINT16 grom_base();
+ // UINT16 grom_mask();
protected:
virtual void device_start() override { };
@@ -111,6 +134,7 @@ protected:
const option_guide *create_option_guide() const override { return nullptr; }
private:
+ bool m_readrom;
bool m_softlist;
int m_pcbtype;
int m_slot;
@@ -136,18 +160,24 @@ public:
virtual DECLARE_READ8Z_MEMBER(crureadz) = 0;
virtual DECLARE_WRITE8_MEMBER(cruwrite) = 0;
+ virtual DECLARE_WRITE_LINE_MEMBER(romgq_line) =0;
+ virtual DECLARE_WRITE8_MEMBER(set_gromlines) =0;
+
+ virtual DECLARE_WRITE_LINE_MEMBER(gclock_in) =0;
+
DECLARE_WRITE_LINE_MEMBER(ready_line);
virtual void insert(int index, ti99_cartridge_device* cart) { m_gromport->cartridge_inserted(); };
virtual void remove(int index) { };
- UINT16 grom_base();
- UINT16 grom_mask();
+ // UINT16 grom_base();
+ // UINT16 grom_mask();
protected:
ti99_cartridge_connector_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
virtual void device_config_complete() override;
gromport_device* m_gromport;
+ int m_gsel;
};
/*
@@ -162,6 +192,9 @@ public:
DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
DECLARE_WRITE8_MEMBER(cruwrite) override;
+ DECLARE_WRITE_LINE_MEMBER(romgq_line) override;
+ DECLARE_WRITE8_MEMBER(set_gromlines) override;
+ DECLARE_WRITE_LINE_MEMBER(gclock_in) override;
protected:
virtual void device_start() override;
@@ -190,6 +223,9 @@ public:
DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
DECLARE_WRITE8_MEMBER(cruwrite) override;
+ DECLARE_WRITE_LINE_MEMBER(romgq_line) override;
+ DECLARE_WRITE8_MEMBER(set_gromlines) override;
+ DECLARE_WRITE_LINE_MEMBER(gclock_in) override;
void insert(int index, ti99_cartridge_device* cart) override;
void remove(int index) override;
@@ -201,6 +237,7 @@ protected:
virtual ioport_constructor device_input_ports() const override;
private:
+ bool m_readrom;
int m_active_slot;
int m_fixed_slot;
int m_next_free_slot;
@@ -222,6 +259,9 @@ public:
DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
DECLARE_WRITE8_MEMBER(cruwrite) override;
+ DECLARE_WRITE_LINE_MEMBER(romgq_line) override;
+ DECLARE_WRITE8_MEMBER(set_gromlines) override;
+ DECLARE_WRITE_LINE_MEMBER(gclock_in) override;
void insert(int index, ti99_cartridge_device* cart) override;
void remove(int index) override;
@@ -275,23 +315,28 @@ protected:
virtual DECLARE_READ8Z_MEMBER(crureadz);
virtual DECLARE_WRITE8_MEMBER(cruwrite);
+ DECLARE_WRITE_LINE_MEMBER(romgq_line);
+ DECLARE_WRITE8_MEMBER(set_gromlines);
+ DECLARE_WRITE_LINE_MEMBER(gclock_in);
+
DECLARE_READ8Z_MEMBER(gromreadz);
DECLARE_WRITE8_MEMBER(gromwrite);
inline void set_grom_pointer(int number, device_t *dev);
void set_cartridge(ti99_cartridge_device *cart);
- UINT16 grom_base();
- UINT16 grom_mask();
+ // UINT16 grom_base();
+ // UINT16 grom_mask();
const char* tag() { return m_tag; }
void set_tag(const char* tag) { m_tag = tag; }
ti99_cartridge_device* m_cart;
- ti99_grom_device* m_grom[5];
+ tmc0430_device* m_grom[5];
int m_grom_size;
int m_rom_size;
int m_ram_size;
UINT8* m_rom_ptr;
UINT8* m_ram_ptr;
+ bool m_access_cartspace;
int m_rom_page; // for some cartridge types
UINT8* m_grom_ptr; // for gromemu
int m_grom_address; // for gromemu
@@ -398,15 +443,19 @@ public:
class ti99_gromemu_cartridge : public ti99_cartridge_pcb
{
public:
- ti99_gromemu_cartridge(): m_waddr_LSB(false)
+ ti99_gromemu_cartridge(): m_waddr_LSB(false), m_grom_space(false)
{ m_grom_address = 0; }
~ti99_gromemu_cartridge() { };
DECLARE_READ8Z_MEMBER(readz) override;
DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(gromemureadz);
DECLARE_WRITE8_MEMBER(gromemuwrite);
+
+ DECLARE_WRITE_LINE_MEMBER(gsq_line);
+
private:
bool m_waddr_LSB;
+ bool m_grom_space;
};
diff --git a/src/devices/bus/ti99x/ti99defs.h b/src/devices/bus/ti99x/ti99defs.h
index 130c0cfbc40..8d137e6599f 100644
--- a/src/devices/bus/ti99x/ti99defs.h
+++ b/src/devices/bus/ti99x/ti99defs.h
@@ -32,6 +32,7 @@
#define JOYPORT_TAG "joyport"
#define VDP_TAG "vdp"
#define DSRROM "dsrrom"
+#define CONSOLEROM "consolerom"
#define VDPFREQ XTAL_10_738635MHz
#define GROMFREQ VDPFREQ/24
@@ -41,10 +42,49 @@
#define DRAM_TAG "dram8"
#define MAPPER_TAG "mapper"
#define MAINBOARD8_TAG "mainboard8"
-#define SPEECH_TAG "speech"
-#define ROM0_TAG "rom0"
-#define ROM1_TAG "rom1"
-#define PCODEROM_TAG "pcode"
+#define SPEECHSYN_TAG "speech"
+
+#define ROM0_REG "rom0_region"
+#define ROM1_REG "rom1_region"
+#define PASCAL_REG "pascal_region"
+#define SYSGROM_REG "sysgrom_region"
+#define GROMLIB1_REG "gromlib1_region"
+#define GROMLIB2_REG "gromlib2_region"
+#define GROMLIB3_REG "gromlib3_region"
+#define SPEECHROM_REG "speech_region"
+
+#define GROMLIB_TAG "gromlib"
+#define SYSGROM_TAG GROMLIB_TAG "0"
+#define SYSGROM0_TAG SYSGROM_TAG "_0"
+#define SYSGROM1_TAG SYSGROM_TAG "_1"
+#define SYSGROM2_TAG SYSGROM_TAG "_2"
+
+#define GLIB1_TAG GROMLIB_TAG "1"
+#define GLIB10_TAG GLIB1_TAG "_0"
+#define GLIB11_TAG GLIB1_TAG "_1"
+#define GLIB12_TAG GLIB1_TAG "_2"
+#define GLIB13_TAG GLIB1_TAG "_3"
+#define GLIB14_TAG GLIB1_TAG "_4"
+#define GLIB15_TAG GLIB1_TAG "_5"
+#define GLIB16_TAG GLIB1_TAG "_6"
+#define GLIB17_TAG GLIB1_TAG "_7"
+
+#define GLIB2_TAG GROMLIB_TAG "2"
+#define GLIB20_TAG GLIB2_TAG "_0"
+#define GLIB21_TAG GLIB2_TAG "_1"
+#define GLIB22_TAG GLIB2_TAG "_2"
+#define GLIB23_TAG GLIB2_TAG "_3"
+#define GLIB24_TAG GLIB2_TAG "_4"
+#define GLIB25_TAG GLIB2_TAG "_5"
+#define GLIB26_TAG GLIB2_TAG "_6"
+#define GLIB27_TAG GLIB2_TAG "_7"
+
+#define GLIB3_TAG GROMLIB_TAG "3"
+#define GLIB30_TAG GLIB3_TAG "_0"
+#define GLIB31_TAG GLIB3_TAG "_1"
+#define GLIB32_TAG GLIB3_TAG "_2"
+
+
// Geneve
#define GKEYBOARD_TAG "gkeyboard"
diff --git a/src/devices/bus/ti99x/videowrp.cpp b/src/devices/bus/ti99x/videowrp.cpp
index 6f09da722e7..4aa1935f226 100644
--- a/src/devices/bus/ti99x/videowrp.cpp
+++ b/src/devices/bus/ti99x/videowrp.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Michael Zapf
/****************************************************************************
- TI-99/4(A) and /8 Video subsystem
+ TI-99/4A Video subsystem
This device actually wraps the naked video chip implementation
EVPC (Enhanced Video Processor Card) from SNUG
@@ -11,18 +11,12 @@
The SGCPU ("TI-99/4P") only runs with EVPC
- We also include a class wrapper for the sound chip here.
-
Michael Zapf
- October 2010
- February 2012: Rewritten as class
-
*****************************************************************************/
#include "emu.h"
#include "videowrp.h"
-#include "sound/sn76496.h"
/*
Constructors
@@ -39,23 +33,14 @@ ti_std_video_device::ti_std_video_device(const machine_config &mconfig, const ch
}
ti_exp_video_device::ti_exp_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : ti_video_device(mconfig, V9938VIDEO, "TI99 EXP Video subsystem", tag, owner, clock, "v9938_video", __FILE__), m_v9938(nullptr)
-{
-}
-
-ti_sound_sn94624_device::ti_sound_sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : ti_sound_system_device(mconfig, TISOUND_94624, "Onboard sound (SN94624)", tag, owner, clock, "ti_sound_sn94624", __FILE__)
-{
-}
-
-ti_sound_sn76496_device::ti_sound_sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : ti_sound_system_device(mconfig, TISOUND_76496, "Onboard sound (SN76496)", tag, owner, clock, "ti_sound_sn76496", __FILE__)
+ : ti_video_device(mconfig, V9938VIDEO, "TI99 EXP Video subsystem", tag, owner, clock, "v9938_video", __FILE__),
+ m_v9938(nullptr)
{
}
/*****************************************************************************/
/*
- Memory access (TI-99/4A and TI-99/8)
+ Accessing TMS9928A (TI-99/4A)
*/
READ8Z_MEMBER( ti_std_video_device::readz )
{
@@ -88,104 +73,38 @@ WRITE8_MEMBER( ti_std_video_device::write )
/*****************************************************************************/
/*
- Memory access (EVPC) via 16 bit bus
+ Accessing v9938 via 16 bit bus (SGCPU)
*/
READ16_MEMBER( ti_exp_video_device::read16 )
{
if (space.debugger_access()) return 0;
-
- if (offset & 1)
- { /* read VDP status */
- return ((int) m_v9938->status_r()) << 8;
- }
- else
- { /* read VDP RAM */
- return ((int) m_v9938->vram_r()) << 8;
- }
+ return (int)(m_v9938->read(space, offset)<<8);
}
WRITE16_MEMBER( ti_exp_video_device::write16 )
{
if (space.debugger_access()) return;
-
- switch (offset & 3)
- {
- case 0:
- /* write VDP data */
- m_v9938->vram_w((data >> 8) & 0xff);
- break;
- case 1:
- /* write VDP address */
- m_v9938->command_w((data >> 8) & 0xff);
- break;
- case 2:
- /* write VDP palette */
- m_v9938->palette_w((data >> 8) & 0xff);
- break;
- case 3:
- /* write VDP register pointer (indirect access) */
- m_v9938->register_w((data >> 8) & 0xff);
- break;
- }
+ m_v9938->write(space, offset, (data>>8)&0xff);
}
+
/******************************************************************************/
/*
- Video read (Geneve) via 8 bit bus
+ Accessing v9938 via 8 bit bus (EVPC)
*/
READ8Z_MEMBER( ti_exp_video_device::readz )
{
if (space.debugger_access()) return;
-
- if (offset & 2)
- { /* read VDP status */
- *value = m_v9938->status_r();
- }
- else
- { /* read VDP RAM */
- *value = m_v9938->vram_r();
- }
+ *value = m_v9938->read(space, offset>>1);
}
-/*
- Video write (Geneve)
-*/
WRITE8_MEMBER( ti_exp_video_device::write )
{
if (space.debugger_access()) return;
-
- switch (offset & 6)
- {
- case 0:
- /* write VDP data */
- m_v9938->vram_w(data);
- break;
- case 2:
- /* write VDP address */
- m_v9938->command_w(data);
- break;
- case 4:
- /* write VDP palette */
- m_v9938->palette_w(data);
- break;
- case 6:
- /* write VDP register pointer (indirect access) */
- m_v9938->register_w(data);
- break;
- }
+ m_v9938->write(space, offset>>1, data);
}
-/**************************************************************************/
-// Interfacing to mouse attached to v9938
-
-void ti_exp_video_device::video_update_mouse(int delta_x, int delta_y, int buttons)
-{
- m_v9938->update_mouse_state(delta_x, delta_y, buttons & 3);
-}
-
-/**************************************************************************/
-
void ti_video_device::device_start(void)
{
m_tms9928a = static_cast<tms9928a_device*>(machine().device(VDP_TAG));
@@ -196,64 +115,7 @@ void ti_exp_video_device::device_start(void)
m_v9938 = static_cast<v9938_device*>(machine().device(VDP_TAG));
}
-void ti_video_device::device_reset(void)
-{
-}
-
-/**************************************************************************/
-
-/*
- Sound subsystem.
- TODO: Seriously consider to simplify this by connecting to the datamux
- directly. We don't do anything reasonable here.
-*/
-
-WRITE8_MEMBER( ti_sound_system_device::write )
-{
- if (space.debugger_access()) return;
- m_sound_chip->write(space, 0, data);
-}
-
-void ti_sound_system_device::device_start(void)
-{
- m_console_ready.resolve();
- m_sound_chip = subdevice<sn76496_base_device>(TISOUNDCHIP_TAG);
-}
-
-WRITE_LINE_MEMBER( ti_sound_system_device::sound_ready )
-{
- m_console_ready(state);
-}
-
-MACHINE_CONFIG_FRAGMENT( sn94624 )
- MCFG_SPEAKER_STANDARD_MONO("sound_out")
-
- MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75)
- MCFG_SN76496_READY_HANDLER(WRITELINE(ti_sound_system_device, sound_ready))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_FRAGMENT( sn76496 )
- MCFG_SPEAKER_STANDARD_MONO("sound_out")
-
- MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN76496, 3579545) /* 3.579545 MHz */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75)
- MCFG_SN76496_READY_HANDLER(WRITELINE(ti_sound_system_device, sound_ready))
-MACHINE_CONFIG_END
-
-machine_config_constructor ti_sound_sn94624_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( sn94624 );
-}
-
-machine_config_constructor ti_sound_sn76496_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( sn76496 );
-}
-
/**************************************************************************/
const device_type TI99VIDEO = &device_creator<ti_std_video_device>;
const device_type V9938VIDEO = &device_creator<ti_exp_video_device>;
-const device_type TISOUND_94624 = &device_creator<ti_sound_sn94624_device>;
-const device_type TISOUND_76496 = &device_creator<ti_sound_sn76496_device>;
diff --git a/src/devices/bus/ti99x/videowrp.h b/src/devices/bus/ti99x/videowrp.h
index cb339e9dd60..787f0e2d44f 100644
--- a/src/devices/bus/ti99x/videowrp.h
+++ b/src/devices/bus/ti99x/videowrp.h
@@ -2,7 +2,7 @@
// copyright-holders:Michael Zapf
/****************************************************************************
- TI-99/4(A) and /8 Video subsystem
+ TI-99/4A / EVPC Video subsystem
See videowrp.c for documentation
Michael Zapf
@@ -17,7 +17,6 @@
#include "video/tms9928a.h"
#include "video/v9938.h"
#include "ti99defs.h"
-#include "sound/sn76496.h"
class ti_video_device : public bus8z_device
{
@@ -30,7 +29,7 @@ protected:
/* Constructor */
ti_video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
virtual void device_start(void) override;
- virtual void device_reset(void) override;
+ virtual void device_reset(void) override { };
virtual DECLARE_READ8Z_MEMBER(readz) override { };
virtual DECLARE_WRITE8_MEMBER(write) override { };
};
@@ -44,18 +43,16 @@ public:
ti_std_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8Z_MEMBER(readz) override;
DECLARE_WRITE8_MEMBER(write) override;
-
void reset_vdp(int state) override { m_tms9928a->reset_line(state); }
};
/*
- Used in the EVPC and Geneve
+ Used in the EVPC
*/
class ti_exp_video_device : public ti_video_device
{
public:
ti_exp_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void video_update_mouse(int delta_x, int delta_y, int buttons);
DECLARE_READ8Z_MEMBER(readz) override;
DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ16_MEMBER(read16);
@@ -63,113 +60,34 @@ public:
void reset_vdp(int state) override { m_v9938->reset_line(state); }
protected:
- virtual void device_start(void) override;
- v9938_device *m_v9938;
-};
-
-extern const device_type TI99VIDEO;
-extern const device_type V9938VIDEO;
-
-/****************************************************************************/
-/*
- Sound device
-*/
-
-extern const device_type TISOUND_94624;
-extern const device_type TISOUND_76496;
-
-#define TI_SOUND_CONFIG(name) \
- const ti_sound_config(name) =
-
-class ti_sound_system_device : public bus8z_device
-{
-public:
- ti_sound_system_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
- : bus8z_device(mconfig, type, name, tag, owner, clock, shortname, source), m_sound_chip(nullptr),
- m_console_ready(*this) { };
-
- // Cannot read from sound; just ignore silently
- DECLARE_READ8Z_MEMBER(readz) override { };
- DECLARE_WRITE8_MEMBER(write) override;
- DECLARE_WRITE_LINE_MEMBER( sound_ready ); // connect to console READY
-
- template<class _Object> static devcb_base &static_set_int_callback(device_t &device, _Object object) { return downcast<ti_sound_system_device &>(device).m_console_ready.set_callback(object); }
-
-protected:
virtual void device_start(void) override;
- virtual machine_config_constructor device_mconfig_additions() const override =0;
private:
- sn76496_base_device* m_sound_chip;
- devcb_write_line m_console_ready;
-};
-
-/*
- The version that sits in the TI-99/4A
-*/
-class ti_sound_sn94624_device : public ti_sound_system_device
-{
-public:
- ti_sound_sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ v9938_device *m_v9938;
};
-/*
- The version that sits in the TI-99/8 and Geneve
-*/
-class ti_sound_sn76496_device : public ti_sound_system_device
-{
-public:
- ti_sound_sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
-};
+extern const device_type TI99VIDEO;
+extern const device_type V9938VIDEO;
/****************************************************************************/
-#define MCFG_TI_TMS991x_ADD_NTSC(_tag, _chip, _vsize, _class, _int) \
+#define MCFG_TI_TMS991x_ADD_NTSC(_tag, _chip, _vsize, _class, _int, _gclk) \
MCFG_DEVICE_ADD(_tag, TI99VIDEO, 0) \
MCFG_DEVICE_ADD( VDP_TAG, _chip, XTAL_10_738635MHz / 2 ) \
MCFG_TMS9928A_VRAM_SIZE(_vsize) \
MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(_class,_int)) \
+ MCFG_TMS9928A_OUT_GROMCLK_CB(WRITELINE(_class,_gclk)) \
MCFG_TMS9928A_SCREEN_ADD_NTSC( SCREEN_TAG ) \
MCFG_SCREEN_UPDATE_DEVICE( VDP_TAG, tms9928a_device, screen_update )
-#define MCFG_TI_TMS991x_ADD_PAL(_tag, _chip, _vsize, _class, _int) \
+#define MCFG_TI_TMS991x_ADD_PAL(_tag, _chip, _vsize, _class, _int, _gclk) \
MCFG_DEVICE_ADD(_tag, TI99VIDEO, 0) \
MCFG_DEVICE_ADD( VDP_TAG, _chip, XTAL_10_738635MHz / 2 ) \
MCFG_TMS9928A_VRAM_SIZE(_vsize) \
MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(_class,_int)) \
+ MCFG_TMS9928A_OUT_GROMCLK_CB(WRITELINE(_class,_gclk)) \
MCFG_TMS9928A_SCREEN_ADD_PAL( SCREEN_TAG ) \
MCFG_SCREEN_UPDATE_DEVICE( VDP_TAG, tms9928a_device, screen_update )
-#define MCFG_TI998_ADD_NTSC(_tag, _chip, _vsize, _class, _int) \
- MCFG_DEVICE_ADD(_tag, TI99VIDEO, 0) \
- MCFG_DEVICE_ADD( VDP_TAG, _chip, XTAL_10_738635MHz / 2 ) \
- MCFG_TMS9928A_VRAM_SIZE(_vsize) \
- MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(_class,_int)) \
- MCFG_TMS9928A_SCREEN_ADD_NTSC( SCREEN_TAG ) \
- MCFG_SCREEN_UPDATE_DEVICE( VDP_TAG, tms9928a_device, screen_update )
-
-#define MCFG_TI998_ADD_PAL(_tag, _chip, _vsize, _class, _int) \
- MCFG_DEVICE_ADD(_tag, TI99VIDEO, 0) \
- MCFG_DEVICE_ADD( VDP_TAG, _chip, XTAL_10_738635MHz / 2 ) \
- MCFG_TMS9928A_VRAM_SIZE(_vsize) \
- MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(_class,_int)) \
- MCFG_TMS9928A_SCREEN_ADD_PAL( SCREEN_TAG ) \
- MCFG_SCREEN_UPDATE_DEVICE( VDP_TAG, tms9928a_device, screen_update )
-
-#define MCFG_TI_SOUND_94624_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, TISOUND_94624, 0)
-
-#define MCFG_TI_SOUND_76496_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, TISOUND_76496, 0)
-
-#define MCFG_TI_SOUND_READY_HANDLER( _ready ) \
- devcb = &ti_sound_system_device::static_set_int_callback( *device, DEVCB_##_ready );
-
#endif /* __TIVIDEO__ */
diff --git a/src/devices/bus/tvc/tvc.cpp b/src/devices/bus/tvc/tvc.cpp
index 2ee28a2f3c0..db2ed411ad2 100644
--- a/src/devices/bus/tvc/tvc.cpp
+++ b/src/devices/bus/tvc/tvc.cpp
@@ -8,7 +8,6 @@
#include "emu.h"
#include "tvc.h"
-#include "emuopts.h"
/***************************************************************************
diff --git a/src/devices/bus/vtech/memexp/carts.cpp b/src/devices/bus/vtech/memexp/carts.cpp
index dc40d0e8a57..f46a15e4841 100644
--- a/src/devices/bus/vtech/memexp/carts.cpp
+++ b/src/devices/bus/vtech/memexp/carts.cpp
@@ -15,5 +15,6 @@ SLOT_INTERFACE_START( memexp_slot_carts )
SLOT_INTERFACE("laser310_16k", LASER310_16K)
SLOT_INTERFACE("laser_64k", LASER_64K)
SLOT_INTERFACE("rs232", RS232_INTERFACE)
+ SLOT_INTERFACE("rtty", RTTY_INTERFACE)
SLOT_INTERFACE("wordpro", WORDPRO)
SLOT_INTERFACE_END
diff --git a/src/devices/bus/vtech/memexp/carts.h b/src/devices/bus/vtech/memexp/carts.h
index a1e86987a31..92dd90390ae 100644
--- a/src/devices/bus/vtech/memexp/carts.h
+++ b/src/devices/bus/vtech/memexp/carts.h
@@ -16,6 +16,7 @@
#include "floppy.h"
#include "memory.h"
#include "rs232.h"
+#include "rtty.h"
#include "wordpro.h"
SLOT_INTERFACE_EXTERN( memexp_slot_carts );
diff --git a/src/devices/bus/vtech/memexp/rs232.cpp b/src/devices/bus/vtech/memexp/rs232.cpp
index 42e281151b1..ead9ac0a904 100644
--- a/src/devices/bus/vtech/memexp/rs232.cpp
+++ b/src/devices/bus/vtech/memexp/rs232.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Dirk Best
/***************************************************************************
- Dick Smith VZ-200/300 RS-232 Cartridge
+ Dick Smith VZ-200/300 RS-232 Cartridge (K-6317)
***************************************************************************/
@@ -50,7 +50,7 @@ machine_config_constructor rs232_interface_device::device_mconfig_additions() co
//**************************************************************************
//-------------------------------------------------
-// wordpro_device - constructor
+// rs232_interface_device - constructor
//-------------------------------------------------
rs232_interface_device::rs232_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
diff --git a/src/devices/bus/vtech/memexp/rs232.h b/src/devices/bus/vtech/memexp/rs232.h
index 20508d86469..23c91004533 100644
--- a/src/devices/bus/vtech/memexp/rs232.h
+++ b/src/devices/bus/vtech/memexp/rs232.h
@@ -2,7 +2,7 @@
// copyright-holders:Dirk Best
/***************************************************************************
- Dick Smith VZ-200/300 RS-232 Cartridge
+ Dick Smith VZ-200/300 RS-232 Cartridge (K-6317)
***************************************************************************/
diff --git a/src/devices/bus/vtech/memexp/rtty.cpp b/src/devices/bus/vtech/memexp/rtty.cpp
new file mode 100644
index 00000000000..bf9930c3dcf
--- /dev/null
+++ b/src/devices/bus/vtech/memexp/rtty.cpp
@@ -0,0 +1,88 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ Dick Smith VZ-200/300 RTTY Cartridge (K-6318)
+
+***************************************************************************/
+
+#include "rtty.h"
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type RTTY_INTERFACE = &device_creator<rtty_interface_device>;
+
+//-------------------------------------------------
+// rom_region - device-specific ROM region
+//-------------------------------------------------
+
+ROM_START( rtty )
+ ROM_REGION(0x1000, "software", 0)
+ ROM_LOAD("vzrtty.ic3", 0x0000, 0x1000, CRC(ccf4289b) SHA1(de737ef0e0b582b3102da473836af1fa159a2e78))
+ROM_END
+
+const rom_entry *rtty_interface_device::device_rom_region() const
+{
+ return ROM_NAME( rtty );
+}
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// rtty_interface_device - constructor
+//-------------------------------------------------
+
+rtty_interface_device::rtty_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, RTTY_INTERFACE, "DSE VZ-200/300 RTTY Interface", tag, owner, clock, "vz_rtty", __FILE__),
+ device_memexp_interface(mconfig, *this)
+{
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void rtty_interface_device::device_start()
+{
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void rtty_interface_device::device_reset()
+{
+ // program
+ m_slot->m_program->install_rom(0x4000, 0x4fff, 0, 0x1000, memregion("software")->base());
+
+ // data
+ m_slot->m_program->install_read_handler(0x5000, 0x57ff, read8_delegate(FUNC(rtty_interface_device::receive_data_r), this));
+ m_slot->m_program->install_write_handler(0x5800, 0x5fff, write8_delegate(FUNC(rtty_interface_device::transmit_data_w), this));
+ m_slot->m_program->install_write_handler(0x6000, 0x67ff, write8_delegate(FUNC(rtty_interface_device::relay_w), this));
+}
+
+
+//**************************************************************************
+// IMPLEMENTATION
+//**************************************************************************
+
+READ8_MEMBER( rtty_interface_device::receive_data_r )
+{
+ return 0xff;
+}
+
+WRITE8_MEMBER( rtty_interface_device::transmit_data_w )
+{
+ logerror("transmit_w: %d\n", BIT(data, 7));
+}
+
+WRITE8_MEMBER( rtty_interface_device::relay_w )
+{
+ logerror("relay_w: %d\n", BIT(data, 7));
+}
diff --git a/src/devices/bus/vtech/memexp/rtty.h b/src/devices/bus/vtech/memexp/rtty.h
new file mode 100644
index 00000000000..1bc25eca77a
--- /dev/null
+++ b/src/devices/bus/vtech/memexp/rtty.h
@@ -0,0 +1,45 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ Dick Smith VZ-200/300 RTTY Cartridge (K-6318)
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __VTECH_MEMEXP_RTTY_H__
+#define __VTECH_MEMEXP_RTTY_H__
+
+#include "emu.h"
+#include "memexp.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> rtty_interface_device
+
+class rtty_interface_device : public device_t, public device_memexp_interface
+{
+public:
+ // construction/destruction
+ rtty_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ DECLARE_READ8_MEMBER( receive_data_r );
+ DECLARE_WRITE8_MEMBER( transmit_data_w );
+ DECLARE_WRITE8_MEMBER( relay_w );
+
+protected:
+ virtual const rom_entry *device_rom_region() const override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+};
+
+// device type definition
+extern const device_type RTTY_INTERFACE;
+
+#endif // __VTECH_MEMEXP_RTTY_H__
diff --git a/src/devices/bus/x68k/x68kexp.cpp b/src/devices/bus/x68k/x68kexp.cpp
index 39f1f74eec9..7019498fa23 100644
--- a/src/devices/bus/x68k/x68kexp.cpp
+++ b/src/devices/bus/x68k/x68kexp.cpp
@@ -5,7 +5,6 @@
*/
#include "emu.h"
-#include "emuopts.h"
#include "x68kexp.h"
//**************************************************************************
diff --git a/src/devices/bus/z88/z88.cpp b/src/devices/bus/z88/z88.cpp
index 62313b76dd3..062fdeade29 100644
--- a/src/devices/bus/z88/z88.cpp
+++ b/src/devices/bus/z88/z88.cpp
@@ -10,7 +10,6 @@
#include "emu.h"
#include "z88.h"
-#include "emuopts.h"
/***************************************************************************
diff --git a/src/devices/cpu/avr8/avr8.cpp b/src/devices/cpu/avr8/avr8.cpp
index d4a00c1d325..6b2b19a2021 100644
--- a/src/devices/cpu/avr8/avr8.cpp
+++ b/src/devices/cpu/avr8/avr8.cpp
@@ -638,8 +638,7 @@ avr8_device::avr8_device(const machine_config &mconfig, const char *name, const
m_program_config("program", ENDIANNESS_LITTLE, 8, 22),
m_data_config("data", ENDIANNESS_LITTLE, 8, 16, 0, internal_map),
m_io_config("io", ENDIANNESS_LITTLE, 8, 4),
- m_eeprom_tag(nullptr),
- m_eeprom(nullptr),
+ m_eeprom(*this),
m_cpu_type(cpu_type),
m_lfuses(0x62),
m_hfuses(0x99),
@@ -824,8 +823,6 @@ void avr8_device::device_start()
// set our instruction counter
m_icountptr = &m_icount;
-
- m_eeprom = machine().root_device().memregion(m_eeprom_tag)->base();
}
//-------------------------------------------------
diff --git a/src/devices/cpu/avr8/avr8.h b/src/devices/cpu/avr8/avr8.h
index 86207566ffc..ea9cf8c8a19 100644
--- a/src/devices/cpu/avr8/avr8.h
+++ b/src/devices/cpu/avr8/avr8.h
@@ -64,7 +64,7 @@
//**************************************************************************
#define MCFG_CPU_AVR8_EEPROM(_tag) \
- avr8_device::set_eeprom_tag(*device, _tag);
+ avr8_device::set_eeprom_tag(*device, "^" _tag);
//**************************************************************************
@@ -80,7 +80,7 @@ class avr8_device : public cpu_device
{
public:
// inline configuration helpers
- static void set_eeprom_tag(device_t &device, const char *tag) { downcast<avr8_device &>(device).m_eeprom_tag = tag; }
+ static void set_eeprom_tag(device_t &device, const char *tag) { downcast<avr8_device &>(device).m_eeprom.set_tag(tag); }
// fuse configs
void set_low_fuses(UINT8 byte);
@@ -137,8 +137,7 @@ protected:
const address_space_config m_program_config;
const address_space_config m_data_config;
const address_space_config m_io_config;
- const char *m_eeprom_tag;
- UINT8 *m_eeprom;
+ required_region_ptr<UINT8> m_eeprom;
// bootloader
UINT16 m_boot_size;
diff --git a/src/devices/cpu/drcbec.cpp b/src/devices/cpu/drcbec.cpp
index 8736a2b6703..ac6da189688 100644
--- a/src/devices/cpu/drcbec.cpp
+++ b/src/devices/cpu/drcbec.cpp
@@ -1929,6 +1929,14 @@ int drcbe_c::execute(code_handle &entry)
FSPARAM0 = 1.0f / sqrtf(FSPARAM1);
break;
+ case MAKE_OPCODE_SHORT(OP_FCOPYI, 4, 0): // FSCOPYI dst,src
+ FSPARAM0 = u2f(*inst[1].pint32);
+ break;
+
+ case MAKE_OPCODE_SHORT(OP_ICOPYF, 4, 0): // ICOPYFS dst,src
+ *inst[0].pint32 = f2u(FSPARAM1);
+ break;
+
// ----------------------- 64-Bit Floating Point Operations -----------------------
@@ -2068,6 +2076,14 @@ int drcbe_c::execute(code_handle &entry)
FDPARAM0 = 1.0 / sqrt(FDPARAM1);
break;
+ case MAKE_OPCODE_SHORT(OP_FCOPYI, 8, 0): // FDCOPYI dst,src
+ FDPARAM0 = u2d(*inst[1].pint64);
+ break;
+
+ case MAKE_OPCODE_SHORT(OP_ICOPYF, 8, 0): // ICOPYFD dst,src
+ *inst[0].pint64 = d2u(FDPARAM1);
+ break;
+
default:
fatalerror("Unexpected opcode!\n");
}
diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp
index b9583123af0..096dc2cbf5c 100644
--- a/src/devices/cpu/drcbex64.cpp
+++ b/src/devices/cpu/drcbex64.cpp
@@ -169,6 +169,7 @@
#include <stddef.h>
#include "emu.h"
#include "debugger.h"
+#include "emuopts.h"
#include "drcuml.h"
#include "drcbex64.h"
@@ -388,7 +389,9 @@ const drcbe_x64::opcode_table_entry drcbe_x64::s_opcode_table_source[] =
{ uml::OP_FABS, &drcbe_x64::op_fabs }, // FABS dst,src1
{ uml::OP_FSQRT, &drcbe_x64::op_fsqrt }, // FSQRT dst,src1
{ uml::OP_FRECIP, &drcbe_x64::op_frecip }, // FRECIP dst,src1
- { uml::OP_FRSQRT, &drcbe_x64::op_frsqrt } // FRSQRT dst,src1
+ { uml::OP_FRSQRT, &drcbe_x64::op_frsqrt }, // FRSQRT dst,src1
+ { uml::OP_FCOPYI, &drcbe_x64::op_fcopyi }, // FCOPYI dst,src
+ { uml::OP_ICOPYF, &drcbe_x64::op_icopyf } // ICOPYF dst,src
};
@@ -6707,3 +6710,131 @@ void drcbe_x64::op_frsqrt(x86code *&dst, const instruction &inst)
emit_movsd_p64_r128(dst, dstp, dstreg); // movsd dstp,dstreg
}
}
+
+
+//-------------------------------------------------
+// op_fcopyi - process a FCOPYI opcode
+//-------------------------------------------------
+
+void drcbe_x64::op_fcopyi(x86code *&dst, const instruction &inst)
+{
+ // validate instruction
+ assert(inst.size() == 4 || inst.size() == 8);
+ assert_no_condition(inst);
+ assert_no_flags(inst);
+
+ // normalize parameters
+ be_parameter dstp(*this, inst.param(0), PTYPE_MF);
+ be_parameter srcp(*this, inst.param(1), PTYPE_MR);
+
+ // pick a target register for the general case
+ int dstreg = dstp.select_register(REG_XMM0);
+
+ // 32-bit form
+ if (inst.size() == 4)
+ {
+ if (srcp.is_memory())
+ {
+ emit_movd_r128_m32(dst, dstreg, MABS(srcp.memory())); // movd dstreg,[srcp]
+ emit_movss_p32_r128(dst, dstp, dstreg); // movss dstp,dstreg
+ }
+ else
+ {
+ if (dstp.is_memory())
+ {
+ emit_mov_p32_r32(dst, dstp, srcp.ireg()); // mov dstp,srcp
+ }
+ else
+ {
+ emit_movd_r128_r32(dst, dstreg, srcp.ireg()); // movd dstreg,srcp
+ emit_movss_p32_r128(dst, dstp, dstreg); // movss dstp,dstreg
+ }
+ }
+
+ }
+
+ // 64-bit form
+ else if (inst.size() == 8)
+ {
+
+ if (srcp.is_memory())
+ {
+ emit_movq_r128_m64(dst, dstreg, MABS(srcp.memory())); // movq dstreg,[srcp]
+ emit_movsd_p64_r128(dst, dstp, dstreg); // movsd dstp,dstreg
+ }
+ else
+ {
+ if (dstp.is_memory())
+ {
+ emit_mov_p64_r64(dst, dstp, srcp.ireg()); // mov dstp,srcp
+ }
+ else
+ {
+ emit_movq_r128_r64(dst, dstreg, srcp.ireg()); // movq dstreg,srcp
+ emit_movsd_p64_r128(dst, dstp, dstreg); // movsd dstp,dstreg
+ }
+ }
+
+ }
+}
+
+
+//-------------------------------------------------
+// op_icopyf - process a ICOPYF opcode
+//-------------------------------------------------
+
+void drcbe_x64::op_icopyf(x86code *&dst, const instruction &inst)
+{
+ // validate instruction
+ assert(inst.size() == 4 || inst.size() == 8);
+ assert_no_condition(inst);
+ assert_no_flags(inst);
+
+ // normalize parameters
+ be_parameter dstp(*this, inst.param(0), PTYPE_MR);
+ be_parameter srcp(*this, inst.param(1), PTYPE_MF);
+
+ // 32-bit form
+ if (inst.size() == 4)
+ {
+ if (srcp.is_memory())
+ {
+ int dstreg = dstp.select_register(REG_EAX);
+ emit_mov_r32_m32(dst, dstreg, MABS(srcp.memory())); // mov dstreg,[srcp]
+ emit_mov_p32_r32(dst, dstp, dstreg); // mov dstp,dstreg
+ }
+ else
+ {
+ if (dstp.is_memory())
+ {
+ emit_movd_m32_r128(dst, MABS(dstp.memory()), srcp.freg()); // movd dstp,srcp
+ }
+ else
+ {
+ emit_movd_r32_r128(dst, dstp.ireg(), srcp.freg()); // movd dstp,srcp
+ }
+ }
+ }
+
+ // 64-bit form
+ else if (inst.size() == 8)
+ {
+ if (srcp.is_memory())
+ {
+ int dstreg = dstp.select_register(REG_RAX);
+ emit_mov_r64_m64(dst, dstreg, MABS(srcp.memory())); // mov dstreg,[srcp]
+ emit_mov_p64_r64(dst, dstp, dstreg); // mov dstp,dstreg
+ }
+ else
+ {
+ if (dstp.is_memory())
+ {
+ emit_movq_m64_r128(dst, MABS(dstp.memory()), srcp.freg()); // movq dstp,srcp
+ }
+ else
+ {
+ emit_movq_r64_r128(dst, dstp.ireg(), srcp.freg()); // movq dstp,srcp
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/devices/cpu/drcbex64.h b/src/devices/cpu/drcbex64.h
index f60b8970aa9..a538f9bf1e7 100644
--- a/src/devices/cpu/drcbex64.h
+++ b/src/devices/cpu/drcbex64.h
@@ -207,6 +207,8 @@ private:
void op_fsqrt(x86code *&dst, const uml::instruction &inst);
void op_frecip(x86code *&dst, const uml::instruction &inst);
void op_frsqrt(x86code *&dst, const uml::instruction &inst);
+ void op_fcopyi(x86code *&dst, const uml::instruction &inst);
+ void op_icopyf(x86code *&dst, const uml::instruction &inst);
// 32-bit code emission helpers
void emit_mov_r32_p32(x86code *&dst, UINT8 reg, const be_parameter &param);
diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp
index be63ac1e869..4ff6a90774b 100644
--- a/src/devices/cpu/drcbex86.cpp
+++ b/src/devices/cpu/drcbex86.cpp
@@ -85,6 +85,7 @@
#include <stddef.h>
#include "emu.h"
#include "debugger.h"
+#include "emuopts.h"
#include "drcuml.h"
#include "drcbex86.h"
@@ -270,7 +271,9 @@ const drcbe_x86::opcode_table_entry drcbe_x86::s_opcode_table_source[] =
{ uml::OP_FABS, &drcbe_x86::op_fabs }, // FABS dst,src1
{ uml::OP_FSQRT, &drcbe_x86::op_fsqrt }, // FSQRT dst,src1
{ uml::OP_FRECIP, &drcbe_x86::op_frecip }, // FRECIP dst,src1
- { uml::OP_FRSQRT, &drcbe_x86::op_frsqrt } // FRSQRT dst,src1
+ { uml::OP_FRSQRT, &drcbe_x86::op_frsqrt }, // FRSQRT dst,src1
+ { uml::OP_FCOPYI, &drcbe_x86::op_fcopyi }, // FCOPYI dst,src
+ { uml::OP_ICOPYF, &drcbe_x86::op_icopyf }, // ICOPYF dst,src
};
@@ -6448,6 +6451,105 @@ void drcbe_x86::op_frsqrt(x86code *&dst, const instruction &inst)
}
+//-------------------------------------------------
+// op_fcopyi - process a FCOPYI opcode
+//-------------------------------------------------
+
+void drcbe_x86::op_fcopyi(x86code *&dst, const instruction &inst)
+{
+ // validate instruction
+ assert(inst.size() == 4 || inst.size() == 8);
+ assert_no_condition(inst);
+ assert_no_flags(inst);
+
+ // normalize parameters
+ be_parameter dstp(*this, inst.param(0), PTYPE_MF);
+ be_parameter srcp(*this, inst.param(1), PTYPE_MR);
+
+ // 32-bit case
+ if (inst.size() == 4)
+ {
+ if (srcp.is_memory())
+ {
+ emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
+ emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
+ }
+ else if (srcp.is_int_register())
+ {
+ emit_mov_m32_r32(dst, MABS(dstp.memory()), srcp.ireg()); // mov [dstp],srcp
+ }
+ }
+
+ // 64-bit case
+ else if (inst.size() == 8)
+ {
+ if (srcp.is_memory())
+ {
+ emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
+ emit_mov_r32_m32(dst, REG_EDX, MABS(srcp.memory(4))); // mov edx,[srcp+4]
+ }
+ else if (srcp.is_int_register())
+ {
+ emit_mov_r32_m32(dst, REG_EDX, MABS(m_reghi[srcp.ireg()])); // mov edx,[reghi[srcp]]
+ emit_mov_r32_r32(dst, REG_EAX, srcp.ireg()); // mov eax,srcp
+ }
+
+ emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
+ emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx
+ }
+}
+
+
+//-------------------------------------------------
+// op_icopyf - process a ICOPYF opcode
+//-------------------------------------------------
+
+void drcbe_x86::op_icopyf(x86code *&dst, const instruction &inst)
+{
+ // validate instruction
+ assert(inst.size() == 4 || inst.size() == 8);
+ assert_no_condition(inst);
+ assert_no_flags(inst);
+
+ // normalize parameters
+ be_parameter dstp(*this, inst.param(0), PTYPE_MR);
+ be_parameter srcp(*this, inst.param(1), PTYPE_MF);
+
+ // 32-bit case
+ if (inst.size() == 4)
+ {
+ emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
+
+ if (dstp.is_memory())
+ {
+ emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
+ }
+ else if (dstp.is_int_register())
+ {
+ emit_mov_r32_r32(dst, dstp.ireg(), REG_EAX); // mov dstp,eax
+ }
+ }
+
+ // 64-bit case
+ else if (inst.size() == 8)
+ {
+ emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
+ emit_mov_r32_m32(dst, REG_EDX, MABS(srcp.memory(4))); // mov edx,[srcp+4]
+
+ if (dstp.is_memory())
+ {
+ emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
+ emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx
+ }
+ else
+ {
+ emit_mov_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_EDX); // mov [reghi[dstp]],edx
+ emit_mov_r32_r32(dst, dstp.ireg(), REG_EAX); // mov dstp,eax
+ }
+ }
+}
+
+
//**************************************************************************
// MISCELLAENOUS FUNCTIONS
diff --git a/src/devices/cpu/drcbex86.h b/src/devices/cpu/drcbex86.h
index df81ee0c7c7..397cbb53215 100644
--- a/src/devices/cpu/drcbex86.h
+++ b/src/devices/cpu/drcbex86.h
@@ -208,6 +208,8 @@ private:
void op_fsqrt(x86code *&dst, const uml::instruction &inst);
void op_frecip(x86code *&dst, const uml::instruction &inst);
void op_frsqrt(x86code *&dst, const uml::instruction &inst);
+ void op_fcopyi(x86code *&dst, const uml::instruction &inst);
+ void op_icopyf(x86code *&dst, const uml::instruction &inst);
// 32-bit code emission helpers
void emit_mov_r32_p32(x86code *&dst, UINT8 reg, const be_parameter &param);
diff --git a/src/devices/cpu/drcuml.cpp b/src/devices/cpu/drcuml.cpp
index 5c13c76b4c6..736301ff606 100644
--- a/src/devices/cpu/drcuml.cpp
+++ b/src/devices/cpu/drcuml.cpp
@@ -35,6 +35,7 @@
***************************************************************************/
#include "emu.h"
+#include "emuopts.h"
#include "drcuml.h"
#include "drcbec.h"
#include "drcbex86.h"
diff --git a/src/devices/cpu/drcumlsh.h b/src/devices/cpu/drcumlsh.h
index d14c1321d9e..12f5abc20eb 100644
--- a/src/devices/cpu/drcumlsh.h
+++ b/src/devices/cpu/drcumlsh.h
@@ -156,6 +156,8 @@
#define UML_FSSQRT(block, dst, src1) do { block->append().fssqrt(dst, src1); } while (0)
#define UML_FSRECIP(block, dst, src1) do { block->append().fsrecip(dst, src1); } while (0)
#define UML_FSRSQRT(block, dst, src1) do { block->append().fsrsqrt(dst, src1); } while (0)
+#define UML_FSCOPYI(block, dst, src) do { block->append().fscopyi(dst, src); } while (0)
+#define UML_ICOPYFS(block, dst, src) do { block->append().icopyfs(dst, src); } while (0)
/* ----- 64-bit Floating Point Arithmetic Operations ----- */
@@ -179,6 +181,8 @@
#define UML_FDSQRT(block, dst, src1) do { block->append().fdsqrt(dst, src1); } while (0)
#define UML_FDRECIP(block, dst, src1) do { block->append().fdrecip(dst, src1); } while (0)
#define UML_FDRSQRT(block, dst, src1) do { block->append().fdrsqrt(dst, src1); } while (0)
+#define UML_FDCOPYI(block, dst, src) do { block->append().fdcopyi(dst, src); } while (0)
+#define UML_ICOPYFD(block, dst, src) do { block->append().icopyfd(dst, src); } while (0)
#endif /* __DRCUMLSH_H__ */
diff --git a/src/devices/cpu/hmcs40/hmcs40.cpp b/src/devices/cpu/hmcs40/hmcs40.cpp
index 4f78f3480f4..cd35106a37b 100644
--- a/src/devices/cpu/hmcs40/hmcs40.cpp
+++ b/src/devices/cpu/hmcs40/hmcs40.cpp
@@ -7,7 +7,7 @@
References:
- 1985 #AP1 Hitachi 4-bit Single-Chip Microcomputer Data Book
- 1988 HMCS400 Series Handbook (note: *400 is a newer MCU series, with similarities)
- - opcode decoding by Tatsuyuki Satoh, Olivier Galibert, Kevin Horton, Lord Nightmare
+ - opcode decoding by Tatsuyuki Satoh, Olivier Galibert, Kevin Horton, Lord Nightmare - and verified
*/
@@ -595,7 +595,7 @@ void hmcs40_cpu_device::execute_run()
debugger_instruction_hook(this, m_pc);
m_icount--;
m_op = m_program->read_word(m_pc << 1) & 0x3ff;
- m_i = BITSWAP8(m_op,7,6,5,4,0,1,2,3) & 0xf; // reversed bit-order for 4-bit immediate param (except for XAMR, REDD, SEDD)
+ m_i = BITSWAP8(m_op,7,6,5,4,0,1,2,3) & 0xf; // reversed bit-order for 4-bit immediate param (except for XAMR)
increment_pc();
// handle opcode
@@ -667,8 +667,7 @@ void hmcs40_cpu_device::execute_run()
case 0x0c0: case 0x0c1: case 0x0c2: case 0x0c3: case 0x0c4: case 0x0c5: case 0x0c6: case 0x0c7:
op_lar(); break;
- case 0x0d0: case 0x0d1: case 0x0d2: case 0x0d3: case 0x0d4: case 0x0d5: case 0x0d6: case 0x0d7:
- case 0x0d8: case 0x0d9: case 0x0da: case 0x0db: case 0x0dc: case 0x0dd: case 0x0de: case 0x0df:
+ case 0x0d0: case 0x0d1: case 0x0d2: case 0x0d3:
op_sedd(); break;
case 0x0e0: case 0x0e1: case 0x0e2: case 0x0e3: case 0x0e4: case 0x0e5: case 0x0e6: case 0x0e7:
op_lbr(); break;
@@ -787,8 +786,7 @@ void hmcs40_cpu_device::execute_run()
case 0x2c0: case 0x2c1: case 0x2c2: case 0x2c3: case 0x2c4: case 0x2c5: case 0x2c6: case 0x2c7:
op_lra(); break;
- case 0x2d0: case 0x2d1: case 0x2d2: case 0x2d3: case 0x2d4: case 0x2d5: case 0x2d6: case 0x2d7:
- case 0x2d8: case 0x2d9: case 0x2da: case 0x2db: case 0x2dc: case 0x2dd: case 0x2de: case 0x2df:
+ case 0x2d0: case 0x2d1: case 0x2d2: case 0x2d3:
op_redd(); break;
case 0x2e0: case 0x2e1: case 0x2e2: case 0x2e3: case 0x2e4: case 0x2e5: case 0x2e6: case 0x2e7:
op_lrb(); break;
diff --git a/src/devices/cpu/hmcs40/hmcs40d.cpp b/src/devices/cpu/hmcs40/hmcs40d.cpp
index b63ba1fde4d..1a40547ebf1 100644
--- a/src/devices/cpu/hmcs40/hmcs40d.cpp
+++ b/src/devices/cpu/hmcs40/hmcs40d.cpp
@@ -111,7 +111,7 @@ static const UINT8 hmcs40_mnemonic[0x400] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0c0 */
mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, 0, 0, 0, 0, 0, 0, 0, 0,
- mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD,
+ mSEDD, mSEDD, mSEDD, mSEDD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, 0, 0, 0, 0, 0, 0, 0, 0,
mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR,
@@ -155,7 +155,7 @@ static const UINT8 hmcs40_mnemonic[0x400] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x2c0 */
mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, 0, 0, 0, 0, 0, 0, 0, 0,
- mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD,
+ mREDD, mREDD, mREDD, mREDD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/src/devices/cpu/hmcs40/hmcs40op.cpp b/src/devices/cpu/hmcs40/hmcs40op.cpp
index f6faab90360..ba0a3fb1f77 100644
--- a/src/devices/cpu/hmcs40/hmcs40op.cpp
+++ b/src/devices/cpu/hmcs40/hmcs40op.cpp
@@ -624,13 +624,13 @@ void hmcs40_cpu_device::op_td()
void hmcs40_cpu_device::op_sedd()
{
// SEDD n: Set Discrete I/O Latch Direct
- write_d(m_op & 0xf, 1);
+ write_d(m_op & 3, 1);
}
void hmcs40_cpu_device::op_redd()
{
// REDD n: Reset Discrete I/O Latch Direct
- write_d(m_op & 0xf, 0);
+ write_d(m_op & 3, 0);
}
void hmcs40_cpu_device::op_lar()
diff --git a/src/devices/cpu/hphybrid/hphybrid.cpp b/src/devices/cpu/hphybrid/hphybrid.cpp
index 44c29698cb1..fd7870d319f 100644
--- a/src/devices/cpu/hphybrid/hphybrid.cpp
+++ b/src/devices/cpu/hphybrid/hphybrid.cpp
@@ -1459,7 +1459,7 @@ UINT32 hp_5061_3001_cpu_device::add_mae(aec_cases_t aec_case , UINT16 addr)
bool top_half = BIT(addr , 15) != 0;
// Detect accesses to top half of base page
- if (aec_case == AEC_CASE_C && (addr & 0xfe00) == 0xfe00) {
+ if ((aec_case == AEC_CASE_C || aec_case == AEC_CASE_I) && (addr & 0xfe00) == 0xfe00) {
aec_case = AEC_CASE_B;
}
diff --git a/src/devices/cpu/m6809/m6809.cpp b/src/devices/cpu/m6809/m6809.cpp
index 8ebba313047..ce226e23739 100644
--- a/src/devices/cpu/m6809/m6809.cpp
+++ b/src/devices/cpu/m6809/m6809.cpp
@@ -210,8 +210,8 @@ void m6809_base_device::device_reset()
m_cc |= CC_I; // IRQ disabled
m_cc |= CC_F; // FIRQ disabled
- m_pc.b.h = m_addrspace[AS_PROGRAM]->read_byte(VECTOR_RESET_FFFE + 0);
- m_pc.b.l = m_addrspace[AS_PROGRAM]->read_byte(VECTOR_RESET_FFFE + 1);
+ m_pc.b.h = space(AS_PROGRAM).read_byte(VECTOR_RESET_FFFE + 0);
+ m_pc.b.l = space(AS_PROGRAM).read_byte(VECTOR_RESET_FFFE + 1);
// reset sub-instruction state
reset_state();
diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp
index 20d82bd3725..c09088fd669 100644
--- a/src/devices/cpu/mips/mips3.cpp
+++ b/src/devices/cpu/mips/mips3.cpp
@@ -31,19 +31,26 @@
#define RTVAL64 (m_core->r[RTREG])
#define RDVAL64 (m_core->r[RDREG])
-#define FRVALS_FR0 (((float *)&m_core->cpr[1][0])[FRREG])
-#define FTVALS_FR0 (((float *)&m_core->cpr[1][0])[FTREG])
-#define FSVALS_FR0 (((float *)&m_core->cpr[1][0])[FSREG])
-#define FDVALS_FR0 (((float *)&m_core->cpr[1][0])[FDREG])
-#define FSVALW_FR0 (((UINT32 *)&m_core->cpr[1][0])[FSREG])
-#define FDVALW_FR0 (((UINT32 *)&m_core->cpr[1][0])[FDREG])
-
-#define FRVALD_FR0 (*(double *)&m_core->cpr[1][FRREG/2])
-#define FTVALD_FR0 (*(double *)&m_core->cpr[1][FTREG/2])
-#define FSVALD_FR0 (*(double *)&m_core->cpr[1][FSREG/2])
-#define FDVALD_FR0 (*(double *)&m_core->cpr[1][FDREG/2])
-#define FSVALL_FR0 (((UINT64 *)&m_core->cpr[1][0])[FSREG/2])
-#define FDVALL_FR0 (((UINT64 *)&m_core->cpr[1][0])[FDREG/2])
+#define FRVALS_FR0 (((float *)&m_core->cpr[1][FRREG])[BYTE_XOR_LE(0)])
+#define FTVALS_FR0 (((float *)&m_core->cpr[1][FTREG])[BYTE_XOR_LE(0)])
+#define FSVALS_FR0 (((float *)&m_core->cpr[1][FSREG])[BYTE_XOR_LE(0)])
+#define FDVALS_FR0 (((float *)&m_core->cpr[1][FDREG])[BYTE_XOR_LE(0)])
+#define FSVALW_FR0 (((UINT32 *)&m_core->cpr[1][FSREG])[BYTE_XOR_LE(0)])
+#define FDVALW_FR0 (((UINT32 *)&m_core->cpr[1][FDREG])[BYTE_XOR_LE(0)])
+
+#define LFRVALD_FR0 (u2d(get_cop1_reg64(FRREG)))
+#define LFTVALD_FR0 (u2d(get_cop1_reg64(FTREG)))
+#define LFSVALD_FR0 (u2d(get_cop1_reg64(FSREG)))
+#define LFDVALD_FR0 (u2d(get_cop1_reg64(FDREG)))
+#define LFSVALL_FR0 (get_cop1_reg64(FSREG))
+#define LFDVALL_FR0 (get_cop1_reg64(FDREG))
+
+#define SFRVALD_FR0(x) (set_cop1_reg64(FRREG,d2u((x))))
+#define SFTVALD_FR0(x) (set_cop1_reg64(FTREG,d2u((x))))
+#define SFSVALD_FR0(x) (set_cop1_reg64(FSREG,d2u((x))))
+#define SFDVALD_FR0(x) (set_cop1_reg64(FDREG,d2u((x))))
+#define SFSVALL_FR0(x) (set_cop1_reg64(FSREG,(x)))
+#define SFDVALL_FR0(x) (set_cop1_reg64(FDREG,(x)))
#define FRVALS_FR1 (((float *)&m_core->cpr[1][FRREG])[BYTE_XOR_LE(0)])
#define FTVALS_FR1 (((float *)&m_core->cpr[1][FTREG])[BYTE_XOR_LE(0)])
@@ -60,7 +67,6 @@
#define FDVALL_FR1 (*(UINT64 *)&m_core->cpr[1][FDREG])
#define ADDPC(x) m_nextpc = m_core->pc + ((x) << 2)
-#define ADDPCL(x,l) { m_nextpc = m_core->pc + ((x) << 2); m_core->r[l] = (INT32)(m_core->pc + 4); }
#define ABSPC(x) m_nextpc = (m_core->pc & 0xf0000000) | ((x) << 2)
#define ABSPCL(x,l) { m_nextpc = (m_core->pc & 0xf0000000) | ((x) << 2); m_core->r[l] = (INT32)(m_core->pc + 4); }
#define SETPC(x) m_nextpc = (x)
@@ -316,7 +322,7 @@ void mips3_device::check_irqs()
void mips3_device::device_start()
{
- m_isdrc = (mconfig().options().drc() && !mconfig().m_force_no_drc) ? true : false;
+ m_isdrc = allow_drc();
/* allocate the implementation-specific state from the full cache */
m_core = (internal_mips3_state *)m_cache.alloc_near(sizeof(internal_mips3_state));
@@ -1513,36 +1519,39 @@ void mips3_device::handle_cop0(UINT32 op)
inline UINT32 mips3_device::get_cop1_reg32(int idx)
{
- if (IS_FR0)
- return ((UINT32 *)&m_core->cpr[1][0])[idx];
- else
+ //if (IS_FR0)
+ // return ((UINT32 *)&m_core->cpr[1][0])[idx];
+ //else
return m_core->cpr[1][idx];
}
inline UINT64 mips3_device::get_cop1_reg64(int idx)
{
if (IS_FR0)
- return ((UINT64 *)&m_core->cpr[1][0])[idx/2];
+ return (UINT64(((UINT32 *)&m_core->cpr[1][(idx&0x1E) + 1])[BYTE_XOR_LE(0)])) << 32
+ | (UINT64(((UINT32 *)&m_core->cpr[1][idx&0x1E])[BYTE_XOR_LE(0)]));
else
return m_core->cpr[1][idx];
}
inline void mips3_device::set_cop1_reg32(int idx, UINT32 val)
{
- if (IS_FR0)
- ((UINT32 *)&m_core->cpr[1][0])[idx] = val;
- else
+ //if (IS_FR0)
+ // ((UINT32 *)&m_core->cpr[1][0])[idx] = val;
+ //else
m_core->cpr[1][idx] = val;
}
inline void mips3_device::set_cop1_reg64(int idx, UINT64 val)
{
if (IS_FR0)
- ((UINT64 *)&m_core->cpr[1][0])[idx/2] = val;
+ {
+ ((UINT32 *)&m_core->cpr[1][idx&0x1E])[BYTE_XOR_LE(0)] = val & 0xFFFFFFFF;
+ ((UINT32 *)&m_core->cpr[1][(idx&0x1E) + 1])[BYTE_XOR_LE(0)] = val >> 32;
+ }
else
m_core->cpr[1][idx] = val;
}
-
inline UINT64 mips3_device::get_cop1_creg(int idx)
{
if (idx == 31)
@@ -1606,56 +1615,56 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* ADD.S */
FDVALS_FR0 = FSVALS_FR0 + FTVALS_FR0;
else /* ADD.D */
- FDVALD_FR0 = FSVALD_FR0 + FTVALD_FR0;
+ SFDVALD_FR0(LFSVALD_FR0 + LFTVALD_FR0);
break;
case 0x01:
if (IS_SINGLE(op)) /* SUB.S */
FDVALS_FR0 = FSVALS_FR0 - FTVALS_FR0;
else /* SUB.D */
- FDVALD_FR0 = FSVALD_FR0 - FTVALD_FR0;
+ SFDVALD_FR0(LFSVALD_FR0 - LFTVALD_FR0);
break;
case 0x02:
if (IS_SINGLE(op)) /* MUL.S */
FDVALS_FR0 = FSVALS_FR0 * FTVALS_FR0;
else /* MUL.D */
- FDVALD_FR0 = FSVALD_FR0 * FTVALD_FR0;
+ SFDVALD_FR0(LFSVALD_FR0 * LFTVALD_FR0);
break;
case 0x03:
if (IS_SINGLE(op)) /* DIV.S */
FDVALS_FR0 = FSVALS_FR0 / FTVALS_FR0;
else /* DIV.D */
- FDVALD_FR0 = FSVALD_FR0 / FTVALD_FR0;
+ SFDVALD_FR0(LFSVALD_FR0 / LFTVALD_FR0);
break;
case 0x04:
if (IS_SINGLE(op)) /* SQRT.S */
FDVALS_FR0 = sqrt(FSVALS_FR0);
else /* SQRT.D */
- FDVALD_FR0 = sqrt(FSVALD_FR0);
+ SFDVALD_FR0(sqrt(LFSVALD_FR0));
break;
case 0x05:
if (IS_SINGLE(op)) /* ABS.S */
FDVALS_FR0 = fabs(FSVALS_FR0);
else /* ABS.D */
- FDVALD_FR0 = fabs(FSVALD_FR0);
+ SFDVALD_FR0(fabs(LFSVALD_FR0));
break;
case 0x06:
if (IS_SINGLE(op)) /* MOV.S */
FDVALS_FR0 = FSVALS_FR0;
else /* MOV.D */
- FDVALD_FR0 = FSVALD_FR0;
+ SFDVALD_FR0(LFSVALD_FR0);
break;
case 0x07:
if (IS_SINGLE(op)) /* NEG.S */
FDVALS_FR0 = -FSVALS_FR0;
else /* NEG.D */
- FDVALD_FR0 = -FSVALD_FR0;
+ SFDVALD_FR0(-LFSVALD_FR0);
break;
case 0x08:
@@ -1666,16 +1675,16 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
temp = ceil(temp - 0.5);
else
temp = floor(temp + 0.5);
- FDVALL_FR0 = (INT64)temp;
+ SFDVALL_FR0((INT64)temp);
}
else /* ROUND.L.D */
{
- double temp = FSVALD_FR0;
+ double temp = LFSVALD_FR0;
if (temp < 0)
temp = ceil(temp - 0.5);
else
temp = floor(temp + 0.5);
- FDVALL_FR0 = (INT64)temp;
+ SFDVALL_FR0((INT64)temp);
}
break;
@@ -1687,16 +1696,16 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
temp = ceil(temp);
else
temp = floor(temp);
- FDVALL_FR0 = (INT64)temp;
+ SFDVALL_FR0((INT64)temp);
}
else /* TRUNC.L.D */
{
- double temp = FSVALD_FR0;
+ double temp = LFSVALD_FR0;
if (temp < 0)
temp = ceil(temp);
else
temp = floor(temp);
- FDVALL_FR0 = (INT64)temp;
+ SFDVALL_FR0((INT64)temp);
}
break;
@@ -1704,16 +1713,16 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* CEIL.L.S */
dtemp = ceil(FSVALS_FR0);
else /* CEIL.L.D */
- dtemp = ceil(FSVALD_FR0);
- FDVALL_FR0 = (INT64)dtemp;
+ dtemp = ceil(LFSVALD_FR0);
+ SFDVALL_FR0((INT64)dtemp);
break;
case 0x0b:
if (IS_SINGLE(op)) /* FLOOR.L.S */
dtemp = floor(FSVALS_FR0);
else /* FLOOR.L.D */
- dtemp = floor(FSVALD_FR0);
- FDVALL_FR0 = (INT64)dtemp;
+ dtemp = floor(LFSVALD_FR0);
+ SFDVALL_FR0((INT64)dtemp);
break;
case 0x0c:
@@ -1728,7 +1737,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
}
else /* ROUND.W.D */
{
- dtemp = FSVALD_FR0;
+ dtemp = LFSVALD_FR0;
if (dtemp < 0)
dtemp = ceil(dtemp - 0.5);
else
@@ -1749,7 +1758,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
}
else /* TRUNC.W.D */
{
- dtemp = FSVALD_FR0;
+ dtemp = LFSVALD_FR0;
if (dtemp < 0)
dtemp = ceil(dtemp);
else
@@ -1762,7 +1771,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* CEIL.W.S */
dtemp = ceil(FSVALS_FR0);
else /* CEIL.W.D */
- dtemp = ceil(FSVALD_FR0);
+ dtemp = ceil(LFSVALD_FR0);
FDVALW_FR0 = (INT32)dtemp;
break;
@@ -1770,7 +1779,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* FLOOR.W.S */
dtemp = floor(FSVALS_FR0);
else /* FLOOR.W.D */
- dtemp = floor(FSVALD_FR0);
+ dtemp = floor(LFSVALD_FR0);
FDVALW_FR0 = (INT32)dtemp;
break;
@@ -1780,7 +1789,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* MOVT/F.S */
FDVALS_FR0 = FSVALS_FR0;
else /* MOVT/F.D */
- FDVALD_FR0 = FSVALD_FR0;
+ SFDVALD_FR0(LFSVALD_FR0);
}
break;
@@ -1790,7 +1799,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* MOVZ.S */
FDVALS_FR0 = FSVALS_FR0;
else /* MOVZ.D */
- FDVALD_FR0 = FSVALD_FR0;
+ SFDVALD_FR0(LFSVALD_FR0);
}
break;
@@ -1800,7 +1809,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* MOVN.S */
FDVALS_FR0 = FSVALS_FR0;
else /* MOVN.D */
- FDVALD_FR0 = FSVALD_FR0;
+ SFDVALD_FR0(LFSVALD_FR0);
}
break;
@@ -1808,14 +1817,14 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* RECIP.S */
FDVALS_FR0 = 1.0f / FSVALS_FR0;
else /* RECIP.D */
- FDVALD_FR0 = 1.0 / FSVALD_FR0;
+ SFDVALD_FR0(1.0 / LFSVALD_FR0);
break;
case 0x16: /* R5000 */
if (IS_SINGLE(op)) /* RSQRT.S */
FDVALS_FR0 = 1.0f / sqrt(FSVALS_FR0);
else /* RSQRT.D */
- FDVALD_FR0 = 1.0 / sqrt(FSVALD_FR0);
+ SFDVALD_FR0(1.0 / sqrt(LFSVALD_FR0));
break;
case 0x20:
@@ -1824,36 +1833,36 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* CVT.S.W */
FDVALS_FR0 = (INT32)FSVALW_FR0;
else /* CVT.S.L */
- FDVALS_FR0 = (INT64)FSVALL_FR0;
+ FDVALS_FR0 = (INT64)LFSVALL_FR0;
}
else /* CVT.S.D */
- FDVALS_FR0 = FSVALD_FR0;
+ FDVALS_FR0 = LFSVALD_FR0;
break;
case 0x21:
if (IS_INTEGRAL(op))
{
if (IS_SINGLE(op)) /* CVT.D.W */
- FDVALD_FR0 = (INT32)FSVALW_FR0;
+ SFDVALD_FR0((INT32)FSVALW_FR0);
else /* CVT.D.L */
- FDVALD_FR0 = (INT64)FSVALL_FR0;
+ SFDVALD_FR0((INT64)LFSVALL_FR0);
}
else /* CVT.D.S */
- FDVALD_FR0 = FSVALS_FR0;
+ SFDVALD_FR0(FSVALS_FR0);
break;
case 0x24:
if (IS_SINGLE(op)) /* CVT.W.S */
FDVALW_FR0 = (INT32)FSVALS_FR0;
else
- FDVALW_FR0 = (INT32)FSVALD_FR0;
+ FDVALW_FR0 = (INT32)LFSVALD_FR0;
break;
case 0x25:
if (IS_SINGLE(op)) /* CVT.L.S */
- FDVALL_FR0 = (INT64)FSVALS_FR0;
+ SFDVALL_FR0((INT64)FSVALS_FR0);
else /* CVT.L.D */
- FDVALL_FR0 = (INT64)FSVALD_FR0;
+ SFDVALL_FR0((INT64)LFSVALD_FR0);
break;
case 0x30:
@@ -1877,7 +1886,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* C.EQ.S */
SET_FCC((op >> 8) & 7, (FSVALS_FR0 == FTVALS_FR0));
else /* C.EQ.D */
- SET_FCC((op >> 8) & 7, (FSVALD_FR0 == FTVALD_FR0));
+ SET_FCC((op >> 8) & 7, (LFSVALD_FR0 == LFTVALD_FR0));
break;
case 0x33:
@@ -1885,7 +1894,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* C.UEQ.S */
SET_FCC((op >> 8) & 7, (FSVALS_FR0 == FTVALS_FR0));
else /* C.UEQ.D */
- SET_FCC((op >> 8) & 7, (FSVALD_FR0 == FTVALD_FR0));
+ SET_FCC((op >> 8) & 7, (LFSVALD_FR0 == LFTVALD_FR0));
break;
case 0x34:
@@ -1893,7 +1902,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* C.OLT.S */
SET_FCC((op >> 8) & 7, (FSVALS_FR0 < FTVALS_FR0));
else /* C.OLT.D */
- SET_FCC((op >> 8) & 7, (FSVALD_FR0 < FTVALD_FR0));
+ SET_FCC((op >> 8) & 7, (LFSVALD_FR0 < LFTVALD_FR0));
break;
case 0x35:
@@ -1901,7 +1910,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* C.ULT.S */
SET_FCC((op >> 8) & 7, (FSVALS_FR0 < FTVALS_FR0));
else /* C.ULT.D */
- SET_FCC((op >> 8) & 7, (FSVALD_FR0 < FTVALD_FR0));
+ SET_FCC((op >> 8) & 7, (LFSVALD_FR0 < LFTVALD_FR0));
break;
case 0x36:
@@ -1909,7 +1918,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* C.OLE.S */
SET_FCC((op >> 8) & 7, (FSVALS_FR0 <= FTVALS_FR0));
else /* C.OLE.D */
- SET_FCC((op >> 8) & 7, (FSVALD_FR0 <= FTVALD_FR0));
+ SET_FCC((op >> 8) & 7, (LFSVALD_FR0 <= LFTVALD_FR0));
break;
case 0x37:
@@ -1917,7 +1926,7 @@ void mips3_device::handle_cop1_fr0(UINT32 op)
if (IS_SINGLE(op)) /* C.ULE.S */
SET_FCC((op >> 8) & 7, (FSVALS_FR0 <= FTVALS_FR0));
else /* C.ULE.D */
- SET_FCC((op >> 8) & 7, (FSVALD_FR0 <= FTVALD_FR0));
+ SET_FCC((op >> 8) & 7, (LFSVALD_FR0 <= LFTVALD_FR0));
break;
default:
@@ -2311,7 +2320,7 @@ void mips3_device::handle_cop1x_fr0(UINT32 op)
break;
case 0x01: /* LDXC1 */
- if (RDOUBLE(RSVAL32 + RTVAL32, &temp64)) FDVALL_FR0 = temp64;
+ if (RDOUBLE(RSVAL32 + RTVAL32, &temp64)) SFDVALL_FR0(temp64);
break;
case 0x08: /* SWXC1 */
@@ -2330,7 +2339,7 @@ void mips3_device::handle_cop1x_fr0(UINT32 op)
break;
case 0x21: /* MADD.D */
- FDVALD_FR0 = FSVALD_FR0 * FTVALD_FR0 + FRVALD_FR0;
+ SFDVALD_FR0(LFSVALD_FR0 * LFTVALD_FR0 + LFRVALD_FR0);
break;
case 0x28: /* MSUB.S */
@@ -2338,7 +2347,7 @@ void mips3_device::handle_cop1x_fr0(UINT32 op)
break;
case 0x29: /* MSUB.D */
- FDVALD_FR0 = FSVALD_FR0 * FTVALD_FR0 - FRVALD_FR0;
+ SFDVALD_FR0(LFSVALD_FR0 * LFTVALD_FR0 - LFRVALD_FR0);
break;
case 0x30: /* NMADD.S */
@@ -2346,7 +2355,7 @@ void mips3_device::handle_cop1x_fr0(UINT32 op)
break;
case 0x31: /* NMADD.D */
- FDVALD_FR0 = -(FSVALD_FR0 * FTVALD_FR0 + FRVALD_FR0);
+ SFDVALD_FR0(-(LFSVALD_FR0 * LFTVALD_FR0 + LFRVALD_FR0));
break;
case 0x38: /* NMSUB.S */
@@ -2354,7 +2363,7 @@ void mips3_device::handle_cop1x_fr0(UINT32 op)
break;
case 0x39: /* NMSUB.D */
- FDVALD_FR0 = -(FSVALD_FR0 * FTVALD_FR0 - FRVALD_FR0);
+ SFDVALD_FR0(-(LFSVALD_FR0 * LFTVALD_FR0 - LFRVALD_FR0));
break;
case 0x24: /* MADD.W */
@@ -2541,10 +2550,10 @@ void mips3_device::handle_regimm(UINT32 op)
case 0x0b: /* TLTIU */ if (RSVAL64 >= UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break;
case 0x0c: /* TEQI */ if (RSVAL64 == UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break;
case 0x0e: /* TNEI */ if (RSVAL64 != UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break;
- case 0x10: /* BLTZAL */ if ((INT64)RSVAL64 < 0) ADDPCL(SIMMVAL,31); break;
- case 0x11: /* BGEZAL */ if ((INT64)RSVAL64 >= 0) ADDPCL(SIMMVAL,31); break;
- case 0x12: /* BLTZALL */ if ((INT64)RSVAL64 < 0) ADDPCL(SIMMVAL,31) else m_core->pc += 4; break;
- case 0x13: /* BGEZALL */ if ((INT64)RSVAL64 >= 0) ADDPCL(SIMMVAL,31) else m_core->pc += 4; break;
+ case 0x10: /* BLTZAL */ m_core->r[31] = (INT32)(m_core->pc + 4); if ((INT64)RSVAL64 < 0) ADDPC(SIMMVAL); break;
+ case 0x11: /* BGEZAL */ m_core->r[31] = (INT32)(m_core->pc + 4); if ((INT64)RSVAL64 >= 0) ADDPC(SIMMVAL); break;
+ case 0x12: /* BLTZALL */ m_core->r[31] = (INT32)(m_core->pc + 4); if ((INT64)RSVAL64 < 0) ADDPC(SIMMVAL); else m_core->pc += 4; break;
+ case 0x13: /* BGEZALL */ m_core->r[31] = (INT32)(m_core->pc + 4); if ((INT64)RSVAL64 >= 0) ADDPC(SIMMVAL); else m_core->pc += 4; break;
default: /* ??? */ invalid_instruction(op); break;
}
}
diff --git a/src/devices/cpu/mips/mips3drc.cpp b/src/devices/cpu/mips/mips3drc.cpp
index 7b6da3a1626..9995cdb105f 100644
--- a/src/devices/cpu/mips/mips3drc.cpp
+++ b/src/devices/cpu/mips/mips3drc.cpp
@@ -150,7 +150,7 @@ inline void mips3_device::save_fast_iregs(drcuml_block *block)
void mips3_device::mips3drc_set_options(UINT32 options)
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
m_drcoptions = options;
}
@@ -196,7 +196,7 @@ void mips3_device::add_fastram(offs_t start, offs_t end, UINT8 readonly, void *b
void mips3_device::mips3drc_add_hotspot(offs_t pc, UINT32 opcode, UINT32 cycles)
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
if (m_hotspot_select < ARRAY_LENGTH(m_hotspot))
{
m_hotspot[m_hotspot_select].pc = pc;
diff --git a/src/devices/cpu/powerpc/ppcdrc.cpp b/src/devices/cpu/powerpc/ppcdrc.cpp
index 7390f9284e9..a974511e504 100644
--- a/src/devices/cpu/powerpc/ppcdrc.cpp
+++ b/src/devices/cpu/powerpc/ppcdrc.cpp
@@ -2224,8 +2224,8 @@ int ppc_device::generate_opcode(drcuml_block *block, compiler_state *compiler, c
UML_ADD(block, I0, R32Z(G_RA(op)), (INT16)G_SIMM(op)); // add i0,ra,simm
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IMM(op)); // mapvar dsisr,DSISR_IMM(op)
UML_CALLH(block, *m_read32[m_core->mode]); // callh read32
- UML_MOV(block, mem(&m_core->tempdata.w.l), I0); // mov [tempdata],i0
- UML_FDFRFLT(block, F64(G_RD(op)), mem(&m_core->tempdata.w.l), SIZE_DWORD); // fdfrflt fd,[tempdata],dword
+ UML_FSCOPYI(block, F0, I0); // fscopyi f0,i0
+ UML_FDFRFLT(block, F64(G_RD(op)), F0, SIZE_DWORD); // fdfrflt fd,f0,dword
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
return TRUE;
@@ -2233,8 +2233,7 @@ int ppc_device::generate_opcode(drcuml_block *block, compiler_state *compiler, c
UML_ADD(block, I0, R32Z(G_RA(op)), (INT16)G_SIMM(op)); // add i0,ra,simm
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IMM(op)); // mapvar dsisr,DSISR_IMM(op)
UML_CALLH(block, *m_read64[m_core->mode]); // callh read64
- UML_DMOV(block, mem(&m_core->tempdata.d), I0); // dmov [tempdata],i0
- UML_FDMOV(block, F64(G_RD(op)), mem(&m_core->tempdata.d)); // fdmov fd,[tempdata]
+ UML_FDCOPYI(block, F64(G_RD(op)), I0); // fdcopyi fd,i0
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
return TRUE;
@@ -2243,8 +2242,8 @@ int ppc_device::generate_opcode(drcuml_block *block, compiler_state *compiler, c
UML_MOV(block, mem(&m_core->updateaddr), I0); // mov [updateaddr],i0
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IMMU(op)); // mapvar dsisr,DSISR_IMMU(op)
UML_CALLH(block, *m_read32[m_core->mode]); // callh read32
- UML_MOV(block, mem(&m_core->tempdata.w.l), I0); // mov [tempdata],i0
- UML_FDFRFLT(block, F64(G_RD(op)), mem(&m_core->tempdata.w.l), SIZE_DWORD); // fdfrflt fd,[tempdata],dword
+ UML_FSCOPYI(block, F0, I0); // fscopyi f0,i0
+ UML_FDFRFLT(block, F64(G_RD(op)), F0, SIZE_DWORD); // fdfrflt fd,f0,dword
UML_MOV(block, R32(G_RA(op)), mem(&m_core->updateaddr)); // mov ra,[updateaddr]
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
return TRUE;
@@ -2254,16 +2253,15 @@ int ppc_device::generate_opcode(drcuml_block *block, compiler_state *compiler, c
UML_MOV(block, mem(&m_core->updateaddr), I0); // mov [updateaddr],i0
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IMMU(op)); // mapvar dsisr,DSISR_IMMU(op)
UML_CALLH(block, *m_read64[m_core->mode]); // callh read64
- UML_DMOV(block, mem(&m_core->tempdata.d), I0); // dmov [tempdata],i0
- UML_FDMOV(block, F64(G_RD(op)), mem(&m_core->tempdata.d)); // fdmov fd,[tempdata]
+ UML_FDCOPYI(block, F64(G_RD(op)), I0); // fdcopyi fd,i0
UML_MOV(block, R32(G_RA(op)), mem(&m_core->updateaddr)); // mov ra,[updateaddr]
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
return TRUE;
case 0x34: /* STFS */
UML_ADD(block, I0, R32Z(G_RA(op)), (INT16)G_SIMM(op)); // add i0,ra,simm
- UML_FSFRFLT(block, mem(&m_core->tempdata.w.l), F64(G_RS(op)), SIZE_QWORD); // fsfrflt [tempdata],rs,qword
- UML_MOV(block, I1, mem(&m_core->tempdata.w.l)); // mov i1,[tempdata]
+ UML_FSFRFLT(block, F0, F64(G_RS(op)), SIZE_QWORD); // fsfrflt f0,fs,qword
+ UML_ICOPYFS(block, I1, F0); // icopyfs i1,f0
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IMM(op)); // mapvar dsisr,DSISR_IMM(op)
UML_CALLH(block, *m_write32[m_core->mode]); // callh write32
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
@@ -2271,8 +2269,7 @@ int ppc_device::generate_opcode(drcuml_block *block, compiler_state *compiler, c
case 0x36: /* STFD */
UML_ADD(block, I0, R32Z(G_RA(op)), (INT16)G_SIMM(op)); // add i0,ra,simm
- UML_FDMOV(block, mem(&m_core->tempdata.d), F64(G_RS(op))); // fdmov [tempdata],rs
- UML_DMOV(block, I1, mem(&m_core->tempdata.d)); // dmov i1,[tempdata]
+ UML_ICOPYFD(block, I1, F64(G_RS(op))); // icopyfd i1,fs
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IMM(op)); // mapvar dsisr,DSISR_IMM(op)
UML_CALLH(block, *m_write64[m_core->mode]); // callh write64
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
@@ -2280,8 +2277,8 @@ int ppc_device::generate_opcode(drcuml_block *block, compiler_state *compiler, c
case 0x35: /* STFSU */
UML_ADD(block, I0, R32(G_RA(op)), (INT16)G_SIMM(op)); // add i0,ra,simm
- UML_FSFRFLT(block, mem(&m_core->tempdata.w.l), F64(G_RS(op)), SIZE_QWORD); // fsfrflt [tempdata],rs,qword
- UML_MOV(block, I1, mem(&m_core->tempdata.w.l)); // mov i1,[tempdata]
+ UML_FSFRFLT(block, F0, F64(G_RS(op)), SIZE_QWORD); // fsfrflt f0,fs,qword
+ UML_ICOPYFS(block, I1, F0); // icopyfs i1,f0
UML_MOV(block, mem(&m_core->updateaddr), I0); // mov [updateaddr],i0
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IMMU(op)); // mapvar dsisr,DSISR_IMMU(op)
UML_CALLH(block, *m_write32[m_core->mode]); // callh write32
@@ -2291,8 +2288,7 @@ int ppc_device::generate_opcode(drcuml_block *block, compiler_state *compiler, c
case 0x37: /* STFDU */
UML_ADD(block, I0, R32(G_RA(op)), (INT16)G_SIMM(op)); // add i0,ra,simm
- UML_FDMOV(block, mem(&m_core->tempdata.d), F64(G_RS(op))); // fdmov [tempdata],rs
- UML_DMOV(block, I1, mem(&m_core->tempdata.d)); // dmov i1,[tempdata]
+ UML_ICOPYFD(block, I1, F64(G_RS(op))); // icopyfd i1,fs
UML_MOV(block, mem(&m_core->updateaddr), I0); // mov [updateaddr],i0
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IMMU(op)); // mapvar dsisr,DSISR_IMMU(op)
UML_CALLH(block, *m_write64[m_core->mode]); // callh write64
@@ -2909,8 +2905,8 @@ int ppc_device::generate_instruction_1f(drcuml_block *block, compiler_state *com
UML_ADD(block, I0, R32Z(G_RA(op)), R32(G_RB(op))); // add i0,ra,rb
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IDX(op)); // mapvar dsisr,DSISR_IDX(op)
UML_CALLH(block, *m_read32[m_core->mode]); // callh read32
- UML_MOV(block, mem(&m_core->tempdata.w.l), I0); // mov [tempdata],i0
- UML_FDFRFLT(block, F64(G_RD(op)), mem(&m_core->tempdata.w.l), SIZE_DWORD); // fdfrflt fd,[tempdata],dword
+ UML_FSCOPYI(block, F0, I0); // fscopyi f0,i0
+ UML_FDFRFLT(block, F64(G_RD(op)), F0, SIZE_DWORD); // fdfrflt fd,f0,dword
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
return TRUE;
@@ -2918,8 +2914,7 @@ int ppc_device::generate_instruction_1f(drcuml_block *block, compiler_state *com
UML_ADD(block, I0, R32Z(G_RA(op)), R32(G_RB(op))); // add i0,ra,rb
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IDX(op)); // mapvar dsisr,DSISR_IDX(op)
UML_CALLH(block, *m_read64[m_core->mode]); // callh read64
- UML_DMOV(block, mem(&m_core->tempdata.d), I0); // dmov [tempdata],i0
- UML_FDMOV(block, F64(G_RD(op)), mem(&m_core->tempdata.d)); // fdmov fd,[tempdata]
+ UML_FDCOPYI(block, F64(G_RD(op)), I0); // fdcopyi fd,i0
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
return TRUE;
@@ -2985,8 +2980,8 @@ int ppc_device::generate_instruction_1f(drcuml_block *block, compiler_state *com
UML_MOV(block, mem(&m_core->updateaddr), I0); // mov [updateaddr],i0
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IDX(op)); // mapvar dsisr,DSISR_IDX(op)
UML_CALLH(block, *m_read32[m_core->mode]); // callh read32
- UML_MOV(block, mem(&m_core->tempdata.w.l), I0); // mov [tempdata],i0
- UML_FDFRFLT(block, F64(G_RD(op)), mem(&m_core->tempdata.w.l), SIZE_DWORD); // fdfrflt fd,[tempdata],dword
+ UML_FSCOPYI(block, F0, I0); // fscopyi f0,i0
+ UML_FDFRFLT(block, F64(G_RD(op)), F0, SIZE_DWORD); // fdfrflt fd,f0,dword
UML_MOV(block, R32(G_RA(op)), mem(&m_core->updateaddr)); // mov ra,[updateaddr]
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
return TRUE;
@@ -2996,8 +2991,7 @@ int ppc_device::generate_instruction_1f(drcuml_block *block, compiler_state *com
UML_MOV(block, mem(&m_core->updateaddr), I0); // mov [updateaddr],i0
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IDX(op)); // mapvar dsisr,DSISR_IDX(op)
UML_CALLH(block, *m_read64[m_core->mode]); // callh read64
- UML_DMOV(block, mem(&m_core->tempdata.d), I0); // dmov [tempdata],i0
- UML_FDMOV(block, F64(G_RD(op)), mem(&m_core->tempdata.d)); // fdmov fd,[tempdata]
+ UML_FDCOPYI(block, F64(G_RD(op)), I0); // fdcopyi fd,i0
UML_MOV(block, R32(G_RA(op)), mem(&m_core->updateaddr)); // mov ra,[updateaddr]
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
return TRUE;
@@ -3055,8 +3049,8 @@ int ppc_device::generate_instruction_1f(drcuml_block *block, compiler_state *com
case 0x297: /* STFSX */
UML_ADD(block, I0, R32Z(G_RA(op)), R32(G_RB(op))); // add i0,ra,rb
- UML_FSFRFLT(block, mem(&m_core->tempdata.w.l), F64(G_RS(op)), SIZE_QWORD); // fsfrflt [tempdata],rs,qword
- UML_MOV(block, I1, mem(&m_core->tempdata.w.l)); // mov i1,[tempdata]
+ UML_FSFRFLT(block, F0, F64(G_RS(op)), SIZE_QWORD); // fsfrflt f0,fs,qword
+ UML_ICOPYFS(block, I1, F0); // icopyfs i1,f0
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IDX(op)); // mapvar dsisr,DSISR_IDX(op)
UML_CALLH(block, *m_write32[m_core->mode]); // callh write32
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
@@ -3073,8 +3067,7 @@ int ppc_device::generate_instruction_1f(drcuml_block *block, compiler_state *com
case 0x2d7: /* STFDX */
UML_ADD(block, I0, R32Z(G_RA(op)), R32(G_RB(op))); // add i0,ra,rb
- UML_FDMOV(block, mem(&m_core->tempdata.d), F64(G_RS(op))); // fdmov [tempdata],rs
- UML_DMOV(block, I1, mem(&m_core->tempdata.d)); // dmov i1,[tempdata]
+ UML_ICOPYFD(block, I1, F64(G_RS(op))); // icopyfd i1,fs
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IDX(op)); // mapvar dsisr,DSISR_IDX(op)
UML_CALLH(block, *m_write64[m_core->mode]); // callh write64
generate_update_cycles(block, compiler, desc->pc + 4, TRUE); // <update cycles>
@@ -3129,8 +3122,8 @@ int ppc_device::generate_instruction_1f(drcuml_block *block, compiler_state *com
case 0x2b7: /* STFSUX */
UML_ADD(block, I0, R32(G_RA(op)), R32(G_RB(op))); // add i0,ra,rb
- UML_FSFRFLT(block, mem(&m_core->tempdata.w.l), F64(G_RS(op)), SIZE_QWORD); // fsfrflt [tempdata],rs,qword
- UML_MOV(block, I1, mem(&m_core->tempdata.w.l)); // mov i1,[tempdata]
+ UML_FSFRFLT(block, F0, F64(G_RS(op)), SIZE_QWORD); // fsfrflt f0,fs,qword
+ UML_ICOPYFS(block, I1, F0); // icopyfs i1,f0
UML_MOV(block, mem(&m_core->updateaddr), I0); // mov [updateaddr],i0
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IDX(op)); // mapvar dsisr,DSISR_IDX(op)
UML_CALLH(block, *m_write32[m_core->mode]); // callh write32
@@ -3140,8 +3133,7 @@ int ppc_device::generate_instruction_1f(drcuml_block *block, compiler_state *com
case 0x2f7: /* STFDUX */
UML_ADD(block, I0, R32(G_RA(op)), R32(G_RB(op))); // add i0,ra,rb
- UML_FDMOV(block, mem(&m_core->tempdata.d), F64(G_RS(op))); // fdmov [tempdata],rs
- UML_DMOV(block, I1, mem(&m_core->tempdata.d)); // dmov i1,[tempdata]
+ UML_ICOPYFD(block, I1, F64(G_RS(op))); // icopyfd i1,fs
UML_MOV(block, mem(&m_core->updateaddr), I0); // mov [updateaddr],i0
UML_MAPVAR(block, MAPVAR_DSISR, DSISR_IDX(op)); // mapvar dsisr,DSISR_IDX(op)
UML_CALLH(block, *m_write64[m_core->mode]); // callh write64
diff --git a/src/devices/cpu/rsp/rsp.cpp b/src/devices/cpu/rsp/rsp.cpp
index 246843fb6af..9fd2525e193 100644
--- a/src/devices/cpu/rsp/rsp.cpp
+++ b/src/devices/cpu/rsp/rsp.cpp
@@ -361,7 +361,7 @@ void rsp_device::resolve_cb()
void rsp_device::device_start()
{
- m_isdrc = (mconfig().options().drc() && !mconfig().m_force_no_drc) ? true : false;
+ m_isdrc = allow_drc();
m_rsp_state = (internal_rsp_state *)m_cache.alloc_near(sizeof(internal_rsp_state));
if (LOG_INSTRUCTION_EXECUTION)
diff --git a/src/devices/cpu/rsp/rspdrc.cpp b/src/devices/cpu/rsp/rspdrc.cpp
index c581cfb3aba..ce334b91cc8 100644
--- a/src/devices/cpu/rsp/rspdrc.cpp
+++ b/src/devices/cpu/rsp/rspdrc.cpp
@@ -183,7 +183,7 @@ static void cfunc_write32(void *param)
void rsp_device::rspdrc_set_options(UINT32 options)
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
m_drcoptions = options;
}
@@ -307,7 +307,7 @@ void rsp_device::execute_run_drc()
void rsp_device::rspdrc_flush_drc_cache()
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
m_cache_dirty = TRUE;
}
diff --git a/src/devices/cpu/sh2/sh2.cpp b/src/devices/cpu/sh2/sh2.cpp
index 751349dbd0c..0201e8d8a44 100644
--- a/src/devices/cpu/sh2/sh2.cpp
+++ b/src/devices/cpu/sh2/sh2.cpp
@@ -193,7 +193,7 @@ sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t
, m_out_of_cycles(nullptr)
, m_debugger_temp(0)
{
- m_isdrc = (mconfig.options().drc() && !mconfig.m_force_no_drc) ? true : false;
+ m_isdrc = allow_drc();
}
@@ -225,7 +225,7 @@ sh2_device::sh2_device(const machine_config &mconfig, device_type type, const ch
, m_nocode(nullptr)
, m_out_of_cycles(nullptr)
{
- m_isdrc = (mconfig.options().drc() && !mconfig.m_force_no_drc) ? true : false;
+ m_isdrc = allow_drc();
}
sh2a_device::sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
diff --git a/src/devices/cpu/sh2/sh2drc.cpp b/src/devices/cpu/sh2/sh2drc.cpp
index db732e57b40..e7b2460198a 100644
--- a/src/devices/cpu/sh2/sh2drc.cpp
+++ b/src/devices/cpu/sh2/sh2drc.cpp
@@ -11,7 +11,6 @@
#include "debugger.h"
#include "sh2.h"
#include "sh2comn.h"
-#include "mconfig.h"
extern unsigned DasmSH2(char *buffer, unsigned pc, UINT16 opcode);
@@ -2946,7 +2945,7 @@ int sh2_device::generate_group_12(drcuml_block *block, compiler_state *compiler,
void sh2_device::sh2drc_set_options(UINT32 options)
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
m_drcoptions = options;
}
@@ -2958,7 +2957,7 @@ void sh2_device::sh2drc_set_options(UINT32 options)
void sh2_device::sh2drc_add_pcflush(offs_t address)
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
if (m_pcfsel < ARRAY_LENGTH(m_pcflushes))
m_pcflushes[m_pcfsel++] = address;
diff --git a/src/devices/cpu/sh4/sh4.cpp b/src/devices/cpu/sh4/sh4.cpp
index 74bf64e8f1d..047e7405537 100644
--- a/src/devices/cpu/sh4/sh4.cpp
+++ b/src/devices/cpu/sh4/sh4.cpp
@@ -4115,7 +4115,7 @@ void sh34_base_device::device_start()
m_test_irq = 0;
save_item(NAME(m_pc));
- save_item(NAME(m_r[15]));
+ save_item(NAME(m_r));
save_item(NAME(m_sr));
save_item(NAME(m_pr));
save_item(NAME(m_gbr));
@@ -4126,59 +4126,20 @@ void sh34_base_device::device_start()
save_item(NAME(m_ssr));
save_item(NAME(m_sgr));
save_item(NAME(m_fpscr));
- save_item(NAME(m_r[ 0]));
- save_item(NAME(m_r[ 1]));
- save_item(NAME(m_r[ 2]));
- save_item(NAME(m_r[ 3]));
- save_item(NAME(m_r[ 4]));
- save_item(NAME(m_r[ 5]));
- save_item(NAME(m_r[ 6]));
- save_item(NAME(m_r[ 7]));
- save_item(NAME(m_r[ 8]));
- save_item(NAME(m_r[ 9]));
- save_item(NAME(m_r[10]));
- save_item(NAME(m_r[11]));
- save_item(NAME(m_r[12]));
- save_item(NAME(m_r[13]));
- save_item(NAME(m_r[14]));
- save_item(NAME(m_fr[ 0]));
- save_item(NAME(m_fr[ 1]));
- save_item(NAME(m_fr[ 2]));
- save_item(NAME(m_fr[ 3]));
- save_item(NAME(m_fr[ 4]));
- save_item(NAME(m_fr[ 5]));
- save_item(NAME(m_fr[ 6]));
- save_item(NAME(m_fr[ 7]));
- save_item(NAME(m_fr[ 8]));
- save_item(NAME(m_fr[ 9]));
- save_item(NAME(m_fr[10]));
- save_item(NAME(m_fr[11]));
- save_item(NAME(m_fr[12]));
- save_item(NAME(m_fr[13]));
- save_item(NAME(m_fr[14]));
- save_item(NAME(m_fr[15]));
- save_item(NAME(m_xf[ 0]));
- save_item(NAME(m_xf[ 1]));
- save_item(NAME(m_xf[ 2]));
- save_item(NAME(m_xf[ 3]));
- save_item(NAME(m_xf[ 4]));
- save_item(NAME(m_xf[ 5]));
- save_item(NAME(m_xf[ 6]));
- save_item(NAME(m_xf[ 7]));
- save_item(NAME(m_xf[ 8]));
- save_item(NAME(m_xf[ 9]));
- save_item(NAME(m_xf[10]));
- save_item(NAME(m_xf[11]));
- save_item(NAME(m_xf[12]));
- save_item(NAME(m_xf[13]));
- save_item(NAME(m_xf[14]));
- save_item(NAME(m_xf[15]));
+ save_item(NAME(m_rbnk));
+ save_item(NAME(m_fr));
+ save_item(NAME(m_xf));
save_item(NAME(m_ea));
+ save_item(NAME(m_delay));
+ save_item(NAME(m_cpu_off));
+ save_item(NAME(m_pending_irq));
+ save_item(NAME(m_test_irq));
save_item(NAME(m_fpul));
save_item(NAME(m_dbr));
save_item(NAME(m_exception_priority));
save_item(NAME(m_exception_requesting));
-
+ save_item(NAME(m_irq_line_state));
+ save_item(NAME(m_m));
save_item(NAME(m_SH4_TSTR));
save_item(NAME(m_SH4_TCNT0));
save_item(NAME(m_SH4_TCNT1));
@@ -4191,10 +4152,48 @@ void sh34_base_device::device_start()
save_item(NAME(m_SH4_TCOR2));
save_item(NAME(m_SH4_TOCR));
save_item(NAME(m_SH4_TCPR2));
-
save_item(NAME(m_SH4_IPRA));
-
save_item(NAME(m_SH4_IPRC));
+ save_item(NAME(m_SH4_DAR0));
+ save_item(NAME(m_SH4_DAR1));
+ save_item(NAME(m_SH4_DAR2));
+ save_item(NAME(m_SH4_DAR3));
+ save_item(NAME(m_SH4_CHCR0));
+ save_item(NAME(m_SH4_CHCR1));
+ save_item(NAME(m_SH4_CHCR2));
+ save_item(NAME(m_SH4_CHCR3));
+ save_item(NAME(m_SH4_DMATCR0));
+ save_item(NAME(m_SH4_DMATCR1));
+ save_item(NAME(m_SH4_DMATCR2));
+ save_item(NAME(m_SH4_DMATCR3));
+ save_item(NAME(m_SH4_DMAOR));
+ save_item(NAME(m_nmi_line_state));
+ save_item(NAME(m_sleep_mode));
+ save_item(NAME(m_frt_input));
+ save_item(NAME(m_irln));
+ save_item(NAME(m_internal_irq_level));
+ save_item(NAME(m_internal_irq_vector));
+ save_item(NAME(m_refresh_timer_base));
+ save_item(NAME(m_dma_timer_active));
+ save_item(NAME(m_dma_source));
+ save_item(NAME(m_dma_destination));
+ save_item(NAME(m_dma_count));
+ save_item(NAME(m_dma_wordsize));
+ save_item(NAME(m_dma_source_increment));
+ save_item(NAME(m_dma_destination_increment));
+ save_item(NAME(m_dma_mode));
+ save_item(NAME(m_sh4_icount));
+ save_item(NAME(m_fpu_sz));
+ save_item(NAME(m_fpu_pr));
+ save_item(NAME(m_ioport16_pullup));
+ save_item(NAME( m_ioport16_direction));
+ save_item(NAME(m_ioport4_pullup));
+ save_item(NAME(m_ioport4_direction));
+ save_item(NAME(m_sh4_tlb_address));
+ save_item(NAME(m_sh4_tlb_data));
+ save_item(NAME(m_sh4_mmu_enabled));
+ save_item(NAME(m_sh3internal_upper));
+ save_item(NAME(m_sh3internal_lower));
// Debugger state
diff --git a/src/devices/cpu/sm510/kb1013vk1-2.h b/src/devices/cpu/sm510/kb1013vk1-2.h
new file mode 100644
index 00000000000..7e8c739354d
--- /dev/null
+++ b/src/devices/cpu/sm510/kb1013vk1-2.h
@@ -0,0 +1,41 @@
+// license:BSD-3-Clause
+// copyright-holders:hap, Igor
+/*
+
+ KB1013VK1-2
+
+*/
+
+#ifndef _KB1013VK12_H_
+#define _KB1013VK12_H_
+
+#include "sm500.h"
+
+
+// I/O ports setup
+
+// ..
+
+
+
+
+
+class kb1013vk12_device : public sm500_device
+{
+public:
+ kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
+ virtual void execute_one() override;
+
+ // opcode handlers
+ virtual void op_bs0();
+ virtual void op_bs1();
+};
+
+
+extern const device_type KB1013VK12;
+
+
+#endif /* _KB1013VK12_H_ */
diff --git a/src/devices/cpu/sm510/kb1013vk1-2core.cpp b/src/devices/cpu/sm510/kb1013vk1-2core.cpp
new file mode 100644
index 00000000000..1aa40b87cdb
--- /dev/null
+++ b/src/devices/cpu/sm510/kb1013vk1-2core.cpp
@@ -0,0 +1,135 @@
+// license:BSD-3-Clause
+// copyright-holders:hap, Igor
+/*
+
+ KB1013VK1-2 MCU core implementation
+
+*/
+
+#include "kb1013vk1-2.h"
+#include "debugger.h"
+
+// MCU types
+const device_type KB1013VK12 = &device_creator<kb1013vk12_device>;
+
+
+// internal memory maps
+static ADDRESS_MAP_START(program_1_8k, AS_PROGRAM, 8, sm510_base_device)
+ AM_RANGE(0x000, 0x6ff) AM_ROM
+ AM_RANGE(0x700, 0x73f) AM_MIRROR(0x0c0) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(data_5x13x4, AS_DATA, 8, sm510_base_device)
+ AM_RANGE(0x00, 0x0c) AM_RAM
+ AM_RANGE(0x10, 0x1c) AM_RAM
+ AM_RANGE(0x20, 0x2c) AM_RAM
+ AM_RANGE(0x30, 0x3c) AM_RAM
+ AM_RANGE(0x40, 0x4c) AM_RAM
+ADDRESS_MAP_END
+
+// device definitions
+kb1013vk12_device::kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : sm500_device(mconfig, KB1013VK12, "KB1013VK1-2", tag, owner, clock, 1 /* stack levels */, 11 /* prg width */, ADDRESS_MAP_NAME(program_1_8k), 7 /* data width */, ADDRESS_MAP_NAME(data_5x13x4), "kb1013vk1-2", __FILE__)
+{ }
+
+
+// disasm
+offs_t kb1013vk12_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+{
+ extern CPU_DISASSEMBLE(kb1013vk12);
+ return CPU_DISASSEMBLE_NAME(kb1013vk12)(this, buffer, pc, oprom, opram, options);
+}
+
+
+
+//-------------------------------------------------
+// execute
+//-------------------------------------------------
+
+void kb1013vk12_device::execute_one()
+{
+ switch (m_op & 0xf0)
+ {
+ case 0x20: op_lax(); break; // LC
+ case 0x30: op_adx(); break; // AS/A10
+ case 0x40: op_lb(); break; // LAS
+ case 0x70: op_ssr(); break; // LP
+
+ case 0x80: case 0x90: case 0xa0: case 0xb0:
+ op_t(); break; // BR (LP+this=JMP)
+ case 0xc0: case 0xd0: case 0xe0: case 0xf0:
+ op_trs(); break; // CBR/CZP (LP+this=CAL)
+
+ default:
+ switch (m_op & 0xfc)
+ {
+ case 0x04: op_rm(); break; // BM0
+ case 0x0c: op_sm(); break; // BM1
+ case 0x10: op_exc(); break; // XM/XE
+ case 0x14: op_exci(); break; // XI/XEI
+ case 0x18: op_lda(); break; // LE
+ case 0x1c: op_excd(); break; // XD/XED
+ case 0x54: op_tmi(); break; // SM1
+
+ default:
+ switch (m_op)
+ {
+ case 0x00: op_skip(); break; // NOP
+ case 0x01: op_atr(); break; // OAR
+ case 0x02: op_bs1(); break; // *BS1
+ case 0x03: op_atbp(); break;
+ case 0x08: op_add(); break; // AM
+ case 0x09: op_add11(); break; // AC
+ case 0x0a: op_coma(); break; // COM
+ case 0x0b: op_exbla(); break; // XL
+
+ case 0x50: op_tal(); break; // SI1
+ case 0x51: op_tb(); break; // SI0
+ case 0x52: op_tc(); break; // SCO
+ case 0x53: op_tam(); break; // SAM
+ case 0x58: op_tis(); break; // TIM
+ case 0x59: op_ptw(); break;
+ case 0x5a: op_ta0(); break; // SAO
+ case 0x5b: op_tabl(); break; // SAL
+ case 0x5c: op_tw(); break;
+ case 0x5d: op_dtw(); break;
+ case 0x5f: op_lbl(); break; // LAF
+
+ case 0x60: op_comcn(); break;
+ case 0x61: op_pdtw(); break;
+ case 0x62: op_wr(); break;
+ case 0x63: op_ws(); break;
+ case 0x64: op_incb(); break; // INC
+ case 0x65: op_idiv(); break; // SYN
+ case 0x66: op_rc(); break; // CLC
+ case 0x67: op_sc(); break; // STC
+ case 0x68: op_rmf(); break; // CLL
+ case 0x69: op_smf(); break; // LD0
+ case 0x6a: op_kta(); break; // ICD
+ case 0x6b: op_bs0(); break; // *BS0
+ case 0x6c: op_decb(); break; // DEC
+ case 0x6d: op_comcb(); break; // CMS
+ case 0x6e: op_rtn0(); break; // RT
+ case 0x6f: op_rtn1(); break; // RTS
+
+ // extended opcodes
+ case 0x5e:
+ m_op = m_op << 8 | m_param;
+ switch (m_param)
+ {
+ case 0x00: op_cend(); break; // HLT
+ case 0x04: op_dta(); break; // LDF
+
+ default: op_illegal(); break;
+ }
+ break; // 0x5e
+
+ default: op_illegal(); break;
+ }
+ break; // 0xff
+
+ }
+ break; // 0xfc
+
+ } // big switch
+}
diff --git a/src/devices/cpu/sm510/kb1013vk1-2op.cpp b/src/devices/cpu/sm510/kb1013vk1-2op.cpp
new file mode 100644
index 00000000000..3c5fcc548e7
--- /dev/null
+++ b/src/devices/cpu/sm510/kb1013vk1-2op.cpp
@@ -0,0 +1,21 @@
+// license:BSD-3-Clause
+// copyright-holders:hap, Igor
+
+// KB1013VK1-2 opcode handlers
+
+#include "kb1013vk1-2.h"
+
+
+// instruction set
+
+void kb1013vk12_device::op_bs0()
+{
+ // BS0: reset RAM address high bit
+ m_bm &= ~4;
+}
+
+void kb1013vk12_device::op_bs1()
+{
+ // BS1: set RAM address high bit
+ m_bm |= 4;
+}
diff --git a/src/devices/cpu/sm510/sm500.h b/src/devices/cpu/sm510/sm500.h
new file mode 100644
index 00000000000..aaf083c293a
--- /dev/null
+++ b/src/devices/cpu/sm510/sm500.h
@@ -0,0 +1,82 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ Sharp SM500 MCU family cores
+
+*/
+
+#ifndef _SM500_H_
+#define _SM500_H_
+
+#include "sm510.h"
+
+
+// I/O ports setup
+
+// ..
+
+
+// pinout reference
+
+/*
+
+ O33 O43 O12 O22 O32 GND O42 O11 O21 O31 O41 OS1
+ 36 35 34 33 32 31 30 29 28 27 26 25
+ ________________________________________________
+ | |
+O23 37 | | 24 OS2
+O13 38 | | 23 OS3
+O44 39 | | 22 OS4
+O34 40 | | 21 H1
+O24 41 | | 20 H2
+O14 42 | SM500 | 19 VM
+O45 43 | | 18 OSCin
+O35 44 | | 17 OSCout
+O25 45 | | 16 VDD
+O15 46 | | 15 K4
+O46 47 | | 14 K3
+O36 48 | * | 13 K2
+ |________________________________________________/
+
+ 1 2 3 4 5 6 7 8 9 10 11 12
+ O26 O16 R4 R3 R2 R1 GND _T bt al ACL K1 note: bt = beta symbol, al = alpha symbol
+*/
+
+class sm500_device : public sm510_base_device
+{
+public:
+ sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ sm500_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+
+protected:
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
+ virtual void execute_one() override;
+ virtual void get_opcode_param() override;
+
+ // opcode handlers
+ virtual void op_lb() override;
+ virtual void op_incb() override;
+
+ virtual void op_comcb();
+ virtual void op_ssr();
+ virtual void op_trs();
+
+ virtual void op_pdtw();
+ virtual void op_tw();
+ virtual void op_dtw();
+
+ virtual void op_ats();
+ virtual void op_exksa();
+ virtual void op_exkfa();
+
+ virtual void op_rmf();
+ virtual void op_smf();
+ virtual void op_comcn();
+};
+
+
+extern const device_type SM500;
+
+
+#endif /* _SM500_H_ */
diff --git a/src/devices/cpu/sm510/sm500core.cpp b/src/devices/cpu/sm510/sm500core.cpp
new file mode 100644
index 00000000000..a5117e7a856
--- /dev/null
+++ b/src/devices/cpu/sm510/sm500core.cpp
@@ -0,0 +1,153 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ Sharp SM500 MCU core implementation
+
+*/
+
+#include "sm500.h"
+#include "debugger.h"
+
+
+// MCU types
+const device_type SM500 = &device_creator<sm500_device>;
+
+
+// internal memory maps
+static ADDRESS_MAP_START(program_1_2k, AS_PROGRAM, 8, sm510_base_device)
+ AM_RANGE(0x000, 0x4bf) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(data_4x10x4, AS_DATA, 8, sm510_base_device)
+ AM_RANGE(0x00, 0x09) AM_RAM
+ AM_RANGE(0x10, 0x19) AM_RAM
+ AM_RANGE(0x20, 0x29) AM_RAM
+ AM_RANGE(0x30, 0x39) AM_RAM
+ADDRESS_MAP_END
+
+
+// device definitions
+sm500_device::sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : sm510_base_device(mconfig, SM500, "SM500", tag, owner, clock, 1 /* stack levels */, 11 /* prg width */, ADDRESS_MAP_NAME(program_1_2k), 6 /* data width */, ADDRESS_MAP_NAME(data_4x10x4), "sm500", __FILE__)
+{ }
+
+sm500_device::sm500_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ : sm510_base_device(mconfig, type, name, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data, shortname, source)
+{ }
+
+
+// disasm
+offs_t sm500_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+{
+ extern CPU_DISASSEMBLE(sm500);
+ return CPU_DISASSEMBLE_NAME(sm500)(this, buffer, pc, oprom, opram, options);
+}
+
+
+
+//-------------------------------------------------
+// execute
+//-------------------------------------------------
+
+void sm500_device::get_opcode_param()
+{
+ // LBL and prefix opcodes are 2 bytes
+ if (m_op == 0x5e || m_op == 0x5f)
+ {
+ m_icount--;
+ m_param = m_program->read_byte(m_pc);
+ increment_pc();
+ }
+}
+
+void sm500_device::execute_one()
+{
+ switch (m_op & 0xf0)
+ {
+ case 0x20: op_lax(); break;
+ case 0x30:
+ if (m_op == 0x30) op_ats(); // !
+ else op_adx();
+ break;
+ case 0x40: op_lb(); break;
+ case 0x70: op_ssr(); break;
+
+ case 0x80: case 0x90: case 0xa0: case 0xb0:
+ op_t(); break; // aka tr
+ case 0xc0: case 0xd0: case 0xe0: case 0xf0:
+ op_trs(); break;
+
+ default:
+ switch (m_op & 0xfc)
+ {
+ case 0x04: op_rm(); break;
+ case 0x0c: op_sm(); break;
+ case 0x10: op_exc(); break;
+ case 0x14: op_exci(); break;
+ case 0x18: op_lda(); break;
+ case 0x1c: op_excd(); break;
+ case 0x54: op_tmi(); break; // aka tm
+
+ default:
+ switch (m_op)
+ {
+ case 0x00: op_skip(); break;
+ case 0x01: op_atr(); break;
+ case 0x02: op_exksa(); break;
+ case 0x03: op_atbp(); break;
+ case 0x08: op_add(); break;
+ case 0x09: op_add11(); break; // aka addc
+ case 0x0a: op_coma(); break;
+ case 0x0b: op_exbla(); break;
+
+ case 0x50: op_tal(); break; // aka ta: test alpha
+ case 0x51: op_tb(); break;
+ case 0x52: op_tc(); break;
+ case 0x53: op_tam(); break;
+ case 0x58: op_tis(); break; // aka tg: test gamma
+ case 0x59: op_ptw(); break;
+ case 0x5a: op_ta0(); break;
+ case 0x5b: op_tabl(); break;
+ case 0x5c: op_tw(); break;
+ case 0x5d: op_dtw(); break;
+ case 0x5f: op_lbl(); break;
+
+ case 0x60: op_comcn(); break;
+ case 0x61: op_pdtw(); break;
+ case 0x62: op_wr(); break;
+ case 0x63: op_ws(); break;
+ case 0x64: op_incb(); break;
+ case 0x65: op_idiv(); break;
+ case 0x66: op_rc(); break;
+ case 0x67: op_sc(); break;
+ case 0x68: op_rmf(); break;
+ case 0x69: op_smf(); break;
+ case 0x6a: op_kta(); break;
+ case 0x6b: op_exkfa(); break;
+ case 0x6c: op_decb(); break;
+ case 0x6d: op_comcb(); break;
+ case 0x6e: op_rtn0(); break; // aka rtn
+ case 0x6f: op_rtn1(); break; // aka rtns
+
+ // extended opcodes
+ case 0x5e:
+ m_op = m_op << 8 | m_param;
+ switch (m_param)
+ {
+ case 0x00: op_cend(); break;
+ case 0x04: op_dta(); break;
+
+ default: op_illegal(); break;
+ }
+ break; // 0x5e
+
+ default: op_illegal(); break;
+ }
+ break; // 0xff
+
+ }
+ break; // 0xfc
+
+ } // big switch
+}
diff --git a/src/devices/cpu/sm510/sm500op.cpp b/src/devices/cpu/sm510/sm500op.cpp
new file mode 100644
index 00000000000..bb0bc6f043b
--- /dev/null
+++ b/src/devices/cpu/sm510/sm500op.cpp
@@ -0,0 +1,95 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+
+// SM500 opcode handlers
+
+#include "sm500.h"
+
+
+// instruction set
+
+// RAM address instructions
+
+void sm500_device::op_lb()
+{
+ // LB x: load BM/BL with 4-bit immediate value (partial)
+ // BL bit 2 is clearned, bit 3 is param bit 2|3
+ m_bm = (m_op & 3);
+ m_bl = ((m_op << 1 | m_op) & 8) | (m_op >> 2 & 3);
+}
+
+void sm500_device::op_incb()
+{
+ // INCB: increment BL, skip next on overflow, of 3rd bit!
+ m_bl = (m_bl + 1) & 0xf;
+ m_skip = (m_bl == 8);
+}
+
+
+// ROM address instructions
+
+void sm500_device::op_comcb()
+{
+}
+
+void sm500_device::op_ssr()
+{
+}
+
+void sm500_device::op_trs()
+{
+}
+
+
+// Arithmetic instructions
+
+
+// Data transfer instructions
+
+void sm500_device::op_pdtw()
+{
+}
+
+void sm500_device::op_tw()
+{
+}
+
+void sm500_device::op_dtw()
+{
+}
+
+
+// I/O instructions
+
+void sm500_device::op_ats()
+{
+}
+
+void sm500_device::op_exksa()
+{
+}
+
+void sm500_device::op_exkfa()
+{
+}
+
+
+// Divider manipulation instructions
+
+
+// Bit manipulation instructions
+
+void sm500_device::op_rmf()
+{
+}
+
+void sm500_device::op_smf()
+{
+}
+
+void sm500_device::op_comcn()
+{
+}
+
+// Test instructions
+
diff --git a/src/devices/cpu/sm510/sm510.cpp b/src/devices/cpu/sm510/sm510.cpp
index 9c6b197f06f..a602e611d99 100644
--- a/src/devices/cpu/sm510/sm510.cpp
+++ b/src/devices/cpu/sm510/sm510.cpp
@@ -2,17 +2,25 @@
// copyright-holders:hap
/*
- Sharp SM510 MCU family - known chips:
+ Known chips: (* means not emulated yet)
+
+ Sharp SM510 MCU family:
- SM510: 2.7Kx8 ROM, 128x4 RAM(32x4 for LCD)
- SM511: 4Kx8 ROM, 128x4 RAM(32x4 for LCD), melody controller
- SM512: 4Kx8 ROM, 128x4 RAM(48x4 for LCD), melody controller
-
- Other chips that may be in the same family, investigate more when one of
- them needs to get emulated: SM500, SM530/31, SM4A, SM3903, ..
-
+ - *KB1013VK4-2: Soviet-era clone of SM510, minor differences
+
+ Sharp SM500 MCU family:
+ - *SM500: x
+ - *SM4A: x
+ - *SM530: x
+ - *SM531: x
+ - *KB1013VK1-2: Soviet-era clone of SM500, minor differences
+
References:
- 1990 Sharp Microcomputers Data Book
- 1996 Sharp Microcomputer Databook
+ - KB1013VK1-2/KB1013VK4-2 manual
TODO:
- proper support for LFSR program counter in debugger
@@ -59,35 +67,6 @@ void sm510_base_device::device_start()
m_write_segbs.resolve_safe();
m_write_segc.resolve_safe();
- // zerofill
- memset(m_stack, 0, sizeof(m_stack));
- m_pc = 0;
- m_prev_pc = 0;
- m_op = 0;
- m_prev_op = 0;
- m_param = 0;
- m_acc = 0;
- m_bl = 0;
- m_bm = 0;
- m_c = 0;
- m_skip = false;
- m_w = 0;
- m_r = 0;
- m_div = 0;
- m_1s = false;
- m_k_active = false;
- m_l = 0;
- m_x = 0;
- m_y = 0;
- m_bp = false;
- m_bc = false;
- m_halt = false;
- m_melody_rd = 0;
- m_melody_step_count = 0;
- m_melody_duty_count = 0;
- m_melody_duty_index = 0;
- m_melody_address = 0;
-
// register for savestates
save_item(NAME(m_stack));
save_item(NAME(m_pc));
@@ -147,6 +126,7 @@ void sm510_base_device::device_reset()
// ACL
m_skip = false;
m_halt = false;
+ m_sbm = false;
m_op = m_prev_op = 0;
do_branch(3, 7, 0);
m_prev_pc = m_pc;
diff --git a/src/devices/cpu/sm510/sm510.h b/src/devices/cpu/sm510/sm510.h
index 78a5b13556f..54b71077159 100644
--- a/src/devices/cpu/sm510/sm510.h
+++ b/src/devices/cpu/sm510/sm510.h
@@ -21,7 +21,7 @@
// driver is required to use execute_set_input(SM510_INPUT_LINE_K, state)
#define SM510_INPUT_LINE_K 0
-// 1-bit BA input pin (pull-up)
+// 1-bit BA(aka alpha) input pin (pull-up)
#define MCFG_SM510_READ_BA_CB(_devcb) \
sm510_base_device::set_read_ba_callback(*device, DEVCB_##_devcb);
@@ -162,6 +162,7 @@ protected:
UINT8 m_acc;
UINT8 m_bl;
UINT8 m_bm;
+ bool m_sbm;
UINT8 m_c;
bool m_skip;
UINT8 m_w;
@@ -180,7 +181,7 @@ protected:
UINT16 get_lcd_row(int column, UINT8* ram);
TIMER_CALLBACK_MEMBER(lcd_timer_cb);
- void init_lcd_driver();
+ virtual void init_lcd_driver();
// melody controller
optional_region_ptr<UINT8> m_melody_rom;
@@ -222,70 +223,70 @@ protected:
UINT8 bitmask(UINT16 param);
// opcode handlers
- void op_lb();
- void op_lbl();
- void op_sbm();
- void op_exbla();
- void op_incb();
- void op_decb();
-
- void op_atpl();
- void op_rtn0();
- void op_rtn1();
- void op_tl();
- void op_tml();
- void op_tm();
- void op_t();
-
- void op_exc();
- void op_bdc();
- void op_exci();
- void op_excd();
- void op_lda();
- void op_lax();
- void op_ptw();
- void op_wr();
- void op_ws();
-
- void op_kta();
- void op_atbp();
- void op_atx();
- void op_atl();
- void op_atfc();
- void op_atr();
-
- void op_add();
- void op_add11();
- void op_adx();
- void op_coma();
- void op_rot();
- void op_rc();
- void op_sc();
-
- void op_tb();
- void op_tc();
- void op_tam();
- void op_tmi();
- void op_ta0();
- void op_tabl();
- void op_tis();
- void op_tal();
- void op_tf1();
- void op_tf4();
-
- void op_rm();
- void op_sm();
-
- void op_pre();
- void op_sme();
- void op_rme();
- void op_tmel();
-
- void op_skip();
- void op_cend();
- void op_idiv();
- void op_dr();
- void op_dta();
+ virtual void op_lb();
+ virtual void op_lbl();
+ virtual void op_sbm();
+ virtual void op_exbla();
+ virtual void op_incb();
+ virtual void op_decb();
+
+ virtual void op_atpl();
+ virtual void op_rtn0();
+ virtual void op_rtn1();
+ virtual void op_tl();
+ virtual void op_tml();
+ virtual void op_tm();
+ virtual void op_t();
+
+ virtual void op_exc();
+ virtual void op_bdc();
+ virtual void op_exci();
+ virtual void op_excd();
+ virtual void op_lda();
+ virtual void op_lax();
+ virtual void op_ptw();
+ virtual void op_wr();
+ virtual void op_ws();
+
+ virtual void op_kta();
+ virtual void op_atbp();
+ virtual void op_atx();
+ virtual void op_atl();
+ virtual void op_atfc();
+ virtual void op_atr();
+
+ virtual void op_add();
+ virtual void op_add11();
+ virtual void op_adx();
+ virtual void op_coma();
+ virtual void op_rot();
+ virtual void op_rc();
+ virtual void op_sc();
+
+ virtual void op_tb();
+ virtual void op_tc();
+ virtual void op_tam();
+ virtual void op_tmi();
+ virtual void op_ta0();
+ virtual void op_tabl();
+ virtual void op_tis();
+ virtual void op_tal();
+ virtual void op_tf1();
+ virtual void op_tf4();
+
+ virtual void op_rm();
+ virtual void op_sm();
+
+ virtual void op_pre();
+ virtual void op_sme();
+ virtual void op_rme();
+ virtual void op_tmel();
+
+ virtual void op_skip();
+ virtual void op_cend();
+ virtual void op_idiv();
+ virtual void op_dr();
+ virtual void op_dta();
void op_illegal();
};
diff --git a/src/devices/cpu/sm510/sm510core.cpp b/src/devices/cpu/sm510/sm510core.cpp
index bf1449804c3..a871276c3a1 100644
--- a/src/devices/cpu/sm510/sm510core.cpp
+++ b/src/devices/cpu/sm510/sm510core.cpp
@@ -133,4 +133,7 @@ void sm510_device::execute_one()
break; // 0xfc
} // big switch
+
+ // BM high bit is only valid for 1 step
+ m_sbm = (m_op == 0x02);
}
diff --git a/src/devices/cpu/sm510/sm510d.cpp b/src/devices/cpu/sm510/sm510d.cpp
index 2ab48984ee0..7c78c33b318 100644
--- a/src/devices/cpu/sm510/sm510d.cpp
+++ b/src/devices/cpu/sm510/sm510d.cpp
@@ -2,7 +2,7 @@
// copyright-holders:hap
/*
- Sharp SM510 MCU family disassembler
+ Sharp SM510/SM500 MCU family disassembler
*/
@@ -15,7 +15,8 @@
enum e_mnemonics
{
- mILL, mEXT,
+ // SM510 common
+ mILL /* 0! */, mEXT,
mLB, mLBL, mSBM, mEXBLA, mINCB, mDECB,
mATPL, mRTN0, mRTN1, mTL, mTML, mTM, mT,
mEXC, mBDC, mEXCI, mEXCD, mLDA, mLAX, mPTW, mWR, mWS,
@@ -24,7 +25,20 @@ enum e_mnemonics
mTB, mTC, mTAM, mTMI, mTA0, mTABL, mTIS, mTAL, mTF1, mTF4,
mRM, mSM,
mPRE, mSME, mRME, mTMEL,
- mSKIP, mCEND, mIDIV
+ mSKIP, mCEND, mIDIV, mDR, mDTA,
+
+ // SM500-specific
+ mCOMCB, mRTN, mRTNS, mSSR, mTR, mTRS,
+ mADDC, mPDTW, mTW, mDTW,
+ mATS, mEXKSA, mEXKFA,
+ mRMF, mSMF, mCOMCN,
+ mTA, mTM2, mTG,
+
+ // KB1013VK1-2 aliases
+ mLC, mLM, mLE, mLAF, mLAS, mLDF, mBS0, mBS1, mXL, mXM, mXI, mXEI, mXD, mXED, mXE, mBM0, mBM1, mSM1,
+ mAM, mAC, mA10, mAS, mCLL, mCOM, mCLC, mSTC, mSCO, mSAO, mINC, mDEC, mSAM, mSAL, mNOP,
+ mICD, mOAR, mOA0, mOA1, mDAF, mDAS, mABS, mABF, mCTB, mLD0, mEN,
+ mBR, mLP, mCBR, mCMS, mRT, mRTS, mSI1, mSI0, mSYN, mTIM, mHLT
};
static const char *const s_mnemonics[] =
@@ -38,7 +52,20 @@ static const char *const s_mnemonics[] =
"TB", "TC", "TAM", "TMI", "TA0", "TABL", "TIS", "TAL", "TF1", "TF4",
"RM", "SM",
"PRE", "SME", "RME", "TMEL",
- "SKIP", "CEND", "IDIV"
+ "SKIP", "CEND", "IDIV", "DR", "DTA",
+
+ //
+ "COMCB", "RTN", "RTNS", "SSR", "TR", "TRS",
+ "ADDC", "PDTW", "TW", "DTW",
+ "ATS", "EXKSA", "EXKFA",
+ "RMF", "SMF", "COMCN",
+ "TA", "TM", "TG"
+
+ //
+ "LC", "LM", "LE", "LAF", "LAS", "LDF", "BS0", "BS1", "XL", "XM", "XI", "XEI", "XD", "XED", "XE", "BM0", "BM1", "SM1",
+ "AM", "AC", "A10", "AS", "CLL", "COM", "CLC", "STC", "SCO", "SAO", "INC", "DEC", "SAM", "SAL", "NOP",
+ "ICD", "OAR", "OA0", "OA1", "DAF", "DAS", "ABS", "ABF", "CTB", "LD0", "EN",
+ "BR", "LP", "CBR", "CMS", "RT", "RTS", "SI1", "SI0", "SYN", "TIM", "HLT"
};
// number of bits per opcode parameter, 8 or larger means 2-byte opcode
@@ -53,7 +80,20 @@ static const UINT8 s_bits[] =
0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
2, 2,
8, 0, 0, 0,
- 0, 0, 0
+ 0, 0, 0, 0, 0,
+
+ //
+ 0, 0, 0, 4, 6, 6,
+ 0, 0, 0, 0,
+ 0, 0, 0,
+ 0, 0, 0,
+ 0, 2, 0,
+
+ //
+ 4, 0, 2, 8, 4, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 2, 2,
+ 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 6, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0
};
#define _OVER DASMFLAG_STEP_OVER
@@ -70,7 +110,20 @@ static const UINT32 s_flags[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
0, 0, 0, 0,
- 0, _OVER, 0
+ 0, _OVER, 0, 0, 0,
+
+ //
+ 0, _OUT, _OUT, 0, 0, _OVER,
+ 0, 0, 0, 0,
+ 0, 0, 0,
+ 0, 0, 0,
+ 0, 0, 0,
+
+ //
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, _OVER, 0, _OUT, _OUT, 0, 0, 0, 0, _OVER
};
// next program counter in sequence (relative)
@@ -178,14 +231,14 @@ CPU_DISASSEMBLE(sm510)
static const UINT8 sm511_mnemonic[0x100] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
- mROT, 0, mSBM, mATPL, mRM, mRM, mRM, mRM, mADD, mADD11,mCOMA, mEXBLA,mSM, mSM, mSM, mSM, // 0
+ mROT, mDTA, mSBM, mATPL, mRM, mRM, mRM, mRM, mADD, mADD11,mCOMA, mEXBLA,mSM, mSM, mSM, mSM, // 0
mEXC, mEXC, mEXC, mEXC, mEXCI, mEXCI, mEXCI, mEXCI, mLDA, mLDA, mLDA, mLDA, mEXCD, mEXCD, mEXCD, mEXCD, // 1
mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, // 2
mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, // 3
mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, // 4
- mKTA, mTB, mTC, mTAM, mTMI, mTMI, mTMI, mTMI, mTIS, mATL, mTA0, mTABL, mATX, 0, mTAL, mLBL, // 5
- mEXT, mPRE, mWR, mWS, mINCB, 0, mRC, mSC, mTML, mTML, mTML, mTML, mDECB, mPTW, mRTN0, mRTN1, // 6
+ mKTA, mTB, mTC, mTAM, mTMI, mTMI, mTMI, mTMI, mTIS, mATL, mTA0, mTABL, mATX, mCEND, mTAL, mLBL, // 5
+ mEXT, mPRE, mWR, mWS, mINCB, mDR, mRC, mSC, mTML, mTML, mTML, mTML, mDECB, mPTW, mRTN0, mRTN1, // 6
mTL, mTL, mTL, mTL, mTL, mTL, mTL, mTL, mTL, mTL, mTL, mTL, mTL, mTL, mTL, mTL, // 7
mT, mT, mT, mT, mT, mT, mT, mT, mT, mT, mT, mT, mT, mT, mT, mT, // 8
@@ -201,7 +254,7 @@ static const UINT8 sm511_mnemonic[0x100] =
static const UINT8 sm511_extended[0x10] =
{
- mRME, mSME, mTMEL, mATFC, mBDC, mATBP, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60 3
+ mRME, mSME, mTMEL, mATFC, mBDC, mATBP, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 60 3
};
CPU_DISASSEMBLE(sm511)
@@ -213,3 +266,87 @@ CPU_DISASSEMBLE(sm511)
return sm510_common_disasm(sm511_mnemonic, ext, buffer, pc, oprom, opram);
}
+
+
+// SM500 disasm
+
+static const UINT8 sm500_mnemonic[0x100] =
+{
+/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+ mSKIP, mATR, mEXKSA,mATBP, mRM, mRM, mRM, mRM, mADD, mADDC, mCOMA, mEXBLA,mSM, mSM, mSM, mSM, // 0
+ mEXC, mEXC, mEXC, mEXC, mEXCI, mEXCI, mEXCI, mEXCI, mLDA, mLDA, mLDA, mLDA, mEXCD, mEXCD, mEXCD, mEXCD, // 1
+ mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, mLAX, // 2
+ mATS, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, mADX, // 3
+
+ mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, mLB, // 4
+ mTA, mTB, mTC, mTAM, mTM2, mTM2, mTM2, mTM2, mTG, mPTW, mTA0, mTABL, mTW, mDTW, mEXT, mLBL, // 5
+ mCOMCN,mPDTW, mWR, mWS, mINCB, mIDIV, mRC, mSC, mRMF, mSMF, mKTA, mEXKFA,mDECB, mCOMCB,mRTN, mRTNS, // 6
+ mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, mSSR, // 7
+
+ mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, // 8
+ mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, // 9
+ mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, // A
+ mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, mTR, // B
+
+ mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, // C
+ mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, // D
+ mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, // E
+ mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS // F
+};
+
+static const UINT8 sm500_extended[0x10] =
+{
+ mCEND, 0, 0, 0, mDTA, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 5E 0
+};
+
+CPU_DISASSEMBLE(sm500)
+{
+ // create extended opcode table
+ UINT8 ext[0x100];
+ memset(ext, 0, 0x100);
+ memcpy(ext + 0x00, sm500_extended, 0x10);
+
+ return sm510_common_disasm(sm500_mnemonic, ext, buffer, pc, oprom, opram);
+}
+
+
+// KB1013VK1-2 disasm
+
+static const UINT8 kb1013vk12_mnemonic[0x100] =
+{
+/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+ mNOP, mOAR, mBS1, mEN, mBM0, mBM0, mBM0, mBM0, mAM, mAC, mCOM, mXL, mBM1, mBM1, mBM1, mBM1, // 0
+ mXM, mXE, mXE, mXE, mXI, mXEI, mXEI, mXEI, mLE, mLE, mLE, mLDA, mXD, mXED, mXED, mXED, // 1
+ mLC, mLC, mLC, mLC, mLC, mLC, mLC, mLC, mLC, mLC, mLC, mLC, mLC, mLC, mLC, mLC, // 2
+ mAS, mAS, mAS, mAS, mAS, mAS, mAS, mAS, mAS, mAS, mA10, mAS, mAS, mAS, mAS, mAS, // 3
+
+ mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, mLAS, // 4
+ mSI1, mSI0, mSCO, mSAM, mSM1, mSM1, mSM1, mSM1, mTIM, mABS, mSAO, mSAL, mABF, mDAF, mEXT, mLAF, // 5
+ mCTB, mDAS, mOA1, mOA0, mINC, mSYN, mCLC, mSTC, mCLL, mLD0, mICD, mBS0, mDEC, mCMS, mRT, mRTS, // 6
+ mLP, mLP, mLP, mLP, mLP, mLP, mLP, mLP, mLP, mLP, mLP, mLP, mLP, mLP, mLP, mLP, // 7
+
+ mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, // 8
+ mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, // 9
+ mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, // A
+ mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, // B
+
+ mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, // C
+ mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, // D
+ mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, // E
+ mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR // F
+};
+
+static const UINT8 kb1013vk12_extended[0x10] =
+{
+ mHLT, 0, 0, 0, mLDF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 5E 0
+};
+
+CPU_DISASSEMBLE(kb1013vk12)
+{
+ // create extended opcode table
+ UINT8 ext[0x100];
+ memset(ext, 0, 0x100);
+ memcpy(ext + 0x00, kb1013vk12_extended, 0x10);
+
+ return sm510_common_disasm(kb1013vk12_mnemonic, ext, buffer, pc, oprom, opram);
+}
diff --git a/src/devices/cpu/sm510/sm510op.cpp b/src/devices/cpu/sm510/sm510op.cpp
index 05ba90522e4..682aacf7e1b 100644
--- a/src/devices/cpu/sm510/sm510op.cpp
+++ b/src/devices/cpu/sm510/sm510op.cpp
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:hap
-// SM510 opcode handlers
+// shared opcode handlers
#include "sm510.h"
@@ -10,14 +10,14 @@
inline UINT8 sm510_base_device::ram_r()
{
- int bmh = (m_prev_op == 0x02) ? (1 << (m_datawidth-1)) : 0; // from SBM
+ int bmh = (m_sbm) ? (1 << (m_datawidth-1)) : 0; // from SBM
UINT8 address = (bmh | m_bm << 4 | m_bl) & m_datamask;
return m_data->read_byte(address) & 0xf;
}
inline void sm510_base_device::ram_w(UINT8 data)
{
- int bmh = (m_prev_op == 0x02) ? (1 << (m_datawidth-1)) : 0; // from SBM
+ int bmh = (m_sbm) ? (1 << (m_datawidth-1)) : 0; // from SBM
UINT8 address = (bmh | m_bm << 4 | m_bl) & m_datamask;
m_data->write_byte(address, data & 0xf);
}
@@ -68,8 +68,8 @@ void sm510_base_device::op_lb()
switch (m_bl)
{
case 0: hi = 0; break;
- case 1: hi = 0; break;
- case 2: hi = 0; break;
+ case 1: hi = 3; break;
+ case 2: hi = 3; break;
case 3: hi = 3; break;
}
m_bl |= (hi << 2 & 0xc);
@@ -84,8 +84,7 @@ void sm510_base_device::op_lbl()
void sm510_base_device::op_sbm()
{
- // SBM: set BM high bit for next opcode - handled in ram_r/w
- assert(m_op == 0x02);
+ // SBM: set BM high bit for next opcode - handled in execute_one()
}
void sm510_base_device::op_exbla()
@@ -290,9 +289,9 @@ void sm510_base_device::op_add11()
void sm510_base_device::op_adx()
{
- // ADX x: add immediate value to ACC, skip next on carry
+ // ADX x: add immediate value to ACC, skip next on carry except if x = 10
m_acc += (m_op & 0xf);
- m_skip = ((m_acc & 0x10) != 0);
+ m_skip = ((m_op & 0xf) != 10 && (m_acc & 0x10) != 0);
m_acc &= 0xf;
}
@@ -459,7 +458,7 @@ void sm510_base_device::op_dr()
void sm510_base_device::op_dta()
{
// DTA: transfer divider low 4 bits to ACC
- m_acc = BITSWAP16(m_div,0,0,0,0, 0,0,0,0, 0,0,0,0, 14,13,12,11) & 0xf;
+ m_acc = m_div >> 11 & 0xf;
}
void sm510_base_device::op_illegal()
diff --git a/src/devices/cpu/sm510/sm511core.cpp b/src/devices/cpu/sm510/sm511core.cpp
index 956c73936e0..e98374f5905 100644
--- a/src/devices/cpu/sm510/sm511core.cpp
+++ b/src/devices/cpu/sm510/sm511core.cpp
@@ -159,4 +159,7 @@ void sm511_device::execute_one()
break; // 0xfc
} // big switch
+
+ // BM high bit is only valid for 1 step
+ m_sbm = (m_op == 0x02);
}
diff --git a/src/devices/cpu/uml.cpp b/src/devices/cpu/uml.cpp
index 07d5de9b57f..466c47aeda4 100644
--- a/src/devices/cpu/uml.cpp
+++ b/src/devices/cpu/uml.cpp
@@ -22,9 +22,6 @@
* Support for FPU exceptions
* New instructions?
- - FCOPYI, ICOPYF
- copy raw between float and integer registers
-
- VALID opcode_desc,handle,param
checksum/compare code referenced by opcode_desc; if not
matching, generate exception with handle,param
@@ -214,6 +211,8 @@ const opcode_info instruction::s_opcode_info_table[OP_MAX] =
OPINFO2(FSQRT, "f#sqrt", 4|8, false, NONE, NONE, ALL, PINFO(OUT, OP, FRM), PINFO(IN, OP, FANY))
OPINFO2(FRECIP, "f#recip", 4|8, false, NONE, NONE, ALL, PINFO(OUT, OP, FRM), PINFO(IN, OP, FANY))
OPINFO2(FRSQRT, "f#rsqrt", 4|8, false, NONE, NONE, ALL, PINFO(OUT, OP, FRM), PINFO(IN, OP, FANY))
+ OPINFO2(FCOPYI, "f#copyi", 4|8, false, NONE, NONE, NONE, PINFO(OUT, OP, FRM), PINFO(IN, OP, IRM))
+ OPINFO2(ICOPYF, "icopyf#", 4|8, false, NONE, NONE, NONE, PINFO(OUT, OP, IRM), PINFO(IN, OP, FRM))
};
@@ -870,11 +869,19 @@ std::string uml::instruction::disasm(drcuml_state *drcuml) const
std::ostringstream buffer;
for (const char *opsrc = opinfo.mnemonic; *opsrc != 0; opsrc++)
if (*opsrc == '!')
- util::stream_format(buffer, "%-8s", bang_size[m_size]);
+ util::stream_format(buffer, "%s", bang_size[m_size]);
else if (*opsrc == '#')
- util::stream_format(buffer, "%-8s", pound_size[m_size]);
+ util::stream_format(buffer, "%s", pound_size[m_size]);
else
- util::stream_format(buffer, "%-8c", *opsrc);
+ util::stream_format(buffer, "%c", *opsrc);
+
+ // pad to 8 spaces
+ int pad = 8 - buffer.tellp();
+ while (pad > 0)
+ {
+ buffer.put(' ');
+ pad--;
+ }
// iterate through parameters
for (int pnum = 0; pnum < m_numparams; pnum++)
diff --git a/src/devices/cpu/uml.h b/src/devices/cpu/uml.h
index 2dfd95adbea..5b390700ced 100644
--- a/src/devices/cpu/uml.h
+++ b/src/devices/cpu/uml.h
@@ -218,6 +218,8 @@ namespace uml
OP_FSQRT, // FSQRT dst,src1
OP_FRECIP, // FRECIP dst,src1
OP_FRSQRT, // FRSQRT dst,src1
+ OP_FCOPYI, // FCOPYI dst,src
+ OP_ICOPYF, // ICOPYF dst,src
OP_MAX
};
@@ -544,6 +546,8 @@ namespace uml
void fssqrt(parameter dst, parameter src1) { configure(OP_FSQRT, 4, dst, src1); }
void fsrecip(parameter dst, parameter src1) { configure(OP_FRECIP, 4, dst, src1); }
void fsrsqrt(parameter dst, parameter src1) { configure(OP_FRSQRT, 4, dst, src1); }
+ void fscopyi(parameter dst, parameter src) { configure(OP_FCOPYI, 4, dst, src); }
+ void icopyfs(parameter dst, parameter src) { configure(OP_ICOPYF, 4, dst, src); }
// 64-bit floating point operations
void fdload(parameter dst, const void *base, parameter index) { configure(OP_FLOAD, 8, dst, parameter::make_memory(base), index); }
@@ -566,6 +570,8 @@ namespace uml
void fdsqrt(parameter dst, parameter src1) { configure(OP_FSQRT, 8, dst, src1); }
void fdrecip(parameter dst, parameter src1) { configure(OP_FRECIP, 8, dst, src1); }
void fdrsqrt(parameter dst, parameter src1) { configure(OP_FRSQRT, 8, dst, src1); }
+ void fdcopyi(parameter dst, parameter src) { configure(OP_FCOPYI, 8, dst, src); }
+ void icopyfd(parameter dst, parameter src) { configure(OP_ICOPYF, 8, dst, src); }
// constants
static const int MAX_PARAMS = 4;
diff --git a/src/devices/cpu/x86emit.h b/src/devices/cpu/x86emit.h
index 45e1c456737..d9ac810c905 100644
--- a/src/devices/cpu/x86emit.h
+++ b/src/devices/cpu/x86emit.h
@@ -1273,6 +1273,11 @@ inline void emit_op(x86code *&emitptr, UINT32 op, UINT8 opsize, UINT8 reg, UINT8
if (opsize == OP_16BIT)
emit_byte(emitptr, PREFIX_OPSIZE);
+ bool has_prefix = (op & 0xff0000) == 0x660000 || (op & 0xff0000) == 0xf20000 || (op & 0xff0000) == 0xf30000;
+
+ if (has_prefix)
+ emit_byte(emitptr, op >> 16);
+
#if (X86EMIT_SIZE == 64)
{
UINT8 rex;
@@ -1287,7 +1292,7 @@ inline void emit_op(x86code *&emitptr, UINT32 op, UINT8 opsize, UINT8 reg, UINT8
assert(opsize != OP_64BIT);
#endif
- if ((op & 0xff0000) != 0)
+ if ((op & 0xff0000) != 0 && !has_prefix)
emit_byte(emitptr, op >> 16);
if ((op & 0xff00) != 0)
emit_byte(emitptr, op >> 8);
diff --git a/src/devices/machine/at28c16.cpp b/src/devices/machine/at28c16.cpp
index 9461850043d..f54e28f8bda 100644
--- a/src/devices/machine/at28c16.cpp
+++ b/src/devices/machine/at28c16.cpp
@@ -45,7 +45,8 @@ at28c16_device::at28c16_device( const machine_config &mconfig, const char *tag,
device_nvram_interface(mconfig, *this),
m_a9_12v( 0 ),
m_oe_12v( 0 ),
- m_last_write( -1 )
+ m_last_write( -1 ),
+ m_default_data(*this, DEVICE_SELF, AT28C16_DATA_BYTES)
{
}
@@ -116,26 +117,14 @@ void at28c16_device::nvram_default()
UINT16 default_value = 0xff;
for( offs_t offs = 0; offs < AT28C16_TOTAL_BYTES; offs++ )
{
- m_addrspace[ 0 ]->write_byte( offs, default_value );
+ space(AS_PROGRAM).write_byte( offs, default_value );
}
/* populate from a memory region if present */
- if( m_region != nullptr )
+ if (m_default_data.found())
{
- if( m_region->bytes() != AT28C16_DATA_BYTES )
- {
- fatalerror( "at28c16 region '%s' wrong size (expected size = 0x%X)\n", tag(), AT28C16_DATA_BYTES );
- }
-
- if( m_region->bytewidth() != 1 )
- {
- fatalerror( "at28c16 region '%s' needs to be an 8-bit region\n", tag() );
- }
-
- UINT8 *default_data = m_region->base();
-
for( offs_t offs = 0; offs < AT28C16_DATA_BYTES; offs++ )
- m_addrspace[ 0 ]->write_byte( offs, default_data[offs] );
+ space(AS_PROGRAM).write_byte(offs, m_default_data[offs]);
}
}
@@ -153,7 +142,7 @@ void at28c16_device::nvram_read( emu_file &file )
for( offs_t offs = 0; offs < AT28C16_TOTAL_BYTES; offs++ )
{
- m_addrspace[ 0 ]->write_byte( offs, buffer[ offs ] );
+ space(AS_PROGRAM).write_byte( offs, buffer[ offs ] );
}
}
@@ -168,7 +157,7 @@ void at28c16_device::nvram_write( emu_file &file )
for( offs_t offs = 0; offs < AT28C16_TOTAL_BYTES; offs++ )
{
- buffer[ offs ] = m_addrspace[ 0 ]->read_byte( offs );
+ buffer[ offs ] = space(AS_PROGRAM).read_byte( offs );
}
file.write( &buffer[0], AT28C16_TOTAL_BYTES );
@@ -193,7 +182,7 @@ WRITE8_MEMBER( at28c16_device::write )
{
for( offs_t offs = 0; offs < AT28C16_TOTAL_BYTES; offs++ )
{
- m_addrspace[ 0 ]->write_byte( offs, 0xff );
+ this->space(AS_PROGRAM).write_byte( offs, 0xff );
}
m_last_write = 0xff;
@@ -208,9 +197,9 @@ WRITE8_MEMBER( at28c16_device::write )
}
// logerror( "%s: AT28C16: write( %04x, %02x )\n", machine.describe_context(), offset, data );
- if( m_last_write < 0 && m_addrspace[ 0 ]->read_byte( offset ) != data )
+ if( m_last_write < 0 && this->space(AS_PROGRAM).read_byte( offset ) != data )
{
- m_addrspace[ 0 ]->write_byte( offset, data );
+ this->space(AS_PROGRAM).write_byte( offset, data );
m_last_write = data;
m_write_timer->adjust( attotime::from_usec( 200 ) );
}
@@ -233,7 +222,7 @@ READ8_MEMBER( at28c16_device::read )
offset += AT28C16_ID_BYTES;
}
- UINT8 data = m_addrspace[ 0 ]->read_byte( offset );
+ UINT8 data = this->space(AS_PROGRAM).read_byte( offset );
// logerror( "%s: AT28C16: read( %04x ) data %02x\n", machine.describe_context(), offset, data );
return data;
}
diff --git a/src/devices/machine/at28c16.h b/src/devices/machine/at28c16.h
index 5cc51cf9078..c33f92785e8 100644
--- a/src/devices/machine/at28c16.h
+++ b/src/devices/machine/at28c16.h
@@ -65,6 +65,7 @@ protected:
int m_a9_12v;
int m_oe_12v;
int m_last_write;
+ optional_region_ptr<UINT8> m_default_data;
};
diff --git a/src/devices/machine/at45dbxx.cpp b/src/devices/machine/at45dbxx.cpp
index e61fcca498a..8b127986679 100644
--- a/src/devices/machine/at45dbxx.cpp
+++ b/src/devices/machine/at45dbxx.cpp
@@ -144,13 +144,14 @@ void at45db041_device::nvram_default()
{
memset(&m_data[0], 0xff, m_data.size());
- if (region() != nullptr)
+ memory_region *region = memregion(DEVICE_SELF);
+ if (region != nullptr)
{
- UINT32 bytes = region()->bytes();
+ UINT32 bytes = region->bytes();
if (bytes > m_size)
bytes = m_size;
- memcpy(&m_data[0], region()->base(), bytes);
+ memcpy(&m_data[0], region->base(), bytes);
}
}
diff --git a/src/devices/machine/ds1204.cpp b/src/devices/machine/ds1204.cpp
index 72029b2aecc..56d57267ad3 100644
--- a/src/devices/machine/ds1204.cpp
+++ b/src/devices/machine/ds1204.cpp
@@ -32,6 +32,7 @@ const device_type DS1204 = &device_creator<ds1204_device>;
ds1204_device::ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
: device_t( mconfig, DS1204, "DS1204", tag, owner, clock, "ds1204", __FILE__ ),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_rst( 0 ),
m_clk( 0 ),
m_dqw( 0 ), m_dqr(0), m_state(0), m_bit(0)
@@ -69,7 +70,7 @@ void ds1204_device::nvram_default()
int expected_bytes = sizeof( m_unique_pattern ) + sizeof( m_identification ) + sizeof( m_security_match ) + sizeof( m_secure_memory );
- if( !m_region )
+ if (!m_region.found())
{
logerror( "ds1204(%s) region not found\n", tag() );
}
diff --git a/src/devices/machine/ds1204.h b/src/devices/machine/ds1204.h
index 42b68de7538..35e84c7771f 100644
--- a/src/devices/machine/ds1204.h
+++ b/src/devices/machine/ds1204.h
@@ -72,6 +72,8 @@ private:
static const int DQ_HIGH_IMPEDANCE = -1;
+ optional_memory_region m_region;
+
int m_rst;
int m_clk;
int m_dqw;
diff --git a/src/devices/machine/ds2401.cpp b/src/devices/machine/ds2401.cpp
index 7298fa888ee..7c74924404a 100644
--- a/src/devices/machine/ds2401.cpp
+++ b/src/devices/machine/ds2401.cpp
@@ -65,15 +65,16 @@ void ds2401_device::device_reset()
m_rx = true;
m_tx = true;
- if(m_region)
+ memory_region *region = memregion(DEVICE_SELF);
+ if (region != nullptr)
{
- if(m_region->bytes() == SIZE_DATA)
+ if (region->bytes() == SIZE_DATA)
{
- memcpy(m_data, m_region->base(), SIZE_DATA);
+ memcpy(m_data, region->base(), SIZE_DATA);
return;
}
- logerror("ds2401 %s: Wrong region length for id data, expected 0x%x, got 0x%x\n", tag(), SIZE_DATA, m_region->bytes());
+ logerror("ds2401 %s: Wrong region length for id data, expected 0x%x, got 0x%x\n", tag(), SIZE_DATA, region->bytes());
}
else
{
diff --git a/src/devices/machine/eeprom.cpp b/src/devices/machine/eeprom.cpp
index 042e4535918..43523c18fb1 100644
--- a/src/devices/machine/eeprom.cpp
+++ b/src/devices/machine/eeprom.cpp
@@ -48,6 +48,7 @@ eeprom_base_device::eeprom_base_device(const machine_config &mconfig, device_typ
: device_t(mconfig, devtype, name, tag, owner, 0, shortname, file),
device_memory_interface(mconfig, *this),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_cells(0),
m_address_bits(0),
m_data_bits(0),
@@ -271,9 +272,9 @@ void eeprom_base_device::nvram_default()
UINT32 default_value = m_default_value_set ? m_default_value : ~0;
for (offs_t offs = 0; offs < eeprom_length; offs++)
if (m_data_bits == 8)
- m_addrspace[0]->write_byte(offs, default_value);
+ space(AS_PROGRAM).write_byte(offs, default_value);
else
- m_addrspace[0]->write_word(offs * 2, default_value);
+ space(AS_PROGRAM).write_word(offs * 2, default_value);
// handle hard-coded data from the driver
if (m_default_data.u8 != nullptr)
@@ -282,14 +283,14 @@ void eeprom_base_device::nvram_default()
for (offs_t offs = 0; offs < m_default_data_size; offs++)
{
if (m_data_bits == 8)
- m_addrspace[0]->write_byte(offs, m_default_data.u8[offs]);
+ space(AS_PROGRAM).write_byte(offs, m_default_data.u8[offs]);
else
- m_addrspace[0]->write_word(offs * 2, m_default_data.u16[offs]);
+ space(AS_PROGRAM).write_word(offs * 2, m_default_data.u16[offs]);
}
}
// populate from a memory region if present
- if (m_region != nullptr)
+ if (m_region.found())
{
if (m_region->bytes() != eeprom_bytes)
fatalerror("eeprom region '%s' wrong size (expected size = 0x%X)\n", tag(), eeprom_bytes);
@@ -303,13 +304,13 @@ void eeprom_base_device::nvram_default()
{
UINT8 *default_data = m_region->base();
for (offs_t offs = 0; offs < eeprom_length; offs++)
- m_addrspace[0]->write_byte(offs, default_data[offs]);
+ space(AS_PROGRAM).write_byte(offs, default_data[offs]);
}
else
{
UINT16 *default_data = (UINT16 *)(m_region->base());
for (offs_t offs = 0; offs < eeprom_length; offs++)
- m_addrspace[0]->write_word(offs * 2, default_data[offs]);
+ space(AS_PROGRAM).write_word(offs * 2, default_data[offs]);
}
}
}
@@ -328,7 +329,7 @@ void eeprom_base_device::nvram_read(emu_file &file)
dynamic_buffer buffer(eeprom_bytes);
file.read(&buffer[0], eeprom_bytes);
for (offs_t offs = 0; offs < eeprom_bytes; offs++)
- m_addrspace[0]->write_byte(offs, buffer[offs]);
+ space(AS_PROGRAM).write_byte(offs, buffer[offs]);
}
@@ -344,7 +345,7 @@ void eeprom_base_device::nvram_write(emu_file &file)
dynamic_buffer buffer(eeprom_bytes);
for (offs_t offs = 0; offs < eeprom_bytes; offs++)
- buffer[offs] = m_addrspace[0]->read_byte(offs);
+ buffer[offs] = space(AS_PROGRAM).read_byte(offs);
file.write(&buffer[0], eeprom_bytes);
}
@@ -356,9 +357,9 @@ void eeprom_base_device::nvram_write(emu_file &file)
UINT32 eeprom_base_device::internal_read(offs_t address)
{
if (m_data_bits == 16)
- return m_addrspace[0]->read_word(address * 2);
+ return space(AS_PROGRAM).read_word(address * 2);
else
- return m_addrspace[0]->read_byte(address);
+ return space(AS_PROGRAM).read_byte(address);
}
@@ -370,7 +371,7 @@ UINT32 eeprom_base_device::internal_read(offs_t address)
void eeprom_base_device::internal_write(offs_t address, UINT32 data)
{
if (m_data_bits == 16)
- m_addrspace[0]->write_word(address * 2, data);
+ space(AS_PROGRAM).write_word(address * 2, data);
else
- m_addrspace[0]->write_byte(address, data);
+ space(AS_PROGRAM).write_byte(address, data);
}
diff --git a/src/devices/machine/eeprom.h b/src/devices/machine/eeprom.h
index 23ba81cf42f..6eb802641e3 100644
--- a/src/devices/machine/eeprom.h
+++ b/src/devices/machine/eeprom.h
@@ -97,6 +97,8 @@ protected:
UINT32 internal_read(offs_t address);
void internal_write(offs_t address, UINT32 data);
+ optional_memory_region m_region;
+
// configuration state
UINT32 m_cells;
UINT8 m_address_bits;
diff --git a/src/devices/machine/er2055.cpp b/src/devices/machine/er2055.cpp
index 7c395a83b62..c0c5966b5a9 100644
--- a/src/devices/machine/er2055.cpp
+++ b/src/devices/machine/er2055.cpp
@@ -37,6 +37,7 @@ er2055_device::er2055_device(const machine_config &mconfig, const char *tag, dev
: device_t(mconfig, ER2055, "ER2055 EAROM", tag, owner, clock, "er2055", __FILE__),
device_memory_interface(mconfig, *this),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_space_config("EAROM", ENDIANNESS_BIG, 8, 6, 0, *ADDRESS_MAP_NAME(er2055_map)),
m_control_state(0),
m_address(0),
@@ -79,7 +80,7 @@ void er2055_device::nvram_default()
{
// default to all-0xff
for (int byte = 0; byte < SIZE_DATA; byte++)
- m_addrspace[0]->write_byte(byte, 0xff);
+ space(AS_PROGRAM).write_byte(byte, 0xff);
// populate from a memory region if present
if (m_region != nullptr)
@@ -91,7 +92,7 @@ void er2055_device::nvram_default()
UINT8 *default_data = m_region->base();
for (int byte = 0; byte < SIZE_DATA; byte++)
- m_addrspace[0]->write_byte(byte, default_data[byte]);
+ space(AS_PROGRAM).write_byte(byte, default_data[byte]);
}
}
@@ -106,7 +107,7 @@ void er2055_device::nvram_read(emu_file &file)
UINT8 buffer[SIZE_DATA];
file.read(buffer, sizeof(buffer));
for (int byte = 0; byte < SIZE_DATA; byte++)
- m_addrspace[0]->write_byte(byte, buffer[byte]);
+ space(AS_PROGRAM).write_byte(byte, buffer[byte]);
}
@@ -119,7 +120,7 @@ void er2055_device::nvram_write(emu_file &file)
{
UINT8 buffer[SIZE_DATA];
for (int byte = 0; byte < SIZE_DATA; byte++)
- buffer[byte] = m_addrspace[0]->read_byte(byte);
+ buffer[byte] = space(AS_PROGRAM).read_byte(byte);
file.write(buffer, sizeof(buffer));
}
@@ -155,13 +156,13 @@ void er2055_device::set_control(UINT8 cs1, UINT8 cs2, UINT8 c1, UINT8 c2, UINT8
// write mode; erasing is required, so we perform an AND against previous
// data to simulate incorrect behavior if erasing was not done
case 0:
- m_addrspace[0]->write_byte(m_address, m_addrspace[0]->read_byte(m_address) & m_data);
+ space(AS_PROGRAM).write_byte(m_address, space(AS_PROGRAM).read_byte(m_address) & m_data);
//printf("Write %02X = %02X\n", m_address, m_data);
break;
// erase mode
case C2:
- m_addrspace[0]->write_byte(m_address, 0xff);
+ space(AS_PROGRAM).write_byte(m_address, 0xff);
//printf("Erase %02X\n", m_address);
break;
@@ -169,7 +170,7 @@ void er2055_device::set_control(UINT8 cs1, UINT8 cs2, UINT8 c1, UINT8 c2, UINT8
case C1:
if ((oldstate & CK) != 0 && (m_control_state & CK) == 0)
{
- m_data = m_addrspace[0]->read_byte(m_address);
+ m_data = space(AS_PROGRAM).read_byte(m_address);
//printf("Read %02X = %02X\n", m_address, m_data);
}
break;
diff --git a/src/devices/machine/er2055.h b/src/devices/machine/er2055.h
index 900cac15b06..82ad9d2c0e9 100644
--- a/src/devices/machine/er2055.h
+++ b/src/devices/machine/er2055.h
@@ -66,6 +66,8 @@ protected:
static const UINT8 CS1 = 0x08;
static const UINT8 CS2 = 0x10;
+ optional_memory_region m_region;
+
// configuration state
address_space_config m_space_config;
diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp
index b11d55160bb..126741f3730 100644
--- a/src/devices/machine/gt64xxx.cpp
+++ b/src/devices/machine/gt64xxx.cpp
@@ -27,7 +27,8 @@ gt64xxx_device::gt64xxx_device(const machine_config &mconfig, const char *tag, d
: pci_host_device(mconfig, GT64XXX, "Galileo GT-64XXX System Controller", tag, owner, clock, "gt64xxx", __FILE__),
m_be(0), m_autoconfig(0), m_irq_num(-1),
m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32),
- m_io_config("io_space", ENDIANNESS_LITTLE, 32, 32)
+ m_io_config("io_space", ENDIANNESS_LITTLE, 32, 32),
+ m_region(*this, DEVICE_SELF)
{
}
diff --git a/src/devices/machine/gt64xxx.h b/src/devices/machine/gt64xxx.h
index e29637bae00..6653c9ca552 100644
--- a/src/devices/machine/gt64xxx.h
+++ b/src/devices/machine/gt64xxx.h
@@ -231,6 +231,8 @@ private:
address_space_config m_mem_config, m_io_config;
+ required_memory_region m_region;
+
DECLARE_ADDRESS_MAP(cpu_map, 32);
void map_cpu_space();
diff --git a/src/devices/machine/hp_taco.cpp b/src/devices/machine/hp_taco.cpp
index eb94faf3b05..d6a1fa27805 100644
--- a/src/devices/machine/hp_taco.cpp
+++ b/src/devices/machine/hp_taco.cpp
@@ -15,8 +15,9 @@
// In other words, no description of the commands that can be issued to TACO chips.
// So, my main source of information was the careful study of HP software, especially the 9845 system test ROM (09845-66520).
// The second half of this ROM holds a comprehensive set of tape drive tests.
+// Another source was the "SIF" utility tools which use a lot of peculiar command sequences.
// The main shortcomings of my approach are:
-// * I could indentify only those TACO commands that are actually used by the software. I managed
+// * I could identify only those TACO commands that are actually used by the software. I managed
// to identify 17 out of 32 possible commands. The purpose of the rest of commands is anyone's guess.
// * I could only guess the behavior of TACO chips in corner cases (especially behavior in various error/abnormal
// conditions)
@@ -27,6 +28,8 @@
// firmware listing was quite useful in identifying sequences of commands (for example how to find a specific sector etc.).
// [3] http://www.hp9845.net site
// [4] April 1978 issue of HP Journal. There is a one-page summary of TACO chip on page 20.
+// [5] HP, manual 09845-10201, apr 81 rev. - General Utility Routines. This manual describes the SIF format and related
+// utility tools.
// This is an overview of the TACO/CPU interface.
//
@@ -35,23 +38,22 @@
// R4 | R/W | Data register: words read/written to/from tape pass through this register
// R5 | R/W | Command and status register (see below)
// R6 | R/W | Tachometer register. Writing it sets a pulse counter that counts up on either tachometer pulses or IRGs, depending
-// | | on command. When the counter rolls over from 0xffff to 0 it typically ends the command. It's not clear to me
-// | | what value could be read from this register, if it's just the same value that was written last time or the internal
-// | | counter or something else entirely.
-// R7 | R | Checksum register. Reading it clears it.
+// | | on command. When the counter rolls over from 0xffff to 0 it typically ends the command.
+// | | Current counter value is returned when reading from this register.
+// R7 | R | Checksum register. Reading it clears it next time the checksum is updated.
// R7 | W | Timing register. It controls somehow the encoding and decoding of bits. For now I completely ignore it because its
// | | content it's totally unknown to me. It seems safe to do so, anyway. I can see that it's always set to 0x661d before
-// | | writing to tape and to 0x0635 before reading.
+// | | writing to tape and to 0x0635 before reading (0x061d is set by SIF utilities).
//
// Format of TACO command/status register (R5)
// Bit R/W Content
// ===============
// 15 RW Tape direction (1 = forward)
// 14..10 RW Command (see the "enum" below)
-// 9 RW ? Drive ON according to [1], the actual use seems to be selection of gap length
-// 8 RW ? Size of gaps according to [1], N/U in my opinion
+// 9 RW Automatic stopping of tape at command completion (when 1)
+// 8 RW Minimum size of gaps (1 = 1.5", 0 = 0.066")
// 7 RW Speed of tape (1 = 90 ips, 0 = 22 ips)
-// 6 RW Option bit for various commands
+// 6 RW Option bit for various commands. Most of them use it to select read threshold (0 = low, 1 = high).
// 5 R Current track (1 = B)
// 4 R Gap detected (1)
// 3 R Write protection (1)
@@ -79,19 +81,23 @@
// - 6" of final gap
// - Non-recorded tape
// - End of tape holes
-// * Sector #0 is not used
+// * Even though the tape format is not SIF (HP's own Standard Interchange Format), it is
+// clearly based on SIF itself. The whole tape content is stored according to SIF,
+// specifically it is "encapsulated" inside file #1.
+// * Sector #0 is not used. It serves as SIF "file identifier record" (i.e. it identifies
+// that the rest of tape is inside file #1 from SIF point of view).
// * Sectors #1 and #2 hold the first copy of tape directory
// * Sectors #3 and #4 hold the second/backup copy of tape directory
// * User data are stored starting from sector #5
// * There is no "fragmentation" map (like file allocation table in FAT filesystem): a file
// spanning more than 1 sector always occupy a single block of contiguous sectors.
//
-// A sector is structured like this:
+// A sector is structured like this (see description of SIF in [5], pg 655 and following):
// Word 0: Invisible preamble word (always 0). Preamble comes from 9825, don't know if it's
// actually there in TACO encoding. I assumed it is.
-// Word 1: Format/sector in use and other unidentified bits.
-// Word 2: Sector number
-// Word 3: Sector length and other bits
+// Word 1: File word: file identifier bit, empty record indicator and file number
+// Word 2: Record word: sector number and "free field pattern"
+// Word 3: Length word: bytes available and used in sector
// Word 4: Checksum (sum of words 1..3)
// Words 5..132: Payload
// Word 133: Checksum (sum of words 5..132)
@@ -101,7 +107,7 @@
// This is how 9825 encodes words on tape:
// - the unit of encoding are 16-bit words
// - each word is encoded from MSB to LSB
-// - each word has an extra invisible "1" encoded at the end
+// - each word has an extra invisible "1" encoded at the end (a kind of "stop" bit)
// - tape is read/written at slow speed only (21.98 ips)
// - a 0 is encoded with a distance between flux reversals of 1/35200 s
// (giving a maximum density of about 1600 reversals per inch)
@@ -109,9 +115,9 @@
//
// This driver is based on the following model of the actual TACO/tape system:
// * Tape immediately reaches working speed (no spin-up time)
-// * Inversion of tape direction and change of speed are immediate as well
-// * Time & distance to stop the tape are modeled, though. Firmware is upset by
-// a tape with null braking time/distance.
+// * Change of speed is immediate as well
+// * Time & distance to stop and invert direction of tape are modeled, though. Firmware is upset by
+// a tape with null braking/inversion time/distance.
// * Speed of tape is exceptionally accurate. Real tape was controlled by a closed loop
// with something like 1% accuracy on speed.
// * Storage is modeled by one "map" data structure per track. Each map maps the tape position
@@ -125,15 +131,15 @@
// validate my solutions by running the original firmware in MAME, though (no real hw at hand).
//
// TODOs/issues:
-// * Some code cleanup
-// * Handling of tape holes seems to be wrong: test "C" of test ROM only works partially
-// * Find out what is read from register R6
-// * Handle device_image_interface::call_display to show state of tape
+// * It seems like all commands expecting to read data off the tape have a kind of timeout. More
+// investigation is needed.
+// * Emulation of CMD_NOT_INDTA is not entirely ok, SIF utilities fail when using this command.
// * Find more info on TACO chips (does anyone with a working 9845 or access to internal HP docs want to
// help me here, please?)
//
#include "emu.h"
#include "hp_taco.h"
+#include "ui/ui.h"
// Debugging
#define VERBOSE 1
@@ -160,18 +166,21 @@ enum {
#define ONE_INCH_POS (TACH_TICKS_PER_INCH * TAPE_POS_FRACT) // Value in tape_pos_t representing 1 inch of tape
#define TACH_FREQ_SLOW 21276 // Tachometer pulse frequency for slow speed (21.98 ips)
#define TACH_FREQ_FAST 87196 // Tachometer pulse frequency for fast speed (90.08 ips)
+#define TACH_FREQ_BRAKE_SLOW 11606 // Tachometer pulse frequency when stopping from slow speed (11.99 ips)
+#define TACH_FREQ_BRAKE_FAST 44566 // Tachometer pulse frequency when stopping from fast speed (46.04 ips)
#define TAPE_LENGTH ((140 * 12 + 72 * 2) * ONE_INCH_POS) // Tape length: 140 ft of usable tape + 72" of punched tape at either end
#define TAPE_INIT_POS (80 * ONE_INCH_POS) // Initial tape position: 80" from beginning (just past the punched part)
#define ZERO_BIT_LEN 619 // Length of 0 bits at slow tape speed: 1/(35200 Hz)
#define ONE_BIT_LEN 1083 // Length of 1 bits at slow tape speed: 1.75 times ZERO_BIT_LEN
-#define QUICK_CMD_USEC 25 // usec for "quick" command execution
-#define FAST_BRAKE_MSEC 73 // Braking time from fast speed to stop (2 ips) in msec (deceleration is 1200 in/s^2)
-#define SLOW_BRAKE_MSEC 17 // Braking time from slow speed to stop in msec
+#define QUICK_CMD_USEC 25 // usec for "quick" command execution (totally made up)
#define FAST_BRAKE_DIST 3350450 // Braking distance at fast speed (~3.38 in)
#define SLOW_BRAKE_DIST 197883 // Braking distance at slow speed (~0.2 in)
#define PREAMBLE_WORD 0 // Value of preamble word
#define END_GAP_LENGTH (6 * ONE_INCH_POS) // Length of final gap: 6"
-#define MIN_IRG_LENGTH ((tape_pos_t)(0.2 * ONE_INCH_POS)) // Minimum length of IRGs: 0.2" (from 9825, not sure about value in TACO)
+// Minimum gap lengths are probably counted from tacho pulses in real TACO: short gaps could be equal to 64 pulses and long ones
+// to 1472 (23 * 64)
+#define SHORT_GAP_LENGTH ((tape_pos_t)(0.066 * ONE_INCH_POS)) // Minimum length of short gaps: 0.066" ([1], pg 8-10)
+#define LONG_GAP_LENGTH ((tape_pos_t)(1.5 * ONE_INCH_POS)) // Minimum length of long gaps: 1.5" ([1], pg 8-10)
#define NULL_TAPE_POS ((tape_pos_t)-1) // Special value for invalid/unknown tape position
#define NO_DATA_GAP (17 * ONE_BIT_LEN) // Minimum gap size to detect end of data: length of longest word (0xffff)
#define FILE_MAGIC 0x4f434154 // Magic value at start of image file: "TACO"
@@ -180,50 +189,52 @@ enum {
#define CMD_CODE(reg) \
(((reg) >> 10) & 0x1f)
#define DIR_FWD(reg) \
- (BIT(reg , 15))
+ (BIT(reg , 15))
+#define AUTO_STOP(reg) \
+ (BIT(reg , 9))
+#define LONG_GAP(reg) \
+ (BIT(reg , 8))
#define SPEED_FAST(reg) \
(BIT(reg , 7))
#define CMD_OPT(reg) \
- (BIT(reg , 6))
-#define UNKNOWN_B9(reg) \
- (BIT(reg , 9))
+ (BIT(reg , 6))
#define DIR_FWD_MASK BIT_MASK(15) // Direction = forward
#define SPEED_FAST_MASK BIT_MASK(7) // Speed = fast
// Commands
enum {
- CMD_INDTA_INGAP, // 00: scan for data first then for gap
- CMD_UNK_01, // 01: unknown
- CMD_FINAL_GAP, // 02: write final gap
- CMD_INIT_WRITE, // 03: write words for tape formatting
- CMD_STOP, // 04: stop
- CMD_UNK_05, // 05: unknown
- CMD_SET_TRACK, // 06: set A/B track
- CMD_UNK_07, // 07: unknown
- CMD_UNK_08, // 08: unknown
- CMD_UNK_09, // 09: unknown
- CMD_MOVE, // 0a: move tape
- CMD_UNK_0b, // 0b: unknown
- CMD_INGAP_MOVE, // 0c: scan for gap then move a bit further (used to gain some margin when inverting tape movement)
- CMD_UNK_0d, // 0d: unknown
- CMD_CLEAR, // 0e: clear errors/unlatch status bits
- CMD_UNK_0f, // 0f: unknown
- CMD_NOT_INDTA, // 10: scan for end of data
- CMD_UNK_11, // 11: unknown
- CMD_UNK_12, // 12: unknown
- CMD_UNK_13, // 13: unknown
- CMD_UNK_14, // 14: unknown
- CMD_UNK_15, // 15: unknown
- CMD_WRITE_IRG, // 16: write inter-record gap
- CMD_UNK_17, // 17: unknown
- CMD_SCAN_RECORDS, // 18: scan records (count IRGs)
- CMD_RECORD_WRITE, // 19: write record words
- CMD_MOVE_INDTA, // 1a: move then scan for data
- CMD_UNK_1b, // 1b: unknown (for now it seems harmless to handle it as NOP)
- CMD_DELTA_MOVE_HOLE, // 1c: move tape a given distance, intr at end or first hole found (whichever comes first)
- CMD_START_READ, // 1d: start record reading
- CMD_DELTA_MOVE_IRG, // 1e: move tape a given distance, detect gaps in parallel
- CMD_END_READ // 1f: stop reading
+ CMD_INDTA_INGAP, // 00: scan for data first then for gap
+ CMD_UNK_01, // 01: unknown
+ CMD_FINAL_GAP, // 02: write final gap
+ CMD_INIT_WRITE, // 03: write words for tape formatting
+ CMD_STOP, // 04: stop
+ CMD_UNK_05, // 05: unknown
+ CMD_SET_TRACK, // 06: set A/B track
+ CMD_UNK_07, // 07: unknown
+ CMD_UNK_08, // 08: unknown
+ CMD_UNK_09, // 09: unknown
+ CMD_MOVE, // 0a: move tape
+ CMD_UNK_0b, // 0b: unknown
+ CMD_INGAP_MOVE, // 0c: scan for gap then move a bit further (used to gain some margin when inverting tape movement)
+ CMD_UNK_0d, // 0d: unknown
+ CMD_CLEAR, // 0e: clear errors/unlatch status bits
+ CMD_UNK_0f, // 0f: unknown
+ CMD_NOT_INDTA, // 10: scan for end of data
+ CMD_UNK_11, // 11: unknown
+ CMD_UNK_12, // 12: unknown
+ CMD_UNK_13, // 13: unknown
+ CMD_UNK_14, // 14: unknown
+ CMD_UNK_15, // 15: unknown
+ CMD_WRITE_IRG, // 16: write inter-record gap
+ CMD_UNK_17, // 17: unknown
+ CMD_SCAN_RECORDS, // 18: scan records (count IRGs)
+ CMD_RECORD_WRITE, // 19: write record words
+ CMD_MOVE_INDTA, // 1a: move then scan for data
+ CMD_UNK_1b, // 1b: unknown (for now it seems harmless to handle it as NOP)
+ CMD_MOVE_INGAP, // 1c: move tape a given distance then scan for gap (as cmd 0c but in reverse order)
+ CMD_START_READ, // 1d: start record reading
+ CMD_DELTA_MOVE_IRG, // 1e: move tape a given distance, detect gaps in parallel
+ CMD_END_READ // 1f: stop reading
};
// Bits of status register
@@ -293,33 +304,34 @@ hp_taco_device::hp_taco_device(const machine_config &mconfig, const char *tag, d
WRITE16_MEMBER(hp_taco_device::reg_w)
{
- LOG_0(("wr R%u = %04x\n", 4 + offset , data));
-
- // Any I/O activity clears IRQ
- irq_w(false);
-
- switch (offset) {
- case 0:
- // Data register
- m_data_reg = data;
- m_data_reg_full = true;
- break;
-
- case 1:
- // Command register
- start_cmd_exec(data & CMD_REG_MASK);
- break;
-
- case 2:
- // Tachometer register
- m_tach_reg = data;
- break;
-
- case 3:
- // Timing register
- m_timing_reg = data;
- break;
- }
+ LOG_0(("wr R%u = %04x\n", 4 + offset , data));
+
+ // Any I/O activity clears IRQ
+ irq_w(false);
+
+ switch (offset) {
+ case 0:
+ // Data register
+ m_data_reg = data;
+ m_data_reg_full = true;
+ break;
+
+ case 1:
+ // Command register
+ start_cmd_exec(data & CMD_REG_MASK);
+ break;
+
+ case 2:
+ // Tachometer register
+ m_tach_reg = data;
+ freeze_tach_reg(true);
+ break;
+
+ case 3:
+ // Timing register
+ m_timing_reg = data;
+ break;
+ }
}
READ16_MEMBER(hp_taco_device::reg_r)
@@ -340,17 +352,18 @@ READ16_MEMBER(hp_taco_device::reg_r)
res = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
break;
- case 2:
- // Tachometer register
- res = m_tach_reg;
- break;
+ case 2:
+ // Tachometer register
+ update_tach_reg();
+ res = m_tach_reg;
+ break;
- case 3:
- // Checksum register: it clears when read
- res = m_checksum_reg;
- m_checksum_reg = 0;
- break;
- }
+ case 3:
+ // Checksum register: it clears when read
+ res = m_checksum_reg;
+ m_clear_checksum_reg = true;
+ break;
+ }
LOG_0(("rd R%u = %04x\n", 4 + offset , res));
@@ -377,35 +390,38 @@ void hp_taco_device::device_config_complete()
// device_start
void hp_taco_device::device_start()
{
- LOG(("device_start"));
- m_irq_handler.resolve_safe();
- m_flg_handler.resolve_safe();
- m_sts_handler.resolve_safe();
-
- save_item(NAME(m_data_reg));
- save_item(NAME(m_data_reg_full));
- save_item(NAME(m_cmd_reg));
- save_item(NAME(m_cmd_state));
- save_item(NAME(m_status_reg));
- save_item(NAME(m_tach_reg));
- save_item(NAME(m_checksum_reg));
- save_item(NAME(m_timing_reg));
- save_item(NAME(m_irq));
- save_item(NAME(m_flg));
- save_item(NAME(m_sts));
- save_item(NAME(m_tape_pos));
- save_item(NAME(m_start_time));
- save_item(NAME(m_tape_fwd));
- save_item(NAME(m_tape_fast));
- save_item(NAME(m_image_dirty));
- save_item(NAME(m_tape_wr));
- save_item(NAME(m_rw_pos));
- save_item(NAME(m_next_word));
- save_item(NAME(m_rd_it_valid));
- save_item(NAME(m_gap_detect_start));
-
- m_tape_timer = timer_alloc(TAPE_TMR_ID);
- m_hole_timer = timer_alloc(HOLE_TMR_ID);
+ LOG(("device_start"));
+ m_irq_handler.resolve_safe();
+ m_flg_handler.resolve_safe();
+ m_sts_handler.resolve_safe();
+
+ save_item(NAME(m_data_reg));
+ save_item(NAME(m_data_reg_full));
+ save_item(NAME(m_cmd_reg));
+ //save_item(NAME(m_cmd_state));
+ save_item(NAME(m_status_reg));
+ save_item(NAME(m_tach_reg));
+ save_item(NAME(m_tach_reg_ref));
+ save_item(NAME(m_tach_reg_frozen));
+ save_item(NAME(m_checksum_reg));
+ save_item(NAME(m_clear_checksum_reg));
+ save_item(NAME(m_timing_reg));
+ save_item(NAME(m_irq));
+ save_item(NAME(m_flg));
+ save_item(NAME(m_sts));
+ save_item(NAME(m_tape_pos));
+ save_item(NAME(m_start_time));
+ save_item(NAME(m_tape_fwd));
+ save_item(NAME(m_tape_fast));
+ save_item(NAME(m_image_dirty));
+ save_item(NAME(m_tape_wr));
+ save_item(NAME(m_rw_pos));
+ save_item(NAME(m_next_word));
+ save_item(NAME(m_rd_it_valid));
+ save_item(NAME(m_gap_detect_start));
+
+ m_tape_timer = timer_alloc(TAPE_TMR_ID);
+ m_hole_timer = timer_alloc(HOLE_TMR_ID);
}
// device_stop
@@ -429,227 +445,92 @@ void hp_taco_device::device_reset()
void hp_taco_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
- if (CMD_CODE(m_cmd_reg) != CMD_STOP) {
- update_tape_pos();
- }
-
- switch (id) {
- case TAPE_TMR_ID:
- LOG_0(("Tape tmr @%g\n" , machine().time().as_double()));
-
- tape_pos_t length;
-
- switch (CMD_CODE(m_cmd_reg)) {
- case CMD_INDTA_INGAP:
- if (m_cmd_state == 0) {
- m_cmd_state = 1;
- tape_pos_t target = m_tape_pos;
- if (next_n_gap(target, 1, MIN_IRG_LENGTH)) {
- m_tape_timer->adjust(time_to_target(target));
- }
- return;
- }
- break;
-
- case CMD_RECORD_WRITE:
- if (m_cmd_state == 0) {
- if (m_rd_it->second == PREAMBLE_WORD) {
- LOG_0(("Got preamble\n"));
- m_cmd_state = 1;
- // m_rw_pos already at correct position
- m_tape_timer->adjust(fetch_next_wr_word());
- break;
- } else {
- adv_res_t res = adv_it(m_rd_it);
- if (res != ADV_NO_MORE_DATA) {
- m_tape_timer->adjust(time_to_rd_next_word(m_rw_pos));
- }
- // No IRQ
- return;
- }
- }
- // Intentional fall-through
- case CMD_INIT_WRITE:
- write_word(m_rw_pos , m_next_word , length);
- pos_offset(m_rw_pos , length);
- // Just to be sure..
- m_tape_pos = m_rw_pos;
- m_tape_timer->adjust(fetch_next_wr_word());
- break;
-
- case CMD_STOP:
- move_tape_pos(m_tape_fast ? FAST_BRAKE_DIST : SLOW_BRAKE_DIST);
- stop_tape();
- break;
-
- case CMD_INGAP_MOVE:
- if (m_cmd_state == 0) {
- m_cmd_state = 1;
- m_tape_timer->adjust(time_to_tach_pulses());
- return;
- }
- break;
-
- case CMD_FINAL_GAP:
- case CMD_WRITE_IRG:
- write_gap(m_rw_pos , m_tape_pos);
- m_hole_timer->reset();
- break;
-
- case CMD_SCAN_RECORDS:
- if (m_cmd_state == 0) {
- m_cmd_state = 1;
- tape_pos_t target = m_tape_pos;
- if (next_n_gap(target, 0x10000U - m_tach_reg, MIN_IRG_LENGTH)) {
- LOG_0(("%u gaps @%d\n" , 0x10000U - m_tach_reg, target));
- m_tape_timer->adjust(time_to_target(target));
- }
- return;
- } else {
- m_hole_timer->reset();
- }
- break;
-
- case CMD_MOVE_INDTA:
- if (m_cmd_state == 0) {
- if (next_data(m_rd_it , m_tape_pos , true)) {
- m_cmd_state = 1;
- m_tape_timer->adjust(time_to_target(farthest_end(m_rd_it)));
- }
- // No IRQ
- return;
- }
- // m_cmd_state == 1 -> IRQ & cmd end
- break;
-
- case CMD_DELTA_MOVE_HOLE:
- case CMD_DELTA_MOVE_IRG:
- // Interrupt at end of movement
- m_hole_timer->reset();
- break;
-
- case CMD_START_READ:
- {
- bool set_intr = true;
- // Just to be sure..
- m_tape_pos = m_rw_pos;
- if (m_cmd_state == 0) {
- set_intr = false;
- if (m_rd_it->second == PREAMBLE_WORD) {
- m_cmd_state = 1;
- }
- LOG_0(("Got preamble\n"));
- } else {
- m_data_reg = m_rd_it->second;
- m_checksum_reg += m_data_reg;
- LOG_0(("RD %04x\n" , m_data_reg));
- }
- adv_res_t res = adv_it(m_rd_it);
- LOG_0(("adv_it %d\n" , res));
- if (res == ADV_NO_MORE_DATA) {
- m_rd_it_valid = false;
- } else {
- if (res == ADV_DISCONT_DATA) {
- // Hit a gap, restart preamble search
- m_cmd_state = 0;
- }
- m_tape_timer->adjust(time_to_rd_next_word(m_rw_pos));
- }
- if (!set_intr) {
- return;
- }
- }
- break;
-
- case CMD_END_READ:
- {
- m_tape_pos = m_rw_pos;
- // Note: checksum is not updated
- m_data_reg = m_rd_it->second;
- LOG_0(("Final RD %04x\n" , m_data_reg));
- adv_res_t res = adv_it(m_rd_it);
- if (res == ADV_NO_MORE_DATA) {
- m_rd_it_valid = false;
- }
- m_hole_timer->reset();
- }
- break;
-
- default:
- // Other commands: just raise irq
- break;
- }
- irq_w(true);
- break;
-
- case HOLE_TMR_ID:
- LOG_0(("Hole tmr @%g\n" , machine().time().as_double()));
-
- BIT_SET(m_status_reg , STATUS_HOLE_BIT);
-
- switch (CMD_CODE(m_cmd_reg)) {
- case CMD_FINAL_GAP:
- case CMD_WRITE_IRG:
- write_gap(m_rw_pos , m_tape_pos);
- m_rw_pos = m_tape_pos;
- break;
-
- case CMD_SCAN_RECORDS:
- case CMD_DELTA_MOVE_HOLE:
- // Cmds 18 & 1c are terminated at first hole
- m_tape_timer->reset();
- irq_w(true);
- // No reloading of hole timer
- return;
-
- case CMD_DELTA_MOVE_IRG:
- // TODO: update r6
- m_hole_timer->adjust(time_to_next_hole());
- // No IRQ at holes
- return;
-
- case CMD_START_READ:
- case CMD_END_READ:
- set_error(true);
- break;
-
- default:
- // Other cmds: default processing (update tape pos, set IRQ, schedule timer for next hole)
- break;
- }
-
- irq_w(true);
- m_hole_timer->adjust(time_to_next_hole());
- break;
-
- default:
- break;
- }
+ update_tape_pos();
+
+ switch (id) {
+ case TAPE_TMR_ID:
+ LOG_0(("Tape tmr @%g cmd %02x st %d\n" , machine().time().as_double() , CMD_CODE(m_cmd_reg) , m_cmd_state));
+
+ cmd_fsm();
+ break;
+
+ case HOLE_TMR_ID:
+ LOG_0(("Hole tmr @%g cmd %02x st %d\n" , machine().time().as_double() , CMD_CODE(m_cmd_reg) , m_cmd_state));
+
+ BIT_SET(m_status_reg , STATUS_HOLE_BIT);
+
+ if (m_cmd_state >= CMD_PH0 && m_cmd_state <= CMD_END) {
+ switch (CMD_CODE(m_cmd_reg)) {
+ case CMD_FINAL_GAP:
+ case CMD_WRITE_IRG:
+ write_gap(m_rw_pos , m_tape_pos);
+ m_rw_pos = m_tape_pos;
+ break;
+
+ case CMD_SCAN_RECORDS:
+ // Cmds 18 is terminated at first hole
+ terminate_cmd_now();
+ // No reloading of hole timer
+ return;
+
+ case CMD_MOVE_INGAP:
+ m_hole_timer->adjust(time_to_next_hole());
+ // No IRQ at holes
+ return;
+
+ case CMD_DELTA_MOVE_IRG:
+ // Hit hole before end of programmed pulses
+ terminate_cmd_now();
+ update_tach_reg();
+ freeze_tach_reg(true);
+ return;
+
+ case CMD_START_READ:
+ case CMD_END_READ:
+ set_error(true);
+ break;
+
+ default:
+ // Other cmds: default processing (update tape pos, set IRQ, schedule timer for next hole)
+ break;
+ }
+
+ irq_w(true);
+ }
+ m_hole_timer->adjust(time_to_next_hole());
+ break;
+
+ default:
+ break;
+ }
}
void hp_taco_device::clear_state(void)
{
- m_data_reg = 0;
- m_data_reg_full = false;
- m_cmd_reg = 0;
- m_status_reg = 0;
- m_tach_reg = 0;
- m_checksum_reg = 0;
- m_timing_reg = 0;
- m_cmd_state = 0;
- // m_tape_pos is not reset, tape stays where it is
- m_start_time = attotime::never;
- m_tape_fwd = false;
- m_tape_fast = false;
- // m_image_dirty is not touched
- m_tape_wr = false;
- m_rw_pos = 0;
- m_next_word = 0;
- m_rd_it_valid = false;
- m_gap_detect_start = NULL_TAPE_POS;
-
- set_tape_present(false);
- set_tape_present(is_loaded());
+ m_data_reg = 0;
+ m_data_reg_full = false;
+ m_cmd_reg = 0;
+ m_status_reg = 0;
+ m_tach_reg = 0;
+ m_tach_reg_ref = m_tape_pos;
+ m_tach_reg_frozen = true;
+ m_checksum_reg = 0;
+ m_clear_checksum_reg = false;
+ m_timing_reg = 0;
+ m_cmd_state = CMD_IDLE;
+ // m_tape_pos is not reset, tape stays where it is
+ m_start_time = attotime::never;
+ m_tape_fwd = false;
+ m_tape_fast = false;
+ // m_image_dirty is not touched
+ m_tape_wr = false;
+ m_rw_pos = 0;
+ m_next_word = 0;
+ m_rd_it_valid = false;
+ m_gap_detect_start = NULL_TAPE_POS;
+
+ set_tape_present(false);
+ set_tape_present(is_loaded());
}
void hp_taco_device::irq_w(bool state)
@@ -668,9 +549,16 @@ void hp_taco_device::set_error(bool state)
LOG_0(("error = %d\n" , state));
}
+bool hp_taco_device::is_braking(void) const
+{
+ return m_cmd_state == CMD_INVERTING || m_cmd_state == CMD_STOPPING;
+}
+
unsigned hp_taco_device::speed_to_tick_freq(void) const
{
- return m_tape_fast ? TACH_FREQ_FAST * TAPE_POS_FRACT : TACH_FREQ_SLOW * TAPE_POS_FRACT;
+ return is_braking() ?
+ (m_tape_fast ? TACH_FREQ_BRAKE_FAST * TAPE_POS_FRACT : TACH_FREQ_BRAKE_SLOW * TAPE_POS_FRACT) :
+ (m_tape_fast ? TACH_FREQ_FAST * TAPE_POS_FRACT : TACH_FREQ_SLOW * TAPE_POS_FRACT);
}
bool hp_taco_device::pos_offset(tape_pos_t& pos , tape_pos_t offset) const
@@ -697,47 +585,81 @@ bool hp_taco_device::pos_offset(tape_pos_t& pos , tape_pos_t offset) const
}
}
-void hp_taco_device::move_tape_pos(tape_pos_t delta_pos)
+hp_taco_device::tape_pos_t hp_taco_device::current_tape_pos(void) const
{
- tape_pos_t tape_start_pos = m_tape_pos;
- if (!pos_offset(m_tape_pos , delta_pos)) {
- LOG(("Tape unspooled!\n"));
- }
- m_start_time = machine().time();
- LOG_0(("Tape pos = %u\n" , m_tape_pos));
- if (any_hole(tape_start_pos , m_tape_pos)) {
- // Crossed one or more holes
- BIT_SET(m_status_reg , STATUS_HOLE_BIT);
- }
+ if (m_start_time.is_never()) {
+ // Tape not moving
+ return m_tape_pos;
+ }
+
+ attotime delta_time(machine().time() - m_start_time);
+ LOG_0(("delta_time = %g\n" , delta_time.as_double()));
+ // How many tachometer ticks has the tape moved?
+ tape_pos_t delta_tach = (tape_pos_t)(delta_time.as_ticks(speed_to_tick_freq()));
+ LOG_0(("delta_tach = %u\n" , delta_tach));
+
+ tape_pos_t tape_pos = m_tape_pos;
+ if (!pos_offset(tape_pos , delta_tach)) {
+ LOG(("Tape unspooled!\n"));
+ }
+
+ return tape_pos;
}
void hp_taco_device::update_tape_pos(void)
{
- if (m_start_time.is_never()) {
- // Tape not moving
- return;
- }
+ if (m_start_time.is_never()) {
+ // Tape not moving
+ return;
+ }
+
+ m_tape_pos = current_tape_pos();
+ m_start_time = machine().time();
+ LOG_0(("Tape pos = %u\n" , m_tape_pos));
+
+ // Gap detection
+ bool gap_detected = false;
+ if (m_gap_detect_start != NULL_TAPE_POS && abs(m_gap_detect_start - m_tape_pos) >= min_gap_size()) {
+ tape_pos_t tmp = m_tape_pos;
+ pos_offset(tmp , -min_gap_size());
+ gap_detected = just_gap(tmp , m_tape_pos);
+ }
+ if (gap_detected) {
+ BIT_SET(m_status_reg, STATUS_GAP_BIT);
+ } else {
+ BIT_CLR(m_status_reg, STATUS_GAP_BIT);
+ }
+ // Tach register update
+ update_tach_reg();
+}
- attotime delta_time(machine().time() - m_start_time);
- LOG_0(("delta_time = %g\n" , delta_time.as_double()));
- // How many tachometer ticks has the tape moved?
- tape_pos_t delta_tach = (tape_pos_t)(delta_time.as_ticks(speed_to_tick_freq()));
- LOG_0(("delta_tach = %u\n" , delta_tach));
+void hp_taco_device::update_tach_reg(void)
+{
+ if (m_tach_reg_frozen) {
+ LOG_0(("Tach reg frozen\n"));
+ return;
+ }
- move_tape_pos(delta_tach);
+ tape_pos_t pos = current_tape_pos();
+ tape_pos_t pos_int = pos / TAPE_POS_FRACT;
+ tape_pos_t ref_int = m_tach_reg_ref / TAPE_POS_FRACT;
+ UINT16 reg_value = (UINT16)(abs(pos_int - ref_int) + m_tach_reg);
+
+ LOG_0(("Tach = %04x @ pos = %d, ref_pos = %d\n" , reg_value , pos , m_tach_reg_ref));
+
+ m_tach_reg = reg_value;
+ m_tach_reg_ref = pos;
+}
+
+void hp_taco_device::freeze_tach_reg(bool freeze)
+{
+ if (freeze) {
+ m_tach_reg_frozen = true;
+ } else {
+ m_tach_reg_frozen = false;
+ m_tach_reg_ref = current_tape_pos();
+ }
- // Gap detection
- bool gap_detected = false;
- if (m_gap_detect_start != NULL_TAPE_POS && abs(m_gap_detect_start - m_tape_pos) >= MIN_IRG_LENGTH) {
- tape_pos_t tmp = m_tape_pos;
- pos_offset(tmp , -MIN_IRG_LENGTH);
- gap_detected = just_gap(tmp , m_tape_pos);
- }
- if (gap_detected) {
- BIT_SET(m_status_reg, STATUS_GAP_BIT);
- } else {
- BIT_CLR(m_status_reg, STATUS_GAP_BIT);
- }
}
void hp_taco_device::ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b)
@@ -751,20 +673,6 @@ void hp_taco_device::ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b)
}
}
-// Is there any hole in a given section of tape?
-bool hp_taco_device::any_hole(tape_pos_t tape_pos_a , tape_pos_t tape_pos_b)
-{
- ensure_a_lt_b(tape_pos_a , tape_pos_b);
-
- for (tape_pos_t hole : tape_holes) {
- if (tape_pos_a < hole && tape_pos_b >= hole) {
- return true;
- }
- }
-
- return false;
-}
-
// Position of next hole tape will reach in a given direction
hp_taco_device::tape_pos_t hp_taco_device::next_hole(void) const
{
@@ -800,43 +708,64 @@ attotime hp_taco_device::time_to_target(tape_pos_t target) const
return time_to_distance(abs(target - m_tape_pos));
}
-bool hp_taco_device::start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0)
+attotime hp_taco_device::time_to_stopping_pos(void) const
{
- m_cmd_reg = cmd_reg;
-
- UINT16 to_be_tested = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
- // Bits in STATUS_ERR_MASK must always be 0
- must_be_0 |= STATUS_ERR_MASK;
+ return time_to_distance(m_tape_fast ? FAST_BRAKE_DIST : SLOW_BRAKE_DIST);
+}
- // It's not an error if the error state is already set (sts false)
- if (((to_be_tested & (must_be_1 | must_be_0)) ^ must_be_1) != 0) {
- set_error(true);
- return false;
- } else {
- bool prev_tape_wr = m_tape_wr;
- bool prev_tape_fwd = m_tape_fwd;
- bool prev_tape_fast = m_tape_fast;
- bool not_moving = m_start_time.is_never();
-
- m_start_time = machine().time();
- m_tape_wr = (must_be_0 & STATUS_WPR_MASK) != 0;
- m_tape_fwd = DIR_FWD(m_cmd_reg);
- m_tape_fast = SPEED_FAST(m_cmd_reg);
- // TODO: remove?
- BIT_CLR(m_status_reg, STATUS_HOLE_BIT);
-
- if (m_tape_wr) {
- // Write command: disable gap detector
- m_gap_detect_start = NULL_TAPE_POS;
- BIT_CLR(m_status_reg, STATUS_GAP_BIT);
- m_image_dirty = true;
- } else if (not_moving || prev_tape_wr != m_tape_wr || prev_tape_fwd != m_tape_fwd || prev_tape_fast != m_tape_fast) {
- // Tape started right now, switched from writing to reading, direction changed or speed changed: (re)start gap detector
- m_gap_detect_start = m_tape_pos;
- BIT_CLR(m_status_reg, STATUS_GAP_BIT);
- }
- return true;
- }
+bool hp_taco_device::start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0)
+{
+ m_cmd_reg = cmd_reg;
+
+ UINT16 to_be_tested = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
+ // Bits in STATUS_ERR_MASK must always be 0
+ must_be_0 |= STATUS_ERR_MASK;
+
+ // It's not an error if the error state is already set (sts false)
+ if (((to_be_tested & (must_be_1 | must_be_0)) ^ must_be_1) != 0) {
+ return false;
+ } else {
+ bool prev_tape_wr = m_tape_wr;
+ bool prev_tape_fwd = m_tape_fwd;
+ bool prev_tape_fast = m_tape_fast;
+ bool prev_tape_braking = is_braking();
+ bool not_moving = m_start_time.is_never();
+
+ m_start_time = machine().time();
+ m_tape_wr = (must_be_0 & STATUS_WPR_MASK) != 0;
+ m_tape_fwd = DIR_FWD(m_cmd_reg);
+ m_tape_fast = SPEED_FAST(m_cmd_reg);
+ // TODO: remove?
+ BIT_CLR(m_status_reg, STATUS_HOLE_BIT);
+
+ if (m_tape_wr) {
+ // Write command: disable gap detector
+ m_gap_detect_start = NULL_TAPE_POS;
+ BIT_CLR(m_status_reg, STATUS_GAP_BIT);
+ m_image_dirty = true;
+ } else if (not_moving || prev_tape_braking || prev_tape_wr != m_tape_wr || prev_tape_fwd != m_tape_fwd || prev_tape_fast != m_tape_fast) {
+ // Tape started or re-started right now, switched from writing to reading, direction changed or speed changed: (re)start gap detector
+ m_gap_detect_start = m_tape_pos;
+ BIT_CLR(m_status_reg, STATUS_GAP_BIT);
+ }
+
+ if (!not_moving && !prev_tape_braking && prev_tape_fwd != m_tape_fwd) {
+ // Tape direction inverted, stop tape before executing command
+ m_tape_fwd = prev_tape_fwd;
+ m_tape_fast = prev_tape_fast;
+ m_cmd_state = CMD_INVERTING;
+ LOG_0(("Direction reversed! fwd = %d fast = %d\n" , m_tape_fwd , m_tape_fast));
+ m_tape_timer->adjust(time_to_stopping_pos());
+ } else {
+ // No change in direction, immediate execution
+ m_cmd_state = CMD_PH0;
+ m_tape_timer->adjust(attotime::zero);
+ }
+
+ m_hole_timer->reset();
+
+ return true;
+ }
}
void hp_taco_device::stop_tape(void)
@@ -980,19 +909,23 @@ hp_taco_device::adv_res_t hp_taco_device::adv_it(tape_track_t::iterator& it)
attotime hp_taco_device::fetch_next_wr_word(void)
{
- if (m_data_reg_full) {
- m_next_word = m_data_reg;
- m_data_reg_full = false;
- LOG_0(("next %04x (DR)\n" , m_next_word));
- } else {
- // When data register is empty, write checksum word
- m_next_word = m_checksum_reg;
- LOG_0(("next %04x (CS)\n" , m_next_word));
- }
- // Update checksum with new word
- m_checksum_reg += m_next_word;
-
- return time_to_distance(word_length(m_next_word));
+ if (m_data_reg_full) {
+ m_next_word = m_data_reg;
+ m_data_reg_full = false;
+ LOG_0(("next %04x (DR)\n" , m_next_word));
+ } else {
+ // When data register is empty, write checksum word
+ m_next_word = m_checksum_reg;
+ LOG_0(("next %04x (CS)\n" , m_next_word));
+ }
+ if (m_clear_checksum_reg) {
+ m_checksum_reg = 0;
+ m_clear_checksum_reg = false;
+ }
+ // Update checksum with new word
+ m_checksum_reg += m_next_word;
+
+ return time_to_distance(word_length(m_next_word));
}
attotime hp_taco_device::time_to_rd_next_word(tape_pos_t& word_rd_pos)
@@ -1005,6 +938,11 @@ attotime hp_taco_device::time_to_rd_next_word(tape_pos_t& word_rd_pos)
}
}
+hp_taco_device::tape_pos_t hp_taco_device::min_gap_size(void) const
+{
+ return LONG_GAP(m_cmd_reg) ? LONG_GAP_LENGTH : SHORT_GAP_LENGTH;
+}
+
/**
* Scan for next "n_gaps" gaps
*
@@ -1216,213 +1154,500 @@ attotime hp_taco_device::time_to_tach_pulses(void) const
return time_to_distance((tape_pos_t)(0x10000U - m_tach_reg) * TAPE_POS_FRACT);
}
-void hp_taco_device::start_cmd_exec(UINT16 new_cmd_reg)
+void hp_taco_device::terminate_cmd_now(void)
{
- LOG(("Cmd = %02x\n" , CMD_CODE(new_cmd_reg)));
-
- update_tape_pos();
-
- attotime cmd_duration = attotime::never;
- attotime time_to_hole = attotime::never;
-
- unsigned new_cmd_code = CMD_CODE(new_cmd_reg);
-
- if (new_cmd_code != CMD_START_READ &&
- new_cmd_code != CMD_END_READ &&
- new_cmd_code != CMD_CLEAR) {
- m_rd_it_valid = false;
- }
-
- switch (new_cmd_code) {
- case CMD_INDTA_INGAP:
- // Errors: CART OUT,FAST SPEED
- if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- m_cmd_state = 0;
- if (next_data(m_rd_it , m_tape_pos , true)) {
- cmd_duration = time_to_target(farthest_end(m_rd_it));
- }
- }
- break;
-
- case CMD_FINAL_GAP:
- // Errors: WP,CART OUT
- if (start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK)) {
- m_rw_pos = m_tape_pos;
- cmd_duration = time_to_distance(END_GAP_LENGTH);
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_CLEAR:
- set_error(false);
- BIT_CLR(m_status_reg, STATUS_HOLE_BIT);
- BIT_CLR(m_status_reg, STATUS_CART_OUT_BIT);
- BIT_CLR(m_status_reg, STATUS_WPR_BIT);
- set_tape_present(is_loaded());
- // This is a special command: it doesn't raise IRQ at completion and it
- // doesn't replace current command
- return;
-
- case CMD_NOT_INDTA:
- // Errors: CART OUT,FAST SPEED
- if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- tape_pos_t target = m_tape_pos;
- if (next_n_gap(target, 1, NO_DATA_GAP)) {
- LOG_0(("End of data @%d\n" , target));
- cmd_duration = time_to_target(target);
- }
- // Holes detected?
- }
- break;
-
- case CMD_INIT_WRITE:
- // Errors: WP,CART OUT,fast speed,reverse
- if (start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK)) {
- m_next_word = PREAMBLE_WORD;
- m_rw_pos = m_tape_pos;
- cmd_duration = time_to_distance(word_length(m_next_word));
- }
- break;
-
- case CMD_STOP:
- if (CMD_CODE(m_cmd_reg) != CMD_STOP) {
- if (m_start_time.is_never()) {
- // Tape is already stopped
- cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
- } else {
- // Start braking timer
- cmd_duration = attotime::from_msec(m_tape_fast ? FAST_BRAKE_MSEC : SLOW_BRAKE_MSEC);
- }
- m_cmd_reg = new_cmd_reg;
- } else {
- // TODO: check if ok
- return;
- }
- break;
-
- case CMD_SET_TRACK:
- // Don't know if this command really starts the tape or not (probably it doesn't)
- if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
- // When b9 is 0, set track A/B
- // When b9 is 1, ignore command (in TACO chip it has an unknown purpose)
- if (!UNKNOWN_B9(new_cmd_reg)) {
- if (CMD_OPT(new_cmd_reg)) {
- BIT_SET(m_status_reg, STATUS_TRACKB_BIT);
- } else {
- BIT_CLR(m_status_reg, STATUS_TRACKB_BIT);
- }
- }
- cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
- }
- break;
-
- case CMD_MOVE:
- if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_INGAP_MOVE:
- // Errors: CART OUT,FAST SPEED
- if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- m_cmd_state = 0;
- tape_pos_t target = m_tape_pos;
- if (next_n_gap(target, 1, MIN_IRG_LENGTH)) {
- LOG_0(("IRG @%d\n" , target));
- cmd_duration = time_to_target(target);
- }
- // Holes detected?
- }
- break;
-
- case CMD_WRITE_IRG:
- // Errors: WP,CART OUT
- if (start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK)) {
- m_rw_pos = m_tape_pos;
- cmd_duration = time_to_tach_pulses();
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_SCAN_RECORDS:
- // Errors: CART OUT
- if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
- m_cmd_state = 0;
- if (next_data(m_rd_it , m_tape_pos , true)) {
- cmd_duration = time_to_target(farthest_end(m_rd_it));
- }
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_RECORD_WRITE:
- // Errors: WP,CART OUT,fast speed,reverse
- if (start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK)) {
- // Search for preamble first
- m_cmd_state = 0;
- m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false);
- cmd_duration = time_to_rd_next_word(m_rw_pos);
- // Holes detected?
- }
- break;
-
- case CMD_MOVE_INDTA:
- // Errors: CART OUT,FAST SPEED
- if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- m_cmd_state = 0;
- cmd_duration = time_to_tach_pulses();
- // Holes detected?
- }
- break;
-
- case CMD_UNK_1b:
- if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
- // Unknown purpose, but make it a NOP (it's used in "T" test of test ROM)
- cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
- }
- break;
-
- case CMD_DELTA_MOVE_HOLE:
- case CMD_DELTA_MOVE_IRG:
- if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
- cmd_duration = time_to_tach_pulses();
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_START_READ:
- // Yes, you can read tape backwards: test "C" does that!
- // Because of this DIR_FWD_MASK is not in the "must be 1" mask.
- if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- // TODO: check anche m_rw_pos sforato
- if (!m_rd_it_valid) {
- // Search for preamble first
- m_cmd_state = 0;
- m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false);
- }
-
- cmd_duration = time_to_rd_next_word(m_rw_pos);
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_END_READ:
- // This command only makes sense after CMD_START_READ
- if (CMD_CODE(m_cmd_reg) == CMD_START_READ && m_cmd_state == 1 &&
- start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- LOG_0(("END_READ %d\n" , m_rd_it_valid));
- cmd_duration = time_to_rd_next_word(m_rw_pos);
- time_to_hole = time_to_next_hole();
- }
- break;
+ m_cmd_state = CMD_END;
+ m_tape_timer->adjust(attotime::zero);
+ m_hole_timer->reset();
+}
- default:
- LOG(("Unrecognized command\n"));
- break;
- }
+void hp_taco_device::cmd_fsm(void)
+{
+ if (m_cmd_state == CMD_END) {
+ // Command ended
+ m_cmd_state = CMD_IDLE;
+ m_hole_timer->reset();
+ irq_w(true);
+ if (AUTO_STOP(m_cmd_reg)) {
+ // Automatic stop after command execution
+ LOG_0(("Tape clamped\n"));
+ m_cmd_state = CMD_STOPPING;
+ m_tape_timer->adjust(time_to_stopping_pos());
+ }
+ } else if (m_cmd_state == CMD_STOPPING) {
+ // Braking phase ended
+ m_cmd_state = CMD_IDLE;
+ stop_tape();
+ if (CMD_CODE(m_cmd_reg) == CMD_STOP) {
+ irq_w(true);
+ }
+ } else {
+ attotime cmd_duration = attotime::never;
+
+ if (m_cmd_state == CMD_INVERTING) {
+ m_tape_fwd = DIR_FWD(m_cmd_reg);
+ m_tape_fast = SPEED_FAST(m_cmd_reg);
+ m_cmd_state = CMD_PH0;
+ }
+
+ if (m_cmd_state == CMD_PH0) {
+ m_hole_timer->adjust(time_to_next_hole());
+ }
+
+ switch (CMD_CODE(m_cmd_reg)) {
+ case CMD_INDTA_INGAP:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ if (next_data(m_rd_it , m_tape_pos , true)) {
+ cmd_duration = time_to_target(farthest_end(m_rd_it));
+ }
+ m_cmd_state = CMD_PH1;
+ } else {
+ // PH1
+ tape_pos_t target = m_tape_pos;
+ if (next_n_gap(target, 1, min_gap_size())) {
+ cmd_duration = time_to_target(target);
+ }
+ m_cmd_state = CMD_END;
+ }
+ break;
+
+ case CMD_FINAL_GAP:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ m_rw_pos = m_tape_pos;
+ cmd_duration = time_to_distance(END_GAP_LENGTH);
+ m_cmd_state = CMD_PH1;
+ } else {
+ // PH1
+ write_gap(m_rw_pos , m_tape_pos);
+ cmd_duration = attotime::zero;
+ m_cmd_state = CMD_END;
+ }
+ break;
+
+ case CMD_RECORD_WRITE:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ // Search for preamble first
+ m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false);
+ cmd_duration = time_to_rd_next_word(m_rw_pos);
+ m_cmd_state = CMD_PH1;
+ break;
+ } else if (m_cmd_state == CMD_PH1) {
+ // PH1
+ if (m_rd_it->second == PREAMBLE_WORD) {
+ LOG_0(("Got preamble\n"));
+ m_cmd_state = CMD_PH2;
+ // m_rw_pos already at correct position
+ cmd_duration = fetch_next_wr_word();
+ irq_w(true);
+ } else {
+ adv_res_t res = adv_it(m_rd_it);
+ if (res != ADV_NO_MORE_DATA) {
+ cmd_duration = time_to_rd_next_word(m_rw_pos);
+ }
+ }
+ break;
+ }
+ // Intentional fall-through on PH2
+
+ case CMD_INIT_WRITE:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ m_next_word = PREAMBLE_WORD;
+ m_rw_pos = m_tape_pos;
+ cmd_duration = time_to_distance(word_length(m_next_word));
+ m_cmd_state = CMD_PH1;
+ } else {
+ // PH1 & PH2 of CMD_RECORD_WRITE
+ tape_pos_t length;
+ write_word(m_rw_pos , m_next_word , length);
+ pos_offset(m_rw_pos , length);
+ // Just to be sure..
+ m_tape_pos = m_rw_pos;
+ cmd_duration = fetch_next_wr_word();
+ irq_w(true);
+ }
+ break;
+
+ case CMD_SET_TRACK:
+ // PH0
+ // When b9 is 0, set track A/B
+ // When b9 is 1, ignore command (in TACO chip it has an unknown purpose)
+ if (!AUTO_STOP(m_cmd_reg)) {
+ if (CMD_OPT(m_cmd_reg)) {
+ BIT_SET(m_status_reg, STATUS_TRACKB_BIT);
+ } else {
+ BIT_CLR(m_status_reg, STATUS_TRACKB_BIT);
+ }
+ }
+ cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
+ m_hole_timer->reset();
+ m_cmd_state = CMD_END;
+ break;
+
+ case CMD_MOVE:
+ // PH0
+ // Endless movement: not setting cmd_duration
+ m_cmd_state = CMD_END;
+ break;
+
+ case CMD_INGAP_MOVE:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ tape_pos_t target = m_tape_pos;
+ if (next_n_gap(target, 1, min_gap_size())) {
+ LOG_0(("IRG @%d\n" , target));
+ cmd_duration = time_to_target(target);
+ }
+ m_cmd_state = CMD_PH1;
+ } else {
+ // PH1
+ cmd_duration = time_to_tach_pulses();
+ freeze_tach_reg(false);
+ m_cmd_state = CMD_END;
+ }
+ break;
+
+ case CMD_NOT_INDTA:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ if (next_data(m_rd_it , m_tape_pos , true)) {
+ cmd_duration = time_to_target(farthest_end(m_rd_it));
+ }
+ m_cmd_state = CMD_PH1;
+ } else {
+ // PH1
+ tape_pos_t target = m_tape_pos;
+ if (next_n_gap(target, 1, NO_DATA_GAP)) {
+ LOG_0(("End of data @%d\n" , target));
+ cmd_duration = time_to_target(target);
+ }
+ m_cmd_state = CMD_END;
+ }
+ break;
+
+ case CMD_WRITE_IRG:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ freeze_tach_reg(false);
+ m_rw_pos = m_tape_pos;
+ cmd_duration = time_to_tach_pulses();
+ m_cmd_state = CMD_PH1;
+ } else {
+ // PH1
+ write_gap(m_rw_pos , m_tape_pos);
+ cmd_duration = attotime::zero;
+ m_cmd_state = CMD_END;
+ }
+ break;
+
+ case CMD_SCAN_RECORDS:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ if (next_data(m_rd_it , m_tape_pos , true)) {
+ cmd_duration = time_to_target(farthest_end(m_rd_it));
+ }
+ m_cmd_state = CMD_PH1;
+ } else {
+ // PH1
+ tape_pos_t target = m_tape_pos;
+ // b8 seems to select size of gaps
+ // Tach. register is incremented at each gap. Command ends when this register goes positive (b15 = 0).
+ unsigned n_gaps;
+ if (BIT(m_tach_reg , 15)) {
+ n_gaps = 0x10000U - m_tach_reg;
+ m_tach_reg = 0;
+ } else {
+ n_gaps = 1;
+ m_tach_reg++;
+ }
+ if (next_n_gap(target, n_gaps, min_gap_size())) {
+ LOG_0(("%u gaps @%d\n" , n_gaps, target));
+ cmd_duration = time_to_target(target);
+ }
+ m_cmd_state = CMD_END;
+ }
+ break;
+
+ case CMD_MOVE_INDTA:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ freeze_tach_reg(false);
+ cmd_duration = time_to_tach_pulses();
+ m_cmd_state = CMD_PH1;
+ } else {
+ // PH1
+ if (next_data(m_rd_it , m_tape_pos , true)) {
+ cmd_duration = time_to_target(farthest_end(m_rd_it));
+ }
+ m_cmd_state = CMD_END;
+ }
+ break;
+
+ case CMD_UNK_1b:
+ // PH0
+ // Unknown purpose, but make it a NOP (it's used in "T" test of test ROM)
+ cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
+ m_cmd_state = CMD_END;
+ break;
+
+ case CMD_MOVE_INGAP:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ freeze_tach_reg(false);
+ cmd_duration = time_to_tach_pulses();
+ m_cmd_state = CMD_PH1;
+ } else {
+ // PH1
+ tape_pos_t target = m_tape_pos;
+ if (next_n_gap(target, 1, min_gap_size())) {
+ LOG_0(("GAP @%d\n" , target));
+ cmd_duration = time_to_target(target);
+ }
+ m_cmd_state = CMD_END;
+ }
+ break;
+
+ case CMD_START_READ:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ // Should also check if tape position has gone too far to read word @ m_rd_it
+ if (!m_rd_it_valid) {
+ // Search for preamble first
+ m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false);
+ m_cmd_state = CMD_PH1;
+ } else {
+ // Resume reading from last position, skip preamble search
+ m_cmd_state = CMD_PH2;
+ }
+
+ cmd_duration = time_to_rd_next_word(m_rw_pos);
+ } else {
+ // Just to be sure..
+ m_tape_pos = m_rw_pos;
+
+ if (m_cmd_state == CMD_PH3) {
+ // PH3: delayed setting of error condition
+ set_error(true);
+ m_cmd_state = CMD_PH2;
+ }
+
+ if (m_cmd_state == CMD_PH1) {
+ // PH1
+ // Any word with at least a 0 will do as preamble.
+ // But anything that's not the correct preamble word (0) will cause a wrong alignment
+ // with word boundaries. TACO will read garbage data in this case (this effect is not simulated here).
+ if (m_rd_it->second != 0xffff) {
+ m_cmd_state = CMD_PH2;
+ LOG_0(("Got preamble %04x\n" , m_rd_it->second));
+ }
+ } else {
+ // PH2
+ irq_w(true);
+ m_data_reg = m_rd_it->second;
+ if (m_clear_checksum_reg) {
+ m_checksum_reg = 0;
+ m_clear_checksum_reg = false;
+ }
+ m_checksum_reg += m_data_reg;
+ LOG_0(("RD %04x\n" , m_data_reg));
+ }
+ adv_res_t res = adv_it(m_rd_it);
+ LOG_0(("adv_it %d\n" , res));
+ if (res == ADV_NO_MORE_DATA) {
+ m_rd_it_valid = false;
+ } else {
+ cmd_duration = time_to_rd_next_word(m_rw_pos);
+ if (res == ADV_DISCONT_DATA) {
+ // Wild guess: TACO sets error flag when it stumbles on a gap between words
+ if (m_cmd_state == CMD_PH2 && abs(m_tape_pos - m_rw_pos) > ((tape_pos_t)(0.25 * ONE_INCH_POS))) {
+ m_cmd_state = CMD_PH3;
+ } else {
+ // Hit a gap, restart preamble search
+ // TODO: is this ok?
+ m_cmd_state = CMD_PH1;
+ }
+ }
+ }
+ }
+ break;
+
+ case CMD_DELTA_MOVE_IRG:
+ // PH0
+ freeze_tach_reg(false);
+ cmd_duration = time_to_tach_pulses();
+ m_cmd_state = CMD_END;
+ break;
+
+ case CMD_END_READ:
+ if (m_cmd_state == CMD_PH0) {
+ // PH0
+ cmd_duration = time_to_rd_next_word(m_rw_pos);
+ m_cmd_state = CMD_PH1;
+ } else {
+ // PH1
+ m_tape_pos = m_rw_pos;
+ // Note: checksum is not updated
+ m_data_reg = m_rd_it->second;
+ LOG_0(("Final RD %04x\n" , m_data_reg));
+ adv_res_t res = adv_it(m_rd_it);
+ if (res == ADV_NO_MORE_DATA) {
+ m_rd_it_valid = false;
+ }
+ cmd_duration = attotime::zero;
+ m_cmd_state = CMD_END;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ m_tape_timer->adjust(cmd_duration);
+ }
+}
- m_tape_timer->adjust(cmd_duration);
- m_hole_timer->adjust(time_to_hole);
+void hp_taco_device::start_cmd_exec(UINT16 new_cmd_reg)
+{
+ LOG_0(("New cmd %02x @ %g cmd %02x st %d\n" , CMD_CODE(new_cmd_reg) , machine().time().as_double() , CMD_CODE(m_cmd_reg) , m_cmd_state));
+
+ update_tape_pos();
+
+ unsigned new_cmd_code = CMD_CODE(new_cmd_reg);
+
+ if (new_cmd_code != CMD_START_READ &&
+ new_cmd_code != CMD_END_READ &&
+ new_cmd_code != CMD_CLEAR) {
+ m_rd_it_valid = false;
+ }
+
+ bool started = false;
+
+ switch (new_cmd_code) {
+ case CMD_INDTA_INGAP:
+ // Errors: CART OUT,FAST SPEED
+ started = start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK);
+ break;
+
+ case CMD_FINAL_GAP:
+ // Errors: WP,CART OUT
+ started = start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK);
+ break;
+
+ case CMD_INIT_WRITE:
+ // Errors: WP,CART OUT,fast speed,reverse
+ started = start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK);
+ break;
+
+ case CMD_STOP:
+ m_cmd_reg = new_cmd_reg;
+ freeze_tach_reg(false);
+ m_hole_timer->reset();
+ if (m_cmd_state == CMD_INVERTING || m_cmd_state == CMD_STOPPING) {
+ // Already braking
+ // m_tape_timer already set
+ } else if (m_start_time.is_never()) {
+ // Tape is already stopped
+ LOG_0(("Already stopped\n"));
+ m_tape_timer->adjust(attotime::from_usec(QUICK_CMD_USEC));
+ } else {
+ // Start braking timer
+ m_cmd_state = CMD_STOPPING;
+ m_tape_timer->adjust(time_to_stopping_pos());
+ }
+ m_cmd_state = CMD_STOPPING;
+ return;
+
+ case CMD_SET_TRACK:
+ // Don't know if this command really starts the tape or not (probably it doesn't)
+ started = start_tape_cmd(new_cmd_reg , 0 , 0);
+ break;
+
+ case CMD_MOVE:
+ started = start_tape_cmd(new_cmd_reg , 0 , 0);
+ break;
+
+ case CMD_INGAP_MOVE:
+ // Errors: CART OUT,FAST SPEED
+ started = start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK);
+ break;
+
+ case CMD_CLEAR:
+ set_error(false);
+ BIT_CLR(m_status_reg, STATUS_HOLE_BIT);
+ BIT_CLR(m_status_reg, STATUS_CART_OUT_BIT);
+ BIT_CLR(m_status_reg, STATUS_WPR_BIT);
+ set_tape_present(is_loaded());
+ // This is a special command: it doesn't raise IRQ at completion and it
+ // doesn't replace current command
+ return;
+
+ case CMD_NOT_INDTA:
+ // Errors: CART OUT,FAST SPEED
+ started = start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK);
+ break;
+
+ case CMD_WRITE_IRG:
+ // Errors: WP,CART OUT
+ started = start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK);
+ break;
+
+ case CMD_SCAN_RECORDS:
+ // Errors: CART OUT
+ started = start_tape_cmd(new_cmd_reg , 0 , 0);
+ break;
+
+ case CMD_RECORD_WRITE:
+ // Errors: WP,CART OUT,fast speed,reverse
+ started = start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK);
+ break;
+
+ case CMD_MOVE_INDTA:
+ // Errors: CART OUT,FAST SPEED
+ started = start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK);
+ break;
+
+ case CMD_UNK_1b:
+ started = start_tape_cmd(new_cmd_reg , 0 , 0);
+ break;
+
+ case CMD_MOVE_INGAP:
+ started = start_tape_cmd(new_cmd_reg , 0 , 0);
+ break;
+
+ case CMD_START_READ:
+ // Yes, you can read tape backwards: test "C" does that!
+ // Because of this DIR_FWD_MASK is not in the "must be 1" mask.
+ started = start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK);
+ break;
+
+ case CMD_DELTA_MOVE_IRG:
+ started = start_tape_cmd(new_cmd_reg , 0 , 0);
+ break;
+
+ case CMD_END_READ:
+ // This command only makes sense after CMD_START_READ
+ if (CMD_CODE(m_cmd_reg) == CMD_START_READ &&
+ (m_cmd_state == CMD_PH2 || m_cmd_state == CMD_PH3)) {
+ started = start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK);
+ LOG_0(("END_READ %d\n" , m_rd_it_valid));
+ }
+ break;
+
+ default:
+ LOG(("Unrecognized command\n"));
+ started = false;
+ break;
+ }
+
+ if (!started) {
+ set_error(true);
+ m_cmd_state = CMD_IDLE;
+ m_tape_timer->reset();
+ m_hole_timer->reset();
+ }
}
bool hp_taco_device::call_load()
@@ -1461,6 +1686,42 @@ void hp_taco_device::call_unload()
set_tape_present(false);
}
+void hp_taco_device::call_display()
+{
+ // Mostly lifted from cassette_image_device::call_display ;)
+
+ // Do not show anything if image not loaded or tape not moving
+ if (!exists() || m_start_time.is_never()) {
+ return;
+ }
+
+ char buffer[ 64 ];
+
+ char track = BIT(m_status_reg , STATUS_TRACKB_BIT) ? 'B' : 'A';
+ char r_w = m_tape_wr ? 'W' : 'R';
+ char m1;
+ char m2;
+
+ if (m_tape_fwd) {
+ m1 = '>';
+ m2 = m_tape_fast ? '>' : ' ';
+ } else {
+ m1 = '<';
+ m2 = m_tape_fast ? '<' : ' ';
+ }
+
+ int pos_in = current_tape_pos() / ONE_INCH_POS;
+
+ snprintf(buffer , sizeof(buffer) , "%c %c %c%c [%04d/1824]" , track , r_w , m1 , m2 , pos_in);
+
+ float x, y;
+ x = 0.2f;
+ y = 0.5f;
+ y *= device().machine().ui().get_line_height() + 2.0f * UI_BOX_TB_BORDER;
+
+ device().machine().ui().draw_text_box(&device().machine().render().ui_container(), buffer, JUSTIFY_LEFT, x, y, UI_BACKGROUND_COLOR);
+}
+
const char *hp_taco_device::file_extensions() const
{
return "hti";
diff --git a/src/devices/machine/hp_taco.h b/src/devices/machine/hp_taco.h
index 1695b7ce706..288b1db3218 100644
--- a/src/devices/machine/hp_taco.h
+++ b/src/devices/machine/hp_taco.h
@@ -47,6 +47,7 @@ public:
virtual bool call_load() override;
virtual bool call_create(int format_type, option_resolution *format_options) override;
virtual void call_unload() override;
+ virtual void call_display() override;
virtual iodevice_t image_type() const override { return IO_MAGTAPE; }
virtual bool is_readable() const override { return true; }
virtual bool is_writeable() const override { return true; }
@@ -71,96 +72,116 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
- // Storage of tracks: mapping from a tape position to word stored there
- typedef std::map<tape_pos_t , tape_word_t> tape_track_t;
-
- devcb_write_line m_irq_handler;
- devcb_write_line m_flg_handler;
- devcb_write_line m_sts_handler;
-
- // Registers
- UINT16 m_data_reg;
- bool m_data_reg_full;
- UINT16 m_cmd_reg;
- UINT16 m_status_reg;
- UINT16 m_tach_reg;
- UINT16 m_checksum_reg;
- UINT16 m_timing_reg;
-
- // State
- bool m_irq;
- bool m_flg;
- bool m_sts;
- UINT8 m_cmd_state;
-
- // Tape position & motion
- tape_pos_t m_tape_pos;
- attotime m_start_time; // Tape moving if != never
- bool m_tape_fwd;
- bool m_tape_fast;
-
- // Timers
- emu_timer *m_tape_timer;
- emu_timer *m_hole_timer;
-
- // Content of tape tracks
- tape_track_t m_tracks[ 2 ];
- bool m_image_dirty;
-
- // Reading & writing
- bool m_tape_wr;
- tape_pos_t m_rw_pos;
- UINT16 m_next_word;
- tape_track_t::iterator m_rd_it;
- bool m_rd_it_valid;
-
- // Gap detection
- tape_pos_t m_gap_detect_start;
-
- typedef enum {
- ADV_NO_MORE_DATA,
- ADV_CONT_DATA,
- ADV_DISCONT_DATA
- } adv_res_t;
-
- void clear_state(void);
- void irq_w(bool state);
- void set_error(bool state);
- unsigned speed_to_tick_freq(void) const;
- bool pos_offset(tape_pos_t& pos , tape_pos_t offset) const;
- void move_tape_pos(tape_pos_t delta_pos);
- void update_tape_pos(void);
- static void ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b);
- static bool any_hole(tape_pos_t tape_pos_a , tape_pos_t tape_pos_b);
- tape_pos_t next_hole(void) const;
- attotime time_to_distance(tape_pos_t distance) const;
- attotime time_to_target(tape_pos_t target) const;
- bool start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0);
- void start_tape(UINT16 cmd_reg);
- void stop_tape(void);
- tape_track_t& current_track(void);
- static tape_pos_t word_length(tape_word_t w);
- static tape_pos_t word_end_pos(const tape_track_t::iterator& it);
- static void adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos);
- void write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length);
- void write_gap(tape_pos_t a , tape_pos_t b);
- bool just_gap(tape_pos_t a , tape_pos_t b);
- tape_pos_t farthest_end(const tape_track_t::iterator& it) const;
- bool next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive);
- adv_res_t adv_it(tape_track_t::iterator& it);
- attotime fetch_next_wr_word(void);
- attotime time_to_rd_next_word(tape_pos_t& word_rd_pos);
- bool next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap);
- bool next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap);
- void clear_tape(void);
- void dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words);
- void save_tape(void);
- bool load_track(tape_track_t& track);
- bool load_tape(void);
- void set_tape_present(bool present);
- attotime time_to_next_hole(void) const;
- attotime time_to_tach_pulses(void) const;
- void start_cmd_exec(UINT16 new_cmd_reg);
+ // Storage of tracks: mapping from a tape position to word stored there
+ typedef std::map<tape_pos_t , tape_word_t> tape_track_t;
+
+ devcb_write_line m_irq_handler;
+ devcb_write_line m_flg_handler;
+ devcb_write_line m_sts_handler;
+
+ // Registers
+ UINT16 m_data_reg;
+ bool m_data_reg_full;
+ UINT16 m_cmd_reg;
+ UINT16 m_status_reg;
+ UINT16 m_tach_reg;
+ tape_pos_t m_tach_reg_ref;
+ bool m_tach_reg_frozen;
+ UINT16 m_checksum_reg;
+ bool m_clear_checksum_reg;
+ UINT16 m_timing_reg;
+
+ // State
+ bool m_irq;
+ bool m_flg;
+ bool m_sts;
+
+ // Command FSM state
+ typedef enum {
+ CMD_IDLE,
+ CMD_INVERTING,
+ CMD_PH0,
+ CMD_PH1,
+ CMD_PH2,
+ CMD_PH3,
+ CMD_END,
+ CMD_STOPPING
+ } cmd_state_t;
+ cmd_state_t m_cmd_state;
+
+ // Tape position & motion
+ tape_pos_t m_tape_pos;
+ attotime m_start_time; // Tape moving if != never
+ bool m_tape_fwd;
+ bool m_tape_fast;
+
+ // Timers
+ emu_timer *m_tape_timer;
+ emu_timer *m_hole_timer;
+
+ // Content of tape tracks
+ tape_track_t m_tracks[ 2 ];
+ bool m_image_dirty;
+
+ // Reading & writing
+ bool m_tape_wr;
+ tape_pos_t m_rw_pos;
+ UINT16 m_next_word;
+ tape_track_t::iterator m_rd_it;
+ bool m_rd_it_valid;
+
+ // Gap detection
+ tape_pos_t m_gap_detect_start;
+
+ typedef enum {
+ ADV_NO_MORE_DATA,
+ ADV_CONT_DATA,
+ ADV_DISCONT_DATA
+ } adv_res_t;
+
+ void clear_state(void);
+ void irq_w(bool state);
+ void set_error(bool state);
+ bool is_braking(void) const;
+ unsigned speed_to_tick_freq(void) const;
+ bool pos_offset(tape_pos_t& pos , tape_pos_t offset) const;
+ tape_pos_t current_tape_pos(void) const;
+ void update_tape_pos(void);
+ void update_tach_reg(void);
+ void freeze_tach_reg(bool freeze);
+ static void ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b);
+ tape_pos_t next_hole(void) const;
+ attotime time_to_distance(tape_pos_t distance) const;
+ attotime time_to_target(tape_pos_t target) const;
+ attotime time_to_stopping_pos(void) const;
+ bool start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0);
+ void stop_tape(void);
+ tape_track_t& current_track(void);
+ static tape_pos_t word_length(tape_word_t w);
+ static tape_pos_t word_end_pos(const tape_track_t::iterator& it);
+ static void adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos);
+ void write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length);
+ void write_gap(tape_pos_t a , tape_pos_t b);
+ bool just_gap(tape_pos_t a , tape_pos_t b);
+ tape_pos_t farthest_end(const tape_track_t::iterator& it) const;
+ bool next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive);
+ adv_res_t adv_it(tape_track_t::iterator& it);
+ attotime fetch_next_wr_word(void);
+ attotime time_to_rd_next_word(tape_pos_t& word_rd_pos);
+ tape_pos_t min_gap_size(void) const;
+ bool next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap);
+ bool next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap);
+ void clear_tape(void);
+ void dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words);
+ void save_tape(void);
+ bool load_track(tape_track_t& track);
+ bool load_tape(void);
+ void set_tape_present(bool present);
+ attotime time_to_next_hole(void) const;
+ attotime time_to_tach_pulses(void) const;
+ void terminate_cmd_now(void);
+ void cmd_fsm(void);
+ void start_cmd_exec(UINT16 new_cmd_reg);
};
// device type definition
diff --git a/src/devices/machine/i2cmem.cpp b/src/devices/machine/i2cmem.cpp
index d77e12ef4be..ba320d1f5cd 100644
--- a/src/devices/machine/i2cmem.cpp
+++ b/src/devices/machine/i2cmem.cpp
@@ -78,6 +78,7 @@ i2cmem_device::i2cmem_device( const machine_config &mconfig, const char *tag, de
: device_t(mconfig, I2CMEM, "I2C Memory", tag, owner, clock, "i2cmem", __FILE__),
device_memory_interface(mconfig, *this),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_slave_address( I2CMEM_SLAVE_ADDRESS ),
m_page_size( 0 ),
m_data_size( 0 ),
@@ -175,11 +176,11 @@ void i2cmem_device::nvram_default()
UINT16 default_value = 0xff;
for( offs_t offs = 0; offs < i2cmem_bytes; offs++ )
{
- m_addrspace[ 0 ]->write_byte( offs, default_value );
+ space(AS_PROGRAM).write_byte( offs, default_value );
}
/* populate from a memory region if present */
- if( m_region != nullptr )
+ if (m_region.found())
{
if( m_region->bytes() != i2cmem_bytes )
{
@@ -193,7 +194,7 @@ void i2cmem_device::nvram_default()
UINT8 *default_data = m_region->base();
for( offs_t offs = 0; offs < i2cmem_bytes; offs++ )
- m_addrspace[ 0 ]->write_byte( offs, default_data[offs] );
+ space(AS_PROGRAM).write_byte( offs, default_data[offs] );
}
}
@@ -212,7 +213,7 @@ void i2cmem_device::nvram_read( emu_file &file )
for( offs_t offs = 0; offs < i2cmem_bytes; offs++ )
{
- m_addrspace[ 0 ]->write_byte( offs, buffer[ offs ] );
+ space(AS_PROGRAM).write_byte( offs, buffer[ offs ] );
}
}
@@ -228,7 +229,7 @@ void i2cmem_device::nvram_write( emu_file &file )
for( offs_t offs = 0; offs < i2cmem_bytes; offs++ )
{
- buffer[ offs ] = m_addrspace[ 0 ]->read_byte( offs );
+ buffer[ offs ] = space(AS_PROGRAM).read_byte( offs );
}
file.write( &buffer[0], i2cmem_bytes );
@@ -375,7 +376,7 @@ WRITE_LINE_MEMBER( i2cmem_device::write_scl )
for( int i = 0; i < m_page_size; i++ )
{
- m_addrspace[ 0 ]->write_byte( offset + i, m_page[ i ] );
+ space(AS_PROGRAM).write_byte( offset + i, m_page[ i ] );
}
m_page_offset = 0;
@@ -386,7 +387,7 @@ WRITE_LINE_MEMBER( i2cmem_device::write_scl )
int offset = data_offset();
verboselog( this, 1, "data[ %04x ] <- %02x\n", offset, m_shift );
- m_addrspace[ 0 ]->write_byte( offset, m_shift );
+ space(AS_PROGRAM).write_byte( offset, m_shift );
m_byteaddr++;
}
@@ -419,7 +420,7 @@ WRITE_LINE_MEMBER( i2cmem_device::write_scl )
{
int offset = data_offset();
- m_shift = m_addrspace[ 0 ]->read_byte( offset );
+ m_shift = space(AS_PROGRAM).read_byte( offset );
verboselog( this, 1, "data[ %04x ] -> %02x\n", offset, m_shift );
m_byteaddr++;
}
diff --git a/src/devices/machine/i2cmem.h b/src/devices/machine/i2cmem.h
index d17d6f2f277..a45a51098e3 100644
--- a/src/devices/machine/i2cmem.h
+++ b/src/devices/machine/i2cmem.h
@@ -128,6 +128,8 @@ protected:
int select_device();
int data_offset();
+ optional_memory_region m_region;
+
// device-specific configuration
address_space_config m_space_config;
diff --git a/src/devices/machine/i6300esb.cpp b/src/devices/machine/i6300esb.cpp
index ec7ca934d31..649c437befd 100644
--- a/src/devices/machine/i6300esb.cpp
+++ b/src/devices/machine/i6300esb.cpp
@@ -90,7 +90,8 @@ i6300esb_lpc_device::i6300esb_lpc_device(const machine_config &mconfig, const ch
: pci_device(mconfig, I6300ESB_LPC, "i6300ESB southbridge ISA/LPC bridge", tag, owner, clock, "i6300esb_lpc", __FILE__),
acpi(*this, "acpi"),
rtc (*this, "rtc"),
- pit (*this, "pit")
+ pit (*this, "pit"),
+ m_region(*this, DEVICE_SELF)
{
}
diff --git a/src/devices/machine/i6300esb.h b/src/devices/machine/i6300esb.h
index 325e768dbba..e3f216123bc 100644
--- a/src/devices/machine/i6300esb.h
+++ b/src/devices/machine/i6300esb.h
@@ -35,6 +35,7 @@ private:
required_device<lpc_acpi_device> acpi;
required_device<lpc_rtc_device> rtc;
required_device<lpc_pit_device> pit;
+ required_memory_region m_region;
DECLARE_ADDRESS_MAP(internal_io_map, 32);
diff --git a/src/devices/machine/intelfsh.cpp b/src/devices/machine/intelfsh.cpp
index 54f9d4f722f..5f2c0a154ac 100644
--- a/src/devices/machine/intelfsh.cpp
+++ b/src/devices/machine/intelfsh.cpp
@@ -165,6 +165,7 @@ intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_memory_interface(mconfig, *this),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_type(variant),
m_size(0),
m_bits(8),
@@ -543,7 +544,7 @@ const address_space_config *intelfsh_device::memory_space_config(address_spacenu
void intelfsh_device::nvram_default()
{
// region always wins
- if (m_region != nullptr)
+ if (m_region.found())
{
UINT32 bytes = m_region->bytes();
if (bytes > m_size)
@@ -552,19 +553,19 @@ void intelfsh_device::nvram_default()
if (m_bits == 8)
{
for (offs_t offs = 0; offs < bytes; offs++)
- m_addrspace[0]->write_byte(offs, m_region->u8(offs));
+ space(AS_PROGRAM).write_byte(offs, m_region->u8(offs));
}
else
{
for (offs_t offs = 0; offs < bytes; offs += 2)
- m_addrspace[0]->write_word(offs, m_region->u16(offs / 2));
+ space(AS_PROGRAM).write_word(offs, m_region->u16(offs / 2));
}
return;
}
// otherwise, default to 0xff
for (offs_t offs = 0; offs < m_size; offs++)
- m_addrspace[0]->write_byte(offs, 0xff);
+ space(AS_PROGRAM).write_byte(offs, 0xff);
}
@@ -578,7 +579,7 @@ void intelfsh_device::nvram_read(emu_file &file)
dynamic_buffer buffer(m_size);
file.read(&buffer[0], m_size);
for (int byte = 0; byte < m_size; byte++)
- m_addrspace[0]->write_byte(byte, buffer[byte]);
+ space(AS_PROGRAM).write_byte(byte, buffer[byte]);
}
@@ -591,7 +592,7 @@ void intelfsh_device::nvram_write(emu_file &file)
{
dynamic_buffer buffer(m_size);
for (int byte = 0; byte < m_size; byte++)
- buffer[byte] = m_addrspace[0]->read_byte(byte);
+ buffer[byte] = space(AS_PROGRAM).read_byte(byte);
file.write(&buffer[0], m_size);
}
@@ -613,12 +614,12 @@ UINT32 intelfsh_device::read_full(UINT32 address)
{
case 8:
{
- data = m_addrspace[0]->read_byte(address);
+ data = space(AS_PROGRAM).read_byte(address);
}
break;
case 16:
{
- data = m_addrspace[0]->read_word(address * 2);
+ data = space(AS_PROGRAM).read_word(address * 2);
}
break;
}
@@ -692,12 +693,12 @@ UINT32 intelfsh_device::read_full(UINT32 address)
{
case 8:
{
- data = m_addrspace[0]->read_byte(address);
+ data = space(AS_PROGRAM).read_byte(address);
}
break;
case 16:
{
- data = m_addrspace[0]->read_word(address * 2);
+ data = space(AS_PROGRAM).read_word(address * 2);
}
break;
}
@@ -921,7 +922,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
{
// chip erase
for (offs_t offs = 0; offs < m_size; offs++)
- m_addrspace[0]->write_byte(offs, 0xff);
+ space(AS_PROGRAM).write_byte(offs, 0xff);
m_status = 1 << 3;
m_flash_mode = FM_ERASEAMD4;
@@ -947,14 +948,14 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
if (m_sector_is_4k)
{
for (offs_t offs = 0; offs < 4 * 1024; offs++)
- m_addrspace[0]->write_byte((base & ~0xfff) + offs, 0xff);
+ space(AS_PROGRAM).write_byte((base & ~0xfff) + offs, 0xff);
m_erase_sector = address & ((m_bits == 16) ? ~0x7ff : ~0xfff);
m_timer->adjust( attotime::from_msec( 125 ) );
}
else if(m_sector_is_16k)
{
for (offs_t offs = 0; offs < 16 * 1024; offs++)
- m_addrspace[0]->write_byte((base & ~0x3fff) + offs, 0xff);
+ space(AS_PROGRAM).write_byte((base & ~0x3fff) + offs, 0xff);
m_erase_sector = address & ((m_bits == 16) ? ~0x1fff : ~0x3fff);
m_timer->adjust( attotime::from_msec( 500 ) );
}
@@ -963,21 +964,21 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
if (address >= (m_size - (16*1024)))
{
for (offs_t offs = 0; offs < 16 * 1024; offs++)
- m_addrspace[0]->write_byte((base & ~0x3fff) + offs, 0xff);
+ space(AS_PROGRAM).write_byte((base & ~0x3fff) + offs, 0xff);
m_erase_sector = address & ((m_bits == 16) ? ~0x1fff : ~0x3fff);
m_timer->adjust( attotime::from_msec( 500 ) );
}
else if (address >= (m_size - (32*1024)))
{
for (offs_t offs = 0; offs < 8 * 1024; offs++)
- m_addrspace[0]->write_byte((base & ~0x1fff) + offs, 0xff);
+ space(AS_PROGRAM).write_byte((base & ~0x1fff) + offs, 0xff);
m_erase_sector = address & ((m_bits == 16) ? ~0xfff : ~0x1fff);
m_timer->adjust( attotime::from_msec( 250 ) );
}
else
{
for (offs_t offs = 0; offs < 32 * 1024; offs++)
- m_addrspace[0]->write_byte((base & ~0x7fff) + offs, 0xff);
+ space(AS_PROGRAM).write_byte((base & ~0x7fff) + offs, 0xff);
m_erase_sector = address & ((m_bits == 16) ? ~0x3fff : ~0x7fff);
m_timer->adjust( attotime::from_msec( 500 ) );
}
@@ -985,7 +986,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
else
{
for (offs_t offs = 0; offs < 64 * 1024; offs++)
- m_addrspace[0]->write_byte((base & ~0xffff) + offs, 0xff);
+ space(AS_PROGRAM).write_byte((base & ~0xffff) + offs, 0xff);
m_erase_sector = address & ((m_bits == 16) ? ~0x7fff : ~0xffff);
m_timer->adjust( attotime::from_seconds( 1 ) );
}
@@ -1003,7 +1004,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
{
case 8:
{
- m_addrspace[0]->write_byte(address, data);
+ space(AS_PROGRAM).write_byte(address, data);
}
break;
default:
@@ -1016,14 +1017,10 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
switch( m_bits )
{
case 8:
- {
- m_addrspace[0]->write_byte(address, data);
- }
+ space(AS_PROGRAM).write_byte(address, data);
break;
case 16:
- {
- m_addrspace[0]->write_word(address * 2, data);
- }
+ space(AS_PROGRAM).write_word(address * 2, data);
break;
default:
logerror( "FM_WRITEPART1 not supported when m_bits == %d\n", m_bits );
@@ -1039,14 +1036,10 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
switch( m_bits )
{
case 8:
- {
- m_addrspace[0]->write_byte(address, data);
- }
+ space(AS_PROGRAM).write_byte(address, data);
break;
case 16:
- {
- m_addrspace[0]->write_word(address * 2, data);
- }
+ space(AS_PROGRAM).write_word(address * 2, data);
break;
default:
logerror( "FM_WRITEPAGEATMEL not supported when m_bits == %d\n", m_bits );
@@ -1068,7 +1061,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
// clear the 256 bytes block containing the current address to all 0xffs
UINT32 base = address * ((m_bits == 16) ? 2 : 1);
for (offs_t offs = 0; offs < 256; offs++)
- m_addrspace[0]->write_byte((base & ~0xff) + offs, 0xff);
+ space(AS_PROGRAM).write_byte((base & ~0xff) + offs, 0xff);
m_timer->adjust( attotime::from_msec( 4 ) );
}
@@ -1111,7 +1104,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
// clear the block containing the current address to all 0xffffs
for (offs_t offs = 0; offs < size / 2; offs += 2)
- m_addrspace[0]->write_word(base | offs, 0xffff);
+ space(AS_PROGRAM).write_word(base | offs, 0xffff);
m_timer->adjust( attotime::from_msec( duration ) );
}
@@ -1120,7 +1113,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
// clear the 64k block containing the current address to all 0xffs
UINT32 base = address * ((m_bits == 16) ? 2 : 1);
for (offs_t offs = 0; offs < 64 * 1024; offs++)
- m_addrspace[0]->write_byte((base & ~0xffff) + offs, 0xff);
+ space(AS_PROGRAM).write_byte((base & ~0xffff) + offs, 0xff);
m_timer->adjust( attotime::from_seconds( 1 ) );
}
diff --git a/src/devices/machine/intelfsh.h b/src/devices/machine/intelfsh.h
index 437d8c946c2..611c2a01d49 100644
--- a/src/devices/machine/intelfsh.h
+++ b/src/devices/machine/intelfsh.h
@@ -166,6 +166,8 @@ protected:
UINT32 read_full(UINT32 offset);
void write_full(UINT32 offset, UINT32 data);
+ optional_memory_region m_region;
+
// configuration state
address_space_config m_space_config;
UINT32 m_type;
@@ -205,8 +207,8 @@ public:
DECLARE_READ8_MEMBER(read) { return read_full(offset); }
DECLARE_WRITE8_MEMBER(write) { write_full(offset, data); }
- UINT8 read_raw(offs_t offset) { return m_addrspace[0]->read_byte(offset); }
- void write_raw(offs_t offset, UINT8 data) { m_addrspace[0]->write_byte(offset, data); }
+ UINT8 read_raw(offs_t offset) { return space(AS_PROGRAM).read_byte(offset); }
+ void write_raw(offs_t offset, UINT8 data) { space(AS_PROGRAM).write_byte(offset, data); }
};
@@ -225,8 +227,8 @@ public:
DECLARE_READ16_MEMBER(read) { return read_full(offset); }
DECLARE_WRITE16_MEMBER(write) { write_full(offset, data); }
- UINT16 read_raw(offs_t offset) { return m_addrspace[0]->read_word(offset * 2); }
- void write_raw(offs_t offset, UINT16 data) { m_addrspace[0]->write_word(offset * 2, data); }
+ UINT16 read_raw(offs_t offset) { return space(AS_PROGRAM).read_word(offset * 2); }
+ void write_raw(offs_t offset, UINT16 data) { space(AS_PROGRAM).write_word(offset * 2, data); }
};
diff --git a/src/devices/machine/k033906.cpp b/src/devices/machine/k033906.cpp
index d9953d2864f..b799ad11cd0 100644
--- a/src/devices/machine/k033906.cpp
+++ b/src/devices/machine/k033906.cpp
@@ -8,7 +8,6 @@
#include "emu.h"
#include "k033906.h"
-#include "video/voodoo.h"
//**************************************************************************
@@ -23,7 +22,7 @@ const device_type K033906 = &device_creator<k033906_device>;
//-------------------------------------------------
k033906_device::k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, K033906, "K033906 PCI bridge", tag, owner, clock, "k033906", __FILE__), m_reg_set(0), m_voodoo_tag(nullptr), m_voodoo(nullptr)
+ : device_t(mconfig, K033906, "K033906 PCI bridge", tag, owner, clock, "k033906", __FILE__), m_reg_set(0), m_voodoo(*this)
{
}
@@ -33,8 +32,6 @@ k033906_device::k033906_device(const machine_config &mconfig, const char *tag, d
void k033906_device::device_start()
{
- m_voodoo = (voodoo_device*)machine().device(m_voodoo_tag);
-
m_reg_set = 0;
save_item(NAME(m_reg));
diff --git a/src/devices/machine/k033906.h b/src/devices/machine/k033906.h
index 438cc5796ab..e493244ce81 100644
--- a/src/devices/machine/k033906.h
+++ b/src/devices/machine/k033906.h
@@ -20,7 +20,7 @@
***************************************************************************/
#define MCFG_K033906_VOODOO(_tag) \
- k033906_device::set_voodoo_tag(*device, _tag);
+ k033906_device::set_voodoo_tag(*device, "^" _tag);
/***************************************************************************
TYPE DEFINITIONS
@@ -35,7 +35,7 @@ public:
// construction/destruction
k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- static void set_voodoo_tag(device_t &device, const char *tag) { downcast<k033906_device &>(device).m_voodoo_tag = tag; }
+ static void set_voodoo_tag(device_t &device, const char *tag) { downcast<k033906_device &>(device).m_voodoo.set_tag(tag); }
DECLARE_READ32_MEMBER( read );
DECLARE_WRITE32_MEMBER( write );
@@ -57,8 +57,7 @@ private:
int m_reg_set; // 1 = access reg / 0 = access ram
- const char *m_voodoo_tag;
- voodoo_device *m_voodoo;
+ required_device<voodoo_device> m_voodoo;
UINT32 m_reg[256];
UINT32 m_ram[32768];
diff --git a/src/devices/machine/k053252.cpp b/src/devices/machine/k053252.cpp
index 45020926ace..2a857d04bf5 100644
--- a/src/devices/machine/k053252.cpp
+++ b/src/devices/machine/k053252.cpp
@@ -76,8 +76,7 @@ k053252_device::k053252_device(const machine_config &mconfig, const char *tag, d
m_offsx(0),
m_offsy(0),
// ugly, needed to work with the rungun etc. video demux board
- m_slave_screen_tag(nullptr),
- m_slave_screen(nullptr)
+ m_slave_screen(*this)
{
}
@@ -103,12 +102,6 @@ void k053252_device::device_start()
save_item(NAME(m_vbp));
save_item(NAME(m_vsw));
save_item(NAME(m_hsw));
-
- if (m_slave_screen_tag != nullptr)
- {
- // find the screen device if explicitly configured
- m_slave_screen = device().siblingdevice<screen_device>(m_slave_screen_tag);
- }
}
//-------------------------------------------------
@@ -181,7 +174,7 @@ void k053252_device::res_change()
m_screen->configure(m_hc, m_vc, visarea, refresh);
- if (m_slave_screen)
+ if (m_slave_screen.found())
m_slave_screen->configure(m_hc, m_vc, visarea, refresh);
#if 0
@@ -262,5 +255,5 @@ WRITE8_MEMBER( k053252_device::write )
void k053252_device::static_set_slave_screen(device_t &device, const char *tag)
{
k053252_device &dev = downcast<k053252_device &>(device);
- dev.m_slave_screen_tag = tag;
+ dev.m_slave_screen.set_tag(tag);
}
diff --git a/src/devices/machine/k053252.h b/src/devices/machine/k053252.h
index a00743789ad..54787a6ee78 100644
--- a/src/devices/machine/k053252.h
+++ b/src/devices/machine/k053252.h
@@ -27,7 +27,7 @@
k053252_device::set_offsets(*device, _offsx, _offsy);
#define MCFG_K053252_SET_SLAVE_SCREEN(_tag) \
- k053252_device::static_set_slave_screen(*device, _tag);
+ k053252_device::static_set_slave_screen(*device, "^" _tag);
class k053252_device : public device_t,
@@ -75,8 +75,7 @@ protected:
int m_offsx;
int m_offsy;
- const char * m_slave_screen_tag;
- screen_device * m_slave_screen;
+ optional_device<screen_device> m_slave_screen;
};
diff --git a/src/devices/machine/mc146818.cpp b/src/devices/machine/mc146818.cpp
index 9166e189952..1b659a610a0 100644
--- a/src/devices/machine/mc146818.cpp
+++ b/src/devices/machine/mc146818.cpp
@@ -33,6 +33,7 @@ const device_type MC146818 = &device_creator<mc146818_device>;
mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MC146818, "MC146818 RTC", tag, owner, clock, "mc146818", __FILE__),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_index(0),
m_last_refresh(attotime::zero), m_clock_timer(nullptr), m_periodic_timer(nullptr),
m_write_irq(*this),
@@ -48,6 +49,7 @@ mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag,
mc146818_device::mc146818_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_index(0),
m_last_refresh(attotime::zero), m_clock_timer(nullptr), m_periodic_timer(nullptr),
m_write_irq(*this),
@@ -193,14 +195,15 @@ void mc146818_device::device_timer(emu_timer &timer, device_timer_id id, int par
void mc146818_device::nvram_default()
{
// populate from a memory region if present
- if (m_region != nullptr)
+ memory_region *region = memregion(DEVICE_SELF);
+ if (region != nullptr)
{
- UINT32 bytes = m_region->bytes();
+ UINT32 bytes = region->bytes();
if (bytes > data_size())
bytes = data_size();
- memcpy(&m_data[0], m_region->base(), bytes);
+ memcpy(&m_data[0], region->base(), bytes);
}
else
{
diff --git a/src/devices/machine/mc146818.h b/src/devices/machine/mc146818.h
index c1c30eae17e..a7f16300b4b 100644
--- a/src/devices/machine/mc146818.h
+++ b/src/devices/machine/mc146818.h
@@ -167,6 +167,8 @@ private:
int get_year();
void set_year(int year);
+ optional_memory_region m_region;
+
// internal state
UINT8 m_index;
diff --git a/src/devices/machine/mos6530n.cpp b/src/devices/machine/mos6530n.cpp
index 31c15c65e1d..8f43b58405c 100644
--- a/src/devices/machine/mos6530n.cpp
+++ b/src/devices/machine/mos6530n.cpp
@@ -116,6 +116,7 @@ WRITE8_MEMBER(mos6532_t::io_w)
mos6530_base_t::mos6530_base_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_ram(*this),
+ m_rom(*this, DEVICE_SELF),
m_irq_cb(*this),
m_in_pa_cb(*this),
m_out_pa_cb(*this),
diff --git a/src/devices/machine/mos6530n.h b/src/devices/machine/mos6530n.h
index 71688040e89..b29fea9af93 100644
--- a/src/devices/machine/mos6530n.h
+++ b/src/devices/machine/mos6530n.h
@@ -268,7 +268,7 @@ protected:
void timer_w(offs_t offset, UINT8 data, bool ie);
UINT8 timer_r(bool ie);
- DECLARE_READ8_MEMBER( rom_r ) { return m_region->base()[offset]; }
+ DECLARE_READ8_MEMBER( rom_r ) { return m_rom[offset]; }
DECLARE_READ8_MEMBER( ram_r ) { return m_ram[offset]; }
DECLARE_WRITE8_MEMBER( ram_w ) { m_ram[offset] = data; }
DECLARE_READ8_MEMBER( pa_data_r );
@@ -287,6 +287,7 @@ protected:
DECLARE_WRITE8_MEMBER( edge_w );
optional_shared_ptr<UINT8> m_ram;
+ optional_region_ptr<UINT8> m_rom;
devcb_write_line m_irq_cb;
devcb_read8 m_in_pa_cb;
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 1ca8d185e47..bae8137edff 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -300,9 +300,8 @@ void netlist_mame_device_t::device_start()
//printf("clock is %d\n", clock());
- m_netlist = global_alloc(netlist_mame_t(*this));
+ m_netlist = global_alloc(netlist_mame_t(*this, "netlist"));
m_setup = global_alloc(netlist::setup_t(m_netlist));
- netlist().init_object(*m_netlist, "netlist");
m_setup->init();
// register additional devices
@@ -325,9 +324,9 @@ void netlist_mame_device_t::device_start()
m_setup->start_devices();
m_setup->resolve_inputs();
- netlist().save(NAME(m_rem));
- netlist().save(NAME(m_div));
- netlist().save(NAME(m_old));
+ netlist().save_item(m_rem, this, "m_rem");
+ netlist().save_item(m_div, this, "m_div");
+ netlist().save_item(m_old, this, "m_old");
save_state();
@@ -348,7 +347,7 @@ void netlist_mame_device_t::device_reset()
LOG_DEV_CALLS(("device_reset\n"));
m_old = netlist::netlist_time::zero;
m_rem = netlist::netlist_time::zero;
- netlist().do_reset();
+ netlist().reset();
}
void netlist_mame_device_t::device_stop()
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index 9550ee57f9d..00b1e3ad352 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -85,8 +85,8 @@ class netlist_mame_t : public netlist::netlist_t
{
public:
- netlist_mame_t(netlist_mame_device_t &parent)
- : netlist::netlist_t(),
+ netlist_mame_t(netlist_mame_device_t &parent, const pstring &aname)
+ : netlist::netlist_t(aname),
m_parent(parent)
{}
virtual ~netlist_mame_t() { };
diff --git a/src/devices/machine/nvram.cpp b/src/devices/machine/nvram.cpp
index 88d1191187a..3a88345eab3 100644
--- a/src/devices/machine/nvram.cpp
+++ b/src/devices/machine/nvram.cpp
@@ -25,6 +25,7 @@ const device_type NVRAM = &device_creator<nvram_device>;
nvram_device::nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, NVRAM, "NVRAM", tag, owner, clock, "nvram", __FILE__),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_default_value(DEFAULT_ALL_1),
m_base(nullptr),
m_length(0)
@@ -79,7 +80,7 @@ void nvram_device::nvram_default()
determine_final_base();
// region always wins
- if (m_region != nullptr)
+ if (m_region.found())
{
memcpy(m_base, m_region->base(), m_length);
return;
@@ -164,6 +165,6 @@ void nvram_device::determine_final_base()
}
// if we are region-backed for the default, find it now and make sure it's the right size
- if (m_region != nullptr && m_region->bytes() != m_length)
+ if (m_region.found() && m_region->bytes() != m_length)
throw emu_fatalerror("%s",string_format("NVRAM device '%s' has a default region, but it should be 0x%I64uX bytes", tag(), m_length).c_str());
}
diff --git a/src/devices/machine/nvram.h b/src/devices/machine/nvram.h
index ac6b62e7bca..c1a733a3953 100644
--- a/src/devices/machine/nvram.h
+++ b/src/devices/machine/nvram.h
@@ -99,6 +99,7 @@ protected:
void determine_final_base();
// configuration state
+ optional_memory_region m_region;
default_value m_default_value;
nvram_init_delegate m_custom_handler;
diff --git a/src/devices/machine/pci.cpp b/src/devices/machine/pci.cpp
index 5987a423a09..859b44dc939 100644
--- a/src/devices/machine/pci.cpp
+++ b/src/devices/machine/pci.cpp
@@ -59,7 +59,8 @@ DEVICE_ADDRESS_MAP_START(config_map, 32, pci_bridge_device)
ADDRESS_MAP_END
pci_device::pci_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
- : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ m_region(*this, DEVICE_SELF)
{
main_id = 0xffffffff;
revision = 0x00;
diff --git a/src/devices/machine/pci.h b/src/devices/machine/pci.h
index a88f0a3b7fb..9650efa8132 100644
--- a/src/devices/machine/pci.h
+++ b/src/devices/machine/pci.h
@@ -82,6 +82,8 @@ public:
virtual DECLARE_READ8_MEMBER(capptr_r);
protected:
+ optional_memory_region m_region;
+
enum {
M_MEM = 0,
M_IO = 1,
diff --git a/src/devices/machine/pla.cpp b/src/devices/machine/pla.cpp
index f96a2bd8f60..f2310201771 100644
--- a/src/devices/machine/pla.cpp
+++ b/src/devices/machine/pla.cpp
@@ -19,6 +19,7 @@ const device_type PLA = &device_creator<pla_device>;
pla_device::pla_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, PLA, "PLA", tag, owner, clock, "pla", __FILE__),
+ m_region(*this, DEVICE_SELF),
m_format(PLA_FMT_JEDBIN),
m_inputs(0),
m_outputs(0),
@@ -35,7 +36,6 @@ pla_device::pla_device(const machine_config &mconfig, const char *tag, device_t
void pla_device::device_start()
{
- assert(region() != nullptr);
assert(m_terms < MAX_TERMS);
assert(m_inputs < 32 && m_outputs <= 32);
@@ -74,11 +74,11 @@ void pla_device::parse_fusemap()
switch (m_format)
{
case PLA_FMT_JEDBIN:
- result = jedbin_parse(region()->base(), region()->bytes(), &jed);
+ result = jedbin_parse(m_region->base(), m_region->bytes(), &jed);
break;
case PLA_FMT_BERKELEY:
- result = pla_parse(region()->base(), region()->bytes(), &jed);
+ result = pla_parse(m_region->base(), m_region->bytes(), &jed);
break;
}
diff --git a/src/devices/machine/pla.h b/src/devices/machine/pla.h
index 9f14a155ac5..1fdffd023d9 100644
--- a/src/devices/machine/pla.h
+++ b/src/devices/machine/pla.h
@@ -109,6 +109,8 @@ protected:
private:
void parse_fusemap();
+ required_memory_region m_region;
+
int m_format;
UINT32 m_inputs;
diff --git a/src/devices/machine/rp5h01.cpp b/src/devices/machine/rp5h01.cpp
index 4a3138225a7..009757b6acf 100644
--- a/src/devices/machine/rp5h01.cpp
+++ b/src/devices/machine/rp5h01.cpp
@@ -20,7 +20,7 @@
#include "machine/rp5h01.h"
// this is the contents of an unprogrammed PROM
-static const UINT8 initial_data[0x10] =
+UINT8 rp5h01_device::s_initial_data[0x10] =
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00
@@ -34,7 +34,7 @@ const device_type RP5H01 = &device_creator<rp5h01_device>;
rp5h01_device::rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, RP5H01, "RP5H01 6/7-bit Counter", tag, owner, clock, "rp5h01", __FILE__)
- , m_rom_ptr(*this, DEVICE_SELF)
+ , m_data(*this, DEVICE_SELF, 0x10)
{
}
@@ -54,15 +54,8 @@ void rp5h01_device::device_config_complete()
void rp5h01_device::device_start()
{
- if (m_rom_ptr == nullptr)
- {
- m_data = initial_data;
- }
- else
- {
- m_data = m_rom_ptr;
- assert(region()->bytes() == 0x10);
- }
+ if (!m_data.found())
+ m_data.set_target(s_initial_data, 0x10);
/* register for state saving */
save_item(NAME(m_counter));
diff --git a/src/devices/machine/rp5h01.h b/src/devices/machine/rp5h01.h
index 0585b5ddf55..c33a80a998b 100644
--- a/src/devices/machine/rp5h01.h
+++ b/src/devices/machine/rp5h01.h
@@ -36,6 +36,8 @@ enum {
class rp5h01_device : public device_t
{
+ static UINT8 s_initial_data[0x10];
+
public:
rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -60,8 +62,7 @@ private:
int m_enabled; /* chip enable */
int m_old_reset; /* reset pin state (level-triggered) */
int m_old_clock; /* clock pin state (level-triggered) */
- const UINT8 *m_data;
- optional_region_ptr<UINT8> m_rom_ptr;
+ optional_region_ptr<UINT8> m_data;
};
extern const device_type RP5H01;
diff --git a/src/devices/machine/rtc9701.cpp b/src/devices/machine/rtc9701.cpp
index fc72c76c900..86f5378d2b4 100644
--- a/src/devices/machine/rtc9701.cpp
+++ b/src/devices/machine/rtc9701.cpp
@@ -15,6 +15,8 @@
#include "machine/rtc9701.h"
+ALLOW_SAVE_TYPE(rtc9701_state_t);
+
//**************************************************************************
// GLOBAL VARIABLES
@@ -104,6 +106,25 @@ void rtc9701_device::device_start()
rtc_state = RTC9701_CMD_WAIT;
cmd_stream_pos = 0;
current_cmd = 0;
+
+ save_item(NAME(m_latch));
+ save_item(NAME(m_reset_line));
+ save_item(NAME(m_clock_line));
+ save_item(NAME(rtc_state));
+ save_item(NAME(cmd_stream_pos));
+ save_item(NAME(current_cmd));
+ save_item(NAME(rtc9701_address_pos));
+ save_item(NAME(rtc9701_current_address));
+ save_item(NAME(rtc9701_current_data));
+ save_item(NAME(rtc9701_data_pos));
+ save_item(NAME(rtc9701_data));
+ save_item(NAME(m_rtc.sec));
+ save_item(NAME(m_rtc.min));
+ save_item(NAME(m_rtc.hour));
+ save_item(NAME(m_rtc.day));
+ save_item(NAME(m_rtc.wday));
+ save_item(NAME(m_rtc.month));
+ save_item(NAME(m_rtc.year));
}
diff --git a/src/devices/machine/serflash.cpp b/src/devices/machine/serflash.cpp
index f5a002ae929..1746b4583eb 100644
--- a/src/devices/machine/serflash.cpp
+++ b/src/devices/machine/serflash.cpp
@@ -9,6 +9,7 @@
#include "machine/serflash.h"
+ALLOW_SAVE_TYPE(flash_state_t);
//**************************************************************************
// LIVE DEVICE
@@ -42,12 +43,27 @@ void serflash_device::device_start()
m_flashwritemap.resize(m_length / FLASH_PAGE_SIZE);
memset(&m_flashwritemap[0], 0, m_length / FLASH_PAGE_SIZE);
+
+ save_item(NAME(m_flash_state));
+ save_item(NAME(m_flash_enab));
+ save_item(NAME(m_flash_cmd_seq));
+ save_item(NAME(m_flash_cmd_prev));
+ save_item(NAME(m_flash_addr_seq));
+ save_item(NAME(m_flash_read_seq));
+ save_item(NAME(m_flash_row));
+ save_item(NAME(m_flash_col));
+ save_item(NAME(m_flash_page_addr));
+ save_item(NAME(m_flash_page_index));
+ save_item(NAME(m_flashwritemap));
+ save_item(NAME(m_last_flash_cmd));
+ save_item(NAME(m_flash_addr));
+ save_item(NAME(m_flash_page_data));
}
void serflash_device::device_reset()
{
m_flash_enab = 0;
- flash_hard_reset(machine());
+ flash_hard_reset();
m_last_flash_cmd = 0x00;
m_flash_addr_seq = 0;
@@ -115,7 +131,7 @@ void serflash_device::nvram_write(emu_file &file)
file.write(&page, 4);
}
-void serflash_device::flash_hard_reset(running_machine &machine)
+void serflash_device::flash_hard_reset()
{
// logerror("%08x FLASH: RESET\n", cpuexec_describe_context(machine));
@@ -141,7 +157,7 @@ WRITE8_MEMBER( serflash_device::flash_enab_w )
m_flash_enab = data;
}
-void serflash_device::flash_change_state(running_machine &machine, flash_state_t state)
+void serflash_device::flash_change_state(flash_state_t state)
{
m_flash_state = state;
@@ -176,7 +192,7 @@ WRITE8_MEMBER( serflash_device::flash_cmd_w )
break;
case 0x70: // READ STATUS
- flash_change_state( space.machine(), STATE_READ_STATUS );
+ flash_change_state( STATE_READ_STATUS );
break;
case 0x80: // PAGE / CACHE PROGRAM
@@ -186,11 +202,11 @@ WRITE8_MEMBER( serflash_device::flash_cmd_w )
break;
case 0x90: // READ ID
- flash_change_state( space.machine(), STATE_READ_ID );
+ flash_change_state( STATE_READ_ID );
break;
case 0xff: // RESET
- flash_change_state( space.machine(), STATE_IDLE );
+ flash_change_state( STATE_IDLE );
break;
default:
@@ -210,7 +226,7 @@ WRITE8_MEMBER( serflash_device::flash_cmd_w )
m_flash_page_addr = m_flash_col;
m_flash_page_index = m_flash_row;
- flash_change_state( space.machine(), STATE_READ );
+ flash_change_state( STATE_READ );
//logerror("%08x FLASH: caching page = %04X\n", m_maincpu->pc(), m_flash_row);
}
@@ -219,7 +235,7 @@ WRITE8_MEMBER( serflash_device::flash_cmd_w )
case 0x60: // BLOCK ERASE
if (data==0xd0)
{
- flash_change_state( space.machine(), STATE_BLOCK_ERASE );
+ flash_change_state( STATE_BLOCK_ERASE );
m_flashwritemap[m_flash_col] |= 1;
memset(m_region + m_flash_col * FLASH_PAGE_SIZE, 0xff, FLASH_PAGE_SIZE);
//logerror("erased block %04x (%08x - %08x)\n", m_flash_col, m_flash_col * FLASH_PAGE_SIZE, ((m_flash_col+1) * FLASH_PAGE_SIZE)-1);
@@ -232,7 +248,7 @@ WRITE8_MEMBER( serflash_device::flash_cmd_w )
case 0x80:
if (data==0x10)
{
- flash_change_state( space.machine(), STATE_PAGE_PROGRAM );
+ flash_change_state( STATE_PAGE_PROGRAM );
m_flashwritemap[m_flash_row] |= (memcmp(m_region + m_flash_row * FLASH_PAGE_SIZE, m_flash_page_data, FLASH_PAGE_SIZE) != 0);
memcpy(m_region + m_flash_row * FLASH_PAGE_SIZE, m_flash_page_data, FLASH_PAGE_SIZE);
//logerror("re-written block %04x (%08x - %08x)\n", m_flash_row, m_flash_row * FLASH_PAGE_SIZE, ((m_flash_row+1) * FLASH_PAGE_SIZE)-1);
diff --git a/src/devices/machine/serflash.h b/src/devices/machine/serflash.h
index a5cf2c58bfb..9d3654fc9c3 100644
--- a/src/devices/machine/serflash.h
+++ b/src/devices/machine/serflash.h
@@ -50,7 +50,7 @@ public:
DECLARE_WRITE8_MEMBER( flash_data_w );
DECLARE_WRITE8_MEMBER( flash_cmd_w );
DECLARE_WRITE8_MEMBER( flash_enab_w );
- void flash_hard_reset(running_machine &machine);
+ void flash_hard_reset();
DECLARE_READ8_MEMBER(n3d_flash_r);
DECLARE_WRITE8_MEMBER(n3d_flash_cmd_w);
@@ -66,7 +66,7 @@ protected:
virtual void nvram_read(emu_file &file) override;
virtual void nvram_write(emu_file &file) override;
- void flash_change_state(running_machine &machine, flash_state_t state);
+ void flash_change_state(flash_state_t state);
// runtime state
size_t m_length;
diff --git a/src/devices/machine/tc009xlvc.cpp b/src/devices/machine/tc009xlvc.cpp
index 724bd5edf16..3a10002e8f6 100644
--- a/src/devices/machine/tc009xlvc.cpp
+++ b/src/devices/machine/tc009xlvc.cpp
@@ -46,7 +46,7 @@ WRITE8_MEMBER(tc0091lvc_device::tc0091lvc_paletteram_w)
g |= ((i & 2) >> 1);
r |= (i & 1);
- m_palette->set_pen_color(offset / 2, pal5bit(r), pal5bit(g), pal5bit(b));
+ m_gfxdecode->palette().set_pen_color(offset / 2, pal5bit(r), pal5bit(g), pal5bit(b));
}
}
@@ -168,8 +168,7 @@ tc0091lvc_device::tc0091lvc_device(const machine_config &mconfig, const char *ta
: device_t(mconfig, TC0091LVC, "Taito TC0091LVC", tag, owner, clock, "tc0091lvc", __FILE__),
device_memory_interface(mconfig, *this),
m_space_config("tc0091lvc", ENDIANNESS_LITTLE, 8,20, 0, nullptr, *ADDRESS_MAP_NAME(tc0091lvc_map8)),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -184,17 +183,6 @@ void tc0091lvc_device::static_set_gfxdecode_tag(device_t &device, const char *ta
}
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void tc0091lvc_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<tc0091lvc_device &>(device).m_palette.set_tag(tag);
-}
-
-
void tc0091lvc_device::device_config_complete()
{
// int address_bits = 20;
@@ -297,7 +285,8 @@ void tc0091lvc_device::device_start()
//printf("m_gfx_index %d\n", m_gfx_index);
- m_gfxdecode->set_gfx(m_gfx_index, std::make_unique<gfx_element>(m_palette, char_layout, (UINT8 *)m_pcg_ram, 0, m_palette->entries() / 16, 0));
+ palette_device &palette = m_gfxdecode->palette();
+ m_gfxdecode->set_gfx(m_gfx_index, std::make_unique<gfx_element>(palette, char_layout, (UINT8 *)m_pcg_ram, 0, palette.entries() / 16, 0));
}
void tc0091lvc_device::device_reset()
@@ -346,7 +335,7 @@ UINT32 tc0091lvc_device::screen_update(screen_device &screen, bitmap_ind16 &bitm
int x,y;
UINT8 global_flip;
- bitmap.fill(m_palette->black_pen(), cliprect);
+ bitmap.fill(m_gfxdecode->palette().black_pen(), cliprect);
if((m_vregs[4] & 0x20) == 0)
return 0;
@@ -367,7 +356,7 @@ UINT32 tc0091lvc_device::screen_update(screen_device &screen, bitmap_ind16 &bitm
res_y = (global_flip) ? 256-y : y;
if(screen.visible_area().contains(res_x, res_y))
- bitmap.pix16(res_y, res_x) = m_palette->pen(m_bitmap_ram[count]);
+ bitmap.pix16(res_y, res_x) = m_gfxdecode->palette().pen(m_bitmap_ram[count]);
count++;
}
diff --git a/src/devices/machine/tc009xlvc.h b/src/devices/machine/tc009xlvc.h
index 66911acd4e5..3f737cbf044 100644
--- a/src/devices/machine/tc009xlvc.h
+++ b/src/devices/machine/tc009xlvc.h
@@ -21,7 +21,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
DECLARE_READ8_MEMBER( vregs_r );
DECLARE_WRITE8_MEMBER( vregs_w );
@@ -80,7 +79,6 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
address_space_config m_space_config;
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type TC0091LVC;
@@ -88,8 +86,5 @@ extern const device_type TC0091LVC;
#define MCFG_TC0091LVC_GFXDECODE(_gfxtag) \
tc0091lvc_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_TC0091LVC_PALETTE(_palette_tag) \
- tc0091lvc_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif
diff --git a/src/devices/machine/timekpr.cpp b/src/devices/machine/timekpr.cpp
index 7b602c896c6..06aba0b7221 100644
--- a/src/devices/machine/timekpr.cpp
+++ b/src/devices/machine/timekpr.cpp
@@ -119,15 +119,16 @@ static int counter_from_ram( UINT8 *data, int offset )
// timekeeper_device_config - constructor
//-------------------------------------------------
-timekeeper_device::timekeeper_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+timekeeper_device::timekeeper_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int size)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
, device_nvram_interface(mconfig, *this)
- , m_default_data(*this, DEVICE_SELF)
+ , m_default_data(*this, DEVICE_SELF, size)
+ , m_size(size)
{
}
m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : timekeeper_device(mconfig, M48T02, "M48T02 Timekeeper", tag, owner, clock, "m48t02", __FILE__)
+ : timekeeper_device(mconfig, M48T02, "M48T02 Timekeeper", tag, owner, clock, "m48t02", __FILE__, 0x800)
{
m_offset_control = 0x7f8;
m_offset_seconds = 0x7f9;
@@ -139,11 +140,10 @@ m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, dev
m_offset_year = 0x7ff;
m_offset_century = -1;
m_offset_flags = -1;
- m_size = 0x800;
}
m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : timekeeper_device(mconfig, M48T35, "M48T35 Timekeeper", tag, owner, clock, "m48t35", __FILE__)
+ : timekeeper_device(mconfig, M48T35, "M48T35 Timekeeper", tag, owner, clock, "m48t35", __FILE__, 0x8000)
{
m_offset_control = 0x7ff8;
m_offset_seconds = 0x7ff9;
@@ -155,11 +155,10 @@ m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, dev
m_offset_year = 0x7fff;
m_offset_century = -1;
m_offset_flags = -1;
- m_size = 0x8000;
}
m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : timekeeper_device(mconfig, M48T37, "M48T37 Timekeeper", tag, owner, clock, "m48t37", __FILE__)
+ : timekeeper_device(mconfig, M48T37, "M48T37 Timekeeper", tag, owner, clock, "m48t37", __FILE__, 0x8000)
{
m_offset_control = 0x7ff8;
m_offset_seconds = 0x7ff9;
@@ -171,11 +170,10 @@ m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, dev
m_offset_year = 0x7fff;
m_offset_century = 0x7ff1;
m_offset_flags = 0x7ff0;
- m_size = 0x8000;
}
m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : timekeeper_device(mconfig, M48T58, "M48T58 Timekeeper", tag, owner, clock, "m48t58", __FILE__)
+ : timekeeper_device(mconfig, M48T58, "M48T58 Timekeeper", tag, owner, clock, "m48t58", __FILE__, 0x2000)
{
m_offset_control = 0x1ff8;
m_offset_seconds = 0x1ff9;
@@ -187,11 +185,10 @@ m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, dev
m_offset_year = 0x1fff;
m_offset_century = -1;
m_offset_flags = -1;
- m_size = 0x2000;
}
mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : timekeeper_device(mconfig, MK48T08, "MK48T08 Timekeeper", tag, owner, clock, "m48t08", __FILE__)
+ : timekeeper_device(mconfig, MK48T08, "MK48T08 Timekeeper", tag, owner, clock, "m48t08", __FILE__, 0x2000)
{
m_offset_control = 0x1ff8;
m_offset_seconds = 0x1ff9;
@@ -203,7 +200,6 @@ mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, d
m_offset_year = 0x1fff;
m_offset_century = 0x1ff1;
m_offset_flags = 0x1ff0;
- m_size = 0x2000;
}
@@ -231,11 +227,6 @@ void timekeeper_device::device_start()
m_century = make_bcd( systime.local_time.year / 100 );
m_data.resize( m_size );
- if (m_default_data)
- {
- assert(m_default_data.bytes() == m_size);
- }
-
save_item( NAME(m_control) );
save_item( NAME(m_seconds) );
save_item( NAME(m_minutes) );
@@ -398,7 +389,7 @@ READ8_MEMBER( timekeeper_device::read )
void timekeeper_device::nvram_default()
{
- if( m_default_data != nullptr )
+ if (m_default_data.found())
{
memcpy( &m_data[0], m_default_data, m_size );
}
diff --git a/src/devices/machine/timekpr.h b/src/devices/machine/timekpr.h
index 84c969b076d..3d96d2f394a 100644
--- a/src/devices/machine/timekpr.h
+++ b/src/devices/machine/timekpr.h
@@ -55,7 +55,7 @@ class timekeeper_device : public device_t,
{
protected:
// construction/destruction
- timekeeper_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ timekeeper_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int size);
public:
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/devices/machine/vrc4373.cpp b/src/devices/machine/vrc4373.cpp
index c6797193c49..50257a2d076 100644
--- a/src/devices/machine/vrc4373.cpp
+++ b/src/devices/machine/vrc4373.cpp
@@ -31,8 +31,8 @@ ADDRESS_MAP_END
vrc4373_device::vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: pci_host_device(mconfig, VRC4373, "NEC VRC4373 System Controller", tag, owner, clock, "vrc4373", __FILE__), m_cpu_space(nullptr), m_cpu(nullptr), cpu_tag(nullptr),
m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32),
- m_io_config("io_space", ENDIANNESS_LITTLE, 32, 32), m_ram_size(0), m_ram_base(0), m_simm_size(0), m_simm_base(0), m_pci1_laddr(0), m_pci2_laddr(0), m_pci_io_laddr(0), m_target1_laddr(0), m_target2_laddr(0)
-
+ m_io_config("io_space", ENDIANNESS_LITTLE, 32, 32), m_ram_size(0), m_ram_base(0), m_simm_size(0), m_simm_base(0), m_pci1_laddr(0), m_pci2_laddr(0), m_pci_io_laddr(0), m_target1_laddr(0), m_target2_laddr(0),
+ m_region(*this, DEVICE_SELF)
{
}
diff --git a/src/devices/machine/vrc4373.h b/src/devices/machine/vrc4373.h
index bbd740b8084..9c9e65588a8 100644
--- a/src/devices/machine/vrc4373.h
+++ b/src/devices/machine/vrc4373.h
@@ -124,6 +124,7 @@ private:
UINT32 m_pci1_laddr, m_pci2_laddr, m_pci_io_laddr;
UINT32 m_target1_laddr, m_target2_laddr;
+ required_memory_region m_region;
};
diff --git a/src/devices/machine/x2212.cpp b/src/devices/machine/x2212.cpp
index cb6fc2b57e9..63d28a322e4 100644
--- a/src/devices/machine/x2212.cpp
+++ b/src/devices/machine/x2212.cpp
@@ -46,11 +46,13 @@ x2212_device::x2212_device(const machine_config &mconfig, const char *tag, devic
m_sram_space_config("SRAM", ENDIANNESS_BIG, 8, 8, 0, *ADDRESS_MAP_NAME(x2212_sram_map)),
m_e2prom_space_config("E2PROM", ENDIANNESS_BIG, 8, 8, 0, *ADDRESS_MAP_NAME(x2212_e2prom_map)),
m_store(false),
- m_array_recall(false)
+ m_array_recall(false),
+ m_size_data(0x100),
+ m_default_data(*this, DEVICE_SELF, 0x100)
{
}
-x2212_device::x2212_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+x2212_device::x2212_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int size_data)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_memory_interface(mconfig, *this),
device_nvram_interface(mconfig, *this),
@@ -58,7 +60,9 @@ x2212_device::x2212_device(const machine_config &mconfig, device_type type, cons
m_sram_space_config("SRAM", ENDIANNESS_BIG, 8, 8, 0, *ADDRESS_MAP_NAME(x2212_sram_map)),
m_e2prom_space_config("E2PROM", ENDIANNESS_BIG, 8, 8, 0, *ADDRESS_MAP_NAME(x2212_e2prom_map)),
m_store(false),
- m_array_recall(false)
+ m_array_recall(false),
+ m_size_data(size_data),
+ m_default_data(*this, DEVICE_SELF, size_data)
{
}
@@ -81,22 +85,8 @@ void x2212_device::device_start()
{
save_item(NAME(m_store));
save_item(NAME(m_array_recall));
-
- m_sram = m_addrspace[0];
- m_e2prom = m_addrspace[1];
-
- SIZE_DATA = 0x100;
-}
-
-void x2210_device::device_start()
-{
- save_item(NAME(m_store));
- save_item(NAME(m_array_recall));
-
- m_sram = m_addrspace[0];
- m_e2prom = m_addrspace[1];
-
- SIZE_DATA = 0x40;
+ m_sram = &space(AS_0);
+ m_e2prom = &space(AS_1);
}
@@ -119,23 +109,17 @@ const address_space_config *x2212_device::memory_space_config(address_spacenum s
void x2212_device::nvram_default()
{
// default to all-0xff
- for (int byte = 0; byte < SIZE_DATA; byte++)
+ for (int byte = 0; byte < m_size_data; byte++)
{
m_sram->write_byte(byte, 0xff);
m_e2prom->write_byte(byte, 0xff);
}
// populate from a memory region if present
- if (m_region != nullptr)
+ if (m_default_data.found())
{
- if (m_region->bytes() != SIZE_DATA)
- fatalerror("x2212 region '%s' wrong size (expected size = 0x100)\n", tag());
- if (m_region->bytewidth() != 1)
- fatalerror("x2212 region '%s' needs to be an 8-bit region\n", tag());
-
- UINT8 *default_data = m_region->base();
- for (int byte = 0; byte < SIZE_DATA; byte++)
- m_e2prom->write_byte(byte, default_data[byte]);
+ for (int byte = 0; byte < m_size_data; byte++)
+ m_e2prom->write_byte(byte, m_default_data[byte]);
}
}
@@ -147,9 +131,9 @@ void x2212_device::nvram_default()
void x2212_device::nvram_read(emu_file &file)
{
- UINT8 *buffer = (UINT8 *) alloca(SIZE_DATA);
- file.read(buffer, SIZE_DATA);
- for (int byte = 0; byte < SIZE_DATA; byte++)
+ UINT8 *buffer = (UINT8 *) alloca(m_size_data);
+ file.read(buffer, m_size_data);
+ for (int byte = 0; byte < m_size_data; byte++)
{
m_sram->write_byte(byte, 0xff);
m_e2prom->write_byte(byte, buffer[byte]);
@@ -168,10 +152,10 @@ void x2212_device::nvram_write(emu_file &file)
if (m_auto_save)
store();
- UINT8 *buffer = (UINT8 *) alloca(SIZE_DATA);
- for (int byte = 0; byte < SIZE_DATA; byte++)
+ UINT8 *buffer = (UINT8 *) alloca(m_size_data);
+ for (int byte = 0; byte < m_size_data; byte++)
buffer[byte] = m_e2prom->read_byte(byte);
- file.write(buffer, SIZE_DATA);
+ file.write(buffer, m_size_data);
}
@@ -187,7 +171,7 @@ void x2212_device::nvram_write(emu_file &file)
void x2212_device::store()
{
- for (int byte = 0; byte < SIZE_DATA; byte++)
+ for (int byte = 0; byte < m_size_data; byte++)
m_e2prom->write_byte(byte, m_sram->read_byte(byte));
}
@@ -199,7 +183,7 @@ void x2212_device::store()
void x2212_device::recall()
{
- for (int byte = 0; byte < SIZE_DATA; byte++)
+ for (int byte = 0; byte < m_size_data; byte++)
m_sram->write_byte(byte, m_e2prom->read_byte(byte));
}
@@ -256,6 +240,6 @@ WRITE_LINE_MEMBER( x2212_device::recall )
x2210_device::x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : x2212_device(mconfig, X2210, "X2210", tag, owner, clock, "x2210", __FILE__)
+ : x2212_device(mconfig, X2210, "X2210", tag, owner, clock, "x2210", __FILE__, 0x40)
{
}
diff --git a/src/devices/machine/x2212.h b/src/devices/machine/x2212.h
index 161cf399457..ffcc1dcf84b 100644
--- a/src/devices/machine/x2212.h
+++ b/src/devices/machine/x2212.h
@@ -49,7 +49,7 @@ class x2212_device : public device_t,
public:
// construction/destruction
x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- x2212_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ x2212_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int size_data);
// inline configuration helpers
static void static_set_auto_save(device_t &device);
@@ -77,8 +77,6 @@ protected:
virtual void nvram_read(emu_file &file) override;
virtual void nvram_write(emu_file &file) override;
- int SIZE_DATA;
-
// configuration state
bool m_auto_save;
@@ -92,16 +90,15 @@ protected:
bool m_store;
bool m_array_recall;
+
+ int m_size_data;
+ optional_region_ptr<UINT8> m_default_data;
};
class x2210_device : public x2212_device
{
public:
x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-protected:
- // device-level overrides
- virtual void device_start() override;
};
diff --git a/src/devices/machine/x76f041.cpp b/src/devices/machine/x76f041.cpp
index 21dea0ae141..481434abc77 100644
--- a/src/devices/machine/x76f041.cpp
+++ b/src/devices/machine/x76f041.cpp
@@ -37,6 +37,7 @@ const device_type X76F041 = &device_creator<x76f041_device>;
x76f041_device::x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
: device_t( mconfig, X76F041, "X76F041 Flash", tag, owner, clock, "x76f041", __FILE__ ),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_cs( 0 ),
m_rst( 0 ),
m_scl( 0 ),
@@ -498,7 +499,7 @@ void x76f041_device::nvram_default()
int expected_bytes = sizeof( m_response_to_reset ) + sizeof( m_write_password ) + sizeof( m_read_password ) +
sizeof( m_configuration_password ) + sizeof( m_configuration_registers ) + sizeof( m_data );
- if( !m_region )
+ if (!m_region.found())
{
logerror( "x76f041(%s) region not found\n", tag() );
}
diff --git a/src/devices/machine/x76f041.h b/src/devices/machine/x76f041.h
index 228540969eb..5c453aad6ee 100644
--- a/src/devices/machine/x76f041.h
+++ b/src/devices/machine/x76f041.h
@@ -99,6 +99,8 @@ private:
STATE_WRITE_CONFIGURATION_REGISTERS
};
+ optional_memory_region m_region;
+
// internal state
int m_cs;
int m_rst;
diff --git a/src/devices/machine/x76f100.cpp b/src/devices/machine/x76f100.cpp
index 830a0e51448..f254eed7ffc 100644
--- a/src/devices/machine/x76f100.cpp
+++ b/src/devices/machine/x76f100.cpp
@@ -35,6 +35,7 @@ const device_type X76F100 = &device_creator<x76f100_device>;
x76f100_device::x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
: device_t( mconfig, X76F100, "X76F100 Flash", tag, owner, clock, "x76f100", __FILE__ ),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_cs( 0 ),
m_rst( 0 ),
m_scl( 0 ),
@@ -391,7 +392,7 @@ void x76f100_device::nvram_default()
int expected_size = sizeof( m_response_to_reset ) + sizeof( m_write_password ) + sizeof( m_read_password ) + sizeof( m_data );
- if( !m_region )
+ if (!m_region.found())
{
logerror( "x76f100(%s) region not found\n", tag() );
}
diff --git a/src/devices/machine/x76f100.h b/src/devices/machine/x76f100.h
index 287a4a17a56..5ce4b5241c9 100644
--- a/src/devices/machine/x76f100.h
+++ b/src/devices/machine/x76f100.h
@@ -66,6 +66,8 @@ private:
STATE_WRITE_DATA
};
+ optional_memory_region m_region;
+
// internal state
int m_cs;
int m_rst;
diff --git a/src/devices/sound/2608intf.cpp b/src/devices/sound/2608intf.cpp
index ba6baba7bce..7c4a9d0739c 100644
--- a/src/devices/sound/2608intf.cpp
+++ b/src/devices/sound/2608intf.cpp
@@ -144,8 +144,8 @@ void ym2608_device::device_start()
/* stream system initialize */
m_stream = machine().sound().stream_alloc(*this,0,2,rate, stream_update_delegate(FUNC(ym2608_device::stream_generate),this));
/* setup adpcm buffers */
- pcmbufa = region()->base();
- pcmsizea = region()->bytes();
+ pcmbufa = m_region->base();
+ pcmsizea = m_region->bytes();
/* initialize YM2608 */
m_chip = ym2608_init(this,this,clock(),rate,
@@ -187,7 +187,8 @@ const device_type YM2608 = &device_creator<ym2608_device>;
ym2608_device::ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: ay8910_device(mconfig, YM2608, "YM2608", tag, owner, clock, PSG_TYPE_YM, 1, 2, "ym2608", __FILE__),
- m_irq_handler(*this)
+ m_irq_handler(*this),
+ m_region(*this, DEVICE_SELF)
{
}
diff --git a/src/devices/sound/2608intf.h b/src/devices/sound/2608intf.h
index f827f998521..0ec973b69ff 100644
--- a/src/devices/sound/2608intf.h
+++ b/src/devices/sound/2608intf.h
@@ -45,6 +45,7 @@ private:
emu_timer * m_timer[2];
void * m_chip;
devcb_write_line m_irq_handler;
+ required_memory_region m_region;
};
extern const device_type YM2608;
diff --git a/src/devices/sound/2610intf.cpp b/src/devices/sound/2610intf.cpp
index 4cc7f303795..776ad96d009 100644
--- a/src/devices/sound/2610intf.cpp
+++ b/src/devices/sound/2610intf.cpp
@@ -157,8 +157,8 @@ void ym2610_device::device_start()
m_stream = machine().sound().stream_alloc(*this,0,2,rate, stream_update_delegate(FUNC(ym2610_device::stream_generate),this));
/* setup adpcm buffers */
- void *pcmbufa = region()->base();
- int pcmsizea = region()->bytes();
+ void *pcmbufa = m_region->base();
+ int pcmsizea = m_region->bytes();
std::string name = tag() + std::string(".deltat");
memory_region *deltat_region = machine().root_device().memregion(name.c_str());
@@ -212,12 +212,14 @@ const device_type YM2610 = &device_creator<ym2610_device>;
ym2610_device::ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: ay8910_device(mconfig, YM2610, "YM2610", tag, owner, clock, PSG_TYPE_YM, 1, 0, "ym2610", __FILE__)
, m_irq_handler(*this)
+ , m_region(*this, DEVICE_SELF)
{
}
ym2610_device::ym2610_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: ay8910_device(mconfig, type, name, tag, owner, clock, PSG_TYPE_YM, 1, 0, shortname, source)
, m_irq_handler(*this)
+ , m_region(*this, DEVICE_SELF)
{
}
diff --git a/src/devices/sound/2610intf.h b/src/devices/sound/2610intf.h
index dcd0ef01787..b41843053ab 100644
--- a/src/devices/sound/2610intf.h
+++ b/src/devices/sound/2610intf.h
@@ -50,6 +50,7 @@ private:
sound_stream * m_stream;
emu_timer * m_timer[2];
devcb_write_line m_irq_handler;
+ required_memory_region m_region;
};
extern const device_type YM2610;
diff --git a/src/devices/sound/8950intf.cpp b/src/devices/sound/8950intf.cpp
index 4454b37f941..adc51009a0c 100644
--- a/src/devices/sound/8950intf.cpp
+++ b/src/devices/sound/8950intf.cpp
@@ -150,7 +150,7 @@ void y8950_device::device_start()
assert_always(m_chip != nullptr, "Error creating Y8950 chip");
/* ADPCM ROM data */
- y8950_set_delta_t_memory(m_chip, region()->base(), region()->bytes());
+ y8950_set_delta_t_memory(m_chip, m_region->base(), m_region->bytes());
m_stream = machine().sound().stream_alloc(*this,0,1,rate);
/* port and keyboard handler */
@@ -212,7 +212,8 @@ y8950_device::y8950_device(const machine_config &mconfig, const char *tag, devic
m_keyboard_read_handler(*this),
m_keyboard_write_handler(*this),
m_io_read_handler(*this),
- m_io_write_handler(*this)
+ m_io_write_handler(*this),
+ m_region(*this, DEVICE_SELF)
{
}
diff --git a/src/devices/sound/8950intf.h b/src/devices/sound/8950intf.h
index 53a35111f77..e548beffa62 100644
--- a/src/devices/sound/8950intf.h
+++ b/src/devices/sound/8950intf.h
@@ -73,6 +73,7 @@ private:
devcb_write8 m_keyboard_write_handler;
devcb_read8 m_io_read_handler;
devcb_write8 m_io_write_handler;
+ required_memory_region m_region;
};
extern const device_type Y8950;
diff --git a/src/devices/sound/digitalk.cpp b/src/devices/sound/digitalk.cpp
index 262e930bddf..d36bb77e4c3 100644
--- a/src/devices/sound/digitalk.cpp
+++ b/src/devices/sound/digitalk.cpp
@@ -266,7 +266,7 @@ const device_type DIGITALKER = &device_creator<digitalker_device>;
digitalker_device::digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DIGITALKER, "Digitalker", tag, owner, clock, "digitalker", __FILE__),
device_sound_interface(mconfig, *this),
- m_rom(nullptr),
+ m_rom(*this, DEVICE_SELF),
m_stream(nullptr),
m_data(0),
m_cs(0),
@@ -655,7 +655,6 @@ void digitalker_device::digitalker_register_for_save()
void digitalker_device::device_start()
{
- m_rom = m_region->base();
m_stream = stream_alloc(0, 1, clock()/4);
m_dac_index = 128;
m_data = 0xff;
diff --git a/src/devices/sound/digitalk.h b/src/devices/sound/digitalk.h
index 7be2a733c56..4142a50e3e2 100644
--- a/src/devices/sound/digitalk.h
+++ b/src/devices/sound/digitalk.h
@@ -59,7 +59,7 @@ private:
void digitalker_register_for_save();
private:
- const UINT8 *m_rom;
+ required_region_ptr<UINT8> m_rom;
sound_stream *m_stream;
// Port/lines state
diff --git a/src/devices/sound/gaelco.cpp b/src/devices/sound/gaelco.cpp
index 6fe6b0de784..16d647ba444 100644
--- a/src/devices/sound/gaelco.cpp
+++ b/src/devices/sound/gaelco.cpp
@@ -60,8 +60,7 @@ gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, const char
: device_t(mconfig, GAELCO_GAE1, "Gaelco GAE1", tag, owner, clock, "gaelco_gae1", __FILE__),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
- m_snd_data(nullptr),
- m_data_tag(nullptr)
+ m_snd_data(*this)
{
}
@@ -69,8 +68,7 @@ gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, device_typ
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
- m_snd_data(nullptr),
- m_data_tag(nullptr)
+ m_snd_data(*this)
{
}
@@ -242,8 +240,6 @@ void gaelco_gae1_device::device_start()
{
m_stream = stream_alloc(0, 2, 8000);
- m_snd_data = owner()->memregion(m_data_tag)->base();
-
/* init volume table */
for (int vol = 0; vol < GAELCO_VOLUME_LEVELS; vol++){
for (int j = -128; j <= 127; j++){
diff --git a/src/devices/sound/gaelco.h b/src/devices/sound/gaelco.h
index 8c128ab4bdc..91b90158667 100644
--- a/src/devices/sound/gaelco.h
+++ b/src/devices/sound/gaelco.h
@@ -14,7 +14,7 @@
//**************************************************************************
#define MCFG_GAELCO_SND_DATA(_tag) \
- gaelco_gae1_device::set_snd_data_tag(*device, _tag);
+ gaelco_gae1_device::set_snd_data_tag(*device, "^" _tag);
#define MCFG_GAELCO_BANKS(_offs1, _offs2, _offs3, _offs4) \
gaelco_gae1_device::set_bank_offsets(*device, _offs1, _offs2, _offs3, _offs4);
@@ -44,7 +44,7 @@ public:
gaelco_gae1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
~gaelco_gae1_device() { }
- static void set_snd_data_tag(device_t &device, const char *tag) { downcast<gaelco_gae1_device &>(device).m_data_tag = tag; }
+ static void set_snd_data_tag(device_t &device, const char *tag) { downcast<gaelco_gae1_device &>(device).m_snd_data.set_tag(tag); }
static void set_bank_offsets(device_t &device, int offs1, int offs2, int offs3, int offs4)
{
gaelco_gae1_device &dev = downcast<gaelco_gae1_device &>(device);
@@ -68,12 +68,10 @@ public:
private:
sound_stream *m_stream; /* our stream */
- UINT8 *m_snd_data; /* PCM data */
+ required_region_ptr<UINT8> m_snd_data; /* PCM data */
int m_banks[4]; /* start of each ROM bank */
gaelco_sound_channel m_channel[GAELCO_NUM_CHANNELS]; /* 7 stereo channels */
- const char *m_data_tag;
-
UINT16 m_sndregs[0x38];
// Table for converting from 8 to 16 bits with volume control
diff --git a/src/devices/sound/iremga20.cpp b/src/devices/sound/iremga20.cpp
index b913546337e..8f5daf20762 100644
--- a/src/devices/sound/iremga20.cpp
+++ b/src/devices/sound/iremga20.cpp
@@ -49,8 +49,7 @@ const device_type IREMGA20 = &device_creator<iremga20_device>;
iremga20_device::iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, IREMGA20, "Irem GA20", tag, owner, clock, "iremga20", __FILE__),
device_sound_interface(mconfig, *this),
- m_rom(nullptr),
- m_rom_size(0),
+ m_rom(*this, DEVICE_SELF),
m_stream(nullptr)
{
}
@@ -64,10 +63,6 @@ void iremga20_device::device_start()
{
int i;
- /* Initialize our chip structure */
- m_rom = m_region->base();
- m_rom_size = m_region->bytes();
-
iremga20_reset();
for ( i = 0; i < 0x40; i++ )
@@ -125,7 +120,7 @@ void iremga20_device::sound_stream_update(sound_stream &stream, stream_sample_t
}
i = samples;
- pSamples = m_rom;
+ pSamples = &m_rom[0];
outL = outputs[0];
outR = outputs[1];
diff --git a/src/devices/sound/iremga20.h b/src/devices/sound/iremga20.h
index 1b6d73674e2..daf1469df74 100644
--- a/src/devices/sound/iremga20.h
+++ b/src/devices/sound/iremga20.h
@@ -65,8 +65,7 @@ private:
void iremga20_reset();
private:
- UINT8 *m_rom;
- INT32 m_rom_size;
+ required_region_ptr<UINT8> m_rom;
sound_stream *m_stream;
UINT16 m_regs[0x40];
IremGA20_channel_def m_channel[4];
diff --git a/src/devices/sound/k005289.cpp b/src/devices/sound/k005289.cpp
index b49d97b1555..aa0fa52c110 100644
--- a/src/devices/sound/k005289.cpp
+++ b/src/devices/sound/k005289.cpp
@@ -56,7 +56,7 @@ const device_type K005289 = &device_creator<k005289_device>;
k005289_device::k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K005289, "K005289 SCC", tag, owner, clock, "k005289", __FILE__),
device_sound_interface(mconfig, *this),
- m_sound_prom(nullptr),
+ m_sound_prom(*this, DEVICE_SELF),
m_stream(nullptr),
m_rate(0),
m_mixer_table(nullptr),
@@ -82,8 +82,6 @@ void k005289_device::device_start()
/* build the mixer table */
make_mixer_table(2);
- m_sound_prom = m_region->base();
-
/* reset all the voices */
for (int i = 0; i < 2; i++)
{
@@ -119,7 +117,7 @@ void k005289_device::sound_stream_update(sound_stream &stream, stream_sample_t *
f=m_frequency[0];
if (v && f)
{
- const unsigned char *w = m_sound_prom + m_waveform[0];
+ const unsigned char *w = &m_sound_prom[m_waveform[0]];
int c = m_counter[0];
mix = m_mixer_buffer.get();
@@ -142,7 +140,7 @@ void k005289_device::sound_stream_update(sound_stream &stream, stream_sample_t *
f=m_frequency[1];
if (v && f)
{
- const unsigned char *w = m_sound_prom + m_waveform[1];
+ const unsigned char *w = &m_sound_prom[m_waveform[1]];
int c = m_counter[1];
mix = m_mixer_buffer.get();
diff --git a/src/devices/sound/k005289.h b/src/devices/sound/k005289.h
index 24f84638263..ad085ba9482 100644
--- a/src/devices/sound/k005289.h
+++ b/src/devices/sound/k005289.h
@@ -43,7 +43,7 @@ public:
private:
void make_mixer_table(int voices);
- const unsigned char *m_sound_prom;
+ required_region_ptr<UINT8> m_sound_prom;
sound_stream *m_stream;
int m_rate;
diff --git a/src/devices/sound/k007232.cpp b/src/devices/sound/k007232.cpp
index cc25519e4b9..1272f7b579b 100644
--- a/src/devices/sound/k007232.cpp
+++ b/src/devices/sound/k007232.cpp
@@ -162,7 +162,7 @@ k007232_device::k007232_device(const machine_config &mconfig, const char *tag, d
void k007232_device::device_start()
{
/* Set up the chips */
- m_pcmlimit = region()->bytes();
+ m_pcmlimit = m_rom.bytes();
m_port_write_handler.resolve();
diff --git a/src/devices/sound/k053260.cpp b/src/devices/sound/k053260.cpp
index f3ebc4b2445..01d70d0f676 100644
--- a/src/devices/sound/k053260.cpp
+++ b/src/devices/sound/k053260.cpp
@@ -76,10 +76,8 @@ const device_type K053260 = &device_creator<k053260_device>;
k053260_device::k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K053260, "K053260 KDSC", tag, owner, clock, "k053260", __FILE__),
device_sound_interface(mconfig, *this),
- m_rgnoverride(nullptr),
m_stream(nullptr),
- m_rom(nullptr),
- m_rom_size(0),
+ m_rom(*this, DEVICE_SELF),
m_keyon(0),
m_mode(0)
{
@@ -93,10 +91,6 @@ k053260_device::k053260_device(const machine_config &mconfig, const char *tag, d
void k053260_device::device_start()
{
- memory_region *ROM = (m_rgnoverride) ? owner()->memregion(m_rgnoverride) : region();
- m_rom = ROM->base();
- m_rom_size = ROM->bytes();
-
m_stream = stream_alloc( 0, 2, clock() / CLOCKS_PER_SAMPLE );
/* register with the save state system */
@@ -381,10 +375,10 @@ void k053260_device::KDSC_Voice::update_pan_volume()
void k053260_device::KDSC_Voice::key_on()
{
- if (m_start >= m_device->m_rom_size)
+ if (m_start >= m_device->m_rom.bytes())
m_device->logerror("K053260: Attempting to start playing past the end of the ROM ( start = %06x, length = %06x )\n", m_start, m_length);
- else if (m_start + m_length >= m_device->m_rom_size)
+ else if (m_start + m_length >= m_device->m_rom.bytes())
m_device->logerror("K053260: Attempting to play past the end of the ROM ( start = %06x, length = %06x )\n",
m_start, m_length);
@@ -462,10 +456,10 @@ UINT8 k053260_device::KDSC_Voice::read_rom()
m_position = (m_position + 1) & 0xffff;
- if (offs >= m_device->m_rom_size)
+ if (offs >= m_device->m_rom.bytes())
{
m_device->logerror("%s: K053260: Attempting to read past the end of the ROM (offs = %06x, size = %06x)\n",
- m_device->machine().describe_context(), offs, m_device->m_rom_size);
+ m_device->machine().describe_context(), offs, m_device->m_rom.bytes());
return 0;
}
diff --git a/src/devices/sound/k053260.h b/src/devices/sound/k053260.h
index ace87855740..e80a2da87d7 100644
--- a/src/devices/sound/k053260.h
+++ b/src/devices/sound/k053260.h
@@ -22,7 +22,7 @@
MCFG_DEVICE_REPLACE(_tag, K053260, _clock)
#define MCFG_K053260_REGION(_tag) \
- k053260_device::set_region_tag(*device, _tag);
+ k053260_device::set_region_tag(*device, "^" _tag);
//**************************************************************************
@@ -38,7 +38,7 @@ public:
k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~k053260_device() { }
- static void set_region_tag(device_t &device, const char *tag) { downcast<k053260_device &>(device).m_rgnoverride = tag; }
+ static void set_region_tag(device_t &device, const char *tag) { downcast<k053260_device &>(device).m_rom.set_tag(tag); }
DECLARE_READ8_MEMBER( main_read );
DECLARE_WRITE8_MEMBER( main_write );
@@ -55,11 +55,8 @@ protected:
private:
// configuration
- const char * m_rgnoverride;
-
sound_stream * m_stream;
- UINT8 * m_rom;
- UINT32 m_rom_size;
+ required_region_ptr<UINT8> m_rom;
// live state
UINT8 m_portdata[4];
diff --git a/src/devices/sound/k054539.cpp b/src/devices/sound/k054539.cpp
index 5270f5b80d6..41a2161569b 100644
--- a/src/devices/sound/k054539.cpp
+++ b/src/devices/sound/k054539.cpp
@@ -19,10 +19,19 @@ const device_type K054539 = &device_creator<k054539_device>;
k054539_device::k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K054539, "K054539 ADPCM", tag, owner, clock, "k054539", __FILE__),
- device_sound_interface(mconfig, *this), flags(0), ram(nullptr), reverb_pos(0), cur_ptr(0), cur_limit(0),
- cur_zone(nullptr), rom(nullptr), rom_size(0), rom_mask(0), stream(nullptr), m_timer(nullptr), m_timer_state(0),
- m_timer_handler(*this),
- m_rgnoverride(nullptr)
+ device_sound_interface(mconfig, *this),
+ flags(0),
+ ram(nullptr),
+ reverb_pos(0),
+ cur_ptr(0),
+ cur_limit(0),
+ cur_zone(nullptr),
+ m_rom(*this, DEVICE_SELF),
+ rom_mask(0),
+ stream(nullptr),
+ m_timer(nullptr),
+ m_timer_state(0),
+ m_timer_handler(*this)
{
}
@@ -190,10 +199,10 @@ void k054539_device::sound_stream_update(sound_stream &stream, stream_sample_t *
cur_pos += pdelta;
cur_pval = cur_val;
- cur_val = (INT16)(rom[cur_pos] << 8);
+ cur_val = (INT16)(m_rom[cur_pos] << 8);
if(cur_val == (INT16)0x8000 && (base2[1] & 1)) {
cur_pos = (base1[0x08] | (base1[0x09] << 8) | (base1[0x0a] << 16)) & rom_mask;
- cur_val = (INT16)(rom[cur_pos] << 8);
+ cur_val = (INT16)(m_rom[cur_pos] << 8);
}
if(cur_val == (INT16)0x8000) {
keyoff(ch);
@@ -213,10 +222,10 @@ void k054539_device::sound_stream_update(sound_stream &stream, stream_sample_t *
cur_pos += pdelta;
cur_pval = cur_val;
- cur_val = (INT16)(rom[cur_pos] | rom[cur_pos+1]<<8);
+ cur_val = (INT16)(m_rom[cur_pos] | m_rom[cur_pos+1]<<8);
if(cur_val == (INT16)0x8000 && (base2[1] & 1)) {
cur_pos = (base1[0x08] | (base1[0x09] << 8) | (base1[0x0a] << 16)) & rom_mask;
- cur_val = (INT16)(rom[cur_pos] | rom[cur_pos+1]<<8);
+ cur_val = (INT16)(m_rom[cur_pos] | m_rom[cur_pos+1]<<8);
}
if(cur_val == (INT16)0x8000) {
keyoff(ch);
@@ -241,10 +250,10 @@ void k054539_device::sound_stream_update(sound_stream &stream, stream_sample_t *
cur_pos += pdelta;
cur_pval = cur_val;
- cur_val = rom[cur_pos>>1];
+ cur_val = m_rom[cur_pos>>1];
if(cur_val == 0x88 && (base2[1] & 1)) {
cur_pos = ((base1[0x08] | (base1[0x09] << 8) | (base1[0x0a] << 16)) & rom_mask) << 1;
- cur_val = rom[cur_pos>>1];
+ cur_val = m_rom[cur_pos>>1];
}
if(cur_val == 0x88) {
keyoff(ch);
@@ -311,12 +320,9 @@ void k054539_device::init_chip()
cur_ptr = 0;
memset(ram.get(), 0, 0x4000);
- memory_region *reg = (m_rgnoverride != nullptr) ? owner()->memregion(m_rgnoverride) : region();
- rom = reg->base();
- rom_size = reg->bytes();
rom_mask = 0xffffffffU;
for(int i=0; i<32; i++)
- if((1U<<i) >= rom_size) {
+ if((1U<<i) >= m_rom.bytes()) {
rom_mask = (1U<<i) - 1;
break;
}
@@ -429,7 +435,7 @@ WRITE8_MEMBER(k054539_device::write)
case 0x22e:
cur_zone =
data == 0x80 ? ram.get() :
- rom + 0x20000*data;
+ &m_rom[0x20000*data];
cur_limit = data == 0x80 ? 0x4000 : 0x20000;
cur_ptr = 0;
break;
@@ -466,7 +472,7 @@ WRITE8_MEMBER(k054539_device::write)
void k054539_device::device_post_load()
{
int data = regs[0x22e];
- cur_zone = data == 0x80 ? ram.get() : rom + 0x20000*data;
+ cur_zone = data == 0x80 ? ram.get() : &m_rom[0x20000*data];
cur_limit = data == 0x80 ? 0x4000 : 0x20000;
}
diff --git a/src/devices/sound/k054539.h b/src/devices/sound/k054539.h
index fd196d306b8..a035f941f2b 100644
--- a/src/devices/sound/k054539.h
+++ b/src/devices/sound/k054539.h
@@ -18,7 +18,7 @@ typedef device_delegate<void (double left, double right)> k054539_cb_delegate;
k054539_device::set_analog_callback(*device, k054539_cb_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
#define MCFG_K054539_REGION_OVERRRIDE(_region) \
- k054539_device::set_override(*device, _region);
+ k054539_device::set_override(*device, "^" _region);
#define MCFG_K054539_TIMER_HANDLER(_devcb) \
devcb = &k054539_device::set_timer_handler(*device, DEVCB_##_devcb);
@@ -46,7 +46,7 @@ public:
// static configuration helpers
static void set_analog_callback(device_t &device, k054539_cb_delegate callback) { downcast<k054539_device &>(device).m_apan_cb = callback; }
- static void set_override(device_t &device, const char *rgnoverride) { downcast<k054539_device &>(device).m_rgnoverride = rgnoverride; }
+ static void set_override(device_t &device, const char *rgnoverride) { downcast<k054539_device &>(device).m_rom.set_tag(rgnoverride); }
template<class _Object> static devcb_base &set_timer_handler(device_t &device, _Object object) { return downcast<k054539_device &>(device).m_timer_handler.set_callback(object); }
@@ -100,8 +100,7 @@ private:
INT32 cur_ptr;
int cur_limit;
unsigned char *cur_zone;
- unsigned char *rom;
- UINT32 rom_size;
+ required_region_ptr<UINT8> m_rom;
UINT32 rom_mask;
channel channels[8];
@@ -110,7 +109,6 @@ private:
emu_timer *m_timer;
UINT32 m_timer_state;
devcb_write_line m_timer_handler;
- const char *m_rgnoverride;
k054539_cb_delegate m_apan_cb;
bool regupdate();
diff --git a/src/devices/sound/l7a1045_l6028_dsp_a.cpp b/src/devices/sound/l7a1045_l6028_dsp_a.cpp
index ca30c79e5fc..526cbda9d9e 100644
--- a/src/devices/sound/l7a1045_l6028_dsp_a.cpp
+++ b/src/devices/sound/l7a1045_l6028_dsp_a.cpp
@@ -105,8 +105,7 @@ l7a1045_sound_device::l7a1045_sound_device(const machine_config &mconfig, const
device_sound_interface(mconfig, *this),
m_stream(nullptr),
m_key(0),
- m_rom(nullptr),
- m_rom_size(0)
+ m_rom(*this, DEVICE_SELF)
{
}
@@ -119,9 +118,6 @@ void l7a1045_sound_device::device_start()
{
/* Allocate the stream */
m_stream = stream_alloc(0, 2, 66150); //clock() / 384);
-
- m_rom = m_region->base();
- m_rom_size = m_region->bytes();
}
@@ -171,7 +167,7 @@ void l7a1045_sound_device::sound_stream_update(sound_stream &stream, stream_samp
}
- data = m_rom[(start + pos) & (m_rom_size-1)];
+ data = m_rom[(start + pos) & m_rom.mask()];
sample = ((INT8)(data & 0xfc)) << (3 - (data & 3));
frac += step;
@@ -252,7 +248,7 @@ WRITE16_MEMBER(l7a1045_sound_device::sound_data_w)
vptr->start |= (m_audiodat[m_audioregister][m_audiochannel].dat[1] & 0xffff) << (4);
vptr->start |= (m_audiodat[m_audioregister][m_audiochannel].dat[0] & 0xf000) >> (12);
- vptr->start &= m_rom_size - 1;
+ vptr->start &= m_rom.mask();
break;
case 0x01:
@@ -267,7 +263,7 @@ WRITE16_MEMBER(l7a1045_sound_device::sound_data_w)
vptr->end += vptr->start;
vptr->mode = false;
// hopefully it'll never happen? Maybe assert here?
- vptr->end &= m_rom_size - 1;
+ vptr->end &= m_rom.mask();
}
else // absolute
@@ -277,7 +273,7 @@ WRITE16_MEMBER(l7a1045_sound_device::sound_data_w)
vptr->end |= (m_audiodat[m_audioregister][m_audiochannel].dat[0] & 0xf000) >> (12);
vptr->mode = true;
- vptr->end &= m_rom_size - 1;
+ vptr->end &= m_rom.mask();
}
break;
diff --git a/src/devices/sound/l7a1045_l6028_dsp_a.h b/src/devices/sound/l7a1045_l6028_dsp_a.h
index e97edefc814..49c5670263d 100644
--- a/src/devices/sound/l7a1045_l6028_dsp_a.h
+++ b/src/devices/sound/l7a1045_l6028_dsp_a.h
@@ -48,8 +48,7 @@ private:
sound_stream *m_stream;
l7a1045_voice m_voice[32];
UINT32 m_key;
- UINT8 *m_rom;
- INT32 m_rom_size;
+ required_region_ptr<UINT8> m_rom;
UINT8 m_audiochannel;
UINT8 m_audioregister;
diff --git a/src/devices/sound/nile.cpp b/src/devices/sound/nile.cpp
index 3a21b1c6415..ecb193d005a 100644
--- a/src/devices/sound/nile.cpp
+++ b/src/devices/sound/nile.cpp
@@ -56,7 +56,7 @@ nile_device::nile_device(const machine_config &mconfig, const char *tag, device_
: device_t(mconfig, NILE, "NiLe", tag, owner, clock, "nile", __FILE__),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
- m_sound_ram(nullptr),
+ m_sound_ram(*this, DEVICE_SELF),
m_ctrl(0)
{
}
@@ -68,7 +68,6 @@ nile_device::nile_device(const machine_config &mconfig, const char *tag, device_
void nile_device::device_start()
{
- m_sound_ram = region()->base();
m_stream = stream_alloc(0, 2, 44100);
}
@@ -80,7 +79,7 @@ void nile_device::device_start()
void nile_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
- UINT8 *sound_ram = m_sound_ram;
+ UINT8 *sound_ram = &m_sound_ram[0];
int v, i, snum;
UINT16 *slot;
INT32 mix[48000*2];
diff --git a/src/devices/sound/nile.h b/src/devices/sound/nile.h
index 4265f439813..0a298d6b9b8 100644
--- a/src/devices/sound/nile.h
+++ b/src/devices/sound/nile.h
@@ -46,7 +46,7 @@ public:
private:
sound_stream *m_stream;
- UINT8 *m_sound_ram;
+ required_region_ptr<UINT8> m_sound_ram;
UINT16 m_sound_regs[0x80];
int m_vpos[NILE_VOICES];
int m_frac[NILE_VOICES];
diff --git a/src/devices/sound/okim6295.cpp b/src/devices/sound/okim6295.cpp
index 7e97d04e916..d7af7157792 100644
--- a/src/devices/sound/okim6295.cpp
+++ b/src/devices/sound/okim6295.cpp
@@ -91,6 +91,7 @@ okim6295_device::okim6295_device(const machine_config &mconfig, const char *tag,
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
m_space_config("samples", ENDIANNESS_LITTLE, 8, 18, 0, nullptr, *ADDRESS_MAP_NAME(okim6295)),
+ m_region(*this, DEVICE_SELF),
m_command(-1),
m_bank_installed(false),
m_bank_offs(0),
diff --git a/src/devices/sound/okim6295.h b/src/devices/sound/okim6295.h
index 36be5b3a084..4fb85839f5c 100644
--- a/src/devices/sound/okim6295.h
+++ b/src/devices/sound/okim6295.h
@@ -103,6 +103,7 @@ protected:
// configuration state
const address_space_config m_space_config;
+ optional_memory_region m_region;
// internal state
static const int OKIM6295_VOICES = 4;
diff --git a/src/devices/sound/tc8830f.cpp b/src/devices/sound/tc8830f.cpp
index 06759146d93..1db6ab5bad4 100644
--- a/src/devices/sound/tc8830f.cpp
+++ b/src/devices/sound/tc8830f.cpp
@@ -37,7 +37,8 @@ tc8830f_device::tc8830f_device(const machine_config &mconfig, const char *tag, d
m_output(0),
m_command(0),
m_cmd_rw(0),
- m_phrase(0), m_mem_base(nullptr), m_mem_mask(0)
+ m_phrase(0),
+ m_mem(*this, DEVICE_SELF)
{
}
@@ -47,9 +48,6 @@ void tc8830f_device::device_start()
// create the stream
m_stream = stream_alloc(0, 1, clock() / 0x10);
- m_mem_base = region()->base();
- m_mem_mask = region()->bytes() - 1;
-
// register for savestates
save_item(NAME(m_playing));
save_item(NAME(m_address));
@@ -90,11 +88,11 @@ void tc8830f_device::sound_stream_update(sound_stream &stream, stream_sample_t *
if (m_playing)
{
// get bit
- int bit = m_mem_base[m_address] >> m_bitcount & 1;
+ int bit = m_mem[m_address] >> m_bitcount & 1;
m_bitcount = (m_bitcount + 1) & 7;
if (m_bitcount == 0)
{
- m_address = (m_address + 1) & m_mem_mask;
+ m_address = (m_address + 1) & m_mem.mask();
if (m_address == m_stop_address)
m_playing = false;
}
@@ -199,7 +197,7 @@ void tc8830f_device::write_p(UINT8 data)
m_address = (m_address & ~(0xf << (m_cmd_rw*4))) | (data << (m_cmd_rw*4));
if (m_cmd_rw == 5)
{
- m_address &= m_mem_mask;
+ m_address &= m_mem.mask();
m_bitcount = 0;
m_cmd_rw = -1;
}
@@ -210,7 +208,7 @@ void tc8830f_device::write_p(UINT8 data)
m_stop_address = (m_stop_address & ~(0xf << (m_cmd_rw*4))) | (data << (m_cmd_rw*4));
if (m_cmd_rw == 5)
{
- m_stop_address &= m_mem_mask;
+ m_stop_address &= m_mem.mask();
m_cmd_rw = -1;
}
break;
@@ -234,9 +232,9 @@ void tc8830f_device::write_p(UINT8 data)
// update addresses and start
UINT8 offs = m_phrase * 4;
- m_address = (m_mem_base[offs] | m_mem_base[offs|1]<<8 | m_mem_base[offs|2]<<16) & m_mem_mask;
+ m_address = (m_mem[offs] | m_mem[offs|1]<<8 | m_mem[offs|2]<<16) & m_mem.mask();
offs += 4;
- m_stop_address = (m_mem_base[offs] | m_mem_base[offs|1]<<8 | m_mem_base[offs|2]<<16) & m_mem_mask;
+ m_stop_address = (m_mem[offs] | m_mem[offs|1]<<8 | m_mem[offs|2]<<16) & m_mem.mask();
m_bitcount = 0;
m_prevbits = 0;
diff --git a/src/devices/sound/tc8830f.h b/src/devices/sound/tc8830f.h
index 655e83167a6..7b7059152ca 100644
--- a/src/devices/sound/tc8830f.h
+++ b/src/devices/sound/tc8830f.h
@@ -60,8 +60,7 @@ private:
int m_cmd_rw;
UINT8 m_phrase;
- UINT8 *m_mem_base;
- UINT32 m_mem_mask;
+ required_region_ptr<UINT8> m_mem;
};
diff --git a/src/devices/sound/tms5110.cpp b/src/devices/sound/tms5110.cpp
index aa98b69697a..6e7de3e445c 100644
--- a/src/devices/sound/tms5110.cpp
+++ b/src/devices/sound/tms5110.cpp
@@ -1184,7 +1184,7 @@ void tms5110_device::device_reset()
m_RNG = 0x1FFF;
memset(m_u, 0, sizeof(m_u));
memset(m_x, 0, sizeof(m_x));
- if (m_table != nullptr)
+ if (m_table.found())
{
/* legacy interface */
m_schedule_dummy_read = TRUE;
@@ -1454,11 +1454,6 @@ void tmsprom_device::device_start()
m_pdc_cb.resolve_safe();
m_ctl_cb.resolve_safe();
- m_rom = region()->base();
- assert_always(m_rom != nullptr, "Error creating TMSPROM chip: No rom region found");
- m_prom = owner()->memregion(m_prom_region)->base();
- assert_always(m_prom != nullptr, "Error creating TMSPROM chip: No prom region found");
-
m_romclk_timer = timer_alloc(0);
m_romclk_timer->adjust(attotime::zero, 0, attotime::from_hz(clock()));
@@ -1614,7 +1609,8 @@ const device_type TMSPROM = &device_creator<tmsprom_device>;
tmsprom_device::tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TMSPROM, "TMSPROM", tag, owner, clock, "tmsprom", __FILE__),
- m_prom_region(""),
+ m_rom(*this, DEVICE_SELF),
+ m_prom(*this, 0x20),
m_rom_size(0),
m_pdc_bit(0),
m_ctl1_bit(0),
diff --git a/src/devices/sound/tms5110.h b/src/devices/sound/tms5110.h
index 8eb5306eaf9..8cba11e64f3 100644
--- a/src/devices/sound/tms5110.h
+++ b/src/devices/sound/tms5110.h
@@ -298,7 +298,7 @@ class tmsprom_device : public device_t
public:
tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- static void set_region(device_t &device, const char *region) { downcast<tmsprom_device &>(device).m_prom_region = region; }
+ static void set_region(device_t &device, const char *region) { downcast<tmsprom_device &>(device).m_prom.set_tag(region); }
static void set_rom_size(device_t &device, UINT32 rom_size) { downcast<tmsprom_device &>(device).m_rom_size = rom_size; }
static void set_pdc_bit(device_t &device, UINT8 pdc_bit) { downcast<tmsprom_device &>(device).m_pdc_bit = pdc_bit; }
static void set_ctl1_bit(device_t &device, UINT8 ctl1_bit) { downcast<tmsprom_device &>(device).m_ctl1_bit = ctl1_bit; }
@@ -339,7 +339,8 @@ private:
int m_prom_cnt;
- const char *m_prom_region; /* prom memory region - sound region is automatically assigned */
+ required_region_ptr<UINT8> m_rom;
+ required_region_ptr<UINT8> m_prom;
UINT32 m_rom_size; /* individual rom_size */
UINT8 m_pdc_bit; /* bit # of pdc line */
/* virtual bit 8: constant 0, virtual bit 9:constant 1 */
@@ -353,14 +354,12 @@ private:
devcb_write8 m_ctl_cb; /* tms ctl func */
emu_timer *m_romclk_timer;
- const UINT8 *m_rom;
- const UINT8 *m_prom;
};
extern const device_type TMSPROM;
#define MCFG_TMSPROM_REGION(_region) \
- tmsprom_device::set_region(*device, _region);
+ tmsprom_device::set_region(*device, "^" _region);
#define MCFG_TMSPROM_ROM_SIZE(_size) \
tmsprom_device::set_rom_size(*device, _size);
diff --git a/src/devices/sound/tms5220.cpp b/src/devices/sound/tms5220.cpp
index ca743e73d70..bb050d53182 100644
--- a/src/devices/sound/tms5220.cpp
+++ b/src/devices/sound/tms5220.cpp
@@ -525,7 +525,7 @@ static void printbits(long data, int num)
{
int i;
for (i=(num-1); i>=0; i--)
- fprintf(stderr,"%0ld", (data>>i)&1);
+ logerror("%0ld", (data>>i)&1);
}
#endif
#ifdef DEBUG_PARSE_FRAME_DUMP_HEX
@@ -534,19 +534,19 @@ static void printbits(long data, int num)
switch((num-1)&0xFC)
{
case 0:
- fprintf(stderr,"%0lx", data);
+ logerror("%0lx", data);
break;
case 4:
- fprintf(stderr,"%02lx", data);
+ logerror("%02lx", data);
break;
case 8:
- fprintf(stderr,"%03lx", data);
+ logerror("%03lx", data);
break;
case 12:
- fprintf(stderr,"%04lx", data);
+ logerror("%04lx", data);
break;
default:
- fprintf(stderr,"%04lx", data);
+ logerror("%04lx", data);
break;
}
}
@@ -625,7 +625,7 @@ void tms5220_device::data_write(int data)
m_fifo_tail = (m_fifo_tail + 1) % FIFO_SIZE;
m_fifo_count++;
#ifdef DEBUG_FIFO
- fprintf(stderr,"data_write: Added byte to FIFO (current count=%2d)\n", m_fifo_count);
+ logerror("data_write: Added byte to FIFO (current count=%2d)\n", m_fifo_count);
#endif
update_fifo_status_and_ints();
// if we just unset buffer low with that last write, and SPEN *was* zero (see circuit 251, sheet 12)
@@ -633,7 +633,7 @@ void tms5220_device::data_write(int data)
{
int i;
#ifdef DEBUG_FIFO
- fprintf(stderr,"data_write triggered SPEN to go active!\n");
+ logerror("data_write triggered SPEN to go active!\n");
#endif
// ...then we now have enough bytes to start talking; set zpar and clear out the new frame parameters (it will become old frame just before the first call to parse_frame() )
m_zpar = 1;
@@ -662,7 +662,7 @@ void tms5220_device::data_write(int data)
else
{
#ifdef DEBUG_FIFO
- fprintf(stderr,"data_write: Ran out of room in the tms52xx FIFO! this should never happen!\n");
+ logerror("data_write: Ran out of room in the tms52xx FIFO! this should never happen!\n");
// at this point, /READY should remain HIGH/inactive until the fifo has at least one byte open in it.
#endif
}
@@ -736,7 +736,7 @@ void tms5220_device::update_fifo_status_and_ints()
if (m_previous_TALK_STATUS == 1 && (TALK_STATUS == 0))
{
#ifdef VERBOSE
- fprintf(stderr,"Talk status WAS 1, is now 0, unsetting DDIS and firing an interrupt!\n");
+ logerror("Talk status WAS 1, is now 0, unsetting DDIS and firing an interrupt!\n");
#endif
set_interrupt_state(1);
m_DDIS = 0;
@@ -825,7 +825,7 @@ int tms5220_device::status_read()
/* clear the interrupt pin on status read */
set_interrupt_state(0);
#ifdef DEBUG_PIN_READS
- fprintf(stderr,"Status read: TS=%d BL=%d BE=%d\n", TALK_STATUS, m_buffer_low, m_buffer_empty);
+ logerror("Status read: TS=%d BL=%d BE=%d\n", TALK_STATUS, m_buffer_low, m_buffer_empty);
#endif
return (TALK_STATUS << 7) | (m_buffer_low << 6) | (m_buffer_empty << 5);
}
@@ -841,7 +841,7 @@ int tms5220_device::status_read()
int tms5220_device::ready_read()
{
#ifdef DEBUG_PIN_READS
- fprintf(stderr,"ready_read: ready pin read, io_ready is %d, fifo count is %d, DDIS(speak external) is %d\n", m_io_ready, m_fifo_count, m_DDIS);
+ logerror("ready_read: ready pin read, io_ready is %d, fifo count is %d, DDIS(speak external) is %d\n", m_io_ready, m_fifo_count, m_DDIS);
#endif
return ((m_fifo_count < FIFO_SIZE)||(!m_DDIS)) && m_io_ready;
}
@@ -899,7 +899,7 @@ int tms5220_device::cycles_to_ready()
int tms5220_device::int_read()
{
#ifdef DEBUG_PIN_READS
- fprintf(stderr,"int_read: irq pin read, state is %d\n", m_irq_pin);
+ logerror("int_read: irq pin read, state is %d\n", m_irq_pin);
#endif
return m_irq_pin;
}
@@ -918,7 +918,7 @@ void tms5220_device::process(INT16 *buffer, unsigned int size)
INT32 this_sample;
#ifdef VERBOSE
- fprintf(stderr,"process called with size of %d; IP=%d, PC=%d, subcycle=%d, m_SPEN=%d, m_TALK=%d, m_TALKD=%d\n", size, m_IP, m_PC, m_subcycle, m_SPEN, m_TALK, m_TALKD);
+ logerror("process called with size of %d; IP=%d, PC=%d, subcycle=%d, m_SPEN=%d, m_TALK=%d, m_TALKD=%d\n", size, m_IP, m_PC, m_subcycle, m_SPEN, m_TALK, m_TALKD);
#endif
/* loop until the buffer is full or we've stopped speaking */
@@ -975,14 +975,14 @@ void tms5220_device::process(INT16 *buffer, unsigned int size)
#ifdef DEBUG_GENERATION
/* Debug info for current parsed frame */
- fprintf(stderr, "OLDE: %d; NEWE: %d; OLDP: %d; NEWP: %d ", OLD_FRAME_SILENCE_FLAG, NEW_FRAME_SILENCE_FLAG, OLD_FRAME_UNVOICED_FLAG, NEW_FRAME_UNVOICED_FLAG);
- fprintf(stderr,"Processing new frame: ");
+ logerror( "OLDE: %d; NEWE: %d; OLDP: %d; NEWP: %d ", OLD_FRAME_SILENCE_FLAG, NEW_FRAME_SILENCE_FLAG, OLD_FRAME_UNVOICED_FLAG, NEW_FRAME_UNVOICED_FLAG);
+ logerror("Processing new frame: ");
if (m_inhibit == 0)
- fprintf(stderr, "Normal Frame\n");
+ logerror( "Normal Frame\n");
else
- fprintf(stderr,"Interpolation Inhibited\n");
- fprintf(stderr,"*** current Energy, Pitch and Ks = %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d\n",m_current_energy, m_current_pitch, m_current_k[0], m_current_k[1], m_current_k[2], m_current_k[3], m_current_k[4], m_current_k[5], m_current_k[6], m_current_k[7], m_current_k[8], m_current_k[9]);
- fprintf(stderr,"*** target Energy(idx), Pitch, and Ks = %04d(%x),%04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d\n",
+ logerror("Interpolation Inhibited\n");
+ logerror("*** current Energy, Pitch and Ks = %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d\n",m_current_energy, m_current_pitch, m_current_k[0], m_current_k[1], m_current_k[2], m_current_k[3], m_current_k[4], m_current_k[5], m_current_k[6], m_current_k[7], m_current_k[8], m_current_k[9]);
+ logerror("*** target Energy(idx), Pitch, and Ks = %04d(%x),%04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d, %04d\n",
(m_coeff->energytable[m_new_frame_energy_idx] * (1-m_zpar)),
m_new_frame_energy_idx,
(m_coeff->pitchtable[m_new_frame_pitch_idx] * (1-m_zpar)),
@@ -1006,7 +1006,7 @@ void tms5220_device::process(INT16 *buffer, unsigned int size)
int samples_per_frame = m_subc_reload?175:266; // either (13 A cycles + 12 B cycles) * 7 interps for normal SPEAK/SPKEXT, or (13*2 A cycles + 12 B cycles) * 7 interps for SPKSLOW
//int samples_per_frame = m_subc_reload?200:304; // either (13 A cycles + 12 B cycles) * 8 interps for normal SPEAK/SPKEXT, or (13*2 A cycles + 12 B cycles) * 8 interps for SPKSLOW
int current_sample = (m_subcycle - m_subc_reload)+(m_PC*(3-m_subc_reload))+((m_subc_reload?25:38)*((m_IP-1)&7));
- //fprintf(stderr, "CS: %03d", current_sample);
+ //logerror( "CS: %03d", current_sample);
// reset the current energy, pitch, etc to what it was at frame start
m_current_energy = (m_coeff->energytable[m_old_frame_energy_idx] * (1-m_old_zpar));
m_current_pitch = (m_coeff->pitchtable[m_old_frame_pitch_idx] * (1-m_old_zpar));
@@ -1089,18 +1089,18 @@ void tms5220_device::process(INT16 *buffer, unsigned int size)
}
this_sample = lattice_filter(); /* execute lattice filter */
#ifdef DEBUG_GENERATION_VERBOSE
- //fprintf(stderr,"C:%01d; ",m_subcycle);
- fprintf(stderr,"IP:%01d PC:%02d X:%04d E:%03d P:%03d Pc:%03d ",m_IP, m_PC, m_excitation_data, m_current_energy, m_current_pitch, m_pitch_count);
- //fprintf(stderr,"X:%04d E:%03d P:%03d Pc:%03d ", m_excitation_data, m_current_energy, m_current_pitch, m_pitch_count);
+ //logerror("C:%01d; ",m_subcycle);
+ logerror("IP:%01d PC:%02d X:%04d E:%03d P:%03d Pc:%03d ",m_IP, m_PC, m_excitation_data, m_current_energy, m_current_pitch, m_pitch_count);
+ //logerror("X:%04d E:%03d P:%03d Pc:%03d ", m_excitation_data, m_current_energy, m_current_pitch, m_pitch_count);
for (i=0; i<10; i++)
- fprintf(stderr,"K%d:%04d ", i+1, m_current_k[i]);
- fprintf(stderr,"Out:%06d ", this_sample);
+ logerror("K%d:%04d ", i+1, m_current_k[i]);
+ logerror("Out:%06d ", this_sample);
//#ifdef PERFECT_INTERPOLATION_HACK
-// fprintf(stderr,"%d%d%d%d",m_old_zpar,m_zpar,m_old_uv_zpar,m_uv_zpar);
+// logerror("%d%d%d%d",m_old_zpar,m_zpar,m_old_uv_zpar,m_uv_zpar);
//#else
-// fprintf(stderr,"x%dx%d",m_zpar,m_uv_zpar);
+// logerror("x%dx%d",m_zpar,m_uv_zpar);
//#endif
- fprintf(stderr,"\n");
+ logerror("\n");
#endif
/* next, force result to 14 bits (since its possible that the addition at the final (k1) stage of the lattice overflowed) */
while (this_sample > 16383) this_sample -= 32768;
@@ -1145,17 +1145,17 @@ void tms5220_device::process(INT16 *buffer, unsigned int size)
OLD_FRAME_UNVOICED_FLAG = NEW_FRAME_UNVOICED_FLAG; // m_OLDP
/* if TALK was clear last frame, halt speech now, since TALKD (latched from TALK on new frame) just went inactive. */
#ifdef DEBUG_GENERATION
- fprintf(stderr,"RESETL4, about to update status: IP=%d, PC=%d, subcycle=%d, m_SPEN=%d, m_TALK=%d, m_TALKD=%d\n", m_IP, m_PC, m_subcycle, m_SPEN, m_TALK, m_TALKD);
+ logerror("RESETL4, about to update status: IP=%d, PC=%d, subcycle=%d, m_SPEN=%d, m_TALK=%d, m_TALKD=%d\n", m_IP, m_PC, m_subcycle, m_SPEN, m_TALK, m_TALKD);
#endif
#ifdef DEBUG_GENERATION
if ((!m_TALK) && (!m_SPEN))
- fprintf(stderr,"tms5220_process: processing frame: TALKD = 0 caused by stop frame or buffer empty, halting speech.\n");
+ logerror("tms5220_process: processing frame: TALKD = 0 caused by stop frame or buffer empty, halting speech.\n");
#endif
m_TALKD = m_TALK; // TALKD is latched from TALK
update_fifo_status_and_ints(); // to trigger an interrupt if TALK_STATUS has changed
if ((!m_TALK) && m_SPEN) m_TALK = 1; // TALK is only activated if it wasn't already active, if m_SPEN is active, and if we're in RESETL4 (which we are).
#ifdef DEBUG_GENERATION
- fprintf(stderr,"RESETL4, status updated: IP=%d, PC=%d, subcycle=%d, m_SPEN=%d, m_TALK=%d, m_TALKD=%d\n", m_IP, m_PC, m_subcycle, m_SPEN, m_TALK, m_TALKD);
+ logerror("RESETL4, status updated: IP=%d, PC=%d, subcycle=%d, m_SPEN=%d, m_TALK=%d, m_TALKD=%d\n", m_IP, m_PC, m_subcycle, m_SPEN, m_TALK, m_TALKD);
#endif
}
m_subcycle = m_subc_reload;
@@ -1217,7 +1217,7 @@ static INT16 clip_analog(INT16 cliptemp)
* 0x xxxx xxxx xxxx -> 0b01111111
*/
#ifdef DEBUG_CLIP
- if ((cliptemp > 2047) || (cliptemp < -2048)) fprintf(stderr,"clipping cliptemp to range; was %d\n", cliptemp);
+ if ((cliptemp > 2047) || (cliptemp < -2048)) logerror("clipping cliptemp to range; was %d\n", cliptemp);
#endif
if (cliptemp > 2047) cliptemp = 2047;
else if (cliptemp < -2048) cliptemp = -2048;
@@ -1257,8 +1257,8 @@ static INT32 matrix_multiply(INT32 a, INT32 b)
while (b<-16384) { b+=32768; }
result = ((a*b)>>9); /** TODO: this isn't technically right to the chip, which truncates the lowest result bit, but it causes glitches otherwise. **/
#ifdef VERBOSE
- if (result>16383) fprintf(stderr,"matrix multiplier overflowed! a: %x, b: %x, result: %x", a, b, result);
- if (result<-16384) fprintf(stderr,"matrix multiplier underflowed! a: %x, b: %x, result: %x", a, b, result);
+ if (result>16383) logerror("matrix multiplier overflowed! a: %x, b: %x, result: %x", a, b, result);
+ if (result<-16384) logerror("matrix multiplier underflowed! a: %x, b: %x, result: %x", a, b, result);
#endif
return result;
}
@@ -1321,18 +1321,18 @@ INT32 tms5220_device::lattice_filter()
m_previous_energy = m_current_energy;
#ifdef DEBUG_LATTICE
int i;
- fprintf(stderr,"V:%04d ", m_u[10]);
+ logerror("V:%04d ", m_u[10]);
for (i = 9; i >= 0; i--)
{
- fprintf(stderr,"Y%d:%04d ", i+1, m_u[i]);
+ logerror("Y%d:%04d ", i+1, m_u[i]);
}
- fprintf(stderr,"\n");
- fprintf(stderr,"E:%04d ", err);
+ logerror("\n");
+ logerror("E:%04d ", err);
for (i = 9; i >= 0; i--)
{
- fprintf(stderr,"b%d:%04d ", i+1, m_x[i]);
+ logerror("b%d:%04d ", i+1, m_x[i]);
}
- fprintf(stderr,"\n");
+ logerror("\n");
#endif
return m_u[0];
}
@@ -1348,7 +1348,7 @@ void tms5220_device::process_command(unsigned char cmd)
{
int i;
#ifdef DEBUG_COMMAND_DUMP
- fprintf(stderr,"process_command called with parameter %02X\n",cmd);
+ logerror("process_command called with parameter %02X\n",cmd);
#endif
/* parse the command */
switch (cmd & 0x70)
@@ -1379,7 +1379,7 @@ void tms5220_device::process_command(unsigned char cmd)
if (TALK_STATUS == 0) /* TALKST must be clear for RB */
{
#ifdef VERBOSE
- fprintf(stderr,"read and branch command received\n");
+ logerror("read and branch command received\n");
#endif
m_RDB_flag = FALSE;
if (m_speechrom)
@@ -1495,7 +1495,7 @@ void tms5220_device::parse_frame()
i = extract_bits(2);
#ifdef DEBUG_PARSE_FRAME_DUMP
printbits(i,2);
- fprintf(stderr," ");
+ logerror(" ");
#endif
m_IP = reload_table[i];
}
@@ -1509,7 +1509,7 @@ void tms5220_device::parse_frame()
m_new_frame_energy_idx = extract_bits(m_coeff->energy_bits);
#ifdef DEBUG_PARSE_FRAME_DUMP
printbits(m_new_frame_energy_idx,m_coeff->energy_bits);
- fprintf(stderr," ");
+ logerror(" ");
#endif
update_fifo_status_and_ints();
if (m_DDIS && m_buffer_empty) goto ranout;
@@ -1522,14 +1522,14 @@ void tms5220_device::parse_frame()
rep_flag = extract_bits(1);
#ifdef DEBUG_PARSE_FRAME_DUMP
printbits(rep_flag, 1);
- fprintf(stderr," ");
+ logerror(" ");
#endif
// attempt to extract the pitch
m_new_frame_pitch_idx = extract_bits(m_coeff->pitch_bits);
#ifdef DEBUG_PARSE_FRAME_DUMP
printbits(m_new_frame_pitch_idx,m_coeff->pitch_bits);
- fprintf(stderr," ");
+ logerror(" ");
#endif
// if the new frame is unvoiced, be sure to zero out the k5-k10 parameters
m_uv_zpar = NEW_FRAME_UNVOICED_FLAG;
@@ -1545,7 +1545,7 @@ void tms5220_device::parse_frame()
m_new_frame_k_idx[i] = extract_bits(m_coeff->kbits[i]);
#ifdef DEBUG_PARSE_FRAME_DUMP
printbits(m_new_frame_k_idx[i],m_coeff->kbits[i]);
- fprintf(stderr," ");
+ logerror(" ");
#endif
update_fifo_status_and_ints();
if (m_DDIS && m_buffer_empty) goto ranout;
@@ -1564,25 +1564,25 @@ void tms5220_device::parse_frame()
m_new_frame_k_idx[i] = extract_bits(m_coeff->kbits[i]);
#ifdef DEBUG_PARSE_FRAME_DUMP
printbits(m_new_frame_k_idx[i],m_coeff->kbits[i]);
- fprintf(stderr," ");
+ logerror(" ");
#endif
update_fifo_status_and_ints();
if (m_DDIS && m_buffer_empty) goto ranout;
}
#ifdef DEBUG_PARSE_FRAME_DUMP
- fprintf(stderr,"\n");
+ logerror("\n");
#endif
#ifdef VERBOSE
if (m_DDIS)
- fprintf(stderr,"Parsed a frame successfully in FIFO - %d bits remaining\n", (m_fifo_count*8)-(m_fifo_bits_taken));
+ logerror("Parsed a frame successfully in FIFO - %d bits remaining\n", (m_fifo_count*8)-(m_fifo_bits_taken));
else
- fprintf(stderr,"Parsed a frame successfully in ROM\n");
+ logerror("Parsed a frame successfully in ROM\n");
#endif
return;
ranout:
#ifdef DEBUG_FRAME_ERRORS
- fprintf(stderr,"Ran out of bits on a parse!\n");
+ logerror("Ran out of bits on a parse!\n");
#endif
return;
}
@@ -1597,7 +1597,7 @@ void tms5220_device::set_interrupt_state(int state)
{
if (!TMS5220_IS_52xx) return; // bail out if not a 52xx chip, since there's no int pin
#ifdef DEBUG_PIN_READS
- fprintf(stderr,"irq pin set to state %d\n", state);
+ logerror("irq pin set to state %d\n", state);
#endif
if (!m_irq_handler.isnull() && state != m_irq_pin)
m_irq_handler(!state);
@@ -1614,7 +1614,7 @@ void tms5220_device::update_ready_state()
{
int state = ready_read();
#ifdef DEBUG_PIN_READS
- fprintf(stderr,"ready pin set to state %d\n", state);
+ logerror("ready pin set to state %d\n", state);
#endif
if (!m_readyq_handler.isnull() && state != m_ready_pin)
m_readyq_handler(!state);
@@ -1759,7 +1759,7 @@ void tms5220_device::device_reset()
m_speechrom->read(1);
m_schedule_dummy_read = FALSE;
}
-
+
// 5110 specific stuff
m_PDC = 0;
m_CTL_pins = 0;
@@ -1790,8 +1790,8 @@ void tms5220_device::device_timer(emu_timer &timer, device_timer_id id, int para
/* Write */
/* bring up to date first */
#ifdef DEBUG_IO_READY
- fprintf(stderr,"Serviced write: %02x\n", m_write_latch);
- //fprintf(stderr, "Processed write data: %02X\n", m_write_latch);
+ logerror("Serviced write: %02x\n", m_write_latch);
+ //logerror( "Processed write data: %02X\n", m_write_latch);
#endif
m_stream->update();
data_write(m_write_latch);
@@ -1802,7 +1802,7 @@ void tms5220_device::device_timer(emu_timer &timer, device_timer_id id, int para
m_stream->update();
m_read_latch = status_read();
#ifdef DEBUG_IO_READY
- fprintf(stderr,"Serviced read, returning %02x\n", m_read_latch);
+ logerror("Serviced read, returning %02x\n", m_read_latch);
#endif
break;
case 0x03:
@@ -1829,7 +1829,7 @@ WRITE_LINE_MEMBER( tms5220_device::rsq_w )
m_true_timing = 1;
state &= 0x01;
#ifdef DEBUG_RS_WS
- fprintf(stderr,"/RS written with data: %d\n", state);
+ logerror("/RS written with data: %d\n", state);
#endif
new_val = (m_rs_ws & 0x01) | (state<<1);
if (new_val != m_rs_ws)
@@ -1842,7 +1842,7 @@ WRITE_LINE_MEMBER( tms5220_device::rsq_w )
#ifdef DEBUG_RS_WS
else
/* illegal */
- fprintf(stderr,"tms5220_rs_w: illegal\n");
+ logerror("tms5220_rsq_w: illegal\n");
#endif
return;
}
@@ -1860,7 +1860,7 @@ WRITE_LINE_MEMBER( tms5220_device::rsq_w )
{
/* high to low - schedule ready cycle */
#ifdef DEBUG_RS_WS
- fprintf(stderr,"Scheduling ready cycle for /RS...\n");
+ logerror("Scheduling ready cycle for /RS...\n");
#endif
/* upon /RS being activated, /READY goes inactive after 100 nsec from data sheet, through 3 asynchronous gates on patent. This is effectively within one clock, so we immediately set io_ready to 0 and activate the callback. */
m_io_ready = 0;
@@ -1881,7 +1881,7 @@ WRITE_LINE_MEMBER( tms5220_device::wsq_w )
m_true_timing = 1;
state &= 0x01;
#ifdef DEBUG_RS_WS
- fprintf(stderr,"/WS written with data: %d\n", state);
+ logerror("/WS written with data: %d\n", state);
#endif
new_val = (m_rs_ws & 0x02) | (state<<0);
if (new_val != m_rs_ws)
@@ -1889,12 +1889,12 @@ WRITE_LINE_MEMBER( tms5220_device::wsq_w )
m_rs_ws = new_val;
if (new_val == 0)
{
- if (TMS5220_HAS_RATE_CONTROL) // correct for 5220c, ? for cd2501ecd
+ if (TMS5220_HAS_RATE_CONTROL) // correct for 5220c, probably also correct for cd2501ecd
reset();
#ifdef DEBUG_RS_WS
else
/* illegal */
- fprintf(stderr,"tms5220_ws_w: illegal\n");
+ logerror("tms5220_wsq_w: illegal\n");
#endif
return;
}
@@ -1912,12 +1912,12 @@ WRITE_LINE_MEMBER( tms5220_device::wsq_w )
{
/* high to low - schedule ready cycle */
#ifdef DEBUG_RS_WS
- fprintf(stderr,"Scheduling ready cycle for /WS...\n");
+ logerror("Scheduling ready cycle for /WS...\n");
#endif
/* upon /WS being activated, /READY goes inactive after 100 nsec from data sheet, through 3 asynchronous gates on patent. This is effectively within one clock, so we immediately set io_ready to 0 and activate the callback. */
m_io_ready = 0;
update_ready_state();
- /* Now comes the complicated part: long does /READY stay inactive, when /WS is pulled low? This depends ENTIRELY on the command written, or whether the chip is in speak external mode or not...
+ /* Now comes the complicated part: how long does /READY stay inactive, when /WS is pulled low? This depends ENTIRELY on the command written, or whether the chip is in speak external mode or not...
Speak external mode: ~16 cycles
Command Mode:
SPK: ? cycles
@@ -1933,6 +1933,80 @@ WRITE_LINE_MEMBER( tms5220_device::wsq_w )
}
}
+/*
+ * combined /RS and /WS line write handler;
+ * /RS is bit 1, /WS is bit 0
+ * Note this is a hack and probably can be removed later, once the 'real' line handlers above defer by at least 4 clock cycles before taking effect
+ */
+WRITE8_MEMBER( tms5220_device::combined_rsq_wsq_w )
+{
+ UINT8 new_val;
+ UINT8 falling_edges;
+ m_true_timing = 1;
+#ifdef DEBUG_RS_WS
+ logerror("/RS and /WS written with %d and %d respectively\n", (data&2)>>1, data&1);
+#endif
+ new_val = data&0x03;
+ if (new_val != m_rs_ws)
+ {
+ falling_edges = ((m_rs_ws^new_val)&(~new_val));
+ m_rs_ws = new_val;
+ switch(new_val)
+ {
+ case 0:
+ if (TMS5220_HAS_RATE_CONTROL) // correct for 5220c, probably also correct for cd2501ecd
+ reset();
+#ifdef DEBUG_RS_WS
+ else
+ /* illegal */
+ logerror("tms5220_combined_rsq_wsq_w: illegal\n");
+#endif
+ return;
+ case 3:
+ /* high impedance */
+ m_read_latch = 0xff;
+ return;
+ case 2: // /WS active, /RS not
+ /* check for falling or rising edge */
+ if (!(falling_edges&0x01)) return; /* low to high, do nothing */
+ /* high to low - schedule ready cycle */
+#ifdef DEBUG_RS_WS
+ logerror("Scheduling ready cycle for /WS...\n");
+#endif
+ /* upon /WS being activated, /READY goes inactive after 100 nsec from data sheet, through 3 asynchronous gates on patent. This is effectively within one clock, so we immediately set io_ready to 0 and activate the callback. */
+ m_io_ready = 0;
+ update_ready_state();
+ /* Now comes the complicated part: how long does /READY stay inactive, when /WS is pulled low? This depends ENTIRELY on the command written, or whether the chip is in speak external mode or not...
+ Speak external mode: ~16 cycles
+ Command Mode:
+ SPK: ? cycles
+ SPKEXT: ? cycles
+ RDBY: between 60 and 140 cycles
+ RB: ? cycles (80?)
+ RST: between 60 and 140 cycles
+ SET RATE (5220C and CD2501ECD only): ? cycles (probably ~16)
+ */
+ // TODO: actually HANDLE the timing differences! currently just assuming always 16 cycles
+ m_timer_io_ready->adjust(attotime::from_hz(clock()/16), 1); // this should take around 10-16 (closer to ~15) cycles to complete for fifo writes, TODO: but actually depends on what command is written if in command mode
+ return;
+ case 1: // /RS active, /WS not
+ /* check for falling or rising edge */
+ if (!(falling_edges&0x02)) return; /* low to high, do nothing */
+ /* high to low - schedule ready cycle */
+#ifdef DEBUG_RS_WS
+ logerror("Scheduling ready cycle for /RS...\n");
+#endif
+ /* upon /RS being activated, /READY goes inactive after 100 nsec from data sheet, through 3 asynchronous gates on patent. This is effectively within one clock, so we immediately set io_ready to 0 and activate the callback. */
+ m_io_ready = 0;
+ update_ready_state();
+ /* How long does /READY stay inactive, when /RS is pulled low? I believe its almost always ~16 clocks (25 usec at 800khz as shown on the datasheet) */
+ m_timer_io_ready->adjust(attotime::from_hz(clock()/16), 1); // this should take around 10-16 (closer to ~11?) cycles to complete
+ return;
+ }
+ }
+}
+
+
/**********************************************************************************************
tms5220_data_w -- write data to the sound chip
@@ -1945,7 +2019,7 @@ WRITE8_MEMBER( tms5220_device::data_w )
if (space.debugger_access()) return;
#ifdef DEBUG_RS_WS
- fprintf(stderr,"tms5220_data_w: data %02x\n", data);
+ logerror("tms5220_data_w: data %02x\n", data);
#endif
if (!m_true_timing)
{
@@ -1958,7 +2032,7 @@ WRITE8_MEMBER( tms5220_device::data_w )
/* actually in a write ? */
#ifdef DEBUG_RS_WS
if (!(m_rs_ws == 0x02))
- fprintf(stderr,"tms5220_data_w: data written outside ws, status: %02x!\n", m_rs_ws);
+ logerror("tms5220_data_w: data written outside ws, status: %02x!\n", m_rs_ws);
#endif
m_write_latch = data;
}
@@ -1990,7 +2064,7 @@ READ8_MEMBER( tms5220_device::status_r )
return m_read_latch;
#ifdef DEBUG_RS_WS
else
- fprintf(stderr,"tms5220_status_r: data read outside rs!\n");
+ logerror("tms5220_status_r: data read outside rs!\n");
#endif
return 0xff;
}
diff --git a/src/devices/sound/tms5220.h b/src/devices/sound/tms5220.h
index 38a0ea20dc7..4e17dd53574 100644
--- a/src/devices/sound/tms5220.h
+++ b/src/devices/sound/tms5220.h
@@ -8,6 +8,12 @@
#include "emu.h"
#include "machine/spchrom.h"
+enum
+{
+ RS=2,
+ WS=1
+};
+
/* HACK: if defined, uses impossibly perfect 'straight line' interpolation */
#undef PERFECT_INTERPOLATION_HACK
@@ -72,6 +78,8 @@ public:
WRITE_LINE_MEMBER( rsq_w );
WRITE_LINE_MEMBER( wsq_w );
+ DECLARE_WRITE8_MEMBER( combined_rsq_wsq_w ); // this hack is necessary for specific systems such as the TI 99/8 since the 5220c and cd2501ecd do specific things if both lines go active or inactive at slightly different times by separate write_line writes, which causes the chip to incorrectly reset itself on the 99/8, where the writes are supposed to happen simultaneously; /RS is bit 1, /WS is bit 0
+ // Note this is a hack and probably can be removed later, once the 'real' line handlers above defer by at least 4 clock cycles before taking effect
DECLARE_WRITE8_MEMBER( data_w );
DECLARE_READ8_MEMBER( status_r );
diff --git a/src/devices/sound/vlm5030.cpp b/src/devices/sound/vlm5030.cpp
index 836a0de7eac..3bd8928e3e5 100644
--- a/src/devices/sound/vlm5030.cpp
+++ b/src/devices/sound/vlm5030.cpp
@@ -164,6 +164,7 @@ vlm5030_device::vlm5030_device(const machine_config &mconfig, const char *tag, d
device_sound_interface(mconfig, *this),
m_channel(nullptr),
m_coeff(nullptr),
+ m_region(*this, DEVICE_SELF),
m_rom(nullptr),
m_address_mask(0),
m_address(0),
@@ -215,8 +216,8 @@ void vlm5030_device::device_start()
device_reset();
m_phase = PH_IDLE;
- m_rom = region()->base();
- m_address_mask = (region()->bytes() - 1) & 0xffff;
+ m_rom = m_region->base();
+ m_address_mask = (m_region->bytes() - 1) & 0xffff;
m_channel = machine().sound().stream_alloc(*this, 0, 1, clock() / 440);
@@ -388,6 +389,7 @@ void vlm5030_device::restore_state()
}
/* set speech rom address */
+// TO DO: rewrite using device_memory_interface to get rid of this ridiculous hack
void vlm5030_device::set_rom(void *speech_rom)
{
m_rom = (UINT8 *)speech_rom;
diff --git a/src/devices/sound/vlm5030.h b/src/devices/sound/vlm5030.h
index cf2c620f13f..00264e4710c 100644
--- a/src/devices/sound/vlm5030.h
+++ b/src/devices/sound/vlm5030.h
@@ -47,6 +47,7 @@ private:
/* need to save state */
+ required_memory_region m_region;
UINT8 *m_rom;
int m_address_mask;
UINT16 m_address;
diff --git a/src/devices/sound/ymf278b.cpp b/src/devices/sound/ymf278b.cpp
index af186ff0100..67db79498e7 100644
--- a/src/devices/sound/ymf278b.cpp
+++ b/src/devices/sound/ymf278b.cpp
@@ -646,7 +646,7 @@ void ymf278b_device::C_w(UINT8 reg, UINT8 data)
case 0x06:
// memory data
- m_addrspace[0]->write_byte(m_memadr, data);
+ space(AS_0).write_byte(m_memadr, data);
m_memadr = (m_memadr + 1) & 0x3fffff;
break;
diff --git a/src/devices/sound/ymz280b.cpp b/src/devices/sound/ymz280b.cpp
index fad4f1b7558..9809c110c7a 100644
--- a/src/devices/sound/ymz280b.cpp
+++ b/src/devices/sound/ymz280b.cpp
@@ -583,11 +583,12 @@ void ymz280b_device::device_start()
m_master_clock = (double)clock() / 384.0;
m_irq_handler.resolve();
- if (region() != NULL)
+ memory_region *region = memregion(DEVICE_SELF);
+ if (region != nullptr)
{
/* Some systems (e.g. Konami Firebeat) have a YMZ280B on-board that isn't hooked up to ROM, so be safe. */
- m_mem_base = region()->base();
- m_mem_size = region()->bytes();
+ m_mem_base = region->base();
+ m_mem_size = region->bytes();
}
for (int i = 0; i < 8; i++)
diff --git a/src/devices/sound/ymz770.cpp b/src/devices/sound/ymz770.cpp
index 6456c346ffd..f6a9c17c0b0 100644
--- a/src/devices/sound/ymz770.cpp
+++ b/src/devices/sound/ymz770.cpp
@@ -38,7 +38,8 @@ ymz770_device::ymz770_device(const machine_config &mconfig, const char *tag, dev
m_doen(0),
m_vlma(0),
m_bsl(0),
- m_cpl(0), m_rom_base(nullptr), m_rom_limit(0)
+ m_cpl(0),
+ m_rom(*this, DEVICE_SELF)
{
}
@@ -51,14 +52,12 @@ void ymz770_device::device_start()
{
// create the stream
m_stream = machine().sound().stream_alloc(*this, 0, 2, 16000);
- m_rom_base = region()->base();
- m_rom_limit = region()->bytes() * 8;
for (auto & elem : m_channels)
{
elem.is_playing = false;
elem.is_seq_playing = false;
- elem.decoder = new mpeg_audio(m_rom_base, mpeg_audio::AMM, false, 0);
+ elem.decoder = new mpeg_audio(&m_rom[0], mpeg_audio::AMM, false, 0);
}
// register for save states
@@ -147,8 +146,8 @@ void ymz770_device::sound_stream_update(sound_stream &stream, stream_sample_t **
{
// loop sequence
UINT8 sqn = elem.sequence;
- UINT32 pptr = m_rom_base[(4*sqn)+1+0x400]<<16 | m_rom_base[(4*sqn)+2+0x400]<<8 | m_rom_base[(4*sqn)+3+0x400];
- elem.seqdata = &m_rom_base[pptr];
+ UINT32 pptr = m_rom[(4*sqn)+1+0x400]<<16 | m_rom[(4*sqn)+2+0x400]<<8 | m_rom[(4*sqn)+3+0x400];
+ elem.seqdata = &m_rom[pptr];
}
else
{
@@ -190,8 +189,8 @@ retry:
{
// loop sample
UINT8 phrase = elem.phrase;
- elem.atbl = m_rom_base[(4*phrase)+0] >> 4 & 7;
- elem.pptr = 8*(m_rom_base[(4*phrase)+1]<<16 | m_rom_base[(4*phrase)+2]<<8 | m_rom_base[(4*phrase)+3]);
+ elem.atbl = m_rom[(4*phrase)+0] >> 4 & 7;
+ elem.pptr = 8*(m_rom[(4*phrase)+1]<<16 | m_rom[(4*phrase)+2]<<8 | m_rom[(4*phrase)+3]);
}
else
{
@@ -205,7 +204,7 @@ retry:
{
// next block
int sample_rate, channel_count;
- if (!elem.decoder->decode_buffer(elem.pptr, m_rom_limit, elem.output_data, elem.output_remaining, sample_rate, channel_count) || elem.output_remaining == 0)
+ if (!elem.decoder->decode_buffer(elem.pptr, m_rom.bytes()*8, elem.output_data, elem.output_remaining, sample_rate, channel_count) || elem.output_remaining == 0)
{
elem.is_playing = !elem.last_block; // detect infinite retry loop
elem.last_block = true;
@@ -295,8 +294,8 @@ void ymz770_device::internal_reg_write(UINT8 reg, UINT8 data)
if (data & 6)
{
UINT8 phrase = m_channels[ch].phrase;
- m_channels[ch].atbl = m_rom_base[(4*phrase)+0] >> 4 & 7;
- m_channels[ch].pptr = 8*(m_rom_base[(4*phrase)+1]<<16 | m_rom_base[(4*phrase)+2]<<8 | m_rom_base[(4*phrase)+3]);
+ m_channels[ch].atbl = m_rom[(4*phrase)+0] >> 4 & 7;
+ m_channels[ch].pptr = 8*(m_rom[(4*phrase)+1]<<16 | m_rom[(4*phrase)+2]<<8 | m_rom[(4*phrase)+3]);
m_channels[ch].last_block = false;
m_channels[ch].is_playing = true;
@@ -325,8 +324,8 @@ void ymz770_device::internal_reg_write(UINT8 reg, UINT8 data)
if (data & 6)
{
UINT8 sqn = m_channels[ch].sequence;
- UINT32 pptr = m_rom_base[(4*sqn)+1+0x400]<<16 | m_rom_base[(4*sqn)+2+0x400]<<8 | m_rom_base[(4*sqn)+3+0x400];
- m_channels[ch].seqdata = &m_rom_base[pptr];
+ UINT32 pptr = m_rom[(4*sqn)+1+0x400]<<16 | m_rom[(4*sqn)+2+0x400]<<8 | m_rom[(4*sqn)+3+0x400];
+ m_channels[ch].seqdata = &m_rom[pptr];
m_channels[ch].seqdelay = 0;
m_channels[ch].is_seq_playing = true;
}
diff --git a/src/devices/sound/ymz770.h b/src/devices/sound/ymz770.h
index ddcd72e7bfa..a52dbba8e3a 100644
--- a/src/devices/sound/ymz770.h
+++ b/src/devices/sound/ymz770.h
@@ -86,8 +86,7 @@ protected:
UINT8 m_vlma; // overall AAM volume
UINT8 m_bsl; // boost level
UINT8 m_cpl; // clip limiter
- UINT8 *m_rom_base;
- int m_rom_limit;
+ required_region_ptr<UINT8> m_rom;
ymz_channel m_channels[8];
};
diff --git a/src/devices/video/bufsprite.h b/src/devices/video/bufsprite.h
index 3a75f5a14f6..7e8606f454b 100644
--- a/src/devices/video/bufsprite.h
+++ b/src/devices/video/bufsprite.h
@@ -55,7 +55,7 @@ public:
// construction
buffered_spriteram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, type, "Buffered Sprite RAM", tag, owner, clock, "buffered_spriteram", __FILE__),
- m_spriteram(*owner, tag) { }
+ m_spriteram(*this, DEVICE_SELF) { }
// getters
_Type *live() const { return m_spriteram; }
diff --git a/src/devices/video/ef9345.cpp b/src/devices/video/ef9345.cpp
index a46e32a34b7..057550d794b 100644
--- a/src/devices/video/ef9345.cpp
+++ b/src/devices/video/ef9345.cpp
@@ -101,6 +101,7 @@ ef9345_device::ef9345_device(const machine_config &mconfig, const char *tag, dev
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, nullptr, *ADDRESS_MAP_NAME(ef9345)),
+ m_charset(*this, DEVICE_SELF),
m_palette(*this)
{
}
@@ -125,7 +126,6 @@ void ef9345_device::device_start()
m_blink_timer = timer_alloc(BLINKING_TIMER);
m_videoram = &space(0);
- m_charset = region();
m_screen_out.allocate(496, m_screen->height());
@@ -266,7 +266,7 @@ void ef9345_device::init_accented_chars(void)
UINT16 i, j;
for(j = 0; j < 0x10; j++)
for(i = 0; i < 0x200; i++)
- m_acc_char[(j << 9) + i] = m_charset->u8(0x0600 + i);
+ m_acc_char[(j << 9) + i] = m_charset[0x0600 + i];
for(j = 0; j < 0x200; j += 0x40)
for(i = 0; i < 4; i++)
@@ -299,7 +299,7 @@ void ef9345_device::init_accented_chars(void)
UINT8 ef9345_device::read_char(UINT8 index, UINT16 addr)
{
if (index < 0x04)
- return m_charset->u8(0x0800*index + addr);
+ return m_charset[0x0800*index + addr];
else if (index < 0x08)
return m_acc_char[0x0800*(index&3) + addr];
else if (index < 0x0c)
@@ -860,7 +860,7 @@ void ef9345_device::ef9345_exec(UINT8 cmd)
set_busy_flag(3.5);
switch(cmd&7)
{
- case 0: m_registers[1] = m_charset->u8(indexrom(7) & 0x1fff); break;
+ case 0: m_registers[1] = m_charset[indexrom(7) & 0x1fff]; break;
case 1: m_registers[1] = m_tgs; break;
case 2: m_registers[1] = m_mat; break;
case 3: m_registers[1] = m_pat; break;
diff --git a/src/devices/video/ef9345.h b/src/devices/video/ef9345.h
index 9179e01ab03..c6790b00a39 100644
--- a/src/devices/video/ef9345.h
+++ b/src/devices/video/ef9345.h
@@ -84,7 +84,7 @@ private:
static const device_timer_id BUSY_TIMER = 0;
static const device_timer_id BLINKING_TIMER = 1;
- memory_region *m_charset;
+ required_region_ptr<UINT8> m_charset;
address_space *m_videoram;
UINT8 m_bf; //busy flag
diff --git a/src/devices/video/ef9364.cpp b/src/devices/video/ef9364.cpp
index 5b683b15e09..e7266e88b49 100644
--- a/src/devices/video/ef9364.cpp
+++ b/src/devices/video/ef9364.cpp
@@ -61,6 +61,7 @@ ef9364_device::ef9364_device(const machine_config &mconfig, const char *tag, dev
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_space_config("textram", ENDIANNESS_LITTLE, 8, 12, 0, nullptr, *ADDRESS_MAP_NAME(ef9364)),
+ m_charset(*this, DEVICE_SELF),
m_palette(*this)
{
clock_freq = clock;
@@ -112,7 +113,6 @@ void ef9364_device::set_color_entry( int index, UINT8 r, UINT8 g, UINT8 b )
void ef9364_device::device_start()
{
m_textram = &space(0);
- m_charset = region();
bitplane_xres = EF9364_NB_OF_COLUMNS*8;
bitplane_yres = EF9364_NB_OF_ROWS*(8+4);
@@ -206,7 +206,7 @@ UINT32 ef9364_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
{
c = m_textram->read_byte( ( r * EF9364_NB_OF_COLUMNS ) + ( x>>3 ) );
- if( m_charset->u8(((c&0x7F)<<3) + y ) & (0x80>>(x&7)) )
+ if( m_charset[((c&0x7F)<<3) + y] & (0x80>>(x&7)) )
m_screen_out.pix32((r*12)+y, x) = palette[1];
else
m_screen_out.pix32((r*12)+y, x) = palette[0];
diff --git a/src/devices/video/ef9364.h b/src/devices/video/ef9364.h
index 4c5f57bb211..9d18942429d 100644
--- a/src/devices/video/ef9364.h
+++ b/src/devices/video/ef9364.h
@@ -75,7 +75,7 @@ private:
// internal state
- memory_region *m_charset;
+ required_region_ptr<UINT8> m_charset;
address_space *m_textram;
UINT8 x_curs_pos;
diff --git a/src/devices/video/ef9365.cpp b/src/devices/video/ef9365.cpp
index 5f81d7f45b5..db278ce24bb 100644
--- a/src/devices/video/ef9365.cpp
+++ b/src/devices/video/ef9365.cpp
@@ -160,6 +160,7 @@ ef9365_device::ef9365_device(const machine_config &mconfig, const char *tag, dev
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 18, 0, nullptr, *ADDRESS_MAP_NAME(ef9365)),
+ m_charset(*this, DEVICE_SELF),
m_palette(*this),
m_irq_handler(*this)
{
@@ -283,7 +284,6 @@ void ef9365_device::device_start()
m_busy_timer = timer_alloc(BUSY_TIMER);
m_videoram = &space(0);
- m_charset = region();
m_current_color = 0x0F;
m_irq_vb = 0;
@@ -729,7 +729,7 @@ int ef9365_device::get_char_pix( unsigned char c, int x, int y )
char_base = c * 5;
char_pix = ( y * 5 ) + x;
- if ( m_charset->u8(char_base + (char_pix>>3) ) & ( 0x80 >> (char_pix&7)) )
+ if ( m_charset[char_base + (char_pix>>3)] & ( 0x80 >> (char_pix&7)) )
return 1;
else
return 0;
diff --git a/src/devices/video/ef9365.h b/src/devices/video/ef9365.h
index e29b3adca33..957a5047325 100644
--- a/src/devices/video/ef9365.h
+++ b/src/devices/video/ef9365.h
@@ -95,7 +95,7 @@ private:
// internal state
static const device_timer_id BUSY_TIMER = 0;
- memory_region *m_charset;
+ required_region_ptr<UINT8> m_charset;
address_space *m_videoram;
UINT8 m_irq_state;
diff --git a/src/devices/video/epic12.cpp b/src/devices/video/epic12.cpp
index fa168e5ac36..5f399292c49 100644
--- a/src/devices/video/epic12.cpp
+++ b/src/devices/video/epic12.cpp
@@ -49,6 +49,20 @@ void epic12_device::device_start()
m_blitter_delay_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(epic12_device::blitter_delay_callback),this));
m_blitter_delay_timer->adjust(attotime::never);
+
+ save_item(NAME(m_gfx_addr));
+ save_item(NAME(m_gfx_scroll_0_x));
+ save_item(NAME(m_gfx_scroll_0_y));
+ save_item(NAME(m_gfx_scroll_1_x));
+ save_item(NAME(m_gfx_scroll_1_y));
+ save_item(NAME(m_delay_scale));
+ save_item(NAME(m_gfx_addr_shadowcopy));
+ save_item(NAME(m_gfx_scroll_0_x_shadowcopy));
+ save_item(NAME(m_gfx_scroll_0_y_shadowcopy));
+ save_item(NAME(m_gfx_scroll_1_x_shadowcopy));
+ save_item(NAME(m_gfx_scroll_1_y_shadowcopy));
+ save_pointer(NAME(m_ram16_copy.get()), m_main_ramsize/2);
+ save_item(NAME(*m_bitmaps));
}
void epic12_device::device_reset()
diff --git a/src/devices/video/hd44352.cpp b/src/devices/video/hd44352.cpp
index 8b30b0afd9b..c13cf80f818 100644
--- a/src/devices/video/hd44352.cpp
+++ b/src/devices/video/hd44352.cpp
@@ -36,7 +36,8 @@ const device_type HD44352 = &device_creator<hd44352_device>;
hd44352_device::hd44352_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock):
device_t(mconfig, HD44352, "hd44352", tag, owner, clock, "hd44352", __FILE__),
- m_on_cb(*this)
+ m_on_cb(*this),
+ m_char_rom(*this, DEVICE_SELF)
{
}
@@ -216,7 +217,7 @@ UINT8 hd44352_device::get_char(UINT16 pos)
case 0xff:
return m_custom_char[3][pos%8];
default:
- return region()->u8(pos);
+ return m_char_rom[pos];
}
}
diff --git a/src/devices/video/hd44352.h b/src/devices/video/hd44352.h
index dda32fa7111..0974ed90a9d 100644
--- a/src/devices/video/hd44352.h
+++ b/src/devices/video/hd44352.h
@@ -73,6 +73,7 @@ private:
UINT8 m_cursor_lcd;
devcb_write_line m_on_cb; // ON line callback
+ required_region_ptr<UINT8> m_char_rom;
};
// device type definition
diff --git a/src/devices/video/hd44780.cpp b/src/devices/video/hd44780.cpp
index 00c75e3cd2a..0f8647ced55 100644
--- a/src/devices/video/hd44780.cpp
+++ b/src/devices/video/hd44780.cpp
@@ -47,14 +47,16 @@ ROM_END
hd44780_device::hd44780_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, HD44780, "HD44780 A00", tag, owner, clock, "hd44780_a00", __FILE__),
- m_pixel_update_func(nullptr)
+ m_pixel_update_func(nullptr),
+ m_cgrom(*this, DEVICE_SELF)
{
set_charset_type(CHARSET_HD44780_A00);
}
hd44780_device::hd44780_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- m_pixel_update_func(nullptr)
+ m_pixel_update_func(nullptr),
+ m_cgrom(*this, DEVICE_SELF)
{
}
@@ -86,10 +88,8 @@ const rom_entry *hd44780_device::device_rom_region() const
void hd44780_device::device_start()
{
- if (region())
- m_cgrom = region()->base();
- else
- m_cgrom = memregion("cgrom")->base();
+ if (!m_cgrom.found())
+ m_cgrom.set_target(memregion("cgrom")->base(), 0x1000);
m_busy_timer = timer_alloc(TIMER_BUSY);
m_blink_timer = timer_alloc(TIMER_BLINKING);
diff --git a/src/devices/video/hd44780.h b/src/devices/video/hd44780.h
index 637056d9505..b1210fbd47d 100644
--- a/src/devices/video/hd44780.h
+++ b/src/devices/video/hd44780.h
@@ -105,7 +105,7 @@ private:
bool m_busy_flag; // busy flag
UINT8 m_ddram[0x80]; // internal display data RAM
UINT8 m_cgram[0x40]; // internal chargen RAM
- UINT8 * m_cgrom; // internal chargen ROM
+ optional_region_ptr<UINT8> m_cgrom; // internal chargen ROM
int m_ac; // address counter
UINT8 m_dr; // data register
UINT8 m_ir; // instruction register
diff --git a/src/devices/video/msm6222b.cpp b/src/devices/video/msm6222b.cpp
index efa82d7c119..17ee6897400 100644
--- a/src/devices/video/msm6222b.cpp
+++ b/src/devices/video/msm6222b.cpp
@@ -22,18 +22,22 @@ ROM_START( msm6222b_01 )
ROM_END
msm6222b_device::msm6222b_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source), cursor_direction(false), cursor_blinking(false), two_line(false), shift_on_write(false), double_height(false), cursor_on(false), display_on(false), adc(0), shift(0), cgrom(nullptr)
+ device_t(mconfig, type, name, tag, owner, clock, shortname, source), cursor_direction(false), cursor_blinking(false), two_line(false), shift_on_write(false), double_height(false), cursor_on(false), display_on(false), adc(0), shift(0),
+ m_cgrom(*this)
{
}
msm6222b_device::msm6222b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, MSM6222B, "msm6222b-xx", tag, owner, clock, "msm6222b", __FILE__), cursor_direction(false), cursor_blinking(false), two_line(false), shift_on_write(false), double_height(false), cursor_on(false), display_on(false), adc(0), shift(0), cgrom(nullptr)
+ device_t(mconfig, MSM6222B, "msm6222b-xx", tag, owner, clock, "msm6222b", __FILE__), cursor_direction(false), cursor_blinking(false), two_line(false), shift_on_write(false), double_height(false), cursor_on(false), display_on(false), adc(0), shift(0),
+ m_cgrom(*this, DEVICE_SELF)
{
}
msm6222b_01_device::msm6222b_01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
msm6222b_device(mconfig, MSM6222B_01, "msm6222b-01", tag, owner, clock, "msm6222b", __FILE__)
{
+ // load the fixed cgrom
+ m_cgrom.set_tag("cgrom");
}
const rom_entry *msm6222b_01_device::device_rom_region() const
@@ -43,13 +47,6 @@ const rom_entry *msm6222b_01_device::device_rom_region() const
void msm6222b_device::device_start()
{
- if(memregion("cgrom"))
- cgrom = memregion("cgrom")->base();
- else if(m_region)
- cgrom = m_region->base();
- else
- cgrom = nullptr;
-
memset(cgram, 0, sizeof(cgram));
memset(ddram, 0x20, sizeof(ddram));
@@ -218,8 +215,8 @@ const UINT8 *msm6222b_device::render()
UINT8 c = ddram[(i+shift) % 80];
if(c < 16)
memcpy(render_buf + 16*i, double_height ? cgram + 8*(c & 6) : cgram + 8*(c & 7), char_height);
- else if(cgrom)
- memcpy(render_buf + 16*i, cgrom + 16*c, char_height);
+ else if (m_cgrom.found())
+ memcpy(render_buf + 16*i, &m_cgrom[16*c], char_height);
}
if(cursor_on) {
diff --git a/src/devices/video/msm6222b.h b/src/devices/video/msm6222b.h
index d86bcd63629..3324dda3b06 100644
--- a/src/devices/video/msm6222b.h
+++ b/src/devices/video/msm6222b.h
@@ -41,7 +41,8 @@ private:
UINT8 render_buf[80*16];
bool cursor_direction, cursor_blinking, two_line, shift_on_write, double_height, cursor_on, display_on;
UINT8 adc, shift;
- const UINT8 *cgrom;
+protected:
+ optional_region_ptr<UINT8> m_cgrom;
void cursor_step(bool direction);
void shift_step(bool direction);
diff --git a/src/devices/video/tms9927.cpp b/src/devices/video/tms9927.cpp
index 9c45dab00ca..e571499a399 100644
--- a/src/devices/video/tms9927.cpp
+++ b/src/devices/video/tms9927.cpp
@@ -39,7 +39,7 @@ tms9927_device::tms9927_device(const machine_config &mconfig, const char *tag, d
device_video_interface(mconfig, *this),
m_write_vsyn(*this),
m_hpixels_per_column(0),
- m_selfload_region(nullptr),
+ m_selfload(*this),
m_reset(0)
{
memset(m_reg, 0x00, sizeof(m_reg));
@@ -50,7 +50,7 @@ tms9927_device::tms9927_device(const machine_config &mconfig, device_type type,
device_video_interface(mconfig, *this),
m_write_vsyn(*this),
m_hpixels_per_column(0),
- m_selfload_region(nullptr),
+ m_selfload(*this),
m_reset(0)
{
memset(m_reg, 0x00, sizeof(m_reg));
@@ -84,13 +84,6 @@ void tms9927_device::device_start()
/* copy the initial parameters */
m_clock = clock();
- /* get the self-load PROM */
- if (m_selfload_region != nullptr)
- {
- m_selfload = machine().root_device().memregion(m_selfload_region)->base();
- assert(m_selfload != nullptr);
- }
-
// resolve callbacks
m_write_vsyn.resolve_safe();
@@ -166,7 +159,7 @@ void tms9927_device::generic_access(address_space &space, offs_t offset)
{
case 0x07: /* Processor Self Load */
case 0x0f: /* Non-processor self-load */
- if (m_selfload != nullptr)
+ if (m_selfload.found())
{
for (int cur = 0; cur < 7; cur++)
write(space, cur, m_selfload[cur]);
diff --git a/src/devices/video/tms9927.h b/src/devices/video/tms9927.h
index 40181d16cbc..ba8e25f9e79 100644
--- a/src/devices/video/tms9927.h
+++ b/src/devices/video/tms9927.h
@@ -17,7 +17,7 @@
tms9927_device::set_char_width(*device, _pixels);
#define MCFG_TMS9927_REGION(_tag) \
- tms9927_device::set_region_tag(*device, _tag);
+ tms9927_device::set_region_tag(*device, "^" _tag);
class tms9927_device : public device_t,
@@ -31,7 +31,7 @@ public:
template<class _Object> static devcb_base &set_vsyn_wr_callback(device_t &device, _Object object) { return downcast<tms9927_device &>(device).m_write_vsyn.set_callback(object); }
static void set_char_width(device_t &device, int pixels) { downcast<tms9927_device &>(device).m_hpixels_per_column = pixels; }
- static void set_region_tag(device_t &device, const char *tag) { downcast<tms9927_device &>(device).m_selfload_region = tag; }
+ static void set_region_tag(device_t &device, const char *tag) { downcast<tms9927_device &>(device).m_selfload.set_tag(tag); }
DECLARE_WRITE8_MEMBER(write);
DECLARE_READ8_MEMBER(read);
@@ -59,10 +59,9 @@ private:
devcb_write_line m_write_vsyn;
int m_hpixels_per_column; /* number of pixels per video memory address */
- const char *m_selfload_region; /* name of the region with self-load data */
// internal state
- const UINT8 *m_selfload;
+ optional_region_ptr<UINT8> m_selfload;
/* live state */
UINT32 m_clock;
diff --git a/src/emu/addrmap.h b/src/emu/addrmap.h
index 492ad21b03b..56e9fde3e8f 100644
--- a/src/emu/addrmap.h
+++ b/src/emu/addrmap.h
@@ -499,15 +499,4 @@ void _class :: _name(::address_map &map, device_t &device) \
#define AM_RAM_DEVWRITE(_tag, _class, _write) AM_READONLY AM_DEVWRITE(_tag, _class, _write)
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-// use this to refer to the owning device when providing a device tag
-static const char DEVICE_SELF[] = "";
-
-// use this to refer to the owning device's owner when providing a device tag
-static const char DEVICE_SELF_OWNER[] = "^";
-
-
#endif /* __ADDRMAP_H__ */
diff --git a/src/emu/audit.cpp b/src/emu/audit.cpp
index 6797d967218..0a0cec543a5 100644
--- a/src/emu/audit.cpp
+++ b/src/emu/audit.cpp
@@ -388,7 +388,6 @@ media_auditor::summary media_auditor::summarize(const char *name, std::string *o
else
output->append(string_format("NOT FOUND (%s)\n", shared_device->shortname()));
}
- best_new_status = NOTFOUND;
break;
case audit_record::SUBSTATUS_NOT_FOUND_NODUMP:
diff --git a/src/emu/clifront.cpp b/src/emu/clifront.cpp
index 02c27149231..803b8a4db76 100644
--- a/src/emu/clifront.cpp
+++ b/src/emu/clifront.cpp
@@ -715,6 +715,9 @@ void cli_frontend::listmedia(const char *gamename)
bool first = true;
for (const device_image_interface *imagedev = iter.first(); imagedev != nullptr; imagedev = iter.next())
{
+ if (!imagedev->user_loadable())
+ continue;
+
// extract the shortname with parentheses
std::string paren_shortname = string_format("(%s)", imagedev->brief_instance_name());
diff --git a/src/emu/debug/debugcmd.h b/src/emu/debug/debugcmd.h
index d3c52225550..311f19e5dbd 100644
--- a/src/emu/debug/debugcmd.h
+++ b/src/emu/debug/debugcmd.h
@@ -11,6 +11,7 @@
#ifndef __DEBUGCMD_H__
#define __DEBUGCMD_H__
+#include "emu.h"
/***************************************************************************
FUNCTION PROTOTYPES
diff --git a/src/emu/debug/debugcon.h b/src/emu/debug/debugcon.h
index c15874184af..95aa2e0f8c8 100644
--- a/src/emu/debug/debugcon.h
+++ b/src/emu/debug/debugcon.h
@@ -11,6 +11,7 @@
#ifndef __DEBUGCON_H__
#define __DEBUGCON_H__
+#include "emu.h"
#include "textbuf.h"
diff --git a/src/emu/devcpu.cpp b/src/emu/devcpu.cpp
index 00bac6ed1b0..43460235b19 100644
--- a/src/emu/devcpu.cpp
+++ b/src/emu/devcpu.cpp
@@ -9,6 +9,7 @@
***************************************************************************/
#include "emu.h"
+#include "emuopts.h"
#include <ctype.h>
@@ -25,7 +26,8 @@ cpu_device::cpu_device(const machine_config &mconfig, device_type type, const ch
device_execute_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
device_state_interface(mconfig, *this),
- device_disasm_interface(mconfig, *this)
+ device_disasm_interface(mconfig, *this),
+ m_force_no_drc(false)
{
}
@@ -37,3 +39,24 @@ cpu_device::cpu_device(const machine_config &mconfig, device_type type, const ch
cpu_device::~cpu_device()
{
}
+
+
+//-------------------------------------------------
+// static_set_force_no_drc - configuration helper
+// to disable DRC
+//-------------------------------------------------
+
+void cpu_device::static_set_force_no_drc(device_t &device, bool value)
+{
+ downcast<cpu_device &>(device).m_force_no_drc = value;
+}
+
+
+//-------------------------------------------------
+// allow_drc - return true if DRC is allowed
+//-------------------------------------------------
+
+bool cpu_device::allow_drc() const
+{
+ return mconfig().options().drc() && !m_force_no_drc;
+}
diff --git a/src/emu/devcpu.h b/src/emu/devcpu.h
index 0a298a4ddf8..f34d5645b78 100644
--- a/src/emu/devcpu.h
+++ b/src/emu/devcpu.h
@@ -42,6 +42,11 @@
#define MCFG_CPU_PERIODIC_INT_REMOVE MCFG_DEVICE_PERIODIC_INT_REMOVE
#define MCFG_CPU_IRQ_ACKNOWLEDGE_REMOVE MCFG_DEVICE_IRQ_ACKNOWLEDGE_REMOVE
+// recompilation parameters
+#define MCFG_CPU_FORCE_NO_DRC() \
+ cpu_device::static_set_force_no_drc(*device, true);
+
+
//**************************************************************************
// MACROS
@@ -66,10 +71,19 @@ class cpu_device : public device_t,
{
friend resource_pool_object<cpu_device>::~resource_pool_object();
+public:
+ // configuration helpers
+ static void static_set_force_no_drc(device_t &device, bool value);
+ bool allow_drc() const;
+
protected:
// construction/destruction
cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
virtual ~cpu_device();
+
+private:
+ // configured state
+ bool m_force_no_drc; // whether or not to force DRC off
};
diff --git a/src/emu/devfind.cpp b/src/emu/devfind.cpp
index d251e56ce0b..7669b331832 100644
--- a/src/emu/devfind.cpp
+++ b/src/emu/devfind.cpp
@@ -45,27 +45,76 @@ void *finder_base::find_memregion(UINT8 width, size_t &length, bool required) co
// look up the region and return NULL if not found
memory_region *region = m_base.memregion(m_tag);
if (region == nullptr)
+ {
+ length = 0;
return nullptr;
+ }
// check the width and warn if not correct
if (region->bytewidth() != width)
{
if (required)
osd_printf_warning("Region '%s' found but is width %d, not %d as requested\n", m_tag, region->bitwidth(), width*8);
+ length = 0;
+ return nullptr;
+ }
+
+ // check the length and warn if other than specified
+ size_t length_found = region->bytes() / width;
+ if (length != 0 && length != length_found)
+ {
+ if (required)
+ osd_printf_warning("Region '%s' found but has %d bytes, not %d as requested\n", m_tag, region->bytes(), (int)length*width);
+ length = 0;
return nullptr;
}
// return results
- length = region->bytes() / width;
+ length = length_found;
return region->base();
}
//-------------------------------------------------
+// validate_memregion - find memory region
+//-------------------------------------------------
+
+bool finder_base::validate_memregion(size_t bytes, bool required) const
+{
+ // make sure we can resolve the full path to the region
+ size_t bytes_found = 0;
+ std::string region_fulltag = m_base.subtag(m_tag);
+
+ // look for the region
+ device_iterator deviter(m_base.mconfig().root_device());
+ for (device_t *dev = deviter.first(); dev != nullptr && bytes_found == 0; dev = deviter.next())
+ for (const rom_entry *romp = rom_first_region(*dev); romp != nullptr; romp = rom_next_region(romp))
+ {
+ if (rom_region_name(*dev, romp) == region_fulltag)
+ {
+ bytes_found = ROMREGION_GETLENGTH(romp);
+ break;
+ }
+ }
+
+ if (bytes_found != 0)
+ {
+ // check the length and warn if other than specified
+ if (bytes != 0 && bytes != bytes_found)
+ {
+ osd_printf_warning("Region '%s' found but has %d bytes, not %d as requested\n", m_tag, (int)bytes_found, (int)bytes);
+ bytes_found = 0;
+ }
+ }
+ return report_missing(bytes_found != 0, "memory region", required);
+}
+
+
+//-------------------------------------------------
// find_memshare - find memory share
//-------------------------------------------------
-void *finder_base::find_memshare(UINT8 width, size_t &bytes, bool required)
+void *finder_base::find_memshare(UINT8 width, size_t &bytes, bool required) const
{
// look up the share and return NULL if not found
memory_share *share = m_base.memshare(m_tag);
@@ -91,7 +140,7 @@ void *finder_base::find_memshare(UINT8 width, size_t &bytes, bool required)
// return true if it's ok
//-------------------------------------------------
-bool finder_base::report_missing(bool found, const char *objname, bool required)
+bool finder_base::report_missing(bool found, const char *objname, bool required) const
{
if (required && strcmp(m_tag, FINDER_DUMMY_TAG)==0)
{
diff --git a/src/emu/devfind.h b/src/emu/devfind.h
index 44a5532b6a8..98599e4a6e9 100644
--- a/src/emu/devfind.h
+++ b/src/emu/devfind.h
@@ -47,6 +47,7 @@ public:
// getters
virtual bool findit(bool isvalidation = false) = 0;
+ const char *finder_tag() const { return m_tag; }
// setter for setting the object
void set_tag(const char *tag) { m_tag = tag; }
@@ -54,8 +55,9 @@ public:
protected:
// helpers
void *find_memregion(UINT8 width, size_t &length, bool required) const;
- void *find_memshare(UINT8 width, size_t &bytes, bool required);
- bool report_missing(bool found, const char *objname, bool required);
+ bool validate_memregion(size_t bytes, bool required) const;
+ void *find_memshare(UINT8 width, size_t &bytes, bool required) const;
+ bool report_missing(bool found, const char *objname, bool required) const;
void printf_warning(const char *format, ...) ATTR_PRINTF(2,3);
@@ -104,7 +106,7 @@ class device_finder : public object_finder_base<_DeviceClass>
{
public:
// construction/destruction
- device_finder(device_t &base, const char *tag)
+ device_finder(device_t &base, const char *tag = FINDER_DUMMY_TAG)
: object_finder_base<_DeviceClass>(base, tag) { }
// make reference use transparent as well
@@ -148,7 +150,7 @@ class memory_region_finder : public object_finder_base<memory_region>
{
public:
// construction/destruction
- memory_region_finder(device_t &base, const char *tag)
+ memory_region_finder(device_t &base, const char *tag = FINDER_DUMMY_TAG)
: object_finder_base<memory_region>(base, tag) { }
// make reference use transparent as well
@@ -157,7 +159,7 @@ public:
// finder
virtual bool findit(bool isvalidation = false) override
{
- if (isvalidation) return true;
+ if (isvalidation) return this->validate_memregion(0, _Required);
m_target = m_base.memregion(m_tag);
return this->report_missing(m_target != nullptr, "memory region", _Required);
}
@@ -186,7 +188,7 @@ class memory_bank_finder : public object_finder_base<memory_bank>
{
public:
// construction/destruction
- memory_bank_finder(device_t &base, const char *tag)
+ memory_bank_finder(device_t &base, const char *tag = FINDER_DUMMY_TAG)
: object_finder_base<memory_bank>(base, tag) { }
// make reference use transparent as well
@@ -224,7 +226,7 @@ class ioport_finder : public object_finder_base<ioport_port>
{
public:
// construction/destruction
- ioport_finder(device_t &base, const char *tag)
+ ioport_finder(device_t &base, const char *tag = FINDER_DUMMY_TAG)
: object_finder_base<ioport_port>(base, tag) { }
// make reference use transparent as well
@@ -319,14 +321,20 @@ class region_ptr_finder : public object_finder_base<_PointerType>
{
public:
// construction/destruction
- region_ptr_finder(device_t &base, const char *tag)
+ region_ptr_finder(device_t &base, const char *tag, size_t length = 0)
: object_finder_base<_PointerType>(base, tag),
- m_length(0) { }
+ m_length(length) { }
+ region_ptr_finder(device_t &base, size_t length = 0)
+ : object_finder_base<_PointerType>(base, FINDER_DUMMY_TAG),
+ m_length(length) { }
// operators to make use transparent
_PointerType operator[](int index) const { assert(index < m_length); return this->m_target[index]; }
_PointerType &operator[](int index) { assert(index < m_length); return this->m_target[index]; }
+ // setter for setting the object and its length
+ void set_target(_PointerType *target, size_t length) { this->m_target = target; m_length = length; }
+
// getter for explicit fetching
UINT32 length() const { return m_length; }
UINT32 bytes() const { return m_length * sizeof(_PointerType); }
@@ -335,7 +343,7 @@ public:
// finder
virtual bool findit(bool isvalidation = false) override
{
- if (isvalidation) return true;
+ if (isvalidation) return this->validate_memregion(sizeof(_PointerType) * m_length, _Required);
this->m_target = reinterpret_cast<_PointerType *>(this->find_memregion(sizeof(_PointerType), m_length, _Required));
return this->report_missing(this->m_target != nullptr, "memory region", _Required);
}
@@ -350,7 +358,8 @@ template<class _PointerType>
class optional_region_ptr : public region_ptr_finder<_PointerType, false>
{
public:
- optional_region_ptr(device_t &base, const char *tag = FINDER_DUMMY_TAG) : region_ptr_finder<_PointerType, false>(base, tag) { }
+ optional_region_ptr(device_t &base, const char *tag, size_t length = 0) : region_ptr_finder<_PointerType, false>(base, tag, length) { }
+ optional_region_ptr(device_t &base, size_t length = 0) : region_ptr_finder<_PointerType, false>(base, FINDER_DUMMY_TAG, length) { }
};
// required region pointer finder
@@ -358,10 +367,12 @@ template<class _PointerType>
class required_region_ptr : public region_ptr_finder<_PointerType, true>
{
public:
- required_region_ptr(device_t &base, const char *tag = FINDER_DUMMY_TAG) : region_ptr_finder<_PointerType, true>(base, tag) { }
+ required_region_ptr(device_t &base, const char *tag, size_t length = 0) : region_ptr_finder<_PointerType, true>(base, tag, length) { }
+ required_region_ptr(device_t &base, size_t length = 0) : region_ptr_finder<_PointerType, true>(base, FINDER_DUMMY_TAG, length) { }
};
+
// ======================> shared_ptr_finder
// shared pointer finder template
@@ -370,7 +381,7 @@ class shared_ptr_finder : public object_finder_base<_PointerType>
{
public:
// construction/destruction
- shared_ptr_finder(device_t &base, const char *tag, UINT8 width = sizeof(_PointerType) * 8)
+ shared_ptr_finder(device_t &base, const char *tag = FINDER_DUMMY_TAG, UINT8 width = sizeof(_PointerType) * 8)
: object_finder_base<_PointerType>(base, tag),
m_bytes(0),
m_width(width) { }
diff --git a/src/emu/device.cpp b/src/emu/device.cpp
index 59e4162314c..64fe6fede58 100644
--- a/src/emu/device.cpp
+++ b/src/emu/device.cpp
@@ -39,7 +39,6 @@ device_t::device_t(const machine_config &mconfig, device_type type, const char *
m_clock_scale(1.0),
m_attoseconds_per_clock((clock == 0) ? 0 : HZ_TO_ATTOSECONDS(clock)),
- m_region(nullptr),
m_machine_config(mconfig),
m_static_config(nullptr),
m_input_defaults(nullptr),
@@ -308,7 +307,26 @@ bool device_t::findit(bool isvalidation) const
{
bool allfound = true;
for (finder_base *autodev = m_auto_finder_list; autodev != nullptr; autodev = autodev->m_next)
+ {
+ if (isvalidation)
+ {
+ // sanity checking
+ const char *tag = autodev->finder_tag();
+ if (tag == nullptr)
+ {
+ osd_printf_error("Finder tag is null!\n");
+ allfound = false;
+ continue;
+ }
+ if (tag[0] == '^' && tag[1] == ':')
+ {
+ osd_printf_error("Malformed finder tag: %s\n", tag);
+ allfound = false;
+ continue;
+ }
+ }
allfound &= autodev->findit(isvalidation);
+ }
return allfound;
}
@@ -318,9 +336,6 @@ bool device_t::findit(bool isvalidation) const
void device_t::start()
{
- // populate the machine and the region field
- m_region = machine().root_device().memregion(tag());
-
// find all the registered devices
if (!findit(false))
throw emu_fatalerror("Missing some required objects, unable to proceed");
diff --git a/src/emu/device.h b/src/emu/device.h
index 9681e43943c..c098b2c337b 100644
--- a/src/emu/device.h
+++ b/src/emu/device.h
@@ -48,6 +48,17 @@
//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+// use this to refer to the owning device when providing a device tag
+static const char DEVICE_SELF[] = "";
+
+// use this to refer to the owning device's owner when providing a device tag
+static const char DEVICE_SELF_OWNER[] = "^";
+
+
+//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -199,7 +210,6 @@ public:
UINT8 default_bios() const { return m_default_bios; }
UINT8 system_bios() const { return m_system_bios; }
std::string default_bios_tag() const { return m_default_bios_tag; }
- memory_region *region() const { return m_region; }
// interface helpers
interface_list &interfaces() { return m_interfaces; }
@@ -334,7 +344,6 @@ protected:
attoseconds_t m_attoseconds_per_clock;// period in attoseconds
std::unique_ptr<device_debug> m_debug;
- memory_region * m_region; // our device-local region
const machine_config & m_machine_config; // reference to the machine's configuration
const void * m_static_config; // static device configuration
const input_device_default *m_input_defaults; // devices input ports default overrides
diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp
index f20c9b7733d..3e167614fe9 100644
--- a/src/emu/diimage.cpp
+++ b/src/emu/diimage.cpp
@@ -68,6 +68,7 @@ device_image_interface::device_image_interface(const machine_config &mconfig, de
m_from_swlist(false),
m_create_format(0),
m_create_args(nullptr),
+ m_user_loadable(TRUE),
m_is_loading(FALSE)
{
}
@@ -161,16 +162,16 @@ image_error_t device_image_interface::set_image_filename(const char *filename)
util::zippath_parent(m_working_directory, filename);
m_basename.assign(m_image_name);
- size_t loc1 = m_image_name.find_last_of('\\');
- size_t loc2 = m_image_name.find_last_of('/');
- size_t loc3 = m_image_name.find_last_of(':');
- size_t loc = MAX(loc1,MAX(loc2, loc3));
+ int loc1 = m_image_name.find_last_of('\\');
+ int loc2 = m_image_name.find_last_of('/');
+ int loc3 = m_image_name.find_last_of(':');
+ int loc = MAX(loc1, MAX(loc2, loc3));
if (loc != -1) {
if (loc == loc3)
{
// temp workaround for softlists now that m_image_name contains the part name too (e.g. list:gamename:cart)
m_basename = m_basename.substr(0, loc);
- size_t tmploc = m_basename.find_last_of(':');
+ int tmploc = m_basename.find_last_of(':');
m_basename = m_basename.substr(tmploc + 1, loc - tmploc);
}
else
diff --git a/src/emu/diimage.h b/src/emu/diimage.h
index 248db9cbbd2..5300392d57a 100644
--- a/src/emu/diimage.h
+++ b/src/emu/diimage.h
@@ -129,6 +129,9 @@ typedef void (*device_image_partialhash_func)(hash_collection &, const unsigned
#define DEVICE_IMAGE_UNLOAD_MEMBER(_class,_name) void DEVICE_IMAGE_UNLOAD_NAME(_class,_name)(device_image_interface &image)
#define DEVICE_IMAGE_UNLOAD_DELEGATE(_class,_name) device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_name),#_class "::device_image_unload_" #_name, downcast<_class *>(device->owner()))
+#define MCFG_SET_IMAGE_LOADABLE(_usrload) \
+ device_image_interface::static_set_user_loadable(*device, _usrload);
+
// ======================> device_image_interface
@@ -223,8 +226,6 @@ public:
const char *image_type_name() const { return device_typename(image_type()); }
-
-
const char *instance_name() const { return m_instance_name.c_str(); }
const char *brief_instance_name() const { return m_brief_instance_name.c_str(); }
bool uses_file_extension(const char *file_extension) const;
@@ -239,6 +240,15 @@ public:
int reopen_for_write(const char *path);
static void software_name_split(const char *swlist_swname, std::string &swlist_name, std::string &swname, std::string &swpart);
+ static void static_set_user_loadable(device_t &device, bool user_loadable) {
+ device_image_interface *img;
+ if (!device.interface(img))
+ throw emu_fatalerror("MCFG_SET_IMAGE_LOADABLE called on device '%s' with no image interface\n", device.tag());
+
+ img->m_user_loadable = user_loadable;
+ }
+
+ bool user_loadable() const { return m_user_loadable; }
protected:
bool load_internal(const char *path, bool is_create, int create_format, option_resolution *create_args, bool just_load);
@@ -311,10 +321,14 @@ protected:
std::string m_brief_instance_name;
std::string m_instance_name;
-
+
/* creation info */
simple_list<image_device_format> m_formatlist;
+ /* in the case of arcade cabinet with fixed carts inserted,
+ we want to disable command line cart loading... */
+ bool m_user_loadable;
+
bool m_is_loading;
};
diff --git a/src/emu/dimemory.h b/src/emu/dimemory.h
index 0998fd4ae9a..941a8c87729 100644
--- a/src/emu/dimemory.h
+++ b/src/emu/dimemory.h
@@ -123,6 +123,9 @@ protected:
// configuration
address_map_constructor m_address_map[ADDRESS_SPACES]; // address maps for each address space
+
+private:
+ // internal state
address_space * m_addrspace[ADDRESS_SPACES]; // reported address spaces
};
diff --git a/src/emu/diserial.cpp b/src/emu/diserial.cpp
index 3e4c0b4c785..4613da0d4ad 100644
--- a/src/emu/diserial.cpp
+++ b/src/emu/diserial.cpp
@@ -425,8 +425,8 @@ void device_serial_interface::transmit_register_setup(UINT8 data_byte)
transmit_register_add_bit(parity);
}
- /* stop bit(s) */
- for (i=0; i<m_df_stop_bit_count; i++)
+ /* stop bit(s) + 1 extra bit as delay between bytes, needed to get 1 stop bit to work. */
+ for (i=0; i<=m_df_stop_bit_count; i++)
{
transmit_register_add_bit(1);
}
diff --git a/src/emu/drivers/empty.cpp b/src/emu/drivers/empty.cpp
index f012e376813..9b075c10308 100644
--- a/src/emu/drivers/empty.cpp
+++ b/src/emu/drivers/empty.cpp
@@ -9,6 +9,7 @@
**************************************************************************/
#include "emu.h"
+#include "emuopts.h"
#include "render.h"
#include "ui/selgame.h"
#include "ui/simpleselgame.h"
diff --git a/src/emu/emu.h b/src/emu/emu.h
index e978bbe44d5..1411ecda1db 100644
--- a/src/emu/emu.h
+++ b/src/emu/emu.h
@@ -41,7 +41,7 @@
#include "devdelegate.h"
// memory and address spaces
-#include "memory.h"
+#include "emumem.h"
#include "addrmap.h"
#include "memarray.h"
@@ -106,9 +106,6 @@ typedef device_t * (*machine_config_constructor)(machine_config &config, device_
#include "sound.h"
#include "speaker.h"
-// user interface
-#include "ui/ui.h"
-
// generic helpers
#include "devcb.h"
#include "dispatch.h"
@@ -118,6 +115,5 @@ typedef device_t * (*machine_config_constructor)(machine_config &config, device_
// member templates that don't like incomplete types
#include "device.ipp"
-#include "machine.ipp"
#endif /* __EMU_H__ */
diff --git a/src/emu/memory.cpp b/src/emu/emumem.cpp
index 331345ea63d..edfd9228492 100644
--- a/src/emu/memory.cpp
+++ b/src/emu/emumem.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Aaron Giles,Olivier Galibert
/***************************************************************************
- memory.c
+ emumem.c
Functions which handle device memory access.
@@ -174,6 +174,7 @@
#include <map>
#include "emu.h"
+#include "emuopts.h"
#include "debug/debugcpu.h"
diff --git a/src/emu/memory.h b/src/emu/emumem.h
index 9fa42b49a93..9348058f650 100644
--- a/src/emu/memory.h
+++ b/src/emu/emumem.h
@@ -2,7 +2,7 @@
// copyright-holders:Aaron Giles,Olivier Galibert
/***************************************************************************
- memory.h
+ emumem.h
Functions which handle device memory accesses.
@@ -14,8 +14,8 @@
#error Dont include this file directly; include emu.h instead.
#endif
-#ifndef __MEMORY_H__
-#define __MEMORY_H__
+#ifndef __EMUMEM_H__
+#define __EMUMEM_H__
@@ -941,4 +941,4 @@ inline UINT64 direct_read_data::read_qword(offs_t byteaddress, offs_t directxor)
return m_space.read_qword(byteaddress);
}
-#endif /* __MEMORY_H__ */
+#endif /* __EMUMEM_H__ */
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
index e05a16a5dd5..b3de757e453 100644
--- a/src/emu/emuopts.cpp
+++ b/src/emu/emuopts.cpp
@@ -93,6 +93,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_KEEPASPECT ";ka", "1", OPTION_BOOLEAN, "constrain to the proper aspect ratio" },
{ OPTION_UNEVENSTRETCH ";ues", "1", OPTION_BOOLEAN, "allow non-integer stretch factors" },
{ OPTION_UNEVENSTRETCHX ";uesx", "0", OPTION_BOOLEAN, "allow non-integer stretch factors only on horizontal axis"},
+ { OPTION_INTOVERSCAN ";ios", "0", OPTION_BOOLEAN, "allow overscan on integer scaled targets"},
{ OPTION_INTSCALEX ";sx", "0", OPTION_INTEGER, "set horizontal integer scale factor."},
{ OPTION_INTSCALEY ";sy", "0", OPTION_INTEGER, "set vertical integer scale."},
@@ -150,8 +151,8 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_UI_ACTIVE, "0", OPTION_BOOLEAN, "enable user interface on top of emulated keyboard (if present)" },
{ OPTION_OFFSCREEN_RELOAD ";reload", "0", OPTION_BOOLEAN, "convert lightgun button 2 into offscreen reload" },
{ OPTION_JOYSTICK_MAP ";joymap", "auto", OPTION_STRING, "explicit joystick map, or auto to auto-select" },
- { OPTION_JOYSTICK_DEADZONE ";joy_deadzone;jdz", "0.3", OPTION_FLOAT, "center deadzone range for joystick where change is ignored (0.0 center, 1.0 end)" },
- { OPTION_JOYSTICK_SATURATION ";joy_saturation;jsat", "0.85", OPTION_FLOAT, "end of axis saturation range for joystick where change is ignored (0.0 center, 1.0 end)" },
+ { OPTION_JOYSTICK_DEADZONE ";joy_deadzone;jdz(0.00-1)", "0.3", OPTION_FLOAT, "center deadzone range for joystick where change is ignored (0.0 center, 1.0 end)" },
+ { OPTION_JOYSTICK_SATURATION ";joy_saturation;jsat(0.00-1)", "0.85", OPTION_FLOAT, "end of axis saturation range for joystick where change is ignored (0.0 center, 1.0 end)" },
{ OPTION_NATURAL_KEYBOARD ";nat", "0", OPTION_BOOLEAN, "specifies whether to use a natural keyboard or not" },
{ OPTION_JOYSTICK_CONTRADICTORY ";joy_contradictory","0", OPTION_BOOLEAN, "enable contradictory direction digital joystick input at the same time" },
{ OPTION_COIN_IMPULSE, "0", OPTION_INTEGER, "set coin impulse time (n<0 disable impulse, n==0 obey driver, 0<n set time n)" },
@@ -255,24 +256,16 @@ bool emu_options::add_slot_options(const software_part *swpart)
if (slot->fixed())
continue;
- // first device? add the header as to be pretty
- if (m_slot_options++ == 0)
- add_entry(nullptr, "SLOT DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE);
-
// retrieve info about the device instance
const char *name = slot->device().tag() + 1;
if (!exists(name))
{
+ // first device? add the header as to be pretty
+ if (m_slot_options++ == 0)
+ add_entry(nullptr, "SLOT DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE);
+
// add the option
- UINT32 flags = OPTION_STRING | OPTION_FLAG_DEVICE;
- const char *defvalue = slot->default_option();
- if (defvalue != nullptr)
- {
- const device_slot_option *option = slot->option(defvalue);
- if (option != nullptr && !option->selectable())
- flags |= OPTION_FLAG_INTERNAL;
- }
- add_entry(name, nullptr, flags, defvalue, true);
+ add_entry(name, nullptr, OPTION_STRING | OPTION_FLAG_DEVICE, slot->default_option(), true);
}
// allow software lists to supply their own defaults
@@ -314,12 +307,21 @@ void emu_options::update_slot_options(const software_part *swpart)
if (exists(name) && !slot->option_list().empty())
{
std::string defvalue = slot->get_default_card_software();
- if (defvalue.length() > 0)
+ if (defvalue.empty())
{
- set_default_value(name, defvalue.c_str());
- const device_slot_option *option = slot->option(defvalue.c_str());
- set_flag(name, ~OPTION_FLAG_INTERNAL, (option != nullptr && !option->selectable()) ? OPTION_FLAG_INTERNAL : 0);
+ // keep any non-default setting
+ if (priority(name) > OPTION_PRIORITY_DEFAULT)
+ continue;
+
+ // reinstate the actual default value as configured
+ if (slot->default_option() != nullptr)
+ defvalue.assign(slot->default_option());
}
+
+ // set the value and hide the option if not selectable
+ set_default_value(name, defvalue.c_str());
+ const device_slot_option *option = slot->option(defvalue.c_str());
+ set_flag(name, ~OPTION_FLAG_INTERNAL, (option != nullptr && !option->selectable()) ? OPTION_FLAG_INTERNAL : 0);
}
}
while (add_slot_options(swpart)) { }
@@ -344,11 +346,10 @@ void emu_options::add_device_options()
image_interface_iterator iter(config.root_device());
for (const device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
- // first device? add the header as to be pretty
- if (m_device_options++ == 0)
- add_entry(nullptr, "IMAGE DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE);
+ if (!image->user_loadable())
+ continue;
- // retrieve info about the device instance
+ // retrieve info about the device instance
std::ostringstream option_name;
util::stream_format(option_name, "%s;%s", image->instance_name(), image->brief_instance_name());
if (strcmp(image->device_typename(image->image_type()), image->instance_name()) == 0)
@@ -356,7 +357,14 @@ void emu_options::add_device_options()
// add the option
if (!exists(image->instance_name()))
+ {
+ // first device? add the header as to be pretty
+ if (m_device_options++ == 0)
+ add_entry(nullptr, "IMAGE DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE);
+
+ // add the option
add_entry(option_name.str().c_str(), nullptr, OPTION_STRING | OPTION_FLAG_DEVICE, nullptr, true);
+ }
}
}
@@ -401,12 +409,10 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_
core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
// keep adding slot options until we stop seeing new stuff
- m_slot_options = 0;
while (add_slot_options(swpart))
core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
// add device options and reparse
- m_device_options = 0;
add_device_options();
if (name != nullptr && exists(name))
set_value(name, value, OPTION_PRIORITY_SUBCMD, error_string);
@@ -560,6 +566,11 @@ void emu_options::set_system_name(const char *name)
// remove any existing device options
remove_device_options();
}
+ else
+ {
+ // revert device options set for the old software
+ revert(OPTION_PRIORITY_SUBCMD, OPTION_PRIORITY_SUBCMD);
+ }
// get the new system
const game_driver *cursystem = system();
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index 29e76b08a53..522f128961e 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -27,8 +27,7 @@ enum
OPTION_PRIORITY_CMDLINE,
// INI-based options are NORMAL priority, in increasing order:
- OPTION_PRIORITY_INI = OPTION_PRIORITY_NORMAL,
- OPTION_PRIORITY_MAME_INI,
+ OPTION_PRIORITY_MAME_INI = OPTION_PRIORITY_NORMAL + 1,
OPTION_PRIORITY_DEBUG_INI,
OPTION_PRIORITY_ORIENTATION_INI,
OPTION_PRIORITY_SYSTYPE_INI,
@@ -36,7 +35,8 @@ enum
OPTION_PRIORITY_SOURCE_INI,
OPTION_PRIORITY_GPARENT_INI,
OPTION_PRIORITY_PARENT_INI,
- OPTION_PRIORITY_DRIVER_INI
+ OPTION_PRIORITY_DRIVER_INI,
+ OPTION_PRIORITY_INI,
};
// core options
@@ -102,6 +102,7 @@ enum
#define OPTION_KEEPASPECT "keepaspect"
#define OPTION_UNEVENSTRETCH "unevenstretch"
#define OPTION_UNEVENSTRETCHX "unevenstretchx"
+#define OPTION_INTOVERSCAN "intoverscan"
#define OPTION_INTSCALEX "intscalex"
#define OPTION_INTSCALEY "intscaley"
@@ -296,6 +297,7 @@ public:
bool keep_aspect() const { return bool_value(OPTION_KEEPASPECT); }
bool uneven_stretch() const { return bool_value(OPTION_UNEVENSTRETCH); }
bool uneven_stretch_x() const { return bool_value(OPTION_UNEVENSTRETCHX); }
+ bool int_overscan() const { return bool_value(OPTION_INTOVERSCAN); }
int int_scale_x() const { return int_value(OPTION_INTSCALEX); }
int int_scale_y() const { return int_value(OPTION_INTSCALEY); }
diff --git a/src/emu/image.cpp b/src/emu/image.cpp
index f9f6111a292..4da1e198569 100644
--- a/src/emu/image.cpp
+++ b/src/emu/image.cpp
@@ -36,6 +36,9 @@ image_manager::image_manager(running_machine &machine)
/* is an image specified for this image */
image_name = machine.options().value(image->instance_name());
+ if (!image->user_loadable())
+ continue;
+
if ((image_name != nullptr) && (image_name[0] != '\0'))
{
/* mark init state */
@@ -226,6 +229,7 @@ void image_manager::postdevice_init()
for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
int result = image->finish_load();
+
/* did the image load fail? */
if (result)
{
diff --git a/src/emu/info.cpp b/src/emu/info.cpp
index d9e76cd72d9..f427d017795 100644
--- a/src/emu/info.cpp
+++ b/src/emu/info.cpp
@@ -100,10 +100,11 @@ const char info_xml_creator::s_dtd_string[] =
"\t\t\t<!ATTLIST input service (yes|no) \"no\">\n"
"\t\t\t<!ATTLIST input tilt (yes|no) \"no\">\n"
"\t\t\t<!ATTLIST input players CDATA #REQUIRED>\n"
-"\t\t\t<!ATTLIST input buttons CDATA #IMPLIED>\n"
"\t\t\t<!ATTLIST input coins CDATA #IMPLIED>\n"
"\t\t\t<!ELEMENT control EMPTY>\n"
"\t\t\t\t<!ATTLIST control type CDATA #REQUIRED>\n"
+"\t\t\t\t<!ATTLIST control player CDATA #IMPLIED>\n"
+"\t\t\t\t<!ATTLIST control buttons CDATA #IMPLIED>\n"
"\t\t\t\t<!ATTLIST control minimum CDATA #IMPLIED>\n"
"\t\t\t\t<!ATTLIST control maximum CDATA #IMPLIED>\n"
"\t\t\t\t<!ATTLIST control sensitivity CDATA #IMPLIED>\n"
@@ -147,6 +148,7 @@ const char info_xml_creator::s_dtd_string[] =
"\t\t<!ELEMENT device (instance*, extension*)>\n"
"\t\t\t<!ATTLIST device type CDATA #REQUIRED>\n"
"\t\t\t<!ATTLIST device tag CDATA #IMPLIED>\n"
+"\t\t\t<!ATTLIST device fixed_image CDATA #IMPLIED>\n"
"\t\t\t<!ATTLIST device mandatory CDATA #IMPLIED>\n"
"\t\t\t<!ATTLIST device interface CDATA #IMPLIED>\n"
"\t\t\t<!ELEMENT instance EMPTY>\n"
@@ -248,6 +250,33 @@ void info_xml_creator::output_one()
device_iterator iter(config.root_device());
for (device_t *device = iter.first(); device != nullptr; device = iter.next())
portlist.append(*device, errors);
+ // renumber player numbers for controller ports
+ int player_offset = 0;
+ // but treat keyboard count separately from players' number
+ int kbd_offset = 0;
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
+ {
+ int nplayers = 0;
+ bool new_kbd = FALSE;
+ for (ioport_port &port : portlist)
+ if (&port.device() == device)
+ for (ioport_field &field : port.fields())
+ if (field.type() >= IPT_START && field.type() < IPT_ANALOG_LAST)
+ {
+ if (field.type() == IPT_KEYBOARD)
+ {
+ if (!new_kbd) new_kbd = TRUE;
+ field.set_player(field.player() + kbd_offset);
+ }
+ else
+ {
+ nplayers = MAX(nplayers, field.player() + 1);
+ field.set_player(field.player() + player_offset);
+ }
+ }
+ player_offset += nplayers;
+ if (new_kbd) kbd_offset++;
+ }
// print the header and the game name
fprintf(m_output, "\t<%s",XML_TOP);
@@ -792,295 +821,466 @@ void info_xml_creator::output_sound(device_t &device)
void info_xml_creator::output_input(const ioport_list &portlist)
{
- // enumerated list of control types
- enum
- {
- ANALOG_TYPE_PADDLE,
- ANALOG_TYPE_PEDAL,
- ANALOG_TYPE_JOYSTICK,
- ANALOG_TYPE_POSITIONAL,
- ANALOG_TYPE_LIGHTGUN,
- ANALOG_TYPE_DIAL,
- ANALOG_TYPE_TRACKBALL,
- ANALOG_TYPE_MOUSE,
- ANALOG_TYPE_COUNT
- };
-
- // directions
- const UINT8 DIR_UP = 0x01;
- const UINT8 DIR_DOWN = 0x02;
- const UINT8 DIR_LEFT = 0x04;
- const UINT8 DIR_RIGHT = 0x08;
- const UINT8 DIR_4WAY = 0x10;
-
- // initialize the list of control types
- struct
- {
- const char * type; /* general type of input */
- bool analog;
- bool keyb;
- INT32 min; /* analog minimum value */
- INT32 max; /* analog maximum value */
- INT32 sensitivity; /* default analog sensitivity */
- INT32 keydelta; /* default analog keydelta */
- bool reverse; /* default analog reverse setting */
- } control_info[ANALOG_TYPE_COUNT];
-
- memset(&control_info, 0, sizeof(control_info));
-
- // tracking info as we iterate
- int nplayer = 0;
- int nbutton = 0;
- int ncoin = 0;
- UINT8 joytype[3] = { 0,0,0 };
- bool service = false;
- bool tilt = false;
- bool keypad = false;
- bool keyboard = false;
- bool mahjong = false;
- bool hanafuda = false;
- bool gambling = false;
-
- // iterate over the ports
- for (ioport_port &port : portlist)
- for (ioport_field &field : port.fields())
- {
- int analogtype = -1;
-
- // track the highest player number
- if (nplayer < field.player() + 1)
- nplayer = field.player() + 1;
-
- // switch off of the type
- switch (field.type())
- {
- // map which joystick directions are present
- case IPT_JOYSTICK_UP: joytype[0] |= DIR_UP | ((field.way() == 4) ? DIR_4WAY : 0); break;
- case IPT_JOYSTICK_DOWN: joytype[0] |= DIR_DOWN | ((field.way() == 4) ? DIR_4WAY : 0); break;
- case IPT_JOYSTICK_LEFT: joytype[0] |= DIR_LEFT | ((field.way() == 4) ? DIR_4WAY : 0); break;
- case IPT_JOYSTICK_RIGHT: joytype[0] |= DIR_RIGHT | ((field.way() == 4) ? DIR_4WAY : 0); break;
-
- case IPT_JOYSTICKLEFT_UP: joytype[1] |= DIR_UP | ((field.way() == 4) ? DIR_4WAY : 0); break;
- case IPT_JOYSTICKLEFT_DOWN: joytype[1] |= DIR_DOWN | ((field.way() == 4) ? DIR_4WAY : 0); break;
- case IPT_JOYSTICKLEFT_LEFT: joytype[1] |= DIR_LEFT | ((field.way() == 4) ? DIR_4WAY : 0); break;
- case IPT_JOYSTICKLEFT_RIGHT: joytype[1] |= DIR_RIGHT | ((field.way() == 4) ? DIR_4WAY : 0); break;
-
- case IPT_JOYSTICKRIGHT_UP: joytype[2] |= DIR_UP | ((field.way() == 4) ? DIR_4WAY : 0); break;
- case IPT_JOYSTICKRIGHT_DOWN: joytype[2] |= DIR_DOWN | ((field.way() == 4) ? DIR_4WAY : 0); break;
- case IPT_JOYSTICKRIGHT_LEFT: joytype[2] |= DIR_LEFT | ((field.way() == 4) ? DIR_4WAY : 0); break;
- case IPT_JOYSTICKRIGHT_RIGHT: joytype[2] |= DIR_RIGHT | ((field.way() == 4) ? DIR_4WAY : 0); break;
-
- // mark as an analog input, and get analog stats after switch
- case IPT_AD_STICK_X:
- case IPT_AD_STICK_Y:
- case IPT_AD_STICK_Z:
- control_info[analogtype = ANALOG_TYPE_JOYSTICK].type = "stick";
- break;
-
- case IPT_PADDLE:
- case IPT_PADDLE_V:
- control_info[analogtype = ANALOG_TYPE_PADDLE].type = "paddle";
- break;
-
- case IPT_PEDAL:
- case IPT_PEDAL2:
- case IPT_PEDAL3:
- control_info[analogtype = ANALOG_TYPE_PEDAL].type = "pedal";
- break;
-
- case IPT_LIGHTGUN_X:
- case IPT_LIGHTGUN_Y:
- control_info[analogtype = ANALOG_TYPE_LIGHTGUN].type = "lightgun";
- break;
-
- case IPT_POSITIONAL:
- case IPT_POSITIONAL_V:
- control_info[analogtype = ANALOG_TYPE_POSITIONAL].type = "positional";
- break;
-
- case IPT_DIAL:
- case IPT_DIAL_V:
- control_info[analogtype = ANALOG_TYPE_DIAL].type = "dial";
- break;
-
- case IPT_TRACKBALL_X:
- case IPT_TRACKBALL_Y:
- control_info[analogtype = ANALOG_TYPE_TRACKBALL].type = "trackball";
- break;
-
- case IPT_MOUSE_X:
- case IPT_MOUSE_Y:
- control_info[analogtype = ANALOG_TYPE_MOUSE].type = "mouse";
- break;
-
- // track maximum button index
- case IPT_BUTTON1:
- case IPT_BUTTON2:
- case IPT_BUTTON3:
- case IPT_BUTTON4:
- case IPT_BUTTON5:
- case IPT_BUTTON6:
- case IPT_BUTTON7:
- case IPT_BUTTON8:
- case IPT_BUTTON9:
- case IPT_BUTTON10:
- case IPT_BUTTON11:
- case IPT_BUTTON12:
- case IPT_BUTTON13:
- case IPT_BUTTON14:
- case IPT_BUTTON15:
- case IPT_BUTTON16:
- nbutton = MAX(nbutton, field.type() - IPT_BUTTON1 + 1);
- break;
-
- // track maximum coin index
- case IPT_COIN1:
- case IPT_COIN2:
- case IPT_COIN3:
- case IPT_COIN4:
- case IPT_COIN5:
- case IPT_COIN6:
- case IPT_COIN7:
- case IPT_COIN8:
- ncoin = MAX(ncoin, field.type() - IPT_COIN1 + 1);
- break;
-
- // track presence of these guys
- case IPT_KEYPAD:
- keypad = true;
- break;
-
- case IPT_KEYBOARD:
- keyboard = true;
- break;
-
- // additional types
- case IPT_SERVICE:
- service = true;
- break;
-
- case IPT_TILT:
- tilt = true;
- break;
-
- default:
- if (field.type() > IPT_MAHJONG_FIRST && field.type() < IPT_MAHJONG_LAST)
- mahjong = true;
- else if (field.type() > IPT_HANAFUDA_FIRST && field.type() < IPT_HANAFUDA_LAST)
- hanafuda = true;
- else if (field.type() > IPT_GAMBLING_FIRST && field.type() < IPT_GAMBLING_LAST)
- gambling = true;
- break;
- }
-
- // get the analog stats
- if (analogtype != -1)
- {
- if (field.minval() != 0)
- control_info[analogtype].min = field.minval();
- if (field.maxval() != 0)
- control_info[analogtype].max = field.maxval();
- if (field.sensitivity() != 0)
- control_info[analogtype].sensitivity = field.sensitivity();
- if (field.delta() != 0)
- control_info[analogtype].keydelta = field.delta();
- if (field.analog_reverse() != 0)
- control_info[analogtype].reverse = true;
- }
- }
-
- // output the basic info
- fprintf(m_output, "\t\t<input");
- fprintf(m_output, " players=\"%d\"", nplayer);
- if (nbutton != 0)
- fprintf(m_output, " buttons=\"%d\"", nbutton);
- if (ncoin != 0)
- fprintf(m_output, " coins=\"%d\"", ncoin);
- if (service)
- fprintf(m_output, " service=\"yes\"");
- if (tilt)
- fprintf(m_output, " tilt=\"yes\"");
- fprintf(m_output, ">\n");
-
- // output the joystick types
- if (joytype[1]==0 && joytype[2]!=0) { joytype[1] = joytype[2]; joytype[2] = 0; }
- if (joytype[0]==0 && joytype[1]!=0) { joytype[0] = joytype[1]; joytype[1] = 0; }
- if (joytype[1]==0 && joytype[2]!=0) { joytype[1] = joytype[2]; joytype[2] = 0; }
- if (joytype[0] != 0)
- {
- const char *joys = (joytype[2]!=0) ? "triple" : (joytype[1]!=0) ? "double" : "";
- fprintf(m_output, "\t\t\t<control type=\"%sjoy\"", joys);
- for (int lp=0; lp<3 && joytype[lp]!=0; lp++)
- {
- const char *plural = (lp==2) ? "3" : (lp==1) ? "2" : "";
- const char *ways;
- switch (joytype[lp] & (DIR_UP | DIR_DOWN | DIR_LEFT | DIR_RIGHT))
- {
- case DIR_UP | DIR_DOWN | DIR_LEFT | DIR_RIGHT:
- ways = ((joytype[lp] & DIR_4WAY) != 0) ? "4" : "8";
- break;
- case DIR_LEFT | DIR_RIGHT:
- ways = "2";
- break;
- case DIR_UP | DIR_DOWN:
- ways = "vertical2";
- break;
- case DIR_UP:
- case DIR_DOWN:
- case DIR_LEFT:
- case DIR_RIGHT:
- ways = "1";
- break;
- case DIR_UP | DIR_DOWN | DIR_LEFT:
- case DIR_UP | DIR_DOWN | DIR_RIGHT:
- case DIR_UP | DIR_LEFT | DIR_RIGHT:
- case DIR_DOWN | DIR_LEFT | DIR_RIGHT:
- ways = ((joytype[lp] & DIR_4WAY) != 0) ? "3 (half4)" : "5 (half8)";
- break;
- default:
- ways = "strange2";
- break;
- }
- fprintf(m_output, " ways%s=\"%s\"", plural,ways);
- }
- fprintf(m_output, "/>\n");
- }
-
- // output analog types
- for (auto & elem : control_info)
- if (elem.type != nullptr)
- {
- fprintf(m_output, "\t\t\t<control type=\"%s\"", xml_normalize_string(elem.type));
- if (elem.min != 0 || elem.max != 0)
- {
- fprintf(m_output, " minimum=\"%d\"", elem.min);
- fprintf(m_output, " maximum=\"%d\"", elem.max);
- }
- if (elem.sensitivity != 0)
- fprintf(m_output, " sensitivity=\"%d\"", elem.sensitivity);
- if (elem.keydelta != 0)
- fprintf(m_output, " keydelta=\"%d\"", elem.keydelta);
- if (elem.reverse)
- fprintf(m_output, " reverse=\"yes\"");
-
- fprintf(m_output, "/>\n");
- }
-
- // output keypad and keyboard
- if (keypad)
- fprintf(m_output, "\t\t\t<control type=\"keypad\"/>\n");
- if (keyboard)
- fprintf(m_output, "\t\t\t<control type=\"keyboard\"/>\n");
-
- // misc
- if (mahjong)
- fprintf(m_output, "\t\t\t<control type=\"mahjong\"/>\n");
- if (hanafuda)
- fprintf(m_output, "\t\t\t<control type=\"hanafuda\"/>\n");
- if (gambling)
- fprintf(m_output, "\t\t\t<control type=\"gambling\"/>\n");
-
- fprintf(m_output, "\t\t</input>\n");
+ // enumerated list of control types
+ // NOTE: the order is chosen so that 'spare' button inputs are assigned to the
+ // most-likely-correct input device when info is output (you can think of it as
+ // a sort of likelihood order of having buttons)
+ enum
+ {
+ CTRL_DIGITAL_BUTTONS,
+ CTRL_DIGITAL_JOYSTICK,
+ CTRL_ANALOG_JOYSTICK,
+ CTRL_ANALOG_LIGHTGUN,
+ CTRL_ANALOG_DIAL,
+ CTRL_ANALOG_POSITIONAL,
+ CTRL_ANALOG_TRACKBALL,
+ CTRL_ANALOG_MOUSE,
+ CTRL_ANALOG_PADDLE,
+ CTRL_ANALOG_PEDAL,
+ CTRL_DIGITAL_KEYPAD,
+ CTRL_DIGITAL_KEYBOARD,
+ CTRL_DIGITAL_MAHJONG,
+ CTRL_DIGITAL_HANAFUDA,
+ CTRL_DIGITAL_GAMBLING,
+ CTRL_COUNT
+ };
+
+ enum
+ {
+ CTRL_P1,
+ CTRL_P2,
+ CTRL_P3,
+ CTRL_P4,
+ CTRL_P5,
+ CTRL_P6,
+ CTRL_P7,
+ CTRL_P8,
+ CTRL_PCOUNT
+ };
+
+ // directions
+ const UINT8 DIR_UP = 0x01;
+ const UINT8 DIR_DOWN = 0x02;
+ const UINT8 DIR_LEFT = 0x04;
+ const UINT8 DIR_RIGHT = 0x08;
+
+ // initialize the list of control types
+ struct
+ {
+ const char * type; // general type of input
+ int player; // player which the input belongs to
+ int nbuttons; // total number of buttons
+ int maxbuttons; // max index of buttons (using IPT_BUTTONn) [probably to be removed soonish]
+ int ways; // directions for joystick
+ bool analog; // is analog input?
+ UINT8 helper[3]; // for dual joysticks [possibly to be removed soonish]
+ INT32 min; // analog minimum value
+ INT32 max; // analog maximum value
+ INT32 sensitivity; // default analog sensitivity
+ INT32 keydelta; // default analog keydelta
+ bool reverse; // default analog reverse setting
+ } control_info[CTRL_COUNT * CTRL_PCOUNT];
+
+ memset(&control_info, 0, sizeof(control_info));
+
+ // tracking info as we iterate
+ int nplayer = 0;
+ int ncoin = 0;
+ bool service = false;
+ bool tilt = false;
+
+ // iterate over the ports
+ for (ioport_port &port : portlist)
+ {
+ int ctrl_type = CTRL_DIGITAL_BUTTONS;
+ bool ctrl_analog = FALSE;
+ for (ioport_field &field : port.fields())
+ {
+
+ // track the highest player number
+ if (nplayer < field.player() + 1)
+ nplayer = field.player() + 1;
+
+ // switch off of the type
+ switch (field.type())
+ {
+ // map joysticks
+ case IPT_JOYSTICK_UP:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_UP;
+ break;
+ case IPT_JOYSTICK_DOWN:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_DOWN;
+ break;
+ case IPT_JOYSTICK_LEFT:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_LEFT;
+ break;
+ case IPT_JOYSTICK_RIGHT:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_RIGHT;
+ break;
+
+ case IPT_JOYSTICKLEFT_UP:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_UP;
+ break;
+ case IPT_JOYSTICKLEFT_DOWN:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_DOWN;
+ break;
+ case IPT_JOYSTICKLEFT_LEFT:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_LEFT;
+ break;
+ case IPT_JOYSTICKLEFT_RIGHT:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_RIGHT;
+ break;
+
+ case IPT_JOYSTICKRIGHT_UP:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_UP;
+ break;
+ case IPT_JOYSTICKRIGHT_DOWN:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_DOWN;
+ break;
+ case IPT_JOYSTICKRIGHT_LEFT:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_LEFT;
+ break;
+ case IPT_JOYSTICKRIGHT_RIGHT:
+ ctrl_type = CTRL_DIGITAL_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
+ control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_RIGHT;
+ break;
+
+ // map analog inputs
+ case IPT_AD_STICK_X:
+ case IPT_AD_STICK_Y:
+ case IPT_AD_STICK_Z:
+ ctrl_analog = TRUE;
+ ctrl_type = CTRL_ANALOG_JOYSTICK;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "stick";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
+ break;
+
+ case IPT_PADDLE:
+ case IPT_PADDLE_V:
+ ctrl_analog = TRUE;
+ ctrl_type = CTRL_ANALOG_PADDLE;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "paddle";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
+ break;
+
+ case IPT_PEDAL:
+ case IPT_PEDAL2:
+ case IPT_PEDAL3:
+ ctrl_analog = TRUE;
+ ctrl_type = CTRL_ANALOG_PEDAL;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "pedal";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
+ break;
+
+ case IPT_LIGHTGUN_X:
+ case IPT_LIGHTGUN_Y:
+ ctrl_analog = TRUE;
+ ctrl_type = CTRL_ANALOG_LIGHTGUN;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "lightgun";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
+ break;
+
+ case IPT_POSITIONAL:
+ case IPT_POSITIONAL_V:
+ ctrl_analog = TRUE;
+ ctrl_type = CTRL_ANALOG_POSITIONAL;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "positional";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
+ break;
+
+ case IPT_DIAL:
+ case IPT_DIAL_V:
+ ctrl_analog = TRUE;
+ ctrl_type = CTRL_ANALOG_DIAL;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "dial";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
+ break;
+
+ case IPT_TRACKBALL_X:
+ case IPT_TRACKBALL_Y:
+ ctrl_analog = TRUE;
+ ctrl_type = CTRL_ANALOG_TRACKBALL;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "trackball";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
+ break;
+
+ case IPT_MOUSE_X:
+ case IPT_MOUSE_Y:
+ ctrl_analog = TRUE;
+ ctrl_type = CTRL_ANALOG_MOUSE;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mouse";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
+ break;
+
+ // map buttons
+ case IPT_BUTTON1:
+ case IPT_BUTTON2:
+ case IPT_BUTTON3:
+ case IPT_BUTTON4:
+ case IPT_BUTTON5:
+ case IPT_BUTTON6:
+ case IPT_BUTTON7:
+ case IPT_BUTTON8:
+ case IPT_BUTTON9:
+ case IPT_BUTTON10:
+ case IPT_BUTTON11:
+ case IPT_BUTTON12:
+ case IPT_BUTTON13:
+ case IPT_BUTTON14:
+ case IPT_BUTTON15:
+ case IPT_BUTTON16:
+ ctrl_analog = FALSE;
+ if (control_info[field.player() * CTRL_COUNT + ctrl_type].type == nullptr)
+ {
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "only_buttons";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].analog = FALSE;
+ }
+ control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons = MAX(control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons, field.type() - IPT_BUTTON1 + 1);
+ control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
+ break;
+
+ // track maximum coin index
+ case IPT_COIN1:
+ case IPT_COIN2:
+ case IPT_COIN3:
+ case IPT_COIN4:
+ case IPT_COIN5:
+ case IPT_COIN6:
+ case IPT_COIN7:
+ case IPT_COIN8:
+ ncoin = MAX(ncoin, field.type() - IPT_COIN1 + 1);
+ break;
+
+ // track presence of keypads and keyboards
+ case IPT_KEYPAD:
+ ctrl_type = CTRL_DIGITAL_KEYPAD;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "keypad";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
+ break;
+
+ case IPT_KEYBOARD:
+ ctrl_type = CTRL_DIGITAL_KEYBOARD;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "keyboard";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
+ break;
+
+ // additional types
+ case IPT_SERVICE:
+ service = true;
+ break;
+
+ case IPT_TILT:
+ tilt = true;
+ break;
+
+ default:
+ if (field.type() > IPT_MAHJONG_FIRST && field.type() < IPT_MAHJONG_LAST)
+ {
+ ctrl_type = CTRL_DIGITAL_MAHJONG;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mahjong";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
+ }
+ else if (field.type() > IPT_HANAFUDA_FIRST && field.type() < IPT_HANAFUDA_LAST)
+ {
+ ctrl_type = CTRL_DIGITAL_HANAFUDA;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "hanafuda";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
+ }
+ else if (field.type() > IPT_GAMBLING_FIRST && field.type() < IPT_GAMBLING_LAST)
+ {
+ ctrl_type = CTRL_DIGITAL_GAMBLING;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].type = "gambling";
+ control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
+ control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
+ }
+ break;
+ }
+
+ if (ctrl_analog)
+ {
+ // get the analog stats
+ if (field.minval() != 0)
+ control_info[field.player() * CTRL_COUNT + ctrl_type].min = field.minval();
+ if (field.maxval() != 0)
+ control_info[field.player() * CTRL_COUNT + ctrl_type].max = field.maxval();
+ if (field.sensitivity() != 0)
+ control_info[field.player() * CTRL_COUNT + ctrl_type].sensitivity = field.sensitivity();
+ if (field.delta() != 0)
+ control_info[field.player() * CTRL_COUNT + ctrl_type].keydelta = field.delta();
+ if (field.analog_reverse() != 0)
+ control_info[field.player() * CTRL_COUNT + ctrl_type].reverse = TRUE;
+ }
+ }
+ }
+
+ // Clean-up those entries, if any, where buttons were defined in a separate port than the actual controller they belong to.
+ // This is quite often the case, especially for arcades where controls can be easily mapped to separate input ports on PCB.
+ // If such situation would only happen for joystick, it would be possible to work it around by initializing differently
+ // ctrl_type above, but it is quite common among analog inputs as well (for instance, this is the tipical situation
+ // for lightguns) and therefore we really need this separate loop.
+ for (int i = 0; i < CTRL_PCOUNT; i++)
+ {
+ bool fix_done = FALSE;
+ for (int j = 1; j < CTRL_COUNT; j++)
+ if (control_info[i * CTRL_COUNT].type != nullptr && control_info[i * CTRL_COUNT + j].type != nullptr && !fix_done)
+ {
+ control_info[i * CTRL_COUNT + j].nbuttons += control_info[i * CTRL_COUNT].nbuttons;
+ control_info[i * CTRL_COUNT + j].maxbuttons = MAX(control_info[i * CTRL_COUNT + j].maxbuttons, control_info[i * CTRL_COUNT].maxbuttons);
+
+ memset(&control_info[i * CTRL_COUNT], 0, sizeof(control_info[0]));
+ fix_done = TRUE;
+ }
+ }
+
+ // Output the input info
+ // First basic info
+ fprintf(m_output, "\t\t<input");
+ fprintf(m_output, " players=\"%d\"", nplayer);
+ if (ncoin != 0)
+ fprintf(m_output, " coins=\"%d\"", ncoin);
+ if (service)
+ fprintf(m_output, " service=\"yes\"");
+ if (tilt)
+ fprintf(m_output, " tilt=\"yes\"");
+ fprintf(m_output, ">\n");
+
+ // Then controller specific ones
+ for (auto & elem : control_info)
+ if (elem.type != nullptr)
+ {
+ //printf("type %s - player %d - buttons %d\n", elem.type, elem.player, elem.nbuttons);
+ if (elem.analog)
+ {
+ fprintf(m_output, "\t\t\t<control type=\"%s\"", xml_normalize_string(elem.type));
+ if (nplayer > 1)
+ fprintf(m_output, " player=\"%d\"", elem.player);
+ if (elem.nbuttons > 0)
+ fprintf(m_output, " buttons=\"%d\"", strcmp(elem.type, "stick") ? elem.nbuttons : elem.maxbuttons);
+ if (elem.min != 0 || elem.max != 0)
+ {
+ fprintf(m_output, " minimum=\"%d\"", elem.min);
+ fprintf(m_output, " maximum=\"%d\"", elem.max);
+ }
+ if (elem.sensitivity != 0)
+ fprintf(m_output, " sensitivity=\"%d\"", elem.sensitivity);
+ if (elem.keydelta != 0)
+ fprintf(m_output, " keydelta=\"%d\"", elem.keydelta);
+ if (elem.reverse)
+ fprintf(m_output, " reverse=\"yes\"");
+
+ fprintf(m_output, "/>\n");
+ }
+ else
+ {
+ if (elem.helper[1] == 0 && elem.helper[2] != 0) { elem.helper[1] = elem.helper[2]; elem.helper[2] = 0; }
+ if (elem.helper[0] == 0 && elem.helper[1] != 0) { elem.helper[0] = elem.helper[1]; elem.helper[1] = 0; }
+ if (elem.helper[1] == 0 && elem.helper[2] != 0) { elem.helper[1] = elem.helper[2]; elem.helper[2] = 0; }
+ const char *joys = (elem.helper[2] != 0) ? "triple" : (elem.helper[1] != 0) ? "double" : "";
+ fprintf(m_output, "\t\t\t<control type=\"%s%s\"", joys, xml_normalize_string(elem.type));
+ if (nplayer > 1)
+ fprintf(m_output, " player=\"%d\"", elem.player);
+ if (elem.nbuttons > 0)
+ fprintf(m_output, " buttons=\"%d\"", strcmp(elem.type, "joy") ? elem.nbuttons : elem.maxbuttons);
+ for (int lp = 0; lp < 3 && elem.helper[lp] != 0; lp++)
+ {
+ const char *plural = (lp==2) ? "3" : (lp==1) ? "2" : "";
+ const char *ways;
+ std::string helper;
+ switch (elem.helper[lp] & (DIR_UP | DIR_DOWN | DIR_LEFT | DIR_RIGHT))
+ {
+ case DIR_UP | DIR_DOWN | DIR_LEFT | DIR_RIGHT:
+ helper = string_format("%d", (elem.ways == 0) ? 8 : elem.ways);
+ ways = helper.c_str();
+ break;
+ case DIR_LEFT | DIR_RIGHT:
+ ways = "2";
+ break;
+ case DIR_UP | DIR_DOWN:
+ ways = "vertical2";
+ break;
+ case DIR_UP:
+ case DIR_DOWN:
+ case DIR_LEFT:
+ case DIR_RIGHT:
+ ways = "1";
+ break;
+ case DIR_UP | DIR_DOWN | DIR_LEFT:
+ case DIR_UP | DIR_DOWN | DIR_RIGHT:
+ case DIR_UP | DIR_LEFT | DIR_RIGHT:
+ case DIR_DOWN | DIR_LEFT | DIR_RIGHT:
+ ways = (elem.ways == 4) ? "3 (half4)" : "5 (half8)";
+ break;
+ default:
+ ways = "strange2";
+ break;
+ }
+ fprintf(m_output, " ways%s=\"%s\"", plural, ways);
+ }
+ fprintf(m_output, "/>\n");
+ }
+ }
+
+ fprintf(m_output, "\t\t</input>\n");
}
@@ -1229,6 +1429,7 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag)
{
if (strcmp(imagedev->device().tag(), device.tag()))
{
+ bool loadable = imagedev->user_loadable();
std::string newtag(imagedev->device().tag()), oldtag(":");
newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
@@ -1239,9 +1440,13 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag)
if (imagedev->device().tag())
fprintf(m_output, " tag=\"%s\"", xml_normalize_string(newtag.c_str()));
- // is this device mandatory?
- if (imagedev->must_be_loaded())
- fprintf(m_output, " mandatory=\"1\"");
+ // is this device available as media switch?
+ if (!loadable)
+ fprintf(m_output, " fixed_image=\"1\"");
+
+ // is this device mandatory?
+ if (imagedev->must_be_loaded())
+ fprintf(m_output, " mandatory=\"1\"");
if (imagedev->image_interface() && imagedev->image_interface()[0])
fprintf(m_output, " interface=\"%s\"", xml_normalize_string(imagedev->image_interface()));
@@ -1249,25 +1454,27 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag)
// close the XML tag
fprintf(m_output, ">\n");
- const char *name = imagedev->instance_name();
- const char *shortname = imagedev->brief_instance_name();
-
- fprintf(m_output, "\t\t\t<instance");
- fprintf(m_output, " name=\"%s\"", xml_normalize_string(name));
- fprintf(m_output, " briefname=\"%s\"", xml_normalize_string(shortname));
- fprintf(m_output, "/>\n");
-
- std::string extensions(imagedev->file_extensions());
-
- char *ext = strtok((char *)extensions.c_str(), ",");
- while (ext != nullptr)
- {
- fprintf(m_output, "\t\t\t<extension");
- fprintf(m_output, " name=\"%s\"", xml_normalize_string(ext));
- fprintf(m_output, "/>\n");
- ext = strtok(nullptr, ",");
- }
-
+ if (loadable)
+ {
+ const char *name = imagedev->instance_name();
+ const char *shortname = imagedev->brief_instance_name();
+
+ fprintf(m_output, "\t\t\t<instance");
+ fprintf(m_output, " name=\"%s\"", xml_normalize_string(name));
+ fprintf(m_output, " briefname=\"%s\"", xml_normalize_string(shortname));
+ fprintf(m_output, "/>\n");
+
+ std::string extensions(imagedev->file_extensions());
+
+ char *ext = strtok((char *)extensions.c_str(), ",");
+ while (ext != nullptr)
+ {
+ fprintf(m_output, "\t\t\t<extension");
+ fprintf(m_output, " name=\"%s\"", xml_normalize_string(ext));
+ fprintf(m_output, "/>\n");
+ ext = strtok(nullptr, ",");
+ }
+ }
fprintf(m_output, "\t\t</device>\n");
}
}
diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h
index ff2ffbc5749..cd083738ecc 100644
--- a/src/emu/inpttype.h
+++ b/src/emu/inpttype.h
@@ -741,7 +741,7 @@ void construct_core_types_UI(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_END, "UI End", input_seq(KEYCODE_END) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAGE_UP, "UI Page Up", input_seq(KEYCODE_PGUP) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAGE_DOWN, "UI Page Down", input_seq(KEYCODE_PGDN) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SELECT, "UI Select", input_seq(KEYCODE_ENTER, input_seq::or_code, JOYCODE_BUTTON1_INDEXED(0)) )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SELECT, "UI Select", input_seq(KEYCODE_ENTER, input_seq::or_code, JOYCODE_BUTTON1_INDEXED(0), input_seq::or_code, KEYCODE_ENTER_PAD) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_CANCEL, "UI Cancel", input_seq(KEYCODE_ESC) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DISPLAY_COMMENT, "UI Display Comment", input_seq(KEYCODE_SPACE) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_CLEAR, "UI Clear", input_seq(KEYCODE_DEL) )
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp
index 3d50bcf9e5e..44b627baf96 100644
--- a/src/emu/ioport.cpp
+++ b/src/emu/ioport.cpp
@@ -1583,71 +1583,23 @@ const input_seq &ioport_field::defseq(input_seq_type seqtype) const
ioport_type_class ioport_field::type_class() const
{
- ioport_type_class result;
+ ioport_group group = manager().type_group(m_type, m_player);
+ if (group >= IPG_PLAYER1 && group <= IPG_PLAYER8)
+ return INPUT_CLASS_CONTROLLER;
- switch (m_type)
- {
- case IPT_JOYSTICK_UP:
- case IPT_JOYSTICK_DOWN:
- case IPT_JOYSTICK_LEFT:
- case IPT_JOYSTICK_RIGHT:
- case IPT_JOYSTICKLEFT_UP:
- case IPT_JOYSTICKLEFT_DOWN:
- case IPT_JOYSTICKLEFT_LEFT:
- case IPT_JOYSTICKLEFT_RIGHT:
- case IPT_JOYSTICKRIGHT_UP:
- case IPT_JOYSTICKRIGHT_DOWN:
- case IPT_JOYSTICKRIGHT_LEFT:
- case IPT_JOYSTICKRIGHT_RIGHT:
- case IPT_BUTTON1:
- case IPT_BUTTON2:
- case IPT_BUTTON3:
- case IPT_BUTTON4:
- case IPT_BUTTON5:
- case IPT_BUTTON6:
- case IPT_BUTTON7:
- case IPT_BUTTON8:
- case IPT_BUTTON9:
- case IPT_BUTTON10:
- case IPT_AD_STICK_X:
- case IPT_AD_STICK_Y:
- case IPT_AD_STICK_Z:
- case IPT_TRACKBALL_X:
- case IPT_TRACKBALL_Y:
- case IPT_LIGHTGUN_X:
- case IPT_LIGHTGUN_Y:
- case IPT_MOUSE_X:
- case IPT_MOUSE_Y:
- case IPT_START:
- case IPT_SELECT:
- result = INPUT_CLASS_CONTROLLER;
- break;
+ if (m_type == IPT_KEYPAD || m_type == IPT_KEYBOARD)
+ return INPUT_CLASS_KEYBOARD;
- case IPT_KEYPAD:
- case IPT_KEYBOARD:
- result = INPUT_CLASS_KEYBOARD;
- break;
+ if (m_type == IPT_CONFIG)
+ return INPUT_CLASS_CONFIG;
- case IPT_CONFIG:
- result = INPUT_CLASS_CONFIG;
- break;
+ if (m_type == IPT_DIPSWITCH)
+ return INPUT_CLASS_DIPSWITCH;
- case IPT_DIPSWITCH:
- result = INPUT_CLASS_DIPSWITCH;
- break;
-
- case 0:
- if (m_name != nullptr && m_name != (const char *)-1)
- result = INPUT_CLASS_MISC;
- else
- result = INPUT_CLASS_INTERNAL;
- break;
+ if (group == IPG_OTHER || (group == IPG_INVALID && m_name != nullptr))
+ return INPUT_CLASS_MISC;
- default:
- result = INPUT_CLASS_INTERNAL;
- break;
- }
- return result;
+ return INPUT_CLASS_INTERNAL;
}
diff --git a/src/emu/language.cpp b/src/emu/language.cpp
index 8d4618c7be3..5c9686a646e 100644
--- a/src/emu/language.cpp
+++ b/src/emu/language.cpp
@@ -9,6 +9,7 @@
***************************************************************************/
#include "emu.h"
+#include "emuopts.h"
static std::unordered_map<std::string, std::string> g_translation;
diff --git a/src/emu/layout/svg.lay b/src/emu/layout/svg.lay
new file mode 100644
index 00000000000..96a25360a19
--- /dev/null
+++ b/src/emu/layout/svg.lay
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+ <view name="SVG">
+ <screen index="0">
+ <bounds left="0" top="0" right="~scr0width~" bottom="~scr0height~" />
+ </screen>
+ </view>
+</mamelayout>
diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp
index 62667ee0eef..b1ebf60d88a 100644
--- a/src/emu/luaengine.cpp
+++ b/src/emu/luaengine.cpp
@@ -16,10 +16,14 @@
#include "emu.h"
#include "cheat.h"
#include "drivenum.h"
+#include "emuopts.h"
#include "ui/ui.h"
#include "luaengine.h"
#include <mutex>
+#ifdef __clang__
+#pragma clang diagnostic ignored "-Wshift-count-overflow"
+#endif
//**************************************************************************
// LUA ENGINE
//**************************************************************************
@@ -108,6 +112,93 @@ int lua_engine::docall(int narg, int nres)
return status;
}
+namespace luabridge
+{
+template <>
+struct Stack <osd_file::error>
+{
+ static void push(lua_State *L, osd_file::error error)
+ {
+ std::string strerror;
+ switch(error)
+ {
+ case osd_file::error::NONE:
+ lua_pushboolean(L, false);
+ return;
+ case osd_file::error::FAILURE:
+ strerror = "failure";
+ break;
+ case osd_file::error::OUT_OF_MEMORY:
+ strerror = "out_of_memory";
+ break;
+ case osd_file::error::NOT_FOUND:
+ strerror = "not_found";
+ break;
+ case osd_file::error::ACCESS_DENIED:
+ strerror = "access_denied";
+ break;
+ case osd_file::error::ALREADY_OPEN:
+ strerror = "already_open";
+ break;
+ case osd_file::error::TOO_MANY_FILES:
+ strerror = "too_many_files";
+ break;
+ case osd_file::error::INVALID_DATA:
+ strerror = "invalid_data";
+ break;
+ case osd_file::error::INVALID_ACCESS:
+ strerror = "invalid_access";
+ break;
+ default:
+ strerror = "unknown_error";
+ break;
+ }
+ lua_pushstring(L, strerror.c_str());
+ }
+};
+template <>
+struct Stack <map_handler_type>
+{
+ static void push(lua_State *L, map_handler_type error)
+ {
+ std::string type;
+ switch(error)
+ {
+ case AMH_NONE:
+ type = "none";
+ break;
+ case AMH_RAM:
+ type = "ram";
+ break;
+ case AMH_ROM:
+ type = "rom";
+ break;
+ case AMH_NOP:
+ type = "nop";
+ break;
+ case AMH_UNMAP:
+ type = "unmap";
+ break;
+ case AMH_DEVICE_DELEGATE:
+ type = "delegate";
+ break;
+ case AMH_PORT:
+ type = "port";
+ break;
+ case AMH_BANK:
+ type = "bank";
+ break;
+ case AMH_DEVICE_SUBMAP:
+ type = "submap";
+ break;
+ default:
+ type = "unknown";
+ break;
+ }
+ lua_pushstring(L, type.c_str());
+ }
+};
+}
/* mark in error messages for incomplete statements */
#define EOFMARK "<eof>"
#define marklen (sizeof(EOFMARK)/sizeof(char) - 1)
@@ -447,6 +538,61 @@ luabridge::LuaRef lua_engine::l_machine_get_devices(const running_machine *r)
}
//-------------------------------------------------
+// machine_get_images - return table of available image devices userdata
+// -> manager:machine().images["flop1"]
+//-------------------------------------------------
+
+luabridge::LuaRef lua_engine::l_machine_get_images(const running_machine *r)
+{
+ lua_State *L = luaThis->m_lua_state;
+ luabridge::LuaRef image_table = luabridge::LuaRef::newTable(L);
+
+ image_interface_iterator iter(r->root_device());
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next()) {
+ image_table[image->brief_instance_name()] = image;
+ image_table[image->instance_name()] = image;
+ }
+
+ return image_table;
+}
+
+//-------------------------------------------------
+// memory_banks - return memory_banks
+// -> manager:machine():memory().banks["maincpu"]
+//-------------------------------------------------
+
+luabridge::LuaRef lua_engine::l_memory_get_banks(const memory_manager *m)
+{
+ memory_manager *mm = const_cast<memory_manager *>(m);
+ lua_State *L = luaThis->m_lua_state;
+ luabridge::LuaRef table = luabridge::LuaRef::newTable(L);
+
+ for (memory_bank &bank : mm->banks()) {
+ table[bank.tag()] = &bank;
+ }
+
+ return table;
+}
+
+//-------------------------------------------------
+// memory_regions - return memory_regions
+// -> manager:machine():memory().region[":maincpu"]
+//-------------------------------------------------
+
+luabridge::LuaRef lua_engine::l_memory_get_regions(const memory_manager *m)
+{
+ memory_manager *mm = const_cast<memory_manager *>(m);
+ lua_State *L = luaThis->m_lua_state;
+ luabridge::LuaRef table = luabridge::LuaRef::newTable(L);
+
+ for (memory_region &region: mm->regions()) {
+ table[region.name()] = &region;
+ }
+
+ return table;
+}
+
+//-------------------------------------------------
// machine_cheat_entries - return cheat entries
// -> manager:machine():cheat().entries[0]
//-------------------------------------------------
@@ -566,6 +712,9 @@ luabridge::LuaRef lua_engine::l_dev_get_memspaces(const device_t *d)
lua_State *L = luaThis->m_lua_state;
luabridge::LuaRef sp_table = luabridge::LuaRef::newTable(L);
+ if(!&dev->memory())
+ return sp_table;
+
for (address_spacenum sp = AS_0; sp < ADDRESS_SPACES; ++sp) {
if (dev->memory().has_space(sp)) {
sp_table[dev->memory().space(sp).name()] = &(dev->memory().space(sp));
@@ -585,6 +734,10 @@ luabridge::LuaRef lua_engine::l_dev_get_states(const device_t *d)
device_t *dev = const_cast<device_t *>(d);
lua_State *L = luaThis->m_lua_state;
luabridge::LuaRef st_table = luabridge::LuaRef::newTable(L);
+
+ if(!&dev->state())
+ return st_table;
+
for (device_state_entry &s : dev->state().state_entries())
{
// XXX: refrain from exporting non-visible entries?
@@ -595,6 +748,126 @@ luabridge::LuaRef lua_engine::l_dev_get_states(const device_t *d)
}
//-------------------------------------------------
+// device_get_item - return table of indexed items owned by this device
+// -> manager:machine().devices[":maincpu"].items
+//-------------------------------------------------
+
+luabridge::LuaRef lua_engine::l_dev_get_items(const device_t *d)
+{
+ device_t *dev = const_cast<device_t *>(d);
+ lua_State *L = luaThis->m_lua_state;
+ luabridge::LuaRef table = luabridge::LuaRef::newTable(L);
+ std::string tag = dev->tag();
+
+ // 10000 is enough?
+ for(int i = 0; i < 10000; i++)
+ {
+ std::string name;
+ const char *item;
+ unsigned int size, count;
+ void *base;
+ item = dev->machine().save().indexed_item(i, base, size, count);
+ if(!item)
+ break;
+ name = &(strchr(item, '/')[1]);
+ if(name.substr(0, name.find("/")) == tag)
+ {
+ name = name.substr(name.find("/") + 1, std::string::npos);
+ table[name] = i;
+ }
+ }
+ return table;
+}
+
+lua_engine::lua_item::lua_item(int index)
+{
+ std::string name;
+ const char *item;
+ item = luaThis->machine().save().indexed_item(index, l_item_base, l_item_size, l_item_count);
+ if(!item)
+ {
+ l_item_base = nullptr;
+ l_item_size = 0;
+ l_item_count= 0;
+ }
+}
+
+int lua_engine::lua_item::l_item_read(lua_State *L)
+{
+ luaL_argcheck(L, lua_isnumber(L, 2), 2, "offset (integer) expected");
+ int offset = lua_tounsigned(L, 2);
+ int ret = 0;
+ if(!l_item_base || (offset > l_item_count))
+ {
+ lua_pushnil(L);
+ return 1;
+ }
+ switch(l_item_size)
+ {
+ case 1:
+ default:
+ ret = ((UINT8 *)l_item_base)[offset];
+ break;
+ case 2:
+ ret = ((UINT16 *)l_item_base)[offset];
+ break;
+ case 4:
+ ret = ((UINT32 *)l_item_base)[offset];
+ break;
+ case 8:
+ ret = ((UINT64 *)l_item_base)[offset];
+ break;
+ }
+ lua_pushunsigned(L, ret);
+ return 1;
+}
+
+int lua_engine::lua_item::l_item_write(lua_State *L)
+{
+ luaL_argcheck(L, lua_isnumber(L, 2), 2, "offset (integer) expected");
+ luaL_argcheck(L, lua_isnumber(L, 3), 3, "value (integer) expected");
+ int offset = lua_tounsigned(L, 2);
+ UINT64 value = lua_tounsigned(L, 3);
+ if(!l_item_base || (offset > l_item_count))
+ return 1;
+ switch(l_item_size)
+ {
+ case 1:
+ default:
+ ((UINT8 *)l_item_base)[offset] = (UINT8)value;
+ break;
+ case 2:
+ ((UINT16 *)l_item_base)[offset] = (UINT16)value;
+ break;
+ case 4:
+ ((UINT32 *)l_item_base)[offset] = (UINT32)value;
+ break;
+ case 8:
+ ((UINT64 *)l_item_base)[offset] = (UINT64)value;
+ break;
+ }
+ return 1;
+}
+
+int lua_engine::lua_item::l_item_read_block(lua_State *L)
+{
+ luaL_argcheck(L, lua_isnumber(L, 2), 2, "offset (integer) expected");
+ luaL_argcheck(L, lua_isnumber(L, 3), 3, "length (integer) expected");
+ int offset = lua_tounsigned(L, 2);
+ int len = lua_tonumber(L, 3);
+ if(!l_item_base || ((offset + len) > (l_item_size * l_item_count)))
+ {
+ lua_pushnil(L);
+ return 1;
+ }
+ luaL_Buffer buff;
+ char *ptr = luaL_buffinitsize(L, &buff, len);
+ memcpy(ptr, l_item_base, len);
+ luaL_pushresultsize(&buff, len);
+ return 1;
+}
+
+//-------------------------------------------------
// state_get_value - return value of a device state entry
// -> manager:machine().devices[":maincpu"].state["PC"].value
//-------------------------------------------------
@@ -697,7 +970,7 @@ int lua_engine::lua_addr_space::l_mem_write(lua_State *L)
if (WORD_ALIGNED(address)) {
sp.write_word(address, val);
} else {
- sp.read_word_unaligned(address, val);
+ sp.write_word_unaligned(address, val);
}
break;
case 32:
@@ -721,6 +994,170 @@ int lua_engine::lua_addr_space::l_mem_write(lua_State *L)
return 0;
}
+//-------------------------------------------------
+// mem_direct_read - templated direct memory readers for <sign>,<size>
+// -> manager:machine().devices[":maincpu"].spaces["program"]:read_direct_i8(0xC000)
+//-------------------------------------------------
+
+UINT8 lua_engine::read_direct_byte(address_space &space, offs_t addr)
+{
+ UINT8 *base = (UINT8 *)space.get_read_ptr(space.address_to_byte(addr));
+ if(base)
+ return base[addr];
+ else
+ return 0;
+}
+
+template <typename T>
+int lua_engine::lua_addr_space::l_direct_mem_read(lua_State *L)
+{
+ address_space &sp = luabridge::Stack<address_space &>::get(L, 1);
+ luaL_argcheck(L, lua_isnumber(L, 2), 2, "address (integer) expected");
+ offs_t address = lua_tounsigned(L, 2);
+ T mem_content = 0;
+ for(int i = 0; i < sizeof(T); i++)
+ {
+ UINT8 byte;
+ mem_content <<= 8;
+ if(sp.endianness() == ENDIANNESS_BIG)
+ byte = read_direct_byte(sp, address + sizeof(T) - i);
+ else
+ byte = read_direct_byte(sp, address + i);
+ mem_content |= byte;
+ }
+
+ if (std::numeric_limits<T>::is_signed) {
+ lua_pushinteger(L, mem_content);
+ } else {
+ lua_pushunsigned(L, mem_content);
+ }
+
+ return 1;
+}
+
+//-------------------------------------------------
+// mem_direct_write - templated memory writer for <sign>,<size>
+// -> manager:machine().devices[":maincpu"].spaces["program"]:write_direct_u16(0xC000, 0xF00D)
+//-------------------------------------------------
+
+void lua_engine::write_direct_byte(address_space &space, offs_t addr, UINT8 byte)
+{
+ UINT8 *base = (UINT8 *)space.get_read_ptr(space.address_to_byte(addr));
+ if(base)
+ base[addr] = byte;
+}
+
+template <typename T>
+int lua_engine::lua_addr_space::l_direct_mem_write(lua_State *L)
+{
+ address_space &sp = luabridge::Stack<address_space &>::get(L, 1);
+ luaL_argcheck(L, lua_isnumber(L, 2), 2, "address (integer) expected");
+ luaL_argcheck(L, lua_isnumber(L, 3), 3, "value (integer) expected");
+ offs_t address = lua_tounsigned(L, 2);
+ T val = lua_tounsigned(L, 3);
+ for(int i = 0; i < sizeof(T); i++)
+ {
+ if(sp.endianness() == ENDIANNESS_BIG)
+ write_direct_byte(sp, address + sizeof(T) - i, val & 0xff);
+ else
+ write_direct_byte(sp, address + i, val & 0xff);
+ val >>= 8;
+ }
+
+ return 0;
+}
+
+//-------------------------------------------------
+// region_read - templated region readers for <sign>,<size>
+// -> manager:machine():memory().region[":maincpu"]:read_i8(0xC000)
+//-------------------------------------------------
+
+UINT8 lua_engine::read_region_byte(memory_region &region, offs_t addr)
+{
+ if(addr >= region.bytes())
+ return 0;
+
+ return region.u8(addr);
+}
+
+template <typename T>
+int lua_engine::lua_memory_region::l_region_read(lua_State *L)
+{
+ memory_region &region = luabridge::Stack<memory_region &>::get(L, 1);
+ luaL_argcheck(L, lua_isnumber(L, 2), 2, "address (integer) expected");
+ offs_t address = lua_tounsigned(L, 2);
+ T mem_content = 0;
+ for(int i = 0; i < sizeof(T); i++)
+ {
+ UINT8 byte;
+ mem_content <<= 8;
+ if(region.endianness() == ENDIANNESS_BIG)
+ byte = read_region_byte(region, address + sizeof(T) - i);
+ else
+ byte = read_region_byte(region, address + i);
+ mem_content |= byte;
+ }
+
+ if (std::numeric_limits<T>::is_signed) {
+ lua_pushinteger(L, mem_content);
+ } else {
+ lua_pushunsigned(L, mem_content);
+ }
+
+ return 1;
+}
+
+//-------------------------------------------------
+// region_write - templated region writer for <sign>,<size>
+// -> manager:machine():memory().region[":maincpu"]:write_u16(0xC000, 0xF00D)
+//-------------------------------------------------
+
+void lua_engine::write_region_byte(memory_region &region, offs_t addr, UINT8 byte)
+{
+ if(addr >= region.bytes())
+ return;
+
+ region.base()[addr] = byte;
+}
+
+template <typename T>
+int lua_engine::lua_memory_region::l_region_write(lua_State *L)
+{
+ memory_region &region = luabridge::Stack<memory_region &>::get(L, 1);
+ luaL_argcheck(L, lua_isnumber(L, 2), 2, "address (integer) expected");
+ luaL_argcheck(L, lua_isnumber(L, 3), 3, "value (integer) expected");
+ offs_t address = lua_tounsigned(L, 2);
+ T val = lua_tounsigned(L, 3);
+ for(int i = 0; i < sizeof(T); i++)
+ {
+ if(region.endianness() == ENDIANNESS_BIG)
+ write_region_byte(region, address + sizeof(T) - i, val & 0xff);
+ else
+ write_region_byte(region, address + i, val & 0xff);
+ val >>= 8;
+ }
+
+ return 0;
+}
+
+luabridge::LuaRef lua_engine::l_addr_space_map(const address_space *space)
+{
+ lua_State *L = luaThis->m_lua_state;
+ luabridge::LuaRef map = luabridge::LuaRef::newTable(L);
+
+ int i = 1;
+ for (address_map_entry &entry : space->map()->m_entrylist)
+ {
+ luabridge::LuaRef mapentry = luabridge::LuaRef::newTable(L);
+ mapentry["offset"] = space->address_to_byte(entry.m_addrstart) & space->bytemask();
+ mapentry["endoff"] = space->address_to_byte(entry.m_addrend) & space->bytemask();
+ mapentry["readtype"] = entry.m_read.m_type;
+ mapentry["writetype"] = entry.m_write.m_type;
+ map[i++] = mapentry;
+ }
+ return map;
+}
+
int lua_engine::lua_options_entry::l_entry_value(lua_State *L)
{
core_options::entry *e = luabridge::Stack<core_options::entry *>::get(L, 1);
@@ -968,6 +1405,7 @@ int lua_engine::lua_screen::l_type(lua_State *L)
case SCREEN_TYPE_RASTER: lua_pushliteral(L, "raster"); break;
case SCREEN_TYPE_VECTOR: lua_pushliteral(L, "vector"); break;
case SCREEN_TYPE_LCD: lua_pushliteral(L, "lcd"); break;
+ case SCREEN_TYPE_SVG: lua_pushliteral(L, "svg"); break;
default: lua_pushliteral(L, "unknown"); break;
}
@@ -1049,6 +1487,7 @@ int lua_engine::lua_screen::l_draw_line(lua_State *L)
//-------------------------------------------------
// draw_text - draw text on a screen container
+// if x is a position, then y is a pixel position, otherwise x and y are screen size relative
// -> manager:machine().screens[":screen"]:draw_text(x, y, message)
//-------------------------------------------------
@@ -1060,7 +1499,7 @@ int lua_engine::lua_screen::l_draw_text(lua_State *L)
}
// ensure that we got proper parameters
- luaL_argcheck(L, lua_isnumber(L, 2), 2, "x (integer) expected");
+ luaL_argcheck(L, lua_isnumber(L, 2) || lua_isstring(L, 2), 2, "x (integer or string) expected");
luaL_argcheck(L, lua_isnumber(L, 3), 3, "y (integer) expected");
luaL_argcheck(L, lua_isstring(L, 4), 4, "message (string) expected");
luaL_argcheck(L, lua_isinteger(L, 5) || lua_isnone(L, 5), 5, "optional argument: text color, integer expected (default: 0xffffffff)");
@@ -1068,8 +1507,22 @@ int lua_engine::lua_screen::l_draw_text(lua_State *L)
// retrieve all parameters
int sc_width = sc->visible_area().width();
int sc_height = sc->visible_area().height();
- float x = MIN(MAX(0, (float) lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width);
- float y = MIN(MAX(0, (float) lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height);
+ int justify = JUSTIFY_LEFT;
+ float y, x = 0;
+ if(lua_isnumber(L, 2))
+ {
+ x = MIN(MAX(0, (float) lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width);
+ y = MIN(MAX(0, (float) lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height);
+ }
+ else
+ {
+ std::string just_str = lua_tostring(L, 2);
+ if(just_str == "right")
+ justify = JUSTIFY_RIGHT;
+ else if(just_str == "center")
+ justify = JUSTIFY_CENTER;
+ y = lua_tonumber(L, 3);
+ }
const char *msg = luaL_checkstring(L,4);
rgb_t textcolor = UI_TEXT_COLOR;
if (!lua_isnone(L, 5)) {
@@ -1079,13 +1532,25 @@ int lua_engine::lua_screen::l_draw_text(lua_State *L)
// draw the text
render_container &rc = sc->container();
ui_manager &ui = sc->machine().ui();
- ui.draw_text_full(&rc, msg, x, y , (1.0f - x),
- JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, textcolor,
+ ui.draw_text_full(&rc, msg, x, y, (1.0f - x),
+ justify, WRAP_WORD, DRAW_NORMAL, textcolor,
UI_TEXT_BG_COLOR, nullptr, nullptr);
return 0;
}
+int lua_engine::lua_emu_file::l_emu_file_read(lua_State *L)
+{
+ emu_file *file = luabridge::Stack<emu_file *>::get(L, 1);
+ luaL_argcheck(L, lua_isnumber(L, 2), 2, "length (integer) expected");
+ int ret, len = lua_tonumber(L, 2);
+ luaL_Buffer buff;
+ char *ptr = luaL_buffinitsize(L, &buff, len);
+ ret = file->read(ptr, len);
+ luaL_pushresultsize(&buff, ret);
+ return 1;
+}
+
void *lua_engine::checkparam(lua_State *L, int idx, const char *tname)
{
const char *name;
@@ -1273,6 +1738,92 @@ lua_engine::~lua_engine()
close();
}
+void lua_engine::menu_populate(std::string &menu, std::vector<menu_item> &menu_list)
+{
+ std::string field = "menu_pop_" + menu;
+ lua_settop(m_lua_state, 0);
+ lua_getfield(m_lua_state, LUA_REGISTRYINDEX, field.c_str());
+
+ if(!lua_isfunction(m_lua_state, -1))
+ {
+ lua_pop(m_lua_state, 1);
+ return;
+ }
+ if(int error = lua_pcall(m_lua_state, 0, 1, 0))
+ {
+ if(error == 2)
+ printf("%s\n", lua_tostring(m_lua_state, -1));
+ lua_pop(m_lua_state, 1);
+ return;
+ }
+ if(!lua_istable(m_lua_state, -1))
+ {
+ lua_pop(m_lua_state, 1);
+ return;
+ }
+
+ lua_pushnil(m_lua_state);
+ while(lua_next(m_lua_state, -2))
+ {
+ if(lua_istable(m_lua_state, -1))
+ {
+ menu_item item;
+ lua_rawgeti(m_lua_state, -1, 1);
+ item.text = lua_tostring(m_lua_state, -1);
+ lua_pop(m_lua_state, 1);
+ lua_rawgeti(m_lua_state, -1, 2);
+ item.subtext = lua_tostring(m_lua_state, -1);
+ lua_pop(m_lua_state, 1);
+ lua_rawgeti(m_lua_state, -1, 3);
+ item.flags = lua_tostring(m_lua_state, -1);
+ lua_pop(m_lua_state, 1);
+ menu_list.push_back(item);
+ }
+ lua_pop(m_lua_state, 1);
+ }
+ lua_pop(m_lua_state, 1);
+}
+
+bool lua_engine::menu_callback(std::string &menu, int index, std::string event)
+{
+ std::string field = "menu_cb_" + menu;
+ bool ret = false;
+ lua_settop(m_lua_state, 0);
+ lua_getfield(m_lua_state, LUA_REGISTRYINDEX, field.c_str());
+
+ if(lua_isfunction(m_lua_state, -1))
+ {
+ lua_pushinteger(m_lua_state, index);
+ lua_pushstring(m_lua_state, event.c_str());
+ if(int error = lua_pcall(m_lua_state, 2, 1, 0))
+ {
+ if(error == 2)
+ printf("%s\n", lua_tostring(m_lua_state, -1));
+ lua_pop(m_lua_state, 1);
+ return false;
+ }
+ ret = lua_toboolean(m_lua_state, -1);
+ lua_pop(m_lua_state, 1);
+ }
+ return ret;
+}
+
+int lua_engine::l_emu_register_menu(lua_State *L)
+{
+ luaL_argcheck(L, lua_isfunction(L, 1), 1, "callback function expected");
+ luaL_argcheck(L, lua_isfunction(L, 2), 2, "callback function expected");
+ luaL_argcheck(L, lua_isstring(L, 3), 3, "message (string) expected");
+ std::string name = luaL_checkstring(L, 3);
+ std::string cbfield = "menu_cb_" + name;
+ std::string popfield = "menu_pop_" + name;
+ luaThis->m_menu.push_back(std::string(name));
+ lua_pushvalue(L, 1);
+ lua_setfield(L, LUA_REGISTRYINDEX, cbfield.c_str());
+ lua_pushvalue(L, 2);
+ lua_setfield(L, LUA_REGISTRYINDEX, popfield.c_str());
+ return 1;
+}
+
void lua_engine::execute_function(const char *id)
{
lua_settop(m_lua_state, 0);
@@ -1285,7 +1836,12 @@ void lua_engine::execute_function(const char *id)
{
if (lua_isfunction(m_lua_state, -1))
{
- lua_pcall(m_lua_state, 0, 0, 0);
+ if(int error = lua_pcall(m_lua_state, 0, 0, 0))
+ {
+ if(error == 2)
+ printf("%s\n", lua_tostring(m_lua_state, -1));
+ lua_pop(m_lua_state, 1);
+ }
}
else
{
@@ -1346,6 +1902,11 @@ int lua_engine::l_emu_register_frame(lua_State *L)
return register_function(L, "LUA_ON_FRAME");
}
+int lua_engine::l_emu_register_frame_done(lua_State *L)
+{
+ return register_function(L, "LUA_ON_FRAME_DONE");
+}
+
void lua_engine::on_machine_prestart()
{
execute_function("LUA_ON_PRESTART");
@@ -1376,6 +1937,11 @@ void lua_engine::on_machine_frame()
execute_function("LUA_ON_FRAME");
}
+void lua_engine::on_frame_done()
+{
+ execute_function("LUA_ON_FRAME_DONE");
+}
+
void lua_engine::update_machine()
{
lua_newtable(m_lua_state);
@@ -1452,6 +2018,8 @@ void lua_engine::initialize()
.addCFunction ("register_pause", l_emu_register_pause )
.addCFunction ("register_resume",l_emu_register_resume )
.addCFunction ("register_frame", l_emu_register_frame )
+ .addCFunction ("register_frame_done", l_emu_register_frame_done )
+ .addCFunction ("register_menu", l_emu_register_menu )
.beginClass <machine_manager> ("manager")
.addFunction ("machine", &machine_manager::machine)
.addFunction ("options", &machine_manager::options)
@@ -1474,9 +2042,11 @@ void lua_engine::initialize()
.addFunction ("ioport", &running_machine::ioport)
.addFunction ("parameters", &running_machine::parameters)
.addFunction ("cheat", &running_machine::cheat)
+ .addFunction ("memory", &running_machine::memory)
.addFunction ("options", &running_machine::options)
.addProperty <luabridge::LuaRef, void> ("devices", &lua_engine::l_machine_get_devices)
.addProperty <luabridge::LuaRef, void> ("screens", &lua_engine::l_machine_get_screens)
+ .addProperty <luabridge::LuaRef, void> ("images", &lua_engine::l_machine_get_images)
.endClass ()
.beginClass <game_driver> ("game_driver")
.addData ("source_file", &game_driver::source_file)
@@ -1492,8 +2062,10 @@ void lua_engine::initialize()
.addFunction ("name", &device_t::name)
.addFunction ("shortname", &device_t::shortname)
.addFunction ("tag", &device_t::tag)
+ .addFunction ("owner", &device_t::owner)
.addProperty <luabridge::LuaRef, void> ("spaces", &lua_engine::l_dev_get_memspaces)
.addProperty <luabridge::LuaRef, void> ("state", &lua_engine::l_dev_get_states)
+ .addProperty <luabridge::LuaRef, void> ("items", &lua_engine::l_dev_get_items)
.endClass()
.beginClass <cheat_manager> ("cheat")
.addProperty <bool, bool> ("enabled", &cheat_manager::enabled, &cheat_manager::set_enable)
@@ -1621,9 +2193,26 @@ void lua_engine::initialize()
.addCFunction ("write_u32", &lua_addr_space::l_mem_write<UINT32>)
.addCFunction ("write_i64", &lua_addr_space::l_mem_write<INT64>)
.addCFunction ("write_u64", &lua_addr_space::l_mem_write<UINT64>)
+ .addCFunction ("read_direct_i8", &lua_addr_space::l_direct_mem_read<INT8>)
+ .addCFunction ("read_direct_u8", &lua_addr_space::l_direct_mem_read<UINT8>)
+ .addCFunction ("read_direct_i16", &lua_addr_space::l_direct_mem_read<INT16>)
+ .addCFunction ("read_direct_u16", &lua_addr_space::l_direct_mem_read<UINT16>)
+ .addCFunction ("read_direct_i32", &lua_addr_space::l_direct_mem_read<INT32>)
+ .addCFunction ("read_direct_u32", &lua_addr_space::l_direct_mem_read<UINT32>)
+ .addCFunction ("read_direct_i64", &lua_addr_space::l_direct_mem_read<INT64>)
+ .addCFunction ("read_direct_u64", &lua_addr_space::l_direct_mem_read<UINT64>)
+ .addCFunction ("write_direct_i8", &lua_addr_space::l_direct_mem_write<INT8>)
+ .addCFunction ("write_direct_u8", &lua_addr_space::l_direct_mem_write<UINT8>)
+ .addCFunction ("write_direct_i16", &lua_addr_space::l_direct_mem_write<INT16>)
+ .addCFunction ("write_direct_u16", &lua_addr_space::l_direct_mem_write<UINT16>)
+ .addCFunction ("write_direct_i32", &lua_addr_space::l_direct_mem_write<INT32>)
+ .addCFunction ("write_direct_u32", &lua_addr_space::l_direct_mem_write<UINT32>)
+ .addCFunction ("write_direct_i64", &lua_addr_space::l_direct_mem_write<INT64>)
+ .addCFunction ("write_direct_u64", &lua_addr_space::l_direct_mem_write<UINT64>)
.endClass()
.deriveClass <address_space, lua_addr_space> ("addr_space")
.addFunction("name", &address_space::name)
+ .addProperty <luabridge::LuaRef, void> ("map", &lua_engine::l_addr_space_map)
.endClass()
.beginClass <render_target> ("target")
.addFunction ("width", &render_target::width)
@@ -1662,6 +2251,7 @@ void lua_engine::initialize()
.addProperty <bool, bool> ("show_fps", &ui_manager::show_fps, &ui_manager::set_show_fps)
.addProperty <bool, bool> ("show_profiler", &ui_manager::show_profiler, &ui_manager::set_show_profiler)
.addProperty <bool, bool> ("single_step", &ui_manager::single_step, &ui_manager::set_single_step)
+ .addFunction ("get_line_height", &ui_manager::get_line_height)
.endClass()
.beginClass <lua_screen> ("lua_screen_dev")
.addCFunction ("draw_box", &lua_screen::l_draw_box)
@@ -1688,6 +2278,65 @@ void lua_engine::initialize()
.addFunction ("is_visible", &device_state_entry::visible)
.addFunction ("is_divider", &device_state_entry::divider)
.endClass()
+ .beginClass <memory_manager> ("memory")
+ .addProperty <luabridge::LuaRef, void> ("banks", &lua_engine::l_memory_get_banks)
+ .addProperty <luabridge::LuaRef, void> ("regions", &lua_engine::l_memory_get_regions)
+ .endClass()
+ .beginClass <lua_memory_region> ("lua_region")
+ .addCFunction ("read_i8", &lua_memory_region::l_region_read<INT8>)
+ .addCFunction ("read_u8", &lua_memory_region::l_region_read<UINT8>)
+ .addCFunction ("read_i16", &lua_memory_region::l_region_read<INT16>)
+ .addCFunction ("read_u16", &lua_memory_region::l_region_read<UINT16>)
+ .addCFunction ("read_i32", &lua_memory_region::l_region_read<INT32>)
+ .addCFunction ("read_u32", &lua_memory_region::l_region_read<UINT32>)
+ .addCFunction ("read_i64", &lua_memory_region::l_region_read<INT64>)
+ .addCFunction ("read_u64", &lua_memory_region::l_region_read<UINT64>)
+ .addCFunction ("write_i8", &lua_memory_region::l_region_write<INT8>)
+ .addCFunction ("write_u8", &lua_memory_region::l_region_write<UINT8>)
+ .addCFunction ("write_i16", &lua_memory_region::l_region_write<INT16>)
+ .addCFunction ("write_u16", &lua_memory_region::l_region_write<UINT16>)
+ .addCFunction ("write_i32", &lua_memory_region::l_region_write<INT32>)
+ .addCFunction ("write_u32", &lua_memory_region::l_region_write<UINT32>)
+ .addCFunction ("write_i64", &lua_memory_region::l_region_write<INT64>)
+ .addCFunction ("write_u64", &lua_memory_region::l_region_write<UINT64>)
+ .endClass()
+ .deriveClass <memory_region, lua_memory_region> ("region")
+ .addProperty <UINT32> ("size", &memory_region::bytes)
+ .endClass()
+ .beginClass <device_image_interface> ("image")
+ .addFunction ("exists", &device_image_interface::exists)
+ .addFunction ("filename", &device_image_interface::filename)
+ .addFunction ("longname", &device_image_interface::longname)
+ .addFunction ("manufacturer", &device_image_interface::manufacturer)
+ .addFunction ("year", &device_image_interface::year)
+ .addFunction ("software_list_name", &device_image_interface::software_list_name)
+ .addFunction ("image_type_name", &device_image_interface::image_type_name)
+ .addFunction ("load", &device_image_interface::load)
+ .addFunction ("unload", &device_image_interface::unload)
+ .addFunction ("crc", &device_image_interface::crc)
+ .addProperty <const device_t &> ("device", static_cast<const device_t &(device_image_interface::*)() const>(&device_image_interface::device))
+ .addProperty <bool> ("is_readable", &device_image_interface::is_readable)
+ .addProperty <bool> ("is_writeable", &device_image_interface::is_writeable)
+ .addProperty <bool> ("is_creatable", &device_image_interface::is_creatable)
+ .addProperty <bool> ("is_reset_on_load", &device_image_interface::is_reset_on_load)
+ .endClass()
+ .beginClass <lua_emu_file> ("lua_file")
+ .addCFunction ("read", &lua_emu_file::l_emu_file_read)
+ .endClass()
+ .deriveClass <emu_file, lua_emu_file> ("file")
+ .addConstructor <void (*)(const char *, UINT32)> ()
+ .addFunction ("open", static_cast<osd_file::error (emu_file::*)(const char *)>(&emu_file::open))
+ .addFunction ("seek", &emu_file::seek)
+ .addFunction ("size", &emu_file::size)
+ .endClass()
+ .beginClass <lua_item> ("item")
+ .addConstructor <void (*)(int)> ()
+ .addData ("size", &lua_item::l_item_size, false)
+ .addData ("count", &lua_item::l_item_count, false)
+ .addCFunction ("read", &lua_item::l_item_read)
+ .addCFunction ("read_block", &lua_item::l_item_read_block)
+ .addCFunction ("write", &lua_item::l_item_write)
+ .endClass()
.endNamespace();
luabridge::push (m_lua_state, machine_manager::instance());
diff --git a/src/emu/luaengine.h b/src/emu/luaengine.h
index b98b9597b56..aaa774d00e6 100644
--- a/src/emu/luaengine.h
+++ b/src/emu/luaengine.h
@@ -49,9 +49,20 @@ public:
bool frame_hook();
void execute_function(const char *id);
+ struct menu_item {
+ std::string text;
+ std::string subtext;
+ std::string flags;
+ };
+ void menu_populate(std::string &menu, std::vector<menu_item> &menu_list);
+ bool menu_callback(std::string &menu, int index, std::string event);
+
void resume(lua_State *L, int nparam = 0, lua_State *root = nullptr);
void set_machine(running_machine *machine) { m_machine = machine; update_machine(); }
+ std::vector<std::string> &get_menu() { return m_menu; }
void attach_notifiers();
+ void on_frame_done();
+
private:
struct hook {
lua_State *L;
@@ -70,6 +81,8 @@ private:
lua_State *m_lua_state;
running_machine * m_machine;
+ std::vector<std::string> m_menu;
+
hook hook_output_cb;
bool output_notifier_set;
@@ -121,10 +134,13 @@ private:
static int l_emu_register_pause(lua_State *L);
static int l_emu_register_resume(lua_State *L);
static int l_emu_register_frame(lua_State *L);
+ static int l_emu_register_frame_done(lua_State *L);
+ static int l_emu_register_menu(lua_State *L);
static int register_function(lua_State *L, const char *id);
// "emu.machine" namespace
static luabridge::LuaRef l_machine_get_devices(const running_machine *r);
+ static luabridge::LuaRef l_machine_get_images(const running_machine *r);
static luabridge::LuaRef l_ioport_get_ports(const ioport_manager *i);
static luabridge::LuaRef l_render_get_targets(const render_manager *r);
static luabridge::LuaRef l_ioports_port_get_fields(const ioport_port *i);
@@ -137,10 +153,16 @@ private:
int l_popmessage(lua_State *L);
int l_logerror(lua_State *L);
};
+ static UINT8 read_direct_byte(address_space &space, offs_t addr);
+ static void write_direct_byte(address_space &space, offs_t addr, UINT8 byte);
struct lua_addr_space {
template<typename T> int l_mem_read(lua_State *L);
template<typename T> int l_mem_write(lua_State *L);
+ template<typename T> int l_direct_mem_read(lua_State *L);
+ template<typename T> int l_direct_mem_write(lua_State *L);
};
+ static luabridge::LuaRef l_addr_space_map(const address_space *as);
+
static luabridge::LuaRef l_machine_get_screens(const running_machine *r);
struct lua_screen {
int l_height(lua_State *L);
@@ -153,6 +175,7 @@ private:
int l_draw_line(lua_State *L);
int l_draw_text(lua_State *L);
};
+ static luabridge::LuaRef l_dev_get_items(const device_t *d);
struct lua_video {
int l_begin_recording(lua_State *L);
@@ -169,6 +192,29 @@ private:
int l_entry_value(lua_State *L);
};
+ static luabridge::LuaRef l_memory_get_banks(const memory_manager *m);
+ static luabridge::LuaRef l_memory_get_regions(const memory_manager *m);
+ static UINT8 read_region_byte(memory_region &region, offs_t addr);
+ static void write_region_byte(memory_region &region, offs_t addr, UINT8 byte);
+ struct lua_memory_region {
+ template<typename T> int l_region_read(lua_State *L);
+ template<typename T> int l_region_write(lua_State *L);
+ };
+
+ struct lua_emu_file {
+ int l_emu_file_read(lua_State *L);
+ };
+
+ struct lua_item {
+ lua_item(int index);
+ void *l_item_base;
+ unsigned int l_item_size;
+ unsigned int l_item_count;
+ int l_item_read(lua_State *L);
+ int l_item_read_block(lua_State *L);
+ int l_item_write(lua_State *L);
+ };
+
void resume(void *L, INT32 param);
void start();
static int luaopen_ioport(lua_State *L);
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 726979cadbc..7940bd6dfb0 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -1202,6 +1202,24 @@ void running_machine::nvram_save()
}
}
}
+
+
+//**************************************************************************
+// OUTPUT
+//**************************************************************************
+
+void running_machine::popup_clear() const
+{
+ ui().popup_time(0, " ");
+}
+
+void running_machine::popup_message(util::format_argument_pack<std::ostream> const &args) const
+{
+ std::string const temp(string_format(args));
+ ui().popup_time(temp.length() / 40 + 2, "%s", temp);
+}
+
+
//**************************************************************************
// CALLBACK ITEMS
//**************************************************************************
diff --git a/src/emu/machine.h b/src/emu/machine.h
index f892e79c3c9..6f18ef60001 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -17,6 +17,7 @@
#ifndef __MACHINE_H__
#define __MACHINE_H__
+#include "strformat.h"
#include "vecstream.h"
#include <time.h>
@@ -274,6 +275,8 @@ private:
std::string nvram_filename(device_t &device) const;
void nvram_load();
void nvram_save();
+ void popup_clear() const;
+ void popup_message(util::format_argument_pack<std::ostream> const &args) const;
// internal callbacks
static void logfile_callback(const running_machine &machine, const char *buffer);
@@ -382,4 +385,54 @@ private:
mutable util::ovectorstream m_string_buffer;
};
+
+
+//**************************************************************************
+// MEMBER TEMPLATES
+//**************************************************************************
+
+/*-------------------------------------------------
+ popmessage - pop up a user-visible message
+-------------------------------------------------*/
+
+template <typename Format, typename... Params>
+inline void running_machine::popmessage(Format &&fmt, Params &&... args) const
+{
+ // if the format is NULL, it is a signal to clear the popmessage
+ // otherwise, generate the buffer and call the UI to display the message
+ if (is_null<Format>::value(fmt))
+ popup_clear();
+ else
+ popup_message(util::make_format_argument_pack(std::forward<Format>(fmt), std::forward<Params>(args)...));
+}
+
+
+/*-------------------------------------------------
+ logerror - log to the debugger and any other
+ OSD-defined output streams
+-------------------------------------------------*/
+
+template <typename Format, typename... Params>
+inline void running_machine::logerror(Format &&fmt, Params &&... args) const
+{
+ // process only if there is a target
+ if (!m_logerror_list.empty())
+ {
+ g_profiler.start(PROFILER_LOGERROR);
+
+ // dump to the buffer
+ m_string_buffer.clear();
+ m_string_buffer.seekp(0);
+ util::stream_format(m_string_buffer, std::forward<Format>(fmt), std::forward<Params>(args)...);
+ m_string_buffer.put('\0');
+
+ // log to all callbacks
+ char const *const str(&m_string_buffer.vec()[0]);
+ for (auto &cb : m_logerror_list)
+ (cb->m_func)(*this, str);
+
+ g_profiler.stop();
+ }
+}
+
#endif /* __MACHINE_H__ */
diff --git a/src/emu/machine.ipp b/src/emu/machine.ipp
deleted file mode 100644
index 44d029fd309..00000000000
--- a/src/emu/machine.ipp
+++ /dev/null
@@ -1,77 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
-/***************************************************************************
-
- machine.ipp
-
- Controls execution of the core MAME system.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __EMU_H__
-#error Dont include this file directly; include emu.h instead.
-#endif
-
-#ifndef __MACHINE_IPP__
-#define __MACHINE_IPP__
-
-#include "strformat.h"
-
-//**************************************************************************
-// MEMBER TEMPLATES
-//**************************************************************************
-
-/*-------------------------------------------------
- popmessage - pop up a user-visible message
--------------------------------------------------*/
-
-template <typename Format, typename... Params>
-inline void running_machine::popmessage(Format &&fmt, Params &&... args) const
-{
- if (is_null<Format>::value(fmt))
- {
- // if the format is NULL, it is a signal to clear the popmessage
- ui().popup_time(0, " ");
- }
- else
- {
- // otherwise, generate the buffer and call the UI to display the message
- std::string const temp(string_format(std::forward<Format>(fmt), std::forward<Params>(args)...));
-
- // pop it in the UI
- ui().popup_time(temp.length() / 40 + 2, "%s", temp.c_str());
- }
-}
-
-
-/*-------------------------------------------------
- logerror - log to the debugger and any other
- OSD-defined output streams
--------------------------------------------------*/
-
-template <typename Format, typename... Params>
-inline void running_machine::logerror(Format &&fmt, Params &&... args) const
-{
- // process only if there is a target
- if (!m_logerror_list.empty())
- {
- g_profiler.start(PROFILER_LOGERROR);
-
- // dump to the buffer
- m_string_buffer.clear();
- m_string_buffer.seekp(0);
- util::stream_format(m_string_buffer, std::forward<Format>(fmt), std::forward<Params>(args)...);
- m_string_buffer.put('\0');
-
- // log to all callbacks
- char const *const str(&m_string_buffer.vec()[0]);
- for (auto &cb : m_logerror_list)
- (cb->m_func)(*this, str);
-
- g_profiler.stop();
- }
-}
-
-#endif // __MACHINE_IPP__
diff --git a/src/emu/mconfig.cpp b/src/emu/mconfig.cpp
index 793da15c1a0..2bf2eaab3d6 100644
--- a/src/emu/mconfig.cpp
+++ b/src/emu/mconfig.cpp
@@ -25,7 +25,6 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
: m_minimum_quantum(attotime::zero),
m_watchdog_vblank_count(0),
m_watchdog_time(attotime::zero),
- m_force_no_drc(false),
m_default_layout(nullptr),
m_gamedrv(gamedrv),
m_options(options)
diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h
index 412c2c12e82..582ea14d035 100644
--- a/src/emu/mconfig.h
+++ b/src/emu/mconfig.h
@@ -18,8 +18,6 @@
#ifndef __MCONFIG_H__
#define __MCONFIG_H__
-#include "emuopts.h"
-
//**************************************************************************
// CONSTANTS
//**************************************************************************
@@ -72,7 +70,6 @@ public:
std::string m_perfect_cpu_quantum; // tag of CPU to use for "perfect" scheduling
INT32 m_watchdog_vblank_count; // number of VBLANKs until the watchdog kills us
attotime m_watchdog_time; // length of time until the watchdog kills us
- bool m_force_no_drc; // whether or not to force DRC off
// other parameters
const internal_layout * m_default_layout; // default layout for this machine
@@ -202,10 +199,6 @@ References an external machine config.
#define MCFG_QUANTUM_PERFECT_CPU(_cputag) \
config.m_perfect_cpu_quantum = owner->subtag(_cputag);
-// recompilation parameters
-#define MCFG_FORCE_NO_DRC() \
- config.m_force_no_drc = true;
-
// watchdog configuration
#define MCFG_WATCHDOG_VBLANK_INIT(_count) \
config.m_watchdog_vblank_count = _count;
diff --git a/src/emu/render.cpp b/src/emu/render.cpp
index a340e226c50..0af06e665b2 100644
--- a/src/emu/render.cpp
+++ b/src/emu/render.cpp
@@ -934,6 +934,7 @@ render_target::render_target(render_manager &manager, const internal_layout *lay
// aspect and scale options
m_keepaspect = (manager.machine().options().keep_aspect() && !(flags & RENDER_CREATE_HIDDEN));
+ m_int_overscan = manager.machine().options().int_overscan();
m_int_scale_x = manager.machine().options().int_scale_x();
m_int_scale_y = manager.machine().options().int_scale_y();
if (manager.machine().options().uneven_stretch() && !manager.machine().options().uneven_stretch_x())
@@ -1204,22 +1205,24 @@ void render_target::compute_visible_area(INT32 target_width, INT32 target_height
if (target_orientation & ORIENTATION_SWAP_XY)
src_aspect = 1.0 / src_aspect;
- // get destination size and aspect
- float dest_width = (float)target_width;
- float dest_height = (float)target_height;
- float dest_aspect = dest_width / dest_height * target_pixel_aspect;
+ // get target aspect
+ float target_aspect = (float)target_width / (float)target_height * target_pixel_aspect;
- // apply aspect correction to destination rectangle
- if (dest_aspect > src_aspect)
- dest_width *= m_keepaspect? src_aspect / dest_aspect : 1.0f;
- else
- dest_height *= m_keepaspect? dest_aspect / src_aspect : 1.0f;
+ // determine the scale mode for each axis
+ bool x_is_integer = !(target_aspect >= 1.0f && m_scale_mode == SCALE_FRACTIONAL_X);
+ bool y_is_integer = !(target_aspect < 1.0f && m_scale_mode == SCALE_FRACTIONAL_X);
+
+ // first compute scale factors to fit the screen
+ float xscale = (float)target_width / src_width;
+ float yscale = (float)target_height / src_height;
+ float maxxscale = MAX(1, m_int_overscan? render_round_nearest(xscale) : floor(xscale));
+ float maxyscale = MAX(1, m_int_overscan? render_round_nearest(yscale) : floor(yscale));
- // compute scale factors
- float xscale = dest_width / src_width;
- float yscale = dest_height / src_height;
- xscale = dest_aspect >= 1.0f && m_scale_mode == SCALE_FRACTIONAL_X? xscale : MAX(1, render_round_nearest(xscale));
- yscale = dest_aspect < 1.0f && m_scale_mode == SCALE_FRACTIONAL_X? yscale : MAX(1, render_round_nearest(yscale));
+ // now apply desired scale mode and aspect correction
+ if (m_keepaspect && target_aspect > src_aspect) xscale *= src_aspect / target_aspect * (maxyscale / yscale);
+ if (m_keepaspect && target_aspect < src_aspect) yscale *= target_aspect / src_aspect * (maxxscale / xscale);
+ if (x_is_integer) xscale = MIN(maxxscale, MAX(1, render_round_nearest(xscale)));
+ if (y_is_integer) yscale = MIN(maxyscale, MAX(1, render_round_nearest(yscale)));
// check if we have user defined scale factors, if so use them instead
xscale = m_int_scale_x? m_int_scale_x : xscale;
diff --git a/src/emu/render.h b/src/emu/render.h
index 623e65a56f6..6092a37b45a 100644
--- a/src/emu/render.h
+++ b/src/emu/render.h
@@ -51,6 +51,9 @@
#include <math.h>
#include <mutex>
+#include "emu.h"
+//#include "bitmap.h"
+//#include "screen.h"
//**************************************************************************
// CONSTANTS
@@ -920,6 +923,8 @@ public:
void set_view(int viewindex);
void set_max_texture_size(int maxwidth, int maxheight);
void set_transform_primitives(bool transform_primitives) { m_transform_primitives = transform_primitives; }
+ void set_keepaspect(bool keepaspect) { m_keepaspect = keepaspect; }
+ void set_scale_mode(bool scale_mode) { m_scale_mode = scale_mode; }
// layer config getters
bool backdrops_enabled() const { return m_layerconfig.backdrops_enabled(); }
@@ -1008,6 +1013,7 @@ private:
INT32 m_height; // height in pixels
render_bounds m_bounds; // bounds of the target
bool m_keepaspect; // constrain aspect ratio
+ bool m_int_overscan; // allow overscan on integer scaled targets
float m_pixel_aspect; // aspect ratio of individual pixels
int m_scale_mode; // type of scale to apply
int m_int_scale_x; // horizontal integer scale factor
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index 5995c16eed2..fee6cbdaaa2 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -82,6 +82,8 @@
#include "lcd.lh"
#include "lcd_rot.lh"
+// SVG screen layouts
+#include "svg.lh"
//**************************************************************************
diff --git a/src/emu/rendlay.h b/src/emu/rendlay.h
index ab9390de564..1267be32773 100644
--- a/src/emu/rendlay.h
+++ b/src/emu/rendlay.h
@@ -37,5 +37,8 @@ extern const internal_layout layout_quadhsxs; // quad 4:3 screens side-by-sid
extern const internal_layout layout_lcd; // generic 1:1 lcd screen layout
extern const internal_layout layout_lcd_rot; // same, for use with ROT90 or ROT270
+// SVG screen layouts
+extern const internal_layout layout_svg; // generic 1:1 lcd screen layout
+
#endif // __RENDLAY_H__
diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp
index 952c84ca30a..9a22d215a0f 100644
--- a/src/emu/screen.cpp
+++ b/src/emu/screen.cpp
@@ -13,6 +13,8 @@
#include "png.h"
#include "rendutil.h"
+#include <nanosvg/src/nanosvg.h>
+#include <nanosvg/src/nanosvgrast.h>
//**************************************************************************
@@ -35,6 +37,101 @@ const attotime screen_device::DEFAULT_FRAME_PERIOD(attotime::from_hz(DEFAULT_FRA
UINT32 screen_device::m_id_counter = 0;
+class screen_device_svg_renderer {
+public:
+ screen_device_svg_renderer(memory_region *region);
+ ~screen_device_svg_renderer();
+
+ int width() const;
+ int height() const;
+
+ int render(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+
+ static void output_notifier(const char *outname, INT32 value, void *param);
+
+private:
+ NSVGimage *m_image;
+ NSVGrasterizer *m_rasterizer;
+
+ std::unordered_map<std::string, std::list<NSVGshape *>> m_keyed_shapes;
+
+ void output_change(const char *outname, INT32 value);
+};
+
+screen_device_svg_renderer::screen_device_svg_renderer(memory_region *region)
+{
+ char *s = new char[region->bytes()+1];
+ memcpy(s, region->base(), region->bytes());
+ s[region->bytes()] = 0;
+ m_image = nsvgParse(s, "px", 72);
+ delete[] s;
+ m_rasterizer = nsvgCreateRasterizer();
+
+ for (NSVGshape *shape = m_image->shapes; shape != NULL; shape = shape->next)
+ if(shape->title[0]) {
+ shape->flags &= ~NSVG_FLAGS_VISIBLE;
+ m_keyed_shapes[shape->title].push_back(shape);
+ }
+}
+
+screen_device_svg_renderer::~screen_device_svg_renderer()
+{
+ nsvgDeleteRasterizer(m_rasterizer);
+ nsvgDelete(m_image);
+}
+
+int screen_device_svg_renderer::width() const
+{
+ return int(m_image->width + 0.5);
+}
+
+int screen_device_svg_renderer::height() const
+{
+ return int(m_image->height + 0.5);
+}
+
+int screen_device_svg_renderer::render(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ double sx = double(bitmap.width())/m_image->width;
+ double sy = double(bitmap.height())/m_image->height;
+ double sz = sx > sy ? sy : sx;
+ nsvgRasterize(m_rasterizer, m_image, 0, 0, sz, (unsigned char *)bitmap.raw_pixptr(0, 0), bitmap.width(), bitmap.height(), bitmap.rowbytes());
+
+ // Annoyingly, nanosvg doesn't use the same byte order than our bitmaps
+
+ for(unsigned int y=0; y<bitmap.height(); y++) {
+ UINT8 *image = (UINT8 *)bitmap.raw_pixptr(y, 0);
+ for(unsigned int x=0; x<bitmap.width(); x++) {
+ UINT8 r = image[0];
+ UINT8 g = image[1];
+ UINT8 b = image[2];
+ UINT32 color = 0xff000000 | (r << 16) | (g << 8) | (b << 0);
+ *(UINT32 *)image = color;
+ image += 4;
+ }
+ }
+
+ return 0;
+}
+
+void screen_device_svg_renderer::output_notifier(const char *outname, INT32 value, void *param)
+{
+ static_cast<screen_device_svg_renderer *>(param)->output_change(outname, value);
+}
+
+void screen_device_svg_renderer::output_change(const char *outname, INT32 value)
+{
+ auto l = m_keyed_shapes.find(outname);
+ if (l == m_keyed_shapes.end())
+ return;
+ if (value)
+ for(auto s : l->second)
+ s->flags |= NSVG_FLAGS_VISIBLE;
+ else
+ for(auto s : l->second)
+ s->flags &= ~NSVG_FLAGS_VISIBLE;
+}
+
//**************************************************************************
// SCREEN DEVICE
//**************************************************************************
@@ -55,6 +152,7 @@ screen_device::screen_device(const machine_config &mconfig, const char *tag, dev
m_yscale(1.0f),
m_palette(*this),
m_video_attributes(0),
+ m_svg_region(nullptr),
m_container(nullptr),
m_width(100),
m_height(100),
@@ -106,6 +204,12 @@ void screen_device::static_set_type(device_t &device, screen_type_enum type)
}
+void screen_device::static_set_svg_region(device_t &device, const char *region)
+{
+ downcast<screen_device &>(device).m_svg_region = region;
+}
+
+
//-------------------------------------------------
// static_set_raw - configuration helper
// to set the raw screen parameters
@@ -265,7 +369,7 @@ void screen_device::device_validity_check(validity_checker &valid) const
osd_printf_error("Invalid display dimensions\n");
// sanity check display area
- if (m_type != SCREEN_TYPE_VECTOR)
+ if (m_type != SCREEN_TYPE_VECTOR && m_type != SCREEN_TYPE_SVG)
{
if (m_visarea.empty() || m_visarea.max_x >= m_width || m_visarea.max_y >= m_height)
osd_printf_error("Invalid display area\n");
@@ -275,6 +379,10 @@ void screen_device::device_validity_check(validity_checker &valid) const
osd_printf_error("Missing SCREEN_UPDATE function\n");
}
+ // check for svg region
+ if (m_type == SCREEN_TYPE_SVG && !m_svg_region)
+ osd_printf_error("Missing SVG region information\n");
+
// check for zero frame rate
if (m_refresh == 0)
osd_printf_error("Invalid (zero) refresh rate\n");
@@ -293,6 +401,23 @@ void screen_device::device_validity_check(validity_checker &valid) const
void screen_device::device_start()
{
+ if (m_type == SCREEN_TYPE_SVG)
+ {
+ memory_region *reg = owner()->memregion(m_svg_region);
+ if (!reg)
+ fatalerror("SVG region \"%s\" does not exist\n", m_svg_region);
+ m_svg = std::make_unique<screen_device_svg_renderer>(reg);
+ machine().output().set_notifier(nullptr, screen_device_svg_renderer::output_notifier, m_svg.get());
+
+ if (0)
+ {
+ // The osd picks up the size before start is called, so that's useless
+ m_width = m_svg->width();
+ m_height = m_svg->height();
+ m_visarea.set(0, m_width-1, 0, m_height-1);
+ }
+ }
+
// bind our handlers
m_screen_update_ind16.bind_relative_to(*owner());
m_screen_update_rgb32.bind_relative_to(*owner());
@@ -303,6 +428,7 @@ void screen_device::device_start()
throw device_missing_dependencies();
// configure bitmap formats and allocate screen bitmaps
+ // svg is RGB32 too, and doesn't have any update method
texture_format texformat = !m_screen_update_ind16.isnull() ? TEXFORMAT_PALETTE16 : TEXFORMAT_RGB32;
for (auto & elem : m_bitmap)
@@ -472,8 +598,8 @@ void screen_device::configure(int width, int height, const rectangle &visarea, a
assert(visarea.min_y >= 0);
// assert(visarea.max_x < width);
// assert(visarea.max_y < height);
- assert(m_type == SCREEN_TYPE_VECTOR || visarea.min_x < width);
- assert(m_type == SCREEN_TYPE_VECTOR || visarea.min_y < height);
+ assert(m_type == SCREEN_TYPE_VECTOR || m_type == SCREEN_TYPE_SVG || visarea.min_x < width);
+ assert(m_type == SCREEN_TYPE_VECTOR || m_type == SCREEN_TYPE_SVG || visarea.min_y < height);
assert(frame_period > 0);
// fill in the new parameters
@@ -649,12 +775,19 @@ bool screen_device::update_partial(int scanline)
g_profiler.start(PROFILER_VIDEO);
UINT32 flags;
- screen_bitmap &curbitmap = m_bitmap[m_curbitmap];
- switch (curbitmap.format())
+ if (m_type != SCREEN_TYPE_SVG)
{
- default:
- case BITMAP_FORMAT_IND16: flags = m_screen_update_ind16(*this, curbitmap.as_ind16(), clip); break;
- case BITMAP_FORMAT_RGB32: flags = m_screen_update_rgb32(*this, curbitmap.as_rgb32(), clip); break;
+ screen_bitmap &curbitmap = m_bitmap[m_curbitmap];
+ switch (curbitmap.format())
+ {
+ default:
+ case BITMAP_FORMAT_IND16: flags = m_screen_update_ind16(*this, curbitmap.as_ind16(), clip); break;
+ case BITMAP_FORMAT_RGB32: flags = m_screen_update_rgb32(*this, curbitmap.as_rgb32(), clip); break;
+ }
+ }
+ else
+ {
+ flags = m_svg->render(*this, m_bitmap[m_curbitmap].as_rgb32(), clip);
}
m_partial_updates_this_frame++;
diff --git a/src/emu/screen.h b/src/emu/screen.h
index 711602b0395..182a1505b16 100644
--- a/src/emu/screen.h
+++ b/src/emu/screen.h
@@ -30,7 +30,8 @@ enum screen_type_enum
SCREEN_TYPE_INVALID = 0,
SCREEN_TYPE_RASTER,
SCREEN_TYPE_VECTOR,
- SCREEN_TYPE_LCD
+ SCREEN_TYPE_LCD,
+ SCREEN_TYPE_SVG
};
// texture formats
@@ -155,6 +156,8 @@ typedef device_delegate<void (screen_device &, bool)> screen_vblank_delegate;
// ======================> screen_device
+class screen_device_svg_renderer;
+
class screen_device : public device_t
{
friend class render_manager;
@@ -194,6 +197,7 @@ public:
static void static_set_palette(device_t &device, const char *tag);
static void static_set_video_attributes(device_t &device, UINT32 flags);
static void static_set_color(device_t &device, rgb_t color);
+ static void static_set_svg_region(device_t &device, const char *region);
// information getters
render_container &container() const { assert(m_container != nullptr); return *m_container; }
@@ -279,10 +283,11 @@ private:
screen_vblank_delegate m_screen_vblank; // screen vblank callback
optional_device<palette_device> m_palette; // our palette
UINT32 m_video_attributes; // flags describing the video system
+ const char * m_svg_region; // the region in which the svg data is in
// internal state
render_container * m_container; // pointer to our container
-
+ std::unique_ptr<screen_device_svg_renderer> m_svg; // the svg renderer
// dimensions
int m_width; // current width (HTOTAL)
int m_height; // current height (VTOTAL)
@@ -378,6 +383,11 @@ typedef device_type_iterator<&device_creator<screen_device>, screen_device> scre
#define MCFG_SCREEN_TYPE(_type) \
screen_device::static_set_type(*device, SCREEN_TYPE_##_type);
+#define MCFG_SCREEN_SVG_ADD(_tag, _region) \
+ MCFG_DEVICE_ADD(_tag, SCREEN, 0) \
+ MCFG_SCREEN_TYPE(SVG) \
+ screen_device::static_set_svg_region(*device, _region);
+
/*!
@brief Configures screen parameters for the given screen.
diff --git a/src/emu/ui/ctrlmenu.cpp b/src/emu/ui/ctrlmenu.cpp
deleted file mode 100644
index 0fc7304a550..00000000000
--- a/src/emu/ui/ctrlmenu.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Maurizio Petrarota
-/*********************************************************************
-
- ui/ctrlmenu.cpp
-
- Internal UI user interface.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "ui/ctrlmenu.h"
-
-const char *ui_menu_controller_mapping::m_device_status[] = { "none", "keyboard", "mouse", "lightgun", "joystick" };
-
-ui_menu_controller_mapping::ctrl_option ui_menu_controller_mapping::m_options[] = {
- { 0, nullptr, nullptr },
- { 0, __("Lightgun Device Assignment"), OPTION_LIGHTGUN_DEVICE },
- { 0, __("Trackball Device Assignment"), OPTION_TRACKBALL_DEVICE },
- { 0, __("Pedal Device Assignment"), OPTION_PEDAL_DEVICE },
- { 0, __("Adstick Device Assignment"), OPTION_ADSTICK_DEVICE },
- { 0, __("Paddle Device Assignment"), OPTION_PADDLE_DEVICE },
- { 0, __("Dial Device Assignment"), OPTION_DIAL_DEVICE },
- { 0, __("Positional Device Assignment"), OPTION_POSITIONAL_DEVICE },
- { 0, __("Mouse Device Assignment"), OPTION_MOUSE_DEVICE }
-};
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_controller_mapping::ui_menu_controller_mapping(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
- for (int d = 1; d < ARRAY_LENGTH(m_options); ++d)
- m_options[d].status = check_status(machine.options().value(m_options[d].option), m_options[d].option);
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_controller_mapping::~ui_menu_controller_mapping()
-{
- std::string error_string;
- for (int d = 1; d < ARRAY_LENGTH(m_options); ++d)
- {
- if (strcmp(machine().options().value(m_options[d].option), m_device_status[m_options[d].status])!=0)
- {
- machine().options().set_value(m_options[d].option, m_device_status[m_options[d].status], OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(m_options[d].option);
- }
- }
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_controller_mapping::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event = process(0);
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- changed = true;
- FPTR value = (FPTR)m_event->itemref;
- (m_event->iptkey == IPT_UI_RIGHT) ? m_options[value].status++ : m_options[value].status--;
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_controller_mapping::populate()
-{
- // add options
- for (int d = 1; d < ARRAY_LENGTH(m_options); ++d)
- {
- UINT32 arrow_flags = get_arrow_flags(0, ARRAY_LENGTH(m_device_status) - 1, m_options[d].status);
- item_append(_(m_options[d].description), m_device_status[m_options[d].status], arrow_flags, (void *)(FPTR)d);
- }
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_controller_mapping::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width, maxwidth = origx2 - origx1;
- ui_manager &mui = machine().ui();
-
- mui.draw_text_full(container, _("Device Mapping"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, _("Device Mapping"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
-}
-
-//-------------------------------------------------
-// return current value
-//-------------------------------------------------
-
-int ui_menu_controller_mapping::check_status(const char *status, const char *option)
-{
- for (int d = 0; *m_device_status[d]; d++)
- if (!strcmp(m_device_status[d], status))
- return d;
-
- emu_options def_opt;
- const char *def_val = def_opt.value(option);
-
- for (int d = 0; *m_device_status[d]; d++)
- if (!strcmp(m_device_status[d], def_val))
- return d;
-
- return 1;
-}
diff --git a/src/emu/ui/ctrlmenu.h b/src/emu/ui/ctrlmenu.h
deleted file mode 100644
index 0db85ee878a..00000000000
--- a/src/emu/ui/ctrlmenu.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Maurizio Petrarota
-/***************************************************************************
-
- ui/ctrlmenu.h
-
- Internal UI user interface.
-
-***************************************************************************/
-#pragma once
-
-#ifndef __UI_CTRLMENU_H__
-#define __UI_CTRLMENU_H__
-
-//-------------------------------------------------
-// class controller mapping menu
-//-------------------------------------------------
-
-class ui_menu_controller_mapping : public ui_menu
-{
-public:
- ui_menu_controller_mapping(running_machine &machine, render_container *container);
- virtual ~ui_menu_controller_mapping();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- struct ctrl_option
- {
- int status;
- const char *description;
- const char *option;
- };
-
- static const char *m_device_status[];
- static ctrl_option m_options[];
- int check_status(const char *status, const char *option);
-};
-
-#endif /* __UI_CTRLMENU_H__ */
diff --git a/src/emu/ui/dsplmenu.cpp b/src/emu/ui/dsplmenu.cpp
deleted file mode 100644
index e47164de356..00000000000
--- a/src/emu/ui/dsplmenu.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Maurizio Petrarota
-/*********************************************************************
-
- ui/dsplmenu.cpp
-
- UI video options menu.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "ui/dsplmenu.h"
-#include "ui/selector.h"
-#include "ui/utils.h"
-
-#if defined(UI_WINDOWS) && !defined(UI_SDL)
-#include "../osd/windows/winmain.h"
-#else
-#include "../osd/modules/lib/osdobj_common.h"
-#endif
-
-
-ui_menu_display_options::video_modes ui_menu_display_options::m_video = {
- { "auto", "Auto" },
- { "opengl", "OpenGL" },
- { "bgfx", "BGFX" },
- { "d3d", "Direct3D" },
- { "gdi", "GDI" },
- { "ddraw", "DirectDraw" },
- { "soft", "Software" },
- { "accel", "SDL2 Accelerated" }
-};
-
-ui_menu_display_options::dspl_option ui_menu_display_options::m_options[] = {
- { 0, nullptr, nullptr },
- { 0, __("Video Mode"), OSDOPTION_VIDEO },
-#if defined(UI_WINDOWS) && !defined(UI_SDL)
- { 0, __("Triple Buffering"), WINOPTION_TRIPLEBUFFER },
- { 0, __("HLSL"), WINOPTION_HLSL_ENABLE },
-#endif
- { 0, __("GLSL"), OSDOPTION_GL_GLSL },
- { 0, __("Bilinear Filtering"), OSDOPTION_FILTER },
- { 0, __("Bitmap Prescaling"), OSDOPTION_PRESCALE },
- { 0, __("Window Mode"), OSDOPTION_WINDOW },
- { 0, __("Enforce Aspect Ratio"), OPTION_KEEPASPECT },
- { 0, __("Start Out Maximized"), OSDOPTION_MAXIMIZE },
- { 0, __("Synchronized Refresh"), OSDOPTION_SYNCREFRESH },
- { 0, __("Wait Vertical Sync"), OSDOPTION_WAITVSYNC }
-};
-
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_display_options::ui_menu_display_options(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
- osd_options &options = downcast<osd_options &>(machine.options());
-
- for (int d = 2; d < ARRAY_LENGTH(m_options); ++d)
- m_options[d].status = options.int_value(m_options[d].option);
-
- // create video list
- m_list.push_back("auto");
- m_list.push_back("opengl"); // TODO: check USE_OPENGL
-
- std::string descr = options.description(OSDOPTION_VIDEO);
- descr.erase(0, descr.find(":") + 2);
- std::string delim = ", ";
- size_t p1, p2 = 0;
- for (;;)
- {
- p1 = descr.find_first_not_of(delim, p2);
- if (p1 == std::string::npos)
- break;
- p2 = descr.find_first_of(delim, p1 + 1);
- if (p2 != std::string::npos)
- {
- std::string txt(descr.substr(p1, p2 - p1));
- if (txt != "or" && txt != "none")
- m_list.push_back(descr.substr(p1, p2 - p1));
- }
- else
- {
- m_list.push_back(descr.substr(p1));
- break;
- }
- }
-
- m_options[1].status = 0;
- for (int cur = 0; cur < m_list.size(); ++cur)
- if (options.video() == m_list[cur])
- {
- m_options[1].status = cur;
- break;
- }
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_display_options::~ui_menu_display_options()
-{
- std::string error_string;
- for (int d = 2; d < ARRAY_LENGTH(m_options); ++d)
- {
- if (machine().options().int_value(m_options[d].option) != m_options[d].status)
- {
- machine().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(m_options[d].option);
- }
- }
- if (machine().options().value(m_options[1].option) != m_list[m_options[1].status])
- {
- machine().options().set_value(m_options[1].option, m_list[m_options[1].status].c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(m_options[1].option);
-
- }
- ui_globals::reset = true;
-}
-
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_display_options::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event = process(0);
-
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- int value = (FPTR)m_event->itemref;
- if (!strcmp(m_options[value].option, OSDOPTION_VIDEO) || !strcmp(m_options[value].option, OSDOPTION_PRESCALE))
- {
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- changed = true;
- (m_event->iptkey == IPT_UI_LEFT) ? m_options[value].status-- : m_options[value].status++;
- }
- else if (m_event->iptkey == IPT_UI_SELECT && !strcmp(m_options[value].option, OSDOPTION_VIDEO))
- {
- int total = m_list.size();
- std::vector<std::string> s_sel(total);
- for (int index = 0; index < total; ++index)
- s_sel[index] = m_video[m_list[index]];
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, m_options[value].status));
- }
- }
- else if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT)
- {
- changed = true;
- m_options[value].status = !m_options[value].status;
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_display_options::populate()
-{
- // add video mode option
- std::string v_text(m_video[m_list[m_options[1].status]]);
- UINT32 arrow_flags = get_arrow_flags(0, m_list.size() - 1, m_options[1].status);
- item_append(_(m_options[1].description), v_text.c_str(), arrow_flags, (void *)(FPTR)1);
-
- // add options items
- for (int opt = 2; opt < ARRAY_LENGTH(m_options); ++opt)
- if (strcmp(m_options[opt].option, OSDOPTION_PRESCALE) != 0)
- item_append(_(m_options[opt].description), m_options[opt].status ? _("On") : _("Off"),
- m_options[opt].status ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)opt);
- else
- {
- arrow_flags = get_arrow_flags(1, 3, m_options[opt].status);
- item_append(_(m_options[opt].description), string_format("%d", m_options[opt].status).c_str(), arrow_flags, (void *)(FPTR)opt);
- }
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_display_options::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
- mui.draw_text_full(container, _("Display Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE,
- ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- float maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, _("Display Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL,
- UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
diff --git a/src/emu/ui/dsplmenu.h b/src/emu/ui/dsplmenu.h
deleted file mode 100644
index 69b92e3bbe0..00000000000
--- a/src/emu/ui/dsplmenu.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Maurizio Petrarota
-/***************************************************************************
-
- ui/dsplmenu.h
-
- UI video options menu.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_DSPLMENU_H__
-#define __UI_DSPLMENU_H__
-
-//-------------------------------------------------
-// class display options menu
-//-------------------------------------------------
-class ui_menu_display_options : public ui_menu
-{
-public:
- ui_menu_display_options(running_machine &machine, render_container *container);
- virtual ~ui_menu_display_options();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- struct dspl_option
- {
- UINT16 status;
- const char *description;
- const char *option;
- };
-
- using video_modes = std::unordered_map<std::string, std::string>;
-
- static video_modes m_video;
- static dspl_option m_options[];
-
- std::vector<std::string> m_list;
-};
-
-#endif /* __UI_DSPLMENU_H__ */
diff --git a/src/emu/ui/filemngr.cpp b/src/emu/ui/filemngr.cpp
index fa139e1c696..6c2cd3894bd 100644
--- a/src/emu/ui/filemngr.cpp
+++ b/src/emu/ui/filemngr.cpp
@@ -129,6 +129,9 @@ void ui_menu_file_manager::populate()
image_interface_iterator subiterator(*dev);
for (device_image_interface *scan = subiterator.first(); scan != nullptr; scan = subiterator.next())
{
+ if (!scan->user_loadable())
+ continue;
+
// if it is a children device, and not something further down the device tree, we want it in the menu!
if (strcmp(scan->device().owner()->tag(), dev->tag()) == 0)
if (devtags.insert(scan->device().tag()).second)
diff --git a/src/emu/ui/imgcntrl.cpp b/src/emu/ui/imgcntrl.cpp
index 0b44f1f8e8c..883541786af 100644
--- a/src/emu/ui/imgcntrl.cpp
+++ b/src/emu/ui/imgcntrl.cpp
@@ -9,6 +9,7 @@
***************************************************************************/
#include "emu.h"
+#include "emuopts.h"
#include "ui/ui.h"
#include "ui/menu.h"
#include "ui/imgcntrl.h"
diff --git a/src/emu/ui/mainmenu.cpp b/src/emu/ui/mainmenu.cpp
index 7fe16d771b0..b2935049b9a 100644
--- a/src/emu/ui/mainmenu.cpp
+++ b/src/emu/ui/mainmenu.cpp
@@ -33,6 +33,7 @@
#include "ui/datfile.h"
#include "ui/inifile.h"
#include "ui/datmenu.h"
+#include "ui/pluginopt.h"
/***************************************************************************
@@ -71,47 +72,46 @@ void ui_menu_main::populate()
item_append(_("Machine Information"), nullptr, 0, (void *)GAME_INFO);
image_interface_iterator imgiter(machine().root_device());
- if (imgiter.first() != nullptr)
- {
- /* add image info menu */
- item_append(_("Image Information"), nullptr, 0, (void *)IMAGE_MENU_IMAGE_INFO);
-
- /* add file manager menu */
- item_append(_("File Manager"), nullptr, 0, (void *)IMAGE_MENU_FILE_MANAGER);
-
- /* add tape control menu */
- cassette_device_iterator cassiter(machine().root_device());
- if (cassiter.first() != nullptr)
- item_append(_("Tape Control"), nullptr, 0, (void *)TAPE_CONTROL);
- }
-
- pty_interface_iterator ptyiter(machine().root_device());
- if (ptyiter.first() != nullptr) {
- item_append(_("Pseudo terminals"), nullptr, 0, (void *)PTY_INFO);
- }
- if (machine().ioport().has_bioses())
+ for (device_image_interface *image = imgiter.first(); image != nullptr; image = imgiter.next())
+ {
+ if (image->user_loadable())
+ {
+ /* add image info menu */
+ item_append(_("Image Information"), nullptr, 0, (void *)IMAGE_MENU_IMAGE_INFO);
+
+ /* add file manager menu */
+ item_append(_("File Manager"), nullptr, 0, (void *)IMAGE_MENU_FILE_MANAGER);
+
+ break;
+ }
+ }
+
+ /* add tape control menu */
+ cassette_device_iterator cassiter(machine().root_device());
+ if (cassiter.first() != nullptr)
+ item_append(_("Tape Control"), nullptr, 0, (void *)TAPE_CONTROL);
+
+ pty_interface_iterator ptyiter(machine().root_device());
+ if (ptyiter.first() != nullptr)
+ item_append(_("Pseudo terminals"), nullptr, 0, (void *)PTY_INFO);
+
+ if (machine().ioport().has_bioses())
item_append(_("Bios Selection"), nullptr, 0, (void *)BIOS_SELECTION);
+ /* add slot info menu */
slot_interface_iterator slotiter(machine().root_device());
if (slotiter.first() != nullptr)
- {
- /* add slot info menu */
item_append(_("Slot Devices"), nullptr, 0, (void *)SLOT_DEVICES);
- }
+ /* add Barcode reader menu */
barcode_reader_device_iterator bcriter(machine().root_device());
if (bcriter.first() != nullptr)
- {
- /* add slot info menu */
item_append(_("Barcode Reader"), nullptr, 0, (void *)BARCODE_READ);
- }
+ /* add network info menu */
network_interface_iterator netiter(machine().root_device());
if (netiter.first() != nullptr)
- {
- /* add image info menu */
item_append(_("Network Devices"), nullptr, 0, (void*)NETWORK_DEVICES);
- }
/* add keyboard mode menu */
if (machine().ioport().has_keyboard() && machine().ioport().natkeyboard().can_post())
@@ -131,6 +131,9 @@ void ui_menu_main::populate()
if (machine().options().cheat())
item_append(_("Cheat"), nullptr, 0, (void *)CHEAT);
+ if (machine().options().plugins())
+ item_append(_("Plugin Options"), nullptr, 0, (void *)PLUGINS);
+
// add dats menu
if (machine().ui().options().enabled_dats() && machine().datfile().has_data())
item_append(_("External DAT View"), nullptr, 0, (void *)EXTERNAL_DATS);
@@ -241,6 +244,10 @@ void ui_menu_main::handle()
ui_menu::stack_push(global_alloc_clear<ui_menu_cheat>(machine(), container));
break;
+ case PLUGINS:
+ ui_menu::stack_push(global_alloc_clear<ui_menu_plugin>(machine(), container));
+ break;
+
case SELECT_GAME:
if (strcmp(machine().options().ui(),"simple")==0) {
ui_menu::stack_push(global_alloc_clear<ui_simple_menu_select_game>(machine(), container, nullptr));
diff --git a/src/emu/ui/mainmenu.h b/src/emu/ui/mainmenu.h
index 0684e230ad8..cb12e6e1d1a 100644
--- a/src/emu/ui/mainmenu.h
+++ b/src/emu/ui/mainmenu.h
@@ -42,6 +42,7 @@ private:
VIDEO_OPTIONS,
CROSSHAIR,
CHEAT,
+ PLUGINS,
SELECT_GAME,
BIOS_SELECTION,
BARCODE_READ,
diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp
index 2af806fa586..1d8ae588c0f 100644
--- a/src/emu/ui/menu.cpp
+++ b/src/emu/ui/menu.cpp
@@ -296,7 +296,17 @@ void ui_menu::set_special_main_menu(bool special)
// end of the menu
//-------------------------------------------------
-void ui_menu::item_append(const char *text, const char *subtext, UINT32 flags, void *ref)
+void ui_menu::item_append(ui_menu_item item)
+{
+ item_append(item.text, item.subtext, item.flags, item.ref, item.type);
+}
+
+//-------------------------------------------------
+// item_append - append a new item to the
+// end of the menu
+//-------------------------------------------------
+
+void ui_menu::item_append(const char *text, const char *subtext, UINT32 flags, void *ref, ui_menu_item_type type)
{
// only allow multiline as the first item
if ((flags & MENU_FLAG_MULTILINE) != 0)
@@ -312,6 +322,7 @@ void ui_menu::item_append(const char *text, const char *subtext, UINT32 flags, v
pitem.subtext = (subtext != nullptr) ? pool_strdup(subtext) : nullptr;
pitem.flags = flags;
pitem.ref = ref;
+ pitem.type = type;
// append to array
int index = item.size();
@@ -380,6 +391,7 @@ const ui_menu_event *ui_menu::process(UINT32 flags)
if (menu_event.iptkey != IPT_INVALID && selected >= 0 && selected < item.size())
{
menu_event.itemref = item[selected].ref;
+ menu_event.type = item[selected].type;
return &menu_event;
}
return nullptr;
@@ -527,6 +539,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height;
visible_lines = floor(visible_main_menu_height / line_height);
+ if (visible_lines > item.size()) visible_lines = item.size();
visible_main_menu_height = (float)visible_lines * line_height;
// compute top/left of inner menu area by centering
@@ -544,14 +557,26 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
if (!customonly)
machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
- // determine the first visible line based on the current selection
- if (selected > top_line + visible_lines || selected < top_line - visible_lines)
- top_line = selected - (visible_lines / 2);
if (top_line < 0 || selected == 0)
top_line = 0;
- if (top_line + visible_lines >= item.size())
+ if (top_line > item.size() - visible_lines || selected == (item.size() - 1))
top_line = item.size() - visible_lines;
+ bool show_top_arrow = false;
+ bool show_bottom_arrow = false;
+
+ // if scrolling, show arrows
+ if (item.size() > visible_lines)
+ {
+ if (top_line > 0)
+ show_top_arrow = true;
+ if (top_line != item.size() - visible_lines)
+ show_bottom_arrow = true;
+ }
+
+ // set the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
+ visitems = visible_lines - show_top_arrow - show_bottom_arrow;
+
// determine effective positions taking into account the hilighting arrows
float effective_width = visible_width - 2.0f * gutter_width;
float effective_left = visible_left + gutter_width;
@@ -573,6 +598,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
float line_x0 = x1 + 0.5f * UI_LINE_WIDTH;
float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
if (!customonly)
+ {
for (linenum = 0; linenum < visible_lines; linenum++)
{
float line_y = visible_top + (float)linenum * line_height;
@@ -613,7 +639,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor);
// if we're on the top line, display the up arrow
- if (linenum == 0 && top_line != 0)
+ if (linenum == 0 && show_top_arrow)
{
draw_arrow(container,
0.5f * (x1 + x2) - 0.5f * ud_arrow_width,
@@ -627,7 +653,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
}
// if we're on the bottom line, display the down arrow
- else if (linenum == visible_lines - 1 && itemnum != item.size() - 1)
+ else if (linenum == visible_lines - 1 && show_bottom_arrow)
{
draw_arrow(container,
0.5f * (x1 + x2) - 0.5f * ud_arrow_width,
@@ -646,8 +672,16 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
// if we don't have a subitem, just draw the string centered
else if (pitem.subtext == nullptr)
+ {
+ if (pitem.flags & MENU_FLAG_UI_HEADING)
+ {
+ float heading_width = machine().ui().get_string_width(itemtext);
+ container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + ((visible_width - heading_width) / 2) - UI_BOX_LR_BORDER, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+ container->add_line(visible_left + visible_width - ((visible_width - heading_width) / 2) + UI_BOX_LR_BORDER, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+ }
machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width,
JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
+ }
// otherwise, draw the item on the left and the subitem text on the right
else
@@ -708,6 +742,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
}
}
}
+ }
// if the selected subitem is too big, display it in a separate offset box
if (selected_subitem_too_big)
@@ -741,9 +776,6 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
// if there is something special to add, do it by calling the virtual method
custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2);
-
- // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
- visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != item.size());
}
void ui_menu::custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2)
@@ -889,9 +921,10 @@ void ui_menu::handle_events(UINT32 flags)
top_line -= local_menu_event.num_lines;
return;
}
- selected -= local_menu_event.num_lines;
+ (selected == 0) ? selected = top_line = item.size() - 1 : selected -= local_menu_event.num_lines;
validate_selection(-1);
- if (selected < top_line + (top_line != 0))
+ top_line -= (selected <= top_line && top_line != 0);
+ if (selected <= top_line && visitems != visible_lines)
top_line -= local_menu_event.num_lines;
}
else
@@ -901,11 +934,10 @@ void ui_menu::handle_events(UINT32 flags)
top_line += local_menu_event.num_lines;
return;
}
- selected += local_menu_event.num_lines;
+ (selected == item.size() - 1) ? selected = top_line = 0 : selected += local_menu_event.num_lines;
validate_selection(1);
- if (selected > item.size() - 1)
- selected = item.size() - 1;
- if (selected >= top_line + visitems + (top_line != 0))
+ top_line += (selected >= top_line + visitems + (top_line != 0));
+ if (selected >= (top_line + visitems + (top_line != 0)))
top_line += local_menu_event.num_lines;
}
}
@@ -989,7 +1021,9 @@ void ui_menu::handle_keys(UINT32 flags)
}
(selected == 0) ? selected = top_line = item.size() - 1 : --selected;
validate_selection(-1);
- top_line -= (selected == top_line && top_line != 0);
+ top_line -= (selected <= top_line && top_line != 0);
+ if (selected <= top_line && visitems != visible_lines)
+ top_line--;
}
// down advances by one item
@@ -1001,7 +1035,10 @@ void ui_menu::handle_keys(UINT32 flags)
return;
}
(selected == item.size() - 1) ? selected = top_line = 0 : ++selected;
- top_line += (selected == top_line + visitems + (top_line != 0));
+ validate_selection(1);
+ top_line += (selected >= top_line + visitems + (top_line != 0));
+ if (selected >= (top_line + visitems + (top_line != 0)))
+ top_line++;
}
// page up backs up by visitems
@@ -1383,7 +1420,7 @@ void ui_menu::draw_select_game(bool noinput)
{
float line_height = machine().ui().get_line_height();
float ud_arrow_width = line_height * machine().render().ui_aspect();
- float gutter_width = 0.52f * line_height * machine().render().ui_aspect();
+ float gutter_width = 0.52f * ud_arrow_width;
mouse_x = -1, mouse_y = -1;
float right_panel_size = (ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_RIGHT_PANEL) ? 2.0f * UI_BOX_LR_BORDER : 0.3f;
float visible_width = 1.0f - 4.0f * UI_BOX_LR_BORDER;
@@ -1444,9 +1481,8 @@ void ui_menu::draw_select_game(bool noinput)
x1 = visible_left - UI_BOX_LR_BORDER;
x2 = visible_left + visible_width + UI_BOX_LR_BORDER;
float line = visible_top + (float)(visible_lines * line_height);
-
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
+
if (visible_items < visible_lines)
visible_lines = visible_items;
if (top_line < 0 || selected == 0)
@@ -1543,7 +1579,7 @@ void ui_menu::draw_select_game(bool noinput)
else
draw_icon(linenum, item[itemnum].ref, effective_left, line_y);
- space = mui.get_line_height() * container->manager().ui_aspect() * 1.5f;
+ space = ud_arrow_width * 1.5f;
}
mui.draw_text_full(container, itemtext, effective_left + space, line_y, effective_width - space, JUSTIFY_LEFT, WRAP_TRUNCATE,
DRAW_NORMAL, item_invert ? fgcolor3 : fgcolor, bgcolor, nullptr, nullptr);
@@ -1701,10 +1737,8 @@ void ui_menu::handle_main_keys(UINT32 flags)
// hitting cancel also pops the stack
if (exclusive_input_pressed(IPT_UI_CANCEL, 0))
{
- if (!menu_has_search_active())
+ if (!ui_error && !menu_has_search_active())
ui_menu::stack_pop(machine());
- // else if (!ui_error)
- // ui_menu::stack_pop(machine()); TODO
return;
}
@@ -2763,7 +2797,6 @@ void ui_menu::draw_dats_menu()
float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER + extra_height;
float line = visible_top + (float)(visible_lines * line_height);
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
if (visible_items < visible_lines)
diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h
index 4a788c612c7..a07bcd1c519 100644
--- a/src/emu/ui/menu.h
+++ b/src/emu/ui/menu.h
@@ -32,6 +32,7 @@
#define MENU_FLAG_UI_SWLIST (1 << 8)
#define MENU_FLAG_UI_FAVORITE (1 << 9)
#define MENU_FLAG_UI_PALETTE (1 << 10)
+#define MENU_FLAG_UI_HEADING (1 << 11)
// special menu item for separators
#define MENU_SEPARATOR_ITEM "---"
@@ -52,6 +53,13 @@ enum ui_menu_reset_options
UI_MENU_RESET_REMEMBER_REF
};
+// types of menu items (TODO: please expand)
+enum class ui_menu_item_type
+{
+ UI_MENU_ITEM_TYPE_UNKNOWN,
+ UI_MENU_ITEM_TYPE_SLIDER,
+ UI_MENU_ITEM_TYPE_SEPARATOR
+};
/***************************************************************************
@@ -61,9 +69,10 @@ enum ui_menu_reset_options
// menu-related events
struct ui_menu_event
{
- void *itemref; // reference for the selected item
- int iptkey; // one of the IPT_* values from inptport.h
- unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL
+ void *itemref; // reference for the selected item
+ ui_menu_item_type type; // item type (eventually will go away when itemref is proper ui_menu_item class rather than void*)
+ int iptkey; // one of the IPT_* values from inptport.h
+ unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL
};
struct ui_menu_pool
@@ -77,10 +86,11 @@ struct ui_menu_pool
class ui_menu_item
{
public:
- const char *text;
- const char *subtext;
- UINT32 flags;
- void *ref;
+ const char *text;
+ const char *subtext;
+ UINT32 flags;
+ void *ref;
+ ui_menu_item_type type; // item type (eventually will go away when itemref is proper ui_menu_item class rather than void*)
inline bool is_selectable() const;
};
@@ -110,7 +120,8 @@ public:
void reset(ui_menu_reset_options options);
// append a new item to the end of the menu
- void item_append(const char *text, const char *subtext, UINT32 flags, void *ref);
+ void item_append(const char *text, const char *subtext, UINT32 flags, void *ref, ui_menu_item_type type = ui_menu_item_type::UI_MENU_ITEM_TYPE_UNKNOWN);
+ void item_append(ui_menu_item item);
// process a menu, drawing it and returning any interesting events
const ui_menu_event *process(UINT32 flags);
diff --git a/src/emu/ui/miscmenu.cpp b/src/emu/ui/miscmenu.cpp
index edca54ebd20..69f36b6cfda 100644
--- a/src/emu/ui/miscmenu.cpp
+++ b/src/emu/ui/miscmenu.cpp
@@ -552,127 +552,6 @@ void ui_menu_quit_game::handle()
ui_menu::stack_reset(machine());
}
-ui_menu_misc_options::misc_option ui_menu_misc_options::m_options[] = {
- { 0, nullptr, nullptr },
- { 0, __("Re-select last machine played"), OPTION_REMEMBER_LAST },
- { 0, __("Enlarge images in the right panel"), OPTION_ENLARGE_SNAPS },
- { 0, __("DATs info"), OPTION_DATS_ENABLED },
- { 0, __("Cheats"), OPTION_CHEAT },
- { 0, __("Show mouse pointer"), OPTION_UI_MOUSE },
- { 0, __("Confirm quit from machines"), OPTION_CONFIRM_QUIT },
- { 0, __("Skip displaying information's screen at startup"), OPTION_SKIP_GAMEINFO },
- { 0, __("Force 4:3 appearance for software snapshot"), OPTION_FORCED4X3 },
- { 0, __("Use image as background"), OPTION_USE_BACKGROUND },
- { 0, __("Skip bios selection menu"), OPTION_SKIP_BIOS_MENU },
- { 0, __("Skip software parts selection menu"), OPTION_SKIP_PARTS_MENU }
-};
-
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_misc_options::ui_menu_misc_options(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
- for (int d = 1; d < ARRAY_LENGTH(m_options); ++d)
- if (machine.ui().options().exists(m_options[d].option))
- m_options[d].status = machine.ui().options().bool_value(m_options[d].option);
- else
- m_options[d].status = machine.options().bool_value(m_options[d].option);
-}
-
-ui_menu_misc_options::~ui_menu_misc_options()
-{
- std::string error_string;
- for (int d = 1; d < ARRAY_LENGTH(m_options); ++d) {
- if (machine().ui().options().exists(m_options[d].option))
- {
- machine().ui().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string);
- }
- else
- {
- if (machine().options().bool_value(m_options[d].option) != m_options[d].status)
- {
- machine().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(m_options[d].option);
- }
- }
- }
- ui_globals::reset = true;
-}
-
-//-------------------------------------------------
-// handlethe options menu
-//-------------------------------------------------
-
-void ui_menu_misc_options::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event = process(0);
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT)
- {
- changed = true;
- int value = (FPTR)m_event->itemref;
- if (!strcmp(m_options[value].option, OPTION_ENLARGE_SNAPS))
- ui_globals::switch_image = true;
- m_options[value].status = !m_options[value].status;
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_misc_options::populate()
-{
- // add options items
- for (int opt = 1; opt < ARRAY_LENGTH(m_options); ++opt)
- item_append(_(m_options[opt].description), m_options[opt].status ? _("On") : _("Off"), m_options[opt].status ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)opt);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_misc_options::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
-
- mui.draw_text_full(container, _("Miscellaneous Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- float maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, _("Miscellaneous Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
//-------------------------------------------------
// ctor / dtor
//-------------------------------------------------
diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp
index fef44b8e542..796bd665512 100644
--- a/src/emu/ui/optsmenu.cpp
+++ b/src/emu/ui/optsmenu.cpp
@@ -11,13 +11,12 @@
#include "emu.h"
#include "ui/ui.h"
#include "ui/menu.h"
+#include "ui/submenu.h"
#include "ui/datfile.h"
#include "ui/inifile.h"
#include "ui/selector.h"
#include "ui/custui.h"
#include "ui/sndmenu.h"
-#include "ui/ctrlmenu.h"
-#include "ui/dsplmenu.h"
#include "ui/miscmenu.h"
#include "ui/optsmenu.h"
#include "ui/custmenu.h"
@@ -162,7 +161,7 @@ void ui_menu_game_options::handle()
break;
case MISC_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_misc_options>(machine(), container));
+ ui_menu::stack_push(global_alloc_clear<ui_submenu>(machine(), container, misc_submenu_options));
break;
case SOUND_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
@@ -170,7 +169,7 @@ void ui_menu_game_options::handle()
break;
case DISPLAY_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_display_options>(machine(), container));
+ ui_menu::stack_push(global_alloc_clear<ui_submenu>(machine(), container, video_submenu_options));
break;
case CUSTOM_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
@@ -178,7 +177,7 @@ void ui_menu_game_options::handle()
break;
case CONTROLLER_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_controller_mapping>(machine(), container));
+ ui_menu::stack_push(global_alloc_clear<ui_submenu>(machine(), container, control_submenu_options));
break;
case CGI_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
@@ -188,6 +187,10 @@ void ui_menu_game_options::handle()
if (m_event->iptkey == IPT_UI_SELECT)
ui_menu::stack_push(global_alloc_clear<ui_menu_custom_filter>(machine(), container));
break;
+ case ADVANCED_MENU:
+ if (m_event->iptkey == IPT_UI_SELECT)
+ ui_menu::stack_push(global_alloc_clear<ui_submenu>(machine(), container, advanced_submenu_options));
+ break;
case SAVE_CONFIG:
if (m_event->iptkey == IPT_UI_SELECT)
save_main_option(machine());
@@ -258,11 +261,12 @@ void ui_menu_game_options::populate()
item_append(_("Customize UI"), nullptr, 0, (void *)(FPTR)CUSTOM_MENU);
item_append(_("Configure Directories"), nullptr, 0, (void *)(FPTR)CONF_DIR);
}
- item_append(_("Display Options"), nullptr, 0, (void *)(FPTR)DISPLAY_MENU);
+ item_append(_(video_submenu_options[0].description), nullptr, 0, (void *)(FPTR)DISPLAY_MENU);
item_append(_("Sound Options"), nullptr, 0, (void *)(FPTR)SOUND_MENU);
- item_append(_("Miscellaneous Options"), nullptr, 0, (void *)(FPTR)MISC_MENU);
- item_append(_("Device Mapping"), nullptr, 0, (void *)(FPTR)CONTROLLER_MENU);
+ item_append(_(misc_submenu_options[0].description), nullptr, 0, (void *)(FPTR)MISC_MENU);
+ item_append(_(control_submenu_options[0].description), nullptr, 0, (void *)(FPTR)CONTROLLER_MENU);
item_append(_("General Inputs"), nullptr, 0, (void *)(FPTR)CGI_MENU);
+ item_append(_(advanced_submenu_options[0].description), nullptr, 0, (void *)(FPTR)ADVANCED_MENU);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
item_append(_("Save Configuration"), nullptr, 0, (void *)(FPTR)SAVE_CONFIG);
diff --git a/src/emu/ui/optsmenu.h b/src/emu/ui/optsmenu.h
index 4dd2d0f53be..f6b4243afa0 100644
--- a/src/emu/ui/optsmenu.h
+++ b/src/emu/ui/optsmenu.h
@@ -33,11 +33,12 @@ private:
YEAR_CAT_FILTER,
CATEGORY_FILTER,
CONF_DIR,
- MISC_MENU,
DISPLAY_MENU,
CUSTOM_MENU,
SOUND_MENU,
CONTROLLER_MENU,
+ MISC_MENU,
+ ADVANCED_MENU,
SAVE_OPTIONS,
CGI_MENU,
CUSTOM_FILTER,
diff --git a/src/emu/ui/pluginopt.cpp b/src/emu/ui/pluginopt.cpp
new file mode 100644
index 00000000000..9fd02404a0a
--- /dev/null
+++ b/src/emu/ui/pluginopt.cpp
@@ -0,0 +1,112 @@
+// license:BSD-3-Clause
+// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
+/*********************************************************************
+
+ ui/pluginopt.cpp
+
+ Internal menu for the plugin interface.
+
+*********************************************************************/
+
+#include "emu.h"
+#include "luaengine.h"
+
+#include "ui/pluginopt.h"
+
+void ui_menu_plugin::handle()
+{
+ const ui_menu_event *menu_event = process(0);
+
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
+ {
+ if (menu_event->iptkey == IPT_UI_SELECT)
+ ui_menu::stack_push(global_alloc_clear<ui_menu_plugin_opt>(machine(), container, (char *)menu_event->itemref));
+ }
+}
+
+ui_menu_plugin::ui_menu_plugin(running_machine &machine, render_container *container) :
+ ui_menu(machine, container),
+ m_plugins(machine.manager().lua()->get_menu())
+{
+}
+
+void ui_menu_plugin::populate()
+{
+ for (auto &curplugin : m_plugins)
+ item_append(curplugin.c_str(), 0, 0, (void *)curplugin.c_str());
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+}
+
+ui_menu_plugin::~ui_menu_plugin()
+{
+}
+
+ui_menu_plugin_opt::ui_menu_plugin_opt(running_machine &machine, render_container *container, char *menu) :
+ ui_menu(machine, container),
+ m_menu(menu)
+{
+}
+
+void ui_menu_plugin_opt::handle()
+{
+ const ui_menu_event *menu_event = process(0);
+
+ if (menu_event != nullptr && (FPTR)menu_event->itemref)
+ {
+ std::string key;
+ switch(menu_event->iptkey)
+ {
+ case IPT_UI_UP:
+ key = "up";
+ break;
+ case IPT_UI_DOWN:
+ key = "down";
+ break;
+ case IPT_UI_LEFT:
+ key = "left";
+ break;
+ case IPT_UI_RIGHT:
+ key = "right";
+ break;
+ case IPT_UI_SELECT:
+ key = "select";
+ break;
+ case IPT_UI_DISPLAY_COMMENT:
+ key = "comment";
+ break;
+ case IPT_UI_CLEAR:
+ key = "clear";
+ break;
+ default:
+ return;
+ }
+ if(machine().manager().lua()->menu_callback(m_menu, (FPTR)menu_event->itemref, key))
+ reset(UI_MENU_RESET_REMEMBER_REF);
+ }
+}
+
+void ui_menu_plugin_opt::populate()
+{
+ std::vector<lua_engine::menu_item> menu_list;
+ machine().manager().lua()->menu_populate(m_menu, menu_list);
+ FPTR i = 1;
+ for(auto &item : menu_list)
+ {
+ UINT32 flags = 0;
+ if(item.flags == "off")
+ flags = MENU_FLAG_DISABLE;
+ else if(item.flags == "l")
+ flags = MENU_FLAG_LEFT_ARROW;
+ else if(item.flags == "r")
+ flags = MENU_FLAG_RIGHT_ARROW;
+ else if(item.flags == "lr")
+ flags = MENU_FLAG_RIGHT_ARROW | MENU_FLAG_LEFT_ARROW;
+
+ item_append(item.text.c_str(), item.subtext.c_str(), flags, (void *)i++);
+ }
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+}
+
+ui_menu_plugin_opt::~ui_menu_plugin_opt()
+{
+}
diff --git a/src/emu/ui/pluginopt.h b/src/emu/ui/pluginopt.h
new file mode 100644
index 00000000000..9d529e93749
--- /dev/null
+++ b/src/emu/ui/pluginopt.h
@@ -0,0 +1,38 @@
+// license:BSD-3-Clause
+// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods, Carl
+/***************************************************************************
+
+ ui/pluginopt.h
+
+ Internal menu for the plugin interface.
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __UI_PLUGINOPT_H__
+#define __UI_PLUGINOPT_H__
+
+#include "ui/ui.h"
+#include "ui/menu.h"
+
+class ui_menu_plugin : public ui_menu {
+public:
+ ui_menu_plugin(running_machine &machine, render_container *container);
+ virtual ~ui_menu_plugin();
+ virtual void populate() override;
+ virtual void handle() override;
+private:
+ std::vector<std::string> &m_plugins;
+};
+
+class ui_menu_plugin_opt : public ui_menu {
+public:
+ ui_menu_plugin_opt(running_machine &machine, render_container *container, char *menu);
+ virtual ~ui_menu_plugin_opt();
+ virtual void populate() override;
+ virtual void handle() override;
+private:
+ std::string m_menu;
+};
+#endif /* __UI_PLUGINOPT_H__ */
diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp
index 1ac26804bb5..daaa072f9ef 100644
--- a/src/emu/ui/selgame.cpp
+++ b/src/emu/ui/selgame.cpp
@@ -205,7 +205,10 @@ void ui_menu_select_game::handle()
{
// reset the error on any future m_event
if (ui_error)
+ {
ui_error = false;
+ machine().ui_input().reset();
+ }
// handle selections
else if (m_event->iptkey == IPT_UI_SELECT)
@@ -444,7 +447,7 @@ void ui_menu_select_game::handle()
// if we're in an error state, overlay an error message
if (ui_error)
machine().ui().draw_text_box(container, _("The selected machine is missing one or more required ROM or CHD images. "
- "Please select a different machine.\n\nPress any key (except ESC) to continue."), JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
+ "Please select a different machine.\n\nPress any key to continue."), JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
// handle filters selection from key shortcuts
if (check_filter)
@@ -493,7 +496,6 @@ void ui_menu_select_game::populate()
// reset search string
m_search[0] = '\0';
m_displaylist.clear();
- m_tmp.clear();
// if filter is set on category, build category list
switch (main_filters::actual)
@@ -502,16 +504,16 @@ void ui_menu_select_game::populate()
build_category();
break;
case FILTER_MANUFACTURER:
- build_list(m_tmp, c_mnfct::ui[c_mnfct::actual].c_str());
+ build_list(c_mnfct::ui[c_mnfct::actual].c_str());
break;
case FILTER_YEAR:
- build_list(m_tmp, c_year::ui[c_year::actual].c_str());
+ build_list(c_year::ui[c_year::actual].c_str());
break;
case FILTER_CUSTOM:
build_custom();
break;
default:
- build_list(m_tmp);
+ build_list();
break;
}
@@ -1277,7 +1279,7 @@ void ui_menu_select_game::inkey_configure(const ui_menu_event *m_event)
// build list
//-------------------------------------------------
-void ui_menu_select_game::build_list(std::vector<const game_driver *> &s_drivers, const char *filter_text, int filter, bool bioscheck)
+void ui_menu_select_game::build_list(const char *filter_text, int filter, bool bioscheck, std::vector<const game_driver *> s_drivers)
{
int cx = 0;
bool cloneof = false;
@@ -1441,13 +1443,13 @@ void ui_menu_select_game::build_custom()
switch (filter)
{
case FILTER_YEAR:
- build_list(s_drivers, c_year::ui[custfltr::year[count]].c_str(), filter, bioscheck);
+ build_list(c_year::ui[custfltr::year[count]].c_str(), filter, bioscheck, s_drivers);
break;
case FILTER_MANUFACTURER:
- build_list(s_drivers, c_mnfct::ui[custfltr::mnfct[count]].c_str(), filter, bioscheck);
+ build_list(c_mnfct::ui[custfltr::mnfct[count]].c_str(), filter, bioscheck, s_drivers);
break;
default:
- build_list(s_drivers, nullptr, filter, bioscheck);
+ build_list(nullptr, filter, bioscheck, s_drivers);
break;
}
}
@@ -1459,14 +1461,14 @@ void ui_menu_select_game::build_custom()
void ui_menu_select_game::build_category()
{
+ m_displaylist.clear();
std::vector<int> temp_filter;
machine().inifile().load_ini_category(temp_filter);
for (auto actual : temp_filter)
- m_tmp.push_back(&driver_list::driver(actual));
+ m_displaylist.push_back(&driver_list::driver(actual));
- std::stable_sort(m_tmp.begin(), m_tmp.end(), sorted_game_list);
- m_displaylist = m_tmp;
+ std::stable_sort(m_displaylist.begin(), m_displaylist.end(), sorted_game_list);
}
//-------------------------------------------------
@@ -1777,7 +1779,7 @@ float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y
{
float origy1 = y1;
float origy2 = y2;
- float text_size = 0.75f;
+ float text_size = machine().ui().options().infos_size();
float line_height_max = line_height * text_size;
float left_width = 0.0f;
int text_lenght = main_filters::length;
@@ -1793,13 +1795,13 @@ float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y
line_height_max = line_height * text_size;
}
- float text_sign = mui.get_string_width_ex("_# ", text_size);
+ float text_sign = mui.get_string_width("_# ", text_size);
for (int x = 0; x < text_lenght; ++x)
{
float total_width;
// compute width of left hand side
- total_width = mui.get_string_width_ex(text[x], text_size);
+ total_width = mui.get_string_width(text[x], text_size);
total_width += text_sign;
// track the maximum
@@ -2073,7 +2075,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
else if (ui_globals::curdats_view == UI_STORY_LOAD)
{
// check size
- float textlen = mui.get_string_width_ex(tempbuf.c_str(), text_size);
+ float textlen = mui.get_string_width(tempbuf.c_str(), text_size);
float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size;
size_t last_underscore = tempbuf.find_last_of("_");
@@ -2103,7 +2105,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
else if (ui_globals::curdats_view == UI_COMMAND_LOAD || ui_globals::curdats_view == UI_GENERAL_LOAD)
{
// check size
- float textlen = mui.get_string_width_ex(tempbuf.c_str(), text_size);
+ float textlen = mui.get_string_width(tempbuf.c_str(), text_size);
float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size;
int first_dspace = (ui_globals::curdats_view == UI_COMMAND_LOAD) ? tempbuf.find(" ") : tempbuf.find(":");
@@ -2257,7 +2259,6 @@ void ui_menu_select_game::draw_right_panel(void *selectedref, float origx1, floa
float ar_x1 = ar_x0 + lr_arrow_width;
float ar_y1 = 0.5f * (origy2 + origy1) + 0.9f * space;
- //machine().ui().draw_outlined_box(container, origx1, origy1, origx2, origy2, UI_BACKGROUND_COLOR);
mui.draw_outlined_box(container, origx1, origy1, origx2, origy2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
if (mouse_hit && origx1 <= mouse_x && x2 > mouse_x && origy1 <= mouse_y && origy2 > mouse_y)
diff --git a/src/emu/ui/selgame.h b/src/emu/ui/selgame.h
index 6db7b23ebeb..11dee880927 100644
--- a/src/emu/ui/selgame.h
+++ b/src/emu/ui/selgame.h
@@ -53,7 +53,6 @@ private:
std::vector<const game_driver *> m_availsortedlist;
std::vector<const game_driver *> m_unavailsortedlist;
std::vector<const game_driver *> m_displaylist;
- std::vector<const game_driver *> m_tmp;
const game_driver *m_searchlist[VISIBLE_GAMES_IN_SEARCH + 1];
@@ -61,7 +60,7 @@ private:
void build_custom();
void build_category();
void build_available_list();
- void build_list(std::vector<const game_driver *> &vec, const char *filter_text = nullptr, int filter = 0, bool bioscheck = false);
+ void build_list(const char *filter_text = nullptr, int filter = 0, bool bioscheck = false, std::vector<const game_driver *> vec = {});
bool isfavorite();
void populate_search();
diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp
index 1c85ccf5fde..8f919c9a01e 100644
--- a/src/emu/ui/selsoft.cpp
+++ b/src/emu/ui/selsoft.cpp
@@ -171,7 +171,10 @@ void ui_menu_select_software::handle()
{
// reset the error on any future m_event
if (ui_error)
+ {
ui_error = false;
+ machine().ui_input().reset();
+ }
// handle selections
else if (m_event->iptkey == IPT_UI_SELECT)
@@ -375,7 +378,7 @@ void ui_menu_select_software::handle()
// if we're in an error state, overlay an error message
if (ui_error)
machine().ui().draw_text_box(container, _("The selected software is missing one or more required files. "
- "Please select a different software.\n\nPress any key (except ESC) to continue."),
+ "Please select a different software.\n\nPress any key to continue."),
JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
// handle filters selection from key shortcuts
@@ -428,7 +431,6 @@ void ui_menu_select_software::populate()
machine_config config(*m_driver, machine().options());
image_interface_iterator iter(config.root_device());
-
for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
if (image->filename() == nullptr && image->must_be_loaded())
{
@@ -1413,13 +1415,13 @@ float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, flo
line_height = l_height * text_size;
}
- float text_sign = mui.get_string_width_ex("_# ", text_size);
+ float text_sign = mui.get_string_width("_# ", text_size);
for (int x = 0; x < text_lenght; ++x)
{
float total_width;
// compute width of left hand side
- total_width = mui.get_string_width_ex(text[x], text_size);
+ total_width = mui.get_string_width(text[x], text_size);
total_width += text_sign;
// track the maximum
@@ -1428,7 +1430,6 @@ float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, flo
}
x2 = x1 + left_width + 2.0f * UI_BOX_LR_BORDER;
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
// take off the borders
@@ -1509,7 +1510,6 @@ float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, flo
float ar_x1 = ar_x0 + lr_arrow_width;
float ar_y1 = 0.5f * (y2 + y1) + 0.9f * space;
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y)
@@ -1533,7 +1533,6 @@ float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, flo
float ar_x1 = ar_x0 + lr_arrow_width;
float ar_y1 = 0.5f * (y2 + y1) + 0.9f * space;
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y)
@@ -1896,7 +1895,6 @@ void ui_menu_select_software::draw_right_panel(void *selectedref, float origx1,
float ar_x1 = ar_x0 + lr_arrow_width;
float ar_y1 = 0.5f * (origy2 + origy1) + 0.9f * space;
- //machine().ui().draw_outlined_box(container, origx1, origy1, origx2, origy2, UI_BACKGROUND_COLOR);
mui.draw_outlined_box(container, origx1, origy1, origx2, origy2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
if (mouse_hit && origx1 <= mouse_x && x2 > mouse_x && origy1 <= mouse_y && origy2 > mouse_y)
diff --git a/src/emu/ui/simpleselgame.cpp b/src/emu/ui/simpleselgame.cpp
index 617c6e651e4..e6c4b197e50 100644
--- a/src/emu/ui/simpleselgame.cpp
+++ b/src/emu/ui/simpleselgame.cpp
@@ -103,7 +103,10 @@ void ui_simple_menu_select_game::handle()
{
// reset the error on any future menu_event
if (m_error)
+ {
m_error = false;
+ machine().ui_input().reset();
+ }
// handle selections
else
diff --git a/src/emu/ui/sliders.cpp b/src/emu/ui/sliders.cpp
index 87508df3dd0..20cb435233a 100644
--- a/src/emu/ui/sliders.cpp
+++ b/src/emu/ui/sliders.cpp
@@ -39,10 +39,10 @@ void ui_menu_sliders::handle()
if (menu_event != nullptr)
{
/* handle keys if there is a valid item selected */
- if (menu_event->itemref != nullptr)
+ if (menu_event->itemref != nullptr && menu_event->type == ui_menu_item_type::UI_MENU_ITEM_TYPE_SLIDER)
{
const slider_state *slider = (const slider_state *)menu_event->itemref;
- INT32 curvalue = (*slider->update)(machine(), slider->arg, nullptr, SLIDER_NOCHANGE);
+ INT32 curvalue = (*slider->update)(machine(), slider->arg, slider->id, nullptr, SLIDER_NOCHANGE);
INT32 increment = 0;
bool alt_pressed = machine().input().code_pressed(KEYCODE_LALT) || machine().input().code_pressed(KEYCODE_RALT);
bool ctrl_pressed = machine().input().code_pressed(KEYCODE_LCONTROL) || machine().input().code_pressed(KEYCODE_RCONTROL);
@@ -104,7 +104,7 @@ void ui_menu_sliders::handle()
newvalue = slider->maxval;
/* update the slider and recompute the menu */
- (*slider->update)(machine(), slider->arg, nullptr, newvalue);
+ (*slider->update)(machine(), slider->arg, slider->id, nullptr, newvalue);
reset(UI_MENU_RESET_REMEMBER_REF);
}
}
@@ -140,27 +140,47 @@ void ui_menu_sliders::populate()
std::string tempstring;
/* add UI sliders */
- for (const slider_state *curslider = machine().ui().get_slider_list(); curslider != nullptr; curslider = curslider->next)
+ std::vector<ui_menu_item> ui_sliders = machine().ui().get_slider_list();
+ for (ui_menu_item item : ui_sliders)
{
- INT32 curval = (*curslider->update)(machine(), curslider->arg, &tempstring, SLIDER_NOCHANGE);
- UINT32 flags = 0;
- if (curval > curslider->minval)
- flags |= MENU_FLAG_LEFT_ARROW;
- if (curval < curslider->maxval)
- flags |= MENU_FLAG_RIGHT_ARROW;
- item_append(curslider->description, tempstring.c_str(), flags, (void *)curslider);
+ if (item.type == ui_menu_item_type::UI_MENU_ITEM_TYPE_SLIDER)
+ {
+ slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
+ INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
+ UINT32 flags = 0;
+ if (curval > slider->minval)
+ flags |= MENU_FLAG_LEFT_ARROW;
+ if (curval < slider->maxval)
+ flags |= MENU_FLAG_RIGHT_ARROW;
+ item_append(slider->description, tempstring.c_str(), flags, (void *)slider, ui_menu_item_type::UI_MENU_ITEM_TYPE_SLIDER);
+ }
+ else
+ {
+ item_append(item);
+ }
}
- /* add OSD sliders */
- for (const slider_state *curslider = (slider_state*)machine().osd().get_slider_list(); curslider != nullptr; curslider = curslider->next)
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+
+ /* add OSD options */
+ std::vector<ui_menu_item> osd_sliders = machine().osd().get_slider_list();
+ for (ui_menu_item item : osd_sliders)
{
- INT32 curval = (*curslider->update)(machine(), curslider->arg, &tempstring, SLIDER_NOCHANGE);
- UINT32 flags = 0;
- if (curval > curslider->minval)
- flags |= MENU_FLAG_LEFT_ARROW;
- if (curval < curslider->maxval)
- flags |= MENU_FLAG_RIGHT_ARROW;
- item_append(curslider->description, tempstring.c_str(), flags, (void *)curslider);
+ if (item.type == ui_menu_item_type::UI_MENU_ITEM_TYPE_SLIDER)
+ {
+ slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
+ INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
+ UINT32 flags = 0;
+ if (curval > slider->minval)
+ flags |= MENU_FLAG_LEFT_ARROW;
+ if (curval < slider->maxval)
+ flags |= MENU_FLAG_RIGHT_ARROW;
+ item_append(slider->description, tempstring.c_str(), flags, (void *)slider, ui_menu_item_type::UI_MENU_ITEM_TYPE_SLIDER);
+ }
+ else
+ {
+ item_append(item);
+ }
}
custombottom = 2.0f * machine().ui().get_line_height() + 2.0f * UI_BOX_TB_BORDER;
@@ -184,7 +204,7 @@ void ui_menu_sliders::custom_render(void *selectedref, float top, float bottom,
INT32 curval;
/* determine the current value and text */
- curval = (*curslider->update)(machine(), curslider->arg, &tempstring, SLIDER_NOCHANGE);
+ curval = (*curslider->update)(machine(), curslider->arg, curslider->id, &tempstring, SLIDER_NOCHANGE);
/* compute the current and default percentages */
percentage = (float)(curval - curslider->minval) / (float)(curslider->maxval - curslider->minval);
diff --git a/src/emu/ui/sliders.h b/src/emu/ui/sliders.h
index c21555dc336..f420b094cbe 100644
--- a/src/emu/ui/sliders.h
+++ b/src/emu/ui/sliders.h
@@ -27,6 +27,10 @@ public:
static UINT32 ui_handler(running_machine &machine, render_container *container, UINT32 state);
private:
+ enum {
+ INPUT_GROUPS,
+ INPUT_SPECIFIC,
+ };
bool m_menuless_mode;
bool m_hidden;
};
diff --git a/src/emu/ui/slotopt.cpp b/src/emu/ui/slotopt.cpp
index 693c28a9ba8..35c9cab14a7 100644
--- a/src/emu/ui/slotopt.cpp
+++ b/src/emu/ui/slotopt.cpp
@@ -9,7 +9,7 @@
*********************************************************************/
#include "emu.h"
-
+#include "emuopts.h"
#include "ui/ui.h"
#include "ui/menu.h"
#include "ui/slotopt.h"
diff --git a/src/emu/ui/submenu.cpp b/src/emu/ui/submenu.cpp
new file mode 100644
index 00000000000..a06d75adb83
--- /dev/null
+++ b/src/emu/ui/submenu.cpp
@@ -0,0 +1,361 @@
+// license:BSD-3-Clause
+// copyright-holders:Maurizio Petrarota,Jeffrey Clark
+/***************************************************************************
+
+ ui/submenu.cpp
+
+ UI options menu
+
+***************************************************************************/
+
+#include "emu.h"
+#include "ui/ui.h"
+#include "ui/submenu.h"
+#include "ui/utils.h"
+#include <limits>
+#include <iterator>
+
+//-------------------------------------------------
+// ctor / dtor
+//-------------------------------------------------
+
+ui_submenu::ui_submenu(running_machine &machine, render_container *container, std::vector<ui_submenu::option> &suboptions)
+ : ui_menu(machine, container),
+ m_options(suboptions)
+{
+ for (auto & sm_option : m_options)
+ {
+ switch (sm_option.type)
+ {
+ case ui_submenu::EMU:
+ sm_option.entry = machine.options().get_entry(sm_option.name);
+ sm_option.options = dynamic_cast<core_options*>(&machine.options());
+ if (sm_option.entry->type() == OPTION_STRING)
+ {
+ sm_option.value.clear();
+ std::string namestr(sm_option.entry->description());
+ int lparen = namestr.find_first_of('(', 0);
+ int vslash = namestr.find_first_of('|', lparen + 1);
+ int rparen = namestr.find_first_of(')', vslash + 1);
+ if (lparen != -1 && vslash != -1 && rparen != -1)
+ {
+ int semi;
+ namestr.erase(rparen);
+ namestr.erase(0, lparen + 1);
+ while ((semi = namestr.find_first_of('|')) != -1)
+ {
+ sm_option.value.emplace_back(namestr.substr(0, semi));
+ namestr.erase(0, semi + 1);
+ }
+ sm_option.value.emplace_back(namestr);
+ }
+ }
+ break;
+ case ui_submenu::OSD:
+ sm_option.entry = machine.options().get_entry(sm_option.name);
+ sm_option.options = dynamic_cast<core_options*>(&machine.options());
+ if (sm_option.entry->type() == OPTION_STRING)
+ {
+ sm_option.value.clear();
+ std::string descr(sm_option.entry->description()), delim(", ");
+ descr.erase(0, descr.find(":") + 2);
+ size_t p1, p2 = 0;
+ while ((p1 = descr.find_first_not_of(delim, p2)) != std::string::npos)
+ {
+ p2 = descr.find_first_of(delim, p1 + 1);
+ if (p2 != std::string::npos)
+ {
+ std::string txt(descr.substr(p1, p2 - p1));
+ if (txt != "or")
+ sm_option.value.push_back(txt);
+ }
+ else
+ {
+ sm_option.value.push_back(descr.substr(p1));
+ break;
+ }
+ }
+ }
+ break;
+ case ui_submenu::UI:
+ sm_option.entry = machine.ui().options().get_entry(sm_option.name);
+ sm_option.options = dynamic_cast<core_options*>(&machine.ui().options());
+ break;
+ default:
+ continue;
+ break;
+ }
+ }
+}
+
+ui_submenu::~ui_submenu()
+{
+}
+
+//-------------------------------------------------
+// handlethe options menu
+//-------------------------------------------------
+
+void ui_submenu::handle()
+{
+ bool changed = false;
+ std::string error_string, tmptxt;
+ float f_cur, f_step;
+
+ // process the menu
+ const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT);
+
+ if (m_event != nullptr && m_event->itemref != nullptr &&
+ (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT))
+ {
+ ui_submenu::option *sm_option = (ui_submenu::option *)m_event->itemref;
+
+ switch (sm_option->type)
+ {
+ case ui_submenu::EMU:
+ case ui_submenu::UI:
+ case ui_submenu::OSD:
+ switch (sm_option->entry->type())
+ {
+ case OPTION_BOOLEAN:
+ changed = true;
+ sm_option->options->set_value(sm_option->name, !strcmp(sm_option->entry->value(),"1") ? "0" : "1", OPTION_PRIORITY_CMDLINE, error_string);
+ sm_option->entry->mark_changed();
+ break;
+ case OPTION_INTEGER:
+ if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
+ {
+ changed = true;
+ int i_cur = atoi(sm_option->entry->value());
+ (m_event->iptkey == IPT_UI_LEFT) ? i_cur-- : i_cur++;
+ sm_option->options->set_value(sm_option->name, i_cur, OPTION_PRIORITY_CMDLINE, error_string);
+ sm_option->entry->mark_changed();
+ }
+ break;
+ case OPTION_FLOAT:
+ if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
+ {
+ changed = true;
+ f_cur = atof(sm_option->entry->value());
+ if (sm_option->entry->has_range())
+ {
+ f_step = atof(sm_option->entry->minimum());
+ if (f_step <= 0.0f) {
+ int pmin = getprecisionchr(sm_option->entry->minimum());
+ int pmax = getprecisionchr(sm_option->entry->maximum());
+ tmptxt = '1' + std::string((pmin > pmax) ? pmin : pmax, '0');
+ f_step = 1 / atof(tmptxt.c_str());
+ }
+ }
+ else
+ {
+ int precision = getprecisionchr(sm_option->entry->default_value());
+ tmptxt = '1' + std::string(precision, '0');
+ f_step = 1 / atof(tmptxt.c_str());
+ }
+ if (m_event->iptkey == IPT_UI_LEFT)
+ f_cur -= f_step;
+ else
+ f_cur += f_step;
+ tmptxt = string_format("%g", f_cur);
+ sm_option->options->set_value(sm_option->name, tmptxt.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
+ sm_option->entry->mark_changed();
+ }
+ break;
+ case OPTION_STRING:
+ if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
+ {
+ changed = true;
+ std::string v_cur(sm_option->entry->value());
+ int cur_value = std::distance(sm_option->value.begin(), std::find(sm_option->value.begin(), sm_option->value.end(), v_cur));
+ if (m_event->iptkey == IPT_UI_LEFT)
+ v_cur = sm_option->value[--cur_value];
+ else
+ v_cur = sm_option->value[++cur_value];
+ sm_option->options->set_value(sm_option->name, v_cur.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
+ sm_option->entry->mark_changed();
+ }
+ break;
+ }
+ break;
+ default:
+ osd_printf_error("Unhandled option: %s", _(sm_option->description));
+ break;
+ }
+ }
+
+ if (changed)
+ reset(UI_MENU_RESET_REMEMBER_REF);
+}
+
+//-------------------------------------------------
+// populate
+//-------------------------------------------------
+
+void ui_submenu::populate()
+{
+ UINT32 arrow_flags;
+
+ // add options
+ for (auto sm_option = m_options.begin(); sm_option < m_options.end(); sm_option++)
+ {
+ // skip first heading (is menu title)
+ if (sm_option == m_options.begin() && sm_option->type == ui_submenu::HEAD) continue;
+
+ switch (sm_option->type)
+ {
+ case ui_submenu::HEAD:
+ item_append(_(sm_option->description), nullptr, MENU_FLAG_DISABLE | MENU_FLAG_UI_HEADING, nullptr);
+ break;
+ case ui_submenu::SEP:
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ break;
+ case ui_submenu::CMD:
+ item_append(_(sm_option->description), nullptr, 0, static_cast<void*>(&(*sm_option)));
+ break;
+ case ui_submenu::EMU:
+ case ui_submenu::UI:
+ case ui_submenu::OSD:
+ switch (sm_option->entry->type())
+ {
+ case OPTION_BOOLEAN:
+ arrow_flags = sm_option->options->bool_value(sm_option->name) ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW;
+ item_append(_(sm_option->description),
+ (arrow_flags == MENU_FLAG_RIGHT_ARROW) ? "On" : "Off",
+ arrow_flags,
+ static_cast<void*>(&(*sm_option)));
+ break;
+ case OPTION_INTEGER:
+ {
+ int i_min, i_max;
+ int i_cur = atoi(sm_option->entry->value());
+ if (sm_option->entry->has_range())
+ {
+ i_min = atoi(sm_option->entry->minimum());
+ i_max = atoi(sm_option->entry->maximum());
+ }
+ else
+ {
+ i_min = std::numeric_limits<int>::min();
+ i_max = std::numeric_limits<int>::max();
+ }
+ arrow_flags = get_arrow_flags(i_min, i_max, i_cur);
+ item_append(_(sm_option->description),
+ sm_option->entry->value(),
+ arrow_flags,
+ static_cast<void*>(&(*sm_option)));
+ break;
+ }
+ case OPTION_FLOAT:
+ {
+ float f_min, f_max;
+ float f_cur = atof(sm_option->entry->value());
+ if (sm_option->entry->has_range())
+ {
+ f_min = atof(sm_option->entry->minimum());
+ f_max = atof(sm_option->entry->maximum());
+ }
+ else
+ {
+ f_min = 0.0f;
+ f_max = std::numeric_limits<float>::max();
+ }
+ arrow_flags = get_arrow_flags(f_min, f_max, f_cur);
+ std::string tmptxt = string_format("%g", f_cur);
+ item_append(_(sm_option->description),
+ tmptxt.c_str(),
+ arrow_flags,
+ static_cast<void*>(&(*sm_option)));
+ break;
+ }
+ case OPTION_STRING:
+ {
+ std::string v_cur(sm_option->entry->value());
+ int cur_value = std::distance(sm_option->value.begin(), std::find(sm_option->value.begin(), sm_option->value.end(), v_cur));
+ arrow_flags = get_arrow_flags(0, sm_option->value.size() - 1, cur_value);
+ item_append(_(sm_option->description),
+ sm_option->options->value(sm_option->name),
+ arrow_flags, static_cast<void*>(&(*sm_option)));
+ break;
+ }
+ default:
+ arrow_flags = MENU_FLAG_RIGHT_ARROW;
+ item_append(_(sm_option->description),
+ sm_option->options->value(sm_option->name),
+ arrow_flags, static_cast<void*>(&(*sm_option)));
+ break;
+ }
+ break;
+ default:
+ osd_printf_error("Unknown option type: %s", _(sm_option->description));
+ break;
+ }
+ }
+
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ custombottom = customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
+}
+
+//-------------------------------------------------
+// perform our special rendering
+//-------------------------------------------------
+
+void ui_submenu::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
+{
+ float width;
+ ui_manager &mui = machine().ui();
+
+ mui.draw_text_full(container, _(m_options[0].description), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
+ width += 2 * UI_BOX_LR_BORDER;
+ float maxwidth = MAX(origx2 - origx1, width);
+
+ // compute our bounds
+ float x1 = 0.5f - 0.5f * maxwidth;
+ float x2 = x1 + maxwidth;
+ float y1 = origy1 - top;
+ float y2 = origy1 - UI_BOX_TB_BORDER;
+
+ // draw a box
+ mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
+
+ // take off the borders
+ x1 += UI_BOX_LR_BORDER;
+ x2 -= UI_BOX_LR_BORDER;
+ y1 += UI_BOX_TB_BORDER;
+
+ // draw the text within it
+ mui.draw_text_full(container, _(m_options[0].description), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
+
+ if (selectedref != nullptr)
+ {
+ ui_submenu::option *selected_sm_option = (ui_submenu::option *)selectedref;
+ if (selected_sm_option->entry != nullptr)
+ {
+ mui.draw_text_full(container, selected_sm_option->entry->description(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
+
+ width += 2 * UI_BOX_LR_BORDER;
+ maxwidth = MAX(origx2 - origx1, width);
+
+ // compute our bounds
+ x1 = 0.5f - 0.5f * maxwidth;
+ x2 = x1 + maxwidth;
+ y1 = origy2 + UI_BOX_TB_BORDER;
+ y2 = origy2 + bottom;
+
+ // draw a box
+ mui.draw_outlined_box(container, x1, y1, x2, y2, UI_RED_COLOR);
+
+ // take off the borders
+ x1 += UI_BOX_LR_BORDER;
+ x2 -= UI_BOX_LR_BORDER;
+ y1 += UI_BOX_TB_BORDER;
+
+ // draw the text within it
+ mui.draw_text_full(container, selected_sm_option->entry->description(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
+ }
+ }
+}
diff --git a/src/emu/ui/submenu.h b/src/emu/ui/submenu.h
new file mode 100644
index 00000000000..3e25ba18c94
--- /dev/null
+++ b/src/emu/ui/submenu.h
@@ -0,0 +1,158 @@
+// license:BSD-3-Clause
+// copyright-holders:Maurizio Petrarota,Jeffrey Clark
+/***************************************************************************
+
+ ui/submenu.h
+
+ UI options menu.
+
+***************************************************************************/
+#pragma once
+
+#ifndef __UI_SUBMENU_H__
+#define __UI_SUBMENU_H__
+
+#include "emuopts.h"
+#include "ui/menu.h"
+
+#if defined(UI_WINDOWS) && !defined(UI_SDL)
+#include "../osd/windows/winmain.h"
+#else
+#include "../osd/modules/lib/osdobj_common.h"
+#endif
+
+//-------------------------------------------------
+// class ui menu
+//-------------------------------------------------
+class ui_submenu : public ui_menu
+{
+public:
+ enum option_type {
+ HEAD,
+ SEP,
+ MENU,
+ CMD,
+ EMU,
+ UI,
+ OSD,
+ };
+
+ struct option {
+ option_type type;
+ const char *description;
+ const char *name;
+ core_options::entry *entry;
+ core_options (*options);
+ std::vector<std::string> value;
+ };
+
+ ui_submenu(running_machine &machine, render_container *container, std::vector<ui_submenu::option> &suboptions);
+ virtual ~ui_submenu();
+ virtual void populate() override;
+ virtual void handle() override;
+ virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
+
+private:
+ std::vector<option> &m_options;
+};
+
+static std::vector<ui_submenu::option> misc_submenu_options = {
+ { ui_submenu::HEAD, __("Miscellaneous Options") },
+ { ui_submenu::UI, __("Re-select last machine played"), OPTION_REMEMBER_LAST },
+ { ui_submenu::UI, __("Enlarge images in the right panel"), OPTION_ENLARGE_SNAPS },
+ { ui_submenu::UI, __("DATs info"), OPTION_DATS_ENABLED },
+ { ui_submenu::EMU, __("Cheats"), OPTION_CHEAT },
+ { ui_submenu::EMU, __("Show mouse pointer"), OPTION_UI_MOUSE },
+ { ui_submenu::EMU, __("Confirm quit from machines"), OPTION_CONFIRM_QUIT },
+ { ui_submenu::EMU, __("Skip information screen at startup"), OPTION_SKIP_GAMEINFO },
+ { ui_submenu::UI, __("Force 4:3 aspect for snapshot display"), OPTION_FORCED4X3 },
+ { ui_submenu::UI, __("Use image as background"), OPTION_USE_BACKGROUND },
+ { ui_submenu::UI, __("Skip bios selection menu"), OPTION_SKIP_BIOS_MENU },
+ { ui_submenu::UI, __("Skip software parts selection menu"), OPTION_SKIP_PARTS_MENU },
+ { ui_submenu::UI, __("Info auto audit"), OPTION_INFO_AUTO_AUDIT },
+};
+
+static std::vector<ui_submenu::option> advanced_submenu_options = {
+ { ui_submenu::HEAD, __("Advanced Options") },
+ { ui_submenu::HEAD, __("Performance Options") },
+ { ui_submenu::EMU, __("Auto frame skip"), OPTION_AUTOFRAMESKIP },
+ { ui_submenu::EMU, __("Frame skip"), OPTION_FRAMESKIP },
+ { ui_submenu::EMU, __("Throttle"), OPTION_THROTTLE },
+ { ui_submenu::EMU, __("Sleep"), OPTION_SLEEP },
+ { ui_submenu::EMU, __("Speed"), OPTION_SPEED },
+ { ui_submenu::EMU, __("Refresh speed"), OPTION_REFRESHSPEED },
+
+ { ui_submenu::HEAD, __("Rotation Options") },
+ { ui_submenu::EMU, __("Rotate"), OPTION_ROTATE },
+ { ui_submenu::EMU, __("Rotate right"), OPTION_ROR },
+ { ui_submenu::EMU, __("Rotate left"), OPTION_ROL },
+ { ui_submenu::EMU, __("Auto rotate right"), OPTION_AUTOROR },
+ { ui_submenu::EMU, __("Auto rotate left"), OPTION_AUTOROL },
+ { ui_submenu::EMU, __("Flip X"), OPTION_FLIPX },
+ { ui_submenu::EMU, __("Flip Y"), OPTION_FLIPY },
+
+ { ui_submenu::HEAD, __("Artwork Options") },
+ { ui_submenu::EMU, __("Artwork Crop"), OPTION_ARTWORK_CROP },
+ { ui_submenu::EMU, __("Use Backdrops"), OPTION_USE_BACKDROPS },
+ { ui_submenu::EMU, __("Use Overlays"), OPTION_USE_OVERLAYS },
+ { ui_submenu::EMU, __("Use Bezels"), OPTION_USE_BEZELS },
+ { ui_submenu::EMU, __("Use Control Panels"), OPTION_USE_CPANELS },
+ { ui_submenu::EMU, __("Use Marquees"), OPTION_USE_MARQUEES },
+
+ { ui_submenu::HEAD, __("State/Playback Options") },
+ { ui_submenu::EMU, __("Automatic save/restore"), OPTION_AUTOSAVE },
+ { ui_submenu::EMU, __("Bilinear snapshot"), OPTION_SNAPBILINEAR },
+ { ui_submenu::EMU, __("Burn-in"), OPTION_BURNIN },
+
+ { ui_submenu::HEAD, __("Input Options") },
+ { ui_submenu::EMU, __("Coin lockout"), OPTION_COIN_LOCKOUT },
+ { ui_submenu::EMU, __("Mouse"), OPTION_MOUSE },
+ { ui_submenu::EMU, __("Joystick"), OPTION_JOYSTICK },
+ { ui_submenu::EMU, __("Lightgun"), OPTION_LIGHTGUN },
+ { ui_submenu::EMU, __("Multi-keyboard"), OPTION_MULTIKEYBOARD },
+ { ui_submenu::EMU, __("Multi-mouse"), OPTION_MULTIMOUSE },
+ { ui_submenu::EMU, __("Steadykey"), OPTION_STEADYKEY },
+ { ui_submenu::EMU, __("UI active"), OPTION_UI_ACTIVE },
+ { ui_submenu::EMU, __("Offscreen reload"), OPTION_OFFSCREEN_RELOAD },
+ { ui_submenu::EMU, __("Joystick deadzone"), OPTION_JOYSTICK_DEADZONE },
+ { ui_submenu::EMU, __("Joystick saturation"), OPTION_JOYSTICK_SATURATION },
+ { ui_submenu::EMU, __("Natural keyboard"), OPTION_NATURAL_KEYBOARD },
+ { ui_submenu::EMU, __("Simultaneous contradictory"), OPTION_JOYSTICK_CONTRADICTORY },
+ { ui_submenu::EMU, __("Coin impulse"), OPTION_COIN_IMPULSE },
+};
+
+static std::vector<ui_submenu::option> control_submenu_options = {
+ { ui_submenu::HEAD, __("Device Mapping") },
+ { ui_submenu::EMU, __("Lightgun Device Assignment"), OPTION_LIGHTGUN_DEVICE },
+ { ui_submenu::EMU, __("Trackball Device Assignment"), OPTION_TRACKBALL_DEVICE },
+ { ui_submenu::EMU, __("Pedal Device Assignment"), OPTION_PEDAL_DEVICE },
+ { ui_submenu::EMU, __("Adstick Device Assignment"), OPTION_ADSTICK_DEVICE },
+ { ui_submenu::EMU, __("Paddle Device Assignment"), OPTION_PADDLE_DEVICE },
+ { ui_submenu::EMU, __("Dial Device Assignment"), OPTION_DIAL_DEVICE },
+ { ui_submenu::EMU, __("Positional Device Assignment"), OPTION_POSITIONAL_DEVICE },
+ { ui_submenu::EMU, __("Mouse Device Assignment"), OPTION_MOUSE_DEVICE }
+};
+
+static std::vector<ui_submenu::option> video_submenu_options = {
+ { ui_submenu::HEAD, __("Display Options") },
+ { ui_submenu::OSD, __("Video Mode"), OSDOPTION_VIDEO },
+#if defined(UI_WINDOWS) && !defined(UI_SDL)
+ { ui_submenu::OSD, __("Triple Buffering"), WINOPTION_TRIPLEBUFFER },
+ { ui_submenu::OSD, __("HLSL"), WINOPTION_HLSL_ENABLE },
+#endif
+ { ui_submenu::OSD, __("GLSL"), OSDOPTION_GL_GLSL },
+ { ui_submenu::OSD, __("Bilinear Filtering"), OSDOPTION_FILTER },
+ { ui_submenu::OSD, __("Bitmap Prescaling"), OSDOPTION_PRESCALE },
+ { ui_submenu::OSD, __("Window Mode"), OSDOPTION_WINDOW },
+ { ui_submenu::EMU, __("Enforce Aspect Ratio"), OPTION_KEEPASPECT },
+ { ui_submenu::OSD, __("Start Out Maximized"), OSDOPTION_MAXIMIZE },
+ { ui_submenu::OSD, __("Synchronized Refresh"), OSDOPTION_SYNCREFRESH },
+ { ui_submenu::OSD, __("Wait Vertical Sync"), OSDOPTION_WAITVSYNC }
+};
+
+//static std::vector<ui_submenu::option> export_submenu_options = {
+// { ui_submenu::COMMAND, __("Export XML format (like -listxml)"), "exportxml" },
+// { ui_submenu::COMMAND, __("Export TXT format (like -listfull)"), "exporttxt" },
+//};
+
+#endif /* __UI_SUBMENU_H__ */
diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp
index 7b05eb8ae4e..9e6a0579a3e 100644
--- a/src/emu/ui/ui.cpp
+++ b/src/emu/ui/ui.cpp
@@ -13,6 +13,7 @@
#include "video/vector.h"
#include "machine/laserdsc.h"
#include "render.h"
+#include "luaengine.h"
#include "cheat.h"
#include "rendfont.h"
#include "uiinput.h"
@@ -117,7 +118,7 @@ std::string ui_manager::messagebox_poptext;
rgb_t ui_manager::messagebox_backcolor;
// slider info
-slider_state *ui_manager::slider_list;
+std::vector<ui_menu_item> ui_manager::slider_list;
slider_state *ui_manager::slider_current;
@@ -127,31 +128,30 @@ slider_state *ui_manager::slider_current;
// slider controls
static slider_state *slider_alloc(running_machine &machine, const char *title, INT32 minval, INT32 defval, INT32 maxval, INT32 incval, slider_update update, void *arg);
-static slider_state *slider_init(running_machine &machine);
-static INT32 slider_volume(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_mixervol(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_adjuster(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_overclock(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_refresh(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_brightness(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_contrast(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_gamma(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_xscale(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_yscale(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_xoffset(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_yoffset(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_overxscale(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_overyscale(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_overxoffset(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_overyoffset(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_flicker(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_beam_width_min(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_beam_width_max(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_beam_intensity_weight(running_machine &machine, void *arg, std::string *str, INT32 newval);
+static INT32 slider_volume(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_mixervol(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_adjuster(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_overclock(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_refresh(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_brightness(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_contrast(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_gamma(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_xscale(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_yscale(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_xoffset(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_yoffset(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_overxscale(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_overyscale(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_overxoffset(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_overyoffset(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_flicker(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_beam_width_min(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_beam_width_max(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_beam_intensity_weight(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
static std::string slider_get_screen_desc(screen_device &screen);
#ifdef MAME_DEBUG
-static INT32 slider_crossscale(running_machine &machine, void *arg, std::string *str, INT32 newval);
-static INT32 slider_crossoffset(running_machine &machine, void *arg, std::string *str, INT32 newval);
+static INT32 slider_crossscale(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
+static INT32 slider_crossoffset(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
#endif
@@ -337,7 +337,15 @@ void ui_manager::exit()
void ui_manager::initialize(running_machine &machine)
{
// initialize the on-screen display system
- slider_list = slider_current = slider_init(machine);
+ slider_list = slider_init(machine);
+ if (slider_list.size() > 0)
+ {
+ slider_current = reinterpret_cast<slider_state *>(slider_list[0].ref);
+ }
+ else
+ {
+ slider_current = nullptr;
+ }
}
@@ -481,7 +489,10 @@ void ui_manager::update_and_render(render_container *container)
// render any cheat stuff at the bottom
if (machine().phase() >= MACHINE_PHASE_RESET)
+ {
+ machine().manager().lua()->on_frame_done();
machine().cheat().render_text(*container);
+ }
// call the current UI handler
assert(m_handler_callback != nullptr);
@@ -591,9 +602,9 @@ float ui_manager::get_char_width(unicode_char ch)
// character string
//-------------------------------------------------
-float ui_manager::get_string_width(const char *s)
+float ui_manager::get_string_width(const char *s, float text_size)
{
- return get_font()->utf8string_width(get_line_height(), machine().render().ui_aspect(), s);
+ return get_font()->utf8string_width(get_line_height() * text_size, machine().render().ui_aspect(), s);
}
@@ -1633,17 +1644,9 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
// toggle pause
if (machine.ui_input().pressed(IPT_UI_PAUSE))
- {
- // with a shift key, it is single step
-// if (is_paused && (machine.input().code_pressed(KEYCODE_LSHIFT) || machine.input().code_pressed(KEYCODE_RSHIFT)))
-// {
-// machine.ui().set_single_step(true);
-// machine.resume();
-// }
-// else
- machine.toggle_pause();
- }
+ machine.toggle_pause();
+ // pause single step
if (machine.ui_input().pressed(IPT_UI_PAUSE_SINGLE))
{
machine.ui().set_single_step(true);
@@ -1870,7 +1873,7 @@ UINT32 ui_manager::handler_confirm_quit(running_machine &machine, render_contain
// ui_get_slider_list - get the list of sliders
//-------------------------------------------------
-const slider_state *ui_manager::get_slider_list(void)
+std::vector<ui_menu_item>& ui_manager::get_slider_list(void)
{
return slider_list;
}
@@ -1898,43 +1901,40 @@ static slider_state *slider_alloc(running_machine &machine, const char *title, I
}
-//-------------------------------------------------
-// slider_init - initialize the list of slider
+//----------------------------------------------------------
+// ui_manager::slider_init - initialize the list of slider
// controls
-//-------------------------------------------------
+//----------------------------------------------------------
-static slider_state *slider_init(running_machine &machine)
+std::vector<ui_menu_item> ui_manager::slider_init(running_machine &machine)
{
- slider_state *listhead = nullptr;
- slider_state **tailptr = &listhead;
- std::string str;
- int item;
+ std::vector<slider_state *> sliders;
// add overall volume
- *tailptr = slider_alloc(machine, _("Master Volume"), -32, 0, 0, 1, slider_volume, nullptr);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, _("Master Volume"), -32, 0, 0, 1, slider_volume, nullptr));
// add per-channel volume
mixer_input info;
- for (item = 0; machine.sound().indexed_mixer_input(item, info); item++)
+ for (int item = 0; machine.sound().indexed_mixer_input(item, info); item++)
{
INT32 maxval = 2000;
INT32 defval = 1000;
- str = string_format(_("%1$s Volume"), info.stream->input_name(info.inputnum));
- *tailptr = slider_alloc(machine, str.c_str(), 0, defval, maxval, 20, slider_mixervol, (void *)(FPTR)item);
- tailptr = &(*tailptr)->next;
+ std::string str = string_format(_("%1$s Volume"), info.stream->input_name(info.inputnum));
+ sliders.push_back(slider_alloc(machine, str.c_str(), 0, defval, maxval, 20, slider_mixervol, (void *)(FPTR)item));
}
// add analog adjusters
for (ioport_port &port : machine.ioport().ports())
+ {
for (ioport_field &field : port.fields())
+ {
if (field.type() == IPT_ADJUSTER)
{
- void *param = (void *)&field;
- *tailptr = slider_alloc(machine, field.name(), field.minval(), field.defvalue(), field.maxval(), 1, slider_adjuster, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, field.name(), field.minval(), field.defvalue(), field.maxval(), 1, slider_adjuster, (void *)&field));
}
+ }
+ }
// add CPU overclocking (cheat only)
if (machine.options().cheat())
@@ -1943,9 +1943,8 @@ static slider_state *slider_init(running_machine &machine)
for (device_execute_interface *exec = iter.first(); exec != nullptr; exec = iter.next())
{
void *param = (void *)&exec->device();
- str = string_format(_("Overclock CPU %1$s"), exec->device().tag());
- *tailptr = slider_alloc(machine, str.c_str(), 10, 1000, 2000, 1, slider_overclock, param);
- tailptr = &(*tailptr)->next;
+ std::string str = string_format(_("Overclock CPU %1$s"), exec->device().tag());
+ sliders.push_back(slider_alloc(machine, str.c_str(), 10, 1000, 2000, 1, slider_overclock, param));
}
}
@@ -1963,39 +1962,32 @@ static slider_state *slider_init(running_machine &machine)
// add refresh rate tweaker
if (machine.options().cheat())
{
- str = string_format(_("%1$s Refresh Rate"), screen_desc);
- *tailptr = slider_alloc(machine, str.c_str(), -10000, 0, 10000, 1000, slider_refresh, param);
- tailptr = &(*tailptr)->next;
+ std::string str = string_format(_("%1$s Refresh Rate"), screen_desc);
+ sliders.push_back(slider_alloc(machine, str.c_str(), -10000, 0, 10000, 1000, slider_refresh, param));
}
// add standard brightness/contrast/gamma controls per-screen
- str = string_format(_("%1$s Brightness"), screen_desc);
- *tailptr = slider_alloc(machine, str.c_str(), 100, 1000, 2000, 10, slider_brightness, param);
- tailptr = &(*tailptr)->next;
+ std::string str = string_format(_("%1$s Brightness"), screen_desc);
+ sliders.push_back(slider_alloc(machine, str.c_str(), 100, 1000, 2000, 10, slider_brightness, param));
str = string_format(_("%1$s Contrast"), screen_desc);
- *tailptr = slider_alloc(machine, str.c_str(), 100, 1000, 2000, 50, slider_contrast, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, str.c_str(), 100, 1000, 2000, 50, slider_contrast, param));
str = string_format(_("%1$s Gamma"), screen_desc);
- *tailptr = slider_alloc(machine, str.c_str(), 100, 1000, 3000, 50, slider_gamma, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, str.c_str(), 100, 1000, 3000, 50, slider_gamma, param));
// add scale and offset controls per-screen
str = string_format(_("%1$s Horiz Stretch"), screen_desc);
- *tailptr = slider_alloc(machine, str.c_str(), 500, defxscale, 1500, 2, slider_xscale, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, str.c_str(), 500, defxscale, 1500, 2, slider_xscale, param));
str = string_format(_("%1$s Horiz Position"), screen_desc);
- *tailptr = slider_alloc(machine, str.c_str(), -500, defxoffset, 500, 2, slider_xoffset, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, str.c_str(), -500, defxoffset, 500, 2, slider_xoffset, param));
str = string_format(_("%1$s Vert Stretch"), screen_desc);
- *tailptr = slider_alloc(machine, str.c_str(), 500, defyscale, 1500, 2, slider_yscale, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, str.c_str(), 500, defyscale, 1500, 2, slider_yscale, param));
str = string_format(_("%1$s Vert Position"), screen_desc);
- *tailptr = slider_alloc(machine, str.c_str(), -500, defyoffset, 500, 2, slider_yoffset, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, str.c_str(), -500, defyoffset, 500, 2, slider_yoffset, param));
}
laserdisc_device_iterator lditer(machine.root_device());
for (laserdisc_device *laserdisc = lditer.first(); laserdisc != nullptr; laserdisc = lditer.next())
+ {
if (laserdisc->overlay_configured())
{
laserdisc_overlay_config config;
@@ -2007,52 +1999,60 @@ static slider_state *slider_init(running_machine &machine)
void *param = (void *)laserdisc;
// add scale and offset controls per-overlay
- str = string_format(_("Laserdisc '%1$s' Horiz Stretch"), laserdisc->tag());
- *tailptr = slider_alloc(machine, str.c_str(), 500, (defxscale == 0) ? 1000 : defxscale, 1500, 2, slider_overxscale, param);
- tailptr = &(*tailptr)->next;
+ std::string str = string_format(_("Laserdisc '%1$s' Horiz Stretch"), laserdisc->tag());
+ sliders.push_back(slider_alloc(machine, str.c_str(), 500, (defxscale == 0) ? 1000 : defxscale, 1500, 2, slider_overxscale, param));
str = string_format(_("Laserdisc '%1$s' Horiz Position"), laserdisc->tag());
- *tailptr = slider_alloc(machine, str.c_str(), -500, defxoffset, 500, 2, slider_overxoffset, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, str.c_str(), -500, defxoffset, 500, 2, slider_overxoffset, param));
str = string_format(_("Laserdisc '%1$s' Vert Stretch"), laserdisc->tag());
- *tailptr = slider_alloc(machine, str.c_str(), 500, (defyscale == 0) ? 1000 : defyscale, 1500, 2, slider_overyscale, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, str.c_str(), 500, (defyscale == 0) ? 1000 : defyscale, 1500, 2, slider_overyscale, param));
str = string_format(_("Laserdisc '%1$s' Vert Position"), laserdisc->tag());
- *tailptr = slider_alloc(machine, str.c_str(), -500, defyoffset, 500, 2, slider_overyoffset, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, str.c_str(), -500, defyoffset, 500, 2, slider_overyoffset, param));
}
+ }
for (screen_device *screen = scriter.first(); screen != nullptr; screen = scriter.next())
+ {
if (screen->screen_type() == SCREEN_TYPE_VECTOR)
{
// add vector control
- *tailptr = slider_alloc(machine, _("Vector Flicker"), 0, 0, 1000, 10, slider_flicker, nullptr);
- tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(machine, _("Beam Width Minimum"), 1, 100, 1000, 1, slider_beam_width_min, nullptr);
- tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(machine, _("Beam Width Maximum"), 1, 100, 1000, 1, slider_beam_width_max, nullptr);
- tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(machine, _("Beam Intensity Weight"), -1000, 0, 1000, 10, slider_beam_intensity_weight, nullptr);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, _("Vector Flicker"), 0, 0, 1000, 10, slider_flicker, nullptr));
+ sliders.push_back(slider_alloc(machine, _("Beam Width Minimum"), 1, 100, 1000, 1, slider_beam_width_min, nullptr));
+ sliders.push_back(slider_alloc(machine, _("Beam Width Maximum"), 1, 100, 1000, 1, slider_beam_width_max, nullptr));
+ sliders.push_back(slider_alloc(machine, _("Beam Intensity Weight"), -1000, 0, 1000, 10, slider_beam_intensity_weight, nullptr));
break;
}
+ }
#ifdef MAME_DEBUG
// add crosshair adjusters
for (ioport_port &port : machine.ioport().ports())
+ {
for (ioport_field &field : port.fields())
+ {
if (field.crosshair_axis() != CROSSHAIR_AXIS_NONE && field.player() == 0)
{
- void *param = (void *)&field;
- str = string_format(_("Crosshair Scale %1$s"), (field.crosshair_axis() == CROSSHAIR_AXIS_X) ? _("X") : _("Y"));
- *tailptr = slider_alloc(machine, str.c_str(), -3000, 1000, 3000, 100, slider_crossscale, param);
- tailptr = &(*tailptr)->next;
+ std::string str = string_format(_("Crosshair Scale %1$s"), (field.crosshair_axis() == CROSSHAIR_AXIS_X) ? _("X") : _("Y"));
+ sliders.push_back(slider_alloc(machine, str.c_str(), -3000, 1000, 3000, 100, slider_crossscale, (void *)&field));
str = string_format(_("Crosshair Offset %1$s"), (field.crosshair_axis() == CROSSHAIR_AXIS_X) ? _("X") : _("Y"));
- *tailptr = slider_alloc(machine, str.c_str(), -3000, 0, 3000, 100, slider_crossoffset, param);
- tailptr = &(*tailptr)->next;
+ sliders.push_back(slider_alloc(machine, str.c_str(), -3000, 0, 3000, 100, slider_crossoffset, (void *)&field));
}
+ }
+ }
#endif
- return listhead;
+ std::vector<ui_menu_item> items;
+ for (slider_state *slider : sliders)
+ {
+ ui_menu_item item;
+ item.text = slider->description;
+ item.subtext = "";
+ item.flags = 0;
+ item.ref = slider;
+ item.type = ui_menu_item_type::UI_MENU_ITEM_TYPE_SLIDER;
+ items.push_back(item);
+ }
+
+ return items;
}
@@ -2060,7 +2060,7 @@ static slider_state *slider_init(running_machine &machine)
// slider_volume - global volume slider callback
//-------------------------------------------------
-static INT32 slider_volume(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_volume(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
if (newval != SLIDER_NOCHANGE)
machine.sound().set_attenuation(newval);
@@ -2075,7 +2075,7 @@ static INT32 slider_volume(running_machine &machine, void *arg, std::string *str
// slider callback
//-------------------------------------------------
-static INT32 slider_mixervol(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_mixervol(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
mixer_input info;
if (!machine.sound().indexed_mixer_input((FPTR)arg, info))
@@ -2097,7 +2097,7 @@ static INT32 slider_mixervol(running_machine &machine, void *arg, std::string *s
// callback
//-------------------------------------------------
-static INT32 slider_adjuster(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_adjuster(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
ioport_field *field = (ioport_field *)arg;
ioport_field::user_settings settings;
@@ -2119,7 +2119,7 @@ static INT32 slider_adjuster(running_machine &machine, void *arg, std::string *s
// callback
//-------------------------------------------------
-static INT32 slider_overclock(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_overclock(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
device_t *cpu = (device_t *)arg;
if (newval != SLIDER_NOCHANGE)
@@ -2134,7 +2134,7 @@ static INT32 slider_overclock(running_machine &machine, void *arg, std::string *
// slider_refresh - refresh rate slider callback
//-------------------------------------------------
-static INT32 slider_refresh(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_refresh(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
double defrefresh = ATTOSECONDS_TO_HZ(screen->refresh_attoseconds());
@@ -2159,7 +2159,7 @@ static INT32 slider_refresh(running_machine &machine, void *arg, std::string *st
// callback
//-------------------------------------------------
-static INT32 slider_brightness(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_brightness(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
render_container::user_settings settings;
@@ -2181,7 +2181,7 @@ static INT32 slider_brightness(running_machine &machine, void *arg, std::string
// callback
//-------------------------------------------------
-static INT32 slider_contrast(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_contrast(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
render_container::user_settings settings;
@@ -2202,7 +2202,7 @@ static INT32 slider_contrast(running_machine &machine, void *arg, std::string *s
// slider_gamma - screen gamma slider callback
//-------------------------------------------------
-static INT32 slider_gamma(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_gamma(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
render_container::user_settings settings;
@@ -2224,7 +2224,7 @@ static INT32 slider_gamma(running_machine &machine, void *arg, std::string *str,
// callback
//-------------------------------------------------
-static INT32 slider_xscale(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_xscale(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
render_container::user_settings settings;
@@ -2246,7 +2246,7 @@ static INT32 slider_xscale(running_machine &machine, void *arg, std::string *str
// callback
//-------------------------------------------------
-static INT32 slider_yscale(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_yscale(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
render_container::user_settings settings;
@@ -2268,7 +2268,7 @@ static INT32 slider_yscale(running_machine &machine, void *arg, std::string *str
// slider callback
//-------------------------------------------------
-static INT32 slider_xoffset(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_xoffset(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
render_container::user_settings settings;
@@ -2290,7 +2290,7 @@ static INT32 slider_xoffset(running_machine &machine, void *arg, std::string *st
// slider callback
//-------------------------------------------------
-static INT32 slider_yoffset(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_yoffset(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
render_container::user_settings settings;
@@ -2312,7 +2312,7 @@ static INT32 slider_yoffset(running_machine &machine, void *arg, std::string *st
// callback
//-------------------------------------------------
-static INT32 slider_overxscale(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_overxscale(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
laserdisc_device *laserdisc = (laserdisc_device *)arg;
laserdisc_overlay_config settings;
@@ -2334,7 +2334,7 @@ static INT32 slider_overxscale(running_machine &machine, void *arg, std::string
// callback
//-------------------------------------------------
-static INT32 slider_overyscale(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_overyscale(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
laserdisc_device *laserdisc = (laserdisc_device *)arg;
laserdisc_overlay_config settings;
@@ -2356,7 +2356,7 @@ static INT32 slider_overyscale(running_machine &machine, void *arg, std::string
// slider callback
//-------------------------------------------------
-static INT32 slider_overxoffset(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_overxoffset(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
laserdisc_device *laserdisc = (laserdisc_device *)arg;
laserdisc_overlay_config settings;
@@ -2378,7 +2378,7 @@ static INT32 slider_overxoffset(running_machine &machine, void *arg, std::string
// slider callback
//-------------------------------------------------
-static INT32 slider_overyoffset(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_overyoffset(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
laserdisc_device *laserdisc = (laserdisc_device *)arg;
laserdisc_overlay_config settings;
@@ -2400,7 +2400,7 @@ static INT32 slider_overyoffset(running_machine &machine, void *arg, std::string
// callback
//-------------------------------------------------
-static INT32 slider_flicker(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_flicker(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
vector_device *vector = nullptr;
if (newval != SLIDER_NOCHANGE)
@@ -2416,7 +2416,7 @@ static INT32 slider_flicker(running_machine &machine, void *arg, std::string *st
// callback
//-------------------------------------------------
-static INT32 slider_beam_width_min(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_beam_width_min(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
vector_device *vector = nullptr;
if (newval != SLIDER_NOCHANGE)
@@ -2432,7 +2432,7 @@ static INT32 slider_beam_width_min(running_machine &machine, void *arg, std::str
// callback
//-------------------------------------------------
-static INT32 slider_beam_width_max(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_beam_width_max(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
vector_device *vector = nullptr;
if (newval != SLIDER_NOCHANGE)
@@ -2448,7 +2448,7 @@ static INT32 slider_beam_width_max(running_machine &machine, void *arg, std::str
// callback
//-------------------------------------------------
-static INT32 slider_beam_intensity_weight(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_beam_intensity_weight(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
vector_device *vector = nullptr;
if (newval != SLIDER_NOCHANGE)
@@ -2481,7 +2481,7 @@ static std::string slider_get_screen_desc(screen_device &screen)
//-------------------------------------------------
#ifdef MAME_DEBUG
-static INT32 slider_crossscale(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_crossscale(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
ioport_field *field = (ioport_field *)arg;
@@ -2500,7 +2500,7 @@ static INT32 slider_crossscale(running_machine &machine, void *arg, std::string
//-------------------------------------------------
#ifdef MAME_DEBUG
-static INT32 slider_crossoffset(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_crossoffset(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
ioport_field *field = (ioport_field *)arg;
@@ -2685,16 +2685,6 @@ void ui_manager::draw_textured_box(render_container *container, float x0, float
}
//-------------------------------------------------
-// get_string_width_ex - return the width of a
-// character string with given text size
-//-------------------------------------------------
-
-float ui_manager::get_string_width_ex(const char *s, float text_size)
-{
- return get_font()->utf8string_width(get_line_height() * text_size, machine().render().ui_aspect(), s);
-}
-
-//-------------------------------------------------
// decode UI color options
//-------------------------------------------------
diff --git a/src/emu/ui/ui.h b/src/emu/ui/ui.h
index 8639c1fba27..ad6c3d11ae1 100644
--- a/src/emu/ui/ui.h
+++ b/src/emu/ui/ui.h
@@ -13,9 +13,13 @@
#ifndef __USRINTRF_H__
#define __USRINTRF_H__
+#include <vector>
+
#include "render.h"
#include "moptions.h"
+class ui_menu_item;
+
/***************************************************************************
CONSTANTS
***************************************************************************/
@@ -92,7 +96,7 @@ enum
typedef UINT32 (*ui_callback)(running_machine &, render_container *, UINT32);
-typedef INT32(*slider_update)(running_machine &machine, void *arg, std::string *str, INT32 newval);
+typedef INT32(*slider_update)(running_machine &machine, void *arg, int id, std::string *str, INT32 newval);
struct slider_state
{
@@ -128,6 +132,7 @@ public:
// methods
void initialize(running_machine &machine);
+ std::vector<ui_menu_item> slider_init(running_machine &machine);
UINT32 set_handler(ui_callback callback, UINT32 param);
void display_startup_screens(bool first_time);
void set_startup_text(const char *text, bool force);
@@ -135,7 +140,7 @@ public:
render_font *get_font();
float get_line_height();
float get_char_width(unicode_char ch);
- float get_string_width(const char *s);
+ float get_string_width(const char *s, float text_size = 1.0f);
void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor);
void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor);
void draw_text(render_container *container, const char *buf, float x, float y);
@@ -166,7 +171,7 @@ public:
std::string &game_info_astring(std::string &str);
// slider controls
- const slider_state *get_slider_list(void);
+ std::vector<ui_menu_item>& get_slider_list(void);
// other
void process_natural_keyboard();
@@ -181,9 +186,6 @@ public:
// draw an outlined box with given line color and filled with a texture
void draw_textured_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor, rgb_t linecolor, render_texture *texture = nullptr, UINT32 flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- // return text string width with given text size
- float get_string_width_ex(const char *s, float text_size);
-
private:
// instance variables
running_machine & m_machine;
@@ -209,7 +211,7 @@ private:
static std::string messagebox_poptext;
static rgb_t messagebox_backcolor;
- static slider_state *slider_list;
+ static std::vector<ui_menu_item> slider_list;
static slider_state *slider_current;
// text generators
diff --git a/src/emu/ui/utils.cpp b/src/emu/ui/utils.cpp
index 1e998d04c9d..6a59208cd30 100644
--- a/src/emu/ui/utils.cpp
+++ b/src/emu/ui/utils.cpp
@@ -84,6 +84,15 @@ const char* strensure(const char* s)
return s == nullptr ? "" : s;
}
+int getprecisionchr(const char* s)
+{
+ int precision = 1;
+ char *dp = const_cast<char *>(strchr(s, '.'));
+ if (dp != nullptr)
+ precision = strlen(s) - (dp - s) - 1;
+ return precision;
+}
+
//-------------------------------------------------
// search a substring with even partial matching
//-------------------------------------------------
diff --git a/src/emu/ui/utils.h b/src/emu/ui/utils.h
index 81107c0911c..519f74e667b 100644
--- a/src/emu/ui/utils.h
+++ b/src/emu/ui/utils.h
@@ -254,5 +254,6 @@ char* chartrimcarriage(char str[]);
const char* strensure(const char* s);
+int getprecisionchr(const char* s);
#endif /* __UI_UTILS_H__ */
diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile
index 19742fc9b31..684b2687ba1 100644
--- a/src/lib/netlist/build/makefile
+++ b/src/lib/netlist/build/makefile
@@ -18,10 +18,10 @@ SRC = ..
CDEFS = -DPSTANDALONE=1 -DPTR64=1
#-Werror
-CFLAGS = $(LTO) -g -O3 -std=c++98 -Doverride="" -march=native -msse4.2 -Wall -Wpedantic -Wsign-compare -Wextra -Wno-long-long -Wno-unused-parameter -Wno-unused-result -Wno-variadic-macros -I..
-LDFLAGS = $(LTO) -g -O3 -std=c++98
-#CFLAGS = $(LTO) -g -O3 -std=c++11 -Wall -Wpedantic -Wsign-compare -Wextra -Isrc
-#LDFLAGS = $(LTO) -g -O3 -std=c++11
+#CFLAGS = $(LTO) -g -O3 -std=c++98 -Doverride="" -march=native -msse4.2 -Wall -Wpedantic -Wsign-compare -Wextra -Wno-long-long -Wno-unused-parameter -Wno-unused-result -Wno-variadic-macros -I..
+#LDFLAGS = $(LTO) -g -O3 -std=c++98
+CFLAGS = $(LTO) -g -O3 -std=c++11 -march=native -I.. -Wall -Wpedantic -Wsign-compare -Wextra -Wno-unused-parameter
+LDFLAGS = $(LTO) -g -O3 -std=c++11 -lpthread
CC = @g++-5
LD = @g++-5
@@ -66,7 +66,6 @@ NLOBJS := \
$(NLOBJ)/analog/nld_opamps.o \
$(NLOBJ)/devices/nld_4020.o \
$(NLOBJ)/devices/nld_4066.o \
- $(NLOBJ)/devices/nld_7400.o \
$(NLOBJ)/devices/nld_7402.o \
$(NLOBJ)/devices/nld_7404.o \
$(NLOBJ)/devices/nld_7408.o \
diff --git a/src/lib/netlist/devices/nld_system.h b/src/lib/netlist/devices/nld_system.h
index 8ea3640ec14..7b9cb7298e5 100644
--- a/src/lib/netlist/devices/nld_system.h
+++ b/src/lib/netlist/devices/nld_system.h
@@ -479,10 +479,10 @@ public:
const pstring &def_param)
: base_factory_t(name, classname, def_param), m_setup(setup) { }
- class dummy : public device_t
+ class wrapper : public device_t
{
public:
- dummy(const pstring &dev_name) : device_t(), m_dev_name(dev_name) { }
+ wrapper(const pstring &dev_name) : device_t(), m_dev_name(dev_name) { }
protected:
virtual void init(netlist_t &anetlist, const pstring &aname) override
{
@@ -499,7 +499,7 @@ public:
ATTR_COLD device_t *Create() override
{
- device_t *r = palloc(dummy(this->name()));
+ device_t *r = palloc(wrapper(this->name()));
return r;
}
diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp
index ed74a8e305c..96038049473 100644
--- a/src/lib/netlist/macro/nlm_ttl74xx.cpp
+++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp
@@ -30,7 +30,7 @@ NETLIST_START(TTL_7416_DIP)
s3.A, /* A3 |5 10| Y5 */ s5.Q,
s3.Q, /* Y3 |6 9| A4 */ s4.A,
GND.I, /* GND |7 8| Y4 */ s4.Q
- /* +--------------+ */
+ /* +--------------+ */
)
NETLIST_END()
@@ -69,7 +69,7 @@ NETLIST_START(TTL_7400_DIP)
s2.B, /* B2 |5 10| B3 */ s3.B,
s2.Q, /* Y2 |6 9| A3 */ s3.A,
GND.I, /* GND |7 8| Y3 */ s3.Q
- /* +--------------+ */
+ /* +--------------+ */
)
NETLIST_END()
diff --git a/src/lib/netlist/macro/nlm_ttl74xx.h b/src/lib/netlist/macro/nlm_ttl74xx.h
index cd502aa4782..763ee5620ca 100644
--- a/src/lib/netlist/macro/nlm_ttl74xx.h
+++ b/src/lib/netlist/macro/nlm_ttl74xx.h
@@ -14,8 +14,8 @@
#define TTL_7400_GATE(_name) \
NET_REGISTER_DEV(TTL_7400_GATE, _name)
#define TTL_7400_NAND(_name, _A, _B) \
- NET_REGISTER_DEV(TTL_7400_NAND, _name) \
- NET_CONNECT(_name, A, _A) \
+ NET_REGISTER_DEV(TTL_7400_NAND, _name) \
+ NET_CONNECT(_name, A, _A) \
NET_CONNECT(_name, B, _B)
#define TTL_7400_DIP(_name) \
diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp
index 7afa0285ef8..eb83749c79b 100644
--- a/src/lib/netlist/nl_base.cpp
+++ b/src/lib/netlist/nl_base.cpp
@@ -74,13 +74,12 @@ logic_family_desc_t *family_CD4XXX = palloc(logic_family_cd4xxx_t);
queue_t::queue_t(netlist_t &nl)
: timed_queue<net_t *, netlist_time>(512)
- , object_t(QUEUE, GENERIC)
+ , object_t(nl, "QUEUE", QUEUE, GENERIC)
, pstate_callback_t()
, m_qsize(0)
, m_times(512)
, m_names(512)
{
- this->init_object(nl, "QUEUE");
}
void queue_t::register_state(pstate_manager_t &manager, const pstring &module)
@@ -128,13 +127,33 @@ void queue_t::on_post_load()
ATTR_COLD object_t::object_t(const type_t atype, const family_t afamily)
: m_objtype(atype)
, m_family(afamily)
-, m_netlist(NULL)
+, m_netlist(nullptr)
{}
+ATTR_COLD object_t::object_t(netlist_t &nl, const type_t atype, const family_t afamily)
+: m_objtype(atype)
+, m_family(afamily)
+, m_netlist(&nl)
+{}
+
+ATTR_COLD object_t::object_t(netlist_t &nl, const pstring &aname, const type_t atype, const family_t afamily)
+: m_name(aname)
+, m_objtype(atype)
+, m_family(afamily)
+, m_netlist(&nl)
+{
+}
+
ATTR_COLD object_t::~object_t()
{
}
+ATTR_COLD void object_t::init_object(const pstring &aname)
+{
+ m_name = aname;
+ save_register();
+}
+
ATTR_COLD void object_t::init_object(netlist_t &nl, const pstring &aname)
{
m_netlist = &nl;
@@ -171,8 +190,8 @@ ATTR_COLD void device_object_t::init_object(core_device_t &dev,
// netlist_t
// ----------------------------------------------------------------------------------------
-netlist_t::netlist_t()
- : object_t(NETLIST, GENERIC), pstate_manager_t(),
+netlist_t::netlist_t(const pstring &aname)
+ : pstate_manager_t(),
m_stop(netlist_time::zero),
m_time(netlist_time::zero),
m_use_deactivate(0),
@@ -181,9 +200,12 @@ netlist_t::netlist_t()
m_solver(NULL),
m_gnd(NULL),
m_params(NULL),
+ m_name(aname),
m_setup(NULL),
m_log(this)
{
+ save_item(static_cast<pstate_callback_t &>(m_queue), this, "m_queue");
+ save_item(m_time, this, "m_time");
}
netlist_t::~netlist_t()
@@ -202,13 +224,6 @@ netlist_t::~netlist_t()
pstring::resetmem();
}
-ATTR_COLD void netlist_t::save_register()
-{
- save(static_cast<pstate_callback_t &>(m_queue), "m_queue");
- save(NLNAME(m_time));
- object_t::save_register();
-}
-
ATTR_HOT nl_double netlist_t::gmin() const
{
return solver()->gmin();
@@ -925,6 +940,19 @@ ATTR_COLD analog_output_t::analog_output_t()
net().m_cur_Analog = NL_FCONST(0.99);
}
+ATTR_COLD analog_output_t::analog_output_t(core_device_t &dev, const pstring &aname)
+ : analog_t(OUTPUT), m_proxied_net(NULL)
+{
+ this->set_net(m_my_net);
+ set_state(STATE_OUT);
+
+ net().m_cur_Analog = NL_FCONST(0.99);
+
+ analog_t::init_object(dev, aname);
+ net().init_object(dev.netlist(), aname + ".net");
+ net().register_railterminal(*this);
+}
+
ATTR_COLD void analog_output_t::init_object(core_device_t &dev, const pstring &aname)
{
analog_t::init_object(dev, aname);
diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h
index 52a91704607..3b6eb7b75e1 100644
--- a/src/lib/netlist/nl_base.h
+++ b/src/lib/netlist/nl_base.h
@@ -367,7 +367,7 @@ namespace netlist
// object_t
// -----------------------------------------------------------------------------
- class object_t
+ class object_t : public pstate_interface_t<object_t>
{
P_PREVENT_COPYING(object_t)
public:
@@ -378,8 +378,7 @@ namespace netlist
PARAM = 3,
NET = 4,
DEVICE = 5,
- NETLIST = 6,
- QUEUE = 7
+ QUEUE = 6
};
enum family_t {
// Terminal families
@@ -405,15 +404,18 @@ namespace netlist
};
ATTR_COLD object_t(const type_t atype, const family_t afamily);
+ ATTR_COLD object_t(netlist_t &nl, const type_t atype, const family_t afamily);
+ ATTR_COLD object_t(netlist_t &nl, const pstring &aname, const type_t atype, const family_t afamily);
virtual ~object_t();
+ ATTR_COLD void init_object(const pstring &aname);
ATTR_COLD void init_object(netlist_t &nl, const pstring &aname);
ATTR_COLD bool isInitialized() { return (m_netlist != NULL); }
ATTR_COLD const pstring &name() const;
- PSTATE_INTERFACE_DECL()
+ ATTR_COLD inline pstate_manager_t *state_manager();
ATTR_HOT type_t type() const { return m_objtype; }
ATTR_HOT family_t family() const { return m_family; }
@@ -904,6 +906,7 @@ namespace netlist
P_PREVENT_COPYING(analog_output_t)
public:
+ ATTR_COLD analog_output_t(core_device_t &dev, const pstring &aname);
ATTR_COLD analog_output_t();
ATTR_COLD void init_object(core_device_t &dev, const pstring &aname);
@@ -1183,14 +1186,16 @@ namespace netlist
// -----------------------------------------------------------------------------
- class netlist_t : public object_t, public pstate_manager_t, public plog_dispatch_intf
+ class netlist_t : public pstate_manager_t, public plog_dispatch_intf
{
P_PREVENT_COPYING(netlist_t)
public:
- netlist_t();
+ netlist_t(const pstring &aname);
virtual ~netlist_t();
+ pstring name() const { return m_name; }
+
ATTR_COLD void start();
ATTR_COLD void stop();
@@ -1265,14 +1270,12 @@ namespace netlist
pnamedlist_t<core_device_t *> m_started_devices;
#endif
- ATTR_COLD plog_base<NL_DEBUG> &log() { return m_log; }
- ATTR_COLD const plog_base<NL_DEBUG> &log() const { return m_log; }
+ ATTR_COLD plog_base<NL_DEBUG> &log() { return m_log; }
+ ATTR_COLD const plog_base<NL_DEBUG> &log() const { return m_log; }
- protected:
+ virtual void reset();
- /* from object */
- virtual void reset() override;
- virtual void save_register() override;
+ protected:
#if (NL_KEEP_STATISTICS)
// performance
@@ -1288,13 +1291,13 @@ namespace netlist
bool m_use_deactivate;
queue_t m_queue;
-
devices::NETLIB_NAME(mainclock) * m_mainclock;
devices::NETLIB_NAME(solver) * m_solver;
devices::NETLIB_NAME(gnd) * m_gnd;
-
devices::NETLIB_NAME(netlistparams) *m_params;
+
+ pstring m_name;
setup_t *m_setup;
plog_base<NL_DEBUG> m_log;
};
@@ -1303,7 +1306,10 @@ namespace netlist
// inline implementations
// -----------------------------------------------------------------------------
- PSTATE_INTERFACE(object_t, m_netlist, name())
+ ATTR_COLD inline pstate_manager_t *object_t::state_manager()
+ {
+ return m_netlist;
+ }
template <class C, param_t::param_type_t T>
ATTR_HOT inline void param_template_t<C, T>::setTo(const C &param)
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index 399fe86d213..dad17991b87 100644
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -197,8 +197,6 @@ pstring setup_t::objtype_as_astr(object_t &in) const
return "PARAM";
case terminal_t::DEVICE:
return "DEVICE";
- case terminal_t::NETLIST:
- return "NETLIST";
case terminal_t::QUEUE:
return "QUEUE";
}
@@ -283,9 +281,6 @@ void setup_t::register_object(device_t &dev, const pstring &name, object_t &obj)
case terminal_t::DEVICE:
log().fatal("Device registration not yet supported - {1}\n", name);
break;
- case terminal_t::NETLIST:
- log().fatal("Netlist registration not yet supported - {1}\n", name);
- break;
case terminal_t::QUEUE:
log().fatal("QUEUE registration not yet supported - {1}\n", name);
break;
diff --git a/src/lib/netlist/nl_util.h b/src/lib/netlist/nl_util.h
index 87ec2270231..50c545c22e3 100644
--- a/src/lib/netlist/nl_util.h
+++ b/src/lib/netlist/nl_util.h
@@ -11,6 +11,7 @@
#include <cmath>
#include <cstring>
#include <cstdlib>
+#include <algorithm>
#include "plib/pstring.h"
#include "plib/plists.h"
@@ -40,26 +41,35 @@ private:
nl_math() {};
public:
- ATTR_HOT inline static float exp(const float x) { return std::exp(x); }
- ATTR_HOT inline static double abs(const double x) { return std::fabs(x); }
- ATTR_HOT inline static float abs(const float x) { return std::fabs(x); }
- ATTR_HOT inline static double log(const double x) { return std::log(x); }
- ATTR_HOT inline static float log(const float x) { return std::log(x); }
-#if defined(_MSC_VER) && _MSC_VER < 1800
- ATTR_HOT inline static double e_log1p(const double x) { return nl_math::log(1.0 + x); }
- ATTR_HOT inline static float e_log1p(const float x) { return nl_math::log(1.0 + x); }
+ template <typename T>
+ static T abs(const T &x) { return std::abs(x); }
+
+ template <typename T>
+ static T max(const T &x, const T &y) { return std::max(x, y); }
+
+ template <typename T>
+ static T min(const T &x, const T &y) { return std::min(x, y); }
+
+ template <typename T>
+ static T log(const T &x) { return std::log(x); }
+
+ #if defined(_MSC_VER) && _MSC_VER < 1800
+ ATTR_HOT inline static double e_log1p(const double &x) { return nl_math::log(1.0 + x); }
+ ATTR_HOT inline static float e_log1p(const float &x) { return nl_math::log(1.0 + x); }
#else
- ATTR_HOT inline static double e_log1p(const double x) { return log1p(x); }
- ATTR_HOT inline static float e_log1p(const float x) { return log1pf(x); }
+ template <typename T>
+ static T e_log1p(const T &x) { return log1p(x); }
#endif
- ATTR_HOT inline static double sqrt(const double x) { return std::sqrt(x); }
- ATTR_HOT inline static float sqrt(const float x) { return std::sqrt(x); }
+
+ template <typename T>
+ static T sqrt(const T &x) { return std::sqrt(x); }
// this one has an accuracy of better than 5%. That's enough for our purpose
// add c3 and it'll be better than 1%
#if 0
- inline static double fastexp_h(const double x)
+ ATTR_HOT inline static float exp(const float &x) { return std::exp(x); }
+ inline static double fastexp_h(const double &x)
{
/* static */ const double ln2r = 1.442695040888963387;
/* static */ const double ln2 = 0.693147180559945286;
@@ -79,7 +89,7 @@ public:
return pow(2.0, t)*e;
}
- ATTR_HOT inline static double exp(const double x)
+ ATTR_HOT inline static double exp(const double &x)
{
if (x<0)
return 1.0 / fastexp_h(-x);
@@ -87,7 +97,8 @@ public:
return fastexp_h(x);
}
#else
- ATTR_HOT inline static double exp(const double x) { return std::exp(x); }
+ template <typename T>
+ static double exp(const T &x) { return std::exp(x); }
#endif
};
diff --git a/src/lib/netlist/plib/plists.h b/src/lib/netlist/plib/plists.h
index f5d395f4628..43aa28a229a 100644
--- a/src/lib/netlist/plib/plists.h
+++ b/src/lib/netlist/plib/plists.h
@@ -126,7 +126,7 @@ public:
int indexof(const _ListClass &elem) const
{
- for (int i = 0; i < this->size(); i++)
+ for (unsigned i = 0; i < this->size(); i++)
{
if (this->at(i) == elem)
return i;
diff --git a/src/lib/netlist/plib/pstate.h b/src/lib/netlist/plib/pstate.h
index 91c67ee0e1c..88c0c005927 100644
--- a/src/lib/netlist/plib/pstate.h
+++ b/src/lib/netlist/plib/pstate.h
@@ -15,19 +15,6 @@
// state saving ...
// ----------------------------------------------------------------------------------------
-#define PSTATE_INTERFACE_DECL() \
- template<typename C> ATTR_COLD void save(C &state, const pstring &stname); \
- template<typename C, std::size_t N> ATTR_COLD void save(C (&state)[N], const pstring &stname); \
- template<typename C> ATTR_COLD void save(C *state, const pstring &stname, const int count);
-
-#define PSTATE_INTERFACE(obj, manager, module) \
- template<typename C> ATTR_COLD void obj::save(C &state, const pstring &stname) \
- { manager->save_item(state, this, module + "." + stname); } \
- template<typename C, std::size_t N> ATTR_COLD void obj::save(C (&state)[N], const pstring &stname) \
- { manager->save_state_ptr(module + "." + stname, pstate_datatype<C>::type, this, sizeof(state[0]), N, &(state[0]), false); } \
- template<typename C> ATTR_COLD void obj::save(C *state, const pstring &stname, const int count) \
- { manager->save_state_ptr(module + "." + stname, pstate_datatype<C>::type, this, sizeof(C), count, state, false); }
-
enum pstate_data_type_e {
NOT_SUPPORTED,
DT_CUSTOM,
@@ -148,6 +135,12 @@ public:
save_state_ptr(stname, pstate_datatype<C>::type, owner, sizeof(C), count, state, false);
}
+ template<typename C>
+ void save_item(std::vector<C> &v, const void *owner, const pstring &stname)
+ {
+ save_state(v.data(), owner, stname, v.size());
+ }
+
ATTR_COLD void pre_save();
ATTR_COLD void post_load();
ATTR_COLD void remove_save_items(const void *owner);
@@ -164,5 +157,31 @@ private:
template<> ATTR_COLD void pstate_manager_t::save_item(pstate_callback_t &state, const void *owner, const pstring &stname);
+template <typename T>
+class pstate_interface_t
+{
+public:
+ pstate_interface_t() { }
+
+ template<typename C> void save(C &state, const pstring &stname)
+ {
+ pstate_manager_t *manager = static_cast<T*>(this)->state_manager();
+ pstring module = static_cast<T*>(this)->name();
+ manager->save_item(state, this, module + "." + stname);
+ }
+ template<typename C, std::size_t N> ATTR_COLD void save(C (&state)[N], const pstring &stname)
+ {
+ pstate_manager_t *manager = static_cast<T*>(this)->state_manager();
+ pstring module = static_cast<T*>(this)->name();
+ manager->save_state_ptr(module + "." + stname, pstate_datatype<C>::type, this, sizeof(state[0]), N, &(state[0]), false);
+ }
+ template<typename C> ATTR_COLD void save(C *state, const pstring &stname, const int count)
+ {
+ pstate_manager_t *manager = static_cast<T*>(this)->state_manager();
+ pstring module = static_cast<T*>(this)->name();
+ manager->save_state_ptr(module + "." + stname, pstate_datatype<C>::type, this, sizeof(C), count, state, false);
+ }
+};
+
#endif /* PSTATE_H_ */
diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp
index ea5211a3c87..6d34683731e 100644
--- a/src/lib/netlist/prg/nltool.cpp
+++ b/src/lib/netlist/prg/nltool.cpp
@@ -145,8 +145,8 @@ class netlist_tool_t : public netlist::netlist_t
{
public:
- netlist_tool_t()
- : netlist::netlist_t(), m_opts(NULL), m_setup(NULL)
+ netlist_tool_t(const pstring &aname)
+ : netlist::netlist_t(aname), m_opts(NULL), m_setup(NULL)
{
}
@@ -159,7 +159,6 @@ public:
void init()
{
m_setup = palloc(netlist::setup_t(this));
- this->init_object(*this, "netlist");
m_setup->init();
}
@@ -281,7 +280,7 @@ pvector_t<input_t> *read_input(netlist::netlist_t *netlist, pstring fname)
static void run(tool_options_t &opts)
{
- netlist_tool_t nt;
+ netlist_tool_t nt("netlist");
osd_ticks_t t = osd_ticks();
nt.m_opts = &opts;
@@ -326,7 +325,7 @@ static void run(tool_options_t &opts)
static void listdevices()
{
- netlist_tool_t nt;
+ netlist_tool_t nt("netlist");
nt.init();
const netlist::factory_list_t &list = nt.setup().factory();
diff --git a/src/lib/netlist/solver/mat_cr.h b/src/lib/netlist/solver/mat_cr.h
index ea72884c1de..d259fa40df1 100644
--- a/src/lib/netlist/solver/mat_cr.h
+++ b/src/lib/netlist/solver/mat_cr.h
@@ -34,7 +34,7 @@ struct mat_cr_t
while (k < oe)
{
- double tmp = 0.0;
+ T tmp = 0.0;
const unsigned e = ia[i+1];
for (; k < e; k++)
tmp += A[k] * x[ja[k]];
@@ -42,7 +42,8 @@ struct mat_cr_t
}
}
- void incomplete_LU_factorization(const nl_double * RESTRICT A, nl_double * RESTRICT LU)
+ template<typename T>
+ void incomplete_LU_factorization(const T * RESTRICT A, T * RESTRICT LU)
{
/*
* incomplete LU Factorization according to http://de.wikipedia.org/wiki/ILU-Zerlegung
@@ -64,7 +65,7 @@ struct mat_cr_t
// pk == (i, k)
const unsigned k = ja[pk];
const unsigned iak1 = ia[k + 1];
- const double LUpk = LU[pk] = LU[pk] / LU[diag[k]];
+ const T LUpk = LU[pk] = LU[pk] / LU[diag[k]];
unsigned pt = ia[k];
@@ -81,7 +82,8 @@ struct mat_cr_t
}
}
- void solveLUx (const nl_double * RESTRICT LU, nl_double * RESTRICT r)
+ template<typename T>
+ void solveLUx (const T * RESTRICT LU, T * RESTRICT r)
{
/*
* Solve a linear equation Ax = r
@@ -109,7 +111,7 @@ struct mat_cr_t
for (i = 1; ia[i] < nz_num; i++ )
{
- double tmp = 0.0;
+ T tmp = 0.0;
const unsigned j1 = ia[i];
const unsigned j2 = diag[i];
@@ -122,7 +124,7 @@ struct mat_cr_t
for (; 0 < i; i-- )
{
const unsigned im1 = i - 1;
- double tmp = 0.0;
+ T tmp = 0.0;
const unsigned j1 = diag[im1] + 1;
const unsigned j2 = ia[im1+1];
for (unsigned j = j1; j < j2; j++ )
diff --git a/src/lib/netlist/solver/nld_matrix_solver.h b/src/lib/netlist/solver/nld_matrix_solver.h
index 715eab6756a..58947144ff5 100644
--- a/src/lib/netlist/solver/nld_matrix_solver.h
+++ b/src/lib/netlist/solver/nld_matrix_solver.h
@@ -10,14 +10,16 @@
#include "solver/nld_solver.h"
+#include <type_traits>
+
NETLIB_NAMESPACE_DEVICES_START()
class terms_t
{
P_PREVENT_COPYING(terms_t)
- public:
- ATTR_COLD terms_t() : m_railstart(0)
+public:
+ ATTR_COLD terms_t() : m_railstart(0), m_last_V(0)
{}
ATTR_COLD void clear()
@@ -48,6 +50,10 @@ class terms_t
pvector_t<unsigned> m_nz; /* all non zero for multiplication */
pvector_t<unsigned> m_nzrd; /* non zero right of the diagonal for elimination, may include RHS element */
pvector_t<unsigned> m_nzbd; /* non zero below of the diagonal for elimination */
+
+ /* state */
+ nl_double m_last_V;
+
private:
pvector_t<terminal_t *> m_term;
pvector_t<int> m_net_other;
@@ -55,6 +61,7 @@ private:
pvector_t<nl_double> m_gt;
pvector_t<nl_double> m_Idr;
pvector_t<nl_double *> m_other_curanalog;
+
};
class matrix_solver_t : public device_t
@@ -104,14 +111,28 @@ protected:
ATTR_COLD void setup_base(analog_net_t::list_t &nets);
void update_dynamic();
- virtual void add_term(int net_idx, terminal_t *term) = 0;
virtual void vsetup(analog_net_t::list_t &nets) = 0;
virtual int vsolve_non_dynamic(const bool newton_raphson) = 0;
- virtual netlist_time compute_next_timestep() = 0;
+ /* virtual */ netlist_time compute_next_timestep();
+ /* virtual */ void add_term(int net_idx, terminal_t *term);
+
+ template <typename T>
+ void store(const T * RESTRICT V);
+ template <typename T>
+ T delta(const T * RESTRICT V);
+
+ template <typename T>
+ void build_LE_A(T & child);
+ template <typename T>
+ void build_LE_RHS(T & child);
+
+ pvector_t<terms_t *> m_terms;
pvector_t<analog_net_t *> m_nets;
pvector_t<analog_output_t *> m_inps;
+ pvector_t<terms_t *> m_rails_temp;
+
int m_stat_calculations;
int m_stat_newton_raphson;
int m_stat_vsolver_calls;
@@ -138,6 +159,83 @@ private:
const eSolverType m_type;
};
+template <typename T>
+T matrix_solver_t::delta(const T * RESTRICT V)
+{
+ /* FIXME: Ideally we should also include currents (RHS) here. This would
+ * need a revaluation of the right hand side after voltages have been updated
+ * and thus belong into a different calculation. This applies to all solvers.
+ */
+
+ const unsigned iN = this->m_terms.size();
+ T cerr = 0;
+ for (unsigned i = 0; i < iN; i++)
+ cerr = nl_math::max(cerr, nl_math::abs(V[i] - (T) this->m_nets[i]->m_cur_Analog));
+ return cerr;
+}
+
+template <typename T>
+void matrix_solver_t::store(const T * RESTRICT V)
+{
+ for (unsigned i = 0, iN=m_terms.size(); i < iN; i++)
+ this->m_nets[i]->m_cur_Analog = V[i];
+}
+
+template <typename T>
+void matrix_solver_t::build_LE_A(T & child)
+{
+ static_assert(std::is_base_of<matrix_solver_t, T>::value, "T must derive from matrix_solver_t");
+
+ const unsigned iN = child.N();
+ for (unsigned k = 0; k < iN; k++)
+ {
+ for (unsigned i=0; i < iN; i++)
+ child.A(k,i) = 0.0;
+
+ const unsigned terms_count = m_terms[k]->count();
+ const unsigned railstart = m_terms[k]->m_railstart;
+ const nl_double * RESTRICT gt = m_terms[k]->gt();
+
+ {
+ nl_double akk = 0.0;
+ for (unsigned i = 0; i < terms_count; i++)
+ akk += gt[i];
+
+ child.A(k,k) = akk;
+ }
+
+ const nl_double * RESTRICT go = m_terms[k]->go();
+ const int * RESTRICT net_other = m_terms[k]->net_other();
+
+ for (unsigned i = 0; i < railstart; i++)
+ child.A(k,net_other[i]) -= go[i];
+ }
+}
+
+template <typename T>
+void matrix_solver_t::build_LE_RHS(T & child)
+{
+ const unsigned iN = child.N();
+ for (unsigned k = 0; k < iN; k++)
+ {
+ nl_double rhsk_a = 0.0;
+ nl_double rhsk_b = 0.0;
+
+ const unsigned terms_count = m_terms[k]->count();
+ const nl_double * RESTRICT go = m_terms[k]->go();
+ const nl_double * RESTRICT Idr = m_terms[k]->Idr();
+ const nl_double * const * RESTRICT other_cur_analog = m_terms[k]->other_curanalog();
+
+ for (unsigned i = 0; i < terms_count; i++)
+ rhsk_a = rhsk_a + Idr[i];
+
+ for (unsigned i = m_terms[k]->m_railstart; i < terms_count; i++)
+ //rhsk = rhsk + go[i] * terms[i]->m_otherterm->net().as_analog().Q_Analog();
+ rhsk_b = rhsk_b + go[i] * *other_cur_analog[i];
+
+ child.RHS(k) = rhsk_a + rhsk_b;
+ }
+}
NETLIB_NAMESPACE_DEVICES_END()
diff --git a/src/lib/netlist/solver/nld_ms_direct.h b/src/lib/netlist/solver/nld_ms_direct.h
index 0badcdce863..2b0ae80b855 100644
--- a/src/lib/netlist/solver/nld_ms_direct.h
+++ b/src/lib/netlist/solver/nld_ms_direct.h
@@ -11,6 +11,7 @@
#include <algorithm>
#include "solver/nld_solver.h"
+#include "solver/nld_matrix_solver.h"
#include "solver/vector_base.h"
/* Disabling dynamic allocation gives a ~10% boost in performance
@@ -18,7 +19,12 @@
* going forward in case we implement cuda solvers in the future.
*/
#define NL_USE_DYNAMIC_ALLOCATION (0)
+#define TEST_PARALLEL (0)
+#if TEST_PARALLEL
+#include <thread>
+#include <atomic>
+#endif
NETLIB_NAMESPACE_DEVICES_START()
@@ -26,9 +32,93 @@ NETLIB_NAMESPACE_DEVICES_START()
//#define nl_ext_double long double // slightly slower
#define nl_ext_double nl_double
+#if TEST_PARALLEL
+#define MAXTHR 10
+static const int num_thr = 2;
+
+struct thr_intf
+{
+ virtual void do_work(const int id, void *param) = 0;
+};
+
+struct ti_t
+{
+ volatile std::atomic<int> lo;
+ thr_intf *intf;
+ void *params;
+ int _block[29]; /* make it 256 bytes */
+};
+
+static ti_t ti[MAXTHR];
+static std::thread thr[MAXTHR];
+
+int thr_init = 0;
+
+static void thr_process_proc(int id)
+{
+ while (true)
+ {
+ while (ti[id].lo.load() == 0)
+ ;
+ if (ti[id].lo.load() == 2)
+ return;
+ ti[id].intf->do_work(id, ti[id].params);
+ ti[id].lo.store(0);
+ }
+}
+
+static void thr_process(int id, thr_intf *intf, void *params)
+{
+ ti[id].intf = intf;
+ ti[id].params = params;
+ ti[id].lo.store(1);
+}
+
+static void thr_wait()
+{
+ int c=1;
+ while (c > 0)
+ {
+ c=0;
+ for (int i=0; i<num_thr; i++)
+ c += ti[i].lo.load();
+ }
+}
+
+static void thr_initialize()
+{
+ thr_init++;
+ if (thr_init == 1)
+ {
+ for (int i=0; i<num_thr; i++)
+ {
+ ti[i].lo = 0;
+ thr[i] = std::thread(thr_process_proc, i);
+ }
+ }
+}
+
+static void thr_dispose()
+{
+ thr_init--;
+ if (thr_init == 0)
+ {
+ for (int i=0; i<num_thr; i++)
+ ti[i].lo = 2;
+ for (int i=0; i<num_thr; i++)
+ thr[i].join();
+ }
+}
+#endif
+
template <unsigned m_N, unsigned _storage_N>
+#if TEST_PARALLEL
+class matrix_solver_direct_t: public matrix_solver_t, public thr_intf
+#else
class matrix_solver_direct_t: public matrix_solver_t
+#endif
{
+ friend class matrix_solver_t;
public:
matrix_solver_direct_t(const solver_parameters_t *params, const int size);
@@ -40,26 +130,22 @@ public:
virtual void reset() override { matrix_solver_t::reset(); }
protected:
- virtual void add_term(int net_idx, terminal_t *term) override;
virtual int vsolve_non_dynamic(const bool newton_raphson) override;
int solve_non_dynamic(const bool newton_raphson);
- inline const unsigned N() const { if (m_N == 0) return m_dim; else return m_N; }
+ inline unsigned N() const { if (m_N == 0) return m_dim; else return m_N; }
- void build_LE_A();
- void build_LE_RHS();
void LE_solve();
template <typename T>
void LE_back_subst(T * RESTRICT x);
- template <typename T>
- T delta(const T * RESTRICT V);
-
- template <typename T>
- void store(const T * RESTRICT V);
-
- virtual netlist_time compute_next_timestep() override;
+#if TEST_PARALLEL
+ int x_i[10];
+ int x_start[10];
+ int x_stop[10];
+ virtual void do_work(const int id, void *param) override;
+#endif
#if (NL_USE_DYNAMIC_ALLOCATION)
template <typename T1, typename T2>
@@ -73,18 +159,15 @@ protected:
inline nl_ext_double &RHS(const T1 &r) { return m_A[r][N()]; }
#endif
ATTR_ALIGN nl_double m_last_RHS[_storage_N]; // right hand side - contains currents
- ATTR_ALIGN nl_double m_last_V[_storage_N];
-
- terms_t * m_terms[_storage_N];
- terms_t *m_rails_temp;
private:
static const std::size_t m_pitch = (((_storage_N + 1) + 7) / 8) * 8;
+ //static const std::size_t m_pitch = (((_storage_N + 1) + 15) / 16) * 16;
+ //static const std::size_t m_pitch = (((_storage_N + 1) + 31) / 32) * 32;
#if (NL_USE_DYNAMIC_ALLOCATION)
ATTR_ALIGN nl_ext_double * RESTRICT m_A;
#else
ATTR_ALIGN nl_ext_double m_A[_storage_N][m_pitch];
- ATTR_ALIGN nl_ext_double m_B[_storage_N][m_pitch];
#endif
//ATTR_ALIGN nl_ext_double m_RHSx[_storage_N];
@@ -99,105 +182,36 @@ private:
template <unsigned m_N, unsigned _storage_N>
matrix_solver_direct_t<m_N, _storage_N>::~matrix_solver_direct_t()
{
- for (unsigned k = 0; k < N(); k++)
- {
- pfree(m_terms[k]);
- }
- pfree_array(m_rails_temp);
#if (NL_USE_DYNAMIC_ALLOCATION)
pfree_array(m_A);
#endif
+#if TEST_PARALLEL
+ thr_dispose();
+#endif
}
template <unsigned m_N, unsigned _storage_N>
-netlist_time matrix_solver_direct_t<m_N, _storage_N>::compute_next_timestep()
-{
- nl_double new_solver_timestep = m_params.m_max_timestep;
-
- if (m_params.m_dynamic)
- {
- /*
- * FIXME: We should extend the logic to use either all nets or
- * only output nets.
- */
- for (unsigned k = 0, iN=N(); k < iN; k++)
- {
- analog_net_t *n = m_nets[k];
-
- const nl_double DD_n = (n->Q_Analog() - m_last_V[k]);
- const nl_double hn = current_timestep();
-
- nl_double DD2 = (DD_n / hn - n->m_DD_n_m_1 / n->m_h_n_m_1) / (hn + n->m_h_n_m_1);
- nl_double new_net_timestep;
-
- n->m_h_n_m_1 = hn;
- n->m_DD_n_m_1 = DD_n;
- if (nl_math::abs(DD2) > NL_FCONST(1e-30)) // avoid div-by-zero
- new_net_timestep = nl_math::sqrt(m_params.m_lte / nl_math::abs(NL_FCONST(0.5)*DD2));
- else
- new_net_timestep = m_params.m_max_timestep;
-
- if (new_net_timestep < new_solver_timestep)
- new_solver_timestep = new_net_timestep;
-
- m_last_V[k] = n->Q_Analog();
- }
- if (new_solver_timestep < m_params.m_min_timestep)
- new_solver_timestep = m_params.m_min_timestep;
- }
- //if (new_solver_timestep > 10.0 * hn)
- // new_solver_timestep = 10.0 * hn;
- return netlist_time::from_double(new_solver_timestep);
-}
-
-template <unsigned m_N, unsigned _storage_N>
-ATTR_COLD void matrix_solver_direct_t<m_N, _storage_N>::add_term(int k, terminal_t *term)
-{
- if (term->m_otherterm->net().isRailNet())
- {
- m_rails_temp[k].add(term, -1, false);
- }
- else
- {
- int ot = get_net_idx(&term->m_otherterm->net());
- if (ot>=0)
- {
- m_terms[k]->add(term, ot, true);
- }
- /* Should this be allowed ? */
- else // if (ot<0)
- {
- m_rails_temp[k].add(term, ot, true);
- log().fatal("found term with missing othernet {1}\n", term->name());
- }
- }
-}
-
-
-template <unsigned m_N, unsigned _storage_N>
ATTR_COLD void matrix_solver_direct_t<m_N, _storage_N>::vsetup(analog_net_t::list_t &nets)
{
if (m_dim < nets.size())
log().fatal("Dimension {1} less than {2}", m_dim, nets.size());
- for (unsigned k = 0; k < N(); k++)
- {
- m_terms[k]->clear();
- m_rails_temp[k].clear();
- }
-
matrix_solver_t::setup_base(nets);
for (unsigned k = 0; k < N(); k++)
{
m_terms[k]->m_railstart = m_terms[k]->count();
- for (unsigned i = 0; i < m_rails_temp[k].count(); i++)
- this->m_terms[k]->add(m_rails_temp[k].terms()[i], m_rails_temp[k].net_other()[i], false);
+ for (unsigned i = 0; i < m_rails_temp[k]->count(); i++)
+ this->m_terms[k]->add(m_rails_temp[k]->terms()[i], m_rails_temp[k]->net_other()[i], false);
- m_rails_temp[k].clear(); // no longer needed
+ m_rails_temp[k]->clear(); // no longer needed
m_terms[k]->set_pointers();
}
+ for (unsigned k = 0; k < N(); k++)
+ pfree(m_rails_temp[k]); // no longer needed
+
+ m_rails_temp.clear();
#if 1
/* Sort in descending order by number of connected matrix voltages.
@@ -329,13 +343,13 @@ ATTR_COLD void matrix_solver_direct_t<m_N, _storage_N>::vsetup(analog_net_t::lis
* save states
*/
save(NLNAME(m_last_RHS));
- save(NLNAME(m_last_V));
for (unsigned k = 0; k < N(); k++)
{
pstring num = pfmt("{1}")(k);
save(RHS(k), "RHS" + num);
+ save(m_terms[k]->m_last_V, "lastV" + num);
save(m_terms[k]->go(),"GO" + num, m_terms[k]->count());
save(m_terms[k]->gt(),"GT" + num, m_terms[k]->count());
@@ -345,59 +359,37 @@ ATTR_COLD void matrix_solver_direct_t<m_N, _storage_N>::vsetup(analog_net_t::lis
}
-template <unsigned m_N, unsigned _storage_N>
-void matrix_solver_direct_t<m_N, _storage_N>::build_LE_A()
-{
- const unsigned iN = N();
- for (unsigned k = 0; k < iN; k++)
- {
- for (unsigned i=0; i < iN; i++)
- A(k,i) = 0.0;
-
- const unsigned terms_count = m_terms[k]->count();
- const unsigned railstart = m_terms[k]->m_railstart;
- const nl_double * RESTRICT gt = m_terms[k]->gt();
-
- {
- nl_double akk = 0.0;
- for (unsigned i = 0; i < terms_count; i++)
- akk += gt[i];
-
- A(k,k) = akk;
- }
-
- const nl_double * RESTRICT go = m_terms[k]->go();
- const int * RESTRICT net_other = m_terms[k]->net_other();
-
- for (unsigned i = 0; i < railstart; i++)
- A(k,net_other[i]) -= go[i];
- }
-}
+#if TEST_PARALLEL
template <unsigned m_N, unsigned _storage_N>
-void matrix_solver_direct_t<m_N, _storage_N>::build_LE_RHS()
+void matrix_solver_direct_t<m_N, _storage_N>::do_work(const int id, void *param)
{
- const unsigned iN = N();
- for (unsigned k = 0; k < iN; k++)
+ const int i = x_i[id];
+ /* FIXME: Singular matrix? */
+ const nl_double f = 1.0 / A(i,i);
+ const unsigned * RESTRICT const p = m_terms[i]->m_nzrd.data();
+ const unsigned e = m_terms[i]->m_nzrd.size();
+ //nl_double A_cache[128];
+ //for (unsigned k = 0; k < e; k++)
+ // A_cache[k] = A(i,p[k]);
+
+ /* Eliminate column i from row j */
+
+ const unsigned * RESTRICT const pb = m_terms[i]->m_nzbd.data();
+ //const unsigned eb = m_terms[i]->m_nzbd.size();
+ const unsigned sj = x_start[id];
+ const unsigned se = x_stop[id];
+ for (unsigned jb = sj; jb < se; jb++)
{
- nl_double rhsk_a = 0.0;
- nl_double rhsk_b = 0.0;
-
- const int terms_count = m_terms[k]->count();
- const nl_double * RESTRICT go = m_terms[k]->go();
- const nl_double * RESTRICT Idr = m_terms[k]->Idr();
- const nl_double * const * RESTRICT other_cur_analog = m_terms[k]->other_curanalog();
-
- for (int i = 0; i < terms_count; i++)
- rhsk_a = rhsk_a + Idr[i];
-
- for (int i = m_terms[k]->m_railstart; i < terms_count; i++)
- //rhsk = rhsk + go[i] * terms[i]->m_otherterm->net().as_analog().Q_Analog();
- rhsk_b = rhsk_b + go[i] * *other_cur_analog[i];
-
- RHS(k) = rhsk_a + rhsk_b;
+ const unsigned j = pb[jb];
+ const nl_double f1 = - A(j,i) * f;
+ for (unsigned k = 0; k < e; k++)
+ //A(j,p[k]) += A_cache[k] * f1;
+ A(j,p[k]) += A(i,p[k]) * f1;
+ //RHS(j) += RHS(i) * f1;
}
}
+#endif
template <unsigned m_N, unsigned _storage_N>
void matrix_solver_direct_t<m_N, _storage_N>::LE_solve()
@@ -406,7 +398,7 @@ void matrix_solver_direct_t<m_N, _storage_N>::LE_solve()
for (unsigned i = 0; i < kN; i++) {
// FIXME: use a parameter to enable pivoting? m_pivot
- if (m_params.m_pivot)
+ if (!TEST_PARALLEL && m_params.m_pivot)
{
/* Find the row with the largest first value */
unsigned maxrow = i;
@@ -442,7 +434,7 @@ void matrix_solver_direct_t<m_N, _storage_N>::LE_solve()
#else
vec_add_mult_scalar(kN-i-1,pj,f1,pi);
//for (unsigned k = i+1; k < kN; k++)
- // pj[k] = pj[k] + pi[k] * f1;
+ // pj[k] = pj[k] + pi[k] * f1;
//for (unsigned k = i+1; k < kN; k++)
//A(j,k) += A(i,k) * f1;
RHS(j) += RHS(i) * f1;
@@ -452,23 +444,62 @@ void matrix_solver_direct_t<m_N, _storage_N>::LE_solve()
}
else
{
+#if TEST_PARALLEL
+ const unsigned eb = m_terms[i]->m_nzbd.size();
+ if (eb > 0)
+ {
+ //printf("here %d\n", eb);
+ unsigned chunks = (eb) / (num_thr + 1);
+ for (int p=0; p < num_thr + 1; p++)
+ {
+ x_i[p] = i;
+ x_start[p] = chunks * p;
+ x_stop[p] = std::min(chunks*(p+1), eb);
+ if (p<num_thr) thr_process(p, this, NULL);
+ }
+ do_work(num_thr, NULL);
+ thr_wait();
+ }
+ else if (eb > 0)
+ {
+ x_i[0] = i;
+ x_start[0] = 0;
+ x_stop[0] = eb;
+ do_work(0, NULL);
+ }
+#else
+#if 0
/* FIXME: Singular matrix? */
const nl_double f = 1.0 / A(i,i);
- const unsigned * RESTRICT const p = m_terms[i]->m_nzrd.data();
- const unsigned e = m_terms[i]->m_nzrd.size();
+ const auto &nzrd = m_terms[i]->m_nzrd;
+ const auto &nzbd = m_terms[i]->m_nzbd;
/* Eliminate column i from row j */
- const unsigned * RESTRICT const pb = m_terms[i]->m_nzbd.data();
- const unsigned eb = m_terms[i]->m_nzbd.size();
- for (unsigned jb = 0; jb < eb; jb++)
+ for (auto & j : nzbd)
{
- const unsigned j = pb[jb];
const nl_double f1 = - A(j,i) * f;
- for (unsigned k = 0; k < e; k++)
- A(j,p[k]) += A(i,p[k]) * f1;
+ for (auto & k : nzrd)
+ A(j,k) += A(i,k) * f1;
//RHS(j) += RHS(i) * f1;
}
+#else
+ /* FIXME: Singular matrix? */
+ const nl_double f = 1.0 / A(i,i);
+ const auto &nzrd = m_terms[i]->m_nzrd;
+ const auto &nzbd = m_terms[i]->m_nzbd;
+
+ /* Eliminate column i from row j */
+
+ for (auto & j : nzbd)
+ {
+ const nl_double f1 = - A(j,i) * f;
+ for (auto & k : nzrd)
+ A(j,k) += A(i,k) * f1;
+ //RHS(j) += RHS(i) * f1;
+ }
+#endif
+#endif
}
}
}
@@ -512,35 +543,6 @@ void matrix_solver_direct_t<m_N, _storage_N>::LE_back_subst(
template <unsigned m_N, unsigned _storage_N>
-template <typename T>
-T matrix_solver_direct_t<m_N, _storage_N>::delta(
- const T * RESTRICT V)
-{
- /* FIXME: Ideally we should also include currents (RHS) here. This would
- * need a revaluation of the right hand side after voltages have been updated
- * and thus belong into a different calculation. This applies to all solvers.
- */
-
- const unsigned iN = this->N();
- T cerr = 0;
- for (unsigned i = 0; i < iN; i++)
- cerr = std::fmax(cerr, nl_math::abs(V[i] - (T) this->m_nets[i]->m_cur_Analog));
- return cerr;
-}
-
-template <unsigned m_N, unsigned _storage_N>
-template <typename T>
-void matrix_solver_direct_t<m_N, _storage_N>::store(
- const T * RESTRICT V)
-{
- for (unsigned i = 0, iN=N(); i < iN; i++)
- {
- this->m_nets[i]->m_cur_Analog = V[i];
- }
-}
-
-
-template <unsigned m_N, unsigned _storage_N>
int matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool newton_raphson)
{
nl_double new_V[_storage_N]; // = { 0.0 };
@@ -566,8 +568,8 @@ int matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const
template <unsigned m_N, unsigned _storage_N>
inline int matrix_solver_direct_t<m_N, _storage_N>::vsolve_non_dynamic(const bool newton_raphson)
{
- this->build_LE_A();
- this->build_LE_RHS();
+ this->build_LE_A(*this);
+ this->build_LE_RHS(*this);
for (unsigned i=0, iN=N(); i < iN; i++)
m_last_RHS[i] = RHS(i);
@@ -581,16 +583,16 @@ matrix_solver_direct_t<m_N, _storage_N>::matrix_solver_direct_t(const solver_par
: matrix_solver_t(GAUSSIAN_ELIMINATION, params)
, m_dim(size)
{
- m_rails_temp = palloc_array(terms_t, N());
#if (NL_USE_DYNAMIC_ALLOCATION)
m_A = palloc_array(nl_ext_double, N() * m_pitch);
#endif
for (unsigned k = 0; k < N(); k++)
{
- m_terms[k] = palloc(terms_t);
m_last_RHS[k] = 0.0;
- m_last_V[k] = 0.0;
}
+#if TEST_PARALLEL
+ thr_initialize();
+#endif
}
template <unsigned m_N, unsigned _storage_N>
@@ -598,16 +600,16 @@ matrix_solver_direct_t<m_N, _storage_N>::matrix_solver_direct_t(const eSolverTyp
: matrix_solver_t(type, params)
, m_dim(size)
{
- m_rails_temp = palloc_array(terms_t, N());
#if (NL_USE_DYNAMIC_ALLOCATION)
m_A = palloc_array(nl_ext_double, N() * m_pitch);
#endif
for (unsigned k = 0; k < N(); k++)
{
- m_terms[k] = palloc(terms_t);
m_last_RHS[k] = 0.0;
- m_last_V[k] = 0.0;
}
+#if TEST_PARALLEL
+ thr_initialize();
+#endif
}
NETLIB_NAMESPACE_DEVICES_END()
diff --git a/src/lib/netlist/solver/nld_ms_direct1.h b/src/lib/netlist/solver/nld_ms_direct1.h
index ab19c92a4cb..abf9518bfbe 100644
--- a/src/lib/netlist/solver/nld_ms_direct1.h
+++ b/src/lib/netlist/solver/nld_ms_direct1.h
@@ -30,8 +30,8 @@ public:
inline int matrix_solver_direct1_t::vsolve_non_dynamic(ATTR_UNUSED const bool newton_raphson)
{
- this->build_LE_A();
- this->build_LE_RHS();
+ this->build_LE_A(*this);
+ this->build_LE_RHS(*this);
//NL_VERBOSE_OUT(("{1} {2}\n", new_val, m_RHS[0] / m_A[0][0]);
nl_double new_val[1] = { RHS(0) / A(0,0) };
diff --git a/src/lib/netlist/solver/nld_ms_direct2.h b/src/lib/netlist/solver/nld_ms_direct2.h
index 2488e573bf2..f71133d95f0 100644
--- a/src/lib/netlist/solver/nld_ms_direct2.h
+++ b/src/lib/netlist/solver/nld_ms_direct2.h
@@ -30,8 +30,8 @@ public:
inline int matrix_solver_direct2_t::vsolve_non_dynamic(ATTR_UNUSED const bool newton_raphson)
{
- build_LE_A();
- build_LE_RHS();
+ build_LE_A(*this);
+ build_LE_RHS(*this);
const nl_double a = A(0,0);
const nl_double b = A(0,1);
diff --git a/src/lib/netlist/solver/nld_ms_direct_lu.h b/src/lib/netlist/solver/nld_ms_direct_lu.h
index 2109b0f3e41..e6ccf819653 100644
--- a/src/lib/netlist/solver/nld_ms_direct_lu.h
+++ b/src/lib/netlist/solver/nld_ms_direct_lu.h
@@ -11,6 +11,7 @@
#include <algorithm>
#include "solver/nld_solver.h"
+#include "solver/nld_matrix_solver.h"
//#define A(_r, _c) m_A[_r][_c]
@@ -143,7 +144,6 @@ protected:
ATTR_ALIGN nl_double m_last_RHS[_storage_N]; // right hand side - contains currents
ATTR_ALIGN nl_double m_last_V[_storage_N];
- terms_t **m_terms;
terms_t *m_rails_temp;
private:
@@ -160,11 +160,6 @@ private:
template <unsigned m_N, unsigned _storage_N>
matrix_solver_direct_t<m_N, _storage_N>::~matrix_solver_direct_t()
{
- for (unsigned k = 0; k < N(); k++)
- {
- pfree(m_terms[k]);
- }
- pfree_array(m_terms);
pfree_array(m_rails_temp);
}
@@ -607,14 +602,11 @@ matrix_solver_direct_t<m_N, _storage_N>::matrix_solver_direct_t(const solver_par
, m_dim(size)
, m_lp_fact(0)
{
- m_terms = palloc_array(terms_t *, N());
m_rails_temp = palloc_array(terms_t, N());
for (unsigned k = 0; k < N(); k++)
{
- m_terms[k] = palloc(terms_t);
m_last_RHS[k] = 0.0;
- m_last_V[k] = 0.0;
}
}
@@ -624,14 +616,12 @@ matrix_solver_direct_t<m_N, _storage_N>::matrix_solver_direct_t(const eSolverTyp
, m_dim(size)
, m_lp_fact(0)
{
- m_terms = palloc_array(terms_t *, N());
m_rails_temp = palloc_array(terms_t, N());
for (unsigned k = 0; k < N(); k++)
{
m_terms[k] = palloc(terms_t);
m_last_RHS[k] = 0.0;
- m_last_V[k] = 0.0;
}
}
diff --git a/src/lib/netlist/solver/nld_ms_sm.h b/src/lib/netlist/solver/nld_ms_sm.h
index efac84b51da..bff8197127c 100644
--- a/src/lib/netlist/solver/nld_ms_sm.h
+++ b/src/lib/netlist/solver/nld_ms_sm.h
@@ -13,9 +13,9 @@
* In this specific implementation, u is a unit vector specifying the row which
* changed. Thus v contains the changed column.
*
- * Than z = A????? u , w = transpose(A?????) v , lambda = v z
+ * Than z = Aâ»Â¹ u , w = transpose(Aâ»Â¹) v , lambda = v z
*
- * A????? <- 1.0 / (1.0 + lambda) * (z x w)
+ * Aâ»Â¹ <- 1.0 / (1.0 + lambda) * (z x w)
*
* The approach is iterative and applied for each row changed.
*
@@ -36,6 +36,7 @@
#include <algorithm>
#include "solver/nld_solver.h"
+#include "solver/nld_matrix_solver.h"
#include "solver/vector_base.h"
NETLIB_NAMESPACE_DEVICES_START()
@@ -47,6 +48,8 @@ NETLIB_NAMESPACE_DEVICES_START()
template <unsigned m_N, unsigned _storage_N>
class matrix_solver_sm_t: public matrix_solver_t
{
+ friend class matrix_solver_t;
+
public:
matrix_solver_sm_t(const solver_parameters_t *params, const int size);
@@ -58,26 +61,16 @@ public:
virtual void reset() override { matrix_solver_t::reset(); }
protected:
- virtual void add_term(int net_idx, terminal_t *term) override;
virtual int vsolve_non_dynamic(const bool newton_raphson) override;
int solve_non_dynamic(const bool newton_raphson);
- inline const unsigned N() const { if (m_N == 0) return m_dim; else return m_N; }
+ inline unsigned N() const { if (m_N == 0) return m_dim; else return m_N; }
- void build_LE_A();
- void build_LE_RHS();
void LE_invert();
template <typename T>
void LE_compute_x(T * RESTRICT x);
- template <typename T>
- T delta(const T * RESTRICT V);
-
- template <typename T>
- void store(const T * RESTRICT V);
-
- virtual netlist_time compute_next_timestep() override;
template <typename T1, typename T2>
inline nl_ext_double &A(const T1 &r, const T2 &c) { return m_A[r][c]; }
@@ -95,10 +88,6 @@ protected:
inline nl_ext_double &lAinv(const T1 &r, const T2 &c) { return m_lAinv[r][c]; }
ATTR_ALIGN nl_double m_last_RHS[_storage_N]; // right hand side - contains currents
- ATTR_ALIGN nl_double m_last_V[_storage_N];
-
- terms_t * m_terms[_storage_N];
- terms_t *m_rails_temp;
private:
static const std::size_t m_pitch = ((( _storage_N) + 7) / 8) * 8;
@@ -123,102 +112,26 @@ private:
template <unsigned m_N, unsigned _storage_N>
matrix_solver_sm_t<m_N, _storage_N>::~matrix_solver_sm_t()
{
- for (unsigned k = 0; k < N(); k++)
- {
- pfree(m_terms[k]);
- }
- pfree_array(m_rails_temp);
#if (NL_USE_DYNAMIC_ALLOCATION)
pfree_array(m_A);
#endif
}
template <unsigned m_N, unsigned _storage_N>
-netlist_time matrix_solver_sm_t<m_N, _storage_N>::compute_next_timestep()
-{
- nl_double new_solver_timestep = m_params.m_max_timestep;
-
- if (m_params.m_dynamic)
- {
- /*
- * FIXME: We should extend the logic to use either all nets or
- * only output nets.
- */
- for (unsigned k = 0, iN=N(); k < iN; k++)
- {
- analog_net_t *n = m_nets[k];
-
- const nl_double DD_n = (n->Q_Analog() - m_last_V[k]);
- const nl_double hn = current_timestep();
-
- nl_double DD2 = (DD_n / hn - n->m_DD_n_m_1 / n->m_h_n_m_1) / (hn + n->m_h_n_m_1);
- nl_double new_net_timestep;
-
- n->m_h_n_m_1 = hn;
- n->m_DD_n_m_1 = DD_n;
- if (nl_math::abs(DD2) > NL_FCONST(1e-30)) // avoid div-by-zero
- new_net_timestep = nl_math::sqrt(m_params.m_lte / nl_math::abs(NL_FCONST(0.5)*DD2));
- else
- new_net_timestep = m_params.m_max_timestep;
-
- if (new_net_timestep < new_solver_timestep)
- new_solver_timestep = new_net_timestep;
-
- m_last_V[k] = n->Q_Analog();
- }
- if (new_solver_timestep < m_params.m_min_timestep)
- new_solver_timestep = m_params.m_min_timestep;
- }
- //if (new_solver_timestep > 10.0 * hn)
- // new_solver_timestep = 10.0 * hn;
- return netlist_time::from_double(new_solver_timestep);
-}
-
-template <unsigned m_N, unsigned _storage_N>
-ATTR_COLD void matrix_solver_sm_t<m_N, _storage_N>::add_term(int k, terminal_t *term)
-{
- if (term->m_otherterm->net().isRailNet())
- {
- m_rails_temp[k].add(term, -1, false);
- }
- else
- {
- int ot = get_net_idx(&term->m_otherterm->net());
- if (ot>=0)
- {
- m_terms[k]->add(term, ot, true);
- }
- /* Should this be allowed ? */
- else // if (ot<0)
- {
- m_rails_temp[k].add(term, ot, true);
- log().fatal("found term with missing othernet {1}\n", term->name());
- }
- }
-}
-
-
-template <unsigned m_N, unsigned _storage_N>
ATTR_COLD void matrix_solver_sm_t<m_N, _storage_N>::vsetup(analog_net_t::list_t &nets)
{
if (m_dim < nets.size())
log().fatal("Dimension {1} less than {2}", m_dim, nets.size());
- for (unsigned k = 0; k < N(); k++)
- {
- m_terms[k]->clear();
- m_rails_temp[k].clear();
- }
-
matrix_solver_t::setup_base(nets);
for (unsigned k = 0; k < N(); k++)
{
m_terms[k]->m_railstart = m_terms[k]->count();
- for (unsigned i = 0; i < m_rails_temp[k].count(); i++)
- this->m_terms[k]->add(m_rails_temp[k].terms()[i], m_rails_temp[k].net_other()[i], false);
+ for (unsigned i = 0; i < m_rails_temp[k]->count(); i++)
+ this->m_terms[k]->add(m_rails_temp[k]->terms()[i], m_rails_temp[k]->net_other()[i], false);
- m_rails_temp[k].clear(); // no longer needed
+ m_rails_temp[k]->clear(); // no longer needed
m_terms[k]->set_pointers();
}
@@ -314,13 +227,13 @@ ATTR_COLD void matrix_solver_sm_t<m_N, _storage_N>::vsetup(analog_net_t::list_t
* save states
*/
save(NLNAME(m_last_RHS));
- save(NLNAME(m_last_V));
for (unsigned k = 0; k < N(); k++)
{
pstring num = pfmt("{1}")(k);
save(RHS(k), "RHS" + num);
+ save(m_terms[k]->m_last_V, "lastV" + num);
save(m_terms[k]->go(),"GO" + num, m_terms[k]->count());
save(m_terms[k]->gt(),"GT" + num, m_terms[k]->count());
@@ -330,59 +243,6 @@ ATTR_COLD void matrix_solver_sm_t<m_N, _storage_N>::vsetup(analog_net_t::list_t
}
-template <unsigned m_N, unsigned _storage_N>
-void matrix_solver_sm_t<m_N, _storage_N>::build_LE_A()
-{
- const unsigned iN = N();
- for (unsigned k = 0; k < iN; k++)
- {
- for (unsigned i=0; i < iN; i++)
- A(k,i) = 0.0;
-
- const unsigned terms_count = m_terms[k]->count();
- const unsigned railstart = m_terms[k]->m_railstart;
- const nl_double * RESTRICT gt = m_terms[k]->gt();
-
- {
- nl_double akk = 0.0;
- for (unsigned i = 0; i < terms_count; i++)
- akk += gt[i];
-
- A(k,k) = akk;
- }
-
- const nl_double * RESTRICT go = m_terms[k]->go();
- const int * RESTRICT net_other = m_terms[k]->net_other();
-
- for (unsigned i = 0; i < railstart; i++)
- A(k,net_other[i]) -= go[i];
- }
-}
-
-template <unsigned m_N, unsigned _storage_N>
-void matrix_solver_sm_t<m_N, _storage_N>::build_LE_RHS()
-{
- const unsigned iN = N();
- for (unsigned k = 0; k < iN; k++)
- {
- nl_double rhsk_a = 0.0;
- nl_double rhsk_b = 0.0;
-
- const int terms_count = m_terms[k]->count();
- const nl_double * RESTRICT go = m_terms[k]->go();
- const nl_double * RESTRICT Idr = m_terms[k]->Idr();
- const nl_double * const * RESTRICT other_cur_analog = m_terms[k]->other_curanalog();
-
- for (int i = 0; i < terms_count; i++)
- rhsk_a = rhsk_a + Idr[i];
-
- for (int i = m_terms[k]->m_railstart; i < terms_count; i++)
- //rhsk = rhsk + go[i] * terms[i]->m_otherterm->net().as_analog().Q_Analog();
- rhsk_b = rhsk_b + go[i] * *other_cur_analog[i];
-
- RHS(k) = rhsk_a + rhsk_b;
- }
-}
template <unsigned m_N, unsigned _storage_N>
void matrix_solver_sm_t<m_N, _storage_N>::LE_invert()
@@ -454,49 +314,20 @@ void matrix_solver_sm_t<m_N, _storage_N>::LE_compute_x(
{
const unsigned kN = N();
- for (int i=0; i<kN; i++)
+ for (unsigned i=0; i<kN; i++)
x[i] = 0.0;
- for (int k=0; k<kN; k++)
+ for (unsigned k=0; k<kN; k++)
{
const nl_double f = RHS(k);
- for (int i=0; i<kN; i++)
+ for (unsigned i=0; i<kN; i++)
x[i] += Ainv(i,k) * f;
}
}
template <unsigned m_N, unsigned _storage_N>
-template <typename T>
-T matrix_solver_sm_t<m_N, _storage_N>::delta(
- const T * RESTRICT V)
-{
- /* FIXME: Ideally we should also include currents (RHS) here. This would
- * need a revaluation of the right hand side after voltages have been updated
- * and thus belong into a different calculation. This applies to all solvers.
- */
-
- const unsigned iN = this->N();
- T cerr = 0;
- for (unsigned i = 0; i < iN; i++)
- cerr = std::fmax(cerr, nl_math::abs(V[i] - (T) this->m_nets[i]->m_cur_Analog));
- return cerr;
-}
-
-template <unsigned m_N, unsigned _storage_N>
-template <typename T>
-void matrix_solver_sm_t<m_N, _storage_N>::store(
- const T * RESTRICT V)
-{
- for (unsigned i = 0, iN=N(); i < iN; i++)
- {
- this->m_nets[i]->m_cur_Analog = V[i];
- }
-}
-
-
-template <unsigned m_N, unsigned _storage_N>
int matrix_solver_sm_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool newton_raphson)
{
static const bool incremental = true;
@@ -514,11 +345,11 @@ int matrix_solver_sm_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const boo
{
if (!incremental)
{
- for (int row = 0; row < iN; row ++)
- for (int k = 0; k < iN; k++)
+ for (unsigned row = 0; row < iN; row ++)
+ for (unsigned k = 0; k < iN; k++)
Ainv(row,k) = lAinv(row, k);
}
- for (int row = 0; row < iN; row ++)
+ for (unsigned row = 0; row < iN; row ++)
{
nl_double v[m_pitch] = {0};
unsigned cols[m_pitch];
@@ -555,11 +386,11 @@ int matrix_solver_sm_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const boo
}
lamba = -1.0 / (1.0 + lamba);
- for (int i=0; i<iN; i++)
+ for (unsigned i=0; i<iN; i++)
{
const nl_double f = lamba * z[i];
if (f != 0.0)
- for (int k = 0; k < iN; k++)
+ for (unsigned k = 0; k < iN; k++)
Ainv(i,k) += f * w[k];
}
}
@@ -589,8 +420,8 @@ int matrix_solver_sm_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const boo
template <unsigned m_N, unsigned _storage_N>
inline int matrix_solver_sm_t<m_N, _storage_N>::vsolve_non_dynamic(const bool newton_raphson)
{
- this->build_LE_A();
- this->build_LE_RHS();
+ this->build_LE_A(*this);
+ this->build_LE_RHS(*this);
for (unsigned i=0, iN=N(); i < iN; i++)
m_last_RHS[i] = RHS(i);
@@ -604,15 +435,12 @@ matrix_solver_sm_t<m_N, _storage_N>::matrix_solver_sm_t(const solver_parameters_
: matrix_solver_t(GAUSSIAN_ELIMINATION, params)
, m_dim(size)
{
- m_rails_temp = palloc_array(terms_t, N());
#if (NL_USE_DYNAMIC_ALLOCATION)
m_A = palloc_array(nl_ext_double, N() * m_pitch);
#endif
for (unsigned k = 0; k < N(); k++)
{
- m_terms[k] = palloc(terms_t);
m_last_RHS[k] = 0.0;
- m_last_V[k] = 0.0;
}
}
@@ -621,15 +449,12 @@ matrix_solver_sm_t<m_N, _storage_N>::matrix_solver_sm_t(const eSolverType type,
: matrix_solver_t(type, params)
, m_dim(size)
{
- m_rails_temp = palloc_array(terms_t, N());
#if (NL_USE_DYNAMIC_ALLOCATION)
m_A = palloc_array(nl_ext_double, N() * m_pitch);
#endif
for (unsigned k = 0; k < N(); k++)
{
- m_terms[k] = palloc(terms_t);
m_last_RHS[k] = 0.0;
- m_last_V[k] = 0.0;
}
}
diff --git a/src/lib/netlist/solver/nld_ms_sor_mat.h b/src/lib/netlist/solver/nld_ms_sor_mat.h
index a4fce8dec2a..10192717a90 100644
--- a/src/lib/netlist/solver/nld_ms_sor_mat.h
+++ b/src/lib/netlist/solver/nld_ms_sor_mat.h
@@ -128,8 +128,8 @@ int matrix_solver_SOR_mat_t<m_N, _storage_N>::vsolve_non_dynamic(const bool newt
int resched_cnt = 0;
- this->build_LE_A();
- this->build_LE_RHS();
+ this->build_LE_A(*this);
+ this->build_LE_RHS(*this);
#if 0
static int ws_cnt = 0;
diff --git a/src/lib/netlist/solver/nld_ms_w.h b/src/lib/netlist/solver/nld_ms_w.h
index b3af357611d..aa6f7104c6c 100644
--- a/src/lib/netlist/solver/nld_ms_w.h
+++ b/src/lib/netlist/solver/nld_ms_w.h
@@ -15,7 +15,7 @@
* Whilst the book proposes to invert the matrix R=(I+transpose(V)*Z) we define
*
* w = transpose(V)*y
- * a = R????? * w
+ * a = Râ»Â¹ * w
*
* and consequently
*
@@ -43,6 +43,7 @@
#include <algorithm>
#include "solver/nld_solver.h"
+#include "solver/nld_matrix_solver.h"
#include "solver/vector_base.h"
NETLIB_NAMESPACE_DEVICES_START()
@@ -54,6 +55,7 @@ NETLIB_NAMESPACE_DEVICES_START()
template <unsigned m_N, unsigned _storage_N>
class matrix_solver_w_t: public matrix_solver_t
{
+ friend class matrix_solver_t;
public:
matrix_solver_w_t(const solver_parameters_t *params, const int size);
@@ -65,26 +67,16 @@ public:
virtual void reset() override { matrix_solver_t::reset(); }
protected:
- virtual void add_term(int net_idx, terminal_t *term) override;
virtual int vsolve_non_dynamic(const bool newton_raphson) override;
int solve_non_dynamic(const bool newton_raphson);
- inline const unsigned N() const { if (m_N == 0) return m_dim; else return m_N; }
+ inline unsigned N() const { if (m_N == 0) return m_dim; else return m_N; }
- void build_LE_A();
- void build_LE_RHS();
void LE_invert();
template <typename T>
void LE_compute_x(T * RESTRICT x);
- template <typename T>
- T delta(const T * RESTRICT V);
-
- template <typename T>
- void store(const T * RESTRICT V);
-
- virtual netlist_time compute_next_timestep() override;
template <typename T1, typename T2>
inline nl_ext_double &A(const T1 &r, const T2 &c) { return m_A[r][c]; }
@@ -102,10 +94,6 @@ protected:
inline nl_ext_double &lA(const T1 &r, const T2 &c) { return m_lA[r][c]; }
ATTR_ALIGN nl_double m_last_RHS[_storage_N]; // right hand side - contains currents
- ATTR_ALIGN nl_double m_last_V[_storage_N];
-
- terms_t * m_terms[_storage_N];
- terms_t *m_rails_temp;
private:
static const std::size_t m_pitch = ((( _storage_N) + 7) / 8) * 8;
@@ -137,102 +125,26 @@ private:
template <unsigned m_N, unsigned _storage_N>
matrix_solver_w_t<m_N, _storage_N>::~matrix_solver_w_t()
{
- for (unsigned k = 0; k < N(); k++)
- {
- pfree(m_terms[k]);
- }
- pfree_array(m_rails_temp);
#if (NL_USE_DYNAMIC_ALLOCATION)
pfree_array(m_A);
#endif
}
template <unsigned m_N, unsigned _storage_N>
-netlist_time matrix_solver_w_t<m_N, _storage_N>::compute_next_timestep()
-{
- nl_double new_solver_timestep = m_params.m_max_timestep;
-
- if (m_params.m_dynamic)
- {
- /*
- * FIXME: We should extend the logic to use either all nets or
- * only output nets.
- */
- for (unsigned k = 0, iN=N(); k < iN; k++)
- {
- analog_net_t *n = m_nets[k];
-
- const nl_double DD_n = (n->Q_Analog() - m_last_V[k]);
- const nl_double hn = current_timestep();
-
- nl_double DD2 = (DD_n / hn - n->m_DD_n_m_1 / n->m_h_n_m_1) / (hn + n->m_h_n_m_1);
- nl_double new_net_timestep;
-
- n->m_h_n_m_1 = hn;
- n->m_DD_n_m_1 = DD_n;
- if (nl_math::abs(DD2) > NL_FCONST(1e-30)) // avoid div-by-zero
- new_net_timestep = nl_math::sqrt(m_params.m_lte / nl_math::abs(NL_FCONST(0.5)*DD2));
- else
- new_net_timestep = m_params.m_max_timestep;
-
- if (new_net_timestep < new_solver_timestep)
- new_solver_timestep = new_net_timestep;
-
- m_last_V[k] = n->Q_Analog();
- }
- if (new_solver_timestep < m_params.m_min_timestep)
- new_solver_timestep = m_params.m_min_timestep;
- }
- //if (new_solver_timestep > 10.0 * hn)
- // new_solver_timestep = 10.0 * hn;
- return netlist_time::from_double(new_solver_timestep);
-}
-
-template <unsigned m_N, unsigned _storage_N>
-ATTR_COLD void matrix_solver_w_t<m_N, _storage_N>::add_term(int k, terminal_t *term)
-{
- if (term->m_otherterm->net().isRailNet())
- {
- m_rails_temp[k].add(term, -1, false);
- }
- else
- {
- int ot = get_net_idx(&term->m_otherterm->net());
- if (ot>=0)
- {
- m_terms[k]->add(term, ot, true);
- }
- /* Should this be allowed ? */
- else // if (ot<0)
- {
- m_rails_temp[k].add(term, ot, true);
- log().fatal("found term with missing othernet {1}\n", term->name());
- }
- }
-}
-
-
-template <unsigned m_N, unsigned _storage_N>
ATTR_COLD void matrix_solver_w_t<m_N, _storage_N>::vsetup(analog_net_t::list_t &nets)
{
if (m_dim < nets.size())
log().fatal("Dimension {1} less than {2}", m_dim, nets.size());
- for (unsigned k = 0; k < N(); k++)
- {
- m_terms[k]->clear();
- m_rails_temp[k].clear();
- }
-
matrix_solver_t::setup_base(nets);
for (unsigned k = 0; k < N(); k++)
{
m_terms[k]->m_railstart = m_terms[k]->count();
- for (unsigned i = 0; i < m_rails_temp[k].count(); i++)
- this->m_terms[k]->add(m_rails_temp[k].terms()[i], m_rails_temp[k].net_other()[i], false);
+ for (unsigned i = 0; i < m_rails_temp[k]->count(); i++)
+ this->m_terms[k]->add(m_rails_temp[k]->terms()[i], m_rails_temp[k]->net_other()[i], false);
- m_rails_temp[k].clear(); // no longer needed
+ m_rails_temp[k]->clear(); // no longer needed
m_terms[k]->set_pointers();
}
@@ -328,13 +240,13 @@ ATTR_COLD void matrix_solver_w_t<m_N, _storage_N>::vsetup(analog_net_t::list_t &
* save states
*/
save(NLNAME(m_last_RHS));
- save(NLNAME(m_last_V));
for (unsigned k = 0; k < N(); k++)
{
pstring num = pfmt("{1}")(k);
save(RHS(k), "RHS" + num);
+ save(m_terms[k]->m_last_V, "lastV" + num);
save(m_terms[k]->go(),"GO" + num, m_terms[k]->count());
save(m_terms[k]->gt(),"GT" + num, m_terms[k]->count());
@@ -344,59 +256,6 @@ ATTR_COLD void matrix_solver_w_t<m_N, _storage_N>::vsetup(analog_net_t::list_t &
}
-template <unsigned m_N, unsigned _storage_N>
-void matrix_solver_w_t<m_N, _storage_N>::build_LE_A()
-{
- const unsigned iN = N();
- for (unsigned k = 0; k < iN; k++)
- {
- for (unsigned i=0; i < iN; i++)
- A(k,i) = 0.0;
-
- const unsigned terms_count = m_terms[k]->count();
- const unsigned railstart = m_terms[k]->m_railstart;
- const nl_double * RESTRICT gt = m_terms[k]->gt();
-
- {
- nl_double akk = 0.0;
- for (unsigned i = 0; i < terms_count; i++)
- akk += gt[i];
-
- A(k,k) = akk;
- }
-
- const nl_double * RESTRICT go = m_terms[k]->go();
- const int * RESTRICT net_other = m_terms[k]->net_other();
-
- for (unsigned i = 0; i < railstart; i++)
- A(k,net_other[i]) -= go[i];
- }
-}
-
-template <unsigned m_N, unsigned _storage_N>
-void matrix_solver_w_t<m_N, _storage_N>::build_LE_RHS()
-{
- const unsigned iN = N();
- for (unsigned k = 0; k < iN; k++)
- {
- nl_double rhsk_a = 0.0;
- nl_double rhsk_b = 0.0;
-
- const int terms_count = m_terms[k]->count();
- const nl_double * RESTRICT go = m_terms[k]->go();
- const nl_double * RESTRICT Idr = m_terms[k]->Idr();
- const nl_double * const * RESTRICT other_cur_analog = m_terms[k]->other_curanalog();
-
- for (int i = 0; i < terms_count; i++)
- rhsk_a = rhsk_a + Idr[i];
-
- for (int i = m_terms[k]->m_railstart; i < terms_count; i++)
- //rhsk = rhsk + go[i] * terms[i]->m_otherterm->net().as_analog().Q_Analog();
- rhsk_b = rhsk_b + go[i] * *other_cur_analog[i];
-
- RHS(k) = rhsk_a + rhsk_b;
- }
-}
template <unsigned m_N, unsigned _storage_N>
void matrix_solver_w_t<m_N, _storage_N>::LE_invert()
@@ -467,48 +326,20 @@ void matrix_solver_w_t<m_N, _storage_N>::LE_compute_x(
{
const unsigned kN = N();
- for (int i=0; i<kN; i++)
+ for (unsigned i=0; i<kN; i++)
x[i] = 0.0;
- for (int k=0; k<kN; k++)
+ for (unsigned k=0; k<kN; k++)
{
const nl_double f = RHS(k);
- for (int i=0; i<kN; i++)
+ for (unsigned i=0; i<kN; i++)
x[i] += Ainv(i,k) * f;
}
}
template <unsigned m_N, unsigned _storage_N>
-template <typename T>
-T matrix_solver_w_t<m_N, _storage_N>::delta(
- const T * RESTRICT V)
-{
- /* FIXME: Ideally we should also include currents (RHS) here. This would
- * need a revaluation of the right hand side after voltages have been updated
- * and thus belong into a different calculation. This applies to all solvers.
- */
-
- const unsigned iN = this->N();
- T cerr = 0;
- for (unsigned i = 0; i < iN; i++)
- cerr = std::fmax(cerr, nl_math::abs(V[i] - (T) this->m_nets[i]->m_cur_Analog));
- return cerr;
-}
-
-template <unsigned m_N, unsigned _storage_N>
-template <typename T>
-void matrix_solver_w_t<m_N, _storage_N>::store(
- const T * RESTRICT V)
-{
- for (unsigned i = 0, iN=N(); i < iN; i++)
- {
- this->m_nets[i]->m_cur_Analog = V[i];
- }
-}
-
-template <unsigned m_N, unsigned _storage_N>
int matrix_solver_w_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool newton_raphson)
{
const auto iN = N();
@@ -531,7 +362,7 @@ int matrix_solver_w_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool
unsigned rowcount=0;
#define VT(r,c) (A(r,c) - lA(r,c))
- for (int row = 0; row < iN; row ++)
+ for (unsigned row = 0; row < iN; row ++)
{
unsigned cc=0;
auto &nz = m_terms[row]->m_nz;
@@ -596,7 +427,7 @@ int matrix_solver_w_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool
}
/* Back substitution */
//inv(H) w = t w = H t
- nl_double *t = new nl_double[rowcount];
+ nl_double t[_storage_N]; // FIXME: convert to member
for (int j = rowcount - 1; j >= 0; j--)
{
nl_double tmp = 0;
@@ -619,12 +450,20 @@ int matrix_solver_w_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool
}
new_V[i] -= tmp;
}
- delete[] t;
}
}
m_cnt++;
-
+ for (unsigned i=0; i<iN; i++)
+ {
+ nl_double tmp = 0.0;
+ for (unsigned j=0; j<iN; j++)
+ {
+ tmp += A(i,j) * new_V[j];
+ }
+ if (std::fabs(tmp-RHS(i)) > 1e-6)
+ printf("%s failed on row %d: %f RHS: %f\n", this->name().cstr(), i, std::fabs(tmp-RHS(i)), RHS(i));
+ }
if (newton_raphson)
{
nl_double err = delta(new_V);
@@ -643,8 +482,8 @@ int matrix_solver_w_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool
template <unsigned m_N, unsigned _storage_N>
inline int matrix_solver_w_t<m_N, _storage_N>::vsolve_non_dynamic(const bool newton_raphson)
{
- this->build_LE_A();
- this->build_LE_RHS();
+ this->build_LE_A(*this);
+ this->build_LE_RHS(*this);
for (unsigned i=0, iN=N(); i < iN; i++)
m_last_RHS[i] = RHS(i);
@@ -659,15 +498,12 @@ matrix_solver_w_t<m_N, _storage_N>::matrix_solver_w_t(const solver_parameters_t
,m_cnt(0)
, m_dim(size)
{
- m_rails_temp = palloc_array(terms_t, N());
#if (NL_USE_DYNAMIC_ALLOCATION)
m_A = palloc_array(nl_ext_double, N() * m_pitch);
#endif
for (unsigned k = 0; k < N(); k++)
{
- m_terms[k] = palloc(terms_t);
m_last_RHS[k] = 0.0;
- m_last_V[k] = 0.0;
}
}
@@ -677,12 +513,9 @@ matrix_solver_w_t<m_N, _storage_N>::matrix_solver_w_t(const eSolverType type, co
,m_cnt(0)
, m_dim(size)
{
- m_rails_temp = palloc_array(terms_t, N());
for (unsigned k = 0; k < N(); k++)
{
- m_terms[k] = palloc(terms_t);
m_last_RHS[k] = 0.0;
- m_last_V[k] = 0.0;
}
}
diff --git a/src/lib/netlist/solver/nld_solver.cpp b/src/lib/netlist/solver/nld_solver.cpp
index ed011ff254d..5dd0af53313 100644
--- a/src/lib/netlist/solver/nld_solver.cpp
+++ b/src/lib/netlist/solver/nld_solver.cpp
@@ -108,6 +108,11 @@ ATTR_COLD matrix_solver_t::matrix_solver_t(const eSolverType type, const solver_
ATTR_COLD matrix_solver_t::~matrix_solver_t()
{
m_inps.clear_and_free();
+ for (unsigned k = 0; k < m_terms.size(); k++)
+ {
+ pfree(m_terms[k]);
+ }
+
}
ATTR_COLD void matrix_solver_t::setup_base(analog_net_t::list_t &nets)
@@ -115,9 +120,14 @@ ATTR_COLD void matrix_solver_t::setup_base(analog_net_t::list_t &nets)
log().debug("New solver setup\n");
m_nets.clear();
+ m_terms.clear();
for (auto & net : nets)
+ {
m_nets.push_back(net);
+ m_terms.push_back(palloc(terms_t));
+ m_rails_temp.push_back(palloc(terms_t));
+ }
for (std::size_t k = 0; k < nets.size(); k++)
{
@@ -168,6 +178,9 @@ ATTR_COLD void matrix_solver_t::setup_base(analog_net_t::list_t &nets)
if (net_proxy_output == NULL)
{
+ //net_proxy_output = palloc(analog_output_t(*this,
+ // this->name() + "." + pfmt("m{1}")(m_inps.size())));
+
net_proxy_output = palloc(analog_output_t);
net_proxy_output->init_object(*this, this->name() + "." + pfmt("m{1}")(m_inps.size()));
m_inps.push_back(net_proxy_output);
@@ -308,6 +321,70 @@ ATTR_COLD int matrix_solver_t::get_net_idx(net_t *net)
return -1;
}
+ATTR_COLD void matrix_solver_t::add_term(int k, terminal_t *term)
+{
+ if (term->m_otherterm->net().isRailNet())
+ {
+ m_rails_temp[k]->add(term, -1, false);
+ }
+ else
+ {
+ int ot = get_net_idx(&term->m_otherterm->net());
+ if (ot>=0)
+ {
+ m_terms[k]->add(term, ot, true);
+ }
+ /* Should this be allowed ? */
+ else // if (ot<0)
+ {
+ m_rails_temp[k]->add(term, ot, true);
+ log().fatal("found term with missing othernet {1}\n", term->name());
+ }
+ }
+}
+
+netlist_time matrix_solver_t::compute_next_timestep()
+{
+ nl_double new_solver_timestep = m_params.m_max_timestep;
+
+ if (m_params.m_dynamic)
+ {
+ /*
+ * FIXME: We should extend the logic to use either all nets or
+ * only output nets.
+ */
+ for (unsigned k = 0, iN=m_terms.size(); k < iN; k++)
+ {
+ analog_net_t *n = m_nets[k];
+
+ const nl_double DD_n = (n->Q_Analog() - m_terms[k]->m_last_V);
+ const nl_double hn = current_timestep();
+
+ nl_double DD2 = (DD_n / hn - n->m_DD_n_m_1 / n->m_h_n_m_1) / (hn + n->m_h_n_m_1);
+ nl_double new_net_timestep;
+
+ n->m_h_n_m_1 = hn;
+ n->m_DD_n_m_1 = DD_n;
+ if (nl_math::abs(DD2) > NL_FCONST(1e-30)) // avoid div-by-zero
+ new_net_timestep = nl_math::sqrt(m_params.m_lte / nl_math::abs(NL_FCONST(0.5)*DD2));
+ else
+ new_net_timestep = m_params.m_max_timestep;
+
+ if (new_net_timestep < new_solver_timestep)
+ new_solver_timestep = new_net_timestep;
+
+ m_terms[k]->m_last_V = n->Q_Analog();
+ }
+ if (new_solver_timestep < m_params.m_min_timestep)
+ new_solver_timestep = m_params.m_min_timestep;
+ }
+ //if (new_solver_timestep > 10.0 * hn)
+ // new_solver_timestep = 10.0 * hn;
+ return netlist_time::from_double(new_solver_timestep);
+}
+
+
+
void matrix_solver_t::log_stats()
{
if (this->m_stat_calculations != 0 && this->m_stat_vsolver_calls && this->m_params.m_log_stats)
diff --git a/src/lib/util/chdcodec.cpp b/src/lib/util/chdcodec.cpp
index be1d2022cd7..ba1840489d6 100644
--- a/src/lib/util/chdcodec.cpp
+++ b/src/lib/util/chdcodec.cpp
@@ -1128,20 +1128,35 @@ chd_lzma_decompressor::chd_lzma_decompressor(chd_file &chd, UINT32 hunkbytes, bo
// construct the decoder
LzmaDec_Construct(&m_decoder);
+ // FIXME: this code is written in a way that makes it impossible to safely upgrade the LZMA SDK
+ // This code assumes that the current version of the encoder imposes the same requirements on the
+ // decoder as the encoder used to produce the file. This is not necessarily true. The format
+ // needs to be changed so the encoder properties are written to the file.
+
// configure the properties like the compressor did
CLzmaEncProps encoder_props;
chd_lzma_compressor::configure_properties(encoder_props, hunkbytes);
// convert to decoder properties
- CLzmaProps decoder_props;
- decoder_props.lc = encoder_props.lc;
- decoder_props.lp = encoder_props.lp;
- decoder_props.pb = encoder_props.pb;
- decoder_props.dicSize = encoder_props.dictSize;
+ CLzmaEncHandle enc = LzmaEnc_Create(&m_allocator);
+ if (!enc)
+ throw CHDERR_DECOMPRESSION_ERROR;
+ if (LzmaEnc_SetProps(enc, &encoder_props) != SZ_OK)
+ {
+ LzmaEnc_Destroy(enc, &m_allocator, &m_allocator);
+ throw CHDERR_DECOMPRESSION_ERROR;
+ }
+ Byte decoder_props[LZMA_PROPS_SIZE];
+ SizeT props_size = sizeof(decoder_props);
+ if (LzmaEnc_WriteProperties(enc, decoder_props, &props_size) != SZ_OK)
+ {
+ LzmaEnc_Destroy(enc, &m_allocator, &m_allocator);
+ throw CHDERR_DECOMPRESSION_ERROR;
+ }
+ LzmaEnc_Destroy(enc, &m_allocator, &m_allocator);
// do memory allocations
- SRes res = LzmaDec_Allocate_MAME(&m_decoder, &decoder_props, &m_allocator);
- if (res != SZ_OK)
+ if (LzmaDec_Allocate(&m_decoder, decoder_props, LZMA_PROPS_SIZE, &m_allocator) != SZ_OK)
throw CHDERR_DECOMPRESSION_ERROR;
}
diff --git a/src/lib/util/chdcodec.h b/src/lib/util/chdcodec.h
index f517cdedeeb..bfde8d2cde7 100644
--- a/src/lib/util/chdcodec.h
+++ b/src/lib/util/chdcodec.h
@@ -14,6 +14,7 @@
#define __CHDCODEC_H__
#include "osdcore.h"
+#include "coretmpl.h"
#define CHDCODEC_VERIFY_COMPRESSION 0
diff --git a/src/lib/util/delegate.h b/src/lib/util/delegate.h
index 6b4f6a01f58..ae469f86ed7 100644
--- a/src/lib/util/delegate.h
+++ b/src/lib/util/delegate.h
@@ -83,7 +83,7 @@
#include <typeinfo>
#include <utility>
#include <cstring>
-
+#include <cstdint>
//**************************************************************************
// MACROS
diff --git a/src/lib/util/nanosvg.cpp b/src/lib/util/nanosvg.cpp
new file mode 100644
index 00000000000..09973865675
--- /dev/null
+++ b/src/lib/util/nanosvg.cpp
@@ -0,0 +1,6 @@
+#define NANOSVG_IMPLEMENTATION
+#define NANOSVGRAST_IMPLEMENTATION
+#define NANOSVG_ALL_COLOR_KEYWORDS
+
+#include <nanosvg/src/nanosvg.h>
+#include <nanosvg/src/nanosvgrast.h>
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp
index 7e8b993c0b2..f8ef33b0d39 100644
--- a/src/lib/util/options.cpp
+++ b/src/lib/util/options.cpp
@@ -146,13 +146,13 @@ void core_options::entry::set_flag(UINT32 mask, UINT32 flag)
//-------------------------------------------------
// revert - revert back to our default if we are
-// at or below the given priority
+// within the given priority range
//-------------------------------------------------
-void core_options::entry::revert(int priority)
+void core_options::entry::revert(int priority_hi, int priority_lo)
{
- // if our priority is low enough, revert to the default
- if (m_priority <= priority)
+ // if our priority is within the range, revert to the default
+ if (m_priority <= priority_hi && m_priority >= priority_lo)
{
m_data = m_defdata;
m_priority = OPTION_PRIORITY_DEFAULT;
@@ -465,11 +465,11 @@ bool core_options::parse_ini_file(util::core_file &inifile, int priority, int ig
// priority back to their defaults
//-------------------------------------------------
-void core_options::revert(int priority)
+void core_options::revert(int priority_hi, int priority_lo)
{
// iterate over options and revert to defaults if below the given priority
for (entry &curentry : m_entrylist)
- curentry.revert(priority);
+ curentry.revert(priority_hi, priority_lo);
}
@@ -836,3 +836,9 @@ bool core_options::validate_and_set_data(core_options::entry &curentry, const ch
curentry.set_value(data.c_str(), priority);
return true;
}
+
+core_options::entry *core_options::get_entry(const char *name) const
+{
+ auto curentry = m_entrymap.find(name);
+ return (curentry != m_entrymap.end()) ? curentry->second : nullptr;
+} \ No newline at end of file
diff --git a/src/lib/util/options.h b/src/lib/util/options.h
index 9af9c61233e..ff1cad115de 100644
--- a/src/lib/util/options.h
+++ b/src/lib/util/options.h
@@ -97,7 +97,7 @@ public:
void set_description(const char *description);
void set_flag(UINT32 mask, UINT32 flag);
void mark_changed() { m_changed = true; }
- void revert(int priority);
+ void revert(int priority_hi, int priority_lo);
private:
// internal state
@@ -131,6 +131,7 @@ public:
// getters
entry *first() const { return m_entrylist.first(); }
const char *command() const { return m_command.c_str(); }
+ entry *get_entry(const char *name) const;
// range iterators
using auto_iterator = simple_list<entry>::auto_iterator;
@@ -150,7 +151,7 @@ public:
bool parse_ini_file(util::core_file &inifile, int priority, int ignore_priority, std::string &error_string);
// reverting
- void revert(int priority = OPTION_PRIORITY_MAXIMUM);
+ void revert(int priority_hi = OPTION_PRIORITY_MAXIMUM, int priority_lo = OPTION_PRIORITY_DEFAULT);
// output
std::string output_ini(const core_options *diff = nullptr) const;
diff --git a/src/lib/util/plaparse.h b/src/lib/util/plaparse.h
index db85fac6ffd..e3bfcaf0e2a 100644
--- a/src/lib/util/plaparse.h
+++ b/src/lib/util/plaparse.h
@@ -12,7 +12,7 @@
#define __PLAPARSE_H__
#include "osdcore.h"
-
+#include "jedparse.h"
/***************************************************************************
diff --git a/src/lib/util/un7z.cpp b/src/lib/util/un7z.cpp
index b3d18dcdb8e..95f34179ea0 100644
--- a/src/lib/util/un7z.cpp
+++ b/src/lib/util/un7z.cpp
@@ -16,8 +16,9 @@
#include "unicode.h"
#include "lzma/C/7z.h"
+#include "lzma/C/7zAlloc.h"
#include "lzma/C/7zCrc.h"
-#include "lzma/C/7zVersion.h"
+#include "lzma/C/7zTypes.h"
#include <algorithm>
#include <array>
@@ -40,41 +41,41 @@ struct CSzFile
{
CSzFile() : currfpos(0), length(0), osdfile() {}
- long currfpos;
+ std::uint64_t currfpos;
std::uint64_t length;
osd_file::ptr osdfile;
- WRes read(void *data, std::size_t &size)
+ SRes read(void *data, std::size_t &size)
{
if (!osdfile)
{
- std::printf("un7z.c: called File_Read without file\n");
- return 1;
+ osd_printf_error("un7z: called CSzFile::read without file\n");
+ return SZ_ERROR_READ;
}
- if (!size) return 0;
- size_t originalSize = size;
+ if (!size)
+ return SZ_OK;
- std::uint32_t read_length;
- //osd_file::error err =
- osdfile->read(data, currfpos, originalSize, read_length);
+ // TODO: this casts a size_t to a uint32_t, so it will fail if >=4GB is requested at once (need a loop)
+ std::uint32_t read_length(0);
+ auto const err = osdfile->read(data, currfpos, size, read_length);
size = read_length;
currfpos += read_length;
- if (size == originalSize)
- return 0;
-
- return 0;
+ return (osd_file::error::NONE == err) ? SZ_OK : SZ_ERROR_READ;
}
- WRes seek(Int64 &pos, ESzSeek origin)
+ SRes seek(Int64 &pos, ESzSeek origin)
{
- if (origin == 0) currfpos = pos;
- if (origin == 1) currfpos = currfpos + pos;
- if (origin == 2) currfpos = length -pos;
-
+ switch (origin)
+ {
+ case SZ_SEEK_CUR: currfpos += pos; break;
+ case SZ_SEEK_SET: currfpos = pos; break;
+ case SZ_SEEK_END: currfpos = length + pos; break;
+ default: return SZ_ERROR_READ;
+ }
pos = currfpos;
- return 0;
+ return SZ_OK;
}
};
@@ -109,6 +110,7 @@ public:
{
ptr result;
std::swap(s_cache[cachenum], result);
+ osd_printf_verbose("un7z: found %s in cache\n", filename.c_str());
return result;
}
}
@@ -244,17 +246,6 @@ std::mutex m7z_file_impl::s_cache_mutex;
/* ---------- FileInStream ---------- */
extern "C" {
-static void *SZipAlloc(void *p, std::size_t size)
-{
- return (size == 0) ? nullptr : std::malloc(size);
-}
-
-static void SZipFree(void *p, void *address)
-{
- std::free(address);
-}
-
-
static SRes FileInStream_Read(void *pp, void *buf, size_t *size)
{
return (reinterpret_cast<CFileInStream *>(pp)->read(buf, *size) == 0) ? SZ_OK : SZ_ERROR_READ;
@@ -291,15 +282,19 @@ m7z_file_impl::m7z_file_impl(const std::string &filename)
, m_uchar_buf(128)
, m_utf8_buf(512)
, m_inited(false)
- , m_block_index(0xffffffff) // it can have any value before first call (if outBuffer = 0)
- , m_out_buffer(nullptr) // it must be 0 before first call for each new archive
- , m_out_buffer_size(0) // it can have any value before first call (if outBuffer = 0)
+ , m_block_index(0)
+ , m_out_buffer(nullptr)
+ , m_out_buffer_size(0)
{
- m_alloc_imp.Alloc = SZipAlloc;
- m_alloc_imp.Free = SZipFree;
+ m_alloc_imp.Alloc = &SzAlloc;
+ m_alloc_imp.Free = &SzFree;
+
+ m_alloc_temp_imp.Alloc = &SzAllocTemp;
+ m_alloc_temp_imp.Free = &SzFreeTemp;
- m_alloc_temp_imp.Alloc = SZipAlloc;
- m_alloc_temp_imp.Free = SZipFree;
+ LookToRead_CreateVTable(&m_look_stream, False);
+ m_look_stream.realStream = &m_archive_stream;
+ LookToRead_Init(&m_look_stream);
}
@@ -309,18 +304,24 @@ archive_file::error m7z_file_impl::initialize()
if (err != osd_file::error::NONE)
return archive_file::error::FILE_ERROR;
- LookToRead_CreateVTable(&m_look_stream, False);
- m_look_stream.realStream = &m_archive_stream;
- LookToRead_Init(&m_look_stream);
+ osd_printf_verbose("un7z: opened archive file %s\n", m_filename.c_str());
- CrcGenerateTable();
+ CrcGenerateTable(); // FIXME: doesn't belong here - it should be called once statically
SzArEx_Init(&m_db);
m_inited = true;
-
SRes const res = SzArEx_Open(&m_db, &m_look_stream.s, &m_alloc_imp, &m_alloc_temp_imp);
if (res != SZ_OK)
- return archive_file::error::FILE_ERROR;
+ {
+ osd_printf_error("un7z: error opening %s as 7z archive (%d)\n", m_filename.c_str(), int(res));
+ switch (res)
+ {
+ case SZ_ERROR_UNSUPPORTED: return archive_file::error::UNSUPPORTED;
+ case SZ_ERROR_MEM: return archive_file::error::OUT_OF_MEMORY;
+ case SZ_ERROR_INPUT_EOF: return archive_file::error::FILE_TRUNCATED;
+ default: return archive_file::error::FILE_ERROR;
+ }
+ }
return archive_file::error::NONE;
}
@@ -336,6 +337,7 @@ void m7z_file_impl::close(ptr &&archive)
if (!archive) return;
// close the open files
+ osd_printf_verbose("un7z: closing archive file %s and sending to cache\n", archive->m_filename.c_str());
archive->m_archive_stream.osdfile.reset();
// find the first NULL entry in the cache
@@ -347,7 +349,11 @@ void m7z_file_impl::close(ptr &&archive)
// if no room left in the cache, free the bottommost entry
if (cachenum == s_cache.size())
- s_cache[--cachenum].reset();
+ {
+ cachenum--;
+ osd_printf_verbose("un7z: removing %s from cache to make space\n", s_cache[cachenum]->m_filename.c_str());
+ s_cache[cachenum].reset();
+ }
// move everyone else down and place us at the top
for ( ; cachenum > 0; cachenum--)
@@ -368,30 +374,47 @@ void m7z_file_impl::close(ptr &&archive)
archive_file::error m7z_file_impl::decompress(void *buffer, std::uint32_t length)
{
+ // if we don't have enough buffer, error
+ if (length < m_curr_length)
+ {
+ osd_printf_error("un7z: buffer too small to decompress %s from %s\n", m_curr_name.c_str(), m_filename.c_str());
+ return archive_file::error::BUFFER_TOO_SMALL;
+ }
+
// make sure the file is open..
if (!m_archive_stream.osdfile)
{
m_archive_stream.currfpos = 0;
osd_file::error const err = osd_file::open(m_filename, OPEN_FLAG_READ, m_archive_stream.osdfile, m_archive_stream.length);
if (err != osd_file::error::NONE)
+ {
+ osd_printf_error("un7z: error reopening archive file %s (%d)\n", m_filename.c_str(), int(err));
return archive_file::error::FILE_ERROR;
+ }
+ osd_printf_verbose("un7z: reopened archive file %s\n", m_filename.c_str());
}
- size_t offset = 0;
- size_t out_size_processed = 0;
-
+ std::size_t offset(0);
+ std::size_t out_size_processed(0);
SRes const res = SzArEx_Extract(
- &m_db, &m_look_stream.s, m_curr_file_idx,
- &m_block_index,
- &m_out_buffer, &m_out_buffer_size,
- &offset, &out_size_processed,
- &m_alloc_imp, &m_alloc_temp_imp);
-
+ &m_db, &m_look_stream.s, m_curr_file_idx, // requested file
+ &m_block_index, &m_out_buffer, &m_out_buffer_size, // solid block caching
+ &offset, &out_size_processed, // data size/offset
+ &m_alloc_imp, &m_alloc_temp_imp); // allocator helpers
if (res != SZ_OK)
- return archive_file::error::FILE_ERROR;
-
- std::memcpy(buffer, m_out_buffer + offset, length);
+ {
+ osd_printf_error("un7z: error decompressing %s from %s (%d)\n", m_curr_name.c_str(), m_filename.c_str(), int(res));
+ switch (res)
+ {
+ case SZ_ERROR_UNSUPPORTED: return archive_file::error::UNSUPPORTED;
+ case SZ_ERROR_MEM: return archive_file::error::OUT_OF_MEMORY;
+ case SZ_ERROR_INPUT_EOF: return archive_file::error::FILE_TRUNCATED;
+ default: return archive_file::error::DECOMPRESS_ERROR;
+ }
+ }
+ // copy to destination buffer
+ std::memcpy(buffer, m_out_buffer + offset, (std::min<std::size_t>)(length, out_size_processed));
return archive_file::error::NONE;
}
@@ -404,25 +427,24 @@ int m7z_file_impl::search(
bool matchname,
bool partialpath)
{
- for ( ; i < m_db.db.NumFiles; i++)
+ for ( ; i < m_db.NumFiles; i++)
{
- const CSzFileItem &f(m_db.db.Files[i]);
-
make_utf8_name(i);
- const std::uint64_t size(f.Size);
- const std::uint32_t crc(f.Crc);
- const bool crcmatch(crc == search_crc);
+ bool const is_dir(SzArEx_IsDir(&m_db, i));
+ const std::uint64_t size(SzArEx_GetFileSize(&m_db, i));
+ const std::uint32_t crc(m_db.CRCs.Vals[i]);
+ const bool crcmatch(SzBitArray_Check(m_db.CRCs.Defs, i) && (crc == search_crc));
auto const partialoffset(m_utf8_buf.size() - 1 - search_filename.length());
bool const partialpossible((m_utf8_buf.size() > (search_filename.length() + 1)) && (m_utf8_buf[partialoffset - 1] == '/'));
const bool namematch(
!core_stricmp(search_filename.c_str(), &m_utf8_buf[0]) ||
(partialpath && partialpossible && !core_stricmp(search_filename.c_str(), &m_utf8_buf[partialoffset])));
- const bool found = ((!matchcrc && !matchname) || !f.IsDir) && (!matchcrc || crcmatch) && (!matchname || namematch);
+ const bool found = ((!matchcrc && !matchname) || !is_dir) && (!matchcrc || crcmatch) && (!matchname || namematch);
if (found)
{
m_curr_file_idx = i;
- m_curr_is_dir = bool(f.IsDir);
+ m_curr_is_dir = is_dir;
m_curr_name = &m_utf8_buf[0];
m_curr_length = size;
m_curr_crc = crc;
diff --git a/src/lib/util/unzip.cpp b/src/lib/util/unzip.cpp
index 6a9e407252d..cce6c812a76 100644
--- a/src/lib/util/unzip.cpp
+++ b/src/lib/util/unzip.cpp
@@ -11,9 +11,9 @@
#include "unzip.h"
#include "corestr.h"
+#include "hashing.h"
#include "osdcore.h"
-
#include <algorithm>
#include <array>
#include <cassert>
@@ -25,63 +25,12 @@
#include <zlib.h>
+#include "lzma/C/LzmaDec.h"
+
namespace util {
namespace {
/***************************************************************************
- CONSTANTS
-***************************************************************************/
-
-/* offsets in end of central directory structure */
-#define ZIPESIG 0x00
-#define ZIPEDSK 0x04
-#define ZIPECEN 0x06
-#define ZIPENUM 0x08
-#define ZIPECENN 0x0a
-#define ZIPECSZ 0x0c
-#define ZIPEOFST 0x10
-#define ZIPECOML 0x14
-#define ZIPECOM 0x16
-
-/* offsets in central directory entry structure */
-#define ZIPCENSIG 0x00
-#define ZIPCVER 0x04
-#define ZIPCOS 0x05
-#define ZIPCVXT 0x06
-#define ZIPCEXOS 0x07
-#define ZIPCFLG 0x08
-#define ZIPCMTHD 0x0a
-#define ZIPCTIM 0x0c
-#define ZIPCDAT 0x0e
-#define ZIPCCRC 0x10
-#define ZIPCSIZ 0x14
-#define ZIPCUNC 0x18
-#define ZIPCFNL 0x1c
-#define ZIPCXTL 0x1e
-#define ZIPCCML 0x20
-#define ZIPDSK 0x22
-#define ZIPINT 0x24
-#define ZIPEXT 0x26
-#define ZIPOFST 0x2a
-#define ZIPCFN 0x2e
-
-/* offsets in local file header structure */
-#define ZIPLOCSIG 0x00
-#define ZIPVER 0x04
-#define ZIPGENFLG 0x06
-#define ZIPMTHD 0x08
-#define ZIPTIME 0x0a
-#define ZIPDATE 0x0c
-#define ZIPCRC 0x0e
-#define ZIPSIZE 0x12
-#define ZIPUNCMP 0x16
-#define ZIPFNLN 0x1a
-#define ZIPXTRALN 0x1c
-#define ZIPNAME 0x1e
-
-
-
-/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
@@ -99,10 +48,8 @@ public:
, m_cd_pos(0)
, m_header()
, m_curr_is_dir(false)
- , m_curr_name()
, m_buffer()
{
- std::memset(&m_header, 0, sizeof(m_header));
std::fill(m_buffer.begin(), m_buffer.end(), 0);
}
@@ -116,6 +63,7 @@ public:
{
ptr result;
std::swap(s_cache[cachenum], result);
+ osd_printf_verbose("unzip: found %s in cache\n", filename.c_str());
return result;
}
}
@@ -137,18 +85,52 @@ public:
return ziperr;
// verify that we can work with this zipfile (no disk spanning allowed)
- if ((m_ecd.disk_number != m_ecd.cd_start_disk_number) || (m_ecd.cd_disk_entries != m_ecd.cd_total_entries))
+ if (m_ecd.disk_number != m_ecd.cd_start_disk_number)
+ {
+ osd_printf_error("unzip: %s central directory starts in another segment\n", m_filename.c_str());
return archive_file::error::UNSUPPORTED;
+ }
+ if (m_ecd.cd_disk_entries != m_ecd.cd_total_entries)
+ {
+ osd_printf_error("unzip: %s not all central directory entries reside in this segment\n", m_filename.c_str());
+ return archive_file::error::UNSUPPORTED;
+ }
+ if (std::size_t(m_ecd.cd_size) != m_ecd.cd_size)
+ {
+ osd_printf_error("unzip: %s central directory too large to load\n", m_filename.c_str());
+ return archive_file::error::UNSUPPORTED;
+ }
// allocate memory for the central directory
- try { m_cd.resize(m_ecd.cd_size + 1); }
- catch (...) { return archive_file::error::OUT_OF_MEMORY; }
+ try { m_cd.resize(std::size_t(m_ecd.cd_size)); }
+ catch (...)
+ {
+ osd_printf_error("unzip: %s failed to allocate memory for central directory\n", m_filename.c_str());
+ return archive_file::error::OUT_OF_MEMORY;
+ }
// read the central directory
- std::uint32_t read_length;
- auto const filerr = m_file->read(&m_cd[0], m_ecd.cd_start_disk_offset, m_ecd.cd_size, read_length);
- if ((filerr != osd_file::error::NONE) || (read_length != m_ecd.cd_size))
- return (filerr == osd_file::error::NONE) ? archive_file::error::FILE_TRUNCATED : archive_file::error::FILE_ERROR;
+ auto cd_remaining(m_ecd.cd_size);
+ std::size_t cd_offs(0);
+ while (cd_remaining)
+ {
+ std::uint32_t const chunk(std::uint32_t((std::min<std::uint64_t>)(std::numeric_limits<std::uint32_t>::max(), cd_remaining)));
+ std::uint32_t read_length(0);
+ auto const filerr = m_file->read(&m_cd[cd_offs], m_ecd.cd_start_disk_offset + cd_offs, chunk, read_length);
+ if (filerr != osd_file::error::NONE)
+ {
+ osd_printf_error("unzip: %s error reading central directory (%d)\n", m_filename.c_str(), int(filerr));
+ return archive_file::error::FILE_ERROR;
+ }
+ if (!read_length)
+ {
+ osd_printf_error("unzip: %s unexpectedly reached end-of-file while reading central directory\n", m_filename.c_str());
+ return archive_file::error::FILE_TRUNCATED;
+ }
+ cd_remaining -= read_length;
+ cd_offs += read_length;
+ }
+ osd_printf_verbose("unzip: read %s central directory\n", m_filename.c_str());
return archive_file::error::NONE;
}
@@ -180,7 +162,7 @@ public:
}
bool current_is_directory() const { return m_curr_is_dir; }
- const std::string &current_name() const { return m_curr_name; }
+ const std::string &current_name() const { return m_header.file_name; }
std::uint64_t current_uncompressed_length() const { return m_header.uncompressed_length; }
std::uint32_t current_crc() const { return m_header.crc; }
@@ -200,7 +182,15 @@ private:
{
auto const filerr = osd_file::open(m_filename, OPEN_FLAG_READ, m_file, m_length);
if (filerr != osd_file::error::NONE)
+ {
+ // this would spam every time it looks for a non-existent archive, which is a lot
+ //osd_printf_error("unzip: error reopening archive file %s (%d)\n", m_filename.c_str(), int(filerr));
return archive_file::error::FILE_ERROR;
+ }
+ else
+ {
+ osd_printf_verbose("unzip: opened archive file %s\n", m_filename.c_str());
+ }
}
return archive_file::error::NONE;
}
@@ -212,44 +202,31 @@ private:
// decompression interfaces
archive_file::error decompress_data_type_0(std::uint64_t offset, void *buffer, std::uint32_t length);
archive_file::error decompress_data_type_8(std::uint64_t offset, void *buffer, std::uint32_t length);
+ archive_file::error decompress_data_type_14(std::uint64_t offset, void *buffer, std::uint32_t length);
struct file_header
{
- std::uint32_t signature; // central file header signature
std::uint16_t version_created; // version made by
std::uint16_t version_needed; // version needed to extract
std::uint16_t bit_flag; // general purpose bit flag
std::uint16_t compression; // compression method
- std::uint16_t file_time; // last mod file time
- std::uint16_t file_date; // last mod file date
std::uint32_t crc; // crc-32
- std::uint32_t compressed_length; // compressed size
- std::uint32_t uncompressed_length; // uncompressed size
- std::uint16_t filename_length; // filename length
- std::uint16_t extra_field_length; // extra field length
- std::uint16_t file_comment_length; // file comment length
- std::uint16_t start_disk_number; // disk number start
- std::uint16_t internal_attributes; // internal file attributes
- std::uint32_t external_attributes; // external file attributes
- std::uint32_t local_header_offset; // relative offset of local header
- const char * filename; // filename
+ std::uint64_t compressed_length; // compressed size
+ std::uint64_t uncompressed_length; // uncompressed size
+ std::uint32_t start_disk_number; // disk number start
+ std::uint64_t local_header_offset; // relative offset of local header
+ std::string file_name; // file name
};
// contains extracted end of central directory information
struct ecd
{
- std::uint32_t signature; // end of central dir signature
- std::uint16_t disk_number; // number of this disk
- std::uint16_t cd_start_disk_number; // number of the disk with the start of the central directory
- std::uint16_t cd_disk_entries; // total number of entries in the central directory on this disk
- std::uint16_t cd_total_entries; // total number of entries in the central directory
- std::uint32_t cd_size; // size of the central directory
- std::uint32_t cd_start_disk_offset; // offset of start of central directory with respect to the starting disk number
- std::uint16_t comment_length; // .ZIP file comment length
- const char * comment; // .ZIP file comment
-
- std::unique_ptr<std::uint8_t []> raw; // pointer to the raw data
- std::uint32_t rawlength; // length of the raw data
+ std::uint32_t disk_number; // number of this disk
+ std::uint32_t cd_start_disk_number; // number of the disk with the start of the central directory
+ std::uint64_t cd_disk_entries; // total number of entries in the central directory on this disk
+ std::uint64_t cd_total_entries; // total number of entries in the central directory
+ std::uint64_t cd_size; // size of the central directory
+ std::uint64_t cd_start_disk_offset; // offset of start of central directory with respect to the starting disk number
};
static constexpr std::size_t DECOMPRESS_BUFSIZE = 16384;
@@ -267,7 +244,6 @@ private:
std::uint32_t m_cd_pos; // position in central directory
file_header m_header; // current file header
bool m_curr_is_dir; // current file is directory
- std::string m_curr_name; // current file name
std::array<std::uint8_t, DECOMPRESS_BUFSIZE> m_buffer; // buffer for decompression
};
@@ -307,40 +283,282 @@ private:
};
+class reader_base
+{
+protected:
+ reader_base(void const *buf) : m_buffer(reinterpret_cast<std::uint8_t const *>(buf)) { }
+
+ std::uint8_t read_byte(std::size_t offs) const
+ {
+ return m_buffer[offs];
+ }
+ std::uint16_t read_word(std::size_t offs) const
+ {
+ return
+ (std::uint16_t(m_buffer[offs + 1]) << 8) |
+ (std::uint16_t(m_buffer[offs + 0]) << 0);
+ }
+ std::uint32_t read_dword(std::size_t offs) const
+ {
+ return
+ (std::uint32_t(m_buffer[offs + 3]) << 24) |
+ (std::uint32_t(m_buffer[offs + 2]) << 16) |
+ (std::uint32_t(m_buffer[offs + 1]) << 8) |
+ (std::uint32_t(m_buffer[offs + 0]) << 0);
+ }
+ std::uint64_t read_qword(std::size_t offs) const
+ {
+ return
+ (std::uint64_t(m_buffer[offs + 7]) << 56) |
+ (std::uint64_t(m_buffer[offs + 6]) << 48) |
+ (std::uint64_t(m_buffer[offs + 5]) << 40) |
+ (std::uint64_t(m_buffer[offs + 4]) << 32) |
+ (std::uint64_t(m_buffer[offs + 3]) << 24) |
+ (std::uint64_t(m_buffer[offs + 2]) << 16) |
+ (std::uint64_t(m_buffer[offs + 1]) << 8) |
+ (std::uint64_t(m_buffer[offs + 0]) << 0);
+ }
+ std::string read_string(std::size_t offs, std::string::size_type len) const
+ {
+ return std::string(reinterpret_cast<char const *>(m_buffer + offs), len);
+ }
+ void read_string(std::string &result, std::size_t offs, std::string::size_type len) const
+ {
+ result.assign(reinterpret_cast<char const *>(m_buffer + offs), len);
+ }
+
+ std::uint8_t const *m_buffer;
+};
-/***************************************************************************
- INLINE FUNCTIONS
-***************************************************************************/
-/**
- * @fn static inline UINT16 read_word(UINT8 *buf)
- *
- * @brief Reads a word.
- *
- * @param [in,out] buf If non-null, the buffer.
- *
- * @return The word.
- */
-
-inline std::uint16_t read_word(std::uint8_t const *buf)
+class extra_field_reader : private reader_base
{
- return (buf[1] << 8) | buf[0];
-}
+public:
+ extra_field_reader(void const *buf, std::size_t len) : reader_base(buf), m_length(len) { }
+
+ std::uint16_t header_id() const { return read_word(0x00); }
+ std::uint16_t data_size() const { return read_word(0x02); }
+ void const * data() const { return m_buffer + 0x04; }
+ extra_field_reader next() const { return extra_field_reader(m_buffer + total_length(), m_length - total_length()); }
+
+ bool length_sufficient() const { return (m_length >= minimum_length()) && (m_length >= total_length()); }
+
+ std::size_t total_length() const { return minimum_length() + data_size(); }
+ static std::size_t minimum_length() { return 0x04; }
+
+private:
+ std::size_t m_length;
+};
+
-/**
- * @fn static inline UINT32 read_dword(UINT8 *buf)
- *
- * @brief Reads a double word.
- *
- * @param [in,out] buf If non-null, the buffer.
- *
- * @return The double word.
- */
-
-inline std::uint32_t read_dword(std::uint8_t const *buf)
+class local_file_header_reader : private reader_base
{
- return (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
-}
+public:
+ local_file_header_reader(void const *buf) : reader_base(buf) { }
+
+ std::uint32_t signature() const { return read_dword(0x00); }
+ std::uint8_t version_needed() const { return m_buffer[0x04]; }
+ std::uint8_t os_needed() const { return m_buffer[0x05]; }
+ std::uint16_t general_flag() const { return read_word(0x06); }
+ std::uint16_t compression_method() const { return read_word(0x08); }
+ std::uint16_t modified_time() const { return read_word(0x0a); }
+ std::uint16_t modified_date() const { return read_word(0x0c); }
+ std::uint32_t crc32() const { return read_dword(0x0e); }
+ std::uint32_t compressed_size() const { return read_dword(0x12); }
+ std::uint32_t uncompressed_size() const { return read_dword(0x16); }
+ std::uint16_t file_name_length() const { return read_word(0x1a); }
+ std::uint16_t extra_field_length() const { return read_word(0x1c); }
+ std::string file_name() const { return read_string(0x1e, file_name_length()); }
+ void file_name(std::string &result) const { read_string(result, 0x1e, file_name_length()); }
+ extra_field_reader extra_field() const { return extra_field_reader(m_buffer + 0x1e + file_name_length(), extra_field_length()); }
+
+ bool signature_correct() const { return signature() == 0x04034b50; }
+
+ std::size_t total_length() const { return minimum_length() + file_name_length() + extra_field_length(); }
+ static std::size_t minimum_length() { return 0x1e; }
+};
+
+
+class central_dir_entry_reader : private reader_base
+{
+public:
+ central_dir_entry_reader(void const *buf) : reader_base(buf) { }
+
+ std::uint32_t signature() const { return read_dword(0x00); }
+ std::uint8_t version_created() const { return m_buffer[0x04]; }
+ std::uint8_t os_created() const { return m_buffer[0x05]; }
+ std::uint8_t version_needed() const { return m_buffer[0x06]; }
+ std::uint8_t os_needed() const { return m_buffer[0x07]; }
+ std::uint16_t general_flag() const { return read_word(0x08); }
+ std::uint16_t compression_method() const { return read_word(0x0a); }
+ std::uint16_t modified_time() const { return read_word(0x0c); }
+ std::uint16_t modified_date() const { return read_word(0x0e); }
+ std::uint32_t crc32() const { return read_dword(0x10); }
+ std::uint32_t compressed_size() const { return read_dword(0x14); }
+ std::uint32_t uncompressed_size() const { return read_dword(0x18); }
+ std::uint16_t file_name_length() const { return read_word(0x1c); }
+ std::uint16_t extra_field_length() const { return read_word(0x1e); }
+ std::uint16_t file_comment_length() const { return read_word(0x20); }
+ std::uint16_t start_disk() const { return read_word(0x22); }
+ std::uint16_t int_file_attr() const { return read_word(0x24); }
+ std::uint32_t ext_file_attr() const { return read_dword(0x26); }
+ std::uint32_t header_offset() const { return read_dword(0x2a); }
+ std::string file_name() const { return read_string(0x2e, file_name_length()); }
+ void file_name(std::string &result) const { read_string(result, 0x2e, file_name_length()); }
+ extra_field_reader extra_field() const { return extra_field_reader(m_buffer + 0x2e + file_name_length(), extra_field_length()); }
+ std::string file_comment() const { return read_string(0x2e + file_name_length() + extra_field_length(), file_comment_length()); }
+ void file_comment(std::string &result) const { read_string(result, 0x2e + file_name_length() + extra_field_length(), file_comment_length()); }
+
+ bool signature_correct() const { return signature() == 0x02014b50; }
+
+ std::size_t total_length() const { return minimum_length() + file_name_length() + extra_field_length() + file_comment_length(); }
+ static std::size_t minimum_length() { return 0x2e; }
+};
+
+
+class ecd64_reader : private reader_base
+{
+public:
+ ecd64_reader(void const *buf) : reader_base(buf) { }
+
+ std::uint32_t signature() const { return read_dword(0x00); }
+ std::uint64_t ecd64_size() const { return read_qword(0x04); }
+ std::uint8_t version_created() const { return m_buffer[0x0c]; }
+ std::uint8_t os_created() const { return m_buffer[0x0d]; }
+ std::uint8_t version_needed() const { return m_buffer[0x0e]; }
+ std::uint8_t os_needed() const { return m_buffer[0x0f]; }
+ std::uint32_t this_disk_no() const { return read_dword(0x10); }
+ std::uint32_t dir_start_disk() const { return read_dword(0x14); }
+ std::uint64_t dir_disk_entries() const { return read_qword(0x18); }
+ std::uint64_t dir_total_entries() const { return read_qword(0x20); }
+ std::uint64_t dir_size() const { return read_qword(0x28); }
+ std::uint64_t dir_offset() const { return read_qword(0x30); }
+ void const * extensible_data() const { return m_buffer + 0x38; }
+
+ bool signature_correct() const { return signature() == 0x06064b50; }
+
+ std::size_t total_length() const { return 0x0c + ecd64_size(); }
+ static std::size_t minimum_length() { return 0x38; }
+};
+
+
+class ecd64_locator_reader : private reader_base
+{
+public:
+ ecd64_locator_reader(void const *buf) : reader_base(buf) { }
+
+ std::uint32_t signature() const { return read_dword(0x00); }
+ std::uint32_t ecd64_disk() const { return read_dword(0x04); }
+ std::uint64_t ecd64_offset() const { return read_qword(0x08); }
+ std::uint32_t total_disks() const { return read_dword(0x10); }
+
+ bool signature_correct() const { return signature() == 0x07064b50; }
+
+ std::size_t total_length() const { return minimum_length(); }
+ static std::size_t minimum_length() { return 0x14; }
+};
+
+
+class ecd_reader : private reader_base
+{
+public:
+ ecd_reader(void const *buf) : reader_base(buf) { }
+
+ std::uint32_t signature() const { return read_dword(0x00); }
+ std::uint16_t this_disk_no() const { return read_word(0x04); }
+ std::uint16_t dir_start_disk() const { return read_word(0x06); }
+ std::uint16_t dir_disk_entries() const { return read_word(0x08); }
+ std::uint16_t dir_total_entries() const { return read_word(0x0a); }
+ std::uint32_t dir_size() const { return read_dword(0x0c); }
+ std::uint32_t dir_offset() const { return read_dword(0x10); }
+ std::uint16_t comment_length() const { return read_word(0x14); }
+ std::string comment() const { return read_string(0x16, comment_length()); }
+ void comment(std::string &result) const { read_string(result, 0x16, comment_length()); }
+
+ bool signature_correct() const { return signature() == 0x06054b50; }
+
+ std::size_t total_length() const { return minimum_length() + comment_length(); }
+ static std::size_t minimum_length() { return 0x16; }
+};
+
+
+class zip64_ext_info_reader : private reader_base
+{
+public:
+ template <typename T>
+ zip64_ext_info_reader(
+ T const &header,
+ extra_field_reader const &field)
+ : reader_base(field.data())
+ , m_uncompressed_size(header.uncompressed_size())
+ , m_compressed_size(header.compressed_size())
+ , m_header_offset(header.header_offset())
+ , m_start_disk(header.start_disk())
+ , m_offs_compressed_size(~m_uncompressed_size ? 0 : 8)
+ , m_offs_header_offset(m_offs_compressed_size + (~m_compressed_size ? 0 : 8))
+ , m_offs_start_disk(m_offs_header_offset + (~m_header_offset ? 0 : 8))
+ , m_offs_end(m_offs_start_disk + (~m_start_disk ? 0 : 4))
+ {
+ }
+
+ std::uint64_t uncompressed_size() const { return ~m_uncompressed_size ? m_uncompressed_size : read_qword(0x00); }
+ std::uint64_t compressed_size() const { return ~m_compressed_size ? m_compressed_size : read_qword(m_offs_compressed_size); }
+ std::uint64_t header_offset() const { return ~m_header_offset ? m_header_offset : read_qword(m_offs_header_offset); }
+ std::uint32_t start_disk() const { return ~m_start_disk ? m_start_disk : read_dword(m_offs_start_disk); }
+
+ std::size_t total_length() const { return minimum_length() + m_offs_end; }
+ static std::size_t minimum_length() { return 0x00; }
+
+private:
+ std::uint32_t m_uncompressed_size;
+ std::uint32_t m_compressed_size;
+ std::uint32_t m_header_offset;
+ std::uint16_t m_start_disk;
+
+ std::size_t m_offs_compressed_size;
+ std::size_t m_offs_header_offset;
+ std::size_t m_offs_start_disk;
+ std::size_t m_offs_end;
+};
+
+
+class utf8_path_reader : private reader_base
+{
+public:
+ utf8_path_reader(extra_field_reader const &field) : reader_base(field.data()), m_length(field.data_size()) { }
+
+ std::uint8_t version() const { return m_buffer[0]; }
+ std::uint32_t name_crc32() const { return read_dword(0x01); }
+ std::string unicode_name() const { return read_string(0x05, m_length - 0x05); }
+ void unicode_name(std::string &result) const { return read_string(result, 0x05, m_length - 0x05); }
+
+ std::size_t total_length() const { return m_length; }
+ static std::size_t minimum_length() { return 0x05; }
+
+private:
+ std::size_t m_length;
+};
+
+
+class general_flag_reader
+{
+public:
+ general_flag_reader(std::uint16_t val) : m_value(val) { }
+
+ bool encrypted() const { return bool(m_value & 0x0001); }
+ bool implode_8k_dict() const { return bool(m_value & 0x0002); }
+ bool implode_3_trees() const { return bool(m_value & 0x0004); }
+ unsigned deflate_option() const { return unsigned((m_value >> 1) & 0x0003); }
+ bool lzma_eos_mark() const { return bool(m_value & 0x0002); }
+ bool use_descriptor() const { return bool(m_value & 0x0008); }
+ bool patch_data() const { return bool(m_value & 0x0020); }
+ bool strong_encryption() const { return bool(m_value & 0x0040); }
+ bool utf8_encoding() const { return bool(m_value & 0x0800); }
+ bool directory_encryption() const { return bool(m_value & 0x2000); }
+
+private:
+ std::uint16_t m_value;
+};
@@ -359,19 +577,12 @@ std::mutex zip_file_impl::s_cache_mutex;
to the cache
-------------------------------------------------*/
-/**
- * @fn void zip_file_close(zip_file *zip)
- *
- * @brief Zip file close.
- *
- * @param [in,out] zip If non-null, the zip.
- */
-
void zip_file_impl::close(ptr &&zip)
{
if (!zip) return;
// close the open files
+ osd_printf_verbose("unzip: closing archive file %s and sending to cache\n", zip->m_filename.c_str());
zip->m_file.reset();
// find the first NULL entry in the cache
@@ -383,7 +594,11 @@ void zip_file_impl::close(ptr &&zip)
// if no room left in the cache, free the bottommost entry
if (cachenum == s_cache.size())
- s_cache[--cachenum].reset();
+ {
+ cachenum--;
+ osd_printf_verbose("unzip: removing %s from cache to make space\n", s_cache[cachenum]->m_filename.c_str());
+ s_cache[cachenum].reset();
+ }
// move everyone else down and place us at the top
for ( ; cachenum > 0; cachenum--)
@@ -397,67 +612,90 @@ void zip_file_impl::close(ptr &&zip)
***************************************************************************/
/*-------------------------------------------------
- zip_file_first_entry - return the first entry
- in the ZIP
--------------------------------------------------*/
-
-/*-------------------------------------------------
- zip_file_next_entry - return the next entry
- in the ZIP
+ zip_file_search - return the next matching
+ entry in the ZIP
-------------------------------------------------*/
int zip_file_impl::search(std::uint32_t search_crc, const std::string &search_filename, bool matchcrc, bool matchname, bool partialpath)
{
// if we're at or past the end, we're done
- std::string filename;
- while ((m_cd_pos + ZIPCFN) <= m_ecd.cd_size)
+ while ((m_cd_pos + central_dir_entry_reader::minimum_length()) <= m_ecd.cd_size)
{
- // extract file header info
- std::uint8_t const *const raw = &m_cd[0] + m_cd_pos;
- m_header.signature = read_dword(raw + ZIPCENSIG);
- m_header.version_created = read_word (raw + ZIPCVER);
- m_header.version_needed = read_word (raw + ZIPCVXT);
- m_header.bit_flag = read_word (raw + ZIPCFLG);
- m_header.compression = read_word (raw + ZIPCMTHD);
- m_header.file_time = read_word (raw + ZIPCTIM);
- m_header.file_date = read_word (raw + ZIPCDAT);
- m_header.crc = read_dword(raw + ZIPCCRC);
- m_header.compressed_length = read_dword(raw + ZIPCSIZ);
- m_header.uncompressed_length = read_dword(raw + ZIPCUNC);
- m_header.filename_length = read_word (raw + ZIPCFNL);
- m_header.extra_field_length = read_word (raw + ZIPCXTL);
- m_header.file_comment_length = read_word (raw + ZIPCCML);
- m_header.start_disk_number = read_word (raw + ZIPDSK);
- m_header.internal_attributes = read_word (raw + ZIPINT);
- m_header.external_attributes = read_dword(raw + ZIPEXT);
- m_header.local_header_offset = read_dword(raw + ZIPOFST);
- m_header.filename = reinterpret_cast<const char *>(raw + ZIPCFN);
-
// make sure we have enough data
- std::uint32_t const rawlength = ZIPCFN + m_header.filename_length + m_header.extra_field_length + m_header.file_comment_length;
- if ((m_cd_pos + rawlength) > m_ecd.cd_size)
+ central_dir_entry_reader const reader(&m_cd[0] + m_cd_pos);
+ if (!reader.signature_correct() || ((m_cd_pos + reader.total_length()) > m_ecd.cd_size))
break;
+ // extract file header info
+ m_header.version_created = reader.version_created();
+ m_header.version_needed = reader.version_needed();
+ m_header.bit_flag = reader.general_flag();
+ m_header.compression = reader.compression_method();
+ m_header.crc = reader.crc32();
+ m_header.compressed_length = reader.compressed_size();
+ m_header.uncompressed_length = reader.uncompressed_size();
+ m_header.start_disk_number = reader.start_disk();
+ m_header.local_header_offset = reader.header_offset();
+
// advance the position
- m_cd_pos += rawlength;
+ m_cd_pos += reader.total_length();
- // copy the filename filename
- bool const is_dir((m_header.filename_length > 0) && (m_header.filename[m_header.filename_length - 1] == '/'));
- filename.assign(m_header.filename, m_header.filename_length - (is_dir ? 1 : 0));
+ // copy the filename
+ bool is_utf8(general_flag_reader(m_header.bit_flag).utf8_encoding());
+ reader.file_name(m_header.file_name);
+
+ // walk the extra data
+ for (auto extra = reader.extra_field(); extra.length_sufficient(); extra = extra.next())
+ {
+ // look for ZIP64 extended info
+ if ((extra.header_id() == 0x0001) && (extra.data_size() >= zip64_ext_info_reader::minimum_length()))
+ {
+ zip64_ext_info_reader const ext64(reader, extra);
+ if (extra.data_size() >= ext64.total_length())
+ {
+ m_header.compressed_length = ext64.compressed_size();
+ m_header.uncompressed_length = ext64.uncompressed_size();
+ m_header.start_disk_number = ext64.start_disk();
+ m_header.local_header_offset = ext64.header_offset();
+ }
+ }
+
+ // look for Info-ZIP UTF-8 path
+ if (!is_utf8 && (extra.header_id() == 0x7075) && (extra.data_size() >= utf8_path_reader::minimum_length()))
+ {
+ utf8_path_reader const utf8path(extra);
+ if (utf8path.version() == 1)
+ {
+ auto const addr(m_header.file_name.empty() ? nullptr : &m_header.file_name[0]);
+ auto const length(m_header.file_name.empty() ? 0 : m_header.file_name.length() * sizeof(m_header.file_name[0]));
+ auto const crc(crc32_creator::simple(addr, length));
+ if (utf8path.name_crc32() == crc.m_raw)
+ {
+ utf8path.unicode_name(m_header.file_name);
+ is_utf8 = true;
+ }
+ }
+ }
+ }
+
+ // FIXME: if (!is_utf8) convert filename to UTF8 (assume CP437 or something)
+
+ // chop off trailing slash for directory entries
+ bool const is_dir(!m_header.file_name.empty() && (m_header.file_name.back() == '/'));
+ if (is_dir) m_header.file_name.resize(m_header.file_name.length() - 1);
// check to see if it matches query
bool const crcmatch(search_crc == m_header.crc);
- auto const partialoffset(filename.length() - search_filename.length());
- bool const partialpossible((filename.length() > search_filename.length()) && (filename[partialoffset - 1] == '/'));
+ auto const partialoffset(m_header.file_name.length() - search_filename.length());
+ bool const partialpossible((m_header.file_name.length() > search_filename.length()) && (m_header.file_name[partialoffset - 1] == '/'));
const bool namematch(
- !core_stricmp(search_filename.c_str(), filename.c_str()) ||
- (partialpath && partialpossible && !core_stricmp(search_filename.c_str(), filename.c_str() + partialoffset)));
+ !core_stricmp(search_filename.c_str(), m_header.file_name.c_str()) ||
+ (partialpath && partialpossible && !core_stricmp(search_filename.c_str(), m_header.file_name.c_str() + partialoffset)));
bool const found = ((!matchcrc && !matchname) || !is_dir) && (!matchcrc || crcmatch) && (!matchname || namematch);
if (found)
{
m_curr_is_dir = is_dir;
- m_curr_name = std::move(filename);
return 0;
}
}
@@ -470,18 +708,6 @@ int zip_file_impl::search(std::uint32_t search_crc, const std::string &search_fi
from a ZIP into the target buffer
-------------------------------------------------*/
-/**
- * @fn zip_error zip_file_decompress(zip_file *zip, void *buffer, UINT32 length)
- *
- * @brief Zip file decompress.
- *
- * @param [in,out] zip If non-null, the zip.
- * @param [in,out] buffer If non-null, the buffer.
- * @param length The length.
- *
- * @return A zip_error.
- */
-
archive_file::error zip_file_impl::decompress(void *buffer, std::uint32_t length)
{
archive_file::error ziperr;
@@ -489,11 +715,17 @@ archive_file::error zip_file_impl::decompress(void *buffer, std::uint32_t length
// if we don't have enough buffer, error
if (length < m_header.uncompressed_length)
+ {
+ osd_printf_error("unzip: buffer too small to decompress %s from %s\n", m_header.file_name.c_str(), m_filename.c_str());
return archive_file::error::BUFFER_TOO_SMALL;
+ }
// make sure the info in the header aligns with what we know
if (m_header.start_disk_number != m_ecd.disk_number)
+ {
+ osd_printf_error("unzip: %s does not reside in segment %s\n", m_header.file_name.c_str(), m_filename.c_str());
return archive_file::error::UNSUPPORTED;
+ }
// get the compressed data offset
ziperr = get_compressed_data_offset(offset);
@@ -511,7 +743,14 @@ archive_file::error zip_file_impl::decompress(void *buffer, std::uint32_t length
ziperr = decompress_data_type_8(offset, buffer, length);
break;
+ case 14:
+ ziperr = decompress_data_type_14(offset, buffer, length);
+ break;
+
default:
+ osd_printf_error(
+ "unzip: %s in %s uses unsupported compression method %u\n",
+ m_header.file_name.c_str(), m_filename.c_str(), m_header.compression);
ziperr = archive_file::error::UNSUPPORTED;
break;
}
@@ -528,16 +767,6 @@ archive_file::error zip_file_impl::decompress(void *buffer, std::uint32_t length
read_ecd - read the ECD data
-------------------------------------------------*/
-/**
- * @fn static zip_error read_ecd(zip_file *zip)
- *
- * @brief Reads an ecd.
- *
- * @param [in,out] zip If non-null, the zip.
- *
- * @return The ecd.
- */
-
archive_file::error zip_file_impl::read_ecd()
{
// make sure the file handle is open
@@ -546,6 +775,8 @@ archive_file::error zip_file_impl::read_ecd()
return ziperr;
// we may need multiple tries
+ osd_file::error error;
+ std::uint32_t read_length;
std::uint32_t buflen = 1024;
while (buflen < 65536)
{
@@ -556,50 +787,136 @@ archive_file::error zip_file_impl::read_ecd()
// allocate buffer
std::unique_ptr<std::uint8_t []> buffer;
try { buffer.reset(new std::uint8_t[buflen + 1]); }
- catch (...) { return archive_file::error::OUT_OF_MEMORY; }
+ catch (...)
+ {
+ osd_printf_error("unzip: %s failed to allocate memory for ECD search\n", m_filename.c_str());
+ return archive_file::error::OUT_OF_MEMORY;
+ }
// read in one buffers' worth of data
- std::uint32_t read_length;
- auto const error = m_file->read(&buffer[0], m_length - buflen, buflen, read_length);
- if (error != osd_file::error::NONE || read_length != buflen)
+ error = m_file->read(&buffer[0], m_length - buflen, buflen, read_length);
+ if ((error != osd_file::error::NONE) || (read_length != buflen))
+ {
+ osd_printf_error("unzip: %s error reading file to search for ECD (%d)\n", m_filename.c_str(), int(error));
return archive_file::error::FILE_ERROR;
+ }
// find the ECD signature
std::int32_t offset;
- for (offset = buflen - 22; offset >= 0; offset--)
- if (buffer[offset + 0] == 'P' && buffer[offset + 1] == 'K' && buffer[offset + 2] == 0x05 && buffer[offset + 3] == 0x06)
+ for (offset = buflen - ecd_reader::minimum_length(); offset >= 0; offset--)
+ {
+ ecd_reader reader(buffer.get() + offset);
+ if (reader.signature_correct() && ((reader.total_length() + offset) <= buflen))
break;
+ }
// if we found it, fill out the data
if (offset >= 0)
{
- // reuse the buffer as our ECD buffer
- m_ecd.raw = std::move(buffer);
- m_ecd.rawlength = buflen - offset;
-
- /* append a NULL terminator to the comment */
- memmove(&m_ecd.raw[0], &m_ecd.raw[offset], m_ecd.rawlength);
- m_ecd.raw[m_ecd.rawlength] = 0;
-
- /* extract ecd info */
- m_ecd.signature = read_dword(&m_ecd.raw[ZIPESIG]);
- m_ecd.disk_number = read_word (&m_ecd.raw[ZIPEDSK]);
- m_ecd.cd_start_disk_number = read_word (&m_ecd.raw[ZIPECEN]);
- m_ecd.cd_disk_entries = read_word (&m_ecd.raw[ZIPENUM]);
- m_ecd.cd_total_entries = read_word (&m_ecd.raw[ZIPECENN]);
- m_ecd.cd_size = read_dword(&m_ecd.raw[ZIPECSZ]);
- m_ecd.cd_start_disk_offset = read_dword(&m_ecd.raw[ZIPEOFST]);
- m_ecd.comment_length = read_word (&m_ecd.raw[ZIPECOML]);
- m_ecd.comment = reinterpret_cast<const char *>(&m_ecd.raw[ZIPECOM]);
+ osd_printf_verbose("unzip: found %s ECD\n", m_filename.c_str());
+
+ // extract ECD info
+ ecd_reader const ecd_rd(buffer.get() + offset);
+ m_ecd.disk_number = ecd_rd.this_disk_no();
+ m_ecd.cd_start_disk_number = ecd_rd.dir_start_disk();
+ m_ecd.cd_disk_entries = ecd_rd.dir_disk_entries();
+ m_ecd.cd_total_entries = ecd_rd.dir_total_entries();
+ m_ecd.cd_size = ecd_rd.dir_size();
+ m_ecd.cd_start_disk_offset = ecd_rd.dir_offset();
+
+ // is the file too small to contain a ZIP64 ECD locator?
+ if ((m_length - buflen + offset) < ecd64_locator_reader::minimum_length())
+ {
+ osd_printf_verbose("unzip: %s too small to contain ZIP64 ECD locator\n", m_filename.c_str());
+ return archive_file::error::NONE;
+ }
+
+ // try to read the ZIP64 ECD locator
+ error = m_file->read(
+ &buffer[0],
+ m_length - buflen + offset - ecd64_locator_reader::minimum_length(),
+ ecd64_locator_reader::minimum_length(),
+ read_length);
+ if ((error != osd_file::error::NONE) || (read_length != ecd64_locator_reader::minimum_length()))
+ {
+ osd_printf_error("unzip: error reading %s to search for ZIP64 ECD locator (%d)\n", m_filename.c_str(), int(error));
+ return archive_file::error::FILE_ERROR;
+ }
+
+ // if the signature isn't correct, it's not a ZIP64 archive
+ ecd64_locator_reader const ecd64_loc_rd(buffer.get());
+ if (!ecd64_loc_rd.signature_correct())
+ {
+ osd_printf_verbose("unzip: %s has no ZIP64 ECD locator\n", m_filename.c_str());
+ return archive_file::error::NONE;
+ }
+
+ // check that the ZIP64 ECD is in this segment (assuming this segment is the last segment)
+ if ((ecd64_loc_rd.ecd64_disk() + 1) != ecd64_loc_rd.total_disks())
+ {
+ osd_printf_error("unzip: %s ZIP64 ECD resides in a different segment\n", m_filename.c_str());
+ return archive_file::error::UNSUPPORTED;
+ }
+
+ // try to read the ZIP64 ECD
+ error = m_file->read(&buffer[0], ecd64_loc_rd.ecd64_offset(), ecd64_reader::minimum_length(), read_length);
+ if (error != osd_file::error::NONE)
+ {
+ osd_printf_error("unzip: error reading %s ZIP64 ECD (%d)\n", m_filename.c_str(), int(error));
+ return archive_file::error::FILE_ERROR;
+ }
+ if (read_length != ecd64_reader::minimum_length())
+ {
+ osd_printf_error("unzip: unexpectedly reached end-of-file while reading %s ZIP64 ECD\n", m_filename.c_str());
+ return archive_file::error::FILE_TRUNCATED;
+ }
+
+ // check ZIP64 ECD
+ ecd64_reader const ecd64_rd(buffer.get());
+ if (!ecd64_rd.signature_correct())
+ {
+ osd_printf_error(
+ "unzip: %s ZIP64 ECD has incorrect signature 0x%08lx\n",
+ m_filename.c_str(), long(ecd64_rd.signature()));
+ return archive_file::error::BAD_SIGNATURE;
+ }
+ if (ecd64_rd.total_length() < ecd64_reader::minimum_length())
+ {
+ osd_printf_error("unzip: %s ZIP64 ECD appears to be too small\n", m_filename.c_str());
+ return archive_file::error::UNSUPPORTED;
+ }
+ if (ecd64_rd.version_needed() > 63)
+ {
+ osd_printf_error(
+ "unzip: %s ZIP64 ECD requires unsupported version %u.%u\n",
+ m_filename.c_str(), unsigned(ecd64_rd.version_needed() / 10), unsigned(ecd64_rd.version_needed() % 10));
+ return archive_file::error::UNSUPPORTED;
+ }
+ osd_printf_verbose("unzip: found %s ZIP64 ECD\n", m_filename.c_str());
+
+ // extract ZIP64 ECD info
+ m_ecd.disk_number = ecd64_rd.this_disk_no();
+ m_ecd.cd_start_disk_number = ecd64_rd.dir_start_disk();
+ m_ecd.cd_disk_entries = ecd64_rd.dir_disk_entries();
+ m_ecd.cd_total_entries = ecd64_rd.dir_total_entries();
+ m_ecd.cd_size = ecd64_rd.dir_size();
+ m_ecd.cd_start_disk_offset = ecd64_rd.dir_offset();
+
return archive_file::error::NONE;
}
// didn't find it; free this buffer and expand our search
if (buflen < m_length)
+ {
buflen *= 2;
+ }
else
+ {
+ osd_printf_error("unzip: %s couldn't find ECD\n", m_filename.c_str());
return archive_file::error::BAD_SIGNATURE;
+ }
}
+ osd_printf_error("unzip: %s couldn't find ECD in last 64KiB\n", m_filename.c_str());
return archive_file::error::OUT_OF_MEMORY;
}
@@ -609,19 +926,33 @@ archive_file::error zip_file_impl::read_ecd()
offset of the compressed data
-------------------------------------------------*/
-/**
- * @fn static zip_error get_compressed_data_offset(zip_file *zip, UINT64 *offset)
- *
- * @brief Gets compressed data offset.
- *
- * @param [in,out] zip If non-null, the zip.
- * @param [in,out] offset If non-null, the offset.
- *
- * @return The compressed data offset.
- */
-
archive_file::error zip_file_impl::get_compressed_data_offset(std::uint64_t &offset)
{
+ // don't support a number of features
+ general_flag_reader const flags(m_header.bit_flag);
+ if (m_header.start_disk_number != m_ecd.disk_number)
+ {
+ osd_printf_error("unzip: %s does not reside in segment %s\n", m_header.file_name.c_str(), m_filename.c_str());
+ return archive_file::error::UNSUPPORTED;
+ }
+ if (m_header.version_needed > 63)
+ {
+ osd_printf_error(
+ "unzip: %s in %s requires unsupported version %u.%u\n",
+ m_header.file_name.c_str(), m_filename.c_str(), unsigned(m_header.version_needed / 10), unsigned(m_header.version_needed % 10));
+ return archive_file::error::UNSUPPORTED;
+ }
+ if (flags.encrypted() || flags.strong_encryption())
+ {
+ osd_printf_error("unzip: %s in %s is encrypted\n", m_header.file_name.c_str(), m_filename.c_str());
+ return archive_file::error::UNSUPPORTED;
+ }
+ if (flags.patch_data())
+ {
+ osd_printf_error("unzip: %s in %s is compressed patch data\n", m_header.file_name.c_str(), m_filename.c_str());
+ return archive_file::error::UNSUPPORTED;
+ }
+
// make sure the file handle is open
auto const ziperr = reopen();
if (ziperr != archive_file::error::NONE)
@@ -629,14 +960,32 @@ archive_file::error zip_file_impl::get_compressed_data_offset(std::uint64_t &off
// now go read the fixed-sized part of the local file header
std::uint32_t read_length;
- auto const error = m_file->read(&m_buffer[0], m_header.local_header_offset, ZIPNAME, read_length);
- if (error != osd_file::error::NONE || read_length != ZIPNAME)
- return (error == osd_file::error::NONE) ? archive_file::error::FILE_TRUNCATED : archive_file::error::FILE_ERROR;
+ auto const error = m_file->read(&m_buffer[0], m_header.local_header_offset, local_file_header_reader::minimum_length(), read_length);
+ if (error != osd_file::error::NONE)
+ {
+ osd_printf_error(
+ "unzip: error reading local file header for %s in %s (%d)\n",
+ m_header.file_name.c_str(), m_filename.c_str(), int(error));
+ return archive_file::error::FILE_ERROR;
+ }
+ if (read_length != local_file_header_reader::minimum_length())
+ {
+ osd_printf_error(
+ "unzip: unexpectedly reached end-of-file while reading local file header for %s in %s\n",
+ m_header.file_name.c_str(), m_filename.c_str());
+ return archive_file::error::FILE_TRUNCATED;
+ }
- /* compute the final offset */
- offset = m_header.local_header_offset + ZIPNAME;
- offset += read_word(&m_buffer[ZIPFNLN]);
- offset += read_word(&m_buffer[ZIPXTRALN]);
+ // compute the final offset
+ local_file_header_reader reader(&m_buffer[0]);
+ if (!reader.signature_correct())
+ {
+ osd_printf_error(
+ "unzip: local file header for %s in %s has incorrect signature %04lx\n",
+ m_header.file_name.c_str(), m_filename.c_str(), long(reader.signature()));
+ return archive_file::error::BAD_SIGNATURE;
+ }
+ offset = m_header.local_header_offset + reader.total_length();
return archive_file::error::NONE;
}
@@ -652,31 +1001,25 @@ archive_file::error zip_file_impl::get_compressed_data_offset(std::uint64_t &off
type 0 data (which is uncompressed)
-------------------------------------------------*/
-/**
- * @fn static zip_error decompress_data_type_0(zip_file *zip, UINT64 offset, void *buffer, UINT32 length)
- *
- * @brief Decompress the data type 0.
- *
- * @param [in,out] zip If non-null, the zip.
- * @param offset The offset.
- * @param [in,out] buffer If non-null, the buffer.
- * @param length The length.
- *
- * @return A zip_error.
- */
-
archive_file::error zip_file_impl::decompress_data_type_0(std::uint64_t offset, void *buffer, std::uint32_t length)
{
- std::uint32_t read_length;
-
// the data is uncompressed; just read it
+ std::uint32_t read_length(0);
auto const filerr = m_file->read(buffer, offset, m_header.compressed_length, read_length);
if (filerr != osd_file::error::NONE)
+ {
+ osd_printf_error("unzip: error reading %s from %s (%d)\n", m_header.file_name.c_str(), m_filename.c_str(), int(filerr));
return archive_file::error::FILE_ERROR;
+ }
else if (read_length != m_header.compressed_length)
+ {
+ osd_printf_error("unzip: unexpectedly reached end-of-file while reading %s from %s\n", m_header.file_name.c_str(), m_filename.c_str());
return archive_file::error::FILE_TRUNCATED;
+ }
else
+ {
return archive_file::error::NONE;
+ }
}
@@ -685,55 +1028,56 @@ archive_file::error zip_file_impl::decompress_data_type_0(std::uint64_t offset,
type 8 data (which is deflated)
-------------------------------------------------*/
-/**
- * @fn static zip_error decompress_data_type_8(zip_file *zip, UINT64 offset, void *buffer, UINT32 length)
- *
- * @brief Decompress the data type 8.
- *
- * @param [in,out] zip If non-null, the zip.
- * @param offset The offset.
- * @param [in,out] buffer If non-null, the buffer.
- * @param length The length.
- *
- * @return A zip_error.
- */
-
archive_file::error zip_file_impl::decompress_data_type_8(std::uint64_t offset, void *buffer, std::uint32_t length)
{
- std::uint32_t input_remaining = m_header.compressed_length;
+ std::uint64_t input_remaining = m_header.compressed_length;
int zerr;
- // make sure we don't need a newer mechanism
- if (m_header.version_needed > 0x14)
- return archive_file::error::UNSUPPORTED;
-
- /* reset the stream */
+ // reset the stream
z_stream stream;
- memset(&stream, 0, sizeof(stream));
- stream.next_out = (Bytef *)buffer;
+ stream.zalloc = Z_NULL;
+ stream.zfree = Z_NULL;
+ stream.opaque = Z_NULL;
+ stream.avail_in = 0;
+ stream.next_out = reinterpret_cast<Bytef *>(buffer);
stream.avail_out = length;
// initialize the decompressor
zerr = inflateInit2(&stream, -MAX_WBITS);
if (zerr != Z_OK)
+ {
+ osd_printf_error(
+ "unzip: error allocating zlib stream to inflate %s from %s (%d)\n",
+ m_header.file_name.c_str(), m_filename.c_str(), zerr);
return archive_file::error::DECOMPRESS_ERROR;
+ }
// loop until we're done
while (1)
{
// read in the next chunk of data
- std::uint32_t read_length;
- auto const filerr = m_file->read(&m_buffer[0], offset, (std::min<std::uint32_t>)(input_remaining, m_buffer.size()), read_length);
+ std::uint32_t read_length(0);
+ auto const filerr = m_file->read(
+ &m_buffer[0],
+ offset,
+ std::uint32_t((std::min<std::uint64_t>)(input_remaining, m_buffer.size())),
+ read_length);
if (filerr != osd_file::error::NONE)
{
+ osd_printf_error(
+ "unzip: error reading compressed data for %s in %s (%d)\n",
+ m_header.file_name.c_str(), m_filename.c_str(), int(filerr));
inflateEnd(&stream);
return archive_file::error::FILE_ERROR;
}
offset += read_length;
// if we read nothing, but still have data left, the file is truncated
- if (read_length == 0 && input_remaining > 0)
+ if ((read_length == 0) && (input_remaining > 0))
{
+ osd_printf_error(
+ "unzip: unexpectedly reached end-of-file while reading compressed data for %s in %s\n",
+ m_header.file_name.c_str(), m_filename.c_str());
inflateEnd(&stream);
return archive_file::error::FILE_TRUNCATED;
}
@@ -750,9 +1094,12 @@ archive_file::error zip_file_impl::decompress_data_type_8(std::uint64_t offset,
// now inflate
zerr = inflate(&stream, Z_NO_FLUSH);
if (zerr == Z_STREAM_END)
+ {
break;
- if (zerr != Z_OK)
+ }
+ else if (zerr != Z_OK)
{
+ osd_printf_error("unzip: error inflating %s from %s (%d)\n", m_header.file_name.c_str(), m_filename.c_str(), zerr);
inflateEnd(&stream);
return archive_file::error::DECOMPRESS_ERROR;
}
@@ -761,15 +1108,210 @@ archive_file::error zip_file_impl::decompress_data_type_8(std::uint64_t offset,
// finish decompression
zerr = inflateEnd(&stream);
if (zerr != Z_OK)
+ {
+ osd_printf_error("unzip: error finishing inflation of %s from %s (%d)\n", m_header.file_name.c_str(), m_filename.c_str(), zerr);
return archive_file::error::DECOMPRESS_ERROR;
+ }
- /* if anything looks funny, report an error */
- if (stream.avail_out > 0 || input_remaining > 0)
+ // if anything looks funny, report an error
+ if ((stream.avail_out > 0) || (input_remaining > 0))
+ {
+ osd_printf_error(
+ "unzip: inflation of %s from %s doesn't appear to have completed correctly\n",
+ m_header.file_name.c_str(), m_filename.c_str());
return archive_file::error::DECOMPRESS_ERROR;
+ }
return archive_file::error::NONE;
}
+
+/*-------------------------------------------------
+ decompress_data_type_14 - decompress
+ type 14 data (LZMA)
+-------------------------------------------------*/
+
+archive_file::error zip_file_impl::decompress_data_type_14(std::uint64_t offset, void *buffer, std::uint32_t length)
+{
+ // two-byte version
+ // two-byte properties size (little-endian)
+ // properties
+ // compressed data
+
+ assert(4 <= m_buffer.size());
+ assert(LZMA_PROPS_SIZE <= m_buffer.size());
+
+ bool const eos_mark(general_flag_reader(m_header.bit_flag).lzma_eos_mark());
+ Byte *const output(reinterpret_cast<Byte *>(buffer));
+ SizeT output_remaining(length);
+ std::uint64_t input_remaining(m_header.compressed_length);
+
+ std::uint32_t read_length;
+ osd_file::error filerr;
+ SRes lzerr;
+ ELzmaStatus lzstatus(LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK);
+
+ // reset the stream
+ ISzAlloc alloc_imp;
+ alloc_imp.Alloc = [](void *p, std::size_t size) -> void * { return (size == 0) ? nullptr : std::malloc(size); };
+ alloc_imp.Free = [](void *p, void *address) -> void { std::free(address); };
+ CLzmaDec stream;
+ LzmaDec_Construct(&stream);
+
+ // need to read LZMA properties before we can initialise the decompressor
+ if (4 > input_remaining)
+ {
+ osd_printf_error(
+ "unzip:compressed data for %s in %s is too small to hold LZMA properties header\n",
+ m_header.file_name.c_str(), m_filename.c_str());
+ return archive_file::error::DECOMPRESS_ERROR;
+ }
+ filerr = m_file->read(&m_buffer[0], offset, 4, read_length);
+ if (filerr != osd_file::error::NONE)
+ {
+ osd_printf_error(
+ "unzip: error reading LZMA properties header for %s in %s (%d)\n",
+ m_header.file_name.c_str(), m_filename.c_str(), int(filerr));
+ return archive_file::error::FILE_ERROR;
+ }
+ offset += read_length;
+ input_remaining -= read_length;
+ if (4 != read_length)
+ {
+ osd_printf_error(
+ "unzip: unexpectedly reached end-of-file while reading LZMA properties header for %s in %s\n",
+ m_header.file_name.c_str(), m_filename.c_str());
+ return archive_file::error::FILE_TRUNCATED;
+ }
+ std::uint16_t const props_size((std::uint16_t(m_buffer[3]) << 8) | std::uint16_t(m_buffer[2]));
+ if (props_size > m_buffer.size())
+ {
+ osd_printf_error(
+ "unzip: %s in %s has excessively large LZMA properties\n",
+ m_header.file_name.c_str(), m_filename.c_str());
+ return archive_file::error::UNSUPPORTED;
+ }
+ else if (props_size > input_remaining)
+ {
+ osd_printf_error(
+ "unzip:compressed data for %s in %s is too small to hold LZMA properties\n",
+ m_header.file_name.c_str(), m_filename.c_str());
+ return archive_file::error::DECOMPRESS_ERROR;
+ }
+ filerr = m_file->read(&m_buffer[0], offset, props_size, read_length);
+ if (filerr != osd_file::error::NONE)
+ {
+ osd_printf_error(
+ "unzip: error reading LZMA properties for %s in %s (%d)\n",
+ m_header.file_name.c_str(), m_filename.c_str(), int(filerr));
+ return archive_file::error::FILE_ERROR;
+ }
+ offset += read_length;
+ input_remaining -= read_length;
+ if (props_size != read_length)
+ {
+ osd_printf_error(
+ "unzip: unexpectedly reached end-of-file while reading LZMA properties for %s in %s\n",
+ m_header.file_name.c_str(), m_filename.c_str());
+ return archive_file::error::FILE_TRUNCATED;
+ }
+
+ // initialize the decompressor
+ lzerr = LzmaDec_Allocate(&stream, &m_buffer[0], props_size, &alloc_imp);
+ if (SZ_ERROR_MEM == lzerr)
+ {
+ osd_printf_error(
+ "unzip: memory error allocating LZMA decoder to decompress %s from %s\n",
+ m_header.file_name.c_str(), m_filename.c_str());
+ return archive_file::error::OUT_OF_MEMORY;
+ }
+ else if (SZ_OK != lzerr)
+ {
+ osd_printf_error(
+ "unzip: error allocating LZMA decoder to decompress %s from %s (%d)\n",
+ m_header.file_name.c_str(), m_filename.c_str(), int(lzerr));
+ return archive_file::error::DECOMPRESS_ERROR;
+ }
+ LzmaDec_Init(&stream);
+
+ // loop until we're done
+ while (0 < input_remaining)
+ {
+ // read in the next chunk of data
+ filerr = m_file->read(
+ &m_buffer[0],
+ offset,
+ std::uint32_t((std::min<std::uint64_t>)(input_remaining, m_buffer.size())),
+ read_length);
+ if (filerr != osd_file::error::NONE)
+ {
+ osd_printf_error(
+ "unzip: error reading compressed data for %s in %s (%d)\n",
+ m_header.file_name.c_str(), m_filename.c_str(), int(filerr));
+ LzmaDec_Free(&stream, &alloc_imp);
+ return archive_file::error::FILE_ERROR;
+ }
+ offset += read_length;
+ input_remaining -= read_length;
+
+ // if we read nothing, but still have data left, the file is truncated
+ if ((0 == read_length) && (0 < input_remaining))
+ {
+ osd_printf_error(
+ "unzip: unexpectedly reached end-of-file while reading compressed data for %s in %s\n",
+ m_header.file_name.c_str(), m_filename.c_str());
+ LzmaDec_Free(&stream, &alloc_imp);
+ return archive_file::error::FILE_TRUNCATED;
+ }
+
+ // now decompress
+ SizeT len(read_length);
+ // FIXME: is the input length really an in/out parameter or not?
+ // At least on reaching the end of the input, the input length doesn't seem to get updated
+ lzerr = LzmaDec_DecodeToBuf(
+ &stream,
+ output + length - output_remaining,
+ &output_remaining,
+ reinterpret_cast<Byte const *>(&m_buffer[0]),
+ &len,
+ ((0 == input_remaining) && eos_mark) ? LZMA_FINISH_END : LZMA_FINISH_ANY,
+ &lzstatus);
+ if (SZ_OK != lzerr)
+ {
+ osd_printf_error("unzip: error decoding LZMA data for %s in %s (%d)\n", m_header.file_name.c_str(), m_filename.c_str(), int(lzerr));
+ LzmaDec_Free(&stream, &alloc_imp);
+ return archive_file::error::DECOMPRESS_ERROR;
+ }
+ }
+
+ // finish decompression
+ LzmaDec_Free(&stream, &alloc_imp);
+
+ // if anything looks funny, report an error
+ if (LZMA_STATUS_FINISHED_WITH_MARK == lzstatus)
+ {
+ return archive_file::error::NONE;
+ }
+ else if (eos_mark)
+ {
+ osd_printf_error(
+ "unzip: LZMA end mark not found for %s in %s (%d)\n",
+ m_header.file_name.c_str(), m_filename.c_str(), int(lzstatus));
+ return archive_file::error::DECOMPRESS_ERROR;
+ }
+ else if (LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK != lzstatus)
+ {
+ osd_printf_error(
+ "unzip: LZMA decompression of %s from %s doesn't appear to have completed correctly (%d)\n",
+ m_header.file_name.c_str(), m_filename.c_str(), int(lzstatus));
+ return archive_file::error::DECOMPRESS_ERROR;
+ }
+ else
+ {
+ return archive_file::error::NONE;
+ }
+}
+
} // anonymous namespace
@@ -790,17 +1332,6 @@ void m7z_file_cache_clear();
zip_file_open - opens a ZIP file for reading
-------------------------------------------------*/
-/**
- * @fn zip_error zip_file_open(const char *filename, zip_file **zip)
- *
- * @brief Queries if a given zip file open.
- *
- * @param filename Filename of the file.
- * @param [in,out] zip If non-null, the zip.
- *
- * @return A zip_error.
- */
-
archive_file::error archive_file::open_zip(const std::string &filename, ptr &result)
{
// ensure we start with a NULL result
diff --git a/src/lib/util/vbiparse.h b/src/lib/util/vbiparse.h
index 486d17c5978..687f984622c 100644
--- a/src/lib/util/vbiparse.h
+++ b/src/lib/util/vbiparse.h
@@ -13,6 +13,7 @@
#ifndef __VBIPARSE_H__
#define __VBIPARSE_H__
+#include "osdcomm.h"
/***************************************************************************
CONSTANTS
diff --git a/src/lib/util/zippath.cpp b/src/lib/util/zippath.cpp
index f16dcf824e6..1e4fb6dd293 100644
--- a/src/lib/util/zippath.cpp
+++ b/src/lib/util/zippath.cpp
@@ -17,6 +17,7 @@
#include <cassert>
#include <cctype>
+#include <forward_list>
#include <new>
@@ -26,20 +27,6 @@ namespace util {
***************************************************************************/
/**
- * @struct zippath_returned_directory
- *
- * @brief A zippath returned directory.
- */
-
-struct zippath_returned_directory
-{
- /** @brief The next. */
- zippath_returned_directory *next;
- /** @brief The name. */
- std::string name;
-};
-
-/**
* @class zippath_directory
*
* @brief A zippath directory.
@@ -49,11 +36,13 @@ class zippath_directory
{
public:
zippath_directory()
- : returned_parent(false),
- directory(nullptr),
- called_zip_first(false),
- zipfile(nullptr),
- returned_dirlist(nullptr) { }
+ : returned_parent(false)
+ , directory(nullptr)
+ , called_zip_first(false)
+ , zipfile(nullptr)
+ , returned_dirlist()
+ {
+ }
/* common */
/** @brief true to returned parent. */
@@ -73,7 +62,7 @@ public:
/** @brief The zipprefix. */
std::string zipprefix;
/** @brief The returned dirlist. */
- zippath_returned_directory *returned_dirlist;
+ std::forward_list<std::string> returned_dirlist;
};
@@ -856,12 +845,7 @@ void zippath_closedir(zippath_directory *directory)
if (directory->zipfile != nullptr)
directory->zipfile.reset();
- while (directory->returned_dirlist != nullptr)
- {
- zippath_returned_directory *dirlist = directory->returned_dirlist;
- directory->returned_dirlist = directory->returned_dirlist->next;
- delete dirlist;
- }
+ directory->returned_dirlist.clear();
delete directory;
}
@@ -887,24 +871,28 @@ void zippath_closedir(zippath_directory *directory)
static const char *get_relative_path(zippath_directory const &directory)
{
auto len = directory.zipprefix.length();
- const char *prefix = directory.zipprefix.c_str();
+ char const *prefix = directory.zipprefix.c_str();
while (is_zip_file_separator(*prefix))
{
len--;
prefix++;
}
- if ((len <= directory.zipfile->current_name().length()) &&
- !strncmp(prefix, directory.zipfile->current_name().c_str(), len))
+ std::string const &current(directory.zipfile->current_name());
+ char const *result = directory.zipfile->current_name().c_str() + len;
+ if ((current.length() >= len) &&
+ !strncmp(prefix, current.c_str(), len) &&
+ (!*prefix || is_zip_file_separator(*result) || is_zip_file_separator(directory.zipprefix.back())))
{
- const char *result = &directory.zipfile->current_name().c_str()[len];
while (is_zip_file_separator(*result))
result++;
return *result ? result : nullptr;
}
-
- return nullptr;
+ else
+ {
+ return nullptr;
+ }
}
@@ -925,11 +913,6 @@ static const char *get_relative_path(zippath_directory const &directory)
const osd_directory_entry *zippath_readdir(zippath_directory *directory)
{
const osd_directory_entry *result = nullptr;
- int header;
- const char *relpath;
- const char *separator;
- const char *s;
- zippath_returned_directory *rdent;
if (!directory->returned_parent)
{
@@ -947,10 +930,10 @@ const osd_directory_entry *zippath_readdir(zippath_directory *directory)
{
result = osd_readdir(directory->directory);
}
- while((result != nullptr) && (!strcmp(result->name, ".") || !strcmp(result->name, "..")));
+ while (result && (!strcmp(result->name, ".") || !strcmp(result->name, "..")));
/* special case - is this entry a ZIP file? if so we need to return it as a "directory" */
- if ((result != nullptr) && (is_zip_file(result->name) || is_7z_file(result->name)))
+ if (result && (is_zip_file(result->name) || is_7z_file(result->name)))
{
/* copy; but change the entry type */
directory->returned_entry = *result;
@@ -960,47 +943,46 @@ const osd_directory_entry *zippath_readdir(zippath_directory *directory)
}
else if (directory->zipfile)
{
+ char const *relpath;
do
{
/* a zip file read */
+ int header;
do
{
- if (!directory->called_zip_first)
- header = directory->zipfile->first_file();
- else
- header = directory->zipfile->next_file();
+ header = directory->called_zip_first ? directory->zipfile->next_file() : directory->zipfile->first_file();
directory->called_zip_first = true;
relpath = nullptr;
}
- while((header >= 0) && ((relpath = get_relative_path(*directory)) == nullptr));
+ while ((header >= 0) && ((relpath = get_relative_path(*directory)) == nullptr));
- if (relpath != nullptr)
+ if (relpath)
{
/* we've found a ZIP entry; but this may be an entry deep within the target directory */
- for (s = relpath; *s && !is_zip_file_separator(*s); s++)
- ;
- separator = *s ? s : nullptr;
+ char const *separator = relpath;
+ while (*separator && !is_zip_file_separator(*separator)) separator++;
- if (separator != nullptr)
+ if (*separator || directory->zipfile->current_is_directory())
{
/* a nested entry; loop through returned_dirlist to see if we've returned the parent directory */
- for (rdent = directory->returned_dirlist; rdent != nullptr; rdent = rdent->next)
+ auto const len(separator - relpath);
+ auto rdent = directory->returned_dirlist.begin();
+ while (directory->returned_dirlist.end() != rdent)
{
- if (!core_strnicmp(rdent->name.c_str(), relpath, separator - relpath))
+ if ((rdent->length() == len) && !core_strnicmp(rdent->c_str(), relpath, len))
break;
+ else
+ ++rdent;
}
- if (rdent == nullptr)
+ if (directory->returned_dirlist.end() == rdent)
{
/* we've found a new directory; add this to returned_dirlist */
- rdent = new zippath_returned_directory;
- rdent->next = directory->returned_dirlist;
- rdent->name.assign(relpath, separator - relpath);
- directory->returned_dirlist = rdent;
+ directory->returned_dirlist.emplace_front(relpath, separator - relpath);
/* ...and return it */
memset(&directory->returned_entry, 0, sizeof(directory->returned_entry));
- directory->returned_entry.name = rdent->name.c_str();
+ directory->returned_entry.name = directory->returned_dirlist.front().c_str();
directory->returned_entry.type = ENTTYPE_DIR;
result = &directory->returned_entry;
}
@@ -1016,7 +998,7 @@ const osd_directory_entry *zippath_readdir(zippath_directory *directory)
}
}
}
- while((relpath != nullptr) && (result == nullptr));
+ while (relpath && !result);
}
return result;
}
diff --git a/src/mame/arcade.flt b/src/mame/arcade.flt
index c8dd56f91ad..c8f63273a51 100644
--- a/src/mame/arcade.flt
+++ b/src/mame/arcade.flt
@@ -558,6 +558,7 @@ jpmsys5sw.cpp
jpmsys7.cpp
jrpacman.cpp
jubilee.cpp
+jungleyo.cpp
junofrst.cpp
jvh.cpp
kaneko16.cpp
@@ -1045,6 +1046,7 @@ sleic.cpp
sliver.cpp
slotcarn.cpp
smsmcorp.cpp
+sms_bootleg.cpp
snesb.cpp
snk.cpp
snk6502.cpp
@@ -1056,6 +1058,7 @@ sonson.cpp
sothello.cpp
spacefb.cpp
spaceg.cpp
+spartanxtec.cpp
spbactn.cpp
spcforce.cpp
spdodgeb.cpp
diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp
index 26581c21550..0ad49a64295 100644
--- a/src/mame/audio/atarijsa.cpp
+++ b/src/mame/audio/atarijsa.cpp
@@ -291,6 +291,7 @@ atari_jsa_base_device::atari_jsa_base_device(const machine_config &mconfig, devi
m_soundcomm(*this, "soundcomm"),
m_jsacpu(*this, "cpu"),
m_ym2151(*this, "ym2151"),
+ m_cpu_region(*this, "cpu"),
m_cpu_bank(*this, "cpubank"),
m_test_read_cb(*this),
m_main_int_cb(*this),
@@ -308,7 +309,7 @@ atari_jsa_base_device::atari_jsa_base_device(const machine_config &mconfig, devi
void atari_jsa_base_device::device_start()
{
// configure CPU bank
- m_cpu_bank->configure_entries(0, 4, m_jsacpu->region()->base(), 0x1000);
+ m_cpu_bank->configure_entries(0, 4, m_cpu_region->base(), 0x1000);
// resolve devices
m_test_read_cb.resolve_safe(0);
@@ -415,6 +416,8 @@ atari_jsa_oki_base_device::atari_jsa_oki_base_device(const machine_config &mconf
: atari_jsa_base_device(mconfig, devtype, name, tag, owner, clock, shortname, channels),
m_oki1(*this, "oki1"),
m_oki2(*this, "oki2"),
+ m_oki1_region(*this, "oki1"),
+ m_oki2_region(*this, "oki2"),
m_oki1_banklo(*this, "oki1lo"),
m_oki1_bankhi(*this, "oki1hi"),
m_oki2_banklo(*this, "oki2lo"),
@@ -568,19 +571,19 @@ void atari_jsa_oki_base_device::device_start()
save_item(NAME(m_overall_volume));
// configure JSA III ADPCM banking
- if (m_oki1_banklo != nullptr && m_oki1_bankhi != nullptr && m_oki1->region()->bytes() >= 0x80000)
+ if (m_oki1_banklo.found() && m_oki1_bankhi.found() && m_oki1_region->bytes() >= 0x80000)
{
- m_oki1_banklo->configure_entries(0, 2, m_oki1->region()->base() + 0x00000, 0x00000);
- m_oki1_banklo->configure_entries(2, 2, m_oki1->region()->base() + 0x20000, 0x20000);
- m_oki1_bankhi->set_base(m_oki1->region()->base() + 0x60000);
+ m_oki1_banklo->configure_entries(0, 2, m_oki1_region->base() + 0x00000, 0x00000);
+ m_oki1_banklo->configure_entries(2, 2, m_oki1_region->base() + 0x20000, 0x20000);
+ m_oki1_bankhi->set_base(m_oki1_region->base() + 0x60000);
}
// configure JSA IIIs ADPCM banking
- if (m_oki2_banklo != nullptr && m_oki2_bankhi != nullptr && m_oki2->region()->bytes() >= 0x80000)
+ if (m_oki2_banklo.found() && m_oki2_bankhi.found() && m_oki2_region->bytes() >= 0x80000)
{
- m_oki2_banklo->configure_entries(0, 2, m_oki2->region()->base() + 0x00000, 0x00000);
- m_oki2_banklo->configure_entries(2, 2, m_oki2->region()->base() + 0x20000, 0x20000);
- m_oki2_bankhi->set_base(m_oki2->region()->base() + 0x60000);
+ m_oki2_banklo->configure_entries(0, 2, m_oki2_region->base() + 0x00000, 0x00000);
+ m_oki2_banklo->configure_entries(2, 2, m_oki2_region->base() + 0x20000, 0x20000);
+ m_oki2_bankhi->set_base(m_oki2_region->base() + 0x60000);
}
}
@@ -608,9 +611,9 @@ void atari_jsa_oki_base_device::device_reset()
void atari_jsa_oki_base_device::update_all_volumes()
{
- if (m_oki1 != nullptr)
+ if (m_oki1.found())
m_oki1->set_output_gain(ALL_OUTPUTS, m_overall_volume * m_oki6295_volume * m_ym2151_ct1);
- if (m_oki2 != nullptr)
+ if (m_oki2.found())
m_oki2->set_output_gain(ALL_OUTPUTS, m_overall_volume * m_oki6295_volume * m_ym2151_ct1);
m_ym2151->set_output_gain(ALL_OUTPUTS, m_overall_volume * m_ym2151_volume);
}
diff --git a/src/mame/audio/atarijsa.h b/src/mame/audio/atarijsa.h
index 38ce437b4d2..dd47ada0c34 100644
--- a/src/mame/audio/atarijsa.h
+++ b/src/mame/audio/atarijsa.h
@@ -117,6 +117,9 @@ protected:
required_device<m6502_device> m_jsacpu;
required_device<ym2151_device> m_ym2151;
+ // memory regions
+ required_memory_region m_cpu_region;
+
// memory banks
required_memory_bank m_cpu_bank;
@@ -159,6 +162,10 @@ protected:
optional_device<okim6295_device> m_oki1;
optional_device<okim6295_device> m_oki2; // JSA IIIs only
+ // memory regions
+ optional_memory_region m_oki1_region;
+ optional_memory_region m_oki2_region;
+
// memory banks
optional_memory_bank m_oki1_banklo; // JSA III(s) only
optional_memory_bank m_oki1_bankhi; // JSA III(s)
diff --git a/src/mame/audio/seibu.cpp b/src/mame/audio/seibu.cpp
index 9883e9b9a25..d3add75d6fd 100644
--- a/src/mame/audio/seibu.cpp
+++ b/src/mame/audio/seibu.cpp
@@ -78,6 +78,7 @@ const device_type SEIBU_SOUND = &device_creator<seibu_sound_device>;
seibu_sound_device::seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SEIBU_SOUND, "Seibu Sound System", tag, owner, clock, "seibu_sound", __FILE__),
+ m_sound_rom(*this, ":audiocpu"),
m_main2sub_pending(0),
m_sub2main_pending(0),
m_rst10_irq(0xff),
@@ -98,16 +99,14 @@ void seibu_sound_device::set_encryption(int mode)
void seibu_sound_device::device_start()
{
- int length = memregion(":audiocpu")->bytes();
- UINT8 *rom = memregion(":audiocpu")->base();
- if (length > 0x10000)
+ if (m_sound_rom.length() > 0x10000)
{
- membank(":seibu_bank1")->configure_entries(0, (length - 0x10000) / 0x8000, rom + 0x10000, 0x8000);
+ membank(":seibu_bank1")->configure_entries(0, (m_sound_rom.length() - 0x10000) / 0x8000, &m_sound_rom[0x10000], 0x8000);
/* Denjin Makai definitely needs this at start-up, it never writes to the bankswitch */
membank(":seibu_bank1")->set_entry(0);
} else
- membank(":seibu_bank1")->set_base(rom + 0x8000);
+ membank(":seibu_bank1")->set_base(&m_sound_rom[0x8000]);
switch(m_encryption_mode) {
case 0: break;
@@ -115,13 +114,13 @@ void seibu_sound_device::device_start()
case 1:
get_custom_decrypt();
- memcpy(m_decrypted_opcodes.get(), rom, length);
- apply_decrypt(rom, m_decrypted_opcodes.get(), 0x2000);
+ memcpy(m_decrypted_opcodes.get(), &m_sound_rom[0], m_sound_rom.length());
+ apply_decrypt(&m_sound_rom[0], m_decrypted_opcodes.get(), 0x2000);
break;
case 2:
get_custom_decrypt();
- apply_decrypt(rom, m_decrypted_opcodes.get(), length);
+ apply_decrypt(&m_sound_rom[0], m_decrypted_opcodes.get(), m_sound_rom.length());
break;
}
@@ -389,7 +388,7 @@ ADDRESS_MAP_START( seibu2_airraid_sound_map, AS_PROGRAM, 8, driver_device )
AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("seibu_sound", seibu_sound_device, irq_clear_w)
AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst10_ack_w)
AM_RANGE(0x4003, 0x4003) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst18_ack_w)
- AM_RANGE(0x4007, 0x4007) AM_WRITENOP // bank, always 0
+ AM_RANGE(0x4007, 0x4007) AM_DEVWRITE("seibu_sound", seibu_sound_device, bank_w)
AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0x4010, 0x4011) AM_DEVREAD("seibu_sound", seibu_sound_device, soundlatch_r)
AM_RANGE(0x4012, 0x4012) AM_DEVREAD("seibu_sound", seibu_sound_device, main_data_pending_r)
@@ -514,8 +513,7 @@ seibu_adpcm_device::seibu_adpcm_device(const machine_config &mconfig, const char
m_end(0),
m_nibble(0),
m_playing(0),
- m_rom_tag(nullptr),
- m_base(nullptr)
+ m_base(*this, DEVICE_SELF)
{
}
@@ -527,7 +525,6 @@ void seibu_adpcm_device::device_start()
{
m_playing = 0;
m_stream = machine().sound().stream_alloc(*this, 0, 1, clock());
- m_base = machine().root_device().memregion(m_rom_tag)->base();
m_adpcm.reset();
save_item(NAME(m_current));
@@ -540,14 +537,11 @@ void seibu_adpcm_device::device_start()
// simplify PCB layout/routing rather than intentional protection, but it
// still fits, especially since the Z80s for all these games are truly encrypted.
-void seibu_adpcm_device::decrypt(const char *region)
+void seibu_adpcm_device::decrypt()
{
- UINT8 *ROM = machine().root_device().memregion(region)->base();
- int len = machine().root_device().memregion(region)->bytes();
-
- for (int i = 0; i < len; i++)
+ for (int i = 0; i < m_base.length(); i++)
{
- ROM[i] = BITSWAP8(ROM[i], 7, 5, 3, 1, 6, 4, 2, 0);
+ m_base[i] = BITSWAP8(m_base[i], 7, 5, 3, 1, 6, 4, 2, 0);
}
}
diff --git a/src/mame/audio/seibu.h b/src/mame/audio/seibu.h
index 732ab5af314..450febcf665 100644
--- a/src/mame/audio/seibu.h
+++ b/src/mame/audio/seibu.h
@@ -76,6 +76,7 @@ protected:
// internal state
device_t *m_sound_cpu;
+ required_region_ptr<UINT8> m_sound_rom;
UINT8 m_main2sub[2];
UINT8 m_sub2main[2];
int m_main2sub_pending;
@@ -105,9 +106,7 @@ public:
seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~seibu_adpcm_device() {}
- static void set_adpcm_rom_tag(device_t &device, const char *tag) { downcast<seibu_adpcm_device &>(device).m_rom_tag = tag; }
-
- void decrypt(const char *region);
+ void decrypt();
DECLARE_WRITE8_MEMBER( adr_w );
DECLARE_WRITE8_MEMBER( ctl_w );
@@ -126,17 +125,13 @@ protected:
UINT32 m_end;
UINT8 m_nibble;
UINT8 m_playing;
- const char *m_rom_tag;
- UINT8 *m_base;
+ required_region_ptr<UINT8> m_base;
};
extern const device_type SEIBU_ADPCM;
/**************************************************************************/
-#define MCFG_SEIBU_ADPCM_ROMREGION(_tag) \
- seibu_adpcm_device::set_adpcm_rom_tag(*device, _tag);
-
#define SEIBU_COIN_INPUTS \
PORT_START("COIN") \
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(4) \
@@ -278,11 +273,9 @@ extern const device_type SEIBU_ADPCM;
#define SEIBU_SOUND_SYSTEM_ADPCM_INTERFACE \
MCFG_SOUND_ADD("adpcm1", SEIBU_ADPCM, 8000) \
- MCFG_SEIBU_ADPCM_ROMREGION("adpcm1") \
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) \
\
MCFG_SOUND_ADD("adpcm2", SEIBU_ADPCM, 8000) \
- MCFG_SEIBU_ADPCM_ROMREGION("adpcm2") \
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
/**************************************************************************/
diff --git a/src/mame/audio/wpcsnd.cpp b/src/mame/audio/wpcsnd.cpp
index 134456fe19b..4aec641b3ac 100644
--- a/src/mame/audio/wpcsnd.cpp
+++ b/src/mame/audio/wpcsnd.cpp
@@ -21,6 +21,7 @@ wpcsnd_device::wpcsnd_device(const machine_config &mconfig, const char *tag, dev
m_dac(*this,"dac"),
m_cpubank(*this,"rombank"),
m_fixedbank(*this,"fixed"),
+ m_rom(*this),
m_reply_cb(*this)
{
}
@@ -92,10 +93,7 @@ void wpcsnd_device::device_start()
void wpcsnd_device::device_reset()
{
- UINT8* ROM;
-
- m_rom = memregion(m_regiontag);
- ROM = m_rom->base();
+ UINT8* ROM = m_rom->base();
m_cpubank->configure_entries(0, 0x80, &ROM[0], 0x8000);
m_cpubank->set_entry(0);
m_fixedbank->configure_entries(0, 1, &ROM[0x17c000], 0x4000);
@@ -110,7 +108,7 @@ void wpcsnd_device::device_reset()
void wpcsnd_device::static_set_gfxregion(device_t &device, const char *tag)
{
wpcsnd_device &cpuboard = downcast<wpcsnd_device &>(device);
- cpuboard.m_regiontag = tag;
+ cpuboard.m_rom.set_tag(tag);
}
WRITE_LINE_MEMBER( wpcsnd_device::ym2151_irq_w)
diff --git a/src/mame/audio/wpcsnd.h b/src/mame/audio/wpcsnd.h
index 36c418bd9bf..0975b2d584a 100644
--- a/src/mame/audio/wpcsnd.h
+++ b/src/mame/audio/wpcsnd.h
@@ -34,7 +34,7 @@ public:
required_device<dac_device> m_dac;
required_memory_bank m_cpubank;
required_memory_bank m_fixedbank;
- memory_region* m_rom;
+ required_memory_region m_rom;
DECLARE_WRITE8_MEMBER(bg_speech_clock_w);
DECLARE_WRITE8_MEMBER(bg_speech_digit_w);
@@ -61,7 +61,6 @@ protected:
virtual machine_config_constructor device_mconfig_additions() const override;
private:
- const char* m_regiontag;
UINT8 m_latch;
UINT8 m_reply;
bool m_reply_available;
diff --git a/src/mame/drivers/actfancr.cpp b/src/mame/drivers/actfancr.cpp
index c9acefba01c..6ce12f09413 100644
--- a/src/mame/drivers/actfancr.cpp
+++ b/src/mame/drivers/actfancr.cpp
@@ -312,16 +312,15 @@ static MACHINE_CONFIG_START( actfancr, actfancr_state )
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,2,2,2);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(2, 2, 2)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 1);
+ MCFG_DECO_MXC06_GFX_REGION(1)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -368,16 +367,15 @@ static MACHINE_CONFIG_START( triothep, actfancr_state )
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,2,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(2, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 1);
+ MCFG_DECO_MXC06_GFX_REGION(1)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/aerofgt.cpp b/src/mame/drivers/aerofgt.cpp
index 2ad00982f1a..15ae41e4221 100644
--- a/src/mame/drivers/aerofgt.cpp
+++ b/src/mame/drivers/aerofgt.cpp
@@ -1341,7 +1341,6 @@ static MACHINE_CONFIG_START( pspikes, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes)
@@ -1451,7 +1450,6 @@ static MACHINE_CONFIG_START( pspikesc, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes)
@@ -1494,13 +1492,11 @@ static MACHINE_CONFIG_START( karatblz, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz)
@@ -1545,13 +1541,11 @@ static MACHINE_CONFIG_START( karatblzbl, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz)
@@ -1593,14 +1587,12 @@ static MACHINE_CONFIG_START( spinlbrk, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_PRITYPE(1)
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback ) // rom lookup
MCFG_VSYSTEM_SPR2_SET_PRITYPE(1)
MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,spinlbrk)
@@ -1647,13 +1639,11 @@ static MACHINE_CONFIG_START( turbofrc, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
@@ -1701,13 +1691,11 @@ static MACHINE_CONFIG_START( aerofgtb, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
@@ -1755,7 +1743,6 @@ static MACHINE_CONFIG_START( aerofgt, aerofgt_state )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( aerofgt_state, aerofgt_tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
@@ -1869,7 +1856,6 @@ static MACHINE_CONFIG_START( wbbc97, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,wbbc97)
diff --git a/src/mame/drivers/airbustr.cpp b/src/mame/drivers/airbustr.cpp
index 3a000c60c30..8c6b6473bb3 100644
--- a/src/mame/drivers/airbustr.cpp
+++ b/src/mame/drivers/airbustr.cpp
@@ -619,7 +619,6 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_GFX_REGION(1)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/aleck64.cpp b/src/mame/drivers/aleck64.cpp
index c86157b6e6a..1463151de96 100644
--- a/src/mame/drivers/aleck64.cpp
+++ b/src/mame/drivers/aleck64.cpp
@@ -845,6 +845,7 @@ static MACHINE_CONFIG_START( aleck64, aleck64_state )
MCFG_MIPS3_DCACHE_SIZE(8192)
MCFG_MIPS3_SYSTEM_CLOCK(62500000)
MCFG_CPU_PROGRAM_MAP(n64_map)
+ MCFG_CPU_FORCE_NO_DRC()
MCFG_CPU_ADD("rsp", RSP, 62500000)
MCFG_RSP_DP_REG_R_CB(DEVREAD32("rcp",n64_periphs, dp_reg_r))
@@ -853,6 +854,7 @@ static MACHINE_CONFIG_START( aleck64, aleck64_state )
MCFG_RSP_SP_REG_W_CB(DEVWRITE32("rcp",n64_periphs, sp_reg_w))
MCFG_RSP_SP_SET_STATUS_CB(DEVWRITE32("rcp",n64_periphs, sp_set_status))
MCFG_CPU_PROGRAM_MAP(rsp_map)
+ MCFG_CPU_FORCE_NO_DRC()
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@@ -872,8 +874,6 @@ static MACHINE_CONFIG_START( aleck64, aleck64_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MCFG_N64_PERIPHS_ADD("rcp");
-
- MCFG_FORCE_NO_DRC()
MACHINE_CONFIG_END
UINT32 aleck64_state::screen_update_e90(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
diff --git a/src/mame/drivers/angelkds.cpp b/src/mame/drivers/angelkds.cpp
index aa6d996010b..53175d2cadd 100644
--- a/src/mame/drivers/angelkds.cpp
+++ b/src/mame/drivers/angelkds.cpp
@@ -125,7 +125,7 @@ Dumped by Chackn
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "machine/segacrp2.h"
+#include "machine/segacrp2_device.h"
#include "sound/2203intf.h"
#include "includes/angelkds.h"
#include "machine/i8255.h"
@@ -570,8 +570,13 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( spcpostn, angelkds )
/* encryption */
- MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_CPU_REPLACE("maincpu", SEGA_317_0005, XTAL_6MHz)
+ MCFG_CPU_PROGRAM_MAP(main_map)
+ MCFG_CPU_IO_MAP(main_portmap)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", angelkds_state, irq0_line_hold)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+
MACHINE_CONFIG_END
/*** Rom Loading
@@ -678,16 +683,7 @@ DRIVER_INIT_MEMBER(angelkds_state,angelkds)
membank("bank1")->configure_entries(0, 16, &RAM[0x0000], 0x4000);
}
-DRIVER_INIT_MEMBER(angelkds_state,spcpostn)
-{
- UINT8 *RAM = memregion("user1")->base();
-
- // 317-0005
- sega_decode_317(memregion("maincpu")->base(), m_decrypted_opcodes, 1);
-
- membank("bank1")->configure_entries(0, 16, &RAM[0x0000], 0x4000);
-}
GAME( 1988, angelkds, 0, angelkds, angelkds, angelkds_state, angelkds, ROT90, "Sega / Nasco?", "Angel Kids (Japan)" , MACHINE_SUPPORTS_SAVE) /* Nasco not displayed but 'Exa Planning' is */
-GAME( 1986, spcpostn, 0, spcpostn, spcpostn, angelkds_state, spcpostn, ROT90, "Sega / Nasco", "Space Position (Japan)" , MACHINE_SUPPORTS_SAVE) /* encrypted */
+GAME( 1986, spcpostn, 0, spcpostn, spcpostn, angelkds_state, angelkds, ROT90, "Sega / Nasco", "Space Position (Japan)" , MACHINE_SUPPORTS_SAVE) /* encrypted */
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index 27b3dd0fc59..d5ef8f11de4 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -107,6 +107,7 @@ Address bus A0-A11 is Y0-Y11
#include "cpu/m6502/m6502.h"
#include "cpu/m6502/m65c02.h"
#include "cpu/z80/z80.h"
+#include "cpu/mcs48/mcs48.h"
#include "formats/ap_dsk35.h"
#include "machine/sonydriv.h"
#include "machine/appldriv.h"
@@ -2437,6 +2438,11 @@ static ADDRESS_MAP_START( lcbank_map, AS_PROGRAM, 8, apple2e_state )
AM_RANGE(0x6000, 0x8fff) AM_ROM AM_REGION("maincpu", 0x5000) AM_WRITE(lc_w)
ADDRESS_MAP_END
+static ADDRESS_MAP_START( spectred_keyb_map, AS_PROGRAM, 8, apple2e_state )
+ AM_RANGE(0x0000, 0x07ff) AM_ROM
+ AM_RANGE(0x0800, 0x0fff) AM_RAM
+ADDRESS_MAP_END
+
/***************************************************************************
KEYBOARD
***************************************************************************/
@@ -3365,6 +3371,14 @@ static MACHINE_CONFIG_DERIVED( apple2ee, apple2e )
MCFG_CPU_PROGRAM_MAP(apple2e_map)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( spectred, apple2e )
+ MCFG_CPU_ADD("keyb_mcu", I8035, XTAL_4MHz) /* guessed frequency */
+ MCFG_CPU_PROGRAM_MAP(spectred_keyb_map)
+
+ //TODO: implement the actual interfacing to this 8035 MCU and
+ // and then remove the keyb CPU inherited from apple2e
+MACHINE_CONFIG_END
+
static MACHINE_CONFIG_DERIVED( tk3000, apple2e )
MCFG_CPU_REPLACE("maincpu", M65C02, 1021800) /* close to actual CPU frequency of 1.020484 MHz */
MCFG_CPU_PROGRAM_MAP(apple2e_map)
@@ -3632,6 +3646,22 @@ ROM_START(apple2c)
ROM_LOAD( "342-0132-c.e12", 0x000, 0x800, CRC(e47045f4) SHA1(12a2e718f5f4acd69b6c33a45a4a940b1440a481) ) // 1983 US-Dvorak
ROM_END
+
+ROM_START(spectred)
+ ROM_REGION(0x8000,"gfx1",0)
+ ROM_LOAD ( "spm-c_ed_06-08-85.u6", 0x0000, 0x8000, CRC(a1b9ffe4) SHA1(3cb281f19f91372e24685792b7bff778944f99ed) )
+
+ ROM_REGION(0x8000,"maincpu",0)
+ ROM_LOAD ( "spm-c_ed_50-09-86.u50.H", 0x0000, 0x4000, CRC(1fccaf24) SHA1(1de1438ee8789f83cbc97f75c0485d1fd0f58a38))
+ ROM_LOAD ( "spm-c_ed_51-09-86.u51.H", 0x4000, 0x4000, CRC(fae8d36c) SHA1(69bed61513482ccb578b89c2fb8e7ba2258e82a5))
+
+ ROM_REGION( 0x800, "keyboard", ROMREGION_ERASE00 )
+ ROM_LOAD( "342-0132-c.e12", 0x000, 0x800, BAD_DUMP CRC(e47045f4) SHA1(12a2e718f5f4acd69b6c33a45a4a940b1440a481) ) // copied from apple2e
+
+ ROM_REGION(0x1000, "keyb_mcu", 0)
+ ROM_LOAD( "167_8980.u5", 0x0000, 0x1000, CRC(a501f197) SHA1(136c2b562999a6e340fe0e9a3776cea8c2e3647e) )
+ROM_END
+
// unlike the very unique TK2000, the TK3000 is a mostly stock enhanced IIe clone
ROM_START(tk3000)
ROM_REGION(0x2000,"gfx1",0)
@@ -3755,6 +3785,7 @@ COMP( 1985, apple2ee, apple2e, 0, apple2ee, apple2e, driver_device,
COMP( 1985, apple2eeuk,apple2e, 0, apple2ee, apple2euk, driver_device,0, "Apple Computer", "Apple //e (enhanced, UK)", MACHINE_SUPPORTS_SAVE )
COMP( 1987, apple2ep, apple2e, 0, apple2ep, apple2ep, driver_device, 0, "Apple Computer", "Apple //e (Platinum)", MACHINE_SUPPORTS_SAVE )
COMP( 1984, apple2c, 0, apple2, apple2c, apple2c, driver_device, 0, "Apple Computer", "Apple //c" , MACHINE_SUPPORTS_SAVE )
+COMP( 1985?,spectred, apple2e, 0, spectred, apple2e, driver_device, 0, "Scopus/Spectrum", "Spectrum ED" , MACHINE_SUPPORTS_SAVE )
COMP( 1986, tk3000, apple2c, 0, tk3000, apple2e, driver_device, 0, "Microdigital", "TK3000//e" , MACHINE_SUPPORTS_SAVE )
COMP( 1989, prav8c, apple2e, 0, apple2e, apple2e, driver_device, 0, "Pravetz", "Pravetz 8C", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
COMP( 1987, laser128, apple2c, 0, laser128, apple2e, driver_device, 0, "Video Technology", "Laser 128 (version 4.2)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/appoooh.cpp b/src/mame/drivers/appoooh.cpp
index c860ccc7ccc..8ffff3e27fe 100644
--- a/src/mame/drivers/appoooh.cpp
+++ b/src/mame/drivers/appoooh.cpp
@@ -166,7 +166,7 @@ Language
#include "emu.h"
#include "cpu/z80/z80.h"
#include "includes/appoooh.h"
-#include "machine/segacrp2.h"
+#include "machine/segacrp2_device.h"
#include "sound/sn76496.h"
@@ -481,6 +481,16 @@ static MACHINE_CONFIG_DERIVED( robowres, appoooh_common )
MCFG_VIDEO_START_OVERRIDE(appoooh_state,appoooh)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( robowrese, robowres )
+
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5179,18432000/6) /* ??? the main xtal is 18.432 MHz */
+ MCFG_CPU_PROGRAM_MAP(main_map)
+ MCFG_CPU_IO_MAP(main_portmap)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", appoooh_state, vblank_irq)
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
/*************************************
*
* ROM definition(s)
@@ -585,46 +595,6 @@ ROM_END
*
*************************************/
-DRIVER_INIT_MEMBER(appoooh_state,robowres)
-{
- static const UINT8 xor_table[128] =
- {
- 0x00,0x45,0x41,0x14,0x10,0x55,0x51,0x01,0x04,0x40,0x45,0x11,0x14,0x50,
- 0x00,0x05,0x41,0x44,0x10,0x15,0x51,0x54,0x04,
- 0x00,0x45,0x41,0x14,0x10,0x55,0x05,0x01,0x44,0x40,0x15,0x11,0x54,0x50,
- 0x00,0x05,0x41,0x44,0x10,0x15,0x51,0x01,0x04,
- 0x40,0x45,0x11,0x14,0x50,0x55,0x05,0x01,0x44,0x40,0x15,0x11,0x54,0x04,
- 0x00,0x45,0x41,0x14,0x50,
- 0x00,0x05,0x41,0x44,0x10,0x15,0x51,0x54,0x04,
- 0x00,0x45,0x41,0x14,0x50,0x55,0x05,0x01,0x44,0x40,0x15,0x11,0x54,0x50,
- 0x00,0x05,0x41,0x44,0x10,0x55,0x51,0x01,0x04,
- 0x40,0x45,0x11,0x14,0x50,0x55,0x05,0x01,0x44,0x40,0x15,0x51,0x54,0x04,
- 0x00,0x45,0x41,0x14,0x10,0x55,0x51,0x01,0x04,
- 0x40,0x45,0x11,0x54,0x50,0x00,0x05,0x41,
- };
-
- static const int swap_table[128] =
- {
- 8, 9,11,13,15, 0, 2, 4, 6,
- 8, 9,11,13,15, 1, 2, 4, 6,
- 8, 9,11,13,15, 1, 2, 4, 6,
- 8, 9,11,13,15, 1, 2, 4, 6,
- 8,10,11,13,15, 1, 2, 4, 6,
- 8,10,11,13,15, 1, 2, 4, 6,
- 8,10,11,13,15, 1, 3, 4, 6,
- 8,
- 7, 1, 2, 4, 6, 0, 1, 3, 5,
- 7, 1, 2, 4, 6, 0, 1, 3, 5,
- 7, 1, 2, 4, 6, 0, 2, 3, 5,
- 7, 1, 2, 4, 6, 0, 2, 3, 5,
- 7, 1, 2, 4, 6, 0, 2, 3, 5,
- 7, 1, 3, 4, 6, 0, 2, 3, 5,
- 7, 1, 3, 4, 6, 0, 2, 4, 5,
- 7,
- };
-
- sega_decode_2(memregion("maincpu")->base(), m_decrypted_opcodes, xor_table, swap_table);
-}
DRIVER_INIT_MEMBER(appoooh_state,robowresb)
{
@@ -639,5 +609,5 @@ DRIVER_INIT_MEMBER(appoooh_state,robowresb)
*************************************/
GAME( 1984, appoooh, 0, appoooh, appoooh, driver_device, 0, ROT0, "Sanritsu / Sega", "Appoooh", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, robowres, 0, robowres, robowres, appoooh_state, robowres, ROT0, "Sanritsu / Sega", "Robo Wres 2001", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, robowres, 0, robowrese,robowres, driver_device, 0, ROT0, "Sanritsu / Sega", "Robo Wres 2001", MACHINE_SUPPORTS_SAVE )
GAME( 1986, robowresb, robowres, robowres, robowres, appoooh_state, robowresb,ROT0, "bootleg", "Robo Wres 2001 (bootleg)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/artmagic.cpp b/src/mame/drivers/artmagic.cpp
index dba800e1a3d..3c23a78051d 100644
--- a/src/mame/drivers/artmagic.cpp
+++ b/src/mame/drivers/artmagic.cpp
@@ -99,7 +99,7 @@ WRITE16_MEMBER(artmagic_state::control_w)
/* OKI banking here */
if (offset == 0)
{
- m_oki->set_bank_base((((data >> 4) & 1) * 0x40000) % m_oki->region()->bytes());
+ m_oki->set_bank_base((((data >> 4) & 1) * 0x40000) % m_oki_region->bytes());
}
logerror("%06X:control_w(%d) = %04X\n", space.device().safe_pc(), offset, data);
diff --git a/src/mame/drivers/asterix.cpp b/src/mame/drivers/asterix.cpp
index a0dd353246b..e43476e8474 100644
--- a/src/mame/drivers/asterix.cpp
+++ b/src/mame/drivers/asterix.cpp
@@ -270,12 +270,9 @@ static MACHINE_CONFIG_START( asterix, asterix_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(asterix_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 1, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 1, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053244", K053244, 0)
diff --git a/src/mame/drivers/attckufo.cpp b/src/mame/drivers/attckufo.cpp
index 3a099bf917f..e0af08c1076 100644
--- a/src/mame/drivers/attckufo.cpp
+++ b/src/mame/drivers/attckufo.cpp
@@ -1,117 +1,52 @@
// license:LGPL-2.1+
// copyright-holders:Tomasz Slanina
-/***************************************
-Attack ufo / Ryoto Electric Co. 1980(?)
- driver by Tomasz Slanina
+/***************************************************************************
-Video and sound emulation based on
- VIC 656x driver by PeT
+ "Attack UFO" © 1980 Ryoto Electric Co.
-TODO:
- - correct I/O chip emulation
- - is game speed ok? a bit slow sometimes
+ TODO:
+ - Verify I/O chip
+ - Is game speed ok? A bit slow sometimes
---
-
-CPU - 6502
- 2,38 +5
- 21 gnd
- 26-33 data bus
-
-I/O - CIA 6526 ?
- 37,38 +5
- 1 gnd
- 2-18 I/O
- 26-33 data bus
-
-Vid - VIC 6560 derivative ???
- 40 +5
- 20 gnd
- 16-32 data bus
-
---
-
-Attack UFO
-???? 1980
-LOIPOIO-B
-
-2 1 2114 2114 2114 2114 2114
-8 7 6 5 4 3 40pin IC "C"
-
-53354 40pin IC "B" 14.318MHz 40pin IC "A"
- SW
-
-****************************************/
+***************************************************************************/
#include "emu.h"
#include "cpu/m6502/m6502.h"
+#include "machine/6821pia.h"
#include "sound/mos6560.h"
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
class attckufo_state : public driver_device
{
public:
attckufo_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_mos6560(*this, "mos6560") ,
- m_mainram(*this, "mainram"),
- m_tileram(*this, "tileram"){ }
-
- /* devices */
- required_device<cpu_device> m_maincpu;
- required_device<mos6560_device> m_mos6560;
-
- /* memory pointers */
- required_shared_ptr<UINT8> m_mainram;
- required_shared_ptr<UINT8> m_tileram;
-
- DECLARE_READ8_MEMBER(attckufo_io_r);
- DECLARE_WRITE8_MEMBER(attckufo_io_w);
+ m_maincpu(*this, "maincpu")
+ {}
DECLARE_READ8_MEMBER( vic_videoram_r );
DECLARE_READ8_MEMBER( vic_colorram_r );
-};
-READ8_MEMBER(attckufo_state::attckufo_io_r)
-{
- switch(offset)
- {
- case 0: return ioport("DSW")->read();
- case 2: return ioport("INPUT")->read();
- }
- return 0xff;
-}
+private:
+ required_device<cpu_device> m_maincpu;
+};
-WRITE8_MEMBER(attckufo_state::attckufo_io_w)
-{
- /*
- offset, data:
- 0 $00,$30
- 1 $00,$04
- 2 $00
- 3 $00,$04
- */
-}
-
-READ8_MEMBER(attckufo_state::vic_videoram_r)
-{
- return m_maincpu->space(AS_PROGRAM).read_byte(offset);
-}
-
-READ8_MEMBER(attckufo_state::vic_colorram_r)
-{
- return m_maincpu->space(AS_PROGRAM).read_byte(offset + 0x400);
-}
+//**************************************************************************
+// ADDRESS MAPS
+//**************************************************************************
static ADDRESS_MAP_START( cpu_map, AS_PROGRAM, 8, attckufo_state )
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
- AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("mainram")
+ AM_RANGE(0x0000, 0x0fff) AM_RAM
AM_RANGE(0x1000, 0x100f) AM_DEVREADWRITE("mos6560", mos6560_device, read, write)
- AM_RANGE(0x1400, 0x1403) AM_READWRITE(attckufo_io_r, attckufo_io_w)
- AM_RANGE(0x1c00, 0x1fff) AM_RAM AM_SHARE("tileram")
- AM_RANGE(0x2000, 0x3fff) AM_ROM
+ AM_RANGE(0x1400, 0x1403) AM_DEVREADWRITE("pia", pia6821_device, read, write)
+ AM_RANGE(0x1c00, 0x1fff) AM_RAM
+ AM_RANGE(0x2000, 0x3fff) AM_ROM AM_REGION("maincpu", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START( vic_videoram_map, AS_0, 8, attckufo_state )
@@ -122,54 +57,92 @@ static ADDRESS_MAP_START( vic_colorram_map, AS_1, 8, attckufo_state )
AM_RANGE(0x000, 0x3ff) AM_READ(vic_colorram_r)
ADDRESS_MAP_END
+
+//**************************************************************************
+// INPUTS
+//**************************************************************************
+
static INPUT_PORTS_START( attckufo )
PORT_START("DSW")
- PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x00, "3" )
- PORT_DIPSETTING( 0x01, "4" )
- PORT_DIPSETTING( 0x02, "5" )
- PORT_DIPSETTING( 0x03, "6" )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Bonus_Life ) )
- PORT_DIPSETTING( 0x04, "1000" )
- PORT_DIPSETTING( 0x00, "1500" )
- PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_DIPNAME(0x03, 0x00, DEF_STR( Lives ))
+ PORT_DIPSETTING( 0x00, "3")
+ PORT_DIPSETTING( 0x01, "4")
+ PORT_DIPSETTING( 0x02, "5")
+ PORT_DIPSETTING( 0x03, "6")
+ PORT_DIPNAME(0x04, 0x04, DEF_STR( Bonus_Life ))
+ PORT_DIPSETTING( 0x04, "1000")
+ PORT_DIPSETTING( 0x00, "1500")
+ PORT_DIPUNUSED(0x08, IP_ACTIVE_LOW)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_COIN1)
PORT_START("INPUT")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_START1)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_START2)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_2WAY
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_2WAY
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_2WAY
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_2WAY
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2)
INPUT_PORTS_END
+
+//**************************************************************************
+// VIDEO EMULATION
+//**************************************************************************
+
+READ8_MEMBER(attckufo_state::vic_videoram_r)
+{
+ return m_maincpu->space(AS_PROGRAM).read_byte(offset);
+}
+
+READ8_MEMBER(attckufo_state::vic_colorram_r)
+{
+ return m_maincpu->space(AS_PROGRAM).read_byte(offset + 0x400);
+}
+
+
+//**************************************************************************
+// MACHINE DEFINTIONS
+//**************************************************************************
+
static MACHINE_CONFIG_START( attckufo, attckufo_state )
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", M6502, XTAL_14_31818MHz/14)
+ MCFG_CPU_ADD("maincpu", M6502, XTAL_14_31818MHz / 14)
MCFG_CPU_PROGRAM_MAP(cpu_map)
- /* video/sound hardware */
+ MCFG_DEVICE_ADD("pia", PIA6821, 0)
+ MCFG_PIA_READPA_HANDLER(IOPORT("DSW"))
+ MCFG_PIA_READPB_HANDLER(IOPORT("INPUT"))
+
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_MOS656X_ATTACK_UFO_ADD("mos6560", "screen", XTAL_14_31818MHz/14, vic_videoram_map, vic_colorram_map)
+ MCFG_MOS656X_ATTACK_UFO_ADD("mos6560", "screen", XTAL_14_31818MHz / 14, vic_videoram_map, vic_colorram_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
+
+//**************************************************************************
+// ROM DEFINITIONS
+//**************************************************************************
+
ROM_START( attckufo )
- ROM_REGION( 0x4000, "maincpu", 0 )
- ROM_LOAD( "1", 0x2000, 0x0400, CRC(b32a36ab) SHA1(4e64686d498f7a79f5213c42b7afbf35aac2b622) )
- ROM_LOAD( "2", 0x2400, 0x0400, CRC(35fc8424) SHA1(d4926768f2e5b21476c7ec33743fe3e1c76662db) )
- ROM_LOAD( "3", 0x2800, 0x0400, CRC(6341c8c4) SHA1(8647a4fabad0399769dd068d784be72e27afca35) )
- ROM_LOAD( "4", 0x2c00, 0x0400, CRC(1ed1d93f) SHA1(2e04c63ea2fc958415f7c7de9d18dadf9e085755) )
- ROM_LOAD( "5", 0x3000, 0x0400, CRC(3380e0f4) SHA1(e1d681f7370ba7fc2bf3561533f4aaf12eefbcb8) )
- ROM_LOAD( "6", 0x3400, 0x0400, CRC(8103e031) SHA1(86bc8dd6c74b84804ede31a8454b5b3d3e4d88b1) )
- ROM_LOAD( "7", 0x3800, 0x0400, CRC(43a41012) SHA1(edd14f49dc9ae7a5a14583b9a92ebbbdd021d7b1) )
- ROM_LOAD( "8", 0x3c00, 0x0400, CRC(9ce93eb0) SHA1(68753e88db4e920446b9582b5cb713b1beec3b27) )
+ ROM_REGION(0x2000, "maincpu", 0)
+ ROM_LOAD("1", 0x0000, 0x0400, CRC(b32a36ab) SHA1(4e64686d498f7a79f5213c42b7afbf35aac2b622))
+ ROM_LOAD("2", 0x0400, 0x0400, CRC(35fc8424) SHA1(d4926768f2e5b21476c7ec33743fe3e1c76662db))
+ ROM_LOAD("3", 0x0800, 0x0400, CRC(6341c8c4) SHA1(8647a4fabad0399769dd068d784be72e27afca35))
+ ROM_LOAD("4", 0x0c00, 0x0400, CRC(1ed1d93f) SHA1(2e04c63ea2fc958415f7c7de9d18dadf9e085755))
+ ROM_LOAD("5", 0x1000, 0x0400, CRC(3380e0f4) SHA1(e1d681f7370ba7fc2bf3561533f4aaf12eefbcb8))
+ ROM_LOAD("6", 0x1400, 0x0400, CRC(8103e031) SHA1(86bc8dd6c74b84804ede31a8454b5b3d3e4d88b1))
+ ROM_LOAD("7", 0x1800, 0x0400, CRC(43a41012) SHA1(edd14f49dc9ae7a5a14583b9a92ebbbdd021d7b1))
+ ROM_LOAD("8", 0x1c00, 0x0400, CRC(9ce93eb0) SHA1(68753e88db4e920446b9582b5cb713b1beec3b27))
ROM_END
-GAME( 1980, attckufo, 0, attckufo, attckufo, driver_device, 0, ROT270, "Ryoto Electric Co.", "Attack Ufo", MACHINE_SUPPORTS_SAVE )
+
+//**************************************************************************
+// SYSTEM DRIVERS
+//**************************************************************************
+
+// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROTATION COMPANY FULLNAME FLAGS
+GAME( 1980, attckufo, 0, attckufo, attckufo, driver_device, 0, ROT270, "Ryoto Electric Co.", "Attack UFO", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/backfire.cpp b/src/mame/drivers/backfire.cpp
index 9ca90c212e8..83f0f64f151 100644
--- a/src/mame/drivers/backfire.cpp
+++ b/src/mame/drivers/backfire.cpp
@@ -513,7 +513,6 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SET_SCREEN("lscreen")
@@ -530,21 +529,18 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
MCFG_DECO16IC_PF12_8X8_BANK(2)
MCFG_DECO16IC_PF12_16X16_BANK(3)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_VIDEO_SET_SCREEN("lscreen")
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_PRIORITY_CB(backfire_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_VIDEO_SET_SCREEN("rscreen")
MCFG_DECO_SPRITE_GFX_REGION(5)
MCFG_DECO_SPRITE_PRIORITY_CB(backfire_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/bbusters.cpp b/src/mame/drivers/bbusters.cpp
index e515416b646..2a04e850028 100644
--- a/src/mame/drivers/bbusters.cpp
+++ b/src/mame/drivers/bbusters.cpp
@@ -191,11 +191,6 @@ Beast Busters notes (from Brian Hargrove)
1. Stage 2 for example, has background sprites and enemies that float on the
foreground and not behind the moving elevator layer.
-2. Oddly enough, the emulation completely misses the huge zombie that jumps
-out during the attract demo right before the text story text comes in.
-When you hear the high pitch "zing" sound, there should be a zombie nearly
-the entire size of the screen.
-
***************************************************************************/
@@ -834,6 +829,55 @@ ROM_START( bbustersu )
ROM_LOAD( "bbusters-eeprom.bin", 0x00, 0x100, CRC(a52ebd66) SHA1(de04db6f1510700c61bf152799452a80220ae87c) )
ROM_END
+
+ROM_START( bbustersj )
+ ROM_REGION( 0x80000, "maincpu", 0 )
+ ROM_LOAD16_BYTE( "bb3_ver2_j2.k10", 0x000000, 0x20000, CRC(605eb62f) SHA1(b13afd561731ad9115c5b997b8a7a79a57557612) )
+ ROM_LOAD16_BYTE( "bb5_ver2_j2.k12", 0x000001, 0x20000, CRC(9deea26f) SHA1(c5436db0c55da9b0c5e0e053f59a1e17ee4690a6) )
+ ROM_LOAD16_BYTE( "bb-2.k8", 0x040000, 0x20000, CRC(20141805) SHA1(0958579681bda81bcf48d020a14bc147c1e575f1) )
+ ROM_LOAD16_BYTE( "bb-4.k11", 0x040001, 0x20000, CRC(d482e0e9) SHA1(e56ca92965e8954b613ba4b0e3975e3a12840c30) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_LOAD( "bb-1.e6", 0x000000, 0x10000, CRC(4360f2ee) SHA1(4c6b212f59389bdf4388893d2030493b110ac087) )
+
+ ROM_REGION( 0x020000, "gfx1", 0 )
+ ROM_LOAD( "bb-10.l9", 0x000000, 0x20000, CRC(490c0d9b) SHA1(567c25a6d96407259c64061d674305e4117d9fa4) )
+
+ ROM_REGION( 0x200000, "gfx2", 0 )
+ ROM_LOAD( "bb-f11.m16", 0x000000, 0x80000, CRC(39fdf9c0) SHA1(80392947e3a1831c3ee80139f6f3bdc3bafa4f0d) )
+ ROM_LOAD( "bb-f12.m13", 0x080000, 0x80000, CRC(69ee046b) SHA1(5c0435f1ce76b584fa8d154d7617d73c7ab5f62f) )
+ ROM_LOAD( "bb-f13.m12", 0x100000, 0x80000, CRC(f5ef840e) SHA1(dd0f630c52076e0d330f47931e68a3ae9a401078) )
+ ROM_LOAD( "bb-f14.m11", 0x180000, 0x80000, CRC(1a7df3bb) SHA1(1f27a528e6f89fe56a7342c4f1ff733da0a09327) )
+
+ ROM_REGION( 0x200000, "gfx3", 0 )
+ ROM_LOAD( "bb-f21.l10", 0x000000, 0x80000, CRC(530f595b) SHA1(820898693b878c4423de9c244f943d39ea69515e) )
+ ROM_LOAD( "bb-f22.l12", 0x080000, 0x80000, CRC(889c562e) SHA1(d19172d6515ab9793c98de75d6e41687e61a408d) )
+ ROM_LOAD( "bb-f23.l13", 0x100000, 0x80000, CRC(c89fe0da) SHA1(92be860a7191e7473c42aa2da981eda873219d3d) )
+ ROM_LOAD( "bb-f24.l15", 0x180000, 0x80000, CRC(e0d81359) SHA1(2213c17651b6c023a456447f352b0739439f913a) )
+
+ ROM_REGION( 0x80000, "gfx4", 0 )
+ ROM_LOAD( "bb-back1.m4", 0x000000, 0x80000, CRC(b5445313) SHA1(3c99b557b2af30ff0fbc8a7dc6c40448c4f327db) )
+
+ ROM_REGION( 0x80000, "gfx5", 0 )
+ ROM_LOAD( "bb-back2.m6", 0x000000, 0x80000, CRC(8be996f6) SHA1(1e2c56f4c24793f806d7b366b92edc03145ae94c) )
+
+ ROM_REGION( 0x10000, "user1", 0 ) /* Zoom table */
+ /* same rom exists in 4 different locations on the board */
+ ROM_LOAD( "bb-6.e7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) )
+ ROM_LOAD( "bb-7.h7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) )
+ ROM_LOAD( "bb-8.a14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) )
+ ROM_LOAD( "bb-9.c14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) )
+
+ ROM_REGION( 0x80000, "ymsnd", 0 )
+ ROM_LOAD( "bb-pcma.l5", 0x000000, 0x80000, CRC(44cd5bfe) SHA1(26a612191a0aa614c090203485aba17c99c763ee) )
+
+ ROM_REGION( 0x80000, "ymsnd.deltat", 0 )
+ ROM_LOAD( "bb-pcmb.l3", 0x000000, 0x80000, CRC(c8d5dd53) SHA1(0f7e94532cc14852ca12c1b792e5479667af899e) )
+
+ ROM_REGION( 0x100, "eeprom", 0 )
+ ROM_LOAD( "bbusters-eeprom.bin", 0x00, 0x100, CRC(a52ebd66) SHA1(de04db6f1510700c61bf152799452a80220ae87c) )
+ROM_END
+
ROM_START( bbustersua )
ROM_REGION( 0x80000, "maincpu", 0 )
ROM_LOAD16_BYTE( "bb-ver2-u3.k10", 0x000000, 0x20000, CRC(6930088b) SHA1(265f0b584d81b6fdcda5c3a2e0bd15d56443bb35) )
@@ -1071,6 +1115,7 @@ ROM_END
GAME( 1989, bbusters, 0, bbusters, bbusters, driver_device, 0, ROT0, "SNK", "Beast Busters (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1989, bbustersu, bbusters, bbusters, bbusters, driver_device, 0, ROT0, "SNK", "Beast Busters (US, Version 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1989, bbustersua, bbusters, bbusters, bbusters, driver_device, 0, ROT0, "SNK", "Beast Busters (US, Version 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, bbustersj, bbusters, bbusters, bbusters, driver_device, 0, ROT0, "SNK", "Beast Busters (Japan, Version 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1989, mechatt, 0, mechatt, mechatt, driver_device, 0, ROT0, "SNK", "Mechanized Attack (World)", MACHINE_SUPPORTS_SAVE )
GAME( 1989, mechattj, mechatt, mechatt, mechattj, driver_device, 0, ROT0, "SNK", "Mechanized Attack (Japan)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/bishi.cpp b/src/mame/drivers/bishi.cpp
index f46f2b3e8e6..a9de3729ea9 100644
--- a/src/mame/drivers/bishi.cpp
+++ b/src/mame/drivers/bishi.cpp
@@ -392,12 +392,9 @@ static MACHINE_CONFIG_START( bishi, bishi_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(bishi_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k054338", K054338, 0)
diff --git a/src/mame/drivers/blackt96.cpp b/src/mame/drivers/blackt96.cpp
index 2039e7afe03..4f5801ecb3a 100644
--- a/src/mame/drivers/blackt96.cpp
+++ b/src/mame/drivers/blackt96.cpp
@@ -373,7 +373,6 @@ static MACHINE_CONFIG_START( blackt96, blackt96_state )
MCFG_DEVICE_ADD("sprites", SNK68_SPR, 0)
MCFG_SNK68_SPR_GFXDECODE("gfxdecode")
- MCFG_SNK68_SPR_PALETTE("palette")
MCFG_SNK68_SPR_SET_TILE_INDIRECT( blackt96_state, tile_callback )
MCFG_SNK68_SPR_NO_PARTIAL
diff --git a/src/mame/drivers/boogwing.cpp b/src/mame/drivers/boogwing.cpp
index 098397785c3..ef1fa53fb22 100644
--- a/src/mame/drivers/boogwing.cpp
+++ b/src/mame/drivers/boogwing.cpp
@@ -358,7 +358,6 @@ static MACHINE_CONFIG_START( boogwing, boogwing_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -374,17 +373,14 @@ static MACHINE_CONFIG_START( boogwing, boogwing_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE
diff --git a/src/mame/drivers/cabal.cpp b/src/mame/drivers/cabal.cpp
index 9f41c09a89a..b14eeb7e6f8 100644
--- a/src/mame/drivers/cabal.cpp
+++ b/src/mame/drivers/cabal.cpp
@@ -503,11 +503,9 @@ static MACHINE_CONFIG_START( cabal_base, cabal_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.80)
MCFG_SOUND_ADD("adpcm1", SEIBU_ADPCM, 8000) /* it should use the msm5205 */
- MCFG_SEIBU_ADPCM_ROMREGION("adpcm1")
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.40)
MCFG_SOUND_ADD("adpcm2", SEIBU_ADPCM, 8000) /* it should use the msm5205 */
- MCFG_SEIBU_ADPCM_ROMREGION("adpcm2")
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.40)
MACHINE_CONFIG_END
@@ -873,8 +871,8 @@ ROM_END
DRIVER_INIT_MEMBER(cabal_state,cabal)
{
- m_adpcm1->decrypt("adpcm1");
- m_adpcm2->decrypt("adpcm2");
+ m_adpcm1->decrypt();
+ m_adpcm2->decrypt();
}
DRIVER_INIT_MEMBER(cabal_state,cabalbl2)
@@ -882,8 +880,8 @@ DRIVER_INIT_MEMBER(cabal_state,cabalbl2)
UINT8 *decrypt = m_seibu_sound->get_custom_decrypt();
memcpy(decrypt, memregion("audiocpu")->base()+0x2000, 0x2000);
memcpy(decrypt+0x8000, memregion("audiocpu")->base()+0x8000, 0x8000);
- m_adpcm1->decrypt("adpcm1");
- m_adpcm2->decrypt("adpcm2");
+ m_adpcm1->decrypt();
+ m_adpcm2->decrypt();
}
diff --git a/src/mame/drivers/calorie.cpp b/src/mame/drivers/calorie.cpp
index a4602d37189..1faa6b62bb8 100644
--- a/src/mame/drivers/calorie.cpp
+++ b/src/mame/drivers/calorie.cpp
@@ -81,7 +81,7 @@ Notes:
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "machine/segacrp2.h"
+#include "machine/segacrp2_device.h"
#include "sound/ay8910.h"
@@ -110,7 +110,6 @@ public:
DECLARE_WRITE8_MEMBER(calorie_flipscreen_w);
DECLARE_READ8_MEMBER(calorie_soundlatch_r);
DECLARE_WRITE8_MEMBER(bogus_w);
- DECLARE_DRIVER_INIT(calorie);
DECLARE_DRIVER_INIT(calorieb);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
@@ -488,6 +487,13 @@ static MACHINE_CONFIG_START( calorie, calorie_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.8) /* YM2149 really */
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( caloriee, calorie )
+ MCFG_CPU_REPLACE("maincpu", SEGA_317_0004,4000000) /* 4 MHz */
+ MCFG_CPU_PROGRAM_MAP(calorie_map)
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", calorie_state, irq0_line_hold)
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
/*************************************
*
@@ -560,11 +566,7 @@ ROM_END
*
*************************************/
-DRIVER_INIT_MEMBER(calorie_state,calorie)
-{
- // 317-0004
- sega_decode_317(memregion("maincpu")->base(), m_decrypted_opcodes, 0);
-}
+
DRIVER_INIT_MEMBER(calorie_state,calorieb)
{
@@ -579,5 +581,5 @@ DRIVER_INIT_MEMBER(calorie_state,calorieb)
*************************************/
/* Note: the bootleg is identical to the original once decrypted */
-GAME( 1986, calorie, 0, calorie, calorie, calorie_state, calorie, ROT0, "Sega", "Calorie Kun vs Moguranian", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, calorie, 0, caloriee,calorie, driver_device, 0, ROT0, "Sega", "Calorie Kun vs Moguranian", MACHINE_SUPPORTS_SAVE )
GAME( 1986, calorieb, calorie, calorie, calorie, calorie_state, calorieb, ROT0, "bootleg", "Calorie Kun vs Moguranian (bootleg)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/cbuster.cpp b/src/mame/drivers/cbuster.cpp
index b68b1ce2c94..16bc2ca7eac 100644
--- a/src/mame/drivers/cbuster.cpp
+++ b/src/mame/drivers/cbuster.cpp
@@ -331,7 +331,6 @@ static MACHINE_CONFIG_START( twocrude, cbuster_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -347,12 +346,10 @@ static MACHINE_CONFIG_START( twocrude, cbuster_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/cchance.cpp b/src/mame/drivers/cchance.cpp
index 0283cf99df9..184ef938fb4 100644
--- a/src/mame/drivers/cchance.cpp
+++ b/src/mame/drivers/cchance.cpp
@@ -218,7 +218,6 @@ static MACHINE_CONFIG_START( cchance, cchance_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/cclimber.cpp b/src/mame/drivers/cclimber.cpp
index f8b89ed07b2..72466a164ae 100644
--- a/src/mame/drivers/cclimber.cpp
+++ b/src/mame/drivers/cclimber.cpp
@@ -239,7 +239,7 @@ Dip location verified from manual for: cclimber, guzzler, swimmer
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "machine/segacrpt.h"
+#include "machine/segacrpt_device.h"
#include "sound/ay8910.h"
#include "sound/samples.h"
#include "audio/cclimber.h"
@@ -1090,10 +1090,12 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( yamato, root )
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5018, MASTER_CLOCK/3/2) /* 3.072 MHz */
MCFG_CPU_PROGRAM_MAP(yamato_map)
MCFG_CPU_IO_MAP(yamato_portmap)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", cclimber_state, vblank_irq)
MCFG_CPU_DECRYPTED_OPCODES_MAP(yamato_decrypted_opcodes_map)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
MCFG_CPU_ADD("audiocpu", Z80, 3072000) /* 3.072 MHz ? */
MCFG_CPU_PROGRAM_MAP(yamato_audio_map)
@@ -1119,10 +1121,15 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( toprollr, cclimber )
- /* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5018, MASTER_CLOCK/3/2) /* 3.072 MHz */
MCFG_CPU_PROGRAM_MAP(toprollr_map)
+ MCFG_CPU_IO_MAP(cclimber_portmap)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", cclimber_state, vblank_irq)
MCFG_CPU_DECRYPTED_OPCODES_MAP(toprollr_decrypted_opcodes_map)
+ MCFG_SEGACRPT_SET_SIZE(0)
+ MCFG_SEGACRPT_SET_NUMBANKS(3)
+ MCFG_SEGACRPT_SET_BANKSIZE(0x6000)
+
/* video hardware */
MCFG_GFXDECODE_MODIFY("gfxdecode", toprollr)
@@ -2461,29 +2468,7 @@ ROM_END
DRIVER_INIT_MEMBER(cclimber_state,yamato)
{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...0 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x20,0xa0,0x28,0xa8 }, /* ...0...0...1...1 */
- { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x08,0x28 }, /* ...0...1...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...0...1 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x20,0xa0,0x28,0xa8 }, /* ...0...1...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...1...1 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...0...0...0 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...0...1 */
- { 0xa0,0x20,0x80,0x00 }, { 0x20,0xa0,0x28,0xa8 }, /* ...1...0...1...0 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x20,0xa0,0x28,0xa8 }, /* ...1...0...1...1 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...1...0...0 */
- { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...1...0...1 */
- { 0xa0,0x20,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...1...1...1...0 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x00,0x08,0x20,0x28 } /* ...1...1...1...1 */
- };
-
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
+
save_item(NAME(m_yamato_p0));
save_item(NAME(m_yamato_p1));
@@ -2492,30 +2477,20 @@ DRIVER_INIT_MEMBER(cclimber_state,yamato)
DRIVER_INIT_MEMBER(cclimber_state,toprollr)
{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...0 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x20,0xa0,0x28,0xa8 }, /* ...0...0...1...1 */
- { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x08,0x28 }, /* ...0...1...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...0...1 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x20,0xa0,0x28,0xa8 }, /* ...0...1...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...1...1 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...0...0...0 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...0...1 */
- { 0xa0,0x20,0x80,0x00 }, { 0x20,0xa0,0x28,0xa8 }, /* ...1...0...1...0 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x20,0xa0,0x28,0xa8 }, /* ...1...0...1...1 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...1...0...0 */
- { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...1...0...1 */
- { 0xa0,0x20,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...1...1...1...0 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x00,0x08,0x20,0x28 } /* ...1...1...1...1 */
- };
-
m_opcodes = std::make_unique<UINT8[]>(0x6000*3);
- sega_decode(memregion("user1")->base(), m_opcodes.get(), 0, convtable, 3, 0x6000);
+
+ segacrpt_z80_device* cpu = (segacrpt_z80_device*)machine().device(":maincpu");
+
+ // this seems to be a messy abuse / use of the encryption, investigate
+ if (!cpu)
+ {
+ fatalerror("can't find cpu!\n");
+ }
+ else
+ {
+ cpu->set_region_p(memregion("user1")->base());
+ cpu->set_decrypted_p(m_opcodes.get());
+ }
membank("bank1")->configure_entries(0, 3, memregion("user1")->base(), 0x6000);
membank("bank1d")->configure_entries(0, 3, m_opcodes.get(), 0x6000);
diff --git a/src/mame/drivers/champbwl.cpp b/src/mame/drivers/champbwl.cpp
index 745870f02bc..8be942af8e2 100644
--- a/src/mame/drivers/champbwl.cpp
+++ b/src/mame/drivers/champbwl.cpp
@@ -503,7 +503,6 @@ static MACHINE_CONFIG_START( champbwl, champbwl_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -565,7 +564,6 @@ static MACHINE_CONFIG_START( doraemon, champbwl_state )
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(2000), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW )
MCFG_MACHINE_START_OVERRIDE(champbwl_state,doraemon)
diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp
index c421161c9d8..dfa70a7dcee 100644
--- a/src/mame/drivers/chihiro.cpp
+++ b/src/mame/drivers/chihiro.cpp
@@ -385,7 +385,7 @@ Thanks to Alex, Mr Mudkips, and Philip Burke for this info.
class ohci_hlean2131qc_device : public ohci_function_device
{
public:
- ohci_hlean2131qc_device(running_machine &machine);
+ ohci_hlean2131qc_device(running_machine &machine, xbox_base_state *usb_bus_manager);
int handle_nonstandard_request(int endpoint, USBSetupPacket *setup) override;
int handle_bulk_pid(int endpoint, int pid, UINT8 *buffer, int size) override;
void set_region_base(UINT8 *data);
@@ -413,7 +413,7 @@ private:
class ohci_hlean2131sc_device : public ohci_function_device
{
public:
- ohci_hlean2131sc_device(running_machine &machine);
+ ohci_hlean2131sc_device(running_machine &machine, xbox_base_state *usb_bus_manager);
int handle_nonstandard_request(int endpoint, USBSetupPacket *setup) override;
private:
static const USBStandardDeviceDescriptor devdesc;
@@ -665,8 +665,8 @@ const UINT8 ohci_hlean2131qc_device::strdesc0[] = { 0x04,0x03,0x00,0x00 };
const UINT8 ohci_hlean2131qc_device::strdesc1[] = { 0x0A,0x03,0x53,0x00,0x45,0x00,0x47,0x00,0x41,0x00 };
const UINT8 ohci_hlean2131qc_device::strdesc2[] = { 0x0E,0x03,0x42,0x00,0x41,0x00,0x53,0x00,0x45,0x00,0x42,0x03,0xFF,0x0B };
-ohci_hlean2131qc_device::ohci_hlean2131qc_device(running_machine &machine) :
- ohci_function_device(machine)
+ohci_hlean2131qc_device::ohci_hlean2131qc_device(running_machine &machine, xbox_base_state *usb_bus_manager) :
+ ohci_function_device(machine, usb_bus_manager)
{
add_device_descriptor(devdesc);
add_configuration_descriptor(condesc);
@@ -712,17 +712,22 @@ int ohci_hlean2131qc_device::handle_nonstandard_request(int endpoint, USBSetupPa
}
if ((setup->bRequest == 0x16) && (setup->wValue == 0x1f00))
{
+ // should be for an2131sc
endpoints[1].remain = setup->wIndex;
endpoints[1].position = region + 0x1f00;
}
- if (setup->bRequest == 0x19) // 19 used to receive jvs packet, 20 to send
+ if (setup->bRequest == 0x19) // 19 used to receive packet, 20 to send ?
{
- endpoints[endpoint].buffer[5] = 0;
- endpoints[endpoint].buffer[4] = 20;
+ // amount to transfer
+ endpoints[endpoint].buffer[5] = 20 >> 8;
+ endpoints[endpoint].buffer[4] = (20 & 0xff);
+ endpoints[4].remain = 20;
+ endpoints[4].position = endpoints[4].buffer;
+ memset(endpoints[4].buffer, 0, 20);
}
if (setup->bRequest == 0x20)
{
- printf("\tJvs packet of %d bytes\n\r", setup->wIndex);
+ printf(" Jvs packet of %d bytes\n\r", setup->wIndex-3);
}
endpoints[endpoint].buffer[0] = 0;
@@ -734,7 +739,7 @@ int ohci_hlean2131qc_device::handle_nonstandard_request(int endpoint, USBSetupPa
int ohci_hlean2131qc_device::handle_bulk_pid(int endpoint, int pid, UINT8 *buffer, int size)
{
printf("Bulk request: %x %d %x\n\r", endpoint, pid, size);
- if (((endpoint == 1) || (endpoint == 2)) && (pid == InPid))
+ if (((endpoint == 1) || (endpoint == 2) || (endpoint == 4)) && (pid == InPid))
{
if (size > endpoints[endpoint].remain)
size = endpoints[endpoint].remain;
@@ -742,6 +747,12 @@ int ohci_hlean2131qc_device::handle_bulk_pid(int endpoint, int pid, UINT8 *buffe
endpoints[endpoint].position = endpoints[endpoint].position + size;
endpoints[endpoint].remain = endpoints[endpoint].remain - size;
}
+ if ((endpoint == 4) && (pid == OutPid))
+ {
+ for (int n = 0; n < size; n++)
+ printf(" %02x",buffer[n]);
+ printf("\n\r");
+ }
return size;
}
@@ -759,8 +770,8 @@ const UINT8 ohci_hlean2131sc_device::strdesc0[] = { 0x04,0x03,0x00,0x00 };
const UINT8 ohci_hlean2131sc_device::strdesc1[] = { 0x0A,0x03,0x53,0x00,0x45,0x00,0x47,0x00,0x41,0x00 };
const UINT8 ohci_hlean2131sc_device::strdesc2[] = { 0x0E,0x03,0x42,0x00,0x41,0x00,0x53,0x00,0x45,0x00,0x42,0x00,0x44,0x00 };
-ohci_hlean2131sc_device::ohci_hlean2131sc_device(running_machine &machine) :
- ohci_function_device(machine)
+ohci_hlean2131sc_device::ohci_hlean2131sc_device(running_machine &machine, xbox_base_state *usb_bus_manager) :
+ ohci_function_device(machine, usb_bus_manager)
{
add_device_descriptor(devdesc);
add_configuration_descriptor(condesc);
@@ -1058,7 +1069,7 @@ void chihiro_state::machine_start()
break;
}
usbhack_counter = 0;
- usb_device = new ohci_hlean2131qc_device(machine());
+ usb_device = new ohci_hlean2131qc_device(machine(), this);
usb_device->set_region_base(memregion(":others")->base()); // temporary
//usb_device = new ohci_hlean2131sc_device(machine());
usb_ohci_plug(1, usb_device); // connect
@@ -1083,7 +1094,7 @@ static MACHINE_CONFIG_DERIVED_CLASS(chihiro_base, xbox_base, chihiro_state)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED(chihirogd, chihiro_base)
- MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", ":gdrom", ":pic", nullptr, NOOP)
+ MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", "gdrom", "pic", nullptr, NOOP)
MACHINE_CONFIG_END
#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
diff --git a/src/mame/drivers/cninja.cpp b/src/mame/drivers/cninja.cpp
index 5e0e6c64183..d027733d85f 100644
--- a/src/mame/drivers/cninja.cpp
+++ b/src/mame/drivers/cninja.cpp
@@ -878,7 +878,6 @@ static MACHINE_CONFIG_START( cninja, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -894,13 +893,11 @@ static MACHINE_CONFIG_START( cninja, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_PRIORITY_CB(cninja_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
@@ -968,7 +965,6 @@ static MACHINE_CONFIG_START( stoneage, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -984,13 +980,11 @@ static MACHINE_CONFIG_START( stoneage, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_PRIORITY_CB(cninja_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
@@ -1053,7 +1047,6 @@ static MACHINE_CONFIG_START( cninjabl, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1069,7 +1062,6 @@ static MACHINE_CONFIG_START( cninjabl, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1125,7 +1117,6 @@ static MACHINE_CONFIG_START( edrandy, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1141,13 +1132,11 @@ static MACHINE_CONFIG_START( edrandy, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_PRIORITY_CB(cninja_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
@@ -1213,7 +1202,6 @@ static MACHINE_CONFIG_START( robocop2, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1229,13 +1217,11 @@ static MACHINE_CONFIG_START( robocop2, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_PRIORITY_CB(cninja_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
@@ -1307,7 +1293,6 @@ static MACHINE_CONFIG_START( mutantf, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1323,17 +1308,14 @@ static MACHINE_CONFIG_START( mutantf, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp
index 30fc021028b..113498dd03f 100644
--- a/src/mame/drivers/cobra.cpp
+++ b/src/mame/drivers/cobra.cpp
@@ -3302,15 +3302,11 @@ static MACHINE_CONFIG_START( cobra, cobra_state )
MCFG_M48T58_ADD("m48t58")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_DEVICE_ADD("k001604", K001604, 0) // on the LAN board in Racing Jam DX
- MCFG_K001604_GFX_INDEX1(0)
- MCFG_K001604_GFX_INDEX2(1)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0) // correct?
MCFG_K001604_ROZ_OFFSET(0) // correct?
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_DEVICE_ADD("cobra_jvs_host", COBRA_JVS_HOST, 4000000)
diff --git a/src/mame/drivers/crospang.cpp b/src/mame/drivers/crospang.cpp
index 1cdd1ff9f83..19a999466f7 100644
--- a/src/mame/drivers/crospang.cpp
+++ b/src/mame/drivers/crospang.cpp
@@ -360,7 +360,6 @@ static MACHINE_CONFIG_START( crospang, crospang_state )
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_OFFSETS(5, 7)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/crshrace.cpp b/src/mame/drivers/crshrace.cpp
index 7cc33cf93a2..49a7ba67639 100644
--- a/src/mame/drivers/crshrace.cpp
+++ b/src/mame/drivers/crshrace.cpp
@@ -455,7 +455,6 @@ static MACHINE_CONFIG_START( crshrace, crshrace_state )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( crshrace_state, crshrace_tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
diff --git a/src/mame/drivers/cshooter.cpp b/src/mame/drivers/cshooter.cpp
index d667d57e710..f64d950dc61 100644
--- a/src/mame/drivers/cshooter.cpp
+++ b/src/mame/drivers/cshooter.cpp
@@ -7,17 +7,8 @@
- added sprites, bgmap reading and few fixes here and there
airraid and cshootere are a bit "playable" ;) without gfx
-
-Haze's notes :
-
- - interrupts are probably wrong .. it ends up writing to rom etc.
- - how do the sprites / bg's work .. these big black unknown things on the pcb
- also sound a bit disturbing, what are they?
- - i can't decode the other gfx? rom
- - there don't seem to be any sprites / bg's in ram, interrupts?
- - palette? format isn't understood
- - the other sets ('cshootere' and 'airraid') need decrypting ..
- is the main one protected ? theres a 68705 on it
+Haze's notes
+ - video system is very similar to darkmist.cpp
Stephh's notes (based on the game Z80 code and some tests) :
@@ -85,6 +76,55 @@ Stephh's notes (based on the game Z80 code and some tests) :
*/
+
+
+/*
+
+ Custom SIMM module placement
+
+ The Air Raid PCB has 3 custom modules shown
+ in the rough diagram of the PCB below.
+
+ The modules do not appear to be 100%
+ identical based on external shapes visible.
+
+ The data they contain is as follows
+ MODULE1
+ Background tilemap graphic data
+ Background tilemap layout data
+
+ MODULE2
+ Foreground tilemap graphic data
+ Foreground tilemap layout data
+
+ MODULE3
+ Sprite graphic data
+
+ it's also possible each module contains a
+ 0x100 colour look up table for that layer.
+
+
+ |-------------------------------------------------|
+ | A B C D E F G H I J K |
+ 20| ##MOD1####### |
+ | # Z80 |
+ | M -|
+ | O |
+ | D |=J
+ | 2 |=A
+ | # |=M
+ 11| |=M
+ | |=A
+ | |
+ | -|
+ | Z80 |
+ | |
+ | ##MOD3####### |
+ |-------------------------------------------------|
+
+*/
+
+
#include "emu.h"
#include "cpu/z80/z80.h"
#include "audio/seibu.h"
@@ -98,6 +138,7 @@ public:
m_maincpu(*this, "maincpu"),
m_seibu_sound(*this, "seibu_sound"),
m_txram(*this, "txram"),
+ m_vregs(*this, "vregs"),
m_mainram(*this, "mainram"),
m_spriteram(*this, "spriteram"),
m_gfxdecode(*this, "gfxdecode"),
@@ -109,28 +150,36 @@ public:
required_device<cpu_device> m_maincpu;
optional_device<seibu_sound_device> m_seibu_sound;
required_shared_ptr<UINT8> m_txram;
+ required_shared_ptr<UINT8> m_vregs;
optional_shared_ptr<UINT8> m_mainram;
optional_shared_ptr<UINT8> m_spriteram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_shared_ptr<UINT8> m_generic_paletteram_8;
required_shared_ptr<UINT8> m_generic_paletteram2_8;
- required_shared_ptr<UINT8> m_decrypted_opcodes;
+ optional_shared_ptr<UINT8> m_decrypted_opcodes;
+
+ TILEMAP_MAPPER_MEMBER(bg_scan);
+ TILEMAP_MAPPER_MEMBER(fg_scan);
+ TILE_GET_INFO_MEMBER(get_bg_tile_info);
+ tilemap_t *m_bg_tilemap;
+ TILE_GET_INFO_MEMBER(get_fg_tile_info);
+ tilemap_t *m_fg_tilemap;
+ TILE_GET_INFO_MEMBER(get_cstx_tile_info);
tilemap_t *m_txtilemap;
- int m_coin_stat;
- int m_counter;
+ UINT16 m_hw;
DECLARE_WRITE8_MEMBER(cshooter_txram_w);
DECLARE_READ8_MEMBER(cshooter_coin_r);
DECLARE_WRITE8_MEMBER(cshooter_c500_w);
DECLARE_WRITE8_MEMBER(cshooter_c700_w);
DECLARE_WRITE8_MEMBER(bank_w);
+ DECLARE_WRITE8_MEMBER(vregs_w);
DECLARE_READ8_MEMBER(seibu_sound_comms_r);
DECLARE_WRITE8_MEMBER(seibu_sound_comms_w);
DECLARE_DRIVER_INIT(cshootere);
DECLARE_DRIVER_INIT(cshooter);
- TILE_GET_INFO_MEMBER(get_cstx_tile_info);
virtual void video_start() override;
DECLARE_PALETTE_INIT(cshooter);
DECLARE_MACHINE_RESET(cshooter);
@@ -142,7 +191,7 @@ public:
PALETTE_INIT_MEMBER(cshooter_state, cshooter)
{
- const UINT8 *color_prom = memregion("proms")->base();
+ const UINT8 *color_prom = memregion("tx_clut")->base();
int i;
// text uses colors 0xc0-0xdf
@@ -152,8 +201,55 @@ PALETTE_INIT_MEMBER(cshooter_state, cshooter)
// rest is still unknown..
for (i = 0x40; i < 0x100; i++)
palette.set_pen_indirect(i, color_prom[i]);
+
+ // just make a direct copy of palette at the end for debug
+ for (i = 0x100; i < 0x200; i++)
+ palette.set_pen_indirect(i, i-0x100);
+
+}
+
+
+TILEMAP_MAPPER_MEMBER(cshooter_state::bg_scan)
+{
+ return ((row&0xf) * 0x10) + (col&0xf) + (((col&0x7f0) >> 4)*0x100) + ((row & 0x30)>>4) * 0x8000;
+}
+
+TILEMAP_MAPPER_MEMBER(cshooter_state::fg_scan)
+{
+ return ((row&0xf) * 0x10) + (col&0xf) + (((col&0x0f0) >> 4)*0x100) + ((row & 0x1f0)>>4) * 0x1000;
+}
+
+
+TILE_GET_INFO_MEMBER(cshooter_state::get_bg_tile_info)
+{
+ UINT8 *bgMap = memregion("bg_map")->base();
+ int tile = bgMap[(tile_index*2)+1] & 0xff;
+ int attr = bgMap[(tile_index*2)+0] & 0xff;
+
+ tile |= (attr & 0x70) << 4;
+
+ SET_TILE_INFO_MEMBER(2,
+ tile,
+ 0,
+ 0);
+}
+
+TILE_GET_INFO_MEMBER(cshooter_state::get_fg_tile_info)
+{
+ UINT8 *bgMap = memregion("fg_map")->base();
+ int tile = bgMap[(tile_index*2)+1] & 0xff;
+ int attr = bgMap[(tile_index*2)+0] & 0xff;
+
+ tile |= (attr & 0x70) << 4;
+
+ SET_TILE_INFO_MEMBER(3,
+ tile,
+ 0,
+ 0);
}
+
+
TILE_GET_INFO_MEMBER(cshooter_state::get_cstx_tile_info)
{
int code = (m_txram[tile_index*2]);
@@ -171,6 +267,16 @@ WRITE8_MEMBER(cshooter_state::cshooter_txram_w)
void cshooter_state::video_start()
{
+
+ // there might actually be 4 banks of 2048 x 16 tilemaps in here as the upper scroll bits are with the rom banking.
+ m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_bg_tile_info),this),tilemap_mapper_delegate(FUNC(cshooter_state::bg_scan),this),16,16,2048, 64);
+
+ // which could in turn mean this is actually 256 x 128, not 256 x 512
+// m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(cshooter_state::fg_scan),this),16,16,256, 512);
+ m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(cshooter_state::fg_scan),this),16,16,256, 128);
+
+ m_fg_tilemap->set_transparent_pen(0);
+
m_txtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_cstx_tile_info),this),TILEMAP_SCAN_ROWS, 8,8,32,32);
m_txtilemap->set_transparent_pen(0);
}
@@ -182,22 +288,32 @@ void cshooter_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
if (m_spriteram[i+1]&0x80)
continue;
- /* BCD debug code, to be removed in the end */
- UINT8 tile_low = (m_spriteram[i]&0x0f);
- UINT8 tile_high = ((m_spriteram[i]&0xf0)>>4);
-
- tile_low += (tile_low > 0x9) ? 0x37 : 0x30;
- tile_high += (tile_high > 0x9) ? 0x37 : 0x30;
+ UINT16 tile = (m_spriteram[i]);
+ tile |= (m_spriteram[i + 1] & 0x70) << 4;
- m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, tile_high << 1, m_spriteram[i+1], 0, 0, m_spriteram[i+3],m_spriteram[i+2],0);
- m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, tile_high << 1, m_spriteram[i+1], 0, 0, m_spriteram[i+3]+8,m_spriteram[i+2],0);
- m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, tile_low << 1, m_spriteram[i+1], 0, 0, m_spriteram[i+3]+8,m_spriteram[i+2]+8,0);
- m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, tile_low << 1, m_spriteram[i+1], 0, 0, m_spriteram[i+3],m_spriteram[i+2]+8,0);
+ m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, tile, 0, 0, 0, m_spriteram[i+3],m_spriteram[i+2],0);
}
}
+
+#define DISPLAY_SPR 1
+#define DISPLAY_FG 2
+#define DISPLAY_BG 4
+#define DISPLAY_TXT 8
+#define DM_GETSCROLL(n) (((m_vregs[(n)]<<1)&0xff) + ((m_vregs[(n)]&0x80)?1:0) +( ((m_vregs[(n)-1]<<4) | (m_vregs[(n)-1]<<12) )&0xff00))
+
UINT32 cshooter_state::screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
+
+ UINT16 bgscrolly = DM_GETSCROLL(0x6);
+ // this is more likely to be 'bank' than scroll, like NMK16
+ bgscrolly += ((m_hw & 0xc0) >> 6) * 256;
+
+ m_bg_tilemap->set_scrollx(0, DM_GETSCROLL(0x2));
+ m_bg_tilemap->set_scrolly(0, bgscrolly);
+ m_fg_tilemap->set_scrollx(0, DM_GETSCROLL(0xa));
+ m_fg_tilemap->set_scrolly(0, DM_GETSCROLL(0xe));
+
// set palette (compared to cshooter, r and g are swapped)
for (int i = 0; i < 0x100; i++)
{
@@ -209,23 +325,34 @@ UINT32 cshooter_state::screen_update_airraid(screen_device &screen, bitmap_ind16
m_palette->set_indirect_color(i, color);
}
+ // draw screen
bitmap.fill(0x80, cliprect); // temp
- draw_sprites(bitmap, cliprect);
+ if ((m_hw & DISPLAY_BG) == 0x00)
+ m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
+
+ if ((m_hw & DISPLAY_FG) == 0x00)
+ m_fg_tilemap->draw(screen, bitmap, cliprect, 0,0);
+
+ if(m_hw & DISPLAY_SPR)
+ draw_sprites(bitmap, cliprect);
+
+ if(m_hw & DISPLAY_TXT)
+ m_txtilemap->draw(screen, bitmap, cliprect, 0,0);
- m_txtilemap->draw(screen, bitmap, cliprect, 0,0);
return 0;
}
+
/* main cpu */
TIMER_DEVICE_CALLBACK_MEMBER(cshooter_state::cshooter_scanline)
{
int scanline = param;
-// if(scanline == 240) // presumably a SW trap, not an irq
-// m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
+ if(scanline == 120) // updates scroll resgiters
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
if(scanline == 240) // vblank-out irq
m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
@@ -234,15 +361,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(cshooter_state::cshooter_scanline)
MACHINE_RESET_MEMBER(cshooter_state,cshooter)
{
- m_counter = 0;
-}
-
-READ8_MEMBER(cshooter_state::cshooter_coin_r)
-{
- /* Even reads must return 0xff - Odd reads must return the contents of input port 5.
- Code at 0x5061 is executed once during P.O.S.T. where there is one read.
- Code at 0x50b4 is then executed each frame (not sure) where there are 2 reads. */
- return ( (m_counter++ & 1) ? 0xff : ioport("COIN")->read() );
}
WRITE8_MEMBER(cshooter_state::cshooter_c500_w)
@@ -255,6 +373,19 @@ WRITE8_MEMBER(cshooter_state::cshooter_c700_w)
WRITE8_MEMBER(cshooter_state::bank_w)
{
+ // format of this address is TTBB tbfs
+
+ // TT = bg tilemap upper scroll bits (probably bg tilemap bank select?)
+ // BB = prg ROM bank select
+ // t = text layer enable
+ // b = bg layer disable
+ // f = fg layer disable
+ // s = sprite layer enable
+
+// printf("bankw %02x\n", data & 0xc0);
+
+ m_hw = data;
+
membank("bank1")->set_entry((data>>4)&3);
}
@@ -269,29 +400,15 @@ WRITE8_MEMBER(cshooter_state::seibu_sound_comms_w)
m_seibu_sound->main_word_w(space,offset,data,0x00ff);
}
-#if 0
-static ADDRESS_MAP_START( cshooter_map, AS_PROGRAM, 8, cshooter_state )
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0xafff) AM_READ_BANK("bank1") AM_WRITEONLY
- AM_RANGE(0xb000, 0xb0ff) AM_READONLY // sound related ?
- AM_RANGE(0xc000, 0xc0ff) AM_RAM AM_SHARE("paletteram")
- AM_RANGE(0xc100, 0xc1ff) AM_RAM AM_SHARE("paletteram2")
- AM_RANGE(0xc200, 0xc200) AM_READ_PORT("IN0")
- AM_RANGE(0xc201, 0xc201) AM_READ_PORT("IN1")
- AM_RANGE(0xc202, 0xc202) AM_READ_PORT("IN2")
- AM_RANGE(0xc203, 0xc203) AM_READ_PORT("DSW2")
- AM_RANGE(0xc204, 0xc204) AM_READ_PORT("DSW1")
- AM_RANGE(0xc205, 0xc205) AM_READ(cshooter_coin_r) // hack until I understand
- AM_RANGE(0xc500, 0xc500) AM_WRITE(cshooter_c500_w)
- AM_RANGE(0xc600, 0xc600) AM_WRITENOP // see notes
- AM_RANGE(0xc700, 0xc700) AM_WRITE(cshooter_c700_w)
- AM_RANGE(0xc801, 0xc801) AM_WRITENOP // see notes
- AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(cshooter_txram_w) AM_SHARE("txram")
- AM_RANGE(0xd800, 0xdfff) AM_RAM
- AM_RANGE(0xe000, 0xffff) AM_RAM
-ADDRESS_MAP_END
-#endif
+WRITE8_MEMBER(cshooter_state::vregs_w)
+{
+ m_vregs[offset] = data;
+
+ if ((offset != 0x2) && (offset != 0x01) && (offset != 0xa) && (offset != 0x09) && (offset != 0xe) && (offset != 0x0d) )
+ printf("vregs_w %02x: %02x\n", offset, data);
+}
+
static ADDRESS_MAP_START( airraid_map, AS_PROGRAM, 8, cshooter_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
@@ -302,14 +419,19 @@ static ADDRESS_MAP_START( airraid_map, AS_PROGRAM, 8, cshooter_state )
AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW2")
AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW1")
AM_RANGE(0xc500, 0xc500) AM_WRITE(cshooter_c500_w)
- AM_RANGE(0xc600, 0xc600) AM_WRITENOP // see notes
+// AM_RANGE(0xc600, 0xc600) AM_WRITE(cshooter_c600_w) // see notes
AM_RANGE(0xc700, 0xc700) AM_WRITE(cshooter_c700_w)
- AM_RANGE(0xc801, 0xc801) AM_WRITENOP // see notes
+// AM_RANGE(0xc801, 0xc801) AM_WRITE(cshooter_c801_w) // see notes
AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(cshooter_txram_w) AM_SHARE("txram")
AM_RANGE(0xd800, 0xd8ff) AM_RAM AM_SHARE("paletteram")
AM_RANGE(0xda00, 0xdaff) AM_RAM AM_SHARE("paletteram2")
AM_RANGE(0xdc11, 0xdc11) AM_WRITE(bank_w)
- AM_RANGE(0xdc00, 0xdc1f) AM_RAM //video registers
+ AM_RANGE(0xdc00, 0xdc0f) AM_RAM_WRITE(vregs_w) AM_SHARE("vregs")
+// AM_RANGE(0xdc10, 0xdc10) AM_RAM
+// AM_RANGE(0xdc19, 0xdc19) AM_RAM
+// AM_RANGE(0xdc1e, 0xdc1e) AM_RAM
+// AM_RANGE(0xdc1f, 0xdc1f) AM_RAM
+
AM_RANGE(0xde00, 0xde0f) AM_READWRITE(seibu_sound_comms_r,seibu_sound_comms_w)
AM_RANGE(0xe000, 0xfdff) AM_RAM AM_SHARE("mainram")
AM_RANGE(0xfe00, 0xffff) AM_RAM AM_SHARE("spriteram")
@@ -319,16 +441,6 @@ static ADDRESS_MAP_START( decrypted_opcodes_map, AS_DECRYPTED_OPCODES, 8, cshoot
AM_RANGE(0x0000, 0x7fff) AM_ROM AM_SHARE("decrypted_opcodes")
ADDRESS_MAP_END
-#if 0
-/* Sound CPU */
-
-static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cshooter_state )
- AM_RANGE(0x0000, 0x1fff) AM_ROM
- AM_RANGE(0xc000, 0xc001) AM_WRITENOP // AM_DEVWRITE("ym1", ym2203_device, write) ?
- AM_RANGE(0xc800, 0xc801) AM_WRITENOP // AM_DEVWRITE("ym2", ym2203_device, write) ?
- AM_RANGE(0xf800, 0xffff) AM_RAM
-ADDRESS_MAP_END
-#endif
static INPUT_PORTS_START( cshooter )
PORT_START("IN0") /* IN0 (0xc200) */
@@ -425,6 +537,7 @@ static INPUT_PORTS_START( airraid )
PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
+
static const gfx_layout cshooter_charlayout =
{
8,8, /* 8*8 characters */
@@ -436,23 +549,39 @@ static const gfx_layout cshooter_charlayout =
128*1
};
+static const gfx_layout cshooter_char16layout =
+{
+ 16,16, /* 8*8 characters */
+ RGN_FRAC(1,1), /* 512 characters */
+ 4, /* 4 bits per pixel */
+ { 0,8,4,12 },
+ { 0,1,2,3, 16,17,18,19, 512+0,512+1,512+2,512+3, 512+16,512+17,512+18,512+19},
+ { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
+ 32*32
+};
+
+
static GFXDECODE_START( cshooter )
- GFXDECODE_ENTRY( "gfx1", 0, cshooter_charlayout, 0, 16 )
+ GFXDECODE_ENTRY( "tx_gfx", 0, cshooter_charlayout, 0, 16 )
+ GFXDECODE_ENTRY( "spr_gfx", 0, cshooter_char16layout, 0x100, 16 )
+ GFXDECODE_ENTRY( "bg_gfx", 0, cshooter_char16layout, 0x100, 16 )
+ GFXDECODE_ENTRY( "fg_gfx", 0, cshooter_char16layout, 0x100, 16 )
GFXDECODE_END
+
+
static MACHINE_CONFIG_START( airraid, cshooter_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80,XTAL_12MHz/2) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(airraid_map)
- MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cshooter_state, cshooter_scanline, "screen", 0, 1)
SEIBU2_AIRRAID_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) /* verified on pcb */
SEIBU_SOUND_SYSTEM_ENCRYPTED_LOW()
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+ MCFG_QUANTUM_PERFECT_CPU("maincpu")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -464,8 +593,8 @@ static MACHINE_CONFIG_START( airraid, cshooter_state )
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", cshooter)
- MCFG_PALETTE_ADD("palette", 0x100)
- MCFG_PALETTE_INDIRECT_ENTRIES(0x100)
+ MCFG_PALETTE_ADD("palette", 0x200)
+ MCFG_PALETTE_INDIRECT_ENTRIES(0x200)
MCFG_PALETTE_INIT_OWNER(cshooter_state, cshooter)
/* sound hardware */
@@ -473,6 +602,12 @@ static MACHINE_CONFIG_START( airraid, cshooter_state )
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( airraid_crypt, airraid )
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+MACHINE_CONFIG_END
+
+
@@ -513,28 +648,51 @@ ROM_START( cshootere )
ROM_REGION( 0x10000, "maincpu", 0 ) // Main CPU
ROM_LOAD( "1.k19", 0x00000, 0x08000, CRC(71418952) SHA1(9745ca006576381c9e9595d8e42ab276bab80a41) )
- ROM_REGION( 0x10000, "audiocpu", 0 ) // Sub/Sound CPU
+ ROM_REGION( 0x10000, "user1", 0 ) // cpu data
+ ROM_LOAD( "2.k20", 0x00000, 0x10000, CRC(5812fe72) SHA1(3b28bff6b62a411d2195bb228952db62ad32ef3d) )
+
+ ROM_REGION( 0x18000, "audiocpu", 0 ) // Sub/Sound CPU
ROM_LOAD( "5.6f", 0x00000, 0x02000, CRC(30be398c) SHA1(6c61200ee8888d6270c8cec50423b3b5602c2027) ) // 5.g6
- ROM_LOAD( "4.7f", 0x08000, 0x08000, CRC(3cd715b4) SHA1(da735fb5d262908ddf7ed7dacdea68899f1723ff) ) // 4.g8
+ ROM_LOAD( "4.7f", 0x10000, 0x08000, CRC(3cd715b4) SHA1(da735fb5d262908ddf7ed7dacdea68899f1723ff) ) // 4.g8
- ROM_REGION( 0x02000, "gfx1", 0 ) // TX Layer
+ ROM_REGION( 0x02000, "tx_gfx", 0 ) // TX Layer
ROM_LOAD( "3.f11", 0x00000, 0x02000, CRC(67b50a47) SHA1(b1f4aefc9437edbeefba5371149cc08c0b55c741) )
- ROM_REGION( 0x20000, "gfx2", 0 ) // tiles
- ROM_LOAD( "graphics1.bin", 0x00000, 0x10000, NO_DUMP )
- ROM_LOAD( "graphics2.bin", 0x10000, 0x10000, NO_DUMP )
-
- ROM_REGION( 0x10000, "gfx3", 0 ) // sprites
- ROM_LOAD( "graphics3.bin", 0x00000, 0x10000, NO_DUMP )
-
- ROM_REGION( 0x10000, "user1", 0 ) // Tilemaps
- ROM_LOAD( "2.k20", 0x00000, 0x10000, CRC(5812fe72) SHA1(3b28bff6b62a411d2195bb228952db62ad32ef3d) )
- ROM_REGION( 0x320, "proms", 0 ) // taken from parent set
+ ROM_REGION( 0x100, "tx_clut", 0 ) // taken from parent set (need proper IC locations for this PCB type)
ROM_LOAD( "63s281.16a", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut
- ROM_LOAD( "82s123.7a", 0x0100, 0x0020, CRC(93e2d292) SHA1(af8edd0cfe85f28ede9604cfaf4516d54e5277c9) ) // sprite color related? (not used)
- ROM_LOAD( "82s129.9s", 0x0120, 0x0100, CRC(cf14ba30) SHA1(3284b6809075756b3c8e07d9705fc7eacb7556f1) ) // timing? (not used)
- ROM_LOAD( "82s129.4e", 0x0220, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) // timing? (not used)
+
+ ROM_REGION( 0x220, "proms", 0 ) // taken from parent set (need proper IC locations for this PCB type)
+ ROM_LOAD( "82s123.7a", 0x0000, 0x0020, CRC(93e2d292) SHA1(af8edd0cfe85f28ede9604cfaf4516d54e5277c9) ) // sprite color related? (not used)
+ ROM_LOAD( "82s129.9s", 0x0020, 0x0100, CRC(cf14ba30) SHA1(3284b6809075756b3c8e07d9705fc7eacb7556f1) ) // timing? (not used)
+ ROM_LOAD( "82s129.4e", 0x0120, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) // timing? (not used)
+
+ /* ### MODULE 1 ### Background generation / graphics */
+ ROM_REGION( 0x40000, "bg_map", 0 )
+ ROM_LOAD16_BYTE( "bg_layouts_even", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "bg_layouts_odd", 0x00001, 0x20000, NO_DUMP )
+ ROM_REGION( 0x40000, "bg_gfx", 0 )
+ ROM_LOAD16_BYTE( "bg_tiles_even", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "bg_tiles_odd", 0x00001, 0x20000, NO_DUMP )
+ ROM_REGION( 0x100, "bg_clut", 0 )
+ ROM_LOAD( "bg_clut", 0x000, 0x100, NO_DUMP )
+
+ /* ### MODULE 2 ### Foreground generation / graphics */
+ ROM_REGION( 0x40000, "fg_map", 0 )
+ ROM_LOAD16_BYTE( "fg_layouts_even", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "fg_layouts_odd", 0x00001, 0x20000, NO_DUMP )
+ ROM_REGION( 0x40000, "fg_gfx", 0 )
+ ROM_LOAD16_BYTE( "fg_tiles_even", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "fg_tiles_odd", 0x00001, 0x20000, NO_DUMP )
+ ROM_REGION( 0x100, "fg_clut", 0 )
+ ROM_LOAD( "fg_clut", 0x000, 0x100, NO_DUMP )
+
+ /* ### MODULE 3 ### Sprite graphics */
+ ROM_REGION( 0x40000, "spr_gfx", 0 )
+ ROM_LOAD16_BYTE( "sprite_tiles_even", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "sprite_tiles_odd", 0x00001, 0x20000, NO_DUMP )
+ ROM_REGION( 0x100, "spr_clut", 0 )
+ ROM_LOAD( "spr_clut", 0x000, 0x100, NO_DUMP )
ROM_END
/*
@@ -563,43 +721,59 @@ ROM_START( airraid )
ROM_REGION( 0x10000, "maincpu", 0 ) // Main CPU
ROM_LOAD( "1.16j", 0x00000, 0x08000, CRC(7ac2cedf) SHA1(272831f51a2731e067b5aec6dba6bddd3c5350c9) )
- ROM_REGION( 0x10000, "audiocpu", 0 ) // Sub/Sound CPU
+ ROM_REGION( 0x10000, "user1", 0 ) // cpu data
+ ROM_LOAD( "2.19j", 0x00000, 0x10000, CRC(842ae6c2) SHA1(0468445e4ab6f42bac786f9a258df3972fd1fde9) )
+
+ ROM_REGION( 0x18000, "audiocpu", 0 ) // Sub/Sound CPU
ROM_LOAD( "5.6f", 0x00000, 0x02000, CRC(30be398c) SHA1(6c61200ee8888d6270c8cec50423b3b5602c2027) )
- ROM_LOAD( "4.7f", 0x08000, 0x08000, CRC(3cd715b4) SHA1(da735fb5d262908ddf7ed7dacdea68899f1723ff) )
+ ROM_LOAD( "4.7f", 0x10000, 0x08000, CRC(3cd715b4) SHA1(da735fb5d262908ddf7ed7dacdea68899f1723ff) )
- ROM_REGION( 0x02000, "gfx1", 0 ) // TX Layer
+ ROM_REGION( 0x02000, "tx_gfx", 0 ) // TX Layer
ROM_LOAD( "3.13e", 0x00000, 0x02000, CRC(672ec0e8) SHA1(a11cd90d6494251ceee3bc7c72f4e7b1580b77e2) )
- ROM_REGION( 0x20000, "gfx2", 0 ) // tiles
- ROM_LOAD( "graphics1.bin", 0x00000, 0x10000, NO_DUMP )
- ROM_LOAD( "graphics2.bin", 0x10000, 0x10000, NO_DUMP )
+ ROM_REGION( 0x100, "tx_clut", 0 ) // taken from parent set (need proper IC locations for this PCB type)
+ ROM_LOAD( "63s281.16a", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut
- ROM_REGION( 0x10000, "gfx3", 0 ) // sprites
- ROM_LOAD( "graphics3.bin", 0x00000, 0x10000, NO_DUMP )
+ ROM_REGION( 0x220, "proms", 0 ) // taken from parent set (need proper IC locations for this PCB type)
+ ROM_LOAD( "82s123.7a", 0x0000, 0x0020, CRC(93e2d292) SHA1(af8edd0cfe85f28ede9604cfaf4516d54e5277c9) ) // sprite color related? (not used)
+ ROM_LOAD( "82s129.9s", 0x0020, 0x0100, CRC(cf14ba30) SHA1(3284b6809075756b3c8e07d9705fc7eacb7556f1) ) // timing? (not used)
+ ROM_LOAD( "82s129.4e", 0x0120, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) // timing? (not used)
+
+ /* ### MODULE 1 ### Background generation / graphics */
+ ROM_REGION( 0x40000, "bg_map", 0 )
+ ROM_LOAD16_BYTE( "bg_layouts_even", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "bg_layouts_odd", 0x00001, 0x20000, NO_DUMP )
+ ROM_REGION( 0x40000, "bg_gfx", 0 )
+ ROM_LOAD16_BYTE( "bg_tiles_even", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "bg_tiles_odd", 0x00001, 0x20000, NO_DUMP )
+ ROM_REGION( 0x100, "bg_clut", 0 )
+ ROM_LOAD( "bg_clut", 0x000, 0x100, NO_DUMP )
+
+ /* ### MODULE 2 ### Foreground generation / graphics */
+ ROM_REGION( 0x40000, "fg_map", 0 )
+ ROM_LOAD16_BYTE( "fg_layouts_even", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "fg_layouts_odd", 0x00001, 0x20000, NO_DUMP )
+ ROM_REGION( 0x40000, "fg_gfx", 0 )
+ ROM_LOAD16_BYTE( "fg_tiles_even", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "fg_tiles_odd", 0x00001, 0x20000, NO_DUMP )
+ ROM_REGION( 0x100, "fg_clut", 0 )
+ ROM_LOAD( "fg_clut", 0x000, 0x100, NO_DUMP )
+
+ /* ### MODULE 3 ### Sprite graphics */
+ ROM_REGION( 0x40000, "spr_gfx", 0 )
+ ROM_LOAD16_BYTE( "sprite_tiles_even", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "sprite_tiles_odd", 0x00001, 0x20000, NO_DUMP )
+ ROM_REGION( 0x100, "spr_clut", 0 )
+ ROM_LOAD( "spr_clut", 0x000, 0x100, NO_DUMP )
+ROM_END
- ROM_REGION( 0x10000, "user1", 0 ) // bg maps
- ROM_LOAD( "2.19j", 0x00000, 0x10000, CRC(842ae6c2) SHA1(0468445e4ab6f42bac786f9a258df3972fd1fde9) )
- ROM_REGION( 0x320, "proms", 0 ) // taken from parent set
- ROM_LOAD( "63s281.16a", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut
- ROM_LOAD( "82s123.7a", 0x0100, 0x0020, CRC(93e2d292) SHA1(af8edd0cfe85f28ede9604cfaf4516d54e5277c9) ) // sprite color related? (not used)
- ROM_LOAD( "82s129.9s", 0x0120, 0x0100, CRC(cf14ba30) SHA1(3284b6809075756b3c8e07d9705fc7eacb7556f1) ) // timing? (not used)
- ROM_LOAD( "82s129.4e", 0x0220, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) // timing? (not used)
-ROM_END
-#if 0
-DRIVER_INIT_MEMBER(cshooter_state,cshooter)
+DRIVER_INIT_MEMBER(cshooter_state, cshooter)
{
- /* temp so it boots */
- UINT8 *rom = memregion("maincpu")->base();
-
- rom[0xa2] = 0x00;
- rom[0xa3] = 0x00;
- rom[0xa4] = 0x00;
- membank("bank1")->set_base(&memregion("user1")->base()[0]);
+ membank("bank1")->configure_entries(0, 4, memregion("user1")->base(), 0x4000);
}
-#endif
DRIVER_INIT_MEMBER(cshooter_state,cshootere)
{
@@ -630,11 +804,12 @@ DRIVER_INIT_MEMBER(cshooter_state,cshootere)
rom[A] = BITSWAP8(rom[A],7,6,1,4,3,2,5,0);
}
- membank("bank1")->configure_entries(0, 4, memregion("user1")->base(), 0x4000);
+ DRIVER_INIT_CALL(cshooter);
+
}
-GAME( 1987, cshootere, cshooter, airraid, airraid, cshooter_state, cshootere, ROT270, "Seibu Kaihatsu (J.K.H. license)", "Cross Shooter (encrypted)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
-GAME( 1987, airraid, cshooter, airraid, airraid, cshooter_state, cshootere, ROT270, "Seibu Kaihatsu", "Air Raid (encrypted)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
+GAME( 1987, cshootere, cshooter, airraid_crypt, airraid, cshooter_state, cshootere, ROT270, "Seibu Kaihatsu (J.K.H. license)", "Cross Shooter (Single PCB)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
+GAME( 1987, airraid, cshooter, airraid_crypt, airraid, cshooter_state, cshootere, ROT270, "Seibu Kaihatsu", "Air Raid (Single PCB)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
// There's also an undumped International Games version
diff --git a/src/mame/drivers/cv1k.cpp b/src/mame/drivers/cv1k.cpp
index 02f4cfae416..45c751c4725 100644
--- a/src/mame/drivers/cv1k.cpp
+++ b/src/mame/drivers/cv1k.cpp
@@ -207,18 +207,18 @@ public:
required_shared_ptr<UINT64> m_ram;
required_shared_ptr<UINT64> m_rombase;
- DECLARE_READ8_MEMBER(cv1k_flash_io_r);
- DECLARE_WRITE8_MEMBER(cv1k_flash_io_w);
+ DECLARE_READ8_MEMBER(flash_io_r);
+ DECLARE_WRITE8_MEMBER(flash_io_w);
DECLARE_READ8_MEMBER(serial_rtc_eeprom_r);
DECLARE_WRITE8_MEMBER(serial_rtc_eeprom_w);
- DECLARE_READ64_MEMBER(cv1k_flash_port_e_r);
+ DECLARE_READ64_MEMBER(flash_port_e_r);
- UINT32 screen_update_cv1k(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
virtual void machine_reset() override;
/* game specific */
- DECLARE_READ64_MEMBER(cv1k_speedup_r);
+ DECLARE_READ64_MEMBER(speedup_r);
DECLARE_DRIVER_INIT(mushisam);
DECLARE_DRIVER_INIT(ibara);
DECLARE_DRIVER_INIT(espgal2);
@@ -232,13 +232,13 @@ public:
UINT32 m_idleramoffs;
UINT32 m_idlepc;
- void install_cv1k_speedups(UINT32 idleramoff, UINT32 idlepc, bool is_typed);
+ void install_speedups(UINT32 idleramoff, UINT32 idlepc, bool is_typed);
};
/**************************************************************************/
-UINT32 cv1k_state::screen_update_cv1k(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+UINT32 cv1k_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
m_blitter->set_delay_scale(m_blitrate->read());
@@ -249,13 +249,13 @@ UINT32 cv1k_state::screen_update_cv1k(screen_device &screen, bitmap_rgb32 &bitma
// FLASH interface
-READ64_MEMBER( cv1k_state::cv1k_flash_port_e_r )
+READ64_MEMBER( cv1k_state::flash_port_e_r )
{
return ((m_serflash->flash_ready_r(space, offset) ? 0x20 : 0x00)) | 0xdf;
}
-READ8_MEMBER( cv1k_state::cv1k_flash_io_r )
+READ8_MEMBER( cv1k_state::flash_io_r )
{
switch (offset)
{
@@ -268,7 +268,7 @@ READ8_MEMBER( cv1k_state::cv1k_flash_io_r )
case 0x06:
case 0x07:
- // logerror("cv1k_flash_io_r offset %04x\n", offset);
+ // logerror("flash_io_r offset %04x\n", offset);
return 0xff;
case 0x00:
@@ -276,13 +276,13 @@ READ8_MEMBER( cv1k_state::cv1k_flash_io_r )
}
}
-WRITE8_MEMBER( cv1k_state::cv1k_flash_io_w )
+WRITE8_MEMBER( cv1k_state::flash_io_w )
{
switch (offset)
{
default:
case 0x03:
- logerror("unknown cv1k_flash_io_w offset %04x data %02x\n", offset, data); // 03 enable/disable fgpa access?
+ logerror("unknown flash_io_w offset %04x data %02x\n", offset, data); // 03 enable/disable fgpa access?
break;
case 0x00:
@@ -336,7 +336,7 @@ WRITE8_MEMBER( cv1k_state::serial_rtc_eeprom_w )
static ADDRESS_MAP_START( cv1k_map, AS_PROGRAM, 64, cv1k_state )
AM_RANGE(0x00000000, 0x003fffff) AM_ROM AM_REGION("maincpu", 0) AM_WRITENOP AM_SHARE("rombase") // mmmbanc writes here on startup for some reason..
AM_RANGE(0x0c000000, 0x0c7fffff) AM_RAM AM_SHARE("mainram") AM_MIRROR(0x800000) // work RAM
- AM_RANGE(0x10000000, 0x10000007) AM_READWRITE8(cv1k_flash_io_r, cv1k_flash_io_w, U64(0xffffffffffffffff))
+ AM_RANGE(0x10000000, 0x10000007) AM_READWRITE8(flash_io_r, flash_io_w, U64(0xffffffffffffffff))
AM_RANGE(0x10400000, 0x10400007) AM_DEVWRITE8("ymz770", ymz770_device, write, U64(0xffffffffffffffff))
AM_RANGE(0x10C00000, 0x10C00007) AM_READWRITE8(serial_rtc_eeprom_r, serial_rtc_eeprom_w, U64(0xffffffffffffffff))
// AM_RANGE(0x18000000, 0x18000057) // blitter, installed on reset
@@ -346,7 +346,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( cv1k_d_map, AS_PROGRAM, 64, cv1k_state )
AM_RANGE(0x00000000, 0x003fffff) AM_ROM AM_REGION("maincpu", 0) AM_WRITENOP AM_SHARE("rombase") // mmmbanc writes here on startup for some reason..
AM_RANGE(0x0c000000, 0x0cffffff) AM_RAM AM_SHARE("mainram") // work RAM
- AM_RANGE(0x10000000, 0x10000007) AM_READWRITE8(cv1k_flash_io_r, cv1k_flash_io_w, U64(0xffffffffffffffff))
+ AM_RANGE(0x10000000, 0x10000007) AM_READWRITE8(flash_io_r, flash_io_w, U64(0xffffffffffffffff))
AM_RANGE(0x10400000, 0x10400007) AM_DEVWRITE8("ymz770", ymz770_device, write, U64(0xffffffffffffffff))
AM_RANGE(0x10C00000, 0x10C00007) AM_READWRITE8(serial_rtc_eeprom_r, serial_rtc_eeprom_w, U64(0xffffffffffffffff))
// AM_RANGE(0x18000000, 0x18000057) // blitter, installed on reset
@@ -356,7 +356,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( cv1k_port, AS_IO, 64, cv1k_state )
AM_RANGE(SH3_PORT_C, SH3_PORT_C+7) AM_READ_PORT("PORT_C")
AM_RANGE(SH3_PORT_D, SH3_PORT_D+7) AM_READ_PORT("PORT_D")
- AM_RANGE(SH3_PORT_E, SH3_PORT_E+7) AM_READ( cv1k_flash_port_e_r )
+ AM_RANGE(SH3_PORT_E, SH3_PORT_E+7) AM_READ( flash_port_e_r )
AM_RANGE(SH3_PORT_F, SH3_PORT_F+7) AM_READ_PORT("PORT_F")
AM_RANGE(SH3_PORT_L, SH3_PORT_L+7) AM_READ_PORT("PORT_L")
AM_RANGE(SH3_PORT_J, SH3_PORT_J+7) AM_DEVREADWRITE( "blitter", epic12_device, fpga_r, fpga_w )
@@ -455,7 +455,7 @@ static MACHINE_CONFIG_START( cv1k, cv1k_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(0x200, 0x200)
MCFG_SCREEN_VISIBLE_AREA(0, 0x140-1, 0, 0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(cv1k_state, screen_update_cv1k)
+ MCFG_SCREEN_UPDATE_DRIVER(cv1k_state, screen_update)
MCFG_PALETTE_ADD("palette", 0x10000)
@@ -828,18 +828,18 @@ ROM_START( dfkbl )
ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(31f9eb0a) SHA1(322158779e969bb321241065dd49c1167b91ff6c) )
ROM_END
-READ64_MEMBER( cv1k_state::cv1k_speedup_r )
+READ64_MEMBER( cv1k_state::speedup_r )
{
if (m_maincpu->pc()== m_idlepc ) m_maincpu->spin_until_time( attotime::from_usec(10));
return m_ram[m_idleramoffs/8];
}
-void cv1k_state::install_cv1k_speedups(UINT32 idleramoff, UINT32 idlepc, bool is_typed)
+void cv1k_state::install_speedups(UINT32 idleramoff, UINT32 idlepc, bool is_typed)
{
m_idleramoffs = idleramoff;
m_idlepc = idlepc;
- m_maincpu->space(AS_PROGRAM).install_read_handler(0xc000000+m_idleramoffs, 0xc000000+m_idleramoffs+7, read64_delegate(FUNC(cv1k_state::cv1k_speedup_r),this));
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0xc000000+m_idleramoffs, 0xc000000+m_idleramoffs+7, read64_delegate(FUNC(cv1k_state::speedup_r),this));
m_maincpu->add_fastram(0x00000000, 0x003fffff, TRUE, m_rombase);
@@ -850,37 +850,37 @@ void cv1k_state::install_cv1k_speedups(UINT32 idleramoff, UINT32 idlepc, bool is
DRIVER_INIT_MEMBER(cv1k_state,mushisam)
{
- install_cv1k_speedups(0x024d8, 0xc04a2aa, false);
+ install_speedups(0x024d8, 0xc04a2aa, false);
}
DRIVER_INIT_MEMBER(cv1k_state,ibara)
{
- install_cv1k_speedups(0x022f0, 0xc04a0aa, false);
+ install_speedups(0x022f0, 0xc04a0aa, false);
}
DRIVER_INIT_MEMBER(cv1k_state,espgal2)
{
- install_cv1k_speedups(0x02310, 0xc05177a, false);
+ install_speedups(0x02310, 0xc05177a, false);
}
DRIVER_INIT_MEMBER(cv1k_state,mushitam)
{
- install_cv1k_speedups(0x0022f0, 0xc04a0da, false);
+ install_speedups(0x0022f0, 0xc04a0da, false);
}
DRIVER_INIT_MEMBER(cv1k_state,pinkswts)
{
- install_cv1k_speedups(0x02310, 0xc05176a, false);
+ install_speedups(0x02310, 0xc05176a, false);
}
DRIVER_INIT_MEMBER(cv1k_state,deathsml)
{
- install_cv1k_speedups(0x02310, 0xc0519a2, false);
+ install_speedups(0x02310, 0xc0519a2, false);
}
DRIVER_INIT_MEMBER(cv1k_state,dpddfk)
{
- install_cv1k_speedups(0x02310, 0xc1d1346, true);
+ install_speedups(0x02310, 0xc1d1346, true);
}
diff --git a/src/mame/drivers/darius.cpp b/src/mame/drivers/darius.cpp
index aa8734d4c01..4026a85fde3 100644
--- a/src/mame/drivers/darius.cpp
+++ b/src/mame/drivers/darius.cpp
@@ -801,7 +801,6 @@ static MACHINE_CONFIG_START( darius, darius_state )
MCFG_PC080SN_YINVERT(0)
MCFG_PC080SN_DBLWIDTH(1)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/darkseal.cpp b/src/mame/drivers/darkseal.cpp
index c652fee62a2..7c48821b591 100644
--- a/src/mame/drivers/darkseal.cpp
+++ b/src/mame/drivers/darkseal.cpp
@@ -260,7 +260,6 @@ static MACHINE_CONFIG_START( darkseal, darkseal_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -274,12 +273,10 @@ static MACHINE_CONFIG_START( darkseal, darkseal_state )
MCFG_DECO16IC_PF12_8X8_BANK(2)
MCFG_DECO16IC_PF12_16X16_BANK(3)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/dassault.cpp b/src/mame/drivers/dassault.cpp
index 5df8e0e002c..41d26bed464 100644
--- a/src/mame/drivers/dassault.cpp
+++ b/src/mame/drivers/dassault.cpp
@@ -584,7 +584,6 @@ static MACHINE_CONFIG_START( dassault, dassault_state )
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -601,17 +600,14 @@ static MACHINE_CONFIG_START( dassault, dassault_state )
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/dblewing.cpp b/src/mame/drivers/dblewing.cpp
index 9076254e457..161dcd7d4fe 100644
--- a/src/mame/drivers/dblewing.cpp
+++ b/src/mame/drivers/dblewing.cpp
@@ -403,13 +403,11 @@ static MACHINE_CONFIG_START( dblewing, dblewing_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_PRIORITY_CB(dblewing_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
diff --git a/src/mame/drivers/dbz.cpp b/src/mame/drivers/dbz.cpp
index 6372c089fb1..c23e895dc27 100644
--- a/src/mame/drivers/dbz.cpp
+++ b/src/mame/drivers/dbz.cpp
@@ -346,14 +346,12 @@ static MACHINE_CONFIG_START( dbz, dbz_state )
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(dbz_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 2, K056832_BPP_4, 1, 1, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 1, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(dbz_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 3, NORMAL_PLANE_ORDER, -87, 32) // or -52, 16?
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -87, 32) // or -52, 16?
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
diff --git a/src/mame/drivers/deadang.cpp b/src/mame/drivers/deadang.cpp
index b73bc01e7ed..62f785fdf2d 100644
--- a/src/mame/drivers/deadang.cpp
+++ b/src/mame/drivers/deadang.cpp
@@ -463,14 +463,14 @@ ROM_END
DRIVER_INIT_MEMBER(deadang_state,deadang)
{
- m_adpcm1->decrypt("adpcm1");
- m_adpcm2->decrypt("adpcm2");
+ m_adpcm1->decrypt();
+ m_adpcm2->decrypt();
}
DRIVER_INIT_MEMBER(deadang_state,ghunter)
{
- m_adpcm1->decrypt("adpcm1");
- m_adpcm2->decrypt("adpcm2");
+ m_adpcm1->decrypt();
+ m_adpcm2->decrypt();
m_maincpu->space(AS_PROGRAM).install_read_handler(0x80000, 0x80001, read16_delegate(FUNC(deadang_state::ghunter_trackball_low_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0xb0000, 0xb0001, read16_delegate(FUNC(deadang_state::ghunter_trackball_high_r),this));
diff --git a/src/mame/drivers/dec0.cpp b/src/mame/drivers/dec0.cpp
index 0c8bba5ffb1..8f30e7b5b98 100644
--- a/src/mame/drivers/dec0.cpp
+++ b/src/mame/drivers/dec0.cpp
@@ -1291,19 +1291,18 @@ static MACHINE_CONFIG_START( dec0_base, dec0_state )
MCFG_PALETTE_ADD("palette", 1024)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,1,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 1, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen3", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 3);
+ MCFG_DECO_MXC06_GFX_REGION(3)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( dec0, dec0_base )
@@ -1405,19 +1404,18 @@ static MACHINE_CONFIG_START( automat, dec0_automat_state )
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,1,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 1, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen3", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 3);
+ MCFG_DECO_MXC06_GFX_REGION(3)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MCFG_PALETTE_ADD("palette", 1024)
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
@@ -1467,19 +1465,18 @@ static MACHINE_CONFIG_START( secretab, dec0_automat_state )
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,1,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 1, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen3", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 3);
+ MCFG_DECO_MXC06_GFX_REGION(3)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MCFG_PALETTE_ADD("palette", 1024)
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
diff --git a/src/mame/drivers/dec8.cpp b/src/mame/drivers/dec8.cpp
index f9fe92ef5c9..26abe657ca1 100644
--- a/src/mame/drivers/dec8.cpp
+++ b/src/mame/drivers/dec8.cpp
@@ -2002,9 +2002,8 @@ static MACHINE_CONFIG_START( lastmisn, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2055,9 +2054,8 @@ static MACHINE_CONFIG_START( shackled, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2107,9 +2105,8 @@ static MACHINE_CONFIG_START( gondo, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2160,9 +2157,8 @@ static MACHINE_CONFIG_START( garyoret, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2213,13 +2209,12 @@ static MACHINE_CONFIG_START( ghostb, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,2,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(2, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2277,9 +2272,8 @@ static MACHINE_CONFIG_START( csilver, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2335,13 +2329,12 @@ static MACHINE_CONFIG_START( oscar, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,2,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(2, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen_mxc", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 1);
+ MCFG_DECO_MXC06_GFX_REGION(1)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2432,16 +2425,15 @@ static MACHINE_CONFIG_START( cobracom, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,2,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(2, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,3,3,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(3, 3, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen_mxc", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 1);
+ MCFG_DECO_MXC06_GFX_REGION(1)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp
index b8ab102bee1..410f79504ee 100644
--- a/src/mame/drivers/deco156.cpp
+++ b/src/mame/drivers/deco156.cpp
@@ -369,13 +369,11 @@ static MACHINE_CONFIG_START( hvysmsh, deco156_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_PRIORITY_CB(deco156_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -422,13 +420,11 @@ static MACHINE_CONFIG_START( wcvol95, deco156_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_PRIORITY_CB(deco156_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/deco32.cpp b/src/mame/drivers/deco32.cpp
index d8f77543f26..f4788a4b954 100644
--- a/src/mame/drivers/deco32.cpp
+++ b/src/mame/drivers/deco32.cpp
@@ -1840,7 +1840,6 @@ static MACHINE_CONFIG_START( captaven, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0) // pf3 is in 8bpp mode, pf4 is not used
MCFG_DECO16IC_SPLIT(0)
@@ -1856,13 +1855,11 @@ static MACHINE_CONFIG_START( captaven, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_PRIORITY_CB(deco32_state, captaven_pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, deco32_sound_cb)
@@ -1946,7 +1943,6 @@ static MACHINE_CONFIG_START( fghthist, deco32_state ) /* DE-0380-2 PCB */
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1962,12 +1958,10 @@ static MACHINE_CONFIG_START( fghthist, deco32_state ) /* DE-0380-2 PCB */
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_PORTA_CALLBACK( deco32_state, port_a_fghthist )
@@ -2032,7 +2026,6 @@ static MACHINE_CONFIG_START( fghthsta, deco32_state ) /* DE-0395-1 PCB */
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2048,12 +2041,10 @@ static MACHINE_CONFIG_START( fghthsta, deco32_state ) /* DE-0395-1 PCB */
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_PORTA_CALLBACK( deco32_state, port_a_fghthist )
@@ -2160,7 +2151,6 @@ static MACHINE_CONFIG_START( dragngun, dragngun_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2176,11 +2166,9 @@ static MACHINE_CONFIG_START( dragngun, dragngun_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen_zoom", DECO_ZOOMSPR, 0)
MCFG_DECO_ZOOMSPR_GFXDECODE("gfxdecode")
- MCFG_DECO_ZOOMSPR_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", dragngun)
MCFG_PALETTE_ADD("palette", 2048)
@@ -2278,7 +2266,6 @@ static MACHINE_CONFIG_START( lockload, dragngun_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2294,11 +2281,9 @@ static MACHINE_CONFIG_START( lockload, dragngun_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen_zoom", DECO_ZOOMSPR, 0)
MCFG_DECO_ZOOMSPR_GFXDECODE("gfxdecode")
- MCFG_DECO_ZOOMSPR_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, deco32_sound_cb)
@@ -2367,7 +2352,6 @@ static MACHINE_CONFIG_START( tattass, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2383,17 +2367,14 @@ static MACHINE_CONFIG_START( tattass, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tattass)
MCFG_PALETTE_ADD("palette", 2048)
@@ -2444,7 +2425,6 @@ static MACHINE_CONFIG_START( nslasher, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2460,17 +2440,14 @@ static MACHINE_CONFIG_START( nslasher, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", nslasher)
MCFG_PALETTE_ADD("palette", 2048)
diff --git a/src/mame/drivers/dfruit.cpp b/src/mame/drivers/dfruit.cpp
index 20e459a2b3d..c2097280503 100644
--- a/src/mame/drivers/dfruit.cpp
+++ b/src/mame/drivers/dfruit.cpp
@@ -387,7 +387,6 @@ static MACHINE_CONFIG_START( dfruit, dfruit_state )
MCFG_DEVICE_ADD("tc0091lvc", TC0091LVC, 0)
MCFG_TC0091LVC_GFXDECODE("gfxdecode")
- MCFG_TC0091LVC_PALETTE("palette")
MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
diff --git a/src/mame/drivers/dietgo.cpp b/src/mame/drivers/dietgo.cpp
index e2c8df4e31b..5e8954d705b 100644
--- a/src/mame/drivers/dietgo.cpp
+++ b/src/mame/drivers/dietgo.cpp
@@ -245,12 +245,10 @@ static MACHINE_CONFIG_START( dietgo, dietgo_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
diff --git a/src/mame/drivers/djboy.cpp b/src/mame/drivers/djboy.cpp
index ae0efeed0ee..bbd3eb25706 100644
--- a/src/mame/drivers/djboy.cpp
+++ b/src/mame/drivers/djboy.cpp
@@ -581,7 +581,6 @@ static MACHINE_CONFIG_START( djboy, djboy_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/djmain.cpp b/src/mame/drivers/djmain.cpp
index 3037b06723c..efa5c7ed4d8 100644
--- a/src/mame/drivers/djmain.cpp
+++ b/src/mame/drivers/djmain.cpp
@@ -1403,8 +1403,7 @@ static MACHINE_CONFIG_START( djmainj, djmain_state )
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(djmain_state, tile_callback)
- MCFG_K056832_CONFIG("gfx2", 1, K056832_BPP_4dj, 1, 1, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx2", K056832_BPP_4dj, 1, 1, "none")
MCFG_K056832_PALETTE("palette")
MCFG_K055555_ADD("k055555")
diff --git a/src/mame/drivers/dreambal.cpp b/src/mame/drivers/dreambal.cpp
index 19516ea4123..727e82ac03c 100644
--- a/src/mame/drivers/dreambal.cpp
+++ b/src/mame/drivers/dreambal.cpp
@@ -340,7 +340,6 @@ static MACHINE_CONFIG_START( dreambal, dreambal_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/esd16.cpp b/src/mame/drivers/esd16.cpp
index 01f12b0de2b..912e811ac4e 100644
--- a/src/mame/drivers/esd16.cpp
+++ b/src/mame/drivers/esd16.cpp
@@ -632,7 +632,6 @@ static MACHINE_CONFIG_START( esd16, esd16_state )
MCFG_DECO_SPRITE_PRIORITY_CB(esd16_state, hedpanic_pri_callback)
MCFG_DECO_SPRITE_FLIPALLX(1)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", esd16)
MCFG_PALETTE_ADD("palette", 0x1000/2)
diff --git a/src/mame/drivers/f1gp.cpp b/src/mame/drivers/f1gp.cpp
index d6bf1eee619..f60b0ca1633 100644
--- a/src/mame/drivers/f1gp.cpp
+++ b/src/mame/drivers/f1gp.cpp
@@ -432,14 +432,12 @@ static MACHINE_CONFIG_START( f1gp, f1gp_state )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR2_SET_PRITYPE(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( f1gp_state, f1gp_ol2_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_SET_PRITYPE(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(f1gp_state,f1gp)
@@ -516,7 +514,6 @@ static MACHINE_CONFIG_DERIVED( f1gp2, f1gp )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( f1gp_state, f1gp2_tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_DEVICE_MODIFY("k053936")
MCFG_K053936_OFFSETS(-48, -21)
diff --git a/src/mame/drivers/fb01.cpp b/src/mame/drivers/fb01.cpp
index b45fbe6f036..99fc222d7ca 100644
--- a/src/mame/drivers/fb01.cpp
+++ b/src/mame/drivers/fb01.cpp
@@ -219,7 +219,7 @@ MACHINE_CONFIG_END
/* ROM definition */
ROM_START( fb01 )
ROM_REGION( 0x8000, "maincpu", 0 )
- ROM_LOAD("fb01.ic11", 0, 0x8000, CRC(7357e9a4) SHA1(049c482d6c91b7e2846757dd0f5138e0d8b687f0))
+ ROM_LOAD("nec__-011_xb712c0__8709ex700__d27c256c-15.ic11", 0, 0x8000, CRC(7357e9a4) SHA1(049c482d6c91b7e2846757dd0f5138e0d8b687f0)) // OTP 27c256 windowless eprom?
ROM_END
diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp
index 75edef3a3c6..18f152899fd 100644
--- a/src/mame/drivers/fidel6502.cpp
+++ b/src/mame/drivers/fidel6502.cpp
@@ -1,5 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco,hap
+// thanks-to:Berger
/******************************************************************************
Fidelity Electronics 6502 based board driver
@@ -140,7 +141,22 @@ All three of the above are called "segment H".
******************************************************************************
-Sensory Chess Challenger (SC12-B, 6086)
+Sensory Chess Challenger "9" (SC9)
+2 versions were available, the newer version was 2MHz and included the Budapest program.
+---------------------------------
+
+8*(8+1) buttons, 8*8+1 LEDs
+36-pin edge connector, assume same as SC12
+4KB RAM(TMM2016P), 2*8KB ROM(HN48364P)
+R6502-13, 1.4MHz from resonator
+PCB label 510-1045C01 2-1-82
+
+I/O is via TTL, not further documented here
+
+
+******************************************************************************
+
+Sensory 12 Chess Challenger (SC12-B, 6086)
4 versions are known to exist: A,B,C, and X, with increasing CPU speed.
---------------------------------
RE information from netlist by Berger
@@ -156,7 +172,7 @@ NE556 dual-timer IC:
Memory map:
-----------
-6000-0FFF: 4K RAM (2016 * 2)
+0000-0FFF: 4K RAM (2016 * 2)
2000-5FFF: cartridge
6000-7FFF: control(W)
8000-9FFF: 8K ROM SSS SCM23C65E4
@@ -271,6 +287,7 @@ Z80 D6 to W: (model 6092, tied to VCC otherwise)
// internal artwork
#include "fidel_csc.lh" // clickable
#include "fidel_fev.lh" // clickable
+#include "fidel_sc9.lh" // clickable
#include "fidel_sc12.lh" // clickable
@@ -305,6 +322,12 @@ public:
DECLARE_READ_LINE_MEMBER(csc_pia1_ca1_r);
DECLARE_READ_LINE_MEMBER(csc_pia1_cb1_r);
+ // SC9
+ void sc9_prepare_display();
+ DECLARE_WRITE8_MEMBER(sc9_control_w);
+ DECLARE_WRITE8_MEMBER(sc9_led_w);
+ DECLARE_READ8_MEMBER(sc9_input_r);
+
// SC12/6086
DECLARE_WRITE8_MEMBER(sc12_control_w);
DECLARE_READ8_MEMBER(sc12_input_r);
@@ -452,10 +475,50 @@ WRITE_LINE_MEMBER(fidel6502_state::csc_pia1_ca2_w)
/******************************************************************************
- SC12/6086
+ SC9
******************************************************************************/
+// TTL/generic
+
+void fidel6502_state::sc9_prepare_display()
+{
+ // 8*8 chessboard leds + 1 corner led
+ display_matrix(8, 9, m_led_data, m_inp_mux);
+}
+
+WRITE8_MEMBER(fidel6502_state::sc9_control_w)
+{
+ // d0-d3: 74245 P0-P3
+ // 74245 Q0-Q8: input mux, led select
+ UINT16 sel = 1 << (data & 0xf) & 0x3ff;
+ m_inp_mux = sel & 0x1ff;
+ sc9_prepare_display();
+
+ // 74245 Q9: speaker out
+ m_speaker->level_w(sel >> 9 & 1);
+
+ // d4,d5: ?
+ // d6,d7: N/C
+}
+WRITE8_MEMBER(fidel6502_state::sc9_led_w)
+{
+ // a0-a2,d0: led data via NE591N
+ m_led_data = (data & 1) << offset;
+ sc9_prepare_display();
+}
+
+READ8_MEMBER(fidel6502_state::sc9_input_r)
+{
+ // multiplexed inputs (active low)
+ return read_inputs(9) ^ 0xff;
+}
+
+
+
+/******************************************************************************
+ SC12/6086
+******************************************************************************/
// TTL/generic
@@ -590,6 +653,19 @@ static ADDRESS_MAP_START( csc_map, AS_PROGRAM, 8, fidel6502_state )
ADDRESS_MAP_END
+// SC9
+
+static ADDRESS_MAP_START( sc9_map, AS_PROGRAM, 8, fidel6502_state )
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x1800) AM_RAM
+ AM_RANGE(0x2000, 0x5fff) AM_READ(sc12_cart_r)
+ AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_WRITE(sc9_control_w)
+ AM_RANGE(0x8000, 0x8007) AM_MIRROR(0x1ff8) AM_WRITE(sc9_led_w) AM_READNOP
+ AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_READ(sc9_input_r)
+ AM_RANGE(0xc000, 0xffff) AM_ROM
+ADDRESS_MAP_END
+
+
// SC12/6086
static ADDRESS_MAP_START( sc12_map, AS_PROGRAM, 8, fidel6502_state )
@@ -826,6 +902,28 @@ static MACHINE_CONFIG_START( csc, fidel6502_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_START( sc9, fidel6502_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", M6502, 1400000) // from ceramic resonator "681 JSA", measured
+ MCFG_CPU_PROGRAM_MAP(sc9_map)
+ MCFG_CPU_PERIODIC_INT_DRIVER(fidelz80base_state, irq0_line_hold, 600) // 555 timer, guessed
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_fidel_sc9)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+
+ /* cartridge */
+ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc")
+ MCFG_GENERIC_EXTENSIONS("bin,dat")
+ MCFG_GENERIC_LOAD(fidelz80base_state, scc_cartridge)
+ MCFG_SOFTWARE_LIST_ADD("cart_list", "fidel_scc")
+MACHINE_CONFIG_END
+
static MACHINE_CONFIG_START( sc12, fidel6502_state )
/* basic machine hardware */
@@ -932,6 +1030,13 @@ ROM_START( cscfr )
ROM_END
+ROM_START( fscc9 )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD("b30", 0xc000, 0x2000, CRC(b845c458) SHA1(d3fda65dbd9fae44fa4b93f8207839d8fa0c367a) ) // HN48364P
+ ROM_LOAD("b31", 0xe000, 0x2000, CRC(cbaf97d7) SHA1(7ed8e68bb74713d9e2ff1d9c037012320b7bfcbf) ) // "
+ROM_END
+
+
ROM_START( fscc12 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("101-1068a01", 0x8000, 0x2000, CRC(63c76cdd) SHA1(e0771c98d4483a6b1620791cb99a7e46b0db95c4) ) // SSS SCM23C65E4
@@ -965,6 +1070,7 @@ CONS( 1981, cscsp, csc, 0, csc, cscg, driver_device, 0, "Fideli
CONS( 1981, cscg, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1981, cscfr, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1982, fscc9, 0, 0, sc9, sc12, driver_device, 0, "Fidelity Electronics", "Sensory Chess Challenger 9", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1984, fscc12, 0, 0, sc12, sc12, driver_device, 0, "Fidelity Electronics", "Sensory Chess Challenger 12-B", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1987, fexcel, 0, 0, fexcel, fexcel, driver_device, 0, "Fidelity Electronics", "Excellence (model 6080/6093)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp
index fcf546c8964..d1239636236 100644
--- a/src/mame/drivers/fidel68k.cpp
+++ b/src/mame/drivers/fidel68k.cpp
@@ -1,5 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:hap
+// thanks-to:Berger
/******************************************************************************
Fidelity Electronics 68000 based board driver
@@ -453,9 +454,9 @@ ROM_END
ROM_START( feagv11 )
ROM_REGION( 0x20000, "maincpu", 0 )
ROM_LOAD32_BYTE("16", 0x00000, 0x08000, CRC(8375d61f) SHA1(e042f6f01480c59ee09a458cf34f135664479824) ) // 27c256
+ ROM_LOAD32_BYTE("17", 0x00001, 0x08000, CRC(bfd14916) SHA1(115af6dfd29ddd8ad6d2ce390f8ecc4d60de6fce) ) // "
ROM_LOAD32_BYTE("18", 0x00002, 0x08000, CRC(9341dcaf) SHA1(686bd4799e89ffaf11a813d4cf5a2aedd4c2d97a) ) // "
ROM_LOAD32_BYTE("19", 0x00003, 0x08000, CRC(a70c5468) SHA1(7f6b4f46577d5cfdaa84d387c7ce35d941e5bbc7) ) // "
- ROM_LOAD32_BYTE("17", 0x00001, 0x08000, CRC(bfd14916) SHA1(115af6dfd29ddd8ad6d2ce390f8ecc4d60de6fce) ) // "
ROM_END
#define rom_feagv10 rom_feagv11
diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp
index 31568a6f601..34c06fd105e 100644
--- a/src/mame/drivers/fidelz80.cpp
+++ b/src/mame/drivers/fidelz80.cpp
@@ -1,5 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco,hap
+// thanks-to:Berger
/******************************************************************************
Fidelity Electronics Z80 based board driver
diff --git a/src/mame/drivers/funkyjet.cpp b/src/mame/drivers/funkyjet.cpp
index a9cacb720c6..a3c2a47599a 100644
--- a/src/mame/drivers/funkyjet.cpp
+++ b/src/mame/drivers/funkyjet.cpp
@@ -346,12 +346,10 @@ static MACHINE_CONFIG_START( funkyjet, funkyjet_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp
index 796b3130948..4ca8366e984 100644
--- a/src/mame/drivers/galastrm.cpp
+++ b/src/mame/drivers/galastrm.cpp
@@ -311,7 +311,6 @@ static MACHINE_CONFIG_START( galastrm, galastrm_state )
MCFG_TC0480SCP_TX_REGION(3)
MCFG_TC0480SCP_OFFSETS(-40, -3)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
diff --git a/src/mame/drivers/galaxi.cpp b/src/mame/drivers/galaxi.cpp
index 000078b8709..ccbdb96fb47 100644
--- a/src/mame/drivers/galaxi.cpp
+++ b/src/mame/drivers/galaxi.cpp
@@ -521,6 +521,40 @@ ROM_START( magjoker )
ROM_LOAD( "21.u38", 0x00000, 0x40000, CRC(199baf33) SHA1(006708d955481fe1ae44555d27896d18e1ff8440) )
ROM_END
+/*
+ Last Four
+ 2001, BRL.
+
+ CPUs:
+ 1x MC68000P10 (u1) 16/32-bit Microprocessor (main).
+ 1x AD-65 (u9) 4-Channel Mixing ADCPM Voice Synthesis LSI (sound).
+ 1x MC1458 (u10) Dual Operational Amplifier (sound).
+ 1x TDA2003 (u8) Audio Amplifier (sound).
+ 1x 10.000000MHz. oscillator (QZ1).
+ 1x 16.000MHz. oscillator (QZ2).
+
+ ROMs:
+ 1x AF49F010 (14) dumped.
+ 1x Am27C010 (15) dumped.
+ 1x MC27C100 (21) dumped.
+ 2x M27C4001 (12, 13) dumped.
+
+ RAMs:
+ 2x KT76C28K-10 (u16, u17).
+ 2x HT6264-70 (u26, u27).
+ 2x DS1230Y-100 (u4, u5) not dumped.
+
+ PLDs:
+ 1x A40MX04-PL84 (u29) read protected.
+
+ Others:
+ 1x 28x2 JAMMA edge connector.
+ 1x trimmer (volume).
+
+ Notes:
+ PCB is etched: GALAXI - 26 05 2000 BRL S.R.L. BOLOGNA.
+
+*/
ROM_START( lastfour )
ROM_REGION( 0x40000, "maincpu", 0 )
ROM_LOAD16_BYTE( "15.u48", 0x00000, 0x20000, CRC(9168e19c) SHA1(4a2f0d100e457bd33691ba084a0f0549e8bf0790) )
@@ -534,6 +568,7 @@ ROM_START( lastfour )
ROM_LOAD( "21.u38", 0x00000, 0x20000, CRC(e48523dd) SHA1(47bc2e5c2164b93d685fa134397845e0ed7aaa5f) )
ROM_END
+
/***************************************************************************
Game Drivers
***************************************************************************/
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index 0ec73f982b8..996b508bd19 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -2210,6 +2210,36 @@ static INPUT_PORTS_START( swarm )
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) ) /* more aliens */
INPUT_PORTS_END
+static INPUT_PORTS_START( kamikazp )
+ PORT_INCLUDE(galaxian)
+
+ PORT_MODIFY("IN1")
+ PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Bonus_Life ) ) // turning both of these on still seems to enable Free Play but actual coinage controlled by later dips?
+ PORT_DIPSETTING( 0x00, DEF_STR( None ) )
+ PORT_DIPSETTING( 0x40, "4000" )
+ PORT_DIPSETTING( 0x80, "5000" )
+ PORT_DIPSETTING( 0xc0, "7000 (buggy FREE PLAY message)" ) // also still causes the game to show 'FREE PLAY' which is the function of the old dips (doesn't operate in FREE PLAY tho)
+
+ PORT_MODIFY("IN2") // actual coinage appers to have been moved here (need to check code, wouldn't surprise me if some of these had other side-effects too) these are also some of the most ridiculous coinage setttings I've seen!
+ PORT_DIPNAME( 0x0f, 0x08, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x07, "6C / 2C" ) // first 4 coins give 1 credit, next 2 coins give 1 credit
+ PORT_DIPSETTING( 0x0c, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x03, "6C / 3C" ) // first 3 coins give 1 credit, 2nd 3 coins give 2 credits
+ PORT_DIPSETTING( 0x0b, "7C / 3C" )
+ PORT_DIPSETTING( 0x0d, DEF_STR( 4C_2C ) ) // first 3 coins give 1 credit, next coin gives 1 credit
+ PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) // 2
+ PORT_DIPSETTING( 0x09, DEF_STR( 3C_2C ) ) // first 2 coins give 1 credit, next coin gives 1 credit
+ PORT_DIPSETTING( 0x05, DEF_STR( 4C_3C ) ) // first 2 coins give 1 credit, 2nd 2 coins give 2 credits
+ PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x06, "1C / 1C (duplicate 1)" )
+ PORT_DIPSETTING( 0x0a, "1C / 1C (duplicate 2)" )
+ PORT_DIPSETTING( 0x0e, "1C / 1C (duplicate 3)" )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 2C_3C ) ) // .66
+ PORT_DIPSETTING( 0x0f, DEF_STR( Free_Play ) ) // always shows 9 credits
+INPUT_PORTS_END
+
static INPUT_PORTS_START( zerotime )
PORT_INCLUDE(galaxian)
@@ -7316,6 +7346,23 @@ ROM_START( moonaln )
ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) )
ROM_END
+ROM_START( kamikazp )
+ ROM_REGION( 0x4000, "maincpu", 0 )
+ ROM_LOAD( "KK1PMC.bin", 0x0000, 0x0800, CRC(4a29bbe4) SHA1(731e77d76420ab946fb3963681770c81f79c705d) )
+ ROM_LOAD( "KK2PMC.bin", 0x0800, 0x0800, CRC(65c57131) SHA1(6884421b1ee74e6913ceb519b29979cf764ee3f7) )
+ ROM_LOAD( "KK3PMC.bin", 0x1000, 0x0800, CRC(24cf6da0) SHA1(1d6c6d3e8af4f3da449b363eb710c3a42f1dfb64) )
+ ROM_LOAD( "KK4PMC.bin", 0x1800, 0x0800, CRC(5e5ebca8) SHA1(f4f1c4f180a46fed67bb05d9b61c98a556645e7a) )
+ ROM_LOAD( "KK5PMC.bin", 0x2000, 0x0800, CRC(6d325b14) SHA1(2f67db374976cfa1dee3d6136a4b0404db7870f6) )
+ ROM_LOAD( "KK6PMC.bin", 0x2800, 0x0800, CRC(05883c29) SHA1(22a4e6ce5e35d4ddea4d1b583a36b4a64a899159) )
+
+ ROM_REGION( 0x1000, "gfx1", 0 )
+ ROM_LOAD( "KK8PMC.bin", 0x0000, 0x0800, CRC(96b268b1) SHA1(3ad1fa972f8f841e26acd7e3363f42df898d01c6) )
+ ROM_LOAD( "KK7PMC.bin", 0x0800, 0x0800, CRC(58673a07) SHA1(4e51f803718f39436e43d3bceda836215a98cc37) )
+
+ ROM_REGION( 0x0020, "proms", 0 )
+ ROM_LOAD( "prom.6l", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) // not dumped, taken from Astrians, colours match screenshots
+ROM_END
+
ROM_START( superg )
ROM_REGION( 0x4000, "maincpu", 0 )
ROM_LOAD( "7f.bin", 0x0000, 0x1000, CRC(4335b1de) SHA1(e41e3d90dac738cf71377f3b476ec67b14dee27a) )
@@ -11331,6 +11378,8 @@ GAME( 1980, galaxrfgg, galaxian, galaxian, galaxrf, galaxian_state, galax
// these have the extra 'linescroll effect' title screens, like Moon Alien 2 but made out of a random tile, they lack an energy bar.
GAME( 1979, moonaln, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "Namco / Nichibutsu (Karateco license?)", "Moon Alien", MACHINE_SUPPORTS_SAVE ) // or bootleg?
GAME( 1979, galapx, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "hack", "Galaxian Part X (moonaln hack)", MACHINE_SUPPORTS_SAVE )
+// like above but does have the energy bar, also GFX changed to planes.
+GAME( 1979, kamikazp, galaxian, galaxian, kamikazp, galaxian_state, galaxian, ROT90, "bootleg (Potomac Games)", "Kamikaze (Potomac Games)", MACHINE_SUPPORTS_SAVE )
// this has the tiles to display the energy bar, but use the flag gfx for the 'linescroll effect' title screen, also doesn't work due to bad rom.
GAME( 1980, supergx, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "Namco / Nichibutsu", "Super GX", MACHINE_NOT_WORKING | MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
// these have the energy bar, and the tiles needed to display a less corrupt 'linescroll effect' title, but don't display one
diff --git a/src/mame/drivers/galpanic.cpp b/src/mame/drivers/galpanic.cpp
index 1f9c349de33..9c355309e77 100644
--- a/src/mame/drivers/galpanic.cpp
+++ b/src/mame/drivers/galpanic.cpp
@@ -248,7 +248,6 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_OFFSETS(0, -16)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0)
kaneko_hit_device::set_type(*device, 0);
diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp
index f2c05930332..9b39f18f1b2 100644
--- a/src/mame/drivers/gba.cpp
+++ b/src/mame/drivers/gba.cpp
@@ -1926,7 +1926,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( gbadv )
PORT_START("INPUTS")
- PORT_BIT( 0xfc00, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_UNUSED
+ PORT_BIT( 0xfc00, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 L") PORT_PLAYER(1) // L
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 R") PORT_PLAYER(1) // R
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
diff --git a/src/mame/drivers/geneve.cpp b/src/mame/drivers/geneve.cpp
index 8d413333bbd..bcf8acee880 100644
--- a/src/mame/drivers/geneve.cpp
+++ b/src/mame/drivers/geneve.cpp
@@ -210,7 +210,6 @@
#include "sound/sn76496.h"
#include "bus/ti99x/genboard.h"
-#include "bus/ti99x/videowrp.h"
#include "bus/ti99x/joyport.h"
#include "bus/ti99_peb/peribox.h"
@@ -690,8 +689,7 @@ static MACHINE_CONFIG_START( geneve_60hz, geneve_state )
MCFG_TMS9995_CLKOUT_HANDLER( WRITELINE(geneve_state, clock_out) )
MCFG_TMS9995_DBIN_HANDLER( WRITELINE(geneve_state, dbin_line) )
- // video hardware
- MCFG_DEVICE_ADD(VIDEO_SYSTEM_TAG, V9938VIDEO, 0)
+ // Video hardware
MCFG_V9938_ADD(VDP_TAG, SCREEN_TAG, 0x20000, XTAL_21_4772MHz) /* typical 9938 clock, not verified */
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(geneve_state, set_tms9901_INT2_from_v9938))
MCFG_V99X8_SCREEN_ADD_NTSC(SCREEN_TAG, VDP_TAG, XTAL_21_4772MHz)
@@ -726,9 +724,11 @@ static MACHINE_CONFIG_START( geneve_60hz, geneve_state )
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(geneve_state, intb) )
MCFG_PERIBOX_READY_HANDLER( WRITELINE(geneve_state, ext_ready) )
- // sound hardware
- MCFG_TI_SOUND_76496_ADD( TISOUND_TAG )
- MCFG_TI_SOUND_READY_HANDLER( WRITELINE(geneve_state, ext_ready) )
+ // Sound hardware
+ MCFG_SPEAKER_STANDARD_MONO("sound_out")
+ MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN76496, 3579545) /* 3.579545 MHz */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75)
+ MCFG_SN76496_READY_HANDLER( WRITELINE(geneve_state, ext_ready) )
// User interface devices
MCFG_DEVICE_ADD( GKEYBOARD_TAG, GENEVE_KEYBOARD, 0 )
diff --git a/src/mame/drivers/gijoe.cpp b/src/mame/drivers/gijoe.cpp
index 8556742921f..80a0d830c87 100644
--- a/src/mame/drivers/gijoe.cpp
+++ b/src/mame/drivers/gijoe.cpp
@@ -329,18 +329,14 @@ static MACHINE_CONFIG_START( gijoe, gijoe_state )
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(gijoe_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(gijoe_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, -37, 20)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -37, 20)
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
diff --git a/src/mame/drivers/glasgow.cpp b/src/mame/drivers/glasgow.cpp
index e8922472d5b..0f349f068f4 100644
--- a/src/mame/drivers/glasgow.cpp
+++ b/src/mame/drivers/glasgow.cpp
@@ -30,14 +30,15 @@ How to play (quick guide)
3. Computer plays black, it will work out its move and beep.
4. Read the move in the display, or look for the flashing LEDs.
5. Move the computer's piece in the same way you moved yours.
-6. If a piece is being taken, firstly click on the piece then click the board
- edge. This causes the piece to disappear. After that, move the piece that
- took the other piece.
+6. If a piece is being taken, firstly click on the piece then click the blank
+ area at bottom right. This causes the piece to disappear. After that,
+ move the piece that took the other piece.
7. You'll need to read the official user manual for advanced features, or if
you get messages such as "Err1".
-Note about clickable artwork: You need to be running in windowed mode;
- and you need to use newui.
+ToDo:
+- Only glasgow works, the others are incomplete.
+
***************************************************************************/
@@ -46,50 +47,126 @@ Note about clickable artwork: You need to be running in windowed mode;
#include "glasgow.lh"
#include "sound/beep.h"
-
class glasgow_state : public driver_device
{
public:
glasgow_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_beep(*this, "beeper"),
- m_line0(*this, "LINE0"),
- m_line1(*this, "LINE1")
- { }
-
- required_device<cpu_device> m_maincpu;
- required_device<beep_device> m_beep;
- required_ioport m_line0;
- required_ioport m_line1;
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_beep(*this, "beeper")
+ { }
DECLARE_WRITE16_MEMBER(glasgow_lcd_w);
DECLARE_WRITE16_MEMBER(glasgow_lcd_flag_w);
DECLARE_READ16_MEMBER(glasgow_keys_r);
DECLARE_WRITE16_MEMBER(glasgow_keys_w);
+ DECLARE_READ16_MEMBER(glasgow_board_r);
+ DECLARE_WRITE16_MEMBER(glasgow_board_w);
+ DECLARE_WRITE16_MEMBER(glasgow_beeper_w);
+ DECLARE_READ16_MEMBER(read_board);
+ DECLARE_WRITE16_MEMBER(write_board);
+ DECLARE_WRITE16_MEMBER(write_beeper);
DECLARE_WRITE16_MEMBER(write_lcd);
DECLARE_WRITE16_MEMBER(write_lcd_flag);
DECLARE_WRITE16_MEMBER(write_irq_flag);
DECLARE_READ16_MEMBER(read_newkeys16);
+ DECLARE_WRITE32_MEMBER(write_beeper32);
+ DECLARE_READ32_MEMBER(read_board32);
+ DECLARE_WRITE32_MEMBER(write_board32);
+ DECLARE_WRITE32_MEMBER(write_keys32);
DECLARE_WRITE32_MEMBER(write_lcd32);
DECLARE_WRITE32_MEMBER(write_lcd_flag32);
DECLARE_READ32_MEMBER(read_newkeys32);
- DECLARE_WRITE32_MEMBER(write_beeper32);
+ TIMER_DEVICE_CALLBACK_MEMBER(update_nmi);
+ TIMER_DEVICE_CALLBACK_MEMBER(update_nmi32);
+ DECLARE_MACHINE_START(dallas32);
+ DECLARE_MACHINE_START(glasgow);
+ DECLARE_MACHINE_RESET(glasgow);
+private:
UINT8 m_lcd_shift_counter;
UINT8 m_led7;
- UINT8 m_irq_flag;
- UINT16 m_beeper;
+ UINT8 m_key_select;
+ bool m_lcd_invert;
+ bool m_key_selector;
+ UINT8 m_read_board_flag;
+ UINT8 m_mouse_hold;
+ UINT8 m_board_row;
+ UINT8 m_mouse_down;
+ UINT16 m_Line18_LED;
+ UINT16 m_Line18_REED;
+
+ UINT8 pos_to_num( UINT8 );
+ void set_board( );
+ void glasgow_pieces_w( );
- DECLARE_MACHINE_START(dallas32);
- TIMER_DEVICE_CALLBACK_MEMBER(update_nmi);
- TIMER_DEVICE_CALLBACK_MEMBER(update_nmi32);
+ required_device<cpu_device> m_maincpu;
+ required_device<beep_device> m_beep;
+
+};
+
+typedef struct
+ {
+ UINT8 field;
+ UINT8 piece;
+ } BOARD_FIELD;
+
+BOARD_FIELD l_board[8][8];
- virtual void machine_start() override;
- virtual void machine_reset() override;
+ /* starts at bottom left corner */
+const BOARD_FIELD l_start_board[8][8] =
+{
+ { {7,10}, {6,8}, {5,9}, {4,11}, {3,12}, {2,9}, {1,8}, {0,10} },
+ { {15,7}, {14,7}, {13,7}, {12,7}, { 11,7}, {10,7}, {9,7}, {8,7} },
+
+ { {23,0}, {22,0}, {21,0}, {20,0}, {19,0}, {18,0}, {17,0}, {16,0} },
+ { {31,0}, {30,0}, {29,0}, {28,0}, {27,0}, {26,0}, {25,0}, {24,0} },
+ { {39,0}, {38,0}, {37,0}, {36,0}, {35,0}, {34,0}, {33,0}, {32,0} },
+ { {47,0}, {46,0}, {45,0}, {44,0}, {43,0}, {42,0}, {41,0}, {40,0} },
+
+ { {55,1}, {54,1}, {53,1}, {52,1}, {51,1}, {50,1}, {49,1}, {48,1} },
+ { {63,4}, {62,2}, {61,3}, {60,5}, {59,6}, {58,3}, {57,2}, {56,4} }
};
+UINT8 glasgow_state::pos_to_num( UINT8 val )
+{
+ switch (val)
+ {
+ case 0xfe: return 7;
+ case 0xfd: return 6;
+ case 0xfb: return 5;
+ case 0xf7: return 4;
+ case 0xef: return 3;
+ case 0xdf: return 2;
+ case 0xbf: return 1;
+ case 0x7f: return 0;
+ default: return 0xff;
+ }
+}
+
+void glasgow_state::set_board( )
+{
+ UINT8 i_AH, i_18;
+ for (i_AH = 0; i_AH < 8; i_AH++)
+ {
+ for (i_18 = 0; i_18 < 8; i_18++)
+ {
+ // copy start postition to l_board
+ l_board[i_18][i_AH] = l_start_board[i_18][i_AH];
+ }
+ }
+}
+
+void glasgow_state::glasgow_pieces_w( )
+{
+ // This causes the pieces to display on-screen
+ UINT8 i_18, i_AH;
+
+ for (i_18 = 0; i_18 < 8; i_18++)
+ for (i_AH = 0; i_AH < 8; i_AH++)
+ output().set_indexed_value("P", 63 - l_board[i_18][i_AH].field, l_board[i_18][i_AH].piece);
+}
WRITE16_MEMBER( glasgow_state::glasgow_lcd_w )
{
@@ -113,24 +190,158 @@ WRITE16_MEMBER( glasgow_state::glasgow_lcd_flag_w )
else
{
m_led7 = 0;
+ m_key_selector = 1;
}
}
READ16_MEMBER( glasgow_state::glasgow_keys_r )
{
- UINT8 data = 0xff;
+ static const char *const keynames[] = { "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", "LINE8", "LINE9" };
+ UINT8 pos2num_res = 0;
+ m_board_row++;
+ m_board_row &= 7;
+
+ // See if we are moving a piece
+ UINT8 data = ioport(keynames[m_board_row])->read();
+
+ if ((data != 0xff) && (!m_mouse_down))
+ {
+ pos2num_res = pos_to_num(data);
+
+ if (!(pos2num_res < 8))
+ logerror("Position out of bound!");
+ else
+ if ((m_mouse_hold) && (!l_board[m_board_row][pos2num_res].piece))
+ {
+ // Moving a piece onto a blank
+ l_board[m_board_row][pos2num_res].piece = m_mouse_hold;
+ m_mouse_hold = 0;
+ }
+ else
+ if ((!m_mouse_hold) && (l_board[m_board_row][pos2num_res].piece))
+ {
+ // Picking up a piece
+ m_mouse_hold = l_board[m_board_row][pos2num_res].piece;
+ l_board[m_board_row][pos2num_res].piece = 0;
+ }
+
+ m_mouse_down = m_board_row + 1;
+ }
+ else
+ if ((data == 0xff) && (m_mouse_down == (m_board_row + 1))) // Wait for mouse to be released
+ m_mouse_down = 0;
+
+ // See if we are taking a piece off the board
+ if (!ioport("LINE10")->read())
+ m_mouse_hold = 0;
+
+ // See if any keys pressed
+ data = 3;
+
+ if (m_key_select == ioport("LINE0")->read())
+ data &= 1;
+
+ if (m_key_select == ioport("LINE1")->read())
+ data &= 2;
return data << 8;
}
WRITE16_MEMBER( glasgow_state::glasgow_keys_w )
{
+ m_key_select = data >> 8;
+ glasgow_pieces_w();
+}
+
+READ16_MEMBER( glasgow_state::glasgow_board_r )
+{
+ UINT8 i_AH, data = 0;
+
+ if (m_Line18_REED < 8)
+ {
+ // if there is a piece on the field -> set bit in data
+ for (i_AH = 0; i_AH < 8; i_AH++)
+ {
+ if (!l_board[m_Line18_REED][i_AH].piece)
+ data |= (1 << i_AH);
+ }
+ }
+
+ m_read_board_flag = TRUE;
+
+ return data << 8;
+}
+
+WRITE16_MEMBER( glasgow_state::glasgow_board_w )
+{
+ m_Line18_REED = pos_to_num(data >> 8) ^ 7;
+
+ // LED's or REED's ?
+ if (m_read_board_flag)
+ {
+ m_Line18_LED = 0;
+ m_read_board_flag = 0;
+ }
+ else
+ {
+ m_Line18_LED = data >> 8;
+ }
+
+ m_lcd_invert = 1;
+}
+
+WRITE16_MEMBER( glasgow_state::glasgow_beeper_w )
+{
+ UINT8 i_AH, i_18;
+ UINT8 LED;
+ UINT16 LineAH = data >> 8;
+
+ if (LineAH && m_Line18_LED)
+ {
+ for (i_AH = 0; i_AH < 8; i_AH++)
+ {
+ if (LineAH & (1 << i_AH))
+ {
+ for (i_18 = 0; i_18 < 8; i_18++)
+ {
+ if (!(m_Line18_LED & (1 << i_18)))
+ {
+ LED = l_board[i_18][i_AH].field;
+ output().set_led_value(LED, 1); // LED on
+ }
+ else
+ {
+ // LED off
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ // No LED -> all LED's off
+ for (i_AH = 0; i_AH < 8; i_AH++)
+ {
+ for (i_18 = 0; i_18 < 8; i_18++)
+ {
+ // LED off
+ LED = l_board[i_18][i_AH].field;
+ output().set_led_value(LED, 0);
+ }
+ }
+ }
+}
+
+WRITE16_MEMBER( glasgow_state::write_beeper )
+{
+ m_lcd_invert = 1;
}
WRITE16_MEMBER( glasgow_state::write_lcd )
{
UINT8 lcd_data = data >> 8;
+ output().set_digit_value(m_lcd_shift_counter, m_lcd_invert ? lcd_data^0xff : lcd_data);
m_lcd_shift_counter--;
m_lcd_shift_counter &= 3;
logerror("LCD Offset = %d Data low = %x \n", offset, lcd_data);
@@ -138,43 +349,60 @@ WRITE16_MEMBER( glasgow_state::write_lcd )
WRITE16_MEMBER( glasgow_state::write_lcd_flag )
{
-// UINT8 lcd_flag;
-// lcd_flag=data >> 8;
- //m_beep->set_state((data >> 8) & 1 ? 1 : 0);
- if ((data >> 8) == 0)
- {
- m_led7 = 0;
- }
- else
- m_led7 = 0xff;
+ m_lcd_invert = 0;
+ UINT8 lcd_flag = data >> 8;
+ //beep_set_state(0, lcd_flag & 1 ? 1 : 0);
+ if (lcd_flag == 0)
+ m_key_selector = 1;
+ // The key function in the rom expects after writing to
+ // the a value from the second key row;
+ m_led7 = (lcd_flag) ? 255 : 0;
-// The key function in the rom expects after writing to
-// the a value from the second key row;
-// if (lcd_flag != 0)
-// m_led7 = 255;
-// else
-// m_led7 = 0;
-//
logerror("LCD Flag 16 = %x \n", data);
}
+READ16_MEMBER( glasgow_state::read_board )
+{
+ return 0xff00; // Mephisto need it for working
+}
+
+WRITE16_MEMBER( glasgow_state::write_board )
+{
+ UINT8 board = data >> 8;
+
+ if (board == 0xff)
+ m_key_selector = 0;
+ // The key function in the rom expects after writing to
+ // the chess board a value from the first key row;
+ logerror("Write Board = %x \n", data >> 8);
+ glasgow_pieces_w();
+}
+
+
WRITE16_MEMBER( glasgow_state::write_irq_flag )
{
- m_beep->set_state(data & 0x100);
+ m_beep->set_state(BIT(data, 8));
logerror("Write 0x800004 = %x \n", data);
- m_irq_flag = 1;
- m_beeper = data;
}
READ16_MEMBER( glasgow_state::read_newkeys16 ) //Amsterdam, Roma
{
- return 0;
+ UINT16 data;
+
+ if (m_key_selector)
+ data = ioport("LINE1")->read();
+ else
+ data = ioport("LINE0")->read();
+
+ logerror("read Keyboard Offset = %x Data = %x Select = %x \n", offset, data, m_key_selector);
+ data <<= 8;
+ return data ;
}
#ifdef UNUSED_FUNCTION
-READ16_MEMBER(glasgow_state::read_test)
+READ16_MEMBER(read_test)
{
logerror("read test Offset = %x Data = %x\n ",offset,data);
return 0xffff; // Mephisto need it for working
@@ -189,112 +417,227 @@ READ16_MEMBER(glasgow_state::read_test)
WRITE32_MEMBER( glasgow_state::write_lcd32 )
{
+ UINT8 lcd_data = data >> 8;
+
+ output().set_digit_value(m_lcd_shift_counter, m_lcd_invert ? lcd_data^0xff : lcd_data);
m_lcd_shift_counter--;
m_lcd_shift_counter &= 3;
- //logerror("LCD Offset = %d Data = %x \n ", offset, lcd_data);
+ // logerror("LCD Offset = %d Data = %x \n ", offset, lcd_data);
}
WRITE32_MEMBER( glasgow_state::write_lcd_flag32 )
{
-// UINT8 lcd_flag = data >> 24;
+ UINT8 lcd_flag = data >> 24;
- if ((data >> 24) == 0)
- {
- m_led7 = 0;
- }
- else
- m_led7 = 0xff;
+ m_lcd_invert = 0;
+
+ if (lcd_flag == 0)
+ m_key_selector = 1;
+
+ logerror("LCD Flag 32 = %x \n", lcd_flag);
+ // beep_set_state(0, lcd_flag & 1 ? 1 : 0);
+ m_led7 = (lcd_flag) ? 255 : 0;
+}
- //logerror("LCD Flag 32 = %x \n", data >> 24);
- //m_beep->set_state((data >> 24) & 1 ? 1 : 0);
-// if (lcd_flag != 0)
-// m_led7 = 255;
-// else
-// m_led7 = 0;
+WRITE32_MEMBER( glasgow_state::write_keys32 )
+{
+ m_lcd_invert = 1;
+ m_key_select = data;
+ logerror("Write Key = %x \n", m_key_select);
}
READ32_MEMBER( glasgow_state::read_newkeys32 ) // Dallas 32, Roma 32
{
+ UINT32 data;
+
+ if (m_key_selector)
+ data = ioport("LINE1")->read();
+ else
+ data = ioport("LINE0")->read();
+ //if (key_selector == 1) data = input_port_read(machine, "LINE0"); else data = 0;
+ logerror("read Keyboard Offset = %x Data = %x\n", offset, data);
+ data <<= 24;
+ return data ;
+}
+
+READ32_MEMBER( glasgow_state::read_board32 )
+{
+ logerror("read board 32 Offset = %x \n", offset);
return 0;
}
#ifdef UNUSED_FUNCTION
-READ16_MEMBER(glasgow_state::read_board_amsterd)
+READ16_MEMBER(read_board_amsterd)
{
logerror("read board amsterdam Offset = %x \n ", offset);
return 0xffff;
}
#endif
+WRITE32_MEMBER( glasgow_state::write_board32 )
+{
+ UINT8 board = data >> 24;
+ if (board == 0xff)
+ m_key_selector = 0;
+ logerror("Write Board = %x \n", data);
+ glasgow_pieces_w();
+}
+
+
WRITE32_MEMBER( glasgow_state::write_beeper32 )
{
m_beep->set_state(data & 0x01000000);
logerror("Write 0x8000004 = %x \n", data);
- m_irq_flag = 1;
- m_beeper = data;
}
-TIMER_DEVICE_CALLBACK_MEMBER(glasgow_state::update_nmi)
+
+TIMER_DEVICE_CALLBACK_MEMBER( glasgow_state::update_nmi)
{
m_maincpu->set_input_line(7, HOLD_LINE);
}
-TIMER_DEVICE_CALLBACK_MEMBER(glasgow_state::update_nmi32)
+TIMER_DEVICE_CALLBACK_MEMBER( glasgow_state::update_nmi32 )
{
- m_maincpu->set_input_line(6, HOLD_LINE);
+ m_maincpu->set_input_line(6, HOLD_LINE); // this was 7 in the old code, which is correct?
}
-void glasgow_state::machine_start()
+MACHINE_START_MEMBER( glasgow_state, glasgow )
{
- m_irq_flag = 0;
+ m_key_selector = 0;
m_lcd_shift_counter = 3;
}
-MACHINE_START_MEMBER(glasgow_state,dallas32)
+MACHINE_START_MEMBER( glasgow_state, dallas32 )
{
m_lcd_shift_counter = 3;
}
-void glasgow_state::machine_reset()
+MACHINE_RESET_MEMBER( glasgow_state, glasgow )
{
m_lcd_shift_counter = 3;
+ set_board();
}
+
static ADDRESS_MAP_START(glasgow_mem, AS_PROGRAM, 16, glasgow_state)
ADDRESS_MAP_GLOBAL_MASK(0x1FFFF)
- AM_RANGE(0x00000000, 0x0000ffff) AM_ROM
- AM_RANGE(0x00010000, 0x00010001) AM_WRITE(glasgow_lcd_w)
- AM_RANGE(0x00010002, 0x00010003) AM_READWRITE(glasgow_keys_r,glasgow_keys_w)
- AM_RANGE(0x00010004, 0x00010005) AM_WRITE(glasgow_lcd_flag_w)
- AM_RANGE(0x0001c000, 0x0001ffff) AM_RAM // 16KB
+ AM_RANGE(0x000000, 0x00ffff) AM_ROM
+ AM_RANGE(0x010000, 0x010001) AM_WRITE( glasgow_lcd_w )
+ AM_RANGE(0x010002, 0x010003) AM_READWRITE( glasgow_keys_r, glasgow_keys_w )
+ AM_RANGE(0x010004, 0x010005) AM_WRITE( glasgow_lcd_flag_w )
+ AM_RANGE(0x010006, 0x010007) AM_READWRITE( glasgow_board_r, glasgow_beeper_w )
+ AM_RANGE(0x010008, 0x010009) AM_WRITE( glasgow_board_w )
+ AM_RANGE(0x01c000, 0x01ffff) AM_RAM // 16KB
ADDRESS_MAP_END
-
static ADDRESS_MAP_START(amsterd_mem, AS_PROGRAM, 16, glasgow_state)
// ADDRESS_MAP_GLOBAL_MASK(0x7FFFF)
- AM_RANGE(0x00000000, 0x0000ffff) AM_ROM
- AM_RANGE(0x00800002, 0x00800003) AM_WRITE(write_lcd)
- AM_RANGE(0x00800008, 0x00800009) AM_WRITE(write_lcd_flag)
- AM_RANGE(0x00800004, 0x00800005) AM_WRITE(write_irq_flag)
- AM_RANGE(0x00800040, 0x00800041) AM_READ(read_newkeys16)
- AM_RANGE(0x00ffc000, 0x00ffffff) AM_RAM // 16KB
+ AM_RANGE(0x000000, 0x00ffff) AM_ROM
+ AM_RANGE(0x800002, 0x800003) AM_WRITE( write_lcd )
+ AM_RANGE(0x800008, 0x800009) AM_WRITE( write_lcd_flag )
+ AM_RANGE(0x800004, 0x800005) AM_WRITE( write_irq_flag )
+ AM_RANGE(0x800010, 0x800011) AM_WRITE( write_board )
+ AM_RANGE(0x800020, 0x800021) AM_READ( read_board )
+ AM_RANGE(0x800040, 0x800041) AM_READ( read_newkeys16 )
+ AM_RANGE(0x800088, 0x800089) AM_WRITE( write_beeper )
+ AM_RANGE(0xffc000, 0xffffff) AM_RAM // 16KB
ADDRESS_MAP_END
-
static ADDRESS_MAP_START(dallas32_mem, AS_PROGRAM, 32, glasgow_state)
// ADDRESS_MAP_GLOBAL_MASK(0x1FFFF)
- AM_RANGE(0x00000000, 0x0000ffff) AM_ROM
- AM_RANGE(0x00010000, 0x0001ffff) AM_RAM // 64KB
- AM_RANGE(0x00800000, 0x00800003) AM_WRITE(write_lcd32)
- AM_RANGE(0x00800004, 0x00800007) AM_WRITE(write_beeper32)
- AM_RANGE(0x00800008, 0x0080000B) AM_WRITE(write_lcd_flag32)
- AM_RANGE(0x00800040, 0x00800043) AM_READ(read_newkeys32)
+ AM_RANGE(0x000000, 0x00ffff) AM_ROM
+ AM_RANGE(0x010000, 0x01ffff) AM_RAM // 64KB
+ AM_RANGE(0x800000, 0x800003) AM_WRITE( write_lcd32 )
+ AM_RANGE(0x800004, 0x800007) AM_WRITE( write_beeper32 )
+ AM_RANGE(0x800008, 0x80000B) AM_WRITE( write_lcd_flag32 )
+ AM_RANGE(0x800010, 0x800013) AM_WRITE( write_board32 )
+ AM_RANGE(0x800020, 0x800023) AM_READ( read_board32 )
+ AM_RANGE(0x800040, 0x800043) AM_READ( read_newkeys32 )
+ AM_RANGE(0x800088, 0x80008b) AM_WRITE( write_keys32 )
ADDRESS_MAP_END
+
+static INPUT_PORTS_START( chessboard )
+ PORT_START("LINE2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_START("LINE3")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_START("LINE4")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_START("LINE5")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_START("LINE6")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_START("LINE7")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_START("LINE8")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_START("LINE9")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD)
+ PORT_START("LINE10")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD)
+INPUT_PORTS_END
+
static INPUT_PORTS_START( new_keyboard ) //Amsterdam, Dallas 32, Roma, Roma 32
PORT_START("LINE0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1)
@@ -315,6 +658,8 @@ static INPUT_PORTS_START( new_keyboard ) //Amsterdam, Dallas 32, Roma, Roma 32
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8)
+
+ PORT_INCLUDE( chessboard )
INPUT_PORTS_END
static INPUT_PORTS_START( old_keyboard ) //Glasgow,Dallas
@@ -337,23 +682,21 @@ static INPUT_PORTS_START( old_keyboard ) //Glasgow,Dallas
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LEV") PORT_CODE(KEYCODE_F3)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MEM") PORT_CODE(KEYCODE_F4)
-INPUT_PORTS_END
-
-INPUT_PORTS_EXTERN( chessboard);
-
-static INPUT_PORTS_START( oldkeys )
- PORT_INCLUDE( old_keyboard )
+ PORT_INCLUDE( chessboard )
INPUT_PORTS_END
-static INPUT_PORTS_START( newkeys )
- PORT_INCLUDE( new_keyboard )
-INPUT_PORTS_END
static MACHINE_CONFIG_START( glasgow, glasgow_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, 12000000)
MCFG_CPU_PROGRAM_MAP(glasgow_mem)
+ MCFG_MACHINE_START_OVERRIDE(glasgow_state, glasgow )
+ MCFG_MACHINE_RESET_OVERRIDE(glasgow_state, glasgow )
+
+ /* video hardware */
+ MCFG_DEFAULT_LAYOUT(layout_glasgow)
+
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("beeper", BEEP, 44)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
@@ -375,9 +718,9 @@ static MACHINE_CONFIG_DERIVED( dallas32, glasgow )
MCFG_DEVICE_REMOVE("nmi_timer")
MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", glasgow_state, update_nmi32, attotime::from_hz(50))
-
MACHINE_CONFIG_END
+
/***************************************************************************
ROM definitions
***************************************************************************/
@@ -413,6 +756,7 @@ ROM_START( dallas16 )
ROM_LOAD16_BYTE("dallas-l.bin",0x00001, 0x06f00,CRC(f0d5bc03) SHA1(4b1b9a71663d5321820b4cf7da205e5fe5d3d001))
ROM_END
+// This set needs checking. It cannot possibly work with this rom and hardware.
ROM_START( roma )
ROM_REGION16_BE( 0x1000000, "maincpu", 0 )
ROM_LOAD("roma32.bin", 0x000000, 0x10000, CRC(587d03bf) SHA1(504e9ff958084700076d633f9c306fc7baf64ffd))
@@ -433,11 +777,11 @@ ROM_END
Game drivers
***************************************************************************/
-/* YEAR, NAME, PARENT, COMPAT, MACHINE, INPUT, INIT, COMPANY, FULLNAME, FLAGS */
-CONS( 1984, glasgow, 0, 0, glasgow, oldkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto III S Glasgow", MACHINE_NOT_WORKING)
-CONS( 1984, amsterd, 0, 0, amsterd, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Amsterdam", MACHINE_NOT_WORKING)
-CONS( 1984, dallas, glasgow, 0, glasgow, oldkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas", MACHINE_NOT_WORKING)
-CONS( 1984, roma, amsterd, 0, glasgow, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Roma", MACHINE_NOT_WORKING)
-CONS( 1984, dallas32, amsterd, 0, dallas32, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas 32 Bit", MACHINE_NOT_WORKING)
-CONS( 1984, roma32, amsterd, 0, dallas32, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Roma 32 Bit", MACHINE_NOT_WORKING)
-CONS( 1984, dallas16, amsterd, 0, amsterd, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas 16 Bit", MACHINE_NOT_WORKING)
+/* YEAR, NAME, PARENT, COMPAT, MACHINE, INPUT, CLASS, INIT, COMPANY, FULLNAME, FLAGS */
+CONS( 1984, glasgow, 0, 0, glasgow, old_keyboard, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto III S Glasgow", 0)
+CONS( 1984, amsterd, 0, 0, amsterd, new_keyboard, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Amsterdam", MACHINE_NOT_WORKING)
+CONS( 1984, dallas, glasgow, 0, glasgow, old_keyboard, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas", MACHINE_NOT_WORKING)
+CONS( 1984, roma, amsterd, 0, glasgow, new_keyboard, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Roma", MACHINE_NOT_WORKING)
+CONS( 1984, dallas32, amsterd, 0, dallas32, new_keyboard, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas 32 Bit", MACHINE_NOT_WORKING)
+CONS( 1984, roma32, amsterd, 0, dallas32, new_keyboard, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Roma 32 Bit", MACHINE_NOT_WORKING)
+CONS( 1984, dallas16, amsterd, 0, amsterd, new_keyboard, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas 16 Bit", MACHINE_NOT_WORKING)
diff --git a/src/mame/drivers/gotcha.cpp b/src/mame/drivers/gotcha.cpp
index 11c96bcdb0b..afb5540c576 100644
--- a/src/mame/drivers/gotcha.cpp
+++ b/src/mame/drivers/gotcha.cpp
@@ -287,7 +287,6 @@ static MACHINE_CONFIG_START( gotcha, gotcha_state )
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_OFFSETS(5, -1) // aligned to 2nd instruction screen in attract
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/groundfx.cpp b/src/mame/drivers/groundfx.cpp
index ff6d31a6870..e3e0c652ef7 100644
--- a/src/mame/drivers/groundfx.cpp
+++ b/src/mame/drivers/groundfx.cpp
@@ -344,7 +344,6 @@ static MACHINE_CONFIG_START( groundfx, groundfx_state )
MCFG_TC0480SCP_OFFSETS(0x24, 0)
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
diff --git a/src/mame/drivers/gstriker.cpp b/src/mame/drivers/gstriker.cpp
index 200cac43623..ca2ad772f7f 100644
--- a/src/mame/drivers/gstriker.cpp
+++ b/src/mame/drivers/gstriker.cpp
@@ -546,7 +546,6 @@ static MACHINE_CONFIG_START( gstriker, gstriker_state )
MCFG_VSYSTEM_SPR_SET_PALMASK(0x1f)
MCFG_VSYSTEM_SPR_SET_TRANSPEN(0)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp
index e9cbb5e37a5..91eedfcdf83 100644
--- a/src/mame/drivers/gticlub.cpp
+++ b/src/mame/drivers/gticlub.cpp
@@ -973,15 +973,11 @@ static MACHINE_CONFIG_START( gticlub, gticlub_state )
MCFG_VIDEO_START_OVERRIDE(gticlub_state,gticlub)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_DEVICE_ADD("k001604_1", K001604, 0)
- MCFG_K001604_GFX_INDEX1(1)
- MCFG_K001604_GFX_INDEX2(2)
MCFG_K001604_LAYER_SIZE(1)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0)
MCFG_K001604_ROZ_OFFSET(0)
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_DEVICE_ADD("k001005", K001005, 0)
@@ -1031,13 +1027,10 @@ static MACHINE_CONFIG_DERIVED( slrasslt, gticlub )
MCFG_DEVICE_REMOVE("k001604_1")
MCFG_DEVICE_ADD("k001604_1", K001604, 0)
- MCFG_K001604_GFX_INDEX1(1)
- MCFG_K001604_GFX_INDEX2(2)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(0)
MCFG_K001604_TXT_OFFSET(16384)
MCFG_K001604_ROZ_OFFSET(0)
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MACHINE_CONFIG_END
@@ -1113,26 +1106,18 @@ static MACHINE_CONFIG_START( hangplt, gticlub_state )
MCFG_SCREEN_VISIBLE_AREA(0, 511, 0, 383)
MCFG_SCREEN_UPDATE_DRIVER(gticlub_state, screen_update_hangplt)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k001604_1", K001604, 0)
- MCFG_K001604_GFX_INDEX1(1)
- MCFG_K001604_GFX_INDEX2(2)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0)
MCFG_K001604_ROZ_OFFSET(16384)
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_DEVICE_ADD("k001604_2", K001604, 0)
- MCFG_K001604_GFX_INDEX1(3)
- MCFG_K001604_GFX_INDEX2(4)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0)
MCFG_K001604_ROZ_OFFSET(16384)
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_K056800_ADD("k056800", XTAL_33_8688MHz/2)
diff --git a/src/mame/drivers/gunbustr.cpp b/src/mame/drivers/gunbustr.cpp
index b4ffdf0ba70..5b1df1707db 100644
--- a/src/mame/drivers/gunbustr.cpp
+++ b/src/mame/drivers/gunbustr.cpp
@@ -303,7 +303,6 @@ static MACHINE_CONFIG_START( gunbustr, gunbustr_state )
MCFG_TC0480SCP_OFFSETS_TX(-1, -1)
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp
index 7b47dc59c7c..4d57c28a3c7 100644
--- a/src/mame/drivers/harddriv.cpp
+++ b/src/mame/drivers/harddriv.cpp
@@ -351,6 +351,8 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d
m_dsp32(*this, "dsp32"),
m_ds3sdsp(*this, "ds3sdsp"),
m_ds3xdsp(*this, "ds3xdsp"),
+ m_ds3sdsp_region(*this, "ds3sdsp"),
+ m_ds3xdsp_region(*this, "ds3xdsp"),
m_ds3dac1(*this, "ds3dac1"),
m_ds3dac2(*this, "ds3dac2"),
m_harddriv_sound(*this, "harddriv_sound"),
@@ -407,8 +409,7 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d
m_adsp_sim_address(0),
m_adsp_som_address(0),
m_adsp_eprom_base(0),
- m_sim_memory(nullptr),
- m_sim_memory_size(0),
+ m_sim_memory(*this, "user1"),
m_adsp_pgm_memory_word(nullptr),
m_ds3_sdata_memory(*this, "ds3sdsp_data"),
m_ds3_sdata_memory_size(0),
@@ -4085,13 +4086,13 @@ ROM_START( racedrivpan )
ROM_LOAD16_BYTE( "088-1016.bin", 0x0e0000, 0x010000, CRC(e83a9c99) SHA1(1d4093902133bb6da981f294e6947544c3564393) ) // == 136077-1016.200y
ROM_LOAD16_BYTE( "088-1015.bin", 0x0e0001, 0x010000, CRC(725806f3) SHA1(0fa4601465dc94f27c71db789ad625bbcd254169) ) // == 136077-4015.210y
- ROM_REGION( 0x60000, "mainpcb:user1", 0 ) /* 384k for object ROM */
- ROM_LOAD16_BYTE( "088-1017.bin", 0x00000, 0x10000, CRC(d92251e8) SHA1(deeeec54c4a61c3adf62f6b1b910135559090ee5) )
- ROM_LOAD16_BYTE( "088-1018.bin", 0x00001, 0x10000, CRC(11a0a8f5) SHA1(d4ccc83fc99331d741bc9b8027ef20d72e3ad71a) )
- ROM_LOAD16_BYTE( "088-1019.bin", 0x20000, 0x10000, CRC(5bb00676) SHA1(cad1cea8e43f9590fc71c00fab4eff0d447f9296) ) // == 136091-0019.2k (strtdriv)
- ROM_LOAD16_BYTE( "088-1020.bin", 0x20001, 0x10000, CRC(311cef99) SHA1(9c466aabad7e80581e477253ec6f2fd245f9b9fd) ) // == 136091-0020.2r (strtdriv)
- ROM_LOAD16_BYTE( "088-1021.bin", 0x40000, 0x10000, CRC(ce8e4886) SHA1(d29cd4761deb80ed179d0e503243739eebc0edb4) )
- ROM_LOAD16_BYTE( "088-1022.bin", 0x40001, 0x10000, CRC(4f1e1c5d) SHA1(3e72813129cae9e9bf084bfb1b747aa46b92591e) )
+ ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for object ROM */
+ ROM_LOAD16_BYTE( "088-1018.bin", 0x00000, 0x10000, CRC(11a0a8f5) SHA1(d4ccc83fc99331d741bc9b8027ef20d72e3ad71a) )
+ ROM_LOAD16_BYTE( "088-1017.bin", 0x00001, 0x10000, CRC(d92251e8) SHA1(deeeec54c4a61c3adf62f6b1b910135559090ee5) )
+ ROM_LOAD16_BYTE( "088-1020.bin", 0x20000, 0x10000, CRC(311cef99) SHA1(9c466aabad7e80581e477253ec6f2fd245f9b9fd) ) // == 136091-0020.2r (strtdriv)
+ ROM_LOAD16_BYTE( "088-1019.bin", 0x20001, 0x10000, CRC(5bb00676) SHA1(cad1cea8e43f9590fc71c00fab4eff0d447f9296) ) // == 136091-0019.2k (strtdriv)
+ ROM_LOAD16_BYTE( "088-1022.bin", 0x40000, 0x10000, CRC(4f1e1c5d) SHA1(3e72813129cae9e9bf084bfb1b747aa46b92591e) )
+ ROM_LOAD16_BYTE( "088-1021.bin", 0x40001, 0x10000, CRC(ce8e4886) SHA1(d29cd4761deb80ed179d0e503243739eebc0edb4) )
/* ----------------------- */
@@ -4141,13 +4142,13 @@ ROM_START( racedrivpan )
ROM_LOAD16_BYTE( "088-2016.bin", 0x0e0000, 0x010000, CRC(6a42b7e2) SHA1(2e0ff4b7e391106a976cb872f6311f6d35dca5b0) )
ROM_LOAD16_BYTE( "088-2015.bin", 0x0e0001, 0x010000, CRC(334e2a3b) SHA1(a19bfa7652845b9453c722091c773819ba248569) )
- ROM_REGION( 0x60000, "leftpcb:user1", 0 ) /* 384k for object ROM */
- ROM_LOAD16_BYTE( "088-1017.bin", 0x00000, 0x10000, CRC(d92251e8) SHA1(deeeec54c4a61c3adf62f6b1b910135559090ee5) )
- ROM_LOAD16_BYTE( "088-1018.bin", 0x00001, 0x10000, CRC(11a0a8f5) SHA1(d4ccc83fc99331d741bc9b8027ef20d72e3ad71a) )
- ROM_LOAD16_BYTE( "088-1019.bin", 0x20000, 0x10000, CRC(5bb00676) SHA1(cad1cea8e43f9590fc71c00fab4eff0d447f9296) ) // == 136091-0019.2k (strtdriv)
- ROM_LOAD16_BYTE( "088-1020.bin", 0x20001, 0x10000, CRC(311cef99) SHA1(9c466aabad7e80581e477253ec6f2fd245f9b9fd) ) // == 136091-0020.2r (strtdriv)
- ROM_LOAD16_BYTE( "088-1021.bin", 0x40000, 0x10000, CRC(ce8e4886) SHA1(d29cd4761deb80ed179d0e503243739eebc0edb4) )
- ROM_LOAD16_BYTE( "088-1022.bin", 0x40001, 0x10000, CRC(4f1e1c5d) SHA1(3e72813129cae9e9bf084bfb1b747aa46b92591e) )
+ ROM_REGION16_BE( 0x60000, "leftpcb:user1", 0 ) /* 384k for object ROM */
+ ROM_LOAD16_BYTE( "088-1018.bin", 0x00000, 0x10000, CRC(11a0a8f5) SHA1(d4ccc83fc99331d741bc9b8027ef20d72e3ad71a) )
+ ROM_LOAD16_BYTE( "088-1017.bin", 0x00001, 0x10000, CRC(d92251e8) SHA1(deeeec54c4a61c3adf62f6b1b910135559090ee5) )
+ ROM_LOAD16_BYTE( "088-1020.bin", 0x20000, 0x10000, CRC(311cef99) SHA1(9c466aabad7e80581e477253ec6f2fd245f9b9fd) ) // == 136091-0020.2r (strtdriv)
+ ROM_LOAD16_BYTE( "088-1019.bin", 0x20001, 0x10000, CRC(5bb00676) SHA1(cad1cea8e43f9590fc71c00fab4eff0d447f9296) ) // == 136091-0019.2k (strtdriv)
+ ROM_LOAD16_BYTE( "088-1022.bin", 0x40000, 0x10000, CRC(4f1e1c5d) SHA1(3e72813129cae9e9bf084bfb1b747aa46b92591e) )
+ ROM_LOAD16_BYTE( "088-1021.bin", 0x40001, 0x10000, CRC(ce8e4886) SHA1(d29cd4761deb80ed179d0e503243739eebc0edb4) )
ROM_REGION( 0x800, "leftpcb:200e", 0 ) // set to display left monitor, controls not calibrated with valid values (don't think they need to be)
ROM_LOAD( "leftpcb_200e", 0x000000, 0x000800, CRC(a618d02e) SHA1(cc1068fe4f6ec9a26b6e8fdbe05f4364a64559c1) )
@@ -4173,13 +4174,13 @@ ROM_START( racedrivpan )
ROM_LOAD16_BYTE( "088-2016.bin", 0x0e0000, 0x010000, CRC(6a42b7e2) SHA1(2e0ff4b7e391106a976cb872f6311f6d35dca5b0) )
ROM_LOAD16_BYTE( "088-2015.bin", 0x0e0001, 0x010000, CRC(334e2a3b) SHA1(a19bfa7652845b9453c722091c773819ba248569) )
- ROM_REGION( 0x60000, "rightpcb:user1", 0 ) /* 384k for object ROM */
- ROM_LOAD16_BYTE( "088-1017.bin", 0x00000, 0x10000, CRC(d92251e8) SHA1(deeeec54c4a61c3adf62f6b1b910135559090ee5) )
- ROM_LOAD16_BYTE( "088-1018.bin", 0x00001, 0x10000, CRC(11a0a8f5) SHA1(d4ccc83fc99331d741bc9b8027ef20d72e3ad71a) )
- ROM_LOAD16_BYTE( "088-1019.bin", 0x20000, 0x10000, CRC(5bb00676) SHA1(cad1cea8e43f9590fc71c00fab4eff0d447f9296) ) // == 136091-0019.2k (strtdriv)
- ROM_LOAD16_BYTE( "088-1020.bin", 0x20001, 0x10000, CRC(311cef99) SHA1(9c466aabad7e80581e477253ec6f2fd245f9b9fd) ) // == 136091-0020.2r (strtdriv)
- ROM_LOAD16_BYTE( "088-1021.bin", 0x40000, 0x10000, CRC(ce8e4886) SHA1(d29cd4761deb80ed179d0e503243739eebc0edb4) )
- ROM_LOAD16_BYTE( "088-1022.bin", 0x40001, 0x10000, CRC(4f1e1c5d) SHA1(3e72813129cae9e9bf084bfb1b747aa46b92591e) )
+ ROM_REGION16_BE( 0x60000, "rightpcb:user1", 0 ) /* 384k for object ROM */
+ ROM_LOAD16_BYTE( "088-1018.bin", 0x00000, 0x10000, CRC(11a0a8f5) SHA1(d4ccc83fc99331d741bc9b8027ef20d72e3ad71a) )
+ ROM_LOAD16_BYTE( "088-1017.bin", 0x00001, 0x10000, CRC(d92251e8) SHA1(deeeec54c4a61c3adf62f6b1b910135559090ee5) )
+ ROM_LOAD16_BYTE( "088-1020.bin", 0x20000, 0x10000, CRC(311cef99) SHA1(9c466aabad7e80581e477253ec6f2fd245f9b9fd) ) // == 136091-0020.2r (strtdriv)
+ ROM_LOAD16_BYTE( "088-1019.bin", 0x20001, 0x10000, CRC(5bb00676) SHA1(cad1cea8e43f9590fc71c00fab4eff0d447f9296) ) // == 136091-0019.2k (strtdriv)
+ ROM_LOAD16_BYTE( "088-1022.bin", 0x40000, 0x10000, CRC(4f1e1c5d) SHA1(3e72813129cae9e9bf084bfb1b747aa46b92591e) )
+ ROM_LOAD16_BYTE( "088-1021.bin", 0x40001, 0x10000, CRC(ce8e4886) SHA1(d29cd4761deb80ed179d0e503243739eebc0edb4) )
ROM_REGION( 0x800, "rightpcb:200e", 0 ) // set to display right monitor, controls not calibrated with valid values (don't think they need to be)
ROM_LOAD( "rightpcb_200e", 0x000000, 0x000800, CRC(6f1b7094) SHA1(6194a5b99aebe43f02c8d267290207b32c5bdbbd) )
@@ -4462,13 +4463,13 @@ ROM_START( strtdriv )
ROM_REGION( 0x10000 + 0x10000, "mainpcb:asic65:asic65cpu", 0 ) /* dummy region for ADSP 2105 */
ROM_LOAD( "136091-0033.10j", 0x000000, 0x010000, CRC(57504ab6) SHA1(ec8361b7da964c07ca0da48a87537badc3986fe0) )
- ROM_REGION( 0x60000, "mainpcb:user1", 0 ) /* 384k for object ROM */
- ROM_LOAD16_BYTE( "136091-0017.2lm", 0x00000, 0x10000, CRC(b0454074) SHA1(9530ea1ef215116da1f0843776fa7a6b4637049d) )
- ROM_LOAD16_BYTE( "136091-0018.2t", 0x00001, 0x10000, CRC(ef432aa8) SHA1(56bce13c111db7874c9b669d479f6ef47976ee14) )
- ROM_LOAD16_BYTE( "136091-0019.2k", 0x20000, 0x10000, CRC(5bb00676) SHA1(cad1cea8e43f9590fc71c00fab4eff0d447f9296) )
- ROM_LOAD16_BYTE( "136091-0020.2r", 0x20001, 0x10000, CRC(311cef99) SHA1(9c466aabad7e80581e477253ec6f2fd245f9b9fd) )
- ROM_LOAD16_BYTE( "136091-0021.2j", 0x40000, 0x10000, CRC(14f2caae) SHA1(ff40dbced58dc910a2b5825b846a5e52933cb8fc) )
- ROM_LOAD16_BYTE( "136091-0022.2p", 0x40001, 0x10000, CRC(bc4dd071) SHA1(ca182451a0a18d343dce1be56090d51950d43906) )
+ ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for object ROM */
+ ROM_LOAD16_BYTE( "136091-0018.2t", 0x00000, 0x10000, CRC(ef432aa8) SHA1(56bce13c111db7874c9b669d479f6ef47976ee14) )
+ ROM_LOAD16_BYTE( "136091-0017.2lm", 0x00001, 0x10000, CRC(b0454074) SHA1(9530ea1ef215116da1f0843776fa7a6b4637049d) )
+ ROM_LOAD16_BYTE( "136091-0020.2r", 0x20000, 0x10000, CRC(311cef99) SHA1(9c466aabad7e80581e477253ec6f2fd245f9b9fd) )
+ ROM_LOAD16_BYTE( "136091-0019.2k", 0x20001, 0x10000, CRC(5bb00676) SHA1(cad1cea8e43f9590fc71c00fab4eff0d447f9296) )
+ ROM_LOAD16_BYTE( "136091-0022.2p", 0x40000, 0x10000, CRC(bc4dd071) SHA1(ca182451a0a18d343dce1be56090d51950d43906) )
+ ROM_LOAD16_BYTE( "136091-0021.2j", 0x40001, 0x10000, CRC(14f2caae) SHA1(ff40dbced58dc910a2b5825b846a5e52933cb8fc) )
ROM_REGION16_BE( 0x50000, "mainpcb:user3", 0 ) /* 256k for DSK ROMs + 64k for RAM */
ROM_LOAD16_BYTE( "136091-0026.30e", 0x000000, 0x020000, CRC(47705109) SHA1(fa40275b71b74be8591282d2fba4215b98fc29c9) )
@@ -4518,13 +4519,13 @@ ROM_START( hdrivair )
ROM_REGION( 0x10000 + 0x10000, "mainpcb:asic65:asic65cpu", 0 ) /* dummy region for ADSP 2105 */
ROM_LOAD( "sboot.bin", 0x000000, 0x010000, CRC(cde4d010) SHA1(853f4b813ff70fe74cd87e92131c46fca045610d) )
- ROM_REGION( 0xc0000, "mainpcb:user1", 0 ) /* 768k for object ROM */
- ROM_LOAD16_BYTE( "obj0l.bin", 0x00000, 0x20000, CRC(1f835f2e) SHA1(9d3419f2c1aa65ddfe9ace4e70ca1212d634afbf) )
- ROM_LOAD16_BYTE( "obj0h.bin", 0x00001, 0x20000, CRC(c321ab55) SHA1(e095e40bb1ebda7c9ff04a5086c10ab41dec2f16) )
- ROM_LOAD16_BYTE( "obj1l.bin", 0x40000, 0x20000, CRC(3d65f264) SHA1(e9232f5bf439bf4e1cf99cc7e81b7f9550563f15) )
- ROM_LOAD16_BYTE( "obj1h.bin", 0x40001, 0x20000, CRC(2c06b708) SHA1(daa16f727f2f500172f88b69d6931aa0fa13641b) )
- ROM_LOAD16_BYTE( "obj2l.bin", 0x80000, 0x20000, CRC(b206cc7e) SHA1(17f05e906c41b804fe99dd6cd8acbade919a6a10) )
- ROM_LOAD16_BYTE( "obj2h.bin", 0x80001, 0x20000, CRC(a666e98c) SHA1(90e380ff87538c7d557cf005a4a5bcedc250eb72) )
+ ROM_REGION16_BE( 0xc0000, "mainpcb:user1", 0 ) /* 768k for object ROM */
+ ROM_LOAD16_BYTE( "obj0h.bin", 0x00000, 0x20000, CRC(c321ab55) SHA1(e095e40bb1ebda7c9ff04a5086c10ab41dec2f16) )
+ ROM_LOAD16_BYTE( "obj0l.bin", 0x00001, 0x20000, CRC(1f835f2e) SHA1(9d3419f2c1aa65ddfe9ace4e70ca1212d634afbf) )
+ ROM_LOAD16_BYTE( "obj1h.bin", 0x40000, 0x20000, CRC(2c06b708) SHA1(daa16f727f2f500172f88b69d6931aa0fa13641b) )
+ ROM_LOAD16_BYTE( "obj1l.bin", 0x40001, 0x20000, CRC(3d65f264) SHA1(e9232f5bf439bf4e1cf99cc7e81b7f9550563f15) )
+ ROM_LOAD16_BYTE( "obj2h.bin", 0x80000, 0x20000, CRC(a666e98c) SHA1(90e380ff87538c7d557cf005a4a5bcedc250eb72) )
+ ROM_LOAD16_BYTE( "obj2l.bin", 0x80001, 0x20000, CRC(b206cc7e) SHA1(17f05e906c41b804fe99dd6cd8acbade919a6a10) )
ROM_REGION16_BE( 0x140000, "mainpcb:user3", 0 )/* 1MB for DSK ROMs + 256k for RAM */
ROM_LOAD16_BYTE( "dsk2phi.bin", 0x00000, 0x80000, CRC(71c268e0) SHA1(c089248a7dfadf2eba3134fe40ebb777c115a886) )
@@ -4581,13 +4582,13 @@ ROM_START( hdrivairp )
ROM_REGION( 0x10000 + 0x10000, "mainpcb:asic65:asic65cpu", 0 ) /* dummy region for ADSP 2105 */
ROM_LOAD( "xboota.bin", 0x10000 + 0x00000, 0x10000, CRC(d9c49901) SHA1(9f90ae3a47eb1ef00c3ec3661f60402c2eae2108) )
- ROM_REGION( 0xc0000, "mainpcb:user1", 0 ) /* 768k for object ROM */
- ROM_LOAD16_BYTE( "objects.0l", 0x00000, 0x20000, CRC(3c9e9078) SHA1(f1daf32117236401f3cb97f332708632003e55f8) )
- ROM_LOAD16_BYTE( "objects.0h", 0x00001, 0x20000, CRC(4480dbae) SHA1(6a455173c38e80093f58bdc322cffcf25e70b6ae) )
- ROM_LOAD16_BYTE( "objects.1l", 0x40000, 0x20000, CRC(700bd978) SHA1(5cd63d4eee00d90fe29fb9697b6a0ea6b86704ae) )
- ROM_LOAD16_BYTE( "objects.1h", 0x40001, 0x20000, CRC(f613adaf) SHA1(9b9456e144a48fb73c5e084b33345667eed4905e) )
- ROM_LOAD16_BYTE( "objects.2l", 0x80000, 0x20000, CRC(e3b512f0) SHA1(080c5a21cb76edcb55d1c2488e9d91cf29cb0665) )
- ROM_LOAD16_BYTE( "objects.2h", 0x80001, 0x20000, CRC(3f83742b) SHA1(4b6e0134a806bcc9bd56432737047f86d0a16424) )
+ ROM_REGION16_BE( 0xc0000, "mainpcb:user1", 0 ) /* 768k for object ROM */
+ ROM_LOAD16_BYTE( "objects.0h", 0x00000, 0x20000, CRC(4480dbae) SHA1(6a455173c38e80093f58bdc322cffcf25e70b6ae) )
+ ROM_LOAD16_BYTE( "objects.0l", 0x00001, 0x20000, CRC(3c9e9078) SHA1(f1daf32117236401f3cb97f332708632003e55f8) )
+ ROM_LOAD16_BYTE( "objects.1h", 0x40000, 0x20000, CRC(f613adaf) SHA1(9b9456e144a48fb73c5e084b33345667eed4905e) )
+ ROM_LOAD16_BYTE( "objects.1l", 0x40001, 0x20000, CRC(700bd978) SHA1(5cd63d4eee00d90fe29fb9697b6a0ea6b86704ae) )
+ ROM_LOAD16_BYTE( "objects.2h", 0x80000, 0x20000, CRC(3f83742b) SHA1(4b6e0134a806bcc9bd56432737047f86d0a16424) )
+ ROM_LOAD16_BYTE( "objects.2l", 0x80001, 0x20000, CRC(e3b512f0) SHA1(080c5a21cb76edcb55d1c2488e9d91cf29cb0665) )
ROM_REGION16_BE( 0x140000, "mainpcb:user3", 0 )/* 1MB for DSK ROMs + 256k for RAM */
ROM_LOAD16_BYTE( "dskpics.hi", 0x00000, 0x80000, CRC(eaa88101) SHA1(ed0ebf8a9a9514d810242b9b552126f6717f9e25) )
diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp
index 3bc28b5a538..a246450d98e 100644
--- a/src/mame/drivers/hh_hmcs40.cpp
+++ b/src/mame/drivers/hh_hmcs40.cpp
@@ -36,7 +36,7 @@
*29 HD38800B 1984, Tomy Portable 6000 Bombman
*35 HD38800B 1983, Bandai Gundam vs Gelgoog Zaku
@43 HD38800B 1983, Bandai Dokodemo Dorayaki Doraemon (PT-412)
- @52 HD38800B 1983, Bandai Ultra Man (PT-424)
+ @52 HD38800B 1983, Bandai Ultraman Monster Battle (PT-424)
@09 HD38820A 1980, Mattel World Championship Baseball
@13 HD38820A 1981, Entex Galaxian 2
@@ -87,6 +87,7 @@
#include "sound/speaker.h"
// internal artwork
+#include "rendlay.h"
#include "pairmtch.lh"
#include "hh_hmcs40_test.lh" // common test-layout - use external artwork
@@ -1519,7 +1520,7 @@ MACHINE_CONFIG_END
/***************************************************************************
- Bandai Ultra Man (FL LSI Game Push Up) (manufactured in Japan)
+ Bandai Ultraman Monster Battle (FL LSI Game Push Up) (manufactured in Japan)
* PCB label Kaken Corp. PT-424 FL Ultra Man
* Hitachi HD38800B52 MCU
* cyan/red/blue VFD display NEC FIP8BM25T no. 21-8 2
@@ -1549,7 +1550,7 @@ WRITE8_MEMBER(bultrman_state::plate_w)
// update display
UINT8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
- UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,16,15,14,13,12,11,2,10,9,8,7,6,5,4,3,0,1);
+ UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,0,18,17,16,15,14,13,12,3,11,10,9,8,7,6,5,4,1,2);
display_matrix(18, 8, plate, grid);
}
@@ -1584,7 +1585,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( bultrman, bultrman_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
+ MCFG_CPU_ADD("maincpu", HD38800, 350000) // approximation
MCFG_HMCS40_WRITE_R_CB(0, WRITE8(bultrman_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(bultrman_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(bultrman_state, plate_w))
@@ -2070,7 +2071,12 @@ static MACHINE_CONFIG_START( cdkong, cdkong_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("speaker_decay", cdkong_state, speaker_decay_sim, attotime::from_msec(CDKONG_SPEAKER_DECAY))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
+
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(559, 998)
+ MCFG_SCREEN_VISIBLE_AREA(0, 558, 0, 997)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -3960,6 +3966,9 @@ ROM_START( cdkong )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a45", 0x0000, 0x1000, CRC(196b8070) SHA1(da85d1eb4b048b77f3168630662ab94ec9baa262) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 359199, "svg", 0)
+ ROM_LOAD( "cdkong.svg", 0, 359199, CRC(ba159fd5) SHA1(3188e2ed3234f39ac9ee93a485a7e73314bc3457) ) // version 8 april 2016. by Rik, kevtris
ROM_END
@@ -4093,12 +4102,12 @@ CONS( 1983, zackman, 0, 0, zackman, zackman, driver_device, 0, "Banda
CONS( 1983, bpengo, 0, 0, bpengo, bpengo, driver_device, 0, "Bandai", "Pengo (Bandai)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
CONS( 1983, bbtime, 0, 0, bbtime, bbtime, driver_device, 0, "Bandai", "Burger Time (Bandai)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
CONS( 1983, bdoramon, 0, 0, bdoramon, bdoramon, driver_device, 0, "Bandai", "Dokodemo Dorayaki Doraemon", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1983, bultrman, 0, 0, bultrman, bultrman, driver_device, 0, "Bandai", "Ultra Man (Bandai)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
+CONS( 1983, bultrman, 0, 0, bultrman, bultrman, driver_device, 0, "Bandai", "Ultraman Monster Battle", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
CONS( 1984, machiman, 0, 0, machiman, machiman, driver_device, 0, "Bandai", "Machine Man", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
CONS( 1984, pairmtch, 0, 0, pairmtch, pairmtch, driver_device, 0, "Bandai", "Pair Match", MACHINE_SUPPORTS_SAVE )
CONS( 1981, alnattck, 0, 0, alnattck, alnattck, driver_device, 0, "Coleco", "Alien Attack", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1982, cdkong, 0, 0, cdkong, cdkong, driver_device, 0, "Coleco", "Donkey Kong (Coleco)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_IMPERFECT_SOUND )
+CONS( 1982, cdkong, 0, 0, cdkong, cdkong, driver_device, 0, "Coleco", "Donkey Kong (Coleco)", MACHINE_SUPPORTS_SAVE )
CONS( 1982, cgalaxn, 0, 0, cgalaxn, cgalaxn, driver_device, 0, "Coleco", "Galaxian (Coleco)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_IMPERFECT_SOUND )
CONS( 1981, cpacman, 0, 0, cpacman, cpacman, driver_device, 0, "Coleco", "Pac-Man (Coleco, Rev. 29)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
CONS( 1981, cpacmanr1, cpacman, 0, cpacman, cpacman, driver_device, 0, "Coleco", "Pac-Man (Coleco, Rev. 28)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp
index 0ae16c2b1ef..7a3e1d622a1 100644
--- a/src/mame/drivers/hh_sm510.cpp
+++ b/src/mame/drivers/hh_sm510.cpp
@@ -11,6 +11,7 @@
#include "emu.h"
#include "cpu/sm510/sm510.h"
+#include "cpu/sm510/kb1013vk1-2.h"
#include "sound/speaker.h"
#include "hh_sm510_test.lh" // common test-layout - use external artwork
@@ -233,6 +234,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Konami Teenage Mutant Ninja Turtles
+ * PCB label BH005
* Sharp SM511 under epoxy (die label KMS 73B, KMS 774)
***************************************************************************/
@@ -257,10 +259,12 @@ static INPUT_PORTS_START( ktmnt )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
PORT_START("IN.1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Game Select")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Sound")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("On/Start")
+ //Wouldn't be better if IPT_START for "On/Start" was used???
+ //Well, this here is a very preliminary driver, nothing final yet. How about some tea???
PORT_START("IN.2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
@@ -294,6 +298,119 @@ MACHINE_CONFIG_END
/***************************************************************************
+ Konami Gradius
+ * PCB label BH004
+ * Sharp SM511 under epoxy (die label KMS 73B, KMS 774)
+
+***************************************************************************/
+
+class kgradius_state : public hh_sm510_state
+{
+public:
+ kgradius_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_sm510_state(mconfig, type, tag)
+ {
+ m_inp_lines = 2;
+ }
+};
+
+// config
+
+static INPUT_PORTS_START( kgradius )
+ PORT_START("IN.0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Sound")
+
+ PORT_START("IN.1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( kgradius, kgradius_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", SM511, XTAL_32_768kHz)
+ MCFG_SM510_WRITE_SEGA_CB(WRITE16(hh_sm510_state, lcd_segment_w))
+ MCFG_SM510_WRITE_SEGB_CB(WRITE16(hh_sm510_state, lcd_segment_w))
+ MCFG_SM510_WRITE_SEGBS_CB(WRITE16(hh_sm510_state, lcd_segment_w))
+ MCFG_SM510_READ_K_CB(READ8(hh_sm510_state, input_r))
+ MCFG_SM510_WRITE_S_CB(WRITE8(hh_sm510_state, input_w))
+ MCFG_SM510_WRITE_R_CB(WRITE8(hh_sm510_state, sm511_melody_w))
+
+ MCFG_DEFAULT_LAYOUT(layout_hh_sm510_test)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
+ Konami Lone Ranger
+ * PCB label BH009
+ * Sharp SM511 under epoxy (die label KMS 73B, KMS 781)
+
+***************************************************************************/
+
+class kloneran_state : public hh_sm510_state
+{
+public:
+ kloneran_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_sm510_state(mconfig, type, tag)
+ {
+ m_inp_lines = 2;
+ }
+};
+
+// config
+
+static INPUT_PORTS_START( kloneran )
+ PORT_START("IN.0") // S3?
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+
+ PORT_START("IN.1") // S2?
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Sound")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Pause")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( kloneran, kloneran_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", SM511, XTAL_32_768kHz)
+ MCFG_SM510_WRITE_SEGA_CB(WRITE16(hh_sm510_state, lcd_segment_w))
+ MCFG_SM510_WRITE_SEGB_CB(WRITE16(hh_sm510_state, lcd_segment_w))
+ MCFG_SM510_WRITE_SEGBS_CB(WRITE16(hh_sm510_state, lcd_segment_w))
+ MCFG_SM510_READ_K_CB(READ8(hh_sm510_state, input_r))
+ MCFG_SM510_WRITE_S_CB(WRITE8(hh_sm510_state, input_w))
+ MCFG_SM510_WRITE_R_CB(WRITE8(hh_sm510_state, sm511_melody_w))
+
+ MCFG_DEFAULT_LAYOUT(layout_hh_sm510_test)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+/***************************************************************************
+
Nintendo Game & Watch: Mickey & Donald (model DM-53)
* PCB label DM-53
* Sharp SM510 label DM-53 (die label CMS54C, CMS565)
@@ -361,6 +478,46 @@ MACHINE_CONFIG_END
/***************************************************************************
+ IM-02 Nu, Pogodi!
+ * KB1013VK1-2, die label V2-2 VK1-2
+
+***************************************************************************/
+
+class nupogodi_state : public hh_sm510_state
+{
+public:
+ nupogodi_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_sm510_state(mconfig, type, tag)
+ {
+ m_inp_lines = 2;
+ }
+};
+
+// handlers
+
+
+// config
+
+static INPUT_PORTS_START( nupogodi )
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( nupogodi, nupogodi_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", KB1013VK12, XTAL_32_768kHz)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
Game driver(s)
***************************************************************************/
@@ -373,19 +530,37 @@ ROM_END
ROM_START( ktmnt ) // except for filler/unused bytes, ROM listing in patent US5150899 "BH005 TMNT" prog/music is same
ROM_REGION( 0x1000, "maincpu", 0 )
- ROM_LOAD( "kms73b_774.prog", 0x0000, 0x1000, CRC(a1064f87) SHA1(92156c35fbbb414007ee6804fe635128a741d5f1) )
+ ROM_LOAD( "kms73b_kms774.prog", 0x0000, 0x1000, CRC(a1064f87) SHA1(92156c35fbbb414007ee6804fe635128a741d5f1) )
ROM_REGION( 0x100, "maincpu:music", 0 )
- ROM_LOAD( "kms73b_774.music", 0x000, 0x100, CRC(8270d626) SHA1(bd91ca1d5cd7e2a62eef05c0033b19dcdbe441ca) )
+ ROM_LOAD( "kms73b_kms774.music", 0x000, 0x100, CRC(8270d626) SHA1(bd91ca1d5cd7e2a62eef05c0033b19dcdbe441ca) )
ROM_END
ROM_START( kcontra ) // except for filler/unused bytes, ROM listing in patent US5120057 "BH002 C (Contra)" prog/music is same
ROM_REGION( 0x1000, "maincpu", 0 )
- ROM_LOAD( "kms73b_774.prog", 0x0000, 0x1000, CRC(bf834877) SHA1(055dd56ec16d63afba61ab866481fd9c029fb54d) )
+ ROM_LOAD( "kms73b_kms773.prog", 0x0000, 0x1000, CRC(bf834877) SHA1(055dd56ec16d63afba61ab866481fd9c029fb54d) )
ROM_REGION( 0x100, "maincpu:music", 0 )
- ROM_LOAD( "kms73b_774.music", 0x000, 0x100, CRC(23d02b99) SHA1(703938e496db0eeacd14fe7605d4b5c39e0a5bc8) )
+ ROM_LOAD( "kms73b_kms773.music", 0x000, 0x100, CRC(23d02b99) SHA1(703938e496db0eeacd14fe7605d4b5c39e0a5bc8) )
+ROM_END
+
+
+ROM_START( kgradius )
+ ROM_REGION( 0x1000, "maincpu", 0 )
+ ROM_LOAD( "kms73b_kms771.prog", 0x0000, 0x1000, CRC(830c2afc) SHA1(bb9ebd4e52831cc02cd92dd4b37675f34cf37b8c) )
+
+ ROM_REGION( 0x100, "maincpu:music", 0 )
+ ROM_LOAD( "kms73b_kms771.music", 0x000, 0x100, CRC(4c586b73) SHA1(14c5ab2898013a577f678970a648c374749cc66d) )
+ROM_END
+
+
+ROM_START( kloneran )
+ ROM_REGION( 0x1000, "maincpu", 0 )
+ ROM_LOAD( "kms73b_kms781.prog", 0x0000, 0x1000, CRC(52b9735f) SHA1(06c5ef6e7e781b1176d4c1f2445f765ccf18b3f7) )
+
+ ROM_REGION( 0x100, "maincpu:music", 0 )
+ ROM_LOAD( "kms73b_kms781.music", 0x000, 0x100, CRC(a393de36) SHA1(55089f04833ccb318524ab2b584c4817505f4019) )
ROM_END
@@ -395,10 +570,20 @@ ROM_START( gnwmndon )
ROM_END
+ROM_START( nupogodi )
+ ROM_REGION( 0x0800, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "nupogodi.bin", 0x0000, 0x0740, CRC(cb820c32) SHA1(7e94fc255f32db725d5aa9e196088e490c1a1443) )
+ROM_END
+
+
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
CONS( 1989, kcontra, 0, 0, ktmnt, ktopgun, driver_device, 0, "Konami", "Contra (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
CONS( 1989, ktopgun, 0, 0, ktopgun, ktopgun, driver_device, 0, "Konami", "Top Gun (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
CONS( 1989, ktmnt, 0, 0, ktmnt, ktmnt, driver_device, 0, "Konami", "Teenage Mutant Ninja Turtles (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
+CONS( 1989, kgradius, 0, 0, kgradius, kgradius, driver_device, 0, "Konami", "Gradius (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
+CONS( 1989, kloneran, 0, 0, kloneran, kloneran, driver_device, 0, "Konami", "Lone Ranger (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
CONS( 1982, gnwmndon, 0, 0, gnwmndon, gnwmndon, driver_device, 0, "Nintendo", "Game & Watch: Mickey & Donald", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
+
+CONS( 1984, nupogodi, 0, 0, nupogodi, nupogodi, driver_device, 0, "Elektronika", "Nu, pogodi!", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp
index d3411390e2b..2ea7f8a51ff 100644
--- a/src/mame/drivers/hh_ucom4.cpp
+++ b/src/mame/drivers/hh_ucom4.cpp
@@ -46,6 +46,7 @@
@206 uPD553C 1982, Epoch Dracula
@209 uPD553C 1982, Tomy Caveman (TN-12)
@258 uPD553C 1984, Tomy Alien Chase (TN-16)
+ *296 uPD553C 1984, Epoch Computer Beam Gun Professional
*511 uPD557LC?1980, Gakken Game Robot 9/Mego Fabulous Fred
@512 uPD557LC 1980, Castle Toy Tactix
diff --git a/src/mame/drivers/himesiki.cpp b/src/mame/drivers/himesiki.cpp
index f21891f4500..1ebc2696426 100644
--- a/src/mame/drivers/himesiki.cpp
+++ b/src/mame/drivers/himesiki.cpp
@@ -9,9 +9,10 @@ Android (C) 198? Nasco
*****************************************************************************/
-// Note, another VERY different version of Android also exists, see https://www.youtube.com/watch?v=5rtqZqMBACI (uploaded by Chris Hardy)
-// it is unclear if that version is on the same hardware as this
// Android uses PCBS MK-P102 and MK-P101 ONLY, there is no MK-P103 (extra sprites used on Himeshikibu)
+// Real hardware video of parent set can be seen at https://www.youtube.com/watch?v=5rtqZqMBACI (uploaded by Chris Hardy)
+// for some reason music fails to play the 2nd attract loop in MAME?
+
/*
@@ -235,7 +236,7 @@ static INPUT_PORTS_START( himesiki )
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
-static INPUT_PORTS_START( androidp )
+static INPUT_PORTS_START( androidpo )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
@@ -320,6 +321,38 @@ static INPUT_PORTS_START( androidp )
INPUT_PORTS_END
+static INPUT_PORTS_START( androidp )
+ PORT_INCLUDE(androidpo)
+
+ PORT_MODIFY("DSW1")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
+
+ PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x08, "1" )
+ PORT_DIPSETTING( 0x0c, "2" )
+ PORT_DIPSETTING( 0x04, "3" )
+ PORT_DIPSETTING( 0x00, "4" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+
+ PORT_MODIFY("DSW2")
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
+
+INPUT_PORTS_END
/****************************************************************************/
@@ -417,13 +450,13 @@ static MACHINE_CONFIG_START( himesiki, himesiki_state )
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", himesiki)
- MCFG_PALETTE_ADD("palette", 1024)
+ MCFG_PALETTE_ADD_INIT_BLACK("palette", 1024)
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("ym2203", YM2203, MCLK/4)
+ MCFG_SOUND_ADD("ym2203", YM2203, CLK2/4) // ??
MCFG_YM2203_IRQ_HANDLER(INPUTLINE("sub", 0))
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SOUND_ROUTE(1, "mono", 0.10)
@@ -469,7 +502,7 @@ ROM_END
-ROM_START( androidp )
+ROM_START( androidpo )
ROM_REGION( 0x08000, "maincpu", 0 )
ROM_LOAD( "MITSUBISHI_A01.toppcb.m5l27256k.k1.BIN", 0x00000, 0x08000, CRC(25ab85eb) SHA1(e1fab149c83ff880b119258206d5818f3db641c5) )
@@ -496,7 +529,34 @@ ROM_START( androidp )
// + 2 undumped PLDs
ROM_END
+ROM_START( androidp )
+ ROM_REGION( 0x08000, "maincpu", 0 )
+ ROM_LOAD( "ANDR1.BIN", 0x00000, 0x08000, CRC(fff04130) SHA1(9bdafa8b311cc5d0851b04df3c6dd16eb087a5dd) )
+
+ ROM_REGION( 0x10000, "banks", 0 )
+ ROM_LOAD( "ANDR3.BIN", 0x00000, 0x04000, CRC(112d5123) SHA1(653109eae7b58d9dcb8892ea9aca17427f14c145) )
+ ROM_CONTINUE( 0x08000, 0x04000)
+
+ ROM_REGION( 0x18000, "sub", 0 )
+ ROM_LOAD( "ANDR4.BIN", 0x00000, 0x08000, CRC(65f5e98b) SHA1(69f979d653695413a1c503c402d4bf5ffcfb6e5d) )
+
+ ROM_REGION( 0x10000, "bgtiles", 0 )
+ ROM_LOAD( "ANDR5.BIN", 0x00000, 0x10000, CRC(0a0b44c0) SHA1(8d359b802c7dee5faea9464f06b672fd401799cf) )
+
+ ROM_REGION( 0x20000, "sprites", 0 )
+ ROM_LOAD16_BYTE( "ANDR6.BIN", 0x00000, 0x10000, CRC(122b7dd1) SHA1(5dffd2b97c8222afc98552513b84a91d6127f41b) )
+ ROM_LOAD16_BYTE( "ANDR7.BIN", 0x00001, 0x10000, CRC(fc0f9234) SHA1(496a918cc1f4d0e7191a49cc43c51fbd71e0bdf5) )
+
+ ROM_REGION( 0x20000, "spr_p103a", ROMREGION_ERASEFF )
+ // there's no P103A PCB for this on Android
+
+
+ // + 2 undumped PLDs (?)
+ROM_END
+
-GAME( 1989, himesiki, 0, himesiki, himesiki, driver_device, 0, ROT90, "Hi-Soft", "Himeshikibu (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, himesiki, 0, himesiki, himesiki, driver_device, 0, ROT90, "Hi-Soft", "Himeshikibu (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 198?, androidp, 0, himesiki, androidp, driver_device, 0, ROT90, "Nasco", "Android (early build?)", MACHINE_SUPPORTS_SAVE )
+// the game changed significantly between these 2 versions
+GAME( 198?, androidp, 0, himesiki, androidp, driver_device, 0, ROT90, "Nasco", "Android (prototype, later build)", MACHINE_SUPPORTS_SAVE )
+GAME( 198?, androidpo, androidp, himesiki, androidpo, driver_device, 0, ROT90, "Nasco", "Android (prototype, early build)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/hornet.cpp b/src/mame/drivers/hornet.cpp
index b1df15c8419..bd99a6356fe 100644
--- a/src/mame/drivers/hornet.cpp
+++ b/src/mame/drivers/hornet.cpp
@@ -1014,10 +1014,7 @@ static MACHINE_CONFIG_START( hornet, hornet_state )
MCFG_PALETTE_ADD("palette", 65536)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
- MCFG_K037122_ADD("k037122_1", "screen", 0)
- MCFG_K037122_GFXDECODE("gfxdecode")
+ MCFG_K037122_ADD("k037122_1", "screen")
MCFG_K037122_PALETTE("palette")
MCFG_K056800_ADD("k056800", XTAL_16_9344MHz)
@@ -1067,12 +1064,10 @@ static MACHINE_CONFIG_DERIVED( hornet_2board, hornet )
MCFG_DEVICE_REMOVE("k037122_1")
- MCFG_K037122_ADD("k037122_1", "lscreen", 0)
- MCFG_K037122_GFXDECODE("gfxdecode")
+ MCFG_K037122_ADD("k037122_1", "lscreen")
MCFG_K037122_PALETTE("palette")
- MCFG_K037122_ADD("k037122_2", "rscreen", 1)
- MCFG_K037122_GFXDECODE("gfxdecode")
+ MCFG_K037122_ADD("k037122_2", "rscreen")
MCFG_K037122_PALETTE("palette")
MCFG_DEVICE_REMOVE("voodoo0")
diff --git a/src/mame/drivers/hp9845.cpp b/src/mame/drivers/hp9845.cpp
index 1387432ea85..4890b0ad92e 100644
--- a/src/mame/drivers/hp9845.cpp
+++ b/src/mame/drivers/hp9845.cpp
@@ -44,7 +44,10 @@
// Base address of video buffer
#define VIDEO_BUFFER_BASE 0x17000
-#define MAX_WORD_PER_ROW 600
+// For test "B" of alpha video to succeed this must be < 234
+// Basically "B" test is designed to intentionally prevent line buffer to be filled so that display is blanked
+// from 2nd row on. This in turn prevents "BAD" text to be visible on screen.
+#define MAX_WORD_PER_ROW 220
#define VIDEO_CHAR_WIDTH 9
#define VIDEO_CHAR_HEIGHT 15
@@ -412,10 +415,14 @@ void hp9845b_state::video_render_buff(unsigned line_in_row, bool buff_idx)
m_video_blanked = true;
}
+ const rgb_t *palette = m_palette->palette()->entry_list_raw();
+
if (m_video_blanked) {
- // TODO: blank scanline
+ // Blank scanline
+ for (unsigned i = 0; i < (80 * 9); i++) {
+ m_bitmap.pix32(m_video_scanline , i) = palette[ 0 ];
+ }
} else {
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
bool cursor_line = line_in_row == 12;
bool ul_line = line_in_row == 14;
bool cursor_blink = BIT(m_video_frame , 3);
diff --git a/src/mame/drivers/hvyunit.cpp b/src/mame/drivers/hvyunit.cpp
index 21ec09dfe4b..a8446a8537c 100644
--- a/src/mame/drivers/hvyunit.cpp
+++ b/src/mame/drivers/hvyunit.cpp
@@ -676,7 +676,6 @@ static MACHINE_CONFIG_START( hvyunit, hvyunit_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/igs009.cpp b/src/mame/drivers/igs009.cpp
index 78e1308068f..638a3260df2 100644
--- a/src/mame/drivers/igs009.cpp
+++ b/src/mame/drivers/igs009.cpp
@@ -18,11 +18,11 @@ NVRAM : Battery for main RAM
---------------------------------------------------------------------------
Year Game Manufacturer Notes
---------------------------------------------------------------------------
-1997 Jingle Bell (US, V157) IGS NMI issues...
-1997 Jingle Bell (EU, V155) IGS NMI issues...
-1997 Jingle Bell (EU, V153) IGS NMI issues...
-1995 Jingle Bell (EU, V141) IGS Working
-1995? Jingle Bell (Italy, V133I) IGS Working
+1997 Jingle Bell (US, V157US) IGS patched protection
+1997 Jingle Bell (EU, V155UE) IGS patched protection
+1997 Jingle Bell (EU, V153UE) IGS patched protection
+1995 Jingle Bell (EU, V141UE) IGS patched protection
+1995? Jingle Bell (Italy, V133I) IGS patched protection
1998 Grand Prix '98 Romtec 1 reel gfx rom is bad
---------------------------------------------------------------------------
@@ -35,7 +35,6 @@ Year Game Manufacturer Notes
#include "sound/okim6295.h"
#include "machine/nvram.h"
-
class igs009_state : public driver_device
{
public:
@@ -106,7 +105,10 @@ public:
TILE_GET_INFO_MEMBER(get_gp98_reel4_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
+ void decrypt_jingbell();
DECLARE_DRIVER_INIT(jingbell);
+ DECLARE_DRIVER_INIT(jingbelli);
+
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
@@ -314,7 +316,6 @@ UINT32 igs009_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
int startclipmin = 0;
const rectangle &visarea = screen.visible_area();
-
for (i= 0;i < 0x80;i++)
{
m_reel1_tilemap->set_scrolly(i, m_bg_scroll[i]*2);
@@ -323,9 +324,6 @@ UINT32 igs009_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
m_reel4_tilemap->set_scrolly(i, m_bg_scroll[i+0x180]*2);
}
-
-
-
for (zz=0;zz<0x80-8;zz++) // -8 because of visible area (2*8 = 16)
{
rectangle clip;
@@ -395,9 +393,9 @@ WRITE8_MEMBER(igs009_state::nmi_and_coins_w)
machine().bookkeeping().coin_counter_w(0, data & 0x01); // coin_a
machine().bookkeeping().coin_counter_w(1, data & 0x04); // coin_c
machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in
- machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin m_out mech
+ machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin out mech
- output().set_led_value(6, data & 0x40); // led for coin m_out / m_hopper active
+ output().set_led_value(6, data & 0x40); // led for coin out / m_hopper active
m_nmi_enable = data; // data & 0x80 // nmi enable?
@@ -525,7 +523,7 @@ static ADDRESS_MAP_START( gp98_portmap, AS_IO, 8, igs009_state )
AM_RANGE( 0x5000, 0x5fff ) AM_RAM_WRITE(fg_tile_w ) AM_SHARE("fg_tile_ram")
- // seems to lacks of PPI devices...
+ // seems to lack PPI devices...
AM_RANGE( 0x6480, 0x6480 ) AM_WRITE(nmi_and_coins_w )
AM_RANGE( 0x6481, 0x6481 ) AM_READ_PORT( "SERVICE" )
AM_RANGE( 0x6482, 0x6482 ) AM_READ_PORT( "COINS" )
@@ -727,7 +725,7 @@ static const gfx_layout layout_8x8x6 =
8, 8,
RGN_FRAC(1, 3),
6,
- { RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0,
+ { RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0,
RGN_FRAC(1,3)+8,RGN_FRAC(1,3)+0,
RGN_FRAC(2,3)+8,RGN_FRAC(2,3)+0 },
{ STEP8(0,1) },
@@ -740,7 +738,7 @@ static const gfx_layout layout_8x32x6 =
8, 32,
RGN_FRAC(1, 3),
6,
- { RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0,
+ { RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0,
RGN_FRAC(1,3)+8,RGN_FRAC(1,3)+0,
RGN_FRAC(2,3)+8,RGN_FRAC(2,3)+0 },
{ STEP8(0,1) },
@@ -796,14 +794,14 @@ void igs009_state::machine_start()
void igs009_state::machine_reset()
{
- m_nmi_enable = 0;
- m_hopper = 0;
- m_video_enable = 1;
+ m_nmi_enable = 0;
+ m_hopper = 0;
+ m_video_enable = 1;
}
INTERRUPT_GEN_MEMBER(igs009_state::interrupt)
{
- if (m_nmi_enable & 0x80)
+ if (m_nmi_enable & 0x80)
device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -1028,6 +1026,7 @@ Notes:
12/02/2008 f205v
***************************************************************************/
+
ROM_START( jingbelli )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "jinglev133i.u44", 0x00000, 0x10000, CRC(df60dc39) SHA1(ff57afd50c045b621395353fdc50ffd1e1b65e9e) )
@@ -1055,14 +1054,12 @@ ROM_START( jingbelli )
ROM_LOAD( "palce22v10h-ch-jin-u27.u27", 0x000, 0x2dd, BAD_DUMP CRC(5c4e9024) SHA1(e9d1e4df3d79c21f4ce053a84bb7b7a43d650f91) )
ROM_END
-
-DRIVER_INIT_MEMBER(igs009_state,jingbell)
+void igs009_state::decrypt_jingbell()
{
- int i;
UINT8 *rom = (UINT8 *)memregion("maincpu")->base();
size_t size = memregion("maincpu")->bytes();
- for (i=0; i<size; i++)
+ for (int i=0; i<size; i++)
{
UINT8 x = rom[i];
if (i & 0x0080)
@@ -1080,11 +1077,26 @@ DRIVER_INIT_MEMBER(igs009_state,jingbell)
rom[i] = x;
}
+}
+
+DRIVER_INIT_MEMBER(igs009_state,jingbelli)
+{
+ decrypt_jingbell();
// protection patch
+ UINT8 *rom = (UINT8 *)memregion("maincpu")->base();
rom[0x01f19] = 0x18;
}
+DRIVER_INIT_MEMBER(igs009_state,jingbell)
+{
+ decrypt_jingbell();
+
+ // protection patch
+ UINT8 *rom = (UINT8 *)memregion("maincpu")->base();
+ rom[0x0e753] = 0x18;
+}
+
/***************************************************************************
Grand Prix '98
@@ -1145,10 +1157,10 @@ ROM_START( gp98 )
ROM_END
-/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */
-GAME( 1997, jingbell, 0, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (US, V157)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
-GAME( 1997, jingbella, jingbell, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (EU, V155)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
-GAME( 1997, jingbellb, jingbell, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (EU, V153)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
-GAME( 1995, jingbellc, jingbell, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (EU, V141)", MACHINE_SUPPORTS_SAVE )
-GAME( 1995?, jingbelli, jingbell, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (Italy, V133I)", MACHINE_SUPPORTS_SAVE )
-GAME( 1998, gp98, 0, gp98, jingbell, driver_device, 0, ROT0, "Romtec Co. Ltd", "Grand Prix '98 (V100K)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */
+GAME( 1997, jingbell, 0, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (US, V157US)", MACHINE_SUPPORTS_SAVE )
+GAME( 1997, jingbella, jingbell, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (EU, V155UE)", MACHINE_SUPPORTS_SAVE ) // Shows V154UE in test mode!
+GAME( 1997, jingbellb, jingbell, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (EU, V153UE)", MACHINE_SUPPORTS_SAVE )
+GAME( 1995, jingbellc, jingbell, jingbell, jingbell, igs009_state, jingbelli, ROT0, "IGS", "Jingle Bell (EU, V141UE)", MACHINE_SUPPORTS_SAVE )
+GAME( 1995?, jingbelli, jingbell, jingbell, jingbell, igs009_state, jingbelli, ROT0, "IGS", "Jingle Bell (Italy, V133I)", MACHINE_SUPPORTS_SAVE )
+GAME( 1998, gp98, 0, gp98, jingbell, driver_device, 0, ROT0, "Romtec Co. Ltd", "Grand Prix '98 (V100K)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/intv.cpp b/src/mame/drivers/intv.cpp
index d1d6f8eab6b..084d7b492ba 100644
--- a/src/mame/drivers/intv.cpp
+++ b/src/mame/drivers/intv.cpp
@@ -136,103 +136,6 @@ static GFXDECODE_START( intvkbd )
GFXDECODE_ENTRY( "gfx1", 0x0000, intvkbd_charlayout, 0, 256 )
GFXDECODE_END
-static INPUT_PORTS_START( intv )
-
- /* Left Player Controller */
- PORT_START("KEYPAD1")
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/1") PORT_CODE(KEYCODE_1_PAD)
- PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/2") PORT_CODE(KEYCODE_2_PAD)
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/3") PORT_CODE(KEYCODE_3_PAD)
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/4") PORT_CODE(KEYCODE_4_PAD)
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/5") PORT_CODE(KEYCODE_5_PAD)
- PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/6") PORT_CODE(KEYCODE_6_PAD)
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/7") PORT_CODE(KEYCODE_7_PAD)
- PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/8") PORT_CODE(KEYCODE_8_PAD)
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/9") PORT_CODE(KEYCODE_9_PAD)
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/Clear") PORT_CODE(KEYCODE_DEL_PAD)
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/0") PORT_CODE(KEYCODE_0_PAD)
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Left/Enter") PORT_CODE(KEYCODE_ENTER_PAD)
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Left/Upper") PORT_PLAYER(1)
- PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Left/Lower-Left") PORT_PLAYER(1)
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Left/Lower-Right") PORT_PLAYER(1)
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED )
-
- PORT_START("DISC1")
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Left/Up") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Right-Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("Left/Right") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Right-Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Left/Down") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Left-Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("Left/Left") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Left-Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
-
- PORT_START("DISCX1")
- PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("Left/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x01)
-
- PORT_START("DISCY1")
- PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Left/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x01)
-
- /* Right Player Controller */
- PORT_START("KEYPAD2")
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/1")
- PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/2")
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/3")
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/4")
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/5")
- PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/6")
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/7")
- PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/8")
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/9")
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/Clear")
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/0")
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/Enter")
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Right/Upper") PORT_PLAYER(2)
- PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Right/Lower-Left") PORT_PLAYER(2)
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Right/Lower-Right") PORT_PLAYER(2)
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED )
-
- PORT_START("DISC2")
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Right/Up") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Up-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Right-Up-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("Right/Right") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Right-Down-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Down-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Right/Down") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Down-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Left-Down-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("Right/Left") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Left-Up-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Up-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00)
-
- PORT_START("DISCX2")
- PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("Right/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_D) PORT_CODE_INC(KEYCODE_G) PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,EQUALS,0x02)
-
- PORT_START("DISCY2")
- PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Right/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_R) PORT_CODE_INC(KEYCODE_F) PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,EQUALS,0x02)
-
- PORT_START("OPTIONS")
- PORT_CONFNAME( 0x01, 0x00, "Left Disc" )
- PORT_CONFSETTING( 0x00, "Digital" )
- PORT_CONFSETTING( 0x01, "Analog" )
- PORT_CONFNAME( 0x02, 0x00, "Right Disc" )
- PORT_CONFSETTING( 0x00, "Digital" )
- PORT_CONFSETTING( 0x02, "Analog" )
-INPUT_PORTS_END
-
/*
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
@@ -370,11 +273,6 @@ static INPUT_PORTS_START( intvkbd )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD)
-
- /* 2008-05 FP: I include here the controller inputs to make happy the read_handler.
- Please remove this (and re-tag accordingly the inputs above) if intv_right_control_r
- is supposed to scan the keyboard inputs when the Keyboard Component is connected */
- PORT_INCLUDE( intv )
INPUT_PORTS_END
static ADDRESS_MAP_START( intv_mem, AS_PROGRAM, 16, intv_state )
@@ -551,7 +449,6 @@ INTERRUPT_GEN_MEMBER(intv_state::intv_interrupt2)
timer_set(m_keyboard->cycles_to_attotime(100), TIMER_INTV_INTERRUPT2_COMPLETE);
}
-
static MACHINE_CONFIG_START( intv, intv_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", CP1610, XTAL_3_579545MHz/4) /* Colorburst/4 */
@@ -574,11 +471,14 @@ static MACHINE_CONFIG_START( intv, intv_state )
MCFG_PALETTE_INDIRECT_ENTRIES(32)
MCFG_PALETTE_INIT_OWNER(intv_state, intv)
+ MCFG_INTV_CONTROL_PORT_ADD("iopt_right_ctrl", intv_control_port_devices, "handctrl")
+ MCFG_INTV_CONTROL_PORT_ADD("iopt_left_ctrl", intv_control_port_devices, "handctrl")
+
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8914", AY8914, XTAL_3_579545MHz/2)
- MCFG_AY8910_PORT_A_READ_CB(READ8(intv_state, intv_right_control_r))
- MCFG_AY8910_PORT_B_READ_CB(READ8(intv_state, intv_left_control_r))
+ MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("iopt_right_ctrl", intv_control_port_device, ctrl_r))
+ MCFG_AY8910_PORT_B_READ_CB(DEVREAD8("iopt_left_ctrl", intv_control_port_device, ctrl_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
/* cartridge */
@@ -743,11 +643,11 @@ DRIVER_INIT_MEMBER(intv_state,intvkbd)
***************************************************************************/
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
-CONS( 1979, intv, 0, 0, intv, intv, intv_state, intv, "Mattel", "Intellivision", MACHINE_SUPPORTS_SAVE )
-CONS( 1981, intvsrs, intv, 0, intv, intv, intv_state, intv, "Sears", "Super Video Arcade", MACHINE_SUPPORTS_SAVE )
+CONS( 1979, intv, 0, 0, intv, 0, intv_state, intv, "Mattel", "Intellivision", MACHINE_SUPPORTS_SAVE )
+CONS( 1981, intvsrs, intv, 0, intv, 0, intv_state, intv, "Sears", "Super Video Arcade", MACHINE_SUPPORTS_SAVE )
COMP( 1981, intvkbd, intv, 0, intvkbd, intvkbd, intv_state, intvkbd, "Mattel", "Intellivision Keyboard Component (Unreleased)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
-CONS( 1982, intv2, intv, 0, intv2, intv, intv_state, intv, "Mattel", "Intellivision II", MACHINE_SUPPORTS_SAVE )
+CONS( 1982, intv2, intv, 0, intv2, 0, intv_state, intv, "Mattel", "Intellivision II", MACHINE_SUPPORTS_SAVE )
// made up, user friendlier machines with pre-mounted passthu expansions
-COMP( 1982, intvoice, intv, 0, intvoice, intv, intv_state, intv, "Mattel", "Intellivision w/IntelliVoice expansion", MACHINE_SUPPORTS_SAVE )
-COMP( 1983, intvecs, intv, 0, intvecs, intv, intv_state, intv, "Mattel", "Intellivision w/Entertainment Computer System + Intellivoice expansions", MACHINE_SUPPORTS_SAVE )
+COMP( 1982, intvoice, intv, 0, intvoice, 0, intv_state, intv, "Mattel", "Intellivision w/IntelliVoice expansion", MACHINE_SUPPORTS_SAVE )
+COMP( 1983, intvecs, intv, 0, intvecs, 0, intv_state, intv, "Mattel", "Intellivision w/Entertainment Computer System + Intellivoice expansions", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/inufuku.cpp b/src/mame/drivers/inufuku.cpp
index dcbb74bd400..78621252fae 100644
--- a/src/mame/drivers/inufuku.cpp
+++ b/src/mame/drivers/inufuku.cpp
@@ -395,7 +395,6 @@ static MACHINE_CONFIG_START( inufuku, inufuku_state )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( inufuku_state, inufuku_tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", inufuku)
MCFG_PALETTE_ADD("palette", 4096)
diff --git a/src/mame/drivers/jaguar.cpp b/src/mame/drivers/jaguar.cpp
index ee33848dd11..c26edd9b298 100644
--- a/src/mame/drivers/jaguar.cpp
+++ b/src/mame/drivers/jaguar.cpp
@@ -339,7 +339,6 @@ Notes:
#include "machine/vt83c461.h"
#include "sound/dac.h"
#include "includes/jaguar.h"
-#include "emuopts.h"
#include "imagedev/snapquik.h"
#include "sound/dac.h"
#include "machine/eepromser.h"
diff --git a/src/mame/drivers/jclub2.cpp b/src/mame/drivers/jclub2.cpp
index e3135dcbc6e..fe83f2ad7a5 100644
--- a/src/mame/drivers/jclub2.cpp
+++ b/src/mame/drivers/jclub2.cpp
@@ -156,7 +156,7 @@ public:
UINT32 screen_update_jclub2o(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(darkhors_irq);
void draw_sprites_darkhors(bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<gfxdecode_device> m_gfxdecode;
+ optional_device<gfxdecode_device> m_gfxdecode;
WRITE8_MEMBER(st0016_rom_bank_w); // temp?
};
@@ -1021,13 +1021,10 @@ static MACHINE_CONFIG_START( jclub2, darkhors_state )
MCFG_SCREEN_UPDATE_DRIVER(darkhors_state, screen_update_jclub2)
MCFG_SCREEN_PALETTE("palette")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
// NOT an ST0020 but instead ST0032, ram format isn't compatible at least
MCFG_DEVICE_ADD("st0020_spr", ST0020_SPRITES, 0)
st0020_device::set_is_st0032(*device, 1);
st0020_device::set_is_jclub2o(*device, 1); // offsets
- MCFG_ST0020_SPRITES_GFXDECODE("gfxdecode")
MCFG_ST0020_SPRITES_PALETTE("palette")
MCFG_PALETTE_ADD("palette", 0x10000)
@@ -1101,11 +1098,8 @@ static MACHINE_CONFIG_START( jclub2o, darkhors_state )
MCFG_PALETTE_ADD("palette", 0x10000)
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("st0020_spr", ST0020_SPRITES, 0)
st0020_device::set_is_jclub2o(*device, 1);
- MCFG_ST0020_SPRITES_GFXDECODE("gfxdecode")
MCFG_ST0020_SPRITES_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(darkhors_state,jclub2o)
diff --git a/src/mame/drivers/jongkyo.cpp b/src/mame/drivers/jongkyo.cpp
index 46e762a799f..ae5ff7faed5 100644
--- a/src/mame/drivers/jongkyo.cpp
+++ b/src/mame/drivers/jongkyo.cpp
@@ -29,7 +29,7 @@
#include "emu.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
-#include "machine/segacrpt.h"
+#include "machine/segacrpt_device.h"
#define JONGKYO_CLOCK 18432000
@@ -491,11 +491,15 @@ void jongkyo_state::machine_reset()
static MACHINE_CONFIG_START( jongkyo, jongkyo_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", Z80,JONGKYO_CLOCK/4)
+ MCFG_CPU_ADD("maincpu", SEGA_315_5084,JONGKYO_CLOCK/4)
MCFG_CPU_PROGRAM_MAP(jongkyo_memmap)
MCFG_CPU_IO_MAP(jongkyo_portmap)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", jongkyo_state, irq0_line_hold)
+ MCFG_SEGACRPT_SET_SIZE(0x6c00)
+ MCFG_SEGACRPT_SET_NUMBANKS(8)
+ MCFG_SEGACRPT_SET_BANKSIZE(0x400)
+ // sega_decode(rom, opcodes, 0x6c00, convtable, 8, 0x400);
/* video hardware */
@@ -518,6 +522,7 @@ static MACHINE_CONFIG_START( jongkyo, jongkyo_state )
MACHINE_CONFIG_END
+
/*************************************
*
* ROM definition
@@ -552,27 +557,6 @@ ROM_END
DRIVER_INIT_MEMBER(jongkyo_state,jongkyo)
{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x28,0x08,0xa8,0x88 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...0...0...0 */
- { 0x80,0x88,0xa0,0xa8 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...0...0...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x20,0xa0,0x00,0x80 }, /* ...0...0...1...0 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x80,0x88,0xa0,0xa8 }, /* ...0...0...1...1 */
- { 0x08,0x88,0x00,0x80 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...0...1 */
- { 0x20,0xa0,0x00,0x80 }, { 0x20,0xa0,0x00,0x80 }, /* ...0...1...1...0 */
- { 0x08,0x88,0x00,0x80 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...1...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0xa8,0x20,0x28 }, /* ...1...0...0...0 */
- { 0x80,0x88,0xa0,0xa8 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...0...0...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x20,0xa0,0x00,0x80 }, /* ...1...0...1...0 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...0...1...1 */
- { 0x08,0x88,0x00,0x80 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...1...0...0 */
- { 0x08,0x88,0x00,0x80 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...1...0...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x20,0xa0,0x00,0x80 }, /* ...1...1...1...0 */
- { 0x80,0x88,0xa0,0xa8 }, { 0x08,0x88,0x00,0x80 } /* ...1...1...1...1 */
- };
UINT8 *rom = memregion("maincpu")->base();
@@ -584,8 +568,19 @@ DRIVER_INIT_MEMBER(jongkyo_state,jongkyo)
UINT8 *opcodes = auto_alloc_array(machine(), UINT8, 0x6c00+0x400*8);
+ segacrpt_z80_device* cpu = (segacrpt_z80_device*)machine().device(":maincpu");
+
+ if (!cpu)
+ {
+ fatalerror("can't find cpu!\n");
+ }
+ else
+ {
+ cpu->set_region_p(rom);
+ cpu->set_decrypted_p(opcodes);
+ }
+
/* then do the standard Sega decryption */
- sega_decode(rom, opcodes, 0x6c00, convtable, 8, 0x400);
membank("bank1")->configure_entries(0, 8, rom+0x6c00, 0x400);
membank("bank1d")->configure_entries(0, 8, opcodes+0x6c00, 0x400);
@@ -600,3 +595,5 @@ DRIVER_INIT_MEMBER(jongkyo_state,jongkyo)
*************************************/
GAME( 1985, jongkyo, 0, jongkyo, jongkyo, jongkyo_state, jongkyo, ROT0, "Kiwako", "Jongkyo", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
+
+
diff --git a/src/mame/drivers/jungleyo.cpp b/src/mame/drivers/jungleyo.cpp
new file mode 100644
index 00000000000..01c16722e79
--- /dev/null
+++ b/src/mame/drivers/jungleyo.cpp
@@ -0,0 +1,158 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+/*
+
+ CPUs
+QTY Type clock position function
+1x MC68HC000FN10 u3 16/32-bit Microprocessor - main
+1x u6295 u98 4-Channel Mixing ADCPM Voice Synthesis LSI - sound
+1x HA17358 u101 Dual Operational Amplifier - sound
+1x TDA2003 u104 Audio Amplifier - sound
+1x oscillator 12.000MHz osc1
+ROMs
+QTY Type position status
+2x M27C1001 2,3 dumped
+1x M27C2001 1 dumped
+3x M27C4001 4,5,6 dumped
+RAMs
+QTY Type position
+11x LH52B256-10PLL u16a,u17a,u27,u28,u29,u30,u39,u40,u74,u75,u76
+PLDs
+QTY Type position status
+1x ATF20V8B-15PC u37 read protected
+2x A40MX04-F-PL84 u83,u86 read protected
+Others
+
+1x 28x2 JAMMA edge connector
+1x pushbutton (SW1)
+1x trimmer (volume) (VR1)
+4x 8x2 switches DIP (SW1,SW2,SW3,SW4)
+1x battery 3.6V (BT1)
+Notes
+
+PCB silkscreened: "MADE IN TAIWAN YONSHI PCB NO-006F"
+
+*/
+
+
+
+#include "emu.h"
+#include "cpu/m68000/m68000.h"
+#include "sound/okim6295.h"
+
+
+class jungleyo_state : public driver_device
+{
+public:
+ jungleyo_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_gfxdecode(*this, "gfxdecode") { }
+
+ /* memory pointers */
+
+ /* video-related */
+ virtual void video_start() override;
+ UINT32 screen_update_jungleyo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+};
+
+void jungleyo_state::video_start()
+{
+}
+
+UINT32 jungleyo_state::screen_update_jungleyo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ return 0;
+}
+
+
+static ADDRESS_MAP_START( jungleyo_map, AS_PROGRAM, 16, jungleyo_state )
+ AM_RANGE(0x000000, 0x03ffff) AM_ROM
+ADDRESS_MAP_END
+
+static INPUT_PORTS_START( jungleyo )
+INPUT_PORTS_END
+
+static const gfx_layout jungleyo_layout =
+{
+ 8,8,
+ RGN_FRAC(1,1),
+ 8,
+ { 0,1,2,3,4,5,6,7 },
+ { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 },
+ { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64 },
+ 8*64
+};
+
+static const gfx_layout jungleyo16_layout =
+{
+ 8,32,
+ RGN_FRAC(1,1),
+ 8,
+ { 0,1,2,3,4,5,6,7 },
+ { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 },
+ { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
+ 8*64, 9*64,10*64,11*64,12*64,13*64,14*64,15*64,
+ 16*64,17*64,18*64,19*64,20*64,21*64,22*64,23*64,
+ 24*64,25*64,26*64,27*64,28*64,29*64,30*64,31*64 },
+ 8*64*4
+};
+
+
+static GFXDECODE_START( jungleyo )
+ GFXDECODE_ENTRY( "reelgfx", 0, jungleyo16_layout, 0x0, 2 )
+ GFXDECODE_ENTRY( "gfx2", 0, jungleyo_layout, 0x0, 2 )
+ GFXDECODE_ENTRY( "gfx3", 0, jungleyo_layout, 0x0, 2 )
+GFXDECODE_END
+
+
+static MACHINE_CONFIG_START( jungleyo, jungleyo_state )
+
+ MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz)
+ MCFG_CPU_PROGRAM_MAP(jungleyo_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", jungleyo_state, irq1_line_hold)
+
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", jungleyo)
+
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
+ MCFG_SCREEN_SIZE(64*8, 32*8)
+ MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 32*8-1)
+ MCFG_SCREEN_UPDATE_DRIVER(jungleyo_state, screen_update_jungleyo)
+ MCFG_SCREEN_PALETTE("palette")
+
+ MCFG_PALETTE_ADD("palette", 0x200)
+ MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
+
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
+
+ MCFG_OKIM6295_ADD("oki", XTAL_12MHz/16, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.47)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.47)
+MACHINE_CONFIG_END
+
+
+ROM_START( jungleyo )
+ ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 Code */ // encrypted?
+ ROM_LOAD16_BYTE( "jungle_(record)_rom3_vi3.02.u15", 0x00001, 0x20000, CRC(7c9f431e) SHA1(fb3f90c4fe59c938f36b30c5fa3af227031e7d7a) )
+ ROM_LOAD16_BYTE( "jungle_(record)_rom2_vi3.02.u14", 0x00000, 0x20000, CRC(f6a71260) SHA1(8e48cbb9d701ad968540244396820359afe97c28) )
+
+ ROM_REGION( 0x040000, "oki", 0 ) /* Samples */
+ ROM_LOAD( "jungle_rom1.u99", 0x00000, 0x40000, CRC(05ef5b85) SHA1(ca7584646271c6adc7880eca5cf43a412340c522) )
+
+ ROM_REGION( 0x80000, "reelgfx", 0 )
+ ROM_LOAD( "jungle_rom4.u58", 0x000000, 0x80000, CRC(2f37da94) SHA1(6479e3bcff665316903964286d72df9822c05485) )
+
+ ROM_REGION( 0x80000, "gfx2", 0 )
+ ROM_LOAD( "jungle_rom5.u59", 0x000000, 0x80000, CRC(0ccd9b94) SHA1(f209c7e15967be2e43be018aca89edd0c311503e) )
+
+ ROM_REGION( 0x80000, "gfx3", 0 )
+ ROM_LOAD( "jungle_rom6.u60", 0x000000, 0x80000, CRC(caab8eb2) SHA1(472ca9f396d7c01a1bd03485581cfae677a3b365) )
+ROM_END
+
+
+GAME( 1999, jungleyo, 0, jungleyo, jungleyo, driver_device, 0, ROT0, "Yonshi", "Jungle (VI3.02)", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/kaneko16.cpp b/src/mame/drivers/kaneko16.cpp
index b9c25759145..019f95e4492 100644
--- a/src/mame/drivers/kaneko16.cpp
+++ b/src/mame/drivers/kaneko16.cpp
@@ -2229,7 +2229,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_START( mgcrystl, kaneko16_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */
+ MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb, TMP68HC000N-12 @U31 and X2 is 12MHz */
MCFG_CPU_PROGRAM_MAP(mgcrystl)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1)
@@ -3832,28 +3832,29 @@ ROM_START( mgcrystlo ) /* Master Up: 91/12/10 01:56:06 */
ROM_LOAD( "mc030.u32", 0x000000, 0x040000, CRC(c165962e) SHA1(f7e130db387ae9dcb7223f7ad6e51270d3033bc9) )
ROM_END
+// Note: there is a known undumped older Japan set from http://gamesdbase.com/Media/SYSTEM/Arcade/PCB/big/Magical_Crystals_-_1991_-_Kaneko.jpg with code roms ending in -00 instead of -02
ROM_START( mgcrystlj ) /* Master Up: 92/01/13 14:44:20 */
ROM_REGION( 0x040000*2, "maincpu", ROMREGION_ERASE ) /* 68000 Code */
- ROM_LOAD16_BYTE( "mc100j02.u18", 0x000000, 0x020000, CRC(afe5882d) SHA1(176e6e12e3df63c08d7aff781f5e5a9bd83ec293) ) /* Labeled as MC100J/U18-02 */
- ROM_LOAD16_BYTE( "mc101j02.u19", 0x000001, 0x040000, CRC(60da5492) SHA1(82b90a617d355825624ce9fb30bddf4714bd0d18) ) /* Labeled as MC101J/U19-02 */
+ ROM_LOAD16_BYTE( "kaneko__mc100-u18j-02.u18", 0x000000, 0x020000, CRC(afe5882d) SHA1(176e6e12e3df63c08d7aff781f5e5a9bd83ec293) ) /* Labeled as MC100J/U18-02 */
+ ROM_LOAD16_BYTE( "kaneko__mc101-u19j-02.u19", 0x000001, 0x040000, CRC(60da5492) SHA1(82b90a617d355825624ce9fb30bddf4714bd0d18) ) /* Labeled as MC101J/U19-02 */
ROM_REGION( 0x280000, "gfx1", 0 ) /* Sprites */
- ROM_LOAD( "mc000.u38", 0x000000, 0x100000, CRC(28acf6f4) SHA1(6647ad90ea580b65ed28772f9d65352b06833d0c) )
- ROM_LOAD( "mc001.u37", 0x100000, 0x080000, CRC(005bc43d) SHA1(6f6cd99e8e60562fa86581008455a6d9d646fa95) )
+ ROM_LOAD( "kaneko__mc-000_0001.u38", 0x000000, 0x100000, CRC(28acf6f4) SHA1(6647ad90ea580b65ed28772f9d65352b06833d0c) ) // Mask rom
+ ROM_LOAD( "kaneko__mc-001_0002_r44.u37", 0x100000, 0x080000, CRC(005bc43d) SHA1(6f6cd99e8e60562fa86581008455a6d9d646fa95) ) // Mask rom
ROM_RELOAD( 0x180000, 0x080000 )
- ROM_LOAD( "mc002e02.u36", 0x200000, 0x020000, CRC(27ac1056) SHA1(34b07c1a0d403ca45c9849d3d8d311012f787df6) ) /* Labeled as MC002J/U36-02, but same as MC002E/U36-02 */
+ ROM_LOAD( "kaneko__mc002j-u36-02.u36", 0x200000, 0x020000, CRC(27ac1056) SHA1(34b07c1a0d403ca45c9849d3d8d311012f787df6) ) /* Labeled as MC002J/U36-02, but same as MC002E/U36-02 */
ROM_RELOAD( 0x220000, 0x020000 )
ROM_RELOAD( 0x240000, 0x020000 )
ROM_RELOAD( 0x260000, 0x020000 )
ROM_REGION( 0x100000, "gfx2", 0 ) /* Tiles (Scrambled) */
- ROM_LOAD( "mc010.u04", 0x000000, 0x100000, CRC(85072772) SHA1(25e903cc2c893d61db791d1fe60a1205a4395667) )
+ ROM_LOAD( "kaneko__mc-010_0003.u04", 0x000000, 0x100000, CRC(85072772) SHA1(25e903cc2c893d61db791d1fe60a1205a4395667) ) // Mask rom
ROM_REGION( 0x100000, "gfx3", 0 ) /* Tiles (Scrambled) */
- ROM_LOAD( "mc020.u34", 0x000000, 0x100000, CRC(1ea92ff1) SHA1(66ec53e664b2a5a751a280a538aaeceafc187ceb) )
+ ROM_LOAD( "kaneko__mc-020_0004.u34", 0x000000, 0x100000, CRC(1ea92ff1) SHA1(66ec53e664b2a5a751a280a538aaeceafc187ceb) ) // Mask rom
ROM_REGION( 0x040000, "oki", 0 ) /* Samples */
- ROM_LOAD( "mc030.u32", 0x000000, 0x040000, CRC(c165962e) SHA1(f7e130db387ae9dcb7223f7ad6e51270d3033bc9) )
+ ROM_LOAD( "kaneko__mc-030_0005_t99.u32", 0x000000, 0x040000, CRC(c165962e) SHA1(f7e130db387ae9dcb7223f7ad6e51270d3033bc9) )
ROM_END
diff --git a/src/mame/drivers/karnov.cpp b/src/mame/drivers/karnov.cpp
index 9737c94c80d..3f602083f66 100644
--- a/src/mame/drivers/karnov.cpp
+++ b/src/mame/drivers/karnov.cpp
@@ -816,9 +816,8 @@ static MACHINE_CONFIG_START( karnov, karnov_state )
MCFG_PALETTE_INIT_OWNER(karnov_state, karnov)
MCFG_DEVICE_ADD("spritegen", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 2);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(2)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(karnov_state,karnov)
@@ -880,9 +879,8 @@ static MACHINE_CONFIG_START( wndrplnt, karnov_state )
MCFG_PALETTE_INIT_OWNER(karnov_state, karnov)
MCFG_DEVICE_ADD("spritegen", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 2);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(2)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(karnov_state,wndrplnt)
diff --git a/src/mame/drivers/konamigx.cpp b/src/mame/drivers/konamigx.cpp
index f134febe790..6aeee176b81 100644
--- a/src/mame/drivers/konamigx.cpp
+++ b/src/mame/drivers/konamigx.cpp
@@ -1583,7 +1583,7 @@ static GFXDECODE_START( racinfrc )
GFXDECODE_END
/* type 3 & 4 games use a simple 8bpp decode for the 53936 */
-static GFXDECODE_START( type34 )
+static GFXDECODE_START( type3 )
GFXDECODE_ENTRY( "gfx3", 0, bglayout_8bpp, 0x1000, 8 )
GFXDECODE_END
@@ -1646,12 +1646,9 @@ static MACHINE_CONFIG_START( konamigx, konamigx_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(konamigx_state, type2_tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 0, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_5, 0, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_K055555_ADD("k055555")
@@ -1663,9 +1660,8 @@ static MACHINE_CONFIG_START( konamigx, konamigx_state )
MCFG_DEVICE_ADD("k055673", K055673, 0)
MCFG_K055673_CB(konamigx_state, type2_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -26, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -26, -23)
MCFG_K055673_SET_SCREEN("screen")
- MCFG_K055673_GFXDECODE("gfxdecode")
MCFG_K055673_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_5bpp)
@@ -1698,12 +1694,12 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( konamigx_bios, konamigx )
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 0, 0, "k055555")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 0, 0, "k055555")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gokuparo, konamigx )
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -46, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -46, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sexyparo, konamigx )
@@ -1711,12 +1707,12 @@ static MACHINE_CONFIG_DERIVED( sexyparo, konamigx )
MCFG_K056832_CB(konamigx_state, alpha_tile_callback)
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -42, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -42, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( tbyahhoo, konamigx )
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 0, 0, "k055555")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_5, 0, 0, "k055555")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( dragoonj, konamigx )
@@ -1727,11 +1723,11 @@ static MACHINE_CONFIG_DERIVED( dragoonj, konamigx )
MCFG_K053252_OFFSETS(24+16, 16)
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 1, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_5, 1, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(konamigx_state, dragoonj_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_RNG, -53, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_RNG, -53, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( le2, konamigx )
@@ -1739,41 +1735,42 @@ static MACHINE_CONFIG_DERIVED( le2, konamigx )
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", konamigx_state, konamigx_type2_scanline, "screen", 0, 1)
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 1, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8, 1, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(konamigx_state, le2_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_LE2, -46, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_LE2, -46, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( konamigx_6bpp, konamigx )
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_6bpp)
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 0, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_6, 0, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -46, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -46, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( salmndr2, konamigx )
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 1, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_6, 1, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(konamigx_state, salmndr2_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -48, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -48, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( opengolf, konamigx )
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_RAW_PARAMS(8000000, 384+24+64+40, 0, 383, 224+16+8+16, 0, 223)
MCFG_SCREEN_VISIBLE_AREA(40, 40+384-1, 16, 16+224-1)
- MCFG_GFXDECODE_MODIFY("gfxdecode", opengolf)
+
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", opengolf)
MCFG_VIDEO_START_OVERRIDE(konamigx_state, opengolf)
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -53, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -53, -23)
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(gx_type1_map)
@@ -1786,17 +1783,18 @@ static MACHINE_CONFIG_DERIVED( racinfrc, konamigx )
MCFG_SCREEN_MODIFY("screen")
//MCFG_SCREEN_RAW_PARAMS(6000000, 384+24+64+40, 0, 383, 224+16+8+16, 0, 223)
//MCFG_SCREEN_VISIBLE_AREA(32, 32+384-1, 16, 16+224-1)
- MCFG_GFXDECODE_MODIFY("gfxdecode", racinfrc)
+
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", racinfrc)
MCFG_VIDEO_START_OVERRIDE(konamigx_state, racinfrc)
MCFG_DEVICE_MODIFY("k053252")
MCFG_K053252_OFFSETS(24-8+16, 0)
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 0, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_6, 0, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -53, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -53, -23)
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(gx_type1_map)
@@ -1813,6 +1811,7 @@ static MACHINE_CONFIG_DERIVED( gxtype3, konamigx )
MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", type3)
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_type3)
MCFG_DEVICE_MODIFY("k053252")
@@ -1820,10 +1819,10 @@ static MACHINE_CONFIG_DERIVED( gxtype3, konamigx )
MCFG_K053252_SET_SLAVE_SCREEN("screen2")
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 0, 2, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_6, 0, 2, "none")
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -132, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -132, -23)
MCFG_DEVICE_REMOVE("palette")
MCFG_PALETTE_ADD("palette", 16384)
@@ -1842,8 +1841,6 @@ static MACHINE_CONFIG_DERIVED( gxtype3, konamigx )
MCFG_SCREEN_SIZE(1024, 1024)
MCFG_SCREEN_VISIBLE_AREA(0, 576-1, 16, 32*8-1-16)
MCFG_SCREEN_UPDATE_DRIVER(konamigx_state, screen_update_konamigx_right)
-
- MCFG_GFXDECODE_MODIFY("gfxdecode", type34)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gxtype4, konamigx )
@@ -1872,7 +1869,7 @@ static MACHINE_CONFIG_DERIVED( gxtype4, konamigx )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS()
- MCFG_GFXDECODE_MODIFY("gfxdecode", type4)
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", type4)
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_type4)
MCFG_DEVICE_MODIFY("k053252")
@@ -1881,10 +1878,10 @@ static MACHINE_CONFIG_DERIVED( gxtype4, konamigx )
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 0, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8, 0, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -79, -24) // -23 looks better in intro
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -79, -24) // -23 looks better in intro
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gxtype4_vsn, gxtype4 )
@@ -1905,17 +1902,17 @@ static MACHINE_CONFIG_DERIVED( gxtype4_vsn, gxtype4 )
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_type4_vsn)
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 0, 2, "none") // set djmain_hack to 2 to kill layer association or half the tilemaps vanish on screen 0
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8, 0, 2, "none") // set djmain_hack to 2 to kill layer association or half the tilemaps vanish on screen 0
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -132, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -132, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gxtype4sd2, gxtype4 )
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_type4_sd2)
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -81, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -81, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( winspike, konamigx )
@@ -1927,10 +1924,10 @@ static MACHINE_CONFIG_DERIVED( winspike, konamigx )
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CB(konamigx_state, alpha_tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 0, 2, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8, 0, 2, "none")
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_LE2, -53, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_LE2, -53, -23)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp
index 18de66cf40d..28def903b4d 100644
--- a/src/mame/drivers/ksys573.cpp
+++ b/src/mame/drivers/ksys573.cpp
@@ -2750,11 +2750,22 @@ static INPUT_PORTS_START( hyperbbc )
PORT_INCLUDE( konami573 )
PORT_MODIFY( "IN2" )
-
- PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER( 3 ) /* P1 LEFT */
- PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER( 3 ) /* P1 RIGHT */
- PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_START3 ) /* P1 UP */
- PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER( 3 ) /* P1 DOWN */
+ PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER( 3 )
+ PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER( 3 )
+ PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_START3 )
+ PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER( 3 )
+ PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_MODIFY( "IN3" )
+ PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( hypbbc2p )
diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp
index 75bafbb6d6c..14c2cb772a6 100644
--- a/src/mame/drivers/lastbank.cpp
+++ b/src/mame/drivers/lastbank.cpp
@@ -483,7 +483,6 @@ static MACHINE_CONFIG_START( lastbank, lastbank_state )
MCFG_DEVICE_ADD("tc0091lvc", TC0091LVC, 0)
MCFG_TC0091LVC_GFXDECODE("gfxdecode")
- MCFG_TC0091LVC_PALETTE("palette")
// MCFG_VIDEO_START_OVERRIDE(lastbank_state,lastbank)
diff --git a/src/mame/drivers/leapster.cpp b/src/mame/drivers/leapster.cpp
index 7f53fea59d4..b46d07e385b 100644
--- a/src/mame/drivers/leapster.cpp
+++ b/src/mame/drivers/leapster.cpp
@@ -329,7 +329,7 @@ ROM_END
ROM_START(leapstertv)
ROM_REGION(0x200000, "maincpu", ROMREGION_ERASE00)
- ROM_LOAD( "am29pl160cb-90sf.bin", 0x00000, 0x200000, BAD_DUMP CRC(dc281f1f) SHA1(17588de54ab3bb82801bd5062f3e6aa687412178) )
+ ROM_LOAD( "am29pl160cb-90sf.bin", 0x00000, 0x200000, CRC(194cc724) SHA1(000a79d75c19f2e43532ce0b31f0dca0bed49eab) )
ROM_END
DRIVER_INIT_MEMBER(leapster_state,leapster)
diff --git a/src/mame/drivers/lemmings.cpp b/src/mame/drivers/lemmings.cpp
index 5af69bba418..0c427a4c14f 100644
--- a/src/mame/drivers/lemmings.cpp
+++ b/src/mame/drivers/lemmings.cpp
@@ -260,12 +260,10 @@ static MACHINE_CONFIG_START( lemmings, lemmings_state )
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(1)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(0)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
diff --git a/src/mame/drivers/lethal.cpp b/src/mame/drivers/lethal.cpp
index fb6ce38d331..bd834f9fd94 100644
--- a/src/mame/drivers/lethal.cpp
+++ b/src/mame/drivers/lethal.cpp
@@ -509,8 +509,6 @@ static MACHINE_CONFIG_START( lethalen, lethal_state )
MCFG_EEPROM_SERIAL_ER5911_8BIT_ADD("eeprom")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(59.62) /* verified on pcb */
@@ -526,8 +524,7 @@ static MACHINE_CONFIG_START( lethalen, lethal_state )
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(lethal_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8LE, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8LE, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053244", K053244, 0)
diff --git a/src/mame/drivers/m92.cpp b/src/mame/drivers/m92.cpp
index 2ff72f43b87..f4934be8fe6 100644
--- a/src/mame/drivers/m92.cpp
+++ b/src/mame/drivers/m92.cpp
@@ -1180,23 +1180,23 @@ ROM_START( skingame )
ROM_LOAD16_BYTE( "is-l1.5j", 0x80000, 0x40000, CRC(e4e00626) SHA1(e8c6c7ad6a367da4036915a155c8695ad90ae47b) )
ROM_REGION( 0x20000, "soundcpu", 0 )
- ROM_LOAD16_BYTE( "mt2sh0", 0x00001, 0x10000, CRC(1ecbea43) SHA1(8d66ef419f75569f2c83a89c3985742b8a47914f) )
- ROM_LOAD16_BYTE( "mt2sl0", 0x00000, 0x10000, CRC(8fd5b531) SHA1(92cae3f6dac7f89b559063de3be2f38587536b65) )
+ ROM_LOAD16_BYTE( "mt2-sh0-.ic14", 0x00001, 0x10000, CRC(1ecbea43) SHA1(8d66ef419f75569f2c83a89c3985742b8a47914f) )
+ ROM_LOAD16_BYTE( "mt2-sl0-.ic17", 0x00000, 0x10000, CRC(8fd5b531) SHA1(92cae3f6dac7f89b559063de3be2f38587536b65) )
ROM_REGION( 0x100000, "gfx1", 0 ) /* Tiles */
- ROM_LOAD( "c0", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
- ROM_LOAD( "c1", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
- ROM_LOAD( "c2", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
- ROM_LOAD( "c3", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
+ ROM_LOAD( "hr0.ic9", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
+ ROM_LOAD( "hr1.ic10", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
+ ROM_LOAD( "hr2.ic11", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
+ ROM_LOAD( "hr3.ic12", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
ROM_REGION( 0x400000, "gfx2", 0 ) /* Sprites */
- ROM_LOAD( "k30", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
- ROM_LOAD( "k31", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
- ROM_LOAD( "k32", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
- ROM_LOAD( "k33", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
+ ROM_LOAD( "k30.ic42", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
+ ROM_LOAD( "k31.ic43", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
+ ROM_LOAD( "k32.ic44", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
+ ROM_LOAD( "k33.ic45", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
ROM_REGION( 0x80000, "irem", 0 )
- ROM_LOAD( "da", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
+ ROM_LOAD( "k0d.ic8", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
ROM_REGION( 0x4000, "eeprom", 0 ) /* D28C64C-20 EEPROM */
ROM_LOAD( "mt2eep", 0x000000, 0x800, CRC(208af971) SHA1(69384cac24b7af35a031f9b60e035131a8b10cb2) )
@@ -1217,23 +1217,23 @@ ROM_START( majtitl2 )
ROM_LOAD16_BYTE( "is-l1.5j", 0x80000, 0x40000, CRC(e4e00626) SHA1(e8c6c7ad6a367da4036915a155c8695ad90ae47b) )
ROM_REGION( 0x20000, "soundcpu", 0 )
- ROM_LOAD16_BYTE( "mt2sh0", 0x00001, 0x10000, CRC(1ecbea43) SHA1(8d66ef419f75569f2c83a89c3985742b8a47914f) )
- ROM_LOAD16_BYTE( "mt2sl0", 0x00000, 0x10000, CRC(8fd5b531) SHA1(92cae3f6dac7f89b559063de3be2f38587536b65) )
+ ROM_LOAD16_BYTE( "mt2-sh0-.ic14", 0x00001, 0x10000, CRC(1ecbea43) SHA1(8d66ef419f75569f2c83a89c3985742b8a47914f) )
+ ROM_LOAD16_BYTE( "mt2-sl0-.ic17", 0x00000, 0x10000, CRC(8fd5b531) SHA1(92cae3f6dac7f89b559063de3be2f38587536b65) )
ROM_REGION( 0x100000, "gfx1", 0 ) /* Tiles */
- ROM_LOAD( "c0", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
- ROM_LOAD( "c1", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
- ROM_LOAD( "c2", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
- ROM_LOAD( "c3", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
+ ROM_LOAD( "hr0.ic9", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
+ ROM_LOAD( "hr1.ic10", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
+ ROM_LOAD( "hr2.ic11", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
+ ROM_LOAD( "hr3.ic12", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
ROM_REGION( 0x400000, "gfx2", 0 ) /* Sprites */
- ROM_LOAD( "k30", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
- ROM_LOAD( "k31", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
- ROM_LOAD( "k32", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
- ROM_LOAD( "k33", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
+ ROM_LOAD( "k30.ic42", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
+ ROM_LOAD( "k31.ic43", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
+ ROM_LOAD( "k32.ic44", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
+ ROM_LOAD( "k33.ic45", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
ROM_REGION( 0x80000, "irem", 0 )
- ROM_LOAD( "da", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
+ ROM_LOAD( "k0d.ic8", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
ROM_REGION( 0x4000, "eeprom", 0 ) /* D28C64C-20 EEPROM */
ROM_LOAD( "mt2eep", 0x000000, 0x800, CRC(208af971) SHA1(69384cac24b7af35a031f9b60e035131a8b10cb2) )
@@ -1246,6 +1246,45 @@ ROM_START( majtitl2 )
ROM_LOAD( "pal16l8-m92-b-7h.ic47", 0x0800, 0x0104, NO_DUMP ) /* PAL is read protected */
ROM_END
+
+ROM_START( majtitl2b )
+ ROM_REGION( 0x100000, "maincpu", 0 )
+ ROM_LOAD16_BYTE( "mt2-h0-e.ic34", 0x00001, 0x40000, CRC(f6c3a28c) SHA1(27ef76c120d27119830e6b17353d2a6412cbcbbe) )
+ ROM_LOAD16_BYTE( "mt2-l0-e.ic31", 0x00000, 0x40000, CRC(0a061384) SHA1(b033215bb99e645a00e7a364cebb895432917fd4) )
+ ROM_LOAD16_BYTE( "mt2-h1-.ic33", 0x80001, 0x40000, CRC(9ba8e1f2) SHA1(ae86697a97223d236e2e6dd33ddb8105b9f926cb) )
+ ROM_LOAD16_BYTE( "mt2-l1-.ic32", 0x80000, 0x40000, CRC(e4e00626) SHA1(e8c6c7ad6a367da4036915a155c8695ad90ae47b) )
+
+ ROM_REGION( 0x20000, "soundcpu", 0 )
+ ROM_LOAD16_BYTE( "mt2-sh0-.ic14", 0x00001, 0x10000, CRC(1ecbea43) SHA1(8d66ef419f75569f2c83a89c3985742b8a47914f) )
+ ROM_LOAD16_BYTE( "mt2-sl0-.ic17", 0x00000, 0x10000, CRC(8fd5b531) SHA1(92cae3f6dac7f89b559063de3be2f38587536b65) )
+
+ ROM_REGION( 0x100000, "gfx1", 0 ) /* Tiles */
+ ROM_LOAD( "hr0.ic9", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
+ ROM_LOAD( "hr1.ic10", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
+ ROM_LOAD( "hr2.ic11", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
+ ROM_LOAD( "hr3.ic12", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
+
+ ROM_REGION( 0x400000, "gfx2", 0 ) /* Sprites */
+ ROM_LOAD( "k30.ic42", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
+ ROM_LOAD( "k31.ic43", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
+ ROM_LOAD( "k32.ic44", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
+ ROM_LOAD( "k33.ic45", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
+
+ ROM_REGION( 0x80000, "irem", 0 )
+ ROM_LOAD( "k0d.ic8", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
+
+ ROM_REGION( 0x4000, "eeprom", 0 ) /* D28C64C-20 EEPROM */
+ ROM_LOAD( "mt2eep", 0x000000, 0x800, CRC(208af971) SHA1(69384cac24b7af35a031f9b60e035131a8b10cb2) )
+
+ ROM_REGION( 0x0c00, "plds", 0 )
+ ROM_LOAD( "pal16l8-m92-a-3m.ic11", 0x0000, 0x0104, NO_DUMP ) /* PAL is read protected */
+ ROM_LOAD( "pal16l8-m92-a-7j.ic41", 0x0200, 0x0104, NO_DUMP ) /* PAL is read protected */
+ ROM_LOAD( "pal16l8-m92-a-9j.ic51", 0x0400, 0x0104, NO_DUMP ) /* PAL is read protected */
+ ROM_LOAD( "pal16l8-m92-b-2l.ic7", 0x0600, 0x0104, NO_DUMP ) /* PAL is read protected */
+ ROM_LOAD( "pal16l8-m92-b-7h.ic47", 0x0800, 0x0104, NO_DUMP ) /* PAL is read protected */
+ROM_END
+
+
// this set matches the 'majtitl2' except for the soundcpu roms, which are for a different CPU
ROM_START( majtitl2a )
ROM_REGION( 0x100000, "maincpu", 0 ) // labels differ from 'majtitl2' (maybe the 'B' has faded, or was never there?)
@@ -1259,20 +1298,20 @@ ROM_START( majtitl2a )
ROM_LOAD16_BYTE( "mt2sl0-a", 0x00000, 0x10000, CRC(f4ecd7b5) SHA1(250afed334d37b0309f4733b41ba03319b51360f))
ROM_REGION( 0x100000, "gfx1", 0 ) /* Tiles */
- ROM_LOAD( "c0", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
- ROM_LOAD( "c1", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
- ROM_LOAD( "c2", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
- ROM_LOAD( "c3", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
+ ROM_LOAD( "hr0.ic9", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
+ ROM_LOAD( "hr1.ic10", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
+ ROM_LOAD( "hr2.ic11", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
+ ROM_LOAD( "hr3.ic12", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
ROM_REGION( 0x400000, "gfx2", 0 ) /* Sprites */
- ROM_LOAD( "k30", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
- ROM_LOAD( "k31", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
- ROM_LOAD( "k32", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
- ROM_LOAD( "k33", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
+ ROM_LOAD( "k30.ic42", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
+ ROM_LOAD( "k31.ic43", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
+ ROM_LOAD( "k32.ic44", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
+ ROM_LOAD( "k33.ic45", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
ROM_REGION( 0x80000, "irem", 0 )
- ROM_LOAD( "da", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
-
+ ROM_LOAD( "k0d.ic8", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
+
ROM_REGION( 0x4000, "eeprom", 0 ) /* D28C64C-20 EEPROM */
ROM_LOAD( "mt2eep", 0x000000, 0x800, CRC(208af971) SHA1(69384cac24b7af35a031f9b60e035131a8b10cb2) )
@@ -1292,23 +1331,23 @@ ROM_START( majtitl2j )
ROM_LOAD16_BYTE( "is-l1.5j", 0x80000, 0x40000, CRC(e4e00626) SHA1(e8c6c7ad6a367da4036915a155c8695ad90ae47b) )
ROM_REGION( 0x20000, "soundcpu", 0 )
- ROM_LOAD16_BYTE( "mt2sh0", 0x00001, 0x10000, CRC(1ecbea43) SHA1(8d66ef419f75569f2c83a89c3985742b8a47914f) )
- ROM_LOAD16_BYTE( "mt2sl0", 0x00000, 0x10000, CRC(8fd5b531) SHA1(92cae3f6dac7f89b559063de3be2f38587536b65) )
+ ROM_LOAD16_BYTE( "mt2-sh0-.ic14", 0x00001, 0x10000, CRC(1ecbea43) SHA1(8d66ef419f75569f2c83a89c3985742b8a47914f) )
+ ROM_LOAD16_BYTE( "mt2-sl0-.ic17", 0x00000, 0x10000, CRC(8fd5b531) SHA1(92cae3f6dac7f89b559063de3be2f38587536b65) )
ROM_REGION( 0x100000, "gfx1", 0 ) /* Tiles */
- ROM_LOAD( "c0", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
- ROM_LOAD( "c1", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
- ROM_LOAD( "c2", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
- ROM_LOAD( "c3", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
+ ROM_LOAD( "hr0.ic9", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
+ ROM_LOAD( "hr1.ic10", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
+ ROM_LOAD( "hr2.ic11", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
+ ROM_LOAD( "hr3.ic12", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
ROM_REGION( 0x400000, "gfx2", 0 ) /* Sprites */
- ROM_LOAD( "k30", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
- ROM_LOAD( "k31", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
- ROM_LOAD( "k32", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
- ROM_LOAD( "k33", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
+ ROM_LOAD( "k30.ic42", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
+ ROM_LOAD( "k31.ic43", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
+ ROM_LOAD( "k32.ic44", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
+ ROM_LOAD( "k33.ic45", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
ROM_REGION( 0x80000, "irem", 0 )
- ROM_LOAD( "da", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
+ ROM_LOAD( "k0d.ic8", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
ROM_REGION( 0x4000, "eeprom", 0 ) /* D28C64C-20 EEPROM */
ROM_LOAD( "mt2eep", 0x000000, 0x800, CRC(208af971) SHA1(69384cac24b7af35a031f9b60e035131a8b10cb2) )
@@ -1329,23 +1368,23 @@ ROM_START( skingame2 )
ROM_LOAD16_BYTE( "is-l1.5j", 0x80000, 0x40000, CRC(e4e00626) SHA1(e8c6c7ad6a367da4036915a155c8695ad90ae47b) )
ROM_REGION( 0x20000, "soundcpu", 0 )
- ROM_LOAD16_BYTE( "mt2sh0", 0x00001, 0x10000, CRC(1ecbea43) SHA1(8d66ef419f75569f2c83a89c3985742b8a47914f) )
- ROM_LOAD16_BYTE( "mt2sl0", 0x00000, 0x10000, CRC(8fd5b531) SHA1(92cae3f6dac7f89b559063de3be2f38587536b65) )
+ ROM_LOAD16_BYTE( "mt2-sh0-.ic14", 0x00001, 0x10000, CRC(1ecbea43) SHA1(8d66ef419f75569f2c83a89c3985742b8a47914f) )
+ ROM_LOAD16_BYTE( "mt2-sl0-.ic17", 0x00000, 0x10000, CRC(8fd5b531) SHA1(92cae3f6dac7f89b559063de3be2f38587536b65) )
ROM_REGION( 0x100000, "gfx1", 0 ) /* Tiles */
- ROM_LOAD( "c0", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
- ROM_LOAD( "c1", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
- ROM_LOAD( "c2", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
- ROM_LOAD( "c3", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
+ ROM_LOAD( "hr0.ic9", 0x000000, 0x40000, CRC(7e61e4b5) SHA1(d0164862937bd506e701777c51dea1ddb3e2eda4) )
+ ROM_LOAD( "hr1.ic10", 0x040000, 0x40000, CRC(0a667564) SHA1(d122e0619ae5cc0202f30270933784c954eb1e5d) )
+ ROM_LOAD( "hr2.ic11", 0x080000, 0x40000, CRC(5eb44312) SHA1(75b584b63d4f4f2236a679235461f11004aa317f) )
+ ROM_LOAD( "hr3.ic12", 0x0c0000, 0x40000, CRC(f2866294) SHA1(75e0071bf6282c93034dc7e73466af0f51046d01) )
ROM_REGION( 0x400000, "gfx2", 0 ) /* Sprites */
- ROM_LOAD( "k30", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
- ROM_LOAD( "k31", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
- ROM_LOAD( "k32", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
- ROM_LOAD( "k33", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
+ ROM_LOAD( "k30.ic42", 0x000000, 0x100000, CRC(8c9a2678) SHA1(e8ed119c16ddd59af9e83d243e7be25974f7cbf8) )
+ ROM_LOAD( "k31.ic43", 0x100000, 0x100000, CRC(5455df78) SHA1(9e49bde1d5a310ff611932c3429601fbddf3a7b1) )
+ ROM_LOAD( "k32.ic44", 0x200000, 0x100000, CRC(3a258c41) SHA1(1d93fcd01728929848b782870f80a8cd0af44796) )
+ ROM_LOAD( "k33.ic45", 0x300000, 0x100000, CRC(c1e91a14) SHA1(1f0dbd99d8c5067dc3f8795fc3f1bd4466f64156) )
ROM_REGION( 0x80000, "irem", 0 )
- ROM_LOAD( "da", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
+ ROM_LOAD( "k0d.ic8", 0x000000, 0x80000, CRC(713b9e9f) SHA1(91384d67d4ba9c7d926fbecb077293c661b8ec83) )
ROM_REGION( 0x4000, "eeprom", 0 ) /* D28C64C-20 EEPROM */
ROM_LOAD( "mt2eep", 0x000000, 0x800, CRC(208af971) SHA1(69384cac24b7af35a031f9b60e035131a8b10cb2) )
@@ -2269,8 +2308,9 @@ GAME( 1992, gunhohki, mysticri, mysticri, mysticri, m92_state, m92, RO
// main code is also significantly different to the supported original set, so it might just be a legitimate early revision on a cheap board
GAME( 1992, mysticrib,mysticri, mysticri, mysticri, m92_state, m92, ROT0, "Irem", "Mystic Riders (bootleg?)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
-GAME( 1992, majtitl2, 0, majtitl2, majtitl2, m92_state, majtitl2, ROT0, "Irem", "Major Title 2 (World)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL) // Nanao 08J27291A7 017 9227NK700 sound CPU
-GAME( 1992, majtitl2a,majtitl2, mysticri, majtitl2, m92_state, majtitl2, ROT0, "Irem", "Major Title 2 (World, alt sound CPU)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL) // Nanao 08J27291A6 016 9217NK700 sound CPU
+GAME( 1992, majtitl2, 0, majtitl2, majtitl2, m92_state, majtitl2, ROT0, "Irem", "Major Title 2 (World, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL) // Nanao 08J27291A7 017 9227NK700 sound CPU
+GAME( 1992, majtitl2a,majtitl2, mysticri, majtitl2, m92_state, majtitl2, ROT0, "Irem", "Major Title 2 (World, set 1, alt sound CPU)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL) // same as set 1 but for the Nanao 08J27291A6 016 9217NK700 sound CPU
+GAME( 1992, majtitl2b,majtitl2, majtitl2, majtitl2, m92_state, majtitl2, ROT0, "Irem", "Major Title 2 (World, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL)
GAME( 1992, majtitl2j,majtitl2, majtitl2, majtitl2, m92_state, majtitl2, ROT0, "Irem", "Major Title 2 (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL)
GAME( 1992, skingame, majtitl2, majtitl2, majtitl2, m92_state, majtitl2, ROT0, "Irem America", "The Irem Skins Game (US set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
GAME( 1992, skingame2,majtitl2, majtitl2, majtitl2, m92_state, majtitl2, ROT0, "Irem America", "The Irem Skins Game (US set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
diff --git a/src/mame/drivers/macs.cpp b/src/mame/drivers/macs.cpp
index 0bcdb63d3ce..349646427ad 100644
--- a/src/mame/drivers/macs.cpp
+++ b/src/mame/drivers/macs.cpp
@@ -60,6 +60,8 @@ KISEKAE -- info
#include "emu.h"
#include "machine/st0016.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
class macs_state : public driver_device
{
@@ -67,8 +69,9 @@ public:
macs_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_ram2(*this, "ram2"),
- m_maincpu(*this,"maincpu")
-
+ m_maincpu(*this,"maincpu"),
+ m_cart1(*this, "slot_a"),
+ m_cart2(*this, "slot_b")
{ }
UINT8 m_mux_data;
@@ -84,17 +87,18 @@ public:
DECLARE_DRIVER_INIT(kisekaem);
DECLARE_DRIVER_INIT(macs2);
DECLARE_MACHINE_RESET(macs);
+ DECLARE_MACHINE_START(macs);
UINT32 screen_update_macs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
optional_device<st0016_cpu_device> m_maincpu;
+ optional_device<generic_slot_device> m_cart1;
+ optional_device<generic_slot_device> m_cart2;
};
-
-
static ADDRESS_MAP_START( macs_mem, AS_PROGRAM, 8, macs_state )
AM_RANGE(0x0000, 0x7fff) AM_ROMBANK("bank4")
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
@@ -111,7 +115,7 @@ ADDRESS_MAP_END
WRITE8_MEMBER(macs_state::rambank_w)
{
- membank("bank3")->set_base(&m_ram1[0x10000+(data&1)*0x800] );
+ membank("bank3")->set_entry(2 + (data & 1));
}
READ8_MEMBER(macs_state::macs_input_r)
@@ -149,16 +153,12 @@ READ8_MEMBER(macs_state::macs_input_r)
WRITE8_MEMBER(macs_state::macs_rom_bank_w)
{
- membank("bank1")->set_base(memregion("maincpu")->base() + (data* 0x4000) + macs_cart_slot*0x400000 );
-
-// m_st0016_rom_bank=data;
+ membank("bank1")->set_entry(macs_cart_slot * 0x100 + data);
}
WRITE8_MEMBER(macs_state::macs_output_w)
{
- UINT8 *ROM = memregion("maincpu")->base();
-
- switch(offset)
+ switch(offset)
{
case 0:
/*
@@ -169,16 +169,16 @@ WRITE8_MEMBER(macs_state::macs_output_w)
if(m_rev == 1)
{
- /* FIXME: dunno if this RAM bank is right, DASM tracking made on the POST screens indicates that there's just one RAM bank,
- but then MACS2 games locks up. */
- membank("bank3")->set_base(&m_ram1[((data&0x20)>>5)*0x1000+0x000] );
+ /* FIXME: dunno if this RAM bank is right, DASM tracking made on the POST
+ screens indicates that there's just one RAM bank, but then MACS2 games
+ locks up. */
+ membank("bank3")->set_entry(BIT(data, 5));
macs_cart_slot = (data & 0xc) >> 2;
-
- membank("bank4")->set_base(&ROM[macs_cart_slot*0x400000] );
+ membank("bank4")->set_entry(macs_cart_slot * 0x100);
}
- membank("bank2")->set_base(&m_ram1[((data&0x20)>>5)*0x1000+0x800] );
+ membank("bank2")->set_entry(BIT(data, 5));
break;
case 2: m_mux_data = data; break;
@@ -492,6 +492,7 @@ static MACHINE_CONFIG_START( macs, macs_state )
MCFG_CPU_VBLANK_INT_DRIVER("screen", macs_state, irq0_line_hold)
+ MCFG_MACHINE_START_OVERRIDE(macs_state,macs)
MCFG_MACHINE_RESET_OVERRIDE(macs_state,macs)
/* video hardware */
@@ -502,91 +503,90 @@ static MACHINE_CONFIG_START( macs, macs_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 128*8-1, 0*8, 128*8-1)
MCFG_SCREEN_UPDATE_DRIVER(macs_state, screen_update_macs)
MCFG_SCREEN_PALETTE("maincpu:palette")
-MACHINE_CONFIG_END
+ MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT("slot_a", generic_plain_slot, "macs_cart", "rom")
+ MCFG_SET_IMAGE_LOADABLE(FALSE)
+ MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT("slot_b", generic_plain_slot, "macs_cart", "rom")
+ MCFG_SET_IMAGE_LOADABLE(FALSE)
+
+MACHINE_CONFIG_END
#define MACS_BIOS \
- ROM_REGION( 0x1000000, "user1", 0 ) \
+ ROM_REGION( 0x1000000, "bios", 0 ) \
ROM_LOAD16_BYTE( "macsos_l.u43", 0x00000, 0x80000, CRC(0b5aed5e) SHA1(042e705017ee34656e2c6af45825bb2dd3447747) ) \
ROM_LOAD16_BYTE( "macsos_h.u44", 0x00001, 0x80000, CRC(538b68e4) SHA1(a0534147791e94e726f49451d0e95671ae0a87d5) )
+
#define MACS2_BIOS \
- ROM_REGION( 0x1000000, "user1", 0 ) \
+ ROM_REGION( 0x1000000, "bios", 0 ) \
ROM_LOAD16_BYTE( "macs2os_l.bin", 0x00000, 0x80000, NO_DUMP ) \
ROM_LOAD16_BYTE( "macs2os_h.bin", 0x00001, 0x80000, NO_DUMP )
+
ROM_START( macsbios )
MACS_BIOS
- ROM_REGION( 0x400000, "user2", ROMREGION_ERASEFF ) // Slot A
- ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) // Slot B
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user1", 0x000000, 0x000000, 0x400000 ) // Bios
+ ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
+
+ ROM_REGION( 0x400000, "slot_a:rom", ROMREGION_ERASEFF )
+ ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
ROM_END
ROM_START( mac2bios )
MACS2_BIOS
- ROM_REGION( 0x400000, "user2", ROMREGION_ERASEFF ) // Slot A
- ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) // Slot B
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user1", 0x000000, 0x000000, 0x400000 ) // Bios
+ ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
+
+ ROM_REGION( 0x400000, "slot_a:rom", ROMREGION_ERASEFF )
+ ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
ROM_END
ROM_START( kisekaem )
MACS_BIOS
- ROM_REGION( 0x400000, "user2", 0 ) // Slot A
- ROM_LOAD16_BYTE( "am-mj.u8", 0x000000, 0x100000, CRC(3cf85151) SHA1(e05400065c384730f04ef565db5ba27eb3973d15) )
- ROM_LOAD16_BYTE( "am-mj.u7", 0x000001, 0x100000, CRC(4b645354) SHA1(1dbf9141c3724e5dff2cd8066117fb1b94671a80) )
- ROM_LOAD16_BYTE( "am-mj.u6", 0x200000, 0x100000, CRC(23b3aa24) SHA1(bfabdb16f9b1b60230bb636a944ab46fdfda49d7) )
- ROM_LOAD16_BYTE( "am-mj.u5", 0x200001, 0x100000, CRC(b4d53e29) SHA1(d7683fdd5531bf1aa0ef1e4e6f517b31e2d5829e) )
-
-
- ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) // Slot B
-
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user1", 0x000000, 0x000000, 0x400000 ) // Bios
- ROM_COPY( "user2", 0x000000, 0x400000, 0x400000 ) // Slot A
+ ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
+
+ ROM_REGION( 0x400000, "slot_a:rom", 0 )
+ ROM_LOAD16_BYTE( "am-mj.u8", 0x000000, 0x100000, CRC(3cf85151) SHA1(e05400065c384730f04ef565db5ba27eb3973d15) )
+ ROM_LOAD16_BYTE( "am-mj.u7", 0x000001, 0x100000, CRC(4b645354) SHA1(1dbf9141c3724e5dff2cd8066117fb1b94671a80) )
+ ROM_LOAD16_BYTE( "am-mj.u6", 0x200000, 0x100000, CRC(23b3aa24) SHA1(bfabdb16f9b1b60230bb636a944ab46fdfda49d7) )
+ ROM_LOAD16_BYTE( "am-mj.u5", 0x200001, 0x100000, CRC(b4d53e29) SHA1(d7683fdd5531bf1aa0ef1e4e6f517b31e2d5829e) )
+ ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
ROM_END
ROM_START( kisekaeh )
MACS_BIOS
- ROM_REGION( 0x400000, "user2", 0 ) // Slot A
- ROM_LOAD16_BYTE( "kh-u8.bin", 0x000000, 0x100000, CRC(601b9e6a) SHA1(54508a6db3928f78897df64ce400791e4789d0f6) )
- ROM_LOAD16_BYTE( "kh-u7.bin", 0x000001, 0x100000, CRC(8f6e4bb3) SHA1(361545189feeda0887f930727d25655309b84629) )
- ROM_LOAD16_BYTE( "kh-u6.bin", 0x200000, 0x100000, CRC(8e700204) SHA1(876e5530d749828de077293cb109a71b67cef140) )
- ROM_LOAD16_BYTE( "kh-u5.bin", 0x200001, 0x100000, CRC(709bf7c8) SHA1(0a93e0c4f9be22a3302a1c5d2a6ec4739b202ea8) )
-
-
- ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) // Slot B
-
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user1", 0x000000, 0x000000, 0x400000 ) // Bios
- ROM_COPY( "user2", 0x000000, 0x400000, 0x400000 ) // Slot A
+ ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
+
+ ROM_REGION( 0x400000, "slot_a:rom", 0 )
+ ROM_LOAD16_BYTE( "kh-u8.bin", 0x000000, 0x100000, CRC(601b9e6a) SHA1(54508a6db3928f78897df64ce400791e4789d0f6) )
+ ROM_LOAD16_BYTE( "kh-u7.bin", 0x000001, 0x100000, CRC(8f6e4bb3) SHA1(361545189feeda0887f930727d25655309b84629) )
+ ROM_LOAD16_BYTE( "kh-u6.bin", 0x200000, 0x100000, CRC(8e700204) SHA1(876e5530d749828de077293cb109a71b67cef140) )
+ ROM_LOAD16_BYTE( "kh-u5.bin", 0x200001, 0x100000, CRC(709bf7c8) SHA1(0a93e0c4f9be22a3302a1c5d2a6ec4739b202ea8) )
+ ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
ROM_END
ROM_START( cultname ) // uses printer - two different games ? (slot a - checks for printer, slot b - not)
MACS_BIOS
- ROM_REGION( 0x400000, "user2", 0 ) // Slot A
+ ROM_REGION( 0x1000000, "maincpu", 0 )
+ ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
+
+ ROM_REGION( 0x400000, "slot_a:rom", 0 )
ROM_LOAD16_BYTE( "cult-d0.u8", 0x000000, 0x100000, CRC(394bc1a6) SHA1(98df5406862234815b46c7b0ac0b19e4b597d1b6) )
ROM_LOAD16_BYTE( "cult-d1.u7", 0x000001, 0x100000, CRC(f628133b) SHA1(f06e20212074e5d95cc7d419ac8ce98fb9be3b62) )
ROM_LOAD16_BYTE( "cult-d2.u6", 0x200000, 0x100000, CRC(c5521bc6) SHA1(7554b56b0201b7d81754defa2244fb7ff7452bf6) )
ROM_LOAD16_BYTE( "cult-d3.u5", 0x200001, 0x100000, CRC(4325b09b) SHA1(45699a0444a221f893724754c917d33041cabcb9) )
-
- ROM_REGION( 0x400000, "user3", 0 ) // Slot B
+ ROM_REGION( 0x400000, "slot_b:rom", 0 )
ROM_LOAD16_BYTE( "cult-g0.u8", 0x000000, 0x100000, CRC(f5ab977b) SHA1(e7ee758cc2864500b339e236b944f98df9a1c10e) )
ROM_LOAD16_BYTE( "cult-g1.u7", 0x000001, 0x100000, CRC(32ae15a4) SHA1(061992efec1ed5527f200bf4c111344b156e759d) )
ROM_LOAD16_BYTE( "cult-g2.u6", 0x200000, 0x100000, CRC(30ed056d) SHA1(71735339bb501b94402ef403b5a2a60effa39c36) )
ROM_LOAD16_BYTE( "cult-g3.u5", 0x200001, 0x100000, CRC(fe58b418) SHA1(512f5c544cfafaa98bd2b3791ff1cf67adecec8d) )
-
-
- ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user1", 0x000000, 0x000000, 0x400000 ) // Bios
- ROM_COPY( "user2", 0x000000, 0x400000, 0x400000 ) // Slot A
- ROM_COPY( "user3", 0x000000, 0x800000, 0x400000 ) // Slot B
ROM_END
/* these are listed as MACS2 sub-boards, is it the same? - it's not ;) */
@@ -594,31 +594,31 @@ ROM_END
ROM_START( yuka )
MACS2_BIOS
- ROM_REGION( 0x400000, "user2", 0 ) // Slot A
+ ROM_REGION( 0x400000, "slot_a:rom", 0 )
ROM_LOAD16_BYTE( "yu-ka_2.u6", 0x000001, 0x100000, CRC(c3c5728b) SHA1(e53cdcae556f34bab45d9342fd78ec29b6543c46) )
ROM_LOAD16_BYTE( "yu-ka_4.u5", 0x000000, 0x100000, CRC(7e391ee6) SHA1(3a0c122c9d0e2a91df6d8039fb958b6d00997747) )
ROM_LOAD16_BYTE( "yu-ka_1.u8", 0x200001, 0x100000, CRC(bccd1b15) SHA1(02511f3be60c53b5f5d90f12f0648f6e184ca667) )
ROM_LOAD16_BYTE( "yu-ka_3.u7", 0x200000, 0x100000, CRC(45b8263e) SHA1(59e1846c91dc39a086e8306260506673eb91de0b) )
- ROM_REGION( 0x400000, "user3", ROMREGION_ERASE00 ) // Slot B
+ ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASE00 )
- ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user2", 0x000000, 0x000000, 0x400000 ) // Slot A
+ ROM_REGION( 0x1000000, "maincpu", 0 )
+ ROM_COPY( "slot_a:rom", 0x000000, 0x000000, 0x400000 )
ROM_END
ROM_START( yujan )
MACS2_BIOS
- ROM_REGION( 0x400000, "user2", 0 ) // Slot A
+ ROM_REGION( 0x400000, "slot_a:rom", 0 )
ROM_LOAD16_BYTE( "yu-jan_2.u6", 0x000001, 0x100000, CRC(2f4a8d4b) SHA1(4b328a253b1980a76f46a9a98a7f486813894a33) )
ROM_LOAD16_BYTE( "yu-jan_4.u5", 0x000000, 0x100000, CRC(226df87b) SHA1(a887728f1ea2ef5f6b4dcd6b5b61586f5e8f267d) )
ROM_LOAD16_BYTE( "yu-jan_1.u8", 0x200001, 0x100000, CRC(feeeee6a) SHA1(e9613f50d6d2e62fac6b529f81486250cfe83819) )
ROM_LOAD16_BYTE( "yu-jan_3.u7", 0x200000, 0x100000, CRC(1c1d6997) SHA1(9b07ae6b9ef1c0b57fbaa5fd0bcf1d2d7f17351f) )
- ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) // Slot B
+ ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
- ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user2", 0x000000, 0x000000, 0x400000 ) // Slot A
+ ROM_REGION( 0x1000000, "maincpu", 0 )
+ ROM_COPY( "slot_a:rom", 0x000000, 0x000000, 0x400000 )
ROM_END
#if 0
@@ -637,10 +637,29 @@ static const UINT8 ramdata[160]=
};
#endif
+MACHINE_START_MEMBER(macs_state,macs)
+{
+ membank("bank1")->configure_entries(0 , 256, memregion("maincpu")->base(), 0x4000);
+ membank("bank1")->configure_entries(256, 256, m_cart1->get_rom_base(), 0x4000);
+ membank("bank1")->configure_entries(512, 256, m_cart2->get_rom_base(), 0x4000);
+ membank("bank1")->set_entry(0);
+
+ membank("bank2")->configure_entries(0, 2, m_ram1.get() + 0x2000, 0x800);
+ membank("bank2")->set_entry(0);
+
+ membank("bank3")->configure_entries(0, 4, m_ram1.get(), 0x800);
+ membank("bank3")->set_entry(2);
+
+ membank("bank4")->configure_entries(0 , 256, memregion("maincpu")->base(), 0x4000);
+ membank("bank4")->configure_entries(256, 256, m_cart1->get_rom_base(), 0x4000);
+ membank("bank4")->configure_entries(512, 256, m_cart2->get_rom_base(), 0x4000);
+ membank("bank4")->set_entry(0);
+}
+
MACHINE_RESET_MEMBER(macs_state,macs)
{
- UINT8 *macs_ram1 = m_ram1.get();
#if 0
+ UINT8 *macs_ram1 = m_ram1.get();
UINT8 *macs_ram2 = m_ram2;
/*
BIOS ram init:
@@ -670,11 +689,11 @@ MACHINE_RESET_MEMBER(macs_state,macs)
730E: ED B0 ldir
...
*/
- memcpy(macs_ram1 + 0x0e9f, memregion("user1")->base()+0x7327, 0xc7);
- memcpy(macs_ram1 + 0x1e9f, memregion("user1")->base()+0x7327, 0xc7);
+ memcpy(macs_ram1 + 0x0e9f, memregion("bios")->base()+0x7327, 0xc7);
+ memcpy(macs_ram1 + 0x1e9f, memregion("bios")->base()+0x7327, 0xc7);
- memcpy(macs_ram1 + 0x0800, memregion("user1")->base()+0x73fa, 0x507);
- memcpy(macs_ram1 + 0x1800, memregion("user1")->base()+0x73fa, 0x507);
+ memcpy(macs_ram1 + 0x0800, memregion("bios")->base()+0x73fa, 0x507);
+ memcpy(macs_ram1 + 0x1800, memregion("bios")->base()+0x73fa, 0x507);
#define MAKEJMP(n,m) macs_ram2[(n) - 0xe800 + 0]=0xc3;\
macs_ram2[(n) - 0xe800 + 1]=(m)&0xff;\
@@ -709,11 +728,6 @@ MACHINE_RESET_MEMBER(macs_state,macs)
macs_ram1[0x0ff9]=0x07;
macs_ram1[0x1ff9]=0x07;
#endif
-
- membank("bank1")->set_base(memregion("maincpu")->base() );
- membank("bank2")->set_base(macs_ram1+0x800);
- membank("bank3")->set_base(macs_ram1+0x10000);
- membank("bank4")->set_base(memregion("maincpu")->base() );
}
DRIVER_INIT_MEMBER(macs_state,macs)
diff --git a/src/mame/drivers/madmotor.cpp b/src/mame/drivers/madmotor.cpp
index 34d50a6e22f..dd3e60bafff 100644
--- a/src/mame/drivers/madmotor.cpp
+++ b/src/mame/drivers/madmotor.cpp
@@ -255,19 +255,18 @@ static MACHINE_CONFIG_START( madmotor, madmotor_state )
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,1,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 1, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen3", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,2,1);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 2, 1)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 3);
+ MCFG_DECO_MXC06_GFX_REGION(3)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
diff --git a/src/mame/drivers/magic10.cpp b/src/mame/drivers/magic10.cpp
index 6005f807aac..a7dc0d46472 100644
--- a/src/mame/drivers/magic10.cpp
+++ b/src/mame/drivers/magic10.cpp
@@ -2,82 +2,82 @@
// copyright-holders:Pierpaolo Prazzoli, Roberto Fresca
/****************************************************************************
- MAGIC'S 10
- ----------
+ MAGIC'S 10
+ ----------
- Driver by Pierpaolo Prazzoli.
- Additional work by Roberto Fresca.
+ Driver by Pierpaolo Prazzoli.
+ Additional work by Roberto Fresca.
- Supported games:
-
- Magic's 10 (ver. 16.15), 1995, AWP Games.
- Magic's 10 (ver. 16.45), 1995, AWP Games.
- Magic's 10 (ver. 16.54), 1995, AWP Games.
- Magic's 10 (ver. 16.55), 1995, AWP Games.
- Magic's 10 2, 1997, ABM Games.
- Music Sort (ver 2.02, English), 1995, ABM Games.
- Super Pool (9743 rev.01), 1997, ABM Games.
- Hot Slot (ver. 05.01), 1996, ABM Electronics.
- Magic Colors (ver. 1.7a), 1999, Unknown.
- Super Gran Safari (ver 3.11), 1996, New Impeuropex Corp.
+ Supported games:
+ Magic's 10 (ver. 16.15), 1995, AWP Games.
+ Magic's 10 (ver. 16.45), 1995, AWP Games.
+ Magic's 10 (ver. 16.54), 1995, AWP Games.
+ Magic's 10 (ver. 16.55), 1995, AWP Games.
+ Magic's 10 2, 1997, ABM Games.
+ Music Sort (ver 2.02, English), 1995, ABM Games.
+ Super Pool (9743 rev.01), 1997, ABM Games.
+ Hot Slot (ver. 05.01), 1996, ABM Electronics.
+ Magic Colors (ver. 1.7a), 1999, Unknown.
+ Super Gran Safari (ver 3.11), 1996, New Impeuropex Corp.
+ Luna Park (ver. 1.2), 1998, ABM Games.
*****************************************************************************
+ Game Notes
+ ==========
- Game Notes
- ==========
-
-
- * Magic's 10
-
- First time boot instructions:
-
- - Switch "Disable Free Play" to ON
- - Enter a coin
- - Press Collect to get the 1st game over
+ * Magic's 10
+ First time boot instructions:
+ - Switch "Disable Free Play" to ON
+ - Enter a coin
+ - Press Collect to get the 1st game over
- * Super Gran Safari
- There is a input sequence to initialize the game.
+ * Super Gran Safari
- The code expects a mask of 0x4c00 in the DIP switches port to allow
- enter the sequence, so DIP switches must be on default position.
+ There is a input sequence to initialize the game.
- When you see the black screen, enter the following sequence:
- HOLD 4 (key V), HOLD 2 (key X), HOLD 5 (key B), START (key 1).
+ The code expects a mask of 0x4c00 in the DIP switches port to allow
+ enter the sequence, so DIP switches must be on default position.
- The code is checking for a 5th entry. In fact expects HOLD 3 as the first
- entry, then the rest listed above. I don't know why bypass the first one.
- Input port bits are checked in the following order: 2, 3, 1, 4, 5.
+ When you see the black screen, enter the following sequence:
+ HOLD 4 (key V), HOLD 2 (key X), HOLD 5 (key B), START (key 1).
- The player can play the "Super Game" to grab the points.
- In this subgame, you must to hit the lion to get the prize.
- For now, you must miss the shot till hopper & ticket dispenser are properly emulated.
+ The code is checking for a 5th entry. In fact expects HOLD 3 as the first
+ entry, then the rest listed above. I don't know why bypass the first one.
+ Input port bits are checked in the following order: 2, 3, 1, 4, 5.
+ The player can play the "Super Game" to grab the points.
+ In this subgame, you must to hit the lion to get the prize.
+ For now, you must miss the shot till hopper & ticket dispenser are properly emulated.
*****************************************************************************
+ TODO:
- TODO:
+ - Ticket / Hopper support.
+ - Some unknown writes
+ - Finish magic10_2 (association coin - credits handling its inputs
+ and some reads that drive the note displayed?)
+ - Dump/decap/trojan the MCU in the later games (magic102, suprpool, hotslot, mcolors).
+ The MCU shares memory addresses at $500000-$50001f (in magic102)
+ It can't be simulated with a high level of confidence because all the game logic is
+ in there, including rngs for the cards and combinations for the points.
+ - Priorities,likely to be hardwired with the color writes (0=tile has the
+ highest priority).
+ - Define parent/clone relationship between Magic's 10 and Music Sort.
- - Ticket / Hopper support.
- - Some unknown writes
- - Finish magic10_2 (association coin - credits handling its inputs
- and some reads that drive the note displayed?)
- - Dump/decap/trojan the MCU in the later games (magic102, suprpool, hotslot, mcolors).
- The MCU shares memory addresses at $500000-$50001f (in magic102)
- It can't be simulated with a high level of confidence because all the game logic is
- in there, including rngs for the cards and combinations for the points.
- - Priorities,likely to be hardwired with the color writes (0=tile has the
- highest priority).
- - Define parent/clone relationship between Magic's 10 and Music Sort.
+****************************************************************************/
-****************************************************************************/
+#define MAIN_CLOCK XTAL_20MHz
+#define AUX_CLOCK XTAL_30MHz
+
+#define CPU_CLOCK MAIN_CLOCK/2
#include "emu.h"
@@ -249,22 +249,22 @@ WRITE16_MEMBER(magic10_state::magic10_out_w)
0x0400 - Coin counter.
- - Lbits -
- 7654 3210
- =========
- ---- ---x Hold1 lamp.
- ---- --x- Hold2 lamp.
- ---- -x-- Hold3 lamp.
- ---- x--- Hold4 lamp.
- ---x ---- Hold5 lamp.
- --x- ---- Start lamp.
- -x-- ---- Play (Bet/Take/Cancel) lamp.
+ - Lbits -
+ 7654 3210
+ =========
+ ---- ---x Hold1 lamp.
+ ---- --x- Hold2 lamp.
+ ---- -x-- Hold3 lamp.
+ ---- x--- Hold4 lamp.
+ ---x ---- Hold5 lamp.
+ --x- ---- Start lamp.
+ -x-- ---- Play (Bet/Take/Cancel) lamp.
- - Hbits -
- 7654 3210
- =========
- ---- ---x Payout lamp.
- ---- -x-- Coin counter.
+ - Hbits -
+ 7654 3210
+ =========
+ ---- ---x Payout lamp.
+ ---- -x-- Coin counter.
*/
@@ -719,9 +719,9 @@ GFXDECODE_END
static MACHINE_CONFIG_START( magic10, magic10_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", M68000, 10000000) // ?
+ MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) // 10 MHz.
MCFG_CPU_PROGRAM_MAP(magic10_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", magic10_state, irq1_line_hold)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", magic10_state, irq1_line_hold)
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -780,7 +780,7 @@ static MACHINE_CONFIG_DERIVED( sgsafari, magic10 )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(sgsafari_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", magic10_state, irq2_line_hold) /* L1 interrupts */
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", magic10_state, irq2_line_hold) /* L1 interrupts */
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_VISIBLE_AREA(0*8, 44*8-1, 0*8, 30*8-1)
@@ -792,16 +792,36 @@ MACHINE_CONFIG_END
****************************/
/*
+ Magic's 10 (ver. 16.55)
+
+ CPUs:
+ 1x MC68000P12 (u1) 16/32-bit Microprocessor (main).
+ 1x OKI M6295 (u21) 4-Channel Mixing ADCPM Voice Synthesis LSI (sound).
+ 1x KA358 Dual Operational Amplifier (sound).
+ 1x TDA2003 (u24) Audio Amplifier (sound).
-Magic 10 (videopoker)
+ 1x 20.000MHz. oscillator (OSC1, close to main CPU).
+ 1x 30.000MHz. oscillator (OSC2, close to sound).
+ 1x blu resonator 1000J (XTAL1, close to sound).
-1x 68k
-1x 20mhz OSC near 68k
-1x Oki M6295
-1x 30mhz OSC near oki chip
-2x fpga
-1x bank of Dipswitch
-1x Dallas Ds1220y-200 Nonvolatile ram
+ ROMs:
+ 6x M27C1001 (1-6).
+ 1x AM27C020 (1).
+
+ RAMs:
+ 2x KM6865BP-20 (u4, u59).
+ 2x HY6264ALP-70 (u34, u35).
+ 2x HM3-65728BK-5 (u50, u51).
+ 1x Dallas DS1220Y-200 Nonvolatile RAM.
+
+ PLDs:
+ 2x TPC1020BFN-084C1 (u41, u60) (read protected).
+ 1x AMPAL16R4PC (u42) (dumped).
+
+ Others:
+ 1x 28x2 edge connector.
+ 1x trimmer (volume).
+ 1x 8x2 DIP switches (DIP1)
*/
ROM_START( magic10 )
@@ -817,6 +837,9 @@ ROM_START( magic10 )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "u22.bin", 0x00000, 0x40000, CRC(98885246) SHA1(752d549e6248074f2a7f6c5cc4d0bbc44c7fa4c3) )
+
+ ROM_REGION( 0x0400, "plds", 0 ) /* PLDs */
+ ROM_LOAD( "pal16r4.u42", 0x0000, 0x0104, CRC(6d70f3f2) SHA1(44c2be5945c052e057d4e0b03369acb7b9ff5d37) )
ROM_END
ROM_START( magic10a )
@@ -834,6 +857,42 @@ ROM_START( magic10a )
ROM_LOAD( "u22.bin", 0x00000, 0x40000, CRC(98885246) SHA1(752d549e6248074f2a7f6c5cc4d0bbc44c7fa4c3) )
ROM_END
+/*
+ Magic's 10 (ver. 16.45)
+
+ 1995, A.W.P. Games
+ Version: 16.15
+
+ CPU:
+ 1x MC68000P12 (u1) 16/32-bit Microprocessor (main).
+ 1x OKI M6295 (u21) 4-Channel Mixing ADCPM Voice Synthesis LSI (sound).
+ 1x KA358 Dual Operational Amplifier (sound).
+ 1x TDA2003 (u24) Audio Amplifier (sound).
+
+ 1x 20.000MHz. oscillator (OSC1, close to main CPU).
+ 1x 30.000MHz. oscillator (OSC2, close to sound).
+ 1x blu resonator 1000J (XTAL1, close to sound).
+
+ ROMs:
+ 6x M27C1001 (1-6).
+ 1x AM27C020 (1).
+
+ RAMs:
+ 2x KM6865BP-20 (u4, u59).
+ 2x HY6264ALP-70 (u34, u35).
+ 2x HM3-65728BK-5 (u50, u51).
+ 1x DS1220Y-200
+
+ PLDs:
+ 2x TPC1020BFN-084C1 (u41, u60) (read protected).
+ 1x AMPAL16R4PC (u42) dumped.
+
+ Others:
+ 1x 28x2 edge connector.
+ 1x trimmer (volume).
+ 1x 8x2 DIP switches (DIP1).
+
+*/
ROM_START( magic10b )
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "u3_1645.bin", 0x00000, 0x20000, CRC(7f2549e4) SHA1(6578ad29273c357faae7c6be3fa1b49087e088a2) )
@@ -850,36 +909,35 @@ ROM_START( magic10b )
ROM_END
/*
+ Magic's 10 (ver. 16.15)
-Magic's 10 (ver. 16.15)
-
-1995, A.W.P. Games
-Version: 16.15
+ 1995, A.W.P. Games
+ Version: 16.15
-CPU:
-1x TS68000P12 (main)(u1)
-2x TPC1020AFN-084C (PLD)(not dumped)(u41,u60)
+ CPU:
+ 1x TS68000P12 (main)(u1)
+ 2x TPC1020AFN-084C (PLD)(not dumped)(u41,u60)
-Sound:
-1x OKI M6295 (u21)
-1x TDA2003 (u24)
-1x LM358N
+ Sound:
+ 1x OKI M6295 (u21)
+ 1x TDA2003 (u24)
+ 1x LM358N
-1x oscillator 20.000000MHz (close to main)(osc1)
-1x oscillator 30.000MHz (close to sound)(osc2)
-1x orange resonator 1000J (close to sound)(xtal1)
+ 1x oscillator 20.000000MHz (close to main)(osc1)
+ 1x oscillator 30.000MHz (close to sound)(osc2)
+ 1x orange resonator 1000J (close to sound)(xtal1)
-ROMs:
-1x M27C2001 (1)
-6x M27C1001 (2,3,5,6,7)
-1x TMS27C010A (4)
-1x PALCE16V8H (read protected)
+ ROMs:
+ 1x M27C2001 (1)
+ 5x M27C1001 (2,3,5,6,7)
+ 1x TMS27C010A (4)
+ 1x PALCE16V8H (read protected)
-Note:
-1x 28x2 edge connector
-1x trimmer (volume)
-1x 8x2 switches dip
-1x battery
+ Note:
+ 1x 28x2 edge connector
+ 1x trimmer (volume)
+ 1x 8x2 switches dip
+ 1x battery
*/
ROM_START( magic10c )
@@ -898,17 +956,16 @@ ROM_START( magic10c )
ROM_END
/*
+ PCB is marked: Copyright ABM - 9605 Rev.02
-pcb is marked: Copyright ABM - 9605 Rev.02
-
-1x 68000
-1x osc 30mhz
-1x osc 20mhz (near the 68k)
-1x h8/330 HD6473308cp10
-1x dipswitch
-1x battery
-1x fpga by Actel
-1x oki6295
+ 1x 68000
+ 1x osc 30mhz
+ 1x osc 20mhz (near the 68k)
+ 1x h8/330 HD6473308cp10
+ 1x dipswitch
+ 1x battery
+ 1x fpga by Actel
+ 1x oki6295
*/
ROM_START( magic102 )
@@ -930,33 +987,32 @@ ROM_START( magic102 )
ROM_END
/*
-
-Super Pool
-
-ABM (Nazionale Elettronica Giochi S.A.S.), 1998.
-9743 Rev.01
-
-1x MC68HC000P10
-1x ACTEL A1020B-PL84C
-1x HD6473308CP10 (label says: do not remove version 1.2)
-1x U6295 (sound)
-1x LM358N (sound)
-1x TDA2003 (sound)
-1x oscillator 20.000MHz
-1x oscillator 30.0000MHz
-1x blu resonator 1000J (close to sound)
-
-1x M27C2001 (1) (Sound)
-2x TMS27C010A (2,3) (main)
-4x TMS27C010A (4,5,6,7) (gfx)
-1x PALCE22V10H (not dumped)
-1x PALCE16V8H (not dumped)
-
-1x 28x2 JAMMA edge connector
-1x 12 legs connector (J1)
-1x trimmer (volume)
-1x 8x2 switches dip
-1x lithium battery
+ Super Pool
+
+ ABM (Nazionale Elettronica Giochi S.A.S.), 1998.
+ PCB: 9743 Rev.01
+
+ 1x MC68HC000P10
+ 1x ACTEL A1020B-PL84C
+ 1x HD6473308CP10 (label says: do not remove version 1.2)
+ 1x U6295 (sound)
+ 1x LM358N (sound)
+ 1x TDA2003 (sound)
+ 1x oscillator 20.000MHz
+ 1x oscillator 30.0000MHz
+ 1x blu resonator 1000J (close to sound)
+
+ 1x M27C2001 (1) (Sound)
+ 2x TMS27C010A (2,3) (main)
+ 4x TMS27C010A (4,5,6,7) (gfx)
+ 1x PALCE22V10H (not dumped)
+ 1x PALCE16V8H (not dumped)
+
+ 1x 28x2 JAMMA edge connector
+ 1x 12 legs connector (J1)
+ 1x trimmer (volume)
+ 1x 8x2 switches dip
+ 1x lithium battery
STATUS:
@@ -989,47 +1045,63 @@ ROM_START( suprpool )
ROM_END
/*
+ Hot Slot
-Hot Slot
+ CPU:
+ 1x MC68HC000FN12 (u1) 16/32-bit Microprocessor (main).
+ 1x HD6473308CP10 (u24) 16-bit Single-Chip MCU (NOT DUMPED).
+ 1x 6295 (u31) 4-Channel Mixing ADCPM Voice Synthesis LSI (sound).
+ 1x KA358 (u33) Dual Operational Amplifier (sound).
+ 1x TDA2003 (u34) Audio Amplifier (sound).
-CPU:
-1x HD6473308CP10 (u24)(main)
-1x A40MX04-PL84-9828 (u50)(main)
-1x missing PLD (u1)
+ 1x 20.00000 MHz. oscillator (osc1).
+ 1x 30.000 MHz. oscillator (osc2).
+ 1x blu resonator 1000J (xtal1).
-1x 6295 (u31)(sound)
-1x KA358 (u33)(sound)
-1x TDA2003 (u34)(sound)
+ ROMs (1st PCB):
+ 2x 27C010 (2,3).
+ 2x 27C020 (5,7).
+ 3x 27C2001 (1,4,6).
-1x oscillator 20.0000MHz (OSC1)
-1x 1000J blu resonator (XTAL1)
+ ROMs (2nd PCB):
+ 1x AM27C010 (2).
+ 1x M27C1001 (3).
+ 2x 27C020 (1,7).
+ 1x M27C2001 (4).
+ 1x AM27C020 (5,6).
-ROMs:
-3x 27C2001 (1,4,6)
-2x 27C020 (5,7)
-2x 27C010 (2,3)
-1x GAL16V8D (as PAL16R4)(read protected)
-1x missing PAL22V10
+ RAMs
+ 1x HM6116-70 (u6).
+ 4x ZMDU6264ADC-07LLP (u4, u5, u43, u44).
+ 2x HM3-65728H-8 (u61, u62).
-Note:
-1x 28x2 edge connector
-1x trimmer (volume)
-1n trimmer (unknown)
-3x 12 legs connector (J1,J2,J3)
-1x 8x2 switches DIP
+ PLDs
+ 1x A40MX04-PL84 (u50) (not dumped).
+ 1x GAL16V8D-25LP (u54), (read protected).
+ 1x PALC22V10H-25PC/4 (u22), (read protected).
-- Co-processor is unknown, but fits in a QFP68 socket.
-- The system RAM test need the bit 7 of offset 0x500005 activated to be successful.
- This offset seems to be a kind of port.
+ Others:
+ 1x 28x2 JAMMA edge connector.
+ 1x 12 legs connector (J1).
+ 1x 12x2 pins jumper (J2, J3).
+ 1x 2 pins jumper (J4).
+ 1x trimmer (volume)(P1).
+ 1x trimmer (unknown)(P2).
+ 1x 8x2 DIP switches (DIP1).
+ 1x CR2032 3v. lithium battery.
- code:
- 0x00f550 move.b #$b, $500005
- 0x00f558 btst #$7, $500005
- 0x00f560 beq $f558
- ....
+ - The system RAM test need the bit 7 of offset 0x500005 activated to be successful.
+ This offset seems to be a kind of port connected to the MCU.
- seems to copy some bytes (maybe commands) and wait for the status on bit 7
+ code:
+
+ 0x00f550 move.b #$b, $500005
+ 0x00f558 btst #$7, $500005
+ 0x00f560 beq $f558
+ ....
+
+ seems to copy some bytes (maybe commands) and wait for the status on bit 7
STATUS:
@@ -1062,31 +1134,31 @@ ROM_START( hotslot )
ROM_END
/*
+ Magic Colors
+ PCB marking: Rev.03
-Magic Colors
+ CPU:
+ 1x missing CPU (QFP68 socket, u1)
+ 1x HD6473308CP10 (u24)(MCU)
+ 1x A40MX04-PL84-9828 (u50)
-CPU:
-1x HD6473308CP10 (u24)(main)
-1x A40MX04-PL84-9828 (u50)(main)
-1x missing PLD (u1)
+ 1x M6295 (u31)(sound)
+ 1x KA358 (u33)(sound)
+ 1x TDA2003 (u34)(sound)
-1x M6295 (u31)(sound)
-1x KA358 (u33)(sound)
-1x TDA2003 (u34)(sound)
+ 1x oscillator 20.0000MHz (OSC1)
+ 1x 1000J blu resonator (XTAL1)
-1x oscillator 20.0000MHz (OSC1)
-1x 1000J blu resonator (XTAL1)
+ ROMs:
+ 6x 27C010 (2,3,4,5,6,7)
+ 1x 27C020 (1)
+ 1x GAL16V8D (as PAL16R4)(read protected)
+ 1x missing PAL22V10
-ROMs:
-6x 27C010 (2,3,4,5,6,7)
-1x 27C020 (1)
-1x GAL16V8D (as PAL16R4)(read protected)
-1x missing PAL22V10
-
-Note:
-1x 28x2 edge connector
-1x trimmer (volume)
-1x 12 legs connector (J1,J2,J3)
+ Note:
+ 1x 28x2 edge connector
+ 1x trimmer (volume)
+ 1x 12 legs connector (J1,J2,J3)
STATUS:
@@ -1119,32 +1191,31 @@ ROM_START( mcolors )
ROM_END
/*
+ Super Gran Safari
+ 1996 - New Impeuropex Corp.
-Super Gran Safari
-1996 - New Impeuropex Corp.
-
-CPU:
-1x MC68000P12 (main)
-2x A1020B-PL84C (not dumped)
+ CPU:
+ 1x MC68000P12 (main)
+ 2x A1020B-PL84C (not dumped)
-1x M6295 (sound)
-1x TDA2002 (sound)
-1x GL324 (sound)
+ 1x M6295 (sound)
+ 1x TDA2002 (sound)
+ 1x GL324 (sound)
-1x oscillator 30.000MHz
+ 1x oscillator 30.000MHz
-ROMs:
-2x M27C512 (1,2)
-1x M27C2001 (3)
-4x M27C1001 (4,5,6,7)
+ ROMs:
+ 2x M27C512 (1,2)
+ 1x M27C2001 (3)
+ 4x M27C1001 (4,5,6,7)
-Note:
-1x JAMMA edge connector
-1x 12 legs connector (j2)
-1x 8x2 switches dip
-1x 4 legs jumper (j3)
-1x 2 legs jumper (j4)
-1x trimmer (volume)
+ Note:
+ 1x JAMMA edge connector
+ 1x 12 legs connector (j2)
+ 1x 8x2 switches dip
+ 1x 4 legs jumper (j3)
+ 1x 2 legs jumper (j4)
+ 1x trimmer (volume)
STATUS:
@@ -1174,28 +1245,27 @@ ROM_START( sgsafari )
ROM_END
/*
+ Music Sort (Ver. 2.02).
+ Same PCB than Magic's 10 (ver. 16.15)
-Music Sort (Ver. 2.02).
-Same PCB than Magic's 10 (ver. 16.15)
+ CPU:
+ 1x TS68000P12 (main)
+ 2x TPC1020AFN-084C (PLD)(not dumped)
-CPU:
-1x TS68000P12 (main)
-2x TPC1020AFN-084C (PLD)(not dumped)
+ Sound:
+ 1x OKI M6295
+ 1x TDA2003
+ 1x LM358N
-Sound:
-1x OKI M6295
-1x TDA2003
-1x LM358N
+ 1x oscillator 20.000000MHz (close to main)
+ 1x oscillator 30.000MHz (close to sound)
+ 1x orange resonator 1000J (close to sound)
-1x oscillator 20.000000MHz (close to main)
-1x oscillator 30.000MHz (close to sound)
-1x orange resonator 1000J (close to sound)
-
-Note:
-1x 28x2 edge connector
-1x trimmer (volume)
-1x 8x2 switches dip
-1x battery
+ Note:
+ 1x 28x2 edge connector
+ 1x trimmer (volume)
+ 1x 8x2 switches dip
+ 1x battery
*/
ROM_START( musicsrt )
@@ -1216,30 +1286,95 @@ ROM_START( musicsrt )
ROM_LOAD( "musicsrt_nv.bin", 0x0000, 0x0800, CRC(f4e063cf) SHA1(a60bbd960bb7dcf023417e8c7164303b6ce71014) )
ROM_END
+/*
+ Luna Park (ver. 1.2)
+ 1998.25.11
+ ABM games.
+
+ PCB: ABM 9743 Rev.02
+
+ 1x MC68HC000FN10 (u1) 16/32-bit Microprocessor.
+ 1x HD6473308CP10 (u24) label: version 1.2 - 16-bit Single-Chip Microcomputer. NOT DUMPED.
+
+ 1x M6295 (u31) 4-Channel Mixing ADCPM Voice Synthesis LSI.
+ 1x LM358N (u33) Dual Operational Amplifier.
+ 1x TDA2003 (u34) Audio Amplifier.
+
+ 1x 20.000000MHz oscillator (osc1).
+ 1x 30.000MHz oscillator (osc2).
+ 1x blu resonator 1000J (xtal1).
+
+ 6x AM27C010 ROMs(2-7).
+ 1x AM27C020 ROM (1).
+
+ 1x LH5116-10 RAM (u6).
+ 4x HY6264ALP-10 RAM (u4, u5, u43, u44).
+ 2x HM3-65728H-8 RAM (u61, u62).
+
+ 1x TPC1020AFN-084C (u50), read protected.
+ 1x PALCE16V8H-25PC/4 (u54), read protected.
+ 1x PALC22V10H-25PC/4 (u22), read protected.
+
+ 1x 28x2 JAMMA edge connector.
+ 1x 12-pins male connector (JP1).
+ 1x trimmer (volume)(P1).
+ 1x 8x2 DIP switches (DIP1).
+ 1x Renata 3V. CR2032 lithium battery.
+
+
+ STATUS:
+
+ Memory map = done.
+ Inputs = done.
+ Machine = done.
+
+ OKI 6295 = ok.
+ Screen size = ok.
+ Fixed layers = yes.
+
+*/
+ROM_START( lunaprk )
+ ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
+ ROM_LOAD16_BYTE( "2_2.00a.u3", 0x00000, 0x20000, CRC(5ec3d238) SHA1(a9e257275cd81b74309d20bc64b10f788ca1b22a) )
+ ROM_LOAD16_BYTE( "3_2.00a.u2", 0x00001, 0x20000, CRC(6fceb57b) SHA1(f9cf566c60f9c1c604dbfeb9c3ad4831bb3922d4) )
+
+ ROM_REGION( 0x10000, "mcu", 0 ) /* h8/330 HD6473308cp10 with internal ROM */
+ ROM_LOAD( "mcu", 0x00000, 0x10000, NO_DUMP )
+
+ ROM_REGION( 0x80000, "gfx1", 0 ) /* graphics */
+ ROM_LOAD( "7_l.p..u35", 0x00000, 0x20000, CRC(dfd6795d) SHA1(01929c31b5cc9468674830d9f687b2d3607d8052) )
+ ROM_LOAD( "6_l.p..u36", 0x20000, 0x20000, CRC(fe323a28) SHA1(1cfba6c8359efed48506e8ae231926fb77469aaa) )
+ ROM_LOAD( "5_l.p..u37", 0x40000, 0x20000, CRC(445b6564) SHA1(3568bcbcbdafa8503b50de960c370c85f2fbf62a) )
+ ROM_LOAD( "4_l.p..u38", 0x60000, 0x20000, CRC(81567520) SHA1(4a1990ee19b2346824bb5b9f2880db12a414fdf7) )
+
+ ROM_REGION( 0x080000, "oki", 0 ) /* ADPCM samples */
+ ROM_LOAD( "1.u32", 0x00000, 0x40000, CRC(47804af7) SHA1(602dc0361869b52532e2adcb0de3cbdd042761b3) )
+ROM_END
+
/****************************
* Driver Init *
****************************/
-DRIVER_INIT_MEMBER(magic10_state,magic10)
+DRIVER_INIT_MEMBER(magic10_state, magic10)
{
m_layer2_offset[0] = 32;
m_layer2_offset[1] = 2;
}
-DRIVER_INIT_MEMBER(magic10_state,magic102)
+DRIVER_INIT_MEMBER(magic10_state, magic102)
{
m_layer2_offset[0] = 8;
m_layer2_offset[1] = 20;
}
-DRIVER_INIT_MEMBER(magic10_state,suprpool)
+DRIVER_INIT_MEMBER(magic10_state, suprpool)
{
m_layer2_offset[0] = 8;
m_layer2_offset[1] = 16;
}
-DRIVER_INIT_MEMBER(magic10_state,hotslot)
+DRIVER_INIT_MEMBER(magic10_state, hotslot)
{
/* a value of -56 center the playfield, but displace the intro and initial screen.
a value of -64 center the intro and initial screen, but displace the playfield.
@@ -1248,7 +1383,7 @@ DRIVER_INIT_MEMBER(magic10_state,hotslot)
m_layer2_offset[1] = 0; // Y offset.
}
-DRIVER_INIT_MEMBER(magic10_state,sgsafari)
+DRIVER_INIT_MEMBER(magic10_state, sgsafari)
{
m_layer2_offset[0] = 16;
m_layer2_offset[1] = 20;
@@ -1265,8 +1400,9 @@ GAMEL( 1995, magic10a, magic10, magic10, magic10, magic10_state, magic10, RO
GAMEL( 1995, magic10b, magic10, magic10a, magic10, magic10_state, magic10, ROT0, "A.W.P. Games", "Magic's 10 (ver. 16.45)", 0, layout_sgsafari )
GAMEL( 1995, magic10c, magic10, magic10a, magic10, magic10_state, magic10, ROT0, "A.W.P. Games", "Magic's 10 (ver. 16.15)", 0, layout_sgsafari )
GAME( 1997, magic102, 0, magic102, magic102, magic10_state, magic102, ROT0, "ABM Games", "Magic's 10 2 (ver 1.1)", MACHINE_NOT_WORKING )
-GAME( 1997, suprpool, 0, magic102, magic102, magic10_state, suprpool, ROT0, "ABM Games", "Super Pool (9743 rev.01)", MACHINE_NOT_WORKING )
+GAME( 1998, suprpool, 0, magic102, magic102, magic10_state, suprpool, ROT0, "ABM Games", "Super Pool (ver. 1.2)", MACHINE_NOT_WORKING )
GAME( 1996, hotslot, 0, hotslot, hotslot, magic10_state, hotslot, ROT0, "ABM Electronics", "Hot Slot (ver. 05.01)", MACHINE_NOT_WORKING )
GAME( 1999, mcolors, 0, magic102, magic102, magic10_state, magic102, ROT0, "<unknown>", "Magic Colors (ver. 1.7a)", MACHINE_NOT_WORKING )
GAMEL( 1996, sgsafari, 0, sgsafari, sgsafari, magic10_state, sgsafari, ROT0, "New Impeuropex Corp.", "Super Gran Safari (ver 3.11)", 0, layout_sgsafari )
GAMEL( 1995, musicsrt, 0, magic10a, musicsrt, magic10_state, magic10, ROT0, "ABM Games", "Music Sort (ver 2.02, English)", 0, layout_musicsrt )
+GAME( 1998, lunaprk, 0, magic102, magic102, magic10_state, suprpool, ROT0, "ABM Games", "Luna Park (ver. 1.2)", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/mhavoc.cpp b/src/mame/drivers/mhavoc.cpp
index 82ce05f008a..231742afebd 100644
--- a/src/mame/drivers/mhavoc.cpp
+++ b/src/mame/drivers/mhavoc.cpp
@@ -195,13 +195,21 @@
#include "machine/nvram.h"
#include "includes/mhavoc.h"
-
+/* Quad pokey hookup (based on schematics):
+Address: 543210
+ |||||\- pokey A0
+ ||||\-- pokey A1
+ |||\--- pokey A2
+ ||\---- pokey chip number LSB
+ |\----- pokey chip number MSB
+ \------ pokey A3
+*/
READ8_MEMBER(mhavoc_state::quad_pokeyn_r)
{
static const char *const devname[4] = { "pokey1", "pokey2", "pokey3", "pokey4" };
int pokey_num = (offset >> 3) & ~0x04;
int control = (offset & 0x20) >> 2;
- int pokey_reg = (offset % 8) | control;
+ int pokey_reg = (offset & 0x7) | control;
pokey_device *pokey = machine().device<pokey_device>(devname[pokey_num]);
return pokey->read(pokey_reg);
@@ -212,7 +220,7 @@ WRITE8_MEMBER(mhavoc_state::quad_pokeyn_w)
static const char *const devname[4] = { "pokey1", "pokey2", "pokey3", "pokey4" };
int pokey_num = (offset >> 3) & ~0x04;
int control = (offset & 0x20) >> 2;
- int pokey_reg = (offset % 8) | control;
+ int pokey_reg = (offset & 0x7) | control;
pokey_device *pokey = machine().device<pokey_device>(devname[pokey_num]);
pokey->write(pokey_reg, data);
@@ -224,12 +232,19 @@ WRITE8_MEMBER(mhavoc_state::quad_pokeyn_w)
* Alpha One: dual POKEY?
*
*************************************/
-
+/* dual pokey hookup (presumably, based on the prototype code):
+Address: 43210
+ ||||\- pokey A0
+ |||\-- pokey A1
+ ||\--- pokey A2
+ |\---- pokey chip number
+ \----- pokey A3
+*/
READ8_MEMBER(mhavoc_state::dual_pokey_r)
{
int pokey_num = (offset >> 3) & 0x01;
int control = (offset & 0x10) >> 1;
- int pokey_reg = (offset % 8) | control;
+ int pokey_reg = (offset & 0x7) | control;
if (pokey_num == 0)
return machine().device<pokey_device>("pokey1")->read(pokey_reg);
@@ -242,7 +257,7 @@ WRITE8_MEMBER(mhavoc_state::dual_pokey_w)
{
int pokey_num = (offset >> 3) & 0x01;
int control = (offset & 0x10) >> 1;
- int pokey_reg = (offset % 8) | control;
+ int pokey_reg = (offset & 0x7) | control;
if (pokey_num == 0)
machine().device<pokey_device>("pokey1")->write(pokey_reg, data);
@@ -287,19 +302,41 @@ ADDRESS_MAP_END
* Gamma CPU memory handlers
*
*************************************/
+
+/*
+a15 a14 a13 a12 a11 a10 a09 a08 a07 a06 a05 a04 a03 a02 a01 a00
+0 0 0 x x * * * * * * * * * * * RW ZRAM (6116 SRAM@9PQ)
+0 0 1 0 0 x x x x x * * * * * * RW INPUTS: QCI/O (Quad Pokey)
+0 0 1 0 1 x x x x x x x x x x x R INPUTS: SWITCHES
+0 0 1 1 0 x x x x x x x x x x x R INPUTS: PORTRD_gamma
+0 0 1 1 1 x x x x x x x x x * * R INPUTS: ROLLER (CCI(LETA?), with A2 grounded so only 4 ports are readable)
+0 1 0 x x x x x x x x x x x x x R OUTPUTS: read of dipswitches @8S encompasses the entire OUTPUTS area
+0 1 0 0 0 x x x x x x x x x x x W OUTPUTS: IRQACK
+0 1 0 0 1 x x x x x x x x x x x W OUTPUTS: STROBES
+0 1 0 1 0 x x x x x x x x x x x W OUTPUTS: PORTWR_gamma
+0 1 0 1 1 ? ? ? ? ? ? ? ? ? ? ? W OUTPUTS: TISND, unused tms5220 write
+ ( supposedly, but the /WS hookup is not traced on pcb yet:
+0 1 0 1 1 x? x? 0 x? x? x? x? x? x? x? x? W? OUTPUTS: TISND: Gamma CPU write to octal latch??
+0 1 0 1 1 x? x? 1 x? x? x? x? x? x? x? x? W? OUTPUTS: TISND: octal latch output enable to tms5220 and pulse /WS on 5220??
+ Is there a way to activate /RS on the TMS5220 to read the status register? is the TMS5220 /INT line connected to the 6502 somehow?
+ )
+0 1 1 x x x x * * * * * * * * * RW EEROM: (2804 EEPROM@9QR, pins 22(A9) and 19(A10) are N/C inside the chip)
+1 x * * * * * * * * * * * * * * R ROM 27128 @9S
+*/
static ADDRESS_MAP_START( gamma_map, AS_PROGRAM, 8, mhavoc_state )
- AM_RANGE(0x0000, 0x07ff) AM_RAM /* Program RAM (2K) */
- AM_RANGE(0x0800, 0x0fff) AM_RAM AM_MIRROR (0x1800)
- AM_RANGE(0x2000, 0x203f) AM_READWRITE(quad_pokeyn_r, quad_pokeyn_w) /* Quad Pokey read */
- AM_RANGE(0x2800, 0x2800) AM_READ_PORT("IN1") /* Gamma Input Port */
- AM_RANGE(0x3000, 0x3000) AM_READ(mhavoc_alpha_r) /* Alpha Comm. Read Port*/
- AM_RANGE(0x3800, 0x3803) AM_READ_PORT("DIAL") /* Roller Controller Input*/
- AM_RANGE(0x4000, 0x4000) AM_READ_PORT("DSW2") AM_WRITE(mhavoc_gamma_irq_ack_w) /* DSW at 8S, IRQ Acknowledge*/
- AM_RANGE(0x4800, 0x4800) AM_WRITE(mhavoc_out_1_w) /* Coin Counters */
- AM_RANGE(0x5000, 0x5000) AM_WRITE(mhavoc_alpha_w) /* Alpha Comm. Write Port */
- AM_RANGE(0x6000, 0x61ff) AM_RAM AM_SHARE("nvram") /* EEROM */
- AM_RANGE(0x8000, 0xffff) AM_ROM /* Program ROM (16K) */
+ AM_RANGE(0x0000, 0x07ff) AM_RAM AM_MIRROR(0x1800) /* Program RAM (2K) */
+ AM_RANGE(0x2000, 0x203f) AM_READWRITE(quad_pokeyn_r, quad_pokeyn_w) AM_MIRROR(0x07C0) /* Quad Pokey read/write */
+ AM_RANGE(0x2800, 0x2800) AM_READ_PORT("IN1") AM_MIRROR(0x07ff) /* Gamma Input Port */
+ AM_RANGE(0x3000, 0x3000) AM_READ(mhavoc_alpha_r) AM_MIRROR(0x07ff) /* Alpha Comm. Read Port */
+ AM_RANGE(0x3800, 0x3803) AM_READ_PORT("DIAL") AM_MIRROR(0x07fc) /* Roller Controller Input */
+ AM_RANGE(0x4000, 0x4000) AM_READ_PORT("DSW2") AM_WRITE(mhavoc_gamma_irq_ack_w) AM_MIRROR(0x07ff) /* DSW at 8S, IRQ Acknowledge */
+ AM_RANGE(0x4800, 0x4800) AM_WRITE(mhavoc_out_1_w) AM_MIRROR(0x07ff) /* Coin Counters */
+ AM_RANGE(0x5000, 0x5000) AM_WRITE(mhavoc_alpha_w) AM_MIRROR(0x07ff) /* Alpha Comm. Write Port */
+ //AM_RANGE(0x5800, 0x5800) AM_WRITE(mhavocrv_speech_data_w) AM_MIRROR(0x06ff) /* TMS5220 data write */
+ //AM_RANGE(0x5900, 0x5900) AM_WRITE(mhavocrv_speech_strobe_w) AM_MIRROR(0x06ff) /* TMS5220 /WS strobe write */
+ AM_RANGE(0x6000, 0x61ff) AM_RAM AM_SHARE("nvram") AM_MIRROR(0x1e00) /* EEROM */
+ AM_RANGE(0x8000, 0xbfff) AM_ROM AM_MIRROR(0x4000) /* Program ROM (16K) */
ADDRESS_MAP_END
@@ -602,8 +639,7 @@ ROM_START( mhavoc )
/* Gamma Processor ROM */
ROM_REGION( 0x10000, "gamma", 0 )
- ROM_LOAD( "136025.108", 0x08000, 0x4000, CRC(93faf210) SHA1(7744368a1d520f986d1c4246113a7e24fcdd6d04) )
- ROM_RELOAD( 0x0c000, 0x4000 ) /* reset+interrupt vectors */
+ ROM_LOAD( "136025.108", 0x08000, 0x4000, CRC(93faf210) SHA1(7744368a1d520f986d1c4246113a7e24fcdd6d04) ) /* mirrored to c000-ffff for reset+interrupt vectors */
/* AVG PROM */
ROM_REGION( 0x100, "user1", 0 )
@@ -633,8 +669,7 @@ ROM_START( mhavoc2 )
/* Gamma Processor ROM */
ROM_REGION( 0x10000, "gamma", 0 )
- ROM_LOAD( "136025.108", 0x08000, 0x4000, CRC(93faf210) SHA1(7744368a1d520f986d1c4246113a7e24fcdd6d04) )
- ROM_RELOAD( 0x0c000, 0x4000 ) /* reset+interrupt vectors */
+ ROM_LOAD( "136025.108", 0x08000, 0x4000, CRC(93faf210) SHA1(7744368a1d520f986d1c4246113a7e24fcdd6d04) ) /* mirrored to c000-ffff for reset+interrupt vectors */
/* AVG PROM */
ROM_REGION( 0x100, "user1", 0 )
@@ -662,8 +697,7 @@ ROM_START( mhavocrv )
/* Gamma Processor ROM */
ROM_REGION( 0x10000, "gamma", 0 )
- ROM_LOAD( "136025.908", 0x08000, 0x4000, CRC(c52ec664) SHA1(08120a385f71b17ec02a3c2ef856ff835a91773e) )
- ROM_RELOAD( 0x0c000, 0x4000 ) /* reset+interrupt vectors */
+ ROM_LOAD( "136025.908", 0x08000, 0x4000, CRC(c52ec664) SHA1(08120a385f71b17ec02a3c2ef856ff835a91773e) ) /* mirrored to c000-ffff for reset+interrupt vectors */
/* AVG PROM */
ROM_REGION( 0x100, "user1", 0 )
@@ -693,8 +727,7 @@ ROM_START( mhavocp )
/* Gamma Processor ROM */
ROM_REGION( 0x10000, "gamma", 0 )
- ROM_LOAD( "136025.008", 0x8000, 0x4000, CRC(22ea7399) SHA1(eeda8cc40089506063835a62c3273e7dd3918fd5) )
- ROM_RELOAD( 0xc000, 0x4000 )/* reset+interrupt vectors */
+ ROM_LOAD( "136025.008", 0x8000, 0x4000, CRC(22ea7399) SHA1(eeda8cc40089506063835a62c3273e7dd3918fd5) ) /* mirrored to c000-ffff for reset+interrupt vectors */
/* AVG PROM */
ROM_REGION( 0x100, "user1", 0 )
diff --git a/src/mame/drivers/mirage.cpp b/src/mame/drivers/mirage.cpp
index 29b275a7965..88a2ae21c37 100644
--- a/src/mame/drivers/mirage.cpp
+++ b/src/mame/drivers/mirage.cpp
@@ -342,12 +342,10 @@ static MACHINE_CONFIG_START( mirage, miragemi_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/model1.cpp b/src/mame/drivers/model1.cpp
index 9fd1950cc0d..4e20dbfeb11 100644
--- a/src/mame/drivers/model1.cpp
+++ b/src/mame/drivers/model1.cpp
@@ -1534,10 +1534,7 @@ static MACHINE_CONFIG_START( model1, model1_state )
MCFG_MACHINE_RESET_OVERRIDE(model1_state,model1)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1581,10 +1578,7 @@ static MACHINE_CONFIG_START( model1_vr, model1_state )
MCFG_MACHINE_RESET_OVERRIDE(model1_state,model1_vr)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp
index ac2cdaa2b94..3a92ee24a73 100644
--- a/src/mame/drivers/model2.cpp
+++ b/src/mame/drivers/model2.cpp
@@ -2405,10 +2405,7 @@ static MACHINE_CONFIG_START( model2o, model2_state )
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
MCFG_TIMER_PTR((FPTR)3)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2454,9 +2451,7 @@ static MACHINE_CONFIG_START( model2a, model2_state )
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
MCFG_TIMER_PTR((FPTR)3)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2571,9 +2566,7 @@ static MACHINE_CONFIG_START( model2b, model2_state )
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
MCFG_TIMER_PTR((FPTR)3)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2636,9 +2629,7 @@ static MACHINE_CONFIG_START( model2c, model2_state )
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
MCFG_TIMER_PTR((FPTR)3)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -5196,7 +5187,7 @@ ROM_START( dynabb ) /* Dynamite Baseball, Model 2B. Sega game ID# 833-12803 DYNA
ROM_LOAD32_WORD("epr-19169.14", 0x100002, 0x080000, CRC(91a5acef) SHA1(2520a3e4ff15e4d583861ba656570abca5f7c611) )
ROM_REGION32_LE( 0x2000000, "user1", 0 ) // Data
- // 0x0000000 - 0x07fffff unpopulated? (not checked by ROM checks)
+ // IC11, IC12 not populated
ROM_LOAD32_WORD("mpr-19176.9", 0x0800000, 0x400000, CRC(2c4e90f5) SHA1(8d5ed0b26e79dd6476282bc69cb27b42381635f2) )
ROM_LOAD32_WORD("mpr-19177.10", 0x0800002, 0x400000, CRC(b0f1e512) SHA1(81e4124ac7766c7ea6bac7e7f4db110783394ae3) )
ROM_LOAD32_WORD("mpr-19174.7", 0x1000000, 0x400000, CRC(057e5200) SHA1(dd07eb438d91a8132789154a633fb6ec4e2ef0d1) )
@@ -5205,11 +5196,10 @@ ROM_START( dynabb ) /* Dynamite Baseball, Model 2B. Sega game ID# 833-12803 DYNA
ROM_LOAD32_WORD("mpr-19173.6", 0x1800002, 0x400000, CRC(31adbeed) SHA1(3984be892f0dce21c8d423dda055ef7e57df4d4e) )
ROM_REGION( 0x1000000, "user2", 0 ) // Models
- // these IC positions are weird compared to the other games, but these are the correct pairings.
- ROM_LOAD32_WORD("mpr-19178.11", 0x0000000, 0x400000, CRC(0d621e21) SHA1(31adc229258a5d468ff80d789c59bd8a6777f900) )
- ROM_LOAD32_WORD("mpr-19180.17", 0x0000002, 0x400000, CRC(d2e311a5) SHA1(83fb31c6ad7c32f1a7bcf870edb2719653c3db97) )
- ROM_LOAD32_WORD("mpr-19179.12", 0x0800000, 0x400000, CRC(337a4ec2) SHA1(77d7d186344715237895ac1ed0ab219fcc340a7e) )
- ROM_LOAD32_WORD("mpr-19181.21", 0x0800002, 0x400000, CRC(09a86c33) SHA1(30601c5b00fa3c9db815f60a0de16576e34b8c42) )
+ ROM_LOAD32_WORD("mpr-19178.17", 0x0000000, 0x400000, CRC(0d621e21) SHA1(31adc229258a5d468ff80d789c59bd8a6777f900) )
+ ROM_LOAD32_WORD("mpr-19180.21", 0x0000002, 0x400000, CRC(d2e311a5) SHA1(83fb31c6ad7c32f1a7bcf870edb2719653c3db97) )
+ ROM_LOAD32_WORD("mpr-19179.18", 0x0800000, 0x400000, CRC(337a4ec2) SHA1(77d7d186344715237895ac1ed0ab219fcc340a7e) )
+ ROM_LOAD32_WORD("mpr-19181.22", 0x0800002, 0x400000, CRC(09a86c33) SHA1(30601c5b00fa3c9db815f60a0de16576e34b8c42) )
ROM_REGION( 0x800000, "user3", 0 ) // Textures
diff --git a/src/mame/drivers/model3.cpp b/src/mame/drivers/model3.cpp
index 04abe3cc7dd..70673ba93ea 100644
--- a/src/mame/drivers/model3.cpp
+++ b/src/mame/drivers/model3.cpp
@@ -737,9 +737,9 @@ JP4/5/6/7 - Jumpers to configure ROMs
#include "machine/eepromser.h"
#include "machine/53c810.h"
#include "machine/nvram.h"
+#include "machine/m3comm.h"
#include "includes/model3.h"
-
void model3_state::update_irq_state()
{
if ((m_irq_enable & m_irq_state) || m_scsi_irq_state)
@@ -1735,20 +1735,6 @@ WRITE8_MEMBER(model3_state::model3_sound_w)
-READ64_MEMBER(model3_state::network_r)
-{
- osd_printf_debug("network_r: %02X at %08X\n", offset, space.device().safe_pc());
- return m_network_ram[offset];
-}
-
-WRITE64_MEMBER(model3_state::network_w)
-{
- COMBINE_DATA(m_network_ram.get() + offset);
- osd_printf_debug("network_w: %02X, %08X%08X at %08X\n", offset, (UINT32)(data >> 32), (UINT32)(data), space.device().safe_pc());
-}
-
-
-
READ64_MEMBER(model3_state::model3_5881prot_r)
{
UINT64 retvalue = U64(0xffffffffffffffff);
@@ -1823,7 +1809,7 @@ WRITE64_MEMBER(model3_state::daytona2_rombank_w)
}
}
-static ADDRESS_MAP_START( model3_mem, AS_PROGRAM, 64, model3_state )
+static ADDRESS_MAP_START( model3_10_mem, AS_PROGRAM, 64, model3_state )
AM_RANGE(0x00000000, 0x007fffff) AM_RAM AM_SHARE("work_ram") /* work RAM */
AM_RANGE(0x84000000, 0x8400003f) AM_READ(real3d_status_r )
@@ -1845,6 +1831,10 @@ static ADDRESS_MAP_START( model3_mem, AS_PROGRAM, 64, model3_state )
AM_RANGE(0xff800000, 0xffffffff) AM_ROM AM_REGION("user1", 0)
ADDRESS_MAP_END
+static ADDRESS_MAP_START( model3_mem, AS_PROGRAM, 64, model3_state )
+ AM_IMPORT_FROM( model3_10_mem )
+ AM_RANGE(0xc0000000, 0xc003ffff) AM_DEVICE32("comm_board", m3comm_device, m3_map, U64(0xffffffffffffffff) )
+ADDRESS_MAP_END
static INPUT_PORTS_START( common )
PORT_START("IN0")
@@ -5475,7 +5465,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(model3_state::model3_interrupt)
static MACHINE_CONFIG_START( model3_10, model3_state )
MCFG_CPU_ADD("maincpu", PPC603E, 66000000)
MCFG_PPC_BUS_FREQUENCY(66000000) /* Multiplier 1, Bus = 66MHz, Core = 66MHz */
- MCFG_CPU_PROGRAM_MAP(model3_mem)
+ MCFG_CPU_PROGRAM_MAP(model3_10_mem)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model3_state, model3_interrupt, "screen", 0, 1)
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
@@ -5562,6 +5552,8 @@ static MACHINE_CONFIG_START( model3_15, model3_state )
MCFG_LSI53C810_DMA_CB(model3_state, real3d_dma_callback)
MCFG_LSI53C810_FETCH_CB(model3_state, scsi_fetch)
MCFG_LEGACY_SCSI_PORT("scsi")
+
+ MCFG_M3COMM_ADD("comm_board")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED(scud, model3_15)
@@ -5605,6 +5597,8 @@ static MACHINE_CONFIG_START(model3_20, model3_state)
MCFG_SOUND_ADD("scsp2", SCSP, 0)
MCFG_SOUND_ROUTE(0, "lspeaker", 2.0)
MCFG_SOUND_ROUTE(0, "rspeaker", 2.0)
+
+ MCFG_M3COMM_ADD("comm_board")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED(model3_20_5881, model3_20)
@@ -5647,6 +5641,8 @@ static MACHINE_CONFIG_START(model3_21, model3_state)
MCFG_SOUND_ADD("scsp2", SCSP, 0)
MCFG_SOUND_ROUTE(0, "lspeaker", 2.0)
MCFG_SOUND_ROUTE(0, "rspeaker", 2.0)
+
+ MCFG_M3COMM_ADD("comm_board")
MACHINE_CONFIG_END
@@ -5751,7 +5747,6 @@ DRIVER_INIT_MEMBER(model3_state,lostwsga)
UINT32 *rom = (UINT32*)memregion("user1")->base();
DRIVER_INIT_CALL(model3_15);
- /* TODO: there's an M68K device at 0xC0000000 - FF, maybe lightgun controls ? */
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc1000000, 0xc10000ff, read64_delegate(FUNC(model3_state::scsi_r),this), write64_delegate(FUNC(model3_state::scsi_w),this));
rom[0x7374f0/4] = 0x38840004; /* This seems to be an actual bug in the original code */
@@ -5770,14 +5765,12 @@ DRIVER_INIT_MEMBER(model3_state,scud)
DRIVER_INIT_MEMBER(model3_state,scudplus)
{
DRIVER_INIT_CALL(model3_15);
- /* TODO: network device at 0xC0000000 - FF */
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc1000000, 0xc10000ff, read64_delegate(FUNC(model3_state::scsi_r),this), write64_delegate(FUNC(model3_state::scsi_w),this));
}
DRIVER_INIT_MEMBER(model3_state,scudplusa)
{
DRIVER_INIT_CALL(model3_15);
- /* TODO: network device at 0xC0000000 - FF */
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc1000000, 0xc10000ff, read64_delegate(FUNC(model3_state::scsi_r),this), write64_delegate(FUNC(model3_state::scsi_w),this));
}
@@ -5892,17 +5885,11 @@ DRIVER_INIT_MEMBER(model3_state,vs299)
DRIVER_INIT_MEMBER(model3_state,harley)
{
DRIVER_INIT_CALL(model3_20);
-
- m_network_ram = make_unique_clear<UINT64[]>(0x10000);
- m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc0000000, 0xc00fffff, read64_delegate(FUNC(model3_state::network_r),this), write64_delegate(FUNC(model3_state::network_w),this));
}
DRIVER_INIT_MEMBER(model3_state,harleya)
{
DRIVER_INIT_CALL(model3_20);
-
- m_network_ram = make_unique_clear<UINT64[]>(0x10000);
- m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc0000000, 0xc00fffff, read64_delegate(FUNC(model3_state::network_r),this), write64_delegate(FUNC(model3_state::network_w),this));
}
diff --git a/src/mame/drivers/moo.cpp b/src/mame/drivers/moo.cpp
index 73bcdaab223..da3d3960e43 100644
--- a/src/mame/drivers/moo.cpp
+++ b/src/mame/drivers/moo.cpp
@@ -550,18 +550,14 @@ static MACHINE_CONFIG_START( moo, moo_state )
MCFG_VIDEO_START_OVERRIDE(moo_state,moo)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(moo_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, -48+1, 23)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -48+1, 23)
MCFG_K053246_PALETTE("palette")
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(moo_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_K053251_ADD("k053251")
@@ -608,18 +604,14 @@ static MACHINE_CONFIG_START( moobl, moo_state )
MCFG_VIDEO_START_OVERRIDE(moo_state,moo)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(moo_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, -48+1, 23)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -48+1, 23)
MCFG_K053246_PALETTE("palette")
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(moo_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_K053251_ADD("k053251")
@@ -642,7 +634,7 @@ static MACHINE_CONFIG_DERIVED( bucky, moo )
MCFG_K054000_ADD("k054000")
MCFG_DEVICE_MODIFY("k053246")
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, -48, 23)
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -48, 23)
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
diff --git a/src/mame/drivers/mystwarr.cpp b/src/mame/drivers/mystwarr.cpp
index 8e8632c9e1b..04c66269da1 100644
--- a/src/mame/drivers/mystwarr.cpp
+++ b/src/mame/drivers/mystwarr.cpp
@@ -953,20 +953,16 @@ static MACHINE_CONFIG_START( mystwarr, mystwarr_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(mystwarr_state, mystwarr_tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 0, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_5, 0, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_K055555_ADD("k055555")
MCFG_DEVICE_ADD("k055673", K055673, 0)
MCFG_K055673_CB(mystwarr_state, mystwarr_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -48, -24)
- MCFG_K055673_GFXDECODE("gfxdecode")
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -48, -24)
MCFG_K055673_PALETTE("palette")
MCFG_DEVICE_ADD("k054338", K054338, 0)
@@ -1018,7 +1014,7 @@ static MACHINE_CONFIG_DERIVED( viostorm, mystwarr )
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(mystwarr_state, metamrph_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_RNG, -62, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_RNG, -62, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( metamrph, mystwarr )
@@ -1051,7 +1047,7 @@ static MACHINE_CONFIG_DERIVED( metamrph, mystwarr )
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(mystwarr_state, metamrph_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_RNG, -51, -24)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_RNG, -51, -24)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( dadandrn, mystwarr )
@@ -1067,7 +1063,7 @@ static MACHINE_CONFIG_DERIVED( dadandrn, mystwarr )
MCFG_DEVICE_MODIFY("k053252")
MCFG_K053252_OFFSETS(24, 16+1)
- MCFG_GFXDECODE_MODIFY("gfxdecode", dadandrn)
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", dadandrn)
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(mystwarr_state, dadandrn)
@@ -1084,7 +1080,7 @@ static MACHINE_CONFIG_DERIVED( dadandrn, mystwarr )
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(mystwarr_state, gaiapols_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -42, -22)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -42, -22)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr )
@@ -1102,7 +1098,7 @@ static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr )
MCFG_K054000_ADD("k054000")
- MCFG_GFXDECODE_MODIFY("gfxdecode", gaiapols)
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", gaiapols)
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(mystwarr_state, gaiapols)
@@ -1120,7 +1116,7 @@ static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr )
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(mystwarr_state, gaiapols_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_RNG, -61, -22) // stage2 brick walls
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_RNG, -61, -22) // stage2 brick walls
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( martchmp, mystwarr )
@@ -1155,7 +1151,7 @@ static MACHINE_CONFIG_DERIVED( martchmp, mystwarr )
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(mystwarr_state, martchmp_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -58, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -58, -23)
MACHINE_CONFIG_END
/**********************************************************************************/
@@ -1286,6 +1282,46 @@ ROM_END
ROM_START( mystwarra )
/* main program */
ROM_REGION( 0x200000, "maincpu", 0 )
+ ROM_LOAD16_BYTE( "128aab01.20f", 0x000000, 0x40000, CRC(3dc89153) SHA1(dd7b315794b07823d380fe2c59ceff93964d5542) )
+ ROM_LOAD16_BYTE( "128aab02.20g", 0x000001, 0x40000, CRC(8fe92ad2) SHA1(f99e6c4bab026fae6becbcf5463ae67081d3b6dd) )
+ ROM_LOAD16_BYTE( "128a03.19f", 0x100000, 0x80000, CRC(e98094f3) SHA1(a3f9b804ff487f792a00ce85a383868ab0b1b5d8) )
+ ROM_LOAD16_BYTE( "128a04.19g", 0x100001, 0x80000, CRC(88c6a3e4) SHA1(7c2361f716a2320730a3dd6723a271e349ad61c3) )
+
+ /* sound program */
+ ROM_REGION( 0x40000, "soundcpu", 0 )
+ ROM_LOAD("128a05.6b", 0x00000, 0x20000, CRC(0e5194e0) SHA1(83356158d561f1b8e21f6ae5936b61da834a0545) )
+ ROM_RELOAD( 0x20000, 0x20000 )
+
+ /* tiles */
+ ROM_REGION( 0x500000, "gfx1", ROMREGION_ERASE00 )
+ ROM_LOADTILE_WORD( "128a08.1h", 0x000000, 1*1024*1024, CRC(63d6cfa0) SHA1(324bf25cf79aa030d2dcc94a53c1984eb8abec3a) )
+ ROM_LOADTILE_WORD( "128a09.1k", 0x000002, 1*1024*1024, CRC(573a7725) SHA1(f2fef32053ed2a65c6c3ddd3e1657a866aa80b3e) )
+ ROM_LOADTILE_BYTE( "128a10.3h", 0x000004, 512*1024, CRC(558e545a) SHA1(cac53e545f3f8980d431443f2c3b8b95e6077d1c) )
+
+ /* sprites */
+ ROM_REGION( 0x500000, "gfx2", ROMREGION_ERASE00 )
+ ROM_LOAD64_WORD( "128a16.22k", 0x000000, 1*1024*1024, CRC(459b6407) SHA1(e4dace4912f9558bee75a8e95ee2637f5e950b47) )
+ ROM_LOAD64_WORD( "128a15.20k", 0x000002, 1*1024*1024, CRC(6bbfedf4) SHA1(0b3acb2b34c722ddc60c0e64e12baa1f225e4fbb) )
+ ROM_LOAD64_WORD( "128a14.19k", 0x000004, 1*1024*1024, CRC(f7bd89dd) SHA1(c9b2ebd5a49840f8b260d53c25cfcc238d21c75c) )
+ ROM_LOAD64_WORD( "128a13.17k", 0x000006, 1*1024*1024, CRC(e89b66a2) SHA1(fce6e56d1759ffe987766426ecb28e9015a500b7) )
+ ROM_LOAD16_BYTE( "128a12.12k", 0x400000, 512*1024, CRC(63de93e2) SHA1(c9a50e7beff1cbbc5d5820664adbd54d52782c54) )
+ ROM_LOAD16_BYTE( "128a11.10k", 0x400001, 512*1024, CRC(4eac941a) SHA1(c0a33f4b975ebee217fd335001839992f4c0bdc8) )
+
+ /* road generator */
+ ROM_REGION( 0x40000, "gfx3", ROMREGION_ERASE00 )
+
+ /* sound data */
+ ROM_REGION( 0x400000, "shared", 0 )
+ ROM_LOAD( "128a06.2d", 0x000000, 2*1024*1024, CRC(88ed598c) SHA1(3c123e26b3a12541df77b368bc0e0d486f5622b6) )
+ ROM_LOAD( "128a07.1d", 0x200000, 2*1024*1024, CRC(db79a66e) SHA1(b7e118ed26bac557038e8ae6cb77f23f3da5646f) )
+
+ ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error
+ ROM_LOAD( "eeprom", 0x0000, 0x080, CRC(fd6a25b4) SHA1(6a9046b582f82efe85bff4e57d4d3b469213f8ae) )
+ROM_END
+
+ROM_START( mystwarraa )
+ /* main program */
+ ROM_REGION( 0x200000, "maincpu", 0 )
ROM_LOAD16_BYTE( "128aaa01.20f", 0x000000, 0x40000, CRC(633ead86) SHA1(56d8628f6081e860c4c6109eabd1c1392f669996) )
ROM_LOAD16_BYTE( "128aaa02.20g", 0x000001, 0x40000, CRC(69ab81a2) SHA1(545bc298dfc4de05bac15d63a84c10400231a04d) )
ROM_LOAD16_BYTE( "128a03.19f", 0x100000, 0x80000, CRC(e98094f3) SHA1(a3f9b804ff487f792a00ce85a383868ab0b1b5d8) )
@@ -2141,7 +2177,8 @@ ROM_END
GAME( 1993, mystwarr, 0, mystwarr, mystwarr, driver_device, 0, ROT0, "Konami", "Mystic Warriors (ver EAA)", MACHINE_IMPERFECT_GRAPHICS )
GAME( 1993, mystwarru, mystwarr, mystwarr, mystwarr, driver_device, 0, ROT0, "Konami", "Mystic Warriors (ver UAA)", MACHINE_IMPERFECT_GRAPHICS )
GAME( 1993, mystwarrj, mystwarr, mystwarr, mystwarr, driver_device, 0, ROT0, "Konami", "Mystic Warriors (ver JAA)", MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1993, mystwarra, mystwarr, mystwarr, mystwarr, driver_device, 0, ROT0, "Konami", "Mystic Warriors (ver AAA)", MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1993, mystwarra, mystwarr, mystwarr, mystwarr, driver_device, 0, ROT0, "Konami", "Mystic Warriors (ver AAB)", MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1993, mystwarraa, mystwarr, mystwarr, mystwarr, driver_device, 0, ROT0, "Konami", "Mystic Warriors (ver AAA)", MACHINE_IMPERFECT_GRAPHICS )
GAME( 1993, mmaulers, 0, dadandrn, dadandrn, driver_device, 0, ROT0, "Konami", "Monster Maulers (ver EAA)", MACHINE_IMPERFECT_GRAPHICS )
GAME( 1993, dadandrn, mmaulers, dadandrn, dadandrn, driver_device, 0, ROT0, "Konami", "Kyukyoku Sentai Dadandarn (ver JAA)", MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/n64.cpp b/src/mame/drivers/n64.cpp
index 9c4e7d146ee..e3cefcdf6d6 100644
--- a/src/mame/drivers/n64.cpp
+++ b/src/mame/drivers/n64.cpp
@@ -418,12 +418,13 @@ static MACHINE_CONFIG_START( n64, n64_mess_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", VR4300BE, 93750000)
- MCFG_FORCE_NO_DRC()
+ MCFG_CPU_FORCE_NO_DRC()
MCFG_CPU_CONFIG(config)
MCFG_CPU_PROGRAM_MAP(n64_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", n64_mess_state, n64_reset_poll)
MCFG_CPU_ADD("rsp", RSP, 62500000)
+ MCFG_CPU_FORCE_NO_DRC()
MCFG_RSP_DP_REG_R_CB(DEVREAD32("rcp",n64_periphs, dp_reg_r))
MCFG_RSP_DP_REG_W_CB(DEVWRITE32("rcp",n64_periphs, dp_reg_w))
MCFG_RSP_SP_REG_R_CB(DEVREAD32("rcp",n64_periphs, sp_reg_r))
@@ -464,8 +465,6 @@ static MACHINE_CONFIG_START( n64, n64_mess_state )
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list", "n64")
-
- MCFG_FORCE_NO_DRC()
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( n64dd, n64 )
diff --git a/src/mame/drivers/namcond1.cpp b/src/mame/drivers/namcond1.cpp
index 5e740e11d4a..c2de731e5bb 100644
--- a/src/mame/drivers/namcond1.cpp
+++ b/src/mame/drivers/namcond1.cpp
@@ -124,104 +124,6 @@ static INPUT_PORTS_START( namcond1 )
INPUT_PORTS_END
-/* text-layer characters */
-
-static const UINT32 pts_4bits_layout_xoffset[64] =
-{
- STEP8( 0*256, 4 ), STEP8( 1*256, 4 ), STEP8( 4*256, 4 ), STEP8( 5*256, 4 ),
- STEP8( 16*256, 4 ), STEP8( 17*256, 4 ), STEP8( 20*256, 4 ), STEP8( 21*256, 4 )
-};
-
-static const UINT32 pts_4bits_layout_yoffset[64] =
-{
- STEP8( 0*256, 8*4 ), STEP8( 2*256, 8*4 ), STEP8( 8*256, 8*4 ), STEP8( 10*256, 8*4 ),
- STEP8( 32*256, 8*4 ), STEP8( 34*256, 8*4 ), STEP8( 40*256, 8*4 ), STEP8( 42*256, 8*4 )
-};
-
-static const gfx_layout pts_8x8_4bits_layout =
-{
- 8,8, /* 8*8 pixels */
- RGN_FRAC(1,1), /* 65536 patterns */
- 4, /* 4 bits per pixel */
- { 0, 1, 2, 3 },
- EXTENDED_XOFFS,
- EXTENDED_YOFFS,
- 8*8*4,
- pts_4bits_layout_xoffset,
- pts_4bits_layout_yoffset
-};
-
-static const gfx_layout pts_16x16_4bits_layout =
-{
- 16,16, /* 16*16 pixels */
- RGN_FRAC(1,1), /* 16384 patterns */
- 4, /* 4 bits per pixel */
- { 0, 1, 2, 3 },
- EXTENDED_XOFFS,
- EXTENDED_YOFFS,
- 16*16*4,
- pts_4bits_layout_xoffset,
- pts_4bits_layout_yoffset
-};
-
-static const gfx_layout pts_32x32_4bits_layout =
-{
- 32,32, /* 32*32 pixels */
- RGN_FRAC(1,1), /* 4096 patterns */
- 4, /* 4 bits per pixel */
- { 0, 1, 2, 3 },
- EXTENDED_XOFFS,
- EXTENDED_YOFFS,
- 32*32*4,
- pts_4bits_layout_xoffset,
- pts_4bits_layout_yoffset
-};
-
-static const gfx_layout pts_64x64_4bits_layout =
-{
- 64,64, /* 32*32 pixels */
- RGN_FRAC(1,1), /* 1024 patterns */
- 4, /* 4 bits per pixel */
- { 0, 1, 2, 3 },
- EXTENDED_XOFFS,
- EXTENDED_YOFFS,
- 64*64*4,
- pts_4bits_layout_xoffset,
- pts_4bits_layout_yoffset
-};
-
-
-static const gfx_layout pts_8x8_8bits_layout =
-{
- 8,8, /* 8*8 pixels */
- RGN_FRAC(1,1), /* 32768 patterns */
- 8, /* 8 bits per pixel */
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { STEP8( 0*512, 8 ) },
- { STEP8( 0*512, 8*8 ) },
- 8*8*8
-};
-
-static const gfx_layout pts_16x16_8bits_layout =
-{
- 16,16, /* 16*16 pixels */
- RGN_FRAC(1,1), /* 8192 patterns */
- 8, /* 8 bits per pixel */
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { STEP8( 0*512, 8 ), STEP8( 1*512, 8 ) },
- { STEP8( 0*512, 8*8 ), STEP8( 2*512, 8*8 ) },
- 16*16*8
-};
-
-static GFXDECODE_START( namcond1 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_8x8_4bits_layout, 0, 16 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_16x16_4bits_layout, 0, 16 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_32x32_4bits_layout, 0, 16 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_64x64_4bits_layout, 0, 16 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_8x8_8bits_layout, 0, 256 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_16x16_8bits_layout, 0, 256 )
-GFXDECODE_END
-
READ16_MEMBER(namcond1_state::mcu_p7_read)
{
return 0xff;
@@ -301,7 +203,6 @@ static MACHINE_CONFIG_START( namcond1, namcond1_state )
MCFG_SCREEN_UPDATE_DEVICE("ygv608", ygv608_device, update_screen)
MCFG_SCREEN_PALETTE("palette")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", namcond1)
MCFG_PALETTE_ADD("palette", 256)
/* sound hardware */
@@ -316,7 +217,6 @@ static MACHINE_CONFIG_START( namcond1, namcond1_state )
MCFG_AT28C16_ADD( "at28c16", NULL )
MCFG_YGV608_ADD("ygv608")
- MCFG_YGV608_GFXDECODE("gfxdecode")
MCFG_YGV608_PALETTE("palette")
MACHINE_CONFIG_END
@@ -328,7 +228,7 @@ ROM_START( ncv1 )
ROM_REGION( 0x80000,"mcu", 0 ) /* sub CPU */
ROM_LOAD( "nc1sub.1c", 0x00000, 0x80000, CRC(48ea0de2) SHA1(33e57c8d084a960ccbda462d18e355de44ec7ad9) )
- ROM_REGION( 0x200000,"gfx1", 0 ) /* 2MB character generator */
+ ROM_REGION( 0x200000,"ygv608", 0 ) /* 2MB character generator */
ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(355e7f29) SHA1(47d92c4e28c3610a620d3c9b3be558199477f6d8) )
ROM_REGION( 0x1000000, "c352", 0 ) // Samples
@@ -343,7 +243,7 @@ ROM_START( ncv1j )
ROM_REGION( 0x80000,"mcu", 0 ) /* sub CPU */
ROM_LOAD( "nc1sub.1c", 0x00000, 0x80000, CRC(48ea0de2) SHA1(33e57c8d084a960ccbda462d18e355de44ec7ad9) )
- ROM_REGION( 0x200000,"gfx1", 0 ) /* 2MB character generator */
+ ROM_REGION( 0x200000,"ygv608", 0 ) /* 2MB character generator */
ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(355e7f29) SHA1(47d92c4e28c3610a620d3c9b3be558199477f6d8) )
ROM_REGION( 0x1000000, "c352", 0 ) // Samples
@@ -358,7 +258,7 @@ ROM_START( ncv1j2 )
ROM_REGION( 0x80000,"mcu", 0 ) /* sub CPU */
ROM_LOAD( "nc1sub.1c", 0x00000, 0x80000, CRC(48ea0de2) SHA1(33e57c8d084a960ccbda462d18e355de44ec7ad9) )
- ROM_REGION( 0x200000,"gfx1", 0 ) /* 2MB character generator */
+ ROM_REGION( 0x200000,"ygv608", 0 ) /* 2MB character generator */
ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(355e7f29) SHA1(47d92c4e28c3610a620d3c9b3be558199477f6d8) )
ROM_REGION( 0x1000000, "c352", 0 ) // Samples
@@ -373,7 +273,7 @@ ROM_START( ncv2 )
ROM_REGION( 0x80000,"mcu", 0 ) /* sub CPU */
ROM_LOAD( "ncs1sub.1d", 0x00000, 0x80000, CRC(365cadbf) SHA1(7263220e1630239e3e88b828c00389d02628bd7d) )
- ROM_REGION( 0x400000,"gfx1", 0 ) /* 4MB character generator */
+ ROM_REGION( 0x400000,"ygv608", 0 ) /* 4MB character generator */
ROM_LOAD( "ncs1cg0.10e", 0x000000, 0x200000, CRC(fdd24dbe) SHA1(4dceaae3d853075f58a7408be879afc91d80292e) )
ROM_LOAD( "ncs1cg1.10e", 0x200000, 0x200000, CRC(007b19de) SHA1(d3c093543511ec1dd2f8be6db45f33820123cabc) )
@@ -389,7 +289,7 @@ ROM_START( ncv2j )
ROM_REGION( 0x80000,"mcu", 0 ) /* sub CPU */
ROM_LOAD("ncs1sub.1d", 0x00000, 0x80000, CRC(365cadbf) SHA1(7263220e1630239e3e88b828c00389d02628bd7d) )
- ROM_REGION( 0x400000,"gfx1", 0 ) /* 4MB character generator */
+ ROM_REGION( 0x400000,"ygv608", 0 ) /* 4MB character generator */
ROM_LOAD( "ncs1cg0.10e", 0x000000, 0x200000, CRC(fdd24dbe) SHA1(4dceaae3d853075f58a7408be879afc91d80292e) )
ROM_LOAD( "ncs1cg1.10e", 0x200000, 0x200000, CRC(007b19de) SHA1(d3c093543511ec1dd2f8be6db45f33820123cabc) )
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index 4bab602d1bc..b727012f2ef 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -1693,6 +1693,7 @@ static ADDRESS_MAP_START( naomi_map, AS_PROGRAM, 64, naomi_state )
AM_RANGE(0x00200000, 0x00207fff) AM_MIRROR(0x02000000) AM_RAM // bios uses it (battery backed ram ?)
AM_RANGE(0x005f6800, 0x005f69ff) AM_MIRROR(0x02000000) AM_READWRITE(dc_sysctrl_r, dc_sysctrl_w )
AM_RANGE(0x005f6c00, 0x005f6cff) AM_MIRROR(0x02000000) AM_DEVICE32( "maple_dc", maple_dc_device, amap, U64(0xffffffffffffffff) )
+ AM_RANGE(0x005f7018, 0x005f702f) AM_MIRROR(0x02000000) AM_DEVREADWRITE16( "comm_board", m3comm_device, naomi_r, naomi_w, U64(0x0000ffff0000ffff) )
AM_RANGE(0x005f7000, 0x005f70ff) AM_MIRROR(0x02000000) AM_DEVICE16( "rom_board", naomi_board, submap, U64(0x0000ffff0000ffff) )
AM_RANGE(0x005f7400, 0x005f74ff) AM_MIRROR(0x02000000) AM_DEVICE32( "rom_board", naomi_g1_device, amap, U64(0xffffffffffffffff) )
AM_RANGE(0x005f7800, 0x005f78ff) AM_MIRROR(0x02000000) AM_READWRITE(dc_g2_ctrl_r, dc_g2_ctrl_w )
@@ -2703,6 +2704,7 @@ static MACHINE_CONFIG_DERIVED( naomi_base, naomi_aw_base )
MCFG_EEPROM_SERIAL_93C46_8BIT_ADD("mie_eeprom")
MCFG_X76F100_ADD("naomibd_eeprom")
+ MCFG_M3COMM_ADD("comm_board")
MACHINE_CONFIG_END
/*
@@ -2710,7 +2712,7 @@ MACHINE_CONFIG_END
*/
static MACHINE_CONFIG_DERIVED( naomi, naomi_base )
- MCFG_NAOMI_ROM_BOARD_ADD("rom_board", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
+ MCFG_NAOMI_ROM_BOARD_ADD("rom_board", "naomibd_eeprom", "boardid", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
/*
@@ -2718,7 +2720,7 @@ MACHINE_CONFIG_END
*/
static MACHINE_CONFIG_DERIVED( naomigd, naomi_base )
- MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", ":gdrom", ":pic", "naomibd_eeprom", WRITE8(dc_state, g1_irq))
+ MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", "gdrom", "pic", "naomibd_eeprom", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
/*
@@ -2726,7 +2728,7 @@ MACHINE_CONFIG_END
*/
static MACHINE_CONFIG_DERIVED( naomim1, naomi_base )
- MCFG_NAOMI_M1_BOARD_ADD("rom_board", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
+ MCFG_NAOMI_M1_BOARD_ADD("rom_board", "naomibd_eeprom", "boardid", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
/*
@@ -2734,7 +2736,7 @@ MACHINE_CONFIG_END
*/
static MACHINE_CONFIG_DERIVED( naomim2, naomi_base )
- MCFG_NAOMI_M2_BOARD_ADD("rom_board", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
+ MCFG_NAOMI_M2_BOARD_ADD("rom_board", "naomibd_eeprom", "boardid", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
/*
@@ -2742,7 +2744,7 @@ MACHINE_CONFIG_END
*/
static MACHINE_CONFIG_DERIVED( naomim4, naomi_base )
- MCFG_NAOMI_M4_BOARD_ADD("rom_board", ":pic_readout", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
+ MCFG_NAOMI_M4_BOARD_ADD("rom_board", "pic_readout", "naomibd_eeprom", "boardid", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
/*
@@ -2789,7 +2791,7 @@ static MACHINE_CONFIG_DERIVED( aw_base, naomi_aw_base )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(aw_map)
MCFG_MACRONIX_29L001MC_ADD("awflash")
- MCFG_AW_ROM_BOARD_ADD("rom_board", ":rom_key", WRITE8(dc_state, g1_irq))
+ MCFG_AW_ROM_BOARD_ADD("rom_board", "rom_key", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( aw1c, aw_base )
@@ -3653,8 +3655,8 @@ ROM_START( derbyoc2 )
ROM_LOAD( "mpr-22304.ic10", 0x9800000, 0x1000000, CRC(46c1fb1f) SHA1(6daca76a75df3501f77e473eb065d48804fcc64a) )
ROM_LOAD( "mpr-22305.ic11", 0xa800000, 0x1000000, CRC(027d0e7b) SHA1(e3c874e60cabb6f9ce686696d9055a0c0d5289ae) )
- // 840-0083-01 2001 317-0327-JPN Naomi (label comes from unclear photo, can be wrong)
- ROM_PARAMETER( ":rom_board:segam2crypt:key", "-1") // key is unknown, probably not used by game
+ // 840-0083-01 2001 317-0327-JPN Naomi
+ ROM_PARAMETER( ":rom_board:segam2crypt:key", "2a436bb7")
ROM_END
/*
diff --git a/src/mame/drivers/nc.cpp b/src/mame/drivers/nc.cpp
index 576464351ed..0f76cf72df1 100644
--- a/src/mame/drivers/nc.cpp
+++ b/src/mame/drivers/nc.cpp
@@ -96,7 +96,6 @@
******************************************************************************/
#include "emu.h"
-#include "emuopts.h"
#include "cpu/z80/z80.h"
#include "includes/nc.h"
#include "machine/mc146818.h" /* for NC200 real time clock */
diff --git a/src/mame/drivers/neogeo_noslot.cpp b/src/mame/drivers/neogeo_noslot.cpp
index 761e234a93b..3dc99c2dc2a 100644
--- a/src/mame/drivers/neogeo_noslot.cpp
+++ b/src/mame/drivers/neogeo_noslot.cpp
@@ -7561,6 +7561,30 @@ ROM_START( kf2k3pcb ) /* Encrypted Set, JAMMA PCB */
ROM_END
+
+ROM_START( unkneo )
+ ROM_REGION( 0x100000, "maincpu", 0 )
+ ROM_LOAD16_BYTE( "EP1.bin", 0x000001, 0x080000, CRC(f353448c) SHA1(f0f966ca15d503e01b40e901765ff0888463b65d) )
+ ROM_LOAD16_BYTE( "EP2.bin", 0x000000, 0x080000, CRC(f25c71ad) SHA1(803fb6cd6a7ada59678ad901ff9788b1e54ddd0c) )
+
+ NEO_SFIX_128K( "s1.s1", CRC(706477a7) SHA1(8cbee7f6832e7edd2dc792ca330420a6a984b879) ) // was a dead AXS512PC 512KB sram card, this data is handcrafted to make the set usable (hence BAD_DUMP)
+
+ NEOGEO_BIOS
+ ROM_REGION( 0x20000, "audiobios", 0 )
+ ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) )
+ ROM_REGION( 0x30000, "audiocpu", ROMREGION_ERASE00 )
+ /* not present */
+
+ ROM_REGION( 0x400000, "ymsnd", 0 )
+ ROM_LOAD( "sram.v1", 0x000000, 0x200000, NO_DUMP ) // was a dead AXS2000PC 2MB sram card, battery dead, data lost.
+
+ NO_DELTAT_REGION
+
+ ROM_REGION( 0x2000000, "sprites", 0 )
+ ROM_LOAD16_BYTE( "no3.bin", 0x000000, 0x1000000, CRC(81821826) SHA1(b7c1a53e32633383675206a16c68f6f2ff984865) )
+ ROM_LOAD16_BYTE( "no4.bin", 0x000001, 0x1000000, CRC(3601d568) SHA1(800323e52f5d33b402f84d31850b42c688082d67) )
+ROM_END
+
/*************************************
*
* Bootleg sets
@@ -9902,6 +9926,8 @@ GAME( 1995, marukodq, neogeo, neogeo_noslot, neogeo, neogeo_state, neoge
GAME( 1995, doubledr, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Technos Japan", "Double Dragon (Neo-Geo)", MACHINE_SUPPORTS_SAVE )
GAME( 1995, gowcaizr, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Technos Japan", "Voltage Fighter - Gowcaizer / Choujin Gakuen Gowcaizer", MACHINE_SUPPORTS_SAVE )
GAME( 1996, sdodgeb, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Technos Japan", "Super Dodge Ball / Kunio no Nekketsu Toukyuu Densetsu", MACHINE_SUPPORTS_SAVE )
+GAME( 199?, unkneo, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Technos Japan?", "Unknown Neo-Geo Vs. Fighter (prototype)", MACHINE_SUPPORTS_SAVE ) // same ID code as Voltage Fighter Gowkaizer so probably by Technos
+
/* Tecmo */
GAME( 1996, tws96, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Tecmo", "Tecmo World Soccer '96", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/ninjakd2.cpp b/src/mame/drivers/ninjakd2.cpp
index a69e8ff2181..af71f1f08dd 100644
--- a/src/mame/drivers/ninjakd2.cpp
+++ b/src/mame/drivers/ninjakd2.cpp
@@ -1352,6 +1352,61 @@ ROM_START( robokid )
ROM_LOAD( "robokid.18a", 0x50000, 0x10000, CRC(fdff7441) SHA1(843b2c92bbc6f7319568677d50cbd9b03475b34a) )
ROM_END
+
+
+ROM_START( robokidj3 )
+ ROM_REGION( 0x50000, "maincpu", 0 )
+ ROM_LOAD( "robokid1.18j", 0x00000, 0x08000, CRC(77a9332a) SHA1(60464ff8bdea5ee2256f24210dc7246fcffb0fca) )
+ ROM_IGNORE( 0x08000 )
+ ROM_RELOAD( 0x10000, 0x10000 ) // banked at 8000-bfff
+ ROM_LOAD( "robokid2.18k", 0x20000, 0x10000, CRC(715ecee4) SHA1(1c00b9233b24ca70b0d097c2f62b85db280a9c9b) )
+ ROM_LOAD( "robokid3.15k", 0x30000, 0x10000, CRC(ce12fa86) SHA1(73beaeea5b50ec90d612813845f8345a465750f7) )
+ ROM_LOAD( "robokid4.12k", 0x40000, 0x10000, CRC(97e86600) SHA1(e140a2e323e9a91ae415fd5539b3e0226dff3a69) )
+
+ ROM_REGION( 0x100, "maincpu_prom", 0 )
+ ROM_LOAD( "prom82s129.cpu", 0x000, 0x100, BAD_DUMP CRC(4dd96f67) SHA1(01b415d9e86ff0c5aad7cfe81e903f2c202bb541))
+
+ ROM_REGION( 0x10000, "soundcpu", 0 )
+ ROM_LOAD( "robokid.k7", 0x00000, 0x10000, CRC(f490a2e9) SHA1(861d1256c090ce3d1f45f95cc894affbbc3f1466) )
+
+ ROM_REGION( 0x08000, "gfx1", 0 ) // fg tiles
+ ROM_LOAD( "robokid.b9", 0x00000, 0x08000, CRC(fac59c3f) SHA1(1b202ad5c12982512129d9e097267dd31b984ae8) )
+
+ ROM_REGION( 0x40000, "gfx2", 0 ) // sprite tiles
+ ROM_LOAD( "robokid.15f", 0x00000, 0x10000, CRC(ba61f5ab) SHA1(8433ddd55f0184cd5e8bb4a94a1c2336b2f8ff05) )
+ ROM_LOAD( "robokid.16f", 0x10000, 0x10000, CRC(d9b399ce) SHA1(70755c9cae27187f183ae6d61bedb95c420756f4) )
+ ROM_LOAD( "robokid.17f", 0x20000, 0x10000, CRC(afe432b9) SHA1(1ec7954ccf112eddf0ffcb8b5aec6cbc5cba7a7a) )
+ ROM_LOAD( "robokid.18f", 0x30000, 0x10000, CRC(a0aa2a84) SHA1(4d46c169429cd285644336c7d47e393b33bd8770) )
+
+ ROM_REGION( 0x80000, "gfx3", 0 ) // bg0 tiles
+ ROM_LOAD( "robokid.19c", 0x00000, 0x10000, CRC(02220421) SHA1(f533e9c6cea1dccbb60e0528c470f3cb5e8fc44e) )
+ ROM_LOAD( "robokid.20c", 0x10000, 0x10000, CRC(02d59bc2) SHA1(031acbb14145f9f4623de8868c6207fb9f8e8207) )
+ ROM_LOAD( "robokid.17d", 0x20000, 0x10000, CRC(2fa29b99) SHA1(13dce7932e2e9c03a139a4293584838aa3d9f1c3) )
+ ROM_LOAD( "robokid.18d", 0x30000, 0x10000, CRC(ae15ce02) SHA1(175e4eebdf12f1f373e01a4b1c933053ddd09abf) )
+ ROM_LOAD( "robokid.19d", 0x40000, 0x10000, CRC(784b089e) SHA1(1ae3346b4afa3da9484ebc59c8a530cb95f7d277) )
+ ROM_LOAD( "robokid.20d", 0x50000, 0x10000, CRC(b0b395ed) SHA1(31ec07634053793a701bbfd601b029f7da66e9d7) )
+ ROM_LOAD( "robokid.19f", 0x60000, 0x10000, CRC(0f9071c6) SHA1(8bf0c35189eda98a9bc150788890e136870cb5b2) )
+
+ ROM_REGION( 0x80000, "gfx4", 0 ) // bg1 tiles
+ ROM_LOAD( "robokid.12c", 0x00000, 0x10000, CRC(0ab45f94) SHA1(d8274263068d998c89a1b247dde7f814037cc15b) )
+ ROM_LOAD( "robokid.14c", 0x10000, 0x10000, CRC(029bbd4a) SHA1(8e078cdafe608fc6cde827be85c5267ade4ecca6) )
+ ROM_LOAD( "robokid.15c", 0x20000, 0x10000, CRC(7de67ebb) SHA1(2fe92e50e2894dd363e69b053db96bdb66a273eb) )
+ ROM_LOAD( "robokid.16c", 0x30000, 0x10000, CRC(53c0e582) SHA1(763e6127532d022a707bf9ddf1a832413745f248) )
+ ROM_LOAD( "robokid.17c", 0x40000, 0x10000, CRC(0cae5a1e) SHA1(a183a33516c81ea2c029b72ee6261c4519e095ab) )
+ ROM_LOAD( "robokid.18c", 0x50000, 0x10000, CRC(56ac7c8a) SHA1(66ed5646a2e8563caeb4ff96fa7d34fde27e9899) )
+ ROM_LOAD( "robokid.15d", 0x60000, 0x10000, CRC(cd632a4d) SHA1(a537d9ced45fdac490097e9162ac4d09a470be79) )
+ ROM_LOAD( "robokid.16d", 0x70000, 0x10000, CRC(18d92b2b) SHA1(e6d20ea8f0fac8bd4824a3b279a0fd8a1d6c26f5) )
+
+ ROM_REGION( 0x80000, "gfx5", 0 ) // bg2 tiles
+ ROM_LOAD( "robokid.12a", 0x00000, 0x10000, CRC(e64d1c10) SHA1(d1073c80c9788aba65410f88691747a37b2a9d4a) )
+ ROM_LOAD( "robokid.14a", 0x10000, 0x10000, CRC(8f9371e4) SHA1(0ea06d62bf4673ebda49a849cead832a24e5b886) )
+ ROM_LOAD( "robokid.15a", 0x20000, 0x10000, CRC(469204e7) SHA1(8c2e94635b2b304e7dfa2e6ad58ba526dcf02453) )
+ ROM_LOAD( "robokid.16a", 0x30000, 0x10000, CRC(4e340815) SHA1(d204b830c5809f25f7dfa451bbcbeda8b81ced54) )
+ ROM_LOAD( "robokid.17a", 0x40000, 0x10000, CRC(f0863106) SHA1(ff7e44d0aa5a07ec9a7eddef1a55181bd2e867b1) )
+ ROM_LOAD( "robokid.18a", 0x50000, 0x10000, CRC(fdff7441) SHA1(843b2c92bbc6f7319568677d50cbd9b03475b34a) )
+ROM_END
+
+
ROM_START( robokidj )
ROM_REGION( 0x50000, "maincpu", 0 )
ROM_LOAD( "1.29", 0x00000, 0x08000, CRC(59a1e2ec) SHA1(71f9d28dd8d2cf77a27fab163ce9562e3e75a540) )
@@ -1620,10 +1675,15 @@ GAME( 1987, ninjakd2b, ninjakd2, ninjakd2, rdaction, ninjakd2_state, bootleg, R
GAME( 1987, ninjakd2c, ninjakd2, ninjakd2, rdaction, ninjakd2_state, ninjakd2, ROT0, "UPL", "Ninja-Kid II / NinjaKun Ashura no Shou (set 4)", MACHINE_SUPPORTS_SAVE ) // close to set 3
GAME( 1987, rdaction, ninjakd2, ninjakd2, rdaction, ninjakd2_state, ninjakd2, ROT0, "UPL (World Games license)", "Rad Action / NinjaKun Ashura no Shou", MACHINE_SUPPORTS_SAVE )
GAME( 1987, jt104, ninjakd2, ninjakd2, rdaction, ninjakd2_state, bootleg, ROT0, "UPL (United Amusements license)", "JT-104 (title screen modification of Rad Action)", MACHINE_SUPPORTS_SAVE )
+
GAME( 1987, mnight, 0, mnight, mnight, ninjakd2_state, mnight, ROT0, "UPL (Kawakus license)", "Mutant Night", MACHINE_SUPPORTS_SAVE )
+
GAME( 1988, arkarea, 0, arkarea, arkarea, ninjakd2_state, mnight, ROT0, "UPL", "Ark Area", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, robokid, 0, robokid, robokid, ninjakd2_state, robokid, ROT0, "UPL", "Atomic Robo-kid", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, robokidj, robokid, robokid, robokidj, ninjakd2_state, robokidj, ROT0, "UPL", "Atomic Robo-kid (Japan, set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, robokidj2, robokid, robokid, robokidj, ninjakd2_state, robokidj, ROT0, "UPL", "Atomic Robo-kid (Japan, set 2)", MACHINE_SUPPORTS_SAVE )
+
+GAME( 1988, robokid, 0, robokid, robokid, ninjakd2_state, robokid, ROT0, "UPL", "Atomic Robo-kid (World, Type-2)", MACHINE_SUPPORTS_SAVE ) // 3-digit highscore names
+GAME( 1988, robokidj, robokid, robokid, robokidj, ninjakd2_state, robokidj, ROT0, "UPL", "Atomic Robo-kid (Japan, Type-2, set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, robokidj2, robokid, robokid, robokidj, ninjakd2_state, robokidj, ROT0, "UPL", "Atomic Robo-kid (Japan, Type-2, set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, robokidj3, robokid, robokid, robokidj, driver_device, 0, ROT0, "UPL", "Atomic Robo-kid (Japan)", MACHINE_SUPPORTS_SAVE )
+
GAME( 1989, omegaf, 0, omegaf, omegaf, driver_device, 0, ROT270, "UPL", "Omega Fighter", MACHINE_SUPPORTS_SAVE )
GAME( 1989, omegafs, omegaf, omegaf, omegaf, driver_device, 0, ROT270, "UPL", "Omega Fighter Special", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/nmg5.cpp b/src/mame/drivers/nmg5.cpp
index 53b65663cf0..6a808ce11d4 100644
--- a/src/mame/drivers/nmg5.cpp
+++ b/src/mame/drivers/nmg5.cpp
@@ -999,7 +999,6 @@ static MACHINE_CONFIG_START( nmg5, nmg5_state )
MCFG_DECO_SPRITE_FLIPALLX(1)
MCFG_DECO_SPRITE_OFFSETS(0, 8)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/nwk-tr.cpp b/src/mame/drivers/nwk-tr.cpp
index a64c10fd96a..1b216b62468 100644
--- a/src/mame/drivers/nwk-tr.cpp
+++ b/src/mame/drivers/nwk-tr.cpp
@@ -802,16 +802,11 @@ static MACHINE_CONFIG_START( nwktr, nwktr_state )
MCFG_PALETTE_ADD("palette", 65536)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k001604", K001604, 0)
- MCFG_K001604_GFX_INDEX1(0)
- MCFG_K001604_GFX_INDEX2(1)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0) // correct?
MCFG_K001604_ROZ_OFFSET(0) // correct?
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -832,13 +827,10 @@ static MACHINE_CONFIG_DERIVED( thrilld, nwktr )
MCFG_DEVICE_REMOVE("k001604")
MCFG_DEVICE_ADD("k001604", K001604, 0)
- MCFG_K001604_GFX_INDEX1(0)
- MCFG_K001604_GFX_INDEX2(1)
MCFG_K001604_LAYER_SIZE(1)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0) // correct?
MCFG_K001604_ROZ_OFFSET(0) // correct?
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/opwolf.cpp b/src/mame/drivers/opwolf.cpp
index 36837da295e..826402fbb1e 100644
--- a/src/mame/drivers/opwolf.cpp
+++ b/src/mame/drivers/opwolf.cpp
@@ -679,9 +679,12 @@ static INPUT_PORTS_START( opwolfp )
PORT_DIPNAME( 0x20, 0x20, "Infinite Health (Cheat)" ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x20, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
+ PORT_DIPNAME( 0x40, 0x40, "Infinite Ammo (Cheat)" ) PORT_DIPLOCATION("SW2:7") // is 'Discount when Continuing' in final release
+ PORT_DIPSETTING( 0x40, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Language ) ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x80, DEF_STR( Japanese ) )
- PORT_DIPSETTING( 0x00, "English (invalid)" ) // game hangs on course screen (confirmed on hardware)
+ PORT_DIPSETTING( 0x00, "English (invalid)" ) // game hangs on course screen (confirmed on hardware where it watchdog resets)
INPUT_PORTS_END
@@ -793,7 +796,6 @@ static MACHINE_CONFIG_START( opwolf, opwolf_state )
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0)
MCFG_PC090OJ_GFXDECODE("gfxdecode")
@@ -868,7 +870,6 @@ static MACHINE_CONFIG_START( opwolfb, opwolf_state ) /* OSC clocks unknown for t
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0)
MCFG_PC090OJ_GFXDECODE("gfxdecode")
diff --git a/src/mame/drivers/overdriv.cpp b/src/mame/drivers/overdriv.cpp
index 5dd5191318b..c5b1f19898d 100644
--- a/src/mame/drivers/overdriv.cpp
+++ b/src/mame/drivers/overdriv.cpp
@@ -340,17 +340,13 @@ static MACHINE_CONFIG_START( overdriv, overdriv_state )
MCFG_SCREEN_UPDATE_DRIVER(overdriv_state, screen_update_overdriv)
MCFG_SCREEN_PALETTE("palette")
-// MCFG_GFXDECODE_ADD("gfxdecode", "palette", overdriv)
MCFG_PALETTE_ADD("palette", 2048)
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(overdriv_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx1", 0, NORMAL_PLANE_ORDER, 77, 22)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx1", NORMAL_PLANE_ORDER, 77, 22)
MCFG_K053246_PALETTE("palette")
MCFG_DEVICE_ADD("k051316_1", K051316, 0)
diff --git a/src/mame/drivers/pbaction.cpp b/src/mame/drivers/pbaction.cpp
index a62ddc0b6db..626a2e690c4 100644
--- a/src/mame/drivers/pbaction.cpp
+++ b/src/mame/drivers/pbaction.cpp
@@ -68,7 +68,7 @@ Stephh's notes (based on the game Z80 code and some tests) :
#include "emu.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
-#include "machine/segacrpt.h"
+#include "machine/segacrpt_device.h"
#include "includes/pbaction.h"
@@ -317,8 +317,11 @@ static MACHINE_CONFIG_START( pbaction, pbaction_state )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( pbactionx, pbaction )
- MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_REPLACE("maincpu", SEGA_CPU_PBACTIO4, 4000000) /* 4 MHz? */
+ MCFG_CPU_PROGRAM_MAP(pbaction_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pbaction_state, vblank_irq)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
MACHINE_CONFIG_END
@@ -487,45 +490,15 @@ DRIVER_INIT_MEMBER(pbaction_state,pbactio3)
rom[i] = BITSWAP8(rom[i], 7,6,5,4,1,2,3,0);
}
- /* then do the standard Sega decryption */
- DRIVER_INIT_CALL(pbactio4);
-
/* install a protection (?) workaround */
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc000, 0xc000, read8_delegate(FUNC(pbaction_state::pbactio3_prot_kludge_r),this) );
}
-DRIVER_INIT_MEMBER(pbaction_state,pbactio4)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0xa8,0xa0,0x88,0x80 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...0...0 */
- { 0x28,0x08,0xa8,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...0...1 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...1...0 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...1...1 */
- { 0xa8,0xa0,0x88,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...0...0 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...0...1 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...1...0 */
- { 0xa8,0xa0,0x88,0x80 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...1...1 */
- { 0xa8,0xa0,0x88,0x80 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...0...0 */
- { 0x28,0x20,0xa8,0xa0 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...0...0...1 */
- { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...0 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...1...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...1...0...0 */
- { 0x28,0x20,0xa8,0xa0 }, { 0xa8,0x28,0xa0,0x20 }, /* ...1...1...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...1...1...0 */
- { 0xa8,0xa0,0x88,0x80 }, { 0xa8,0x28,0xa0,0x20 } /* ...1...1...1...1 */
- };
-
- /* this one only has the Sega decryption */
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
GAME( 1985, pbaction, 0, pbaction, pbaction, driver_device, 0, ROT90, "Tehkan", "Pinball Action (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1985, pbaction2, pbaction, pbaction, pbaction, driver_device, 0, ROT90, "Tehkan", "Pinball Action (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1985, pbaction3, pbaction, pbactionx, pbaction, pbaction_state, pbactio3, ROT90, "Tehkan", "Pinball Action (set 3, encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, pbaction4, pbaction, pbactionx, pbaction, pbaction_state, pbactio4, ROT90, "Tehkan", "Pinball Action (set 4, encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, pbaction5, pbaction, pbactionx, pbaction, pbaction_state, pbactio4, ROT90, "Tehkan", "Pinball Action (set 5, encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, pbaction4, pbaction, pbactionx, pbaction, driver_device, 0, ROT90, "Tehkan", "Pinball Action (set 4, encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, pbaction5, pbaction, pbactionx, pbaction, driver_device, 0, ROT90, "Tehkan", "Pinball Action (set 5, encrypted)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/pc.cpp b/src/mame/drivers/pc.cpp
index 0ab59558865..7452b907f44 100644
--- a/src/mame/drivers/pc.cpp
+++ b/src/mame/drivers/pc.cpp
@@ -340,6 +340,11 @@ ROM_START( sicpc1605 )
ROM_LOAD("multitech pc-700 3.1.bin", 0xe000, 0x2000, CRC(0ac7a2e1) SHA1(b9c8504e21213d81a068dde9f51f9c973d726e7b))
ROM_END
+ROM_START( ncrpc4i )
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD( "ncr_pc4i_biosrom_1985.bin",0xc000, 0x4000, CRC(b9732648) SHA1(0d5d96fbc36089ca4d893b0db84faffa8043a5e4))
+ROM_END
+
ROM_START( zdsupers )
ROM_REGION(0x10000,"bios", 0)
ROM_SYSTEM_BIOS( 0, "v31d", "v3.1d" )
@@ -434,17 +439,18 @@ ROM_END
ROM_START( compc1 )
ROM_REGION(0x10000, "bios", 0)
- ROM_LOAD("380270-01.bin", 0xc000, 0x4000, BAD_DUMP CRC(75135d37) SHA1(177283642240fee191ba2d87e1d0c2a377c78ccb))
+ ROM_LOAD("pc1_bios.bin", 0xc000, 0x4000, CRC(e37367c8) SHA1(9aac9c38b4ebdb9a740e393199c2eff75a0bde03))
ROM_REGION(0x8000, "gfx1", 0)
- ROM_LOAD("pc1_char.bin", 0x0000, 0x8000, CRC(4773a945) SHA1(bcc38abecc75d3f641d42987cb0d2ed71d71bc4c))
+ ROM_LOAD("pc1_char.bin", 0x0000, 0x4000, CRC(ee6c27f0) SHA1(e769cc3a49a1d708bd74eb4ac85bb6ea67220d38))
ROM_END
+
// Note: Commodore PC20-III, PC10-III and COLT share the same BIOS
ROM_START( pc10iii )
ROM_REGION(0x10000, "bios", 0)
ROM_DEFAULT_BIOS("v441")
ROM_SYSTEM_BIOS(0, "v435", "v4.35")
- ROMX_LOAD("318085-01.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(1))
+ ROMX_LOAD("318085-01.u201", 0x8000, 0x8000, CRC(be752d1e) SHA1(5e5e63cd6d6269816cd691602e4c4d209fe3df67), ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "v436", "v4.36")
ROMX_LOAD("318085-02.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(2))
ROM_SYSTEM_BIOS(2, "v436c", "v4.36c")
@@ -509,7 +515,8 @@ COMP( 1991, poisk2, ibm5150, 0, poisk2, pccga, driver_device
COMP( 1990, mc1702, ibm5150, 0, pccga, pccga, driver_device, 0, "<unknown>", "Elektronika MC-1702", MACHINE_NOT_WORKING)
COMP( 1987, zdsupers, ibm5150, 0, zenith, pccga, driver_device, 0, "Zenith Data Systems", "SuperSport", 0)
-COMP( 1985, sicpc1605, ibm5150, 0, siemens, pccga, driver_device, 0, "Siemens", "Sicomp PC16-05", 0)
+COMP( 1985, sicpc1605, ibm5150, 0, siemens, pccga, driver_device, 0, "Siemens", "Sicomp PC16-05", MACHINE_NOT_WORKING)
+COMP( 1985, ncrpc4i, ibm5150, 0, pccga, pccga, driver_device, 0, "NCR","PC4i", MACHINE_NOT_WORKING)
COMP( 198?, olivm15, ibm5150, 0, m15, pccga, driver_device, 0, "Olivetti", "M15", 0)
diff --git a/src/mame/drivers/pcktgal.cpp b/src/mame/drivers/pcktgal.cpp
index 3a34210d516..f2745cb74a4 100644
--- a/src/mame/drivers/pcktgal.cpp
+++ b/src/mame/drivers/pcktgal.cpp
@@ -244,7 +244,7 @@ static MACHINE_CONFIG_START( pcktgal, pcktgal_state )
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
/* sound hardware */
diff --git a/src/mame/drivers/pengo.cpp b/src/mame/drivers/pengo.cpp
index c47fb18f97f..0d4f12b4139 100644
--- a/src/mame/drivers/pengo.cpp
+++ b/src/mame/drivers/pengo.cpp
@@ -65,7 +65,7 @@
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "machine/segacrpt.h"
+#include "machine/segacrpt_device.h"
#include "includes/pacman.h"
@@ -77,7 +77,6 @@ public:
DECLARE_WRITE8_MEMBER(pengo_coin_counter_w);
DECLARE_WRITE8_MEMBER(irq_mask_w);
DECLARE_DRIVER_INIT(penta);
- DECLARE_DRIVER_INIT(pengo);
INTERRUPT_GEN_MEMBER(vblank_irq);
optional_shared_ptr<UINT8> m_decrypted_opcodes;
@@ -405,6 +404,14 @@ static MACHINE_CONFIG_DERIVED( pengou, pengo )
MCFG_DEVICE_REMOVE_ADDRESS_MAP(AS_DECRYPTED_OPCODES)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( pengoe, pengo )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5010, MASTER_CLOCK/6)
+ MCFG_CPU_PROGRAM_MAP(pengo_map)
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pengo_state, vblank_irq)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
static MACHINE_CONFIG_DERIVED( jrpacmbl, pengo )
/* basic machine hardware */
@@ -643,32 +650,6 @@ ROM_END
*
*************************************/
-DRIVER_INIT_MEMBER(pengo_state,pengo)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0xa0,0x80,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...0...1 */
- { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...0...1...0 */
- { 0x08,0x28,0x88,0xa8 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...1 */
- { 0x08,0x00,0x88,0x80 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...1...0...0 */
- { 0xa0,0x80,0x20,0x00 }, { 0x08,0x00,0x88,0x80 }, /* ...0...1...0...1 */
- { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...1...1...0 */
- { 0xa0,0x80,0x20,0x00 }, { 0x00,0x08,0x20,0x28 }, /* ...0...1...1...1 */
- { 0x88,0x80,0x08,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...0...0 */
- { 0x88,0x80,0x08,0x00 }, { 0x00,0x08,0x20,0x28 }, /* ...1...0...0...1 */
- { 0x08,0x28,0x88,0xa8 }, { 0x08,0x28,0x88,0xa8 }, /* ...1...0...1...0 */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...1...1 */
- { 0x08,0x00,0x88,0x80 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...0 */
- { 0x00,0x08,0x20,0x28 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...1 */
- { 0x08,0x28,0x88,0xa8 }, { 0x08,0x28,0x88,0xa8 }, /* ...1...1...1...0 */
- { 0x08,0x00,0x88,0x80 }, { 0xa0,0x80,0x20,0x00 } /* ...1...1...1...1 */
- };
-
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
DRIVER_INIT_MEMBER(pengo_state,penta)
@@ -749,11 +730,11 @@ DRIVER_INIT_MEMBER(pengo_state,penta)
*
*************************************/
-GAME( 1982, pengo, 0, pengo, pengo, pengo_state, pengo, ROT90, "Sega", "Pengo (set 1 rev c)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, pengo2, pengo, pengo, pengo, pengo_state, pengo, ROT90, "Sega", "Pengo (set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, pengo, 0, pengoe, pengo, driver_device, 0, ROT90, "Sega", "Pengo (set 1 rev c)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, pengo2, pengo, pengoe, pengo, driver_device, 0, ROT90, "Sega", "Pengo (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, pengo2u, pengo, pengou, pengo, driver_device, 0, ROT90, "Sega", "Pengo (set 2 not encrypted)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, pengo3u, pengo, pengou, pengo, driver_device, 0, ROT90, "Sega", "Pengo (set 3 not encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, pengo4, pengo, pengo, pengo, pengo_state, pengo, ROT90, "Sega", "Pengo (set 4)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, pengo4, pengo, pengoe, pengo, driver_device, 0, ROT90, "Sega", "Pengo (set 4)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, pengob, pengo, pengo, pengo, pengo_state, penta, ROT90, "bootleg", "Pengo (bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, penta, pengo, pengo, pengo, pengo_state, penta, ROT90, "bootleg (Grinbee Shouji)", "Penta", MACHINE_SUPPORTS_SAVE ) // Grinbee Shouji was a subsidiary of Orca
GAME( 1983, jrpacmbl, jrpacman, jrpacmbl, jrpacmbl, driver_device, 0, ROT90, "bootleg", "Jr. Pac-Man (Pengo hardware)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/pipedrm.cpp b/src/mame/drivers/pipedrm.cpp
index 0151f62c79c..d73d18bd93c 100644
--- a/src/mame/drivers/pipedrm.cpp
+++ b/src/mame/drivers/pipedrm.cpp
@@ -662,7 +662,6 @@ static MACHINE_CONFIG_START( pipedrm, pipedrm_state )
MCFG_VSYSTEM_SPR2_SET_OFFSETS(-13, -6)
MCFG_VSYSTEM_SPR2_SET_PRITYPE(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(pipedrm_state,pipedrm)
diff --git a/src/mame/drivers/pktgaldx.cpp b/src/mame/drivers/pktgaldx.cpp
index f1f55c249af..98355880a4b 100644
--- a/src/mame/drivers/pktgaldx.cpp
+++ b/src/mame/drivers/pktgaldx.cpp
@@ -359,12 +359,10 @@ static MACHINE_CONFIG_START( pktgaldx, pktgaldx_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_INTERFACE_SCRAMBLE(8,9, 4,5,6,7 ,1,0,3,2) // hopefully this is correct, nothing else uses this arrangement!
diff --git a/src/mame/drivers/playch10.cpp b/src/mame/drivers/playch10.cpp
index 3de354d2a38..3c43e990d4f 100644
--- a/src/mame/drivers/playch10.cpp
+++ b/src/mame/drivers/playch10.cpp
@@ -1420,6 +1420,27 @@ ROM_START( pc_ngai3 ) /* Ninja Gaiden 3 */
ROM_LOAD( "security.prm", 0x00, 0x10, CRC(13755943) SHA1(b7d809b0f60ef489777ccb35868f5c1e777356e0) )
ROM_END
+// this is identcal to the USA NES release with the generic 'New Game 2' menu rom.
+// TT-CHR.U1 = nes-ni-0 chr nes:ttoonadvu Tiny Toon Adventures (USA)
+// TT-GM2.U3 = u2 pc_virus Virus (Dr. Mario prototype, PlayChoice-10)
+// TT-PRG.U5 = nes-ni-0 prg nes:ttoonadvu Tiny Toon Adventures (USA)
+ROM_START( pc_ttoon ) /* Tiny Toon Adventures */
+ BIOS_CPU
+ ROM_LOAD( "TT-GM2.U3", 0x0c000, 0x2000, CRC(d2764d91) SHA1(393b54148e9250f14d83318aed6686cc04b923e6) ) /* extra bios code for this game */
+ BIOS_GFX
+
+ ROM_REGION( 0x50000, "cart", 0 )
+ ROM_LOAD( "TT-PRG.U5", 0x10000, 0x20000, CRC(9cb55b96) SHA1(437c326a4575895b9d7e567cab4f70b2f44ed8dd) ) /* banked */
+ ROM_RELOAD( 0x30000, 0x20000 )
+
+ ROM_REGION( 0x020000, "gfx2", 0 ) /* cart gfx */
+ ROM_LOAD( "TT-CHR.U1", 0x00000, 0x20000, CRC(a024ae14) SHA1(2e797a173161a61c14ce299e3c5a31c6029f2b50) )
+
+ ROM_REGION( 0x10, "rp5h01", 0 ) /* rp5h01 data */
+ ROM_LOAD( "security.u6", 0x00, 0x10, CRC(5b4f6930) SHA1(bd152d6907fe55f80125b34360fdb44cfc348906) )
+ROM_END
+
+
ROM_START( pc_radr2 ) /* Rad Racer II */
BIOS_CPU
ROM_LOAD( "qr-u3", 0x0c000, 0x2000, CRC(0c8fea63) SHA1(7ac04b151df732bd16708655352b7f13926f004f) ) /* extra bios code for this game */
@@ -1649,6 +1670,20 @@ DRIVER_INIT_MEMBER(playch10_state,virus)
DRIVER_INIT_CALL(pcfboard);
}
+DRIVER_INIT_MEMBER(playch10_state,ttoon)
+{
+ UINT8 *ROM = memregion("rp5h01")->base();
+ UINT32 len = memregion("rp5h01")->bytes();
+ for (int i = 0; i < len; i++)
+ {
+ ROM[i] = BITSWAP8(ROM[i],0,1,2,3,4,5,6,7);
+ ROM[i] ^= 0xff;
+ }
+
+ /* common init */
+ DRIVER_INIT_CALL(pcgboard);
+}
+
/* YEAR NAME PARENT BIOS MACHINE INPUT INIT MONITOR */
/* Standard Games */
@@ -1717,6 +1752,8 @@ GAME( 1990, pc_ngai2, playch10, playch10, playch10, playch10_state, pcgboard, RO
GAME( 1991, pc_ngai3, playch10, playch10, playch10, playch10_state, pcgboard, ROT0, "Tecmo (Nintendo of America license)", "Ninja Gaiden Episode III: The Ancient Ship of Doom (PlayChoice-10)", 0 )
GAME( 1991, pc_pwbld, playch10, playch10, playch10, playch10_state, pcgboard, ROT0, "Taito (Nintendo of America license)", "Power Blade (PlayChoice-10)", 0 )
GAME( 1991, pc_rkats, playch10, playch10, playch10, playch10_state, pcgboard, ROT0, "Atlus (Nintendo of America license)", "Rockin' Kats (PlayChoice-10)", 0 )
+GAME( 1991, pc_ttoon, playch10, playch10, playch10, playch10_state, ttoon, ROT0, "Capcom USA (Nintendo of America license)", "Tiny Toon Adventures (prototype) (PlayChoice-10)", 0 ) // Code is final USA NES version of the game, (which is MMC3C according to nes.xml, but this cart has MMC3B)
+
/* variant with 4 screen mirror */
GAME( 1990, pc_radr2, playch10, playch10, playch10, playch10_state, pcgboard_type2, ROT0, "Square (Nintendo of America license)", "Rad Racer II (PlayChoice-10)", 0 )
GAME( 1985, pc_gntlt, playch10, playch10, playch10, playch10_state, pcgboard_type2, ROT0, "Atari / Tengen (Nintendo of America license)", "Gauntlet (PlayChoice-10)", MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/qdrmfgp.cpp b/src/mame/drivers/qdrmfgp.cpp
index 6e8a59867eb..28e8593117d 100644
--- a/src/mame/drivers/qdrmfgp.cpp
+++ b/src/mame/drivers/qdrmfgp.cpp
@@ -598,12 +598,9 @@ static MACHINE_CONFIG_START( qdrmfgp, qdrmfgp_state )
MCFG_VIDEO_START_OVERRIDE(qdrmfgp_state,qdrmfgp)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(qdrmfgp_state, qdrmfgp_tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4dj, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4dj, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053252", K053252, XTAL_32MHz/4)
@@ -645,12 +642,9 @@ static MACHINE_CONFIG_START( qdrmfgp2, qdrmfgp_state )
MCFG_VIDEO_START_OVERRIDE(qdrmfgp_state,qdrmfgp2)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(qdrmfgp_state, qdrmfgp2_tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4dj, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4dj, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053252", K053252, XTAL_32MHz/4)
diff --git a/src/mame/drivers/r9751.cpp b/src/mame/drivers/r9751.cpp
index 1e92da690f2..49b2e756a02 100644
--- a/src/mame/drivers/r9751.cpp
+++ b/src/mame/drivers/r9751.cpp
@@ -87,6 +87,8 @@ private:
required_device<generic_terminal_device> m_terminal;
required_shared_ptr<UINT32> m_main_ram;
+ m68000_base_device* ptr_m68000;
+
// Begin registers
UINT32 reg_ff050004;
UINT32 reg_fff80040;
@@ -102,6 +104,9 @@ private:
// functions
UINT32 swap_uint32( UINT32 val );
+ UINT32 debug_a6();
+ UINT32 debug_a5();
+ UINT32 debug_a5_20();
virtual void machine_reset() override;
};
@@ -113,10 +118,25 @@ UINT32 r9751_state::swap_uint32( UINT32 val )
return (val << 16) | (val >> 16);
}
+UINT32 r9751_state::debug_a6()
+{
+ return m_maincpu->space(AS_PROGRAM).read_dword(ptr_m68000->dar[14] + 4);
+}
+
+UINT32 r9751_state::debug_a5()
+{
+ return m_maincpu->space(AS_PROGRAM).read_dword(ptr_m68000->dar[13]);
+}
+
+UINT32 r9751_state::debug_a5_20()
+{
+ return m_maincpu->space(AS_PROGRAM).read_dword(ptr_m68000->dar[13] + 0x20);
+}
+
READ8_MEMBER(r9751_state::pdc_dma_r)
{
/* This callback function takes the value written to 0xFF01000C as the bank offset */
- UINT32 address = (fdd_dma_bank & 0x7FFFF800) + (offset&0xFFFF);
+ UINT32 address = (fdd_dma_bank & 0x7FFFF800) + (offset&0x3FFFF);
if(TRACE_DMA) logerror("DMA READ: %08X DATA: %08X\n", address, m_maincpu->space(AS_PROGRAM).read_byte(address));
return m_maincpu->space(AS_PROGRAM).read_byte(address);
}
@@ -124,7 +144,7 @@ READ8_MEMBER(r9751_state::pdc_dma_r)
WRITE8_MEMBER(r9751_state::pdc_dma_w)
{
/* This callback function takes the value written to 0xFF01000C as the bank offset */
- UINT32 address = (fdd_dma_bank & 0x7FFFF800) + (m_pdc->fdd_68k_dma_address&0xFFFF);
+ UINT32 address = (fdd_dma_bank & 0x7FFFF800) + (m_pdc->fdd_68k_dma_address&0x3FFFF);
m_maincpu->space(AS_PROGRAM).write_byte(address,data);
if(TRACE_DMA) logerror("DMA WRITE: %08X DATA: %08X\n", address,data);
}
@@ -140,6 +160,7 @@ DRIVER_INIT_MEMBER(r9751_state,r9751)
smioc_dma_bank = 0;
m_mem = &m_maincpu->space(AS_PROGRAM);
+ m_maincpu->interface<m68000_base_device>(ptr_m68000);
}
void r9751_state::machine_reset()
@@ -255,7 +276,7 @@ WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w )
case 0xC0B0:
case 0xC1B0: /* fdd_dest_address register */
fdd_dest_address = data << 1;
- if(TRACE_FDC) logerror("--- FDD destination address: %08X PC: %08X Register: %08X\n", (fdd_dma_bank & 0x7FFFF800) + (fdd_dest_address&0xFFFF), space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
+ if(TRACE_FDC) logerror("--- FDD destination address: %08X PC: %08X Register: %08X (A6+4): %08X\n", (fdd_dma_bank & 0x7FFFF800) + (fdd_dest_address&0x3FFFF), space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000, debug_a6());
data_b0 = data & 0xFF;
data_b1 = (data & 0xFF00) >> 8;
m_pdc->reg_p6 = data_b0;
@@ -274,14 +295,14 @@ WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w )
m_pdc->reg_p5 = 0;
/* Send FDD SCSI command location address to PDC 0x2, 0x3 */
- if(TRACE_FDC) logerror("--- FDD command address: %08X PC: %08X Register: %08X\n", (fdd_dma_bank & 0x7FFFF800) + ((data << 1)&0xFFFF), space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
+ if(TRACE_FDC) logerror("--- FDD command address: %08X PC: %08X Register: %08X (A6+4): %08X A4: %08X (A5): %08X (A5+20): %08X\n", (fdd_dma_bank & 0x7FFFF800) + ((data << 1)&0x3FFFF), space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000, debug_a6(), ptr_m68000->dar[12], debug_a5(), debug_a5_20());
data_b0 = data & 0xFF;
data_b1 = (data & 0xFF00) >> 8;
m_pdc->reg_p2 = data_b0;
m_pdc->reg_p3 = data_b1;
- fdd_scsi_command = swap_uint32(m_mem->read_dword((fdd_dma_bank & 0x7FFFF800) + ((data << 1)&0xFFFF)));
- fdd_scsi_command2 = swap_uint32(m_mem->read_dword(((fdd_dma_bank & 0x7FFFF800) + ((data << 1)&0xFFFF))+4));
+ fdd_scsi_command = swap_uint32(m_mem->read_dword((fdd_dma_bank & 0x7FFFF800) + ((data << 1)&0x3FFFF)));
+ fdd_scsi_command2 = swap_uint32(m_mem->read_dword(((fdd_dma_bank & 0x7FFFF800) + ((data << 1)&0x3FFFF))+4));
memcpy(c_fdd_scsi_command,&fdd_scsi_command,4);
memcpy(c_fdd_scsi_command+4,&fdd_scsi_command2,4);
@@ -300,7 +321,7 @@ WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w )
break;
default:
- if(TRACE_FDC || TRACE_HDC || TRACE_SMIOC) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000, data, mem_mask);
+ if(TRACE_FDC || TRACE_HDC || TRACE_SMIOC) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x (A6+4): %08X\n", space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000, data, mem_mask, debug_a6());
}
}
diff --git a/src/mame/drivers/raiden2.cpp b/src/mame/drivers/raiden2.cpp
index eb29eea28c9..e5bc0fe0f7c 100644
--- a/src/mame/drivers/raiden2.cpp
+++ b/src/mame/drivers/raiden2.cpp
@@ -2456,6 +2456,40 @@ ROM_START( raidendxj )
ROM_END
+ROM_START( raidendxja )
+ ROM_REGION( 0x200000, "maincpu", 0 ) /* v30 main cpu */
+ ROM_LOAD32_BYTE("1.bin", 0x000000, 0x80000, CRC(247e21c7) SHA1(69e9a084407f57e8433f832a592cfbba2757631f) )
+ ROM_LOAD32_BYTE("2.bin", 0x000001, 0x80000, CRC(f2e9855a) SHA1(e27ac94cdb4ce8e8a98b342fbaf0fde11d9ab9ef) )
+ ROM_LOAD32_BYTE("3.bin", 0x000002, 0x80000, CRC(fbab727f) SHA1(5415ff87dd967e52b5cf7d754c046223cfa1147b) )
+ ROM_LOAD32_BYTE("4.bin", 0x000003, 0x80000, CRC(a08d5838) SHA1(ec07770503eefa5f22d30f40e3df2a02813908e4) )
+
+ ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
+ ROM_LOAD( "copx-d2.u0313", 0x00000, 0x40000, CRC(a6732ff9) SHA1(c4856ec77869d9098da24b1bb3d7d58bb74b4cda) ) /* Shared with original Raiden 2 */
+
+ ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
+ ROM_LOAD( "rdxj_5.u1110", 0x000000, 0x08000, CRC(8c46857a) SHA1(8b269cb20adf960ba4eb594d8add7739dbc9a837) )
+ ROM_CONTINUE(0x10000,0x8000)
+ ROM_COPY( "audiocpu", 0x000000, 0x018000, 0x08000 )
+
+ ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
+ ROM_LOAD( "rdxj_7.u0724", 0x000000, 0x020000, CRC(ec31fa10) SHA1(e39c9d95699dbeb21e3661d863eee503c9011bbc) )
+
+ ROM_REGION( 0x400000, "gfx2", 0 ) /* background gfx */
+ ROM_LOAD( "dx_back-1.u075", 0x000000, 0x200000, CRC(90970355) SHA1(d71d57cd550a800f583550365102adb7b1b779fc) )
+ ROM_LOAD( "dx_back-2.u0714", 0x200000, 0x200000, CRC(5799af3e) SHA1(85d6532abd769da77bcba70bd2e77915af40f987) )
+
+ ROM_REGION32_LE( 0x800000, "gfx3", 0 ) /* sprite gfx (encrypted) */
+ ROM_LOAD32_WORD( "raiden_2_seibu_obj-1.u0811", 0x000000, 0x200000, CRC(ff08ef0b) SHA1(a1858430e8171ca8bab785457ef60e151b5e5cf1) ) /* Shared with original Raiden 2 */
+ ROM_LOAD32_WORD( "raiden_2_seibu_obj-2.u082", 0x000002, 0x200000, CRC(638eb771) SHA1(9774cc070e71668d7d1d20795502dccd21ca557b) ) /* Shared with original Raiden 2 */
+ ROM_LOAD32_WORD( "dx_obj-3.u0837", 0x400000, 0x200000, CRC(ba381227) SHA1(dfc4d659aca1722a981fa56a31afabe66f444d5d) )
+ ROM_LOAD32_WORD( "dx_obj-4.u0836", 0x400002, 0x200000, CRC(65e50d19) SHA1(c46147b4132abce7314b46bf419ce4773e024b05) )
+
+ ROM_REGION( 0x100000, "oki1", 0 ) /* ADPCM samples */
+ ROM_LOAD( "rdxj_6.u1017", 0x00000, 0x40000, CRC(9a9196da) SHA1(3d1ee67fb0d40a231ce04d10718f07ffb76db455) )
+
+ ROM_REGION( 0x100000, "oki2", 0 ) /* ADPCM samples */
+ ROM_LOAD( "pcm.u1018", 0x00000, 0x40000, CRC(8cf0d17e) SHA1(0fbe0b1e1ca5360c7c8329331408e3d799b4714c) ) /* Shared with original Raiden 2 */
+ROM_END
ROM_START( raidendxch )
ROM_REGION( 0x200000, "maincpu", 0 ) /* v30 main cpu */
@@ -3077,7 +3111,8 @@ GAME( 1994, raidendxk, raidendx, raidendx, raidendx, raiden2_state, raidendx, R
GAME( 1994, raidendxu, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden DX (US)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, raidendxg, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu (Tuning license)", "Raiden DX (Germany)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, raidendxnl, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu", "Raiden DX (Holland)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, raidendxj, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu", "Raiden DX (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, raidendxj, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu", "Raiden DX (Japan, set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, raidendxja, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu", "Raiden DX (Japan, set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, raidendxch, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu (Ideal International Development Corp license) ", "Raiden DX (China)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, zeroteam, 0, zeroteam, zeroteam, raiden2_state, zeroteam, ROT0, "Seibu Kaihatsu (Fabtek license)", "Zero Team USA (US)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/rastan.cpp b/src/mame/drivers/rastan.cpp
index fe3c3dfa6b1..8ee49dd6992 100644
--- a/src/mame/drivers/rastan.cpp
+++ b/src/mame/drivers/rastan.cpp
@@ -383,7 +383,6 @@ static MACHINE_CONFIG_START( rastan, rastan_state )
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0)
MCFG_PC090OJ_GFX_REGION(1)
diff --git a/src/mame/drivers/rbisland.cpp b/src/mame/drivers/rbisland.cpp
index 922e7f48dad..c71c201750d 100644
--- a/src/mame/drivers/rbisland.cpp
+++ b/src/mame/drivers/rbisland.cpp
@@ -654,7 +654,6 @@ static MACHINE_CONFIG_START( rbisland, rbisland_state )
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0)
MCFG_PC090OJ_GFXDECODE("gfxdecode")
@@ -708,7 +707,6 @@ static MACHINE_CONFIG_START( jumping, rbisland_state )
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_YINVERT(1)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/rohga.cpp b/src/mame/drivers/rohga.cpp
index 4114bf30579..0379125810b 100644
--- a/src/mame/drivers/rohga.cpp
+++ b/src/mame/drivers/rohga.cpp
@@ -834,7 +834,6 @@ static MACHINE_CONFIG_START( rohga, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -850,14 +849,12 @@ static MACHINE_CONFIG_START( rohga, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_PRIORITY_CB(rohga_state, rohga_pri_callback)
MCFG_DECO_SPRITE_COLOUR_CB(rohga_state, rohga_col_callback)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
@@ -920,7 +917,6 @@ static MACHINE_CONFIG_START( wizdfire, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -936,17 +932,14 @@ static MACHINE_CONFIG_START( wizdfire, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE
@@ -1012,7 +1005,6 @@ static MACHINE_CONFIG_START( nitrobal, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1028,17 +1020,14 @@ static MACHINE_CONFIG_START( nitrobal, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(rohga_state, wizdfire)
@@ -1106,7 +1095,6 @@ static MACHINE_CONFIG_START( schmeisr, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1122,14 +1110,12 @@ static MACHINE_CONFIG_START( schmeisr, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_PRIORITY_CB(rohga_state, rohga_pri_callback)
MCFG_DECO_SPRITE_COLOUR_CB(rohga_state, schmeisr_col_callback) // wire mods on pcb...
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
diff --git a/src/mame/drivers/rungun.cpp b/src/mame/drivers/rungun.cpp
index 38d526632e0..662cf5f8237 100644
--- a/src/mame/drivers/rungun.cpp
+++ b/src/mame/drivers/rungun.cpp
@@ -447,8 +447,7 @@ static MACHINE_CONFIG_START( rng, rungun_state )
MCFG_DEVICE_ADD("k055673", K055673, 0)
MCFG_K055673_CB(rungun_state, sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 1, K055673_LAYOUT_RNG, -8, 15)
- MCFG_K055673_GFXDECODE("gfxdecode")
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_RNG, -8, 15)
MCFG_K055673_PALETTE("palette")
MCFG_K055673_SET_SCREEN("screen")
diff --git a/src/mame/drivers/sandscrp.cpp b/src/mame/drivers/sandscrp.cpp
index 50937085c9b..f42ccc583b9 100644
--- a/src/mame/drivers/sandscrp.cpp
+++ b/src/mame/drivers/sandscrp.cpp
@@ -499,7 +499,6 @@ static MACHINE_CONFIG_START( sandscrp, sandscrp_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/segae.cpp b/src/mame/drivers/segae.cpp
index 77874a36fe5..9e26251263d 100644
--- a/src/mame/drivers/segae.cpp
+++ b/src/mame/drivers/segae.cpp
@@ -296,7 +296,7 @@ GND 8A 8B GND
#include "cpu/z80/z80.h"
#include "sound/sn76496.h"
#include "machine/mc8123.h"
-#include "machine/segacrp2.h"
+#include "machine/segacrp2_device.h"
#include "video/315_5124.h"
#include "includes/segaipt.h"
@@ -1018,6 +1018,14 @@ static MACHINE_CONFIG_DERIVED( systemex, systeme )
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( systemex_315_5177, systeme )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5177, XTAL_10_738635MHz/2) /* Z80B @ 5.3693Mhz */
+ MCFG_CPU_PROGRAM_MAP(systeme_map)
+ MCFG_CPU_IO_MAP(io_map)
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
static MACHINE_CONFIG_DERIVED( systemeb, systeme )
MCFG_DEVICE_MODIFY("maincpu")
MCFG_CPU_DECRYPTED_OPCODES_MAP(banked_decrypted_opcodes_map)
@@ -1030,61 +1038,6 @@ DRIVER_INIT_MEMBER(systeme_state, hangonjr)
}
-DRIVER_INIT_MEMBER(systeme_state, astrofl)
-{
- // 315-5177
- static const UINT8 xor_table[128] =
- {
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,
-
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,
- };
-
- static const int swap_table[128] =
- {
- 0,0,0,0,
- 1,1,1,1,1,
- 2,2,2,2,2,
- 3,3,3,3,
- 4,4,4,4,4,
- 5,5,5,5,5,
- 6,6,6,6,6,
- 7,7,7,7,7,
- 8,8,8,8,
- 9,9,9,9,9,
- 10,10,10,10,10,
- 11,11,11,11,11,
- 12,12,12,12,12,
- 13,13,
-
- 8,8,8,8,
- 9,9,9,9,9,
- 10,10,10,10,10,
- 11,11,11,11,
- 12,12,12,12,12,
- 13,13,13,13,13,
- 14,14,14,14,14,
- 15,15,15,15,15,
- 16,16,16,16,
- 17,17,17,17,17,
- 18,18,18,18,18,
- 19,19,19,19,19,
- 20,20,20,20,20,
- 21,21,
- };
-
- sega_decode_2(m_maincpu_region->base(), m_decrypted_opcodes, xor_table, swap_table);
-}
DRIVER_INIT_MEMBER(systeme_state, ridleofp)
@@ -1113,7 +1066,7 @@ DRIVER_INIT_MEMBER(systeme_state, fantzn2)
// YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR,COMPANY,FULLNAME,FLAGS
GAME( 1985, hangonjr, 0, systeme, hangonjr, systeme_state, hangonjr, ROT0, "Sega", "Hang-On Jr.", MACHINE_SUPPORTS_SAVE )
GAME( 1986, transfrm, 0, systeme, transfrm, driver_device, 0, ROT0, "Sega", "Transformer", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, astrofl, transfrm, systemex, transfrm, systeme_state, astrofl, ROT0, "Sega", "Astro Flash (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, astrofl, transfrm, systemex_315_5177, transfrm, driver_device, 0, ROT0, "Sega", "Astro Flash (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, ridleofp, 0, systeme, ridleofp, systeme_state, ridleofp, ROT90, "Sega / Nasco", "Riddle of Pythagoras (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1987, opaopa, 0, systemeb, opaopa, systeme_state, opaopa, ROT0, "Sega", "Opa Opa (MC-8123, 317-0042)", MACHINE_SUPPORTS_SAVE )
GAME( 1988, fantzn2, 0, systemex, fantzn2, systeme_state, fantzn2, ROT0, "Sega", "Fantasy Zone II - The Tears of Opa-Opa (MC-8123, 317-0057)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/segag80r.cpp b/src/mame/drivers/segag80r.cpp
index c07976572e7..be9bc6db239 100644
--- a/src/mame/drivers/segag80r.cpp
+++ b/src/mame/drivers/segag80r.cpp
@@ -112,7 +112,7 @@
#include "sound/sn76496.h"
#include "sound/samples.h"
#include "machine/i8255.h"
-#include "machine/segacrpt.h"
+#include "machine/segacrpt_device.h"
#include "machine/segag80.h"
#include "includes/segag80r.h"
@@ -885,8 +885,12 @@ static MACHINE_CONFIG_DERIVED( monsterb, g80r_base )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( monster2, monsterb )
- MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_SPAT, VIDEO_CLOCK/4)
+ MCFG_CPU_PROGRAM_MAP(main_map)
+ MCFG_CPU_IO_MAP(main_ppi8255_portmap)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", segag80r_state, segag80r_vblank_start)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( pignewt, g80r_base )
@@ -906,10 +910,12 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sindbadm, g80r_base )
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5028, VIDEO_CLOCK/4)
+ MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_IO_MAP(sindbadm_portmap)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", segag80r_state, sindbadm_vblank_start)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
MCFG_I8255_OUT_PORTA_CB(WRITE8(segag80r_state, sindbadm_soundport_w))
@@ -1509,29 +1515,7 @@ DRIVER_INIT_MEMBER(segag80r_state,monsterb)
DRIVER_INIT_MEMBER(segag80r_state,monster2)
{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0x08,0x80,0x00 }, { 0x00,0x08,0x20,0x28 }, /* ...0...0...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...0...1 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...1 */
- { 0x00,0x08,0x20,0x28 }, { 0x88,0x08,0x80,0x00 }, /* ...0...1...0...0 */
- { 0xa0,0x80,0x20,0x00 }, { 0x80,0x88,0x00,0x08 }, /* ...0...1...0...1 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...1...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...1...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0x80,0x88,0x00,0x08 }, /* ...1...0...0...0 */
- { 0x80,0x88,0x00,0x08 }, { 0x00,0x08,0x20,0x28 }, /* ...1...0...0...1 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...0...1...0 */
- { 0x00,0x08,0x20,0x28 }, { 0x80,0xa0,0x88,0xa8 }, /* ...1...0...1...1 */
- { 0x80,0x88,0x00,0x08 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...0 */
- { 0x80,0xa0,0x88,0xa8 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...1 */
- { 0xa0,0x80,0x20,0x00 }, { 0x80,0xa0,0x88,0xa8 }, /* ...1...1...1...0 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x00,0x08,0x20,0x28 } /* ...1...1...1...1 */
- };
-
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
+
address_space &iospace = m_maincpu->space(AS_IO);
address_space &pgmspace = m_maincpu->space(AS_PROGRAM);
@@ -1581,29 +1565,7 @@ DRIVER_INIT_MEMBER(segag80r_state,pignewt)
DRIVER_INIT_MEMBER(segag80r_state,sindbadm)
{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...0 */
- { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...0...0...1 */
- { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...0...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...1...1 */
- { 0xa8,0x88,0xa0,0x80 }, { 0xa0,0x20,0xa8,0x28 }, /* ...0...1...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...1 */
- { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...1...1...0 */
- { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...1...1...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...0...1 */
- { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...1...0...1...0 */
- { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...1...0...1...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...0 */
- { 0xa8,0x88,0xa0,0x80 }, { 0xa0,0x20,0xa8,0x28 }, /* ...1...1...0...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 } /* ...1...1...1...1 */
- };
-
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
+
address_space &iospace = m_maincpu->space(AS_IO);
address_space &pgmspace = m_maincpu->space(AS_PROGRAM);
diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp
index b87aee5f734..9240b10d3bf 100644
--- a/src/mame/drivers/segas16a.cpp
+++ b/src/mame/drivers/segas16a.cpp
@@ -148,7 +148,7 @@ Tetris - - - - EPR12169 EPR12170 -
#include "emu.h"
#include "includes/segas16a.h"
-#include "machine/segacrp2.h"
+#include "machine/segacrp2_device.h"
#include "machine/fd1089.h"
#include "machine/nvram.h"
#include "sound/dac.h"
@@ -1982,8 +1982,11 @@ static MACHINE_CONFIG_DERIVED( system16a_no7751, system16a )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( system16a_no7751p, system16a_no7751 )
- MCFG_DEVICE_MODIFY("soundcpu")
+ MCFG_CPU_REPLACE("soundcpu", SEGA_315_5177, 4000000)
+ MCFG_CPU_PROGRAM_MAP(sound_map)
+ MCFG_CPU_IO_MAP(sound_no7751_portmap)
MCFG_CPU_DECRYPTED_OPCODES_MAP(sound_decrypted_opcodes_map)
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":sound_decrypted_opcodes")
MACHINE_CONFIG_END
/*
@@ -3674,63 +3677,6 @@ DRIVER_INIT_MEMBER(segas16a_state,quartet)
m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16a_state::quartet_i8751_sim), this);
}
-DRIVER_INIT_MEMBER(segas16a_state,fantzonep)
-{
- DRIVER_INIT_CALL(generic);
-
- // 315-5177
- static const UINT8 xor_table[128] =
- {
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,
-
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,
- };
-
- static const int swap_table[128] =
- {
- 0,0,0,0,
- 1,1,1,1,1,
- 2,2,2,2,2,
- 3,3,3,3,
- 4,4,4,4,4,
- 5,5,5,5,5,
- 6,6,6,6,6,
- 7,7,7,7,7,
- 8,8,8,8,
- 9,9,9,9,9,
- 10,10,10,10,10,
- 11,11,11,11,11,
- 12,12,12,12,12,
- 13,13,
-
- 8,8,8,8,
- 9,9,9,9,9,
- 10,10,10,10,10,
- 11,11,11,11,
- 12,12,12,12,12,
- 13,13,13,13,13,
- 14,14,14,14,14,
- 15,15,15,15,15,
- 16,16,16,16,
- 17,17,17,17,17,
- 18,18,18,18,18,
- 19,19,19,19,19,
- 20,20,20,20,20,
- 21,21,
- };
-
- sega_decode_2(memregion("soundcpu")->base(), m_sound_decrypted_opcodes, xor_table, swap_table);
-}
DRIVER_INIT_MEMBER(segas16a_state,sdi)
{
@@ -3778,7 +3724,7 @@ GAME( 1986, alexkidd1, alexkidd, system16a_fd1089a, alexkidd, segas16a
GAME( 1986, fantzone, 0, system16a_no7751, fantzone, segas16a_state,generic, ROT0, "Sega", "Fantasy Zone (Rev A, unprotected)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, fantzone1, fantzone, system16a_no7751, fantzone, segas16a_state,generic, ROT0, "Sega", "Fantasy Zone (unprotected)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, fantzonep, fantzone, system16a_no7751p, fantzone, segas16a_state,fantzonep, ROT0, "Sega", "Fantasy Zone (317-5000)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, fantzonep, fantzone, system16a_no7751p, fantzone, segas16a_state,generic, ROT0, "Sega", "Fantasy Zone (317-5000)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, fantzonepr, fantzone, system16a_no7751, fantzone, segas16a_state,generic, ROT0, "Sega", "Fantasy Zone (prototype)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // bad / missing gfx roms
GAME( 1988, passsht16a, passsht, system16a_fd1094, passsht16a, segas16a_state,passsht16a, ROT270, "Sega", "Passing Shot (Japan, 4 Players, System 16A) (FD1094 317-0071)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/segas18.cpp b/src/mame/drivers/segas18.cpp
index c78c37f04c7..0dbb04eb3cf 100644
--- a/src/mame/drivers/segas18.cpp
+++ b/src/mame/drivers/segas18.cpp
@@ -45,7 +45,7 @@
void segas18_state::memory_mapper(sega_315_5195_mapper_device &mapper, UINT8 index)
{
- UINT32 romsize = m_maincpu->region()->bytes();
+ UINT32 romsize = m_maincpu_region->bytes();
switch (index)
{
case 7:
diff --git a/src/mame/drivers/segas24.cpp b/src/mame/drivers/segas24.cpp
index 0d97e55ffb3..795df5cfdfd 100644
--- a/src/mame/drivers/segas24.cpp
+++ b/src/mame/drivers/segas24.cpp
@@ -1934,9 +1934,7 @@ static MACHINE_CONFIG_START( system24, segas24_state )
MCFG_TIMER_ADD_NONE("frc_timer")
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_frc", segas24_state, irq_frc_cb, attotime::from_hz(FRC_CLOCK_MODE1))
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_S24TILE_DEVICE_ADD("tile", 0xfff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_S24SPRITE_DEVICE_ADD("sprite")
MCFG_S24MIXER_DEVICE_ADD("mixer")
diff --git a/src/mame/drivers/segasp.cpp b/src/mame/drivers/segasp.cpp
index ea4482ec04a..51c54c98c3c 100644
--- a/src/mame/drivers/segasp.cpp
+++ b/src/mame/drivers/segasp.cpp
@@ -301,7 +301,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( segasp, naomi_aw_base, segasp_state )
// todo, not exactly NaomiM4 (see notes at top of driver) use custom board type here instead
MCFG_X76F100_ADD("naomibd_eeprom") // actually not present
- MCFG_NAOMI_M4_BOARD_ADD("rom_board", ":pic_readout", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
+ MCFG_NAOMI_M4_BOARD_ADD("rom_board", "pic_readout", "naomibd_eeprom", "boardid", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
diff --git a/src/mame/drivers/segaybd.cpp b/src/mame/drivers/segaybd.cpp
index d6a6604fee1..534d5d5a164 100644
--- a/src/mame/drivers/segaybd.cpp
+++ b/src/mame/drivers/segaybd.cpp
@@ -739,7 +739,7 @@ static ADDRESS_MAP_START( suby_map, AS_PROGRAM, 16, segaybd_state )
AM_RANGE(0x084000, 0x08401f) AM_MIRROR(0x001fe0) AM_DEVREADWRITE("divider_suby", sega_315_5249_divider_device, read, write)
AM_RANGE(0x0c0000, 0x0cffff) AM_RAM AM_SHARE("shareram")
AM_RANGE(0x180000, 0x1807ff) AM_MIRROR(0x007800) AM_RAM AM_SHARE("rotateram")
- AM_RANGE(0x188000, 0x188fff) AM_MIRROR(0x007000) AM_RAM AM_SHARE("sprites")
+ AM_RANGE(0x188000, 0x188fff) AM_MIRROR(0x007000) AM_RAM AM_SHARE("bsprites")
AM_RANGE(0x190000, 0x193fff) AM_MIRROR(0x004000) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
AM_RANGE(0x198000, 0x19ffff) AM_DEVREAD("segaic16vid", segaic16_video_device, rotate_control_r)
AM_RANGE(0x1f0000, 0x1fffff) AM_RAM
@@ -1397,7 +1397,7 @@ static MACHINE_CONFIG_START( yboard, segaybd_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
- MCFG_SEGA_SYS16B_SPRITES_ADD("sprites")
+ MCFG_SEGA_SYS16B_SPRITES_ADD("bsprites")
MCFG_SEGA_YBOARD_SPRITES_ADD("ysprites")
MCFG_SEGAIC16VID_ADD("segaic16vid")
MCFG_SEGAIC16VID_GFXDECODE("gfxdecode")
@@ -1479,7 +1479,7 @@ ROM_START( gforce2 )
ROM_LOAD16_BYTE( "epr-11816b.54", 0x000000, 0x20000, CRC(317dd0c2) SHA1(7f1c7dcfb111385e2a94912975c2f9bfe78445ac) )
ROM_LOAD16_BYTE( "epr-11815b.53", 0x000001, 0x20000, CRC(f1fb22f1) SHA1(da3ce521b0a19b391913c35af34084d29edceca7) )
- ROM_REGION16_BE( 0x080000, "sprites", 0 )
+ ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "mpr-11467.16", 0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) )
ROM_LOAD16_BYTE( "mpr-11468.14", 0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) )
ROM_LOAD16_BYTE( "epr-11694.17", 0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) )
@@ -1553,7 +1553,7 @@ ROM_START( gforce2sd )
ROM_LOAD16_BYTE( "epr-11816b.54", 0x000000, 0x20000, CRC(317dd0c2) SHA1(7f1c7dcfb111385e2a94912975c2f9bfe78445ac) )
ROM_LOAD16_BYTE( "epr-11815b.53", 0x000001, 0x20000, CRC(f1fb22f1) SHA1(da3ce521b0a19b391913c35af34084d29edceca7) )
- ROM_REGION16_BE( 0x080000, "sprites", 0 )
+ ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "mpr-11467.16", 0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) )
ROM_LOAD16_BYTE( "mpr-11468.14", 0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) )
ROM_LOAD16_BYTE( "epr-11694.17", 0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) )
@@ -1631,7 +1631,7 @@ ROM_START( gforce2ja )
ROM_LOAD16_BYTE( "epr-11690a.54", 0x000000, 0x20000, CRC(e18bc177) SHA1(3fb179c9074954fc9b64da1463f542d60a99ec84) )
ROM_LOAD16_BYTE( "epr-11689a.53", 0x000001, 0x20000, CRC(6010e63e) SHA1(00aa5e8516f094409a407744b84ef183393b8b19) )
- ROM_REGION16_BE( 0x080000, "sprites", 0 )
+ ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "mpr-11467.16", 0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) )
ROM_LOAD16_BYTE( "mpr-11468.14", 0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) )
ROM_LOAD16_BYTE( "epr-11694.17", 0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) )
@@ -1706,7 +1706,7 @@ ROM_START( gforce2j )
ROM_LOAD16_BYTE( "epr-11513.54", 0x000000, 0x20000, CRC(e18bc177) SHA1(3fb179c9074954fc9b64da1463f542d60a99ec84) )
ROM_LOAD16_BYTE( "epr-11512.53", 0x000001, 0x20000, CRC(6010e63e) SHA1(00aa5e8516f094409a407744b84ef183393b8b19) )
- ROM_REGION16_BE( 0x080000, "sprites", 0 )
+ ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "mpr-11467.16", 0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) )
ROM_LOAD16_BYTE( "mpr-11468.14", 0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) )
ROM_LOAD16_BYTE( "epr-11694.17", 0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) )
@@ -1789,7 +1789,7 @@ ROM_START( gloc )
ROM_LOAD16_BYTE( "epr-13030.54", 0x000000, 0x20000, CRC(81abcabf) SHA1(cb4e817d66a7f384aa9757758c51cd1bf7347dd0) )
ROM_LOAD16_BYTE( "epr-13029.53", 0x000001, 0x20000, CRC(f3638efb) SHA1(f82a46fc8616cbe0235746161c587e54adecfe50) )
- ROM_REGION16_BE( 0x200000, "sprites", 0)
+ ROM_REGION16_BE( 0x200000, "bsprites", 0)
ROM_LOAD16_BYTE( "epr-13039.16", 0x000000, 0x80000, CRC(d7e1266d) SHA1(b0fc4cc60a7e876ae2af343bba6da3fb926ea9c5) )
ROM_LOAD16_BYTE( "epr-13037.14", 0x000001, 0x80000, CRC(b801a250) SHA1(7d1f6a1f2022a4f302f22d11fa79057cf8134ad2) )
ROM_LOAD16_BYTE( "epr-13040.17", 0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) )
@@ -1864,7 +1864,7 @@ ROM_START( glocu )
ROM_LOAD16_BYTE( "epr-13030.54", 0x000000, 0x20000, CRC(81abcabf) SHA1(cb4e817d66a7f384aa9757758c51cd1bf7347dd0) )
ROM_LOAD16_BYTE( "epr-13029.53", 0x000001, 0x20000, CRC(f3638efb) SHA1(f82a46fc8616cbe0235746161c587e54adecfe50) )
- ROM_REGION16_BE( 0x200000, "sprites", 0)
+ ROM_REGION16_BE( 0x200000, "bsprites", 0)
ROM_LOAD16_BYTE( "epr-13039.16", 0x000000, 0x80000, CRC(d7e1266d) SHA1(b0fc4cc60a7e876ae2af343bba6da3fb926ea9c5) )
ROM_LOAD16_BYTE( "epr-13037.14", 0x000001, 0x80000, CRC(b801a250) SHA1(7d1f6a1f2022a4f302f22d11fa79057cf8134ad2) )
ROM_LOAD16_BYTE( "epr-13040.17", 0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) )
@@ -1933,7 +1933,7 @@ ROM_START( glocr360 )
ROM_LOAD16_BYTE( "epr-13325a.54", 0x000000, 0x20000, CRC(aba307e5) SHA1(a27a7d3699a95d7c6265a23157b2fefd362003dd) )
ROM_LOAD16_BYTE( "epr-13324a.53", 0x000001, 0x20000, CRC(eb1b19e5) SHA1(3d1d7299cb3befc22afc0db0376d7f94dec37367) )
- ROM_REGION16_BE( 0x200000, "sprites", 0)
+ ROM_REGION16_BE( 0x200000, "bsprites", 0)
ROM_LOAD16_BYTE( "epr-13039.16", 0x000000, 0x80000, CRC(d7e1266d) SHA1(b0fc4cc60a7e876ae2af343bba6da3fb926ea9c5) )
ROM_LOAD16_BYTE( "epr-13037.14", 0x000001, 0x80000, CRC(b801a250) SHA1(7d1f6a1f2022a4f302f22d11fa79057cf8134ad2) )
ROM_LOAD16_BYTE( "epr-13040.17", 0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) )
@@ -2009,7 +2009,7 @@ ROM_START( pdrift )
ROM_LOAD16_BYTE( "epr-12019a.54", 0x000000, 0x20000, CRC(11188a30) SHA1(42dd0344d92529848b53a8cec4c145237ccd5b51) )
ROM_LOAD16_BYTE( "epr-12018a.53", 0x000001, 0x20000, CRC(1c582e1f) SHA1(c32d2f921554bddd7dedcb81e231aa91f50fa27b) )
- ROM_REGION16_BE( 0x080000, "sprites", 0 )
+ ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "epr-11789.16", 0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) )
ROM_LOAD16_BYTE( "epr-11791.14", 0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) )
ROM_LOAD16_BYTE( "epr-11790.17", 0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) )
@@ -2092,7 +2092,7 @@ ROM_START( pdrifta )
ROM_LOAD16_BYTE( "epr-12019.54", 0x000000, 0x20000, CRC(e514d7b6) SHA1(27ae99f5f3e8d2f248916f7a252e2c0686638df5) )
ROM_LOAD16_BYTE( "epr-12018.53", 0x000001, 0x20000, CRC(0a3f7faf) SHA1(fe20a164a7a2c9e9bf0e7aade75b0488bdc93d79) )
- ROM_REGION16_BE( 0x080000, "sprites", 0 )
+ ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "epr-11789.16", 0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) )
ROM_LOAD16_BYTE( "epr-11791.14", 0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) )
ROM_LOAD16_BYTE( "epr-11790.17", 0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) )
@@ -2176,7 +2176,7 @@ ROM_START( pdrifte )
ROM_LOAD16_BYTE( "epr-11903.54", 0x000000, 0x20000, CRC(d004f411) SHA1(212a985275647fae24b580ebaffc1230c06318ac) )
ROM_LOAD16_BYTE( "epr-11902.53", 0x000001, 0x20000, CRC(e8028e08) SHA1(de4ee5011e9552e624b6223e0e1ef00bc271a811) )
- ROM_REGION16_BE( 0x080000, "sprites", 0 )
+ ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "epr-11789.16", 0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) )
ROM_LOAD16_BYTE( "epr-11791.14", 0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) )
ROM_LOAD16_BYTE( "epr-11790.17", 0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) )
@@ -2262,7 +2262,7 @@ ROM_START( pdriftj )
ROM_LOAD16_BYTE( "epr-11750b.54", 0x000000, 0x20000, CRC(bc14ce30) SHA1(9bbadee0946e0abaac4f0d2625ba5550f11fa8a9) )
ROM_LOAD16_BYTE( "epr-11749b.53", 0x000001, 0x20000, CRC(9e385568) SHA1(74e22eaed645cc80b1eb0c52912186066e58b9d2) )
- ROM_REGION16_BE( 0x080000, "sprites", 0 )
+ ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "epr-11789.16", 0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) )
ROM_LOAD16_BYTE( "epr-11791.14", 0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) )
ROM_LOAD16_BYTE( "epr-11790.17", 0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) )
@@ -2347,7 +2347,7 @@ ROM_START(pdriftl)
ROM_LOAD16_BYTE("epr-12109.54", 0x000000, 0x20000, CRC(256350b8) SHA1(72b05d3583d63766690fed4827ec586e832168d1) )
ROM_LOAD16_BYTE("epr-12108.53", 0x000001, 0x20000, CRC(a3a56771) SHA1(f41d466f31a1b833d21a7011314c48d5056409eb) )
- ROM_REGION16_BE(0x080000, "sprites", 0)
+ ROM_REGION16_BE(0x080000, "bsprites", 0)
ROM_LOAD16_BYTE("epr-12114.16", 0x000000, 0x20000, CRC(8b07e8eb) SHA1(22a4aff968d6de52372b7b2b5322d353f7b835ef) )
ROM_LOAD16_BYTE("epr-12115.14", 0x000001, 0x20000, CRC(045b2912) SHA1(697c8eff69bf1a23745d24171f0b50635cf8513e) )
ROM_LOAD16_BYTE("epr-12112.17", 0x040000, 0x20000, CRC(5dd13e81) SHA1(74ced668a36480a2ce9e3667e4915bfee2391534) )
@@ -2440,7 +2440,7 @@ ROM_START( rchase )
ROM_LOAD16_BYTE( "epr-14092.54", 0x000000, 0x20000, CRC(18eb23c5) SHA1(53e5681c7450a3879ed80c1680168d6295caa887) ) // same as epr-13990.54 below
ROM_LOAD16_BYTE( "epr-14091.53", 0x000001, 0x20000, CRC(72a56f71) SHA1(d45d3072ea92b5dde5c70138e56e7f0ca248880e) ) // 1 byte difference between regions
- ROM_REGION16_BE( 0x080000, "sprites", 0 )
+ ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "mpr-13999.16", 0x000000, 0x40000, CRC(9a1dd53c) SHA1(cb01f2c64554914ea693879dfcb498181a1e7a9a) )
ROM_LOAD16_BYTE( "mpr-13997.14", 0x000001, 0x40000, CRC(1fdf1b87) SHA1(ed46af0f72081d545015b73a8d12240664f29506) )
@@ -2500,7 +2500,7 @@ ROM_START( rchasej )
ROM_LOAD16_BYTE( "epr-13990.54", 0x000000, 0x20000, CRC(18eb23c5) SHA1(53e5681c7450a3879ed80c1680168d6295caa887) )
ROM_LOAD16_BYTE( "epr-13989.53", 0x000001, 0x20000, CRC(8f4f824e) SHA1(d470f23ce2dca4e75b7b714175d47338c41bb721) )
- ROM_REGION16_BE( 0x080000, "sprites", 0 )
+ ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "mpr-13999.16", 0x000000, 0x40000, CRC(9a1dd53c) SHA1(cb01f2c64554914ea693879dfcb498181a1e7a9a) )
ROM_LOAD16_BYTE( "mpr-13997.14", 0x000001, 0x40000, CRC(1fdf1b87) SHA1(ed46af0f72081d545015b73a8d12240664f29506) )
@@ -2565,7 +2565,7 @@ ROM_START( strkfgtr )
ROM_LOAD16_BYTE( "epr-13828.54", 0x000000, 0x20000, CRC(2470cf5f) SHA1(eb1a732228fe7ad9cf0747d2b53e391c5a733667) )
ROM_LOAD16_BYTE( "epr-13827.53", 0x000001, 0x20000, CRC(a9d0cf7d) SHA1(c40c73c9e9105ed6503b77b65a6423a26057d810) )
- ROM_REGION16_BE( 0x200000, "sprites", 0)
+ ROM_REGION16_BE( 0x200000, "bsprites", 0)
ROM_LOAD16_BYTE( "epr-13833.16", 0x000000, 0x80000, CRC(6148e11a) SHA1(5802208cf0415f6af39de162e9f12e7c205915f7) )
ROM_LOAD16_BYTE( "epr-13832.14", 0x000001, 0x80000, CRC(41679754) SHA1(58d46f33a4318bbc9e2a20eb5550a66ee0b2e62f) )
ROM_LOAD16_BYTE( "epr-13040.17", 0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) )
@@ -2636,7 +2636,7 @@ ROM_START( strkfgtrj )
ROM_LOAD16_BYTE( "epr-13828.54", 0x000000, 0x20000, CRC(2470cf5f) SHA1(eb1a732228fe7ad9cf0747d2b53e391c5a733667) )
ROM_LOAD16_BYTE( "epr-13827.53", 0x000001, 0x20000, CRC(a9d0cf7d) SHA1(c40c73c9e9105ed6503b77b65a6423a26057d810) )
- ROM_REGION16_BE( 0x200000, "sprites", 0)
+ ROM_REGION16_BE( 0x200000, "bsprites", 0)
ROM_LOAD16_BYTE( "epr-13833.16", 0x000000, 0x80000, CRC(6148e11a) SHA1(5802208cf0415f6af39de162e9f12e7c205915f7) )
ROM_LOAD16_BYTE( "epr-13832.14", 0x000001, 0x80000, CRC(41679754) SHA1(58d46f33a4318bbc9e2a20eb5550a66ee0b2e62f) )
ROM_LOAD16_BYTE( "epr-13040.17", 0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) )
diff --git a/src/mame/drivers/senjyo.cpp b/src/mame/drivers/senjyo.cpp
index 4ccb8036ab1..317e04b925a 100644
--- a/src/mame/drivers/senjyo.cpp
+++ b/src/mame/drivers/senjyo.cpp
@@ -80,7 +80,7 @@ I/O read/write
#include "emu.h"
#include "cpu/z80/z80.h"
#include "sound/sn76496.h"
-#include "machine/segacrpt.h"
+#include "machine/segacrpt_device.h"
#include "includes/senjyo.h"
void senjyo_state::machine_start()
@@ -598,12 +598,26 @@ static MACHINE_CONFIG_START( senjyo, senjyo_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.05)
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( senjyox, senjyo )
- MCFG_CPU_MODIFY("maincpu")
+
+
+static MACHINE_CONFIG_DERIVED( senjyox_e, senjyo )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5015, 4000000) /* 4 MHz? */
+ MCFG_CPU_PROGRAM_MAP(senjyo_map)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", senjyo_state, irq0_line_assert)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( senjyox_a, senjyo )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5018, 4000000) /* 4 MHz? */
+ MCFG_CPU_PROGRAM_MAP(senjyo_map)
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", senjyo_state, irq0_line_assert)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( starforb, senjyox )
+
+static MACHINE_CONFIG_DERIVED( starforb, senjyox_e )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
@@ -903,29 +917,7 @@ DRIVER_INIT_MEMBER(senjyo_state,starforc)
}
DRIVER_INIT_MEMBER(senjyo_state,starfore)
{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...0...0 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...0...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...1 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...0...0 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...0...1 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...1...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...0...0...0 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...0...1 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...0 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...0...1...1 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...1...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...1...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 } /* ...1...1...1...1 */
- };
-
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
+
m_is_senjyo = 0;
m_scrollhack = 0;
@@ -933,29 +925,7 @@ DRIVER_INIT_MEMBER(senjyo_state,starfore)
DRIVER_INIT_MEMBER(senjyo_state,starfora)
{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...0 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x20,0xa0,0x28,0xa8 }, /* ...0...0...1...1 */
- { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x08,0x28 }, /* ...0...1...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...0...1 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x20,0xa0,0x28,0xa8 }, /* ...0...1...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...1...1 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...0...0...0 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...0...1 */
- { 0xa0,0x20,0x80,0x00 }, { 0x20,0xa0,0x28,0xa8 }, /* ...1...0...1...0 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x20,0xa0,0x28,0xa8 }, /* ...1...0...1...1 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...1...0...0 */
- { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...1...0...1 */
- { 0xa0,0x20,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...1...1...1...0 */
- { 0x20,0xa0,0x28,0xa8 }, { 0x00,0x08,0x20,0x28 } /* ...1...1...1...1 */
- };
-
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
+
m_is_senjyo = 0;
m_scrollhack = 1;
@@ -968,10 +938,10 @@ DRIVER_INIT_MEMBER(senjyo_state,senjyo)
}
-GAME( 1983, senjyo, 0, senjyo, senjyo, senjyo_state, senjyo, ROT90, "Tehkan", "Senjyo", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, starforc, 0, senjyo, starforc, senjyo_state, starforc, ROT90, "Tehkan", "Star Force", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, starforce,starforc, senjyox, starforc, senjyo_state, starfore, ROT90, "Tehkan", "Star Force (encrypted, set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, starforcb,starforc, starforb,starforc, senjyo_state, starfore, ROT90, "bootleg", "Star Force (encrypted, bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, starforca,starforc, senjyox, starforc, senjyo_state, starfora, ROT90, "Tehkan", "Star Force (encrypted, set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, megaforc, starforc, senjyo, starforc, senjyo_state, starforc, ROT90, "Tehkan (Video Ware license)", "Mega Force", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, baluba, 0, senjyo, baluba, senjyo_state, starforc, ROT90, "Able Corp, Ltd.", "Baluba-louk no Densetsu (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, senjyo, 0, senjyo, senjyo, senjyo_state, senjyo, ROT90, "Tehkan", "Senjyo", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, starforc, 0, senjyo, starforc, senjyo_state, starforc, ROT90, "Tehkan", "Star Force", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, starforce,starforc, senjyox_e, starforc, senjyo_state, starfore, ROT90, "Tehkan", "Star Force (encrypted, set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, starforcb,starforc, starforb, starforc, senjyo_state, starfore, ROT90, "bootleg", "Star Force (encrypted, bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, starforca,starforc, senjyox_a, starforc, senjyo_state, starfora, ROT90, "Tehkan", "Star Force (encrypted, set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, megaforc, starforc, senjyo, starforc, senjyo_state, starforc, ROT90, "Tehkan (Video Ware license)", "Mega Force", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, baluba, 0, senjyo, baluba, senjyo_state, starforc, ROT90, "Able Corp, Ltd.", "Baluba-louk no Densetsu (Japan)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp
index 962c048cc94..5374875f519 100644
--- a/src/mame/drivers/seta.cpp
+++ b/src/mame/drivers/seta.cpp
@@ -7701,7 +7701,6 @@ static MACHINE_CONFIG_START( tndrcade, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7756,7 +7755,6 @@ static MACHINE_CONFIG_START( twineagl, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7800,7 +7798,6 @@ static MACHINE_CONFIG_START( downtown, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7861,7 +7858,6 @@ static MACHINE_CONFIG_START( usclssic, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7915,7 +7911,6 @@ static MACHINE_CONFIG_START( calibr50, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7959,7 +7954,6 @@ static MACHINE_CONFIG_START( metafox, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7997,7 +7991,6 @@ static MACHINE_CONFIG_START( atehate, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8041,7 +8034,6 @@ static MACHINE_CONFIG_START( blandia, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8079,7 +8071,6 @@ static MACHINE_CONFIG_START( blandiap, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8122,7 +8113,6 @@ static MACHINE_CONFIG_START( blockcar, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8194,7 +8184,6 @@ static MACHINE_CONFIG_START( daioh, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8232,7 +8221,6 @@ static MACHINE_CONFIG_START( daiohp, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8275,7 +8263,6 @@ static MACHINE_CONFIG_START( drgnunit, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8312,7 +8299,6 @@ static MACHINE_CONFIG_START( qzkklgy2, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8363,7 +8349,6 @@ static MACHINE_CONFIG_START( setaroul, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
MCFG_NVRAM_ADD_RANDOM_FILL("nvram")
@@ -8407,7 +8392,6 @@ static MACHINE_CONFIG_START( eightfrc, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8450,7 +8434,6 @@ static MACHINE_CONFIG_START( extdwnhl, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8516,7 +8499,6 @@ static MACHINE_CONFIG_START( gundhara, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8561,7 +8543,6 @@ static MACHINE_CONFIG_START( jjsquawk, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8597,7 +8578,6 @@ static MACHINE_CONFIG_START( jjsquawb, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8642,7 +8622,6 @@ static MACHINE_CONFIG_START( kamenrid, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8681,7 +8660,6 @@ static MACHINE_CONFIG_START( orbs, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8724,7 +8702,6 @@ static MACHINE_CONFIG_START( keroppij, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8766,7 +8743,6 @@ static MACHINE_CONFIG_START( krzybowl, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8809,7 +8785,6 @@ static MACHINE_CONFIG_START( madshark, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8854,7 +8829,6 @@ static MACHINE_CONFIG_START( magspeed, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8902,7 +8876,6 @@ static MACHINE_CONFIG_START( msgundam, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8942,7 +8915,6 @@ static MACHINE_CONFIG_START( oisipuzl, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8982,7 +8954,6 @@ static MACHINE_CONFIG_START( triplfun, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9021,7 +8992,6 @@ static MACHINE_CONFIG_START( kiwame, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9063,7 +9033,6 @@ static MACHINE_CONFIG_START( rezon, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9104,7 +9073,6 @@ static MACHINE_CONFIG_START( thunderl, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9176,7 +9144,6 @@ static MACHINE_CONFIG_START( wiggie, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9214,7 +9181,6 @@ static MACHINE_CONFIG_START( wits, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9252,7 +9218,6 @@ static MACHINE_CONFIG_START( umanclub, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9294,7 +9259,6 @@ static MACHINE_CONFIG_START( utoukond, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9346,7 +9310,6 @@ static MACHINE_CONFIG_START( wrofaero, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9391,7 +9354,6 @@ static MACHINE_CONFIG_START( zingzip, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9447,7 +9409,6 @@ static MACHINE_CONFIG_START( pairlove, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9496,7 +9457,6 @@ static MACHINE_CONFIG_START( crazyfgt, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9562,7 +9522,6 @@ static MACHINE_CONFIG_START( inttoote, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
diff --git a/src/mame/drivers/sg1000a.cpp b/src/mame/drivers/sg1000a.cpp
index 509146b18b9..0e43b6c527b 100644
--- a/src/mame/drivers/sg1000a.cpp
+++ b/src/mame/drivers/sg1000a.cpp
@@ -118,7 +118,7 @@ CN4 CN5
#include "sound/sn76496.h"
#include "video/tms9928a.h"
#include "machine/i8255.h"
-#include "machine/segacrpt.h"
+#include "machine/segacrpt_device.h"
class sg1000a_state : public driver_device
@@ -132,7 +132,6 @@ public:
DECLARE_WRITE_LINE_MEMBER(vdp_interrupt);
DECLARE_WRITE8_MEMBER(sg1000a_coin_counter_w);
DECLARE_DRIVER_INIT(sg1000a);
- DECLARE_DRIVER_INIT(chwrestl);
required_device<cpu_device> m_maincpu;
optional_shared_ptr<UINT8> m_decrypted_opcodes;
};
@@ -292,8 +291,11 @@ static MACHINE_CONFIG_START( sg1000a, sg1000a_state )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sg1000ax, sg1000a )
- MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5033, XTAL_3_579545MHz)
+ MCFG_CPU_PROGRAM_MAP(program_map)
+ MCFG_CPU_IO_MAP(io_map)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
MACHINE_CONFIG_END
/*************************************
@@ -333,33 +335,7 @@ DRIVER_INIT_MEMBER(sg1000a_state,sg1000a)
{
}
-DRIVER_INIT_MEMBER(sg1000a_state,chwrestl)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x28,0x08,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...0 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...0...1 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...1...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...0 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...1 */
- { 0x88,0x08,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...1...1...0 */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...1...1 */
- { 0x80,0xa0,0x00,0x20 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...0...1 */
- { 0x80,0xa0,0x00,0x20 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...1...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...1...0...0 */
- { 0x80,0xa0,0x00,0x20 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...1...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...1...1...0 */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(sg1000a);
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
+
/*************************************
*
@@ -368,5 +344,5 @@ DRIVER_INIT_MEMBER(sg1000a_state,chwrestl)
*************************************/
GAME( 1984, chboxing, 0, sg1000a, chboxing, sg1000a_state, sg1000a, ROT0, "Sega", "Champion Boxing", 0 )
-GAME( 1985, chwrestl, 0, sg1000ax, chwrestl, sg1000a_state, chwrestl, ROT0, "Sega", "Champion Pro Wrestling", 0 )
+GAME( 1985, chwrestl, 0, sg1000ax, chwrestl, sg1000a_state, sg1000a, ROT0, "Sega", "Champion Pro Wrestling", 0 )
GAME( 1985, dokidoki, 0, sg1000a, dokidoki, sg1000a_state, sg1000a, ROT0, "Sega", "Doki Doki Penguin Land", 0 )
diff --git a/src/mame/drivers/silvmil.cpp b/src/mame/drivers/silvmil.cpp
index bff90fc7b16..fed4f7976be 100644
--- a/src/mame/drivers/silvmil.cpp
+++ b/src/mame/drivers/silvmil.cpp
@@ -420,7 +420,6 @@ static MACHINE_CONFIG_START( silvmil, silvmil_state )
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_OFFSETS(5, 7)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/simpl156.cpp b/src/mame/drivers/simpl156.cpp
index 8bda58693b0..9187475a280 100644
--- a/src/mame/drivers/simpl156.cpp
+++ b/src/mame/drivers/simpl156.cpp
@@ -413,13 +413,11 @@ static MACHINE_CONFIG_START( chainrec, simpl156_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_PRIORITY_CB(simpl156_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp
index 5641f189a33..20e01f6306c 100644
--- a/src/mame/drivers/simpsons.cpp
+++ b/src/mame/drivers/simpsons.cpp
@@ -356,16 +356,13 @@ static MACHINE_CONFIG_START( simpsons, simpsons_state )
MCFG_PALETTE_ENABLE_HILIGHTS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k052109", K052109, 0)
MCFG_GFX_PALETTE("palette")
MCFG_K052109_CB(simpsons_state, tile_callback)
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(simpsons_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, 53, 23)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, 53, 23)
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
diff --git a/src/mame/drivers/skylncr.cpp b/src/mame/drivers/skylncr.cpp
index cfaba6c0a36..8ba3d10d28b 100644
--- a/src/mame/drivers/skylncr.cpp
+++ b/src/mame/drivers/skylncr.cpp
@@ -1699,8 +1699,9 @@ ROM_START( sstar97 )
ROM_LOAD16_BYTE( "bor_dun_5.u22", 0x40001, 0x20000, CRC(ca17a632) SHA1(d491310ccdbe9b59a1e607f9254646f20700d79d) )
ROM_END
-/* Butterfly Dream 97 / Hudie Meng 97
- Game is encrypted and needs better decoded graphics.
+/*
+ Butterfly Dream 97 / Hudie Meng 97
+ Game is encrypted and needs better decoded graphics.
*/
ROM_START( bdream97 )
ROM_REGION( 0x80000, "maincpu", 0 )
@@ -1719,6 +1720,34 @@ ROM_START( bdream97 )
ROM_LOAD16_BYTE( "27c010.u27", 0x40001, 0x20000, CRC(0a266de4) SHA1(0ff9ad793e77d5419bd446cb73d4968e42305353) )
ROM_END
+/*
+ Sonik Fighter.
+ Greek Version By ZBOUNOS (Z GAMES).
+
+ Multiple Butterfly type with naked girls.
+ + new features and hold a pair.
+ + jackpot.
+ + tetris game?.
+
+ Program ROM is encrypted.
+*/
+ROM_START( sonikfig )
+ ROM_REGION( 0x80000, "maincpu", 0 )
+ ROM_LOAD( "subboard_27c512.bin", 0x00000, 0x10000, CRC(f9b5b03e) SHA1(3832a7d70b41052f9dca46faa6f311ccc5a817b7) )
+
+ ROM_REGION( 0x80000, "gfx1", 0 )
+ ROM_LOAD16_BYTE( "1__am27c100.u29", 0x00000, 0x20000, CRC(69824294) SHA1(a221ab3e5d50435c10e3cd4601cfda1c87038a74) )
+ ROM_LOAD16_BYTE( "2__am27c100.u31", 0x00001, 0x20000, CRC(5224ed08) SHA1(3ba9af7557f13bf31c529bff7b2b8cfd6e71552c) )
+ ROM_LOAD16_BYTE( "3__am27c100.u33", 0x40000, 0x20000, CRC(38fef15c) SHA1(00f7578bac395421fa3289748f85cf3b9d80e04b) )
+ ROM_LOAD16_BYTE( "4__am27c100.u35", 0x40001, 0x20000, CRC(6193d30d) SHA1(390b3f451224eb4236c6c921d34b25b702d366e0) )
+
+ ROM_REGION( 0x80000, "gfx2", 0 )
+ ROM_LOAD16_BYTE( "5__am27c100.u52", 0x00000, 0x20000, CRC(56921033) SHA1(25086b0f5978df04b28b60a30e271f4364112c96) )
+ ROM_LOAD16_BYTE( "6__am27c100.u54", 0x00001, 0x20000, CRC(72802c6c) SHA1(c552d438399fb8c983e995d5e78e591982ef96e5) )
+ ROM_LOAD16_BYTE( "7__am27c100.u56", 0x40000, 0x20000, CRC(90a09327) SHA1(3bb1150ec397627cc04b46d2bf07538c55e7f116) )
+ ROM_LOAD16_BYTE( "8__am27c100.u58", 0x40001, 0x20000, CRC(b02ed0ce) SHA1(ec8ab64210a1b10cdba5ee179e46fc8d6a1a67b6) )
+ROM_END
+
/**********************************
* Driver Init *
@@ -1745,3 +1774,4 @@ GAME( 199?, gallag50, 0, skylncr, gallag50, skylncr_state, skylncr, ROT0
GAME( 199?, neraidou, 0, neraidou, neraidou, skylncr_state, skylncr, ROT0, "bootleg", "Neraidoula (Fairy Butterfly)", 0 )
GAME( 199?, sstar97, 0, sstar97, sstar97, skylncr_state, skylncr, ROT0, "Bordun International", "Super Star 97 / Ming Xing 97 (version V153B)", 0 )
GAME( 199?, bdream97, 0, bdream97, skylncr, skylncr_state, skylncr, ROT0, "bootleg", "Butterfly Dream 97 / Hudie Meng 97", MACHINE_NOT_WORKING )
+GAME( 199?, sonikfig, 0, skylncr, skylncr, skylncr_state, skylncr, ROT0, "Z Games", "Sonik Fighter (encrypted)", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/slapshot.cpp b/src/mame/drivers/slapshot.cpp
index 9348a9dbb9c..417b4d4b335 100644
--- a/src/mame/drivers/slapshot.cpp
+++ b/src/mame/drivers/slapshot.cpp
@@ -498,7 +498,6 @@ static MACHINE_CONFIG_START( slapshot, slapshot_state )
MCFG_TC0480SCP_OFFSETS_FLIP(0, 2)
MCFG_TC0480SCP_COL_BASE(4096)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
@@ -559,7 +558,6 @@ static MACHINE_CONFIG_START( opwolf3, slapshot_state )
MCFG_TC0480SCP_OFFSETS_FLIP(0, 2)
MCFG_TC0480SCP_COL_BASE(4096)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
diff --git a/src/mame/drivers/sms.cpp b/src/mame/drivers/sms.cpp
index a3839649aac..1f2ddde1437 100644
--- a/src/mame/drivers/sms.cpp
+++ b/src/mame/drivers/sms.cpp
@@ -60,7 +60,7 @@ General compatibility issues on real hardware (not emulation bugs):
Paddle controller;
- Few games of the ones with FM support need to detect the system region as
Japanese to play FM sound;
-- The Light Phaser gun doesn't work with the Japanese SMS;
+- The Light Phaser gun doesn't work with the Japanese SMS and Sega Mark III;
- There are reports about Light Phaser working on the second Korean SMS
version, and a Korean advert shows support on the first version (Gam*Boy I,
although based on Japanese SMS);
@@ -337,10 +337,10 @@ ADDRESS_MAP_END
// The first Korean SMS version also seems to lack I/O port $3F. Games execute
// a region detection procedure that, through that port, sets the mode used by
-// the TH bits of port $DD and tests their behavior. The region of the first SMS
+// the TH bits of port $DD and tests their behaviour. The region of the first SMS
// version is detected as Japanese (opposite to the second version). However,
-// as it supports Light Phaser games, it doesn't have the same behavior of the
-// Japanese SMS. If it had the behavior of other SMS versions, the system
+// as it supports Light Phaser games, it doesn't have the same behaviour of the
+// Japanese SMS. If it had the behaviour of other SMS versions, the system
// region would be detected as Export, so it probably lacks the port.
static ADDRESS_MAP_START( sms1kr_io, AS_IO, 8, sms_state )
AM_IMPORT_FROM(sg1000m3_io)
diff --git a/src/mame/drivers/snk68.cpp b/src/mame/drivers/snk68.cpp
index 72ef817e615..d173946a5ab 100644
--- a/src/mame/drivers/snk68.cpp
+++ b/src/mame/drivers/snk68.cpp
@@ -617,7 +617,6 @@ static MACHINE_CONFIG_START( pow, snk68_state )
MCFG_DEVICE_ADD("sprites", SNK68_SPR, 0)
MCFG_SNK68_SPR_GFXDECODE("gfxdecode")
- MCFG_SNK68_SPR_PALETTE("palette")
MCFG_SNK68_SPR_SET_TILE_INDIRECT( snk68_state, tile_callback_pow )
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2) /* verified on pcb */
diff --git a/src/mame/drivers/snowbros.cpp b/src/mame/drivers/snowbros.cpp
index e038d66471b..095946efcdc 100644
--- a/src/mame/drivers/snowbros.cpp
+++ b/src/mame/drivers/snowbros.cpp
@@ -1678,7 +1678,6 @@ static MACHINE_CONFIG_START( snowbros, snowbros_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/speglsht.cpp b/src/mame/drivers/speglsht.cpp
index 74aee52aee1..6d683980e30 100644
--- a/src/mame/drivers/speglsht.cpp
+++ b/src/mame/drivers/speglsht.cpp
@@ -140,8 +140,8 @@ public:
DECLARE_VIDEO_START(speglsht);
UINT32 screen_update_speglsht(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
required_device<palette_device> m_palette;
- optional_device<st0016_cpu_device> m_maincpu;
- optional_device<cpu_device> m_subcpu;
+ required_device<st0016_cpu_device> m_maincpu;
+ required_device<cpu_device> m_subcpu;
DECLARE_WRITE8_MEMBER(st0016_rom_bank_w);
};
@@ -387,7 +387,7 @@ UINT32 speglsht_state::screen_update_speglsht(screen_device &screen, bitmap_rgb3
{
if(srcline[x])
{
- rgb_t color=m_maincpu->m_palette->pen_color(srcline[x]);
+ rgb_t color = m_maincpu->palette().pen_color(srcline[x]);
PLOT_PIXEL_RGB(x,y,color.r(),color.g(),color.b());
}
}
diff --git a/src/mame/drivers/spy.cpp b/src/mame/drivers/spy.cpp
index 0806c904736..07bc4ed9c23 100644
--- a/src/mame/drivers/spy.cpp
+++ b/src/mame/drivers/spy.cpp
@@ -511,8 +511,6 @@ static MACHINE_CONFIG_START( spy, spy_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k052109", K052109, 0)
MCFG_GFX_PALETTE("palette")
MCFG_K052109_CB(spy_state, tile_callback)
diff --git a/src/mame/drivers/spyhuntertec.cpp b/src/mame/drivers/spyhuntertec.cpp
index c41dde50fac..d0bfa8f2aa4 100644
--- a/src/mame/drivers/spyhuntertec.cpp
+++ b/src/mame/drivers/spyhuntertec.cpp
@@ -15,16 +15,12 @@ non-interlaced
sound system appears to be the same as 'spartanxtec.cpp'
-analog inputs seem to be read by the sound CPU, with serial communication
-
*/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
-
-
-#define MASTER_CLOCK XTAL_20MHz // ??
+#include "spyhunttec.lh"
class spyhuntertec_state : public driver_device
{
@@ -34,6 +30,7 @@ public:
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_analog_timer(*this, "analog_timer"),
+ m_analog_input(*this, "AN"),
m_videoram(*this, "videoram"),
m_spriteram(*this, "spriteram"),
m_spriteram2(*this, "spriteram2"),
@@ -48,6 +45,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<timer_device> m_analog_timer;
+ required_ioport_array<2> m_analog_input;
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_spriteram;
required_shared_ptr<UINT8> m_spriteram2;
@@ -102,13 +100,11 @@ public:
TILE_GET_INFO_MEMBER(spyhunt_get_alpha_tile_info);
void mcr3_update_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int color_mask, int code_xor, int dx, int dy, int interlaced);
- TIMER_DEVICE_CALLBACK_MEMBER(analog_shift_callback);
+ TIMER_DEVICE_CALLBACK_MEMBER(analog_count_callback);
void reset_analog_timer();
- int m_analog_read_ready;
- UINT8 m_analog_latched_value;
UINT8 m_analog_select;
- int m_analog_read_count;
+ UINT8 m_analog_count;
};
WRITE8_MEMBER(spyhuntertec_state::ay1_porta_w)
@@ -124,31 +120,24 @@ READ8_MEMBER(spyhuntertec_state::ay1_porta_r)
void spyhuntertec_state::reset_analog_timer()
{
- // 555 timer? complete guess
- m_analog_timer->adjust(attotime::from_nsec(7600));
+ // 555 timer, period is guessed
+ m_analog_timer->adjust(attotime::from_nsec(9400));
}
-TIMER_DEVICE_CALLBACK_MEMBER(spyhuntertec_state::analog_shift_callback)
+TIMER_DEVICE_CALLBACK_MEMBER(spyhuntertec_state::analog_count_callback)
{
- m_analog_read_count++;
+ if (m_analog_count != 0)
+ m_analog_count--;
reset_analog_timer();
}
WRITE8_MEMBER(spyhuntertec_state::ay2_porta_w)
{
-// printf("ay2_porta_w %02x\n", data);
- // write 80 / 00
- // or 81 / 01
- // depending on which sound command was used
- // assuming input select
-
- // d7 falling edge
+ // d7: latch analog counter on falling edge, d0 selects which one
if (~data & m_analog_select & 0x80)
{
- m_analog_read_ready = 1;
- m_analog_read_count = 0;
reset_analog_timer();
- m_analog_latched_value = ioport((data & 1) ? "PADDLE" : "PEDAL")->read();
+ m_analog_count = m_analog_input[data & 1]->read();
}
m_analog_select = data;
@@ -420,24 +409,8 @@ READ8_MEMBER(spyhuntertec_state::spyhuntertec_in2_r)
*/
// printf("%04x spyhuntertec_in2_r\n", space.device().safe_pc());
-
- UINT8 ret = ioport("IN2")->read()&~0x40;
-
- if (m_analog_read_ready)
- {
- if (m_analog_read_count >= m_analog_latched_value)
- {
- ret |= 0x40;
- m_analog_read_count = 0;
- m_analog_read_ready = 0;
- }
- }
- else
- {
- ret |= 0x40;
- }
-
- return ret;
+
+ return (ioport("IN2")->read() & ~0x40) | ((m_analog_count == 0) ? 0x40 : 0x00);
}
READ8_MEMBER(spyhuntertec_state::spyhuntertec_in3_r)
@@ -575,19 +548,11 @@ static INPUT_PORTS_START( spyhuntertec )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2")
- PORT_DIPNAME( 0x0001, 0x0001, "2" )
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
- PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0010, 0x0010, "handbrake?" )
- PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Right Button / Smoke Screen")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Center Button / Weapons Van")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Left Trigger / Missiles")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Left Button / Oil Slick")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Gear Shift") PORT_TOGGLE
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -616,11 +581,12 @@ static INPUT_PORTS_START( spyhuntertec )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Right Trigger / Machine Guns")
- PORT_START("PEDAL")
+ PORT_START("AN.0")
PORT_BIT( 0xff, 0x02, IPT_PEDAL ) PORT_MINMAX(0x02,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE
- PORT_START("PADDLE")
+
+ PORT_START("AN.1")
PORT_BIT( 0x7f, 0x40, IPT_PADDLE ) PORT_MINMAX(0x30,0x50) PORT_SENSITIVITY(40) PORT_KEYDELTA(3) PORT_REVERSE
INPUT_PORTS_END
@@ -687,9 +653,6 @@ void spyhuntertec_state::machine_start()
void spyhuntertec_state::machine_reset()
{
- m_analog_read_ready = 0;
- m_analog_latched_value = 0;
- m_analog_read_count = 0;
}
@@ -699,13 +662,14 @@ static MACHINE_CONFIG_START( spyhuntertec, spyhuntertec_state )
// note: no ctc, no nvram
// 2*z80, 3*ay8912
+// 2 XTALs: one 20MHz, other one near maincpu ?MHz
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/4)
+ MCFG_CPU_ADD("maincpu", Z80, 4000000 ) // NEC D780C-2 (rated 6MHz)
MCFG_CPU_PROGRAM_MAP(spyhuntertec_map)
MCFG_CPU_IO_MAP(spyhuntertec_portmap)
MCFG_CPU_VBLANK_INT_DRIVER("screen", spyhuntertec_state, irq0_line_hold)
- MCFG_TIMER_DRIVER_ADD("analog_timer", spyhuntertec_state, analog_shift_callback)
+ MCFG_TIMER_DRIVER_ADD("analog_timer", spyhuntertec_state, analog_count_callback)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -723,7 +687,7 @@ static MACHINE_CONFIG_START( spyhuntertec, spyhuntertec_state )
// MCFG_PALETTE_INIT_OWNER(spyhuntertec_state,spyhunt)
- MCFG_CPU_ADD("audiocpu", Z80, 4000000 )
+ MCFG_CPU_ADD("audiocpu", Z80, 4000000 ) // SGS Z8400B1 (rated 2.5MHz?)
MCFG_CPU_PROGRAM_MAP(spyhuntertec_sound_map)
MCFG_CPU_IO_MAP(spyhuntertec_sound_portmap)
MCFG_CPU_PERIODIC_INT_DRIVER(spyhuntertec_state, irq0_line_assert, 1000)
@@ -843,4 +807,4 @@ DRIVER_INIT_MEMBER(spyhuntertec_state,spyhuntertec)
}
-GAME (1983, spyhuntpr,spyhunt, spyhuntertec, spyhuntertec,spyhuntertec_state, spyhuntertec,ROT90, "Bally Midway (Recreativos Franco S.A. license)", "Spy Hunter (Spain, Tecfri / Recreativos Franco S.A. PCB)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+GAMEL(1983, spyhuntpr,spyhunt, spyhuntertec, spyhuntertec,spyhuntertec_state, spyhuntertec,ROT90, "bootleg (Recreativos Franco S.A. license, Tecfri)", "Spy Hunter (Spain, Recreativos Franco S.A., Tecfri PCB)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_spyhunttec )
diff --git a/src/mame/drivers/srmp2.cpp b/src/mame/drivers/srmp2.cpp
index ca80decc53a..9b0c5bf1e62 100644
--- a/src/mame/drivers/srmp2.cpp
+++ b/src/mame/drivers/srmp2.cpp
@@ -1168,7 +1168,6 @@ static MACHINE_CONFIG_START( srmp2, srmp2_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1215,7 +1214,6 @@ static MACHINE_CONFIG_START( srmp3, srmp2_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(srmp2_state, srmp3_gfxbank_callback)
/* video hardware */
@@ -1270,7 +1268,6 @@ static MACHINE_CONFIG_START( mjyuugi, srmp2_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(srmp2_state, srmp3_gfxbank_callback)
/* video hardware */
diff --git a/src/mame/drivers/sshangha.cpp b/src/mame/drivers/sshangha.cpp
index 13df09a5fd8..041b629e7a2 100644
--- a/src/mame/drivers/sshangha.cpp
+++ b/src/mame/drivers/sshangha.cpp
@@ -416,17 +416,14 @@ static MACHINE_CONFIG_START( sshangha, sshangha_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
diff --git a/src/mame/drivers/ssv.cpp b/src/mame/drivers/ssv.cpp
index a698d6bcc9d..3b2419b8a3d 100644
--- a/src/mame/drivers/ssv.cpp
+++ b/src/mame/drivers/ssv.cpp
@@ -2637,7 +2637,6 @@ static MACHINE_CONFIG_DERIVED( gdfs, ssv )
MCFG_SCREEN_UPDATE_DRIVER(ssv_state, screen_update_gdfs)
MCFG_DEVICE_ADD("st0020_spr", ST0020_SPRITES, 0)
- MCFG_ST0020_SPRITES_GFXDECODE("gfxdecode")
MCFG_ST0020_SPRITES_PALETTE("palette")
MCFG_GFXDECODE_MODIFY("gfxdecode", gdfs)
diff --git a/src/mame/drivers/stadhero.cpp b/src/mame/drivers/stadhero.cpp
index e8fc5e9a4e1..3aea0de91c7 100644
--- a/src/mame/drivers/stadhero.cpp
+++ b/src/mame/drivers/stadhero.cpp
@@ -221,13 +221,12 @@ static MACHINE_CONFIG_START( stadhero, stadhero_state )
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,1,1,2);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(1, 1, 2)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 2);
+ MCFG_DECO_MXC06_GFX_REGION(2)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/subsino2.cpp b/src/mame/drivers/subsino2.cpp
index 0ced7cfd5d7..8490bcb0d31 100644
--- a/src/mame/drivers/subsino2.cpp
+++ b/src/mame/drivers/subsino2.cpp
@@ -990,21 +990,21 @@ WRITE16_MEMBER(subsino2_state::new2001_outputs_w)
output().set_led_value(0, data & 0x4000); // record?
output().set_led_value(1, data & 0x2000); // shoot now
output().set_led_value(2, data & 0x1000); // double
- output().set_led_value(0, data & 0x0800); // black/red
+ output().set_led_value(3, data & 0x0800); // black/red
}
if (ACCESSING_BITS_0_7)
{
- output().set_led_value(0, data & 0x0080); // start
- output().set_led_value(0, data & 0x0040); // take
- output().set_led_value(0, data & 0x0020); // black/red
+ output().set_led_value(4, data & 0x0080); // start
+ output().set_led_value(5, data & 0x0040); // take
+ output().set_led_value(6, data & 0x0020); // black/red
machine().bookkeeping().coin_counter_w(0, data & 0x0010); // coin in / key in
- output().set_led_value(0, data & 0x0004); // ?
- output().set_led_value(0, data & 0x0002); // ?
+ output().set_led_value(7, data & 0x0004); // ?
+ output().set_led_value(8, data & 0x0002); // ?
}
break;
}
- popmessage("0: %04x", m_outputs16[0]);
+// popmessage("0: %04x", m_outputs16[0]);
}
// Same as bishjan (except for i/o and lo2 usage like xplan)
@@ -2258,7 +2258,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( bishjan, subsino2_state )
MCFG_CPU_ADD("maincpu", H83044, XTAL_44_1MHz / 3)
MCFG_CPU_PROGRAM_MAP( bishjan_map )
- MCFG_CPU_VBLANK_INT_DRIVER("screen", subsino2_state, irq0_line_hold)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", subsino2_state, irq0_line_hold)
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
@@ -2364,7 +2364,7 @@ static MACHINE_CONFIG_START( xplan, subsino2_state )
MCFG_CPU_ADD("maincpu", I80188, XTAL_20MHz*2 ) // !! AMD AM188-EM !!
MCFG_CPU_PROGRAM_MAP( xplan_map )
MCFG_CPU_IO_MAP( xplan_io )
- MCFG_CPU_VBLANK_INT_DRIVER("screen", subsino2_state, am188em_int0_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", subsino2_state, am188em_int0_irq)
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/supbtime.cpp b/src/mame/drivers/supbtime.cpp
index c2cc30185b2..7b4f6aaa542 100644
--- a/src/mame/drivers/supbtime.cpp
+++ b/src/mame/drivers/supbtime.cpp
@@ -349,12 +349,10 @@ static MACHINE_CONFIG_START( supbtime, supbtime_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -405,12 +403,10 @@ static MACHINE_CONFIG_START( chinatwn, supbtime_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/super80.cpp b/src/mame/drivers/super80.cpp
index 8bbb6c194f7..b3823f3ef28 100644
--- a/src/mame/drivers/super80.cpp
+++ b/src/mame/drivers/super80.cpp
@@ -216,6 +216,7 @@ ToDo:
***********************************************************************************************************/
+#include "emu.h"
#include "super80.lh"
#include "includes/super80.h"
diff --git a/src/mame/drivers/superchs.cpp b/src/mame/drivers/superchs.cpp
index 035b0ccafc5..9aacce21f5e 100644
--- a/src/mame/drivers/superchs.cpp
+++ b/src/mame/drivers/superchs.cpp
@@ -336,7 +336,6 @@ static MACHINE_CONFIG_START( superchs, superchs_state )
MCFG_TC0480SCP_OFFSETS(0x20, 0x08)
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
diff --git a/src/mame/drivers/suprloco.cpp b/src/mame/drivers/suprloco.cpp
index 223db7b3dc9..5144ebc1da2 100644
--- a/src/mame/drivers/suprloco.cpp
+++ b/src/mame/drivers/suprloco.cpp
@@ -23,7 +23,7 @@ Sega PCB 834-5137
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "machine/segacrpt.h"
+#include "machine/segacrpt_device.h"
#include "sound/sn76496.h"
#include "includes/suprloco.h"
@@ -167,10 +167,11 @@ GFXDECODE_END
static MACHINE_CONFIG_START( suprloco, suprloco_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz (?) */
+ MCFG_CPU_ADD("maincpu", SEGA_315_5015, 4000000) /* 4 MHz (?) */
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", suprloco_state, irq0_line_hold)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
MCFG_CPU_ADD("audiocpu", Z80, 4000000)
MCFG_CPU_PROGRAM_MAP(sound_map)
@@ -297,30 +298,6 @@ DRIVER_INIT_MEMBER(suprloco_state,suprloco)
}
}
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...0...0 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...0...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...1 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...0...0 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...0...1 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...1...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...0...0...0 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...0...1 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...0 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...0...1...1 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...1...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...1...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 } /* ...1...1...1...1 */
- };
-
- /* decrypt program ROMs */
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
}
diff --git a/src/mame/drivers/suprslam.cpp b/src/mame/drivers/suprslam.cpp
index 92d63b4de0d..20fd606a1f9 100644
--- a/src/mame/drivers/suprslam.cpp
+++ b/src/mame/drivers/suprslam.cpp
@@ -326,7 +326,6 @@ static MACHINE_CONFIG_START( suprslam, suprslam_state )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( suprslam_state, suprslam_tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_DEVICE_ADD("k053936", K053936, 0)
MCFG_K053936_WRAP(1)
diff --git a/src/mame/drivers/system1.cpp b/src/mame/drivers/system1.cpp
index 43cc5147afb..50395d17607 100644
--- a/src/mame/drivers/system1.cpp
+++ b/src/mame/drivers/system1.cpp
@@ -222,8 +222,7 @@ seem to have access to.
#include "cpu/mcs51/mcs51.h"
#include "machine/z80pio.h"
#include "machine/i8255.h"
-#include "machine/segacrpt.h"
-#include "machine/segacrp2.h"
+#include "machine/segacrpt_device.h"
#include "machine/mc8123.h"
#include "sound/sn76496.h"
#include "includes/system1.h"
@@ -2185,10 +2184,7 @@ static MACHINE_CONFIG_START( sys1ppi, system1_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( sys1ppix, sys1ppi )
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
-MACHINE_CONFIG_END
+
/* reduced visible area for scrolling games */
@@ -2199,10 +2195,9 @@ static MACHINE_CONFIG_DERIVED( sys1ppis, sys1ppi )
MCFG_SCREEN_VISIBLE_AREA(2*(0*8+8), 2*(32*8-1-8), 0*8, 28*8-1)
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( sys1ppisx, sys1ppis )
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
-MACHINE_CONFIG_END
+
+
+
/* revised board with 128kbit ROMs and a Z80 PIO for outputs */
@@ -2223,6 +2218,138 @@ static MACHINE_CONFIG_DERIVED( sys1piox, sys1pio )
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
MACHINE_CONFIG_END
+#define ENCRYPTED_SYS1PPI_MAPS \
+ MCFG_CPU_PROGRAM_MAP(system1_map) \
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map) \
+ MCFG_CPU_IO_MAP(system1_ppi_io_map) \
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", system1_state, irq0_line_hold) \
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+
+#define ENCRYPTED_SYS1PIO_MAPS \
+ MCFG_CPU_PROGRAM_MAP(system1_map) \
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map) \
+ MCFG_CPU_IO_MAP(system1_pio_io_map) \
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", system1_state, irq0_line_hold) \
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+
+
+static MACHINE_CONFIG_DERIVED( sys1ppix_315_5178, sys1ppi )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5178, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1ppix_315_5051, sys1ppi )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5051, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1ppix_315_5048, sys1ppi )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5048, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1ppix_315_5033, sys1ppi )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5033, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1ppix_315_5065, sys1ppi )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5065, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+
+static MACHINE_CONFIG_DERIVED( sys1ppix_315_5098, sys1ppi )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5098, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5177, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5177, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5162, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5162, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_317_0006, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_317_0006, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5135, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5135, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5132, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5132, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5155, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5155, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5110, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5110, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5051, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5051, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5098, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5098, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5102, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5102, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5133, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5133, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5093, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5093, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piox_315_5065, sys1pio )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5065, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
/* reduced visible area for scrolling games */
static MACHINE_CONFIG_DERIVED( sys1pios, sys1pio )
@@ -2231,12 +2358,36 @@ static MACHINE_CONFIG_DERIVED( sys1pios, sys1pio )
MCFG_SCREEN_VISIBLE_AREA(2*(0*8+8), 2*(32*8-1-8), 0*8, 28*8-1)
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( sys1piosx, sys1pios )
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+static MACHINE_CONFIG_DERIVED( sys1piosx_315_5099, sys1pios )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5065, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1piosx_315_spat, sys1pios )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_SPAT, MASTER_CLOCK)
+ ENCRYPTED_SYS1PIO_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( sys1ppisx_315_5064, sys1ppis )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5064, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys1ppisx_315_5041, sys1ppis )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5041, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+
+
+
+
+
/* this describes the additional 8751 MCU when present */
static MACHINE_CONFIG_FRAGMENT( mcu )
@@ -2286,6 +2437,31 @@ static MACHINE_CONFIG_DERIVED( sys2x, sys2 )
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( sys2_315_5177, sys2 )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5177, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys2_315_5176, sys2 )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5176, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys2_317_0006, sys2 )
+ MCFG_CPU_REPLACE("maincpu", SEGA_317_0006, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( sys2_317_0007, sys2 )
+ MCFG_CPU_REPLACE("maincpu", SEGA_317_0007, MASTER_CLOCK)
+ ENCRYPTED_SYS1PPI_MAPS
+ MCFG_SEGAZ80_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
+
static MACHINE_CONFIG_DERIVED( sys2xb, sys2 )
MCFG_DEVICE_MODIFY("maincpu")
MCFG_CPU_DECRYPTED_OPCODES_MAP(banked_decrypted_opcodes_map)
@@ -3854,6 +4030,36 @@ ROM_START( wboy )
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) )
ROM_END
+ROM_START( wboyub ) // seems to be the same as 'wboy' but a different rom layout and external encryption handling
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "1.bin", 0x0000, 0x8000, CRC(07066b6f) SHA1(1ead373907fd5bd5f4cc003a97218aa582758a00) )
+ ROM_LOAD( "epr-7491.96", 0x8000, 0x4000, CRC(1f7d0efe) SHA1(a1b4f8faf1614f4808df1292209c340f1490adbd) )
+
+ ROM_REGION( 0x10000, "unk", 0 )
+ ROM_LOAD( "0cpu.bin", 0xc000, 0x2000, CRC(a962e6af) SHA1(f46b01db38cdc9c8485d7fe0a344e9f6ed918925) ) /* supposedly the encryption key */
+
+ ROM_REGION( 0x10000, "soundcpu", 0 )
+ ROM_LOAD( "epr7498a.3", 0x0000, 0x2000, CRC(c198205c) SHA1(d2d5cd154ce6a5a3c6a099b4ab2ea7cc045ab0a1) )
+
+ ROM_REGION( 0xc000, "tiles", 0 )
+ ROM_LOAD( "epr-7497.62", 0x0000, 0x2000, CRC(08d609ca) SHA1(11799e9ef7e6942b304f132b404bff3ed44d524b) )
+ ROM_LOAD( "epr-7496.61", 0x2000, 0x2000, CRC(6f61fdf1) SHA1(21826aebf5835b9f3d9c467c8647809c1bc0d01f) )
+ ROM_LOAD( "epr-7495.64", 0x4000, 0x2000, CRC(6a0d2c2d) SHA1(8c21d7f0768e8dda2b7185f3c510cae4229a4a2e) )
+ ROM_LOAD( "epr-7494.63", 0x6000, 0x2000, CRC(a8e281c7) SHA1(a88b80a7b94ab1401bbf28d7707fdf28a5505127) )
+ ROM_LOAD( "epr-7493.66", 0x8000, 0x2000, CRC(89305df4) SHA1(7a5098624769a31e7512f56831e818bce6a18871) )
+ ROM_LOAD( "epr-7492.65", 0xa000, 0x2000, CRC(60f806b1) SHA1(f91e5868a455dff2bce3c2891a7cfd648957cd73) )
+
+ ROM_REGION( 0x10000, "sprites", 0 )
+ ROM_LOAD( "4.bin", 0x0000, 0x4000, CRC(8b3124e6) SHA1(e90deaa687128c1f0b7e9e6b6d767bd484c7fc61) )
+ ROM_CONTINUE(0x8000,0x4000)
+ ROM_LOAD( "5.bin", 0x4000, 0x4000, CRC(b75278e7) SHA1(5b7c519f32eac40dc46ca5bba03cec1e893b6fcd) )
+ ROM_CONTINUE(0xc000,0x4000)
+
+ ROM_REGION( 0x0100, "proms", 0 )
+ ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) )
+ROM_END
+
+
/* Wonder Boy (Escape, Sega license)
PCB: 834-3984-09 WONDER BOY
@@ -4064,52 +4270,49 @@ ROM_START( wboyu )
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) )
ROM_END
-ROM_START( wboyub )
- ROM_REGION( 0x10000, "maincpu", 0 )
- /* this has way more code than the parent sets, I have no idea what to do with it */
- ROM_LOAD( "1.bin", 0x0000, 0x8000, CRC(07066b6f) SHA1(1ead373907fd5bd5f4cc003a97218aa582758a00) )
- ROM_LOAD( "4.bin", 0x4000, 0x8000, CRC(8b3124e6) SHA1(e90deaa687128c1f0b7e9e6b6d767bd484c7fc61) )
- ROM_LOAD( "5.bin", 0x8000, 0x8000, CRC(b75278e7) SHA1(5b7c519f32eac40dc46ca5bba03cec1e893b6fcd) )
- ROM_LOAD( "epr-7491.96", 0x8000, 0x4000, CRC(1f7d0efe) SHA1(a1b4f8faf1614f4808df1292209c340f1490adbd) )
- ROM_LOAD( "0cpu.bin", 0xc000, 0x2000, CRC(a962e6af) SHA1(f46b01db38cdc9c8485d7fe0a344e9f6ed918925) ) /* supposedly the encryption key */
+
+ROM_START( wboysys2 )
+ ROM_REGION( 0x20000, "maincpu", 0 )
+ ROM_LOAD( "epr7580.90", 0x00000, 0x8000, CRC(d69927a5) SHA1(b633177146a83953131d4e03fa987416f222199a) ) /* encrypted */
+ ROM_LOAD( "epr7579.91", 0x10000, 0x8000, CRC(8a6f4b00) SHA1(2b1c26daa2e9c668292db73e28318257c62b175c) )
ROM_REGION( 0x10000, "soundcpu", 0 )
- ROM_LOAD( "epr7498a.3", 0x0000, 0x2000, CRC(c198205c) SHA1(d2d5cd154ce6a5a3c6a099b4ab2ea7cc045ab0a1) )
+ ROM_LOAD( "epr7583.126", 0x0000, 0x8000, CRC(99334b3c) SHA1(dfc09f63082b7666fa2152e22810c0455a7e5051) )
- ROM_REGION( 0xc000, "tiles", 0 )
- ROM_LOAD( "epr-7497.62", 0x0000, 0x2000, CRC(08d609ca) SHA1(11799e9ef7e6942b304f132b404bff3ed44d524b) )
- ROM_LOAD( "epr-7496.61", 0x2000, 0x2000, CRC(6f61fdf1) SHA1(21826aebf5835b9f3d9c467c8647809c1bc0d01f) )
- ROM_LOAD( "epr-7495.64", 0x4000, 0x2000, CRC(6a0d2c2d) SHA1(8c21d7f0768e8dda2b7185f3c510cae4229a4a2e) )
- ROM_LOAD( "epr-7494.63", 0x6000, 0x2000, CRC(a8e281c7) SHA1(a88b80a7b94ab1401bbf28d7707fdf28a5505127) )
- ROM_LOAD( "epr-7493.66", 0x8000, 0x2000, CRC(89305df4) SHA1(7a5098624769a31e7512f56831e818bce6a18871) )
- ROM_LOAD( "epr-7492.65", 0xa000, 0x2000, CRC(60f806b1) SHA1(f91e5868a455dff2bce3c2891a7cfd648957cd73) )
+ ROM_REGION( 0x18000, "tiles", 0 )
+ ROM_LOAD( "epr7581.4", 0x00000, 0x8000, CRC(d95565fd) SHA1(25f1653cca1d6432171a7b391cbb76bc18ddfb06) )
+ ROM_LOAD( "epr7582.5", 0x08000, 0x8000, CRC(560cbac0) SHA1(851283e6d63e33d250840501dd22750b19772fb0) )
+ ROM_LOAD( "epr7607.6", 0x10000, 0x8000, CRC(bd36df03) SHA1(7f7efac2c71fae48dd1dcb4dcc849f07e8127f7d) )
ROM_REGION( 0x10000, "sprites", 0 )
- ROM_LOAD( "epr-7485.117", 0x0000, 0x4000, CRC(c2891722) SHA1(e4e11c0e9bd0dc121c25349493f2b13d2ff8c807) )
- ROM_LOAD( "epr-7487.04", 0x4000, 0x4000, CRC(2d3a421b) SHA1(d70440a8703ccface3212cd9544c950b36263e8c) )
- ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) )
- ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) )
+ ROM_LOAD( "epr7578.87", 0x00000, 0x8000, CRC(6ff1637f) SHA1(9a6ddbd7b8d53273b30c3529b028c1f28bf3c63b) )
+ ROM_LOAD( "epr7577.86", 0x08000, 0x8000, CRC(58b3705e) SHA1(1a8ff3f1765a3b21145bd1a6c85441f806f7b17d) )
+
+ ROM_REGION( 0x0300, "palette", 0 )
+ ROM_LOAD( "pr-7345.20", 0x0000, 0x0100, CRC(8eee0f72) SHA1(b5694c120f604a5f7cc95618a71ab16a1a6151ed) ) /* palette red component */
+ ROM_LOAD( "pr-7344.14", 0x0100, 0x0100, CRC(3e7babd7) SHA1(d4f8790db4dce75e27156a4c6de2dcef2baf6d76) ) /* palette green component */
+ ROM_LOAD( "pr-7343.8", 0x0200, 0x0100, CRC(371c44a6) SHA1(ac37458d1feb6566b09a795b20c21953d4ab109d) ) /* palette blue component */
ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) )
+ ROM_LOAD( "pr-5317.28", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) )
ROM_END
-ROM_START( wboysys2 )
+ROM_START( wboysys2a )
ROM_REGION( 0x20000, "maincpu", 0 )
- ROM_LOAD( "7580.90", 0x0000, 0x8000, CRC(d69927a5) SHA1(b633177146a83953131d4e03fa987416f222199a) ) /* encrypted */
- ROM_LOAD( "7579.91", 0x10000, 0x8000, CRC(8a6f4b00) SHA1(2b1c26daa2e9c668292db73e28318257c62b175c) ) /* encrypted */
+ ROM_LOAD( "epr7625.90", 0x00000, 0x8000, CRC(43b3d155) SHA1(40cc063bf64327250be7ae078ea85315ad4db794) ) /* encrypted */
+ ROM_LOAD( "epr7626.91", 0x10000, 0x8000, CRC(8a6f4b00) SHA1(2b1c26daa2e9c668292db73e28318257c62b175c) )
ROM_REGION( 0x10000, "soundcpu", 0 )
- ROM_LOAD( "7583.126", 0x0000, 0x8000, CRC(99334b3c) SHA1(dfc09f63082b7666fa2152e22810c0455a7e5051) )
+ ROM_LOAD( "epr7583.126", 0x0000, 0x8000, CRC(99334b3c) SHA1(dfc09f63082b7666fa2152e22810c0455a7e5051) )
ROM_REGION( 0x18000, "tiles", 0 )
- ROM_LOAD( "7581.4", 0x00000, 0x8000, CRC(d95565fd) SHA1(25f1653cca1d6432171a7b391cbb76bc18ddfb06) )
- ROM_LOAD( "7582.5", 0x08000, 0x8000, CRC(560cbac0) SHA1(851283e6d63e33d250840501dd22750b19772fb0) )
- ROM_LOAD( "7607.6", 0x10000, 0x8000, CRC(bd36df03) SHA1(7f7efac2c71fae48dd1dcb4dcc849f07e8127f7d) )
+ ROM_LOAD( "epr7581.4", 0x00000, 0x8000, CRC(d95565fd) SHA1(25f1653cca1d6432171a7b391cbb76bc18ddfb06) )
+ ROM_LOAD( "epr7582.5", 0x08000, 0x8000, CRC(560cbac0) SHA1(851283e6d63e33d250840501dd22750b19772fb0) )
+ ROM_LOAD( "epr7607.6", 0x10000, 0x8000, CRC(bd36df03) SHA1(7f7efac2c71fae48dd1dcb4dcc849f07e8127f7d) )
ROM_REGION( 0x10000, "sprites", 0 )
- ROM_LOAD( "7578.87", 0x00000, 0x8000, CRC(6ff1637f) SHA1(9a6ddbd7b8d53273b30c3529b028c1f28bf3c63b) )
- ROM_LOAD( "7577.86", 0x08000, 0x8000, CRC(58b3705e) SHA1(1a8ff3f1765a3b21145bd1a6c85441f806f7b17d) )
+ ROM_LOAD( "epr7578.87", 0x00000, 0x8000, CRC(6ff1637f) SHA1(9a6ddbd7b8d53273b30c3529b028c1f28bf3c63b) )
+ ROM_LOAD( "epr7577.86", 0x08000, 0x8000, CRC(58b3705e) SHA1(1a8ff3f1765a3b21145bd1a6c85441f806f7b17d) )
ROM_REGION( 0x0300, "palette", 0 )
ROM_LOAD( "pr-7345.20", 0x0000, 0x0100, CRC(8eee0f72) SHA1(b5694c120f604a5f7cc95618a71ab16a1a6151ed) ) /* palette red component */
@@ -4937,447 +5140,26 @@ ROM_END
DRIVER_INIT_MEMBER(system1_state,bank00)
{
- m_videomode_custom = nullptr;
- m_banked_decrypted_opcodes = nullptr;
}
DRIVER_INIT_MEMBER(system1_state,bank44)
{
m_videomode_custom = &system1_state::bank44_custom_w;
- m_banked_decrypted_opcodes = nullptr;
}
DRIVER_INIT_MEMBER(system1_state,bank0c)
{
m_videomode_custom = &system1_state::bank0c_custom_w;
- m_banked_decrypted_opcodes = nullptr;
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5033)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x28,0x08,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...0 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...0...1 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...1...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...0 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...1 */
- { 0x88,0x08,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...1...1...0 */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...1...1 */
- { 0x80,0xa0,0x00,0x20 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...0...1 */
- { 0x80,0xa0,0x00,0x20 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...1...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...1...0...0 */
- { 0x80,0xa0,0x00,0x20 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...1...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...1...1...0 */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5041)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...0 */
- { 0x88,0x80,0x08,0x00 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...1...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...0 */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...1...1 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...0...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...0...1 */
- { 0xa0,0x80,0x20,0x00 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...1...0 */
- { 0xa0,0x80,0x20,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...1...0...1...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...0 */
- { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...1...1...0 */
- { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0xa8,0x88 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5048)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...0...0...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
- { 0xa0,0x80,0x20,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...0 */
- { 0xa0,0xa8,0x80,0x88 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...1 */
- { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...1...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...0...1 */
- { 0xa0,0x80,0x20,0x00 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...1...1...0 */
- { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...1...1...1 */
- { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...0...0 */
- { 0xa0,0x20,0x80,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...1 */
- { 0xa0,0x20,0x80,0x00 }, { 0xa0,0x20,0x80,0x00 }, /* ...1...0...1...0 */
- { 0xa0,0x20,0x80,0x00 }, { 0xa0,0x20,0x80,0x00 }, /* ...1...0...1...1 */
- { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...1...0...1 */
- { 0xa0,0xa8,0x80,0x88 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...1...0 */
- { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0xa8,0x80,0x88 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5051)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x08,0x88,0x00,0x80 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...0...0 */
- { 0x80,0x00,0xa0,0x20 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0x20,0x00 }, /* ...0...0...1...0 */
- { 0x28,0x08,0x20,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...1 */
- { 0x08,0x88,0x00,0x80 }, { 0x80,0x00,0xa0,0x20 }, /* ...0...1...0...0 */
- { 0x80,0x00,0xa0,0x20 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...1 */
- { 0x28,0x08,0x20,0x00 }, { 0x28,0x08,0x20,0x00 }, /* ...0...1...1...0 */
- { 0x28,0x08,0x20,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...1...1 */
- { 0x08,0x88,0x00,0x80 }, { 0xa8,0x88,0x28,0x08 }, /* ...1...0...0...0 */
- { 0xa8,0x88,0x28,0x08 }, { 0x80,0x00,0xa0,0x20 }, /* ...1...0...0...1 */
- { 0x28,0x08,0x20,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...1...0 */
- { 0xa8,0x88,0x28,0x08 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...1...1 */
- { 0x08,0x88,0x00,0x80 }, { 0x80,0x00,0xa0,0x20 }, /* ...1...1...0...0 */
- { 0xa8,0x88,0x28,0x08 }, { 0x80,0x00,0xa0,0x20 }, /* ...1...1...0...1 */
- { 0x28,0x08,0x20,0x00 }, { 0x28,0x08,0x20,0x00 }, /* ...1...1...1...0 */
- { 0x08,0x88,0x00,0x80 }, { 0x88,0x80,0x08,0x00 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5064)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...0...0...0 */
- { 0x08,0x88,0x00,0x80 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0x20,0x28,0xa0,0xa8 }, /* ...0...0...1...0 */
- { 0x20,0x28,0xa0,0xa8 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...0...1...1 */
- { 0xa8,0x28,0x88,0x08 }, { 0xa8,0x28,0x88,0x08 }, /* ...0...1...0...0 */
- { 0x08,0x88,0x00,0x80 }, { 0xa8,0x28,0x88,0x08 }, /* ...0...1...0...1 */
- { 0xa8,0x28,0x88,0x08 }, { 0x20,0x28,0xa0,0xa8 }, /* ...0...1...1...0 */
- { 0xa8,0x28,0x88,0x08 }, { 0xa8,0x28,0x88,0x08 }, /* ...0...1...1...1 */
- { 0x20,0x28,0xa0,0xa8 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...0...0...1 */
- { 0x20,0x28,0xa0,0xa8 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...1...0 */
- { 0x20,0x28,0xa0,0xa8 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...0...1...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...1...0...0 */
- { 0xa8,0x28,0x88,0x08 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...1 */
- { 0x20,0x28,0xa0,0xa8 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...1...1...0 */
- { 0xa8,0x28,0x88,0x08 }, { 0xa8,0x28,0x88,0x08 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5065)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0xa0,0xa8,0x20,0x28 }, { 0x80,0xa0,0x00,0x20 }, /* ...0...0...0...0 */
- { 0x20,0x28,0x00,0x08 }, { 0x20,0x28,0x00,0x08 }, /* ...0...0...0...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x08,0x28,0x00,0x20 }, /* ...0...0...1...0 */
- { 0x88,0x08,0xa8,0x28 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...0...1...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x20,0x28,0x00,0x08 }, /* ...0...1...0...0 */
- { 0x28,0xa8,0x20,0xa0 }, { 0x20,0x28,0x00,0x08 }, /* ...0...1...0...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x08,0x28,0x00,0x20 }, /* ...0...1...1...0 */
- { 0x88,0x08,0xa8,0x28 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...1...1...1 */
- { 0x28,0xa8,0x20,0xa0 }, { 0xa0,0xa8,0x20,0x28 }, /* ...1...0...0...0 */
- { 0x88,0x08,0xa8,0x28 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...0...1 */
- { 0x28,0xa8,0x20,0xa0 }, { 0x08,0x28,0x00,0x20 }, /* ...1...0...1...0 */
- { 0x28,0xa8,0x20,0xa0 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...1...1 */
- { 0x20,0x28,0x00,0x08 }, { 0x20,0x28,0x00,0x08 }, /* ...1...1...0...0 */
- { 0x88,0x08,0xa8,0x28 }, { 0x20,0x28,0x00,0x08 }, /* ...1...1...0...1 */
- { 0x08,0x28,0x00,0x20 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...1...1...0 */
- { 0x08,0x28,0x00,0x20 }, { 0x88,0x08,0xa8,0x28 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_spat)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0x08,0x80,0x00 }, { 0x00,0x08,0x20,0x28 }, /* ...0...0...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...0...1 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...1 */
- { 0x00,0x08,0x20,0x28 }, { 0x88,0x08,0x80,0x00 }, /* ...0...1...0...0 */
- { 0xa0,0x80,0x20,0x00 }, { 0x80,0x88,0x00,0x08 }, /* ...0...1...0...1 */
- { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...1...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...1...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0x80,0x88,0x00,0x08 }, /* ...1...0...0...0 */
- { 0x80,0x88,0x00,0x08 }, { 0x00,0x08,0x20,0x28 }, /* ...1...0...0...1 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...0...1...0 */
- { 0x00,0x08,0x20,0x28 }, { 0x80,0xa0,0x88,0xa8 }, /* ...1...0...1...1 */
- { 0x80,0x88,0x00,0x08 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...0 */
- { 0x80,0xa0,0x88,0xa8 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...1 */
- { 0xa0,0x80,0x20,0x00 }, { 0x80,0xa0,0x88,0xa8 }, /* ...1...1...1...0 */
- { 0x28,0x20,0xa8,0xa0 }, { 0x00,0x08,0x20,0x28 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5099)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0xa0,0xa8,0x20,0x28 }, { 0x80,0xa0,0x00,0x20 }, /* ...0...0...0...0 */
- { 0x20,0x28,0x00,0x08 }, { 0x20,0x28,0x00,0x08 }, /* ...0...0...0...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x08,0x28,0x00,0x20 }, /* ...0...0...1...0 */
- { 0x88,0x08,0xa8,0x28 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...0...1...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x20,0x28,0x00,0x08 }, /* ...0...1...0...0 */
- { 0x28,0xa8,0x20,0xa0 }, { 0x20,0x28,0x00,0x08 }, /* ...0...1...0...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x08,0x28,0x00,0x20 }, /* ...0...1...1...0 */
- { 0x88,0x08,0xa8,0x28 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...1...1...1 */
- { 0x28,0xa8,0x20,0xa0 }, { 0xa0,0xa8,0x20,0x28 }, /* ...1...0...0...0 */
- { 0x88,0x08,0xa8,0x28 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...0...1 */
- { 0x28,0xa8,0x20,0xa0 }, { 0x08,0x28,0x00,0x20 }, /* ...1...0...1...0 */
- { 0x28,0xa8,0x20,0xa0 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...1...1 */
- { 0x20,0x28,0x00,0x08 }, { 0x20,0x28,0x00,0x08 }, /* ...1...1...0...0 */
- { 0x88,0x08,0xa8,0x28 }, { 0x20,0x28,0x00,0x08 }, /* ...1...1...0...1 */
- { 0x08,0x28,0x00,0x20 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...1...1...0 */
- { 0x08,0x28,0x00,0x20 }, { 0x88,0x08,0xa8,0x28 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5093)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...0...0 */
- { 0x08,0x88,0x28,0xa8 }, { 0x28,0xa8,0x20,0xa0 }, /* ...0...0...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...0 */
- { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...0...1...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x20,0x00,0xa0,0x80 }, /* ...0...1...0...0 */
- { 0x28,0xa8,0x20,0xa0 }, { 0x20,0x00,0xa0,0x80 }, /* ...0...1...0...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...1...1...0 */
- { 0x28,0xa8,0x20,0xa0 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...1...1...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...0...0...0 */
- { 0x80,0x88,0xa0,0xa8 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...0...0...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...0 */
- { 0x80,0x88,0xa0,0xa8 }, { 0x28,0xa8,0x20,0xa0 }, /* ...1...0...1...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...1...0...0 */
- { 0x80,0x88,0xa0,0xa8 }, { 0x20,0x00,0xa0,0x80 }, /* ...1...1...0...1 */
- { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...1...1...0 */
- { 0x80,0x88,0xa0,0xa8 }, { 0x28,0xa8,0x20,0xa0 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5098) // also 315-5030 ?
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x08,0x88,0x00,0x80 }, { 0xa0,0x20,0x80,0x00 }, /* ...0...0...0...0 */
- { 0xa8,0xa0,0x28,0x20 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
- { 0x88,0x80,0x08,0x00 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...0...1...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x20,0x80,0x00 }, /* ...0...1...0...0 */
- { 0xa8,0xa0,0x28,0x20 }, { 0xa8,0xa0,0x28,0x20 }, /* ...0...1...0...1 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...1...1 */
- { 0xa0,0x20,0x80,0x00 }, { 0xa0,0x20,0x80,0x00 }, /* ...1...0...0...0 */
- { 0x08,0x88,0x00,0x80 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...0...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...1...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...0...1 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...1...0 */
- { 0x08,0x88,0x00,0x80 }, { 0x28,0x08,0xa8,0x88 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5102)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...0...0...1 */
- { 0xa8,0xa0,0x28,0x20 }, { 0xa8,0xa0,0x28,0x20 }, /* ...0...0...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...0...1...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x08,0x80,0x00 }, /* ...0...1...0...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x28,0x20 }, /* ...0...1...1...1 */
- { 0x88,0x08,0x80,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...0 */
- { 0xa0,0xa8,0x80,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...0...0...1 */
- { 0xa8,0xa0,0x28,0x20 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...1...0 */
- { 0xa8,0xa0,0x28,0x20 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...0...1...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...0...0 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...1...0...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...1...0 */
- { 0xa8,0xa0,0x28,0x20 }, { 0x28,0x08,0xa8,0x88 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-
-// THIS TABLE IS WRONG
-DRIVER_INIT_MEMBER(system1_state,sega315_5133)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...0...0...1 */
- { 0xa8,0xa0,0x28,0x20 }, { 0xa8,0xa0,0x28,0x20 }, /* ...0...0...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...0...1...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...0...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0x88,0x08,0x80,0x00 }, /* ...0...1...0...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x28,0x20 }, /* ...0...1...1...1 */
- { 0x88,0x08,0x80,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...0 */
- { 0xa0,0xa8,0x80,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...0...0...1 */
- { 0xa8,0xa0,0x28,0x20 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...1...0 */
- { 0xa8,0xa0,0x28,0x20 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...0...1...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...0...0 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...1...0...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...1...0 */
- { 0xa8,0xa0,0x28,0x20 }, { 0x28,0x08,0xa8,0x88 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5110)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0x08,0x80,0x00 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...0...0...0 */
- { 0x00,0x20,0x80,0xa0 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...0...1 */
- { 0x88,0x08,0xa8,0x28 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...0...1...0 */
- { 0x00,0x20,0x80,0xa0 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...0...1...1 */
- { 0x00,0x20,0x80,0xa0 }, { 0x08,0x00,0x88,0x80 }, /* ...0...1...0...0 */
- { 0x00,0x20,0x80,0xa0 }, { 0x20,0x28,0xa0,0xa8 }, /* ...0...1...0...1 */
- { 0x20,0x28,0xa0,0xa8 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...1...1...0 */
- { 0x20,0x28,0xa0,0xa8 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...1...1...1 */
- { 0x88,0x08,0x80,0x00 }, { 0x08,0x00,0x88,0x80 }, /* ...1...0...0...0 */
- { 0x08,0x00,0x88,0x80 }, { 0x88,0x08,0x80,0x00 }, /* ...1...0...0...1 */
- { 0x08,0x28,0x00,0x20 }, { 0x08,0x28,0x00,0x20 }, /* ...1...0...1...0 */
- { 0x88,0x08,0x80,0x00 }, { 0x08,0x28,0x00,0x20 }, /* ...1...0...1...1 */
- { 0x08,0x28,0x00,0x20 }, { 0x08,0x00,0x88,0x80 }, /* ...1...1...0...0 */
- { 0x08,0x28,0x00,0x20 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...1...0...1 */
- { 0x20,0x28,0xa0,0xa8 }, { 0x08,0x28,0x00,0x20 }, /* ...1...1...1...0 */
- { 0x20,0x28,0xa0,0xa8 }, { 0x08,0x28,0x00,0x20 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
}
-DRIVER_INIT_MEMBER(system1_state,sega315_5155)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x20,0x28,0x00,0x08 }, { 0x80,0x00,0xa0,0x20 }, /* ...0...0...0...0 */
- { 0x20,0x28,0x00,0x08 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...0...0...1 */
- { 0x28,0x08,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...0 */
- { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...1 */
- { 0x20,0x28,0x00,0x08 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...0...0 */
- { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...1...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...0 */
- { 0xa0,0xa8,0x20,0x28 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...1 */
- { 0x80,0x00,0xa0,0x20 }, { 0x80,0x00,0xa0,0x20 }, /* ...1...0...0...0 */
- { 0xa0,0x20,0xa8,0x28 }, { 0xa0,0xa8,0x20,0x28 }, /* ...1...0...0...1 */
- { 0xa0,0x20,0xa8,0x28 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...0 */
- { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...1 */
- { 0x80,0x00,0xa0,0x20 }, { 0x20,0x28,0x00,0x08 }, /* ...1...1...0...0 */
- { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0x20,0xa8,0x28 }, /* ...1...1...0...1 */
- { 0x80,0x00,0xa0,0x20 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...1...1...0 */
- { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0x20,0xa8,0x28 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-DRIVER_INIT_MEMBER(system1_state,sega315_5132)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x20,0x00,0xa0,0x80 }, { 0x80,0xa0,0x88,0xa8 }, /* ...0...0...0...0 */
- { 0x20,0x00,0xa0,0x80 }, { 0x80,0xa0,0x88,0xa8 }, /* ...0...0...0...1 */
- { 0xa8,0xa0,0x88,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...1...0 */
- { 0x08,0x88,0x00,0x80 }, { 0x80,0xa0,0x88,0xa8 }, /* ...0...0...1...1 */
- { 0x20,0x00,0xa0,0x80 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...1...0...0 */
- { 0x20,0x00,0xa0,0x80 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...0...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...1...0 */
- { 0x08,0x88,0x00,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...1...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0x20,0x00,0xa0,0x80 }, /* ...1...0...0...0 */
- { 0x80,0xa0,0x88,0xa8 }, { 0x20,0x00,0xa0,0x80 }, /* ...1...0...0...1 */
- { 0x80,0xa0,0x88,0xa8 }, { 0x80,0xa0,0x88,0xa8 }, /* ...1...0...1...0 */
- { 0xa8,0xa0,0x88,0x80 }, { 0x80,0xa0,0x88,0xa8 }, /* ...1...0...1...1 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...0 */
- { 0x88,0x80,0x08,0x00 }, { 0x08,0x88,0x00,0x80 }, /* ...1...1...0...1 */
- { 0x88,0x80,0x08,0x00 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...1...1...0 */
- { 0x88,0x80,0x08,0x00 }, { 0xa8,0xa0,0x88,0x80 } /* ...1...1...1...1 */
- };
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
DRIVER_INIT_MEMBER(system1_state,myherok)
{
+ // extra layer of encryption applied BEFORE the usual CPU decryption
+ // probably bootleg?
+
int A;
UINT8 *rom;
@@ -5417,181 +5199,14 @@ DRIVER_INIT_MEMBER(system1_state,myherok)
}
}
- DRIVER_INIT_CALL(sega315_5132);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5162)
-{
- // 315-5162
- static const UINT8 xor_table[128] =
- {
- 0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
- 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
- 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
- 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
- 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
- 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
- 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
- 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
- 0x00,
- };
-
- static const int swap_table[128] =
- {
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
- 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
- 12,
- };
-
DRIVER_INIT_CALL(bank00);
- sega_decode_2(m_maincpu_region->base(), m_decrypted_opcodes, xor_table, swap_table);
}
-DRIVER_INIT_MEMBER(system1_state,sega315_5177)
-{
- // 315-5177
- static const UINT8 xor_table[128] =
- {
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,
-
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
- 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
- 0x05,0x55,0x50,0x14,
- };
-
- static const int swap_table[128] =
- {
- 0,0,0,0,
- 1,1,1,1,1,
- 2,2,2,2,2,
- 3,3,3,3,
- 4,4,4,4,4,
- 5,5,5,5,5,
- 6,6,6,6,6,
- 7,7,7,7,7,
- 8,8,8,8,
- 9,9,9,9,9,
- 10,10,10,10,10,
- 11,11,11,11,11,
- 12,12,12,12,12,
- 13,13,
-
- 8,8,8,8,
- 9,9,9,9,9,
- 10,10,10,10,10,
- 11,11,11,11,
- 12,12,12,12,12,
- 13,13,13,13,13,
- 14,14,14,14,14,
- 15,15,15,15,15,
- 16,16,16,16,
- 17,17,17,17,17,
- 18,18,18,18,18,
- 19,19,19,19,19,
- 20,20,20,20,20,
- 21,21,
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode_2(m_maincpu_region->base(), m_decrypted_opcodes, xor_table, swap_table);
-}
-DRIVER_INIT_MEMBER(system1_state,sega315_5177_s2)
-{
- DRIVER_INIT_CALL(sega315_5177);
- DRIVER_INIT_CALL(bank0c);
-}
-DRIVER_INIT_MEMBER(system1_state,sega315_5178)
-{
- // 315-5178
- static const UINT8 xor_table[128] =
- {
- 0x00,0x55,0x45,0x05,0x11,0x41,0x01,0x14,0x44,0x50,0x10,
- 0x00,0x55,0x15,0x05,0x51,0x41,0x01,0x14,0x44,0x04,0x10,
- 0x40,0x55,0x15,0x05,0x51,0x11,
- 0x01,0x54,0x44,0x04,0x10,0x40,0x00,0x15,0x45,0x51,0x11,
- 0x01,0x54,0x14,0x04,0x50,0x40,0x00,0x15,0x45,0x05,0x11,
- 0x41,0x54,0x14,0x04,0x50,0x10,
- 0x00,0x55,0x45,0x05,0x11,0x41,0x01,0x14,
-
- 0x00,0x55,0x45,0x05,0x11,0x41,0x01,0x14,0x44,0x50,0x10,
- 0x00,0x55,0x15,0x05,0x51,0x41,0x01,0x14,0x44,0x04,0x10,
- 0x40,0x55,0x15,0x05,0x51,0x11,
- 0x01,0x54,0x44,0x04,0x10,0x40,0x00,0x15,0x45,0x51,0x11,
- 0x01,0x54,0x14,0x04,0x50,0x40,0x00,0x15,0x45,0x05,0x11,
- 0x41,0x54,0x14,0x04,0x50,0x10,
- 0x00,0x55,0x45,0x05,0x11,0x41,0x01,0x14,
- };
-
- static const int swap_table[128] =
- {
- 2,
- 3, 5, 7, 1, 3, 5, 7, 1, 3, 5, 7,
- 0, 2, 4, 6, 0, 2, 4, 6, 0, 2, 4,
- 5, 7, 1, 3, 5, 7, 1, 3, 5, 7, 1, 3,
- 4, 6, 0, 2, 4, 6, 0, 2, 4, 6,
- 8,
- 1, 3, 5, 7, 1, 3, 5, 7, 1, 3, 5,
- 6, 0, 2, 4, 6, 0, 2,
-
- 10,
- 11,13,15, 9,11,13,15, 9,11,13,15,
- 8,10,12,14, 8,10,12,14, 8,10,12,
- 13,15, 9,11,13,15, 9,11,13,15, 9,11,
- 12,14, 8,10,12,14, 8,10,12,14,
- 16,
- 9,11,13,15, 9,11,13,15, 9,11,13,
- 14, 8,10,12,14, 8,10,
- };
- DRIVER_INIT_CALL(bank00);
- sega_decode_2(m_maincpu_region->base(), m_decrypted_opcodes, xor_table, swap_table);
-}
-
-DRIVER_INIT_MEMBER(system1_state,sega315_5135)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...1...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...0 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...1...0 */
- { 0x88,0x80,0x08,0x00 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...1 */
- { 0xa0,0x20,0xa8,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...0 */
- { 0xa0,0x20,0xa8,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...1 */
- { 0xa0,0x20,0xa8,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...1...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa0,0x20,0xa8,0x28 }, /* ...1...1...0...0 */
- { 0xa0,0x20,0xa8,0x28 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...1...0...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa0,0x20,0xa8,0x28 }, /* ...1...1...1...0 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 } /* ...1...1...1...1 */
- };
-
- DRIVER_INIT_CALL(bank00);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
DRIVER_INIT_MEMBER(system1_state,blockgal)
{
@@ -5599,47 +5214,10 @@ DRIVER_INIT_MEMBER(system1_state,blockgal)
mc8123_decode(m_maincpu_region->base(), m_decrypted_opcodes, memregion("key")->base(), 0x8000);
}
-DRIVER_INIT_MEMBER(system1_state,sega315_3135)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...1...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...0 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...1 */
- { 0xa0,0x80,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...1...0 */
- { 0x88,0x80,0x08,0x00 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...1 */
- { 0xa0,0x20,0xa8,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...0 */
- { 0xa0,0x20,0xa8,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...1 */
- { 0xa0,0x20,0xa8,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...1...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa0,0x20,0xa8,0x28 }, /* ...1...1...0...0 */
- { 0xa0,0x20,0xa8,0x28 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...1...0...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa0,0x20,0xa8,0x28 }, /* ...1...1...1...0 */
- { 0x28,0x08,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 } /* ...1...1...1...1 */
- };
- DRIVER_INIT_CALL(bank44);
- sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-DRIVER_INIT_MEMBER(system1_state,gardia)
-{
- // 317-0006
- DRIVER_INIT_CALL(bank44);
- sega_decode_317(m_maincpu_region->base(), m_decrypted_opcodes, 2);
-}
-DRIVER_INIT_MEMBER(system1_state,gardiab)
-{
- // 317-0007
- DRIVER_INIT_CALL(bank44);
- sega_decode_317(m_maincpu_region->base(), m_decrypted_opcodes, 3);
-}
+
DRIVER_INIT_MEMBER(system1_state,wbml)
{
@@ -5773,90 +5351,91 @@ DRIVER_INIT_MEMBER(system1_state,shtngmst)
*************************************/
/* PPI-based System 1 */
-GAME( 1983, starjack, 0, sys1ppis, starjack, system1_state, bank00, ROT270, "Sega", "Star Jacker (Sega)", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, starjacks, starjack, sys1ppis, starjacks, system1_state, bank00, ROT270, "Sega (Stern Electronics license)", "Star Jacker (Stern Electronics)", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, upndown, 0, sys1ppix, upndown, system1_state, sega315_5098, ROT270, "Sega", "Up'n Down (315-5030)", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, upndownu, upndown, sys1ppi, upndown, system1_state, bank00, ROT270, "Sega", "Up'n Down (not encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, regulus, 0, sys1ppix, regulus, system1_state, sega315_5033, ROT270, "Sega", "Regulus (315-5033, Rev A.)", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, reguluso, regulus, sys1ppix, reguluso, system1_state, sega315_5033, ROT270, "Sega", "Regulus (315-5033)", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, regulusu, regulus, sys1ppi, regulus, system1_state, bank00, ROT270, "Sega", "Regulus (not encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, mrviking, 0, sys1ppisx, mrviking, system1_state, sega315_5041, ROT270, "Sega", "Mister Viking (315-5041)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, mrvikingj, mrviking, sys1ppisx, mrvikingj, system1_state, sega315_5041, ROT270, "Sega", "Mister Viking (315-5041, Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, swat, 0, sys1ppix, swat, system1_state, sega315_5048, ROT270, "Coreland / Sega", "SWAT (315-5048)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, flickyo, flicky, sys1ppix, flicky, system1_state, sega315_5051, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, flickys1, flicky, sys1ppix, flickys1, system1_state, sega315_5051, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, wmatch, 0, sys1ppisx, wmatch, system1_state, sega315_5064, ROT270, "Sega", "Water Match (315-5064)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, bullfgt, 0, sys1ppix, bullfgt, system1_state, sega315_5065, ROT0, "Coreland / Sega", "Bullfight (315-5065)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, nprinces, seganinj, sys1ppix, seganinj, system1_state, sega315_5051, ROT0, "bootleg?", "Ninja Princess (315-5051, 64k Ver. bootleg?)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, nprincesu, seganinj, sys1ppi, seganinj, system1_state, bank00, ROT0, "Sega", "Ninja Princess (64k Ver. not encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, wboy2, wboy, sys1ppix, wboy, system1_state, sega315_5178, ROT0, "Escape (Sega license)", "Wonder Boy (set 2, 315-5178)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, wboy2u, wboy, sys1ppi, wboy, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy (set 2, not encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, wbdeluxe, wboy, sys1ppi, wbdeluxe, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy Deluxe", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, nob, 0, nobm, nob, system1_state, nob, ROT270, "Coreland / Data East Corporation", "Noboranka (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, nobb, nob, nob, nob, system1_state, nobb, ROT270, "bootleg (Game Electronics)", "Noboranka (Japan, bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, starjack, 0, sys1ppis, starjack, system1_state, bank00, ROT270, "Sega", "Star Jacker (Sega)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, starjacks, starjack, sys1ppis, starjacks, system1_state, bank00, ROT270, "Sega (Stern Electronics license)", "Star Jacker (Stern Electronics)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, upndown, 0, sys1ppix_315_5098, upndown, system1_state, bank00, ROT270, "Sega", "Up'n Down (315-5030)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, upndownu, upndown, sys1ppi, upndown, system1_state, bank00, ROT270, "Sega", "Up'n Down (not encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, regulus, 0, sys1ppix_315_5033, regulus, system1_state, bank00, ROT270, "Sega", "Regulus (315-5033, Rev A.)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, reguluso, regulus, sys1ppix_315_5033, reguluso, system1_state, bank00, ROT270, "Sega", "Regulus (315-5033)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, regulusu, regulus, sys1ppi, regulus, system1_state, bank00, ROT270, "Sega", "Regulus (not encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, mrviking, 0, sys1ppisx_315_5041,mrviking, system1_state, bank00, ROT270, "Sega", "Mister Viking (315-5041)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, mrvikingj, mrviking, sys1ppisx_315_5041,mrvikingj, system1_state, bank00, ROT270, "Sega", "Mister Viking (315-5041, Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, swat, 0, sys1ppix_315_5048, swat, system1_state, bank00, ROT270, "Coreland / Sega", "SWAT (315-5048)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, flickyo, flicky, sys1ppix_315_5051, flicky, system1_state, bank00, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, flickys1, flicky, sys1ppix_315_5051, flickys1, system1_state, bank00, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, wmatch, 0, sys1ppisx_315_5064,wmatch, system1_state, bank00, ROT270, "Sega", "Water Match (315-5064)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, bullfgt, 0, sys1ppix_315_5065, bullfgt, system1_state, bank00, ROT0, "Coreland / Sega", "Bullfight (315-5065)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, nprinces, seganinj, sys1ppix_315_5051, seganinj, system1_state, bank00, ROT0, "bootleg?", "Ninja Princess (315-5051, 64k Ver. bootleg?)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, nprincesu, seganinj, sys1ppi, seganinj, system1_state, bank00, ROT0, "Sega", "Ninja Princess (64k Ver. not encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, wboy2, wboy, sys1ppix_315_5178, wboy, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy (set 2, 315-5178)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, wboy2u, wboy, sys1ppi, wboy, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy (set 2, not encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, wbdeluxe, wboy, sys1ppi, wbdeluxe, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy Deluxe", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, nob, 0, nobm, nob, system1_state, nob, ROT270, "Coreland / Data East Corporation", "Noboranka (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, nobb, nob, nob, nob, system1_state, nobb, ROT270, "bootleg (Game Electronics)", "Noboranka (Japan, bootleg)", MACHINE_SUPPORTS_SAVE )
/* PIO-based System 1 */
-GAME( 1984, flicky, 0, sys1piox, flicky, system1_state, sega315_5051, ROT0, "Sega", "Flicky (128k Version, System 2, 315-5051)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, flickys2, flicky, sys1pio, flickys2, system1_state, bank00, ROT0, "Sega", "Flicky (128k Version, System 2, not encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, thetogyu, bullfgt, sys1piox, bullfgt, system1_state, sega315_5065, ROT0, "Coreland / Sega", "The Togyu (315-5065, Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, spatter, 0, sys1piosx, spatter, system1_state, sega315_spat, ROT0, "Sega", "Spatter (315-xxxx)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, spattera, spatter, sys1piosx, spatter, system1_state, sega315_5099, ROT0, "Sega", "Spatter (315-5099)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, ssanchan, spatter, sys1piosx, spatter, system1_state, sega315_spat, ROT0, "Sega", "Sanrin San Chan (Japan, 315-xxxx)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, pitfall2, 0, sys1piox, pitfall2, system1_state, sega315_5093, ROT0, "Sega", "Pitfall II (315-5093)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, pitfall2a, pitfall2, sys1piox, pitfall2, system1_state, sega315_5093, ROT0, "Sega", "Pitfall II (315-5093, Flicky Conversion)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, pitfall2u, pitfall2, sys1pio, pitfall2u, system1_state, bank00, ROT0, "Sega", "Pitfall II (not encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, seganinj, 0, sys1piox, seganinj, system1_state, sega315_5102, ROT0, "Sega", "Sega Ninja (315-5102)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, seganinju, seganinj, sys1pio, seganinj, system1_state, bank00, ROT0, "Sega", "Sega Ninja (not encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, seganinja, seganinj, sys1piox, seganinj, system1_state, sega315_5133, ROT0, "Sega", "Sega Ninja (315-5113)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // needs decrypting
-GAME( 1985, ninja, seganinj, sys1piox, seganinj, system1_state, sega315_5102, ROT0, "Sega", "Ninja (315-5102)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, nprinceso, seganinj, sys1piox, seganinj, system1_state, sega315_5098, ROT0, "Sega", "Ninja Princess (315-5098, 128k Ver.)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, nprincesb, seganinj, sys1piox, seganinj, system1_state, sega315_5051, ROT0, "bootleg?", "Ninja Princess (315-5051?, 128k Ver. bootleg?)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, imsorry, 0, sys1piox, imsorry, system1_state, sega315_5110, ROT0, "Coreland / Sega", "I'm Sorry (315-5110, US)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, imsorryj, imsorry, sys1piox, imsorry, system1_state, sega315_5110, ROT0, "Coreland / Sega", "Gonbee no I'm Sorry (315-5110, Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, teddybb, 0, sys1piox, teddybb, system1_state, sega315_5155, ROT0, "Sega", "TeddyBoy Blues (315-5115, New Ver.)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, teddybbo, teddybb, sys1piox, teddybb, system1_state, sega315_5155, ROT0, "Sega", "TeddyBoy Blues (315-5115, Old Ver.)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, teddybbobl, teddybb, sys1piox, teddybb, system1_state, sega315_5155, ROT0, "bootleg", "TeddyBoy Blues (Old Ver. bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, myhero, 0, sys1pio, myhero, system1_state, bank00, ROT0, "Coreland / Sega", "My Hero (US, not encrypted)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, sscandal, myhero, sys1piox, myhero, system1_state, sega315_5132, ROT0, "Coreland / Sega", "Seishun Scandal (315-5132, Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, myherobl, myhero, sys1piox, myhero, system1_state, sega315_5132, ROT0, "bootleg", "My Hero (bootleg, 315-5132 encryption)", MACHINE_SUPPORTS_SAVE ) // cloned 315-5132 encryption? might be a direct copy of an undumped original set
-GAME( 1985, myherok, myhero, sys1piox, myhero, system1_state, myherok, ROT0, "Coreland / Sega", "My Hero (Korea)", MACHINE_SUPPORTS_SAVE ) // possible bootleg, has extra encryption
-GAME( 1985, 4dwarrio, 0, sys1piox, 4dwarrio, system1_state, sega315_5162, ROT0, "Coreland / Sega", "4-D Warriors (315-5162)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, raflesia, 0, sys1piox, raflesia, system1_state, sega315_5162, ROT270, "Coreland / Sega", "Rafflesia (315-5162)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, wboy, 0, sys1piox, wboy, system1_state, sega315_5177, ROT0, "Escape (Sega license)", "Wonder Boy (set 1, 315-5177)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, wboyo, wboy, sys1piox, wboy, system1_state, sega315_5135, ROT0, "Escape (Sega license)", "Wonder Boy (set 1, 315-5135)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, wboy3, wboy, sys1piox, wboy3, system1_state, sega315_5135, ROT0, "Escape (Sega license)", "Wonder Boy (set 3, 315-5135)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, wboy4, wboy, sys1piox, wboy, system1_state, sega315_5162, ROT0, "Escape (Sega license)", "Wonder Boy (315-5162, 4-D Warriors Conversion)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, wboyu, wboy, sys1pio, wboyu, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy (prototype?)", MACHINE_SUPPORTS_SAVE ) // appears to be a very early / unfinished version.
-GAME( 1986, wboy5, wboy, sys1piox, wboy3, system1_state, sega315_5135, ROT0, "bootleg", "Wonder Boy (set 5, bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, wboyub, wboy, sys1piox, wboy, system1_state, sega315_5135, ROT0, "bootleg", "Wonder Boy (US bootleg)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
-GAME( 1987, blockgal, 0, sys1piox, blockgal, system1_state, blockgal, ROT90, "Sega / Vic Tokai","Block Gal (MC-8123B, 317-0029)", MACHINE_SUPPORTS_SAVE)
+GAME( 1984, flicky, 0, sys1piox_315_5051, flicky, system1_state, bank00, ROT0, "Sega", "Flicky (128k Version, System 2, 315-5051)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, flickys2, flicky, sys1pio, flickys2, system1_state, bank00, ROT0, "Sega", "Flicky (128k Version, System 2, not encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, thetogyu, bullfgt, sys1piox_315_5065, bullfgt, system1_state, bank00, ROT0, "Coreland / Sega", "The Togyu (315-5065, Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, spatter, 0, sys1piosx_315_spat,spatter, system1_state, bank00, ROT0, "Sega", "Spatter (315-xxxx)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, spattera, spatter, sys1piosx_315_5099,spatter, system1_state, bank00, ROT0, "Sega", "Spatter (315-5099)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, ssanchan, spatter, sys1piosx_315_spat,spatter, system1_state, bank00, ROT0, "Sega", "Sanrin San Chan (Japan, 315-xxxx)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, pitfall2, 0, sys1piox_315_5093, pitfall2, system1_state, bank00, ROT0, "Sega", "Pitfall II (315-5093)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, pitfall2a, pitfall2, sys1piox_315_5093, pitfall2, system1_state, bank00, ROT0, "Sega", "Pitfall II (315-5093, Flicky Conversion)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, pitfall2u, pitfall2, sys1pio, pitfall2u, system1_state, bank00, ROT0, "Sega", "Pitfall II (not encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, seganinj, 0, sys1piox_315_5102, seganinj, system1_state, bank00, ROT0, "Sega", "Sega Ninja (315-5102)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, seganinju, seganinj, sys1pio, seganinj, system1_state, bank00, ROT0, "Sega", "Sega Ninja (not encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, seganinja, seganinj, sys1piox_315_5133, seganinj, system1_state, bank00, ROT0, "Sega", "Sega Ninja (315-5113)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // needs decrypting
+GAME( 1985, ninja, seganinj, sys1piox_315_5102, seganinj, system1_state, bank00, ROT0, "Sega", "Ninja (315-5102)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, nprinceso, seganinj, sys1piox_315_5098, seganinj, system1_state, bank00, ROT0, "Sega", "Ninja Princess (315-5098, 128k Ver.)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, nprincesb, seganinj, sys1piox_315_5051, seganinj, system1_state, bank00, ROT0, "bootleg?", "Ninja Princess (315-5051?, 128k Ver. bootleg?)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, imsorry, 0, sys1piox_315_5110, imsorry, system1_state, bank00, ROT0, "Coreland / Sega", "I'm Sorry (315-5110, US)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, imsorryj, imsorry, sys1piox_315_5110, imsorry, system1_state, bank00, ROT0, "Coreland / Sega", "Gonbee no I'm Sorry (315-5110, Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, teddybb, 0, sys1piox_315_5155, teddybb, system1_state, bank00, ROT0, "Sega", "TeddyBoy Blues (315-5115, New Ver.)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, teddybbo, teddybb, sys1piox_315_5155, teddybb, system1_state, bank00, ROT0, "Sega", "TeddyBoy Blues (315-5115, Old Ver.)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, teddybbobl, teddybb, sys1piox_315_5155, teddybb, system1_state, bank00, ROT0, "bootleg", "TeddyBoy Blues (Old Ver. bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, myhero, 0, sys1pio, myhero, system1_state, bank00, ROT0, "Coreland / Sega", "My Hero (US, not encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, sscandal, myhero, sys1piox_315_5132, myhero, system1_state, bank00, ROT0, "Coreland / Sega", "Seishun Scandal (315-5132, Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, myherobl, myhero, sys1piox_315_5132, myhero, system1_state, bank00, ROT0, "bootleg", "My Hero (bootleg, 315-5132 encryption)", MACHINE_SUPPORTS_SAVE ) // cloned 315-5132 encryption? might be a direct copy of an undumped original set
+GAME( 1985, myherok, myhero, sys1piox_315_5132, myhero, system1_state, myherok, ROT0, "Coreland / Sega", "My Hero (Korea)", MACHINE_SUPPORTS_SAVE ) // possible bootleg, has extra encryption
+GAME( 1985, 4dwarrio, 0, sys1piox_315_5162, 4dwarrio, system1_state, bank00, ROT0, "Coreland / Sega", "4-D Warriors (315-5162)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, raflesia, 0, sys1piox_315_5162, raflesia, system1_state, bank00, ROT270, "Coreland / Sega", "Rafflesia (315-5162)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, wboy, 0, sys1piox_315_5177, wboy, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy (set 1, 315-5177)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, wboyo, wboy, sys1piox_315_5135, wboy, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy (set 2, 315-5135)", MACHINE_SUPPORTS_SAVE ) // aka 317-0003
+GAME( 1986, wboy3, wboy, sys1piox_315_5135, wboy3, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy (set 3, 315-5135)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, wboy4, wboy, sys1piox_315_5162, wboy, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy (315-5162, 4-D Warriors Conversion)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, wboyu, wboy, sys1pio, wboyu, system1_state, bank00, ROT0, "Escape (Sega license)", "Wonder Boy (prototype?)", MACHINE_SUPPORTS_SAVE ) // appears to be a very early / unfinished version.
+GAME( 1986, wboy5, wboy, sys1piox_315_5135, wboy3, system1_state, bank00, ROT0, "bootleg", "Wonder Boy (set 5, bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, wboyub, wboy, sys1piox_315_5177, wboy, system1_state, bank00, ROT0, "bootleg", "Wonder Boy (US bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, blockgal, 0, sys1piox, blockgal, system1_state, blockgal, ROT90, "Sega / Vic Tokai","Block Gal (MC-8123B, 317-0029)", MACHINE_SUPPORTS_SAVE)
/* PIO-based System 1 with ROM banking */
-GAME( 1985, hvymetal, 0, sys1piox, hvymetal, system1_state, sega315_3135, ROT0, "Sega", "Heavy Metal (315-5135)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, gardia, 0, sys1piox, gardia, system1_state, gardia, ROT270, "Coreland / Sega", "Gardia (317-0006)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE)
-GAME( 1986, brain, 0, sys1pio, brain, system1_state, bank44, ROT0, "Coreland / Sega", "Brain", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, hvymetal, 0, sys1piox_315_5135, hvymetal, system1_state, bank44, ROT0, "Sega", "Heavy Metal (315-5135)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, gardia, 0, sys1piox_317_0006, gardia, system1_state, bank44, ROT270, "Coreland / Sega", "Gardia (317-0006)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE)
+GAME( 1986, brain, 0, sys1pio, brain, system1_state, bank44, ROT0, "Coreland / Sega", "Brain", MACHINE_SUPPORTS_SAVE )
/* System 2 */
-GAME( 1985, choplift, 0, sys2rowm, choplift, system1_state, choplift, ROT0, "Sega (licensed from Dan Gorlin)", "Choplifter (8751 315-5151)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, chopliftu, choplift, sys2row, choplift, system1_state, bank0c, ROT0, "Sega (licensed from Dan Gorlin)", "Choplifter (unprotected)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, chopliftbl, choplift, sys2row, choplift, system1_state, bank0c, ROT0, "bootleg", "Choplifter (bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, shtngmst, 0, sys2m, shtngmst, system1_state, shtngmst, ROT0, "Sega", "Shooting Master (8751 315-5159)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
-GAME( 1985, shtngmste, shtngmst, sys2m, shtngmst, system1_state, shtngmst, ROT0, "Sega / EVG", "Shooting Master (EVG, 8751 315-5159a)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, gardiab, gardia, sys2x, gardia, system1_state, gardiab, ROT270, "bootleg", "Gardia (317-0007?, bootleg)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1986, gardiaj, gardia, sys2x, gardia, system1_state, gardia, ROT270, "Coreland / Sega", "Gardia (Japan, 317-0006)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1986, wboysys2, wboy, sys2x, wboysys2, system1_state, sega315_5177_s2, ROT0, "Escape (Sega license)", "Wonder Boy (system 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, tokisens, 0, sys2, tokisens, system1_state, bank0c, ROT90, "Sega", "Toki no Senshi - Chrono Soldier", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, wbml, 0, sys2xb, wbml, system1_state, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan New Ver., MC-8123, 317-0043)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, wbmljo, wbml, sys2xb, wbml, system1_state, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan Old Ver., MC-8123, 317-0043)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, wbmljb, wbml, sys2xb, wbml, system1_state, bootsys2, ROT0, "bootleg", "Wonder Boy in Monster Land (Japan bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, wbmlb, wbml, sys2xb, wbml, system1_state, bootsys2, ROT0, "bootleg", "Wonder Boy in Monster Land (English bootleg set 1)", MACHINE_SUPPORTS_SAVE)
-GAME( 1987, wbmlbg, wbml, sys2xb, wbml, system1_state, bootsys2, ROT0, "bootleg (Galaxy Electronics)", "Wonder Boy in Monster Land (English bootleg set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, wbmlbge, wbml, sys2xb, wbml, system1_state, bootsys2, ROT0, "bootleg (Gecas)", "Wonder Boy in Monster Land (English bootleg set 3)", MACHINE_SUPPORTS_SAVE )
-GAME( 2009, wbmlvc, wbml, sys2xb, wbml, system1_state, bootsys2, ROT0, "Sega", "Wonder Boy in Monster Land (English, Virtual Console)", MACHINE_SUPPORTS_SAVE )
-GAME( 2009, wbmlvcd, wbml, sys2xb, wbml, system1_state, bootsys2d, ROT0, "bootleg (mpatou)", "Wonder Boy in Monster Land (decrypted bootleg of English, Virtual Console release)", MACHINE_SUPPORTS_SAVE ) // fully decrypted version
-GAME( 1987, wbmld, wbml, sys2xb, wbml, system1_state, bootsys2d, ROT0, "bootleg (mpatou)", "Wonder Boy in Monster Land (decrypted bootleg of Japan New Ver., MC-8123, 317-0043)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, wbmljod, wbml, sys2xb, wbml, system1_state, bootsys2d, ROT0, "bootleg (mpatou)", "Wonder Boy in Monster Land (decrypted bootleg of Japan Old Ver., MC-8123, 317-0043)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, dakkochn, 0, sys2xb, dakkochn, system1_state, dakkochn, ROT0, "White Board", "DakkoChan House (MC-8123B, 317-5014)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, blockgalb, blockgal, sys2x, blockgal, system1_state, bootleg, ROT90, "bootleg", "Block Gal (bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, ufosensi, 0, sys2rowxb, ufosensi, system1_state, ufosensi, ROT0, "Sega", "Ufo Senshi Yohko Chan (MC-8123, 317-0064)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, ufosensib, ufosensi, sys2rowxb, ufosensi, system1_state, bootsys2, ROT0, "bootleg", "Ufo Senshi Yohko Chan (bootleg, not encrypted)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, choplift, 0, sys2rowm, choplift, system1_state, choplift, ROT0, "Sega (licensed from Dan Gorlin)", "Choplifter (8751 315-5151)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, chopliftu, choplift, sys2row, choplift, system1_state, bank0c, ROT0, "Sega (licensed from Dan Gorlin)", "Choplifter (unprotected)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, chopliftbl, choplift, sys2row, choplift, system1_state, bank0c, ROT0, "bootleg", "Choplifter (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, shtngmst, 0, sys2m, shtngmst, system1_state, shtngmst, ROT0, "Sega", "Shooting Master (8751 315-5159)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+GAME( 1985, shtngmste, shtngmst, sys2m, shtngmst, system1_state, shtngmst, ROT0, "Sega / EVG", "Shooting Master (EVG, 8751 315-5159a)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, gardiab, gardia, sys2_317_0007, gardia, system1_state, bank44, ROT270, "bootleg", "Gardia (317-0007?, bootleg)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1986, gardiaj, gardia, sys2_317_0006, gardia, system1_state, bank44, ROT270, "Coreland / Sega", "Gardia (Japan, 317-0006)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1986, wboysys2, wboy, sys2_315_5177, wboysys2, system1_state, bank0c, ROT0, "Escape (Sega license)", "Wonder Boy (system 2, set 1, 315-5177)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, wboysys2a, wboy, sys2_315_5176, wboysys2, system1_state, bank0c, ROT0, "Escape (Sega license)", "Wonder Boy (system 2, set 2, 315-5176)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+GAME( 1987, tokisens, 0, sys2, tokisens, system1_state, bank0c, ROT90, "Sega", "Toki no Senshi - Chrono Soldier", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, wbml, 0, sys2xb, wbml, system1_state, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan New Ver., MC-8123, 317-0043)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, wbmljo, wbml, sys2xb, wbml, system1_state, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan Old Ver., MC-8123, 317-0043)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, wbmljb, wbml, sys2xb, wbml, system1_state, bootsys2, ROT0, "bootleg", "Wonder Boy in Monster Land (Japan bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, wbmlb, wbml, sys2xb, wbml, system1_state, bootsys2, ROT0, "bootleg", "Wonder Boy in Monster Land (English bootleg set 1)", MACHINE_SUPPORTS_SAVE)
+GAME( 1987, wbmlbg, wbml, sys2xb, wbml, system1_state, bootsys2, ROT0, "bootleg (Galaxy Electronics)", "Wonder Boy in Monster Land (English bootleg set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, wbmlbge, wbml, sys2xb, wbml, system1_state, bootsys2, ROT0, "bootleg (Gecas)", "Wonder Boy in Monster Land (English bootleg set 3)", MACHINE_SUPPORTS_SAVE )
+GAME( 2009, wbmlvc, wbml, sys2xb, wbml, system1_state, bootsys2, ROT0, "Sega", "Wonder Boy in Monster Land (English, Virtual Console)", MACHINE_SUPPORTS_SAVE )
+GAME( 2009, wbmlvcd, wbml, sys2xb, wbml, system1_state, bootsys2d, ROT0, "bootleg (mpatou)", "Wonder Boy in Monster Land (decrypted bootleg of English, Virtual Console release)", MACHINE_SUPPORTS_SAVE ) // fully decrypted version
+GAME( 1987, wbmld, wbml, sys2xb, wbml, system1_state, bootsys2d, ROT0, "bootleg (mpatou)", "Wonder Boy in Monster Land (decrypted bootleg of Japan New Ver., MC-8123, 317-0043)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, wbmljod, wbml, sys2xb, wbml, system1_state, bootsys2d, ROT0, "bootleg (mpatou)", "Wonder Boy in Monster Land (decrypted bootleg of Japan Old Ver., MC-8123, 317-0043)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, dakkochn, 0, sys2xb, dakkochn, system1_state, dakkochn, ROT0, "White Board", "DakkoChan House (MC-8123B, 317-5014)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, blockgalb, blockgal, sys2x, blockgal, system1_state, bootleg, ROT90, "bootleg", "Block Gal (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, ufosensi, 0, sys2rowxb, ufosensi, system1_state, ufosensi, ROT0, "Sega", "Ufo Senshi Yohko Chan (MC-8123, 317-0064)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, ufosensib, ufosensi, sys2rowxb, ufosensi, system1_state, bootsys2, ROT0, "bootleg", "Ufo Senshi Yohko Chan (bootleg, not encrypted)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/taito_f2.cpp b/src/mame/drivers/taito_f2.cpp
index 05a3b11fecc..d323e47ac41 100644
--- a/src/mame/drivers/taito_f2.cpp
+++ b/src/mame/drivers/taito_f2.cpp
@@ -1612,7 +1612,14 @@ static INPUT_PORTS_START( ssi )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
-static INPUT_PORTS_START( majest12 )
+static INPUT_PORTS_START( majest12u )
+ PORT_INCLUDE(ssi)
+
+ PORT_MODIFY("DSWA")
+ TAITO_COINAGE_US_LOC(SW1)
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( majest12j )
PORT_INCLUDE(ssi)
PORT_MODIFY("DSWA")
@@ -3232,7 +3239,6 @@ static MACHINE_CONFIG_DERIVED( footchmp, taito_f2 )
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@@ -3266,7 +3272,6 @@ static MACHINE_CONFIG_DERIVED( hthero, taito_f2 )
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MACHINE_CONFIG_END
@@ -3433,7 +3438,6 @@ static MACHINE_CONFIG_DERIVED( metalb, taito_f2_tc0510nio )
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_COL_BASE(4096)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@@ -3501,7 +3505,6 @@ static MACHINE_CONFIG_DERIVED( deadconx, taito_f2 )
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@@ -3526,7 +3529,6 @@ static MACHINE_CONFIG_DERIVED( deadconxj, taito_f2 )
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@@ -4427,7 +4429,28 @@ ROM_START( ssia )
/* no Delta-T samples */
ROM_END
-ROM_START( majest12 )
+ROM_START( majest12u )
+ ROM_REGION( 0x80000, "maincpu", 0 ) /* 512k for 68000 code */
+ ROM_LOAD16_BYTE( "c64_12.ic9", 0x00000, 0x40000, CRC(d5716d7e) SHA1(3a18d8ef1d16380946714910245b00bbcec39e3d) )
+ ROM_LOAD16_BYTE( "c64_14.ic8", 0x00001, 0x40000, CRC(eee4ed8a) SHA1(ad50dc12ede0d327ef9ded5ffd9dbd6e865ebcfc) )
+
+ ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
+ /* empty! */
+
+ ROM_REGION( 0x100000, "gfx2", 0 ) /* OBJ */
+ ROM_LOAD( "c64-01.1", 0x000000, 0x100000, CRC(a1b4f486) SHA1(bdd6bf144e50fe7b1d4cf4504471a689669415a4) )
+
+ ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c64-09.13", 0x00000, 0x04000, CRC(88d7f65c) SHA1(d6383bf8fd035772fa3c57b26b727eefe1aadd93) )
+ ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+
+ ROM_REGION( 0x20000, "ymsnd", 0 ) /* ADPCM samples */
+ ROM_LOAD( "c64-02.2", 0x00000, 0x20000, CRC(3cb0b907) SHA1(7cbe437fe584575a2f26a582095fd49665c7003e) )
+
+ /* no Delta-T samples */
+ROM_END
+
+ROM_START( majest12j )
ROM_REGION( 0x80000, "maincpu", 0 ) /* 512k for 68000 code */
ROM_LOAD16_BYTE( "c64-07.10", 0x00000, 0x20000, CRC(f29ed5c9) SHA1(62283af1c08457db54057ee59a95fb7a3797b897) )
ROM_LOAD16_BYTE( "c64-06.4", 0x40000, 0x20000, CRC(18dc71ac) SHA1(cb9c0b330ae98e20269f18cdb543feb294647245) )
@@ -5583,7 +5606,8 @@ GAME( 1990, quizhq, 0, quizhq, quizhq, driver_device, 0,
GAME( 1990, ssi, 0, ssi, ssi, driver_device, 0, ROT270, "Taito Corporation Japan", "Super Space Invaders '91 (World, Rev 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1990, ssia, ssi, ssi, ssi, driver_device, 0, ROT270, "Taito Corporation Japan", "Super Space Invaders '91 (World)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, majest12, ssi, ssi, majest12, driver_device, 0, ROT270, "Taito Corporation", "Majestic Twelve - The Space Invaders Part IV (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, majest12u, ssi, ssi, majest12u, driver_device, 0, ROT270, "Taito America Corporation", "Majestic Twelve - The Space Invaders Part IV (US)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, majest12j, ssi, ssi, majest12j, driver_device, 0, ROT270, "Taito Corporation", "Majestic Twelve - The Space Invaders Part IV (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1990, gunfront, 0, gunfront, gunfront, driver_device, 0, ROT270, "Taito Corporation Japan", "Gun & Frontier (World)", MACHINE_SUPPORTS_SAVE )
GAME( 1990, gunfrontj, gunfront, gunfront, gunfrontj, driver_device, 0, ROT270, "Taito Corporation", "Gun Frontier (Japan)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/taito_h.cpp b/src/mame/drivers/taito_h.cpp
index c2714413025..900940597a2 100644
--- a/src/mame/drivers/taito_h.cpp
+++ b/src/mame/drivers/taito_h.cpp
@@ -676,7 +676,6 @@ static MACHINE_CONFIG_START( syvalion, taitoh_state )
MCFG_TC0080VCO_OFFSETS(1, 1)
MCFG_TC0080VCO_BGFLIP_OFFS(-2)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
- MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -732,7 +731,6 @@ static MACHINE_CONFIG_START( recordbr, taitoh_state )
MCFG_TC0080VCO_OFFSETS(1, 1)
MCFG_TC0080VCO_BGFLIP_OFFS(-2)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
- MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -796,7 +794,6 @@ static MACHINE_CONFIG_START( dleague, taitoh_state )
MCFG_TC0080VCO_OFFSETS(1, 1)
MCFG_TC0080VCO_BGFLIP_OFFS(-2)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
- MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/taito_o.cpp b/src/mame/drivers/taito_o.cpp
index 263ff71afcd..2b9761750a4 100644
--- a/src/mame/drivers/taito_o.cpp
+++ b/src/mame/drivers/taito_o.cpp
@@ -253,7 +253,6 @@ static MACHINE_CONFIG_START( parentj, taitoo_state )
MCFG_TC0080VCO_OFFSETS(1, 1)
MCFG_TC0080VCO_BGFLIP_OFFS(-2)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
- MCFG_TC0080VCO_PALETTE("palette")
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/taito_x.cpp b/src/mame/drivers/taito_x.cpp
index 9d068780e0b..ed18529079e 100644
--- a/src/mame/drivers/taito_x.cpp
+++ b/src/mame/drivers/taito_x.cpp
@@ -809,7 +809,6 @@ static MACHINE_CONFIG_START( superman, taitox_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -857,7 +856,6 @@ static MACHINE_CONFIG_START( daisenpu, taitox_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -903,7 +901,6 @@ static MACHINE_CONFIG_START( gigandes, taitox_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -951,7 +948,6 @@ static MACHINE_CONFIG_START( ballbros, taitox_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/taito_z.cpp b/src/mame/drivers/taito_z.cpp
index 16fbc1beb8c..45d69582597 100644
--- a/src/mame/drivers/taito_z.cpp
+++ b/src/mame/drivers/taito_z.cpp
@@ -3641,7 +3641,6 @@ static MACHINE_CONFIG_START( dblaxle, taitoz_state )
MCFG_TC0480SCP_TX_REGION(2)
MCFG_TC0480SCP_OFFSETS(0x1f, 0x08)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0)
@@ -3717,7 +3716,6 @@ static MACHINE_CONFIG_START( racingb, taitoz_state )
MCFG_TC0480SCP_TX_REGION(2)
MCFG_TC0480SCP_OFFSETS(0x1f, 0x08)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0)
diff --git a/src/mame/drivers/taitoair.cpp b/src/mame/drivers/taitoair.cpp
index 95e1fcdcec9..3315310901b 100644
--- a/src/mame/drivers/taitoair.cpp
+++ b/src/mame/drivers/taitoair.cpp
@@ -767,7 +767,6 @@ static MACHINE_CONFIG_START( airsys, taitoair_state )
MCFG_TC0080VCO_OFFSETS(1, 1)
MCFG_TC0080VCO_BGFLIP_OFFS(-2)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
- MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/taotaido.cpp b/src/mame/drivers/taotaido.cpp
index 5f4585f3048..f977e8beb69 100644
--- a/src/mame/drivers/taotaido.cpp
+++ b/src/mame/drivers/taotaido.cpp
@@ -387,7 +387,6 @@ static MACHINE_CONFIG_START( taotaido, taotaido_state )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( taotaido_state, tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(0)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/tasman.cpp b/src/mame/drivers/tasman.cpp
index a9c65694c9b..91159716ee7 100644
--- a/src/mame/drivers/tasman.cpp
+++ b/src/mame/drivers/tasman.cpp
@@ -22,20 +22,44 @@
#include "emu.h"
#include "video/konami_helper.h"
-#include "includes/konamigx.h"
#include "cpu/m68000/m68000.h"
+#include "machine/k053252.h"
+#include "video/k053246_k053247_k055673.h"
+#include "video/k054156_k054157_k056832.h"
+#include "video/k055555.h"
#include "machine/eepromser.h"
#define CUSTOM_DRAW 1
-class kongambl_state : public konamigx_state // with everything devicified there's probably not much point in inheriting the GX state.
+class kongambl_state : public driver_device
{
public:
kongambl_state(const machine_config &mconfig, device_type type, const char *tag)
- : konamigx_state(mconfig, type, tag),
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this,"maincpu"),
+ m_k053252(*this, "k053252"),
+ m_k055673(*this, "k055673"),
+ m_k055555(*this, "k055555"),
+ m_k056832(*this, "k056832"),
+#if CUSTOM_DRAW
+ m_gfxdecode(*this, "gfxdecode"),
+#endif
+ m_screen(*this, "screen"),
+ m_palette(*this, "palette"),
m_vram(*this, "vram")
{ }
+ required_device<cpu_device> m_maincpu;
+ required_device<k053252_device> m_k053252;
+ required_device<k055673_device> m_k055673;
+ required_device<k055555_device> m_k055555;
+ required_device<k056832_device> m_k056832;
+#if CUSTOM_DRAW
+ required_device<gfxdecode_device> m_gfxdecode;
+#endif
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
optional_shared_ptr<UINT32> m_vram;
DECLARE_READ32_MEMBER(eeprom_r);
DECLARE_WRITE8_MEMBER(eeprom_w);
@@ -48,6 +72,8 @@ public:
virtual void machine_reset() override { m_irq_mask = 0; };
UINT32 screen_update_kongambl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ WRITE_LINE_MEMBER(vblank_irq_ack_w);
+ WRITE_LINE_MEMBER(hblank_irq_ack_w);
TIMER_DEVICE_CALLBACK_MEMBER(kongambl_vblank);
K056832_CB_MEMBER(tile_callback);
K053246_CB_MEMBER(sprite_callback);
@@ -576,6 +602,16 @@ static GFXDECODE_START( tasman )
GFXDECODE_END
+WRITE_LINE_MEMBER(kongambl_state::vblank_irq_ack_w)
+{
+ m_maincpu->set_input_line(1, CLEAR_LINE);
+}
+
+WRITE_LINE_MEMBER(kongambl_state::hblank_irq_ack_w)
+{
+ m_maincpu->set_input_line(2, CLEAR_LINE);
+}
+
TIMER_DEVICE_CALLBACK_MEMBER(kongambl_state::kongambl_vblank)
{
int scanline = param;
@@ -606,8 +642,8 @@ static MACHINE_CONFIG_START( kongambl, kongambl_state )
MCFG_DEVICE_ADD("k053252", K053252, 25000000)
MCFG_K053252_OFFSETS(0, 16) // TBD
- MCFG_K053252_INT1_ACK_CB(WRITELINE(konamigx_state, vblank_irq_ack_w))
- MCFG_K053252_INT2_ACK_CB(WRITELINE(konamigx_state, hblank_irq_ack_w))
+ MCFG_K053252_INT1_ACK_CB(WRITELINE(kongambl_state, vblank_irq_ack_w))
+ MCFG_K053252_INT2_ACK_CB(WRITELINE(kongambl_state, hblank_irq_ack_w))
MCFG_VIDEO_SET_SCREEN("screen")
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@@ -626,16 +662,16 @@ static MACHINE_CONFIG_START( kongambl, kongambl_state )
MCFG_DEVICE_ADD("k055673", K055673, 0)
MCFG_K055673_CB(kongambl_state, sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 1, K055673_LAYOUT_LE2, -48+1, -23)
- MCFG_K055673_GFXDECODE("gfxdecode")
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_LE2, -48+1, -23)
MCFG_K055673_PALETTE("palette")
+#if CUSTOM_DRAW
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tasman)
+#endif
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(kongambl_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8TASMAN, 0, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8TASMAN, 0, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/thedealr.cpp b/src/mame/drivers/thedealr.cpp
index d6e9698474a..96a765dfda1 100644
--- a/src/mame/drivers/thedealr.cpp
+++ b/src/mame/drivers/thedealr.cpp
@@ -534,7 +534,6 @@ static MACHINE_CONFIG_START( thedealr, thedealr_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_MACHINE_RESET_OVERRIDE(thedealr_state,thedealr)
MCFG_MACHINE_START_OVERRIDE(thedealr_state,thedealr)
diff --git a/src/mame/drivers/thedeep.cpp b/src/mame/drivers/thedeep.cpp
index e999027842b..12e4926c632 100644
--- a/src/mame/drivers/thedeep.cpp
+++ b/src/mame/drivers/thedeep.cpp
@@ -439,9 +439,8 @@ static MACHINE_CONFIG_START( thedeep, thedeep_state )
MCFG_PALETTE_INIT_OWNER(thedeep_state, thedeep)
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 0);
+ MCFG_DECO_MXC06_GFX_REGION(0)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MCFG_DECO_MXC06_RAMSIZE(0x400)
/* sound hardware */
diff --git a/src/mame/drivers/ti99_4p.cpp b/src/mame/drivers/ti99_4p.cpp
index 0f48e57772b..4650d391c08 100644
--- a/src/mame/drivers/ti99_4p.cpp
+++ b/src/mame/drivers/ti99_4p.cpp
@@ -41,6 +41,7 @@
#include "cpu/tms9900/tms9900.h"
#include "sound/wave.h"
#include "sound/dac.h"
+#include "sound/sn76496.h"
#include "machine/tms9901.h"
#include "imagedev/cassette.h"
@@ -53,8 +54,9 @@
#define TMS9901_TAG "tms9901"
#define SGCPU_TAG "sgcpu"
-#define VERBOSE 1
-#define LOG logerror
+#define TRACE_ILLWRITE 0
+#define TRACE_READY 0
+#define TRACE_INT 0
class ti99_4p_state : public driver_device
{
@@ -63,7 +65,7 @@ public:
: driver_device(mconfig, type, tag),
m_cpu(*this, "maincpu"),
m_tms9901(*this, TMS9901_TAG),
- m_sound(*this, TISOUND_TAG),
+ m_sound(*this, TISOUNDCHIP_TAG),
m_video(*this, VIDEO_SYSTEM_TAG),
m_cassette(*this, "cassette"),
m_peribox(*this, PERIBOX_TAG),
@@ -103,13 +105,13 @@ public:
DECLARE_WRITE_LINE_MEMBER(set_tms9901_INT2_from_v9938);
- required_device<tms9900_device> m_cpu;
- required_device<tms9901_device> m_tms9901;
- required_device<ti_sound_system_device> m_sound;
- required_device<ti_exp_video_device> m_video;
- required_device<cassette_image_device> m_cassette;
- required_device<peribox_device> m_peribox;
- required_device<joyport_device> m_joyport;
+ required_device<tms9900_device> m_cpu;
+ required_device<tms9901_device> m_tms9901;
+ required_device<sn76496_base_device> m_sound;
+ required_device<ti_exp_video_device> m_video;
+ required_device<cassette_image_device> m_cassette;
+ required_device<peribox_device> m_peribox;
+ required_device<joyport_device> m_joyport;
// Pointer to ROM0
UINT16 *m_rom0;
@@ -354,7 +356,7 @@ WRITE16_MEMBER( ti99_4p_state::memwrite )
if (zone==0x0000)
{
// ROM0
- if (VERBOSE>4) LOG("sgcpu: ignoring ROM write access at %04x\n", addroff);
+ if (TRACE_ILLWRITE) logerror("Ignoring ROM write access at %04x\n", addroff);
return;
}
@@ -368,7 +370,7 @@ WRITE16_MEMBER( ti99_4p_state::memwrite )
{
if (m_internal_dsr)
{
- if (VERBOSE>4) LOG("sgcpu: ignoring DSR write access at %04x\n", addroff);
+ if (TRACE_ILLWRITE) logerror("Ignoring DSR write access at %04x\n", addroff);
return;
}
else
@@ -439,12 +441,16 @@ READ16_MEMBER( ti99_4p_state::datamux_read )
UINT8 hbyte = 0;
UINT16 addroff = (offset << 1);
+ m_peribox->memen_in(ASSERT_LINE);
+
m_peribox->readz(space, addroff+1, &m_latch, mem_mask);
m_lowbyte = m_latch;
m_peribox->readz(space, addroff, &hbyte, mem_mask);
m_highbyte = hbyte;
+ m_peribox->memen_in(CLEAR_LINE);
+
// use the latch and the currently read byte and put it on the 16bit bus
// printf("read address = %04x, value = %04x, memmask = %4x\n", addroff, (hbyte<<8) | sgcpu->latch, mem_mask);
@@ -467,11 +473,15 @@ WRITE16_MEMBER( ti99_4p_state::datamux_write )
// read more about the datamux in datamux.c
// Write to the PEB
+ m_peribox->memen_in(ASSERT_LINE);
+
m_peribox->write(space, addroff+1, data & 0xff);
// Write to the PEB
m_peribox->write(space, addroff, (data>>8) & 0xff);
+ m_peribox->memen_in(CLEAR_LINE);
+
// Insert four wait states and let CPU enter wait state
m_waitcount = 6;
console_ready_dmux(CLEAR_LINE);
@@ -684,39 +694,6 @@ WRITE_LINE_MEMBER( ti99_4p_state::cassette_output )
m_cassette->output((state!=0)? +1 : -1);
}
-/*
-// TMS9901 setup. The callback functions pass a reference to the TMS9901 as device.
-const tms9901_interface tms9901_wiring_sgcpu =
-{
- TMS9901_INT1 | TMS9901_INT2 | TMS9901_INTC, // only input pins whose state is always known
-
- // read handler
- DEVCB_DRIVER_MEMBER(ti99_4p_state, read_by_9901),
-
- { // write handlers
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, keyC0),
- DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, keyC1),
- DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, keyC2),
- DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, alphaW),
- DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, cs_motor),
- DEVCB_NULL,
- DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, audio_gate),
- DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, cassette_output),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
- },
-
- // interrupt handler
- DEVCB_DRIVER_MEMBER(ti99_4p_state, tms9901_interrupt)
-};
-
-*/
/***************************************************************************
Control lines
@@ -733,9 +710,9 @@ WRITE_LINE_MEMBER( ti99_4p_state::console_ready )
m_ready_line = state;
int combined = (m_ready_line == ASSERT_LINE && m_ready_line_dmux == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE;
- if (VERBOSE>6)
+ if (TRACE_READY)
{
- if (m_ready_prev != combined) LOG("ti99_4p: READY level = %d\n", combined);
+ if (m_ready_prev != combined) logerror("READY level = %d\n", combined);
}
m_ready_prev = combined;
m_cpu->set_ready(combined);
@@ -751,9 +728,9 @@ WRITE_LINE_MEMBER( ti99_4p_state::console_ready_dmux )
m_ready_line_dmux = state;
int combined = (m_ready_line == ASSERT_LINE && m_ready_line_dmux == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE;
- if (VERBOSE>7)
+ if (TRACE_READY)
{
- if (m_ready_prev != combined) LOG("ti99_4p: READY dmux level = %d\n", state);
+ if (m_ready_prev != combined) logerror("READY dmux level = %d\n", state);
}
m_ready_prev = combined;
m_cpu->set_ready(combined);
@@ -769,13 +746,13 @@ void ti99_4p_state::set_9901_int( int line, line_state state)
WRITE_LINE_MEMBER( ti99_4p_state::extint )
{
- if (VERBOSE>6) LOG("ti99_4p: EXTINT level = %02x\n", state);
+ if (TRACE_INT) logerror("EXTINT level = %02x\n", state);
set_9901_int(1, (line_state)state);
}
WRITE_LINE_MEMBER( ti99_4p_state::notconnected )
{
- if (VERBOSE>6) LOG("ti99_4p: Setting a not connected line ... ignored\n");
+ if (TRACE_INT) logerror("Setting a not connected line ... ignored\n");
}
/*
@@ -804,7 +781,7 @@ READ8_MEMBER( ti99_4p_state::interrupt_level )
WRITE8_MEMBER( ti99_4p_state::external_operation )
{
static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" };
- if (VERBOSE>1) LOG("External operation %s not implemented on the SGCPU board\n", extop[offset]);
+ logerror("External operation %s not implemented on the SGCPU board\n", extop[offset]);
}
/*****************************************************************************/
@@ -883,9 +860,11 @@ static MACHINE_CONFIG_START( ti99_4p_60hz, ti99_4p_state )
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(ti99_4p_state, notconnected) )
MCFG_PERIBOX_READY_HANDLER( WRITELINE(ti99_4p_state, console_ready) )
- // sound hardware
- MCFG_TI_SOUND_94624_ADD( TISOUND_TAG )
- MCFG_TI_SOUND_READY_HANDLER( WRITELINE(ti99_4p_state, console_ready) )
+ // Sound hardware
+ MCFG_SPEAKER_STANDARD_MONO("sound_out")
+ MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75)
+ MCFG_SN76496_READY_HANDLER( WRITELINE(ti99_4p_state, console_ready) )
// Cassette drives
MCFG_SPEAKER_STANDARD_MONO("cass_out")
diff --git a/src/mame/drivers/ti99_4x.cpp b/src/mame/drivers/ti99_4x.cpp
index b8fcb75b3cb..898327f92a7 100644
--- a/src/mame/drivers/ti99_4x.cpp
+++ b/src/mame/drivers/ti99_4x.cpp
@@ -48,7 +48,6 @@
#include "bus/ti99x/videowrp.h"
#include "bus/ti99x/datamux.h"
-#include "bus/ti99x/grom.h"
#include "bus/ti99x/gromport.h"
#include "bus/ti99x/joyport.h"
@@ -83,8 +82,11 @@ public:
DECLARE_MACHINE_START(ti99_4);
DECLARE_MACHINE_START(ti99_4a);
DECLARE_MACHINE_START(ti99_4qi);
+ DECLARE_MACHINE_START(ti99_4ev);
+
DECLARE_MACHINE_RESET(ti99_4);
DECLARE_MACHINE_RESET(ti99_4a);
+ DECLARE_MACHINE_RESET(ti99_4ev);
// Processor connections with the main board
DECLARE_READ8_MEMBER( cruread );
@@ -103,6 +105,9 @@ public:
DECLARE_WRITE_LINE_MEMBER( console_reset );
DECLARE_WRITE_LINE_MEMBER( notconnected );
+ // GROM clock
+ DECLARE_WRITE_LINE_MEMBER( gromclk_in );
+
// Connections with the system interface chip 9901
DECLARE_WRITE_LINE_MEMBER( extint );
DECLARE_WRITE_LINE_MEMBER( video_interrupt_in );
@@ -124,6 +129,9 @@ public:
// Interrupt triggers
DECLARE_INPUT_CHANGED_MEMBER( load_interrupt );
+ // Used by EVPC
+ void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
private:
void set_keyboard_column(int number, int data);
int m_keyboard_column;
@@ -152,6 +160,9 @@ private:
required_device<ti_video_device> m_video;
required_device<cassette_image_device> m_cassette1;
required_device<cassette_image_device> m_cassette2;
+
+ // Timer for EVPC (provided by the TMS9929A, but EVPC replaces that VDP)
+ emu_timer *m_gromclk_timer;
};
/*
@@ -177,16 +188,10 @@ enum
};
/*
- Memory map.
- Most of the work is done in the datamux (see datamux.c). We only keep ROM
- and the small 256 byte PAD RAM here because they are directly connected
- to the 16bit bus, and the wait state logic is not active during their
- accesses.
+ Memory map. All of the work is done in the datamux (see datamux.c).
*/
static ADDRESS_MAP_START(memmap, AS_PROGRAM, 16, ti99_4x_state)
ADDRESS_MAP_GLOBAL_MASK(0xffff)
- AM_RANGE(0x0000, 0x1fff) AM_ROM
- AM_RANGE(0x8000, 0x80ff) AM_MIRROR(0x0300) AM_RAM
AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE(DATAMUX_TAG, ti99_datamux_device, read, write) AM_DEVSETOFFSET(DATAMUX_TAG, ti99_datamux_device, setoffset)
ADDRESS_MAP_END
@@ -365,21 +370,6 @@ INPUT_PORTS_END
Components
******************************************************************************/
-static GROM_CONFIG(grom0_config)
-{
- false, 0, region_grom, 0x0000, 0x1800, GROMFREQ
-};
-
-static GROM_CONFIG(grom1_config)
-{
- false, 1, region_grom, 0x2000, 0x1800, GROMFREQ
-};
-
-static GROM_CONFIG(grom2_config)
-{
- false, 2, region_grom, 0x4000, 0x1800, GROMFREQ
-};
-
READ8_MEMBER( ti99_4x_state::cruread )
{
// if (TRACE_CRU) logerror("read access to CRU address %04x\n", offset << 4);
@@ -631,6 +621,7 @@ READ8_MEMBER( ti99_4x_state::interrupt_level )
WRITE_LINE_MEMBER( ti99_4x_state::clock_out )
{
m_datamux->clock_in(state);
+ m_peribox->clock_in(state);
}
/*
@@ -641,6 +632,27 @@ WRITE_LINE_MEMBER( ti99_4x_state::dbin_line )
m_datamux->dbin_in(state);
}
+/*
+ GROMCLK from VDP, propagating to datamux
+*/
+WRITE_LINE_MEMBER( ti99_4x_state::gromclk_in )
+{
+ m_datamux->gromclk_in(state);
+}
+
+/*
+ Used by the EVPC
+*/
+void ti99_4x_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+{
+ // Pulse it
+ if (m_datamux != nullptr)
+ {
+ gromclk_in(ASSERT_LINE);
+ gromclk_in(CLEAR_LINE);
+ }
+}
+
/*****************************************************************************/
/*
@@ -708,6 +720,7 @@ void ti99_4x_state::console_ready_join(int id, int state)
*/
WRITE_LINE_MEMBER( ti99_4x_state::console_ready_grom )
{
+ if (TRACE_READY) logerror("GROM ready = %d\n", state);
console_ready_join(READY_GROM, state);
}
@@ -757,52 +770,6 @@ WRITE_LINE_MEMBER( ti99_4x_state::notconnected )
if (TRACE_INTERRUPTS) logerror("ti99_4x: Setting a not connected line ... ignored\n");
}
-/*****************************************************************************/
-
-/*
- Devices attached to the databus multiplexer. We cannot solve this with
- the common address maps since the multiplexer also inserts wait states
- that we want to emulate properly. Also, devices may reside on the same
- memory locations (like GROMs) and select themselves according to some
- inner state (e.g. GROMs have an own address counter and a given address
- area).
-*/
-static const dmux_device_list_entry dmux_devices[] =
-{
- { VIDEO_SYSTEM_TAG, 0x8800, 0xfc01, 0x0400, nullptr, 0, 0 },
- { GROM0_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
- { GROM1_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
- { GROM2_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
- { TISOUND_TAG, 0x8400, 0xfc01, 0x0000, nullptr, 0, 0 },
- { GROMPORT_TAG, 0x9800, 0xfc01, 0x0400, nullptr, 0, 0 },
- { GROMPORT_TAG, 0x6000, 0xe000, 0x0000, nullptr, 0, 0 },
- { PERIBOX_TAG, 0x0000, 0x0000, 0x0000, nullptr, 0, 0 }, // Peribox needs all addresses
- { nullptr, 0, 0, 0, nullptr, 0, 0 }
-};
-
-static const dmux_device_list_entry dmux_devices_ev[] =
-{
- { VIDEO_SYSTEM_TAG, 0x8800, 0xfc01, 0x0400, nullptr, 0, 0 },
- { GROM0_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
- { GROM1_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
- { GROM2_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
- { TISOUND_TAG, 0x8400, 0xfc01, 0x0000, nullptr, 0, 0 },
- { GROMPORT_TAG, 0x9800, 0xfc01, 0x0400, nullptr, 0, 0 },
- { GROMPORT_TAG, 0x6000, 0xe000, 0x0000, nullptr, 0, 0 },
- { PERIBOX_TAG, 0x0000, 0x0000, 0x0000, nullptr, 0, 0 }, // Peribox needs all addresses
- { nullptr, 0, 0, 0, nullptr, 0, 0 }
-};
-
-static DMUX_CONFIG( datamux_conf )
-{
- dmux_devices
-};
-
-static DMUX_CONFIG( datamux_conf_ev )
-{
- dmux_devices_ev
-};
-
/******************************************************************************
Machine definitions
******************************************************************************/
@@ -852,9 +819,10 @@ static MACHINE_CONFIG_START( ti99_4, ti99_4x_state )
MCFG_TMS9901_P9_HANDLER( WRITELINE( ti99_4x_state, cassette_output) )
MCFG_TMS9901_INTLEVEL_HANDLER( WRITE8( ti99_4x_state, tms9901_interrupt) )
- MCFG_DMUX_ADD( DATAMUX_TAG, datamux_conf )
+ MCFG_DEVICE_ADD( DATAMUX_TAG, DATAMUX, 0)
MCFG_DMUX_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_dmux) )
- MCFG_TI99_GROMPORT_ADD( GROMPORT_TAG )
+
+ MCFG_GROMPORT4_ADD( GROMPORT_TAG )
MCFG_GROMPORT_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_cart) )
MCFG_GROMPORT_RESET_HANDLER( WRITELINE(ti99_4x_state, console_reset) )
@@ -867,9 +835,11 @@ static MACHINE_CONFIG_START( ti99_4, ti99_4x_state )
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(ti99_4x_state, notconnected) )
MCFG_PERIBOX_READY_HANDLER( DEVWRITELINE(DATAMUX_TAG, ti99_datamux_device, ready_line) )
- /* sound hardware */
- MCFG_TI_SOUND_94624_ADD( TISOUND_TAG )
- MCFG_TI_SOUND_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_sound) )
+ // Sound hardware
+ MCFG_SPEAKER_STANDARD_MONO("sound_out")
+ MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75)
+ MCFG_SN76496_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_sound) )
/* Cassette drives */
MCFG_SPEAKER_STANDARD_MONO("cass_out")
@@ -879,13 +849,10 @@ static MACHINE_CONFIG_START( ti99_4, ti99_4x_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25)
- /* GROM devices */
- MCFG_GROM_ADD( GROM0_TAG, grom0_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_4x_state, console_ready_grom))
- MCFG_GROM_ADD( GROM1_TAG, grom1_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_4x_state, console_ready_grom))
- MCFG_GROM_ADD( GROM2_TAG, grom2_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_4x_state, console_ready_grom))
+ // GROM devices
+ MCFG_GROM_ADD( GROM0_TAG, 0, region_grom, 0x0000, WRITELINE(ti99_4x_state, console_ready_grom))
+ MCFG_GROM_ADD( GROM1_TAG, 1, region_grom, 0x2000, WRITELINE(ti99_4x_state, console_ready_grom))
+ MCFG_GROM_ADD( GROM2_TAG, 2, region_grom, 0x4000, WRITELINE(ti99_4x_state, console_ready_grom))
// Joystick port
MCFG_TI_JOYPORT4_ADD( JOYPORT_TAG )
@@ -896,14 +863,14 @@ MACHINE_CONFIG_END
US version: 60 Hz, NTSC
*/
static MACHINE_CONFIG_DERIVED( ti99_4_60hz, ti99_4 )
- MCFG_TI_TMS991x_ADD_NTSC(VIDEO_SYSTEM_TAG, TMS9918, 0x4000, ti99_4x_state, video_interrupt_in)
+ MCFG_TI_TMS991x_ADD_NTSC(VIDEO_SYSTEM_TAG, TMS9918, 0x4000, ti99_4x_state, video_interrupt_in, gromclk_in)
MACHINE_CONFIG_END
/*
European version: 50 Hz, PAL
*/
static MACHINE_CONFIG_DERIVED( ti99_4_50hz, ti99_4 )
- MCFG_TI_TMS991x_ADD_PAL(VIDEO_SYSTEM_TAG, TMS9929, 0x4000, ti99_4x_state, video_interrupt_in)
+ MCFG_TI_TMS991x_ADD_PAL(VIDEO_SYSTEM_TAG, TMS9929, 0x4000, ti99_4x_state, video_interrupt_in, gromclk_in)
MACHINE_CONFIG_END
/**********************************************************************
@@ -951,9 +918,10 @@ static MACHINE_CONFIG_START( ti99_4a, ti99_4x_state )
MCFG_TMS9901_P9_HANDLER( WRITELINE( ti99_4x_state, cassette_output) )
MCFG_TMS9901_INTLEVEL_HANDLER( WRITE8( ti99_4x_state, tms9901_interrupt) )
- MCFG_DMUX_ADD( DATAMUX_TAG, datamux_conf )
+ MCFG_DEVICE_ADD( DATAMUX_TAG, DATAMUX, 0)
MCFG_DMUX_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_dmux) )
- MCFG_TI99_GROMPORT_ADD( GROMPORT_TAG )
+
+ MCFG_GROMPORT4_ADD( GROMPORT_TAG )
MCFG_GROMPORT_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_cart) )
MCFG_GROMPORT_RESET_HANDLER( WRITELINE(ti99_4x_state, console_reset) )
@@ -966,9 +934,11 @@ static MACHINE_CONFIG_START( ti99_4a, ti99_4x_state )
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(ti99_4x_state, notconnected) )
MCFG_PERIBOX_READY_HANDLER( DEVWRITELINE(DATAMUX_TAG, ti99_datamux_device, ready_line) )
- /* sound hardware */
- MCFG_TI_SOUND_94624_ADD( TISOUND_TAG )
- MCFG_TI_SOUND_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_sound) )
+ // Sound hardware
+ MCFG_SPEAKER_STANDARD_MONO("sound_out")
+ MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75)
+ MCFG_SN76496_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_sound) )
/* Cassette drives */
MCFG_SPEAKER_STANDARD_MONO("cass_out")
@@ -978,13 +948,10 @@ static MACHINE_CONFIG_START( ti99_4a, ti99_4x_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25)
- /* GROM devices */
- MCFG_GROM_ADD( GROM0_TAG, grom0_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_4x_state, console_ready_grom))
- MCFG_GROM_ADD( GROM1_TAG, grom1_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_4x_state, console_ready_grom))
- MCFG_GROM_ADD( GROM2_TAG, grom2_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_4x_state, console_ready_grom))
+ // GROM devices
+ MCFG_GROM_ADD( GROM0_TAG, 0, region_grom, 0x0000, WRITELINE(ti99_4x_state, console_ready_grom))
+ MCFG_GROM_ADD( GROM1_TAG, 1, region_grom, 0x2000, WRITELINE(ti99_4x_state, console_ready_grom))
+ MCFG_GROM_ADD( GROM2_TAG, 2, region_grom, 0x4000, WRITELINE(ti99_4x_state, console_ready_grom))
// Joystick port
MCFG_TI_JOYPORT4A_ADD( JOYPORT_TAG )
@@ -994,14 +961,14 @@ MACHINE_CONFIG_END
US version: 60 Hz, NTSC
*/
static MACHINE_CONFIG_DERIVED( ti99_4a_60hz, ti99_4a )
- MCFG_TI_TMS991x_ADD_NTSC(VIDEO_SYSTEM_TAG, TMS9918A, 0x4000, ti99_4x_state, video_interrupt_in)
+ MCFG_TI_TMS991x_ADD_NTSC(VIDEO_SYSTEM_TAG, TMS9918A, 0x4000, ti99_4x_state, video_interrupt_in, gromclk_in)
MACHINE_CONFIG_END
/*
European version: 50 Hz, PAL
*/
static MACHINE_CONFIG_DERIVED( ti99_4a_50hz, ti99_4a )
- MCFG_TI_TMS991x_ADD_PAL(VIDEO_SYSTEM_TAG, TMS9929A, 0x4000, ti99_4x_state, video_interrupt_in)
+ MCFG_TI_TMS991x_ADD_PAL(VIDEO_SYSTEM_TAG, TMS9929A, 0x4000, ti99_4x_state, video_interrupt_in, gromclk_in)
MACHINE_CONFIG_END
/************************************************************************
@@ -1029,14 +996,14 @@ MACHINE_CONFIG_END
US version: 60 Hz, NTSC
*/
static MACHINE_CONFIG_DERIVED( ti99_4qi_60hz, ti99_4qi )
- MCFG_TI_TMS991x_ADD_NTSC(VIDEO_SYSTEM_TAG, TMS9918A, 0x4000, ti99_4x_state, video_interrupt_in)
+ MCFG_TI_TMS991x_ADD_NTSC(VIDEO_SYSTEM_TAG, TMS9918A, 0x4000, ti99_4x_state, video_interrupt_in, gromclk_in)
MACHINE_CONFIG_END
/*
European version: 50 Hz, PAL
*/
static MACHINE_CONFIG_DERIVED( ti99_4qi_50hz, ti99_4qi )
- MCFG_TI_TMS991x_ADD_PAL(VIDEO_SYSTEM_TAG, TMS9929A, 0x4000, ti99_4x_state, video_interrupt_in)
+ MCFG_TI_TMS991x_ADD_PAL(VIDEO_SYSTEM_TAG, TMS9929A, 0x4000, ti99_4x_state, video_interrupt_in, gromclk_in)
MACHINE_CONFIG_END
/************************************************************************
@@ -1044,6 +1011,27 @@ MACHINE_CONFIG_END
replacing the console video processor.
*************************************************************************/
+MACHINE_START_MEMBER(ti99_4x_state, ti99_4ev)
+{
+ m_peribox->senila(CLEAR_LINE);
+ m_peribox->senilb(CLEAR_LINE);
+ m_nready_combined = 0;
+ m_model = MODEL_4A;
+ // Removing the TMS9928a requires to add a replacement for the GROMCLK.
+ // In the real hardware this is a circuit (REPL99x) that fits into the VDP socket
+ m_gromclk_timer = timer_alloc(0);
+}
+
+MACHINE_RESET_MEMBER(ti99_4x_state, ti99_4ev)
+{
+ m_cpu->set_ready(ASSERT_LINE);
+ m_cpu->set_hold(CLEAR_LINE);
+ m_int1 = CLEAR_LINE;
+ m_int2 = CLEAR_LINE;
+ m_int12 = CLEAR_LINE;
+ m_gromclk_timer->adjust(attotime::zero, 0, attotime::from_hz(XTAL_10_738635MHz/24));
+}
+
static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state )
/* CPU */
MCFG_TMS99xx_ADD("maincpu", TMS9900, 3000000, memmap, cru_map)
@@ -1052,7 +1040,8 @@ static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state )
MCFG_TMS99xx_CLKOUT_HANDLER( WRITELINE(ti99_4x_state, clock_out) )
MCFG_TMS99xx_DBIN_HANDLER( WRITELINE(ti99_4x_state, dbin_line) )
- MCFG_MACHINE_START_OVERRIDE(ti99_4x_state, ti99_4a )
+ MCFG_MACHINE_START_OVERRIDE(ti99_4x_state, ti99_4ev )
+ MCFG_MACHINE_RESET_OVERRIDE(ti99_4x_state, ti99_4ev )
/* video hardware */
MCFG_DEVICE_ADD(VIDEO_SYSTEM_TAG, V9938VIDEO, 0)
@@ -1073,9 +1062,9 @@ static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state )
MCFG_TMS9901_P9_HANDLER( WRITELINE( ti99_4x_state, cassette_output) )
MCFG_TMS9901_INTLEVEL_HANDLER( WRITE8( ti99_4x_state, tms9901_interrupt) )
- MCFG_DMUX_ADD( DATAMUX_TAG, datamux_conf_ev )
+ MCFG_DEVICE_ADD( DATAMUX_TAG, DATAMUX, 0)
MCFG_DMUX_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_dmux) )
- MCFG_TI99_GROMPORT_ADD( GROMPORT_TAG )
+ MCFG_GROMPORT4_ADD( GROMPORT_TAG )
MCFG_GROMPORT_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_cart) )
MCFG_GROMPORT_RESET_HANDLER( WRITELINE(ti99_4x_state, console_reset) )
@@ -1088,9 +1077,11 @@ static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state )
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(ti99_4x_state, notconnected) )
MCFG_PERIBOX_READY_HANDLER( DEVWRITELINE(DATAMUX_TAG, ti99_datamux_device, ready_line) )
- /* sound hardware */
- MCFG_TI_SOUND_94624_ADD( TISOUND_TAG )
- MCFG_TI_SOUND_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_sound) )
+ // Sound hardware
+ MCFG_SPEAKER_STANDARD_MONO("sound_out")
+ MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75)
+ MCFG_SN76496_READY_HANDLER( WRITELINE(ti99_4x_state, console_ready_sound) )
/* Cassette drives */
MCFG_SPEAKER_STANDARD_MONO("cass_out")
@@ -1100,13 +1091,10 @@ static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25)
- /* GROM devices */
- MCFG_GROM_ADD( GROM0_TAG, grom0_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_4x_state, console_ready_grom))
- MCFG_GROM_ADD( GROM1_TAG, grom1_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_4x_state, console_ready_grom))
- MCFG_GROM_ADD( GROM2_TAG, grom2_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_4x_state, console_ready_grom))
+ // GROM devices
+ MCFG_GROM_ADD( GROM0_TAG, 0, region_grom, 0x0000, WRITELINE(ti99_4x_state, console_ready_grom))
+ MCFG_GROM_ADD( GROM1_TAG, 1, region_grom, 0x2000, WRITELINE(ti99_4x_state, console_ready_grom))
+ MCFG_GROM_ADD( GROM2_TAG, 2, region_grom, 0x4000, WRITELINE(ti99_4x_state, console_ready_grom))
// Joystick port
MCFG_TI_JOYPORT4A_ADD( JOYPORT_TAG )
@@ -1124,7 +1112,7 @@ MACHINE_CONFIG_END
ROM_START(ti99_4)
// CPU memory space
- ROM_REGION16_BE(0x2000, "maincpu", 0)
+ ROM_REGION16_BE(0x2000, CONSOLEROM, 0)
ROM_LOAD16_BYTE("u610.bin", 0x0000, 0x1000, CRC(6fcf4b15) SHA1(d085213c64701d429ae535f9a4ac8a50427a8343)) /* CPU ROMs high */
ROM_LOAD16_BYTE("u611.bin", 0x0001, 0x1000, CRC(491c21d1) SHA1(7741ae9294c51a44a78033d1b77c01568a6bbfb9)) /* CPU ROMs low */
@@ -1137,7 +1125,7 @@ ROM_END
ROM_START(ti99_4a)
// CPU memory space
- ROM_REGION16_BE(0x2000, "maincpu", 0)
+ ROM_REGION16_BE(0x2000, CONSOLEROM, 0)
ROM_LOAD16_WORD("994arom.bin", 0x0000, 0x2000, CRC(db8f33e5) SHA1(6541705116598ab462ea9403c00656d6353ceb85)) /* system ROMs */
// GROM memory space
@@ -1147,7 +1135,7 @@ ROM_END
ROM_START(ti99_4qi)
// CPU memory space
- ROM_REGION16_BE(0x2000, "maincpu", 0)
+ ROM_REGION16_BE(0x2000, CONSOLEROM, 0)
ROM_LOAD16_WORD("994qirom.bin", 0x0000, 0x2000, CRC(db8f33e5) SHA1(6541705116598ab462ea9403c00656d6353ceb85)) /* system ROMs */
// GROM memory space
@@ -1157,10 +1145,9 @@ ROM_START(ti99_4qi)
ROM_LOAD("994qigr2.bin", 0x4000, 0x1800, CRC(e0bb5341) SHA1(e255f0d65d69b927cecb8fcfac7a4c17d585ea96)) /* system GROM 2 */
ROM_END
-
ROM_START(ti99_4ev)
/*CPU memory space*/
- ROM_REGION16_BE(0x2000, "maincpu", 0)
+ ROM_REGION16_BE(0x2000, CONSOLEROM, 0)
ROM_LOAD16_WORD("994arom.bin", 0x0000, 0x2000, CRC(db8f33e5) SHA1(6541705116598ab462ea9403c00656d6353ceb85)) /* system ROMs */
/*GROM memory space*/
@@ -1168,11 +1155,11 @@ ROM_START(ti99_4ev)
ROM_LOAD("994agr38.bin", 0x0000, 0x6000, CRC(bdd9f09b) SHA1(9b058a55d2528d2a6a69d7081aa296911ed7c0de)) /* system GROMs */
ROM_END
-/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
-COMP( 1979, ti99_4, 0, 0, ti99_4_60hz, ti99_4, driver_device, 0, "Texas Instruments", "TI-99/4 Home Computer (US)" , 0)
-COMP( 1980, ti99_4e, ti99_4, 0, ti99_4_50hz, ti99_4, driver_device, 0, "Texas Instruments", "TI-99/4 Home Computer (Europe)" , 0)
-COMP( 1981, ti99_4a, 0, 0, ti99_4a_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer (US)" , 0)
-COMP( 1981, ti99_4ae, ti99_4a, 0, ti99_4a_50hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer (Europe)" , 0)
-COMP( 1983, ti99_4qe, ti99_4qi, 0, ti99_4qi_50hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4QI Home Computer (Europe)" , 0)
-COMP( 1983, ti99_4qi, 0, 0, ti99_4qi_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4QI Home Computer" , 0)
-COMP( 1994, ti99_4ev, ti99_4a, 0, ti99_4ev_60hz,ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer with EVPC" , 0)
+// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
+COMP( 1979, ti99_4, 0, 0, ti99_4_60hz, ti99_4, driver_device, 0, "Texas Instruments", "TI-99/4 Home Computer (US)", 0)
+COMP( 1980, ti99_4e, ti99_4, 0, ti99_4_50hz, ti99_4, driver_device, 0, "Texas Instruments", "TI-99/4 Home Computer (Europe)", 0)
+COMP( 1981, ti99_4a, 0, 0, ti99_4a_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer (US)", 0)
+COMP( 1981, ti99_4ae, ti99_4a, 0, ti99_4a_50hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer (Europe)", 0)
+COMP( 1983, ti99_4qe, ti99_4qi, 0, ti99_4qi_50hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4QI Home Computer (Europe)", 0)
+COMP( 1983, ti99_4qi, 0, 0, ti99_4qi_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4QI Home Computer (US)", 0)
+COMP( 1994, ti99_4ev, ti99_4a, 0, ti99_4ev_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer with EVPC", 0)
diff --git a/src/mame/drivers/ti99_8.cpp b/src/mame/drivers/ti99_8.cpp
index 5e3acc85ff6..9b661f71e82 100644
--- a/src/mame/drivers/ti99_8.cpp
+++ b/src/mame/drivers/ti99_8.cpp
@@ -86,33 +86,6 @@
- Native mode (Armadillo mode): Devices are located at positions above
0xF000 that allow for a contiguous usage of memory.
-
- ROM contents
- ------------
- The ROM0 chip is accessible at addresses 0000-1FFF in the logical address
- space of the compatibility mode. It contains the GPL interpreter. In
- native mode the ROM0 chip is invisible.
-
- ROM0
- offset Logical address Name
- -----------------------------------
- 0000 0000-1FFF ROM0
-
-
- The ROM1 chip contains 32 KiB of various system software. It is located in
- the physical address space, so it must be mapped into the logical address
- space by defining an appropriate map.
-
- ROM1
- offset Physical address Name
- ----------------------------------------------------------
- 0000 FFA000-FFDFFF ROM1
- 4000 FF4000-FF5FFF @CRU>2700 Text-to-speech ROM/DSR
- 6000 FF4000-FF5FFF @CRU>1700 Hexbus DSR
-
- The DSR portions have to be selected via the CRU bits >1700 or >2700.
-
-
Mapper
------
The mapper uses 4K pages (unlike the Geneve mapper with 8K pages) which
@@ -200,22 +173,27 @@ Known Issues (MZ, 2010-11-07)
#include "emu.h"
#include "cpu/tms9900/tms9995.h"
+#include "bus/ti99x/ti99defs.h"
+
#include "sound/sn76496.h"
#include "sound/wave.h"
#include "machine/tms9901.h"
+#include "machine/tmc0430.h"
#include "imagedev/cassette.h"
#include "bus/ti99x/998board.h"
#include "bus/ti99x/videowrp.h"
-#include "bus/ti99x/grom.h"
#include "bus/ti99x/gromport.h"
#include "bus/ti99x/joyport.h"
#include "bus/ti99_peb/peribox.h"
+#include "softlist.h"
+
// Debugging
#define TRACE_READY 0
#define TRACE_INTERRUPTS 0
+#define TRACE_RESET 0
#define TRACE_CRU 0
/*
@@ -228,7 +206,8 @@ enum
READY_PBOX = 4,
READY_SOUND = 8,
READY_CART = 16,
- READY_SPEECH = 32
+ READY_SPEECH = 32,
+ READY_MAINBOARD = 64
};
class ti99_8_state : public driver_device
@@ -242,8 +221,7 @@ public:
m_peribox(*this, PERIBOX_TAG),
m_mainboard(*this, MAINBOARD8_TAG),
m_joyport(*this, JOYPORT_TAG),
- m_video(*this, VIDEO_SYSTEM_TAG),
- m_cassette(*this, "cassette") { }
+ m_cassette(*this, "cassette") { };
// Machine management
DECLARE_MACHINE_START(ti99_8);
@@ -254,17 +232,17 @@ public:
DECLARE_WRITE8_MEMBER( cruwrite );
DECLARE_WRITE8_MEMBER( external_operation );
DECLARE_WRITE_LINE_MEMBER( clock_out );
+ DECLARE_WRITE_LINE_MEMBER( dbin_line );
// Connections from outside towards the CPU (callbacks)
- DECLARE_WRITE_LINE_MEMBER( console_ready_mapper );
- DECLARE_WRITE_LINE_MEMBER( console_ready_sound );
- DECLARE_WRITE_LINE_MEMBER( console_ready_pbox );
- DECLARE_WRITE_LINE_MEMBER( console_ready_cart );
- DECLARE_WRITE_LINE_MEMBER( console_ready_grom );
- DECLARE_WRITE_LINE_MEMBER( console_ready_speech );
+ DECLARE_WRITE_LINE_MEMBER( console_ready );
DECLARE_WRITE_LINE_MEMBER( console_reset );
+ DECLARE_WRITE_LINE_MEMBER( cpu_hold );
DECLARE_WRITE_LINE_MEMBER( notconnected );
+ // GROM clock (coming from Vaquerro)
+ DECLARE_WRITE_LINE_MEMBER( gromclk_in );
+
// Connections with the system interface chip 9901
DECLARE_WRITE_LINE_MEMBER( extint );
DECLARE_WRITE_LINE_MEMBER( video_interrupt );
@@ -275,8 +253,6 @@ public:
DECLARE_WRITE_LINE_MEMBER(keyC1);
DECLARE_WRITE_LINE_MEMBER(keyC2);
DECLARE_WRITE_LINE_MEMBER(keyC3);
- DECLARE_WRITE_LINE_MEMBER(CRUS);
- DECLARE_WRITE_LINE_MEMBER(PTGEN);
DECLARE_WRITE_LINE_MEMBER(audio_gate);
DECLARE_WRITE_LINE_MEMBER(cassette_output);
DECLARE_WRITE_LINE_MEMBER(cassette_motor);
@@ -288,9 +264,7 @@ private:
int m_keyboard_column;
// READY handling
- int m_nready_combined;
- int m_nready_prev;
- void console_ready_join(int id, int state);
+ line_state m_ready_old;
// Latch for 9901 INT2, INT1 lines
line_state m_int1;
@@ -303,7 +277,6 @@ private:
required_device<peribox_device> m_peribox;
required_device<mainboard8_device> m_mainboard;
required_device<joyport_device> m_joyport;
- required_device<ti_video_device> m_video;
required_device<cassette_image_device> m_cassette;
};
@@ -312,7 +285,7 @@ private:
job to the mapper completely.
*/
static ADDRESS_MAP_START(memmap, AS_PROGRAM, 8, ti99_8_state)
- AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE(MAINBOARD8_TAG, mainboard8_device, readm, writem )
+ AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE(MAINBOARD8_TAG, mainboard8_device, read, write) AM_DEVSETOFFSET(MAINBOARD8_TAG, mainboard8_device, setoffset)
ADDRESS_MAP_END
/*
@@ -432,89 +405,6 @@ static INPUT_PORTS_START(ti99_8)
INPUT_PORTS_END
-/*****************************************************************************
- Components
-******************************************************************************/
-#define region_sysgrom "sysgrom"
-
-static GROM_CONFIG(grom0_config)
-{
- false, 0, region_sysgrom, 0x0000, 0x1800, GROMFREQ
-};
-
-static GROM_CONFIG(grom1_config)
-{
- false, 1, region_sysgrom, 0x2000, 0x1800, GROMFREQ
-};
-
-static GROM_CONFIG(grom2_config)
-{
- false, 2, region_sysgrom, 0x4000, 0x1800, GROMFREQ
-};
-
-/****************************************************
- PASCAL groms, 3 libraries @ 8 GROMs
- Do some macro tricks to keep writing effort low
-*****************************************************/
-
-#define region_gromlib1 "gromlib1"
-#define region_gromlib2 "gromlib2"
-#define region_gromlib3 "gromlib3"
-
-#define MCFG_GROM_LIBRARY_ADD8(_tag, _config) \
- MCFG_DEVICE_ADD(#_tag "0", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##0) \
- MCFG_DEVICE_ADD(#_tag "1", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##1) \
- MCFG_DEVICE_ADD(#_tag "2", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##2) \
- MCFG_DEVICE_ADD(#_tag "3", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##3) \
- MCFG_DEVICE_ADD(#_tag "4", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##4) \
- MCFG_DEVICE_ADD(#_tag "5", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##5) \
- MCFG_DEVICE_ADD(#_tag "6", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##6) \
- MCFG_DEVICE_ADD(#_tag "7", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##7)
-
-#define MCFG_GROM_LIBRARY_ADD3(_tag, _config) \
- MCFG_DEVICE_ADD(#_tag "0", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##0) \
- MCFG_DEVICE_ADD(#_tag "1", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##1) \
- MCFG_DEVICE_ADD(#_tag "2", GROM, 0) \
- MCFG_DEVICE_CONFIG(_config##2)
-
-#define GROM_LIBRARY_CONFIG8(_conf, _region) \
-static GROM_CONFIG(_conf##0) \
-{ false, 0, _region, 0x0000, 0x1800, GROMFREQ }; \
-static GROM_CONFIG(_conf##1) \
-{ false, 1, _region, 0x2000, 0x1800, GROMFREQ }; \
-static GROM_CONFIG(_conf##2) \
-{ false, 2, _region, 0x4000, 0x1800, GROMFREQ }; \
-static GROM_CONFIG(_conf##3) \
-{ false, 3, _region, 0x6000, 0x1800, GROMFREQ }; \
-static GROM_CONFIG(_conf##4) \
-{ false, 4, _region, 0x8000, 0x1800, GROMFREQ }; \
-static GROM_CONFIG(_conf##5) \
-{ false, 5, _region, 0xa000, 0x1800, GROMFREQ }; \
-static GROM_CONFIG(_conf##6) \
-{ false, 6, _region, 0xc000, 0x1800, GROMFREQ }; \
-static GROM_CONFIG(_conf##7) \
-{ false, 7, _region, 0xe000, 0x1800, GROMFREQ };
-
-#define GROM_LIBRARY_CONFIG3(_conf, _region) \
-static GROM_CONFIG(_conf##0) \
-{ false, 0, _region, 0x0000, 0x1800, GROMFREQ }; \
-static GROM_CONFIG(_conf##1) \
-{ false, 1, _region, 0x2000, 0x1800, GROMFREQ }; \
-static GROM_CONFIG(_conf##2) \
-{ false, 2, _region, 0x4000, 0x1800, GROMFREQ };
-GROM_LIBRARY_CONFIG8(pascal1, region_gromlib1)
-GROM_LIBRARY_CONFIG8(pascal2, region_gromlib2)
-GROM_LIBRARY_CONFIG3(pascal3, region_gromlib3)
READ8_MEMBER( ti99_8_state::cruread )
{
@@ -661,33 +551,6 @@ WRITE_LINE_MEMBER( ti99_8_state::keyC3 )
}
/*
- Set 99/4A compatibility mode (CRUS=1)
-*/
-WRITE_LINE_MEMBER( ti99_8_state::CRUS )
-{
- m_mainboard->CRUS_set(state==ASSERT_LINE);
-
- // In Armadillo mode, GROMs are located at f830; accordingly, the
- // gromport must be reconfigured
- if (state==ASSERT_LINE)
- {
- m_gromport->set_grom_base(0x9800, 0xfbf1);
- }
- else
- {
- m_gromport->set_grom_base(0xf830, 0xfff1);
- }
-}
-
-/*
- Set mapper /PTGEN. This is negative logic; we use PTGE as the positive logic signal.
-*/
-WRITE_LINE_MEMBER( ti99_8_state::PTGEN )
-{
- m_mainboard->PTGE_set(state==CLEAR_LINE);
-}
-
-/*
Control cassette tape unit motor (P6)
*/
WRITE_LINE_MEMBER( ti99_8_state::cassette_motor )
@@ -723,11 +586,11 @@ WRITE8_MEMBER( ti99_8_state::tms9901_interrupt )
/*****************************************************************************/
/*
- set the state of TMS9901's INT2 (called by the tms9928 core)
+ set the state of TMS9901's INT2 (called by the VDP)
*/
WRITE_LINE_MEMBER( ti99_8_state::video_interrupt )
{
- if (TRACE_INTERRUPTS) logerror("ti99_8: VDP int 2 on tms9901, level=%02x\n", state);
+ if (TRACE_INTERRUPTS) logerror("VDP int 2 on tms9901, level=%02x\n", state);
m_int2 = (line_state)state;
m_tms9901->set_single_int(2, state);
}
@@ -737,82 +600,59 @@ WRITE_LINE_MEMBER( ti99_8_state::video_interrupt )
***********************************************************/
/*
- We combine the incoming READY signals and propagate them to the CPU.
- An alternative would be to let the CPU get the READY state, but this would
- be a much higher overhead, as this happens in each clock tick.
+ Propagate READY signals to the CPU.
*/
-void ti99_8_state::console_ready_join(int id, int state)
+void ti99_8_state::console_ready(int state)
{
- if (state==CLEAR_LINE)
- m_nready_combined |= id;
- else
- m_nready_combined &= ~id;
-
if (TRACE_READY)
{
- if (m_nready_prev != m_nready_combined) logerror("ti99_8: READY bits = %04x\n", ~m_nready_combined);
+ if (m_ready_old != state) logerror("READY = %d\n", state);
}
- m_nready_prev = m_nready_combined;
- m_cpu->ready_line(m_nready_combined==0);
+ m_ready_old = (line_state)state;
+ m_cpu->ready_line(state);
}
/*
- Connections to the READY line. This might look a bit ugly; we need an
- implementation of a "Wired AND" device.
+ Enqueue a RESET signal.
*/
-WRITE_LINE_MEMBER( ti99_8_state::console_ready_grom )
-{
- console_ready_join(READY_GROM, state);
-}
-
-WRITE_LINE_MEMBER( ti99_8_state::console_ready_mapper )
-{
- console_ready_join(READY_MAPPER, state);
-}
-
-WRITE_LINE_MEMBER( ti99_8_state::console_ready_pbox )
-{
- console_ready_join(READY_PBOX, state);
-}
-
-WRITE_LINE_MEMBER( ti99_8_state::console_ready_sound )
+WRITE_LINE_MEMBER( ti99_8_state::console_reset )
{
- console_ready_join(READY_SOUND, state);
-}
+ if (TRACE_RESET) logerror("Incoming RESET line = %d\n", state);
+ if (machine().phase() != MACHINE_PHASE_INIT)
+ {
+ // RESET the 9901
+ m_tms9901->rst1_line(state);
-WRITE_LINE_MEMBER( ti99_8_state::console_ready_cart )
-{
- console_ready_join(READY_CART, state);
-}
+ // Pull up the CRUS and PTGEN lines (9901 outputs have been deactivated, pull-up resistors on the board show effect)
+ m_mainboard->crus_in(TRUE); // assert
+ m_mainboard->ptgen_in(TRUE); // clear
-WRITE_LINE_MEMBER( ti99_8_state::console_ready_speech )
-{
- console_ready_join(READY_SPEECH, state);
+ // Setting ready to false so that automatic wait states are enabled
+ m_cpu->ready_line(CLEAR_LINE);
+ m_cpu->reset_line(ASSERT_LINE);
+ }
}
/*
- The RESET line leading to a reset of the CPU.
+ The HOLD line leading to the CPU entering the HOLD state.
*/
-WRITE_LINE_MEMBER( ti99_8_state::console_reset )
+WRITE_LINE_MEMBER( ti99_8_state::cpu_hold )
{
- if (machine().phase() != MACHINE_PHASE_INIT)
- {
- m_cpu->set_input_line(INT_9995_RESET, state);
- m_video->reset_vdp(state);
- }
+ if (TRACE_INTERRUPTS) logerror("Incoming HOLD line = %d\n", state);
+ m_cpu->hold_line(state);
}
WRITE_LINE_MEMBER( ti99_8_state::extint )
{
- if (TRACE_READY) logerror("ti99_8: EXTINT level = %02x\n", state);
+ if (TRACE_INTERRUPTS) logerror("EXTINT level = %02x\n", state);
m_int1 = (line_state)state;
m_tms9901->set_single_int(1, state);
}
WRITE_LINE_MEMBER( ti99_8_state::notconnected )
{
- if (TRACE_READY) logerror("ti99_8: Setting a not connected line ... ignored\n");
+ if (TRACE_INTERRUPTS) logerror("Setting a not connected line ... ignored\n");
}
WRITE8_MEMBER( ti99_8_state::external_operation )
@@ -821,7 +661,7 @@ WRITE8_MEMBER( ti99_8_state::external_operation )
if (offset == IDLE_OP) return;
else
{
- logerror("ti99_4x: External operation %s not implemented on TI-99/8 board\n", extop[offset]);
+ logerror("External operation %s not implemented on TI-99/8 board\n", extop[offset]);
}
}
@@ -833,119 +673,23 @@ WRITE_LINE_MEMBER( ti99_8_state::clock_out )
m_mainboard->clock_in(state);
}
-/*****************************************************************************/
-
/*
- Format:
- Name, mode, stop, mask, select, write, read8z function, write8 function
-
- Multiple devices may have the same select pattern; as in the real hardware,
- care must be taken that only one device actually responds. In the case of
- GROMs, each chip has an internal address counter and an ID, and the chip
- only responds when the ID and the most significant 3 bits match.
-
- NATIVE <-> CRUS=0
- TI99EM <-> CRUS=1
-
- PATGEN <-> PTGEN=1
-
- CONT: Mapper continues iterating through devices
- STOP: Mapper stops iterating when found
-
- Access to the mapper registers is done directly in the mapper, not via
- this list.
-
- TODO: This should (must) be improved in terms of performance. Every single
- memory access goes through the mapper. Either we use an ordered search list,
- or we order the entries according to their frequency.
- (I did this right now, putting the Pascal GROMs at the end.)
- We should think about a set entry where devices with the same address
- are collected as one single entry (think about the Pascal lib with 21 GROMs,
- twice eight and once three of them on the same address).
+ Data bus in (DBIN) line from the CPU.
*/
-
-#define PASCAL_GROM_LIB8(_tag, _addr) \
- { _tag "0", PATGEN, CONT, _addr, 0xfff1, 0x0000 }, \
- { _tag "1", PATGEN, CONT, _addr, 0xfff1, 0x0000 }, \
- { _tag "2", PATGEN, CONT, _addr, 0xfff1, 0x0000 }, \
- { _tag "3", PATGEN, CONT, _addr, 0xfff1, 0x0000 }, \
- { _tag "4", PATGEN, CONT, _addr, 0xfff1, 0x0000 }, \
- { _tag "5", PATGEN, CONT, _addr, 0xfff1, 0x0000 }, \
- { _tag "6", PATGEN, CONT, _addr, 0xfff1, 0x0000 }, \
- { _tag "7", PATGEN, CONT, _addr, 0xfff1, 0x0000 }
-
-#define PASCAL_GROM_LIB3(_tag, _addr) \
- { _tag "0", PATGEN, CONT, _addr, 0xfff1, 0x0000 }, \
- { _tag "1", PATGEN, CONT, _addr, 0xfff1, 0x0000 }, \
- { _tag "2", PATGEN, CONT, _addr, 0xfff1, 0x0000 }
-
-
-static const mapper8_list_entry mapper_devices[] =
-{
- // TI-99/4A mode (CRUS=1)
- // Full/partial decoding has been verified on a real machine
- // GROMs: According to the spec, the 99/8 supports up to 4 GROM libraries
- // (99/4A supports 256 libraries)
- // at 9800, 9804, 9808, 980c. Address counter access is at 9802,6,a,e. Write access +0400.
- { ROM0NAME, TI99EM, STOP, 0x0000, 0xe000, 0x0000 }, // 0000-1fff
- { TISOUND_TAG, TI99EM, STOP, 0x8400, 0xfff1, 0x0000 }, // 8400-840f
- { VIDEO_SYSTEM_TAG, TI99EM, STOP, 0x8800, 0xfff1, 0x0400 }, // 8800,8802 / 8c00,8c02
- { SPEECH_TAG, TI99EM, STOP, 0x9000, 0xfff1, 0x0400 }, // 9000-900f / 9400-940f
- { SRAMNAME, TI99EM, STOP, 0x8000, 0xf800, 0x0000 }, // 8000-87ff; must follow the sound generator
- { MAINBOARD8_TAG, TI99EM, STOP, 0x8810, 0xfff0, 0x0000 },
-
- { GROM0_TAG, TI99EM, CONT, 0x9800, 0xfff1, 0x0400 }, // 9800,2,4,...e/9c00,2,4,...e
- { GROM1_TAG, TI99EM, CONT, 0x9800, 0xfff1, 0x0400 }, // dto.
- { GROM2_TAG, TI99EM, CONT, 0x9800, 0xfff1, 0x0400 }, // dto. (GROMs are connected in parallel,
- { GROMPORT_TAG, TI99EM, CONT, 0x9800, 0xfff1, 0x0400 }, // dto. use internal address counter and id)
-
- // TI-99/8 mode
- // Full/partial decoding has been verified on a real machine
- // Sound ports are at f800, f802, f804, ..., f80e
- // VDP ports are (f810,f812), (f814,f816), (f818,f81a), (f81c,f81e)
- // Note that unmapped GROM accesses (odd addresses like F831) return FF,
- // not 00 as in our emulation, so that is not quite consistent, but tolerable ... I guess
-
- { SRAMNAME, NATIVE, STOP, 0xf000, 0xf800, 0x0000 }, // f000-f7ff
- { TISOUND_TAG, NATIVE, STOP, 0xf800, 0xfff1, 0x0000 }, // f800-f80e (even addresses)
- { VIDEO_SYSTEM_TAG, NATIVE, STOP, 0xf810, 0xfff1, 0x0000 }, // f810,2 (unlike 99/4A, no different read/write ports)
- { SPEECH_TAG, NATIVE, STOP, 0xf820, 0xfff1, 0x0000 }, // f820-f82f
- { MAINBOARD8_TAG, NATIVE, STOP, 0xf870, 0xfff0, 0x0000 },
-
- { GROM0_TAG, NATIVE, CONT, 0xf830, 0xfff1, 0x0000 }, // f830-f83e (4 banks), no different read/write ports
- { GROM1_TAG, NATIVE, CONT, 0xf830, 0xfff1, 0x0000 },
- { GROM2_TAG, NATIVE, CONT, 0xf830, 0xfff1, 0x0000 },
- { GROMPORT_TAG, NATIVE, CONT, 0xf830, 0xfff1, 0x0000 },
-
- PASCAL_GROM_LIB8("pascal1_grom", 0xf840),
- PASCAL_GROM_LIB8("pascal2_grom", 0xf850),
- PASCAL_GROM_LIB3("pascal3_grom", 0xf860),
-
- // Physical (need to pack this in here as well to keep config simple)
- // but these lines will be put into a separate list
- { DRAMNAME, PHYSIC, STOP, 0x000000, 0xff0000, 0x000000 }, // 000000-00ffff 64 KiB DRAM
- { PCODENAME, PHYSIC, STOP, 0xf00000, 0xffc000, 0x000000 }, // f00000-f03fff P-Code ROM
- { MAINBOARD8_TAG, PHYSIC, CONT, 0xff4000, 0xffe000, 0x000000 }, // ff4000-ff5fff Internal DSR
- { GROMPORT_TAG, PHYSIC, STOP, 0xff6000, 0xffe000, 0x000000 }, // ff6000-ff7fff Cartridge ROM space
- { GROMPORT_TAG, PHYSIC, STOP, 0xff8000, 0xffe000, 0x000000 }, // ff8000-ff9fff Cartridge ROM space
- { ROM1A0NAME, PHYSIC, STOP, 0xffa000, 0xffe000, 0x000000 }, // ffa000-ffbfff ROM1
- { ROM1C0NAME, PHYSIC, STOP, 0xffc000, 0xffe000, 0x000000 }, // ffc000-ffdfff ROM1
- { INTSNAME, PHYSIC, STOP, 0xffe000, 0xfffff0, 0x000000 }, // ffe000-ffe00f Interrupt level sense
- { PERIBOX_TAG, PHYSIC, STOP, 0x000000, 0x000000, 0x000000 }, // Peripheral Expansion Box
-
- { nullptr, 0, 0, 0, 0, 0 }
-};
-
-static MAPPER8_CONFIG( mapper_conf )
+WRITE_LINE_MEMBER( ti99_8_state::dbin_line )
{
- mapper_devices
-};
+ m_mainboard->dbin_in(state);
+}
MACHINE_START_MEMBER(ti99_8_state,ti99_8)
{
- m_nready_combined = 0;
m_peribox->senila(CLEAR_LINE);
m_peribox->senilb(CLEAR_LINE);
+ // m_mainboard->set_gromport(m_gromport);
+
+ // Need to configure the speech ROM for inverse bit order
+ speechrom_device* mem = subdevice<speechrom_device>(SPEECHROM_REG);
+ mem->set_reverse_bit_order(true);
}
MACHINE_RESET_MEMBER(ti99_8_state, ti99_8)
@@ -956,9 +700,7 @@ MACHINE_RESET_MEMBER(ti99_8_state, ti99_8)
// state on external memory accesses
m_cpu->ready_line(CLEAR_LINE);
- // But we assert the line here so that the system starts running
- m_nready_combined = 0;
- m_gromport->set_grom_base(0x9800, 0xfff1);
+ // m_gromport->set_grom_base(0x9800, 0xfff1);
// Clear INT1 and INT2 latch
m_int1 = CLEAR_LINE;
@@ -972,62 +714,92 @@ static MACHINE_CONFIG_START( ti99_8, ti99_8_state )
MCFG_TMS99xx_ADD("maincpu", TMS9995_MP9537, XTAL_10_738635MHz, memmap, crumap)
MCFG_TMS9995_EXTOP_HANDLER( WRITE8(ti99_8_state, external_operation) )
MCFG_TMS9995_CLKOUT_HANDLER( WRITELINE(ti99_8_state, clock_out) )
+ MCFG_TMS9995_DBIN_HANDLER( WRITELINE(ti99_8_state, dbin_line) )
+ MCFG_TMS9995_HOLDA_HANDLER( DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, holda_line) )
MCFG_MACHINE_START_OVERRIDE(ti99_8_state, ti99_8 )
MCFG_MACHINE_RESET_OVERRIDE(ti99_8_state, ti99_8 )
- /* Main board */
+ // 9901 configuration
MCFG_DEVICE_ADD(TMS9901_TAG, TMS9901, XTAL_10_738635MHz/4.0)
MCFG_TMS9901_READBLOCK_HANDLER( READ8(ti99_8_state, read_by_9901) )
MCFG_TMS9901_P0_HANDLER( WRITELINE( ti99_8_state, keyC0) )
MCFG_TMS9901_P1_HANDLER( WRITELINE( ti99_8_state, keyC1) )
MCFG_TMS9901_P2_HANDLER( WRITELINE( ti99_8_state, keyC2) )
MCFG_TMS9901_P3_HANDLER( WRITELINE( ti99_8_state, keyC3) )
- MCFG_TMS9901_P4_HANDLER( WRITELINE( ti99_8_state, CRUS) )
- MCFG_TMS9901_P5_HANDLER( WRITELINE( ti99_8_state, PTGEN) )
+ MCFG_TMS9901_P4_HANDLER( DEVWRITELINE( MAINBOARD8_TAG, mainboard8_device, crus_in) )
+ MCFG_TMS9901_P5_HANDLER( DEVWRITELINE( MAINBOARD8_TAG, mainboard8_device, ptgen_in) )
MCFG_TMS9901_P6_HANDLER( WRITELINE( ti99_8_state, cassette_motor) )
MCFG_TMS9901_P8_HANDLER( WRITELINE( ti99_8_state, audio_gate) )
MCFG_TMS9901_P9_HANDLER( WRITELINE( ti99_8_state, cassette_output) )
MCFG_TMS9901_INTLEVEL_HANDLER( WRITE8( ti99_8_state, tms9901_interrupt) )
- MCFG_MAINBOARD8_ADD( MAINBOARD8_TAG, mapper_conf )
- MCFG_MAINBOARD8_READY_CALLBACK(WRITELINE(ti99_8_state, console_ready_mapper))
- MCFG_TI99_GROMPORT_ADD( GROMPORT_TAG )
- MCFG_GROMPORT_READY_HANDLER( WRITELINE(ti99_8_state, console_ready_cart) )
+ // Mainboard with custom chips
+ MCFG_DEVICE_ADD(MAINBOARD8_TAG, MAINBOARD8, 0)
+ MCFG_MAINBOARD8_READY_CALLBACK(WRITELINE(ti99_8_state, console_ready))
+ MCFG_MAINBOARD8_RESET_CALLBACK(WRITELINE(ti99_8_state, console_reset))
+ MCFG_MAINBOARD8_HOLD_CALLBACK(WRITELINE(ti99_8_state, cpu_hold))
+
+ MCFG_GROMPORT8_ADD( GROMPORT_TAG )
+ MCFG_GROMPORT_READY_HANDLER( DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, system_grom_ready) )
MCFG_GROMPORT_RESET_HANDLER( WRITELINE(ti99_8_state, console_reset) )
- /* Peripheral expansion box */
+ /* Software list */
+ MCFG_SOFTWARE_LIST_ADD("cart_list_ti99", "ti99_cart")
+
+ // Peripheral expansion box
MCFG_DEVICE_ADD( PERIBOX_TAG, PERIBOX_998, 0)
MCFG_PERIBOX_INTA_HANDLER( WRITELINE(ti99_8_state, extint) )
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(ti99_8_state, notconnected) )
- MCFG_PERIBOX_READY_HANDLER( WRITELINE(ti99_8_state, console_ready_pbox) )
-
- /* Sound hardware */
- MCFG_TI_SOUND_76496_ADD( TISOUND_TAG )
- MCFG_TI_SOUND_READY_HANDLER( WRITELINE(ti99_8_state, console_ready_sound) )
-
- /* Cassette drives */
+ MCFG_PERIBOX_READY_HANDLER( DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, pbox_ready) )
+
+ // Sound hardware
+ MCFG_SPEAKER_STANDARD_MONO("sound_out")
+ MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN76496, 3579545) /* 3.579545 MHz */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75)
+ MCFG_SN76496_READY_HANDLER(DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, sound_ready))
+
+ // Speech hardware
+ // Note: SPEECHROM uses its tag for referencing the region
+ MCFG_DEVICE_ADD(SPEECHROM_REG, SPEECHROM, 0)
+ MCFG_SPEAKER_STANDARD_MONO("speech_out")
+ MCFG_SOUND_ADD(SPEECHSYN_TAG, CD2501ECD, 640000L)
+ MCFG_TMS52XX_READYQ_HANDLER(DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, speech_ready))
+ MCFG_TMS52XX_SPEECHROM(SPEECHROM_REG)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech_out", 0.50)
+
+ // Cassette drive
MCFG_SPEAKER_STANDARD_MONO("cass_out")
MCFG_CASSETTE_ADD( "cassette" )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25)
- /* Console GROMs */
- MCFG_GROM_ADD( GROM0_TAG, grom0_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_8_state, console_ready_grom))
- MCFG_GROM_ADD( GROM1_TAG, grom1_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_8_state, console_ready_grom))
- MCFG_GROM_ADD( GROM2_TAG, grom2_config )
- MCFG_GROM_READY_CALLBACK(WRITELINE(ti99_8_state, console_ready_grom))
-
- /* Pascal GROM libraries. */
- MCFG_GROM_LIBRARY_ADD8(pascal1_grom, pascal1)
- MCFG_GROM_LIBRARY_ADD8(pascal2_grom, pascal2)
- MCFG_GROM_LIBRARY_ADD3(pascal3_grom, pascal3)
-
- /* Devices */
- MCFG_DEVICE_ADD(SPEECH_TAG, SPEECH8, 0)
- MCFG_SPEECH8_READY_CALLBACK(WRITELINE(ti99_8_state, console_ready_speech))
+ // GROM library
+ MCFG_GROM_ADD( SYSGROM0_TAG, 0, SYSGROM_REG, 0x0000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, system_grom_ready))
+ MCFG_GROM_ADD( SYSGROM1_TAG, 1, SYSGROM_REG, 0x2000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, system_grom_ready))
+ MCFG_GROM_ADD( SYSGROM2_TAG, 2, SYSGROM_REG, 0x4000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, system_grom_ready))
+
+ MCFG_GROM_ADD( GLIB10_TAG, 0, GROMLIB1_REG, 0x0000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, ptts_grom_ready))
+ MCFG_GROM_ADD( GLIB11_TAG, 1, GROMLIB1_REG, 0x2000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, ptts_grom_ready))
+ MCFG_GROM_ADD( GLIB12_TAG, 2, GROMLIB1_REG, 0x4000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, ptts_grom_ready))
+ MCFG_GROM_ADD( GLIB13_TAG, 3, GROMLIB1_REG, 0x6000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, ptts_grom_ready))
+ MCFG_GROM_ADD( GLIB14_TAG, 4, GROMLIB1_REG, 0x8000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, ptts_grom_ready))
+ MCFG_GROM_ADD( GLIB15_TAG, 5, GROMLIB1_REG, 0xa000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, ptts_grom_ready))
+ MCFG_GROM_ADD( GLIB16_TAG, 6, GROMLIB1_REG, 0xc000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, ptts_grom_ready))
+ MCFG_GROM_ADD( GLIB17_TAG, 7, GROMLIB1_REG, 0xe000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, ptts_grom_ready))
+
+ MCFG_GROM_ADD( GLIB20_TAG, 0, GROMLIB2_REG, 0x0000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p8_grom_ready))
+ MCFG_GROM_ADD( GLIB21_TAG, 1, GROMLIB2_REG, 0x2000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p8_grom_ready))
+ MCFG_GROM_ADD( GLIB22_TAG, 2, GROMLIB2_REG, 0x4000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p8_grom_ready))
+ MCFG_GROM_ADD( GLIB23_TAG, 3, GROMLIB2_REG, 0x6000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p8_grom_ready))
+ MCFG_GROM_ADD( GLIB24_TAG, 4, GROMLIB2_REG, 0x8000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p8_grom_ready))
+ MCFG_GROM_ADD( GLIB25_TAG, 5, GROMLIB2_REG, 0xa000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p8_grom_ready))
+ MCFG_GROM_ADD( GLIB26_TAG, 6, GROMLIB2_REG, 0xc000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p8_grom_ready))
+ MCFG_GROM_ADD( GLIB27_TAG, 7, GROMLIB2_REG, 0xe000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p8_grom_ready))
+
+ MCFG_GROM_ADD( GLIB30_TAG, 0, GROMLIB3_REG, 0x0000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p3_grom_ready))
+ MCFG_GROM_ADD( GLIB31_TAG, 1, GROMLIB3_REG, 0x2000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p3_grom_ready))
+ MCFG_GROM_ADD( GLIB32_TAG, 2, GROMLIB3_REG, 0x4000, DEVWRITELINE(MAINBOARD8_TAG, mainboard8_device, p3_grom_ready))
// Joystick port
MCFG_TI_JOYPORT4A_ADD( JOYPORT_TAG )
@@ -1037,14 +809,24 @@ MACHINE_CONFIG_END
TI-99/8 US version (NTSC, 60 Hz)
*/
static MACHINE_CONFIG_DERIVED( ti99_8_60hz, ti99_8 )
- MCFG_TI998_ADD_NTSC(VIDEO_SYSTEM_TAG, TMS9118, 0x4000, ti99_8_state, video_interrupt)
+ // Video hardware
+ MCFG_DEVICE_ADD( VDP_TAG, TMS9118, XTAL_10_738635MHz / 2 )
+ MCFG_TMS9928A_VRAM_SIZE(0x4000)
+ MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(ti99_8_state, video_interrupt))
+ MCFG_TMS9928A_SCREEN_ADD_NTSC( SCREEN_TAG )
+ MCFG_SCREEN_UPDATE_DEVICE( VDP_TAG, tms9928a_device, screen_update )
MACHINE_CONFIG_END
/*
TI-99/8 European version (PAL, 50 Hz)
*/
static MACHINE_CONFIG_DERIVED( ti99_8_50hz, ti99_8 )
- MCFG_TI998_ADD_PAL(VIDEO_SYSTEM_TAG, TMS9129, 0x4000, ti99_8_state, video_interrupt)
+ // Video hardware
+ MCFG_DEVICE_ADD( VDP_TAG, TMS9129, XTAL_10_738635MHz / 2 )
+ MCFG_TMS9928A_VRAM_SIZE(0x4000)
+ MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(ti99_8_state,video_interrupt))
+ MCFG_TMS9928A_SCREEN_ADD_PAL( SCREEN_TAG )
+ MCFG_SCREEN_UPDATE_DEVICE( VDP_TAG, tms9928a_device, screen_update )
MACHINE_CONFIG_END
/*
@@ -1055,11 +837,11 @@ MACHINE_CONFIG_END
*/
ROM_START(ti99_8)
// Logical (CPU) memory space: ROM0
- ROM_REGION(0x2000, ROM0_TAG, 0)
+ ROM_REGION(0x2000, ROM0_REG, 0)
ROM_LOAD("u4_rom0.bin", 0x0000, 0x2000, CRC(901eb8d6) SHA1(13190c5e834baa9c0a70066b566cfcef438ed88a))
// Physical memory space (mapped): ROM1
- ROM_REGION(0x8000, ROM1_TAG, 0)
+ ROM_REGION(0x8000, ROM1_REG, 0)
ROM_LOAD("u25_rom1.bin", 0x0000, 0x8000, CRC(b574461a) SHA1(42c6aed44802cfabdd26b565d6e5ddfcd689f11e))
// Physical memory space (mapped): P-Code ROM
@@ -1069,20 +851,20 @@ ROM_START(ti99_8)
// the required select line for this ROM on the available schematics, so
// they seem to be from the earlier version. The location in the address
// space was determined by ROM disassembly.
- ROM_REGION(0x8000, PCODEROM_TAG, 0)
+ ROM_REGION(0x8000, PASCAL_REG, 0)
ROM_LOAD("u25a_pas.bin", 0x0000, 0x4000, CRC(d7ed6dd6) SHA1(32212ce6426ceccbff73d342d4a3ef699c0ae1e4))
// System GROMs. 3 chips @ f830
// The schematics do not enumerate the circuits but only talk about
// "circuits on board" (COB) so we name the GROMs as gM_N.bin where M is the
// ID (0-7) and N is the access port in the logical address space.
- ROM_REGION(0x6000, region_sysgrom, 0)
+ ROM_REGION(0x6000, SYSGROM_REG, 0)
ROM_LOAD("g0_f830.bin", 0x0000, 0x1800, CRC(1026db60) SHA1(7327095bf4f390476e69d9fd8424e98ea1f2325a))
ROM_LOAD("g1_f830.bin", 0x2000, 0x1800, CRC(93a43d65) SHA1(19be8a07d674bc7554c2bc9c7a5725d81e888e6e))
ROM_LOAD("g2_f830.bin", 0x4000, 0x1800, CRC(06f2b901) SHA1(f65e0fcb2c63e230b4a9563c72f91259b94ce955))
// TTS & Pascal library. 8 chips @ f840
- ROM_REGION(0x10000, region_gromlib1, 0)
+ ROM_REGION(0x10000, GROMLIB1_REG, 0)
ROM_LOAD("g0_f840.bin", 0x0000, 0x1800, CRC(44501071) SHA1(4b5ef7f1aa43a87e7ae4f02090944be5c39b1f26))
ROM_LOAD("g1_f840.bin", 0x2000, 0x1800, CRC(5a271d9e) SHA1(bb95befa2ffba2cc17ac437386e069e8ff621248))
ROM_LOAD("g2_f840.bin", 0x4000, 0x1800, CRC(d52502df) SHA1(17063e33ee8709d0df8030f38bb92c4322d55e1e))
@@ -1093,7 +875,7 @@ ROM_START(ti99_8)
ROM_LOAD("g7_f840.bin", 0xE000, 0x1800, CRC(3a9d20df) SHA1(1e6f9f8ec7df4b997a7579be742d0a7d54bc8763))
// Pascal library. 8 chips @ f850
- ROM_REGION(0x10000, region_gromlib2, 0)
+ ROM_REGION(0x10000, GROMLIB2_REG, 0)
ROM_LOAD("g0_f850.bin", 0x0000, 0x1800, CRC(2d948672) SHA1(cf15912d6dae5a450e0cfd796aa36ea5e521dc56))
ROM_LOAD("g1_f850.bin", 0x2000, 0x1800, CRC(7d64a842) SHA1(d5884bb2af21c8027311478ee506beac6f46203d))
ROM_LOAD("g2_f850.bin", 0x4000, 0x1800, CRC(e5ed8900) SHA1(03826882ce10fb5a6b3a9ccc85d3d1fe51979d0b))
@@ -1104,17 +886,15 @@ ROM_START(ti99_8)
ROM_LOAD("g7_f850.bin", 0xE000, 0x1800, CRC(71534098) SHA1(75e87123efde885e27dd749e07cb189eb2cc45a8))
// Pascal library. 3 chips @ f860
- ROM_REGION(0x6000, region_gromlib3, 0)
+ ROM_REGION(0x6000, GROMLIB3_REG, 0)
ROM_LOAD("g0_f860.bin", 0x0000, 0x1800, CRC(0ceef210) SHA1(b89957fbff094b758746391a69dea6907c66b950))
ROM_LOAD("g1_f860.bin", 0x2000, 0x1800, CRC(fc87de25) SHA1(4695b7f979f59a01ec16c55e4587c3379482b658))
ROM_LOAD("g2_f860.bin", 0x4000, 0x1800, CRC(e833e350) SHA1(6ffe501981a1112be1af596a489d96e287fc6be5))
- // Built-in RAM
- ROM_REGION(SRAM_SIZE, SRAM_TAG, 0)
- ROM_FILL(0x0000, SRAM_SIZE, 0x00)
-
- ROM_REGION(DRAM_SIZE, DRAM_TAG, 0)
- ROM_FILL(0x0000, DRAM_SIZE, 0x00)
+ // Speech ROM
+ ROM_REGION(0x8000, SPEECHROM_REG, 0)
+ ROM_LOAD("cd2325a.vsm", 0x0000, 0x4000, CRC(1f58b571) SHA1(0ef4f178716b575a1c0c970c56af8a8d97561ffe))
+ ROM_LOAD("cd2326a.vsm", 0x4000, 0x4000, CRC(65d00401) SHA1(a367242c2c96cebf0e2bf21862f3f6734b2b3020))
ROM_END
#define rom_ti99_8e rom_ti99_8
diff --git a/src/mame/drivers/tnzs.cpp b/src/mame/drivers/tnzs.cpp
index 828ff045e2a..0a3d72a8e05 100644
--- a/src/mame/drivers/tnzs.cpp
+++ b/src/mame/drivers/tnzs.cpp
@@ -1565,7 +1565,6 @@ static MACHINE_CONFIG_START( arknoid2, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1613,7 +1612,6 @@ static MACHINE_CONFIG_START( drtoppel, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1663,7 +1661,6 @@ static MACHINE_CONFIG_START( tnzs, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1709,7 +1706,6 @@ static MACHINE_CONFIG_START( insectx, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1755,7 +1751,6 @@ static MACHINE_CONFIG_START( kageki, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1813,7 +1808,6 @@ static MACHINE_CONFIG_START( tnzsb, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1879,7 +1873,6 @@ static MACHINE_CONFIG_START( jpopnics, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/topspeed.cpp b/src/mame/drivers/topspeed.cpp
index e265b3130f4..512bb5b6b91 100644
--- a/src/mame/drivers/topspeed.cpp
+++ b/src/mame/drivers/topspeed.cpp
@@ -580,13 +580,11 @@ static MACHINE_CONFIG_START( topspeed, topspeed_state )
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_OFFSETS(0, 8)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("pc080sn_2", PC080SN, 0)
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_OFFSETS(0, 8)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("maincpu")
diff --git a/src/mame/drivers/tourvis.cpp b/src/mame/drivers/tourvis.cpp
index b1a62e95492..9ffd50e0708 100644
--- a/src/mame/drivers/tourvis.cpp
+++ b/src/mame/drivers/tourvis.cpp
@@ -1039,14 +1039,14 @@ ROM_END
GAME( 19??, tourvis, 0, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision)", "Tourvision PCE bootleg", MACHINE_IS_BIOS_ROOT | MACHINE_NOT_WORKING )
GAME( 1988, tvdrgnst, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Namcot", "Dragon Spirit (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1988, tvlegaxe, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Victor Musical Industries, Inc.", "Makyo Densetsu - The Legenary Axe (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1988, tvlegaxe, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Victor Musical Industries, Inc.", "Makyou Densetsu - The Legenary Axe (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1989, tvdormon, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Fujiko-Shogakukan-TV Asahi / Hudson Soft", "Doraemon Meikyuu Daisakusen (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1989, tvdormon, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Fujiko-Shogakukan-TV Asahi / Hudson Soft", "Doraemon Meikyuu Dai Sakusen (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1989, tvdunexp, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Atlus Ltd. / Hudson Soft", "Dungeon Explorer (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1989, tvflaptw, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Namco Ltd. / Namcot", "Final Lap Twin (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1989, tvgunhed, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Hudson / Toho Sunrise", "Gunhed (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1989, tvdensho, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Big Club / Wolf Team", "Jinmu Densho (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1989, tvmrheli, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / IREM Corp", "Mr Heli (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1989, tvgunhed, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Hudson / Toho Sunrise", "GunHed (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1989, tvdensho, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Big Club / Wolf Team", "Jinmu Denshou (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1989, tvmrheli, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / IREM Corp", "Mr. Heli no Daibouken (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1989, tvpaclnd, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Namco / Namcot", "Pac-Land (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1989, tvshnobi, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Sega / Asmik Corporation", "Shinobi (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1989, tvsdarms, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Capcom / Nec Avenue", "Side Arms (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
@@ -1060,7 +1060,7 @@ GAME( 1990, tvaburn, tourvis, tourvision, tourvision, pce_common_state, pce_com
GAME( 1990, tvarmedf, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Nichibutsu / Big Don", "Armed-F (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvbeball, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Hudson Soft", "Be Ball (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvbomber, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Hudson Soft", "Bomberman (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1990, tvbrabho, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Namco / Namcot", "Ch??zetsurinjin Beraboh Man (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1990, tvbrabho, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Namco / Namcot", "Chouzetsu Rinjin - Bravoman (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvdsenpu, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Toaplan / Nec Avenue", "Daisenpu (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvdevilc, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Naxat / Red", "Devil Crash (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvdodgeb, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Technos Japan Corp / Naxat Soft", "Dodge Ball (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
@@ -1073,22 +1073,22 @@ GAME( 1990, tvovride, tourvis, tourvision, tourvision, pce_common_state, pce_com
GAME( 1990, tvpdrift, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Sega / Asmik Corporation", "Power Drift (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvpchasr, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Naxat Soft", "Psycho Chaser (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvrs2, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Taito Corporation", "Rastan Saga II (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1990, tvninjas, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / IREM Corp", "Saiga No Nindou - Ninja Spirit (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1990, tvninjas, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / IREM Corp", "Saigo no Nindou - Ninja Spirit (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvsssold, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Inter State / Kaneko / Hudson Soft", "Super Star Soldier (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvsvball, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Video System", "Super Volley ball (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvthbld, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Sega / NEC Avenue", "Thunder Blade (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvtsboys, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Victor Musical Industries, Inc.", "Toy Shop Boys (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1990, tveigues, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Victor Musical Industries, Inc.", "Veigues (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1990, tvwring, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Naxat Soft", "W-Ring (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1990, tveigues, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Victor Musical Industries, Inc.", "Veigues - Tactical Gladiator (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1990, tvwring, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Naxat Soft", "W-Ring - The Double Rings (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1990, tvxvious, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Namco Ltd. / Namcot", "Xevious (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1991, tv1943, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Capcom / Naxat Soft", "1943 Kai (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1991, tvbalstx, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Psygnosis / Coconuts Japan", "Ballistix (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1991, tvcolumn, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Telenet Japan", "Columns (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1991, tvcoryon, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Naxat Soft", "Coryoon (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1991, tvcoryon, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Naxat Soft", "Coryoon - Child of Dragon (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1991, tvdmoon, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / T.S.S", "Dead Moon (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1991, tvftenis, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Human", "Final Match Tennis (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-GAME( 1991, tvhtdaka, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Taito Corporation", "Hana Taka Daka (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
+GAME( 1991, tvhtdaka, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Taito Corporation", "Hana Taaka Daka!? (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1991, tvjchan, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Hudson Soft", "Jackie Chan (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1991, tvtonma, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / IREM Corp", "Legend of Hero Tonma (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
GAME( 1991, tvpcgen2, tourvis, tourvision, tourvision, pce_common_state, pce_common, ROT0, "bootleg (Tourvision) / Hudson Soft / Red", "PC Genjin 2 - Pithecanthropus Computerurus (Tourvision PCE bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/triforce.cpp b/src/mame/drivers/triforce.cpp
index 3823f27179c..15bc9e48f20 100644
--- a/src/mame/drivers/triforce.cpp
+++ b/src/mame/drivers/triforce.cpp
@@ -583,7 +583,7 @@ static MACHINE_CONFIG_START( triforce_base, triforce_state )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( triforcegd, triforce_base )
- MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", ":gdrom", ":pic", nullptr, NOOP)
+ MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", "gdrom", "pic", nullptr, NOOP)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tumbleb.cpp b/src/mame/drivers/tumbleb.cpp
index 291dcab7e68..9c00b3289e1 100644
--- a/src/mame/drivers/tumbleb.cpp
+++ b/src/mame/drivers/tumbleb.cpp
@@ -2063,7 +2063,6 @@ static MACHINE_CONFIG_START( tumblepb, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tumbleb)
MCFG_PALETTE_ADD("palette", 1024)
@@ -2102,7 +2101,6 @@ static MACHINE_CONFIG_START( tumbleb2, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tumbleb)
MCFG_PALETTE_ADD("palette", 1024)
@@ -2144,7 +2142,6 @@ static MACHINE_CONFIG_START( jumpkids, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tumbleb)
MCFG_PALETTE_ADD("palette", 1024)
@@ -2183,7 +2180,6 @@ static MACHINE_CONFIG_START( fncywld, tumbleb_state )
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_TRANSPEN(15)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", fncywld)
MCFG_PALETTE_ADD("palette", 0x800)
@@ -2246,7 +2242,6 @@ static MACHINE_CONFIG_START( htchctch, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tumbleb)
MCFG_PALETTE_ADD("palette", 1024)
@@ -2357,7 +2352,6 @@ static MACHINE_CONFIG_START( suprtrio, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", suprtrio)
MCFG_PALETTE_ADD("palette", 1024)
@@ -2396,7 +2390,6 @@ static MACHINE_CONFIG_START( pangpang, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tumbleb)
MCFG_PALETTE_ADD("palette", 1024)
diff --git a/src/mame/drivers/tumblep.cpp b/src/mame/drivers/tumblep.cpp
index ed7a0bbd561..6e68462322c 100644
--- a/src/mame/drivers/tumblep.cpp
+++ b/src/mame/drivers/tumblep.cpp
@@ -313,12 +313,10 @@ static MACHINE_CONFIG_START( tumblep, tumblep_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/turbo.cpp b/src/mame/drivers/turbo.cpp
index 44807c31aca..b6d3a1a3119 100644
--- a/src/mame/drivers/turbo.cpp
+++ b/src/mame/drivers/turbo.cpp
@@ -149,7 +149,7 @@
#include "emu.h"
#include "includes/turbo.h"
#include "machine/i8279.h"
-#include "machine/segacrpt.h"
+#include "machine/segacrpt_device.h"
#include "sound/samples.h"
#include "turbo.lh"
@@ -968,6 +968,17 @@ static MACHINE_CONFIG_DERIVED( buckrogu, buckrog )
MCFG_DEVICE_REMOVE_ADDRESS_MAP(AS_DECRYPTED_OPCODES)
MACHINE_CONFIG_END
+
+static MACHINE_CONFIG_DERIVED( buckroge, buckrog )
+
+ /* basic machine hardware */
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5014, MASTER_CLOCK/4)
+ MCFG_CPU_PROGRAM_MAP(buckrog_map)
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", turbo_state, irq0_line_hold)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+MACHINE_CONFIG_END
+
/*************************************
*
* ROM definitions
@@ -1751,32 +1762,6 @@ DRIVER_INIT_MEMBER(turbo_state,turbo_enc)
}
-DRIVER_INIT_MEMBER(turbo_state,buckrog_enc)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...0...0...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...1...0 */
- { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...1...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...1...0...0 */
- { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...0...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...1...1...1 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...0...0...0 */
- { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...0...1 */
- { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...1...1 */
- { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...1...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...1...0 */
- { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x88,0x80 } /* ...1...1...1...1 */
- };
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
-}
-
/*************************************
@@ -1794,7 +1779,7 @@ GAMEL( 1981, turbobl, turbo, turbo, turbo, driver_device, 0,
GAMEL( 1982, subroc3d, 0, subroc3d, subroc3d, driver_device, 0, ORIENTATION_FLIP_X, "Sega", "Subroc-3D", MACHINE_IMPERFECT_SOUND , layout_subroc3d )
-GAMEL( 1982, buckrog, 0, buckrog, buckrog, turbo_state, buckrog_enc, ROT0, "Sega", "Buck Rogers: Planet of Zoom", MACHINE_IMPERFECT_SOUND , layout_buckrog )
-GAMEL( 1982, buckrogn, buckrog, buckrogu, buckrog, driver_device, 0, ROT0, "Sega", "Buck Rogers: Planet of Zoom (not encrypted, set 1)", MACHINE_IMPERFECT_SOUND , layout_buckrog )
-GAMEL( 1982, buckrogn2,buckrog, buckrogu, buckrog, driver_device, 0, ROT0, "Sega", "Buck Rogers: Planet of Zoom (not encrypted, set 2)", MACHINE_IMPERFECT_SOUND , layout_buckrog )
-GAMEL( 1982, zoom909, buckrog, buckrog, buckrog, turbo_state, buckrog_enc, ROT0, "Sega", "Zoom 909", MACHINE_IMPERFECT_SOUND, layout_buckrog )
+GAMEL( 1982, buckrog, 0, buckroge, buckrog, driver_device, 0, ROT0, "Sega", "Buck Rogers: Planet of Zoom", MACHINE_IMPERFECT_SOUND , layout_buckrog )
+GAMEL( 1982, buckrogn, buckrog, buckrogu, buckrog, driver_device, 0, ROT0, "Sega", "Buck Rogers: Planet of Zoom (not encrypted, set 1)", MACHINE_IMPERFECT_SOUND , layout_buckrog )
+GAMEL( 1982, buckrogn2,buckrog, buckrogu, buckrog, driver_device, 0, ROT0, "Sega", "Buck Rogers: Planet of Zoom (not encrypted, set 2)", MACHINE_IMPERFECT_SOUND , layout_buckrog )
+GAMEL( 1982, zoom909, buckrog, buckroge, buckrog, driver_device, 0, ROT0, "Sega", "Zoom 909", MACHINE_IMPERFECT_SOUND, layout_buckrog )
diff --git a/src/mame/drivers/twincobr.cpp b/src/mame/drivers/twincobr.cpp
index 98991e2b173..91ea4263f49 100644
--- a/src/mame/drivers/twincobr.cpp
+++ b/src/mame/drivers/twincobr.cpp
@@ -614,6 +614,12 @@ static INPUT_PORTS_START( hishouza )
PORT_MODIFY("DSWA")
TOAPLAN_COINAGE_JAPAN_LOC(SW1) /* table at 0x000316 (COIN1 AND COIN2) */
+
+ PORT_MODIFY("DSWB")
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:!8")
+ PORT_DIPSETTING( 0x00, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
+
INPUT_PORTS_END
diff --git a/src/mame/drivers/undrfire.cpp b/src/mame/drivers/undrfire.cpp
index 65e79c5acee..b820a7a8565 100644
--- a/src/mame/drivers/undrfire.cpp
+++ b/src/mame/drivers/undrfire.cpp
@@ -708,7 +708,6 @@ static MACHINE_CONFIG_START( undrfire, undrfire_state )
MCFG_TC0480SCP_OFFSETS(0x24, 0)
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
@@ -757,7 +756,6 @@ static MACHINE_CONFIG_START( cbombers, undrfire_state )
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_COL_BASE(4096)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
diff --git a/src/mame/drivers/vaportra.cpp b/src/mame/drivers/vaportra.cpp
index 4f30b993a32..0eaa9a755b7 100644
--- a/src/mame/drivers/vaportra.cpp
+++ b/src/mame/drivers/vaportra.cpp
@@ -254,7 +254,6 @@ static MACHINE_CONFIG_START( vaportra, vaportra_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -270,12 +269,10 @@ static MACHINE_CONFIG_START( vaportra, vaportra_state )
MCFG_DECO16IC_PF12_8X8_BANK(2)
MCFG_DECO16IC_PF12_16X16_BANK(3)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 4);
+ MCFG_DECO_MXC06_GFX_REGION(4)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/vendetta.cpp b/src/mame/drivers/vendetta.cpp
index 04795e83708..8bd74706d79 100644
--- a/src/mame/drivers/vendetta.cpp
+++ b/src/mame/drivers/vendetta.cpp
@@ -460,16 +460,13 @@ static MACHINE_CONFIG_START( vendetta, vendetta_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k052109", K052109, 0)
MCFG_GFX_PALETTE("palette")
MCFG_K052109_CB(vendetta_state, vendetta_tile_callback)
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(vendetta_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, 53, 6)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, 53, 6)
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
@@ -507,7 +504,7 @@ static MACHINE_CONFIG_DERIVED( esckids, vendetta )
MCFG_K052109_CB(vendetta_state, esckids_tile_callback)
MCFG_DEVICE_MODIFY("k053246")
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, 101, 6)
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, 101, 6)
MCFG_DEVICE_ADD("k053252", K053252, 6000000)
MCFG_K053252_OFFSETS(12*8, 1*8)
diff --git a/src/mame/drivers/vsnes.cpp b/src/mame/drivers/vsnes.cpp
index 941cb3cb09f..c980ce50981 100644
--- a/src/mame/drivers/vsnes.cpp
+++ b/src/mame/drivers/vsnes.cpp
@@ -2150,21 +2150,22 @@ ROM_START( cluclu )
PALETTE_2C04_0004
ROM_END
-ROM_START( excitebk ) /* EB4-4 A = Excite Bike, Palette 4, rev A */
+
+ROM_START( excitebk ) /* EB4-3 = Excite Bike, Palette 3, revision 'E' */
ROM_REGION( 0x10000,"maincpu", 0 ) /* 6502 memory */
- ROM_LOAD( "mds-eb4-4 a.6d", 0x8000, 0x2000, CRC(6aa87037) SHA1(f3313700955498800a3d59c523ba2a4e0cf443bc) )
- ROM_LOAD( "mds-eb4-4 a.6c", 0xa000, 0x2000, CRC(bdb317db) SHA1(a8b3e8deb1e625d764aaffe86a513bc7ede51a46) )
- ROM_LOAD( "mds-eb4-4 a.6b", 0xc000, 0x2000, CRC(d1afe2dd) SHA1(ef0f44d98464b7dab7c51be4379242f7a4e4fcdd) )
- ROM_LOAD( "mds-eb4-4 a.6a", 0xe000, 0x2000, CRC(46711d0e) SHA1(6ce2f395b3f407671a87c6e1133ab63a637022f2) )
+ ROM_LOAD( "mds-eb4-3e.1d", 0x8000, 0x2000, CRC(f58a392e) SHA1(ca721e47e5dbe72d6f231d9b20b1ca33304c5370) )
+ ROM_LOAD( "mds-eb4-3e.1c", 0xa000, 0x2000, CRC(6ae01102) SHA1(f3f49644f7e2887e14655e8934c7c75d4b92968e) )
+ ROM_LOAD( "mds-eb4-3e.1b", 0xc000, 0x2000, CRC(fbc53465) SHA1(81c9ebac895dfbc5c451b4b32e5990aba3734714) )
+ ROM_LOAD( "mds-eb4-3e.1a", 0xe000, 0x2000, CRC(e2902b4e) SHA1(f559517c735847e2ad622418b8fa525d9c9adac3) )
ROM_REGION( 0x4000,"gfx1", 0 ) /* PPU memory */
- ROM_LOAD( "mds-eb4-4 a.8b", 0x0000, 0x2000, CRC(62a76c52) SHA1(7ebd0dac976abe8636f4f75a3b2a473d7a54934d) )
- ROM_LOAD( "mds-eb4-4 a.8a", 0x2000, 0x2000, CRC(a9b49a05) SHA1(c14706e6a5524f81e79c101e32deef9f3d60de3f) )
+ ROM_LOAD( "mds-eb4-3e.2b", 0x0000, 0x2000, CRC(80be1f50) SHA1(d8544b9a0a9d8719ab601fa9c68c4305385b14c7) )
+ ROM_LOAD( "mds-eb4-3e.2a", 0x2000, 0x2000, CRC(001e8e0b) SHA1(c4c2a11ade7788bac9dd61ea8de319c4111d2592) )
- PALETTE_2C04_0004
+ PALETTE_2C04_0003
ROM_END
-ROM_START( excitebka ) /* EB4-3 = Excite Bike, Palette 3, unknown revision */
+ROM_START( excitebko ) /* EB4-3 = Excite Bike, Palette 3, unknown revision */
ROM_REGION( 0x10000,"maincpu", 0 ) /* 6502 memory */
ROM_LOAD( "mds-eb4-3.1d", 0x8000, 0x2000, CRC(7e54df1d) SHA1(38d878041976386e8608c73133040b18d0e4b9cd) ) /* Need to verify correct label */
ROM_LOAD( "mds-eb4-3.1c", 0xa000, 0x2000, CRC(89baae91) SHA1(6aebf13c415e3246edf7daa847533b7e3ae0425f) ) /* Need to verify correct label */
@@ -2178,6 +2179,20 @@ ROM_START( excitebka ) /* EB4-3 = Excite Bike, Palette 3, unknown revision */
PALETTE_2C04_0003
ROM_END
+ROM_START( excitebkj ) /* EB4-4 A = Excite Bike, Palette 4, rev A */
+ ROM_REGION( 0x10000,"maincpu", 0 ) /* 6502 memory */
+ ROM_LOAD( "mds-eb4-4 a.6d", 0x8000, 0x2000, CRC(6aa87037) SHA1(f3313700955498800a3d59c523ba2a4e0cf443bc) )
+ ROM_LOAD( "mds-eb4-4 a.6c", 0xa000, 0x2000, CRC(bdb317db) SHA1(a8b3e8deb1e625d764aaffe86a513bc7ede51a46) )
+ ROM_LOAD( "mds-eb4-4 a.6b", 0xc000, 0x2000, CRC(d1afe2dd) SHA1(ef0f44d98464b7dab7c51be4379242f7a4e4fcdd) )
+ ROM_LOAD( "mds-eb4-4 a.6a", 0xe000, 0x2000, CRC(46711d0e) SHA1(6ce2f395b3f407671a87c6e1133ab63a637022f2) )
+
+ ROM_REGION( 0x4000,"gfx1", 0 ) /* PPU memory */
+ ROM_LOAD( "mds-eb4-4 a.8b", 0x0000, 0x2000, CRC(62a76c52) SHA1(7ebd0dac976abe8636f4f75a3b2a473d7a54934d) )
+ ROM_LOAD( "mds-eb4-4 a.8a", 0x2000, 0x2000, CRC(a9b49a05) SHA1(c14706e6a5524f81e79c101e32deef9f3d60de3f) )
+
+ PALETTE_2C04_0004
+ROM_END
+
ROM_START( jajamaru )
ROM_REGION( 0x10000,"maincpu", 0 ) /* 6502 memory */
ROM_LOAD( "10.bin", 0x8000, 0x2000, CRC(16af1704) SHA1(ebcf9ad06e302c51ee4432631a6b0fb85a9630ed) )
@@ -2787,8 +2802,9 @@ GAME( 1985, starlstr, 0, vsnes, starlstr, vsnes_state, vsnormal, ROT0,
GAME( 1987, cstlevna, 0, vsnes, cstlevna, vsnes_state, vsvram, ROT0, "Konami", "Vs. Castlevania", 0 )
GAME( 1984, cluclu, 0, vsnes, cluclu, vsnes_state, vsnormal, ROT0, "Nintendo", "Vs. Clu Clu Land", 0 )
GAME( 1990, drmario, 0, vsnes, drmario, vsnes_state, drmario, ROT0, "Nintendo", "Vs. Dr. Mario", 0 )
-GAME( 1984, excitebk, 0, vsnes, excitebk, vsnes_state, vsnormal, ROT0, "Nintendo", "Vs. Excitebike (set EB4-4 A)", 0 )
-GAME( 1984, excitebka,excitebk, vsnes, excitebk, vsnes_state, vsnormal, ROT0, "Nintendo", "Vs. Excitebike (set EB4-3 ?)", 0 )
+GAME( 1984, excitebk, 0, vsnes, excitebk, vsnes_state, vsnormal, ROT0, "Nintendo", "Vs. Excitebike (set EB4-3 E)", 0 )
+GAME( 1984, excitebko,excitebk, vsnes, excitebk, vsnes_state, vsnormal, ROT0, "Nintendo", "Vs. Excitebike (set EB4-3 ?)", 0 ) // older
+GAME( 1984, excitebkj,excitebk, vsnes, excitebk, vsnes_state, vsnormal, ROT0, "Nintendo", "Vs. Excitebike (set EB4-4 A)", 0 ) // likely Japan
GAME( 1986, goonies, 0, vsnes, goonies, vsnes_state, vskonami, ROT0, "Konami", "Vs. The Goonies (set E)", 0 )
GAME( 1984, iceclimb, 0, vsnes, iceclmbj, vsnes_state, vsnormal, ROT0, "Nintendo", "Vs. Ice Climber (set IC4-4 B-1)", 0 )
GAME( 1984, iceclimba,iceclimb, vsnes, iceclimb, vsnes_state, vsnormal, ROT0, "Nintendo", "Vs. Ice Climber (set IC4-4 ?)", 0 )
diff --git a/src/mame/drivers/welltris.cpp b/src/mame/drivers/welltris.cpp
index 05b29b06cfc..5d547ef911e 100644
--- a/src/mame/drivers/welltris.cpp
+++ b/src/mame/drivers/welltris.cpp
@@ -723,7 +723,6 @@ static MACHINE_CONFIG_START( welltris, welltris_state )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR2_SET_PRITYPE(-1)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/xexex.cpp b/src/mame/drivers/xexex.cpp
index 24098d42aca..c9d3ebf32a8 100644
--- a/src/mame/drivers/xexex.cpp
+++ b/src/mame/drivers/xexex.cpp
@@ -521,18 +521,14 @@ static MACHINE_CONFIG_START( xexex, xexex_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(xexex_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(xexex_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, -48, 32)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -48, 32)
MCFG_K053246_PALETTE("palette")
MCFG_K053250_ADD("k053250", "palette", "screen", -5, -16)
diff --git a/src/mame/drivers/xmen.cpp b/src/mame/drivers/xmen.cpp
index fb5e3a62705..c924ce91528 100644
--- a/src/mame/drivers/xmen.cpp
+++ b/src/mame/drivers/xmen.cpp
@@ -336,16 +336,13 @@ static MACHINE_CONFIG_START( xmen, xmen_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k052109", K052109, 0)
MCFG_GFX_PALETTE("palette")
MCFG_K052109_CB(xmen_state, tile_callback)
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(xmen_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, 53, -2)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, 53, -2)
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
@@ -399,17 +396,14 @@ static MACHINE_CONFIG_START( xmen6p, xmen_state )
MCFG_VIDEO_START_OVERRIDE(xmen_state,xmen6p)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k052109", K052109, 0)
MCFG_GFX_PALETTE("palette")
MCFG_K052109_CB(xmen_state, tile_callback)
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(xmen_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, 53, -2)
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, 53, -2)
MCFG_K053246_SET_SCREEN("screen")
- MCFG_K053246_GFXDECODE("gfxdecode")
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
diff --git a/src/mame/drivers/zaxxon.cpp b/src/mame/drivers/zaxxon.cpp
index e87d8125f91..ace1f3e2fbd 100644
--- a/src/mame/drivers/zaxxon.cpp
+++ b/src/mame/drivers/zaxxon.cpp
@@ -257,7 +257,7 @@
#include "cpu/z80/z80.h"
#include "sound/sn76496.h"
#include "sound/samples.h"
-#include "machine/segacrpt.h"
+#include "machine/segacrpt_device.h"
#include "machine/i8255.h"
#include "audio/segasnd.h"
#include "includes/zaxxon.h"
@@ -942,19 +942,33 @@ static MACHINE_CONFIG_DERIVED( zaxxon, root )
MCFG_FRAGMENT_ADD(zaxxon_samples)
MACHINE_CONFIG_END
+
+
static MACHINE_CONFIG_DERIVED( szaxxon, zaxxon )
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+MACHINE_CONFIG_END
- /* encryption */
- MCFG_DEVICE_MODIFY("maincpu")
+
+static MACHINE_CONFIG_DERIVED( szaxxone, zaxxon )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5013, MASTER_CLOCK/16)
+ MCFG_CPU_PROGRAM_MAP(zaxxon_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", zaxxon_state, vblank_int)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+ MCFG_SEGACRPT_SET_SIZE(0x6000)
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( futspy, root )
- /* encryption */
- MCFG_DEVICE_MODIFY("maincpu")
+static MACHINE_CONFIG_DERIVED( futspye, root )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5061, MASTER_CLOCK/16)
+ MCFG_CPU_PROGRAM_MAP(zaxxon_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", zaxxon_state, vblank_int)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+ MCFG_SEGACRPT_SET_SIZE(0x6000)
+
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
@@ -963,14 +977,19 @@ static MACHINE_CONFIG_DERIVED( futspy, root )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_FRAGMENT_ADD(zaxxon_samples)
+
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( razmataz, root )
- MCFG_CPU_MODIFY("maincpu")
+
+static MACHINE_CONFIG_DERIVED( razmataze, root )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5098, MASTER_CLOCK/16)
MCFG_CPU_PROGRAM_MAP(ixion_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", zaxxon_state, vblank_int)
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+ MCFG_SEGACRPT_SET_SIZE(0x6000)
MCFG_DEVICE_REMOVE("ppi8255")
@@ -984,6 +1003,14 @@ static MACHINE_CONFIG_DERIVED( razmataz, root )
MCFG_SEGAUSBROM_ADD("usbsnd")
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( ixion, razmataze )
+ MCFG_CPU_REPLACE("maincpu", SEGA_315_5013, MASTER_CLOCK/16)
+ MCFG_CPU_PROGRAM_MAP(ixion_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", zaxxon_state, vblank_int)
+ MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
+ MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes")
+ MCFG_SEGACRPT_SET_SIZE(0x6000)
+MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( congo, root )
@@ -1522,90 +1549,9 @@ DRIVER_INIT_MEMBER(zaxxon_state,zaxxonj)
}
-DRIVER_INIT_MEMBER(zaxxon_state,szaxxon)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...0...0 */
- { 0x08,0x28,0x88,0xa8 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...1 */
- { 0xa8,0x28,0xa0,0x20 }, { 0x20,0xa0,0x00,0x80 }, /* ...0...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...1...1 */
- { 0x08,0x28,0x88,0xa8 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...0...1 */
- { 0xa8,0x28,0xa0,0x20 }, { 0x20,0xa0,0x00,0x80 }, /* ...0...1...1...0 */
- { 0x08,0x28,0x88,0xa8 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...1...1 */
- { 0x08,0x28,0x88,0xa8 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...0...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...1...0 */
- { 0xa8,0x28,0xa0,0x20 }, { 0x20,0xa0,0x00,0x80 }, /* ...1...0...1...1 */
- { 0xa8,0x28,0xa0,0x20 }, { 0x20,0xa0,0x00,0x80 }, /* ...1...1...0...0 */
- { 0xa8,0x28,0xa0,0x20 }, { 0x20,0xa0,0x00,0x80 }, /* ...1...1...0...1 */
- { 0x08,0x28,0x88,0xa8 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 } /* ...1...1...1...1 */
- };
-
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x6000, convtable);
-}
-
-
-DRIVER_INIT_MEMBER(zaxxon_state,futspy)
-{
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x28,0x08,0x20,0x00 }, { 0x28,0x08,0x20,0x00 }, /* ...0...0...0...0 */
- { 0x80,0x00,0xa0,0x20 }, { 0x08,0x88,0x00,0x80 }, /* ...0...0...0...1 */
- { 0x80,0x00,0xa0,0x20 }, { 0x08,0x88,0x00,0x80 }, /* ...0...0...1...0 */
- { 0xa0,0x80,0x20,0x00 }, { 0x20,0x28,0xa0,0xa8 }, /* ...0...0...1...1 */
- { 0x28,0x08,0x20,0x00 }, { 0x88,0x80,0xa8,0xa0 }, /* ...0...1...0...0 */
- { 0x80,0x00,0xa0,0x20 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...0...1 */
- { 0x80,0x00,0xa0,0x20 }, { 0x20,0x28,0xa0,0xa8 }, /* ...0...1...1...0 */
- { 0x20,0x28,0xa0,0xa8 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...1...1 */
- { 0x88,0x80,0xa8,0xa0 }, { 0x28,0x08,0x20,0x00 }, /* ...1...0...0...0 */
- { 0x80,0x00,0xa0,0x20 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...0...1 */
- { 0x20,0x28,0xa0,0xa8 }, { 0x08,0x88,0x00,0x80 }, /* ...1...0...1...0 */
- { 0x80,0x00,0xa0,0x20 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...0...1...1 */
- { 0x88,0x80,0xa8,0xa0 }, { 0x88,0x80,0xa8,0xa0 }, /* ...1...1...0...0 */
- { 0x80,0x00,0xa0,0x20 }, { 0x08,0x88,0x00,0x80 }, /* ...1...1...0...1 */
- { 0x80,0x00,0xa0,0x20 }, { 0x28,0x08,0x20,0x00 }, /* ...1...1...1...0 */
- { 0x20,0x28,0xa0,0xa8 }, { 0xa0,0x80,0x20,0x00 } /* ...1...1...1...1 */
- };
-
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x6000, convtable);
-}
-
DRIVER_INIT_MEMBER(zaxxon_state,razmataz)
{
- // Note: same as nprinces
- static const UINT8 convtable[32][4] =
- {
- /* opcode data address */
- /* A B C D A B C D */
- { 0x08,0x88,0x00,0x80 }, { 0xa0,0x20,0x80,0x00 }, /* ...0...0...0...0 */
- { 0xa8,0xa0,0x28,0x20 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
- { 0x88,0x80,0x08,0x00 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...0...1...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x20,0x80,0x00 }, /* ...0...1...0...0 */
- { 0xa8,0xa0,0x28,0x20 }, { 0xa8,0xa0,0x28,0x20 }, /* ...0...1...0...1 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...1...1 */
- { 0xa0,0x20,0x80,0x00 }, { 0xa0,0x20,0x80,0x00 }, /* ...1...0...0...0 */
- { 0x08,0x88,0x00,0x80 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...0...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...1...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...1...1 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...0...0 */
- { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...0...1 */
- { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...1...0 */
- { 0x08,0x88,0x00,0x80 }, { 0x28,0x08,0xa8,0x88 } /* ...1...1...1...1 */
- };
-
-
- sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x6000, convtable);
-
address_space &pgmspace = m_maincpu->space(AS_PROGRAM);
/* additional input ports are wired */
@@ -1637,15 +1583,15 @@ GAME( 1982, zaxxonj, zaxxon, szaxxon, zaxxon, zaxxon_state, zaxxonj, ROT90
GAME( 1982, zaxxonb, zaxxon, szaxxon, zaxxon, zaxxon_state, zaxxonj, ROT90, "bootleg", "Jackson", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
/* standard Zaxxon hardware but extra sound board plugged into 8255 PPI socket and encrypted cpu */
-GAME( 1982, szaxxon, 0, szaxxon, szaxxon, zaxxon_state, szaxxon, ROT90, "Sega", "Super Zaxxon (315-5013)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1982, szaxxon, 0, szaxxone, szaxxon, driver_device, 0, ROT90, "Sega", "Super Zaxxon (315-5013)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
/* standard Zaxxon hardware? but encrypted cpu */
-GAME( 1984, futspy, 0, futspy, futspy, zaxxon_state, futspy, ROT90, "Sega", "Future Spy (315-5061)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1984, futspy, 0, futspye, futspy, driver_device, 0, ROT90, "Sega", "Future Spy (315-5061)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
/* these games run on modified Zaxxon hardware with no skewing, extra inputs, and a */
/* G-80 Universal Sound Board */
-GAME( 1983, razmataz, 0, razmataz, razmataz, zaxxon_state, razmataz, ROT90, "Sega", "Razzmatazz", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1983, ixion, 0, razmataz, ixion, zaxxon_state, szaxxon, ROT270, "Sega", "Ixion (prototype)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE)
+GAME( 1983, razmataz, 0, razmataze, razmataz, zaxxon_state, razmataz, ROT90, "Sega", "Razzmatazz", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1983, ixion, 0, ixion, ixion, driver_device, 0, ROT270, "Sega", "Ixion (prototype)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE)
/* these games run on a slightly newer Zaxxon hardware with more ROM space and a */
/* custom sprite DMA chip */
diff --git a/src/mame/drivers/zr107.cpp b/src/mame/drivers/zr107.cpp
index f838f3e21e2..202c0f102f9 100644
--- a/src/mame/drivers/zr107.cpp
+++ b/src/mame/drivers/zr107.cpp
@@ -784,12 +784,9 @@ static MACHINE_CONFIG_START( zr107, zr107_state )
MCFG_VIDEO_START_OVERRIDE(zr107_state,zr107)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(zr107_state, tile_callback)
- MCFG_K056832_CONFIG("gfx2", 1, K056832_BPP_8, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx2", K056832_BPP_8, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k001005", K001005, 0)
@@ -856,16 +853,11 @@ static MACHINE_CONFIG_START( jetwave, zr107_state )
MCFG_VIDEO_START_OVERRIDE(zr107_state,jetwave)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k001604", K001604, 0)
- MCFG_K001604_GFX_INDEX1(0)
- MCFG_K001604_GFX_INDEX2(1)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(0)
MCFG_K001604_TXT_OFFSET(0)
MCFG_K001604_ROZ_OFFSET(16384)
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_DEVICE_ADD("k001005", K001005, 0)
diff --git a/src/mame/includes/angelkds.h b/src/mame/includes/angelkds.h
index 1617fc2579a..22ebca1505e 100644
--- a/src/mame/includes/angelkds.h
+++ b/src/mame/includes/angelkds.h
@@ -55,7 +55,6 @@ public:
DECLARE_WRITE8_MEMBER(angelkds_bgbotscroll_write);
DECLARE_WRITE8_MEMBER(angelkds_layer_ctrl_write);
DECLARE_DRIVER_INIT(angelkds);
- DECLARE_DRIVER_INIT(spcpostn);
TILE_GET_INFO_MEMBER(get_tx_tile_info);
TILE_GET_INFO_MEMBER(get_bgtop_tile_info);
TILE_GET_INFO_MEMBER(get_bgbot_tile_info);
diff --git a/src/mame/includes/appoooh.h b/src/mame/includes/appoooh.h
index 34e49e02c8b..94cbae0b9fb 100644
--- a/src/mame/includes/appoooh.h
+++ b/src/mame/includes/appoooh.h
@@ -52,7 +52,6 @@ public:
DECLARE_WRITE8_MEMBER(bg_videoram_w);
DECLARE_WRITE8_MEMBER(bg_colorram_w);
DECLARE_WRITE8_MEMBER(out_w);
- DECLARE_DRIVER_INIT(robowres);
DECLARE_DRIVER_INIT(robowresb);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
diff --git a/src/mame/includes/artmagic.h b/src/mame/includes/artmagic.h
index 32f56fd2747..575c90b15cf 100644
--- a/src/mame/includes/artmagic.h
+++ b/src/mame/includes/artmagic.h
@@ -20,6 +20,7 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_oki(*this, "oki"),
+ m_oki_region(*this, "oki"),
m_tms(*this, "tms"),
m_tlc34076(*this, "tlc34076"),
m_control(*this, "control"),
@@ -28,6 +29,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<okim6295_device> m_oki;
+ required_memory_region m_oki_region;
required_device<tms34010_device> m_tms;
required_device<tlc34076_device> m_tlc34076;
diff --git a/src/mame/includes/cybiko.h b/src/mame/includes/cybiko.h
index 0c6ad30b5aa..5ccbc687a90 100644
--- a/src/mame/includes/cybiko.h
+++ b/src/mame/includes/cybiko.h
@@ -19,7 +19,6 @@
/* Core includes */
#include "emu.h"
-#include "emuopts.h"
#include "sound/speaker.h"
/* Components */
diff --git a/src/mame/includes/fidelz80.h b/src/mame/includes/fidelz80.h
index 3f57cc38ec6..56d17e7339f 100644
--- a/src/mame/includes/fidelz80.h
+++ b/src/mame/includes/fidelz80.h
@@ -1,5 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco,hap
+// thanks-to:Berger
/******************************************************************************
*
* Fidelity Electronics Z80 based board driver
diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h
index 01fad97eb95..669cc95b4ca 100644
--- a/src/mame/includes/harddriv.h
+++ b/src/mame/includes/harddriv.h
@@ -257,6 +257,8 @@ protected:
optional_device<dsp32c_device> m_dsp32;
optional_device<adsp2105_device> m_ds3sdsp;
optional_device<adsp2105_device> m_ds3xdsp;
+ optional_memory_region m_ds3sdsp_region;
+ optional_memory_region m_ds3xdsp_region;
optional_device<dac_device> m_ds3dac1;
optional_device<dac_device> m_ds3dac2;
optional_device<harddriv_sound_board_device> m_harddriv_sound;
@@ -339,8 +341,7 @@ protected:
UINT16 m_adsp_som_address;
UINT32 m_adsp_eprom_base;
- UINT16 * m_sim_memory;
- UINT32 m_sim_memory_size;
+ required_region_ptr<UINT16> m_sim_memory;
UINT16 m_som_memory[0x8000/2];
UINT16 * m_adsp_pgm_memory_word;
diff --git a/src/mame/includes/intv.h b/src/mame/includes/intv.h
index 7f14c7fb55a..4155499db7d 100644
--- a/src/mame/includes/intv.h
+++ b/src/mame/includes/intv.h
@@ -16,6 +16,9 @@
#include "bus/intv/ecs.h"
//#include "bus/intv/keycomp.h"
+#include "bus/intv_ctrl/ctrl.h"
+#include "bus/intv_ctrl/handctrl.h"
+
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
@@ -43,7 +46,6 @@ public:
m_iocart2(*this, "ioslot2"),
m_region_maincpu(*this, "maincpu"),
m_region_keyboard(*this, "keyboard"),
- m_io_options(*this, "OPTIONS"),
m_io_test(*this, "TEST"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette")
@@ -118,19 +120,13 @@ protected:
optional_device<generic_slot_device> m_iocart2;
required_memory_region m_region_maincpu;
optional_memory_region m_region_keyboard;
- required_ioport m_io_options;
optional_ioport m_io_test;
optional_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- ioport_port *m_keypad[4];
- ioport_port *m_disc[4];
- ioport_port *m_discx[4];
- ioport_port *m_discy[4];
ioport_port *m_intv_keyboard[10];
- UINT8 intv_control_r(int hand);
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
diff --git a/src/mame/includes/konamigx.h b/src/mame/includes/konamigx.h
index f5ee6f795d5..fb5f54f28d5 100644
--- a/src/mame/includes/konamigx.h
+++ b/src/mame/includes/konamigx.h
@@ -52,7 +52,7 @@ public:
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_soundcpu;
optional_device<tms57002_device> m_dasp;
- required_device<k053252_device> m_k053252; // not hooked up in tasman.cpp yet (does it even have it?)
+ required_device<k053252_device> m_k053252;
required_device<k055673_device> m_k055673;
required_device<k055555_device> m_k055555;
required_device<k056832_device> m_k056832;
@@ -60,7 +60,7 @@ public:
optional_device<k056800_device> m_k056800;
optional_device<k054539_device> m_k054539_1;
optional_device<k054539_device> m_k054539_2;
- required_device<gfxdecode_device> m_gfxdecode;
+ optional_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
diff --git a/src/mame/includes/model1.h b/src/mame/includes/model1.h
index 824766648e5..fac0eec2ed4 100644
--- a/src/mame/includes/model1.h
+++ b/src/mame/includes/model1.h
@@ -89,6 +89,9 @@ public:
float m_tgp_vr_circrad;
float m_tgp_vr_cbox[12];
int m_tgp_vr_select;
+
+ float m_tgp_int_px, m_tgp_int_py, m_tgp_int_pz;
+ UINT32 m_tgp_int_adr;
UINT16 m_ram_adr;
UINT16 m_ram_latch[2];
UINT16 m_ram_scanadr;
@@ -180,12 +183,12 @@ public:
DECLARE_TGP_FUNCTION( clear_stack );
DECLARE_TGP_FUNCTION( matrix_mul );
DECLARE_TGP_FUNCTION( anglev );
- DECLARE_TGP_FUNCTION( f11 );
+ DECLARE_TGP_FUNCTION( triangle_normal );
DECLARE_TGP_FUNCTION( normalize );
DECLARE_TGP_FUNCTION( acc_seti );
DECLARE_TGP_FUNCTION( track_select );
- DECLARE_TGP_FUNCTION( f14 );
- DECLARE_TGP_FUNCTION( f15_swa );
+ DECLARE_TGP_FUNCTION( load_base );
+ DECLARE_TGP_FUNCTION( transpose );
DECLARE_TGP_FUNCTION( anglep );
DECLARE_TGP_FUNCTION( matrix_ident );
DECLARE_TGP_FUNCTION( matrix_read );
@@ -195,7 +198,7 @@ public:
DECLARE_TGP_FUNCTION( matrix_roty );
DECLARE_TGP_FUNCTION( matrix_rotz );
DECLARE_TGP_FUNCTION( track_read_quad );
- DECLARE_TGP_FUNCTION( f24_swa );
+ DECLARE_TGP_FUNCTION( intercept );
DECLARE_TGP_FUNCTION( transform_point );
DECLARE_TGP_FUNCTION( fcos_m1 );
DECLARE_TGP_FUNCTION( fsin_m1 );
@@ -214,9 +217,9 @@ public:
DECLARE_TGP_FUNCTION( xyz2rqf );
DECLARE_TGP_FUNCTION( f43 );
DECLARE_TGP_FUNCTION( f43_swa );
- DECLARE_TGP_FUNCTION( f44 );
+ DECLARE_TGP_FUNCTION( track_read_tri );
DECLARE_TGP_FUNCTION( matrix_sdir );
- DECLARE_TGP_FUNCTION( f45 );
+ DECLARE_TGP_FUNCTION( fsqrt );
DECLARE_TGP_FUNCTION( vlength );
DECLARE_TGP_FUNCTION( f47 );
DECLARE_TGP_FUNCTION( track_read_info );
@@ -228,10 +231,10 @@ public:
DECLARE_TGP_FUNCTION( matrix_rdir );
DECLARE_TGP_FUNCTION( track_lookup );
DECLARE_TGP_FUNCTION( f56 );
- DECLARE_TGP_FUNCTION( f57 );
+ DECLARE_TGP_FUNCTION( int_normal );
DECLARE_TGP_FUNCTION( matrix_readt );
DECLARE_TGP_FUNCTION( acc_geti );
- DECLARE_TGP_FUNCTION( f60 );
+ DECLARE_TGP_FUNCTION( int_point );
DECLARE_TGP_FUNCTION( col_setcirc );
DECLARE_TGP_FUNCTION( col_testpt );
DECLARE_TGP_FUNCTION( push_and_ident );
diff --git a/src/mame/includes/model3.h b/src/mame/includes/model3.h
index 1c66bf531c9..24956b46159 100644
--- a/src/mame/includes/model3.h
+++ b/src/mame/includes/model3.h
@@ -123,7 +123,6 @@ public:
int m_lightgun_reg_sel;
int m_adc_channel;
UINT64 m_real3d_status;
- std::unique_ptr<UINT64[]> m_network_ram;
int m_prot_data_ptr;
std::unique_ptr<UINT32[]> m_vrom;
int m_step;
@@ -215,8 +214,6 @@ public:
DECLARE_READ64_MEMBER(real3d_status_r);
DECLARE_READ8_MEMBER(model3_sound_r);
DECLARE_WRITE8_MEMBER(model3_sound_w);
- DECLARE_READ64_MEMBER(network_r);
- DECLARE_WRITE64_MEMBER(network_w);
DECLARE_WRITE64_MEMBER(daytona2_rombank_w);
DECLARE_WRITE16_MEMBER(model3snd_ctrl);
diff --git a/src/mame/includes/naomi.h b/src/mame/includes/naomi.h
index 3e1e6c80eb0..74b981da5de 100644
--- a/src/mame/includes/naomi.h
+++ b/src/mame/includes/naomi.h
@@ -25,6 +25,7 @@ naomi.h -> NAOMI includes
#include "machine/aicartc.h"
#include "machine/jvsdev.h"
#include "machine/jvs13551.h"
+#include "machine/m3comm.h"
#include "dc.h"
enum {
diff --git a/src/mame/includes/nb1414m4.h b/src/mame/includes/nb1414m4.h
index b00bdf6ae2e..2832d6a38b2 100644
--- a/src/mame/includes/nb1414m4.h
+++ b/src/mame/includes/nb1414m4.h
@@ -24,7 +24,7 @@ private:
void _0600(UINT8 is2p, UINT8 *vram);
void _0e00(UINT16 mcu_cmd, UINT8 *vram);
- optional_region_ptr<UINT8> m_data;
+ required_region_ptr<UINT8> m_data;
};
diff --git a/src/mame/includes/pbaction.h b/src/mame/includes/pbaction.h
index 4fcd6b64574..aa7fa2ddd35 100644
--- a/src/mame/includes/pbaction.h
+++ b/src/mame/includes/pbaction.h
@@ -54,7 +54,6 @@ public:
DECLARE_WRITE8_MEMBER(pbaction_scroll_w);
DECLARE_WRITE8_MEMBER(pbaction_flipscreen_w);
DECLARE_DRIVER_INIT(pbactio3);
- DECLARE_DRIVER_INIT(pbactio4);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void machine_start() override;
diff --git a/src/mame/includes/playch10.h b/src/mame/includes/playch10.h
index a97de718bd3..7878803b073 100644
--- a/src/mame/includes/playch10.h
+++ b/src/mame/includes/playch10.h
@@ -119,6 +119,7 @@ public:
DECLARE_DRIVER_INIT(pcfboard);
DECLARE_DRIVER_INIT(pcfboard_2);
DECLARE_DRIVER_INIT(virus);
+ DECLARE_DRIVER_INIT(ttoon);
DECLARE_DRIVER_INIT(pcgboard);
DECLARE_DRIVER_INIT(pcgboard_type2);
DECLARE_DRIVER_INIT(pchboard);
diff --git a/src/mame/includes/segas18.h b/src/mame/includes/segas18.h
index 5efbcfea648..79726c3c253 100644
--- a/src/mame/includes/segas18.h
+++ b/src/mame/includes/segas18.h
@@ -27,6 +27,7 @@ public:
: sega_16bit_common_base(mconfig, type, tag),
m_mapper(*this, "mapper"),
m_maincpu(*this, "maincpu"),
+ m_maincpu_region(*this, "maincpu"),
m_soundcpu(*this, "soundcpu"),
m_mcu(*this, "mcu"),
m_vdp(*this, "gen_vdp"),
@@ -128,6 +129,7 @@ protected:
// devices
required_device<sega_315_5195_mapper_device> m_mapper;
required_device<m68000_device> m_maincpu;
+ required_memory_region m_maincpu_region;
required_device<z80_device> m_soundcpu;
optional_device<i8751_device> m_mcu;
required_device<sega315_5313_device> m_vdp;
diff --git a/src/mame/includes/segaybd.h b/src/mame/includes/segaybd.h
index 2fb72a602ee..baf0b1d7c37 100644
--- a/src/mame/includes/segaybd.h
+++ b/src/mame/includes/segaybd.h
@@ -26,7 +26,7 @@ public:
m_suby(*this, "suby"),
m_soundcpu(*this, "soundcpu"),
m_linkcpu(*this, "linkcpu"),
- m_bsprites(*this, "sprites"),
+ m_bsprites(*this, "bsprites"),
m_ysprites(*this, "ysprites"),
m_segaic16vid(*this, "segaic16vid"),
m_digital_ports(*this, digital_ports),
diff --git a/src/mame/includes/system1.h b/src/mame/includes/system1.h
index 14a00ebc8da..86f437f732e 100644
--- a/src/mame/includes/system1.h
+++ b/src/mame/includes/system1.h
@@ -2,6 +2,7 @@
// copyright-holders:Jarek Parchanski, Nicola Salmoria, Mirko Buffoni
#include "cpu/z80/z80.h"
#include "machine/i8255.h"
+#include "machine/segacrp2_device.h"
class system1_state : public driver_device
{
@@ -14,6 +15,7 @@ public:
m_nob_mcu_latch(*this, "nob_mcu_latch"),
m_nob_mcu_status(*this, "nob_mcu_status"),
m_paletteram(*this, "palette"),
+ m_videomode_custom(nullptr),
m_maincpu(*this, "maincpu"),
m_soundcpu(*this, "soundcpu"),
m_mcu(*this, "mcu"),
@@ -25,7 +27,9 @@ public:
m_color_prom(*this, "palette"),
m_bank1(*this, "bank1"),
m_bank0d(*this, "bank0d"),
- m_bank1d(*this, "bank1d") { }
+ m_bank1d(*this, "bank1d"),
+ m_banked_decrypted_opcodes(nullptr)
+ { }
optional_device<i8255_device> m_ppi8255;
required_shared_ptr<UINT8> m_ram;
@@ -82,52 +86,30 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(dakkochn_mux_status_r);
DECLARE_WRITE8_MEMBER(sound_control_w);
+ DECLARE_DRIVER_INIT(bank00);
+ DECLARE_DRIVER_INIT(bank0c);
+ DECLARE_DRIVER_INIT(bank44);
+
DECLARE_DRIVER_INIT(nobb);
- DECLARE_DRIVER_INIT(sega315_5178);
- DECLARE_DRIVER_INIT(sega315_5110);
- DECLARE_DRIVER_INIT(sega315_5093);
DECLARE_DRIVER_INIT(dakkochn);
DECLARE_DRIVER_INIT(bootleg);
-
DECLARE_DRIVER_INIT(shtngmst);
- DECLARE_DRIVER_INIT(sega315_5135);
- DECLARE_DRIVER_INIT(sega315_5048);
- DECLARE_DRIVER_INIT(sega315_5033);
- DECLARE_DRIVER_INIT(bank0c);
DECLARE_DRIVER_INIT(blockgal);
DECLARE_DRIVER_INIT(nob);
- DECLARE_DRIVER_INIT(sega315_5041);
- DECLARE_DRIVER_INIT(sega315_5155);
- DECLARE_DRIVER_INIT(sega315_5051);
- DECLARE_DRIVER_INIT(bank44);
DECLARE_DRIVER_INIT(myherok);
- DECLARE_DRIVER_INIT(sega315_5064);
- DECLARE_DRIVER_INIT(bank00);
- DECLARE_DRIVER_INIT(sega315_5132);
DECLARE_DRIVER_INIT(ufosensi);
- DECLARE_DRIVER_INIT(sega315_5098);
DECLARE_DRIVER_INIT(wbml);
DECLARE_DRIVER_INIT(bootsys2);
DECLARE_DRIVER_INIT(bootsys2d);
- DECLARE_DRIVER_INIT(sega315_5065);
- DECLARE_DRIVER_INIT(sega315_5177);
- DECLARE_DRIVER_INIT(sega315_5177_s2);
- DECLARE_DRIVER_INIT(sega315_3135);
- DECLARE_DRIVER_INIT(gardiab);
- DECLARE_DRIVER_INIT(sega315_5162);
DECLARE_DRIVER_INIT(choplift);
- DECLARE_DRIVER_INIT(sega315_5102);
- DECLARE_DRIVER_INIT(sega315_5133);
- DECLARE_DRIVER_INIT(gardia);
- DECLARE_DRIVER_INIT(sega315_spat);
- DECLARE_DRIVER_INIT(sega315_5099);
TILE_GET_INFO_MEMBER(tile_get_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_MACHINE_START(system2);
DECLARE_VIDEO_START(system2);
+ DECLARE_MACHINE_START(myherok);
UINT32 screen_update_system1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_system2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_system2_rowscroll(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/turbo.h b/src/mame/includes/turbo.h
index e2d0ea2ab2d..830fb9a7f6f 100644
--- a/src/mame/includes/turbo.h
+++ b/src/mame/includes/turbo.h
@@ -149,7 +149,6 @@ public:
DECLARE_WRITE8_MEMBER(buckrog_ppi1c_w);
DECLARE_READ8_MEMBER(turbo_analog_r);
DECLARE_WRITE8_MEMBER(buckrog_i8255_0_w);
- DECLARE_DRIVER_INIT(buckrog_enc);
DECLARE_DRIVER_INIT(turbo_enc);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
DECLARE_VIDEO_START(turbo);
diff --git a/src/mame/includes/xbox.h b/src/mame/includes/xbox.h
index 8af8e83635d..5d11a86043d 100644
--- a/src/mame/includes/xbox.h
+++ b/src/mame/includes/xbox.h
@@ -70,6 +70,45 @@ enum OHCIRegisters {
HcRhPortStatus1
};
+enum HcControlBits
+{
+ CBSR = 1 << 0, // ControlBulkServiceRatio
+ PLE = 1 << 2, // PeriodicListEnable
+ IE = 1 << 3, // IsochronousEnable
+ CLE = 1 << 4, // ControlListEnable
+ BLE = 1 << 5, // BulkListEnable
+ HCFS = 1 << 6, // HostControllerFunctionalState
+ IR = 1 << 8, // InterruptRouting
+ RWC = 1 << 9, // RemoteWakeupConnected
+ RWE = 1 << 10 // RemoteWakeupEnable
+};
+
+enum HcRhStatusBits
+{
+ LPS = 1 << 0, // LocalPowerStatus
+ OCI = 1 << 1, // OverCurrentIndicator
+ DRWE = 1 << 15, // DeviceRemoteWakeupEnable
+ LPSC = 1 << 16, // LocalPowerStatusChange
+ OCIC = 1 << 17, // OverCurrentIndicatorChange
+ CRWE = 1 << 31, // ClearRemoteWakeupEnable
+};
+
+enum HcRhPortStatusBits
+{
+ CCS = 1 << 0, // CurrentConnectStatus
+ PES = 1 << 1, // PortEnableStatus
+ PSS = 1 << 2, // PortSuspendStatus
+ POCI = 1 << 3, // PortOverCurrentIndicator
+ PRS = 1 << 4, // PortResetStatus
+ PPS = 1 << 8, // PortPowerStatus
+ LSDA = 1 << 9, // LowSpeedDeviceAttached
+ CSC = 1 << 16, // ConnectStatusChange
+ PESC = 1 << 17, // PortEnableStatusChange
+ PSSC = 1 << 18, // PortSuspendStatusChange
+ POCIC = 1 << 19, // PortOverCurrentIndicatorChange
+ PRSC = 1 << 20 // PortResetStatusChange
+};
+
enum OHCIHostControllerFunctionalState {
UsbReset=0,
UsbResume,
@@ -257,11 +296,15 @@ struct usb_device_configuration
std::forward_list<usb_device_interface *> interfaces;
};
+class xbox_base_state; // forward declaration
+
class ohci_function_device {
public:
- ohci_function_device(running_machine &machine);
- void execute_reset();
- int execute_transfer(int address, int endpoint, int pid, UINT8 *buffer, int size);
+ ohci_function_device(running_machine &machine, xbox_base_state *usb_bus_manager);
+ virtual void execute_reset();
+ virtual void execute_connect() {};
+ virtual void execute_disconnect() {};
+ int execute_transfer(int endpoint, int pid, UINT8 *buffer, int size);
protected:
virtual int handle_nonstandard_request(int endpoint, USBSetupPacket *setup) { return -1; };
virtual int handle_get_status_request(int endpoint, USBSetupPacket *setup) { return 0; };
@@ -283,6 +326,7 @@ protected:
UINT8 *position_device_descriptor(int &size);
UINT8 *position_configuration_descriptor(int index, int &size);
UINT8 *position_string_descriptor(int index, int &size);
+ xbox_base_state *busmanager;
struct {
int type;
int controldirection;
@@ -311,7 +355,7 @@ protected:
class ohci_game_controller_device : public ohci_function_device
{
public:
- ohci_game_controller_device(running_machine &machine);
+ ohci_game_controller_device(running_machine &machine, xbox_base_state *usb_bus_manager);
int handle_nonstandard_request(int endpoint, USBSetupPacket *setup) override;
private:
static const USBStandardDeviceDescriptor devdesc;
@@ -360,8 +404,7 @@ public:
void usb_ohci_writeback_transfer_descriptor(UINT32 address);
void usb_ohci_read_isochronous_transfer_descriptor(UINT32 address);
void usb_ohci_writeback_isochronous_transfer_descriptor(UINT32 address);
- void dword_write_le(UINT8 *addr, UINT32 d);
- void word_write_le(UINT8 *addr, UINT16 d);
+ void usb_ohci_device_address_changed(int old_address, int new_address);
void debug_generate_irq(int irq, bool active);
virtual void hack_eeprom() {};
virtual void hack_usb() {};
@@ -422,8 +465,14 @@ public:
UINT32 hc_regs[255];
struct {
ohci_function_device *function;
+ int address;
int delay;
} ports[4 + 1];
+ struct
+ {
+ ohci_function_device *function;
+ int port;
+ } address[256];
emu_timer *timer;
int state;
UINT32 framenumber;
diff --git a/src/mame/includes/zaxxon.h b/src/mame/includes/zaxxon.h
index e5942968e44..54983f6c2e4 100644
--- a/src/mame/includes/zaxxon.h
+++ b/src/mame/includes/zaxxon.h
@@ -73,9 +73,7 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(service_switch);
DECLARE_INPUT_CHANGED_MEMBER(zaxxon_coin_inserted);
DECLARE_DRIVER_INIT(razmataz);
- DECLARE_DRIVER_INIT(futspy);
DECLARE_DRIVER_INIT(zaxxonj);
- DECLARE_DRIVER_INIT(szaxxon);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(zaxxon_get_fg_tile_info);
TILE_GET_INFO_MEMBER(razmataz_get_fg_tile_info);
diff --git a/src/mame/layout/cc40.lay b/src/mame/layout/cc40.lay
index ea366ddc0c1..2f97e22b6de 100644
--- a/src/mame/layout/cc40.lay
+++ b/src/mame/layout/cc40.lay
@@ -9,20 +9,20 @@
<element name="ind_left" defstate="0">
<rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect>
- <text string="&lt;" align="1" state="0">
+ <text string="&#x25c0;" align="1" state="0">
<color red="0.515" green="0.537" blue="0.548" />
</text>
- <text string="&lt;" align="1" state="1">
+ <text string="&#x25c0;" align="1" state="1">
<color red="0.361" green="0.326" blue="0.346" />
</text>
</element>
<element name="ind_right" defstate="0">
<rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect>
- <text string="&gt;" align="2" state="0">
+ <text string="&#x25b6;" align="2" state="0">
<color red="0.515" green="0.537" blue="0.548" />
</text>
- <text string="&gt;" align="2" state="1">
+ <text string="&#x25b6;" align="2" state="1">
<color red="0.361" green="0.326" blue="0.346" />
</text>
</element>
@@ -119,10 +119,10 @@
<element name="ind_user" defstate="0">
<rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect>
- <text string="v" state="0">
+ <text string="&#x25bc;" state="0">
<color red="0.515" green="0.537" blue="0.548" />
</text>
- <text string="v" state="1">
+ <text string="&#x25bc;" state="1">
<color red="0.361" green="0.326" blue="0.346" />
</text>
</element>
@@ -138,7 +138,7 @@
<view name="Internal Layout">
- <bounds left="0" top="0" right="189" bottom="33" />
+ <bounds left="0" top="1" right="189" bottom="33" />
<screen index="0">
<bounds x="1" y="11" width="187" height="11" />
@@ -162,11 +162,11 @@
<!-- draw top row of lcd indicators -->
<bezel name="lamp10" element="ind_left">
- <bounds x="1.5" y="1" width="20" height="5" />
+ <bounds x="1.5" y="2" width="20" height="7" />
</bezel>
<bezel name="lamp4" element="ind_right">
- <bounds x="167.5" y="1" width="20" height="5" />
+ <bounds x="167.5" y="2" width="20" height="7" />
</bezel>
<bezel name="lamp11" element="ind_shift">
@@ -201,22 +201,22 @@
</bezel>
<bezel name="lamp61" element="ind_user">
- <bounds x="29" y="27" width="20" height="5" />
+ <bounds x="29" y="27" width="20" height="5.5" />
</bezel>
<bezel name="lamp62" element="ind_user">
- <bounds x="51" y="27" width="20" height="5" />
+ <bounds x="51" y="27" width="20" height="5.5" />
</bezel>
<bezel name="lamp63" element="ind_user">
- <bounds x="73" y="27" width="20" height="5" />
+ <bounds x="73" y="27" width="20" height="5.5" />
</bezel>
<bezel name="lamp50" element="ind_user">
- <bounds x="95" y="27" width="20" height="5" />
+ <bounds x="95" y="27" width="20" height="5.5" />
</bezel>
<bezel name="lamp51" element="ind_user">
- <bounds x="117" y="27" width="20" height="5" />
+ <bounds x="117" y="27" width="20" height="5.5" />
</bezel>
<bezel name="lamp52" element="ind_user">
- <bounds x="139" y="27" width="20" height="5" />
+ <bounds x="139" y="27" width="20" height="5.5" />
</bezel>
<bezel name="lamp53" element="ind_low">
diff --git a/src/mame/layout/fidel_sc12.lay b/src/mame/layout/fidel_sc12.lay
index 3d087368edf..6d30a74c4af 100644
--- a/src/mame/layout/fidel_sc12.lay
+++ b/src/mame/layout/fidel_sc12.lay
@@ -208,29 +208,54 @@
<disk><color red="0.81" green="0.8" blue="0.79" /></disk>
<text string="CL"><color red="0.17" green="0.15" blue="0.15" /></text>
</element>
+ <element name="text_pb">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="PB"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_pv">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="PV"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_lv">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="LV"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_tb">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="TB"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_dm">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="DM"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_rv">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="RV"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+
<element name="text_king">
<disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="PB/K"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <text string="&#x2654;"><color red="0.17" green="0.15" blue="0.15" /></text>
</element>
<element name="text_queen">
<disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="PV/Q"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <text string="&#x2655;"><color red="0.17" green="0.15" blue="0.15" /></text>
</element>
<element name="text_rook">
<disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="LV/R"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <text string="&#x2656;"><color red="0.17" green="0.15" blue="0.15" /></text>
</element>
<element name="text_bishop">
<disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="TB/B"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <text string="&#x2657;"><color red="0.17" green="0.15" blue="0.15" /></text>
</element>
<element name="text_knight">
<disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="DM/N"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <text string="&#x2658;"><color red="0.17" green="0.15" blue="0.15" /></text>
</element>
<element name="text_pion">
<disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="RV/P"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <text string="&#x2659;"><color red="0.17" green="0.15" blue="0.15" /></text>
</element>
@@ -459,42 +484,48 @@
<!-- right side -->
- <bezel element="disk_black"><bounds x="87" y="3.1" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="12.4" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="24.3" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="33.6" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="42.9" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="52.2" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="61.5" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="70.8" width="7.4" height="7.4" /></bezel>
-
- <bezel element="disk_white"><bounds x="87.8" y="3.9" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="13.2" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="25.1" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="34.4" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="43.7" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="53 " width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="62.3" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="71.6" width="5.8" height="5.8" /></bezel>
-
- <bezel element="text_re"><bounds x="87.8" y="5.6" width="5.8" height="2.4" /></bezel>
- <bezel element="text_cl"><bounds x="87.8" y="14.9" width="5.8" height="2.4" /></bezel>
- <bezel element="text_king"><bounds x="87.8" y="26.8" width="5.8" height="2.4" /></bezel>
- <bezel element="text_queen"><bounds x="87.8" y="36.1" width="5.8" height="2.4" /></bezel>
- <bezel element="text_rook"><bounds x="87.8" y="45.4" width="5.8" height="2.4" /></bezel>
- <bezel element="text_bishop"><bounds x="87.8" y="54.7" width="5.8" height="2.4" /></bezel>
- <bezel element="text_knight"><bounds x="87.8" y="64 " width="5.8" height="2.4" /></bezel>
- <bezel element="text_pion"><bounds x="87.8" y="73.3" width="5.8" height="2.4" /></bezel>
-
- <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="3.1" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="12.4" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="24.3" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="33.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="42.9" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="52.2" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="61.5" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="70.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
-
+ <bezel element="text_king"><bounds x="87.7" y="20.6" width="4.6" height="4" /></bezel>
+ <bezel element="text_queen"><bounds x="87.7" y="29.9" width="4.6" height="4" /></bezel>
+ <bezel element="text_bishop"><bounds x="87.7" y="39.2" width="4.6" height="4" /></bezel>
+ <bezel element="text_knight"><bounds x="87.7" y="48.5" width="4.6" height="4" /></bezel>
+ <bezel element="text_rook"><bounds x="87.7" y="57.8" width="4.6" height="4" /></bezel>
+ <bezel element="text_pion"><bounds x="87.7" y="67.1" width="4.6" height="4" /></bezel>
+
+ <bezel element="disk_black"><bounds x="87" y="3.1" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="12.4" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="24.3" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="33.6" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="42.9" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="52.2" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="61.5" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="70.8" width="6" height="6" /></bezel>
+
+ <bezel element="disk_white"><bounds x="87.7" y="3.8" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="13.1" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="25.0" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="34.3" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="43.6" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="52.9" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="62.2" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="71.5" width="4.6" height="4.6" /></bezel>
+
+ <bezel element="text_re"><bounds x="87.7" y="4.9" width="4.6" height="2.4" /></bezel>
+ <bezel element="text_cl"><bounds x="87.7" y="14.2" width="4.6" height="2.4" /></bezel>
+ <bezel element="text_pb"><bounds x="87.7" y="26.1" width="4.6" height="2.4" /></bezel>
+ <bezel element="text_pv"><bounds x="87.7" y="35.4" width="4.6" height="2.4" /></bezel>
+ <bezel element="text_lv"><bounds x="87.7" y="44.7" width="4.6" height="2.4" /></bezel>
+ <bezel element="text_tb"><bounds x="87.7" y="54.0" width="4.6" height="2.4" /></bezel>
+ <bezel element="text_dm"><bounds x="87.7" y="63.3" width="4.6" height="2.4" /></bezel>
+ <bezel element="text_rv"><bounds x="87.7" y="72.6" width="4.6" height="2.4" /></bezel>
+
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="3.1" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="12.4" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="24.3" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="33.6" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="42.9" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="52.2" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="61.5" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="70.8" width="6" height="6" /><color alpha="0.3" /></bezel>
</view>
</mamelayout>
diff --git a/src/mame/layout/fidel_sc9.lay b/src/mame/layout/fidel_sc9.lay
new file mode 100644
index 00000000000..a3ad25dcafd
--- /dev/null
+++ b/src/mame/layout/fidel_sc9.lay
@@ -0,0 +1,437 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- other than panel button mappings, layout is identical to vsc -->
+
+<!-- define elements -->
+
+ <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
+
+ <element name="led" defstate="0">
+ <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
+ <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
+ </element>
+
+ <element name="hl" defstate="0">
+ <text string=" ">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </text>
+ <disk state="1">
+ <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
+ <color red="1.0" green="1.0" blue="1.0" />
+ </disk>
+ </element>
+ <element name="hlb" defstate="0">
+ <text string=" ">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </text>
+ <disk state="1">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="1.0" green="1.0" blue="1.0" />
+ </disk>
+ </element>
+
+ <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element>
+ <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
+ <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element>
+ <element name="disk_white"><disk><color red="0.81" green="0.8" blue="0.79" /></disk></element>
+
+ <element name="text_1">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_3">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_4">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_5">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_6">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_7">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_8">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+
+ <element name="text_a">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_b">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_c">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_d">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_e">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_f">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_g">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_h">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+
+ <element name="text_re">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="RE"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_cl">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="CL"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_pb">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="PB"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_pv">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="PV"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_lv">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="LV"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_tb">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="TB"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_dm">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="DM"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_rv">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="RV"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+
+ <element name="text_king">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="&#x2654;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_queen">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="&#x2655;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_rook">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="&#x2656;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_bishop">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="&#x2657;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_knight">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="&#x2658;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_pion">
+ <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
+ <text string="&#x2659;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="-2" right="100" top="-2" bottom="88" />
+ <bezel element="static_black">
+ <bounds left="-2" right="100" top="-2" bottom="88" />
+ </bezel>
+
+ <bezel element="white"><bounds x="-2.5" y="-2.5" width="103" height="90.5" /></bezel>
+
+ <!-- chessboard coords -->
+
+ <bezel element="text_8"><bounds x="-0.8" y="7" width="2" height="2" /></bezel>
+ <bezel element="text_7"><bounds x="-0.8" y="17" width="2" height="2" /></bezel>
+ <bezel element="text_6"><bounds x="-0.8" y="27" width="2" height="2" /></bezel>
+ <bezel element="text_5"><bounds x="-0.8" y="37" width="2" height="2" /></bezel>
+ <bezel element="text_4"><bounds x="-0.8" y="47" width="2" height="2" /></bezel>
+ <bezel element="text_3"><bounds x="-0.8" y="57" width="2" height="2" /></bezel>
+ <bezel element="text_2"><bounds x="-0.8" y="67" width="2" height="2" /></bezel>
+ <bezel element="text_1"><bounds x="-0.8" y="77" width="2" height="2" /></bezel>
+
+ <bezel element="text_a"><bounds x="7" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_b"><bounds x="17" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_c"><bounds x="27" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_d"><bounds x="37" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_e"><bounds x="47" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_f"><bounds x="57" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_g"><bounds x="67" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_h"><bounds x="77" y="85" width="2" height="2" /></bezel>
+
+ <!-- chessboard bezel -->
+
+ <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel>
+ <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel>
+
+ <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel>
+
+ <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel>
+ <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel>
+ <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel>
+ <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel>
+
+ <!-- chessboard leds -->
+
+ <bezel name="0.0" element="led"><bounds x="3.2" y="11.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.0" element="led"><bounds x="13.2" y="11.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="2.0" element="led"><bounds x="23.2" y="11.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="3.0" element="led"><bounds x="33.2" y="11.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="4.0" element="led"><bounds x="43.2" y="11.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="5.0" element="led"><bounds x="53.2" y="11.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="6.0" element="led"><bounds x="63.2" y="11.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="7.0" element="led"><bounds x="73.2" y="11.3" width="1.5" height="1.5" /></bezel>
+
+ <bezel name="0.1" element="led"><bounds x="3.2" y="21.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.1" element="led"><bounds x="13.2" y="21.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="2.1" element="led"><bounds x="23.2" y="21.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="3.1" element="led"><bounds x="33.2" y="21.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="4.1" element="led"><bounds x="43.2" y="21.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="5.1" element="led"><bounds x="53.2" y="21.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="6.1" element="led"><bounds x="63.2" y="21.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="7.1" element="led"><bounds x="73.2" y="21.3" width="1.5" height="1.5" /></bezel>
+
+ <bezel name="0.2" element="led"><bounds x="3.2" y="31.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.2" element="led"><bounds x="13.2" y="31.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="2.2" element="led"><bounds x="23.2" y="31.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="3.2" element="led"><bounds x="33.2" y="31.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="4.2" element="led"><bounds x="43.2" y="31.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="5.2" element="led"><bounds x="53.2" y="31.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="6.2" element="led"><bounds x="63.2" y="31.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="7.2" element="led"><bounds x="73.2" y="31.3" width="1.5" height="1.5" /></bezel>
+
+ <bezel name="0.3" element="led"><bounds x="3.2" y="41.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.3" element="led"><bounds x="13.2" y="41.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="2.3" element="led"><bounds x="23.2" y="41.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="3.3" element="led"><bounds x="33.2" y="41.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="4.3" element="led"><bounds x="43.2" y="41.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="5.3" element="led"><bounds x="53.2" y="41.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="6.3" element="led"><bounds x="63.2" y="41.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="7.3" element="led"><bounds x="73.2" y="41.3" width="1.5" height="1.5" /></bezel>
+
+ <bezel name="0.4" element="led"><bounds x="3.2" y="51.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.4" element="led"><bounds x="13.2" y="51.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="2.4" element="led"><bounds x="23.2" y="51.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="3.4" element="led"><bounds x="33.2" y="51.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="4.4" element="led"><bounds x="43.2" y="51.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="5.4" element="led"><bounds x="53.2" y="51.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="6.4" element="led"><bounds x="63.2" y="51.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="7.4" element="led"><bounds x="73.2" y="51.3" width="1.5" height="1.5" /></bezel>
+
+ <bezel name="0.5" element="led"><bounds x="3.2" y="61.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.5" element="led"><bounds x="13.2" y="61.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="2.5" element="led"><bounds x="23.2" y="61.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="3.5" element="led"><bounds x="33.2" y="61.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="4.5" element="led"><bounds x="43.2" y="61.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="5.5" element="led"><bounds x="53.2" y="61.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="6.5" element="led"><bounds x="63.2" y="61.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="7.5" element="led"><bounds x="73.2" y="61.3" width="1.5" height="1.5" /></bezel>
+
+ <bezel name="0.6" element="led"><bounds x="3.2" y="71.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.6" element="led"><bounds x="13.2" y="71.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="2.6" element="led"><bounds x="23.2" y="71.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="3.6" element="led"><bounds x="33.2" y="71.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="4.6" element="led"><bounds x="43.2" y="71.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="5.6" element="led"><bounds x="53.2" y="71.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="6.6" element="led"><bounds x="63.2" y="71.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="7.6" element="led"><bounds x="73.2" y="71.3" width="1.5" height="1.5" /></bezel>
+
+ <bezel name="0.7" element="led"><bounds x="3.2" y="81.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.7" element="led"><bounds x="13.2" y="81.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="2.7" element="led"><bounds x="23.2" y="81.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="3.7" element="led"><bounds x="33.2" y="81.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="4.7" element="led"><bounds x="43.2" y="81.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="5.7" element="led"><bounds x="53.2" y="81.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="6.7" element="led"><bounds x="63.2" y="81.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="7.7" element="led"><bounds x="73.2" y="81.3" width="1.5" height="1.5" /></bezel>
+
+ <!-- chessboard sensors -->
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
+
+ <!-- right side -->
+
+ <bezel name="8.7" element="led"><bounds x="91.95" y="7.25" width="1.5" height="1.5" /></bezel>
+
+ <bezel element="text_king"><bounds x="84.01" y="31.1" width="6" height="6" /></bezel>
+ <bezel element="text_queen"><bounds x="84.01" y="39.9" width="6" height="6" /></bezel>
+ <bezel element="text_bishop"><bounds x="84.01" y="48.7" width="6" height="6" /></bezel>
+ <bezel element="text_knight"><bounds x="84.01" y="57.5" width="6" height="6" /></bezel>
+ <bezel element="text_rook"><bounds x="84.01" y="66.3" width="6" height="6" /></bezel>
+ <bezel element="text_pion"><bounds x="84.01" y="75.1" width="6" height="6" /></bezel>
+
+ <bezel element="disk_black"><bounds x="89" y="13" width="7.4" height="7.4" /></bezel>
+ <bezel element="disk_black"><bounds x="89" y="21.8" width="7.4" height="7.4" /></bezel>
+ <bezel element="disk_black"><bounds x="89" y="30.6" width="7.4" height="7.4" /></bezel>
+ <bezel element="disk_black"><bounds x="89" y="39.4" width="7.4" height="7.4" /></bezel>
+ <bezel element="disk_black"><bounds x="89" y="48.2" width="7.4" height="7.4" /></bezel>
+ <bezel element="disk_black"><bounds x="89" y="57" width="7.4" height="7.4" /></bezel>
+ <bezel element="disk_black"><bounds x="89" y="65.8" width="7.4" height="7.4" /></bezel>
+ <bezel element="disk_black"><bounds x="89" y="74.6" width="7.4" height="7.4" /></bezel>
+
+ <bezel element="disk_white"><bounds x="89.7" y="13.7" width="6" height="6" /></bezel>
+ <bezel element="disk_white"><bounds x="89.7" y="22.5" width="6" height="6" /></bezel>
+ <bezel element="disk_white"><bounds x="89.7" y="31.3" width="6" height="6" /></bezel>
+ <bezel element="disk_white"><bounds x="89.7" y="40.1" width="6" height="6" /></bezel>
+ <bezel element="disk_white"><bounds x="89.7" y="48.9" width="6" height="6" /></bezel>
+ <bezel element="disk_white"><bounds x="89.7" y="57.7" width="6" height="6" /></bezel>
+ <bezel element="disk_white"><bounds x="89.7" y="66.5" width="6" height="6" /></bezel>
+ <bezel element="disk_white"><bounds x="89.7" y="75.3" width="6" height="6" /></bezel>
+
+ <bezel element="text_re"><bounds x="90.2" y="15.2" width="5" height="3" /></bezel>
+ <bezel element="text_cl"><bounds x="90.2" y="24" width="5" height="3" /></bezel>
+ <bezel element="text_pb"><bounds x="90.2" y="32.8" width="5" height="3" /></bezel>
+ <bezel element="text_pv"><bounds x="90.2" y="41.6" width="5" height="3" /></bezel>
+ <bezel element="text_lv"><bounds x="90.2" y="50.4" width="5" height="3" /></bezel>
+ <bezel element="text_tb"><bounds x="90.2" y="59.2" width="5" height="3" /></bezel>
+ <bezel element="text_dm"><bounds x="90.2" y="68" width="5" height="3" /></bezel>
+ <bezel element="text_rv"><bounds x="90.2" y="76.8" width="5" height="3" /></bezel>
+
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="89" y="13" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="89" y="21.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="89" y="30.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="89" y="39.4" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="89" y="48.2" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="89" y="57" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="89" y="65.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="89" y="74.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
+
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/lantutor.lay b/src/mame/layout/lantutor.lay
index be16b9a8015..f5d0d9c1b03 100644
--- a/src/mame/layout/lantutor.lay
+++ b/src/mame/layout/lantutor.lay
@@ -10,8 +10,8 @@
</element>
<element name="triangle_mark" defstate="0">
- <text state="0" string="v"><color red="0.0235" green="0.1255" blue="0.1059" /></text>
- <text state="1" string="v"><color red="0.2" green="1.0" blue="0.85" /></text>
+ <text state="0" string="&#x25bc;"><color red="0.0235" green="0.1255" blue="0.1059" /></text>
+ <text state="1" string="&#x25bc;"><color red="0.2" green="1.0" blue="0.85" /></text>
</element>
diff --git a/src/mame/layout/spyhunttec.lay b/src/mame/layout/spyhunttec.lay
new file mode 100644
index 00000000000..f77457e680e
--- /dev/null
+++ b/src/mame/layout/spyhunttec.lay
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+ <element name="lamp_miss" defstate="0">
+ <text string="MISSILES" state="0">
+ <color red="0.3" green="0.1" blue="0.0" />
+ </text>
+ <text string="MISSILES" state="1">
+ <color red="1.0" green="0.4" blue="0.2" />
+ </text>
+ </element>
+
+ <element name="lamp_oil" defstate="0">
+ <text string="OIL SLICK" state="0">
+ <color red="0.3" green="0.0" blue="0.25" />
+ </text>
+ <text string="OIL SLICK" state="1">
+ <color red="1.0" green="0.2" blue="0.8" />
+ </text>
+ </element>
+
+ <element name="lamp_van" defstate="0">
+ <text string="WEAPONS VAN" state="0">
+ <color red="0.3" green="0.25" blue="0.0" />
+ </text>
+ <text string="WEAPONS VAN" state="1">
+ <color red="1.0" green="0.8" blue="0.2" />
+ </text>
+ </element>
+
+ <element name="lamp_smoke" defstate="0">
+ <text string="SMOKE SCREEN" state="0">
+ <color red="0.3" green="0.0" blue="0.25" />
+ </text>
+ <text string="SMOKE SCREEN" state="1">
+ <color red="1.0" green="0.2" blue="0.8" />
+ </text>
+ </element>
+
+ <element name="lamp_gun" defstate="0">
+ <text string="MACHINE GUNS" state="0">
+ <color red="0.3" green="0.1" blue="0.0" />
+ </text>
+ <text string="MACHINE GUNS" state="1">
+ <color red="1.0" green="0.4" blue="0.2" />
+ </text>
+ </element>
+
+
+ <element name="shifter" defstate="0">
+ <rect>
+ <bounds left="0" right="32" top="0" bottom="64" />
+ <color red="0.85" green="0.4" blue="0.3" />
+ </rect>
+ <rect>
+ <bounds left="2" right="30" top="2" bottom="62" />
+ <color red="0.14" green="0.17" blue="0.2" />
+ </rect>
+ <rect>
+ <bounds left="14" right="18" top="15" bottom="49" />
+ <color red="0.44" green="0.47" blue="0.5" />
+ </rect>
+ <disk>
+ <bounds left="14" right="18" top="13" bottom="17" />
+ <color red="0.44" green="0.47" blue="0.5" />
+ </disk>
+ <disk>
+ <bounds left="14" right="18" top="47" bottom="51" />
+ <color red="0.44" green="0.47" blue="0.5" />
+ </disk>
+ <text string="LOW" state="0">
+ <bounds left="3" right="29" top="2" bottom="12" />
+ <color red="1.0" green="1.0" blue="0.4" />
+ </text>
+ <text string="LOW" state="1">
+ <bounds left="3" right="29" top="2" bottom="12" />
+ <color red="1.0" green="1.0" blue="1.0" />
+ </text>
+
+ <text string="HIGH" state="0">
+ <bounds left="3" right="29" top="52" bottom="62" />
+ <color red="1.0" green="1.0" blue="1.0" />
+ </text>
+ <text string="HIGH" state="1">
+ <bounds left="3" right="29" top="52" bottom="62" />
+ <color red="1.0" green="1.0" blue="0.4" />
+ </text>
+ <disk state="0">
+ <bounds left="9" right="23" top="14" bottom="28" />
+ <color red="0.85" green="0.4" blue="0.3" />
+ </disk>
+ <disk state="1">
+ <bounds left="9" right="23" top="36" bottom="50" />
+ <color red="0.85" green="0.4" blue="0.3" />
+ </disk>
+ </element>
+
+
+ <view name="Lamps + Shifter-R">
+ <screen index="0">
+ <bounds x="0" y="0" width="480" height="640" />
+ </screen>
+
+ <bezel name="lamp1" element="lamp_miss">
+ <bounds x="5" y="641" width="60" height="25" />
+ </bezel>
+ <bezel name="lamp0" element="lamp_oil">
+ <bounds x="72" y="641" width="59" height="25" />
+ </bezel>
+ <bezel name="lamp2" element="lamp_van">
+ <bounds x="172" y="641" width="85" height="25" />
+ </bezel>
+ <bezel name="lamp3" element="lamp_smoke">
+ <bounds x="295" y="641" width="93" height="25" />
+ </bezel>
+ <bezel name="lamp4" element="lamp_gun">
+ <bounds x="390" y="641" width="90" height="25" />
+ </bezel>
+
+ <bezel element="shifter" inputtag="IN2" inputmask="0x10">
+ <bounds x="446" y="574" width="32" height="64" />
+ <color alpha="0.6" />
+ </bezel>
+ </view>
+
+ <view name="Lamps + Shifter-L">
+ <screen index="0">
+ <bounds x="0" y="0" width="480" height="640" />
+ </screen>
+
+ <bezel name="lamp1" element="lamp_miss">
+ <bounds x="5" y="641" width="60" height="25" />
+ </bezel>
+ <bezel name="lamp0" element="lamp_oil">
+ <bounds x="72" y="641" width="59" height="25" />
+ </bezel>
+ <bezel name="lamp2" element="lamp_van">
+ <bounds x="172" y="641" width="85" height="25" />
+ </bezel>
+ <bezel name="lamp3" element="lamp_smoke">
+ <bounds x="295" y="641" width="93" height="25" />
+ </bezel>
+ <bezel name="lamp4" element="lamp_gun">
+ <bounds x="390" y="641" width="90" height="25" />
+ </bezel>
+
+ <bezel element="shifter" inputtag="IN2" inputmask="0x10">
+ <bounds x="2" y="574" width="32" height="64" />
+ <color alpha="0.6" />
+ </bezel>
+ </view>
+
+ <view name="Lamps">
+ <screen index="0">
+ <bounds x="0" y="0" width="480" height="640" />
+ </screen>
+
+ <bezel name="lamp1" element="lamp_miss">
+ <bounds x="5" y="641" width="60" height="25" />
+ </bezel>
+ <bezel name="lamp0" element="lamp_oil">
+ <bounds x="72" y="641" width="59" height="25" />
+ </bezel>
+ <bezel name="lamp2" element="lamp_van">
+ <bounds x="172" y="641" width="85" height="25" />
+ </bezel>
+ <bezel name="lamp3" element="lamp_smoke">
+ <bounds x="295" y="641" width="93" height="25" />
+ </bezel>
+ <bezel name="lamp4" element="lamp_gun">
+ <bounds x="390" y="641" width="90" height="25" />
+ </bezel>
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/ti74.lay b/src/mame/layout/ti74.lay
index 16d6c1f55a0..24563b7dc8c 100644
--- a/src/mame/layout/ti74.lay
+++ b/src/mame/layout/ti74.lay
@@ -9,20 +9,20 @@
<element name="ind_left" defstate="0">
<rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect>
- <text string="&lt;" align="1" state="0">
+ <text string="&#x25c0;" align="1" state="0">
<color red="0.515" green="0.537" blue="0.548" />
</text>
- <text string="&lt;" align="1" state="1">
+ <text string="&#x25c0;" align="1" state="1">
<color red="0.361" green="0.326" blue="0.346" />
</text>
</element>
<element name="ind_right" defstate="0">
<rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect>
- <text string="&gt;" align="2" state="0">
+ <text string="&#x25b6;" align="2" state="0">
<color red="0.515" green="0.537" blue="0.548" />
</text>
- <text string="&gt;" align="2" state="1">
+ <text string="&#x25b6;" align="2" state="1">
<color red="0.361" green="0.326" blue="0.346" />
</text>
</element>
@@ -172,11 +172,11 @@
<!-- draw top row of lcd indicators -->
<bezel name="lamp10" element="ind_left">
- <bounds x="1.5" y="1" width="20" height="5" />
+ <bounds x="1.5" y="0" width="20" height="7" />
</bezel>
<bezel name="lamp4" element="ind_right">
- <bounds x="167.5" y="1" width="20" height="5" />
+ <bounds x="167.5" y="0" width="20" height="7" />
</bezel>
<bezel name="lamp11" element="ind_shift">
diff --git a/src/mame/layout/ti95.lay b/src/mame/layout/ti95.lay
index 6ee4cd6db55..7c70bda1e05 100644
--- a/src/mame/layout/ti95.lay
+++ b/src/mame/layout/ti95.lay
@@ -39,10 +39,10 @@
<element name="ind_left" defstate="0">
<rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect>
- <text string="&lt;" align="1" state="0">
+ <text string="&#x25c0;" align="1" state="0">
<color red="0.515" green="0.537" blue="0.548" />
</text>
- <text string="&lt;" align="1" state="1">
+ <text string="&#x25c0;" align="1" state="1">
<color red="0.361" green="0.326" blue="0.346" />
</text>
</element>
@@ -259,7 +259,7 @@
<bounds x="1" y="9" width="5" height="5" />
</bezel>
<bezel name="lamp71" element="ind_left">
- <bounds x="8" y="9" width="5" height="5" />
+ <bounds x="8" y="8" width="5" height="7" />
</bezel>
<!-- right: run, sys -->
diff --git a/src/mame/machine/awboard.cpp b/src/mame/machine/awboard.cpp
index 7ec0c5b6c3a..1a364d8a1a2 100644
--- a/src/mame/machine/awboard.cpp
+++ b/src/mame/machine/awboard.cpp
@@ -166,15 +166,16 @@ DEVICE_ADDRESS_MAP_START(submap, 16, aw_rom_board)
ADDRESS_MAP_END
aw_rom_board::aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : naomi_g1_device(mconfig, AW_ROM_BOARD, "Sammy Atomiswave ROM Board", tag, owner, clock, "aw_rom_board", __FILE__)
+ : naomi_g1_device(mconfig, AW_ROM_BOARD, "Sammy Atomiswave ROM Board", tag, owner, clock, "aw_rom_board", __FILE__),
+ m_region(*this, DEVICE_SELF),
+ m_keyregion(*this)
{
- keyregion = nullptr;
}
-void aw_rom_board::static_set_keyregion(device_t &device, const char *_keyregion)
+void aw_rom_board::static_set_keyregion(device_t &device, const char *keyregion)
{
aw_rom_board &dev = downcast<aw_rom_board &>(device);
- dev.keyregion = _keyregion;
+ dev.m_keyregion.set_tag(keyregion);
}
@@ -256,20 +257,13 @@ UINT16 aw_rom_board::decrypt(UINT16 cipherText, UINT32 address, const UINT32 key
void aw_rom_board::set_key()
{
- if(!m_region)
- throw emu_fatalerror("AW-ROM-BOARD: region %s is missing\n", tag());
-
- if(!keyregion)
- return;
-
- memory_region *kr = memregion(keyregion);
- if(!kr)
+ if (!m_keyregion.found())
return;
- if(kr->bytes() != 4)
- throw emu_fatalerror("AW-ROM-BOARD: key region %s has incorrect size (%d, expected 4)\n", keyregion, kr->bytes());
+ if (m_keyregion->bytes() != 4)
+ throw emu_fatalerror("AW-ROM-BOARD: key region %s has incorrect size (%d, expected 4)\n", m_keyregion.finder_tag(), m_keyregion->bytes());
- const UINT8 *krp = kr->base();
+ const UINT8 *krp = m_keyregion->base();
rombd_key = (krp[0] << 24) | (krp[1] << 16) | (krp[2] << 8) | krp[3];
}
@@ -307,7 +301,7 @@ READ16_MEMBER(aw_rom_board::pio_r)
UINT32 roffset = epr_offset & 0x3ffffff;
if (roffset >= (mpr_offset / 2))
roffset += mpr_bank * 0x4000000;
- UINT16 retval = (m_region->bytes() > roffset) ? m_region->u16(roffset) : 0;
+ UINT16 retval = (m_region->bytes() > roffset) ? m_region->u16(roffset) : 0; // not endian-safe?
return retval;
}
diff --git a/src/mame/machine/awboard.h b/src/mame/machine/awboard.h
index 4e531523856..5ae885079c1 100644
--- a/src/mame/machine/awboard.h
+++ b/src/mame/machine/awboard.h
@@ -7,14 +7,14 @@
#define MCFG_AW_ROM_BOARD_ADD(_tag, _keyregion, _irq_cb) \
MCFG_NAOMI_G1_ADD(_tag, AW_ROM_BOARD, _irq_cb) \
- aw_rom_board::static_set_keyregion(*device, _keyregion);
+ aw_rom_board::static_set_keyregion(*device, "^" _keyregion);
class aw_rom_board : public naomi_g1_device
{
public:
aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- static void static_set_keyregion(device_t &device, const char *_keyregion);
+ static void static_set_keyregion(device_t &device, const char *keyregion);
DECLARE_ADDRESS_MAP(submap, 16);
@@ -37,7 +37,8 @@ protected:
private:
enum { EPR, MPR_RECORD, MPR_FILE };
- const char *keyregion;
+ required_memory_region m_region;
+ optional_memory_region m_keyregion;
UINT32 rombd_key;
UINT32 mpr_offset, mpr_bank;
UINT32 epr_offset, mpr_file_offset;
diff --git a/src/mame/machine/dec_lk201.cpp b/src/mame/machine/dec_lk201.cpp
index 0643d46d38d..e8ebfc1bd6e 100644
--- a/src/mame/machine/dec_lk201.cpp
+++ b/src/mame/machine/dec_lk201.cpp
@@ -20,24 +20,24 @@
to => PORT 0 @ KBD controller.
________|D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0
-..KBD17:|[R] |F19 |[R] |F20|PF4|N- | N,| Enter
-........| | | | | | NOTE1)
+..KBD17:|[R] |F19 |[R] |F20|PF4|N- | N,| Enter (numpad)
+........| | | | | | NOTE1)
........| |G22 | |G23|E23|D23|C23| A23
--------|----|----|----|---|---|---|---|---
..KBD16:|F18 |PF3 |[R] |N9 |C:D|N6 |N3 |N.
........|G21 |E22 | |D22|B17|C22|B22|A22
--------|----|----|----|---|---|---|---|---
-..KBD15:|F17 |PF2 |[R] |N8 |N5 |C:R| N2|N0
-........| | | | | | | |NOTE 2)
-........|G20 |E21 | |D21|C21|B18|B21|
+..KBD15:|F17 |PF2 |[R] |N8 |N5 |C:R| N2|N0 (right)
+........| | | | | | | |see NOTE 2)
+........|G20 |E21 | |D21|C21|B18|B21|A21
--------|----|----|----|---|---|---|---|---
- KBD14:|PF1 |Next|Rem-|C:U|N7 |N4 |N1 |N0
-........| |Scrn|move|...| | | |
+ KBD14:|PF1 |Next|Rem-|C:U|N7 |N4 |N1 |N0 (left)
+........| |Scrn|move|...| | | |see NOTE 2)
........|E20 |D18 |E18 |C17|D20|C20|B20|A20
--------|----|----|----|---|---|---|---|---
-..KBD13:|Ins.|--- |'Do'|Prev { |" |[R]|[R]
-........|Here|- | Scrn| [ |' | |
-........|E17 |E11 |G16 |D17|D11|C11| |
+..KBD13:|Ins.|'_' |'Do'|Prev { |" |[R]|[R]
+........|Here|'-' | |Scrn [ |' | |
+........|E17 |E11 |G16 |D17|D11|C11|B13|A17
--------|----|----|----|---|---|---|---|---
..KBD12:|Find|+ |Help|Se-| } |Re-|C:L| |
........| |= | |lect ] |turn...| \
@@ -93,9 +93,10 @@ ________|D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0
[R] = Reserved
NOTE 1) N0-N9, N-, N. and N, refer to numeric keypad
NOTE 2) N0 can be divided into 2 keys.
- Normally only the N0 keyswitch is implemented as a double-sized key.
+ Normally only the N0 keyswitch is implemented as a double-sized key.
+ A21 = N0 (right); A20 = N0 (left)
NOTE 3) Return key occupies 2 positions that are
- decoded as the Return (C13) key.
+ decoded as the Return (C13) key. C13 = RETURN (bot.); D13 = RETURN (top)
C:D - Cursor down (B17)
C:U - Cursor up (C17)
diff --git a/src/mame/machine/decocass_tape.cpp b/src/mame/machine/decocass_tape.cpp
index 8b3f2785032..982cd9018aa 100644
--- a/src/mame/machine/decocass_tape.cpp
+++ b/src/mame/machine/decocass_tape.cpp
@@ -65,7 +65,8 @@ decocass_tape_device::decocass_tape_device(const machine_config &mconfig, const
m_region(REGION_LEADER),
m_bitnum(0),
m_clockpos(0),
- m_numclocks(0)
+ m_numclocks(0),
+ m_tape_data(*this, DEVICE_SELF)
{
for (auto & elem : m_crc16)
elem = 0;
@@ -91,13 +92,12 @@ void decocass_tape_device::device_start()
/* fetch the data pointer */
m_tape_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(decocass_tape_device::tape_clock_callback), this));
- if (region() == nullptr)
+ if (!m_tape_data.found())
return;
- UINT8 *regionbase = region()->base();
/* scan for the first non-empty block in the image */
- for (offs = region()->bytes() - 1; offs >= 0; offs--)
- if (regionbase[offs] != 0)
+ for (offs = m_tape_data.bytes() - 1; offs >= 0; offs--)
+ if (m_tape_data[offs] != 0)
break;
numblocks = ((offs | 0xff) + 1) / 256;
assert(numblocks < ARRAY_LENGTH(m_crc16));
@@ -113,7 +113,7 @@ void decocass_tape_device::device_start()
/* first CRC the 256 bytes of data */
for (offs = 256 * curblock; offs < 256 * curblock + 256; offs++)
- crc = tape_crc16_byte(crc, regionbase[offs]);
+ crc = tape_crc16_byte(crc, m_tape_data[offs]);
/* then find a pair of bytes that will bring the CRC to 0 (any better way than brute force?) */
for (testval = 0; testval < 0x10000; testval++)
@@ -292,7 +292,6 @@ TIMER_CALLBACK_MEMBER( decocass_tape_device::tape_clock_callback )
UINT8 decocass_tape_device::get_status_bits()
{
UINT8 tape_bits = 0;
- UINT8 *tape_data = region()->base();
/* bit 0x20 is the BOT/EOT signal, which is also set in the leader/trailer area */
if (m_region == REGION_LEADER || m_region == REGION_BOT || m_region == REGION_EOT || m_region == REGION_TRAILER)
@@ -325,7 +324,7 @@ UINT8 decocass_tape_device::get_status_bits()
/* data block bytes are data */
else if (m_bytenum >= BYTE_DATA_0 && m_bytenum <= BYTE_DATA_255)
- byteval = tape_data[blocknum * 256 + (m_bytenum - BYTE_DATA_0)];
+ byteval = m_tape_data[blocknum * 256 + (m_bytenum - BYTE_DATA_0)];
/* CRC MSB */
else if (m_bytenum == BYTE_CRC16_MSB)
@@ -350,7 +349,7 @@ UINT8 decocass_tape_device::get_status_bits()
UINT8 decocass_tape_device::is_present()
{
- return region() != nullptr;
+ return m_tape_data.found();
}
diff --git a/src/mame/machine/decocass_tape.h b/src/mame/machine/decocass_tape.h
index 0b4909f34bd..4d7f03ada4a 100644
--- a/src/mame/machine/decocass_tape.h
+++ b/src/mame/machine/decocass_tape.h
@@ -64,6 +64,7 @@ private:
UINT32 m_clockpos; /* the current clock position of the tape */
UINT32 m_numclocks; /* total number of clocks on the entire tape */
UINT16 m_crc16[256]; /* CRC16 for each block */
+ optional_region_ptr<UINT8> m_tape_data;
const char *describe_state();
TIMER_CALLBACK_MEMBER( tape_clock_callback );
diff --git a/src/mame/machine/fd1089.cpp b/src/mame/machine/fd1089.cpp
index 5f8df8b0b3d..f786bf29c2d 100644
--- a/src/mame/machine/fd1089.cpp
+++ b/src/mame/machine/fd1089.cpp
@@ -223,6 +223,8 @@ ADDRESS_MAP_END
fd1089_base_device::fd1089_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: m68000_device(mconfig, tag, owner, clock, shortname, source),
+ m_region(*this, DEVICE_SELF),
+ m_key(*this, "key"),
m_decrypted_opcodes(*this, ":fd1089_decrypted_opcodes")
{
// override the name after the m68000 initializes
@@ -251,18 +253,11 @@ void fd1089_base_device::device_start()
// start the base device
m68000_device::device_start();
- // find the key
- m_key = memregion("key")->base();
- if (m_key == nullptr)
- throw emu_fatalerror("FD1089 key region not found!");
-
// get a pointer to the ROM region
- UINT16 *rombase = reinterpret_cast<UINT16 *>(region()->base());
- if (rombase == nullptr)
- throw emu_fatalerror("FD1089 found no ROM data to decrypt!");
+ UINT16 *rombase = reinterpret_cast<UINT16 *>(m_region->base());
// determine length and resize our internal buffers
- UINT32 romsize = region()->bytes();
+ UINT32 romsize = m_region->bytes();
m_plaintext.resize(romsize/2);
// copy the plaintext
@@ -493,7 +488,7 @@ void fd1089_base_device::decrypt(offs_t baseaddr, UINT32 size, const UINT16 *src
for (offs_t offset = 0; offset < size; offset += 2)
{
UINT16 src = srcptr[offset / 2];
- opcodesptr[offset / 2] = decrypt_one(baseaddr + offset, src, m_key, true);
- dataptr[offset / 2] = decrypt_one(baseaddr + offset, src, m_key, false);
+ opcodesptr[offset / 2] = decrypt_one(baseaddr + offset, src, &m_key[0], true);
+ dataptr[offset / 2] = decrypt_one(baseaddr + offset, src, &m_key[0], false);
}
}
diff --git a/src/mame/machine/fd1089.h b/src/mame/machine/fd1089.h
index 71fcc361d7a..0bf37ba75b9 100644
--- a/src/mame/machine/fd1089.h
+++ b/src/mame/machine/fd1089.h
@@ -55,7 +55,8 @@ protected:
void decrypt(offs_t baseaddr, UINT32 size, const UINT16 *srcptr, UINT16 *opcodesptr, UINT16 *dataptr);
// internal state
- const UINT8 * m_key;
+ required_memory_region m_region;
+ required_region_ptr<UINT8> m_key;
std::vector<UINT16> m_plaintext;
required_shared_ptr<UINT16> m_decrypted_opcodes;
diff --git a/src/mame/machine/fd1094.cpp b/src/mame/machine/fd1094.cpp
index 9dc3009cd31..7616adcd0b9 100644
--- a/src/mame/machine/fd1094.cpp
+++ b/src/mame/machine/fd1094.cpp
@@ -558,9 +558,8 @@ fd1094_device::fd1094_device(const machine_config &mconfig, const char *tag, dev
m_state(0x00),
m_irqmode(false),
m_cache(*this),
- m_srcbase(nullptr),
- m_srcbytes(0),
- m_key(nullptr)
+ m_srcbase(*this, DEVICE_SELF),
+ m_key(*this, "key")
{
// override the name after the m68000 initializes
m_name.assign("FD1094");
@@ -634,35 +633,18 @@ void fd1094_device::change_state(int newstate)
void fd1094_device::device_start()
{
- // find the key
- m_key = memregion("key")->base();
- if (m_key == nullptr)
- throw emu_fatalerror("FD1094 key region not found!");
-
- // get a pointer to the ROM region
- if (region() != nullptr)
- {
- m_srcbase = reinterpret_cast<UINT16 *>(region()->base());
- m_srcbytes = region()->bytes();
- }
-
// if no ROM region, see if there's a memory share with our name
- else
+ if (!m_srcbase.found())
{
- memory_share *share = owner()->memshare(tag());
+ memory_share *share = memshare(DEVICE_SELF);
if (share != nullptr)
- {
- m_srcbase = reinterpret_cast<UINT16 *>(share->ptr());
- m_srcbytes = share->bytes();
- }
+ m_srcbase.set_target(reinterpret_cast<UINT16 *>(share->ptr()), share->bytes() / 2);
+ else
+ throw emu_fatalerror("FD1094 found no data to decrypt!");
}
- // if we got nothing, error
- if (m_srcbase == nullptr)
- throw emu_fatalerror("FD1094 found no data to decrypt!");
-
// determine length and configure our cache
- m_cache.configure(0x000000, m_srcbytes, 0x000000);
+ m_cache.configure(0x000000, m_srcbase.bytes(), 0x000000);
change_state(STATE_RESET);
// start the base device
@@ -907,7 +889,7 @@ UINT16 fd1094_device::decrypt_one(offs_t address, UINT16 val, const UINT8 *main_
void fd1094_device::decrypt(offs_t baseaddr, UINT32 size, const UINT16 *srcptr, UINT16 *opcodesptr, UINT8 state)
{
for (offs_t offset = 0; offset < size; offset += 2)
- opcodesptr[offset / 2] = decrypt_one((baseaddr + offset) / 2, srcptr[offset / 2], m_key, state, (baseaddr + offset) < 8);
+ opcodesptr[offset / 2] = decrypt_one((baseaddr + offset) / 2, srcptr[offset / 2], &m_key[0], state, (baseaddr + offset) < 8);
}
diff --git a/src/mame/machine/fd1094.h b/src/mame/machine/fd1094.h
index 737f3b81e1c..a72fc6f5df1 100644
--- a/src/mame/machine/fd1094.h
+++ b/src/mame/machine/fd1094.h
@@ -72,7 +72,7 @@ public:
fd1094_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// explicit decryption helpers
- void decrypt(offs_t baseaddr, UINT32 size, offs_t regionoffs, UINT16 *opcodesptr, UINT8 state) { decrypt(baseaddr, size, m_srcbase + regionoffs/2, opcodesptr, state); }
+ void decrypt(offs_t baseaddr, UINT32 size, offs_t regionoffs, UINT16 *opcodesptr, UINT8 state) { decrypt(baseaddr, size, &m_srcbase[regionoffs/2], opcodesptr, state); }
// live state management
UINT8 state() const { return m_irqmode ? m_key[0] : m_state; }
@@ -110,9 +110,8 @@ protected:
bool m_irqmode;
state_change_delegate m_state_change;
fd1094_decryption_cache m_cache;
- UINT16 * m_srcbase;
- UINT32 m_srcbytes;
- const UINT8 * m_key;
+ optional_region_ptr<UINT16> m_srcbase;
+ required_region_ptr<UINT8> m_key;
UINT8 m_masked_opcodes_lookup[2][65536/8/2];
// static tables
diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp
index a9653cf34ea..5d8dc40966b 100644
--- a/src/mame/machine/harddriv.cpp
+++ b/src/mame/machine/harddriv.cpp
@@ -41,8 +41,6 @@ void harddriv_state::device_start()
//atarigen_state::machine_start();
/* predetermine memory regions */
- m_sim_memory = (UINT16 *)memregion("user1")->base();
- m_sim_memory_size = memregion("user1")->bytes() / 2;
m_adsp_pgm_memory_word = (UINT16 *)(reinterpret_cast<UINT8 *>(m_adsp_pgm_memory.target()) + 1);
init_video();
@@ -74,14 +72,14 @@ void harddriv_state::device_reset()
if (m_ds3sdsp.found())
{
- m_ds3sdsp->load_boot_data(m_ds3sdsp->region()->base(), m_ds3sdsp_pgm_memory);
+ m_ds3sdsp->load_boot_data(m_ds3sdsp_region->base(), m_ds3sdsp_pgm_memory);
m_ds3sdsp_timer_en = 0;
m_ds3sdsp_internal_timer->adjust(attotime::never);
}
if (m_ds3xdsp.found())
{
- m_ds3xdsp->load_boot_data(m_ds3xdsp->region()->base(), m_ds3xdsp_pgm_memory);
+ m_ds3xdsp->load_boot_data(m_ds3xdsp_region->base(), m_ds3xdsp_pgm_memory);
m_ds3xdsp_timer_en = 0;
m_ds3xdsp_internal_timer->adjust(attotime::never);
}
@@ -760,7 +758,7 @@ READ16_MEMBER( harddriv_state::hdadsp_special_r )
switch (offset & 7)
{
case 0: /* /SIMBUF */
- if (m_adsp_eprom_base + m_adsp_sim_address < m_sim_memory_size)
+ if (m_adsp_eprom_base + m_adsp_sim_address < m_sim_memory.length())
return m_sim_memory[m_adsp_eprom_base + m_adsp_sim_address++];
else
return 0xff;
@@ -862,7 +860,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_control_w )
if (m_ds3sdsp.found())
{
m_ds3sdsp->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE);
- m_ds3sdsp->load_boot_data(m_ds3sdsp->region()->base(), m_ds3sdsp_pgm_memory);
+ m_ds3sdsp->load_boot_data(m_ds3sdsp_region->base(), m_ds3sdsp_pgm_memory);
if (val && !m_ds3_sreset)
{
@@ -882,7 +880,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_control_w )
if (m_ds3xdsp.found())
{
m_ds3xdsp->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE);
- m_ds3xdsp->load_boot_data(m_ds3xdsp->region()->base(), m_ds3xdsp_pgm_memory);
+ m_ds3xdsp->load_boot_data(m_ds3xdsp_region->base(), m_ds3xdsp_pgm_memory);
}
break;
@@ -1190,7 +1188,7 @@ WRITE16_MEMBER( harddriv_state::hdds3_sdsp_control_w )
if (data & 0x200)
{
UINT32 page = (data >> 6) & 7;
- m_ds3sdsp->load_boot_data(m_ds3sdsp->region()->base() + (0x2000 * page), m_ds3sdsp_pgm_memory);
+ m_ds3sdsp->load_boot_data(m_ds3sdsp_region->base() + (0x2000 * page), m_ds3sdsp_pgm_memory);
m_ds3sdsp->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
data &= ~0x200;
}
@@ -1374,7 +1372,7 @@ READ16_MEMBER( harddriv_state::hdds3_special_r )
case 6:
logerror("ADSP r @ %04x\n", m_ds3_sim_address);
- if (m_ds3_sim_address < m_sim_memory_size)
+ if (m_ds3_sim_address < m_sim_memory.length())
return m_sim_memory[m_ds3_sim_address];
else
return 0xff;
diff --git a/src/mame/machine/intv.cpp b/src/mame/machine/intv.cpp
index 391abbd4150..55915b00254 100644
--- a/src/mame/machine/intv.cpp
+++ b/src/mame/machine/intv.cpp
@@ -326,28 +326,6 @@ void intv_state::machine_reset()
void intv_state::machine_start()
{
- // TODO: split these for intvkbd & intvecs??
- for (int i = 0; i < 4; i++)
- {
- char str[8];
- sprintf(str, "KEYPAD%i", i + 1);
- m_keypad[i] = ioport(str);
- }
- for (int i = 0; i < 4; i++)
- {
- char str[6];
- sprintf(str, "DISC%i", i + 1);
- m_disc[i] = ioport(str);
- }
- for (int i = 0; i < 4; i++)
- {
- char str[7];
- sprintf(str, "DISCX%i", i + 1);
- m_discx[i] = ioport(str);
- sprintf(str, "DISCY%i", i + 1);
- m_discy[i] = ioport(str);
- }
-
save_item(NAME(m_bus_copy_mode));
save_item(NAME(m_backtab_row));
save_item(NAME(m_ram16));
@@ -459,74 +437,3 @@ INTERRUPT_GEN_MEMBER(intv_state::intv_interrupt)
m_stic->screenrefresh();
}
-/* hand 0 == left, 1 == right, 2 == ECS hand controller 1, 3 == ECS hand controller 2 */
-UINT8 intv_state::intv_control_r(int hand)
-{
- static const UINT8 keypad_table[] =
- {
- 0xFF, 0x3F, 0x9F, 0x5F, 0xD7, 0xB7, 0x77, 0xDB,
- 0xBB, 0x7B, 0xDD, 0xBD, 0x7D, 0xDE, 0xBE, 0x7E
- };
-
- static const UINT8 disc_table[] =
- {
- 0xF3, 0xE3, 0xE7, 0xF7, 0xF6, 0xE6, 0xEE, 0xFE,
- 0xFC, 0xEC, 0xED, 0xFD, 0xF9, 0xE9, 0xEB, 0xFB
- };
-
- static const UINT8 discyx_table[5][5] =
- {
- { 0xE3, 0xF3, 0xFB, 0xEB, 0xE9 },
- { 0xE7, 0xE3, 0xFB, 0xE9, 0xF9 },
- { 0xF7, 0xF7, 0xFF, 0xFD, 0xFD },
- { 0xF6, 0xE6, 0xFE, 0xEC, 0xED },
- { 0xE6, 0xEE, 0xFE, 0xFC, 0xEC }
- };
-
- int x, y;
- UINT8 rv = 0xFF;
-
- /* keypad */
- x = m_keypad[hand]->read();
- for (y = 0; y < 16; y++)
- {
- if (x & (1 << y))
- {
- rv &= keypad_table[y];
- }
- }
-
- switch ((m_io_options->read() >> hand) & 1)
- {
- case 0: /* disc == digital */
- default:
-
- x = m_disc[hand]->read();
- for (y = 0; y < 16; y++)
- {
- if (x & (1 << y))
- {
- rv &= disc_table[y];
- }
- }
- break;
-
- case 1: /* disc == _fake_ analog */
-
- x = m_discx[hand]->read();
- y = m_discy[hand]->read();
- rv &= discyx_table[y / 32][x / 32];
- }
-
- return rv;
-}
-
-READ8_MEMBER( intv_state::intv_left_control_r )
-{
- return intv_control_r(0);
-}
-
-READ8_MEMBER( intv_state::intv_right_control_r )
-{
- return intv_control_r(1);
-}
diff --git a/src/mame/machine/m1comm.cpp b/src/mame/machine/m1comm.cpp
index ceec0fc893b..acde86cc451 100644
--- a/src/mame/machine/m1comm.cpp
+++ b/src/mame/machine/m1comm.cpp
@@ -51,6 +51,8 @@ Notes:
JP8 - Jumper, set to 1-2 (selects CLOCK SOURCE)
*/
+#include "emu.h"
+#include "emuopts.h"
#include "machine/m1comm.h"
#define Z80_TAG "m1commcpu"
diff --git a/src/mame/machine/m1comm.h b/src/mame/machine/m1comm.h
index 56106dbe28f..366ad62a455 100644
--- a/src/mame/machine/m1comm.h
+++ b/src/mame/machine/m1comm.h
@@ -7,7 +7,6 @@
#define __M1COMM_SIMULATION__
-#include "emu.h"
#include "cpu/z80/z80.h"
#define MCFG_M1COMM_ADD(_tag ) \
diff --git a/src/mame/machine/m3comm.cpp b/src/mame/machine/m3comm.cpp
new file mode 100644
index 00000000000..34f9460796a
--- /dev/null
+++ b/src/mame/machine/m3comm.cpp
@@ -0,0 +1,437 @@
+// license:BSD-3-Clause
+// copyright-holders:MetalliC
+
+
+// Communication board used by Sega in Model3, NAOMI and Hikaru, uses mostly same design
+// interface to main board LATTICE ICs: Model3 - 315-5958, Hikaru - 315-5958A, NAOMI - 315-6194A
+
+
+// TODO:
+// does IRQ 2 correct ? or it fired at any IO reg write by host
+// IRQ 5 source (data frame exchange cycle start signal on MASTER), can be some timer or 'token acquired' event ?
+// how exactly comm RAM bank flipping works ?
+// Is there any IRQs can be fired to host systems ?
+// Implement NAOMI G1-DMA mode
+// find out and hook actual networking exchange, some sort of token ring ???
+
+/*
+
+MODEL3 COMMUNICATION BOARD
+837-11861 171-7053B
+SEGA 1995
+|---------------------------------------------------------------------------------------------------|
+| |
+| LATTICE NKK N341256SJ-20 NKK N341256SJ-20 NKK N341256SJ-20 40MHz |
+| PLSI 2032 JP3 JP1 |
+| (315-5958) JP4 NKK N341256SJ-20 NKK N341256SJ-20 NKK N341256SJ-20 |
+| JP2 |
+| |
+| PALCE16V8 |
+| 315-6075 68000FN12 315-5804 315-5917 315-5917 |
+| (QFP144) (QFP80) (QFP80) |
+| PALCE16V8 |
+| 315-6074 |
+| LEDx7 |
+|---------------------------------------------------------------------------------------------------|
+JP1: 1-2
+JP2: 2-3
+JP3: not shorted
+JP4: shorted
+
+
+HIKARU COMMUNICATION BOARD
+837-13404 171-7641B
+|-----------------------------------|
+| 40MHz LATTICE 315-5917 |
+| PLSI2032 |
+| (315-5958A) 315-5917|
+| PAL |
+| 62256 |
+| 315-5804 62256 |
+| 62256 |
+| 62256 |
+| 68000 PAL |
+| 62256 |
+| 62256 PAL |
+|-----------------------------------|
+Notes:
+ 62256 - 32k x8 SRAM
+
+
+NAOMI COMMUNICATION BOARD
+840-0001E
+837-13489 171-7704B
+SEGA 1998
+|--------------------------------------------------------------------|
+| CN1 CN3 |
+| 40MHz 256KbSRAM 315-5917 256KbSRAM 315-5917 256KbSRAM |
+| 256KbSRAM (QFP80) 256KbSRAM (QFP80) 256KbSRAM |
+| |
+| |
+| 315-5804 68000FN12 LATTICE |
+| (QFP144) M5-128/104 |
+| 12YC/1-15YI/1 |
+| (315-6194A) |
+| CN2 |
+|--------------------------------------------------------------------|
+
+*/
+
+
+#include "emu.h"
+#include "emuopts.h"
+#include "machine/m3comm.h"
+
+#define M68K_TAG "m3commcpu"
+
+//////// Model 3 (main CPU @ C00xxxxx) and Hikaru (MMctrl bank 0E) interface
+DEVICE_ADDRESS_MAP_START(m3_map, 32, m3comm_device)
+ AM_RANGE(0x0000000, 0x000ffff) AM_READWRITE8(m3_comm_ram_r, m3_comm_ram_w, 0xffffffff)
+ AM_RANGE(0x0010000, 0x00101ff) AM_READWRITE16(m3_ioregs_r, m3_ioregs_w, 0xffff0000)
+ AM_RANGE(0x0020000, 0x003ffff) AM_READWRITE16(m3_m68k_ram_r, m3_m68k_ram_w, 0xffff0000)
+ADDRESS_MAP_END
+
+
+/*************************************
+ * M3COMM Memory Map
+ *************************************/
+static ADDRESS_MAP_START( m3comm_mem, AS_PROGRAM, 16, m3comm_device )
+ AM_RANGE(0x0000000, 0x000ffff) AM_RAM AM_SHARE("m68k_ram")
+ AM_RANGE(0x0040000, 0x00400ff) AM_READWRITE(ctrl_r, ctrl_w)
+ AM_RANGE(0x0080000, 0x008ffff) AM_RAMBANK("comm_ram")
+ AM_RANGE(0x00C0000, 0x00C00ff) AM_READWRITE(ioregs_r, ioregs_w)
+ADDRESS_MAP_END
+
+
+MACHINE_CONFIG_FRAGMENT( m3comm )
+ MCFG_CPU_ADD(M68K_TAG, M68000, 10000000) // random
+ MCFG_CPU_PROGRAM_MAP(m3comm_mem)
+
+ MCFG_RAM_ADD(RAM_TAG)
+ MCFG_RAM_DEFAULT_SIZE("128K")
+MACHINE_CONFIG_END
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+const device_type M3COMM = &device_creator<m3comm_device>;
+
+//-------------------------------------------------
+// machine_config_additions - device-specific
+// machine configurations
+//-------------------------------------------------
+
+machine_config_constructor m3comm_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( m3comm );
+}
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// m3comm_device - constructor
+//-------------------------------------------------
+
+m3comm_device::m3comm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, M3COMM, "MODEL-3 COMMUNICATION BD", tag, owner, clock, "m3comm", __FILE__),
+ m68k_ram(*this, "m68k_ram"),
+ m_commcpu(*this, M68K_TAG),
+ m_ram(*this, RAM_TAG),
+ m_line_rx(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE ),
+ m_line_tx(OPEN_FLAG_READ)
+{
+ // prepare localhost "filename"
+ m_localhost[0] = 0;
+ strcat(m_localhost, "socket.");
+ strcat(m_localhost, mconfig.options().comm_localhost());
+ strcat(m_localhost, ":");
+ strcat(m_localhost, mconfig.options().comm_localport());
+
+ // prepare remotehost "filename"
+ m_remotehost[0] = 0;
+ strcat(m_remotehost, "socket.");
+ strcat(m_remotehost, mconfig.options().comm_remotehost());
+ strcat(m_remotehost, ":");
+ strcat(m_remotehost, mconfig.options().comm_remoteport());
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void m3comm_device::device_start()
+{
+ timer = timer_alloc(TIMER_IRQ5);
+ timer->adjust(attotime::from_usec(10000));
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void m3comm_device::device_reset()
+{
+ naomi_control = 0xC000;
+ naomi_offset = 0;
+ m_status0 = 0;
+ m_status1 = 0;
+ m_commbank = 0;
+ membank("comm_ram")->set_base(m_ram->pointer());
+}
+
+void m3comm_device::device_reset_after_children()
+{
+ m_commcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+}
+
+/////////////
+
+UINT16 swapb16(UINT16 data)
+{
+ return (data << 8) | (data >> 8);
+}
+
+
+void m3comm_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+{
+ if(id != TIMER_IRQ5)
+ return;
+
+ m_commcpu->set_input_line(M68K_IRQ_5, ASSERT_LINE);
+ timer.adjust(attotime::from_usec(10000)); // there is it from actually ??????
+}
+
+///////////// Internal MMIO
+
+READ16_MEMBER(m3comm_device::ctrl_r)
+{
+ switch (offset) {
+ case 0x00 / 2:
+ return m_commbank;
+ default:
+ logerror("M3COMM CtrlRead from %04x mask %04x unimplemented!\n", offset * 2, mem_mask);
+ return 0;
+ }
+}
+WRITE16_MEMBER(m3comm_device::ctrl_w)
+{
+ switch (offset) {
+ case 0x00 / 2: // Communication RAM bank switch (flipped in IRQ2 and IRQ5 handlers)
+ m_commbank = data;
+ membank("comm_ram")->set_base(m_ram->pointer() + ((m_commbank & 1) ? 0x10000 : 0));
+ break;
+ case 0x40 / 2: // IRQ 5 ACK
+ m_commcpu->set_input_line(M68K_IRQ_5, CLEAR_LINE);
+ break;
+ case 0xA0 / 2: // IRQ 2 ACK
+ m_commcpu->set_input_line(M68K_IRQ_2, CLEAR_LINE);
+ break;
+ case 0x80 / 2: // LEDs
+ case 0xC0 / 2: // possible node unique ID and broadcast flag (7FFF) ????
+ case 0xE0 / 2: // unknown, conditionally cleared in IRQ6 (receive complete) handler
+ break;
+ default:
+ logerror("M3COMM CtrlWrite to %04x %04x mask %04x\n", offset * 2, data, mem_mask);
+ }
+}
+
+READ16_MEMBER(m3comm_device::ioregs_r)
+{
+ switch (offset) {
+ case 0x00 / 2: // UNK, Model3 host wait it to be NZ then write 0
+ // perhaps Model3 IO regs 0-80 mapped not to M68K C0000-80 ?
+ return 1;
+ case 0x10 / 2: // receive result/status
+ return 5; // dbg random
+ case 0x18 / 2: // transmit result/status
+ return 5; // dbg random
+ case 0x88 / 2:
+ return m_status0;
+ case 0x8A / 2:
+ return m_status1;
+ default:
+ logerror("M3COMM IOread from %02x mask %04x\n", offset * 2, mem_mask);
+ return 0;
+ }
+}
+WRITE16_MEMBER(m3comm_device::ioregs_w)
+{
+ switch (offset) {
+ case 0x14 / 2: // written 80 at data receive enable, 0 then 1 at IRQ6 handler
+ if ((data & 0xFF) != 0x80)
+ m_commcpu->set_input_line(M68K_IRQ_6, CLEAR_LINE);
+ break; // it seems one of these ^v is IRQ6 ON/ACK, another is data transfer enable
+ case 0x16 / 2: // written 8C at data receive enable, 0 at IRQ6 handler
+ if ((data & 0xFF) == 0x8C) {
+ logerror("M3COMM Receive offs %04x size %04x\n", recv_offset, recv_size);
+/*
+ if (!m_line_rx.is_open())
+ {
+ logerror("M3COMM: listen on %s\n", m_localhost);
+ m_line_rx.open(m_localhost);
+ }
+ if (m_line_rx.is_open())
+ {
+ UINT8 *commram = (UINT8*)membank("comm_ram")->base();
+ m_line_rx.read(&commram[recv_offset], recv_size);
+ }
+*/
+ m_commcpu->set_input_line(M68K_IRQ_6, ASSERT_LINE); // debug hack
+ }
+ break;
+ case 0x1A / 2: // written 80 at data transmit enable, 0 at IRQ4 handler
+ break; // it seems one of these ^v is IRQ4 ON/ACK, another is data transfer enable
+ case 0x1C / 2: // written 8C at data transmit enable, 0 at IRQ4 handler
+ if ((data & 0xFF) == 0x8C) {
+ logerror("M3COMM Send offs %04x size %04x\n", send_offset, send_size);
+/*
+ if (!m_line_tx.is_open())
+ {
+ logerror("M3COMM: connect to %s\n", m_remotehost);
+ m_line_tx.open(m_remotehost);
+ }
+ if (m_line_tx.is_open())
+ {
+ UINT8 *commram = (UINT8*)membank("comm_ram")->base();
+ m_line_tx.write(&commram[send_offset], send_size);
+ }
+*/
+ }
+ m_commcpu->set_input_line(M68K_IRQ_4, ((data & 0xFF) == 0x8C) ? ASSERT_LINE : CLEAR_LINE); // debug hack
+ break;
+ case 0x40 / 2:
+ recv_offset = (recv_offset >> 8) | (data << 8);
+ break;
+ case 0x42 / 2:
+ recv_size = (recv_size >> 8) | (data << 8);
+ break;
+ case 0x44 / 2:
+ send_offset = (send_offset >> 8) | (data << 8);
+ break;
+ case 0x46 / 2:
+ send_size = (send_size >> 8) | (data << 8);
+ break;
+ case 0x88 / 2:
+ m_status0 = (m_status0 & ~mem_mask) | (data & mem_mask);
+ break;
+ case 0x8A / 2:
+ m_status1 = (m_status1 & ~mem_mask) | (data & mem_mask);
+ break;
+ case 0xC0 / 2:
+ m_commcpu->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
+ break;
+ default:
+ logerror("M3COMM IOwrite to %02x %04x mask %04x\n", offset * 2, data, mem_mask);
+ return;
+ }
+}
+
+////////////// Model3 interface
+
+READ16_MEMBER(m3comm_device::m3_m68k_ram_r)
+{
+ UINT16 value = m68k_ram[offset]; // FIXME endian
+ return swapb16(value);
+}
+WRITE16_MEMBER(m3comm_device::m3_m68k_ram_w)
+{
+ m68k_ram[offset] = swapb16(data); // FIXME endian
+}
+READ8_MEMBER(m3comm_device::m3_comm_ram_r)
+{
+ UINT8 *commram = (UINT8*)membank("comm_ram")->base();
+ return commram[offset ^ 3];
+}
+WRITE8_MEMBER(m3comm_device::m3_comm_ram_w)
+{
+ UINT8 *commram = (UINT8*)membank("comm_ram")->base();
+ commram[offset ^ 3] = data;
+}
+READ16_MEMBER(m3comm_device::m3_ioregs_r)
+{
+ UINT16 value = ioregs_r(space, offset, swapb16(mem_mask));
+ return swapb16(value);
+}
+WRITE16_MEMBER(m3comm_device::m3_ioregs_w)
+{
+ UINT16 value = swapb16(data);
+ ioregs_w(space, offset, value, swapb16(mem_mask));
+
+ // guess, can be asserted at any reg write
+ if (offset == (0x88 / 2))
+ m_commcpu->set_input_line(M68K_IRQ_2, ASSERT_LINE);
+}
+
+////////////// NAOMI inerface
+
+READ16_MEMBER(m3comm_device::naomi_r)
+{
+ switch (offset)
+ {
+ case 0: // 5F7018
+ return naomi_control;
+ case 1: // 5F701C
+ return naomi_offset;
+ case 2: // 5F7020
+ {
+// logerror("M3COMM read @ %08x\n", (naomi_control << 16) | naomi_offset);
+ UINT16 value;
+ if (naomi_control & 1)
+ value = m68k_ram[naomi_offset / 2]; // FIXME endian
+ else {
+ UINT16 *commram = (UINT16*)membank("comm_ram")->base();
+
+ value = commram[naomi_offset / 2]; // FIXME endian
+ }
+ naomi_offset += 2;
+ return value;
+ }
+ case 3: // 5F7024
+ return m_status0;
+ case 4: // 5F7028
+ return m_status1;
+ default:
+ return 0;
+ }
+}
+WRITE16_MEMBER(m3comm_device::naomi_w)
+{
+ switch (offset)
+ {
+ case 0: // 5F7018
+ // bit 0: access RAM is 0 - communication RAM / 1 - M68K RAM
+ // bit 1: comm RAM bank ??? (not really used)
+ // bit 5: M68K Reset
+ // bit 6: ???
+ // bit 7: ???
+ // bit 14: G1 DMA bus master 0 - active / 1 - disabled
+ // bit 15: 0 - enable / 1 - disable this device ???
+// logerror("M3COMM control write %04x\n", data);
+ naomi_control = data;
+ m_commcpu->set_input_line(INPUT_LINE_RESET, (naomi_control & 0x20) ? CLEAR_LINE : ASSERT_LINE);
+ break;
+ case 1: // 5F701C
+ naomi_offset = data;
+ break;
+ case 2: // 5F7020
+// logerror("M3COMM write @ %08x %04x\n", (naomi_control << 16) | naomi_offset, data);
+ if (naomi_control & 1)
+ m68k_ram[naomi_offset / 2] = data; // FIXME endian
+ else {
+ UINT16 *commram = (UINT16*)membank("comm_ram")->base();
+ commram[naomi_offset / 2] = data; // FIXME endian
+ }
+ naomi_offset += 2;
+ break;
+ case 3: // 5F7024
+ m_status0 = data;
+ break;
+ case 4: // 5F7028
+ m_status1 = data;
+ break;
+ }
+}
diff --git a/src/mame/machine/m3comm.h b/src/mame/machine/m3comm.h
new file mode 100644
index 00000000000..6a9a77a4cc4
--- /dev/null
+++ b/src/mame/machine/m3comm.h
@@ -0,0 +1,82 @@
+// license:BSD-3-Clause
+// copyright-holders:MetalliC
+#pragma once
+
+#ifndef __M3COMM_H__
+#define __M3COMM_H__
+
+#include "machine/ram.h"
+#include "cpu/m68000/m68000.h"
+
+#define MCFG_M3COMM_ADD(_tag ) \
+ MCFG_DEVICE_ADD(_tag, M3COMM, 0)
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+class m3comm_device : public device_t
+{
+public:
+ // construction/destruction
+ m3comm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // optional information overrides
+ virtual machine_config_constructor device_mconfig_additions() const override;
+
+ required_shared_ptr<UINT16> m68k_ram;
+ required_device<m68000_device> m_commcpu;
+
+ DECLARE_ADDRESS_MAP(m3_map, 32);
+
+ DECLARE_READ16_MEMBER(ctrl_r);
+ DECLARE_WRITE16_MEMBER(ctrl_w);
+
+ DECLARE_READ16_MEMBER(ioregs_r);
+ DECLARE_WRITE16_MEMBER(ioregs_w);
+
+ DECLARE_READ16_MEMBER(m3_m68k_ram_r);
+ DECLARE_WRITE16_MEMBER(m3_m68k_ram_w);
+ DECLARE_READ8_MEMBER(m3_comm_ram_r);
+ DECLARE_WRITE8_MEMBER(m3_comm_ram_w);
+ DECLARE_READ16_MEMBER(m3_ioregs_r);
+ DECLARE_WRITE16_MEMBER(m3_ioregs_w);
+
+ DECLARE_READ16_MEMBER(naomi_r);
+ DECLARE_WRITE16_MEMBER(naomi_w);
+
+protected:
+ enum { TIMER_IRQ5 = 1 };
+
+ required_device<ram_device> m_ram;
+
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_reset_after_children() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+private:
+ UINT16 naomi_control;
+ UINT16 naomi_offset;
+ UINT16 m_status0;
+ UINT16 m_status1;
+ UINT16 m_commbank;
+
+ UINT16 recv_offset;
+ UINT16 recv_size;
+ UINT16 send_offset;
+ UINT16 send_size;
+
+
+ emu_file m_line_rx; // rx line - can be either differential, simple serial or toslink
+ emu_file m_line_tx; // tx line - is differential, simple serial and toslink
+ char m_localhost[256];
+ char m_remotehost[256];
+
+ emu_timer *timer;
+};
+
+// device type definition
+extern const device_type M3COMM;
+
+#endif /* __M3COMM_H__ */
diff --git a/src/mame/machine/mhavoc.cpp b/src/mame/machine/mhavoc.cpp
index 375517022ee..1596717c658 100644
--- a/src/mame/machine/mhavoc.cpp
+++ b/src/mame/machine/mhavoc.cpp
@@ -265,6 +265,9 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_out_0_w)
m_gamma_xmtd = 0;
}
+ /* Bit 2 = Beta reset */
+ /* this is the unpopulated processor in the corner of the pcb farthest from the quad pokey, not used on shipping boards */
+
/* Bit 0 = Roller light (Blinks on fatal errors) */
output().set_led_value(0, data & 0x01);
}
diff --git a/src/mame/machine/model1.cpp b/src/mame/machine/model1.cpp
index 2f974d00a97..49a921dcef0 100644
--- a/src/mame/machine/model1.cpp
+++ b/src/mame/machine/model1.cpp
@@ -247,30 +247,36 @@ TGP_FUNCTION( model1_state::anglev )
next_fn();
}
-TGP_FUNCTION( model1_state::f11 )
-{
- float a = fifoin_pop_f();
- float b = fifoin_pop_f();
- float c = fifoin_pop_f();
- float d = fifoin_pop_f();
- float e = fifoin_pop_f();
- float f = fifoin_pop_f();
- float g = fifoin_pop_f();
- float h = fifoin_pop_f();
- float i = fifoin_pop_f();
- (void)a;
- (void)b;
- (void)c;
- (void)d;
- (void)e;
- (void)f;
- (void)g;
- (void)h;
- (void)i;
- logerror("TGP f11 %f, %f, %f, %f, %f, %f, %f, %f, %f (%x)\n", a, b, c, d, e, f, g, h, i, m_pushpc);
- fifoout_push_f(0);
- fifoout_push_f(0);
- fifoout_push_f(0);
+TGP_FUNCTION( model1_state::triangle_normal )
+{
+ float p1x = fifoin_pop_f();
+ float p1y = fifoin_pop_f();
+ float p1z = fifoin_pop_f();
+ float p2x = fifoin_pop_f();
+ float p2y = fifoin_pop_f();
+ float p2z = fifoin_pop_f();
+ float p3x = fifoin_pop_f();
+ float p3y = fifoin_pop_f();
+ float p3z = fifoin_pop_f();
+
+ float nx = (p1y-p2y)*(p3z-p2z) - (p3y-p2y)*(p1z-p2z);
+ float ny = (p1z-p2z)*(p3x-p2x) - (p3z-p2z)*(p1x-p2x);
+ float nz = (p1x-p2x)*(p3y-p2y) - (p3x-p2x)*(p1y-p2y);
+
+ float nn = sqrtf(nx*nx + ny*ny + nz*nz);
+ if(nn < 1e-3)
+ nn = 0;
+ else
+ nn = 1/nn;
+
+ nx *= nn;
+ ny *= nn;
+ nz *= nn;
+
+ logerror("TGP triangle_normal %f, %f, %f, %f, %f, %f, %f, %f, %f (%x)\n", p1x, p1y, p1z, p2x, p2y,p2z, p3x, p3y, p3z, m_pushpc);
+ fifoout_push_f(nx);
+ fifoout_push_f(ny);
+ fifoout_push_f(nz);
next_fn();
}
@@ -304,19 +310,25 @@ TGP_FUNCTION( model1_state::track_select )
next_fn();
}
-TGP_FUNCTION( model1_state::f14 )
+TGP_FUNCTION( model1_state::load_base )
{
m_tgp_vr_base[0] = fifoin_pop_f();
m_tgp_vr_base[1] = fifoin_pop_f();
m_tgp_vr_base[2] = fifoin_pop_f();
m_tgp_vr_base[3] = fifoin_pop_f();
+ logerror("TGP load_base %f, %f, %f, %f (%x)\n", m_tgp_vr_base[0], m_tgp_vr_base[1], m_tgp_vr_base[2], m_tgp_vr_base[3], m_pushpc);
next_fn();
}
-TGP_FUNCTION( model1_state::f15_swa )
+TGP_FUNCTION( model1_state::transpose )
{
- logerror("TGP f15_swa (%x)\n", m_pushpc);
+ logerror("TGP transpose (%x)\n", m_pushpc);
+
+ float t;
+ t = m_cmat[1]; m_cmat[1] = m_cmat[3]; m_cmat[3] = t;
+ t = m_cmat[2]; m_cmat[2] = m_cmat[6]; m_cmat[6] = t;
+ t = m_cmat[5]; m_cmat[5] = m_cmat[7]; m_cmat[7] = t;
next_fn();
}
@@ -371,6 +383,8 @@ TGP_FUNCTION( model1_state::matrix_trans )
float b = fifoin_pop_f();
float c = fifoin_pop_f();
+ logerror("TCP matrix_trans %f %f %f (%x)\n", a, b, c, m_pushpc);
+
m_cmat[ 9] += m_cmat[0]*a+m_cmat[3]*b+m_cmat[6]*c;
m_cmat[10] += m_cmat[1]*a+m_cmat[4]*b+m_cmat[7]*c;
m_cmat[11] += m_cmat[2]*a+m_cmat[5]*b+m_cmat[8]*c;
@@ -487,24 +501,74 @@ TGP_FUNCTION( model1_state::track_read_quad )
next_fn();
}
-TGP_FUNCTION( model1_state::f24_swa )
+TGP_FUNCTION( model1_state::intercept )
{
- float a = fifoin_pop_f();
- float b = fifoin_pop_f();
- float c = fifoin_pop_f();
- float d = fifoin_pop_f();
- float e = fifoin_pop_f();
- float f = fifoin_pop_f();
- UINT32 g = fifoin_pop();
- (void)a;
- (void)b;
- (void)c;
- (void)d;
- (void)e;
- (void)f;
- (void)g;
- logerror("TGP f24_swa %f, %f, %f, %f, %f, %f, %x (%x)\n", a, b, c, d, e, f, g, m_pushpc);
- fifoout_push_f(0);
+ const UINT32 *tgp_data = (const UINT32 *)memregion("user2")->base();
+
+ float x1 = fifoin_pop_f();
+ float y1 = fifoin_pop_f();
+ float z1 = fifoin_pop_f();
+ float x2 = fifoin_pop_f();
+ float y2 = fifoin_pop_f();
+ float z2 = fifoin_pop_f();
+ UINT32 idx = fifoin_pop();
+
+ logerror("TGP intercept %f, %f, %f, %f, %f, %f, %x (%x)\n", x1, y1, z1, x2, y2, z2, idx, m_pushpc);
+
+ float dx = x2-x1;
+ float dy = y2-y1;
+ float dz = z2-z1;
+
+ idx = tgp_data[0x10] + 2*idx;
+ UINT32 count = tgp_data[idx];
+ UINT32 adr = tgp_data[idx+1];
+ UINT32 ret = 1;
+
+ for(unsigned int j=0; j<count; j++) {
+ float point[4][3];
+ for(int pt=0; pt<4; pt++)
+ for(int dim=0; dim<3; dim++)
+ point[pt][dim] = u2f(tgp_data[adr++]);
+ float plane[4];
+ for(int dim=0; dim<4; dim++)
+ plane[dim] = u2f(tgp_data[adr++]);
+ adr++; // 0, 1 or 2...
+
+ float den = dx * plane[0] + dy * plane[1] + dz * plane[2];
+ if(den > -0.0001 && den < 0.0001)
+ continue;
+ float t = - (x1 * plane[0] + y1 * plane[1] + z1 * plane[2] + plane[3]) / den;
+ if(t < 0 || t > 1)
+ continue;
+
+ float ix = x1 + dx*t;
+ float iy = y1 + dy*t;
+ float iz = z1 + dz*t;
+
+ int cp = 0;
+ for(int pt=0; pt<4; pt++) {
+ int pt1 = (pt+1) & 3;
+ float p01x = point[pt1][0] - point[pt][0];
+ float p01y = point[pt1][1] - point[pt][1];
+ float p01z = point[pt1][2] - point[pt][2];
+ float p0ix = ix - point[pt][0];
+ float p0iy = iy - point[pt][1];
+ float p0iz = iz - point[pt][2];
+ float det = plane[0] * (p01y * p0iz - p01z * p0iy) + plane[1] * (p01z * p0ix - p01x * p0iz) + plane[2] * (p01x * p0iy - p01y * p0ix);
+ cp += det >= 0;
+ }
+ if(cp == 0 || cp == 4) {
+ m_tgp_int_px = ix;
+ m_tgp_int_py = iy;
+ m_tgp_int_pz = iz;
+ ret = 0;
+ adr -= 17;
+ break;
+ }
+ }
+
+ m_tgp_int_adr = adr;
+ fifoout_push(ret);
next_fn();
}
@@ -514,7 +578,6 @@ TGP_FUNCTION( model1_state::transform_point )
float y = fifoin_pop_f();
float z = fifoin_pop_f();
logerror("TGP transform_point %f, %f, %f (%x)\n", x, y, z, m_pushpc);
-
fifoout_push_f(m_cmat[0]*x+m_cmat[3]*y+m_cmat[6]*z+m_cmat[9]);
fifoout_push_f(m_cmat[1]*x+m_cmat[4]*y+m_cmat[7]*z+m_cmat[10]);
fifoout_push_f(m_cmat[2]*x+m_cmat[5]*y+m_cmat[8]*z+m_cmat[11]);
@@ -568,7 +631,7 @@ TGP_FUNCTION( model1_state::distance3 )
a -= d;
b -= e;
c -= f;
- fifoout_push_f((a*a+b*b+c*c)/sqrtf(a*a+b*b+c*c));
+ fifoout_push_f(sqrtf(a*a+b*b+c*c));
next_fn();
}
@@ -663,12 +726,9 @@ TGP_FUNCTION( model1_state::xyz2rqf )
float b = fifoin_pop_f();
float c = fifoin_pop_f();
float norm;
- (void)a;
- (void)b;
- (void)c;
logerror("TGP xyz2rqf %f, %f, %f (%x)\n", a, b, c, m_pushpc);
- fifoout_push_f((a*a+b*b+c*c)/sqrtf(a*a+b*b+c*c));
- norm = sqrt(a*a+c*c);
+ fifoout_push_f(sqrtf(a*a+b*b+c*c));
+ norm = sqrtf(a*a+c*c);
if(!c) {
if(a>=0)
fifoout_push(0);
@@ -732,14 +792,18 @@ TGP_FUNCTION( model1_state::f43_swa )
next_fn();
}
-TGP_FUNCTION( model1_state::f44 )
+TGP_FUNCTION( model1_state::track_read_tri )
{
- float a = fifoin_pop_f();
- (void)a;
- logerror("TGP f44 %f (%x)\n", a, m_pushpc);
- fifoout_push_f(0);
- fifoout_push_f(0);
- fifoout_push_f(0);
+ const UINT32 *tgp_data = (const UINT32 *)memregion("user2")->base();
+ UINT32 a = fifoin_pop();
+ int offd;
+
+ logerror("TGP track_read_tri %d (%x)\n", a, m_pushpc);
+
+ offd = tgp_data[0x20+m_tgp_vr_select] + 16*a;
+ fifoout_push(tgp_data[offd+12]);
+ fifoout_push(tgp_data[offd+13]);
+ fifoout_push(tgp_data[offd+14]);
next_fn();
}
@@ -748,7 +812,7 @@ TGP_FUNCTION( model1_state::matrix_sdir )
float a = fifoin_pop_f();
float b = fifoin_pop_f();
float c = fifoin_pop_f();
- float norm = sqrt(a*a+b*b+c*c);
+ float norm = sqrtf(a*a+b*b+c*c);
float t[9], m[9];
logerror("TGP matrix_sdir %f, %f, %f (%x)\n", a, b, c, m_pushpc);
@@ -764,7 +828,7 @@ TGP_FUNCTION( model1_state::matrix_sdir )
t[1] = b / norm;
t[2] = a / norm;
- norm = sqrt(a*a+c*c);
+ norm = sqrtf(a*a+c*c);
t[6] = a/norm;
t[7] = 0;
t[8] = c/norm;
@@ -772,7 +836,7 @@ TGP_FUNCTION( model1_state::matrix_sdir )
t[3] = -b*c;
t[4] = a*a+c*c;
t[5] = -b*a;
- norm = sqrt(t[3]*t[3]+t[4]*t[4]+t[5]*t[5]);
+ norm = sqrtf(t[3]*t[3]+t[4]*t[4]+t[5]*t[5]);
t[3] /= norm;
t[4] /= norm;
t[5] /= norm;
@@ -793,27 +857,25 @@ TGP_FUNCTION( model1_state::matrix_sdir )
next_fn();
}
-TGP_FUNCTION( model1_state::f45 )
+TGP_FUNCTION( model1_state::fsqrt )
{
float a = fifoin_pop_f();
- (void)a;
- logerror("TGP f45 %f (%x)\n", a, m_pushpc);
- fifoout_push_f(0);
+ logerror("TGP fsqrt %f (%x)\n", a, m_pushpc);
+ fifoout_push_f(sqrtf(a));
next_fn();
}
TGP_FUNCTION( model1_state::vlength )
{
- float a = fifoin_pop_f() - m_tgp_vr_base[0];
- float b = fifoin_pop_f() - m_tgp_vr_base[1];
- float c = fifoin_pop_f() - m_tgp_vr_base[2];
- logerror("TGP vlength %f, %f, %f (%x)\n", a, b, c, m_pushpc);
+ float x = fifoin_pop_f();
+ float y = fifoin_pop_f();
+ float z = fifoin_pop_f();
+ logerror("TGP vlength %f, %f, %f (%x)\n", x, y, z, m_pushpc);
- a = (a*a+b*b+c*c);
- b = 1/sqrt(a);
- c = a * b;
- c -= m_tgp_vr_base[3];
- fifoout_push_f(c);
+ x -= m_tgp_vr_base[0];
+ y -= m_tgp_vr_base[1];
+ z -= m_tgp_vr_base[2];
+ fifoout_push_f(sqrtf(x*x + y*y + z*z) - m_tgp_vr_base[3]);
next_fn();
}
@@ -931,7 +993,7 @@ TGP_FUNCTION( model1_state::matrix_rdir )
float a = fifoin_pop_f();
float b = fifoin_pop_f();
float c = fifoin_pop_f();
- float norm = sqrt(a*a+c*c);
+ float norm = sqrtf(a*a+c*c);
float t1, t2;
(void)b;
@@ -1055,12 +1117,13 @@ TGP_FUNCTION( model1_state::f56 )
next_fn();
}
-TGP_FUNCTION( model1_state::f57 )
+TGP_FUNCTION( model1_state::int_normal )
{
- logerror("TGP f57 (%x)\n", m_pushpc);
- fifoout_push_f(0);
- fifoout_push_f(0);
- fifoout_push_f(0);
+ const UINT32 *tgp_data = (const UINT32 *)memregion("user2")->base();
+ logerror("TGP int_normal (%x)\n", m_pushpc);
+ fifoout_push_f(u2f(tgp_data[m_tgp_int_adr+12]));
+ fifoout_push_f(u2f(tgp_data[m_tgp_int_adr+13]));
+ fifoout_push_f(u2f(tgp_data[m_tgp_int_adr+14]));
next_fn();
}
@@ -1080,12 +1143,12 @@ TGP_FUNCTION( model1_state::acc_geti )
next_fn();
}
-TGP_FUNCTION( model1_state::f60 )
+TGP_FUNCTION( model1_state::int_point )
{
- logerror("TGP f60 (%x)\n", m_pushpc);
- fifoout_push_f(0);
- fifoout_push_f(0);
- fifoout_push_f(0);
+ logerror("TGP int_point (%x)\n", m_pushpc);
+ fifoout_push_f(m_tgp_int_px);
+ fifoout_push_f(m_tgp_int_py);
+ fifoout_push_f(m_tgp_int_pz);
next_fn();
}
@@ -1109,7 +1172,7 @@ TGP_FUNCTION( model1_state::col_testpt )
logerror("TGP col_testpt %f, %f (%x)\n", a, b, m_pushpc);
x = a - m_tgp_vr_circx;
y = b - m_tgp_vr_circy;
- fifoout_push_f(((x*x+y*y)/sqrtf(x*x+y*y)) - m_tgp_vr_circrad);
+ fifoout_push_f(sqrtf(x*x+y*y) - m_tgp_vr_circrad);
next_fn();
}
@@ -1170,7 +1233,7 @@ TGP_FUNCTION( model1_state::distance )
logerror("TGP distance (%f, %f), (%f, %f) (%x)\n", a, b, c, d, m_pushpc);
c -= a;
d -= b;
- fifoout_push_f((c*c+d*d)/sqrtf(c*c+d*d));
+ fifoout_push_f(sqrtf(c*c+d*d));
next_fn();
}
@@ -1233,7 +1296,7 @@ TGP_FUNCTION( model1_state::cpa )
dv_z = (i-k)*(1-dt) + (j-l)*dt;
dv2 = dv_x*dv_x + dv_y*dv_y + dv_z*dv_z;
- fifoout_push_f(sqrt(dv2));
+ fifoout_push_f(sqrtf(dv2));
next_fn();
}
@@ -1581,110 +1644,111 @@ TGP_FUNCTION( model1_state::f103 )
next_fn();
}
+// Addresses in daytona's TGP program
const struct model1_state::function model1_state::ftab_vf[] = {
- { &model1_state::fadd, 2 }, /* 0x00 */
- { &model1_state::fsub, 2 },
- { &model1_state::fmul, 2 },
- { &model1_state::fdiv, 2 },
- { nullptr, 0 },
- { &model1_state::matrix_push, 0 },
- { &model1_state::matrix_pop, 0 },
- { &model1_state::matrix_write, 12 },
- { &model1_state::clear_stack, 0 },
- { nullptr, 0 },
- { &model1_state::anglev, 2 },
- { nullptr, 0 },
- { nullptr, 0 },
- { &model1_state::track_select, 1 },
- { &model1_state::f14, 4 },
- { &model1_state::anglep, 4 },
-
- { &model1_state::matrix_ident, 0 }, /* 0x10 */
- { &model1_state::matrix_read, 0 },
- { &model1_state::matrix_trans, 3 },
- { &model1_state::matrix_scale, 3 },
- { &model1_state::matrix_rotx, 1 },
- { &model1_state::matrix_roty, 1 },
- { &model1_state::matrix_rotz, 1 },
- { nullptr, 0 },
- { &model1_state::track_read_quad, 1 },
- { nullptr, 0 },
- { &model1_state::transform_point, 3 },
- { &model1_state::fsin_m1, 1 },
- { &model1_state::fcos_m1, 1 },
- { &model1_state::fsinm_m1, 2 },
- { &model1_state::fcosm_m1, 2 },
- { &model1_state::distance3, 6 },
-
- { nullptr, 0 }, /* 0x20 */
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { &model1_state::acc_set, 1 },
- { &model1_state::acc_get, 0 },
- { &model1_state::acc_add, 1 },
- { &model1_state::acc_sub, 1 },
- { &model1_state::acc_mul, 1 },
- { &model1_state::acc_div, 1 }, // not used ?
- { &model1_state::f42, 3 },
- { &model1_state::f43, 6 },
- { &model1_state::f44, 1 },
- { &model1_state::f45, 1 },
- { &model1_state::vlength, 3 },
- { nullptr, 0 },
-
- { &model1_state::track_read_info, 1 }, /* 0x30 */
- { &model1_state::colbox_set, 12 },
- { &model1_state::colbox_test, 3 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { &model1_state::track_lookup, 4 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
-
- { &model1_state::col_setcirc, 3 }, /* 0x40 */
- { &model1_state::col_testpt, 2 },
- { nullptr, 0 },
- { &model1_state::distance, 4 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { &model1_state::car_move, 4 },
- { &model1_state::cpa, 12 },
- { nullptr, 0 },
+ { &model1_state::fadd, 2 }, /* 0x00 */ // 0b5
+ { &model1_state::fsub, 2 }, // 0ba
+ { &model1_state::fmul, 2 }, // 0bf
+ { &model1_state::fdiv, 2 }, // 0c4
+ { nullptr, 0 }, // 0d2
+ { &model1_state::matrix_push, 0 }, // 0e3
+ { &model1_state::matrix_pop, 0 }, // 0f7
+ { &model1_state::matrix_write, 12 }, // 106
+ { &model1_state::clear_stack, 0 }, // 10a
+ { &model1_state::matrix_mul, 12 }, // 10e
+ { &model1_state::anglev, 2 }, // 154
+ { nullptr, 0 }, // 15d
+ { nullptr, 0 }, // 19f
+ { &model1_state::track_select, 1 }, // 1b8
+ { &model1_state::load_base, 4 }, // 1bb
+ { &model1_state::anglep, 4 }, // 1c1
+
+ { &model1_state::matrix_ident, 0 }, /* 0x10 */ // 1d2
+ { &model1_state::matrix_read, 0 }, // 1d9
+ { &model1_state::matrix_trans, 3 }, // 1dd
+ { &model1_state::matrix_scale, 3 }, // 1f3
+ { &model1_state::matrix_rotx, 1 }, // 20a
+ { &model1_state::matrix_roty, 1 }, // 223
+ { &model1_state::matrix_rotz, 1 }, // 23b
+ { nullptr, 0 }, // 253
+ { &model1_state::track_read_quad, 1 }, // 2aa
+ { nullptr, 0 }, // 2b0
+ { &model1_state::transform_point, 3 }, // 2b2
+ { &model1_state::fsin_m1, 1 }, // 2cb
+ { &model1_state::fcos_m1, 1 }, // 2ce
+ { &model1_state::fsinm_m1, 2 }, // 2d1
+ { &model1_state::fcosm_m1, 2 }, // 2d7
+ { &model1_state::distance3, 6 }, // 2dd
+
+ { nullptr, 0 }, /* 0x20 */ // 2ff
+ { nullptr, 0 }, // 2ff
+ { nullptr, 0 }, // 300
+ { nullptr, 0 }, // 304
+ { &model1_state::acc_set, 1 }, // 308
+ { &model1_state::acc_get, 0 }, // 30a
+ { &model1_state::acc_add, 1 }, // 30c
+ { &model1_state::acc_sub, 1 }, // 311
+ { &model1_state::acc_mul, 1 }, // 316
+ { &model1_state::acc_div, 1 }, // 31b
+ { &model1_state::f42, 3 }, // 329
+ { &model1_state::f43, 6 }, // 36c
+ { &model1_state::track_read_tri, 1 }, // 3c2
+ { &model1_state::fsqrt, 1 }, // 3c7
+ { &model1_state::vlength, 3 }, // 3cf
+ { nullptr, 0 }, // 3ef
+
+ { &model1_state::track_read_info, 1 }, /* 0x30 */ // 410
+ { &model1_state::colbox_set, 12 }, // 413
+ { &model1_state::colbox_test, 3 }, // 417
+ { nullptr, 0 }, // 43b
+ { nullptr, 0 }, // 44d
+ { nullptr, 0 }, // 452
+ { &model1_state::track_lookup, 4 }, // 457
+ { nullptr, 0 }, // 51a
+ { nullptr, 0 }, // 521
+ { nullptr, 0 }, // 52f
+ { nullptr, 0 }, // 53d
+ { nullptr, 0 }, // 545
+ { nullptr, 0 }, // 558
+ { nullptr, 0 }, // 559
+ { nullptr, 0 }, // 5c6
+ { nullptr, 0 }, // 5e9
+
+ { &model1_state::col_setcirc, 3 }, /* 0x40 */ // 5f3
+ { &model1_state::col_testpt, 2 }, // 5fa
+ { nullptr, 0 }, // 615
+ { &model1_state::distance, 4 }, // 631
+ { nullptr, 0 }, // 63f
+ { nullptr, 0 }, // 643
+ { nullptr, 0 }, // 64b
+ { &model1_state::car_move, 4 }, // 661
+ { &model1_state::cpa, 12 }, // 7d9
+ { nullptr, 0 },
{ &model1_state::vmat_store, 1 },
{ &model1_state::vmat_restore, 1 },
- { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::vmat_mul, 2 },
{ &model1_state::vmat_read, 1 },
{ &model1_state::matrix_unrot, 0 },
- { &model1_state::f80, 0 }, /* 0x50 */
- { nullptr, 0 },
+ { &model1_state::f80, 0 }, /* 0x50 */
+ { nullptr, 0 },
{ &model1_state::matrix_rtrans, 0 },
- { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::vmat_save, 1 },
{ &model1_state::vmat_load, 1 },
{ &model1_state::ram_setadr, 1 },
{ &model1_state::groundbox_test, 3 },
- { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::f89, 4 },
- { nullptr, 0 },
- { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::f92, 4 },
{ &model1_state::f93, 1 },
{ &model1_state::f94, 1 },
{ &model1_state::vmat_flatten, 0 },
- { &model1_state::vmat_load1, 1 }, /* 0x60 */
+ { &model1_state::vmat_load1, 1 }, /* 0x60 */
{ &model1_state::ram_trans, 0 },
{ &model1_state::f98, 1 },
{ &model1_state::f99, 0 },
@@ -1695,27 +1759,25 @@ const struct model1_state::function model1_state::ftab_vf[] = {
};
// Used in swa scene 1 and unemulated:
-// f14
// f49_swa
-// f15_swa
const struct model1_state::function model1_state::ftab_swa[] = {
{ &model1_state::fadd, 2 }, /* 0x00 */
{ &model1_state::fsub, 2 },
{ &model1_state::fmul, 2 },
{ &model1_state::fdiv, 2 },
- { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::matrix_push, 0 },
{ &model1_state::matrix_pop, 0 },
{ &model1_state::matrix_write, 12 },
{ &model1_state::clear_stack, 0 },
{ &model1_state::matrix_mul, 12 },
{ &model1_state::anglev, 2 },
- { &model1_state::f11, 9 },
+ { &model1_state::triangle_normal, 9 },
{ &model1_state::normalize, 3 },
{ &model1_state::acc_seti, 1 },
- { &model1_state::f14, 4 },
- { &model1_state::f15_swa, 0 },
+ { &model1_state::load_base, 4 },
+ { &model1_state::transpose, 0 },
{ &model1_state::matrix_ident, 0 }, /* 0x10 */
{ &model1_state::matrix_read, 0 },
@@ -1724,9 +1786,9 @@ const struct model1_state::function model1_state::ftab_swa[] = {
{ &model1_state::matrix_rotx, 1 },
{ &model1_state::matrix_roty, 1 },
{ &model1_state::matrix_rotz, 1 },
- { nullptr, 0 },
- { &model1_state::f24_swa, 7 },
- { nullptr, 0 },
+ { nullptr, 0 },
+ { &model1_state::intercept, 7 },
+ { nullptr, 0 },
{ &model1_state::transform_point, 3 },
{ &model1_state::fsin_m1, 1 },
{ &model1_state::fcos_m1, 1 },
@@ -1734,8 +1796,8 @@ const struct model1_state::function model1_state::ftab_swa[] = {
{ &model1_state::fcosm_m1, 2 },
{ &model1_state::distance3, 6 },
- { nullptr, 0 }, /* 0x20 */
- { nullptr, 0 },
+ { nullptr, 0 }, /* 0x20 */
+ { nullptr, 0 },
{ &model1_state::ftoi, 1 },
{ &model1_state::itof, 1 },
{ &model1_state::acc_set, 1 },
@@ -1747,30 +1809,30 @@ const struct model1_state::function model1_state::ftab_swa[] = {
{ &model1_state::xyz2rqf, 3 },
{ &model1_state::f43_swa, 3 },
{ &model1_state::matrix_sdir, 3 },
- { &model1_state::f45, 1 },
+ { &model1_state::fsqrt, 1 },
{ &model1_state::vlength, 3 },
{ &model1_state::f47, 3 },
- { nullptr, 0 }, /* 0x30 */
+ { nullptr, 0 }, /* 0x30 */
{ &model1_state::f49_swa, 6 },
{ &model1_state::f50_swa, 4 },
- { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::f52, 0 },
{ &model1_state::matrix_rdir, 3 },
- { nullptr, 0 },
- { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::f56, 7 },
- { &model1_state::f57, 0 },
+ { &model1_state::int_normal, 0 },
{ &model1_state::matrix_readt, 0 },
{ &model1_state::acc_geti, 0 },
- { &model1_state::f60, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
- { nullptr, 0 },
+ { &model1_state::int_point, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::push_and_ident, 0 }, /* 0x40 */
- { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::catmull_rom, 13 }
};
diff --git a/src/mame/machine/naomibd.cpp b/src/mame/machine/naomibd.cpp
index 704c357d70f..f90c3d35077 100644
--- a/src/mame/machine/naomibd.cpp
+++ b/src/mame/machine/naomibd.cpp
@@ -3,7 +3,6 @@
#include "emu.h"
#include "naomibd.h"
-#include "machine/x76f100.h"
/*
Naomi ROM board info from ElSemi:
@@ -91,8 +90,8 @@ void naomi_board::device_start()
save_item(NAME(pio_ready));
save_item(NAME(dma_ready));
- if(eeprom_tag)
- eeprom = machine().device<x76f100_device>(eeprom_tag);
+ if (eeprom_tag != nullptr)
+ eeprom = owner()->subdevice<x76f100_device>(eeprom_tag);
else
eeprom = nullptr;
}
diff --git a/src/mame/machine/naomibd.h b/src/mame/machine/naomibd.h
index 1b4d2b705c0..8f0c07d3c09 100644
--- a/src/mame/machine/naomibd.h
+++ b/src/mame/machine/naomibd.h
@@ -4,6 +4,7 @@
#define _NAOMIBD_H_
#include "machine/naomig1.h"
+#include "machine/x76f100.h"
#define MCFG_NAOMI_BOARD_ADD(_tag, type, _eeprom_tag, _actel_tag, _irq_cb) \
MCFG_NAOMI_G1_ADD(_tag, type, _irq_cb) \
@@ -55,7 +56,7 @@ private:
bool pio_ready, dma_ready;
const char *eeprom_tag;
- class x76f100_device *eeprom;
+ x76f100_device *eeprom;
};
#endif
diff --git a/src/mame/machine/naomigd.h b/src/mame/machine/naomigd.h
index 6f9e434ec13..84a3225abb0 100644
--- a/src/mame/machine/naomigd.h
+++ b/src/mame/machine/naomigd.h
@@ -7,7 +7,7 @@
#define MCFG_NAOMI_GDROM_BOARD_ADD(_tag, _image_tag, _pic_tag, _eeprom_tag, _irq_cb) \
MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_GDROM_BOARD, _eeprom_tag, NULL, _irq_cb) \
- naomi_gdrom_board::static_set_tags(*device, _image_tag, _pic_tag);
+ naomi_gdrom_board::static_set_tags(*device, "^" _image_tag, "^" _pic_tag);
class naomi_gdrom_board : public naomi_board
{
diff --git a/src/mame/machine/naomim1.cpp b/src/mame/machine/naomim1.cpp
index 7e205ce1ee7..a456bc8cdb8 100644
--- a/src/mame/machine/naomim1.cpp
+++ b/src/mame/machine/naomim1.cpp
@@ -13,15 +13,16 @@ DEVICE_ADDRESS_MAP_START(submap, 16, naomi_m1_board)
ADDRESS_MAP_END
naomi_m1_board::naomi_m1_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : naomi_board(mconfig, NAOMI_M1_BOARD, "Sega NAOMI M1 Board", tag, owner, clock, "naomi_m1_board", __FILE__)
+ : naomi_board(mconfig, NAOMI_M1_BOARD, "Sega NAOMI M1 Board", tag, owner, clock, "naomi_m1_board", __FILE__),
+ m_region(*this, DEVICE_SELF)
{
}
READ16_MEMBER(naomi_m1_board::actel_id_r)
{
- if (rombdid_tag && memregion(rombdid_tag) != nullptr)
+ if (rombdid_tag && owner()->memregion(rombdid_tag) != nullptr)
{
- const UINT8 *bdid = memregion(rombdid_tag)->base();
+ const UINT8 *bdid = owner()->memregion(rombdid_tag)->base();
return bdid[0] | (bdid[1] << 8);
}
diff --git a/src/mame/machine/naomim1.h b/src/mame/machine/naomim1.h
index 37c5a58739b..0e1730eee80 100644
--- a/src/mame/machine/naomim1.h
+++ b/src/mame/machine/naomim1.h
@@ -35,6 +35,8 @@ private:
UINT32 rom_cur_address, buffer_actual_size, avail_bits;
bool encryption, stream_ended, has_history;
+ required_memory_region m_region;
+
void gb_reset();
UINT32 lookb(int bits);
void skipb(int bits);
diff --git a/src/mame/machine/naomim2.cpp b/src/mame/machine/naomim2.cpp
index 516da16435e..e74da6573fd 100644
--- a/src/mame/machine/naomim2.cpp
+++ b/src/mame/machine/naomim2.cpp
@@ -113,7 +113,8 @@ const device_type NAOMI_M2_BOARD = &device_creator<naomi_m2_board>;
naomi_m2_board::naomi_m2_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: naomi_board(mconfig, NAOMI_M2_BOARD, "Sega NAOMI M2 Board", tag, owner, clock, "naomi_m2_board", __FILE__),
- m_cryptdevice(*this, "segam2crypt")
+ m_cryptdevice(*this, "segam2crypt"),
+ m_region(*this, DEVICE_SELF)
{
}
@@ -194,7 +195,7 @@ UINT16 naomi_m2_board::read_callback(UINT32 addr)
}
else {
- const UINT8 *base = m_region->base() + 2*addr;
+ const UINT8 *base = &m_region->u8(2*addr);
return base[1] | (base[0] << 8);
}
}
diff --git a/src/mame/machine/naomim2.h b/src/mame/machine/naomim2.h
index ae1bdf3fed8..8196e7e4ba7 100644
--- a/src/mame/machine/naomim2.h
+++ b/src/mame/machine/naomim2.h
@@ -32,6 +32,7 @@ protected:
private:
required_device<sega_315_5881_crypt_device> m_cryptdevice;
+ required_memory_region m_region;
};
extern const device_type NAOMI_M2_BOARD;
diff --git a/src/mame/machine/naomim4.cpp b/src/mame/machine/naomim4.cpp
index 40ced99ea5a..89d61ce08c3 100644
--- a/src/mame/machine/naomim4.cpp
+++ b/src/mame/machine/naomim4.cpp
@@ -47,24 +47,24 @@ DEVICE_ADDRESS_MAP_START(submap, 16, naomi_m4_board)
ADDRESS_MAP_END
naomi_m4_board::naomi_m4_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : naomi_board(mconfig, NAOMI_M4_BOARD, "Sega NAOMI M4 Board", tag, owner, clock, "naomi_m4_board", __FILE__)
+ : naomi_board(mconfig, NAOMI_M4_BOARD, "Sega NAOMI M4 Board", tag, owner, clock, "naomi_m4_board", __FILE__),
+ m_region(*this, DEVICE_SELF),
+ m_key_data(*this)
{
- key_tag = nullptr;
}
-void naomi_m4_board::static_set_tags(device_t &device, const char *_key_tag)
+void naomi_m4_board::static_set_tags(device_t &device, const char *key_tag)
{
naomi_m4_board &dev = downcast<naomi_m4_board &>(device);
- dev.key_tag = _key_tag;
+ dev.m_key_data.set_tag(key_tag);
}
void naomi_m4_board::device_start()
{
naomi_board::device_start();
- const UINT8 *key_data = memregion(key_tag)->base();
- subkey1 = (key_data[0x5e2] << 8) | key_data[0x5e0];
- subkey2 = (key_data[0x5e6] << 8) | key_data[0x5e4];
+ subkey1 = (m_key_data[0x5e2] << 8) | m_key_data[0x5e0];
+ subkey2 = (m_key_data[0x5e6] << 8) | m_key_data[0x5e4];
buffer = std::make_unique<UINT8[]>(BUFFER_SIZE);
enc_init();
@@ -134,9 +134,9 @@ void naomi_m4_board::board_get_buffer(UINT8 *&base, UINT32 &limit)
if (cfi_mode) {
int fpr_num = 0;
- if (rombdid_tag && memregion(rombdid_tag) != nullptr)
+ if (rombdid_tag && owner()->memregion(rombdid_tag) != nullptr)
{
- fpr_num = *memregion(rombdid_tag)->base() & 0x7f;
+ fpr_num = *owner()->memregion(rombdid_tag)->base() & 0x7f;
}
@@ -217,9 +217,9 @@ READ16_MEMBER(naomi_m4_board::m4_id_r)
{
UINT16 epr_flag = 0;
- if (rombdid_tag && memregion(rombdid_tag) != nullptr)
+ if (rombdid_tag != nullptr && owner()->memregion(rombdid_tag) != nullptr)
{
- epr_flag = *memregion(rombdid_tag)->base() & 0x80;
+ epr_flag = *owner()->memregion(rombdid_tag)->base() & 0x80;
}
diff --git a/src/mame/machine/naomim4.h b/src/mame/machine/naomim4.h
index 650ed901c24..461fa1779a5 100644
--- a/src/mame/machine/naomim4.h
+++ b/src/mame/machine/naomim4.h
@@ -7,14 +7,14 @@
#define MCFG_NAOMI_M4_BOARD_ADD(_tag, _key_tag, _eeprom_tag, _actel_tag, _irq_cb) \
MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M4_BOARD, _eeprom_tag, _actel_tag, _irq_cb) \
- naomi_m4_board::static_set_tags(*device, _key_tag);
+ naomi_m4_board::static_set_tags(*device, "^" _key_tag);
class naomi_m4_board : public naomi_board
{
public:
naomi_m4_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- static void static_set_tags(device_t &device, const char *_key_tag);
+ static void static_set_tags(device_t &device, const char *key_tag);
virtual DECLARE_ADDRESS_MAP(submap, 16) override;
@@ -33,7 +33,8 @@ private:
static const UINT8 k_sboxes[4][16];
- const char *key_tag;
+ required_memory_region m_region;
+ required_region_ptr<UINT8> m_key_data;
UINT16 subkey1, subkey2;
std::unique_ptr<UINT16[]> one_round;
diff --git a/src/mame/machine/naomirom.cpp b/src/mame/machine/naomirom.cpp
index 5f074d16ec6..ad356dd46e6 100644
--- a/src/mame/machine/naomirom.cpp
+++ b/src/mame/machine/naomirom.cpp
@@ -6,7 +6,8 @@
const device_type NAOMI_ROM_BOARD = &device_creator<naomi_rom_board>;
naomi_rom_board::naomi_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : naomi_board(mconfig, NAOMI_ROM_BOARD, "Sega NAOMI ROM Board", tag, owner, clock, "naomi_rom_board", __FILE__)
+ : naomi_board(mconfig, NAOMI_ROM_BOARD, "Sega NAOMI ROM Board", tag, owner, clock, "naomi_rom_board", __FILE__),
+ m_region(*this, DEVICE_SELF)
{
}
diff --git a/src/mame/machine/naomirom.h b/src/mame/machine/naomirom.h
index f23268cfa32..11f692200db 100644
--- a/src/mame/machine/naomirom.h
+++ b/src/mame/machine/naomirom.h
@@ -23,6 +23,7 @@ protected:
private:
UINT32 rom_cur_address;
+ required_memory_region m_region;
};
extern const device_type NAOMI_ROM_BOARD;
diff --git a/src/mame/machine/pc9801_118.cpp b/src/mame/machine/pc9801_118.cpp
index ee3a189b338..9b7191c40da 100644
--- a/src/mame/machine/pc9801_118.cpp
+++ b/src/mame/machine/pc9801_118.cpp
@@ -119,7 +119,7 @@ const rom_entry *pc9801_118_device::device_rom_region() const
pc9801_118_device::pc9801_118_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, PC9801_118, "pc9801_118", tag, owner, clock, "pc9801_118", __FILE__),
-// m_maincpu(*owner, "maincpu"),
+// m_maincpu(*this, "^maincpu"),
m_opn3(*this, "opn3")
{
}
diff --git a/src/mame/machine/pc9801_26.cpp b/src/mame/machine/pc9801_26.cpp
index 2f0b0351c7c..8eb8e0f7413 100644
--- a/src/mame/machine/pc9801_26.cpp
+++ b/src/mame/machine/pc9801_26.cpp
@@ -111,7 +111,7 @@ ioport_constructor pc9801_26_device::device_input_ports() const
pc9801_26_device::pc9801_26_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, PC9801_26, "pc9801_26", tag, owner, clock, "pc9801_26", __FILE__),
-// m_maincpu(*owner, "maincpu"),
+// m_maincpu(*this, "^maincpu"),
m_opn(*this, "opn")
{
}
diff --git a/src/mame/machine/s32comm.cpp b/src/mame/machine/s32comm.cpp
index dad9c291527..8d5abf8e299 100644
--- a/src/mame/machine/s32comm.cpp
+++ b/src/mame/machine/s32comm.cpp
@@ -66,6 +66,8 @@ Sega System Multi32 Comm PCB 837-8792-91
15033.17 OutRunners, Stadium Cross
*/
+#include "emu.h"
+#include "emuopts.h"
#include "machine/s32comm.h"
//#define __S32COMM_VERBOSE__
diff --git a/src/mame/machine/s32comm.h b/src/mame/machine/s32comm.h
index 19b01110361..9c0ef0eae88 100644
--- a/src/mame/machine/s32comm.h
+++ b/src/mame/machine/s32comm.h
@@ -7,8 +7,6 @@
#define __S32COMM_SIMULATION__
-#include "emu.h"
-
#define MCFG_S32COMM_ADD(_tag ) \
MCFG_DEVICE_ADD(_tag, S32COMM, 0)
diff --git a/src/mame/machine/segacrp2.cpp b/src/mame/machine/segacrp2.cpp
deleted file mode 100644
index 8c326441755..00000000000
--- a/src/mame/machine/segacrp2.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Nicola Salmoria
-/******************************************************************************
-
- Sega encryption emulation by Nicola Salmoria
-
-
- This encryption is an evolution of the one implemented in segacrpt.c.
- It works on more data and address bits but apart from that it's essentially
- the same.
-
- The encryption affects D0, D2, D4, and D6, and depends on M1, A0, A3, A6, A9,
- A12, and A14.
-
- The encryption consists of a permutation of the four data bits, which can also
- be inverted. Therefore there are 4! * 2^4 = 384 different possible encryptions.
-
- An interesting peculiarity is that four games in the list below use an almost
- identical key, just offset by one or more bytes. This leads to believe that
- keys were generated using a PRNG like in other Sega encryptions (MC8123 etc.)
- and the CPU part# used to skip the first N bytes.
-
-
- List of encrypted games currently known:
-
- CPU Part # Game Comments
- 315-5162 4D Warriors & used I'm Sorry for k.p.a.
- Rafflesia &
- Wonder Boy (set 4)
- 315-5177 Astro Flash &
- Wonder Boy (set 1)
- 315-5178 Wonder Boy (set 2) unencrypted version available
- 315-5179 Robo-Wrestle 2001
- 317-5000 Fantasy Zone (Sound CPU) same key as 315-5177
-
- The following games seem to use the same algorithm as the above ones, but
- using a key which almost doesn't change
-
- 317-0004 Calorie Kun unencrypted bootleg available
- 317-0005 Space Position
- 317-0006 Gardia (set 1)
- 317-0007 Gardia (set 2)
-
-******************************************************************************/
-
-#include "emu.h"
-#include "segacrp2.h"
-
-
-void sega_decode_2(UINT8 *rom, UINT8 *decrypted,
- const UINT8 xor_table[128],const int swap_table[128])
-{
- static const UINT8 swaptable[24][4] =
- {
- { 6,4,2,0 }, { 4,6,2,0 }, { 2,4,6,0 }, { 0,4,2,6 },
- { 6,2,4,0 }, { 6,0,2,4 }, { 6,4,0,2 }, { 2,6,4,0 },
- { 4,2,6,0 }, { 4,6,0,2 }, { 6,0,4,2 }, { 0,6,4,2 },
- { 4,0,6,2 }, { 0,4,6,2 }, { 6,2,0,4 }, { 2,6,0,4 },
- { 0,6,2,4 }, { 2,0,6,4 }, { 0,2,6,4 }, { 4,2,0,6 },
- { 2,4,0,6 }, { 4,0,2,6 }, { 2,0,4,6 }, { 0,2,4,6 },
- };
-
-
- for (int A = 0x0000;A < 0x8000;A++)
- {
- int row;
- UINT8 src;
- const UINT8 *tbl;
-
-
- src = rom[A];
-
- /* pick the translation table from bits 0, 3, 6, 9, 12 and 14 of the address */
- row = (A & 1) + (((A >> 3) & 1) << 1) + (((A >> 6) & 1) << 2)
- + (((A >> 9) & 1) << 3) + (((A >> 12) & 1) << 4) + (((A >> 14) & 1) << 5);
-
- /* decode the opcodes */
- tbl = swaptable[swap_table[2*row]];
- decrypted[A] = BITSWAP8(src,7,tbl[0],5,tbl[1],3,tbl[2],1,tbl[3]) ^ xor_table[2*row];
-
- /* decode the data */
- tbl = swaptable[swap_table[2*row+1]];
- rom[A] = BITSWAP8(src,7,tbl[0],5,tbl[1],3,tbl[2],1,tbl[3]) ^ xor_table[2*row+1];
- }
-}
-
-
-/******************************************************************************
-
- These games (all 317-000x CPUs) use the same algorithm, but the key doesn't
- change much - just a shift in the table.
-
-******************************************************************************/
-
-void sega_decode_317(UINT8 *rom, UINT8 *decrypted, int shift)
-{
- static const UINT8 xor_table[128+3] =
- {
- 0x04,0x54,0x44,0x14,0x15,0x15,0x51,0x41,0x41,0x14,0x10,0x50,0x15,0x55,0x54,0x05,
- 0x04,0x41,0x51,0x01,0x05,0x10,0x55,0x51,0x05,0x05,0x54,0x11,0x45,0x05,0x04,0x14,
- 0x10,0x55,0x01,0x41,0x51,0x05,0x55,0x04,0x45,0x41,0x55,0x14,0x45,0x10,0x04,0x45,
- 0x55,0x50,0x40,0x00,0x11,0x45,0x15,0x00,0x01,0x00,0x40,0x00,0x01,0x45,0x11,0x00,
- 0x45,0x00,0x44,0x54,0x40,0x04,0x05,0x15,0x15,0x10,0x15,0x04,0x01,0x05,0x50,0x11,
- 0x00,0x44,0x44,0x04,0x04,0x01,0x50,0x05,0x51,0x00,0x45,0x44,0x50,0x15,0x54,0x40,
- 0x41,0x45,0x40,0x10,0x14,0x15,0x40,0x51,0x50,0x50,0x45,0x00,0x10,0x15,0x05,0x51,
- 0x50,0x44,0x01,0x15,0x40,0x04,0x01,0x44,0x50,0x44,0x50,0x50,0x50,0x10,0x44,0x04,
- 0x40,0x04,0x10,
- };
-
- static const int swap_table[128+3] =
- {
- 7, 7,12, 1,18,11, 8,23,21,17, 0,23,22, 0,21,15,
- 13,19,21,20,20,12,13,10,20, 0,14,18, 6,18, 3, 5,
- 5,20,20,13, 8, 0,20,18, 4,14, 8, 5,17, 6,22,10,
- 0,21, 0, 1, 6,11,17, 9,17, 3, 9,21, 0, 4,16, 1,
- 13,17,21, 5, 3, 7, 2,16,18,13, 6,19,11,23, 3,20,
- 3, 2,18,10,18,23,19,23, 3,15, 0,10, 5,12, 0, 0,
- 11,22, 8,14, 8, 6, 1,15, 7,11, 2,17,10,15, 8,21,
- 10, 0, 2, 6, 1, 1, 3, 1,12,18,16, 5, 0,15,17,15,
- 10,20, 1,
- };
-
- sega_decode_2(rom, decrypted, xor_table + shift, swap_table + shift);
-}
diff --git a/src/mame/machine/segacrp2.h b/src/mame/machine/segacrp2.h
deleted file mode 100644
index 3c30b8771ae..00000000000
--- a/src/mame/machine/segacrp2.h
+++ /dev/null
@@ -1,7 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Nicola Salmoria
-
-void sega_decode_2(UINT8 *rom, UINT8 *decrypted,
- const UINT8 xor_table[128],const int swap_table[128]);
-
-void sega_decode_317(UINT8 *rom, UINT8 *decrypted, int shift);
diff --git a/src/mame/machine/segacrp2_device.cpp b/src/mame/machine/segacrp2_device.cpp
new file mode 100644
index 00000000000..5c0db860879
--- /dev/null
+++ b/src/mame/machine/segacrp2_device.cpp
@@ -0,0 +1,371 @@
+// license:BSD-3-Clause
+// copyright-holders:Nicola Salmoria, David Haywood
+/******************************************************************************
+
+ Sega encryption emulation by Nicola Salmoria
+
+
+ This encryption is an evolution of the one implemented in segacrpt.c.
+ It works on more data and address bits but apart from that it's essentially
+ the same.
+
+ The encryption affects D0, D2, D4, and D6, and depends on M1, A0, A3, A6, A9,
+ A12, and A14.
+
+ The encryption consists of a permutation of the four data bits, which can also
+ be inverted. Therefore there are 4! * 2^4 = 384 different possible encryptions.
+
+ An interesting peculiarity is that four games in the list below use an almost
+ identical key, just offset by one or more bytes. This leads to believe that
+ keys were generated using a PRNG like in other Sega encryptions (MC8123 etc.)
+ and the CPU part# used to skip the first N bytes.
+
+
+ List of encrypted games currently known:
+
+ CPU Part # Game Comments
+ 315-5162 4D Warriors & used I'm Sorry for k.p.a.
+ Rafflesia &
+ Wonder Boy (set 4)
+ 315-5176 Wonder Boy (system 2 hardware, set 2) NOT DECRYPTED
+ 315-5177 Astro Flash &
+ Wonder Boy (set 1)
+ 315-5178 Wonder Boy (set 2) unencrypted version available
+ 315-5179 Robo-Wrestle 2001
+ 317-5000 Fantasy Zone (Sound CPU) same key as 315-5177
+
+ The following games seem to use the same algorithm as the above ones, but
+ using a key which almost doesn't change
+
+ 317-0004 Calorie Kun unencrypted bootleg available
+ 317-0005 Space Position
+ 317-0006 Gardia (set 1)
+ 317-0007 Gardia (set 2)
+
+******************************************************************************/
+
+#include "emu.h"
+#include "segacrp2_device.h"
+
+static void decode(UINT8 *rom, UINT8 *decrypted,
+ const UINT8 xor_table[128],const int swap_table[128])
+{
+ static const UINT8 swaptable[24][4] =
+ {
+ { 6,4,2,0 }, { 4,6,2,0 }, { 2,4,6,0 }, { 0,4,2,6 },
+ { 6,2,4,0 }, { 6,0,2,4 }, { 6,4,0,2 }, { 2,6,4,0 },
+ { 4,2,6,0 }, { 4,6,0,2 }, { 6,0,4,2 }, { 0,6,4,2 },
+ { 4,0,6,2 }, { 0,4,6,2 }, { 6,2,0,4 }, { 2,6,0,4 },
+ { 0,6,2,4 }, { 2,0,6,4 }, { 0,2,6,4 }, { 4,2,0,6 },
+ { 2,4,0,6 }, { 4,0,2,6 }, { 2,0,4,6 }, { 0,2,4,6 },
+ };
+
+
+ for (int A = 0x0000;A < 0x8000;A++)
+ {
+ int row;
+ UINT8 src;
+ const UINT8 *tbl;
+
+
+ src = rom[A];
+
+ /* pick the translation table from bits 0, 3, 6, 9, 12 and 14 of the address */
+ row = (A & 1) + (((A >> 3) & 1) << 1) + (((A >> 6) & 1) << 2)
+ + (((A >> 9) & 1) << 3) + (((A >> 12) & 1) << 4) + (((A >> 14) & 1) << 5);
+
+ /* decode the opcodes */
+ tbl = swaptable[swap_table[2*row]];
+ decrypted[A] = BITSWAP8(src,7,tbl[0],5,tbl[1],3,tbl[2],1,tbl[3]) ^ xor_table[2*row];
+
+ /* decode the data */
+ tbl = swaptable[swap_table[2*row+1]];
+ rom[A] = BITSWAP8(src,7,tbl[0],5,tbl[1],3,tbl[2],1,tbl[3]) ^ xor_table[2*row+1];
+ }
+}
+
+
+const device_type SEGACRP2_Z80 = &device_creator<segacrp2_z80_device>;
+
+const device_type SEGA_315_5179 = &device_creator<sega_315_5179_device>;
+const device_type SEGA_315_5178 = &device_creator<sega_315_5178_device>;
+const device_type SEGA_315_5177 = &device_creator<sega_315_5177_device>; // also seen as 317-5000
+const device_type SEGA_315_5176 = &device_creator<sega_315_5176_device>; // TODO!
+const device_type SEGA_315_5162 = &device_creator<sega_315_5162_device>;
+
+const device_type SEGA_317_0004 = &device_creator<sega_317_0004_device>;
+const device_type SEGA_317_0005 = &device_creator<sega_317_0005_device>;
+const device_type SEGA_317_0006 = &device_creator<sega_317_0006_device>;
+const device_type SEGA_317_0007 = &device_creator<sega_317_0007_device>;
+
+
+
+segacrp2_z80_device::segacrp2_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : z80_device(mconfig, SEGACRP2_Z80, "Z80 SegaCrypt2", tag, owner, clock, "z80_sega2", __FILE__) {}
+void segacrp2_z80_device::device_start() { z80_device::device_start(); decrypt(); }
+void segacrp2_z80_device::device_reset() { z80_device::device_reset(); }
+void segacrp2_z80_device::decrypt() { }
+
+void segacrp2_z80_device::set_decrypted_tag(device_t &device, const char* decrypted_tag)
+{
+ segacrp2_z80_device &dev = downcast<segacrp2_z80_device &>(device);
+ dev.m_decrypted_tag = decrypted_tag;
+}
+
+
+sega_315_5177_device::sega_315_5177_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrp2_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5177_device::decrypt()
+{
+ // 315-5177
+ static const UINT8 xor_table[128] =
+ {
+ 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
+ 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
+ 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
+ 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
+ 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
+ 0x05,0x55,0x50,0x14,
+
+ 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
+ 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
+ 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
+ 0x05,0x55,0x50,0x14,0x41,0x45,0x00,0x50,0x54,0x11,0x45,0x40,
+ 0x04,0x54,0x51,0x15,0x40,0x44,0x01,0x51,0x55,0x10,0x44,0x41,
+ 0x05,0x55,0x50,0x14,
+ };
+
+ static const int swap_table[128] =
+ {
+ 0,0,0,0,
+ 1,1,1,1,1,
+ 2,2,2,2,2,
+ 3,3,3,3,
+ 4,4,4,4,4,
+ 5,5,5,5,5,
+ 6,6,6,6,6,
+ 7,7,7,7,7,
+ 8,8,8,8,
+ 9,9,9,9,9,
+ 10,10,10,10,10,
+ 11,11,11,11,11,
+ 12,12,12,12,12,
+ 13,13,
+
+ 8,8,8,8,
+ 9,9,9,9,9,
+ 10,10,10,10,10,
+ 11,11,11,11,
+ 12,12,12,12,12,
+ 13,13,13,13,13,
+ 14,14,14,14,14,
+ 15,15,15,15,15,
+ 16,16,16,16,
+ 17,17,17,17,17,
+ 18,18,18,18,18,
+ 19,19,19,19,19,
+ 20,20,20,20,20,
+ 21,21,
+ };
+ decode(memregion(tag())->base(), (UINT8*)memshare(m_decrypted_tag)->ptr(), xor_table, swap_table);
+}
+
+
+sega_315_5176_device::sega_315_5176_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrp2_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5176_device::decrypt()
+{
+ // 315-5176
+ // TODO!
+}
+
+
+sega_315_5162_device::sega_315_5162_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrp2_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5162_device::decrypt()
+{
+ // 315-5162
+ static const UINT8 xor_table[128] =
+ {
+ 0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
+ 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
+ 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
+ 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
+ 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
+ 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
+ 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
+ 0x00,0x40,0x10,0x50,0x04,0x44,0x14,0x54,0x01,0x41,0x11,0x51,0x05,0x45,0x15,0x55,
+ 0x00,
+ };
+
+ static const int swap_table[128] =
+ {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+ 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+ 12,
+ };
+
+ decode(memregion(tag())->base(), (UINT8*)memshare(m_decrypted_tag)->ptr(), xor_table, swap_table);
+}
+
+
+
+
+sega_315_5178_device::sega_315_5178_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrp2_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5178_device::decrypt()
+{ // 315-5178
+ static const UINT8 xor_table[128] =
+ {
+ 0x00,0x55,0x45,0x05,0x11,0x41,0x01,0x14,0x44,0x50,0x10,
+ 0x00,0x55,0x15,0x05,0x51,0x41,0x01,0x14,0x44,0x04,0x10,
+ 0x40,0x55,0x15,0x05,0x51,0x11,
+ 0x01,0x54,0x44,0x04,0x10,0x40,0x00,0x15,0x45,0x51,0x11,
+ 0x01,0x54,0x14,0x04,0x50,0x40,0x00,0x15,0x45,0x05,0x11,
+ 0x41,0x54,0x14,0x04,0x50,0x10,
+ 0x00,0x55,0x45,0x05,0x11,0x41,0x01,0x14,
+
+ 0x00,0x55,0x45,0x05,0x11,0x41,0x01,0x14,0x44,0x50,0x10,
+ 0x00,0x55,0x15,0x05,0x51,0x41,0x01,0x14,0x44,0x04,0x10,
+ 0x40,0x55,0x15,0x05,0x51,0x11,
+ 0x01,0x54,0x44,0x04,0x10,0x40,0x00,0x15,0x45,0x51,0x11,
+ 0x01,0x54,0x14,0x04,0x50,0x40,0x00,0x15,0x45,0x05,0x11,
+ 0x41,0x54,0x14,0x04,0x50,0x10,
+ 0x00,0x55,0x45,0x05,0x11,0x41,0x01,0x14,
+ };
+
+ static const int swap_table[128] =
+ {
+ 2,
+ 3, 5, 7, 1, 3, 5, 7, 1, 3, 5, 7,
+ 0, 2, 4, 6, 0, 2, 4, 6, 0, 2, 4,
+ 5, 7, 1, 3, 5, 7, 1, 3, 5, 7, 1, 3,
+ 4, 6, 0, 2, 4, 6, 0, 2, 4, 6,
+ 8,
+ 1, 3, 5, 7, 1, 3, 5, 7, 1, 3, 5,
+ 6, 0, 2, 4, 6, 0, 2,
+
+ 10,
+ 11,13,15, 9,11,13,15, 9,11,13,15,
+ 8,10,12,14, 8,10,12,14, 8,10,12,
+ 13,15, 9,11,13,15, 9,11,13,15, 9,11,
+ 12,14, 8,10,12,14, 8,10,12,14,
+ 16,
+ 9,11,13,15, 9,11,13,15, 9,11,13,
+ 14, 8,10,12,14, 8,10,
+ };
+
+ decode(memregion(tag())->base(), (UINT8*)memshare(m_decrypted_tag)->ptr(), xor_table, swap_table);
+}
+
+
+
+sega_315_5179_device::sega_315_5179_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrp2_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5179_device::decrypt()
+{ // 315-5179
+ static const UINT8 xor_table[128] =
+ {
+ 0x00,0x45,0x41,0x14,0x10,0x55,0x51,0x01,0x04,0x40,0x45,0x11,0x14,0x50,
+ 0x00,0x05,0x41,0x44,0x10,0x15,0x51,0x54,0x04,
+ 0x00,0x45,0x41,0x14,0x10,0x55,0x05,0x01,0x44,0x40,0x15,0x11,0x54,0x50,
+ 0x00,0x05,0x41,0x44,0x10,0x15,0x51,0x01,0x04,
+ 0x40,0x45,0x11,0x14,0x50,0x55,0x05,0x01,0x44,0x40,0x15,0x11,0x54,0x04,
+ 0x00,0x45,0x41,0x14,0x50,
+ 0x00,0x05,0x41,0x44,0x10,0x15,0x51,0x54,0x04,
+ 0x00,0x45,0x41,0x14,0x50,0x55,0x05,0x01,0x44,0x40,0x15,0x11,0x54,0x50,
+ 0x00,0x05,0x41,0x44,0x10,0x55,0x51,0x01,0x04,
+ 0x40,0x45,0x11,0x14,0x50,0x55,0x05,0x01,0x44,0x40,0x15,0x51,0x54,0x04,
+ 0x00,0x45,0x41,0x14,0x10,0x55,0x51,0x01,0x04,
+ 0x40,0x45,0x11,0x54,0x50,0x00,0x05,0x41,
+ };
+
+ static const int swap_table[128] =
+ {
+ 8, 9,11,13,15, 0, 2, 4, 6,
+ 8, 9,11,13,15, 1, 2, 4, 6,
+ 8, 9,11,13,15, 1, 2, 4, 6,
+ 8, 9,11,13,15, 1, 2, 4, 6,
+ 8,10,11,13,15, 1, 2, 4, 6,
+ 8,10,11,13,15, 1, 2, 4, 6,
+ 8,10,11,13,15, 1, 3, 4, 6,
+ 8,
+ 7, 1, 2, 4, 6, 0, 1, 3, 5,
+ 7, 1, 2, 4, 6, 0, 1, 3, 5,
+ 7, 1, 2, 4, 6, 0, 2, 3, 5,
+ 7, 1, 2, 4, 6, 0, 2, 3, 5,
+ 7, 1, 2, 4, 6, 0, 2, 3, 5,
+ 7, 1, 3, 4, 6, 0, 2, 3, 5,
+ 7, 1, 3, 4, 6, 0, 2, 4, 5,
+ 7,
+ };
+
+ decode(memregion(tag())->base(), (UINT8*)memshare(m_decrypted_tag)->ptr(), xor_table, swap_table);
+}
+
+
+/******************************************************************************
+
+ These games (all 317-000x CPUs) use the same algorithm, but the key doesn't
+ change much - just a shift in the table.
+
+******************************************************************************/
+
+void _sega_decode_317(UINT8 *rom, UINT8 *decrypted, int shift)
+{
+ static const UINT8 xor_table[128+3] =
+ {
+ 0x04,0x54,0x44,0x14,0x15,0x15,0x51,0x41,0x41,0x14,0x10,0x50,0x15,0x55,0x54,0x05,
+ 0x04,0x41,0x51,0x01,0x05,0x10,0x55,0x51,0x05,0x05,0x54,0x11,0x45,0x05,0x04,0x14,
+ 0x10,0x55,0x01,0x41,0x51,0x05,0x55,0x04,0x45,0x41,0x55,0x14,0x45,0x10,0x04,0x45,
+ 0x55,0x50,0x40,0x00,0x11,0x45,0x15,0x00,0x01,0x00,0x40,0x00,0x01,0x45,0x11,0x00,
+ 0x45,0x00,0x44,0x54,0x40,0x04,0x05,0x15,0x15,0x10,0x15,0x04,0x01,0x05,0x50,0x11,
+ 0x00,0x44,0x44,0x04,0x04,0x01,0x50,0x05,0x51,0x00,0x45,0x44,0x50,0x15,0x54,0x40,
+ 0x41,0x45,0x40,0x10,0x14,0x15,0x40,0x51,0x50,0x50,0x45,0x00,0x10,0x15,0x05,0x51,
+ 0x50,0x44,0x01,0x15,0x40,0x04,0x01,0x44,0x50,0x44,0x50,0x50,0x50,0x10,0x44,0x04,
+ 0x40,0x04,0x10,
+ };
+
+ static const int swap_table[128+3] =
+ {
+ 7, 7,12, 1,18,11, 8,23,21,17, 0,23,22, 0,21,15,
+ 13,19,21,20,20,12,13,10,20, 0,14,18, 6,18, 3, 5,
+ 5,20,20,13, 8, 0,20,18, 4,14, 8, 5,17, 6,22,10,
+ 0,21, 0, 1, 6,11,17, 9,17, 3, 9,21, 0, 4,16, 1,
+ 13,17,21, 5, 3, 7, 2,16,18,13, 6,19,11,23, 3,20,
+ 3, 2,18,10,18,23,19,23, 3,15, 0,10, 5,12, 0, 0,
+ 11,22, 8,14, 8, 6, 1,15, 7,11, 2,17,10,15, 8,21,
+ 10, 0, 2, 6, 1, 1, 3, 1,12,18,16, 5, 0,15,17,15,
+ 10,20, 1,
+ };
+
+ decode(rom, decrypted, xor_table + shift, swap_table + shift);
+}
+
+
+sega_317_0004_device::sega_317_0004_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrp2_z80_device(mconfig, tag, owner, clock) {}
+void sega_317_0004_device::decrypt()
+{ // 317-0004
+ _sega_decode_317(memregion(tag())->base(), (UINT8*)memshare(m_decrypted_tag)->ptr(), 0);
+}
+
+
+
+sega_317_0005_device::sega_317_0005_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrp2_z80_device(mconfig, tag, owner, clock) {}
+void sega_317_0005_device::decrypt()
+{ // 317-0005
+ _sega_decode_317(memregion(tag())->base(), (UINT8*)memshare(m_decrypted_tag)->ptr(), 1);
+}
+
+
+sega_317_0006_device::sega_317_0006_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrp2_z80_device(mconfig, tag, owner, clock) {}
+void sega_317_0006_device::decrypt()
+{ // 317-0006
+ _sega_decode_317(memregion(tag())->base(), (UINT8*)memshare(m_decrypted_tag)->ptr(), 2);
+}
+
+sega_317_0007_device::sega_317_0007_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrp2_z80_device(mconfig, tag, owner, clock) {}
+void sega_317_0007_device::decrypt()
+{ // 317-0006
+ _sega_decode_317(memregion(tag())->base(), (UINT8*)memshare(m_decrypted_tag)->ptr(), 3);
+} \ No newline at end of file
diff --git a/src/mame/machine/segacrp2_device.h b/src/mame/machine/segacrp2_device.h
new file mode 100644
index 00000000000..f6e90820209
--- /dev/null
+++ b/src/mame/machine/segacrp2_device.h
@@ -0,0 +1,123 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+#pragma once
+
+#ifndef __SEGACRP2_Z80__
+#define __SEGACRP2_Z80__
+
+
+#define MCFG_SEGAZ80_SET_DECRYPTED_TAG(_tag) \
+ segacrp2_z80_device::set_decrypted_tag(*device, _tag);
+
+#include "emu.h"
+#include "cpu/z80/z80.h"
+
+// base class
+class segacrp2_z80_device : public z80_device
+{
+public:
+ segacrp2_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+
+ static void set_decrypted_tag(device_t &device, const char* decrypted_tag);
+ const char* m_decrypted_tag;
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void decrypt();
+};
+
+
+
+// actual encrypted CPUs
+class sega_315_5179_device : public segacrp2_z80_device
+{
+public:
+ sega_315_5179_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+
+class sega_315_5178_device : public segacrp2_z80_device
+{
+public:
+ sega_315_5178_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5177_device : public segacrp2_z80_device
+{
+public:
+ sega_315_5177_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5176_device : public segacrp2_z80_device
+{
+public:
+ sega_315_5176_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5162_device : public segacrp2_z80_device
+{
+public:
+ sega_315_5162_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_317_0004_device : public segacrp2_z80_device
+{
+public:
+ sega_317_0004_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+
+class sega_317_0005_device : public segacrp2_z80_device
+{
+public:
+ sega_317_0005_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+
+class sega_317_0006_device : public segacrp2_z80_device
+{
+public:
+ sega_317_0006_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_317_0007_device : public segacrp2_z80_device
+{
+public:
+ sega_317_0007_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+
+extern const device_type SEGACRP2_Z80;
+extern const device_type SEGA_315_5179;
+extern const device_type SEGA_315_5178;
+extern const device_type SEGA_315_5177;
+extern const device_type SEGA_315_5176;
+extern const device_type SEGA_315_5162;
+
+extern const device_type SEGA_317_0004;
+extern const device_type SEGA_317_0005;
+extern const device_type SEGA_317_0006;
+extern const device_type SEGA_317_0007;
+
+
+#endif /// __SEGACRP2_Z80__
+
diff --git a/src/mame/machine/segacrpt.cpp b/src/mame/machine/segacrpt.cpp
deleted file mode 100644
index e577ac786c8..00000000000
--- a/src/mame/machine/segacrpt.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Nicola Salmoria
-/******************************************************************************
-
- Sega encryption emulation by Nicola Salmoria
-
-
- Several Sega Z80 games have program ROMs encrypted using a common algorithm
- (but with a different key).
- The hardware used to implement this encryption is either a custom CPU, or an
- epoxy block which probably contains a standard Z80 + PALs.
-
- The encryption affects D3, D5, and D7, and depends on M1, A0, A4, A8 and A12.
- D0, D1, D3, D4 and D6 are always unaffected.
-
- The encryption consists of a permutation of the three bits, which can also be
- inverted. Therefore there are 3! * 2^3 = 48 different possible encryptions.
-
- For simplicity, the decryption is implemented using conversion tables.
- We need 32 of these tables, one for every possible combination of M1, A0, A4,
- A8 and A12. However, all the games currently known are full of repetitions
- and only use 6 different tables, the only exceptions being Pengo, Yamato and
- Spatter which have 7 (but one of them is the identity: { 0x00, 0x08, 0x20, 0x28 } ).
- This is most likely a limitation of the hardware.
- Some of the early games are even weaker: of the 6 different tables, they use
- 3 for opcodes and 3 for data, and always coupled in the same way.
-
- In all games currently known, only bytes in the memory range 0x0000-0x7fff
- (A15 = 0) are encrypted. My guess is that this was done to allow games to
- copy code to RAM (in the memory range 0x8000-0xffff) and execute it from
- there without the CPU trying to decrypt it and messing everything up.
- However Zaxxon has RAM at 0x6000, and the CPU doesn't seem to interfere with
- it; but it doesn't execute code from there, so it's possible that the CPU is
- encrypting the data while writing it and decrypting it while reading (that
- would seem kind of strange though). Video and sprite RAM and memory mapped
- ports are all placed above 0x8000.
-
- Given its strict limitations, this encryption is reasonably easy to break,
- and very vulnerable to known plaintext attacks.
-
-
-
- Ninja Princess:
-
- there is a (bootleg?) board which has a standard Z80 + 2 bipolar PROMs
- instead of the custom CPU. The encryption table is different from the
- original Ninja Princess; it is actually the same as Flicky.
-
- The first PROM is 32x8 and contains the number (0..5) of the table to
- use depending on M1, A0, A4, A8, A12:
-
- 00: 11 00 33 22 00 44 44 00 11 33 33 22 44 44 44 22
- 10: 11 55 55 33 44 22 55 22 11 33 55 33 44 44 11 22
-
- The second PROM is 256x4 and contains the 6 different XOR tables:
-
- A D B C C B D A
- 00: 09 09 0A 0A 0A 0A 09 09
- 08: 0E 08 0B 0D 0D 0B 08 0E
- 10: 0A 0C 0A 0C 0C 0A 0C 0A
- 18: 0B 0E 0E 0B 0B 0E 0E 0B
- 20: 0C 0C 0F 0F 0F 0F 0C 0C
- 28: 08 0D 0B 0E 0E 0B 0D 08
- [the remaining bytes are all 0F]
- bit 3 is not used.
- bits 0-2 is the XOR code inverted (0 = 0xa8, 1 = 0xa0 ... 6 = 0x08 7 = 0x00)
-
- Here is a diagram showing how it works:
-
- data to XOR
- decode value
- A ---
- D7 --------------- 0| |
- D3 --------------- 1| |
- D5 --------------- 2| P |D
- A --- D | R |0 ---|>--- D3
- M1 --- 0| P |0 --- 3| O |1 ---|>--- D5
- A0 --- 1| R |1 --- 4| M |2 ---|>--- D7
- A4 --- 2| O |2 --- 5| 2 |3 ---
- A8 --- 3| M |3 --- 6| |
- A12 --- 4| 1 |4 --- 7| |
- --- ---
-
-
- My Hero:
-
- the bootleg does the decryption using a single 256x4 PROM, mapped in the
- obvious way:
-
- data to XOR
- decode value
- A ---
- D3 --- 0| |
- D5 --- 1| |D
- D7 --- 2| P |0 --- D3
- A0 --- 3| R |1 --- D5
- A4 --- 4| O |2 --- D7
- A8 --- 5| M |3 ---
- A12 --- 6| |
- M1 --- 7| |
- ---
-
-
-
- List of encrypted games currently known:
-
- CPU Part # Game Comments
- 315-5010 Pengo unencrypted version available
- 315-5013 Super Zaxxon used Zaxxon for known plaintext attack
- 315-5014 Buck Rogers / Zoom 909 unencrypted version available
- 315-5015 Super Locomotive
- 315-5018 Yamato
- ???-???? Top Roller same key as Yamato
- 315-5028 Sindbad Mystery
- 315-5030 Up'n Down & unencrypted version available
- ???-???? M120 Razzmatazz
- 315-5033 Regulus unencrypted version available
- 315-5041 M140 Mister Viking
- 315-5048 SWAT used Bull Fight for k.p.a.
- 315-5051 Flicky &
- Ninja Princess (bootleg)
- 315-5061 Future Spy
- 315-5064 Water Match used Mister Viking for k.p.a.
- 315-5065 Bull Fight
- 315-5069 Star Force game by Tehkan; same key as Super Locomotive
- ???-???? Pinball Action game by Tehkan; also has a simple bitswap on top
- ???-???? Spatter
- 315-5084 Jongkyo TABLE INCOMPLETE game by Kiwako; also has a simple bitswap on top
- 315-5093 Pitfall II
- 315-5098 Ninja Princess unencrypted version available; same key as Up'n Down
- 315-5102 Sega Ninja unencrypted version available
- 315-5110 I'm Sorry used My Hero for k.p.a.
- 315-5114 ?? pcb 834-5492 same key as Regulus
- 315-5115 TeddyBoy Blues
- 315-5132 My Hero
- 315-5135 Heavy Metal &
- Wonder Boy (set 1a & 3; bootlegs?)
- ???-???? Lovely Cards
-
-
- Some text found in the ROMs:
-
- Buck Rogers SECULITY BY MASATOSHI,MIZUNAGA
- Super Locomotive SEGA FUKUMURA MIZUNAGA
- Yamato SECULITY BY M,MIZUNAGA
- Regulus SECULITY BY SYUICHI,KATAGI
- Up'n Down 19/SEP 1983 MASATOSHI,MIZUNAGA
- Mister Viking SECURITY BY S.KATAGI CONTROL CHIP M140
- SWAT SECURITY BY S.KATAGI
- Flicky SECURITY BY S.KATAGI
- Water Match PROGRAMED BY KAWAHARA&NAKAGAWA
- Star Force STAR FORCE TEHKAN. SECURITY BY SEGA ENTERPRISESE
-
-******************************************************************************/
-
-#include "emu.h"
-#include "segacrpt.h"
-
-
-#if 0
-static void lfkp(int mask)
-{
- int A;
- UINT8 *RAM = machine.root_device().memregion("maincpu")->base();
-
-
- for (A = 0x0000;A < 0x8000-14;A++)
- {
- static const char text[] = "INSERT COIN";
- int i;
-
-
- if ( (RAM[A+0] & mask) == (0x21 & mask) && /* LD HL,$xxxx */
- (RAM[A+3] & mask) == (0x11 & mask) && /* LD DE,$xxxx */
- (RAM[A+6] & mask) == (0x01 & mask)) /* LD BC,$xxxx */
- {
- if ( (RAM[A+ 9] & mask) == (0x36 & mask) && /* LD (HL),$xx */
- (RAM[A+11] & mask) == (0xed & mask) &&
- (RAM[A+12] & mask) == (0xb0 & mask)) /* LDIR */
- logerror("%04x: hl de bc (hl),xx ldir\n",A);
-
- if ( (RAM[A+ 9] & mask) == (0x77 & mask) && /* LD (HL),A */
- (RAM[A+10] & mask) == (0xed & mask) &&
- (RAM[A+11] & mask) == (0xb0 & mask)) /* LDIR */
- logerror("%04x: hl de bc (hl),a ldir\n",A);
-
- if ( (RAM[A+ 9] & mask) == (0xed & mask) &&
- (RAM[A+10] & mask) == (0xb0 & mask)) /* LDIR */
- logerror("%04x: hl de bc ldir\n",A);
- }
-
- /* the following can also be PUSH IX, PUSH IY - need better checking */
- if ( (RAM[A+0] & mask) == (0xf5 & mask) && /* PUSH AF */
- (RAM[A+1] & mask) == (0xc5 & mask) && /* PUSH BC */
- (RAM[A+2] & mask) == (0xd5 & mask) && /* PUSH DE */
- (RAM[A+3] & mask) == (0xe5 & mask)) /* PUSH HL */
- logerror("%04x: push af bc de hl\n",A);
-
- if ( (RAM[A+0] & mask) == (0xe1 & mask) && /* POP HL */
- (RAM[A+1] & mask) == (0xd1 & mask) && /* POP DE */
- (RAM[A+2] & mask) == (0xc1 & mask) && /* POP BC */
- (RAM[A+3] & mask) == (0xf1 & mask)) /* POP AF */
- logerror("%04x: pop hl de bc af\n",A);
-
- for (i = 0;i < strlen(text);i++)
- if ((RAM[A+i] & mask) != (text[i] & mask)) break;
- if (i == strlen(text))
- logerror("%04x: INSERT COIN\n",A);
- }
-}
-
-static void look_for_known_plaintext(void)
-{
- lfkp(0x57);
-}
-#endif
-
-void sega_decode(UINT8 *data, UINT8 *opcodes, int size, const UINT8 convtable[32][4], int bank_count, int bank_size)
-{
- for (int A = 0x0000;A < size + bank_count*bank_size;A++)
- {
- int xorval = 0;
-
- UINT8 src = data[A];
- int adr;
- if(A < size || !bank_count)
- adr = A;
- else
- adr = size + ((A - size) % bank_size);
-
- /* pick the translation table from bits 0, 4, 8 and 12 of the address */
- int row = (adr & 1) + (((adr >> 4) & 1) << 1) + (((adr >> 8) & 1) << 2) + (((adr >> 12) & 1) << 3);
-
- /* pick the offset in the table from bits 3 and 5 of the source data */
- int col = ((src >> 3) & 1) + (((src >> 5) & 1) << 1);
- /* the bottom half of the translation table is the mirror image of the top */
- if (src & 0x80)
- {
- col = 3 - col;
- xorval = 0xa8;
- }
-
- /* decode the opcodes */
- opcodes[A] = (src & ~0xa8) | (convtable[2*row][col] ^ xorval);
-
- /* decode the data */
- data[A] = (src & ~0xa8) | (convtable[2*row+1][col] ^ xorval);
-
- if (convtable[2*row][col] == 0xff) /* table incomplete! (for development) */
- opcodes[A] = 0xee;
- if (convtable[2*row+1][col] == 0xff) /* table incomplete! (for development) */
- data[A] = 0xee;
- }
-}
diff --git a/src/mame/machine/segacrpt.h b/src/mame/machine/segacrpt.h
deleted file mode 100644
index ba6fc16ca72..00000000000
--- a/src/mame/machine/segacrpt.h
+++ /dev/null
@@ -1,4 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Nicola Salmoria
-
-void sega_decode(UINT8 *data, UINT8 *opcodes, int size, const UINT8 convtable[32][4], int bank_count = 0, int bank_size = 0);
diff --git a/src/mame/machine/segacrpt_device.cpp b/src/mame/machine/segacrpt_device.cpp
new file mode 100644
index 00000000000..c7b8395fb43
--- /dev/null
+++ b/src/mame/machine/segacrpt_device.cpp
@@ -0,0 +1,1091 @@
+// license:BSD-3-Clause
+// copyright-holders:Nicola Salmoria, David Haywood
+/******************************************************************************
+
+ Sega encryption emulation by Nicola Salmoria
+
+
+ Several Sega Z80 games have program ROMs encrypted using a common algorithm
+ (but with a different key).
+ The hardware used to implement this encryption is either a custom CPU, or an
+ epoxy block which probably contains a standard Z80 + PALs.
+
+ The encryption affects D3, D5, and D7, and depends on M1, A0, A4, A8 and A12.
+ D0, D1, D3, D4 and D6 are always unaffected.
+
+ The encryption consists of a permutation of the three bits, which can also be
+ inverted. Therefore there are 3! * 2^3 = 48 different possible encryptions.
+
+ For simplicity, the decryption is implemented using conversion tables.
+ We need 32 of these tables, one for every possible combination of M1, A0, A4,
+ A8 and A12. However, all the games currently known are full of repetitions
+ and only use 6 different tables, the only exceptions being Pengo, Yamato and
+ Spatter which have 7 (but one of them is the identity: { 0x00, 0x08, 0x20, 0x28 } ).
+ This is most likely a limitation of the hardware.
+ Some of the early games are even weaker: of the 6 different tables, they use
+ 3 for opcodes and 3 for data, and always coupled in the same way.
+
+ In all games currently known, only bytes in the memory range 0x0000-0x7fff
+ (A15 = 0) are encrypted. My guess is that this was done to allow games to
+ copy code to RAM (in the memory range 0x8000-0xffff) and execute it from
+ there without the CPU trying to decrypt it and messing everything up.
+ However Zaxxon has RAM at 0x6000, and the CPU doesn't seem to interfere with
+ it; but it doesn't execute code from there, so it's possible that the CPU is
+ encrypting the data while writing it and decrypting it while reading (that
+ would seem kind of strange though). Video and sprite RAM and memory mapped
+ ports are all placed above 0x8000.
+
+ Given its strict limitations, this encryption is reasonably easy to break,
+ and very vulnerable to known plaintext attacks.
+
+
+
+ Ninja Princess:
+
+ there is a (bootleg?) board which has a standard Z80 + 2 bipolar PROMs
+ instead of the custom CPU. The encryption table is different from the
+ original Ninja Princess; it is actually the same as Flicky.
+
+ The first PROM is 32x8 and contains the number (0..5) of the table to
+ use depending on M1, A0, A4, A8, A12:
+
+ 00: 11 00 33 22 00 44 44 00 11 33 33 22 44 44 44 22
+ 10: 11 55 55 33 44 22 55 22 11 33 55 33 44 44 11 22
+
+ The second PROM is 256x4 and contains the 6 different XOR tables:
+
+ A D B C C B D A
+ 00: 09 09 0A 0A 0A 0A 09 09
+ 08: 0E 08 0B 0D 0D 0B 08 0E
+ 10: 0A 0C 0A 0C 0C 0A 0C 0A
+ 18: 0B 0E 0E 0B 0B 0E 0E 0B
+ 20: 0C 0C 0F 0F 0F 0F 0C 0C
+ 28: 08 0D 0B 0E 0E 0B 0D 08
+ [the remaining bytes are all 0F]
+ bit 3 is not used.
+ bits 0-2 is the XOR code inverted (0 = 0xa8, 1 = 0xa0 ... 6 = 0x08 7 = 0x00)
+
+ Here is a diagram showing how it works:
+
+ data to XOR
+ decode value
+ A ---
+ D7 --------------- 0| |
+ D3 --------------- 1| |
+ D5 --------------- 2| P |D
+ A --- D | R |0 ---|>--- D3
+ M1 --- 0| P |0 --- 3| O |1 ---|>--- D5
+ A0 --- 1| R |1 --- 4| M |2 ---|>--- D7
+ A4 --- 2| O |2 --- 5| 2 |3 ---
+ A8 --- 3| M |3 --- 6| |
+ A12 --- 4| 1 |4 --- 7| |
+ --- ---
+
+
+ My Hero:
+
+ the bootleg does the decryption using a single 256x4 PROM, mapped in the
+ obvious way:
+
+ data to XOR
+ decode value
+ A ---
+ D3 --- 0| |
+ D5 --- 1| |D
+ D7 --- 2| P |0 --- D3
+ A0 --- 3| R |1 --- D5
+ A4 --- 4| O |2 --- D7
+ A8 --- 5| M |3 ---
+ A12 --- 6| |
+ M1 --- 7| |
+ ---
+
+
+
+ List of encrypted games currently known:
+
+ CPU Part # Game Comments
+ 315-5010 Pengo unencrypted version available
+ 315-5013 Super Zaxxon used Zaxxon for known plaintext attack
+ 315-5014 Buck Rogers / Zoom 909 unencrypted version available
+ 315-5015 Super Locomotive
+ 315-5018 Yamato
+ ???-???? Top Roller same key as Yamato
+ 315-5028 Sindbad Mystery
+ 315-5030 Up'n Down & unencrypted version available
+ ???-???? M120 Razzmatazz
+ 315-5033 Regulus unencrypted version available
+ 315-5041 M140 Mister Viking
+ 315-5048 SWAT used Bull Fight for k.p.a.
+ 315-5051 Flicky &
+ Ninja Princess (bootleg)
+ 315-5061 Future Spy
+ 315-5064 Water Match used Mister Viking for k.p.a.
+ 315-5065 Bull Fight
+ 315-5069 Star Force game by Tehkan; same key as Super Locomotive
+ ???-???? Pinball Action game by Tehkan; also has a simple bitswap on top
+ ???-???? Spatter
+ 315-5084 Jongkyo TABLE INCOMPLETE game by Kiwako; also has a simple bitswap on top
+ 315-5093 Pitfall II
+ 315-5098 Ninja Princess unencrypted version available; same key as Up'n Down
+ 315-5102 Sega Ninja unencrypted version available
+ 315-5110 I'm Sorry used My Hero for k.p.a.
+ 315-5114 ?? pcb 834-5492 same key as Regulus
+ 315-5115 TeddyBoy Blues
+ 315-5132 My Hero
+ 315-5135 Heavy Metal &
+ Wonder Boy (set 1a & 3; bootlegs?)
+
+
+ Some text found in the ROMs:
+
+ Buck Rogers SECULITY BY MASATOSHI,MIZUNAGA
+ Super Locomotive SEGA FUKUMURA MIZUNAGA
+ Yamato SECULITY BY M,MIZUNAGA
+ Regulus SECULITY BY SYUICHI,KATAGI
+ Up'n Down 19/SEP 1983 MASATOSHI,MIZUNAGA
+ Mister Viking SECURITY BY S.KATAGI CONTROL CHIP M140
+ SWAT SECURITY BY S.KATAGI
+ Flicky SECURITY BY S.KATAGI
+ Water Match PROGRAMED BY KAWAHARA&NAKAGAWA
+ Star Force STAR FORCE TEHKAN. SECURITY BY SEGA ENTERPRISESE
+
+******************************************************************************/
+
+#include "emu.h"
+#include "segacrpt_device.h"
+
+
+#if 0
+static void lfkp(int mask)
+{
+ int A;
+ UINT8 *RAM = machine.root_device().memregion("maincpu")->base();
+
+
+ for (A = 0x0000;A < 0x8000-14;A++)
+ {
+ static const char text[] = "INSERT COIN";
+ int i;
+
+
+ if ( (RAM[A+0] & mask) == (0x21 & mask) && /* LD HL,$xxxx */
+ (RAM[A+3] & mask) == (0x11 & mask) && /* LD DE,$xxxx */
+ (RAM[A+6] & mask) == (0x01 & mask)) /* LD BC,$xxxx */
+ {
+ if ( (RAM[A+ 9] & mask) == (0x36 & mask) && /* LD (HL),$xx */
+ (RAM[A+11] & mask) == (0xed & mask) &&
+ (RAM[A+12] & mask) == (0xb0 & mask)) /* LDIR */
+ logerror("%04x: hl de bc (hl),xx ldir\n",A);
+
+ if ( (RAM[A+ 9] & mask) == (0x77 & mask) && /* LD (HL),A */
+ (RAM[A+10] & mask) == (0xed & mask) &&
+ (RAM[A+11] & mask) == (0xb0 & mask)) /* LDIR */
+ logerror("%04x: hl de bc (hl),a ldir\n",A);
+
+ if ( (RAM[A+ 9] & mask) == (0xed & mask) &&
+ (RAM[A+10] & mask) == (0xb0 & mask)) /* LDIR */
+ logerror("%04x: hl de bc ldir\n",A);
+ }
+
+ /* the following can also be PUSH IX, PUSH IY - need better checking */
+ if ( (RAM[A+0] & mask) == (0xf5 & mask) && /* PUSH AF */
+ (RAM[A+1] & mask) == (0xc5 & mask) && /* PUSH BC */
+ (RAM[A+2] & mask) == (0xd5 & mask) && /* PUSH DE */
+ (RAM[A+3] & mask) == (0xe5 & mask)) /* PUSH HL */
+ logerror("%04x: push af bc de hl\n",A);
+
+ if ( (RAM[A+0] & mask) == (0xe1 & mask) && /* POP HL */
+ (RAM[A+1] & mask) == (0xd1 & mask) && /* POP DE */
+ (RAM[A+2] & mask) == (0xc1 & mask) && /* POP BC */
+ (RAM[A+3] & mask) == (0xf1 & mask)) /* POP AF */
+ logerror("%04x: pop hl de bc af\n",A);
+
+ for (i = 0;i < strlen(text);i++)
+ if ((RAM[A+i] & mask) != (text[i] & mask)) break;
+ if (i == strlen(text))
+ logerror("%04x: INSERT COIN\n",A);
+ }
+}
+
+static void look_for_known_plaintext(void)
+{
+ lfkp(0x57);
+}
+#endif
+
+static void decode(UINT8 *data, UINT8 *opcodes, int size, const UINT8 convtable[32][4], int bank_count, int bank_size)
+{
+ for (int A = 0x0000;A < size + bank_count*bank_size;A++)
+ {
+ int xorval = 0;
+
+ UINT8 src = data[A];
+ int adr;
+ if(A < size || !bank_count)
+ adr = A;
+ else
+ adr = size + ((A - size) % bank_size);
+
+ /* pick the translation table from bits 0, 4, 8 and 12 of the address */
+ int row = (adr & 1) + (((adr >> 4) & 1) << 1) + (((adr >> 8) & 1) << 2) + (((adr >> 12) & 1) << 3);
+
+ /* pick the offset in the table from bits 3 and 5 of the source data */
+ int col = ((src >> 3) & 1) + (((src >> 5) & 1) << 1);
+ /* the bottom half of the translation table is the mirror image of the top */
+ if (src & 0x80)
+ {
+ col = 3 - col;
+ xorval = 0xa8;
+ }
+
+ /* decode the opcodes */
+ opcodes[A] = (src & ~0xa8) | (convtable[2*row][col] ^ xorval);
+
+ /* decode the data */
+ data[A] = (src & ~0xa8) | (convtable[2*row+1][col] ^ xorval);
+
+ if (convtable[2*row][col] == 0xff) /* table incomplete! (for development) */
+ opcodes[A] = 0xee;
+ if (convtable[2*row+1][col] == 0xff) /* table incomplete! (for development) */
+ data[A] = 0xee;
+ }
+}
+
+
+
+
+const device_type SEGACRPT_Z80 = &device_creator<segacrpt_z80_device>;
+
+const device_type SEGA_315_5132 = &device_creator<sega_315_5132_device>;
+const device_type SEGA_315_5155 = &device_creator<sega_315_5155_device>;
+const device_type SEGA_315_5110 = &device_creator<sega_315_5110_device>;
+const device_type SEGA_315_5135 = &device_creator<sega_315_5135_device>;
+const device_type SEGA_315_5051 = &device_creator<sega_315_5051_device>;
+const device_type SEGA_315_5098 = &device_creator<sega_315_5098_device>; // also 315-5030 ?
+const device_type SEGA_315_5102 = &device_creator<sega_315_5102_device>;
+const device_type SEGA_315_5065 = &device_creator<sega_315_5065_device>;
+const device_type SEGA_315_5064 = &device_creator<sega_315_5064_device>;
+const device_type SEGA_315_5033 = &device_creator<sega_315_5033_device>;
+const device_type SEGA_315_5041 = &device_creator<sega_315_5041_device>;
+const device_type SEGA_315_5048 = &device_creator<sega_315_5048_device>;
+const device_type SEGA_315_5093 = &device_creator<sega_315_5093_device>;
+const device_type SEGA_315_5099 = &device_creator<sega_315_5099_device>;
+const device_type SEGA_315_5015 = &device_creator<sega_315_5015_device>;
+const device_type SEGA_315_5133 = &device_creator<sega_315_5133_device>; // NOT DECRYPTED YET
+const device_type SEGA_315_5061 = &device_creator<sega_315_5061_device>;
+const device_type SEGA_315_5028 = &device_creator<sega_315_5028_device>;
+const device_type SEGA_315_5084 = &device_creator<sega_315_5084_device>;
+const device_type SEGA_315_5013 = &device_creator<sega_315_5013_device>;
+const device_type SEGA_315_5014 = &device_creator<sega_315_5014_device>;
+const device_type SEGA_315_5018 = &device_creator<sega_315_5018_device>;
+const device_type SEGA_315_5010 = &device_creator<sega_315_5010_device>;
+
+// below are unknown part numbers
+const device_type SEGA_315_SPAT = &device_creator<sega_315_spat_device>; // unknown part number
+const device_type SEGA_CPU_PBACTIO4 = &device_creator<sega_cpu_pbactio4_device>;
+
+
+
+
+segacrpt_z80_device::segacrpt_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ z80_device(mconfig, SEGACRPT_Z80, "Z80 SegaCrypt", tag, owner, clock, "z80_sega", __FILE__),
+ m_decrypted_ptr(nullptr),
+ m_region_ptr(nullptr),
+ m_decode_size(0x8000),
+ m_numbanks(0),
+ m_banksize(0),
+ m_decryption_done(false)
+ {}
+void segacrpt_z80_device::device_start() { z80_device::device_start(); }
+void segacrpt_z80_device::device_reset()
+{
+ // decrypt on reset, makes sure DRIVER_INIT stuff happens first (for myherok)
+ // actual CPU would be decrypting in realtime anyway
+ if (m_decrypted_ptr == nullptr)
+ {
+ m_decrypted_ptr = (UINT8*)memshare(m_decrypted_tag)->ptr();
+ }
+
+ if (m_region_ptr == nullptr)
+ {
+ m_region_ptr = (UINT8*)memregion(tag())->base();
+ }
+
+ if (m_decryption_done == false)
+ {
+ decrypt();
+ m_decryption_done = true;
+ }
+ z80_device::device_reset();
+
+}
+void segacrpt_z80_device::decrypt() { }
+
+void segacrpt_z80_device::set_decrypted_tag(device_t &device, const char* decrypted_tag)
+{
+ segacrpt_z80_device &dev = downcast<segacrpt_z80_device &>(device);
+ dev.m_decrypted_tag = decrypted_tag;
+}
+
+void segacrpt_z80_device::set_decrypted_ptr(device_t &device, UINT8* ptr)
+{
+ segacrpt_z80_device &dev = downcast<segacrpt_z80_device &>(device);
+ dev.m_decrypted_ptr = ptr;
+}
+
+void segacrpt_z80_device::set_region_p(UINT8* ptr)
+{
+ m_region_ptr = ptr;
+}
+
+void segacrpt_z80_device::set_decrypted_p(UINT8* ptr)
+{
+ m_decrypted_ptr = ptr;
+}
+
+void segacrpt_z80_device::set_size(device_t &device, int size)
+{
+ segacrpt_z80_device &dev = downcast<segacrpt_z80_device &>(device);
+ dev.m_decode_size = size;
+}
+
+void segacrpt_z80_device::set_numbanks(device_t &device, int numbanks)
+{
+ segacrpt_z80_device &dev = downcast<segacrpt_z80_device &>(device);
+ dev.m_numbanks = numbanks;
+}
+
+void segacrpt_z80_device::set_banksize(device_t &device, int banksize)
+{
+ segacrpt_z80_device &dev = downcast<segacrpt_z80_device &>(device);
+ dev.m_banksize = banksize;
+}
+
+
+
+
+sega_315_5132_device::sega_315_5132_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5132_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x20,0x00,0xa0,0x80 }, { 0x80,0xa0,0x88,0xa8 }, /* ...0...0...0...0 */
+ { 0x20,0x00,0xa0,0x80 }, { 0x80,0xa0,0x88,0xa8 }, /* ...0...0...0...1 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...1...0 */
+ { 0x08,0x88,0x00,0x80 }, { 0x80,0xa0,0x88,0xa8 }, /* ...0...0...1...1 */
+ { 0x20,0x00,0xa0,0x80 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...1...0...0 */
+ { 0x20,0x00,0xa0,0x80 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...0...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...1...0 */
+ { 0x08,0x88,0x00,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...1...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x20,0x00,0xa0,0x80 }, /* ...1...0...0...0 */
+ { 0x80,0xa0,0x88,0xa8 }, { 0x20,0x00,0xa0,0x80 }, /* ...1...0...0...1 */
+ { 0x80,0xa0,0x88,0xa8 }, { 0x80,0xa0,0x88,0xa8 }, /* ...1...0...1...0 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0x80,0xa0,0x88,0xa8 }, /* ...1...0...1...1 */
+ { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...0 */
+ { 0x88,0x80,0x08,0x00 }, { 0x08,0x88,0x00,0x80 }, /* ...1...1...0...1 */
+ { 0x88,0x80,0x08,0x00 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...1...1...0 */
+ { 0x88,0x80,0x08,0x00 }, { 0xa8,0xa0,0x88,0x80 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+
+sega_315_5155_device::sega_315_5155_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5155_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x20,0x28,0x00,0x08 }, { 0x80,0x00,0xa0,0x20 }, /* ...0...0...0...0 */
+ { 0x20,0x28,0x00,0x08 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...0...0...1 */
+ { 0x28,0x08,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...0 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...1 */
+ { 0x20,0x28,0x00,0x08 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...0...0 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...1...0...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...0 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...1 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x80,0x00,0xa0,0x20 }, /* ...1...0...0...0 */
+ { 0xa0,0x20,0xa8,0x28 }, { 0xa0,0xa8,0x20,0x28 }, /* ...1...0...0...1 */
+ { 0xa0,0x20,0xa8,0x28 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...0 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...1 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x20,0x28,0x00,0x08 }, /* ...1...1...0...0 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0x20,0xa8,0x28 }, /* ...1...1...0...1 */
+ { 0x80,0x00,0xa0,0x20 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...1...1...0 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0x20,0xa8,0x28 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+
+sega_315_5110_device::sega_315_5110_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5110_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x88,0x08,0x80,0x00 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...0...0...0 */
+ { 0x00,0x20,0x80,0xa0 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...0...1 */
+ { 0x88,0x08,0xa8,0x28 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...0...1...0 */
+ { 0x00,0x20,0x80,0xa0 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...0...1...1 */
+ { 0x00,0x20,0x80,0xa0 }, { 0x08,0x00,0x88,0x80 }, /* ...0...1...0...0 */
+ { 0x00,0x20,0x80,0xa0 }, { 0x20,0x28,0xa0,0xa8 }, /* ...0...1...0...1 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...1...1...0 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...1...1...1 */
+ { 0x88,0x08,0x80,0x00 }, { 0x08,0x00,0x88,0x80 }, /* ...1...0...0...0 */
+ { 0x08,0x00,0x88,0x80 }, { 0x88,0x08,0x80,0x00 }, /* ...1...0...0...1 */
+ { 0x08,0x28,0x00,0x20 }, { 0x08,0x28,0x00,0x20 }, /* ...1...0...1...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0x08,0x28,0x00,0x20 }, /* ...1...0...1...1 */
+ { 0x08,0x28,0x00,0x20 }, { 0x08,0x00,0x88,0x80 }, /* ...1...1...0...0 */
+ { 0x08,0x28,0x00,0x20 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...1...0...1 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0x08,0x28,0x00,0x20 }, /* ...1...1...1...0 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0x08,0x28,0x00,0x20 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+sega_315_5135_device::sega_315_5135_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5135_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...1...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...0 */
+ { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...1...0 */
+ { 0x88,0x80,0x08,0x00 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...1 */
+ { 0xa0,0x20,0xa8,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...0 */
+ { 0xa0,0x20,0xa8,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...1 */
+ { 0xa0,0x20,0xa8,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...1...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa0,0x20,0xa8,0x28 }, /* ...1...1...0...0 */
+ { 0xa0,0x20,0xa8,0x28 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...1...0...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa0,0x20,0xa8,0x28 }, /* ...1...1...1...0 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+
+sega_315_5051_device::sega_315_5051_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5051_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x08,0x88,0x00,0x80 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...0...0 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0x20,0x00 }, /* ...0...0...1...0 */
+ { 0x28,0x08,0x20,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...1 */
+ { 0x08,0x88,0x00,0x80 }, { 0x80,0x00,0xa0,0x20 }, /* ...0...1...0...0 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...1 */
+ { 0x28,0x08,0x20,0x00 }, { 0x28,0x08,0x20,0x00 }, /* ...0...1...1...0 */
+ { 0x28,0x08,0x20,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...1...1 */
+ { 0x08,0x88,0x00,0x80 }, { 0xa8,0x88,0x28,0x08 }, /* ...1...0...0...0 */
+ { 0xa8,0x88,0x28,0x08 }, { 0x80,0x00,0xa0,0x20 }, /* ...1...0...0...1 */
+ { 0x28,0x08,0x20,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...1...0 */
+ { 0xa8,0x88,0x28,0x08 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...1...1 */
+ { 0x08,0x88,0x00,0x80 }, { 0x80,0x00,0xa0,0x20 }, /* ...1...1...0...0 */
+ { 0xa8,0x88,0x28,0x08 }, { 0x80,0x00,0xa0,0x20 }, /* ...1...1...0...1 */
+ { 0x28,0x08,0x20,0x00 }, { 0x28,0x08,0x20,0x00 }, /* ...1...1...1...0 */
+ { 0x08,0x88,0x00,0x80 }, { 0x88,0x80,0x08,0x00 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+sega_315_5098_device::sega_315_5098_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5098_device::decrypt()
+{
+ // also 315-5030 ?
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x08,0x88,0x00,0x80 }, { 0xa0,0x20,0x80,0x00 }, /* ...0...0...0...0 */
+ { 0xa8,0xa0,0x28,0x20 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
+ { 0x88,0x80,0x08,0x00 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...0...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...0...1...1 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x20,0x80,0x00 }, /* ...0...1...0...0 */
+ { 0xa8,0xa0,0x28,0x20 }, { 0xa8,0xa0,0x28,0x20 }, /* ...0...1...0...1 */
+ { 0x88,0x80,0x08,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...1...1 */
+ { 0xa0,0x20,0x80,0x00 }, { 0xa0,0x20,0x80,0x00 }, /* ...1...0...0...0 */
+ { 0x08,0x88,0x00,0x80 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...0...1 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...1...1 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...0...1 */
+ { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...1...0 */
+ { 0x08,0x88,0x00,0x80 }, { 0x28,0x08,0xa8,0x88 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+
+sega_315_5102_device::sega_315_5102_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5102_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...0...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...0...0...1 */
+ { 0xa8,0xa0,0x28,0x20 }, { 0xa8,0xa0,0x28,0x20 }, /* ...0...0...1...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...0...1...1 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...0...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x08,0x80,0x00 }, /* ...0...1...0...1 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x28,0x20 }, /* ...0...1...1...1 */
+ { 0x88,0x08,0x80,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...0 */
+ { 0xa0,0xa8,0x80,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...0...0...1 */
+ { 0xa8,0xa0,0x28,0x20 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...1...0 */
+ { 0xa8,0xa0,0x28,0x20 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...0...1...1 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...0...0 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...1...0...1 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...1...1...0 */
+ { 0xa8,0xa0,0x28,0x20 }, { 0x28,0x08,0xa8,0x88 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+sega_315_5065_device::sega_315_5065_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5065_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x80,0xa0,0x00,0x20 }, /* ...0...0...0...0 */
+ { 0x20,0x28,0x00,0x08 }, { 0x20,0x28,0x00,0x08 }, /* ...0...0...0...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x08,0x28,0x00,0x20 }, /* ...0...0...1...0 */
+ { 0x88,0x08,0xa8,0x28 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...0...1...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x20,0x28,0x00,0x08 }, /* ...0...1...0...0 */
+ { 0x28,0xa8,0x20,0xa0 }, { 0x20,0x28,0x00,0x08 }, /* ...0...1...0...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x08,0x28,0x00,0x20 }, /* ...0...1...1...0 */
+ { 0x88,0x08,0xa8,0x28 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...1...1...1 */
+ { 0x28,0xa8,0x20,0xa0 }, { 0xa0,0xa8,0x20,0x28 }, /* ...1...0...0...0 */
+ { 0x88,0x08,0xa8,0x28 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...0...1 */
+ { 0x28,0xa8,0x20,0xa0 }, { 0x08,0x28,0x00,0x20 }, /* ...1...0...1...0 */
+ { 0x28,0xa8,0x20,0xa0 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...1...1 */
+ { 0x20,0x28,0x00,0x08 }, { 0x20,0x28,0x00,0x08 }, /* ...1...1...0...0 */
+ { 0x88,0x08,0xa8,0x28 }, { 0x20,0x28,0x00,0x08 }, /* ...1...1...0...1 */
+ { 0x08,0x28,0x00,0x20 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...1...1...0 */
+ { 0x08,0x28,0x00,0x20 }, { 0x88,0x08,0xa8,0x28 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+sega_315_5064_device::sega_315_5064_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5064_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...0...0...0 */
+ { 0x08,0x88,0x00,0x80 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
+ { 0x20,0x00,0xa0,0x80 }, { 0x20,0x28,0xa0,0xa8 }, /* ...0...0...1...0 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...0...1...1 */
+ { 0xa8,0x28,0x88,0x08 }, { 0xa8,0x28,0x88,0x08 }, /* ...0...1...0...0 */
+ { 0x08,0x88,0x00,0x80 }, { 0xa8,0x28,0x88,0x08 }, /* ...0...1...0...1 */
+ { 0xa8,0x28,0x88,0x08 }, { 0x20,0x28,0xa0,0xa8 }, /* ...0...1...1...0 */
+ { 0xa8,0x28,0x88,0x08 }, { 0xa8,0x28,0x88,0x08 }, /* ...0...1...1...1 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...0...0...1 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...1...0 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...0...1...1 */
+ { 0x20,0x00,0xa0,0x80 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...1...0...0 */
+ { 0xa8,0x28,0x88,0x08 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...1 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...1...1...0 */
+ { 0xa8,0x28,0x88,0x08 }, { 0xa8,0x28,0x88,0x08 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+sega_315_5033_device::sega_315_5033_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5033_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x28,0x08,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...0 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...0...1 */
+ { 0x88,0x80,0x08,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...1...1 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...0 */
+ { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...1 */
+ { 0x88,0x08,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...1...1...0 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...1...1 */
+ { 0x80,0xa0,0x00,0x20 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...0...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...0...1 */
+ { 0x80,0xa0,0x00,0x20 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...1...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...1...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...1...0...0 */
+ { 0x80,0xa0,0x00,0x20 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...1...0...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...1...1...0 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+sega_315_5041_device::sega_315_5041_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5041_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...1 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...1...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...1 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...0 */
+ { 0x88,0x80,0x08,0x00 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...1...0...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...0...1...1...0 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...1...1 */
+ { 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...0...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...0...1 */
+ { 0xa0,0x80,0x20,0x00 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...1...0 */
+ { 0xa0,0x80,0x20,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...1...0...1...1 */
+ { 0x28,0x08,0xa8,0x88 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...0 */
+ { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...1...1...0 */
+ { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0xa8,0x88 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5048_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x88,0x08,0x80,0x00 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...0...0...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
+ { 0xa0,0x80,0x20,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...0 */
+ { 0xa0,0xa8,0x80,0x88 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...1 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...1...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...0...1 */
+ { 0xa0,0x80,0x20,0x00 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...1...1...0 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...1...1...1 */
+ { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...0...0 */
+ { 0xa0,0x20,0x80,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...1 */
+ { 0xa0,0x20,0x80,0x00 }, { 0xa0,0x20,0x80,0x00 }, /* ...1...0...1...0 */
+ { 0xa0,0x20,0x80,0x00 }, { 0xa0,0x20,0x80,0x00 }, /* ...1...0...1...1 */
+ { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...1...0...1 */
+ { 0xa0,0xa8,0x80,0x88 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...1...0 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0xa8,0x80,0x88 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+sega_315_5093_device::sega_315_5093_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5093_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...0...0 */
+ { 0x08,0x88,0x28,0xa8 }, { 0x28,0xa8,0x20,0xa0 }, /* ...0...0...0...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...0 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...0...1...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x20,0x00,0xa0,0x80 }, /* ...0...1...0...0 */
+ { 0x28,0xa8,0x20,0xa0 }, { 0x20,0x00,0xa0,0x80 }, /* ...0...1...0...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...1...1...0 */
+ { 0x28,0xa8,0x20,0xa0 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...1...1...1 */
+ { 0x20,0x00,0xa0,0x80 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...0...0...0 */
+ { 0x80,0x88,0xa0,0xa8 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...0...0...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...0 */
+ { 0x80,0x88,0xa0,0xa8 }, { 0x28,0xa8,0x20,0xa0 }, /* ...1...0...1...1 */
+ { 0x20,0x00,0xa0,0x80 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...1...0...0 */
+ { 0x80,0x88,0xa0,0xa8 }, { 0x20,0x00,0xa0,0x80 }, /* ...1...1...0...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...1...1...0 */
+ { 0x80,0x88,0xa0,0xa8 }, { 0x28,0xa8,0x20,0xa0 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+sega_315_5099_device::sega_315_5099_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5099_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x80,0xa0,0x00,0x20 }, /* ...0...0...0...0 */
+ { 0x20,0x28,0x00,0x08 }, { 0x20,0x28,0x00,0x08 }, /* ...0...0...0...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x08,0x28,0x00,0x20 }, /* ...0...0...1...0 */
+ { 0x88,0x08,0xa8,0x28 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...0...1...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x20,0x28,0x00,0x08 }, /* ...0...1...0...0 */
+ { 0x28,0xa8,0x20,0xa0 }, { 0x20,0x28,0x00,0x08 }, /* ...0...1...0...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x08,0x28,0x00,0x20 }, /* ...0...1...1...0 */
+ { 0x88,0x08,0xa8,0x28 }, { 0x88,0x08,0xa8,0x28 }, /* ...0...1...1...1 */
+ { 0x28,0xa8,0x20,0xa0 }, { 0xa0,0xa8,0x20,0x28 }, /* ...1...0...0...0 */
+ { 0x88,0x08,0xa8,0x28 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...0...1 */
+ { 0x28,0xa8,0x20,0xa0 }, { 0x08,0x28,0x00,0x20 }, /* ...1...0...1...0 */
+ { 0x28,0xa8,0x20,0xa0 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...0...1...1 */
+ { 0x20,0x28,0x00,0x08 }, { 0x20,0x28,0x00,0x08 }, /* ...1...1...0...0 */
+ { 0x88,0x08,0xa8,0x28 }, { 0x20,0x28,0x00,0x08 }, /* ...1...1...0...1 */
+ { 0x08,0x28,0x00,0x20 }, { 0x80,0xa0,0x00,0x20 }, /* ...1...1...1...0 */
+ { 0x08,0x28,0x00,0x20 }, { 0x88,0x08,0xa8,0x28 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+
+sega_315_spat_device::sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_spat_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x88,0x08,0x80,0x00 }, { 0x00,0x08,0x20,0x28 }, /* ...0...0...0...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...0...1 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...1...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...1 */
+ { 0x00,0x08,0x20,0x28 }, { 0x88,0x08,0x80,0x00 }, /* ...0...1...0...0 */
+ { 0xa0,0x80,0x20,0x00 }, { 0x80,0x88,0x00,0x08 }, /* ...0...1...0...1 */
+ { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...1...1...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...1...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x80,0x88,0x00,0x08 }, /* ...1...0...0...0 */
+ { 0x80,0x88,0x00,0x08 }, { 0x00,0x08,0x20,0x28 }, /* ...1...0...0...1 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0x28,0xa8,0x08,0x88 }, /* ...1...0...1...0 */
+ { 0x00,0x08,0x20,0x28 }, { 0x80,0xa0,0x88,0xa8 }, /* ...1...0...1...1 */
+ { 0x80,0x88,0x00,0x08 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...0 */
+ { 0x80,0xa0,0x88,0xa8 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...1 */
+ { 0xa0,0x80,0x20,0x00 }, { 0x80,0xa0,0x88,0xa8 }, /* ...1...1...1...0 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0x00,0x08,0x20,0x28 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+sega_315_5015_device::sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5015_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...0...0 */
+ { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...0...1 */
+ { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...1...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...1 */
+ { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...0...0 */
+ { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...0...1 */
+ { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...1...1...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...1...1 */
+ { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...0...0...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...0...1 */
+ { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...0 */
+ { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...0...1...1 */
+ { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...1...0...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...1 */
+ { 0x20,0x00,0xa0,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...1...1...0 */
+ { 0x88,0x08,0x80,0x00 }, { 0xa0,0x80,0xa8,0x88 } /* ...1...1...1...1 */
+ };
+
+ /* decrypt program ROMs */
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+sega_315_5133_device::sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5133_device::decrypt()
+{
+ // TODO
+}
+
+
+
+sega_315_5014_device::sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5014_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...0...0...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...1...0 */
+ { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...1...1 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...1...0...0 */
+ { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...0...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...1...1...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...0...0...0 */
+ { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...0...1 */
+ { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...1...1 */
+ { 0x80,0x00,0x88,0x08 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...1...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...1 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...1...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa8,0xa0,0x88,0x80 } /* ...1...1...1...1 */
+ };
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+sega_315_5013_device::sega_315_5013_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5013_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...0...0 */
+ { 0x08,0x28,0x88,0xa8 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...1 */
+ { 0xa8,0x28,0xa0,0x20 }, { 0x20,0xa0,0x00,0x80 }, /* ...0...0...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...1...1 */
+ { 0x08,0x28,0x88,0xa8 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...0...1 */
+ { 0xa8,0x28,0xa0,0x20 }, { 0x20,0xa0,0x00,0x80 }, /* ...0...1...1...0 */
+ { 0x08,0x28,0x88,0xa8 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...1...1 */
+ { 0x08,0x28,0x88,0xa8 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...0...1 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...1...0 */
+ { 0xa8,0x28,0xa0,0x20 }, { 0x20,0xa0,0x00,0x80 }, /* ...1...0...1...1 */
+ { 0xa8,0x28,0xa0,0x20 }, { 0x20,0xa0,0x00,0x80 }, /* ...1...1...0...0 */
+ { 0xa8,0x28,0xa0,0x20 }, { 0x20,0xa0,0x00,0x80 }, /* ...1...1...0...1 */
+ { 0x08,0x28,0x88,0xa8 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+sega_315_5061_device::sega_315_5061_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5061_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x28,0x08,0x20,0x00 }, { 0x28,0x08,0x20,0x00 }, /* ...0...0...0...0 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x08,0x88,0x00,0x80 }, /* ...0...0...0...1 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x08,0x88,0x00,0x80 }, /* ...0...0...1...0 */
+ { 0xa0,0x80,0x20,0x00 }, { 0x20,0x28,0xa0,0xa8 }, /* ...0...0...1...1 */
+ { 0x28,0x08,0x20,0x00 }, { 0x88,0x80,0xa8,0xa0 }, /* ...0...1...0...0 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...0...1 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x20,0x28,0xa0,0xa8 }, /* ...0...1...1...0 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...1...1 */
+ { 0x88,0x80,0xa8,0xa0 }, { 0x28,0x08,0x20,0x00 }, /* ...1...0...0...0 */
+ { 0x80,0x00,0xa0,0x20 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...0...1 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0x08,0x88,0x00,0x80 }, /* ...1...0...1...0 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x20,0x28,0xa0,0xa8 }, /* ...1...0...1...1 */
+ { 0x88,0x80,0xa8,0xa0 }, { 0x88,0x80,0xa8,0xa0 }, /* ...1...1...0...0 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x08,0x88,0x00,0x80 }, /* ...1...1...0...1 */
+ { 0x80,0x00,0xa0,0x20 }, { 0x28,0x08,0x20,0x00 }, /* ...1...1...1...0 */
+ { 0x20,0x28,0xa0,0xa8 }, { 0xa0,0x80,0x20,0x00 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+sega_315_5018_device::sega_315_5018_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5018_device::decrypt()
+{
+
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...0 */
+ { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x20,0xa0,0x28,0xa8 }, /* ...0...0...1...1 */
+ { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x08,0x28 }, /* ...0...1...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...0...1 */
+ { 0x20,0xa0,0x28,0xa8 }, { 0x20,0xa0,0x28,0xa8 }, /* ...0...1...1...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...1...1...1 */
+ { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...0...0...0 */
+ { 0x20,0xa0,0x28,0xa8 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...0...1 */
+ { 0xa0,0x20,0x80,0x00 }, { 0x20,0xa0,0x28,0xa8 }, /* ...1...0...1...0 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0x20,0xa0,0x28,0xa8 }, /* ...1...0...1...1 */
+ { 0x20,0xa0,0x28,0xa8 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...1...0...0 */
+ { 0x88,0xa8,0x08,0x28 }, { 0x88,0xa8,0x08,0x28 }, /* ...1...1...0...1 */
+ { 0xa0,0x20,0x80,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...1...1...1...0 */
+ { 0x20,0xa0,0x28,0xa8 }, { 0x00,0x08,0x20,0x28 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+
+}
+
+
+sega_315_5010_device::sega_315_5010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5010_device::decrypt()
+{
+
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0xa0,0x80,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...0...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...0...1 */
+ { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...0...1...0 */
+ { 0x08,0x28,0x88,0xa8 }, { 0xa0,0x80,0xa8,0x88 }, /* ...0...0...1...1 */
+ { 0x08,0x00,0x88,0x80 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...1...0...0 */
+ { 0xa0,0x80,0x20,0x00 }, { 0x08,0x00,0x88,0x80 }, /* ...0...1...0...1 */
+ { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...0...1...1...0 */
+ { 0xa0,0x80,0x20,0x00 }, { 0x00,0x08,0x20,0x28 }, /* ...0...1...1...1 */
+ { 0x88,0x80,0x08,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...0...0 */
+ { 0x88,0x80,0x08,0x00 }, { 0x00,0x08,0x20,0x28 }, /* ...1...0...0...1 */
+ { 0x08,0x28,0x88,0xa8 }, { 0x08,0x28,0x88,0xa8 }, /* ...1...0...1...0 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...1...1 */
+ { 0x08,0x00,0x88,0x80 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...0 */
+ { 0x00,0x08,0x20,0x28 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...1 */
+ { 0x08,0x28,0x88,0xa8 }, { 0x08,0x28,0x88,0xa8 }, /* ...1...1...1...0 */
+ { 0x08,0x00,0x88,0x80 }, { 0xa0,0x80,0x20,0x00 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+
+
+sega_cpu_pbactio4_device::sega_cpu_pbactio4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_cpu_pbactio4_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0xa8,0xa0,0x88,0x80 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...0...0 */
+ { 0x28,0x08,0xa8,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...0...0...1 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0x28,0xa8,0x08,0x88 }, /* ...0...0...1...0 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...0...1...1 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0xa8,0xa0,0x88,0x80 }, /* ...0...1...0...0 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...0...1 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...1...0 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...1...1 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...0...0...0 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...0...0...1 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0x80,0xa8,0x88 }, /* ...1...0...1...0 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...0...1...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...1...0...0 */
+ { 0x28,0x20,0xa8,0xa0 }, { 0xa8,0x28,0xa0,0x20 }, /* ...1...1...0...1 */
+ { 0xa0,0x80,0xa8,0x88 }, { 0xa8,0xa0,0x88,0x80 }, /* ...1...1...1...0 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0xa8,0x28,0xa0,0x20 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+sega_315_5028_device::sega_315_5028_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5028_device::decrypt()
+{
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...0...0 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...0...0...1 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...0...1...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...0...1...1 */
+ { 0xa8,0x88,0xa0,0x80 }, { 0xa0,0x20,0xa8,0x28 }, /* ...0...1...0...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...0...1...0...1 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...1...1...0 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...0...1...1...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...0...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...0...0...1 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...1...0...1...0 */
+ { 0xa8,0xa0,0x88,0x80 }, { 0x00,0x20,0x80,0xa0 }, /* ...1...0...1...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...0...0 */
+ { 0xa8,0x88,0xa0,0x80 }, { 0xa0,0x20,0xa8,0x28 }, /* ...1...1...0...1 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 }, /* ...1...1...1...0 */
+ { 0x28,0xa8,0x08,0x88 }, { 0x88,0x80,0x08,0x00 } /* ...1...1...1...1 */
+ };
+
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
+
+
+sega_315_5084_device::sega_315_5084_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : segacrpt_z80_device(mconfig, tag, owner, clock) {}
+void sega_315_5084_device::decrypt()
+{
+
+ static const UINT8 convtable[32][4] =
+ {
+ /* opcode data address */
+ /* A B C D A B C D */
+ { 0x28,0x08,0xa8,0x88 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...0...0...0 */
+ { 0x80,0x88,0xa0,0xa8 }, { 0xa0,0xa8,0x20,0x28 }, /* ...0...0...0...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x20,0xa0,0x00,0x80 }, /* ...0...0...1...0 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x80,0x88,0xa0,0xa8 }, /* ...0...0...1...1 */
+ { 0x08,0x88,0x00,0x80 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...0...0 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...0...1 */
+ { 0x20,0xa0,0x00,0x80 }, { 0x20,0xa0,0x00,0x80 }, /* ...0...1...1...0 */
+ { 0x08,0x88,0x00,0x80 }, { 0x08,0x88,0x00,0x80 }, /* ...0...1...1...1 */
+ { 0x88,0xa8,0x80,0xa0 }, { 0xa0,0xa8,0x20,0x28 }, /* ...1...0...0...0 */
+ { 0x80,0x88,0xa0,0xa8 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...0...0...1 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x20,0xa0,0x00,0x80 }, /* ...1...0...1...0 */
+ { 0xa0,0xa8,0x20,0x28 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...0...1...1 */
+ { 0x08,0x88,0x00,0x80 }, { 0x28,0x08,0xa8,0x88 }, /* ...1...1...0...0 */
+ { 0x08,0x88,0x00,0x80 }, { 0x80,0x88,0xa0,0xa8 }, /* ...1...1...0...1 */
+ { 0x28,0x08,0xa8,0x88 }, { 0x20,0xa0,0x00,0x80 }, /* ...1...1...1...0 */
+ { 0x80,0x88,0xa0,0xa8 }, { 0x08,0x88,0x00,0x80 } /* ...1...1...1...1 */
+ };
+ decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize);
+}
diff --git a/src/mame/machine/segacrpt_device.h b/src/mame/machine/segacrpt_device.h
new file mode 100644
index 00000000000..0c4491f5c3c
--- /dev/null
+++ b/src/mame/machine/segacrpt_device.h
@@ -0,0 +1,296 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+#pragma once
+
+#ifndef __SEGACRPT_Z80__
+#define __SEGACRPT_Z80__
+
+
+#define MCFG_SEGACRPT_SET_DECRYPTED_TAG(_tag) \
+ segacrpt_z80_device::set_decrypted_tag(*device, _tag);
+
+#define MCFG_SEGACRPT_SET_DECRYPTED_PTR(_tag) \
+ segacrpt_z80_device::set_decrypted_ptr(*device, _ptr);
+
+#define MCFG_SEGACRPT_SET_SIZE(_size) \
+ segacrpt_z80_device::set_size(*device, _size);
+
+#define MCFG_SEGACRPT_SET_NUMBANKS(_numbanks) \
+ segacrpt_z80_device::set_numbanks(*device, _numbanks);
+
+#define MCFG_SEGACRPT_SET_BANKSIZE(_banksize) \
+ segacrpt_z80_device::set_banksize(*device, _banksize);
+
+
+#include "emu.h"
+#include "cpu/z80/z80.h"
+
+// base class
+class segacrpt_z80_device : public z80_device
+{
+public:
+ segacrpt_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+
+ static void set_decrypted_tag(device_t &device, const char* decrypted_tag);
+ static void set_decrypted_ptr(device_t &device, UINT8* ptr); // toprollr
+ static void set_size(device_t &device, int size);
+ static void set_numbanks(device_t &device, int _numbanks);
+ static void set_banksize(device_t &device, int _banksize);
+
+ const char* m_decrypted_tag;
+ UINT8* m_decrypted_ptr;
+ UINT8* m_region_ptr;
+ int m_decode_size;
+ int m_numbanks;
+ int m_banksize;
+ bool m_decryption_done;
+
+ void set_decrypted_p(UINT8* ptr);
+ void set_region_p(UINT8* ptr);
+
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void decrypt();
+};
+
+
+// actual encrypted CPUs
+class sega_315_5132_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5132_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5155_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5155_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5110_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5110_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5135_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5135_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5051_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5051_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5098_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5098_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5102_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5102_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5065_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5065_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+
+class sega_315_5064_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5064_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+
+class sega_315_5033_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5033_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5041_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5041_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5048_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5093_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5093_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5099_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5099_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_spat_device : public segacrpt_z80_device
+{
+public:
+ sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5015_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+
+class sega_315_5133_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5014_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5013_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5013_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5061_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5061_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+
+
+class sega_315_5018_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5018_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5010_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+
+
+class sega_cpu_pbactio4_device : public segacrpt_z80_device
+{
+public:
+ sega_cpu_pbactio4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5028_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5028_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+class sega_315_5084_device : public segacrpt_z80_device
+{
+public:
+ sega_315_5084_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
+protected:
+ virtual void decrypt() override;
+};
+
+
+extern const device_type SEGA_315_5132;
+extern const device_type SEGA_315_5155;
+extern const device_type SEGA_315_5110;
+extern const device_type SEGA_315_5135;
+extern const device_type SEGA_315_5051;
+extern const device_type SEGA_315_5098;
+extern const device_type SEGA_315_5102;
+extern const device_type SEGA_315_5065;
+extern const device_type SEGA_315_5064;
+extern const device_type SEGA_315_5033;
+extern const device_type SEGA_315_5041;
+extern const device_type SEGA_315_5048;
+extern const device_type SEGA_315_5093;
+extern const device_type SEGA_315_5099;
+extern const device_type SEGA_315_SPAT;
+extern const device_type SEGA_315_5015;
+extern const device_type SEGA_315_5133;
+extern const device_type SEGA_315_5014;
+extern const device_type SEGA_315_5013;
+extern const device_type SEGA_315_5061;
+extern const device_type SEGA_315_5018;
+extern const device_type SEGA_315_5010;
+extern const device_type SEGA_CPU_PBACTIO4;
+extern const device_type SEGA_315_5028;
+extern const device_type SEGA_315_5084;
+
+
+#endif /// __SEGACRPT_Z80__
+
diff --git a/src/mame/machine/segaic16.cpp b/src/mame/machine/segaic16.cpp
index 3cb068c70e6..611d8568a96 100644
--- a/src/mame/machine/segaic16.cpp
+++ b/src/mame/machine/segaic16.cpp
@@ -200,8 +200,8 @@ WRITE16_MEMBER( sega_16bit_common_base::philko_paletteram_w )
sega_315_5195_mapper_device::sega_315_5195_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SEGA_315_5195_MEM_MAPPER, "Sega 315-5195 Memory Mapper", tag, owner, clock, "sega_315_5195", __FILE__),
- m_cputag(nullptr),
- m_cpu(nullptr),
+ m_cpu(*this),
+ m_cpuregion(*this),
m_space(nullptr),
m_decrypted_space(nullptr),
m_curregion(0)
@@ -217,7 +217,8 @@ sega_315_5195_mapper_device::sega_315_5195_mapper_device(const machine_config &m
void sega_315_5195_mapper_device::static_set_cputag(device_t &device, const char *cpu)
{
sega_315_5195_mapper_device &mapper = downcast<sega_315_5195_mapper_device &>(device);
- mapper.m_cputag = cpu;
+ mapper.m_cpu.set_tag(cpu);
+ mapper.m_cpuregion.set_tag(cpu);
}
@@ -392,7 +393,7 @@ void sega_315_5195_mapper_device::map_as_rom(UINT32 offset, UINT32 length, offs_
}
// don't map if the start is past the end of the ROM region
- offs_t romsize = m_cpu->region()->bytes();
+ offs_t romsize = m_cpuregion->bytes();
if (rgnoffset < romsize)
{
// clamp the end to the ROM size
@@ -408,7 +409,7 @@ void sega_315_5195_mapper_device::map_as_rom(UINT32 offset, UINT32 length, offs_
// configure the bank
memory_bank *bank = owner()->membank(bank_name);
memory_bank *decrypted_bank = owner()->membank(decrypted_bank_name);
- UINT8 *memptr = m_cpu->region()->base() + rgnoffset;
+ UINT8 *memptr = m_cpuregion->base() + rgnoffset;
bank->set_base(memptr);
// remember this bank, and decrypt if necessary
@@ -527,19 +528,14 @@ void sega_315_5195_mapper_device::device_start()
m_sound_read.bind_relative_to(*owner());
m_sound_write.bind_relative_to(*owner());
- // find our CPU
- m_cpu = siblingdevice<m68000_device>(m_cputag);
- if (m_cpu == nullptr)
- throw emu_fatalerror("Unable to find sibling device '%s'", m_cputag);
-
// if we are mapping an FD1089, tell all the banks
- fd1089_base_device *fd1089 = dynamic_cast<fd1089_base_device *>(m_cpu);
+ fd1089_base_device *fd1089 = dynamic_cast<fd1089_base_device *>(m_cpu.target());
if (fd1089 != nullptr)
for (auto & elem : m_banks)
elem.set_decrypt(fd1089);
// if we are mapping an FD1094, register for state change notifications and tell all the banks
- fd1094_device *fd1094 = dynamic_cast<fd1094_device *>(m_cpu);
+ fd1094_device *fd1094 = dynamic_cast<fd1094_device *>(m_cpu.target());
if (fd1094 != nullptr)
{
fd1094->notify_state_change(fd1094_device::state_change_delegate(FUNC(sega_315_5195_mapper_device::fd1094_state_change), this));
@@ -550,7 +546,7 @@ void sega_315_5195_mapper_device::device_start()
// find the address space that is to be mapped
m_space = &m_cpu->space(AS_PROGRAM);
if (m_space == nullptr)
- throw emu_fatalerror("Unable to find program address space on device '%s'", m_cputag);
+ throw emu_fatalerror("Unable to find program address space on device '%s'", m_cpu.finder_tag());
m_decrypted_space = m_cpu->has_space(AS_DECRYPTED_OPCODES) ? &m_cpu->space(AS_DECRYPTED_OPCODES) : nullptr;
diff --git a/src/mame/machine/segaic16.h b/src/mame/machine/segaic16.h
index 5b4b4812bd4..b647d1012a0 100644
--- a/src/mame/machine/segaic16.h
+++ b/src/mame/machine/segaic16.h
@@ -22,7 +22,7 @@
#define MCFG_SEGA_315_5195_MAPPER_ADD(_tag, _cputag, _class, _mapper, _read, _write) \
MCFG_DEVICE_ADD(_tag, SEGA_315_5195_MEM_MAPPER, 0) \
- sega_315_5195_mapper_device::static_set_cputag(*device, _cputag); \
+ sega_315_5195_mapper_device::static_set_cputag(*device, "^" _cputag); \
sega_315_5195_mapper_device::static_set_mapper(*device, sega_315_5195_mapper_device::mapper_delegate(&_class::_mapper, #_class "::" #_mapper, NULL, (_class *)0)); \
sega_315_5195_mapper_device::static_set_sound_readwrite(*device, sega_315_5195_mapper_device::sound_read_delegate(&_class::_read, #_class "::" #_read, NULL, (_class *)0), sega_315_5195_mapper_device::sound_write_delegate(&_class::_write, #_class "::" #_write, NULL, (_class *)0));
@@ -162,13 +162,13 @@ private:
void fd1094_state_change(UINT8 state);
// configuration
- const char * m_cputag;
+ required_device<m68000_device> m_cpu;
+ required_memory_region m_cpuregion;
mapper_delegate m_mapper;
sound_read_delegate m_sound_read;
sound_write_delegate m_sound_write;
// internal state
- m68000_device * m_cpu;
address_space * m_space;
address_space * m_decrypted_space;
UINT8 m_regs[0x20];
diff --git a/src/mame/machine/st0016.cpp b/src/mame/machine/st0016.cpp
index 598a94ebddc..c663acae492 100644
--- a/src/mame/machine/st0016.cpp
+++ b/src/mame/machine/st0016.cpp
@@ -31,6 +31,7 @@ ADDRESS_MAP_END
st0016_cpu_device::st0016_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: z80_device(mconfig, ST0016_CPU, "ST0016", tag, owner, clock, "st0016_cpu", __FILE__),
+ device_gfx_interface(mconfig, *this, nullptr, "palette"),
st0016_game(-1),
st0016_spr_bank(0),
st0016_spr2_bank(0),
@@ -43,11 +44,7 @@ st0016_cpu_device::st0016_cpu_device(const machine_config &mconfig, const char *
m_io_space_config("io", ENDIANNESS_LITTLE, 8, 16, 0, ADDRESS_MAP_NAME(st0016_cpu_internal_io_map)),
m_space_config("regs", ENDIANNESS_LITTLE, 8, 16, 0, ADDRESS_MAP_NAME(st0016_cpu_internal_map)),
-
- m_screen(*this, ":screen"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette")
-
+ m_screen(*this, ":screen")
{
for (auto & elem : st0016_vregs)
elem = 0;
@@ -109,14 +106,10 @@ READ8_MEMBER(st0016_cpu_device::soundram_read)
return m_charram[offset];
}
-static GFXDECODE_START( st0016 )
-GFXDECODE_END
-
/* CPU interface */
static MACHINE_CONFIG_FRAGMENT( st0016_cpu )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", st0016)
MCFG_PALETTE_ADD("palette", 16*16*4+1)
MCFG_DEVICE_ADD("stsnd", ST0016, 0)
@@ -218,8 +211,8 @@ WRITE8_MEMBER(st0016_cpu_device::st0016_palette_ram_w)
st0016_paletteram[ST0016_PAL_BANK_SIZE*st0016_pal_bank+offset]=data;
val=st0016_paletteram[color*2]+(st0016_paletteram[color*2+1]<<8);
if(!color)
- m_palette->set_pen_color(UNUSED_PEN,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10)); /* same as color 0 - bg ? */
- m_palette->set_pen_color(color,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10));
+ palette().set_pen_color(UNUSED_PEN,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10)); /* same as color 0 - bg ? */
+ palette().set_pen_color(color,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10));
}
READ8_MEMBER(st0016_cpu_device::st0016_character_ram_r)
@@ -230,7 +223,7 @@ READ8_MEMBER(st0016_cpu_device::st0016_character_ram_r)
WRITE8_MEMBER(st0016_cpu_device::st0016_character_ram_w)
{
m_charram[ST0016_CHAR_BANK_SIZE*st0016_char_bank+offset]=data;
- m_gfxdecode->gfx(st0016_ramgfx)->mark_dirty(st0016_char_bank);
+ gfx(st0016_ramgfx)->mark_dirty(st0016_char_bank);
}
READ8_MEMBER(st0016_cpu_device::st0016_vregs_r)
@@ -383,7 +376,7 @@ void st0016_cpu_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &clip
*/
- gfx_element *gfx = m_gfxdecode->gfx(st0016_ramgfx);
+ gfx_element *gfx = this->gfx(st0016_ramgfx);
int i, j, lx, ly, x, y, code, offset, length, sx, sy, color, flipx, flipy, scrollx, scrolly/*,plx,ply*/;
@@ -587,13 +580,13 @@ void st0016_cpu_device::startup()
/* find first empty slot to decode gfx */
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (m_gfxdecode->gfx(gfx_index) == nullptr)
+ if (gfx(gfx_index) == nullptr)
break;
assert(gfx_index != MAX_GFX_ELEMENTS);
/* create the char set (gfx will then be updated dynamically from RAM) */
- m_gfxdecode->set_gfx(gfx_index, std::make_unique<gfx_element>(m_palette, charlayout, m_charram.get(), 0, 0x40, 0));
+ set_gfx(gfx_index, std::make_unique<gfx_element>(palette(), charlayout, m_charram.get(), 0, 0x40, 0));
st0016_ramgfx = gfx_index;
spr_dx=0;
@@ -607,7 +600,7 @@ void st0016_cpu_device::startup()
void st0016_cpu_device::draw_bgmap(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority)
{
- gfx_element *gfx = m_gfxdecode->gfx(st0016_ramgfx);
+ gfx_element *gfx = this->gfx(st0016_ramgfx);
int j;
//for(j=0x40-8;j>=0;j-=8)
for (j = 0; j < 0x40; j += 8)
diff --git a/src/mame/machine/st0016.h b/src/mame/machine/st0016.h
index 6401ddc5c19..447ce7e4d3c 100644
--- a/src/mame/machine/st0016.h
+++ b/src/mame/machine/st0016.h
@@ -34,7 +34,7 @@ extern UINT8 macs_cart_slot;
-class st0016_cpu_device : public z80_device
+class st0016_cpu_device : public z80_device, public device_gfx_interface
{
public:
st0016_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
@@ -97,13 +97,6 @@ protected:
}
};
required_device<screen_device> m_screen;
- required_device<gfxdecode_device> m_gfxdecode;
-
-public: // speglsht needs to access this for mixing
- required_device<palette_device> m_palette;
-
-private:
-
};
diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp
index 132a46e75bf..96d2a688326 100644
--- a/src/mame/machine/xbox.cpp
+++ b/src/mame/machine/xbox.cpp
@@ -492,7 +492,7 @@ static void geforce_pci_w(device_t *busdevice, device_t *device, int function, i
}
/*
- * ohci usb controller (placeholder for now)
+ * ohci usb controller
*/
#ifdef LOG_OHCI
@@ -552,30 +552,36 @@ WRITE32_MEMBER(xbox_base_state::usbctrl_w)
logerror("usb controller 0 register %s write %08X\n", usbregnames[offset], data);
#endif
if (offset == HcRhStatus) {
- if (data & 0x80000000)
- ohcist.hc_regs[HcRhStatus] &= ~0x8000;
- if (data & 0x00020000)
- ohcist.hc_regs[HcRhStatus] &= ~0x0002;
- if (data & 0x00010000)
- ohcist.hc_regs[HcRhStatus] &= ~0x0001;
+ if (data & CRWE)
+ ohcist.hc_regs[HcRhStatus] &= ~DRWE;
+ if (data & OCIC)
+ ohcist.hc_regs[HcRhStatus] &= ~OCI;
+ if (data & LPSC)
+ ohcist.hc_regs[HcRhStatus] &= ~LPS;
return;
}
if (offset == HcControl) {
int hcfs;
- hcfs = (data >> 6) & 3;
+ hcfs = (data >> 6) & 3; // HostControllerFunctionalState
if (hcfs == UsbOperational) {
ohcist.timer->enable();
ohcist.timer->adjust(attotime::from_msec(1), 0, attotime::from_msec(1));
ohcist.writebackdonehadcounter = 7;
+ // need to load the FrameRemaining field of HcFmRemaining with the value of the FrameInterval field in HcFmInterval
}
else
ohcist.timer->enable(false);
- ohcist.state = hcfs;
ohcist.interruptbulkratio = (data & 3) + 1;
+ if ((hcfs != UsbReset) && (ohcist.state == UsbReset))
+ {
+ ohcist.hc_regs[HcInterruptStatus] |= RootHubStatusChange;
+ usb_ohci_interrupts();
+ }
+ ohcist.state = hcfs;
}
if (offset == HcCommandStatus) {
- if (data & 1)
+ if (data & 1) // HostControllerReset
ohcist.hc_regs[HcControl] |= 3 << 6;
ohcist.hc_regs[HcCommandStatus] |= data;
return;
@@ -597,24 +603,69 @@ WRITE32_MEMBER(xbox_base_state::usbctrl_w)
}
if (offset >= HcRhPortStatus1) {
int port = offset - HcRhPortStatus1 + 1; // port 0 not used
- // bit 0 ClearPortEnable: 1 clears PortEnableStatus
- // bit 1 SetPortEnable: 1 sets PortEnableStatus
- // bit 2 SetPortSuspend: 1 sets PortSuspendStatus
- // bit 3 ClearSuspendStatus: 1 clears PortSuspendStatus
- // bit 4 SetPortReset: 1 sets PortResetStatus
- if (data & 0x10) {
- ohcist.hc_regs[offset] |= 0x10;
+ // bit 0 R:CurrentConnectStatus W:ClearPortEnable: 1 clears PortEnableStatus
+ if (data & CCS) {
+ ohcist.hc_regs[offset] &= ~PES;
+ ohcist.address[ohcist.ports[port].address].port = -1;
+ }
+ // bit 1 R:PortEnableStatus W:SetPortEnable: 1 sets PortEnableStatus
+ if (data & PES) {
+ ohcist.hc_regs[offset] |= PES;
+ // the port is enabled, so the device connected to it can communicate on the bus
+ ohcist.address[ohcist.ports[port].address].function = ohcist.ports[port].function;
+ ohcist.address[ohcist.ports[port].address].port = port;
+ }
+ // bit 2 R:PortSuspendStatus W:SetPortSuspend: 1 sets PortSuspendStatus
+ if (data & PSS) {
+ ohcist.hc_regs[offset] |= PSS;
+ }
+ // bit 3 R:PortOverCurrentIndicator W:ClearSuspendStatus: 1 clears PortSuspendStatus
+ if (data & POCI) {
+ ohcist.hc_regs[offset] &= ~PSS;
+ }
+ // bit 4 R: PortResetStatus W:SetPortReset: 1 sets PortResetStatus
+ if (data & PRS) {
+ ohcist.hc_regs[offset] |= PRS;
+ if (ohcist.ports[port].address >= 0)
+ ohcist.address[ohcist.ports[port].address].port = -1;
+ ohcist.ports[port].address = 0;
+ if (ohcist.hc_regs[offset] & PES)
+ {
+ ohcist.address[0].function = ohcist.ports[port].function;
+ ohcist.address[0].port = port;
+ }
ohcist.ports[port].function->execute_reset();
// after 10ms set PortResetStatusChange and clear PortResetStatus and set PortEnableStatus
ohcist.ports[port].delay = 10;
}
- // bit 8 SetPortPower: 1 sets PortPowerStatus
- // bit 9 ClearPortPower: 1 clears PortPowerStatus
- // bit 16 1 clears ConnectStatusChange
- // bit 17 1 clears PortEnableStatusChange
- // bit 18 1 clears PortSuspendStatusChange
- // bit 19 1 clears PortOverCurrentIndicatorChange
- // bit 20 1 clears PortResetStatusChange
+ // bit 8 R:PortPowerStatus W:SetPortPower: 1 sets PortPowerStatus
+ if (data & PPS) {
+ ohcist.hc_regs[offset] |= PPS;
+ }
+ // bit 9 R:LowSpeedDeviceAttached W:ClearPortPower: 1 clears PortPowerStatus
+ if (data & LSDA) {
+ ohcist.hc_regs[offset] &= ~PPS;
+ }
+ // bit 16 R:ConnectStatusChange W: 1 clears ConnectStatusChange
+ if (data & CSC) {
+ ohcist.hc_regs[offset] &= ~CSC;
+ }
+ // bit 17 R:PortEnableStatusChange W: 1 clears PortEnableStatusChange
+ if (data & PESC) {
+ ohcist.hc_regs[offset] &= ~PESC;
+ }
+ // bit 18 R:PortSuspendStatusChange W: 1 clears PortSuspendStatusChange
+ if (data & PSSC) {
+ ohcist.hc_regs[offset] &= ~PSSC;
+ }
+ // bit 19 R:PortOverCurrentIndicatorChange W: 1 clears PortOverCurrentIndicatorChange
+ if (data & POCIC) {
+ ohcist.hc_regs[offset] &= ~POCIC;
+ }
+ // bit 20 R:PortResetStatusChange W: 1 clears PortResetStatusChange
+ if (data & PRSC) {
+ ohcist.hc_regs[offset] &= ~PRSC;
+ }
if (ohcist.hc_regs[offset] != old)
ohcist.hc_regs[HcInterruptStatus] |= RootHubStatusChange;
usb_ohci_interrupts();
@@ -644,7 +695,9 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
if (ohcist.ports[p].delay > 0) {
ohcist.ports[p].delay--;
if (ohcist.ports[p].delay == 0) {
- ohcist.hc_regs[HcRhPortStatus1 + p - 1] = (ohcist.hc_regs[HcRhPortStatus1 + p - 1] & ~(1 << 4)) | (1 << 20) | (1 << 1); // bit 1 PortEnableStatus
+ ohcist.hc_regs[HcRhPortStatus1 + p - 1] = (ohcist.hc_regs[HcRhPortStatus1 + p - 1] & ~PRS) | PRSC | PES;
+ ohcist.address[ohcist.ports[p].address].function = ohcist.ports[p].function;
+ ohcist.address[ohcist.ports[p].address].port = p;
changed = 1;
}
}
@@ -654,9 +707,9 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
{
// select list, do transfer
if (list == 0) {
- if (ohcist.hc_regs[HcControl] & (1 << 2)) {
+ if (ohcist.hc_regs[HcControl] & PLE) {
// periodic list
- if (ohcist.hc_regs[HcControl] & (1 << 3)) {
+ if (ohcist.hc_regs[HcControl] & IE) {
// isochronous list
}
}
@@ -665,7 +718,7 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
if (list == 1) {
// control list
// check if control list active
- if (ohcist.hc_regs[HcControl] & (1 << 4)) {
+ if (ohcist.hc_regs[HcControl] & CLE) {
cont = true;
while (cont == true) {
// if current endpoint descriptor is not 0 use it, otherwise ...
@@ -736,8 +789,8 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
}
}
// should check for time available
- // execute transaction
- done=ohcist.ports[1].function->execute_transfer(ohcist.endpoint_descriptor.fa, ohcist.endpoint_descriptor.en, pid, ohcist.buffer, mps);
+ // execute transaction ohcist.endpoint_descriptor.fa
+ done = ohcist.address[ohcist.endpoint_descriptor.fa].function->execute_transfer(ohcist.endpoint_descriptor.en, pid, ohcist.buffer, mps);
// if receiving ...
if (pid == InPid) {
// ... store done bytes
@@ -751,7 +804,7 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
// status writeback (CompletionCode field, DataToggleControl field, CurrentBufferPointer field, ErrorCount field)
ohcist.transfer_descriptor.cc = NoError;
ohcist.transfer_descriptor.t = (ohcist.transfer_descriptor.t ^ 1) | 2;
- // if all data is transferred (or there was no data to transfer) cbp must be 0 ?
+ // if all data is transferred (or there was no data to transfer) cbp must be 0, otherwise it must be updated
if ((done == remain) || (pid == SetupPid))
b = 0;
ohcist.transfer_descriptor.cbp = b;
@@ -793,7 +846,7 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
// one bulk every n control transfers
ohcist.interruptbulkratio--;
if (ohcist.interruptbulkratio <= 0) {
- ohcist.interruptbulkratio = (ohcist.hc_regs[HcControl] & 3) + 1;
+ ohcist.interruptbulkratio = (ohcist.hc_regs[HcControl] & 3) + 1; // ControlBulkServiceRatio
cont = false;
}
}
@@ -803,7 +856,7 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
if (list == 2) {
// bulk list
// check if bulk list active
- if (ohcist.hc_regs[HcControl] & (1 << 5)) {
+ if (ohcist.hc_regs[HcControl] & BLE) {
// if current endpoint descriptor is not 0 use it, otherwise ...
if (ohcist.hc_regs[HcBulkCurrentED] == 0) {
// ... check the filled bit ...
@@ -868,8 +921,8 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
}
}
// should check for time available
- // execute transaction
- done = ohcist.ports[1].function->execute_transfer(ohcist.endpoint_descriptor.fa, ohcist.endpoint_descriptor.en, pid, ohcist.buffer, mps);
+ // execute transaction ohcist.endpoint_descriptor.fa
+ done = ohcist.address[ohcist.endpoint_descriptor.fa].function->execute_transfer(ohcist.endpoint_descriptor.en, pid, ohcist.buffer, mps);
// if receiving ...
if (pid == InPid) {
// ... store done bytes
@@ -883,7 +936,7 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
// status writeback (CompletionCode field, DataToggleControl field, CurrentBufferPointer field, ErrorCount field)
ohcist.transfer_descriptor.cc = NoError;
ohcist.transfer_descriptor.t = (ohcist.transfer_descriptor.t ^ 1) | 2;
- // if all data is transferred (or there was no data to transfer) cbp must be 0 ?
+ // if all data is transferred (or there was no data to transfer) cbp must be 0, otherwise it must be updated
if (done == remain)
b = 0;
ohcist.transfer_descriptor.cbp = b;
@@ -925,9 +978,9 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
}
}
// go to the next list
- if ((ohcist.hc_regs[HcCommandStatus] & (1 << 1)) && (ohcist.hc_regs[HcControl] & (1 << 4)))
+ if ((ohcist.hc_regs[HcCommandStatus] & (1 << 1)) && (ohcist.hc_regs[HcControl] & CLE))
list = 1; // go to control list if enabled and filled
- else if ((ohcist.hc_regs[HcCommandStatus] & (1 << 2)) && (ohcist.hc_regs[HcControl] & (1 << 5)))
+ else if ((ohcist.hc_regs[HcCommandStatus] & (1 << 2)) && (ohcist.hc_regs[HcControl] & BLE))
list = 2; // otherwise stai in bulk list if enabled and filled
else
list = 0; // if no control or bulk lists, go to periodic list
@@ -960,12 +1013,19 @@ void xbox_base_state::usb_ohci_plug(int port, ohci_function_device *function)
{
if ((port > 0) && (port <= 4)) {
ohcist.ports[port].function = function;
- ohcist.hc_regs[HcRhPortStatus1+port-1] = 1;
+ ohcist.ports[port].address = -1;
+ ohcist.hc_regs[HcRhPortStatus1+port-1] = CCS | CSC;
+ if (ohcist.state != UsbReset)
+ {
+ ohcist.hc_regs[HcInterruptStatus] |= RootHubStatusChange;
+ usb_ohci_interrupts();
+ }
}
}
-ohci_function_device::ohci_function_device(running_machine &machine)
+ohci_function_device::ohci_function_device(running_machine &machine, xbox_base_state *usb_bus_manager)
{
+ busmanager = usb_bus_manager;
state = DefaultState;
descriptors = auto_alloc_array(machine, UINT8, 1024);
descriptors_pos = 0;
@@ -1244,7 +1304,7 @@ void ohci_function_device::execute_reset()
newaddress = 0;
}
-int ohci_function_device::execute_transfer(int address, int endpoint, int pid, UINT8 *buffer, int size)
+int ohci_function_device::execute_transfer(int endpoint, int pid, UINT8 *buffer, int size)
{
int descriptortype, descriptorindex;
@@ -1355,6 +1415,7 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U
if ((endpoint == 0) && (settingaddress == true))
{
// set of address is active at end of status stage
+ busmanager->usb_ohci_device_address_changed(address, newaddress);
address = newaddress;
settingaddress = false;
state = AddressState;
@@ -1421,8 +1482,8 @@ const USBStandardInterfaceDescriptor ohci_game_controller_device::intdesc = { 9,
const USBStandardEndpointDescriptor ohci_game_controller_device::enddesc82 = { 7,5,0x82,3,0x20,4 };
const USBStandardEndpointDescriptor ohci_game_controller_device::enddesc02 = { 7,5,0x02,3,0x20,4 };
-ohci_game_controller_device::ohci_game_controller_device(running_machine &machine) :
- ohci_function_device(machine)
+ohci_game_controller_device::ohci_game_controller_device(running_machine &machine, xbox_base_state *usb_bus_manager) :
+ ohci_function_device(machine, usb_bus_manager)
{
add_device_descriptor(devdesc);
add_configuration_descriptor(condesc);
@@ -1434,7 +1495,7 @@ ohci_game_controller_device::ohci_game_controller_device(running_machine &machin
int ohci_game_controller_device::handle_nonstandard_request(int endpoint, USBSetupPacket *setup)
{
// >=8 ==42 !=0 !=0 1,3 2<20 <=20
- const UINT8 mytestdata[16] = { 0x10,0x42 ,0x32,0x43,1 ,0x65,0x18,0x20,0x98,0xa9,0xba,0xcb,0xdc,0xed,0xfe };
+ static const UINT8 mytestdata[16] = { 0x10,0x42 ,0x32,0x43,1 ,0x65,0x18,0x20,0x98,0xa9,0xba,0xcb,0xdc,0xed,0xfe };
if (endpoint != 0)
return -1;
@@ -1572,6 +1633,13 @@ void xbox_base_state::usb_ohci_writeback_isochronous_transfer_descriptor(UINT32
ohcist.space->write_dword(address + 28, w);
}
+void xbox_base_state::usb_ohci_device_address_changed(int old_address, int new_address)
+{
+ ohcist.address[new_address].function = ohcist.address[old_address].function;
+ ohcist.address[new_address].port = ohcist.address[old_address].port;
+ ohcist.address[old_address].port = -1;
+}
+
/*
* Audio
*/
@@ -2105,7 +2173,7 @@ ADDRESS_MAP_END
void xbox_base_state::machine_start()
{
- //ohci_game_controller_device *usb_device;
+ ohci_game_controller_device *usb_device;
nvidia_nv2a = std::make_unique<nv2a_renderer>(machine());
memset(pic16lc_buffer, 0, sizeof(pic16lc_buffer));
@@ -2140,13 +2208,19 @@ void xbox_base_state::machine_start()
ohcist.hc_regs[HcFmInterval] = 0x2edf;
ohcist.hc_regs[HcLSThreshold] = 0x628;
ohcist.hc_regs[HcRhDescriptorA] = 4;
+ ohcist.hc_regs[HcControl] = UsbReset << 6;
+ ohcist.state = UsbReset;
ohcist.interruptbulkratio = 1;
ohcist.writebackdonehadcounter = 7;
+ for (int n = 0; n <= 4; n++)
+ ohcist.ports[n].address = -1;
+ for (int n = 0; n < 256; n++)
+ ohcist.address[n].port = -1;
ohcist.space = &m_maincpu->space();
ohcist.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(xbox_base_state::usb_ohci_timer), this), (void *)"USB OHCI Timer");
ohcist.timer->enable(false);
- //usb_device = new ohci_game_controller_device(machine());
- //usb_ohci_plug(3, usb_device); // connect top root hub port 3, chihiro needs to use 1 and 2
+ usb_device = new ohci_game_controller_device(machine(), this);
+ usb_ohci_plug(3, usb_device); // connect to root hub port 3, chihiro needs to use 1 and 2
// super-io
memset(&superiost, 0, sizeof(superiost));
superiost.configuration_mode = false;
diff --git a/src/mame/machine/zs01.cpp b/src/mame/machine/zs01.cpp
index 613a3cdcc1a..2816d865ee0 100644
--- a/src/mame/machine/zs01.cpp
+++ b/src/mame/machine/zs01.cpp
@@ -32,6 +32,7 @@ const device_type ZS01 = &device_creator<zs01_device>;
zs01_device::zs01_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
: device_t( mconfig, ZS01, "Konami ZS01 PIC", tag, owner, clock, "zs01", __FILE__ ),
device_nvram_interface(mconfig, *this),
+ m_region(*this, DEVICE_SELF),
m_cs( 0 ),
m_rst( 0 ),
m_scl( 0 ),
@@ -581,7 +582,7 @@ void zs01_device::nvram_default()
int expected_bytes = sizeof( m_response_to_reset ) + sizeof( m_command_key ) + sizeof( m_data_key ) + sizeof( m_data );
- if( !m_region )
+ if (!m_region.found())
{
logerror( "zs01(%s) region not found\n", tag() );
}
diff --git a/src/mame/machine/zs01.h b/src/mame/machine/zs01.h
index 2606cb5341e..b7266a20cbd 100644
--- a/src/mame/machine/zs01.h
+++ b/src/mame/machine/zs01.h
@@ -74,6 +74,7 @@ private:
// internal state
const char *m_ds2401_tag;
+ optional_memory_region m_region;
int m_cs;
int m_rst;
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index c520531793c..6fe4aef0f18 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -1209,6 +1209,7 @@ laser128 // ??? 1987 Laser 128
mprof3 // Microprofessor III
prav8c // Pravetz 8C
tk3000 // Microdigital TK3000
+spectred
@source:apple2gs.cpp
apple2gs // Aug 1989 Apple IIgs ROM03
@@ -2265,6 +2266,7 @@ bbcbc // 1985 BBC Bridge Companion
bbusters // A9003 'BB' (c) 1989
bbustersu // A9003 'BB' (c) 1989
bbustersua // A9003 'BB' (c) 1989
+bbustersj //
mechatt // A8002 'MA' (c) 1989
mechattj // A8002 'MA' (c) 1989
mechattu // A8002 'MA' (c) 1989
@@ -11804,6 +11806,7 @@ cscg // * German
cscsp // * Spanish
fexcel //
fexcelv //
+fscc9 //
fscc12 //
@source:fidel68k.cpp
@@ -12290,6 +12293,7 @@ monsterz // (c) 1982 Nihon (Arcade TV Game List - P.102,
moonal2 // [1980] Nichibutsu
moonal2b // [1980] Nichibutsu
moonaln // [Nichibutsu] (Karateco license) or hack
+kamikazp // bootleg (Potomac Games)
mooncmw // bootleg
mooncptc // bootleg (Petaco S.A.)
mooncreg // bootleg
@@ -13688,8 +13692,11 @@ maniac // Ideal
@source:hh_sm510.cpp
gnwmndon // Nintendo
kcontra // Konami
+kgradius // Konami
+kloneran // Konami
ktmnt // Konami
ktopgun // Konami
+nupogodi //
@source:hh_tms1k.cpp
amaztron // Coleco
@@ -13790,6 +13797,7 @@ sgnascar // 2000.09 Nascar Arcade
@source:himesiki.cpp
himesiki // (c) 1989 Hi-Soft
androidp // (c) 198? Nasco
+androidpo // (c) 198? Nasco
@source:hitme.cpp
barricad // (c) 1976 Ramtek
@@ -15944,6 +15952,9 @@ jubileep //
@source:juicebox.cpp
juicebox //
+@source:jungleyo.cpp
+jungleyo
+
@source:junior.cpp
junior //
@@ -16858,6 +16869,7 @@ leaguemn // (c) 1993 Irem (Japan)
lethalth // (c) 1991 Irem (World)
majtitl2 // (c) 1992 Irem (World)
majtitl2a //
+majtitl2b //
majtitl2j // (c) 1992 Irem (Japan)
mysticri // (c) 1992 Irem (World)
mysticrib // bootleg?
@@ -16951,6 +16963,7 @@ mcolors // 1999 unknown
musicsrt // (c) 1995 ABM Games
sgsafari // (c) 1996 New Impeuropex Corp.
suprpool // (c) 1997 ABM Games
+lunaprk // (c) 1998 ABM Games
@source:magicard.cpp
hotslots // (c) 2002 Impera
@@ -27052,6 +27065,7 @@ mtlchampu // GX234 (c) 1993 (US)
mtlchampu1 // GX234 (c) 1993 (US)
mystwarr // GX128 (c) 1993 (World)
mystwarra // GX128 (c) 1993 (Asia)
+mystwarraa // GX128 (c) 1993 (Asia)
mystwarrj // GX128 (c) 1993 (Japan)
mystwarru // GX128 (c) 1993 (US)
viostorm // GX168 (c) 1993 (Europe)
@@ -28016,6 +28030,7 @@ garoup // 0253 (c) 1999 SNK
ghostlop // 0228 GhostLop (prototype) 1996? Data East
goalx3 // 0209 (c) 1995 Visco
gowcaizr // 0094 (c) 1995 Technos
+unkneo // prototype
gpilots // 0020 (c) 1991 SNK
gpilotsh // 0020 (c) 1991 SNK
gururin // 0067 (c) 1994 Face
@@ -28303,6 +28318,7 @@ rdaction // UPL-87003?(c) 1987 + World Games license
robokid // UPL-88013 (c) 1988
robokidj // UPL-88013 (c) 1988
robokidj2 // UPL-88013 (c) 1988
+robokidj3 //
@source:ninjaw.cpp
darius2 // C07 (c) 1989 Taito Corporation (Japan)
@@ -28872,6 +28888,7 @@ sicpc1605 //
ssam88s //
sx16 // Sanyo SX-16
zdsupers //
+ncrpc4i // NCR PC4i
@source:pc100.cpp
pc100 //
@@ -29932,6 +29949,7 @@ pc_moglf // (c) 1991 Nintendo
pc_mtoid // (c) 1986 Nintendo
pc_ngai2 // (c) 1990 Tecmo (Nintendo of America license)
pc_ngai3 // (c) 1991 Tecmo (Nintendo of America license)
+pc_ttoon //
pc_ngaid // (c) 1989 Tecmo (Nintendo of America license)
pc_pinbt // (c) 1988 Rare (Nintendo of America license)
pc_pwbld // (c) 1991 Taito (Nintendo of America license)
@@ -30695,6 +30713,7 @@ raidendxa2 // (c) 1994 Seibu Kaihatsu + Metrotainment licen
raidendxch //
raidendxg // (c) 1994 Seibu Kaihatsu + Tuning license
raidendxj // (c) 1994 Seibu Kaihatsu
+raidendxja // (c) 1994 Seibu Kaihatsu
raidendxk // (c) 1994 Seibu Kaihatsu
raidendxnl // (c) 1994 Seibu Kaihatsu
raidendxu // (c) 1994 Seibu Kaihatsu + Fabtek license
@@ -32779,6 +32798,7 @@ neraidou // Bootleg?
skylncr // (c) 1995 Bordun International
sstar97 // (c) 199? Bordun International
bdream97 // Bootleg?
+sonikfig // Z Games
@source:skyraid.cpp
skyraid // 009709 1978/03 [6502]
@@ -33848,6 +33868,7 @@ wboy4 // 834-5984 (c) 1986 + Escape license (S1)
wboy5 // 834-5984 (c) 1986 + Escape license (S1)
wboyo // 834-5984 (c) 1986 + Escape license (S1)
wboysys2 // 834-5984 (c) 1986 + Escape license (S1)
+wboysys2a //
wboyu // 834-5753 (? maybe a conversion) (c) 1986 + Escape license (S1)
wboyub // bootleg of wboyu
wmatch // (c) 1984 (S1)
@@ -33994,7 +34015,8 @@ hthero // 1991.03 C80 (c) 1990 Taito Corporation (Japan
koshien // 1991.04 C81 (c) 1990 Taito Corporation (Japan)
liquidk // 1990.?? C49 (c) 1990 Taito Corporation Japan (World)
liquidku // 1990.?? C49 (c) 1990 Taito America Corporation (US)
-majest12 // 1990.11 C64 (c) 1990 Taito Corporation (Japan)
+majest12j // 1990.11 C64 (c) 1990 Taito Corporation (Japan)
+majest12u // 1990.11 C64 (c) 1990 Taito America Corporation (US)
megablst // 1989.?? C11 (c) 1989 Taito Corporation Japan (World)
megablstj // 1989.11 C11 (c) 1989 Taito Corporation (Japan)
megablstu // 1989.?? C11 (c) 1989 Taito America Corporation (US)
@@ -35802,7 +35824,8 @@ cstlevna // (c) 1987 Konami licensed to Nintendo
drmario // (c) 1990 Nintendo
duckhunt // (c) 1985 Nintendo
excitebk // (c) 1984 Nintendo
-excitebka // (c) 1984 Nintendo
+excitebko // (c) 1984 Nintendo
+excitebkj // (c) 1984 Nintendo
goonies // (c) 1986 Konami
hogalley // (c) 1985 Nintendo
iceclimb // (c) 1984 Nintendo
diff --git a/src/mame/nl.lst b/src/mame/nl.lst
index 67723374e4b..0b36b3e4e6f 100644
--- a/src/mame/nl.lst
+++ b/src/mame/nl.lst
@@ -29,3 +29,28 @@ pong // (c) 1972 Atari
pongd // (c) 1975 Atari
pongf // (c) 1972 Atari
breakout // (c) 1976 Atari
+
+@source:m62.cpp
+battroad // (c) 1984
+horizon // (c) 1985
+kidniki // (c) 1986 + Data East USA license
+kidnikiu // (c) 1986 + Data East USA license
+kungfub // bootleg
+kungfub2 // bootleg
+kungfum // (c) 1984
+kungfumd // (c) 1984 + Data East license
+ldrun // (c) 1984 licensed from Broderbund
+ldrun2 // (c) 1984 licensed from Broderbund
+ldrun3 // (c) 1985 licensed from Broderbund
+ldrun3j // (c) 1985 licensed from Broderbund
+ldrun4 // (c) 1986 licensed from Broderbund
+ldruna // (c) 1984 licensed from Broderbund
+lithero // bootleg
+lotlot // (c) 1985 licensed from Tokuma Shoten
+spartanx // (c) 1984 (Japan)
+spelunk2 // (c) 1986 licensed from Broderbund
+spelunkr // (c) 1985 licensed from Broderbund
+spelunkrj // (c) 1985 licensed from Broderbund
+yanchamr // (c) 1986 (Japan)
+youjyudn // (c) 1986 (Japan)
+
diff --git a/src/mame/video/733_asr.cpp b/src/mame/video/733_asr.cpp
index e9c446301a2..0194a1316fc 100644
--- a/src/mame/video/733_asr.cpp
+++ b/src/mame/video/733_asr.cpp
@@ -82,24 +82,13 @@ const device_type ASR733 = &device_creator<asr733_device>;
asr733_device::asr733_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ASR733, "733 ASR", tag, owner, clock, "asr733", __FILE__),
- m_palette(*this, "palette"),
- m_gfxdecode(*this, "gfxdecode"),
+ device_gfx_interface(mconfig, *this, GFXDECODE_NAME(asr733), "palette"),
m_keyint_line(*this),
m_lineint_line(*this)
{
}
//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void asr733_device::device_config_complete()
-{
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -211,7 +200,7 @@ void asr733_device::set_interrupt_line()
/* write a single char on screen */
void asr733_device::draw_char(int character, int x, int y, int color)
{
- m_gfxdecode->gfx(0)->opaque(*m_bitmap, m_bitmap->cliprect(), character-32, color, 0, 0, x+1, y);
+ gfx(0)->opaque(*m_bitmap, m_bitmap->cliprect(), character-32, color, 0, 0, x+1, y);
}
void asr733_device::linefeed()
@@ -221,7 +210,7 @@ void asr733_device::linefeed()
for (int y=asr_window_offset_y; y<asr_window_offset_y+asr_window_height-asr_scroll_step; y++)
{
extract_scanline8(*m_bitmap, asr_window_offset_x, y+asr_scroll_step, asr_window_width, buf);
- draw_scanline8(*m_bitmap, asr_window_offset_x, y, asr_window_width, buf, m_palette->pens());
+ draw_scanline8(*m_bitmap, asr_window_offset_x, y, asr_window_width, buf, palette().pens());
}
const rectangle asr_scroll_clear_window(
@@ -721,8 +710,6 @@ UINT32 asr733_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
}
static MACHINE_CONFIG_FRAGMENT( asr733 )
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", asr733)
-
MCFG_PALETTE_ADD("palette", 2)
MCFG_PALETTE_INIT_OWNER(asr733_device, asr733)
diff --git a/src/mame/video/733_asr.h b/src/mame/video/733_asr.h
index 9c45c69c6ed..d5b48eebc9e 100644
--- a/src/mame/video/733_asr.h
+++ b/src/mame/video/733_asr.h
@@ -10,7 +10,7 @@ enum
asr733_chr_region_len = 128*asr733_single_char_len
};
-class asr733_device : public device_t
+class asr733_device : public device_t, public device_gfx_interface
{
public:
asr733_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -33,7 +33,6 @@ public:
protected:
// device-level overrides
- void device_config_complete() override;
void device_start() override;
void device_reset() override;
machine_config_constructor device_mconfig_additions() const override;
@@ -73,8 +72,6 @@ private:
std::unique_ptr<bitmap_ind16> m_bitmap;
- required_device<palette_device> m_palette;
- required_device<gfxdecode_device> m_gfxdecode;
devcb_write_line m_keyint_line;
devcb_write_line m_lineint_line;
};
diff --git a/src/mame/video/911_vdt.cpp b/src/mame/video/911_vdt.cpp
index ff7b2b6a03c..6b00207b919 100644
--- a/src/mame/video/911_vdt.cpp
+++ b/src/mame/video/911_vdt.cpp
@@ -145,24 +145,13 @@ const device_type VDT911 = &device_creator<vdt911_device>;
vdt911_device::vdt911_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VDT911, "911 VDT", tag, owner, clock, "vdt911", __FILE__),
+ device_gfx_interface(mconfig, *this, GFXDECODE_NAME(vdt911), "palette"),
m_beeper(*this, "beeper"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
m_keyint_line(*this),
m_lineint_line(*this)
{
}
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void vdt911_device::device_config_complete()
-{
-}
-
enum
{
BLINK_TIMER,
@@ -467,7 +456,7 @@ WRITE8_MEMBER( vdt911_device::cru_w )
*/
void vdt911_device::refresh(bitmap_ind16 &bitmap, const rectangle &cliprect, int x, int y)
{
- gfx_element *gfx = m_gfxdecode->gfx(m_model);
+ gfx_element *gfx = this->gfx(m_model);
int height = (m_screen_size == char_960) ? 12 : /*25*/24;
int use_8bit_charcodes = USES_8BIT_CHARCODES();
@@ -822,8 +811,6 @@ static MACHINE_CONFIG_FRAGMENT( vdt911 )
MCFG_PALETTE_ADD("palette", 8)
MCFG_PALETTE_INDIRECT_ENTRIES(3)
MCFG_PALETTE_INIT_OWNER(vdt911_device, vdt911)
-
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", vdt911)
MACHINE_CONFIG_END
//-------------------------------------------------
diff --git a/src/mame/video/911_vdt.h b/src/mame/video/911_vdt.h
index e0ced6bbede..7d90d549d50 100644
--- a/src/mame/video/911_vdt.h
+++ b/src/mame/video/911_vdt.h
@@ -34,7 +34,7 @@ enum vdt911_model_t
vdt911_model_FrenchWP // French word processing
};
-class vdt911_device : public device_t
+class vdt911_device : public device_t, public device_gfx_interface
{
public:
vdt911_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -58,7 +58,6 @@ public:
protected:
// device-level overrides
- void device_config_complete() override;
void device_start() override;
void device_reset() override;
@@ -103,8 +102,6 @@ private:
char m_foreign_mode;
required_device<beep_device> m_beeper;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
devcb_write_line m_keyint_line;
devcb_write_line m_lineint_line;
};
diff --git a/src/mame/video/atarirle.cpp b/src/mame/video/atarirle.cpp
index 05a3fe4737d..897e300533a 100644
--- a/src/mame/video/atarirle.cpp
+++ b/src/mame/video/atarirle.cpp
@@ -68,7 +68,8 @@ inline int atari_rle_objects_device::round_to_powerof2(int value)
atari_rle_objects_device::atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ATARI_RLE_OBJECTS, "Atari RLE Motion Objects", tag, owner, clock, "atari_rle", __FILE__),
- device_video_interface(mconfig, *this)
+ device_video_interface(mconfig, *this),
+ m_rombase(*this, DEVICE_SELF)
{
}
@@ -218,8 +219,6 @@ void atari_rle_objects_device::device_start()
m_bitmapymask = m_bitmapheight - 1;
// set up the graphics ROM
- m_rombase = reinterpret_cast<UINT16 *>(m_region->base());
- m_romlength = m_region->bytes();
m_objectcount = count_objects();
// set up a cliprect
@@ -232,7 +231,7 @@ void atari_rle_objects_device::device_start()
// compute the checksums
memset(m_checksums, 0, sizeof(m_checksums));
- for (int sumchunk = 0; sumchunk < m_romlength / 0x20000; sumchunk++)
+ for (int sumchunk = 0; sumchunk < m_rombase.bytes() / 0x20000; sumchunk++)
{
const UINT16 *csbase = &m_rombase[0x10000 * sumchunk];
int cursum = 0;
@@ -345,7 +344,7 @@ void atari_rle_objects_device::build_rle_tables()
int atari_rle_objects_device::count_objects()
{
// first determine the lowest address of all objects
- int lowest_address = m_romlength;
+ int lowest_address = m_rombase.length();
for (int objoffset = 0; objoffset < lowest_address; objoffset += 4)
{
int offset = ((m_rombase[objoffset + 2] & 0xff) << 16) | m_rombase[objoffset + 3];
@@ -370,7 +369,7 @@ void atari_rle_objects_device::prescan_rle(int which)
// look up the offset
UINT16 *base = (UINT16 *)&m_rombase[which * 4];
- const UINT16 *end = m_rombase + m_romlength / 2;
+ const UINT16 *end = &m_rombase[0] + m_rombase.length();
info.xoffs = (INT16)base[0];
info.yoffs = (INT16)base[1];
@@ -384,7 +383,7 @@ void atari_rle_objects_device::prescan_rle(int which)
info.data = base = (UINT16 *)&m_rombase[offset];
// make sure it's valid
- if (offset < which * 4 || offset >= m_romlength)
+ if (offset < which * 4 || offset >= m_rombase.length())
{
info.data = nullptr;
return;
diff --git a/src/mame/video/atarirle.h b/src/mame/video/atarirle.h
index 5cf65931d04..86b07c598a9 100644
--- a/src/mame/video/atarirle.h
+++ b/src/mame/video/atarirle.h
@@ -159,8 +159,7 @@ private:
sprite_parameter m_vrammask; // mask for the VRAM target
// ROM information
- const UINT16 * m_rombase; // pointer to the base of the GFX ROM
- int m_romlength; // length of the GFX ROM
+ required_region_ptr<UINT16> m_rombase; // pointer to the base of the GFX ROM
int m_objectcount; // number of objects in the ROM
std::vector<object_info> m_info; // list of info records
diff --git a/src/mame/video/battlex.cpp b/src/mame/video/battlex.cpp
index f808d1e536e..d543240f073 100644
--- a/src/mame/video/battlex.cpp
+++ b/src/mame/video/battlex.cpp
@@ -83,7 +83,7 @@ void battlex_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprec
flipy = !flipy;
}
- gfx->transpen(bitmap,cliprect, tile, color, flipx, flipy, sx, sy, 0);
+ gfx->transpen(bitmap,cliprect, tile, color, flipx, flipy, sx, sy, 0);
source += 4;
}
diff --git a/src/mame/video/bbusters.cpp b/src/mame/video/bbusters.cpp
index 1a090935c17..0e7362fd085 100644
--- a/src/mame/video/bbusters.cpp
+++ b/src/mame/video/bbusters.cpp
@@ -200,18 +200,20 @@ void bbusters_state::draw_sprites(bitmap_ind16 &bitmap, const UINT16 *source, in
int offs;
for (offs = 0;offs <0x800 ;offs += 4) {
- int x,y,sprite,colour,fx,fy,scale;
+ int x,sprite,colour,fx,fy,scale;
+ INT16 y;
int block;
sprite=source[offs+1];
colour=source[offs+0];
- if (colour==0xf7 && (sprite==0x3fff || sprite==0xffff))
- continue;
+ if ((colour==0xf7 || colour==0xffff || colour == 0x43f9) && (sprite==0x3fff || sprite==0xffff || sprite==0x0001))
+ continue; // sprite 1, color 0x43f9 is the dead sprite in the top-right of the screen in Mechanized Attack's High Score table.
y=source[offs+3];
x=source[offs+2];
if (x&0x200) x=-(0x100-(x&0xff));
+ if (y > 320 || y < -256) y &= 0x1ff; // fix for bbusters ending & "Zing!" attract-mode fullscreen zombie & Helicopter on the 3rd rotation of the attractmode sequence
/*
Source[0]:
diff --git a/src/mame/video/bfm_adr2.cpp b/src/mame/video/bfm_adr2.cpp
index bca9061ffc2..1bc4615fd69 100644
--- a/src/mame/video/bfm_adr2.cpp
+++ b/src/mame/video/bfm_adr2.cpp
@@ -115,13 +115,32 @@ E000-FFFF | R | D D D D D D D D | 8K ROM
+static const gfx_layout charlayout =
+{
+ 8,8, // 8 * 8 characters
+ 8192, // 8192 characters
+ 4, // 4 bits per pixel
+ { 0,1,2,3 },
+ { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
+ { 0*8*4, 1*8*4, 2*8*4, 3*8*4, 4*8*4, 5*8*4, 6*8*4, 7*8*4 },
+ 8*8*4
+};
+
+// this is a strange beast !!!!
+//
+// characters are grouped by 64 (512 pixels)
+// there are max 128 of these groups
+
+static GFXDECODE_START( adder2 )
+ GFXDECODE_ENTRY( ":gfx1", 0, charlayout, 0, 16 )
+GFXDECODE_END
+
const device_type BFM_ADDER2 = &device_creator<bfm_adder2_device>;
bfm_adder2_device::bfm_adder2_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
: device_t(mconfig, BFM_ADDER2, "BFM ADDER2", tag, owner, clock, "bfm_adder2", __FILE__),
- m_cpu(*this, "adder2"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette")
+ device_gfx_interface(mconfig, *this, GFXDECODE_NAME(adder2), "palette"),
+ m_cpu(*this, "adder2")
{
}
@@ -194,7 +213,7 @@ void bfm_adder2_device::device_reset()
void bfm_adder2_device::device_start()
{
- if (!m_palette->started())
+ if (!palette().started())
throw device_missing_dependencies();
adder2_decode_char_roms();
@@ -211,26 +230,26 @@ void bfm_adder2_device::device_start()
save_item(NAME(m_adder_ram));
save_item(NAME(m_adder_screen_ram));
- m_tilemap0 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bfm_adder2_device::get_tile0_info),this), TILEMAP_SCAN_ROWS, 8, 8, 50, 35);
-
- m_tilemap1 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bfm_adder2_device::get_tile1_info),this), TILEMAP_SCAN_ROWS, 8, 8, 50, 35);
-
- m_palette->set_pen_color(0,rgb_t(0x00,0x00,0x00));
- m_palette->set_pen_color(1,rgb_t(0x00,0x00,0xFF));
- m_palette->set_pen_color(2,rgb_t(0x00,0xFF,0x00));
- m_palette->set_pen_color(3,rgb_t(0x00,0xFF,0xFF));
- m_palette->set_pen_color(4,rgb_t(0xFF,0x00,0x00));
- m_palette->set_pen_color(5,rgb_t(0xFF,0x00,0xFF));
- m_palette->set_pen_color(6,rgb_t(0xFF,0xFF,0x00));
- m_palette->set_pen_color(7,rgb_t(0xFF,0xFF,0xFF));
- m_palette->set_pen_color(8,rgb_t(0x80,0x80,0x80));
- m_palette->set_pen_color(9,rgb_t(0x00,0x00,0x80));
- m_palette->set_pen_color(10,rgb_t(0x00,0x80,0x00));
- m_palette->set_pen_color(11,rgb_t(0x00,0x80,0x80));
- m_palette->set_pen_color(12,rgb_t(0x80,0x00,0x00));
- m_palette->set_pen_color(13,rgb_t(0x80,0x00,0x80));
- m_palette->set_pen_color(14,rgb_t(0x80,0x80,0x00));
- m_palette->set_pen_color(15,rgb_t(0x80,0x80,0x80));
+ m_tilemap0 = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(bfm_adder2_device::get_tile0_info),this), TILEMAP_SCAN_ROWS, 8, 8, 50, 35);
+
+ m_tilemap1 = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(bfm_adder2_device::get_tile1_info),this), TILEMAP_SCAN_ROWS, 8, 8, 50, 35);
+
+ palette().set_pen_color(0,rgb_t(0x00,0x00,0x00));
+ palette().set_pen_color(1,rgb_t(0x00,0x00,0xFF));
+ palette().set_pen_color(2,rgb_t(0x00,0xFF,0x00));
+ palette().set_pen_color(3,rgb_t(0x00,0xFF,0xFF));
+ palette().set_pen_color(4,rgb_t(0xFF,0x00,0x00));
+ palette().set_pen_color(5,rgb_t(0xFF,0x00,0xFF));
+ palette().set_pen_color(6,rgb_t(0xFF,0xFF,0x00));
+ palette().set_pen_color(7,rgb_t(0xFF,0xFF,0xFF));
+ palette().set_pen_color(8,rgb_t(0x80,0x80,0x80));
+ palette().set_pen_color(9,rgb_t(0x00,0x00,0x80));
+ palette().set_pen_color(10,rgb_t(0x00,0x80,0x00));
+ palette().set_pen_color(11,rgb_t(0x00,0x80,0x80));
+ palette().set_pen_color(12,rgb_t(0x80,0x00,0x00));
+ palette().set_pen_color(13,rgb_t(0x80,0x00,0x80));
+ palette().set_pen_color(14,rgb_t(0x80,0x80,0x00));
+ palette().set_pen_color(15,rgb_t(0x80,0x80,0x80));
}
// video update ///////////////////////////////////////////////////////////
@@ -278,7 +297,7 @@ WRITE8_MEMBER( bfm_adder2_device::screen_ram_w )
r = ((data & 0x18)>>3) * 85; // 00011000b = 0x18
g = ((data & 0x06)>>1) * 85; // 00000110b = 0x06
b = ((data & 0x01) ) * 255;
- m_palette->set_pen_color(pal, rgb_t(r,g,b));
+ palette().set_pen_color(pal, rgb_t(r,g,b));
}
if ( m_adder2_screen_page_reg & SL_ACCESS )
@@ -519,26 +538,6 @@ static ADDRESS_MAP_START( adder2_memmap, AS_PROGRAM, 8, bfm_adder2_device )
AM_RANGE(0xE000, 0xFFFF) AM_ROM AM_REGION(":adder2", 0xE000) // 8k ROM
ADDRESS_MAP_END
-static const gfx_layout charlayout =
-{
- 8,8, // 8 * 8 characters
- 8192, // 8192 characters
- 4, // 4 bits per pixel
- { 0,1,2,3 },
- { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
- { 0*8*4, 1*8*4, 2*8*4, 3*8*4, 4*8*4, 5*8*4, 6*8*4, 7*8*4 },
- 8*8*4
-};
-
-// this is a strange beast !!!!
-//
-// characters are grouped by 64 (512 pixels)
-// there are max 128 of these groups
-
-static GFXDECODE_START( adder2 )
- GFXDECODE_ENTRY( ":gfx1", 0, charlayout, 0, 16 )
-GFXDECODE_END
-
///////////////////////////////////////////////////////////////////////////
static MACHINE_CONFIG_FRAGMENT( adder2 )
@@ -550,7 +549,6 @@ static MACHINE_CONFIG_FRAGMENT( adder2 )
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, bfm_adder2_device, update_screen)
MCFG_PALETTE_ADD("palette", 16)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", adder2)
MCFG_CPU_ADD("adder2", M6809, ADDER_CLOCK/4 ) // adder2 board 6809 CPU at 2 Mhz
MCFG_CPU_PROGRAM_MAP(adder2_memmap) // setup adder2 board memorymap
diff --git a/src/mame/video/bfm_adr2.h b/src/mame/video/bfm_adr2.h
index 301ee7acf0d..8f278dfb65c 100644
--- a/src/mame/video/bfm_adr2.h
+++ b/src/mame/video/bfm_adr2.h
@@ -3,7 +3,7 @@
#ifndef INC_BFMADDER2
#define INC_BFMADDER2
-class bfm_adder2_device : public device_t
+class bfm_adder2_device : public device_t, public device_gfx_interface
{
public:
// construction/destruction
@@ -61,8 +61,6 @@ private:
UINT8 m_adder2_sc2data;
optional_device<cpu_device> m_cpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
// device type definition
@@ -76,7 +74,4 @@ extern const device_type BFM_ADDER2;
#define MCFG_BFM_ADDER2_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, BFM_ADDER2, 0)
-#define MCFG_BFM_ADDER2_PALETTE(_palette_tag) \
- bfm_adder2_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif
diff --git a/src/mame/video/decbac06.h b/src/mame/video/decbac06.h
index 51a991636fa..0f9c24ccdd3 100644
--- a/src/mame/video/decbac06.h
+++ b/src/mame/video/decbac06.h
@@ -152,3 +152,6 @@ extern const device_type DECO_BAC06;
#define MCFG_DECO_BAC06_GFXDECODE(_gfxtag) \
deco_bac06_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+
+#define MCFG_DECO_BAC06_GFX_REGION_WIDE(_8x8, _16x16, _wide) \
+ deco_bac06_device::set_gfx_region_wide(*device, _8x8, _16x16, _wide);
diff --git a/src/mame/video/deckarn.cpp b/src/mame/video/deckarn.cpp
index 795bf5894d6..bde0dba82ab 100644
--- a/src/mame/video/deckarn.cpp
+++ b/src/mame/video/deckarn.cpp
@@ -17,8 +17,7 @@ const device_type DECO_KARNOVSPRITES = &device_creator<deco_karnovsprites_device
deco_karnovsprites_device::deco_karnovsprites_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DECO_KARNOVSPRITES, "DECO Karnov Sprites", tag, owner, clock, "deco_karnovsprites", __FILE__),
m_gfxregion(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -112,13 +111,3 @@ void deco_karnovsprites_device::draw_sprites( bitmap_ind16 &bitmap, const rectan
colour,fx,fy,x,y+16,0);
}
}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void deco_karnovsprites_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<deco_karnovsprites_device &>(device).m_palette.set_tag(tag);
-}
diff --git a/src/mame/video/deckarn.h b/src/mame/video/deckarn.h
index 560e0f87ba0..7da58cdc789 100644
--- a/src/mame/video/deckarn.h
+++ b/src/mame/video/deckarn.h
@@ -11,7 +11,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int region);
protected:
@@ -21,7 +20,6 @@ protected:
UINT8 m_gfxregion;
private:
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type DECO_KARNOVSPRITES;
@@ -29,5 +27,5 @@ extern const device_type DECO_KARNOVSPRITES;
#define MCFG_DECO_KARNOVSPRITES_GFXDECODE(_gfxtag) \
deco_karnovsprites_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_DECO_KARNOVSPRITES_PALETTE(_palette_tag) \
- deco_karnovsprites_device::static_set_palette_tag(*device, "^" _palette_tag);
+#define MCFG_DECO_KARNOVSPRITES_GFX_REGION(_region) \
+ deco_karnovsprites_device::set_gfx_region(*device, _region);
diff --git a/src/mame/video/decmxc06.cpp b/src/mame/video/decmxc06.cpp
index 888d5ae6ada..87bb3aa922e 100644
--- a/src/mame/video/decmxc06.cpp
+++ b/src/mame/video/decmxc06.cpp
@@ -54,8 +54,7 @@ deco_mxc06_device::deco_mxc06_device(const machine_config &mconfig, const char *
device_video_interface(mconfig, *this),
m_gfxregion(0),
m_ramsize(0x800),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -223,13 +222,3 @@ void deco_mxc06_device::device_start()
void deco_mxc06_device::device_reset()
{
}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void deco_mxc06_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<deco_mxc06_device &>(device).m_palette.set_tag(tag);
-}
diff --git a/src/mame/video/decmxc06.h b/src/mame/video/decmxc06.h
index a4b58a73195..b00a7d851b5 100644
--- a/src/mame/video/decmxc06.h
+++ b/src/mame/video/decmxc06.h
@@ -11,7 +11,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int region);
static void set_ram_size(device_t &device, int size)
{
@@ -35,7 +34,6 @@ protected:
private:
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type DECO_MXC06;
@@ -43,8 +41,8 @@ extern const device_type DECO_MXC06;
#define MCFG_DECO_MXC06_GFXDECODE(_gfxtag) \
deco_mxc06_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_DECO_MXC06_PALETTE(_palette_tag) \
- deco_mxc06_device::static_set_palette_tag(*device, "^" _palette_tag);
+#define MCFG_DECO_MXC06_GFX_REGION(_region) \
+ deco_mxc06_device::set_gfx_region(*device, _region);
#define MCFG_DECO_MXC06_RAMSIZE(_size) \
deco_mxc06_device::set_ram_size(*device, _size);
diff --git a/src/mame/video/deco16ic.cpp b/src/mame/video/deco16ic.cpp
index fa5b1caba0a..df16e96bfc0 100644
--- a/src/mame/video/deco16ic.cpp
+++ b/src/mame/video/deco16ic.cpp
@@ -202,8 +202,7 @@ deco16ic_device::deco16ic_device(const machine_config &mconfig, const char *tag,
m_pf2_colourmask(0xf),
m_pf12_8x8_gfx_bank(0),
m_pf12_16x16_gfx_bank(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -511,7 +510,7 @@ void deco16ic_device::custom_tilemap_draw(
if ((flags & TILEMAP_DRAW_OPAQUE) || (p & trans_mask))
{
- bitmap.pix(y, x) = m_palette->pen(p);
+ bitmap.pix(y, x) = m_gfxdecode->palette().pen(p);
if (screen.priority().valid())
{
UINT8 *pri = &screen.priority().pix8(y);
@@ -943,13 +942,3 @@ void deco16ic_device::tilemap_12_combine_draw(screen_device &screen, bitmap_rgb3
{
custom_tilemap_draw(screen, bitmap, cliprect, nullptr, m_pf1_tilemap_16x16, nullptr, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, 0xff, flags, priority, is_tattoo);
}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void deco16ic_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<deco16ic_device &>(device).m_palette.set_tag(tag);
-}
diff --git a/src/mame/video/deco16ic.h b/src/mame/video/deco16ic.h
index 5e45336c093..a15be609dbc 100644
--- a/src/mame/video/deco16ic.h
+++ b/src/mame/video/deco16ic.h
@@ -154,7 +154,6 @@ private:
TILE_GET_INFO_MEMBER(get_pf2_tile_info_b);
TILE_GET_INFO_MEMBER(get_pf1_tile_info_b);
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type DECO16IC;
@@ -206,9 +205,6 @@ extern const device_type DECO16IC;
#define MCFG_DECO16IC_GFXDECODE(_gfxtag) \
deco16ic_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_DECO16IC_PALETTE(_palette_tag) \
- deco16ic_device::static_set_palette_tag(*device, "^" _palette_tag);
-
// function definition for a callback
#define DECO16IC_BANK_CB_MEMBER(_name) int _name(int bank)
diff --git a/src/mame/video/deco_zoomspr.cpp b/src/mame/video/deco_zoomspr.cpp
index e1b5cfdb949..aafefabc2a7 100644
--- a/src/mame/video/deco_zoomspr.cpp
+++ b/src/mame/video/deco_zoomspr.cpp
@@ -17,22 +17,11 @@ const device_type DECO_ZOOMSPR = &device_creator<deco_zoomspr_device>;
deco_zoomspr_device::deco_zoomspr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DECO_ZOOMSPR, "DECO Zooming Sprites", tag, owner, clock, "deco_zoomspr", __FILE__),
- m_palette(*this),
m_gfxdecode(*this)
{
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void deco_zoomspr_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<deco_zoomspr_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// static_set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
@@ -80,7 +69,7 @@ inline void deco_zoomspr_device::dragngun_drawgfxzoom(
{
if( gfx )
{
- const pen_t *pal = &m_palette->pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors()));
+ const pen_t *pal = &m_gfxdecode->palette().pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors()));
const UINT8 *code_base = gfx->get_data(code % gfx->elements());
if (sprite_screen_width && sprite_screen_height)
diff --git a/src/mame/video/deco_zoomspr.h b/src/mame/video/deco_zoomspr.h
index 4283f3aa62e..aed9b6b519a 100644
--- a/src/mame/video/deco_zoomspr.h
+++ b/src/mame/video/deco_zoomspr.h
@@ -7,7 +7,6 @@ class deco_zoomspr_device : public device_t
public:
deco_zoomspr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
void dragngun_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT32 *spritedata, UINT32* dragngun_sprite_layout_0_ram, UINT32* dragngun_sprite_layout_1_ram, UINT32* dragngun_sprite_lookup_0_ram, UINT32* dragngun_sprite_lookup_1_ram, UINT32 dragngun_sprite_ctrl, bitmap_ind8 &pri_bitmap, bitmap_rgb32 &temp_bitmap);
@@ -18,7 +17,6 @@ protected:
virtual void device_reset() override;
private:
- required_device<palette_device> m_palette;
required_device<gfxdecode_device> m_gfxdecode;
void dragngun_drawgfxzoom(
@@ -33,8 +31,5 @@ private:
extern const device_type DECO_ZOOMSPR;
-#define MCFG_DECO_ZOOMSPR_PALETTE(_palette_tag) \
- deco_zoomspr_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#define MCFG_DECO_ZOOMSPR_GFXDECODE(_gfxtag) \
deco_zoomspr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
diff --git a/src/mame/video/decospr.cpp b/src/mame/video/decospr.cpp
index 304fba4a87b..1ad69cff68a 100644
--- a/src/mame/video/decospr.cpp
+++ b/src/mame/video/decospr.cpp
@@ -157,8 +157,7 @@ decospr_device::decospr_device(const machine_config &mconfig, const char *tag, d
m_y_offset(0),
m_flipallx(0),
m_transpen(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
// default color callback
m_col_cb = decospr_col_cb_delegate(FUNC(decospr_device::default_col_cb), this);
@@ -579,7 +578,7 @@ void decospr_device::inefficient_copy_sprite_bitmap(bitmap_rgb32 &bitmap, const
fatalerror("decospr_device::inefficient_copy_sprite_bitmap with no m_sprite_bitmap\n");
int y, x;
- const pen_t *paldata = m_palette->pens();
+ const pen_t *paldata = m_gfxdecode->palette().pens();
UINT16* srcline;
UINT32* dstline;
@@ -623,13 +622,3 @@ void decospr_device::inefficient_copy_sprite_bitmap(bitmap_rgb32 &bitmap, const
}
}
}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void decospr_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<decospr_device &>(device).m_palette.set_tag(tag);
-}
diff --git a/src/mame/video/decospr.h b/src/mame/video/decospr.h
index 9679a22acc5..c9b2ee68a77 100644
--- a/src/mame/video/decospr.h
+++ b/src/mame/video/decospr.h
@@ -18,7 +18,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int gfxregion);
static void set_pri_callback(device_t &device, decospr_pri_cb_delegate callback) { downcast<decospr_device &>(device).m_pri_cb = callback; }
static void set_col_callback(device_t &device, decospr_col_cb_delegate callback) { downcast<decospr_device &>(device).m_col_cb = callback; }
@@ -67,7 +66,6 @@ private:
template<class _BitmapClass>
void draw_sprites_common(_BitmapClass &bitmap, const rectangle &cliprect, UINT16* spriteram, int sizewords, bool invert_flip);
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type DECO_SPRITE;
@@ -98,6 +96,3 @@ extern const device_type DECO_SPRITE;
#define MCFG_DECO_SPRITE_GFXDECODE(_gfxtag) \
decospr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
-#define MCFG_DECO_SPRITE_PALETTE(_palette_tag) \
- decospr_device::static_set_palette_tag(*device, "^" _palette_tag);
diff --git a/src/mame/video/k001604.cpp b/src/mame/video/k001604.cpp
index 6308e9f2736..efc658e44c4 100644
--- a/src/mame/video/k001604.cpp
+++ b/src/mame/video/k001604.cpp
@@ -19,8 +19,7 @@ const device_type K001604 = &device_creator<k001604_device>;
k001604_device::k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K001604, "K001604 2D tilemaps + 2x ROZ", tag, owner, clock, "k001604", __FILE__),
- m_gfx_index_1(0),
- m_gfx_index_2(0),
+ device_gfx_interface(mconfig, *this, nullptr),
m_layer_size(0),
m_roz_size(0),
m_txt_mem_offset(0),
@@ -28,22 +27,8 @@ k001604_device::k001604_device(const machine_config &mconfig, const char *tag, d
m_layer_roz(nullptr),
m_tile_ram(nullptr),
m_char_ram(nullptr),
- m_reg(nullptr),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_reg(nullptr)
{
- m_gfx_index[0] = 0;
- m_gfx_index[1] = 0;
-}
-
-//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void k001604_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<k001604_device &>(device).m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
@@ -74,14 +59,8 @@ void k001604_device::device_start()
16*256
};
- if(!m_gfxdecode->started())
- throw device_missing_dependencies();
-
int roz_tile_size;
- m_gfx_index[0] = m_gfx_index_1;
- m_gfx_index[1] = m_gfx_index_2;
-
m_char_ram = make_unique_clear<UINT32[]>(0x200000 / 4);
m_tile_ram = make_unique_clear<UINT32[]>(0x20000 / 4);
m_reg = make_unique_clear<UINT32[]>(0x400 / 4);
@@ -91,24 +70,24 @@ void k001604_device::device_start()
if (m_layer_size)
{
- m_layer_8x8[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_0_size1),this), 8, 8, 64, 64);
- m_layer_8x8[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_1_size1),this), 8, 8, 64, 64);
+ m_layer_8x8[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_0_size1),this), 8, 8, 64, 64);
+ m_layer_8x8[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_1_size1),this), 8, 8, 64, 64);
- m_layer_roz = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_roz_256),this), roz_tile_size, roz_tile_size, 128, 64);
+ m_layer_roz = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_roz_256),this), roz_tile_size, roz_tile_size, 128, 64);
}
else
{
- m_layer_8x8[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_0_size0),this), 8, 8, 64, 64);
- m_layer_8x8[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_1_size0),this), 8, 8, 64, 64);
+ m_layer_8x8[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_0_size0),this), 8, 8, 64, 64);
+ m_layer_8x8[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_1_size0),this), 8, 8, 64, 64);
- m_layer_roz = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_roz_128),this), roz_tile_size, roz_tile_size, 128, 64);
+ m_layer_roz = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_roz_128),this), roz_tile_size, roz_tile_size, 128, 64);
}
m_layer_8x8[0]->set_transparent_pen(0);
m_layer_8x8[1]->set_transparent_pen(0);
- m_gfxdecode->set_gfx(m_gfx_index[0], std::make_unique<gfx_element>(m_palette, k001604_char_layout_layer_8x8, (UINT8*)&m_char_ram[0], 0, m_palette->entries() / 16, 0));
- m_gfxdecode->set_gfx(m_gfx_index[1], std::make_unique<gfx_element>(m_palette, k001604_char_layout_layer_16x16, (UINT8*)&m_char_ram[0], 0, m_palette->entries() / 16, 0));
+ set_gfx(0, std::make_unique<gfx_element>(palette(), k001604_char_layout_layer_8x8, (UINT8*)&m_char_ram[0], 0, palette().entries() / 16, 0));
+ set_gfx(1, std::make_unique<gfx_element>(palette(), k001604_char_layout_layer_16x16, (UINT8*)&m_char_ram[0], 0, palette().entries() / 16, 0));
save_pointer(NAME(m_reg.get()), 0x400 / 4);
save_pointer(NAME(m_char_ram.get()), 0x200000 / 4);
@@ -182,7 +161,7 @@ TILE_GET_INFO_MEMBER(k001604_device::tile_info_layer_8x8)
if (val & 0x800000)
flags |= TILE_FLIPY;
- SET_TILE_INFO_MEMBER(m_gfx_index[0], tile, color, flags);
+ SET_TILE_INFO_MEMBER(0, tile, color, flags);
}
TILE_GET_INFO_MEMBER(k001604_device::tile_info_layer_roz)
@@ -199,7 +178,7 @@ TILE_GET_INFO_MEMBER(k001604_device::tile_info_layer_roz)
tile += m_roz_size ? 0x800 : 0x2000;
- SET_TILE_INFO_MEMBER(m_gfx_index[m_roz_size], tile, color, flags);
+ SET_TILE_INFO_MEMBER(m_roz_size, tile, color, flags);
}
@@ -237,7 +216,7 @@ void k001604_device::draw_back_layer( bitmap_rgb32 &bitmap, const rectangle &cli
int ex = cliprect.max_x;
int ey = cliprect.max_y;
- const rgb_t *clut = m_palette->palette()->entry_list_raw();
+ const rgb_t *clut = palette().palette()->entry_list_raw();
int window_x, window_y, window_xmask, window_ymask;
@@ -397,8 +376,8 @@ WRITE32_MEMBER( k001604_device::char_w )
COMBINE_DATA(m_char_ram.get() + addr);
- m_gfxdecode->gfx(m_gfx_index[0])->mark_dirty(addr / 32);
- m_gfxdecode->gfx(m_gfx_index[1])->mark_dirty(addr / 128);
+ gfx(0)->mark_dirty(addr / 32);
+ gfx(1)->mark_dirty(addr / 128);
}
WRITE32_MEMBER( k001604_device::reg_w )
@@ -419,13 +398,3 @@ WRITE32_MEMBER( k001604_device::reg_w )
//printf("K001604_reg_w (%d), %02X, %08X, %08X at %08X\n", chip, offset, data, mem_mask, space.device().safe_pc());
}
}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void k001604_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<k001604_device &>(device).m_palette.set_tag(tag);
-}
diff --git a/src/mame/video/k001604.h b/src/mame/video/k001604.h
index d0719936029..d4264007856 100644
--- a/src/mame/video/k001604.h
+++ b/src/mame/video/k001604.h
@@ -5,17 +5,13 @@
#define __K001604_H__
-class k001604_device : public device_t
+class k001604_device : public device_t, public device_gfx_interface
{
public:
k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~k001604_device() {}
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
- static void set_gfx_index_1(device_t &device, int idx) { downcast<k001604_device &>(device).m_gfx_index_1 = idx; }
- static void set_gfx_index_2(device_t &device, int idx) { downcast<k001604_device &>(device).m_gfx_index_2 = idx; }
static void set_layer_size(device_t &device, int size) { downcast<k001604_device &>(device).m_layer_size = size; }
static void set_roz_size(device_t &device, int size) { downcast<k001604_device &>(device).m_roz_size = size; }
static void set_txt_mem_offset(device_t &device, int offs) { downcast<k001604_device &>(device).m_txt_mem_offset = offs; }
@@ -36,8 +32,6 @@ protected:
virtual void device_reset() override;
private:
// internal state
- int m_gfx_index_1;
- int m_gfx_index_2;
int m_layer_size; // 0 -> width = 128 tiles, 1 -> width = 256 tiles
int m_roz_size; // 0 -> 8x8, 1 -> 16x16
int m_txt_mem_offset;
@@ -45,13 +39,10 @@ private:
tilemap_t *m_layer_8x8[2];
tilemap_t *m_layer_roz;
- int m_gfx_index[2];
std::unique_ptr<UINT32[]> m_tile_ram;
std::unique_ptr<UINT32[]> m_char_ram;
std::unique_ptr<UINT32[]> m_reg;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
TILEMAP_MAPPER_MEMBER(scan_layer_8x8_0_size0);
TILEMAP_MAPPER_MEMBER(scan_layer_8x8_0_size1);
@@ -66,12 +57,6 @@ private:
extern const device_type K001604;
-#define MCFG_K001604_GFX_INDEX1(_idx) \
- k001604_device::set_gfx_index_1(*device, _idx);
-
-#define MCFG_K001604_GFX_INDEX2(_idx) \
- k001604_device::set_gfx_index_2(*device, _idx);
-
#define MCFG_K001604_LAYER_SIZE(_size) \
k001604_device::set_layer_size(*device, _size);
@@ -84,10 +69,7 @@ extern const device_type K001604;
#define MCFG_K001604_ROZ_OFFSET(_offs) \
k001604_device::set_roz_mem_offset(*device, _offs);
-#define MCFG_K001604_GFXDECODE(_gfxtag) \
- k001604_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
#define MCFG_K001604_PALETTE(_palette_tag) \
- k001604_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
#endif
diff --git a/src/mame/video/k037122.cpp b/src/mame/video/k037122.cpp
index e7f57786174..dd572916e9a 100644
--- a/src/mame/video/k037122.cpp
+++ b/src/mame/video/k037122.cpp
@@ -18,36 +18,15 @@ const device_type K037122 = &device_creator<k037122_device>;
k037122_device::k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K037122, "K037122 2D Tilemap", tag, owner, clock, "k037122", __FILE__),
device_video_interface(mconfig, *this),
+ device_gfx_interface(mconfig, *this, nullptr),
m_tile_ram(nullptr),
m_char_ram(nullptr),
m_reg(nullptr),
- m_gfx_index(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfx_index(0)
{
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void k037122_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<k037122_device &>(device).m_gfxdecode.set_tag(tag);
-}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void k037122_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<k037122_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -64,20 +43,17 @@ void k037122_device::device_start()
8*128
};
- if(!m_gfxdecode->started())
- throw device_missing_dependencies();
-
m_char_ram = make_unique_clear<UINT32[]>(0x200000 / 4);
m_tile_ram = make_unique_clear<UINT32[]>(0x20000 / 4);
m_reg = make_unique_clear<UINT32[]>(0x400 / 4);
- m_layer[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k037122_device::tile_info_layer0),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
- m_layer[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k037122_device::tile_info_layer1),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
+ m_layer[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k037122_device::tile_info_layer0),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
+ m_layer[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k037122_device::tile_info_layer1),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
m_layer[0]->set_transparent_pen(0);
m_layer[1]->set_transparent_pen(0);
- m_gfxdecode->set_gfx(m_gfx_index,std::make_unique<gfx_element>(m_palette, k037122_char_layout, (UINT8*)m_char_ram.get(), 0, m_palette->entries() / 16, 0));
+ set_gfx(m_gfx_index,std::make_unique<gfx_element>(palette(), k037122_char_layout, (UINT8*)m_char_ram.get(), 0, palette().entries() / 16, 0));
save_pointer(NAME(m_reg.get()), 0x400 / 4);
save_pointer(NAME(m_char_ram.get()), 0x200000 / 4);
@@ -153,7 +129,7 @@ void k037122_device::update_palette_color( UINT32 palette_base, int color )
{
UINT32 data = m_tile_ram[(palette_base / 4) + color];
- m_palette->set_pen_color(color, pal5bit(data >> 6), pal6bit(data >> 0), pal5bit(data >> 11));
+ palette().set_pen_color(color, pal5bit(data >> 6), pal6bit(data >> 0), pal5bit(data >> 11));
}
READ32_MEMBER( k037122_device::sram_r )
@@ -211,7 +187,7 @@ WRITE32_MEMBER( k037122_device::char_w )
UINT32 addr = offset + (bank * (0x40000/4));
COMBINE_DATA(m_char_ram.get() + addr);
- m_gfxdecode->gfx(m_gfx_index)->mark_dirty(addr / 32);
+ gfx(m_gfx_index)->mark_dirty(addr / 32);
}
READ32_MEMBER( k037122_device::reg_r )
diff --git a/src/mame/video/k037122.h b/src/mame/video/k037122.h
index 181f28e355d..99276695a36 100644
--- a/src/mame/video/k037122.h
+++ b/src/mame/video/k037122.h
@@ -5,15 +5,14 @@
#define __K037122_H__
class k037122_device : public device_t,
- public device_video_interface
+ public device_video_interface,
+ public device_gfx_interface
{
public:
k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~k037122_device() {}
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void static_set_gfx_index(device_t &device, int index) { downcast<k037122_device &>(device).m_gfx_index = index; }
void tile_draw( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect );
@@ -38,8 +37,6 @@ private:
std::unique_ptr<UINT32[]> m_reg;
int m_gfx_index;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
TILE_GET_INFO_MEMBER(tile_info_layer0);
TILE_GET_INFO_MEMBER(tile_info_layer1);
@@ -48,15 +45,11 @@ private:
extern const device_type K037122;
-#define MCFG_K037122_ADD(_tag, _screen, _gfxindex) \
+#define MCFG_K037122_ADD(_tag, _screen) \
MCFG_DEVICE_ADD(_tag, K037122, 0) \
- MCFG_VIDEO_SET_SCREEN(_screen) \
- k037122_device::static_set_gfx_index(*device, _gfxindex);
-
-#define MCFG_K037122_GFXDECODE(_gfxtag) \
- k037122_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ MCFG_VIDEO_SET_SCREEN(_screen)
#define MCFG_K037122_PALETTE(_palette_tag) \
- k037122_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
#endif
diff --git a/src/mame/video/k051316.cpp b/src/mame/video/k051316.cpp
index 29493e7e69c..2bad3d043f9 100644
--- a/src/mame/video/k051316.cpp
+++ b/src/mame/video/k051316.cpp
@@ -106,8 +106,7 @@ GFXDECODE_END
k051316_device::k051316_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K051316, "K051316 PSAC", tag, owner, clock, "k051316", __FILE__),
device_gfx_interface(mconfig, *this, gfxinfo),
- m_zoom_rom(nullptr),
- m_zoom_size(0),
+ m_zoom_rom(*this, DEVICE_SELF),
m_dx(0),
m_dy(0),
m_wrap(0),
@@ -151,13 +150,6 @@ void k051316_device::set_bpp(device_t &device, int bpp)
void k051316_device::device_start()
{
- memory_region *ROM = region();
- if (ROM != nullptr)
- {
- m_zoom_rom = ROM->base();
- m_zoom_size = ROM->bytes();
- }
-
decode_gfx();
gfx(0)->set_colors(palette().entries() / gfx(0)->depth());
@@ -209,13 +201,13 @@ WRITE8_MEMBER( k051316_device::write )
READ8_MEMBER( k051316_device::rom_r )
{
- assert (m_zoom_size != 0);
+ assert (m_zoom_rom.found());
if ((m_ctrlram[0x0e] & 0x01) == 0)
{
int addr = offset + (m_ctrlram[0x0c] << 11) + (m_ctrlram[0x0d] << 19);
addr /= m_pixels_per_byte;
- addr &= m_zoom_size - 1;
+ addr &= m_zoom_rom.mask();
// popmessage("%s: offset %04x addr %04x", space.machine().describe_context(), offset, addr);
diff --git a/src/mame/video/k051316.h b/src/mame/video/k051316.h
index fc51fdb95fb..3363cfbdc41 100644
--- a/src/mame/video/k051316.h
+++ b/src/mame/video/k051316.h
@@ -84,8 +84,7 @@ private:
UINT8 m_ctrlram[16];
tilemap_t *m_tmap;
- UINT8 *m_zoom_rom;
- UINT32 m_zoom_size;
+ optional_region_ptr<UINT8> m_zoom_rom;
int m_dx, m_dy;
int m_wrap;
diff --git a/src/mame/video/k051960.cpp b/src/mame/video/k051960.cpp
index ae93ec9cb01..d5c899c3386 100644
--- a/src/mame/video/k051960.cpp
+++ b/src/mame/video/k051960.cpp
@@ -129,10 +129,8 @@ k051960_device::k051960_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, K051960, "K051960 Sprite Generator", tag, owner, clock, "k051960", __FILE__),
device_gfx_interface(mconfig, *this, gfxinfo),
m_ram(nullptr),
- m_sprite_rom(nullptr),
- m_sprite_size(0),
- m_screen_tag(nullptr),
- m_screen(nullptr),
+ m_sprite_rom(*this, DEVICE_SELF),
+ m_screen(*this),
m_scanline_timer(nullptr),
m_irq_handler(*this),
m_firq_handler(*this),
@@ -171,10 +169,10 @@ void k051960_device::set_plane_order(device_t &device, int order)
// set_screen_tag - set screen we are attached to
//-------------------------------------------------
-void k051960_device::set_screen_tag(device_t &device, device_t *owner, const char *tag)
+void k051960_device::set_screen_tag(device_t &device, const char *tag)
{
k051960_device &dev = dynamic_cast<k051960_device &>(device);
- dev.m_screen_tag = tag;
+ dev.m_screen.set_tag(tag);
}
//-------------------------------------------------
@@ -184,7 +182,6 @@ void k051960_device::set_screen_tag(device_t &device, device_t *owner, const cha
void k051960_device::device_start()
{
// make sure our screen is started
- m_screen = m_owner->subdevice<screen_device>(m_screen_tag);
if (!m_screen->started())
throw device_missing_dependencies();
@@ -192,9 +189,6 @@ void k051960_device::device_start()
m_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(k051960_device::scanline_callback), this));
m_scanline_timer->adjust(m_screen->time_until_pos(0));
- m_sprite_rom = region()->base();
- m_sprite_size = region()->bytes();
-
decode_gfx();
gfx(0)->set_colors(palette().entries() / gfx(0)->depth());
@@ -271,7 +265,7 @@ int k051960_device::k051960_fetchromdata( int byte )
m_k051960_cb(&code, &color, &pri, &shadow);
addr = (code << 7) | (off1 << 2) | byte;
- addr &= m_sprite_size - 1;
+ addr &= m_sprite_rom.mask();
// popmessage("%s: addr %06x", machine().describe_context(), addr);
diff --git a/src/mame/video/k051960.h b/src/mame/video/k051960.h
index 069f0f48440..a5b4939153b 100644
--- a/src/mame/video/k051960.h
+++ b/src/mame/video/k051960.h
@@ -22,7 +22,7 @@ typedef device_delegate<void (int *code, int *color, int *priority, int *shadow)
k051960_device::set_plane_order(*device, _order);
#define MCFG_K051960_SCREEN_TAG(_tag) \
- k051960_device::set_screen_tag(*device, owner, _tag);
+ k051960_device::set_screen_tag(*device, "^" _tag);
#define MCFG_K051960_IRQ_HANDLER(_devcb) \
devcb = &k051960_device::set_irq_handler(*device, DEVCB_##_devcb);
@@ -54,7 +54,7 @@ public:
// static configuration
static void set_k051960_callback(device_t &device, k051960_cb_delegate callback) { downcast<k051960_device &>(device).m_k051960_cb = callback; }
static void set_plane_order(device_t &device, int order);
- static void set_screen_tag(device_t &device, device_t *owner, const char *tag);
+ static void set_screen_tag(device_t &device, const char *tag);
/*
The callback is passed:
@@ -89,11 +89,9 @@ private:
// internal state
std::unique_ptr<UINT8[]> m_ram;
- UINT8 *m_sprite_rom;
- UINT32 m_sprite_size;
+ required_region_ptr<UINT8> m_sprite_rom;
- const char *m_screen_tag;
- screen_device *m_screen;
+ required_device<screen_device> m_screen;
emu_timer *m_scanline_timer;
k051960_cb_delegate m_k051960_cb;
diff --git a/src/mame/video/k052109.cpp b/src/mame/video/k052109.cpp
index 08e781da0f8..6530afb113a 100644
--- a/src/mame/video/k052109.cpp
+++ b/src/mame/video/k052109.cpp
@@ -178,9 +178,8 @@ k052109_device::k052109_device(const machine_config &mconfig, const char *tag, d
m_irq_enabled(0),
m_romsubbank(0),
m_scrollctrl(0),
- m_char_rom(nullptr),
- m_char_size(0),
- m_screen_tag(nullptr),
+ m_char_rom(*this, DEVICE_SELF),
+ m_screen(*this),
m_irq_handler(*this),
m_firq_handler(*this),
m_nmi_handler(*this)
@@ -205,21 +204,14 @@ void k052109_device::set_ram(device_t &device, bool ram)
void k052109_device::device_start()
{
- if (m_screen_tag != nullptr)
+ if (m_screen.found())
{
// make sure our screen is started
- screen_device *screen = m_owner->subdevice<screen_device>(m_screen_tag);
- if (!screen->started())
+ if (!m_screen->started())
throw device_missing_dependencies();
// and register a callback for vblank state
- screen->register_vblank_callback(vblank_state_delegate(FUNC(k052109_device::vblank_callback), this));
- }
-
- if (region() != nullptr)
- {
- m_char_rom = region()->base();
- m_char_size = region()->bytes();
+ m_screen->register_vblank_callback(vblank_state_delegate(FUNC(k052109_device::vblank_callback), this));
}
decode_gfx();
@@ -288,10 +280,10 @@ void k052109_device::device_reset()
// set_screen_tag - set screen we are attached to
//-------------------------------------------------
-void k052109_device::set_screen_tag(device_t &device, device_t *owner, const char *tag)
+void k052109_device::set_screen_tag(device_t &device, const char *tag)
{
k052109_device &dev = dynamic_cast<k052109_device &>(device);
- dev.m_screen_tag = tag;
+ dev.m_screen.set_tag(tag);
}
@@ -329,7 +321,7 @@ READ8_MEMBER( k052109_device::read )
}
else /* Punk Shot and TMNT read from 0000-1fff, Aliens from 2000-3fff */
{
- assert (m_char_size != 0);
+ assert (m_char_rom.found());
int code = (offset & 0x1fff) >> 5;
int color = m_romsubbank;
@@ -346,7 +338,7 @@ READ8_MEMBER( k052109_device::read )
m_k052109_cb(0, bank, &code, &color, &flags, &priority);
addr = (code << 5) + (offset & 0x1f);
- addr &= m_char_size - 1;
+ addr &= m_char_rom.mask();
// logerror("%04x: off = %04x sub = %02x (bnk = %x) adr = %06x\n", space.device().safe_pc(), offset, m_romsubbank, bank, addr);
diff --git a/src/mame/video/k052109.h b/src/mame/video/k052109.h
index 96f25882fa4..78156365838 100644
--- a/src/mame/video/k052109.h
+++ b/src/mame/video/k052109.h
@@ -14,7 +14,7 @@ typedef device_delegate<void (int layer, int bank, int *code, int *color, int *f
k052109_device::set_ram(*device, _ram);
#define MCFG_K052109_SCREEN_TAG(_tag) \
- k052109_device::set_screen_tag(*device, owner, _tag);
+ k052109_device::set_screen_tag(*device, "^" _tag);
#define MCFG_K052109_IRQ_HANDLER(_devcb) \
devcb = &k052109_device::set_irq_handler(*device, DEVCB_##_devcb);
@@ -36,7 +36,7 @@ public:
static void set_k052109_callback(device_t &device, k052109_cb_delegate callback) { downcast<k052109_device &>(device).m_k052109_cb = callback; }
static void set_ram(device_t &device, bool ram);
- static void set_screen_tag(device_t &device, device_t *owner, const char *tag);
+ static void set_screen_tag(device_t &device, const char *tag);
/*
The callback is passed:
@@ -96,10 +96,9 @@ private:
UINT8 m_irq_enabled;
UINT8 m_romsubbank, m_scrollctrl;
- UINT8 *m_char_rom;
- UINT32 m_char_size;
+ optional_region_ptr<UINT8> m_char_rom;
- const char *m_screen_tag;
+ optional_device<screen_device> m_screen;
k052109_cb_delegate m_k052109_cb;
diff --git a/src/mame/video/k053244_k053245.cpp b/src/mame/video/k053244_k053245.cpp
index 796eff8a3ec..59295af4227 100644
--- a/src/mame/video/k053244_k053245.cpp
+++ b/src/mame/video/k053244_k053245.cpp
@@ -86,7 +86,7 @@ k05324x_device::k05324x_device(const machine_config &mconfig, const char *tag, d
device_gfx_interface(mconfig, *this, gfxinfo),
m_ram(nullptr),
m_buffer(nullptr),
- m_sprite_rom(nullptr),
+ m_sprite_rom(*this, DEVICE_SELF),
m_dx(0),
m_dy(0),
m_rombank(0),
@@ -118,9 +118,6 @@ void k05324x_device::set_bpp(device_t &device, int bpp)
void k05324x_device::device_start()
{
- m_sprite_rom = region()->base();
- m_sprite_size = region()->bytes();
-
/* decode the graphics */
decode_gfx();
gfx(0)->set_colors(palette().entries() / gfx(0)->depth());
@@ -209,7 +206,7 @@ READ8_MEMBER( k05324x_device::k053244_r )
addr = (m_rombank << 19) | ((m_regs[11] & 0x7) << 18)
| (m_regs[8] << 10) | (m_regs[9] << 2)
| ((offset & 3) ^ 1);
- addr &= m_sprite_size - 1;
+ addr &= m_sprite_rom.mask();
// popmessage("%s: offset %02x addr %06x", machine().describe_context(), offset & 3, addr);
diff --git a/src/mame/video/k053244_k053245.h b/src/mame/video/k053244_k053245.h
index 924edc2a37f..47644806bb9 100644
--- a/src/mame/video/k053244_k053245.h
+++ b/src/mame/video/k053244_k053245.h
@@ -66,8 +66,7 @@ private:
// internal state
std::unique_ptr<UINT16[]> m_ram;
std::unique_ptr<UINT16[]> m_buffer;
- UINT8 *m_sprite_rom;
- UINT32 m_sprite_size;
+ required_region_ptr<UINT8> m_sprite_rom;
int m_dx, m_dy;
k05324x_cb_delegate m_k05324x_cb;
diff --git a/src/mame/video/k053246_k053247_k055673.cpp b/src/mame/video/k053246_k053247_k055673.cpp
index fc9bc1581eb..1469014fbfc 100644
--- a/src/mame/video/k053246_k053247_k055673.cpp
+++ b/src/mame/video/k053246_k053247_k055673.cpp
@@ -292,9 +292,9 @@ void k053247_device::k053247_sprites_draw_common( _BitmapClass &bitmap, const re
VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS
*/
- if (m_palette->shadows_enabled())
+ if (palette().shadows_enabled())
{
- if (sizeof(typename _BitmapClass::pixel_t) == 4 && (m_palette->hilights_enabled()))
+ if (sizeof(typename _BitmapClass::pixel_t) == 4 && (palette().hilights_enabled()))
shdmask = 3; // enable all shadows and highlights
else
shdmask = 0; // enable default shadows
@@ -505,8 +505,8 @@ void k053247_device::zdrawgfxzoom32GP(
src_fh = 16;
src_base = m_gfx->get_data(code % m_gfx->elements());
- pal_base = m_palette->pens() + m_gfx->colorbase() + (color % m_gfx->colors()) * granularity;
- shd_base = m_palette->shadow_table();
+ pal_base = palette().pens() + m_gfx->colorbase() + (color % m_gfx->colors()) * granularity;
+ shd_base = palette().shadow_table();
dst_ptr = &bitmap.pix32(0);
dst_pitch = bitmap.rowpixels();
@@ -914,7 +914,7 @@ k055673_device::k055673_device(const machine_config &mconfig, const char *tag, d
void k055673_device::device_start()
{
- int gfx_index;
+ int gfx_index = 0;
UINT32 total;
static const gfx_layout spritelayout = /* System GX sprite layout */
@@ -965,12 +965,6 @@ void k055673_device::device_start()
UINT16 *alt_k055673_rom;
int size4;
- /* find first empty slot to decode gfx */
- for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (m_gfxdecode->gfx(gfx_index) == nullptr)
- break;
- assert(gfx_index != MAX_GFX_ELEMENTS);
-
alt_k055673_rom = (UINT16 *)machine().root_device().memregion(m_memory_region)->base();
/* decode the graphics */
@@ -995,33 +989,33 @@ void k055673_device::device_start()
}
total = size4 / 128;
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout, 5);
+ konami_decode_gfx(*this, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout, 5);
break;
case K055673_LAYOUT_RNG:
total = machine().root_device().memregion(m_memory_region)->bytes() / (16*16/2);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout2, 4);
+ konami_decode_gfx(*this, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout2, 4);
break;
case K055673_LAYOUT_LE2:
total = machine().root_device().memregion(m_memory_region)->bytes() / (16*16);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout3, 8);
+ konami_decode_gfx(*this, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout3, 8);
break;
case K055673_LAYOUT_GX6:
total = machine().root_device().memregion(m_memory_region)->bytes() / (16*16*6/8);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout4, 6);
+ konami_decode_gfx(*this, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout4, 6);
break;
default:
fatalerror("Unsupported layout\n");
}
- if (VERBOSE && !(m_palette->shadows_enabled()))
+ if (VERBOSE && !(palette().shadows_enabled()))
popmessage("driver should use VIDEO_HAS_SHADOWS");
m_z_rejection = -1;
- m_gfx = m_gfxdecode->gfx(gfx_index);
+ m_gfx = gfx(gfx_index);
m_objcha_line = CLEAR_LINE;
m_ram = std::make_unique<UINT16[]>(0x1000/2);
@@ -1046,8 +1040,8 @@ const device_type K053246 = &device_creator<k053247_device>;
k053247_device::k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K053246, "K053246 & K053247 Sprite Generator", tag, owner, clock, "k053247", __FILE__),
device_video_interface(mconfig, *this),
- m_gfxdecode(*this),
- m_palette(*this)
+ device_gfx_interface(mconfig, *this),
+ m_gfx_num(0)
{
clear_all();
}
@@ -1055,33 +1049,13 @@ k053247_device::k053247_device(const machine_config &mconfig, const char *tag, d
k053247_device::k053247_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_video_interface(mconfig, *this),
- m_gfxdecode(*this),
- m_palette(*this)
+ device_gfx_interface(mconfig, *this, nullptr),
+ m_gfx_num(0)
{
clear_all();
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void k053247_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<k053247_device &>(device).m_gfxdecode.set_tag(tag);
-}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void k053247_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<k053247_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -1106,7 +1080,7 @@ void k053247_device::device_start()
{
case NORMAL_PLANE_ORDER:
total = machine().root_device().memregion(m_memory_region)->bytes() / 128;
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, m_gfx_num, machine().root_device().memregion(m_memory_region)->base(), total, &spritelayout, 4);
+ konami_decode_gfx(*this, m_gfx_num, machine().root_device().memregion(m_memory_region)->base(), total, &spritelayout, 4);
break;
default:
@@ -1117,17 +1091,17 @@ void k053247_device::device_start()
{
if (m_screen->format() == BITMAP_FORMAT_RGB32)
{
- if (!m_palette->shadows_enabled() || !m_palette->hilights_enabled())
+ if (!palette().shadows_enabled() || !palette().hilights_enabled())
popmessage("driver missing SHADOWS or HIGHLIGHTS flag");
}
else
{
- if (!(m_palette->shadows_enabled()))
+ if (!(palette().shadows_enabled()))
popmessage("driver should use VIDEO_HAS_SHADOWS");
}
}
- m_gfx = m_gfxdecode->gfx(m_gfx_num);
+ m_gfx = gfx(m_gfx_num);
m_ram = make_unique_clear<UINT16[]>(0x1000 / 2);
diff --git a/src/mame/video/k053246_k053247_k055673.h b/src/mame/video/k053246_k053247_k055673.h
index 96e41f00893..7fe1adc37f6 100644
--- a/src/mame/video/k053246_k053247_k055673.h
+++ b/src/mame/video/k053246_k053247_k055673.h
@@ -17,14 +17,14 @@ typedef device_delegate<void (int *code, int *color, int *priority_mask)> k05324
#define MCFG_K053246_CB(_class, _method) \
k053247_device::set_k053247_callback(*device, k053247_cb_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
-#define MCFG_K053246_CONFIG(_gfx_reg, _gfx_num, _order, _dx, _dy) \
- k053247_device::set_config(*device, _gfx_reg, _gfx_num, _order, _dx, _dy);
+#define MCFG_K053246_CONFIG(_gfx_reg, _order, _dx, _dy) \
+ k053247_device::set_config(*device, _gfx_reg, _order, _dx, _dy);
#define MCFG_K055673_CB(_class, _method) \
k053247_device::set_k053247_callback(*device, k053247_cb_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
-#define MCFG_K055673_CONFIG(_gfx_reg, _gfx_num, _order, _dx, _dy) \
- k053247_device::set_config(*device, _gfx_reg, _gfx_num, _order, _dx, _dy);
+#define MCFG_K055673_CONFIG(_gfx_reg, _order, _dx, _dy) \
+ k053247_device::set_config(*device, _gfx_reg, _order, _dx, _dy);
/** Konami 053246 / 053247 / 055673 **/
@@ -58,7 +58,8 @@ Callback procedures for non-standard shadows:
class k053247_device : public device_t,
- public device_video_interface
+ public device_video_interface,
+ public device_gfx_interface
{
public:
k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -67,14 +68,11 @@ public:
~k053247_device() { }
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_k053247_callback(device_t &device, k053247_cb_delegate callback) { downcast<k053247_device &>(device).m_k053247_cb = callback; }
- static void set_config(device_t &device, const char *gfx_reg, int gfx_num, int bpp, int dx, int dy)
+ static void set_config(device_t &device, const char *gfx_reg, int bpp, int dx, int dy)
{
k053247_device &dev = downcast<k053247_device &>(device);
dev.m_memory_region = gfx_reg;
- dev.m_gfx_num = gfx_num;
dev.m_bpp = bpp;
dev.m_dx = dx;
dev.m_dy = dy;
@@ -122,12 +120,9 @@ public:
k053247_cb_delegate m_k053247_cb;
- //FIXME: device should be updated to use device_gfx_interface to get rid of most of these!
const char *m_memory_region;
int m_gfx_num;
int m_bpp;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
/* alt implementation - to be collapsed */
void zdrawgfxzoom32GP(
@@ -280,14 +275,14 @@ public:
color = 0;
shadow = -1;
whichtable = shadowmode_table;
- m_palette->set_shadow_mode(0);
+ palette().set_shadow_mode(0);
}
else
{
if (shdmask >= 0)
{
shadow = (color & K053247_CUSTOMSHADOW) ? (color >> K053247_SHDSHIFT) : (shadow >> 10);
- if (shadow &= 3) m_palette->set_shadow_mode((shadow - 1) & shdmask);
+ if (shadow &= 3) palette().set_shadow_mode((shadow - 1) & shdmask);
}
else
shadow = 0;
@@ -502,20 +497,12 @@ extern const device_type K055673;
#define MCFG_K053246_SET_SCREEN MCFG_VIDEO_SET_SCREEN
-#define MCFG_K053246_GFXDECODE(_gfxtag) \
- k053247_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
-#define MCFG_K053246_PALETTE(_palette_tag) \
- k053247_device::static_set_palette_tag(*device, "^" _palette_tag);
+#define MCFG_K053246_PALETTE MCFG_GFX_PALETTE
#define MCFG_K055673_SET_SCREEN MCFG_VIDEO_SET_SCREEN
-#define MCFG_K055673_GFXDECODE(_gfxtag) \
- k055673_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
-#define MCFG_K055673_PALETTE(_palette_tag) \
- k055673_device::static_set_palette_tag(*device, "^" _palette_tag);
+#define MCFG_K055673_PALETTE MCFG_GFX_PALETTE
#endif
diff --git a/src/mame/video/k053250.cpp b/src/mame/video/k053250.cpp
index 09b59b99718..55896f2e9b6 100644
--- a/src/mame/video/k053250.cpp
+++ b/src/mame/video/k053250.cpp
@@ -7,7 +7,8 @@ const device_type K053250 = &device_creator<k053250_device>;
k053250_device::k053250_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K053250, "K053250 LVC", tag, owner, clock, "k053250", __FILE__),
device_gfx_interface(mconfig, *this),
- device_video_interface(mconfig, *this)
+ device_video_interface(mconfig, *this),
+ m_rom(*this, DEVICE_SELF)
{
}
@@ -20,18 +21,12 @@ void k053250_device::static_set_offsets(device_t &device, int offx, int offy)
void k053250_device::unpack_nibbles()
{
- if(!m_region)
- throw emu_fatalerror("k053250 %s: no associated region found\n", tag());
+ m_unpacked_rom.resize(m_rom.length()*2);
- const UINT8 *base = m_region->base();
- int size = m_region->bytes();
-
- m_unpacked_rom.resize(size*2);
-
- for(int i=0; i<size; i++)
+ for (int i = 0; i < m_rom.length(); i++)
{
- m_unpacked_rom[2*i] = base[i] >> 4;
- m_unpacked_rom[2*i+1] = base[i] & 0xf;
+ m_unpacked_rom[2*i] = m_rom[i] >> 4;
+ m_unpacked_rom[2*i+1] = m_rom[i] & 0xf;
}
}
@@ -461,5 +456,5 @@ WRITE16_MEMBER(k053250_device::ram_w)
READ16_MEMBER(k053250_device::rom_r)
{
- return m_region->base()[0x80000 * m_regs[6] + 0x800 * m_regs[7] + offset/2];
+ return m_rom[0x80000 * m_regs[6] + 0x800 * m_regs[7] + offset/2];
}
diff --git a/src/mame/video/k053250.h b/src/mame/video/k053250.h
index 610c8577507..2e5e956aa4b 100644
--- a/src/mame/video/k053250.h
+++ b/src/mame/video/k053250.h
@@ -42,6 +42,7 @@ private:
int m_offx, m_offy;
// internal state
+ required_region_ptr<UINT8> m_rom;
dynamic_buffer m_unpacked_rom;
std::vector<UINT16> m_ram;
UINT16 *m_buffer[2];
diff --git a/src/mame/video/k054156_k054157_k056832.cpp b/src/mame/video/k054156_k054157_k056832.cpp
index 9167a3e571a..0511b8b8913 100644
--- a/src/mame/video/k054156_k054157_k056832.cpp
+++ b/src/mame/video/k054156_k054157_k056832.cpp
@@ -183,14 +183,14 @@ const device_type K056832 = &device_creator<k056832_device>;
k056832_device::k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K056832, "K056832 Tilemap Generator", tag, owner, clock, "k056832", __FILE__),
+ device_gfx_interface(mconfig, *this),
//m_tilemap[K056832_PAGE_COUNT],
//*m_pixmap[K056832_PAGE_COUNT],
//m_regs[0x20],
//m_regsb[4],
- m_rombase(nullptr),
+ m_rombase(*this),
m_num_gfx_banks(0),
m_cur_gfx_banks(0),
- m_gfx_memory_region(nullptr),
m_gfx_num(0),
m_bpp(-1),
m_big(0),
@@ -219,33 +219,10 @@ k056832_device::k056832_device(const machine_config &mconfig, const char *tag, d
m_use_ext_linescroll(0),
m_uses_tile_banks(0),
m_cur_tile_bank(0),
- m_k055555(nullptr),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_k055555(nullptr)
{
}
-//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void k056832_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<k056832_device &>(device).m_gfxdecode.set_tag(tag);
-}
-
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void k056832_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<k056832_device &>(device).m_palette.set_tag(tag);
-}
-
void k056832_device::create_tilemaps()
{
tilemap_t *tmap;
@@ -284,22 +261,22 @@ void k056832_device::create_tilemaps()
m_videoram.resize(0x2000 * (K056832_PAGE_COUNT + 1) / 2);
memset(&m_videoram[0], 0, 2*m_videoram.size());
- m_tilemap[0x0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info0),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info1),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info2),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x3] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info3),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x4] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info4),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x5] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info5),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x6] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info6),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x7] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info7),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x8] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info8),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x9] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info9),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xa] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoa),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xb] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infob),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xc] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoc),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xd] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infod),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xe] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoe),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xf] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infof),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info0),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info1),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info2),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x3] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info3),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x4] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info4),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x5] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info5),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x6] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info6),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x7] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info7),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x8] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info8),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x9] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info9),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xa] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoa),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xb] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infob),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xc] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoc),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xd] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infod),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xe] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoe),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xf] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infof),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
for (i = 0; i < K056832_PAGE_COUNT; i++)
{
@@ -362,9 +339,6 @@ void k056832_device::finalize_init()
void k056832_device::device_start()
{
- if(!m_gfxdecode->started())
- throw device_missing_dependencies();
-
memset(m_regs, 0x00, sizeof(m_regs) );
memset(m_regsb, 0x00, sizeof(m_regsb) );
@@ -374,7 +348,7 @@ void k056832_device::device_start()
/* TODO: understand which elements MUST be init here (to keep correct layer
associations) and which ones can can be init at RESET, if any */
- create_gfx(m_gfx_memory_region, m_bpp, m_big);
+ create_gfx();
create_tilemaps();
@@ -635,11 +609,8 @@ void k056832_device::SetExtLinescroll( )
/* generic helper routine for ROM checksumming */
int k056832_device::rom_read_b( int offset, int blksize, int blksize2, int zerosec )
{
- UINT8 *rombase;
int base, ret;
- rombase = (UINT8 *)machine().root_device().memregion(m_gfx_memory_region)->base();
-
if ((m_rom_half) && (zerosec))
{
return 0;
@@ -656,11 +627,11 @@ int k056832_device::rom_read_b( int offset, int blksize, int blksize2, int zeros
if (m_rom_half)
{
- ret = rombase[base + 1];
+ ret = m_rombase[base + 1];
}
else
{
- ret = rombase[base];
+ ret = m_rombase[base];
m_rom_half = 1;
}
@@ -722,9 +693,6 @@ READ16_MEMBER( k056832_device::rom_word_r )
{
int addr = 0x2000 * m_cur_gfx_banks + 2 * offset;
- if (!m_rombase)
- m_rombase = space.machine().root_device().memregion(m_gfx_memory_region)->base();
-
return m_rombase[addr + 1] | (m_rombase[addr] << 8);
}
@@ -735,9 +703,6 @@ READ16_MEMBER( k056832_device::mw_rom_word_r )
int bank = 10240 * m_cur_gfx_banks;
int addr;
- if (!m_rombase)
- m_rombase = space.machine().root_device().memregion(m_gfx_memory_region)->base();
-
if (m_regsb[2] & 0x8)
{
// we want only the 2s
@@ -797,9 +762,6 @@ READ16_MEMBER( k056832_device::bishi_rom_word_r )
{
int addr = 0x4000 * m_cur_gfx_banks + offset;
- if (!m_rombase)
- m_rombase = space.machine().root_device().memregion(m_gfx_memory_region)->base();
-
return m_rombase[addr + 2] | (m_rombase[addr] << 8);
}
@@ -807,9 +769,6 @@ READ16_MEMBER( k056832_device::rom_word_8000_r )
{
int addr = 0x8000 * m_cur_gfx_banks + 2 * offset;
- if (!m_rombase)
- m_rombase = space.machine().root_device().memregion(m_gfx_memory_region)->base();
-
return m_rombase[addr + 2] | (m_rombase[addr] << 8);
}
@@ -817,9 +776,6 @@ READ16_MEMBER( k056832_device::old_rom_word_r )
{
int addr = 0x2000 * m_cur_gfx_banks + 2 * offset;
- if (!m_rombase)
- m_rombase = space.machine().root_device().memregion(m_gfx_memory_region)->base();
-
return m_rombase[addr + 1] | (m_rombase[addr] << 8);
}
@@ -1296,7 +1252,7 @@ int k056832_device::update_linemap( screen_device &screen, _BitmapClass &bitmap,
pixmap = m_pixmap[page];
pal_ptr = machine().pens;
- src_gfx = m_gfxdecode->gfx(m_gfx_num];
+ src_gfx = gfx(m_gfx_num);
src_pitch = src_gfx->rowbytes();
src_modulo = src_gfx->char_modulo;
dst_pitch = pixmap->rowpixels;
@@ -2022,9 +1978,9 @@ READ16_MEMBER( k056832_device::b_word_r )
/***************************************************************************/
-void k056832_device::create_gfx(const char *gfx_memory_region, int bpp, int big)
+void k056832_device::create_gfx()
{
- int gfx_index;
+ int gfx_index = 0;
int i;
UINT32 total;
@@ -2090,68 +2046,57 @@ void k056832_device::create_gfx(const char *gfx_memory_region, int bpp, int big)
8*8*4
};
- m_bpp = bpp;
-
- /* find first empty slot to decode gfx */
- for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- {
- if (m_gfxdecode->gfx(gfx_index) == nullptr) break;
- }
- assert(gfx_index != MAX_GFX_ELEMENTS);
-
/* handle the various graphics formats */
- i = (big) ? 8 : 16;
+ i = (m_big) ? 8 : 16;
/* decode the graphics */
- switch (bpp)
+ switch (m_bpp)
{
case K056832_BPP_4:
- total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*4);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout4, 4);
+ total = m_rombase.bytes() / (i*4);
+ konami_decode_gfx(*this, gfx_index, &m_rombase[0], total, &charlayout4, 4);
break;
case K056832_BPP_5:
- total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*5);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout5, 5);
+ total = m_rombase.bytes() / (i*5);
+ konami_decode_gfx(*this, gfx_index, &m_rombase[0], total, &charlayout5, 5);
break;
case K056832_BPP_6:
- total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*6);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout6, 6);
+ total = m_rombase.bytes() / (i*6);
+ konami_decode_gfx(*this, gfx_index, &m_rombase[0], total, &charlayout6, 6);
break;
case K056832_BPP_8:
- total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8, 8);
+ total = m_rombase.bytes() / (i*8);
+ konami_decode_gfx(*this, gfx_index, &m_rombase[0], total, &charlayout8, 8);
break;
case K056832_BPP_8LE:
- total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8le, 8);
+ total = m_rombase.bytes() / (i*8);
+ konami_decode_gfx(*this, gfx_index, &m_rombase[0], total, &charlayout8le, 8);
break;
case K056832_BPP_8TASMAN:
- total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8, 8);
+ total = m_rombase.bytes() / (i*8);
+ konami_decode_gfx(*this, gfx_index, &m_rombase[0], total, &charlayout8, 8);
break;
case K056832_BPP_4dj:
- total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*4);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout4dj, 4);
+ total = m_rombase.bytes() / (i*4);
+ konami_decode_gfx(*this, gfx_index, &m_rombase[0], total, &charlayout4dj, 4);
break;
default:
fatalerror("Unsupported bpp\n");
}
- m_gfxdecode->gfx(gfx_index)->set_granularity(16); /* override */
- m_gfxdecode->gfx(gfx_index)->set_colors(m_palette->entries() / 16);
+ gfx(gfx_index)->set_granularity(16); /* override */
+ gfx(gfx_index)->set_colors(palette().entries() / 16);
- m_gfx_memory_region = gfx_memory_region;
m_gfx_num = gfx_index;
- m_rombase = machine().root_device().memregion(gfx_memory_region)->base();
- m_num_gfx_banks = machine().root_device().memregion(gfx_memory_region)->bytes() / 0x2000;
+ m_num_gfx_banks = m_rombase.bytes() / 0x2000;
m_cur_gfx_banks = 0;
m_use_ext_linescroll = 0;
m_uses_tile_banks = 0;
@@ -2225,7 +2170,7 @@ int k056832_device::altK056832_update_linemap(screen_device &screen, bitmap_rgb3
pixmap = m_pixmap[page];
pal_ptr = machine().pens;
- src_gfx = m_gfxdecode->gfx(m_gfx_num];
+ src_gfx = gfx(m_gfx_num);
src_pitch = src_gfx->rowbytes();
src_modulo = src_gfx->char_modulo;
dst_pitch = pixmap->rowpixels;
diff --git a/src/mame/video/k054156_k054157_k056832.h b/src/mame/video/k054156_k054157_k056832.h
index d043a4f9525..ce6ed1945d5 100644
--- a/src/mame/video/k054156_k054157_k056832.h
+++ b/src/mame/video/k054156_k054157_k056832.h
@@ -16,8 +16,8 @@ typedef device_delegate<void (int layer, int *code, int *color, int *flags)> k05
#define MCFG_K056832_CB(_class, _method) \
k056832_device::set_k056832_callback(*device, k056832_cb_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
-#define MCFG_K056832_CONFIG(_gfx_reg, _gfx_num, _bpp, _big, _djmain_hack, _k055555) \
- k056832_device::set_config(*device, _gfx_reg, _gfx_num, _bpp, _big, _djmain_hack, _k055555);
+#define MCFG_K056832_CONFIG(_gfx_reg, _bpp, _big, _djmain_hack, _k055555) \
+ k056832_device::set_config(*device, "^" _gfx_reg, _bpp, _big, _djmain_hack, _k055555);
#define K056832_PAGE_COUNT 16
@@ -35,7 +35,7 @@ typedef device_delegate<void (int layer, int *code, int *color, int *flags)> k05
#define K056382_DRAW_FLAG_FORCE_XYSCROLL 0x00800000
-class k056832_device : public device_t
+class k056832_device : public device_t, public device_gfx_interface
{
public:
k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -45,21 +45,16 @@ public:
}
static void set_k056832_callback(device_t &device, k056832_cb_delegate callback) { downcast<k056832_device &>(device).m_k056832_cb = callback; }
- static void set_config(device_t &device, const char *gfx_reg, int gfx_num, int bpp, int big, int djmain_hack, const char *k055555)
+ static void set_config(device_t &device, const char *gfx_reg, int bpp, int big, int djmain_hack, const char *k055555)
{
k056832_device &dev = downcast<k056832_device &>(device);
- dev.m_gfx_memory_region = gfx_reg;
- dev.m_gfx_num = gfx_num;
+ dev.m_rombase.set_tag(gfx_reg);
dev.m_bpp = bpp;
dev.m_big = big;
dev.m_djmain_hack = djmain_hack;
dev.m_k055555_tag = k055555;
}
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
-
void SetExtLinescroll(); /* Lethal Enforcers */
DECLARE_READ16_MEMBER( ram_word_r );
@@ -132,15 +127,13 @@ private:
UINT16 m_regs[0x20]; // 157/832 regs group 1
UINT16 m_regsb[4]; // 157/832 regs group 2, board dependent
- UINT8 * m_rombase; // pointer to tile gfx data
+ required_region_ptr<UINT8> m_rombase; // pointer to tile gfx data
int m_num_gfx_banks; // depends on size of graphics ROMs
int m_cur_gfx_banks; // cached info for K056832_regs[0x1a]
k056832_cb_delegate m_k056832_cb;
- //FIXME: device should be updated to use device_gfx_interface to get rid of most of these!
- const char *m_gfx_memory_region;
int m_gfx_num;
int m_bpp;
int m_big;
@@ -215,13 +208,10 @@ private:
template<class _BitmapClass>
void tilemap_draw_common(screen_device &screen, _BitmapClass &bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority);
- void create_gfx(const char *gfx_memory_region, int bpp, int big);
+ void create_gfx();
void create_tilemaps();
void finalize_init();
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
-
public:
void m_tilemap_draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority);
@@ -234,11 +224,8 @@ extern const device_type K056832;
-#define MCFG_K056832_GFXDECODE(_gfxtag) \
- k056832_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
#define MCFG_K056832_PALETTE(_palette_tag) \
- k056832_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
#endif
diff --git a/src/mame/video/kan_pand.cpp b/src/mame/video/kan_pand.cpp
index 181de04020d..a1f43a21a7f 100644
--- a/src/mame/video/kan_pand.cpp
+++ b/src/mame/video/kan_pand.cpp
@@ -60,8 +60,7 @@ kaneko_pandora_device::kaneko_pandora_device(const machine_config &mconfig, cons
m_gfx_region(0),
m_xoffset(0),
m_yoffset(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -76,16 +75,6 @@ void kaneko_pandora_device::static_set_gfxdecode_tag(device_t &device, const cha
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void kaneko_pandora_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<kaneko_pandora_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
diff --git a/src/mame/video/kan_pand.h b/src/mame/video/kan_pand.h
index f29c5ef3605..a9cb3d3e7f2 100644
--- a/src/mame/video/kan_pand.h
+++ b/src/mame/video/kan_pand.h
@@ -24,7 +24,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int gfxregion) { downcast<kaneko_pandora_device &>(device).m_gfx_region = gfxregion; }
static void set_offsets(device_t &device, int x_offset, int y_offset)
{
@@ -59,7 +58,6 @@ private:
int m_xoffset;
int m_yoffset;
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type KANEKO_PANDORA;
@@ -78,7 +76,4 @@ extern const device_type KANEKO_PANDORA;
#define MCFG_KANEKO_PANDORA_GFXDECODE(_gfxtag) \
kaneko_pandora_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_KANEKO_PANDORA_PALETTE(_palette_tag) \
- kaneko_pandora_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif /* __KAN_PAND_H__ */
diff --git a/src/mame/video/konami_helper.cpp b/src/mame/video/konami_helper.cpp
index e26864a814b..236371fb4d6 100644
--- a/src/mame/video/konami_helper.cpp
+++ b/src/mame/video/konami_helper.cpp
@@ -5,13 +5,14 @@
#include "emu.h"
#include "konami_helper.h"
-void konami_decode_gfx(running_machine &machine, gfxdecode_device * gfxdecode, palette_device &palette, int gfx_index, UINT8 *data, UINT32 total, const gfx_layout *layout, int bpp)
+void konami_decode_gfx(device_gfx_interface &gfxdecode, int gfx_index, UINT8 *data, UINT32 total, const gfx_layout *layout, int bpp)
{
gfx_layout gl;
+ palette_device &palette = gfxdecode.palette();
memcpy(&gl, layout, sizeof(gl));
gl.total = total;
- gfxdecode->set_gfx(gfx_index, std::make_unique<gfx_element>(palette, gl, data, 0, palette.entries() >> bpp, 0));
+ gfxdecode.set_gfx(gfx_index, std::make_unique<gfx_element>(palette, gl, data, 0, palette.entries() >> bpp, 0));
}
diff --git a/src/mame/video/konami_helper.h b/src/mame/video/konami_helper.h
index 0938217e778..e1afd95aada 100644
--- a/src/mame/video/konami_helper.h
+++ b/src/mame/video/konami_helper.h
@@ -6,7 +6,7 @@
#ifndef __KONAMI_HELPER_H__
#define __KONAMI_HELPER_H__
-void konami_decode_gfx(running_machine &machine, gfxdecode_device * gfxdecode, palette_device &palette, int gfx_index, UINT8 *data, UINT32 total, const gfx_layout *layout, int bpp);
+void konami_decode_gfx(device_gfx_interface &gfxdecode, int gfx_index, UINT8 *data, UINT32 total, const gfx_layout *layout, int bpp);
/* helper function to sort three tile layers by priority order */
void konami_sortlayers3(int *layer, int *pri);
diff --git a/src/mame/video/mystwarr.cpp b/src/mame/video/mystwarr.cpp
index 537cd1e8157..8fc30620790 100644
--- a/src/mame/video/mystwarr.cpp
+++ b/src/mame/video/mystwarr.cpp
@@ -52,7 +52,7 @@ void mystwarr_state::decode_tiles()
d += 5;
}
- m_gfxdecode->gfx(gfxnum)->set_source(m_decoded.get());
+ m_k056832->gfx(gfxnum)->set_source(m_decoded.get());
}
diff --git a/src/mame/video/pc080sn.cpp b/src/mame/video/pc080sn.cpp
index 62736eecae8..54101789fa9 100644
--- a/src/mame/video/pc080sn.cpp
+++ b/src/mame/video/pc080sn.cpp
@@ -58,8 +58,7 @@ pc080sn_device::pc080sn_device(const machine_config &mconfig, const char *tag, d
m_y_offset(0),
m_y_invert(0),
m_dblwidth(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
for (auto & elem : m_ctrl)
elem = 0;
@@ -84,16 +83,6 @@ void pc080sn_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void pc080sn_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<pc080sn_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
diff --git a/src/mame/video/pc080sn.h b/src/mame/video/pc080sn.h
index b181fbd134e..a63cdfd6915 100644
--- a/src/mame/video/pc080sn.h
+++ b/src/mame/video/pc080sn.h
@@ -11,7 +11,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int gfxregion) { downcast<pc080sn_device &>(device).m_gfxnum = gfxregion; }
static void set_yinvert(device_t &device, int y_inv) { downcast<pc080sn_device &>(device).m_y_invert = y_inv; }
static void set_dblwidth(device_t &device, int dblwidth) { downcast<pc080sn_device &>(device).m_dblwidth = dblwidth; }
@@ -68,7 +67,6 @@ public:
int m_dblwidth;
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type PC080SN;
@@ -89,7 +87,4 @@ extern const device_type PC080SN;
#define MCFG_PC080SN_GFXDECODE(_gfxtag) \
pc080sn_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_PC080SN_PALETTE(_palette_tag) \
- pc080sn_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif
diff --git a/src/mame/video/pcd.cpp b/src/mame/video/pcd.cpp
index 66d4b288347..cd453cffa14 100644
--- a/src/mame/video/pcd.cpp
+++ b/src/mame/video/pcd.cpp
@@ -10,11 +10,10 @@ const device_type PCX_VIDEO = &device_creator<pcx_video_device>;
pcdx_video_device::pcdx_video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_gfx_interface(mconfig, *this, nullptr, "palette"),
m_maincpu(*this, ":maincpu"),
m_mcu(*this, "graphics"),
m_crtc(*this, "crtc"),
- m_palette(*this, "palette"),
- m_gfxdecode(*this, "gfxdecode"),
m_pic2(*this, ":pic2")
{
}
@@ -76,7 +75,7 @@ static const gfx_layout pcd_charlayout =
};
static GFXDECODE_START( pcx )
- GFXDECODE_ENTRY( "char", 0x0000, pcd_charlayout, 0, 1 )
+ GFXDECODE_DEVICE( "char", 0x0000, pcd_charlayout, 0, 1 )
GFXDECODE_END
static INPUT_PORTS_START( pcd_mouse )
@@ -113,7 +112,6 @@ static MACHINE_CONFIG_FRAGMENT( pcd_video )
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_UPDATE_DEVICE("crtc", scn2674_device, screen_update)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_PALETTE_ADD("palette", 3)
MCFG_PALETTE_INIT_OWNER(pcdx_video_device, pcdx)
@@ -159,7 +157,6 @@ static MACHINE_CONFIG_FRAGMENT( pcx_video )
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_UPDATE_DEVICE("crtc", scn2674_device, screen_update)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", pcx)
MCFG_PALETTE_ADD_MONOCHROME("palette")
MCFG_SCN2674_VIDEO_ADD("crtc", 0, INPUTLINE("graphics", MCS51_INT0_LINE));
@@ -184,7 +181,7 @@ SCN2674_DRAW_CHARACTER_MEMBER(pcd_video_device::display_pixels)
if(m_p2 & 8)
data = ~data;
for(int i = 0; i < 16; i++)
- bitmap.pix32(y, x + i) = m_palette->pen((data & (1 << (15 - i))) ? 1 : 0);
+ bitmap.pix32(y, x + i) = palette().pen((data & (1 << (15 - i))) ? 1 : 0);
}
else
{
@@ -207,7 +204,7 @@ SCN2674_DRAW_CHARACTER_MEMBER(pcd_video_device::display_pixels)
else if(attr & 8)
bgnd = 2;
for(int i = 0; i < 8; i++)
- bitmap.pix32(y, x + i) = m_palette->pen((data & (1 << (7 - i))) ? fgnd : bgnd);
+ bitmap.pix32(y, x + i) = palette().pen((data & (1 << (7 - i))) ? fgnd : bgnd);
}
}
@@ -221,7 +218,7 @@ SCN2674_DRAW_CHARACTER_MEMBER(pcx_video_device::display_pixels)
if(m_p1 & 0x20)
data = ~data;
for(int i = 0; i < 8; i++)
- bitmap.pix32(y, x + i) = m_palette->pen((data & (1 << (7 - i))) ? 1 : 0);
+ bitmap.pix32(y, x + i) = palette().pen((data & (1 << (7 - i))) ? 1 : 0);
}
PALETTE_INIT_MEMBER(pcdx_video_device, pcdx)
@@ -276,7 +273,7 @@ WRITE8_MEMBER(pcd_video_device::vram_w)
{
offset >>= 1;
m_charram[offset & 0x1fff] = data;
- m_gfxdecode->gfx(0)->mark_dirty(offset/16);
+ gfx(0)->mark_dirty(offset/16);
}
}
@@ -410,7 +407,7 @@ void pcd_video_device::device_start()
{
m_maincpu->space(AS_IO).install_readwrite_handler(0xfb00, 0xfb01, 0, 0, read8_delegate(FUNC(pcdx_video_device::detect_r), this), write8_delegate(FUNC(pcdx_video_device::detect_w), this), 0xff00);
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf0000, 0xf7fff, 0, 0, read8_delegate(FUNC(pcd_video_device::vram_r), this), write8_delegate(FUNC(pcd_video_device::vram_w), this), 0xffff);
- m_gfxdecode->set_gfx(0, std::make_unique<gfx_element>(m_palette, pcd_charlayout, &m_charram[0], 0, 1, 0));
+ set_gfx(0, std::make_unique<gfx_element>(palette(), pcd_charlayout, &m_charram[0], 0, 1, 0));
}
void pcd_video_device::device_reset()
@@ -442,6 +439,8 @@ void pcx_video_device::device_start()
mcu->i8051_set_serial_rx_callback(READ8_DELEGATE(pcx_video_device, rx_callback));
set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1);
set_rate(600*2); // FIXME: fix the keyboard when the mc2661 baud rate calc is fixed
+
+ decode_gfx(GFXDECODE_NAME(pcx));
}
void pcx_video_device::device_reset()
diff --git a/src/mame/video/pcd.h b/src/mame/video/pcd.h
index f22c2707569..32637fac992 100644
--- a/src/mame/video/pcd.h
+++ b/src/mame/video/pcd.h
@@ -11,7 +11,7 @@
#define MCFG_PCX_VIDEO_TXD_HANDLER(_devcb) \
devcb = &pcx_video_device::set_txd_handler(*device, DEVCB_##_devcb);
-class pcdx_video_device : public device_t
+class pcdx_video_device : public device_t, public device_gfx_interface
{
public:
pcdx_video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
@@ -25,8 +25,6 @@ protected:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_mcu;
required_device<scn2674_device> m_crtc;
- required_device<palette_device> m_palette;
- required_device<gfxdecode_device> m_gfxdecode;
required_device<pic8259_device> m_pic2;
};
diff --git a/src/mame/video/powervr2.cpp b/src/mame/video/powervr2.cpp
index 1b68402c493..8834730ad20 100644
--- a/src/mame/video/powervr2.cpp
+++ b/src/mame/video/powervr2.cpp
@@ -2016,7 +2016,7 @@ WRITE64_MEMBER( powervr2_device::ta_fifo_poly_w )
}
else
{
- fatalerror("ta_fifo_poly_w: Only 64 bit writes supported!\n");
+ osd_printf_debug("%s",string_format("ta_fifo_poly_w: Unmapped write64 %08x = %I64x mask %I64x\n", 0x10000000+offset*8, data, mem_mask).c_str());
}
tafifo_pos &= tafifo_mask;
diff --git a/src/mame/video/sega16sp.cpp b/src/mame/video/sega16sp.cpp
index 3629072e2e5..8f5e8e6de75 100644
--- a/src/mame/video/sega16sp.cpp
+++ b/src/mame/video/sega16sp.cpp
@@ -96,6 +96,7 @@ WRITE16_MEMBER( sega_16bit_sprite_device::draw_write )
sega_hangon_sprite_device::sega_hangon_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: sega_16bit_sprite_device(mconfig, SEGA_HANGON_SPRITES, "Sega Custom Sprites (Hang On)", tag, owner, "sega_hangon_sprite", __FILE__)
+ , m_sprite_region_ptr(*this, DEVICE_SELF)
{
set_local_origin(189, -1);
}
@@ -141,8 +142,8 @@ void sega_hangon_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip
//
// render the sprites in order
- const UINT16 *spritebase = reinterpret_cast<const UINT16 *>(region()->base());
- UINT8 numbanks = region()->bytes() / 0x10000;
+ const UINT16 *spritebase = &m_sprite_region_ptr[0];
+ UINT8 numbanks = m_sprite_region_ptr.bytes() / 0x10000;
const UINT8 *zoom = memregion("zoom")->base();
UINT16 *ramend = spriteram() + spriteram_elements();
for (UINT16 *data = spriteram(); data < ramend; data += 8)
@@ -272,6 +273,7 @@ void sega_hangon_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip
sega_sharrier_sprite_device::sega_sharrier_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: sega_16bit_sprite_device(mconfig, SEGA_SHARRIER_SPRITES, "Sega Custom Sprites (Space Harrier)", tag, owner, "sega_sharrier_sprite", __FILE__)
+ , m_sprite_region_ptr(*this, DEVICE_SELF)
{
set_local_origin(189, -1);
}
@@ -320,8 +322,8 @@ void sega_sharrier_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &cl
//
// render the sprites in order
- const UINT32 *spritebase = reinterpret_cast<const UINT32 *>(region()->base());
- UINT8 numbanks = region()->bytes() / 0x20000;
+ const UINT32 *spritebase = &m_sprite_region_ptr[0];
+ UINT8 numbanks = m_sprite_region_ptr.bytes() / 0x20000;
const UINT8 *zoom = memregion("zoom")->base();
UINT16 *ramend = spriteram() + spriteram_elements();
for (UINT16 *data = spriteram(); data < ramend; data += 8)
@@ -459,6 +461,7 @@ void sega_sharrier_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &cl
sega_sys16a_sprite_device::sega_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: sega_16bit_sprite_device(mconfig, SEGA_SYS16A_SPRITES, "Sega System 16A Sprites", tag, owner, "sega_sys16a_sprite", __FILE__)
+ , m_sprite_region_ptr(*this, DEVICE_SELF)
{
set_local_origin(189, -1, -189, -1);
}
@@ -503,8 +506,8 @@ void sega_sys16a_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip
//
// render the sprites in order
- const UINT16 *spritebase = reinterpret_cast<const UINT16 *>(region()->base());
- UINT8 numbanks = region()->bytes() / 0x10000;
+ const UINT16 *spritebase = &m_sprite_region_ptr[0];
+ UINT8 numbanks = m_sprite_region_ptr.bytes() / 0x10000;
UINT16 *ramend = spriteram() + spriteram_elements();
for (UINT16 *data = spriteram(); data < ramend; data += 8)
{
@@ -638,6 +641,7 @@ void sega_sys16a_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip
bootleg_sys16a_sprite_device::bootleg_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: sega_16bit_sprite_device(mconfig, BOOTLEG_SYS16A_SPRITES, "Sega System 16A Sprites (Bootleg)", tag, owner, "bootleg_sys16a_sprite", __FILE__)
+ , m_sprite_region_ptr(*this, DEVICE_SELF)
{
m_addrmap[0] = 0;
m_addrmap[1] = 1;
@@ -689,8 +693,8 @@ void bootleg_sys16a_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &c
//
// render the sprites in order
- const UINT16 *spritebase = reinterpret_cast<const UINT16 *>(region()->base());
- UINT8 numbanks = region()->bytes() / 0x10000;
+ const UINT16 *spritebase = &m_sprite_region_ptr[0];
+ UINT8 numbanks = m_sprite_region_ptr.bytes() / 0x10000;
UINT16 *ramend = spriteram() + spriteram_elements();
for (UINT16 *data = spriteram(); data < ramend; data += 8)
{
@@ -826,7 +830,7 @@ void bootleg_sys16a_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &c
sega_sys16b_sprite_device::sega_sys16b_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: sega_16bit_sprite_device(mconfig, SEGA_SYS16B_SPRITES, "Sega System 16B Sprites", tag, owner, "sega_16bit_sprite", __FILE__)
- , m_sprite_region_ptr(*this, ":sprites")
+ , m_sprite_region_ptr(*this, DEVICE_SELF)
{
set_local_origin(184, 0x00, -184, 0);
}
@@ -1022,14 +1026,16 @@ void sega_sys16b_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip
sega_outrun_sprite_device::sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: sega_16bit_sprite_device(mconfig, SEGA_OUTRUN_SPRITES, "Sega Custom Sprites (Out Run)", tag, owner, "sega_outrun_sprite", __FILE__),
- m_is_xboard(false)
+ m_is_xboard(false),
+ m_sprite_region_ptr(*this, DEVICE_SELF)
{
set_local_origin(189, 0x00);
}
sega_outrun_sprite_device::sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock, bool xboard_variant, const char *shortname, const char *source)
: sega_16bit_sprite_device(mconfig, SEGA_XBOARD_SPRITES, "Sega X-Board Sprites", tag, owner, shortname, source),
- m_is_xboard(true)
+ m_is_xboard(true),
+ m_sprite_region_ptr(*this, DEVICE_SELF)
{
set_local_origin(190, 0x00);
}
@@ -1090,8 +1096,8 @@ void sega_outrun_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip
set_origin(m_xoffs, m_yoffs);
// render the sprites in order
- const UINT32 *spritebase = reinterpret_cast<const UINT32 *>(region()->base());
- UINT8 numbanks = region()->bytes() / 0x40000;
+ const UINT32 *spritebase = &m_sprite_region_ptr[0];
+ UINT8 numbanks = m_sprite_region_ptr.bytes() / 0x40000;
UINT16 *ramend = buffer() + spriteram_elements();
for (UINT16 *data = buffer(); data < ramend; data += 8)
{
@@ -1235,6 +1241,7 @@ void sega_outrun_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip
sega_yboard_sprite_device::sega_yboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: sega_16bit_sprite_device(mconfig, SEGA_YBOARD_SPRITES, "Sega Y-Board Sprites", tag, owner, "sega_yboard_sprite", __FILE__)
+ , m_sprite_region_ptr(*this, DEVICE_SELF)
{
set_local_origin(0x600, 0x600);
}
@@ -1293,8 +1300,8 @@ void sega_yboard_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip
memset(visited, 0, sizeof(visited));
// render the sprites in order
- const UINT64 *spritebase = reinterpret_cast<const UINT64 *>(region()->base());
- UINT8 numbanks = region()->bytes() / 0x80000;
+ const UINT64 *spritebase = &m_sprite_region_ptr[0];
+ UINT8 numbanks = m_sprite_region_ptr.bytes() / 0x80000;
int next = 0;
for (UINT16 *data = spriteram(); !(data[0] & 0x8000) && !visited[next]; data = spriteram() + next * 8)
{
diff --git a/src/mame/video/sega16sp.h b/src/mame/video/sega16sp.h
index ed758b1299f..e5f50143ba1 100644
--- a/src/mame/video/sega16sp.h
+++ b/src/mame/video/sega16sp.h
@@ -130,6 +130,9 @@ public:
protected:
// subclass overrides
virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect) override;
+
+ // memory regions
+ required_region_ptr<UINT16> m_sprite_region_ptr;
};
@@ -144,6 +147,9 @@ public:
protected:
// subclass overrides
virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect) override;
+
+ // memory regions
+ required_region_ptr<UINT32> m_sprite_region_ptr;
};
@@ -157,11 +163,13 @@ public:
protected:
sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock, bool xboard_variant, const char *shortname, const char *source);
+protected:
// subclass overrides
virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect) override;
// configuration
bool m_is_xboard;
+ required_region_ptr<UINT32> m_sprite_region_ptr;
};
class sega_xboard_sprite_device : public sega_outrun_sprite_device
@@ -183,6 +191,9 @@ public:
protected:
// subclass overrides
virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect) override;
+
+ // memory regions
+ required_region_ptr<UINT16> m_sprite_region_ptr;
};
@@ -201,6 +212,9 @@ protected:
// subclass overrides
virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect) override;
+ // memory regions
+ required_region_ptr<UINT16> m_sprite_region_ptr;
+
// internal state
UINT8 m_addrmap[8];
};
@@ -236,7 +250,8 @@ protected:
// subclass overrides
virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect) override;
- rotate_info* m_segaic16_rotate;
+ required_region_ptr<UINT64> m_sprite_region_ptr;
+ rotate_info* m_segaic16_rotate;
};
diff --git a/src/mame/video/segaic24.cpp b/src/mame/video/segaic24.cpp
index 57c848287dc..f1e1f87aae9 100644
--- a/src/mame/video/segaic24.cpp
+++ b/src/mame/video/segaic24.cpp
@@ -25,31 +25,11 @@ const device_type S24MIXER = &device_creator<segas24_mixer>;
segas24_tile::segas24_tile(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, S24TILE, "Sega System 24 Tilemap", tag, owner, clock, "segas24_tile", __FILE__),
- m_gfxdecode(*this),
- m_palette(*this)
+ device_gfx_interface(mconfig, *this),
+ char_gfx_index(0)
{
}
-//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void segas24_tile::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<segas24_tile &>(device).m_gfxdecode.set_tag(tag);
-}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void segas24_tile::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<segas24_tile &>(device).m_palette.set_tag(tag);
-}
-
void segas24_tile::static_set_tile_mask(device_t &device, UINT16 _tile_mask)
{
@@ -96,21 +76,13 @@ TILE_GET_INFO_MEMBER(segas24_tile::tile_info_1w)
void segas24_tile::device_start()
{
- if(!m_gfxdecode->started())
- throw device_missing_dependencies();
-
- for(char_gfx_index = 0; char_gfx_index < MAX_GFX_ELEMENTS; char_gfx_index++)
- if (m_gfxdecode->gfx(char_gfx_index) == nullptr)
- break;
- assert(char_gfx_index != MAX_GFX_ELEMENTS);
-
char_ram = std::make_unique<UINT16[]>(0x80000/2);
tile_ram = std::make_unique<UINT16[]>(0x10000/2);
- tile_layer[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_0s),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
- tile_layer[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_0w),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
- tile_layer[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_1s),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
- tile_layer[3] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_1w),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ tile_layer[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_0s),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ tile_layer[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_0w),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ tile_layer[2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_1s),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ tile_layer[3] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_1w),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
tile_layer[0]->set_transparent_pen(0);
tile_layer[1]->set_transparent_pen(0);
@@ -120,7 +92,7 @@ void segas24_tile::device_start()
memset(char_ram.get(), 0, 0x80000);
memset(tile_ram.get(), 0, 0x10000);
- m_gfxdecode->set_gfx(char_gfx_index, std::make_unique<gfx_element>(m_palette, char_layout, (UINT8 *)char_ram.get(), NATIVE_ENDIAN_VALUE_LE_BE(8,0), m_palette->entries() / 16, 0));
+ set_gfx(char_gfx_index, std::make_unique<gfx_element>(palette(), char_layout, (UINT8 *)char_ram.get(), NATIVE_ENDIAN_VALUE_LE_BE(8,0), palette().entries() / 16, 0));
save_pointer(NAME(tile_ram.get()), 0x10000/2);
save_pointer(NAME(char_ram.get()), 0x80000/2);
@@ -267,7 +239,7 @@ void segas24_tile::draw_rect(screen_device &screen, bitmap_ind16 &bm, bitmap_ind
const UINT16 *source = &bm.pix16(sy, sx);
const UINT8 *trans = &tm.pix8(sy, sx);
UINT32 *dest = &dm.pix32(0);
- const pen_t *pens = m_palette->pens();
+ const pen_t *pens = palette().pens();
tpri |= TILEMAP_PIXEL_LAYER0;
@@ -576,7 +548,7 @@ WRITE16_MEMBER(segas24_tile::char_w)
UINT16 old = char_ram[offset];
COMBINE_DATA(char_ram.get() + offset);
if(old != char_ram[offset])
- m_gfxdecode->gfx(char_gfx_index)->mark_dirty(offset / 16);
+ gfx(char_gfx_index)->mark_dirty(offset / 16);
}
READ32_MEMBER(segas24_tile::tile32_r)
diff --git a/src/mame/video/segaic24.h b/src/mame/video/segaic24.h
index 51165e32ac1..baa9b018afa 100644
--- a/src/mame/video/segaic24.h
+++ b/src/mame/video/segaic24.h
@@ -19,13 +19,10 @@
MCFG_DEVICE_ADD(_tag, S24MIXER, 0)
-#define MCFG_S24TILE_DEVICE_GFXDECODE(_gfxtag) \
- segas24_tile::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
#define MCFG_S24TILE_DEVICE_PALETTE(_palette_tag) \
- segas24_tile::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
-class segas24_tile : public device_t
+class segas24_tile : public device_t, public device_gfx_interface
{
friend class segas24_tile_config;
@@ -33,8 +30,6 @@ public:
segas24_tile(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void static_set_tile_mask(device_t &device, UINT16 tile_mask);
DECLARE_READ16_MEMBER(tile_r);
@@ -65,8 +60,6 @@ private:
UINT16 tile_mask;
static const gfx_layout char_layout;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
void tile_info(int offset, tile_data &tileinfo, tilemap_memory_index tile_index);
TILE_GET_INFO_MEMBER(tile_info_0s);
diff --git a/src/mame/video/senjyo.cpp b/src/mame/video/senjyo.cpp
index dfccfbdd7b1..4b5896c3ac0 100644
--- a/src/mame/video/senjyo.cpp
+++ b/src/mame/video/senjyo.cpp
@@ -9,7 +9,6 @@
***************************************************************************/
#include "emu.h"
-#include "machine/segacrpt.h"
#include "includes/senjyo.h"
diff --git a/src/mame/video/seta001.cpp b/src/mame/video/seta001.cpp
index d0ff7874fb3..3c81cd94a0e 100644
--- a/src/mame/video/seta001.cpp
+++ b/src/mame/video/seta001.cpp
@@ -33,8 +33,7 @@ const device_type SETA001_SPRITE = &device_creator<seta001_device>;
seta001_device::seta001_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SETA001_SPRITE, "Seta SETA001 Sprite", tag, owner, clock, "seta001", __FILE__),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -48,16 +47,6 @@ void seta001_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
downcast<seta001_device &>(device).m_gfxdecode.set_tag(tag);
}
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void seta001_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<seta001_device &>(device).m_palette.set_tag(tag);
-}
-
void seta001_device::device_start()
{
// chukatai draws a column on the left from uninitialized RAM which causes garbage in a debug build
diff --git a/src/mame/video/seta001.h b/src/mame/video/seta001.h
index b7fea3ce96e..936a9183859 100644
--- a/src/mame/video/seta001.h
+++ b/src/mame/video/seta001.h
@@ -15,7 +15,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfxbank_callback(device_t &device, gfxbank_cb_delegate callback) { downcast<seta001_device &>(device).m_gfxbank_cb = callback; }
DECLARE_WRITE8_MEMBER( spritebgflag_w8 );
@@ -63,7 +62,6 @@ private:
void draw_background( bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac_type);
void draw_foreground( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size);
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
gfxbank_cb_delegate m_gfxbank_cb;
@@ -88,6 +86,3 @@ extern const device_type SETA001_SPRITE;
#define MCFG_SETA001_SPRITE_GFXDECODE(_gfxtag) \
seta001_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
-#define MCFG_SETA001_SPRITE_PALETTE(_palette_tag) \
- seta001_device::static_set_palette_tag(*device, "^" _palette_tag);
diff --git a/src/mame/video/snk68_spr.cpp b/src/mame/video/snk68_spr.cpp
index fa2382d76ef..0aa9315788a 100644
--- a/src/mame/video/snk68_spr.cpp
+++ b/src/mame/video/snk68_spr.cpp
@@ -10,7 +10,6 @@ const device_type SNK68_SPR = &device_creator<snk68_spr_device>;
snk68_spr_device::snk68_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SNK68_SPR, "SNK68 Sprites", tag, owner, clock, "snk68_spr", __FILE__),
m_gfxdecode(*this),
- m_palette(*this),
m_spriteram(*this, "^spriteram"),
m_screen(*this, "^screen"),
m_flipscreen(0),
@@ -34,16 +33,6 @@ void snk68_spr_device::static_set_gfxdecode_tag(device_t &device, const char *ta
downcast<snk68_spr_device &>(device).m_gfxdecode.set_tag(tag);
}
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void snk68_spr_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<snk68_spr_device &>(device).m_palette.set_tag(tag);
-}
-
// static
void snk68_spr_device::set_tile_indirect_cb(device_t &device,snk68_tile_indirection_delegate newtilecb)
{
diff --git a/src/mame/video/snk68_spr.h b/src/mame/video/snk68_spr.h
index 5604f74714a..1f985727e5a 100644
--- a/src/mame/video/snk68_spr.h
+++ b/src/mame/video/snk68_spr.h
@@ -4,8 +4,6 @@ typedef device_delegate<void (int&, int&, int&, int&)> snk68_tile_indirection_de
#define MCFG_SNK68_SPR_GFXDECODE(_gfxtag) \
snk68_spr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_SNK68_SPR_PALETTE(_palette_tag) \
- snk68_spr_device::static_set_palette_tag(*device, "^" _palette_tag);
#define MCFG_SNK68_SPR_SET_TILE_INDIRECT( _class, _method) \
snk68_spr_device::set_tile_indirect_cb(*device, snk68_tile_indirection_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
#define MCFG_SNK68_SPR_NO_PARTIAL \
@@ -19,7 +17,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_tile_indirect_cb(device_t &device,snk68_tile_indirection_delegate newtilecb);
static void static_set_no_partial(device_t &device);
@@ -38,8 +35,7 @@ protected:
virtual void device_reset() override;
private:
- optional_device<gfxdecode_device> m_gfxdecode;
- optional_device<palette_device> m_palette;
+ required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<UINT16> m_spriteram;
required_device<screen_device> m_screen;
int m_flipscreen;
diff --git a/src/mame/video/st0020.cpp b/src/mame/video/st0020.cpp
index bb0bb01da1b..084d8be208f 100644
--- a/src/mame/video/st0020.cpp
+++ b/src/mame/video/st0020.cpp
@@ -17,33 +17,12 @@ const device_type ST0020_SPRITES = &device_creator<st0020_device>;
st0020_device::st0020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ST0020_SPRITES, "Seta ST0020 Sprites", tag, owner, clock, "st0020", __FILE__)
- , m_gfxdecode(*this)
- , m_palette(*this)
+ , device_gfx_interface(mconfig, *this)
{
m_is_st0032 = 0;
m_is_jclub2 = 0;
}
-//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void st0020_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<st0020_device &>(device).m_gfxdecode.set_tag(tag);
-}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void st0020_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<st0020_device &>(device).m_palette.set_tag(tag);
-}
-
void st0020_device::set_is_st0032(device_t &device, int is_st0032)
{
st0020_device &dev = downcast<st0020_device &>(device);
@@ -90,13 +69,9 @@ void st0020_device::device_start()
m_st0020_spriteram = make_unique_clear<UINT16[]>(0x80000 / 2);
m_st0020_blitram = make_unique_clear<UINT16[]>(0x100 / 2);
- for (m_gfx_index = 0; m_gfx_index < MAX_GFX_ELEMENTS; m_gfx_index++)
- if (m_gfxdecode->gfx(m_gfx_index) == nullptr)
- break;
-
- m_gfxdecode->set_gfx(m_gfx_index, std::make_unique<gfx_element>(m_palette, layout_16x8x8_2, (UINT8 *)m_st0020_gfxram.get(), 0, m_palette->entries() / 64, 0));
+ set_gfx(0, std::make_unique<gfx_element>(palette(), layout_16x8x8_2, (UINT8 *)m_st0020_gfxram.get(), 0, palette().entries() / 64, 0));
- m_gfxdecode->gfx(m_gfx_index)->set_granularity(64); /* 256 colour sprites with palette selectable on 64 colour boundaries */
+ gfx(0)->set_granularity(64); /* 256 colour sprites with palette selectable on 64 colour boundaries */
save_pointer(NAME(m_st0020_gfxram.get()), 4 * 0x100000/2);
save_pointer(NAME(m_st0020_spriteram.get()), 0x80000/2);
@@ -128,7 +103,7 @@ WRITE16_MEMBER(st0020_device::st0020_gfxram_w)
offset += m_st0020_gfxram_bank * 0x100000/2;
COMBINE_DATA(&m_st0020_gfxram[offset]);
- m_gfxdecode->gfx(m_gfx_index)->mark_dirty(offset / (16*8/2));
+ gfx(0)->mark_dirty(offset / (16*8/2));
}
READ16_MEMBER(st0020_device::st0020_sprram_r)
@@ -214,7 +189,7 @@ WRITE16_MEMBER(st0020_device::st0020_blit_w)
dst /= 16*8;
while (len--)
{
- m_gfxdecode->gfx(m_gfx_index)->mark_dirty(dst);
+ gfx(0)->mark_dirty(dst);
dst++;
}
}
@@ -407,7 +382,7 @@ void st0020_device::st0020_draw_zooming_sprites(bitmap_ind16 &bitmap, const rect
{
for (y = ystart; y != yend; y += yinc)
{
- m_gfxdecode->gfx(m_gfx_index)->zoom_transpen(bitmap,cliprect,
+ gfx(0)->zoom_transpen(bitmap,cliprect,
code++,
color,
flipx, flipy,
diff --git a/src/mame/video/st0020.h b/src/mame/video/st0020.h
index 33390a8bddc..23049c2b8fb 100644
--- a/src/mame/video/st0020.h
+++ b/src/mame/video/st0020.h
@@ -3,19 +3,15 @@
-class st0020_device : public device_t
+class st0020_device : public device_t, public device_gfx_interface
{
public:
st0020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_is_st0032(device_t &device, int is_st0032);
static void set_is_jclub2o(device_t &device, int is_jclub2o);
- int m_gfx_index;
-
// see if we can handle the difference between this and the st0032 in here, or if we need another
// device
int m_is_st0032;
@@ -45,8 +41,6 @@ private:
void st0020_draw_zooming_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
DECLARE_READ16_MEMBER(st0020_blit_r);
DECLARE_WRITE16_MEMBER(st0020_blit_w);
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
UINT8* m_rom_ptr;
size_t m_rom_size;
};
@@ -57,8 +51,5 @@ private:
if (m_is_st0032) mem_mask = ((mem_mask & 0x00ff)<<8) | ((mem_mask & 0xff00)>>8);
extern const device_type ST0020_SPRITES;
-#define MCFG_ST0020_SPRITES_GFXDECODE(_gfxtag) \
- st0020_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
#define MCFG_ST0020_SPRITES_PALETTE(_palette_tag) \
- st0020_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
diff --git a/src/mame/video/tc0080vco.cpp b/src/mame/video/tc0080vco.cpp
index 0bf5aec9b62..4e0604b9514 100644
--- a/src/mame/video/tc0080vco.cpp
+++ b/src/mame/video/tc0080vco.cpp
@@ -103,8 +103,7 @@ tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *ta
m_bg_yoffs(0),
m_bg_flip_yoffs(0),
m_has_fg0(1),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -119,16 +118,6 @@ void tc0080vco_device::static_set_gfxdecode_tag(device_t &device, const char *ta
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void tc0080vco_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<tc0080vco_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -193,7 +182,7 @@ void tc0080vco_device::device_start()
m_scroll_ram = m_ram.get() + 0x20800 / 2;
/* create the char set (gfx will then be updated dynamically from RAM) */
- m_gfxdecode->set_gfx(m_txnum, std::make_unique<gfx_element>(m_palette, charlayout, (UINT8 *)m_char_ram, 0, 1, 512));
+ m_gfxdecode->set_gfx(m_txnum, std::make_unique<gfx_element>(m_gfxdecode->palette(), charlayout, (UINT8 *)m_char_ram, 0, 1, 512));
save_pointer(NAME(m_ram.get()), TC0080VCO_RAM_SIZE / 2);
machine().save().register_postload(save_prepost_delegate(FUNC(tc0080vco_device::postload), this));
diff --git a/src/mame/video/tc0080vco.h b/src/mame/video/tc0080vco.h
index c842e3a57b5..65652b011ec 100644
--- a/src/mame/video/tc0080vco.h
+++ b/src/mame/video/tc0080vco.h
@@ -11,7 +11,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int gfxnum) { downcast<tc0080vco_device &>(device).m_gfxnum = gfxnum; }
static void set_tx_region(device_t &device, int txnum) { downcast<tc0080vco_device &>(device).m_txnum = txnum; }
static void set_offsets(device_t &device, int x_offset, int y_offset)
@@ -75,7 +74,6 @@ private:
int m_has_fg0; // for debug, it can be enabled with set_fg0_debug(true)
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
TILE_GET_INFO_MEMBER(get_bg0_tile_info);
TILE_GET_INFO_MEMBER(get_bg1_tile_info);
@@ -101,7 +99,4 @@ extern const device_type TC0080VCO;
#define MCFG_TC0080VCO_GFXDECODE(_gfxtag) \
tc0080vco_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_TC0080VCO_PALETTE(_palette_tag) \
- tc0080vco_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif
diff --git a/src/mame/video/tc0150rod.cpp b/src/mame/video/tc0150rod.cpp
index 6077df445e3..c6bcd8512af 100644
--- a/src/mame/video/tc0150rod.cpp
+++ b/src/mame/video/tc0150rod.cpp
@@ -16,7 +16,7 @@ const device_type TC0150ROD = &device_creator<tc0150rod_device>;
tc0150rod_device::tc0150rod_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0150ROD, "Taito TC0150ROD", tag, owner, clock, "tc0150rod", __FILE__),
- m_roadgfx(nullptr)
+ m_roadgfx(*this, DEVICE_SELF, 0x40000)
{
}
@@ -29,9 +29,6 @@ void tc0150rod_device::device_start()
m_ram.resize(TC0150ROD_RAM_SIZE / 2);
memset(&m_ram[0], 0, TC0150ROD_RAM_SIZE);
save_item(NAME(m_ram));
-
- m_roadgfx = (UINT16 *)region()->base();
- assert(m_roadgfx);
}
diff --git a/src/mame/video/tc0150rod.h b/src/mame/video/tc0150rod.h
index 723e97dea7c..a6c2b653a64 100644
--- a/src/mame/video/tc0150rod.h
+++ b/src/mame/video/tc0150rod.h
@@ -20,7 +20,7 @@ protected:
private:
// internal state
std::vector<UINT16> m_ram;
- UINT16 *m_roadgfx;
+ required_region_ptr<UINT16> m_roadgfx;
};
extern const device_type TC0150ROD;
diff --git a/src/mame/video/tc0480scp.cpp b/src/mame/video/tc0480scp.cpp
index 83b0ede8c18..bfd14613a53 100644
--- a/src/mame/video/tc0480scp.cpp
+++ b/src/mame/video/tc0480scp.cpp
@@ -166,8 +166,7 @@ tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *ta
m_flip_xoffs(0),
m_flip_yoffs(0),
m_col_base(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
memset(m_ctrl, 0, sizeof(m_ctrl));
@@ -193,16 +192,6 @@ void tc0480scp_device::static_set_gfxdecode_tag(device_t &device, const char *ta
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void tc0480scp_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<tc0480scp_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -297,7 +286,7 @@ void tc0480scp_device::device_start()
set_layer_ptrs();
/* create the char set (gfx will then be updated dynamically from RAM) */
- m_gfxdecode->set_gfx(m_txnum, std::make_unique<gfx_element>(m_palette, tc0480scp_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, m_col_base));
+ m_gfxdecode->set_gfx(m_txnum, std::make_unique<gfx_element>(m_gfxdecode->palette(), tc0480scp_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, m_col_base));
m_gfxdecode->gfx(m_gfxnum)->set_colorbase(m_col_base);
save_item(NAME(m_ram));
diff --git a/src/mame/video/tc0480scp.h b/src/mame/video/tc0480scp.h
index 12c83523234..1f77d368b45 100644
--- a/src/mame/video/tc0480scp.h
+++ b/src/mame/video/tc0480scp.h
@@ -11,7 +11,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int gfxregion) { downcast<tc0480scp_device &>(device).m_gfxnum = gfxregion; }
static void set_tx_region(device_t &device, int txregion) { downcast<tc0480scp_device &>(device).m_txnum = txregion; }
static void set_col_base(device_t &device, int col) { downcast<tc0480scp_device &>(device).m_col_base = col; }
@@ -95,7 +94,6 @@ private:
int m_col_base;
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
void common_get_tc0480bg_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum );
void common_get_tc0480tx_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum );
@@ -136,7 +134,4 @@ extern const device_type TC0480SCP;
#define MCFG_TC0480SCP_GFXDECODE(_gfxtag) \
tc0480scp_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_TC0480SCP_PALETTE(_palette_tag) \
- tc0480scp_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif
diff --git a/src/mame/video/vsystem_spr.cpp b/src/mame/video/vsystem_spr.cpp
index 7b74e66851c..981dc32cb40 100644
--- a/src/mame/video/vsystem_spr.cpp
+++ b/src/mame/video/vsystem_spr.cpp
@@ -73,8 +73,7 @@ const device_type VSYSTEM_SPR = &device_creator<vsystem_spr_device>;
vsystem_spr_device::vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VSYSTEM_SPR, "Video System Sprites", tag, owner, clock, "vsystem_spr", __FILE__),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
m_transpen = 15;
m_pal_base = 0;
@@ -99,16 +98,6 @@ void vsystem_spr_device::static_set_gfxdecode_tag(device_t &device, const char *
downcast<vsystem_spr_device &>(device).m_gfxdecode.set_tag(tag);
}
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void vsystem_spr_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<vsystem_spr_device &>(device).m_palette.set_tag(tag);
-}
-
UINT32 vsystem_spr_device::tile_callback_noindirect(UINT32 tile)
{
return tile;
diff --git a/src/mame/video/vsystem_spr.h b/src/mame/video/vsystem_spr.h
index 3e8574c9350..1a84e074208 100644
--- a/src/mame/video/vsystem_spr.h
+++ b/src/mame/video/vsystem_spr.h
@@ -17,8 +17,6 @@ typedef device_delegate<UINT32 (UINT32)> vsystem_tile_indirection_delegate;
vsystem_spr_device::CG10103_set_transpen(*device, _transpen);
#define MCFG_VSYSTEM_SPR_GFXDECODE(_gfxtag) \
vsystem_spr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_VSYSTEM_SPR_PALETTE(_palette_tag) \
- vsystem_spr_device::static_set_palette_tag(*device, "^" _palette_tag);
/*** CG10103 **********************************************/
@@ -29,7 +27,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_offsets(device_t &device, int xoffs, int yoffs);
static void set_pdraw(device_t &device, bool pdraw);
static void set_tile_indirect_cb(device_t &device,vsystem_tile_indirection_delegate newtilecb);
@@ -78,7 +75,6 @@ protected:
private:
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
diff --git a/src/mame/video/vsystem_spr2.cpp b/src/mame/video/vsystem_spr2.cpp
index 68d1b8ff323..b934d27be56 100644
--- a/src/mame/video/vsystem_spr2.cpp
+++ b/src/mame/video/vsystem_spr2.cpp
@@ -31,8 +31,7 @@ const device_type VSYSTEM_SPR2 = &device_creator<vsystem_spr2_device>;
vsystem_spr2_device::vsystem_spr2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VSYSTEM_SPR2, "Video System Sprites Type 2", tag, owner, clock, "vsystem_spr2", __FILE__),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
m_newtilecb = vsystem_tile2_indirection_delegate(FUNC(vsystem_spr2_device::tile_callback_noindirect), this);
m_pritype = 0; // hack until we have better handling
@@ -51,16 +50,6 @@ void vsystem_spr2_device::static_set_gfxdecode_tag(device_t &device, const char
downcast<vsystem_spr2_device &>(device).m_gfxdecode.set_tag(tag);
}
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void vsystem_spr2_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<vsystem_spr2_device &>(device).m_palette.set_tag(tag);
-}
-
void vsystem_spr2_device::set_tile_indirect_cb(device_t &device,vsystem_tile2_indirection_delegate newtilecb)
{
diff --git a/src/mame/video/vsystem_spr2.h b/src/mame/video/vsystem_spr2.h
index 967d6dc69bb..1ffdb41a537 100644
--- a/src/mame/video/vsystem_spr2.h
+++ b/src/mame/video/vsystem_spr2.h
@@ -14,8 +14,6 @@ typedef device_delegate<UINT32 (UINT32)> vsystem_tile2_indirection_delegate;
vsystem_spr2_device::set_offsets(*device, _xoffs,_yoffs);
#define MCFG_VSYSTEM_SPR2_GFXDECODE(_gfxtag) \
vsystem_spr2_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_VSYSTEM_SPR2_PALETTE(_palette_tag) \
- vsystem_spr2_device::static_set_palette_tag(*device, "^" _palette_tag);
class vsystem_spr2_device : public device_t
{
@@ -24,7 +22,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_tile_indirect_cb(device_t &device,vsystem_tile2_indirection_delegate newtilecb);
static void set_pritype(device_t &device, int pritype);
static void set_gfx_region(device_t &device, int gfx_region);
@@ -68,7 +65,6 @@ protected:
private:
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
diff --git a/src/mame/video/vtvideo.cpp b/src/mame/video/vtvideo.cpp
index 45bcfe5da79..c182bd05bb0 100644
--- a/src/mame/video/vtvideo.cpp
+++ b/src/mame/video/vtvideo.cpp
@@ -78,7 +78,7 @@ vt100_video_device::vt100_video_device(const machine_config &mconfig, device_typ
device_video_interface(mconfig, *this),
m_read_ram(*this),
m_write_clear_video_interrupt(*this),
-m_char_rom_tag(""),
+m_char_rom(*this),
m_palette(*this, "palette")
{
}
@@ -89,7 +89,7 @@ vt100_video_device::vt100_video_device(const machine_config &mconfig, const char
device_video_interface(mconfig, *this),
m_read_ram(*this),
m_write_clear_video_interrupt(*this),
-m_char_rom_tag(""),
+m_char_rom(*this),
m_palette(*this, "palette")
{
}
@@ -111,9 +111,6 @@ void vt100_video_device::device_start()
m_read_ram.resolve_safe(0);
m_write_clear_video_interrupt.resolve_safe();
- m_gfx = machine().root_device().memregion(m_char_rom_tag)->base();
- assert(m_gfx != nullptr);
-
// LBA7 is scan line frequency update
machine().scheduler().timer_pulse(attotime::from_nsec(31778), timer_expired_delegate(FUNC(vt100_video_device::lba7_change), this));
@@ -425,7 +422,7 @@ void vt100_video_device::display_char(bitmap_ind16 &bitmap, UINT8 code, int x, i
// modify line since that is how it is stored in rom
if (j == 0) j = 15; else j = j - 1;
- line = m_gfx[(code & 0x7f) * 16 + j];
+ line = m_char_rom[(code & 0x7f) * 16 + j];
if (m_basic_attribute == 1)
{
@@ -659,7 +656,7 @@ void rainbow_video_device::display_char(bitmap_ind16 &bitmap, UINT8 code, int x,
// modify line since that is how it is stored in rom
if (j == 0) j = 15; else j = j - 1;
- line = m_gfx[(code << 4) + j]; // code * 16
+ line = m_char_rom[(code << 4) + j]; // code * 16
// UNDERLINED CHARACTERS (CASE 5 - different in 1 line):
back_intensity = back_default_intensity; // 0, 1, 2
diff --git a/src/mame/video/vtvideo.h b/src/mame/video/vtvideo.h
index 0c29e0637e8..981e271b103 100644
--- a/src/mame/video/vtvideo.h
+++ b/src/mame/video/vtvideo.h
@@ -25,7 +25,7 @@ public:
template<class _Object> static devcb_base &set_ram_rd_callback(device_t &device, _Object object) { return downcast<vt100_video_device &>(device).m_read_ram.set_callback(object); }
template<class _Object> static devcb_base &set_clear_video_irq_wr_callback(device_t &device, _Object object) { return downcast<vt100_video_device &>(device).m_write_clear_video_interrupt.set_callback(object); }
- static void set_chargen_tag(device_t &device, const char *tag) { downcast<vt100_video_device &>(device).m_char_rom_tag = tag; }
+ static void set_chargen_tag(device_t &device, const char *tag) { downcast<vt100_video_device &>(device).m_char_rom.set_tag(tag); }
DECLARE_READ8_MEMBER(lba7_r);
DECLARE_WRITE8_MEMBER(dc012_w);
@@ -47,8 +47,6 @@ protected:
devcb_read8 m_read_ram;
devcb_write8 m_write_clear_video_interrupt;
- UINT8 *m_gfx; /* content of char rom */
-
int m_lba7;
bool MHFU_FLAG;
@@ -68,7 +66,7 @@ protected:
UINT8 m_frequency;
UINT8 m_interlaced;
- const char *m_char_rom_tag; /* character rom region */
+ required_region_ptr<UINT8> m_char_rom; /* character rom region */
required_device<palette_device> m_palette;
bool m_notify_vblank;
@@ -102,7 +100,7 @@ extern const device_type RAINBOW_VIDEO;
#define MCFG_VT_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_VT_CHARGEN(_tag) \
- vt100_video_device::set_chargen_tag(*device, _tag);
+ vt100_video_device::set_chargen_tag(*device, "^" _tag);
#define MCFG_VT_VIDEO_RAM_CALLBACK(_read) \
devcb = &vt100_video_device::set_ram_rd_callback(*device, DEVCB_##_read);
diff --git a/src/mame/video/ygv608.cpp b/src/mame/video/ygv608.cpp
index 1b70da162ee..bbdf3212220 100644
--- a/src/mame/video/ygv608.cpp
+++ b/src/mame/video/ygv608.cpp
@@ -49,28 +49,111 @@
#define GFX_16X16_8BIT 5
-const device_type YGV608 = &device_creator<ygv608_device>;
+/* text-layer characters */
-ygv608_device::ygv608_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
- : device_t(mconfig, YGV608, "YGV608 VDP", tag, owner, clock, "ygv608", __FILE__),
- m_gfxdecode(*this),
- m_palette(*this)
+static const UINT32 pts_4bits_layout_xoffset[64] =
{
-}
+ STEP8( 0*256, 4 ), STEP8( 1*256, 4 ), STEP8( 4*256, 4 ), STEP8( 5*256, 4 ),
+ STEP8( 16*256, 4 ), STEP8( 17*256, 4 ), STEP8( 20*256, 4 ), STEP8( 21*256, 4 )
+};
-void ygv608_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+static const UINT32 pts_4bits_layout_yoffset[64] =
{
- downcast<ygv608_device &>(device).m_gfxdecode.set_tag(tag);
-}
+ STEP8( 0*256, 8*4 ), STEP8( 2*256, 8*4 ), STEP8( 8*256, 8*4 ), STEP8( 10*256, 8*4 ),
+ STEP8( 32*256, 8*4 ), STEP8( 34*256, 8*4 ), STEP8( 40*256, 8*4 ), STEP8( 42*256, 8*4 )
+};
+
+static const gfx_layout pts_8x8_4bits_layout =
+{
+ 8,8, /* 8*8 pixels */
+ RGN_FRAC(1,1), /* 65536 patterns */
+ 4, /* 4 bits per pixel */
+ { 0, 1, 2, 3 },
+ EXTENDED_XOFFS,
+ EXTENDED_YOFFS,
+ 8*8*4,
+ pts_4bits_layout_xoffset,
+ pts_4bits_layout_yoffset
+};
+
+static const gfx_layout pts_16x16_4bits_layout =
+{
+ 16,16, /* 16*16 pixels */
+ RGN_FRAC(1,1), /* 16384 patterns */
+ 4, /* 4 bits per pixel */
+ { 0, 1, 2, 3 },
+ EXTENDED_XOFFS,
+ EXTENDED_YOFFS,
+ 16*16*4,
+ pts_4bits_layout_xoffset,
+ pts_4bits_layout_yoffset
+};
+
+static const gfx_layout pts_32x32_4bits_layout =
+{
+ 32,32, /* 32*32 pixels */
+ RGN_FRAC(1,1), /* 4096 patterns */
+ 4, /* 4 bits per pixel */
+ { 0, 1, 2, 3 },
+ EXTENDED_XOFFS,
+ EXTENDED_YOFFS,
+ 32*32*4,
+ pts_4bits_layout_xoffset,
+ pts_4bits_layout_yoffset
+};
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
+static const gfx_layout pts_64x64_4bits_layout =
+{
+ 64,64, /* 32*32 pixels */
+ RGN_FRAC(1,1), /* 1024 patterns */
+ 4, /* 4 bits per pixel */
+ { 0, 1, 2, 3 },
+ EXTENDED_XOFFS,
+ EXTENDED_YOFFS,
+ 64*64*4,
+ pts_4bits_layout_xoffset,
+ pts_4bits_layout_yoffset
+};
+
+
+static const gfx_layout pts_8x8_8bits_layout =
+{
+ 8,8, /* 8*8 pixels */
+ RGN_FRAC(1,1), /* 32768 patterns */
+ 8, /* 8 bits per pixel */
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { STEP8( 0*512, 8 ) },
+ { STEP8( 0*512, 8*8 ) },
+ 8*8*8
+};
+
+static const gfx_layout pts_16x16_8bits_layout =
+{
+ 16,16, /* 16*16 pixels */
+ RGN_FRAC(1,1), /* 8192 patterns */
+ 8, /* 8 bits per pixel */
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { STEP8( 0*512, 8 ), STEP8( 1*512, 8 ) },
+ { STEP8( 0*512, 8*8 ), STEP8( 2*512, 8*8 ) },
+ 16*16*8
+};
+
+static GFXDECODE_START( ygv608 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_8x8_4bits_layout, 0, 16 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_16x16_4bits_layout, 0, 16 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_32x32_4bits_layout, 0, 16 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_64x64_4bits_layout, 0, 16 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_8x8_8bits_layout, 0, 256 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_16x16_8bits_layout, 0, 256 )
+GFXDECODE_END
+
+
+const device_type YGV608 = &device_creator<ygv608_device>;
-void ygv608_device::static_set_palette_tag(device_t &device, const char *tag)
+ygv608_device::ygv608_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
+ : device_t(mconfig, YGV608, "YGV608 VDP", tag, owner, clock, "ygv608", __FILE__),
+ device_gfx_interface(mconfig, *this, GFXDECODE_NAME(ygv608))
{
- downcast<ygv608_device &>(device).m_palette.set_tag(tag);
}
void ygv608_device::set_gfxbank(UINT8 gfxbank)
@@ -120,7 +203,7 @@ TILEMAP_MAPPER_MEMBER( ygv608_device::get_tile_offset )
}
#define layout_total(x) \
-(m_gfxdecode->gfx(x)->elements())
+(gfx(x)->elements())
TILE_GET_INFO_MEMBER( ygv608_device::get_tile_info_A_8 )
{
@@ -516,9 +599,6 @@ void ygv608_device::register_state_save()
void ygv608_device::device_start()
{
- if(!m_gfxdecode->started())
- throw device_missing_dependencies();
-
memset(&m_ports, 0, sizeof(m_ports));
memset(&m_regs, 0, sizeof(m_regs));
memset(&m_pattern_name_table, 0, sizeof(m_pattern_name_table));
@@ -546,21 +626,21 @@ void ygv608_device::device_start()
save_item(NAME(m_namcond1_gfxbank));
/* create tilemaps of all sizes and combinations */
- m_tilemap_A_cache_8[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,32);
- m_tilemap_A_cache_8[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 64,32);
- m_tilemap_A_cache_8[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,64);
+ m_tilemap_A_cache_8[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,32);
+ m_tilemap_A_cache_8[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 64,32);
+ m_tilemap_A_cache_8[2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,64);
- m_tilemap_A_cache_16[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,32);
- m_tilemap_A_cache_16[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 64,32);
- m_tilemap_A_cache_16[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,64);
+ m_tilemap_A_cache_16[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,32);
+ m_tilemap_A_cache_16[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 64,32);
+ m_tilemap_A_cache_16[2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,64);
- m_tilemap_B_cache_8[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,32);
- m_tilemap_B_cache_8[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 64,32);
- m_tilemap_B_cache_8[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,64);
+ m_tilemap_B_cache_8[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,32);
+ m_tilemap_B_cache_8[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 64,32);
+ m_tilemap_B_cache_8[2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,64);
- m_tilemap_B_cache_16[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,32);
- m_tilemap_B_cache_16[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 64,32);
- m_tilemap_B_cache_16[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,64);
+ m_tilemap_B_cache_16[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,32);
+ m_tilemap_B_cache_16[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 64,32);
+ m_tilemap_B_cache_16[2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,64);
m_tilemap_A = nullptr;
m_tilemap_B = nullptr;
@@ -620,20 +700,20 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
logerror( "SZ_8X8: sprite=%d\n", code );
code = 0;
}
- m_gfxdecode->gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x10000,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-8 )
- m_gfxdecode->gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x10000,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-8 )
- m_gfxdecode->gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x10000,
color,
flipx,flipy,
@@ -650,20 +730,20 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
logerror( "SZ_8X8: sprite=%d\n", code );
code = 0;
}
- m_gfxdecode->gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x4000,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-16 )
- m_gfxdecode->gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x4000,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-16 )
- m_gfxdecode->gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x4000,
color,
flipx,flipy,
@@ -680,20 +760,20 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
logerror( "SZ_32X32: sprite=%d\n", code );
code = 0;
}
- m_gfxdecode->gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x1000,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-32 )
- m_gfxdecode->gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x1000,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-32 )
- m_gfxdecode->gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x1000,
color,
flipx,flipy,
@@ -710,20 +790,20 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
logerror( "SZ_64X64: sprite=%d\n", code );
code = 0;
}
- m_gfxdecode->gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x400,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-64 )
- m_gfxdecode->gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x400,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-64 )
- m_gfxdecode->gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x400,
color,
flipx,flipy,
@@ -1228,7 +1308,7 @@ WRITE16_MEMBER( ygv608_device::write )
if (++p3_state == 3)
{
p3_state = 0;
- m_palette->set_pen_color(m_regs.s.cc,
+ palette().set_pen_color(m_regs.s.cc,
pal6bit(m_colour_palette[m_regs.s.cc][0]),
pal6bit(m_colour_palette[m_regs.s.cc][1]),
pal6bit(m_colour_palette[m_regs.s.cc][2]) );
diff --git a/src/mame/video/ygv608.h b/src/mame/video/ygv608.h
index b4360a4e5e4..3e6f5c54f09 100644
--- a/src/mame/video/ygv608.h
+++ b/src/mame/video/ygv608.h
@@ -282,16 +282,12 @@ struct SPRITE_ATTR {
UINT8 sn; // pattern name (0-255)
};
-class ygv608_device : public device_t
+class ygv608_device : public device_t, public device_gfx_interface
{
public:
// construction/destruction
ygv608_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
-
DECLARE_WRITE16_MEMBER( write );
DECLARE_READ16_MEMBER( read );
@@ -376,8 +372,6 @@ private:
UINT8 m_screen_resize; // screen requires resize
UINT8 m_tilemap_resize; // tilemap requires resize
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
// device type definition
@@ -391,10 +385,7 @@ extern const device_type YGV608;
#define MCFG_YGV608_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, YGV608, 0)
-#define MCFG_YGV608_GFXDECODE(_gfxtag) \
- ygv608_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
#define MCFG_YGV608_PALETTE(_palette_tag) \
- ygv608_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
#endif
diff --git a/src/osd/eminline.h b/src/osd/eminline.h
index 519b2b93154..6d3b301b8ad 100644
--- a/src/osd/eminline.h
+++ b/src/osd/eminline.h
@@ -12,6 +12,9 @@
#ifndef __EMINLINE__
#define __EMINLINE__
+#include "osdcomm.h"
+#include "osdcore.h"
+
#if !defined(MAME_NOASM)
/* we come with implementations for GCC x86 and PPC */
#if defined(__GNUC__)
diff --git a/src/osd/modules/font/font_dwrite.cpp b/src/osd/modules/font/font_dwrite.cpp
index ea8e9446e27..e3dfbfdbd85 100644
--- a/src/osd/modules/font/font_dwrite.cpp
+++ b/src/osd/modules/font/font_dwrite.cpp
@@ -31,7 +31,7 @@
DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262, 0x9370, 0x4615, 0xa1, 0x3b, 0x9f, 0x55, 0x39, 0xda, 0x4c, 0xa);
DEFINE_GUID(GUID_WICPixelFormat8bppAlpha, 0xe6cd0116, 0xeeba, 0x4161, 0xaa, 0x85, 0x27, 0xdd, 0x9f, 0xb3, 0xa8, 0x95);
-#include <wrl\client.h>
+#include <wrl/client.h>
#undef interface
#include "strconv.h"
diff --git a/src/osd/modules/input/input_common.cpp b/src/osd/modules/input/input_common.cpp
index 07fe1ed588f..d9f20e299d6 100644
--- a/src/osd/modules/input/input_common.cpp
+++ b/src/osd/modules/input/input_common.cpp
@@ -87,7 +87,7 @@ key_trans_entry keyboard_trans_table::s_default_table[] =
KEY_TRANS_ENTRY1(TILDE, GRAVE, BACKQUOTE, GRAVE, VK_OEM_3, '`'),
KEY_TRANS_ENTRY1(LSHIFT, LSHIFT, LSHIFT, LSHIFT, VK_LSHIFT, 0),
KEY_TRANS_ENTRY1(BACKSLASH, BACKSLASH, BACKSLASH, BACKSLASH, VK_OEM_5, '\\'),
- KEY_TRANS_ENTRY1(BACKSLASH2, 0, 0, OEM_102, VK_OEM_102, '<'),
+ KEY_TRANS_ENTRY1(BACKSLASH2, NONUSHASH, UNKNOWN, OEM_102, VK_OEM_102, '<'),
KEY_TRANS_ENTRY1(Z, Z, z, Z, 'Z', 'Z'),
KEY_TRANS_ENTRY1(X, X, x, X, 'X', 'X'),
KEY_TRANS_ENTRY1(C, C, c, C, 'C', 'C'),
diff --git a/src/osd/modules/input/input_common.h b/src/osd/modules/input/input_common.h
index 7ea001dad4f..41a9d762838 100644
--- a/src/osd/modules/input/input_common.h
+++ b/src/osd/modules/input/input_common.h
@@ -352,19 +352,35 @@ public:
// allocate the device object
auto devinfo = std::make_unique<TActual>(machine, name, module);
- // Add the device to the machine
- devinfo->m_device = machine.input().device_class(devinfo->deviceclass()).add_device(devinfo->name(), devinfo.get());
+ return add_device_internal(machine, name, module, std::move(devinfo));
+ }
- // append us to the list
- m_list.push_back(std::move(devinfo));
+ template <typename TActual, typename TArg>
+ TActual* create_device1(running_machine &machine, const char *name, input_module &module, TArg arg1)
+ {
+ // allocate the device object
+ auto devinfo = std::make_unique<TActual>(machine, name, module, arg1);
- return (TActual*)m_list.back().get();
+ return add_device_internal(machine, name, module, std::move(devinfo));
}
template <class TActual>
TActual* at(int index)
{
- return (TActual*)m_list.at(index).get();
+ return static_cast<TActual*>(m_list.at(index).get());
+ }
+
+private:
+ template <typename TActual>
+ TActual* add_device_internal(running_machine &machine, const char *name, input_module &module, std::unique_ptr<TActual> allocated)
+ {
+ // Add the device to the machine
+ allocated->m_device = machine.input().device_class(allocated->deviceclass()).add_device(allocated->name(), allocated.get());
+
+ // append us to the list
+ m_list.push_back(std::move(allocated));
+
+ return static_cast<TActual*>(m_list.back().get());
}
};
diff --git a/src/osd/modules/input/input_dinput.cpp b/src/osd/modules/input/input_dinput.cpp
index 1e4272e6317..ca3bad08026 100644
--- a/src/osd/modules/input/input_dinput.cpp
+++ b/src/osd/modules/input/input_dinput.cpp
@@ -14,6 +14,7 @@
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
+#include <initguid.h>
#include <tchar.h>
#include <wrl/client.h>
@@ -31,17 +32,15 @@
#include "strconv.h"
// MAMEOS headers
-#include "winmain.h"
#include "window.h"
#include "winutil.h"
#include "input_common.h"
#include "input_windows.h"
+#include "input_dinput.h"
using namespace Microsoft::WRL;
-#define STRUCTSIZE(x) (m_dinput_version == 0x0300) ? sizeof(x##_DX3) : sizeof(x)
-
static INT32 dinput_joystick_pov_get_state(void *device_internal, void *item_internal);
//============================================================
@@ -58,255 +57,184 @@ static HRESULT dinput_set_dword_property(ComPtr<IDirectInputDevice> device, REFG
dipdw.diph.dwHow = how;
dipdw.dwData = value;
- return IDirectInputDevice_SetProperty(device.Get(), property_guid, &dipdw.diph);
+ return device->SetProperty(property_guid, &dipdw.diph);
}
//============================================================
// dinput_device - base directinput device
//============================================================
-// DirectInput-specific information about a device
-struct dinput_api_state
+dinput_device::dinput_device(running_machine &machine, const char *name, input_device_class deviceclass, input_module &module)
+ : device_info(machine, name, deviceclass, module),
+ dinput({nullptr})
{
- ComPtr<IDirectInputDevice> device;
- ComPtr<IDirectInputDevice2> device2;
- DIDEVCAPS caps;
- LPCDIDATAFORMAT format;
-};
+}
-class dinput_device : public device_info
+dinput_device::~dinput_device()
{
-public:
- dinput_api_state dinput;
+ if (dinput.device != nullptr)
+ dinput.device.Reset();
+}
- dinput_device(running_machine &machine, const char *name, input_device_class deviceclass, input_module &module)
- : device_info(machine, name, deviceclass, module),
- dinput({nullptr})
- {
- }
+HRESULT dinput_device::poll_dinput(LPVOID pState) const
+{
+ HRESULT result;
- virtual ~dinput_device()
- {
- if (dinput.device2 != nullptr)
- dinput.device2.Reset();
+ // first poll the device, then get the state
+ if (dinput.device2 != nullptr)
+ dinput.device2->Poll();
- if (dinput.device != nullptr)
- dinput.device.Reset();
- }
+ // GetDeviceState returns the immediate state
+ result = dinput.device->GetDeviceState(dinput.format->dwDataSize, pState);
-protected:
- HRESULT poll_dinput(LPVOID pState) const
+ // handle lost inputs here
+ if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED)
{
- HRESULT result;
-
- // first poll the device, then get the state
- if (dinput.device2 != nullptr)
- IDirectInputDevice2_Poll(dinput.device2.Get());
-
- // GetDeviceState returns the immediate state
- result = IDirectInputDevice_GetDeviceState(dinput.device.Get(), dinput.format->dwDataSize, pState);
-
- // handle lost inputs here
- if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED)
- {
- result = IDirectInputDevice_Acquire(dinput.device.Get());
- if (result == DI_OK)
- result = IDirectInputDevice_GetDeviceState(dinput.device.Get(), dinput.format->dwDataSize, pState);
- }
-
- return result;
+ result = dinput.device->Acquire();
+ if (result == DI_OK)
+ result = dinput.device->GetDeviceState(dinput.format->dwDataSize, pState);
}
-};
+
+ return result;
+}
//============================================================
// dinput_keyboard_device - directinput keyboard device
//============================================================
-class dinput_keyboard_device : public dinput_device
+dinput_keyboard_device::dinput_keyboard_device(running_machine &machine, const char *name, input_module &module)
+ : dinput_device(machine, name, DEVICE_CLASS_KEYBOARD, module),
+ keyboard({{0}})
{
-private:
- std::mutex m_device_lock;
-
-public:
- keyboard_state keyboard;
-
- dinput_keyboard_device(running_machine &machine, const char *name, input_module &module)
- : dinput_device(machine, name, DEVICE_CLASS_KEYBOARD, module),
- keyboard({{0}})
- {
- }
+}
- // Polls the direct input immediate state
- void poll() override
- {
- std::lock_guard<std::mutex> scope_lock(m_device_lock);
+// Polls the direct input immediate state
+void dinput_keyboard_device::poll()
+{
+ std::lock_guard<std::mutex> scope_lock(m_device_lock);
- // Poll the state
- dinput_device::poll_dinput(&keyboard.state);
- }
+ // Poll the state
+ dinput_device::poll_dinput(&keyboard.state);
+}
- void reset() override
- {
- memset(&keyboard.state, 0, sizeof(keyboard.state));
- }
-};
+void dinput_keyboard_device::reset()
+{
+ memset(&keyboard.state, 0, sizeof(keyboard.state));
+}
//============================================================
-// dinput_module - base directinput module
+// dinput_api_helper - DirectInput API helper
//============================================================
-class dinput_module : public wininput_module
+dinput_api_helper::dinput_api_helper(int version)
+ : m_dinput(nullptr),
+ m_dinput_version(version),
+ m_pfn_DirectInputCreate("DirectInputCreateW", L"dinput.dll")
{
-private:
- ComPtr<IDirectInput> m_dinput;
- int m_dinput_version;
+}
-public:
- dinput_module(const char* type, const char* name)
- : wininput_module(type, name),
- m_dinput(nullptr),
- m_dinput_version(0)
- {
- }
+dinput_api_helper::~dinput_api_helper()
+{
+ m_dinput.Reset();
+}
- int init_internal() override
- {
- HRESULT result;
+int dinput_api_helper::initialize()
+{
+ HRESULT result;
-#if DIRECTINPUT_VERSION >= 0x800
- m_dinput_version = DIRECTINPUT_VERSION;
+ if (m_dinput_version >= 0x0800)
+ {
result = DirectInput8Create(GetModuleHandleUni(), m_dinput_version, IID_IDirectInput8, reinterpret_cast<void **>(m_dinput.GetAddressOf()), nullptr);
if (result != DI_OK)
{
m_dinput_version = 0;
return result;
}
-#else
- // first attempt to initialize DirectInput at the current version
- m_dinput_version = DIRECTINPUT_VERSION;
- result = DirectInputCreate(GetModuleHandleUni(), m_dinput_version, m_dinput.GetAddressOf(), nullptr);
+ }
+ else
+ {
+ result = m_pfn_DirectInputCreate.initialize();
+ if (result != DI_OK)
+ return result;
+
+ // first attempt to initialize DirectInput at v7
+ m_dinput_version = 0x0700;
+ result = m_pfn_DirectInputCreate(GetModuleHandleUni(), m_dinput_version, m_dinput.GetAddressOf(), nullptr);
if (result != DI_OK)
{
// if that fails, try version 5
m_dinput_version = 0x0500;
- result = DirectInputCreate(GetModuleHandleUni(), m_dinput_version, m_dinput.GetAddressOf(), nullptr);
+ result = m_pfn_DirectInputCreate(GetModuleHandleUni(), m_dinput_version, m_dinput.GetAddressOf(), nullptr);
if (result != DI_OK)
{
- // if that fails, try version 3
- m_dinput_version = 0x0300;
- result = DirectInputCreate(GetModuleHandleUni(), m_dinput_version, m_dinput.GetAddressOf(), nullptr);
- if (result != DI_OK)
- {
- m_dinput_version = 0;
- return result;
- }
+ m_dinput_version = 0;
+ return result;
}
}
-#endif
-
- osd_printf_verbose("DirectInput: Using DirectInput %d\n", m_dinput_version >> 8);
- return 0;
}
- void exit() override
- {
- m_dinput.Reset();
- wininput_module::exit();
- }
+ osd_printf_verbose("DirectInput: Using DirectInput %d\n", m_dinput_version >> 8);
+ return 0;
+}
- virtual BOOL device_enum_callback(LPCDIDEVICEINSTANCE instance, LPVOID ref) = 0;
- struct dinput_callback_context
- {
- dinput_module * self;
- running_machine * machine;
- };
+HRESULT dinput_api_helper::enum_attached_devices(int devclass, device_enum_interface *enumerate_interface, void *state) const
+{
+ device_enum_interface::dinput_callback_context ctx;
+ ctx.self = enumerate_interface;
+ ctx.state = state;
- static BOOL CALLBACK enum_callback(LPCDIDEVICEINSTANCE instance, LPVOID ref)
- {
- auto context = static_cast<dinput_callback_context*>(ref);
- return context->self->device_enum_callback(instance, context->machine);
- }
+ return m_dinput->EnumDevices(devclass, device_enum_interface::enum_callback, &ctx, DIEDFL_ATTACHEDONLY);
+}
- void input_init(running_machine &machine) override
- {
- dinput_callback_context context = { this, &machine };
- HRESULT result = IDirectInput_EnumDevices(m_dinput.Get(), dinput_devclass(), enum_callback, &context, DIEDFL_ATTACHEDONLY);
- if (result != DI_OK)
- fatalerror("DirectInput: Unable to enumerate keyboards (result=%08X)\n", static_cast<UINT32>(result));
- }
+//============================================================
+// dinput_module - base directinput module
+//============================================================
+class dinput_module : public wininput_module, public device_enum_interface
+{
protected:
- virtual int dinput_devclass() = 0;
+ std::unique_ptr<dinput_api_helper> m_dinput_helper;
- template <class TDevice>
- TDevice* create_dinput_device(
- running_machine &machine,
- LPCDIDEVICEINSTANCE instance,
- LPCDIDATAFORMAT format1,
- LPCDIDATAFORMAT format2,
- DWORD cooperative_level)
+public:
+ dinput_module(const char* type, const char* name)
+ : wininput_module(type, name),
+ m_dinput_helper(nullptr)
{
- HRESULT result;
-
- // convert instance name to utf8
- auto osd_deleter = [](void *ptr) { osd_free(ptr); };
- auto utf8_instance_name = std::unique_ptr<char, decltype(osd_deleter)>(utf8_from_tstring(instance->tszInstanceName), osd_deleter);
-
- // allocate memory for the device object
- TDevice* devinfo = devicelist()->create_device<TDevice>(machine, utf8_instance_name.get(), *this);
-
- // attempt to create a device
- result = IDirectInput_CreateDevice(m_dinput.Get(), WRAP_REFIID(instance->guidInstance), devinfo->dinput.device.GetAddressOf(), NULL);
- if (result != DI_OK)
- goto error;
+ }
- // try to get a version 2 device for it
- result = IDirectInputDevice_QueryInterface(devinfo->dinput.device.Get(), WRAP_REFIID(IID_IDirectInputDevice2), reinterpret_cast<void **>(devinfo->dinput.device2.GetAddressOf()));
- if (result != DI_OK)
- devinfo->dinput.device2 = nullptr;
+ int init_internal() override
+ {
+ m_dinput_helper = std::make_unique<dinput_api_helper>(DIRECTINPUT_VERSION);
+ int result = m_dinput_helper->initialize();
+ if (result != 0)
+ return result;
- // get the caps
- devinfo->dinput.caps.dwSize = STRUCTSIZE(DIDEVCAPS);
- result = IDirectInputDevice_GetCapabilities(devinfo->dinput.device.Get(), &devinfo->dinput.caps);
- if (result != DI_OK)
- goto error;
+ return 0;
+ }
- // attempt to set the data format
- devinfo->dinput.format = format1;
- result = IDirectInputDevice_SetDataFormat(devinfo->dinput.device.Get(), devinfo->dinput.format);
- if (result != DI_OK)
- {
- // use the secondary format if available
- if (format2 != nullptr)
- {
- devinfo->dinput.format = format2;
- result = IDirectInputDevice_SetDataFormat(devinfo->dinput.device.Get(), devinfo->dinput.format);
- }
- if (result != DI_OK)
- goto error;
- }
+ void exit() override
+ {
+ wininput_module::exit();
+ m_dinput_helper.reset();
+ }
- // set the cooperative level
- result = IDirectInputDevice_SetCooperativeLevel(devinfo->dinput.device.Get(), win_window_list->m_hwnd, cooperative_level);
+ void input_init(running_machine &machine) override
+ {
+ HRESULT result = m_dinput_helper->enum_attached_devices(dinput_devclass(), this, &machine);
if (result != DI_OK)
- goto error;
- return devinfo;
-
- error:
- devicelist()->free_device(devinfo);
- return nullptr;
+ fatalerror("DirectInput: Unable to enumerate keyboards (result=%08X)\n", static_cast<UINT32>(result));
}
- std::string device_item_name(dinput_device * devinfo, int offset, const char * defstring, const TCHAR * suffix) const
+ static std::string device_item_name(dinput_device * devinfo, int offset, const char * defstring, const TCHAR * suffix)
{
DIDEVICEOBJECTINSTANCE instance = { 0 };
HRESULT result;
// query the key name
- instance.dwSize = STRUCTSIZE(DIDEVICEOBJECTINSTANCE);
- result = IDirectInputDevice_GetObjectInfo(devinfo->dinput.device.Get(), &instance, offset, DIPH_BYOFFSET);
+ instance.dwSize = sizeof(instance);
+ result = devinfo->dinput.device->GetObjectInfo(&instance, offset, DIPH_BYOFFSET);
// if we got an error and have no default string, just return NULL
if (result != DI_OK)
@@ -342,6 +270,9 @@ protected:
return std::string(combined.get());
}
+
+protected:
+ virtual int dinput_devclass() = 0;
};
class keyboard_input_dinput : public dinput_module
@@ -368,7 +299,7 @@ public:
int keynum;
// allocate and link in a new device
- devinfo = create_dinput_device<dinput_keyboard_device>(machine, instance, &c_dfDIKeyboard, nullptr, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE);
+ devinfo = m_dinput_helper->create_device<dinput_keyboard_device>(machine, *this, instance, &c_dfDIKeyboard, nullptr, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE);
if (devinfo == nullptr)
goto exit;
@@ -392,33 +323,28 @@ public:
}
};
-class dinput_mouse_device : public dinput_device
-{
-public:
- mouse_state mouse;
- dinput_mouse_device(running_machine &machine, const char *name, input_module &module)
- : dinput_device(machine, name, DEVICE_CLASS_MOUSE, module),
- mouse({0})
- {
- }
+dinput_mouse_device::dinput_mouse_device(running_machine &machine, const char *name, input_module &module)
+ : dinput_device(machine, name, DEVICE_CLASS_MOUSE, module),
+ mouse({0})
+{
+}
- void poll() override
- {
- // poll
- dinput_device::poll_dinput(&mouse);
+void dinput_mouse_device::poll()
+{
+ // poll
+ dinput_device::poll_dinput(&mouse);
- // scale the axis data
- mouse.lX *= INPUT_RELATIVE_PER_PIXEL;
- mouse.lY *= INPUT_RELATIVE_PER_PIXEL;
- mouse.lZ *= INPUT_RELATIVE_PER_PIXEL;
- }
+ // scale the axis data
+ mouse.lX *= INPUT_RELATIVE_PER_PIXEL;
+ mouse.lY *= INPUT_RELATIVE_PER_PIXEL;
+ mouse.lZ *= INPUT_RELATIVE_PER_PIXEL;
+}
- void reset() override
- {
- memset(&mouse, 0, sizeof(mouse));
- }
-};
+void dinput_mouse_device::reset()
+{
+ memset(&mouse, 0, sizeof(mouse));
+}
class mouse_input_dinput : public dinput_module
{
@@ -445,7 +371,7 @@ public:
HRESULT result;
// allocate and link in a new device
- devinfo = create_dinput_device<dinput_mouse_device>(machine, instance, &c_dfDIMouse2, &c_dfDIMouse, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE);
+ devinfo = m_dinput_helper->create_device<dinput_mouse_device>(machine, *this, instance, &c_dfDIMouse2, &c_dfDIMouse, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE);
if (devinfo == nullptr)
goto exit;
@@ -489,46 +415,130 @@ public:
}
};
-// state information for a joystick; DirectInput state must be first element
-struct dinput_joystick_state
+dinput_joystick_device::dinput_joystick_device(running_machine &machine, const char *name, input_module &module)
+ : dinput_device(machine, name, DEVICE_CLASS_JOYSTICK, module),
+ joystick({{0}})
{
- DIJOYSTATE state;
- LONG rangemin[8];
- LONG rangemax[8];
-};
+}
-class dinput_joystick_device : public dinput_device
+void dinput_joystick_device::reset()
{
-public:
- dinput_joystick_state joystick;
+ memset(&joystick.state, 0, sizeof(joystick.state));
+}
+
+void dinput_joystick_device::poll()
+{
+ int axisnum;
+
+ // poll the device first
+ if (dinput_device::poll_dinput(&joystick.state) != ERROR_SUCCESS)
+ return;
+
+ // normalize axis values
+ for (axisnum = 0; axisnum < 8; axisnum++)
+ {
+ LONG *axis = (&joystick.state.lX) + axisnum;
+ *axis = normalize_absolute_axis(*axis, joystick.rangemin[axisnum], joystick.rangemax[axisnum]);
+ }
+}
+
+int dinput_joystick_device::configure()
+{
+ HRESULT result;
+ UINT32 axisnum, axiscount;
+
+ auto devicelist = static_cast<input_module_base&>(module()).devicelist();
+
+ // temporary approximation of index
+ int devindex = devicelist->size();
+
+ // set absolute mode
+ result = dinput_set_dword_property(dinput.device, DIPROP_AXISMODE, 0, DIPH_DEVICE, DIPROPAXISMODE_ABS);
+ if (result != DI_OK && result != DI_PROPNOEFFECT)
+ osd_printf_warning("DirectInput: Unable to set absolute mode for joystick %d (%s)\n", devindex, name());
+
+ // turn off deadzone; we do our own calculations
+ result = dinput_set_dword_property(dinput.device, DIPROP_DEADZONE, 0, DIPH_DEVICE, 0);
+ if (result != DI_OK && result != DI_PROPNOEFFECT)
+ osd_printf_warning("DirectInput: Unable to reset deadzone for joystick %d (%s)\n", devindex, name());
- dinput_joystick_device(running_machine &machine, const char *name, input_module &module)
- : dinput_device(machine, name, DEVICE_CLASS_JOYSTICK, module),
- joystick({{0}})
+ // turn off saturation; we do our own calculations
+ result = dinput_set_dword_property(dinput.device, DIPROP_SATURATION, 0, DIPH_DEVICE, 10000);
+ if (result != DI_OK && result != DI_PROPNOEFFECT)
+ osd_printf_warning("DirectInput: Unable to reset saturation for joystick %d (%s)\n", devindex, name());
+
+ // cap the number of axes, POVs, and buttons based on the format
+ dinput.caps.dwAxes = MIN(dinput.caps.dwAxes, 8);
+ dinput.caps.dwPOVs = MIN(dinput.caps.dwPOVs, 4);
+ dinput.caps.dwButtons = MIN(dinput.caps.dwButtons, 128);
+
+ // populate the axes
+ for (axisnum = axiscount = 0; axiscount < dinput.caps.dwAxes && axisnum < 8; axisnum++)
{
+ DIPROPRANGE dipr;
+ std::string name;
+
+ // fetch the range of this axis
+ dipr.diph.dwSize = sizeof(dipr);
+ dipr.diph.dwHeaderSize = sizeof(dipr.diph);
+ dipr.diph.dwObj = offsetof(DIJOYSTATE2, lX) + axisnum * sizeof(LONG);
+ dipr.diph.dwHow = DIPH_BYOFFSET;
+ result = dinput.device->GetProperty(DIPROP_RANGE, &dipr.diph);
+ if (result != DI_OK)
+ continue;
+
+ joystick.rangemin[axisnum] = dipr.lMin;
+ joystick.rangemax[axisnum] = dipr.lMax;
+
+ // populate the item description as well
+ name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, lX) + axisnum * sizeof(LONG), default_axis_name[axisnum], nullptr);
+ device()->add_item(name.c_str(), static_cast<input_item_id>(ITEM_ID_XAXIS + axisnum), generic_axis_get_state, &joystick.state.lX + axisnum);
+
+ axiscount++;
}
- void reset() override
+ // populate the POVs
+ for (UINT32 povnum = 0; povnum < dinput.caps.dwPOVs; povnum++)
{
- memset(&joystick.state, 0, sizeof(joystick.state));
+ std::string name;
+
+ // left
+ name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("L"));
+ device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_LEFT)));
+
+ // right
+ name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("R"));
+ device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_RIGHT)));
+
+ // up
+ name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("U"));
+ device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_UP)));
+
+ // down
+ name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("D"));
+ device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_DOWN)));
}
- void poll() override
+ // populate the buttons
+ for (UINT32 butnum = 0; butnum < dinput.caps.dwButtons; butnum++)
{
- int axisnum;
+ FPTR offset = reinterpret_cast<FPTR>(&static_cast<DIJOYSTATE2 *>(nullptr)->rgbButtons[butnum]);
+ std::string name = dinput_module::device_item_name(this, offset, default_button_name(butnum), nullptr);
- // poll the device first
- if (dinput_device::poll_dinput(&joystick.state) != ERROR_SUCCESS)
- return;
+ input_item_id itemid;
- // normalize axis values
- for (axisnum = 0; axisnum < 8; axisnum++)
- {
- LONG *axis = (&joystick.state.lX) + axisnum;
- *axis = normalize_absolute_axis(*axis, joystick.rangemin[axisnum], joystick.rangemax[axisnum]);
- }
+ if (butnum < INPUT_MAX_BUTTONS)
+ itemid = static_cast<input_item_id>(ITEM_ID_BUTTON1 + butnum);
+ else if (butnum < INPUT_MAX_BUTTONS + INPUT_MAX_ADD_SWITCH)
+ itemid = static_cast<input_item_id>(ITEM_ID_ADD_SWITCH1 - INPUT_MAX_BUTTONS + butnum);
+ else
+ itemid = ITEM_ID_OTHER_SWITCH;
+
+ device()->add_item(name.c_str(), itemid, generic_button_get_state, &joystick.state.rgbButtons[butnum]);
}
-};
+
+ return 0;
+}
class joystick_input_dinput : public dinput_module
{
@@ -550,102 +560,22 @@ public:
BOOL device_enum_callback(LPCDIDEVICEINSTANCE instance, LPVOID ref) override
{
DWORD cooperative_level = DISCL_FOREGROUND | DISCL_NONEXCLUSIVE;
- int axisnum, axiscount, povnum, butnum;
running_machine &machine = *static_cast<running_machine *>(ref);
dinput_joystick_device *devinfo;
- HRESULT result;
+ int result = 0;
- if (win_window_list != nullptr && win_window_list->win_has_menu()) {
+ if (win_window_list != nullptr && win_window_list->win_has_menu())
cooperative_level = DISCL_BACKGROUND | DISCL_NONEXCLUSIVE;
- }
+
// allocate and link in a new device
- devinfo = create_dinput_device<dinput_joystick_device>(machine, instance, &c_dfDIJoystick, nullptr, cooperative_level);
+ devinfo = m_dinput_helper->create_device<dinput_joystick_device>(machine, *this, instance, &c_dfDIJoystick, nullptr, cooperative_level);
if (devinfo == nullptr)
goto exit;
- // set absolute mode
- result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_AXISMODE, 0, DIPH_DEVICE, DIPROPAXISMODE_ABS);
- if (result != DI_OK && result != DI_PROPNOEFFECT)
- osd_printf_warning("DirectInput: Unable to set absolute mode for joystick %d (%s)\n", devicelist()->size(), devinfo->name());
-
- // turn off deadzone; we do our own calculations
- result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_DEADZONE, 0, DIPH_DEVICE, 0);
- if (result != DI_OK && result != DI_PROPNOEFFECT)
- osd_printf_warning("DirectInput: Unable to reset deadzone for joystick %d (%s)\n", devicelist()->size(), devinfo->name());
-
- // turn off saturation; we do our own calculations
- result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_SATURATION, 0, DIPH_DEVICE, 10000);
- if (result != DI_OK && result != DI_PROPNOEFFECT)
- osd_printf_warning("DirectInput: Unable to reset saturation for joystick %d (%s)\n", devicelist()->size(), devinfo->name());
-
- // cap the number of axes, POVs, and buttons based on the format
- devinfo->dinput.caps.dwAxes = MIN(devinfo->dinput.caps.dwAxes, 8);
- devinfo->dinput.caps.dwPOVs = MIN(devinfo->dinput.caps.dwPOVs, 4);
- devinfo->dinput.caps.dwButtons = MIN(devinfo->dinput.caps.dwButtons, 128);
-
- // populate the axes
- for (axisnum = axiscount = 0; axiscount < devinfo->dinput.caps.dwAxes && axisnum < 8; axisnum++)
+ result = devinfo->configure();
+ if (result != 0)
{
- DIPROPRANGE dipr;
- std::string name;
-
- // fetch the range of this axis
- dipr.diph.dwSize = sizeof(dipr);
- dipr.diph.dwHeaderSize = sizeof(dipr.diph);
- dipr.diph.dwObj = offsetof(DIJOYSTATE2, lX) + axisnum * sizeof(LONG);
- dipr.diph.dwHow = DIPH_BYOFFSET;
- result = IDirectInputDevice_GetProperty(devinfo->dinput.device.Get(), DIPROP_RANGE, &dipr.diph);
- if (result != DI_OK)
- continue;
-
- devinfo->joystick.rangemin[axisnum] = dipr.lMin;
- devinfo->joystick.rangemax[axisnum] = dipr.lMax;
-
- // populate the item description as well
- name = device_item_name(devinfo, offsetof(DIJOYSTATE2, lX) + axisnum * sizeof(LONG), default_axis_name[axisnum], nullptr);
- devinfo->device()->add_item(name.c_str(), static_cast<input_item_id>(ITEM_ID_XAXIS + axisnum), generic_axis_get_state, &devinfo->joystick.state.lX + axisnum);
-
- axiscount++;
- }
-
- // populate the POVs
- for (povnum = 0; povnum < devinfo->dinput.caps.dwPOVs; povnum++)
- {
- std::string name;
-
- // left
- name = device_item_name(devinfo, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("L"));
- devinfo->device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_LEFT)));
-
- // right
- name = device_item_name(devinfo, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("R"));
- devinfo->device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_RIGHT)));
-
- // up
- name = device_item_name(devinfo, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("U"));
- devinfo->device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_UP)));
-
- // down
- name = device_item_name(devinfo, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("D"));
- devinfo->device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_DOWN)));
- }
-
- // populate the buttons
- for (butnum = 0; butnum < devinfo->dinput.caps.dwButtons; butnum++)
- {
- FPTR offset = reinterpret_cast<FPTR>(&static_cast<DIJOYSTATE2 *>(nullptr)->rgbButtons[butnum]);
- std::string name = device_item_name(devinfo, offset, default_button_name(butnum), nullptr);
-
- input_item_id itemid;
-
- if (butnum < INPUT_MAX_BUTTONS)
- itemid = static_cast<input_item_id>(ITEM_ID_BUTTON1 + butnum);
- else if (butnum < INPUT_MAX_BUTTONS + INPUT_MAX_ADD_SWITCH)
- itemid = static_cast<input_item_id>(ITEM_ID_ADD_SWITCH1 - INPUT_MAX_BUTTONS + butnum);
- else
- itemid = ITEM_ID_OTHER_SWITCH;
-
- devinfo->device()->add_item(name.c_str(), itemid, generic_button_get_state, &devinfo->joystick.state.rgbButtons[butnum]);
+ osd_printf_error("Failed to configure DI Joystick device. Error 0x%x\n", static_cast<unsigned int>(result));
}
exit:
diff --git a/src/osd/modules/input/input_dinput.h b/src/osd/modules/input/input_dinput.h
new file mode 100644
index 00000000000..6dacf8ebd77
--- /dev/null
+++ b/src/osd/modules/input/input_dinput.h
@@ -0,0 +1,177 @@
+#ifndef INPUT_DINPUT_H_
+#define INPUT_DINPUT_H_
+
+#include "input_common.h"
+#include "winutil.h"
+
+//============================================================
+// dinput_device - base directinput device
+//============================================================
+
+// DirectInput-specific information about a device
+struct dinput_api_state
+{
+ Microsoft::WRL::ComPtr<IDirectInputDevice> device;
+ Microsoft::WRL::ComPtr<IDirectInputDevice2> device2;
+ DIDEVCAPS caps;
+ LPCDIDATAFORMAT format;
+};
+
+class device_enum_interface
+{
+public:
+ struct dinput_callback_context
+ {
+ device_enum_interface * self;
+ void * state;
+ };
+
+ virtual ~device_enum_interface()
+ {
+ }
+
+ static BOOL CALLBACK enum_callback(LPCDIDEVICEINSTANCE instance, LPVOID ref)
+ {
+ auto context = static_cast<dinput_callback_context*>(ref);
+ return context->self->device_enum_callback(instance, context->state);
+ }
+
+ virtual BOOL device_enum_callback(LPCDIDEVICEINSTANCE instance, LPVOID ref) = 0;
+};
+
+typedef lazy_loaded_function_p4<HRESULT, HMODULE, int, IDirectInput **, LPUNKNOWN> pfn_dinput_create;
+
+class dinput_api_helper
+{
+private:
+ Microsoft::WRL::ComPtr<IDirectInput> m_dinput;
+ int m_dinput_version;
+ pfn_dinput_create m_pfn_DirectInputCreate;
+
+public:
+ dinput_api_helper(int version);
+ virtual ~dinput_api_helper();
+ int initialize();
+
+ template<class TDevice>
+ TDevice* create_device(
+ running_machine &machine,
+ input_module_base &module,
+ LPCDIDEVICEINSTANCE instance,
+ LPCDIDATAFORMAT format1,
+ LPCDIDATAFORMAT format2,
+ DWORD cooperative_level)
+ {
+ HRESULT result;
+
+ // convert instance name to utf8
+ auto osd_deleter = [](void *ptr) { osd_free(ptr); };
+ auto utf8_instance_name = std::unique_ptr<char, decltype(osd_deleter)>(utf8_from_tstring(instance->tszInstanceName), osd_deleter);
+
+ // allocate memory for the device object
+ TDevice* devinfo = module.devicelist()->create_device<TDevice>(machine, utf8_instance_name.get(), module);
+
+ // attempt to create a device
+ result = m_dinput->CreateDevice(instance->guidInstance, devinfo->dinput.device.GetAddressOf(), nullptr);
+ if (result != DI_OK)
+ goto error;
+
+ // try to get a version 2 device for it
+ result = devinfo->dinput.device.CopyTo(IID_IDirectInputDevice2, reinterpret_cast<void**>(devinfo->dinput.device2.GetAddressOf()));
+ if (result != DI_OK)
+ devinfo->dinput.device2 = nullptr;
+
+ // get the caps
+ devinfo->dinput.caps.dwSize = sizeof(devinfo->dinput.caps);
+ result = devinfo->dinput.device->GetCapabilities(&devinfo->dinput.caps);
+ if (result != DI_OK)
+ goto error;
+
+ // attempt to set the data format
+ devinfo->dinput.format = format1;
+ result = devinfo->dinput.device->SetDataFormat(devinfo->dinput.format);
+ if (result != DI_OK)
+ {
+ // use the secondary format if available
+ if (format2 != nullptr)
+ {
+ devinfo->dinput.format = format2;
+ result = devinfo->dinput.device->SetDataFormat(devinfo->dinput.format);
+ }
+ if (result != DI_OK)
+ goto error;
+ }
+
+ // set the cooperative level
+ result = devinfo->dinput.device->SetCooperativeLevel(win_window_list->m_hwnd, cooperative_level);
+ if (result != DI_OK)
+ goto error;
+
+ return devinfo;
+
+ error:
+ module.devicelist()->free_device(devinfo);
+ return nullptr;
+ }
+
+ HRESULT enum_attached_devices(int devclass, device_enum_interface *enumerate_interface, void *state) const;
+};
+
+class dinput_device : public device_info
+{
+public:
+ dinput_api_state dinput;
+
+ dinput_device(running_machine &machine, const char *name, input_device_class deviceclass, input_module &module);
+ virtual ~dinput_device();
+
+protected:
+ HRESULT poll_dinput(LPVOID pState) const;
+};
+
+class dinput_keyboard_device : public dinput_device
+{
+private:
+ std::mutex m_device_lock;
+
+public:
+ keyboard_state keyboard;
+
+ dinput_keyboard_device(running_machine &machine, const char *name, input_module &module);
+
+ void poll() override;
+ void reset() override;
+};
+
+class dinput_mouse_device : public dinput_device
+{
+public:
+ mouse_state mouse;
+
+public:
+ dinput_mouse_device(running_machine &machine, const char *name, input_module &module);
+ void poll() override;
+ void reset() override;
+};
+
+// state information for a joystick; DirectInput state must be first element
+struct dinput_joystick_state
+{
+ DIJOYSTATE state;
+ LONG rangemin[8];
+ LONG rangemax[8];
+};
+
+class dinput_joystick_device : public dinput_device
+{
+public:
+ dinput_joystick_state joystick;
+public:
+ dinput_joystick_device(running_machine &machine, const char *name, input_module &module);
+ void reset() override;
+ void poll() override;
+ int configure();
+};
+
+
+#endif
diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp
index 2c5b2e45a8c..06096a6961b 100644
--- a/src/osd/modules/input/input_sdl.cpp
+++ b/src/osd/modules/input/input_sdl.cpp
@@ -681,9 +681,24 @@ public:
: sdl_input_module(OSD_JOYSTICKINPUT_PROVIDER)
{
}
-
+
+ virtual void exit() override
+ {
+ sdl_input_module::exit();
+
+ SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
+ }
+
virtual void input_init(running_machine &machine) override
{
+ SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0");
+
+ if (SDL_InitSubSystem(SDL_INIT_JOYSTICK))
+ {
+ osd_printf_error("Could not initialize SDL Joystick: %s.\n", SDL_GetError());
+ return;
+ }
+
sdl_input_module::input_init(machine);
char tempname[512];
@@ -696,20 +711,8 @@ public:
int physical_stick;
for (physical_stick = 0; physical_stick < SDL_NumJoysticks(); physical_stick++)
{
- if (SDL_IsGameController(physical_stick)) {
- osd_printf_verbose("Joystick %i is supported by the game controller interface!\n", physical_stick);
- osd_printf_verbose("Compatible controller, named \'%s\'\n", SDL_GameControllerNameForIndex(physical_stick));
- SDL_GameController *joy = SDL_GameControllerOpen(physical_stick);
- osd_printf_verbose("Controller is mapped as \"%s\".\n", SDL_GameControllerMapping(joy));
- std::string joy_name = remove_spaces(SDL_GameControllerName(joy));
- SDL_GameControllerClose(joy);
+ std::string joy_name = remove_spaces(SDL_JoystickNameForIndex(physical_stick));
devmap_register(&m_joy_map, physical_stick, joy_name.c_str());
- } else {
- SDL_Joystick *joy = SDL_JoystickOpen(physical_stick);
- std::string joy_name = remove_spaces(SDL_JoystickName(joy));
- SDL_JoystickClose(joy);
- devmap_register(&m_joy_map, physical_stick, joy_name.c_str());
- }
}
for (int stick = 0; stick < MAX_DEVMAP_ENTRIES; stick++)
@@ -720,13 +723,11 @@ public:
continue;
physical_stick = m_joy_map.map[stick].physical;
-
SDL_Joystick *joy = SDL_JoystickOpen(physical_stick);
-
devinfo->sdl_state.device = joy;
devinfo->sdl_state.joystick_id = SDL_JoystickInstanceID(joy);
- osd_printf_verbose("Joystick: %s\n", devinfo->name());
+ osd_printf_verbose("Joystick: %s\n", SDL_JoystickNameForIndex(physical_stick));
osd_printf_verbose("Joystick: ... %d axes, %d buttons %d hats %d balls\n", SDL_JoystickNumAxes(joy), SDL_JoystickNumButtons(joy), SDL_JoystickNumHats(joy), SDL_JoystickNumBalls(joy));
osd_printf_verbose("Joystick: ... Physical id %d mapped to logical id %d\n", physical_stick, stick + 1);
diff --git a/src/osd/modules/input/input_winhybrid.cpp b/src/osd/modules/input/input_winhybrid.cpp
new file mode 100644
index 00000000000..538abe38da4
--- /dev/null
+++ b/src/osd/modules/input/input_winhybrid.cpp
@@ -0,0 +1,413 @@
+// license:BSD-3-Clause
+// copyright-holders:Brad Hughes
+//============================================================
+//
+// input_winhybrid.cpp - Windows hybrid DirectInput/Xinput
+//
+//============================================================
+
+#include "input_module.h"
+#include "modules/osdmodule.h"
+
+#if defined(OSD_WINDOWS)
+
+#include <wbemcli.h>
+#include <list>
+#include <vector>
+
+// standard windows headers
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <wrl/client.h>
+
+// XInput/DirectInput
+#include <xinput.h>
+#include <dinput.h>
+
+#undef interface
+
+// MAME headers
+#include "emu.h"
+#include "osdepend.h"
+
+// MAMEOS headers
+#include "strconv.h"
+#include "winutil.h"
+#include "winmain.h"
+
+#include "input_common.h"
+#include "input_windows.h"
+#include "input_xinput.h"
+#include "input_dinput.h"
+
+using namespace Microsoft::WRL;
+
+template<class TCom>
+class ComArray
+{
+private:
+ std::vector<TCom*> m_entries;
+
+public:
+ ComArray(size_t capacity)
+ : m_entries(capacity, nullptr)
+ {
+ }
+
+ ~ComArray()
+ {
+ Release();
+ }
+
+ TCom** ReleaseAndGetAddressOf()
+ {
+ Release();
+
+ // This works b/c vector elements are guaranteed to be contiguous.
+ return &m_entries[0];
+ }
+
+ TCom* operator [] (int i)
+ {
+ return m_entries[i];
+ }
+
+ size_t Size()
+ {
+ return m_entries.size();
+ }
+
+ void Release()
+ {
+ for (int i = 0; i < m_entries.size(); i++)
+ {
+ if (m_entries[i] != nullptr)
+ {
+ m_entries[i]->Release();
+ m_entries[i] = nullptr;
+ }
+ }
+ }
+};
+
+struct bstr_deleter
+{
+ void operator () (BSTR bstr) const
+ {
+ if (bstr != nullptr)
+ SysFreeString(bstr);
+ }
+};
+
+typedef std::unique_ptr<OLECHAR, bstr_deleter> bstr_ptr;
+
+//============================================================
+// winhybrid_joystick_module
+//============================================================
+
+class winhybrid_joystick_module : public wininput_module, public device_enum_interface
+{
+private:
+ std::shared_ptr<xinput_api_helper> m_xinput_helper;
+ std::unique_ptr<dinput_api_helper> m_dinput_helper;
+ std::list<DWORD> m_xinput_deviceids;
+ bool m_xinput_detect_failed;
+
+public:
+ winhybrid_joystick_module()
+ : wininput_module(OSD_JOYSTICKINPUT_PROVIDER, "winhybrid"),
+ m_xinput_helper(nullptr),
+ m_dinput_helper(nullptr),
+ m_xinput_detect_failed(false)
+ {
+ }
+
+ bool probe() override
+ {
+ int status = init_helpers();
+ if (status != 0)
+ {
+ osd_printf_verbose("Hybrid joystick module isn't supported, falling back.\n");
+ return false;
+ }
+
+ return true;
+ }
+
+ int init(const osd_options &options) override
+ {
+ // Call the base
+ int status = wininput_module::init(options);
+ if (status != 0)
+ return status;
+
+ // Create and initialize our helpers
+ status = init_helpers();
+ if (status != 0)
+ return status;
+
+ return 0;
+ }
+
+ BOOL device_enum_callback(LPCDIDEVICEINSTANCE instance, LPVOID ref) override
+ {
+ DWORD cooperative_level = DISCL_FOREGROUND | DISCL_NONEXCLUSIVE;
+ running_machine &machine = *static_cast<running_machine *>(ref);
+ dinput_joystick_device *devinfo;
+ int result = 0;
+
+ // First check if this device is XInput Compatible. If so, don't add it here
+ // as it'll be picked up by Xinput
+ if (!m_xinput_detect_failed && is_xinput_device(&instance->guidProduct))
+ {
+ osd_printf_verbose("Skipping DirectInput for XInput compatible joystick %S.\n", instance->tszInstanceName);
+ goto exit;
+ }
+
+ if (win_window_list != nullptr && win_window_list->win_has_menu())
+ cooperative_level = DISCL_BACKGROUND | DISCL_NONEXCLUSIVE;
+
+ // allocate and link in a new device
+ devinfo = m_dinput_helper->create_device<dinput_joystick_device>(machine, *this, instance, &c_dfDIJoystick, nullptr, cooperative_level);
+ if (devinfo == nullptr)
+ goto exit;
+
+ result = devinfo->configure();
+ if (result != 0)
+ {
+ osd_printf_error("Failed to configure DI Joystick device. Error 0x%x\n", static_cast<unsigned int>(result));
+ }
+
+ exit:
+ return DIENUM_CONTINUE;
+ }
+
+ void exit() override
+ {
+ m_xinput_helper.reset();
+ m_dinput_helper.reset();
+
+ wininput_module::exit();
+ }
+
+protected:
+ virtual void input_init(running_machine &machine) override
+ {
+ HRESULT result = get_xinput_devices(m_xinput_deviceids);
+ if (result != 0)
+ {
+ m_xinput_detect_failed = true;
+ osd_printf_warning("XInput device detection failed. XInput won't be used. Error: 0x%X\n", static_cast<unsigned int>(result));
+ }
+
+ // Enumerate all the directinput joysticks and add them if they aren't xinput compatible
+ result = m_dinput_helper->enum_attached_devices(DI8DEVCLASS_GAMECTRL, this, &machine);
+ if (result != DI_OK)
+ fatalerror("DirectInput: Unable to enumerate keyboards (result=%08X)\n", static_cast<UINT32>(result));
+
+ xinput_joystick_device *devinfo;
+
+ // now add all xinput devices
+ if (!m_xinput_detect_failed)
+ {
+ // Loop through each gamepad to determine if they are connected
+ for (UINT i = 0; i < XUSER_MAX_COUNT; i++)
+ {
+ XINPUT_STATE state = { 0 };
+
+ if (m_xinput_helper->XInputGetState(i, &state) == ERROR_SUCCESS)
+ {
+ // allocate and link in a new device
+ devinfo = m_xinput_helper->create_xinput_device(machine, i, *this);
+ if (devinfo == nullptr)
+ continue;
+
+ // Configure each gamepad to add buttons and Axes, etc.
+ devinfo->configure();
+ }
+ }
+ }
+ }
+
+private:
+ int init_helpers()
+ {
+ int status = 0;
+
+ if (m_xinput_helper == nullptr)
+ {
+ m_xinput_helper = std::make_shared<xinput_api_helper>();
+ status = m_xinput_helper->initialize();
+ if (status != 0)
+ {
+ osd_printf_error("xinput_api_helper failed to initialize! Error: %u\n", static_cast<unsigned int>(status));
+ return -1;
+ }
+ }
+
+ if (m_dinput_helper == nullptr)
+ {
+ m_dinput_helper = std::make_unique<dinput_api_helper>(DIRECTINPUT_VERSION);
+ status = m_dinput_helper->initialize();
+ if (status != DI_OK)
+ {
+ osd_printf_error("dinput_api_helper failed to initialize! Error: %u\n", static_cast<unsigned int>(status));
+ return -1;
+ }
+ }
+
+ return status;
+ }
+
+ //-----------------------------------------------------------------------------
+ // Returns true if the DirectInput device is also an XInput device.
+ //-----------------------------------------------------------------------------
+ bool is_xinput_device(const GUID* pGuidProductFromDirectInput)
+ {
+ // Check each xinput device to see if this device's vid/pid matches
+ for (auto devid = m_xinput_deviceids.begin(); devid != m_xinput_deviceids.end(); ++devid)
+ {
+ if (*devid == pGuidProductFromDirectInput->Data1)
+ return true;
+ }
+
+ return false;
+ }
+
+ //-----------------------------------------------------------------------------
+ // Enum each PNP device using WMI and check each device ID to see if it contains
+ // "IG_" (ex. "VID_045E&PID_028E&IG_00"). If it does, then it’s an XInput device
+ // Unfortunately this information can not be found by just using DirectInput.
+ // Checking against a VID/PID of 0x028E/0x045E won't find 3rd party or future
+ // XInput devices.
+ //-----------------------------------------------------------------------------
+ HRESULT get_xinput_devices(std::list<DWORD> &xinput_id_list) const
+ {
+ ComPtr<IWbemServices> pIWbemServices;
+ ComPtr<IEnumWbemClassObject> pEnumDevices;
+ ComPtr<IWbemLocator> pIWbemLocator;
+ ComArray<IWbemClassObject> pDevices(20);
+ bstr_ptr bstrDeviceID;
+ bstr_ptr bstrClassName;
+ bstr_ptr bstrNamespace;
+ DWORD uReturned = 0;
+ UINT iDevice = 0;
+ VARIANT var;
+ HRESULT hr;
+
+ // CoInit if needed
+ CoInitialize(nullptr);
+
+ // Create WMI
+ hr = CoCreateInstance(
+ __uuidof(WbemLocator),
+ nullptr,
+ CLSCTX_INPROC_SERVER,
+ __uuidof(IWbemLocator),
+ reinterpret_cast<void**>(pIWbemLocator.GetAddressOf()));
+
+ if (FAILED(hr) || pIWbemLocator == nullptr)
+ {
+ osd_printf_error("Creating WbemLocator failed. Error: 0x%X\n", static_cast<unsigned int>(hr));
+ return hr;
+ }
+
+ // Create BSTRs for WMI
+ bstrNamespace = bstr_ptr(SysAllocString(L"\\\\.\\root\\cimv2"));
+ bstrDeviceID = bstr_ptr(SysAllocString(L"DeviceID"));
+ bstrClassName = bstr_ptr(SysAllocString(L"Win32_PNPEntity"));
+
+ // Connect to WMI
+ hr = pIWbemLocator->ConnectServer(
+ bstrNamespace.get(),
+ nullptr,
+ nullptr,
+ nullptr,
+ 0L,
+ nullptr,
+ nullptr,
+ pIWbemServices.GetAddressOf());
+
+ if (FAILED(hr) || pIWbemServices == nullptr)
+ {
+ osd_printf_error("Connecting to WMI Server failed. Error: 0x%X\n", static_cast<unsigned int>(hr));
+ return hr;
+ }
+
+ // Switch security level to IMPERSONATE
+ (void)CoSetProxyBlanket(
+ pIWbemServices.Get(),
+ RPC_C_AUTHN_WINNT,
+ RPC_C_AUTHZ_NONE,
+ nullptr,
+ RPC_C_AUTHN_LEVEL_CALL,
+ RPC_C_IMP_LEVEL_IMPERSONATE,
+ nullptr,
+ 0);
+
+ // Get list of Win32_PNPEntity devices
+ hr = pIWbemServices->CreateInstanceEnum(bstrClassName.get(), 0, nullptr, pEnumDevices.GetAddressOf());
+ if (FAILED(hr) || pEnumDevices == nullptr)
+ {
+ osd_printf_error("Getting list of Win32_PNPEntity devices failed. Error: 0x%X\n", static_cast<unsigned int>(hr));
+ return hr;
+ }
+
+ // Loop over all devices
+ for (; ; )
+ {
+ // Get a few at a time
+ hr = pEnumDevices->Next(10000, pDevices.Size(), pDevices.ReleaseAndGetAddressOf(), &uReturned);
+ if (FAILED(hr))
+ {
+ osd_printf_error("Enumerating WMI classes failed. Error: 0x%X\n", static_cast<unsigned int>(hr));
+ return hr;
+ }
+
+ if (uReturned == 0)
+ break;
+
+ for (iDevice = 0; iDevice < uReturned; iDevice++)
+ {
+ if (!pDevices[iDevice])
+ continue;
+
+ // For each device, get its device ID
+ hr = pDevices[iDevice]->Get(bstrDeviceID.get(), 0L, &var, nullptr, nullptr);
+ if (SUCCEEDED(hr) && var.vt == VT_BSTR && var.bstrVal != nullptr)
+ {
+ // Check if the device ID contains "IG_". If it does, then it’s an XInput device
+ // Unfortunately this information can not be found by just using DirectInput
+ if (wcsstr(var.bstrVal, L"IG_"))
+ {
+ // If it does, then get the VID/PID from var.bstrVal
+ DWORD dwPid = 0, dwVid = 0;
+ WCHAR* strVid = wcsstr(var.bstrVal, L"VID_");
+ if (strVid && swscanf(strVid, L"VID_%4X", &dwVid) != 1)
+ dwVid = 0;
+
+ WCHAR* strPid = wcsstr(var.bstrVal, L"PID_");
+ if (strPid && swscanf(strPid, L"PID_%4X", &dwPid) != 1)
+ dwPid = 0;
+
+ DWORD dwVidPid = MAKELONG(dwVid, dwPid);
+
+ // Add the VID/PID to a linked list
+ xinput_id_list.push_back(dwVidPid);
+ }
+ }
+ }
+ }
+
+ if (SUCCEEDED(hr))
+ hr = S_OK;
+
+ return hr;
+ }
+};
+
+#else
+MODULE_NOT_SUPPORTED(winhybrid_joystick_module, OSD_JOYSTICKINPUT_PROVIDER, "winhybrid")
+#endif
+
+MODULE_DEFINITION(JOYSTICKINPUT_WINHYBRID, winhybrid_joystick_module)
diff --git a/src/osd/modules/input/input_xinput.cpp b/src/osd/modules/input/input_xinput.cpp
index 8c7800c8c35..c3725ffbf08 100644
--- a/src/osd/modules/input/input_xinput.cpp
+++ b/src/osd/modules/input/input_xinput.cpp
@@ -23,224 +23,199 @@
// MAME headers
#include "emu.h"
#include "osdepend.h"
-#include "ui/ui.h"
// MAMEOS headers
#include "winutil.h"
#include "winmain.h"
-#include "window.h"
#include "input_common.h"
#include "input_windows.h"
+#include "input_xinput.h"
-#define XINPUT_MAX_POV 4
-#define XINPUT_MAX_BUTTONS 10
-#define XINPUT_MAX_AXIS 4
-#define XINPUT_AXIS_MINVALUE -32767
-#define XINPUT_AXIS_MAXVALUE 32767
-
-// default axis names
-static const char *const xinput_axis_name[] =
+xinput_api_helper::xinput_api_helper()
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ : XInputGetState("XInputGetState", xinput_dll_names, ARRAY_LENGTH(xinput_dll_names))
+ , XInputGetCapabilities("XInputGetCapabilities", xinput_dll_names, ARRAY_LENGTH(xinput_dll_names))
+#endif
{
- "LSX",
- "LSY",
- "RSX",
- "RSY"
-};
+}
-static const input_item_id xinput_axis_ids[] =
+int xinput_api_helper::initialize()
{
- ITEM_ID_XAXIS,
- ITEM_ID_YAXIS,
- ITEM_ID_RXAXIS,
- ITEM_ID_RYAXIS
-};
-
-static const USHORT xinput_pov_dir[] = {
- XINPUT_GAMEPAD_DPAD_UP,
- XINPUT_GAMEPAD_DPAD_DOWN,
- XINPUT_GAMEPAD_DPAD_LEFT,
- XINPUT_GAMEPAD_DPAD_RIGHT
-};
-
-static const char *const xinput_pov_names[] = {
- "DPAD Up",
- "DPAD Down",
- "DPAD Left",
- "DPAD Right"
-};
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ int status;
+ status = XInputGetState.initialize();
+ if (status != 0)
+ {
+ osd_printf_error("Failed to initialize function pointer for %s. Error: %d\n", XInputGetState.name(), status);
+ return -1;
+ }
-static const USHORT xinput_buttons[] = {
- XINPUT_GAMEPAD_A,
- XINPUT_GAMEPAD_B,
- XINPUT_GAMEPAD_X,
- XINPUT_GAMEPAD_Y,
- XINPUT_GAMEPAD_LEFT_SHOULDER,
- XINPUT_GAMEPAD_RIGHT_SHOULDER,
- XINPUT_GAMEPAD_START,
- XINPUT_GAMEPAD_BACK,
- XINPUT_GAMEPAD_LEFT_THUMB,
- XINPUT_GAMEPAD_RIGHT_THUMB,
-};
+ status = XInputGetCapabilities.initialize();
+ if (status != 0)
+ {
+ osd_printf_error("Failed to initialize function pointer for %s. Error: %d\n", XInputGetCapabilities.name(), status);
+ return -1;
+ }
+#endif
-static const char *const xinput_button_names[] = {
- "A",
- "B",
- "X",
- "Y",
- "Left Shoulder",
- "Right Shoulder",
- "Start",
- "Back",
- "Left Thumb",
- "Right Thumb"
-};
+ return 0;
+}
-struct gamepad_state
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+// Pass-through functions for Universal Windows
+inline DWORD xinput_api_helper::XInputGetState(DWORD dwUserindex, XINPUT_STATE *pState)
{
- BYTE rgbButtons[XINPUT_MAX_BUTTONS];
- BYTE rgbPov[XINPUT_MAX_POV];
- BYTE bLeftTrigger;
- BYTE bRightTrigger;
- LONG sThumbLX;
- LONG sThumbLY;
- LONG sThumbRX;
- LONG sThumbRY;
-};
+ return ::XInputGetState(dwUserindex, pState);
+}
-// state information for a gamepad; state must be first element
-struct xinput_api_state
+inline DWORD xinput_api_helper::XInputGetCapabilities(DWORD dwUserindex, DWORD dwFlags, XINPUT_CAPABILITIES* pCapabilities)
{
- UINT32 playerIndex;
- XINPUT_STATE xstate;
- XINPUT_CAPABILITIES caps;
-};
+ return ::XInputGetCapabilities(dwUserindex, dwFlags, pCapabilities);
+}
+#endif
-// Typedef for pointers to XInput Functions
-typedef lazy_loaded_function_p2<DWORD, DWORD, XINPUT_STATE*> xinput_get_state_fn;
-typedef lazy_loaded_function_p3<DWORD, DWORD, DWORD, XINPUT_CAPABILITIES*> xinput_get_caps_fn;
+//============================================================
+// create_xinput_device
+//============================================================
-class xinput_interface
+xinput_joystick_device * xinput_api_helper::create_xinput_device(running_machine &machine, UINT index, wininput_module &module)
{
-private:
- const wchar_t* xinput_dll_names[2] = { L"xinput1_4.dll", L"xinput9_1_0.dll" };
+ xinput_joystick_device *devinfo;
-public:
- xinput_get_state_fn XInputGetState;
- xinput_get_caps_fn XInputGetCapabilities;
-
-private:
- xinput_interface()
- : XInputGetState("XInputGetState", xinput_dll_names, ARRAY_LENGTH(xinput_dll_names)),
- XInputGetCapabilities("XInputGetCapabilities", xinput_dll_names, ARRAY_LENGTH(xinput_dll_names))
+ XINPUT_CAPABILITIES caps = { 0 };
+ if (FAILED(XInputGetCapabilities(index, 0, &caps)))
{
+ // If we can't get the capabilities skip this device
+ return nullptr;
}
- int initialize()
- {
- int status;
- status = XInputGetState.initialize();
- if (status != 0)
- {
- osd_printf_error("Failed to initialize function pointer for %s. Error: %d\n", XInputGetState.name(), status);
- return -1;
- }
+ char device_name[16];
+ snprintf(device_name, sizeof(device_name), "XInput Player %u", index + 1);
- status = XInputGetCapabilities.initialize();
- if (status != 0)
- {
- osd_printf_error("Failed to initialize function pointer for %s. Error: %d\n", XInputGetCapabilities.name(), status);
- return -1;
- }
+ // allocate the device object
+ devinfo = module.devicelist()->create_device1<xinput_joystick_device>(machine, device_name, module, shared_from_this());
- return 0;
- }
+ // Set the player ID
+ devinfo->xinput_state.player_index = index;
-public:
- static DWORD get_interface(xinput_interface **ppinterface)
- {
- static xinput_interface s_instance;
- DWORD error = s_instance.initialize();
- if (error == 0)
- {
- *ppinterface = &s_instance;
- }
+ // Assign the caps we captured earlier
+ devinfo->xinput_state.caps = caps;
- return error;
- }
-};
+ return devinfo;
+}
//============================================================
// xinput_joystick_device
//============================================================
-class xinput_joystick_device : public device_info
+xinput_joystick_device::xinput_joystick_device(running_machine &machine, const char *name, input_module &module, std::shared_ptr<xinput_api_helper> helper)
+ : device_info(machine, name, DEVICE_CLASS_JOYSTICK, module),
+ gamepad({{0}}),
+ xinput_state({0}),
+ m_xinput_helper(helper),
+ m_configured(false)
{
-public:
- gamepad_state gamepad;
- xinput_api_state xinput_state;
+}
-private:
- xinput_interface* xinput_api;
+void xinput_joystick_device::poll()
+{
+ if (!m_configured)
+ return;
-public:
- xinput_joystick_device(running_machine &machine, const char *name, input_module &module)
- : device_info(machine, name, DEVICE_CLASS_JOYSTICK, module),
- gamepad({{0}}),
- xinput_state({0}),
- xinput_api(nullptr)
+ // poll the device first
+ HRESULT result = m_xinput_helper->XInputGetState(xinput_state.player_index, &xinput_state.xstate);
+
+ // If we can't poll the device, skip
+ if (FAILED(result))
+ return;
+
+ // Copy the XState into State
+ // Start with the POV (DPAD)
+ for (int povindex = 0; povindex < XINPUT_MAX_POV; povindex++)
{
- // Attempt to get the xinput interface
- xinput_interface::get_interface(&xinput_api);
+ int currentPov = xinput_pov_dir[povindex];
+ gamepad.povs[povindex] = (xinput_state.xstate.Gamepad.wButtons & currentPov) ? 0xFF : 0;
}
- void poll() override
+ // Now do the buttons
+ for (int buttonindex = 0; buttonindex < XINPUT_MAX_BUTTONS; buttonindex++)
{
- // Nothing we can do if for some reason the API couldn't be loaded
- if (xinput_api == nullptr)
- return;
+ int currentButton = xinput_buttons[buttonindex];
+ gamepad.buttons[buttonindex] = (xinput_state.xstate.Gamepad.wButtons & currentButton) ? 0xFF : 0;
+ }
- // poll the device first
- HRESULT result = xinput_api->XInputGetState(xinput_state.playerIndex, &xinput_state.xstate);
+ // Now grab the axis values
+ // Each of the thumbstick axis members is a signed value between -32768 and 32767 describing the position of the thumbstick
+ // However, the Y axis values are inverted from what MAME expects, so negate the value
+ gamepad.left_thumb_x = normalize_absolute_axis(xinput_state.xstate.Gamepad.sThumbLX, XINPUT_AXIS_MINVALUE, XINPUT_AXIS_MAXVALUE);
+ gamepad.left_thumb_y = normalize_absolute_axis(-xinput_state.xstate.Gamepad.sThumbLY, XINPUT_AXIS_MINVALUE, XINPUT_AXIS_MAXVALUE);
+ gamepad.right_thumb_x = normalize_absolute_axis(xinput_state.xstate.Gamepad.sThumbRX, XINPUT_AXIS_MINVALUE, XINPUT_AXIS_MAXVALUE);
+ gamepad.right_thumb_y = normalize_absolute_axis(-xinput_state.xstate.Gamepad.sThumbRY, XINPUT_AXIS_MINVALUE, XINPUT_AXIS_MAXVALUE);
- // If we can't poll the device, skip
- if (FAILED(result))
- return;
+ // Now the triggers
+ gamepad.left_trigger = normalize_absolute_axis(xinput_state.xstate.Gamepad.bLeftTrigger, 0, 255);
+ gamepad.right_trigger = normalize_absolute_axis(xinput_state.xstate.Gamepad.bRightTrigger, 0, 255);
+}
- // Copy the XState into State
- // Start with the POV (DPAD)
- for (int povindex = 0; povindex < XINPUT_MAX_POV; povindex++)
- {
- int currentPov = xinput_pov_dir[povindex];
- gamepad.rgbPov[currentPov] = (xinput_state.xstate.Gamepad.wButtons & currentPov) ? 0xFF : 0;
- }
+void xinput_joystick_device::reset()
+{
+ memset(&gamepad, 0, sizeof(gamepad));
+}
- // Now do the buttons
- for (int buttonindex = 0; buttonindex < XINPUT_MAX_BUTTONS; buttonindex++)
- {
- int currentButton = xinput_buttons[buttonindex];
- gamepad.rgbButtons[buttonindex] = (xinput_state.xstate.Gamepad.wButtons & currentButton) ? 0xFF : 0;
- }
+void xinput_joystick_device::configure()
+{
+ std::lock_guard<std::mutex> scope_lock(m_device_lock);
+
+ if (m_configured)
+ return;
- // Now grab the axis values
- // Each of the thumbstick axis members is a signed value between -32768 and 32767 describing the position of the thumbstick
- // However, the Y axis values are inverted from what MAME expects, so multiply by -1 first
- gamepad.sThumbLX = normalize_absolute_axis(xinput_state.xstate.Gamepad.sThumbLX, XINPUT_AXIS_MINVALUE, XINPUT_AXIS_MAXVALUE);
- gamepad.sThumbLY = normalize_absolute_axis(xinput_state.xstate.Gamepad.sThumbLY * -1, XINPUT_AXIS_MINVALUE, XINPUT_AXIS_MAXVALUE);
- gamepad.sThumbRX = normalize_absolute_axis(xinput_state.xstate.Gamepad.sThumbRX, XINPUT_AXIS_MINVALUE, XINPUT_AXIS_MAXVALUE);
- gamepad.sThumbRY = normalize_absolute_axis(xinput_state.xstate.Gamepad.sThumbRY * -1, XINPUT_AXIS_MINVALUE, XINPUT_AXIS_MAXVALUE);
-
- // Now the triggers
- gamepad.bLeftTrigger = xinput_state.xstate.Gamepad.bLeftTrigger;
- gamepad.bRightTrigger = xinput_state.xstate.Gamepad.bRightTrigger;
+ // Add the axes
+ for (int axisnum = 0; axisnum < XINPUT_MAX_AXIS; axisnum++)
+ {
+ device()->add_item(
+ xinput_axis_name[axisnum],
+ xinput_axis_ids[axisnum],
+ generic_axis_get_state,
+ &gamepad.left_thumb_x + axisnum);
}
- void reset() override
+ // Populate the POVs
+ // For XBOX, we treat the DPAD as a hat switch
+ for (int povnum = 0; povnum < XINPUT_MAX_POV; povnum++)
{
- memset(&gamepad, 0, sizeof(gamepad));
+ device()->add_item(
+ xinput_pov_names[povnum],
+ ITEM_ID_OTHER_SWITCH,
+ generic_button_get_state,
+ &gamepad.povs[povnum]);
}
-};
+
+ // populate the buttons
+ for (int butnum = 0; butnum < XINPUT_MAX_BUTTONS; butnum++)
+ {
+ device()->add_item(
+ xinput_button_names[butnum],
+ static_cast<input_item_id>(ITEM_ID_BUTTON1 + butnum),
+ generic_button_get_state,
+ &gamepad.buttons[butnum]);
+ }
+
+ device()->add_item(
+ "Left Trigger",
+ ITEM_ID_ZAXIS,
+ generic_axis_get_state,
+ &gamepad.left_trigger);
+
+ device()->add_item(
+ "Right Trigger",
+ ITEM_ID_RZAXIS,
+ generic_axis_get_state,
+ &gamepad.right_trigger);
+
+ m_configured = true;
+}
//============================================================
// xinput_joystick_module
@@ -249,12 +224,12 @@ public:
class xinput_joystick_module : public wininput_module
{
private:
- xinput_interface* xinput_api;
+ std::shared_ptr<xinput_api_helper> m_xinput_helper;
public:
xinput_joystick_module()
: wininput_module(OSD_JOYSTICKINPUT_PROVIDER, "xinput"),
- xinput_api(nullptr)
+ m_xinput_helper(nullptr)
{
}
@@ -265,11 +240,12 @@ public:
if (status != 0)
return status;
- // Make sure we can get the xinput API
- status = xinput_interface::get_interface(&xinput_api);
+ // Create and initialize our helper
+ m_xinput_helper = std::make_shared<xinput_api_helper>();
+ status = m_xinput_helper->initialize();
if (status != 0)
{
- osd_printf_error("xinput_joystick_module failed to get XInput interface! Error: %u\n", (unsigned int)status);
+ osd_printf_error("xinput_joystick_module failed to get XInput interface! Error: %u\n", static_cast<unsigned int>(status));
return -1;
}
@@ -279,9 +255,6 @@ public:
protected:
virtual void input_init(running_machine &machine) override
{
- // The Xinput API should have been obtained already
- assert(xinput_api != nullptr);
-
xinput_joystick_device *devinfo;
// Loop through each gamepad to determine if they are connected
@@ -289,93 +262,22 @@ protected:
{
XINPUT_STATE state = {0};
- if (xinput_api->XInputGetState(i, &state) == ERROR_SUCCESS)
+ if (m_xinput_helper->XInputGetState(i, &state) == ERROR_SUCCESS)
{
// allocate and link in a new device
- devinfo = create_xinput_device(machine, i);
+ devinfo = m_xinput_helper->create_xinput_device(machine, i, *this);
if (devinfo == nullptr)
continue;
- // Add the axes
- for (int axisnum = 0; axisnum < XINPUT_MAX_AXIS; axisnum++)
- {
- devinfo->device()->add_item(
- xinput_axis_name[axisnum],
- xinput_axis_ids[axisnum],
- generic_axis_get_state,
- &devinfo->gamepad.sThumbLX + axisnum);
- }
-
- // Populate the POVs
- // For XBOX, we treat the DPAD as a hat switch
- for (int povnum = 0; povnum < XINPUT_MAX_POV; povnum++)
- {
- devinfo->device()->add_item(
- xinput_pov_names[povnum],
- ITEM_ID_OTHER_SWITCH,
- generic_button_get_state,
- &devinfo->gamepad.rgbPov[povnum]);
- }
-
- // populate the buttons
- for (int butnum = 0; butnum < XINPUT_MAX_BUTTONS; butnum++)
- {
- devinfo->device()->add_item(
- xinput_button_names[butnum],
- (input_item_id)(ITEM_ID_BUTTON1 + butnum),
- generic_button_get_state,
- &devinfo->gamepad.rgbButtons[butnum]);
- }
-
- devinfo->device()->add_item(
- "Left Trigger",
- (input_item_id)(ITEM_ID_BUTTON1 + XINPUT_MAX_BUTTONS),
- generic_button_get_state,
- &devinfo->gamepad.bLeftTrigger);
-
- devinfo->device()->add_item(
- "Right Trigger",
- (input_item_id)(ITEM_ID_BUTTON1 + XINPUT_MAX_BUTTONS + 1),
- generic_button_get_state,
- &devinfo->gamepad.bRightTrigger);
+ // Configure each gamepad to add buttons and Axes, etc.
+ devinfo->configure();
}
}
}
-
- private:
- //============================================================
- // create_xinput_device
- //============================================================
-
- xinput_joystick_device * create_xinput_device(running_machine &machine, UINT index)
- {
- xinput_joystick_device *devinfo;
-
- XINPUT_CAPABILITIES caps = {0};
- if (FAILED(xinput_api->XInputGetCapabilities(index, 0, &caps)))
- {
- // If we can't get the capabilities skip this device
- return nullptr;
- }
-
- char device_name[16];
- snprintf(device_name, sizeof(device_name), "XInput Player %u", index + 1);
-
- // allocate the device object
- devinfo = devicelist()->create_device<xinput_joystick_device>(machine, device_name, *this);
-
- // Set the player ID
- devinfo->xinput_state.playerIndex = index;
-
- // Assign the caps we captured earlier
- devinfo->xinput_state.caps = caps;
-
- return devinfo;
- }
};
#else
-MODULE_NOT_SUPPORTED(xinput_joystick_module, OSD_KEYBOARDINPUT_PROVIDER, "xinput")
+MODULE_NOT_SUPPORTED(xinput_joystick_module, OSD_JOYSTICKINPUT_PROVIDER, "xinput")
#endif
MODULE_DEFINITION(JOYSTICKINPUT_XINPUT, xinput_joystick_module)
diff --git a/src/osd/modules/input/input_xinput.h b/src/osd/modules/input/input_xinput.h
new file mode 100644
index 00000000000..4474a3f58f7
--- /dev/null
+++ b/src/osd/modules/input/input_xinput.h
@@ -0,0 +1,140 @@
+#ifndef INPUT_XINPUT_H_
+#define INPUT_XINPUT_H_
+
+#include <mutex>
+
+#define XINPUT_MAX_POV 4
+#define XINPUT_MAX_BUTTONS 10
+#define XINPUT_MAX_AXIS 4
+
+#define XINPUT_AXIS_MINVALUE -32767
+#define XINPUT_AXIS_MAXVALUE 32767
+
+class xinput_joystick_device;
+// default axis names
+static const char *const xinput_axis_name[] =
+{
+ "LSX",
+ "LSY",
+ "RSX",
+ "RSY"
+};
+
+static const input_item_id xinput_axis_ids[] =
+{
+ ITEM_ID_XAXIS,
+ ITEM_ID_YAXIS,
+ ITEM_ID_RXAXIS,
+ ITEM_ID_RYAXIS
+};
+
+static const USHORT xinput_pov_dir[] = {
+ XINPUT_GAMEPAD_DPAD_UP,
+ XINPUT_GAMEPAD_DPAD_DOWN,
+ XINPUT_GAMEPAD_DPAD_LEFT,
+ XINPUT_GAMEPAD_DPAD_RIGHT
+};
+
+static const char *const xinput_pov_names[] = {
+ "DPAD Up",
+ "DPAD Down",
+ "DPAD Left",
+ "DPAD Right"
+};
+
+static const USHORT xinput_buttons[] = {
+ XINPUT_GAMEPAD_A,
+ XINPUT_GAMEPAD_B,
+ XINPUT_GAMEPAD_X,
+ XINPUT_GAMEPAD_Y,
+ XINPUT_GAMEPAD_LEFT_SHOULDER,
+ XINPUT_GAMEPAD_RIGHT_SHOULDER,
+ XINPUT_GAMEPAD_START,
+ XINPUT_GAMEPAD_BACK,
+ XINPUT_GAMEPAD_LEFT_THUMB,
+ XINPUT_GAMEPAD_RIGHT_THUMB,
+};
+
+static const char *const xinput_button_names[] = {
+ "A",
+ "B",
+ "X",
+ "Y",
+ "Left Shoulder",
+ "Right Shoulder",
+ "Start",
+ "Back",
+ "Left Thumb",
+ "Right Thumb"
+};
+
+struct gamepad_state
+{
+ BYTE buttons[XINPUT_MAX_BUTTONS];
+ BYTE povs[XINPUT_MAX_POV];
+ LONG left_trigger;
+ LONG right_trigger;
+ LONG left_thumb_x;
+ LONG left_thumb_y;
+ LONG right_thumb_x;
+ LONG right_thumb_y;
+};
+
+// state information for a gamepad; state must be first element
+struct xinput_api_state
+{
+ UINT32 player_index;
+ XINPUT_STATE xstate;
+ XINPUT_CAPABILITIES caps;
+};
+
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+// Typedef for pointers to XInput Functions
+typedef lazy_loaded_function_p2<DWORD, DWORD, XINPUT_STATE*> xinput_get_state_fn;
+typedef lazy_loaded_function_p3<DWORD, DWORD, DWORD, XINPUT_CAPABILITIES*> xinput_get_caps_fn;
+#endif
+
+class xinput_api_helper : public std::enable_shared_from_this<xinput_api_helper>
+{
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+private:
+ const wchar_t* xinput_dll_names[2] = { L"xinput1_4.dll", L"xinput9_1_0.dll" };
+
+public:
+ xinput_get_state_fn XInputGetState;
+ xinput_get_caps_fn XInputGetCapabilities;
+#endif
+
+public:
+ xinput_api_helper();
+
+ int initialize();
+ xinput_joystick_device * create_xinput_device(running_machine &machine, UINT index, wininput_module &module);
+
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ // Pass-through functions for Universal Windows
+ inline DWORD XInputGetState(DWORD dwUserindex, XINPUT_STATE *pState);
+ inline DWORD XInputGetCapabilities(DWORD dwUserindex, DWORD dwFlags, XINPUT_CAPABILITIES* pCapabilities);
+#endif
+};
+
+class xinput_joystick_device : public device_info
+{
+public:
+ gamepad_state gamepad;
+ xinput_api_state xinput_state;
+
+private:
+ std::shared_ptr<xinput_api_helper> m_xinput_helper;
+ std::mutex m_device_lock;
+ bool m_configured;
+
+public:
+ xinput_joystick_device(running_machine &machine, const char *name, input_module &module, std::shared_ptr<xinput_api_helper> helper);
+
+ void poll() override;
+ void reset() override;
+ void configure();
+};
+
+#endif
diff --git a/src/osd/modules/ipc/raw_tcp_connection.cpp b/src/osd/modules/ipc/raw_tcp_connection.cpp
new file mode 100644
index 00000000000..946aefcafa1
--- /dev/null
+++ b/src/osd/modules/ipc/raw_tcp_connection.cpp
@@ -0,0 +1,29 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#include "raw_tcp_connection.h"
+
+/* Instance methods. */
+
+raw_tcp_connection::raw_tcp_connection(listener* listener, size_t bufferSize) :
+ tcp_connection(bufferSize),
+ m_listener(listener)
+{
+}
+
+raw_tcp_connection::~raw_tcp_connection()
+{
+}
+
+void raw_tcp_connection::user_on_tcp_connection_read()
+{
+ // We may receive multiple packets in the same TCP chunk. If one of them is
+ // a DTLS Close Alert this would be closed (close() called) so we cannot call
+ // our listeners anymore.
+ if (is_closing())
+ return;
+
+ m_listener->on_data_recv(this, m_buffer, m_buffer_data_len);
+
+ m_buffer_data_len = 0;
+}
diff --git a/src/osd/modules/ipc/raw_tcp_connection.h b/src/osd/modules/ipc/raw_tcp_connection.h
new file mode 100644
index 00000000000..7bcfe80bfc6
--- /dev/null
+++ b/src/osd/modules/ipc/raw_tcp_connection.h
@@ -0,0 +1,30 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#ifndef RAW_TCP_CONNECTION_H
+#define RAW_TCP_CONNECTION_H
+
+#include "tcp_connection.h"
+
+
+class raw_tcp_connection : public tcp_connection
+{
+public:
+ class listener
+ {
+ public:
+ virtual ~listener(){ }
+ virtual void on_data_recv(raw_tcp_connection *connection, const uint8_t* data, size_t len) = 0;
+ };
+
+ raw_tcp_connection(listener* listener, size_t bufferSize);
+ virtual ~raw_tcp_connection();
+
+ /* Pure virtual methods inherited from tcp_connection. */
+ virtual void user_on_tcp_connection_read() override;
+
+private:
+ // Passed by argument.
+ listener* m_listener;
+};
+#endif
diff --git a/src/osd/modules/ipc/raw_tcp_server.cpp b/src/osd/modules/ipc/raw_tcp_server.cpp
new file mode 100644
index 00000000000..deaee6c5694
--- /dev/null
+++ b/src/osd/modules/ipc/raw_tcp_server.cpp
@@ -0,0 +1,42 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#include "raw_tcp_server.h"
+#include <string>
+
+#define MAX_TCP_CONNECTIONS_PER_SERVER 10
+
+/* Instance methods. */
+
+raw_tcp_server::raw_tcp_server(uv_loop_t* loop, const std::string &ip, uint16_t port, int backlog, listener* listener, raw_tcp_connection::listener* connListener) :
+ tcp_server(loop, ip, port, backlog),
+ m_listener(listener),
+ m_conn_listener(connListener)
+{
+}
+
+void raw_tcp_server::user_on_tcp_connection_alloc(tcp_connection** connection)
+{
+ // Allocate a new raw_tcp_connection for the raw_tcp_server to handle it.
+ *connection = new raw_tcp_connection(m_conn_listener, 65536);
+}
+
+void raw_tcp_server::user_on_new_tcp_connection(tcp_connection* connection)
+{
+ // Allow just MAX_TCP_CONNECTIONS_PER_SERVER.
+ if (get_num_connections() > MAX_TCP_CONNECTIONS_PER_SERVER)
+ connection->close();
+}
+
+void raw_tcp_server::user_on_tcp_connection_closed(tcp_connection* connection, bool is_closed_by_peer)
+{
+ // Notify the listener.
+ // NOTE: Don't do it if closing (since at this point the listener is already freed).
+ // At the end, this is just called if the connection was remotely closed.
+ if (!is_closing())
+ m_listener->on_raw_tcp_connection_closed(this, static_cast<raw_tcp_connection*>(connection), is_closed_by_peer);
+}
+
+void raw_tcp_server::user_on_tcp_server_closed()
+{
+}
diff --git a/src/osd/modules/ipc/raw_tcp_server.h b/src/osd/modules/ipc/raw_tcp_server.h
new file mode 100644
index 00000000000..576490094e3
--- /dev/null
+++ b/src/osd/modules/ipc/raw_tcp_server.h
@@ -0,0 +1,36 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#ifndef RAW_TCP_SERVER_H
+#define RAW_TCP_SERVER_H
+
+#include "tcp_server.h"
+#include "tcp_connection.h"
+#include "raw_tcp_connection.h"
+#include <uv.h>
+
+class raw_tcp_server : public tcp_server
+{
+public:
+ class listener
+ {
+ public:
+ virtual ~listener() { }
+ virtual void on_raw_tcp_connection_closed(raw_tcp_server* tcpServer, raw_tcp_connection* connection, bool is_closed_by_peer) = 0;
+ };
+
+ raw_tcp_server(uv_loop_t* loop, const std::string &ip, uint16_t port, int backlog, listener* listener, raw_tcp_connection::listener* connListener);
+
+ /* Pure virtual methods inherited from TCPServer. */
+ virtual void user_on_tcp_connection_alloc(tcp_connection** connection) override;
+ virtual void user_on_new_tcp_connection(tcp_connection* connection) override;
+ virtual void user_on_tcp_connection_closed(tcp_connection* connection, bool is_closed_by_peer) override;
+ virtual void user_on_tcp_server_closed() override;
+
+private:
+ // Passed by argument.
+ listener* m_listener;
+ raw_tcp_connection::listener* m_conn_listener;
+};
+
+#endif
diff --git a/src/osd/modules/ipc/rtc_tcp_connection.cpp b/src/osd/modules/ipc/rtc_tcp_connection.cpp
new file mode 100644
index 00000000000..1cc800b7d77
--- /dev/null
+++ b/src/osd/modules/ipc/rtc_tcp_connection.cpp
@@ -0,0 +1,150 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+#include "emu.h"
+#include "rtc_tcp_connection.h"
+
+/* Instance methods. */
+
+rtc_tcp_connection::rtc_tcp_connection(listener* listener, size_t bufferSize) :
+ tcp_connection(bufferSize),
+ m_listener(listener),
+ m_frame_start(0)
+{
+}
+
+rtc_tcp_connection::~rtc_tcp_connection()
+{
+}
+
+inline uint16_t get2bytes(const uint8_t* data, size_t i)
+{
+ return (uint16_t)(data[i + 1]) | ((uint16_t)(data[i])) << 8;
+}
+
+inline void set2bytes(uint8_t* data, size_t i, uint16_t value)
+{
+ data[i + 1] = (uint8_t)(value);
+ data[i] = (uint8_t)(value >> 8);
+}
+
+
+void rtc_tcp_connection::user_on_tcp_connection_read()
+{
+ /*
+ * Framing RFC 4571
+ *
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * ---------------------------------------------------------------
+ * | LENGTH | STUN / DTLS / RTP / RTCP |
+ * ---------------------------------------------------------------
+ *
+ * A 16-bit unsigned integer LENGTH field, coded in network byte order
+ * (big-endian), begins the frame. If LENGTH is non-zero, an RTP or
+ * RTCP packet follows the LENGTH field. The value coded in the LENGTH
+ * field MUST equal the number of octets in the RTP or RTCP packet.
+ * Zero is a valid value for LENGTH, and it codes the null packet.
+ */
+
+ // Be ready to parse more than a single frame in a single TCP chunk.
+ while (true)
+ {
+ // We may receive multiple packets in the same TCP chunk. If one of them is
+ // a DTLS Close Alert this would be closed (Close() called) so we cannot call
+ // our listeners anymore.
+ if (is_closing())
+ return;
+
+ size_t data_len = m_buffer_data_len - m_frame_start;
+ size_t packet_len = 0;
+
+ if (data_len >= 2)
+ packet_len = (size_t)get2bytes(m_buffer + m_frame_start, 0);
+
+ // We have packet_len bytes.
+ if ((data_len >= 2) && data_len >= 2 + packet_len)
+ {
+ const uint8_t* packet = m_buffer + m_frame_start + 2;
+
+ // Notify the listener.
+ if (packet_len != 0)
+ {
+ m_listener->on_packet_recv(this, packet, packet_len);
+ }
+
+ // If there is no more space available in the buffer and that is because
+ // the latest parsed frame filled it, then empty the full buffer.
+ if ((m_frame_start + 2 + packet_len) == m_buffer_size)
+ {
+ osd_printf_error("no more space in the buffer, emptying the buffer data");
+
+ m_frame_start = 0;
+ m_buffer_data_len = 0;
+ }
+ // If there is still space in the buffer, set the beginning of the next
+ // frame to the next position after the parsed frame.
+ else
+ {
+ m_frame_start += 2 + packet_len;
+ }
+
+ // If there is more data in the buffer after the parsed frame then
+ // parse again. Otherwise break here and wait for more data.
+ if (m_buffer_data_len > m_frame_start)
+ {
+ // osd_printf_error("there is more data after the parsed frame, continue parsing");
+
+ continue;
+ }
+ else
+ {
+ break;
+ }
+ }
+ else // Incomplete packet.
+ {
+ // Check if the buffer is full.
+ if (m_buffer_data_len == m_buffer_size)
+ {
+ // First case: the incomplete frame does not begin at position 0 of
+ // the buffer, so move the frame to the position 0.
+ if (m_frame_start != 0)
+ {
+ // osd_printf_error("no more space in the buffer, moving parsed bytes to the beginning of the buffer and wait for more data");
+
+ std::memmove(m_buffer, m_buffer + m_frame_start, m_buffer_size - m_frame_start);
+ m_buffer_data_len = m_buffer_size - m_frame_start;
+ m_frame_start = 0;
+ }
+ // Second case: the incomplete frame begins at position 0 of the buffer.
+ // The frame is too big, so close the connection.
+ else
+ {
+ osd_printf_error("no more space in the buffer for the unfinished frame being parsed, closing the connection");
+
+ // Close the socket.
+ close();
+ }
+ }
+ // The buffer is not full.
+ else
+ {
+ osd_printf_verbose("frame not finished yet, waiting for more data");
+ }
+
+ // Exit the parsing loop.
+ break;
+ }
+ }
+}
+
+void rtc_tcp_connection::send(const uint8_t* data, size_t len)
+{
+ // Write according to Framing RFC 4571.
+
+ uint8_t frame_len[2];
+
+ set2bytes(frame_len, 0, len);
+
+ write(frame_len, 2, data, len);
+}
diff --git a/src/osd/modules/ipc/rtc_tcp_connection.h b/src/osd/modules/ipc/rtc_tcp_connection.h
new file mode 100644
index 00000000000..9ec74b90537
--- /dev/null
+++ b/src/osd/modules/ipc/rtc_tcp_connection.h
@@ -0,0 +1,33 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#ifndef RTC_TCP_CONNECTION_H
+#define RTC_TCP_CONNECTION_H
+
+#include "tcp_connection.h"
+
+
+class rtc_tcp_connection : public tcp_connection
+{
+public:
+ class listener
+ {
+ public:
+ virtual ~listener(){ }
+ virtual void on_packet_recv(rtc_tcp_connection *connection, const uint8_t* data, size_t len) = 0;
+ };
+
+ rtc_tcp_connection(listener* listener, size_t bufferSize);
+ virtual ~rtc_tcp_connection();
+
+ /* Pure virtual methods inherited from tcp_connection. */
+ virtual void user_on_tcp_connection_read() override;
+
+ void send(const uint8_t* data, size_t len);
+
+private:
+ // Passed by argument.
+ listener* m_listener;
+ size_t m_frame_start; // Where the latest frame starts.
+};
+#endif
diff --git a/src/osd/modules/ipc/rtc_tcp_server.cpp b/src/osd/modules/ipc/rtc_tcp_server.cpp
new file mode 100644
index 00000000000..52345454983
--- /dev/null
+++ b/src/osd/modules/ipc/rtc_tcp_server.cpp
@@ -0,0 +1,42 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#include "rtc_tcp_server.h"
+#include <string>
+
+#define MAX_TCP_CONNECTIONS_PER_SERVER 10
+
+/* Instance methods. */
+
+rtc_tcp_server::rtc_tcp_server(uv_loop_t* loop, const std::string &ip, uint16_t port, int backlog, listener* listener, rtc_tcp_connection::listener* connListener) :
+ tcp_server(loop, ip, port, backlog),
+ m_listener(listener),
+ m_conn_listener(connListener)
+{
+}
+
+void rtc_tcp_server::user_on_tcp_connection_alloc(tcp_connection** connection)
+{
+ // Allocate a new rtc_tcp_connection for the rtc_tcp_server to handle it.
+ *connection = new rtc_tcp_connection(m_conn_listener, 65536);
+}
+
+void rtc_tcp_server::user_on_new_tcp_connection(tcp_connection* connection)
+{
+ // Allow just MAX_TCP_CONNECTIONS_PER_SERVER.
+ if (get_num_connections() > MAX_TCP_CONNECTIONS_PER_SERVER)
+ connection->close();
+}
+
+void rtc_tcp_server::user_on_tcp_connection_closed(tcp_connection* connection, bool is_closed_by_peer)
+{
+ // Notify the listener.
+ // NOTE: Don't do it if closing (since at this point the listener is already freed).
+ // At the end, this is just called if the connection was remotely closed.
+ if (!is_closing())
+ m_listener->on_rtc_tcp_connection_closed(this, static_cast<rtc_tcp_connection*>(connection), is_closed_by_peer);
+}
+
+void rtc_tcp_server::user_on_tcp_server_closed()
+{
+}
diff --git a/src/osd/modules/ipc/rtc_tcp_server.h b/src/osd/modules/ipc/rtc_tcp_server.h
new file mode 100644
index 00000000000..f0733c95397
--- /dev/null
+++ b/src/osd/modules/ipc/rtc_tcp_server.h
@@ -0,0 +1,36 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#ifndef RTC_TCP_SERVER_H
+#define RTC_TCP_SERVER_H
+
+#include "tcp_server.h"
+#include "tcp_connection.h"
+#include "rtc_tcp_connection.h"
+#include <uv.h>
+
+class rtc_tcp_server : public tcp_server
+{
+public:
+ class listener
+ {
+ public:
+ virtual ~listener() { }
+ virtual void on_rtc_tcp_connection_closed(rtc_tcp_server* tcpServer, rtc_tcp_connection* connection, bool is_closed_by_peer) = 0;
+ };
+
+ rtc_tcp_server(uv_loop_t* loop, const std::string &ip, uint16_t port, int backlog, listener* listener, rtc_tcp_connection::listener* connListener);
+
+ /* Pure virtual methods inherited from TCPServer. */
+ virtual void user_on_tcp_connection_alloc(tcp_connection** connection) override;
+ virtual void user_on_new_tcp_connection(tcp_connection* connection) override;
+ virtual void user_on_tcp_connection_closed(tcp_connection* connection, bool is_closed_by_peer) override;
+ virtual void user_on_tcp_server_closed() override;
+
+private:
+ // Passed by argument.
+ listener* m_listener;
+ rtc_tcp_connection::listener* m_conn_listener;
+};
+
+#endif
diff --git a/src/osd/modules/ipc/tcp_connection.cpp b/src/osd/modules/ipc/tcp_connection.cpp
new file mode 100644
index 00000000000..fb6af2f976a
--- /dev/null
+++ b/src/osd/modules/ipc/tcp_connection.cpp
@@ -0,0 +1,414 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#include "emu.h"
+#include "tcp_connection.h"
+#include <cstdint> // uint8_t, etc
+#include <cstdlib> // std::malloc(), std::free()
+
+/* Static methods for UV callbacks. */
+
+static inline void on_alloc(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf)
+{
+ static_cast<tcp_connection*>(handle->data)->on_uv_read_alloc(suggested_size, buf);
+}
+
+static inline void on_read(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf)
+{
+ static_cast<tcp_connection*>(handle->data)->on_uv_read(nread, buf);
+}
+
+static inline void on_write(uv_write_t* req, int status)
+{
+ tcp_connection::tcp_uv_write_data* write_data = static_cast<tcp_connection::tcp_uv_write_data*>(req->data);
+ tcp_connection* connection = write_data->connection;
+
+ // Delete the UvWriteData struct (which includes the uv_req_t and the store char[]).
+ std::free(write_data);
+
+ // Just notify the TCPConnection when error.
+ if (status)
+ connection->on_uv_write_error(status);
+}
+
+static inline void on_shutdown(uv_shutdown_t* req, int status)
+{
+ static_cast<tcp_connection*>(req->data)->on_uv_shutdown(req, status);
+}
+
+static inline void on_close(uv_handle_t* handle)
+{
+ static_cast<tcp_connection*>(handle->data)->on_uv_closed();
+}
+
+/* Instance methods. */
+
+tcp_connection::tcp_connection(size_t bufferSize) :
+ m_listener(nullptr),
+ m_local_addr(nullptr),
+ m_is_closing(false),
+ m_is_closed_by_peer(false),
+ m_has_error(false),
+ m_buffer_size(bufferSize),
+ m_buffer(nullptr),
+ m_buffer_data_len(0),
+ m_local_port(0),
+ m_peer_port(0)
+{
+ m_uv_handle = new uv_tcp_t;
+ m_uv_handle->data = (void*)this;
+
+ // NOTE: Don't allocate the buffer here. Instead wait for the first uv_alloc_cb().
+}
+
+tcp_connection::~tcp_connection()
+{
+ if (m_uv_handle)
+ delete m_uv_handle;
+ if (m_buffer)
+ delete[] m_buffer;
+}
+
+void tcp_connection::setup(uv_loop_t* loop, listener* listener, struct sockaddr_storage* localAddr, const std::string &localIP, uint16_t localPort)
+{
+ int err;
+
+ // Set the UV handle.
+ err = uv_tcp_init(loop, m_uv_handle);
+ if (err)
+ {
+ delete m_uv_handle;
+ m_uv_handle = nullptr;
+ throw emu_fatalerror("uv_tcp_init() failed: %s", uv_strerror(err));
+ }
+
+ // Set the listener.
+ m_listener = listener;
+
+ // Set the local address.
+ m_local_addr = localAddr;
+ m_local_ip = localIP;
+ m_local_port = localPort;
+}
+
+void tcp_connection::close()
+{
+ if (m_is_closing)
+ return;
+
+ int err;
+
+ m_is_closing = true;
+
+ // Don't read more.
+ err = uv_read_stop((uv_stream_t*)m_uv_handle);
+ if (err)
+ throw emu_fatalerror("uv_read_stop() failed: %s", uv_strerror(err));
+
+ // If there is no error and the peer didn't close its connection side then close gracefully.
+ if (!m_has_error && !m_is_closed_by_peer)
+ {
+ // Use uv_shutdown() so pending data to be written will be sent to the peer
+ // before closing.
+ uv_shutdown_t* req = new uv_shutdown_t;
+ req->data = (void*)this;
+ err = uv_shutdown(req, (uv_stream_t*)m_uv_handle, (uv_shutdown_cb)on_shutdown);
+ if (err)
+ throw emu_fatalerror("uv_shutdown() failed: %s", uv_strerror(err));
+ }
+ // Otherwise directly close the socket.
+ else
+ {
+ uv_close((uv_handle_t*)m_uv_handle, (uv_close_cb)on_close);
+ }
+}
+
+void tcp_connection::terminate()
+{
+ if (m_is_closing)
+ return;
+ m_is_closing = true;
+ uv_close((uv_handle_t*)m_uv_handle, (uv_close_cb)on_close);
+}
+
+void tcp_connection::dump()
+{
+ osd_printf_verbose("[TCP, local:%s :%d, remote:%s :%d, status:%s]\r\n",
+ m_local_ip.c_str(), (uint16_t)m_local_port,
+ m_peer_ip.c_str(), (uint16_t)m_peer_port,
+ (!m_is_closing) ? "open" : "closed");
+}
+
+void tcp_connection::start()
+{
+ if (m_is_closing)
+ return;
+
+ int err;
+
+ err = uv_read_start((uv_stream_t*)m_uv_handle, (uv_alloc_cb)on_alloc, (uv_read_cb)on_read);
+ if (err)
+ throw emu_fatalerror("uv_read_start() failed: %s", uv_strerror(err));
+
+ // Get the peer address.
+ if (!set_peer_address())
+ throw emu_fatalerror("error setting peer IP and port");
+}
+
+void tcp_connection::write(const uint8_t* data, size_t len)
+{
+ if (m_is_closing)
+ return;
+
+ if (len == 0)
+ return;
+
+ uv_buf_t buffer;
+ int written;
+ int err;
+
+ // First try uv_try_write(). In case it can not directly write all the given
+ // data then build a uv_req_t and use uv_write().
+
+ buffer = uv_buf_init((char*)data, len);
+ written = uv_try_write((uv_stream_t*)m_uv_handle, &buffer, 1);
+
+ // All the data was written. Done.
+ if (written == (int)len)
+ {
+ return;
+ }
+ // Cannot write any data at first time. Use uv_write().
+ else if (written == UV_EAGAIN || written == UV_ENOSYS)
+ {
+ // Set written to 0 so pending_len can be properly calculated.
+ written = 0;
+ }
+ // Error. Should not happen.
+ else if (written < 0)
+ {
+ osd_printf_warning("uv_try_write() failed, closing the connection: %s", uv_strerror(written));
+
+ close();
+ return;
+ }
+
+ // osd_printf_info("could just write %zu bytes (%zu given) at first time, using uv_write() now", (size_t)written, len);
+
+ size_t pending_len = len - written;
+
+ // Allocate a special UvWriteData struct pointer.
+ tcp_uv_write_data* write_data = (tcp_uv_write_data*)std::malloc(sizeof(tcp_uv_write_data) + pending_len);
+
+ write_data->connection = this;
+ std::memcpy(write_data->store, data + written, pending_len);
+ write_data->req.data = (void*)write_data;
+
+ buffer = uv_buf_init((char*)write_data->store, pending_len);
+
+ err = uv_write(&write_data->req, (uv_stream_t*)m_uv_handle, &buffer, 1, (uv_write_cb)on_write);
+ if (err)
+ throw emu_fatalerror("uv_write() failed: %s", uv_strerror(err));
+}
+
+void tcp_connection::write(const uint8_t* data1, size_t len1, const uint8_t* data2, size_t len2)
+{
+ if (m_is_closing)
+ return;
+
+ if (len1 == 0 && len2 == 0)
+ return;
+
+ size_t total_len = len1 + len2;
+ uv_buf_t buffers[2];
+ int written;
+ int err;
+
+ // First try uv_try_write(). In case it can not directly write all the given
+ // data then build a uv_req_t and use uv_write().
+
+ buffers[0] = uv_buf_init((char*)data1, len1);
+ buffers[1] = uv_buf_init((char*)data2, len2);
+ written = uv_try_write((uv_stream_t*)m_uv_handle, buffers, 2);
+
+ // All the data was written. Done.
+ if (written == (int)total_len)
+ {
+ return;
+ }
+ // Cannot write any data at first time. Use uv_write().
+ else if (written == UV_EAGAIN || written == UV_ENOSYS)
+ {
+ // Set written to 0 so pending_len can be properly calculated.
+ written = 0;
+ }
+ // Error. Should not happen.
+ else if (written < 0)
+ {
+ osd_printf_warning("uv_try_write() failed, closing the connection: %s", uv_strerror(written));
+
+ close();
+ return;
+ }
+
+ // osd_printf_info("could just write %zu bytes (%zu given) at first time, using uv_write() now", (size_t)written, total_len);
+
+ size_t pending_len = total_len - written;
+
+ // Allocate a special UvWriteData struct pointer.
+ tcp_uv_write_data* write_data = (tcp_uv_write_data*)std::malloc(sizeof(tcp_uv_write_data) + pending_len);
+
+ write_data->connection = this;
+ // If the first buffer was not entirely written then splice it.
+ if ((size_t)written < len1)
+ {
+ std::memcpy(write_data->store, data1 + (size_t)written, len1 - (size_t)written);
+ std::memcpy(write_data->store + (len1 - (size_t)written), data2, len2);
+ }
+ // Otherwise just take the pending data in the second buffer.
+ else
+ {
+ std::memcpy(write_data->store, data2 + ((size_t)written - len1), len2 - ((size_t)written - len1));
+ }
+ write_data->req.data = (void*)write_data;
+
+ uv_buf_t buffer = uv_buf_init((char*)write_data->store, pending_len);
+
+ err = uv_write(&write_data->req, (uv_stream_t*)m_uv_handle, &buffer, 1, (uv_write_cb)on_write);
+ if (err)
+ throw emu_fatalerror("uv_write() failed: %s", uv_strerror(err));
+}
+
+void GetAddressInfo(const struct sockaddr* addr, int* family, std::string &ip, uint16_t* port)
+{
+ char _ip[INET6_ADDRSTRLEN + 1];
+ int err;
+
+
+ err = uv_inet_ntop(AF_INET, &((struct sockaddr_in*)addr)->sin_addr, _ip, INET_ADDRSTRLEN);
+ if (err)
+ throw emu_fatalerror("uv_inet_ntop() failed: %s", uv_strerror(err));
+ *port = (uint16_t)ntohs(((struct sockaddr_in*)addr)->sin_port);
+
+ *family = addr->sa_family;
+ ip.assign(_ip);
+}
+bool tcp_connection::set_peer_address()
+{
+ int err;
+ int len = sizeof(m_peer_addr);
+
+ err = uv_tcp_getpeername(m_uv_handle, (struct sockaddr*)&m_peer_addr, &len);
+ if (err)
+ {
+ osd_printf_error("uv_tcp_getpeername() failed: %s", uv_strerror(err));
+
+ return false;
+ }
+
+ int family;
+ GetAddressInfo((const struct sockaddr*)&m_peer_addr, &family, m_peer_ip, &m_peer_port);
+
+ return true;
+}
+
+void tcp_connection::on_uv_read_alloc(size_t suggested_size, uv_buf_t* buf)
+{
+ // If this is the first call to onUvReadAlloc() then allocate the receiving buffer now.
+ if (!m_buffer)
+ m_buffer = new uint8_t[m_buffer_size];
+
+ // Tell UV to write after the last data byte in the buffer.
+ buf->base = (char *)(m_buffer + m_buffer_data_len);
+ // Give UV all the remaining space in the buffer.
+ if (m_buffer_size > m_buffer_data_len)
+ {
+ buf->len = m_buffer_size - m_buffer_data_len;
+ }
+ else
+ {
+ buf->len = 0;
+
+ osd_printf_warning("no available space in the buffer");
+ }
+}
+
+void tcp_connection::on_uv_read(::ssize_t nread, const uv_buf_t* buf)
+{
+ if (m_is_closing)
+ return;
+
+ if (nread == 0)
+ return;
+
+ // Data received.
+ if (nread > 0)
+ {
+ // Update the buffer data length.
+ m_buffer_data_len += (size_t)nread;
+
+ // Notify the subclass.
+ user_on_tcp_connection_read();
+ }
+ // Client disconneted.
+ else if (nread == UV_EOF || nread == UV_ECONNRESET)
+ {
+ osd_printf_info("connection closed by peer, closing server side");
+
+ m_is_closed_by_peer = true;
+
+ // Close server side of the connection.
+ close();
+ }
+ // Some error.
+ else
+ {
+ osd_printf_info("read error, closing the connection: %s", uv_strerror(nread));
+
+ m_has_error = true;
+
+ // Close server side of the connection.
+ close();
+ }
+}
+
+void tcp_connection::on_uv_write_error(int error)
+{
+ if (m_is_closing)
+ return;
+
+ if (error == UV_EPIPE || error == UV_ENOTCONN)
+ {
+ osd_printf_info("write error, closing the connection: %s", uv_strerror(error));
+ }
+ else
+ {
+ osd_printf_info("write error, closing the connection: %s", uv_strerror(error));
+
+ m_has_error = true;
+ }
+
+ close();
+}
+
+void tcp_connection::on_uv_shutdown(uv_shutdown_t* req, int status)
+{
+ delete req;
+
+ if (status == UV_EPIPE || status == UV_ENOTCONN || status == UV_ECANCELED)
+ osd_printf_info("shutdown error: %s", uv_strerror(status));
+ else if (status)
+ osd_printf_info("shutdown error: %s", uv_strerror(status));
+
+ // Now do close the handle.
+ uv_close((uv_handle_t*)m_uv_handle, (uv_close_cb)on_close);
+}
+
+void tcp_connection::on_uv_closed()
+{
+ // Notify the listener.
+ m_listener->on_tcp_connection_closed(this, m_is_closed_by_peer);
+
+ // And delete this.
+ delete this;
+}
diff --git a/src/osd/modules/ipc/tcp_connection.h b/src/osd/modules/ipc/tcp_connection.h
new file mode 100644
index 00000000000..55e70d39688
--- /dev/null
+++ b/src/osd/modules/ipc/tcp_connection.h
@@ -0,0 +1,137 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#ifndef TCP_CONNECTION_H
+#define TCP_CONNECTION_H
+
+#include <string>
+#include <uv.h>
+
+extern void GetAddressInfo(const sockaddr * addr, int * family, std::string & ip, uint16_t * port);
+
+class tcp_connection
+{
+public:
+ class listener
+ {
+ public:
+ virtual ~listener() { }
+ virtual void on_tcp_connection_closed(tcp_connection* connection, bool is_closed_by_peer) = 0;
+ };
+
+ /* Struct for the data field of uv_req_t when writing into the connection. */
+ struct tcp_uv_write_data
+ {
+ tcp_connection* connection;
+ uv_write_t req;
+ uint8_t store[1];
+ };
+
+ tcp_connection(size_t bufferSize);
+ virtual ~tcp_connection();
+
+ void close();
+ void terminate();
+ virtual void dump();
+ void setup(uv_loop_t* loop, listener* listener, struct sockaddr_storage* localAddr, const std::string &localIP, uint16_t localPort);
+ bool is_closing();
+ uv_tcp_t* get_uv_handle();
+ void start();
+ void write(const uint8_t* data, size_t len);
+ void write(const uint8_t* data1, size_t len1, const uint8_t* data2, size_t len2);
+ void write(const std::string &data);
+ const struct sockaddr* get_local_address();
+ const std::string& get_local_ip();
+ uint16_t get_local_port();
+ const struct sockaddr* get_peer_address();
+ const std::string& get_peer_ip();
+ uint16_t get_peer_port();
+
+private:
+ bool set_peer_address();
+
+ /* Callbacks fired by UV events. */
+public:
+ void on_uv_read_alloc(size_t suggested_size, uv_buf_t* buf);
+ void on_uv_read(ssize_t nread, const uv_buf_t* buf);
+ void on_uv_write_error(int error);
+ void on_uv_shutdown(uv_shutdown_t* req, int status);
+ void on_uv_closed();
+
+ /* Pure virtual methods that must be implemented by the subclass. */
+protected:
+ virtual void user_on_tcp_connection_read() = 0;
+
+private:
+ // Passed by argument.
+ listener* m_listener;
+ // Allocated by this.
+ uv_tcp_t* m_uv_handle;
+ // Others.
+ struct sockaddr_storage* m_local_addr;
+ bool m_is_closing;
+ bool m_is_closed_by_peer;
+ bool m_has_error;
+
+protected:
+ // Passed by argument.
+ size_t m_buffer_size;
+ // Allocated by this.
+ uint8_t* m_buffer;
+ // Others.
+ size_t m_buffer_data_len;
+ std::string m_local_ip;
+ uint16_t m_local_port;
+ struct sockaddr_storage m_peer_addr;
+ std::string m_peer_ip;
+ uint16_t m_peer_port;
+};
+
+/* Inline methods. */
+
+inline bool tcp_connection::is_closing()
+{
+ return m_is_closing;
+}
+
+inline uv_tcp_t* tcp_connection::get_uv_handle()
+{
+ return m_uv_handle;
+}
+
+inline void tcp_connection::write(const std::string &data)
+{
+ write((const uint8_t*)data.c_str(), data.size());
+}
+
+inline const sockaddr* tcp_connection::get_local_address()
+{
+ return (const struct sockaddr*)m_local_addr;
+}
+
+inline const std::string& tcp_connection::get_local_ip()
+{
+ return m_local_ip;
+}
+
+inline uint16_t tcp_connection::get_local_port()
+{
+ return m_local_port;
+}
+
+inline const sockaddr* tcp_connection::get_peer_address()
+{
+ return (const struct sockaddr*)&m_peer_addr;
+}
+
+inline const std::string& tcp_connection::get_peer_ip()
+{
+ return m_peer_ip;
+}
+
+inline uint16_t tcp_connection::get_peer_port()
+{
+ return m_peer_port;
+}
+
+#endif
diff --git a/src/osd/modules/ipc/tcp_server.cpp b/src/osd/modules/ipc/tcp_server.cpp
new file mode 100644
index 00000000000..a4de2df12d9
--- /dev/null
+++ b/src/osd/modules/ipc/tcp_server.cpp
@@ -0,0 +1,279 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#include "emu.h"
+#include "tcp_server.h"
+
+/* Static methods for UV callbacks. */
+
+static inline void on_connection(uv_stream_t* handle, int status)
+{
+ static_cast<tcp_server*>(handle->data)->on_uv_connection(status);
+}
+
+static inline void on_close(uv_handle_t* handle)
+{
+ static_cast<tcp_server*>(handle->data)->on_uv_closed();
+}
+
+static inline void on_error_close(uv_handle_t* handle)
+{
+ delete handle;
+}
+
+/* Instance methods. */
+
+tcp_server::tcp_server(uv_loop_t* loop, const std::string &ip, uint16_t port, int backlog)
+ : m_uv_handle(nullptr),
+ m_loop(nullptr),
+ m_is_closing(false),
+ m_local_port(0)
+{
+ int err;
+ int flags = 0;
+
+ m_uv_handle = new uv_tcp_t;
+ m_uv_handle->data = (void*)this;
+ m_loop = loop;
+
+ err = uv_tcp_init(loop, m_uv_handle);
+ if (err)
+ {
+ delete m_uv_handle;
+ m_uv_handle = nullptr;
+ throw emu_fatalerror("uv_tcp_init() failed: %s", uv_strerror(err));
+ }
+
+ struct sockaddr_storage bind_addr;
+
+
+ err = uv_ip4_addr(ip.c_str(), (int)port, (struct sockaddr_in*)&bind_addr);
+ if (err)
+ throw emu_fatalerror("uv_ipv4_addr() failed: %s", uv_strerror(err));
+
+ err = uv_tcp_bind(m_uv_handle, (const struct sockaddr*)&bind_addr, flags);
+ if (err)
+ {
+ uv_close((uv_handle_t*)m_uv_handle, (uv_close_cb)on_error_close);
+ throw emu_fatalerror("uv_tcp_bind() failed: %s", uv_strerror(err));
+ }
+
+ err = uv_listen((uv_stream_t*)m_uv_handle, backlog, (uv_connection_cb)on_connection);
+ if (err)
+ {
+ uv_close((uv_handle_t*)m_uv_handle, (uv_close_cb)on_error_close);
+ throw emu_fatalerror("uv_listen() failed: %s", uv_strerror(err));
+ }
+
+ // Set local address.
+ if (!set_local_address())
+ {
+ uv_close((uv_handle_t*)m_uv_handle, (uv_close_cb)on_error_close);
+ throw emu_fatalerror("error setting local IP and port");
+ }
+}
+
+tcp_server::~tcp_server()
+{
+ if (m_uv_handle)
+ delete m_uv_handle;
+}
+
+void tcp_server::close()
+{
+ if (m_is_closing)
+ return;
+
+ m_is_closing = true;
+
+ // If there are no connections then close now.
+ if (m_connections.empty())
+ {
+ uv_close((uv_handle_t*)m_uv_handle, (uv_close_cb)on_close);
+ }
+ // Otherwise close all the connections (but not the TCP server).
+ else
+ {
+ osd_printf_info("closing %d active connections", (int)m_connections.size());
+
+ for (auto it = m_connections.begin(); it != m_connections.end(); ++it)
+ {
+ tcp_connection* connection = *it;
+ connection->close();
+ }
+ }
+}
+
+void tcp_server::terminate()
+{
+ if (m_is_closing)
+ return;
+
+ m_is_closing = true;
+
+ // If there are no connections then close now.
+ if (m_connections.empty())
+ {
+ uv_close((uv_handle_t*)m_uv_handle, (uv_close_cb)on_close);
+ }
+ // Otherwise close all the connections (but not the TCP server).
+ else
+ {
+ osd_printf_info("closing %d active connections", (int)m_connections.size());
+
+ for (auto it = m_connections.begin(); it != m_connections.end(); ++it)
+ {
+ tcp_connection* connection = *it;
+ connection->terminate();
+ }
+ }
+}
+
+void tcp_server::send_to_all(const uint8_t* data, size_t len)
+{
+ // If there are no connections then close now.
+ if (!m_connections.empty())
+ {
+ for (auto it = m_connections.begin(); it != m_connections.end(); ++it)
+ {
+ tcp_connection* connection = *it;
+ connection->write(data, len);
+ }
+ }
+}
+
+void tcp_server::dump()
+{
+ osd_printf_info("[TCP, local:%s :%d, status:%s, connections:%d]",
+ m_local_ip.c_str(), (uint16_t)m_local_port,
+ (!m_is_closing) ? "open" : "closed",
+ (int)m_connections.size());
+}
+
+const sockaddr* tcp_server::get_local_address()
+{
+ return (const struct sockaddr*)&m_local_addr;
+}
+
+const std::string& tcp_server::get_local_ip()
+{
+ return m_local_ip;
+}
+
+uint16_t tcp_server::get_local_port()
+{
+ return m_local_port;
+}
+
+bool tcp_server::set_local_address()
+{
+ int err;
+ int len = sizeof(m_local_addr);
+
+ err = uv_tcp_getsockname(m_uv_handle, (struct sockaddr*)&m_local_addr, &len);
+ if (err)
+ {
+ osd_printf_error("uv_tcp_getsockname() failed: %s", uv_strerror(err));
+
+ return false;
+ }
+
+ int family;
+ GetAddressInfo((const struct sockaddr*)&m_local_addr, &family, m_local_ip, &m_local_port);
+
+ return true;
+}
+
+inline void tcp_server::on_uv_connection(int status)
+{
+ if (m_is_closing)
+ return;
+
+ int err;
+
+ if (status)
+ {
+ osd_printf_error("error while receiving a new TCP connection: %s", uv_strerror(status));
+
+ return;
+ }
+
+ // Notify the subclass so it provides an allocated derived class of TCPConnection.
+ tcp_connection* connection = nullptr;
+ user_on_tcp_connection_alloc(&connection);
+ if (connection != nullptr)
+ osd_printf_error("tcp_server pointer was not allocated by the user");
+
+ try
+ {
+ connection->setup(m_loop, this, &(m_local_addr), m_local_ip, m_local_port);
+ }
+ catch (...)
+ {
+ delete connection;
+ return;
+ }
+
+ // Accept the connection.
+ err = uv_accept((uv_stream_t*)m_uv_handle, (uv_stream_t*)connection->get_uv_handle());
+ if (err)
+ throw emu_fatalerror("uv_accept() failed: %s", uv_strerror(err));
+
+ // Insert the TCPConnection in the set.
+ m_connections.insert(connection);
+
+ // Start receiving data.
+ try
+ {
+ connection->start();
+ }
+ catch (emu_exception &error)
+ {
+ osd_printf_error("cannot run the TCP connection, closing the connection: %s", error.what());
+ connection->close();
+ // NOTE: Don't return here so the user won't be notified about a "onclose" for a TCP connection
+ // for which there was not a previous "onnew" event.
+ }
+
+ osd_printf_info("new TCP connection:");
+ connection->dump();
+
+ // Notify the subclass.
+ user_on_new_tcp_connection(connection);
+}
+
+void tcp_server::on_uv_closed()
+{
+ // Motify the subclass.
+ user_on_tcp_server_closed();
+}
+
+void tcp_server::on_tcp_connection_closed(tcp_connection* connection, bool is_closed_by_peer)
+{
+ // NOTE:
+ // Worst scenario is that in which this is the latest connection,
+ // which is remotely closed (no tcp_server.Close() was called) and the user
+ // call tcp_server.Close() on userOnTCPConnectionClosed() callback, so Close()
+ // is called with zero connections and calls uv_close(), but then
+ // onTCPConnectionClosed() continues and finds that isClosing is true and
+ // there are zero connections, so calls uv_close() again and get a crash.
+ //
+ // SOLUTION:
+ // Check isClosing value *before* onTCPConnectionClosed() callback.
+
+ bool wasClosing = m_is_closing;
+
+ osd_printf_info("TCP connection closed:");
+ connection->dump();
+
+ // Remove the TCPConnection from the set.
+ m_connections.erase(connection);
+
+ // Notify the subclass.
+ user_on_tcp_connection_closed(connection, is_closed_by_peer);
+
+ // Check if the server was closing connections, and if this is the last
+ // connection then close the server now.
+ if (wasClosing && m_connections.empty())
+ uv_close((uv_handle_t*)m_uv_handle, (uv_close_cb)on_close);
+}
diff --git a/src/osd/modules/ipc/tcp_server.h b/src/osd/modules/ipc/tcp_server.h
new file mode 100644
index 00000000000..3a4c75de2d7
--- /dev/null
+++ b/src/osd/modules/ipc/tcp_server.h
@@ -0,0 +1,72 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#ifndef TCP_SERVER_H
+#define TCP_SERVER_H
+
+#include "tcp_connection.h"
+#include <string>
+#include <unordered_set>
+#include <uv.h>
+
+class tcp_server : public tcp_connection::listener
+{
+public:
+ tcp_server(uv_loop_t* m_loop, const std::string &ip, uint16_t port, int backlog);
+ virtual ~tcp_server();
+
+ void close();
+ void terminate();
+ virtual void dump();
+ void send_to_all(const uint8_t* data, size_t len);
+ bool is_closing();
+ const struct sockaddr* get_local_address();
+ const std::string& get_local_ip();
+ uint16_t get_local_port();
+ size_t get_num_connections();
+
+private:
+ bool set_local_address();
+
+ /* Pure virtual methods that must be implemented by the subclass. */
+protected:
+ virtual void user_on_tcp_connection_alloc(tcp_connection** connection) = 0;
+ virtual void user_on_new_tcp_connection(tcp_connection* connection) = 0;
+ virtual void user_on_tcp_connection_closed(tcp_connection* connection, bool is_closed_by_peer) = 0;
+ virtual void user_on_tcp_server_closed() = 0;
+
+ /* Callbacks fired by UV events. */
+public:
+ void on_uv_connection(int status);
+ void on_uv_closed();
+
+ /* Methods inherited from tcp_connection::listener. */
+ virtual void on_tcp_connection_closed(tcp_connection* connection, bool is_closed_by_peer) override;
+
+private:
+ // Allocated by this (may be passed by argument).
+ uv_tcp_t* m_uv_handle;
+ uv_loop_t* m_loop;
+ // Others.
+ std::unordered_set<tcp_connection*> m_connections;
+ bool m_is_closing;
+
+protected:
+ struct sockaddr_storage m_local_addr;
+ std::string m_local_ip;
+ uint16_t m_local_port;
+};
+
+/* Inline methods. */
+
+inline bool tcp_server::is_closing()
+{
+ return m_is_closing;
+}
+
+inline size_t tcp_server::get_num_connections()
+{
+ return m_connections.size();
+}
+
+#endif
diff --git a/src/osd/modules/lib/osdlib.h b/src/osd/modules/lib/osdlib.h
index 484633f137b..dcba7a6bc81 100644
--- a/src/osd/modules/lib/osdlib.h
+++ b/src/osd/modules/lib/osdlib.h
@@ -61,4 +61,14 @@ void osd_process_kill(void);
int osd_setenv(const char *name, const char *value, int overwrite);
+/*-----------------------------------------------------------------------------
+ osd_get_clipboard_text: retrieves text from the clipboard
+
+ Return value:
+
+ the returned string needs to be osd_free()-ed!
+
+-----------------------------------------------------------------------------*/
+char *osd_get_clipboard_text(void);
+
#endif /* __OSDLIB__ */
diff --git a/src/osd/modules/lib/osdlib_macosx.cpp b/src/osd/modules/lib/osdlib_macosx.cpp
index 34837e8aae4..4d1f839cabd 100644
--- a/src/osd/modules/lib/osdlib_macosx.cpp
+++ b/src/osd/modules/lib/osdlib_macosx.cpp
@@ -14,6 +14,10 @@
#include <sys/types.h>
#include <signal.h>
+#include <mach/mach.h>
+#include <mach/mach_time.h>
+#include <Carbon/Carbon.h>
+
// MAME headers
#include "osdcore.h"
#include "osdlib.h"
@@ -136,3 +140,82 @@ void osd_break_into_debugger(const char *message)
printf("Ignoring MAME exception: %s\n", message);
#endif
}
+
+
+//============================================================
+// osd_get_clipboard_text
+//============================================================
+
+char *osd_get_clipboard_text(void)
+{
+ OSStatus err;
+
+ PasteboardRef pasteboard_ref;
+ err = PasteboardCreate(kPasteboardClipboard, &pasteboard_ref);
+ if (err)
+ return NULL;
+
+ PasteboardSynchronize(pasteboard_ref);
+
+ ItemCount item_count;
+ err = PasteboardGetItemCount(pasteboard_ref, &item_count);
+
+ char *result = NULL; // core expects a malloced C string of uft8 data
+ for (UInt32 item_index = 1; (item_index <= item_count) && !result; item_index++)
+ {
+ PasteboardItemID item_id;
+ err = PasteboardGetItemIdentifier(pasteboard_ref, item_index, &item_id);
+ if (err)
+ continue;
+
+ CFArrayRef flavor_type_array;
+ err = PasteboardCopyItemFlavors(pasteboard_ref, item_id, &flavor_type_array);
+ if (err)
+ continue;
+
+ CFIndex const flavor_count = CFArrayGetCount(flavor_type_array);
+ for (CFIndex flavor_index = 0; (flavor_index < flavor_count) && !result; flavor_index++)
+ {
+ CFStringRef const flavor_type = (CFStringRef)CFArrayGetValueAtIndex(flavor_type_array, flavor_index);
+
+ CFStringEncoding encoding;
+ if (UTTypeConformsTo(flavor_type, kUTTypeUTF16PlainText))
+ encoding = kCFStringEncodingUTF16;
+ else if (UTTypeConformsTo (flavor_type, kUTTypeUTF8PlainText))
+ encoding = kCFStringEncodingUTF8;
+ else if (UTTypeConformsTo (flavor_type, kUTTypePlainText))
+ encoding = kCFStringEncodingMacRoman;
+ else
+ continue;
+
+ CFDataRef flavor_data;
+ err = PasteboardCopyItemFlavorData(pasteboard_ref, item_id, flavor_type, &flavor_data);
+
+ if (!err)
+ {
+ CFStringRef string_ref = CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, flavor_data, encoding);
+ CFDataRef data_ref = CFStringCreateExternalRepresentation (kCFAllocatorDefault, string_ref, kCFStringEncodingUTF8, '?');
+ CFRelease(string_ref);
+ CFRelease(flavor_data);
+
+ CFIndex const length = CFDataGetLength(data_ref);
+ CFRange const range = CFRangeMake(0, length);
+
+ result = reinterpret_cast<char *>(osd_malloc_array(length + 1));
+ if (result)
+ {
+ CFDataGetBytes(data_ref, range, reinterpret_cast<unsigned char *>(result));
+ result[length] = 0;
+ }
+
+ CFRelease(data_ref);
+ }
+ }
+
+ CFRelease(flavor_type_array);
+ }
+
+ CFRelease(pasteboard_ref);
+
+ return result;
+}
diff --git a/src/osd/modules/lib/osdlib_unix.cpp b/src/osd/modules/lib/osdlib_unix.cpp
index fd60db54ba9..3b67e4a2f3a 100644
--- a/src/osd/modules/lib/osdlib_unix.cpp
+++ b/src/osd/modules/lib/osdlib_unix.cpp
@@ -18,6 +18,7 @@
#include "osdcore.h"
#include "osdlib.h"
+#include "sdlinc.h"
//============================================================
// osd_getenv
//============================================================
@@ -132,3 +133,29 @@ void osd_break_into_debugger(const char *message)
printf("Ignoring MAME exception: %s\n", message);
#endif
}
+
+#ifdef SDLMAME_ANDROID
+char *osd_get_clipboard_text(void)
+{
+ return nullptr;
+}
+#else
+//============================================================
+// osd_get_clipboard_text
+//============================================================
+
+char *osd_get_clipboard_text(void)
+{
+ char *result = NULL;
+
+ if (SDL_HasClipboardText())
+ {
+ char *temp = SDL_GetClipboardText();
+ result = (char *) osd_malloc_array(strlen(temp) + 1);
+ strcpy(result, temp);
+ SDL_free(temp);
+ }
+ return result;
+}
+
+#endif
diff --git a/src/osd/modules/lib/osdlib_win32.cpp b/src/osd/modules/lib/osdlib_win32.cpp
index 572774d6c4c..c5792f0307d 100644
--- a/src/osd/modules/lib/osdlib_win32.cpp
+++ b/src/osd/modules/lib/osdlib_win32.cpp
@@ -21,6 +21,7 @@
#include "osdlib.h"
#include "osdcomm.h"
#include "osdcore.h"
+#include "strconv.h"
#ifdef OSD_WINDOWS
#include "winutf8.h"
@@ -240,3 +241,76 @@ void osd_break_into_debugger(const char *message)
}
#endif
}
+
+//============================================================
+// get_clipboard_text_by_format
+//============================================================
+
+static char *get_clipboard_text_by_format(UINT format, char *(*convert)(LPCVOID data))
+{
+ char *result = NULL;
+ HANDLE data_handle;
+ LPVOID data;
+
+ // check to see if this format is available
+ if (IsClipboardFormatAvailable(format))
+ {
+ // open the clipboard
+ if (OpenClipboard(NULL))
+ {
+ // try to access clipboard data
+ data_handle = GetClipboardData(format);
+ if (data_handle != NULL)
+ {
+ // lock the data
+ data = GlobalLock(data_handle);
+ if (data != NULL)
+ {
+ // invoke the convert
+ result = (*convert)(data);
+
+ // unlock the data
+ GlobalUnlock(data_handle);
+ }
+ }
+
+ // close out the clipboard
+ CloseClipboard();
+ }
+ }
+ return result;
+}
+
+//============================================================
+// convert_wide
+//============================================================
+
+static char *convert_wide(LPCVOID data)
+{
+ return utf8_from_wstring((LPCWSTR) data);
+}
+
+//============================================================
+// convert_ansi
+//============================================================
+
+static char *convert_ansi(LPCVOID data)
+{
+ return utf8_from_astring((LPCSTR) data);
+}
+
+//============================================================
+// osd_get_clipboard_text
+//============================================================
+
+char *osd_get_clipboard_text(void)
+{
+ // try to access unicode text
+ char *result = get_clipboard_text_by_format(CF_UNICODETEXT, convert_wide);
+
+ // try to access ANSI text
+ if (result == nullptr)
+ result = get_clipboard_text_by_format(CF_TEXT, convert_ansi);
+
+ return result;
+}
diff --git a/src/osd/modules/lib/osdobj_common.cpp b/src/osd/modules/lib/osdobj_common.cpp
index a1ab9ab7677..32f1a6047ac 100644
--- a/src/osd/modules/lib/osdobj_common.cpp
+++ b/src/osd/modules/lib/osdobj_common.cpp
@@ -25,6 +25,9 @@ const options_entry osd_options::s_option_entries[] =
{ nullptr, nullptr, OPTION_HEADER, "OSD FONT OPTIONS" },
{ OSD_FONT_PROVIDER, OSDOPTVAL_AUTO, OPTION_STRING, "provider for ui font: " },
+ { nullptr, nullptr, OPTION_HEADER, "OSD OUTPUT OPTIONS" },
+ { OSD_OUTPUT_PROVIDER, OSDOPTVAL_AUTO, OPTION_STRING, "provider for output: " },
+
{ nullptr, nullptr, OPTION_HEADER, "OSD INPUT OPTIONS" },
{ OSD_KEYBOARDINPUT_PROVIDER, OSDOPTVAL_AUTO, OPTION_STRING, "provider for keyboard input: " },
{ OSD_MOUSEINPUT_PROVIDER, OSDOPTVAL_AUTO, OPTION_STRING, "provider for mouse input: " },
@@ -171,7 +174,8 @@ osd_common_t::osd_common_t(osd_options &options)
m_keyboard_input(nullptr),
m_mouse_input(nullptr),
m_lightgun_input(nullptr),
- m_joystick_input(nullptr)
+ m_joystick_input(nullptr),
+ m_output(nullptr)
{
osd_output::push(this);
}
@@ -198,11 +202,11 @@ void osd_common_t::register_options()
REGISTER_MODULE(m_mod_man, FONT_SDL);
REGISTER_MODULE(m_mod_man, FONT_NONE);
+ REGISTER_MODULE(m_mod_man, SOUND_XAUDIO2);
REGISTER_MODULE(m_mod_man, SOUND_DSOUND);
REGISTER_MODULE(m_mod_man, SOUND_COREAUDIO);
REGISTER_MODULE(m_mod_man, SOUND_JS);
REGISTER_MODULE(m_mod_man, SOUND_SDL);
- REGISTER_MODULE(m_mod_man, SOUND_XAUDIO2);
REGISTER_MODULE(m_mod_man, SOUND_NONE);
#ifdef SDLMAME_MACOSX
@@ -241,10 +245,16 @@ void osd_common_t::register_options()
REGISTER_MODULE(m_mod_man, LIGHTGUN_NONE);
REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_SDL);
+ REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_WINHYBRID);
REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_DINPUT);
REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_XINPUT);
REGISTER_MODULE(m_mod_man, JOYSTICK_NONE);
+ REGISTER_MODULE(m_mod_man, OUTPUT_NONE);
+ REGISTER_MODULE(m_mod_man, OUTPUT_CONSOLE);
+ REGISTER_MODULE(m_mod_man, OUTPUT_NETWORK);
+
+
// after initialization we know which modules are supported
const char *names[20];
@@ -301,8 +311,17 @@ void osd_common_t::register_options()
dnames.push_back(names[i]);
update_option(OSD_DEBUG_PROVIDER, dnames);
+ m_mod_man.get_module_names(OSD_OUTPUT_PROVIDER, 20, &num, names);
+ dnames.clear();
+ for (int i = 0; i < num; i++)
+ dnames.push_back(names[i]);
+ update_option(OSD_OUTPUT_PROVIDER, dnames);
+
// Register video options and update options
video_options_add("none", nullptr);
+#if USE_OPENGL
+ video_options_add("opengl", nullptr);
+#endif
video_register();
update_option(OSDOPTION_VIDEO, m_video_names);
}
@@ -518,9 +537,9 @@ void osd_common_t::customize_input_type_list(simple_list<input_type_entry> &type
// list of OS-dependent slider values.
//-------------------------------------------------
-slider_state* osd_common_t::get_slider_list()
+std::vector<ui_menu_item> osd_common_t::get_slider_list()
{
- return nullptr;
+ return m_sliders;
}
//-------------------------------------------------
@@ -561,6 +580,12 @@ bool osd_common_t::execute_command(const char *command)
}
+static void output_notifier_callback(const char *outname, INT32 value, void *param)
+{
+ osd_common_t *osd = (osd_common_t*)param;
+ osd->notify(outname, value);
+}
+
void osd_common_t::init_subsystems()
{
if (!video_init())
@@ -572,8 +597,6 @@ void osd_common_t::init_subsystems()
exit(-1);
}
- output_init();
-
m_keyboard_input = select_module_options<input_module *>(options(), OSD_KEYBOARDINPUT_PROVIDER);
m_mouse_input = select_module_options<input_module *>(options(), OSD_MOUSEINPUT_PROVIDER);
m_lightgun_input = select_module_options<input_module *>(options(), OSD_LIGHTGUNINPUT_PROVIDER);
@@ -590,6 +613,9 @@ void osd_common_t::init_subsystems()
m_midi = select_module_options<midi_module *>(options(), OSD_MIDI_PROVIDER);
+ m_output = select_module_options<output_module *>(options(), OSD_OUTPUT_PROVIDER);
+ machine().output().set_notifier(NULL, output_notifier_callback, this);
+
m_mod_man.init(options());
input_init();
@@ -642,16 +668,10 @@ void osd_common_t::input_resume()
m_joystick_input->resume();
}
-bool osd_common_t::output_init()
-{
- return true;
-}
-
void osd_common_t::exit_subsystems()
{
video_exit();
input_exit();
- output_exit();
}
void osd_common_t::video_exit()
@@ -670,10 +690,6 @@ void osd_common_t::input_exit()
m_joystick_input->exit();
}
-void osd_common_t::output_exit()
-{
-}
-
void osd_common_t::osd_exit()
{
m_mod_man.exit();
diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h
index 0230cfe090d..cd83ba61e7b 100644
--- a/src/osd/modules/lib/osdobj_common.h
+++ b/src/osd/modules/lib/osdobj_common.h
@@ -21,8 +21,11 @@
#include "modules/debugger/debug_module.h"
#include "modules/netdev/netdev_module.h"
#include "modules/midi/midi_module.h"
+#include "modules/output/output_module.h"
#include "cliopts.h"
+class ui_menu_item;
+
//============================================================
// Defines
//============================================================
@@ -188,7 +191,7 @@ public:
virtual void customize_input_type_list(simple_list<input_type_entry> &typelist) override;
// video overridables
- virtual slider_state *get_slider_list() override;
+ virtual std::vector<ui_menu_item> get_slider_list() override;
// command option overrides
virtual bool execute_command(const char *command) override;
@@ -213,13 +216,11 @@ public:
virtual bool window_init();
virtual void input_resume();
- virtual bool output_init();
virtual void exit_subsystems();
virtual void video_exit();
virtual void window_exit();
virtual void input_exit();
- virtual void output_exit();
virtual void osd_exit();
@@ -232,6 +233,7 @@ public:
bool verbose() const { return m_print_verbose; }
void set_verbose(bool print_verbose) { m_print_verbose = print_verbose; }
+ void notify(const char *outname, INT32 value) { m_output->notify(outname, value); }
protected:
virtual bool input_init();
virtual void input_pause();
@@ -278,6 +280,9 @@ protected:
input_module* m_mouse_input;
input_module* m_lightgun_input;
input_module* m_joystick_input;
+ output_module* m_output;
+ std::vector<ui_menu_item> m_sliders;
+
private:
std::vector<const char *> m_video_names;
};
diff --git a/src/osd/modules/opengl/gl_shader_mgr.h b/src/osd/modules/opengl/gl_shader_mgr.h
index 69400d90dc2..532d40c30fe 100644
--- a/src/osd/modules/opengl/gl_shader_mgr.h
+++ b/src/osd/modules/opengl/gl_shader_mgr.h
@@ -4,6 +4,8 @@
#ifndef GL_SHADER_MGR_H
#define GL_SHADER_MGR_H
+#include "osd_opengl.h"
+
// #define GLSL_SOURCE_ON_DISK 1
enum GLSL_SHADER_FEATURE {
diff --git a/src/osd/modules/osdwindow.cpp b/src/osd/modules/osdwindow.cpp
index 2894092ac30..cde83c3fe7f 100644
--- a/src/osd/modules/osdwindow.cpp
+++ b/src/osd/modules/osdwindow.cpp
@@ -6,14 +6,6 @@
//
//============================================================
-// standard windows headers
-#ifdef OSD_WINDOWS
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <windowsx.h>
-#include <mmsystem.h>
-#endif
-
#include "osdwindow.h"
#include "render/drawnone.h"
diff --git a/src/osd/modules/osdwindow.h b/src/osd/modules/osdwindow.h
index 47e9d7bd527..60d2cccc700 100644
--- a/src/osd/modules/osdwindow.h
+++ b/src/osd/modules/osdwindow.h
@@ -11,11 +11,20 @@
#include "emu.h"
#include "ui/ui.h"
+#include "ui/menu.h"
#include "osdhelper.h"
+// standard windows headers
+#ifdef OSD_WINDOWS
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <windowsx.h>
+#include <mmsystem.h>
+#endif
+
#ifdef OSD_SDL
-// standard SDL headers
-#include "sdlinc.h"
+// forward declaration
+struct SDL_Window;
#endif
//============================================================
@@ -120,13 +129,23 @@ public:
float pixel_aspect() const { return monitor()->pixel_aspect(); }
+ bool swap_xy()
+ {
+ bool orientation_swap_xy =
+ (machine().system().flags & ORIENTATION_SWAP_XY) == ORIENTATION_SWAP_XY;
+ bool rotation_swap_xy =
+ (target()->orientation() & ROT90) == ROT90 ||
+ (target()->orientation() & ROT270) == ROT270;
+ return orientation_swap_xy ^ rotation_swap_xy;
+ };
+
virtual osd_dim get_size() = 0;
-#ifdef OSD_SDL
virtual osd_monitor_info *monitor() const = 0;
+
+#ifdef OSD_SDL
virtual SDL_Window *sdl_window() = 0;
#else
- virtual osd_monitor_info *monitor() const = 0;
virtual bool win_has_menu() = 0;
// FIXME: cann we replace winwindow_video_window_monitor(NULL) with monitor() ?
virtual osd_monitor_info *winwindow_video_window_monitor(const osd_rect *proposed) = 0;
@@ -179,21 +198,23 @@ public:
virtual int create() = 0;
virtual render_primitive_list *get_primitives() = 0;
- virtual slider_state* get_slider_list() { return nullptr; }
+ virtual std::vector<ui_menu_item> get_slider_list() { return m_sliders; }
virtual int draw(const int update) = 0;
virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) { return 0; };
virtual void save() { };
virtual void record() { };
virtual void toggle_fsfx() { };
virtual bool sliders_dirty() { return m_sliders_dirty; }
- virtual bool multi_window_sliders() { return false; }
static osd_renderer* make_for_type(int mode, osd_window *window, int extra_flags = FLAG_NONE);
protected:
+ virtual void build_slider_list() { }
+
/* Internal flags */
static const int FI_CHANGED = 0x010000;
- bool m_sliders_dirty;
+ bool m_sliders_dirty;
+ std::vector<ui_menu_item> m_sliders;
private:
osd_window *m_window;
@@ -201,4 +222,81 @@ private:
};
+
+//============================================================
+// CONSTANTS
+//============================================================
+
+#define MAX_VIDEO_WINDOWS (4)
+
+#define VIDEO_SCALE_MODE_NONE (0)
+
+#define GLSL_SHADER_MAX 10
+
+
+//============================================================
+// TYPE DEFINITIONS
+//============================================================
+
+struct osd_video_config
+{
+ // global configuration
+ int windowed; // start windowed?
+ int prescale; // prescale factor
+ int keepaspect; // keep aspect ratio
+ int numscreens; // number of screens
+ int fullstretch; // fractional stretch
+
+ // hardware options
+ int mode; // output mode
+ int waitvsync; // spin until vsync
+ int syncrefresh; // sync only to refresh rate
+ int switchres; // switch resolutions
+
+ // d3d, accel, opengl
+ int filter; // enable filtering
+ //int filter; // enable filtering, disabled if glsl_filter>0
+
+ // OpenGL options
+ int glsl;
+ int glsl_filter; // glsl filtering, >0 disables filter
+ char * glsl_shader_mamebm[GLSL_SHADER_MAX]; // custom glsl shader set, mame bitmap
+ int glsl_shader_mamebm_num; // custom glsl shader set number, mame bitmap
+ char * glsl_shader_scrn[GLSL_SHADER_MAX]; // custom glsl shader set, screen bitmap
+ int glsl_shader_scrn_num; // custom glsl shader number, screen bitmap
+ int pbo;
+ int vbo;
+ int allowtexturerect; // allow GL_ARB_texture_rectangle, default: no
+ int forcepow2texture; // force power of two textures, default: no
+
+ // dd, d3d
+ int triplebuf; // triple buffer
+
+ //============================================================
+ // SDL - options
+ //============================================================
+ int novideo; // don't draw, for pure CPU benchmarking
+
+ int centerh;
+ int centerv;
+
+ // vector options
+ float beamwidth; // beam width
+
+ // perftest
+ int perftest; // print out real video fps
+
+ // X11 options
+ int restrictonemonitor; // in fullscreen, confine to Xinerama monitor 0
+
+ // YUV options
+ int scale_mode;
+};
+
+//============================================================
+// GLOBAL VARIABLES
+//============================================================
+
+extern osd_video_config video_config;
+
#endif /* __OSDWINDOW__ */
diff --git a/src/osd/modules/output/console.cpp b/src/osd/modules/output/console.cpp
new file mode 100644
index 00000000000..753164171ee
--- /dev/null
+++ b/src/osd/modules/output/console.cpp
@@ -0,0 +1,32 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic
+/***************************************************************************
+
+ console.cpp
+
+ Console output interface.
+
+*******************************************************************c********/
+
+#include "output_module.h"
+#include "modules/osdmodule.h"
+
+class output_console : public osd_module, public output_module
+{
+public:
+ output_console()
+ : osd_module(OSD_OUTPUT_PROVIDER, "console"), output_module()
+ {
+ }
+ virtual ~output_console() { }
+
+ virtual int init(const osd_options &options) override { return 0; }
+ virtual void exit() override { }
+
+ // output_module
+
+ virtual void notify(const char *outname, INT32 value) override { osd_printf_info("%s = %d\n", ((outname==nullptr) ? "none" : outname), value); }
+
+};
+
+MODULE_DEFINITION(OUTPUT_CONSOLE, output_console)
diff --git a/src/osd/modules/output/network.cpp b/src/osd/modules/output/network.cpp
new file mode 100644
index 00000000000..3bca29f3dbb
--- /dev/null
+++ b/src/osd/modules/output/network.cpp
@@ -0,0 +1,86 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic
+/***************************************************************************
+
+ network.cpp
+
+ Network output interface.
+
+*******************************************************************c********/
+
+#include "output_module.h"
+#include "modules/osdmodule.h"
+#include "modules/ipc/raw_tcp_server.h"
+#include "modules/ipc/raw_tcp_connection.h"
+#include <uv.h>
+
+#include <mutex>
+#include <thread>
+
+class output_network_server :
+ public raw_tcp_server::listener,
+ public raw_tcp_connection::listener
+{
+
+public:
+ output_network_server(uv_loop_t* loop) { m_tcp_server = new raw_tcp_server(loop, "0.0.0.0", 8000, 256, this, this); }
+
+ virtual ~output_network_server() { delete m_tcp_server; }
+
+ void terminate_all() { m_tcp_server->terminate(); }
+ void send_to_all(const uint8_t* data, size_t len) { m_tcp_server->send_to_all(data,len); }
+
+ /* Pure virtual methods inherited from raw_tcp_server::listener. */
+ virtual void on_raw_tcp_connection_closed(raw_tcp_server* tcpServer, raw_tcp_connection* connection, bool is_closed_by_peer) override { }
+ /* Pure virtual methods inherited from raw_tcp_connection::listener. */
+ virtual void on_data_recv(raw_tcp_connection *connection, const uint8_t* data, size_t len) override { }
+private:
+ raw_tcp_server* m_tcp_server;
+};
+
+class output_network : public osd_module, public output_module
+{
+public:
+ output_network()
+ : osd_module(OSD_OUTPUT_PROVIDER, "network"), output_module(), m_loop(nullptr), m_server(nullptr)
+{
+ }
+ virtual ~output_network() {
+ }
+
+ virtual int init(const osd_options &options) override {
+ m_loop = new uv_loop_t;
+ int err = uv_loop_init(m_loop);
+ if (err) {
+ return 1;
+ }
+ m_working_thread = std::thread([](output_network* self) { self->process_output(); }, this);
+ return 0;
+ }
+
+ virtual void exit() override {
+ m_server->terminate_all();
+ m_working_thread.join();
+ uv_loop_close(m_loop);
+ delete m_loop;
+ delete m_server;
+ }
+
+ // output_module
+
+ virtual void notify(const char *outname, INT32 value) override { m_server->send_to_all((const uint8_t*)outname, strlen(outname)); }
+
+ // implementation
+ void process_output()
+ {
+ m_server = new output_network_server(m_loop);
+ uv_run(m_loop, UV_RUN_DEFAULT);
+ }
+
+private:
+ std::thread m_working_thread;
+ uv_loop_t* m_loop;
+ output_network_server *m_server;
+};
+
+MODULE_DEFINITION(OUTPUT_NETWORK, output_network)
diff --git a/src/osd/modules/output/none.cpp b/src/osd/modules/output/none.cpp
new file mode 100644
index 00000000000..1adf6279ce0
--- /dev/null
+++ b/src/osd/modules/output/none.cpp
@@ -0,0 +1,32 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic
+/***************************************************************************
+
+ none.cpp
+
+ Dummy output interface.
+
+*******************************************************************c********/
+
+#include "output_module.h"
+#include "modules/osdmodule.h"
+
+class output_none : public osd_module, public output_module
+{
+public:
+ output_none()
+ : osd_module(OSD_OUTPUT_PROVIDER, "none"), output_module()
+ {
+ }
+ virtual ~output_none() { }
+
+ virtual int init(const osd_options &options) override { return 0; }
+ virtual void exit() override { }
+
+ // output_module
+
+ virtual void notify(const char *outname, INT32 value) override { }
+
+};
+
+MODULE_DEFINITION(OUTPUT_NONE, output_none)
diff --git a/src/osd/modules/output/output_module.h b/src/osd/modules/output/output_module.h
new file mode 100644
index 00000000000..81fcaae2cce
--- /dev/null
+++ b/src/osd/modules/output/output_module.h
@@ -0,0 +1,30 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic
+/*
+ * outpout_module.h
+ *
+ */
+
+#ifndef OUTPUT_MODULE_H_
+#define OUTPUT_MODULE_H_
+
+#include "osdepend.h"
+#include "modules/osdmodule.h"
+
+//============================================================
+// CONSTANTS
+//============================================================
+
+#define OSD_OUTPUT_PROVIDER "output"
+
+class output_module
+{
+public:
+ output_module() { }
+
+ virtual ~output_module() { }
+
+ virtual void notify(const char *outname, INT32 value) = 0;
+};
+
+#endif /* OUTPUT_MODULE_H_ */
diff --git a/src/osd/modules/render/bgfx/chain.cpp b/src/osd/modules/render/bgfx/chain.cpp
index 64e5d36f5ca..3cc6e022573 100644
--- a/src/osd/modules/render/bgfx/chain.cpp
+++ b/src/osd/modules/render/bgfx/chain.cpp
@@ -14,18 +14,23 @@
#include "parameter.h"
#include "entryuniform.h"
#include "texturemanager.h"
+#include "targetmanager.h"
+#include "target.h"
#include "vertex.h"
-#include "window.h"
+#include "modules/osdwindow.h"
#include "chain.h"
-bgfx_chain::bgfx_chain(std::string name, std::string author, std::vector<bgfx_slider*> sliders, std::vector<bgfx_parameter*> params, std::vector<bgfx_chain_entry*> entries)
+bgfx_chain::bgfx_chain(std::string name, std::string author, target_manager& targets, std::vector<bgfx_slider*> sliders, std::vector<bgfx_parameter*> params, std::vector<bgfx_chain_entry*> entries, std::vector<bgfx_target*> target_list, std::uint32_t screen_index)
: m_name(name)
, m_author(author)
+ , m_targets(targets)
, m_sliders(sliders)
, m_params(params)
, m_entries(entries)
+ , m_target_list(target_list)
, m_current_time(0)
+ , m_screen_index(screen_index)
{
for (bgfx_slider* slider : m_sliders)
{
@@ -47,6 +52,10 @@ bgfx_chain::~bgfx_chain()
{
delete entry;
}
+ for (bgfx_target* target : m_target_list)
+ {
+ m_targets.destroy_target(target->name(), m_screen_index);
+ }
}
void bgfx_chain::process(render_primitive* prim, int view, int screen, texture_manager& textures, osd_window& window, uint64_t blend)
diff --git a/src/osd/modules/render/bgfx/chain.h b/src/osd/modules/render/bgfx/chain.h
index 9cc300d56a6..bc68d4d5af2 100644
--- a/src/osd/modules/render/bgfx/chain.h
+++ b/src/osd/modules/render/bgfx/chain.h
@@ -21,12 +21,14 @@ class render_primitive;
class bgfx_slider;
class bgfx_parameter;
class texture_manager;
+class target_manager;
+class bgfx_target;
class osd_window;
class bgfx_chain
{
public:
- bgfx_chain(std::string name, std::string author, std::vector<bgfx_slider*> sliders, std::vector<bgfx_parameter*> params, std::vector<bgfx_chain_entry*> entries);
+ bgfx_chain(std::string name, std::string author, target_manager& targets, std::vector<bgfx_slider*> sliders, std::vector<bgfx_parameter*> params, std::vector<bgfx_chain_entry*> entries, std::vector<bgfx_target*> target_list, uint32_t screen_index);
~bgfx_chain();
void process(render_primitive* prim, int view, int screen, texture_manager& textures, osd_window &window, uint64_t blend = 0L);
@@ -38,11 +40,14 @@ public:
private:
std::string m_name;
std::string m_author;
+ target_manager& m_targets;
std::vector<bgfx_slider*> m_sliders;
std::vector<bgfx_parameter*> m_params;
std::vector<bgfx_chain_entry*> m_entries;
+ std::vector<bgfx_target*> m_target_list;
std::map<std::string, bgfx_slider*> m_slider_map;
int64_t m_current_time;
+ uint32_t m_screen_index;
};
#endif // __DRAWBGFX_CHAIN__
diff --git a/src/osd/modules/render/bgfx/chainentry.cpp b/src/osd/modules/render/bgfx/chainentry.cpp
index b8e47eea624..a5f091a554b 100644
--- a/src/osd/modules/render/bgfx/chainentry.cpp
+++ b/src/osd/modules/render/bgfx/chainentry.cpp
@@ -24,6 +24,9 @@
#include "vertex.h"
#include "suppressor.h"
+#include "render.h"
+
+
bgfx_chain_entry::bgfx_chain_entry(std::string name, bgfx_effect* effect, std::vector<bgfx_suppressor*> suppressors, std::vector<bgfx_input_pair> inputs, std::vector<bgfx_entry_uniform*> uniforms, target_manager& targets, std::string output)
: m_name(name)
, m_effect(effect)
diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp
index 25ff6ce3a6e..5eaf6fc1378 100644
--- a/src/osd/modules/render/bgfx/chainmanager.cpp
+++ b/src/osd/modules/render/bgfx/chainmanager.cpp
@@ -10,6 +10,11 @@
//============================================================
#include "emu.h"
+#include "ui/ui.h"
+#include "ui/menu.h"
+
+#include "osdcore.h"
+#include "modules/osdwindow.h"
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
@@ -17,27 +22,76 @@
#include <bx/readerwriter.h>
#include <bx/crtimpl.h>
+#include "bgfxutil.h"
+
#include "chainmanager.h"
#include "chainreader.h"
#include "chain.h"
+#include "texture.h"
+#include "target.h"
+#include "slider.h"
+
+#include "sliderdirtynotifier.h"
+
using namespace rapidjson;
+const uint32_t chain_manager::CHAIN_NONE = 0;
+
+chain_manager::chain_manager(running_machine& machine, osd_options& options, texture_manager& textures, target_manager& targets, effect_manager& effects, uint32_t window_index, slider_dirty_notifier& slider_notifier)
+ : m_machine(machine)
+ , m_options(options)
+ , m_textures(textures)
+ , m_targets(targets)
+ , m_effects(effects)
+ , m_window_index(window_index)
+ , m_slider_notifier(slider_notifier)
+ , m_screen_count(0)
+{
+ find_available_chains(options.bgfx_path());
+ parse_chain_selections(options.bgfx_screen_chains());
+}
+
chain_manager::~chain_manager()
{
- for (bgfx_chain* chain : m_chains)
- {
- delete chain;
- }
- m_chains.clear();
+ destroy_chains();
}
-bgfx_chain* chain_manager::chain(std::string name, running_machine& machine, uint32_t window_index, uint32_t screen_index)
+void chain_manager::find_available_chains(std::string path)
{
- return load_chain(name, machine, window_index, screen_index);
+ m_available_chains.clear();
+ m_available_chains.push_back("none");
+
+ osd_directory *directory = osd_opendir((path + "/chains").c_str());
+ if (directory != nullptr)
+ {
+ for (const osd_directory_entry *entry = osd_readdir(directory); entry != nullptr; entry = osd_readdir(directory))
+ {
+ if (entry->type == ENTTYPE_FILE)
+ {
+ std::string name(entry->name);
+ std::string extension(".json");
+
+ // Does the name has at least one character in addition to ".json"?
+ if (name.length() > extension.length())
+ {
+ size_t start = name.length() - extension.length();
+ std::string test_segment = name.substr(start, extension.length());
+
+ // Does it end in .json?
+ if (test_segment == extension)
+ {
+ m_available_chains.push_back(name.substr(0, start));
+ }
+ }
+ }
+ }
+
+ osd_closedir(directory);
+ }
}
-bgfx_chain* chain_manager::load_chain(std::string name, running_machine& machine, uint32_t window_index, uint32_t screen_index)
+bgfx_chain* chain_manager::load_chain(std::string name, uint32_t screen_index)
{
if (name.length() < 5 || (name.compare(name.length() - 5, 5, ".json")!= 0))
{
@@ -72,7 +126,7 @@ bgfx_chain* chain_manager::load_chain(std::string name, running_machine& machine
return nullptr;
}
- bgfx_chain* chain = chain_reader::read_from_value(document, name + ": ", m_options, machine, window_index, screen_index, m_textures, m_targets, m_effects);
+ bgfx_chain* chain = chain_reader::read_from_value(document, name + ": ", m_options, m_machine, m_window_index, screen_index, m_textures, m_targets, m_effects);
if (chain == nullptr)
{
@@ -80,7 +134,345 @@ bgfx_chain* chain_manager::load_chain(std::string name, running_machine& machine
return nullptr;
}
- m_chains.push_back(chain);
-
return chain;
}
+
+void chain_manager::parse_chain_selections(std::string chain_str)
+{
+ std::vector<std::string> chain_names = split_option_string(chain_str);
+
+ while (m_current_chain.size() != chain_names.size())
+ {
+ m_screen_chains.push_back(nullptr);
+ m_current_chain.push_back(CHAIN_NONE);
+ }
+
+ for (size_t index = 0; index < chain_names.size(); index++)
+ {
+ size_t chain_index = 0;
+ for (chain_index = 0; chain_index < m_available_chains.size(); chain_index++)
+ {
+ if (m_available_chains[chain_index] == chain_names[index])
+ {
+ break;
+ }
+ }
+
+ if (chain_index < m_available_chains.size())
+ {
+ m_current_chain[index] = chain_index;
+ }
+ else
+ {
+ m_current_chain[index] = CHAIN_NONE;
+ }
+ }
+}
+
+std::vector<std::string> chain_manager::split_option_string(std::string chain_str) const
+{
+ std::vector<std::string> chain_names;
+
+ uint32_t length = chain_str.length();
+ uint32_t win = 0;
+ uint32_t last_start = 0;
+ for (uint32_t i = 0; i < length + 1; i++)
+ {
+ if (i == length || chain_str[i] == ',' || chain_str[i] == ':')
+ {
+ if (win == m_window_index)
+ {
+ chain_names.push_back(chain_str.substr(last_start, i - last_start));
+ }
+ last_start = i + 1;
+ if (chain_str[i] == ':')
+ {
+ win++;
+ }
+ }
+ }
+
+ return chain_names;
+}
+
+void chain_manager::load_chains()
+{
+ for (size_t chain = 0; chain < m_current_chain.size() && chain < m_screen_chains.size(); chain++)
+ {
+ if (m_current_chain[chain] != CHAIN_NONE)
+ {
+ m_screen_chains[chain] = load_chain(m_available_chains[m_current_chain[chain]], uint32_t(chain));
+ }
+ }
+}
+
+void chain_manager::destroy_chains()
+{
+ for (size_t index = 0; index < m_screen_chains.size(); index++)
+ {
+ if (m_screen_chains[index] != nullptr)
+ {
+ delete m_screen_chains[index];
+ m_screen_chains[index] = nullptr;
+ }
+ }
+}
+
+void chain_manager::reload_chains()
+{
+ destroy_chains();
+ load_chains();
+}
+
+bgfx_chain* chain_manager::screen_chain(uint32_t screen)
+{
+ if (screen >= m_screen_chains.size())
+ {
+ return m_screen_chains[m_screen_chains.size() - 1];
+ }
+ else
+ {
+ return m_screen_chains[screen];
+ }
+}
+
+void chain_manager::process_screen_quad(uint32_t view, uint32_t screen, render_primitive* prim, osd_window &window)
+{
+ uint16_t tex_width(prim->texture.width);
+ uint16_t tex_height(prim->texture.height);
+
+ const bgfx::Memory* mem = bgfx_util::mame_texture_data_to_bgfx_texture_data(prim->flags & PRIMFLAG_TEXFORMAT_MASK,
+ tex_width, tex_height, prim->texture.rowpixels, prim->texture.palette, prim->texture.base);
+
+ std::string full_name = "screen" + std::to_string(screen);
+ bgfx_texture *texture = new bgfx_texture(full_name, bgfx::TextureFormat::RGBA8, tex_width, tex_height, mem);
+ m_textures.add_provider(full_name, texture);
+
+ m_targets.update_target_sizes(screen, tex_width, tex_height, TARGET_STYLE_GUEST);
+
+ bgfx_chain* chain = screen_chain(screen);
+ chain->process(prim, view, screen, m_textures, window, bgfx_util::get_blend_state(PRIMFLAG_GET_BLENDMODE(prim->flags)));
+ view += chain->applicable_passes();
+
+ m_textures.add_provider(full_name, nullptr);
+ delete texture;
+}
+
+std::vector<render_primitive*> chain_manager::count_screens(render_primitive* prim)
+{
+ std::vector<render_primitive*> screens;
+
+ int screen_count = 0;
+ std::vector<void*> bases;
+ while (prim != nullptr)
+ {
+ if (PRIMFLAG_GET_SCREENTEX(prim->flags))
+ {
+ bool found = false;
+ for (void* base : bases)
+ {
+ if (base == prim->texture.base)
+ {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ {
+ screen_count++;
+ screens.push_back(prim);
+ bases.push_back(prim->texture.base);
+ }
+ }
+ prim = prim->next();
+ }
+
+ if (screen_count > 0)
+ {
+ update_screen_count(screen_count);
+ m_targets.update_screen_count(screen_count);
+ }
+
+ return screens;
+}
+
+void chain_manager::update_screen_count(uint32_t screen_count)
+{
+ if (screen_count != m_screen_count)
+ {
+ m_slider_notifier.set_sliders_dirty();
+ m_screen_count = screen_count;
+
+ // Ensure we have one screen chain entry per screen
+ while (m_screen_chains.size() < m_screen_count)
+ {
+ m_screen_chains.push_back(nullptr);
+ m_current_chain.push_back(CHAIN_NONE);
+ }
+
+ // Ensure we have a screen chain selection slider per screen
+ while (m_selection_sliders.size() < m_screen_count)
+ {
+ create_selection_slider(m_selection_sliders.size());
+ }
+
+ load_chains();
+ }
+}
+
+static INT32 update_trampoline(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
+{
+ if (arg != nullptr)
+ {
+ return reinterpret_cast<chain_manager*>(arg)->chain_changed(id, str, newval);
+ }
+ return 0;
+}
+
+int32_t chain_manager::chain_changed(int32_t id, std::string *str, int32_t newval)
+{
+ if (newval != SLIDER_NOCHANGE)
+ {
+ m_current_chain[id] = newval;
+
+ reload_chains();
+
+ m_slider_notifier.set_sliders_dirty();
+ }
+
+ if (str != nullptr)
+ {
+ *str = string_format("%s", m_available_chains[m_current_chain[id]].c_str());
+ }
+
+ return m_current_chain[id];
+}
+
+void chain_manager::create_selection_slider(uint32_t screen_index)
+{
+ if (screen_index < m_selection_sliders.size())
+ {
+ return;
+ }
+
+ std::string description = "Window " + std::to_string(m_window_index) + ", Screen " + std::to_string(screen_index) + " Effect:";
+ size_t size = sizeof(slider_state) + description.length();
+ slider_state *state = reinterpret_cast<slider_state *>(auto_alloc_array_clear(m_machine, UINT8, size));
+
+ state->minval = 0;
+ state->defval = m_current_chain[screen_index];
+ state->maxval = m_available_chains.size() - 1;
+ state->incval = 1;
+ state->update = update_trampoline;
+ state->arg = this;
+ state->id = screen_index;
+ strcpy(state->description, description.c_str());
+
+ ui_menu_item item;
+ item.text = state->description;
+ item.subtext = "";
+ item.flags = 0;
+ item.ref = state;
+ item.type = ui_menu_item_type::UI_MENU_ITEM_TYPE_SLIDER;
+ m_selection_sliders.push_back(item);
+}
+
+uint32_t chain_manager::handle_screen_chains(uint32_t view, render_primitive *starting_prim, osd_window& window)
+{
+ std::vector<render_primitive*> screens = count_screens(starting_prim);
+
+ if (screens.size() == 0)
+ {
+ return 0;
+ }
+
+ // Process each screen as necessary
+ uint32_t used_views = 0;
+ uint32_t screen_index = 0;
+ for (render_primitive* prim : screens)
+ {
+ if (m_current_chain[screen_index] == CHAIN_NONE)
+ {
+ screen_index++;
+ continue;
+ }
+
+ uint16_t screen_width(floor((prim->bounds.x1 - prim->bounds.x0) + 0.5f));
+ uint16_t screen_height(floor((prim->bounds.y1 - prim->bounds.y0) + 0.5f));
+ if (window.swap_xy())
+ {
+ std::swap(screen_width, screen_height);
+ }
+
+ m_targets.update_target_sizes(screen_index, screen_width, screen_height, TARGET_STYLE_NATIVE);
+ process_screen_quad(view + used_views, screen_index, prim, window);
+ used_views += screen_chain(screen_index)->applicable_passes();
+
+ screen_index++;
+ }
+
+ bgfx::setViewFrameBuffer(view + used_views, BGFX_INVALID_HANDLE);
+
+ return used_views;
+}
+
+bool chain_manager::has_applicable_chain(uint32_t screen)
+{
+ return screen < m_screen_count && m_current_chain[screen] != CHAIN_NONE && m_screen_chains[screen] != nullptr;
+}
+
+bool chain_manager::needs_sliders()
+{
+ return m_screen_count > 0 && m_available_chains.size() > 1;
+}
+
+std::vector<ui_menu_item> chain_manager::get_slider_list()
+{
+ std::vector<ui_menu_item> sliders;
+
+ if (!needs_sliders())
+ {
+ return sliders;
+ }
+
+ for (size_t index = 0; index < m_screen_chains.size(); index++)
+ {
+ bgfx_chain* chain = m_screen_chains[index];
+ sliders.push_back(m_selection_sliders[index]);
+
+ if (chain == nullptr)
+ {
+ continue;
+ }
+
+ std::vector<bgfx_slider*> chain_sliders = chain->sliders();
+ for (bgfx_slider* slider : chain_sliders)
+ {
+ slider_state* core_slider = slider->core_slider();
+
+ ui_menu_item item;
+ item.text = core_slider->description;
+ item.subtext = "";
+ item.flags = 0;
+ item.ref = core_slider;
+ item.type = ui_menu_item_type::UI_MENU_ITEM_TYPE_SLIDER;
+ m_selection_sliders.push_back(item);
+
+ sliders.push_back(item);
+ }
+
+ if (chain_sliders.size() > 0)
+ {
+ ui_menu_item item;
+ item.text = MENU_SEPARATOR_ITEM;
+ item.subtext = "";
+ item.flags = 0;
+ item.ref = nullptr;
+ item.type = ui_menu_item_type::UI_MENU_ITEM_TYPE_SEPARATOR;
+
+ sliders.push_back(item);
+ }
+ }
+
+ return sliders;
+}
diff --git a/src/osd/modules/render/bgfx/chainmanager.h b/src/osd/modules/render/bgfx/chainmanager.h
index 4cfd53b5f52..7d8d0c16eb3 100644
--- a/src/osd/modules/render/bgfx/chainmanager.h
+++ b/src/osd/modules/render/bgfx/chainmanager.h
@@ -22,31 +22,57 @@
#include "effectmanager.h"
class running_machine;
+class osd_window;
+class slider_dirty_notifier;
class bgfx_chain;
+class bgfx_slider;
-class chain_manager {
+class chain_manager
+{
public:
- chain_manager(osd_options& options, texture_manager& textures, target_manager& targets, effect_manager& effects)
- : m_options(options)
- , m_textures(textures)
- , m_targets(targets)
- , m_effects(effects)
- {
- }
+ chain_manager(running_machine& machine, osd_options& options, texture_manager& textures, target_manager& targets, effect_manager& effects, uint32_t window_index, slider_dirty_notifier& slider_notifier);
~chain_manager();
- // Getters
- bgfx_chain* chain(std::string name, running_machine& machine, uint32_t window_index, uint32_t screen_index);
+ uint32_t handle_screen_chains(uint32_t view, render_primitive *starting_prim, osd_window& window);
+ int32_t chain_changed(int32_t index, std::string *str, int32_t newval);
+
+ // Getters
+ bgfx_chain* screen_chain(uint32_t screen);
+ bgfx_chain* load_chain(std::string name, uint32_t screen_index);
+ bool has_applicable_chain(uint32_t screen);
+ std::vector<ui_menu_item> get_slider_list();
private:
- bgfx_chain* load_chain(std::string name, running_machine& machine, uint32_t window_index, uint32_t screen_index);
+ void load_chains();
+ void destroy_chains();
+ void reload_chains();
+
+ void find_available_chains(std::string path);
+ void parse_chain_selections(std::string chain_str);
+ std::vector<std::string> split_option_string(std::string chain_str) const;
+
+ void update_screen_count(uint32_t screen_count);
+ void create_selection_slider(uint32_t screen_index);
+ bool needs_sliders();
+
+ std::vector<render_primitive*> count_screens(render_primitive* prim);
+ void process_screen_quad(uint32_t view, uint32_t screen, render_primitive* prim, osd_window &window);
+
+ running_machine& m_machine;
+ osd_options& m_options;
+ texture_manager& m_textures;
+ target_manager& m_targets;
+ effect_manager& m_effects;
+ uint32_t m_window_index;
+ slider_dirty_notifier& m_slider_notifier;
+ uint32_t m_screen_count;
+ std::vector<std::string> m_available_chains;
+ std::vector<bgfx_chain*> m_screen_chains;
+ std::vector<ui_menu_item> m_selection_sliders;
+ std::vector<int32_t> m_current_chain;
- osd_options& m_options;
- texture_manager& m_textures;
- target_manager& m_targets;
- effect_manager& m_effects;
- std::vector<bgfx_chain*> m_chains;
+ static const uint32_t CHAIN_NONE;
};
#endif // __DRAWBGFX_CHAIN_MANAGER__
diff --git a/src/osd/modules/render/bgfx/chainreader.cpp b/src/osd/modules/render/bgfx/chainreader.cpp
index 204e7f1b6ce..332ba139fd0 100644
--- a/src/osd/modules/render/bgfx/chainreader.cpp
+++ b/src/osd/modules/render/bgfx/chainreader.cpp
@@ -84,16 +84,19 @@ bgfx_chain* chain_reader::read_from_value(const Value& value, std::string prefix
}
// Create targets
+ std::vector<bgfx_target*> target_list;
if (value.HasMember("targets"))
{
const Value& target_array = value["targets"];
// TODO: Move into its own reader
for (UINT32 i = 0; i < target_array.Size(); i++)
{
- if (!target_reader::read_from_value(target_array[i], prefix + "targets[" + std::to_string(i) + "]: ", targets, options, screen_index))
+ bgfx_target* target = target_reader::read_from_value(target_array[i], prefix + "targets[" + std::to_string(i) + "]: ", targets, options, screen_index);
+ if (target == nullptr)
{
return nullptr;
}
+ target_list.push_back(target);
}
}
@@ -113,7 +116,7 @@ bgfx_chain* chain_reader::read_from_value(const Value& value, std::string prefix
}
}
- return new bgfx_chain(name, author, sliders, parameters, entries);
+ return new bgfx_chain(name, author, targets, sliders, parameters, entries, target_list, screen_index);
}
bool chain_reader::validate_parameters(const Value& value, std::string prefix)
diff --git a/src/osd/modules/render/bgfx/effectmanager.cpp b/src/osd/modules/render/bgfx/effectmanager.cpp
index 082ec10793c..2b6951e18c8 100644
--- a/src/osd/modules/render/bgfx/effectmanager.cpp
+++ b/src/osd/modules/render/bgfx/effectmanager.cpp
@@ -9,11 +9,11 @@
//
//============================================================
-#include "emu.h"
-
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
+#include "emu.h"
+
#include <bgfx/bgfxplatform.h>
#include <bgfx/bgfx.h>
#include <bx/readerwriter.h>
diff --git a/src/osd/modules/render/bgfx/inputpair.cpp b/src/osd/modules/render/bgfx/inputpair.cpp
index 38a55d71939..d8777257187 100644
--- a/src/osd/modules/render/bgfx/inputpair.cpp
+++ b/src/osd/modules/render/bgfx/inputpair.cpp
@@ -9,7 +9,7 @@
//
//============================================================
-#include "emu.h"
+#include "emucore.h"
#include "inputpair.h"
#include "texture.h"
diff --git a/src/osd/modules/render/bgfx/shaders/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/default/fs_blit.sc
index a6835ff890d..9af7bcf0ee6 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_blit.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/default/fs_blit.sc
@@ -3,7 +3,7 @@ $input v_color0, v_texcoord0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Samplers
SAMPLER2D(s_tex, 0);
diff --git a/src/osd/modules/render/bgfx/shaders/chains/default/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/default/varying.def.sc
new file mode 100644
index 00000000000..2aa3cb425c0
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/default/varying.def.sc
@@ -0,0 +1,6 @@
+vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
+vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
+
+vec3 a_position : POSITION;
+vec4 a_color0 : COLOR0;
+vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/default/vs_blit.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_blit.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/default/vs_blit.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_blit.sc
new file mode 100644
index 00000000000..9af7bcf0ee6
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_blit.sc
@@ -0,0 +1,14 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+void main()
+{
+ gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/fs_color.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_color.sc
index 65c128a6a2a..faa707f5aa1 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_color.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_color.sc
@@ -6,7 +6,7 @@ $input v_color0, v_texcoord0
// Color Convolution Effect
//-----------------------------------------------------------------------------
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// User-supplied
uniform vec4 u_red_ratios;
diff --git a/src/osd/modules/render/bgfx/shaders/fs_deconverge.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_deconverge.sc
index b23e24951c3..0f7d5c4854f 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_deconverge.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_deconverge.sc
@@ -6,7 +6,7 @@ $input v_color0, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3
// Deconvergence Effect
//-----------------------------------------------------------------------------
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Samplers
SAMPLER2D(s_tex, 0);
diff --git a/src/osd/modules/render/bgfx/shaders/fs_defocus.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_defocus.sc
index c9e76990f3f..77130d98d13 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_defocus.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_defocus.sc
@@ -6,7 +6,7 @@ $input v_color0, v_texcoord0
// Defocus Effect
//-----------------------------------------------------------------------------
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Autos
uniform vec4 u_tex_size0;
diff --git a/src/osd/modules/render/bgfx/shaders/fs_distortion.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc
index 8f4efa04cd3..0f69c288c5b 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_distortion.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc
@@ -6,7 +6,7 @@ $input v_color0, v_texcoord0
// Distortion Effect
//-----------------------------------------------------------------------------
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Autos
uniform vec4 u_swap_xy;
diff --git a/src/osd/modules/render/bgfx/shaders/fs_ntsc_decode.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_ntsc_decode.sc
index 1c6a53fba29..b196674a094 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_ntsc_decode.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_ntsc_decode.sc
@@ -6,7 +6,7 @@ $input v_color0, v_texcoord0
// NTSC Decode Effect
//-----------------------------------------------------------------------------
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Autos
uniform vec4 u_source_dims;
diff --git a/src/osd/modules/render/bgfx/shaders/fs_ntsc_encode.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_ntsc_encode.sc
index 21bbb39240e..61964c10c30 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_ntsc_encode.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_ntsc_encode.sc
@@ -8,7 +8,7 @@ $input v_color0, v_texcoord0
// NB: intentionally wasteful of uniforms in order for easier slider utilization
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Autos
uniform vec4 u_source_dims;
diff --git a/src/osd/modules/render/bgfx/shaders/fs_phosphor.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_phosphor.sc
index 4e752d94137..52b624b644b 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_phosphor.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_phosphor.sc
@@ -3,7 +3,7 @@ $input v_color0, v_texcoord0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// User-supplied
uniform vec4 u_passthrough;
diff --git a/src/osd/modules/render/bgfx/shaders/fs_post.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc
index 27c71a61eba..e4a3a984e6b 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_post.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc
@@ -6,7 +6,7 @@ $input v_color0, v_texcoord0
// Defocus Effect
//-----------------------------------------------------------------------------
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Autos
uniform vec4 u_swap_xy;
diff --git a/src/osd/modules/render/bgfx/shaders/fs_prescale.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_prescale.sc
index 1d8370dacf4..e17d867b621 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_prescale.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_prescale.sc
@@ -3,7 +3,7 @@ $input v_color0, v_texcoord0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Samplers
SAMPLER2D(s_tex, 0);
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hlsl/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/varying.def.sc
new file mode 100644
index 00000000000..53fe40d0b8a
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/varying.def.sc
@@ -0,0 +1,9 @@
+vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
+vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
+vec2 v_texcoord1 : TEXCOORD1 = vec2(0.0, 0.0);
+vec2 v_texcoord2 : TEXCOORD2 = vec2(0.0, 0.0);
+vec2 v_texcoord3 : TEXCOORD3 = vec2(0.0, 0.0);
+
+vec3 a_position : POSITION;
+vec4 a_color0 : COLOR0;
+vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_blit.sc
new file mode 100644
index 00000000000..405ef8feb3b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_blit.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/vs_color.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_color.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_color.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_color.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/shaders/vs_deconverge.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_deconverge.sc
index b714f84e4a6..b77d85d1ea8 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_deconverge.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_deconverge.sc
@@ -4,7 +4,7 @@ $output v_color0, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Autos
uniform vec4 u_source_size;
diff --git a/src/osd/modules/render/bgfx/shaders/vs_defocus.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_defocus.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_defocus.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_defocus.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/shaders/vs_distortion.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_distortion.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_distortion.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_distortion.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/shaders/vs_ntsc_decode.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_ntsc_decode.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_ntsc_decode.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_ntsc_decode.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/shaders/vs_ntsc_encode.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_ntsc_encode.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_ntsc_encode.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_ntsc_encode.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/shaders/vs_phosphor.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_phosphor.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_phosphor.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_phosphor.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/shaders/vs_post.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_post.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_post.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_post.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/shaders/vs_prescale.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_prescale.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_prescale.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/vs_prescale.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/shaders/chains/unfiltered/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/unfiltered/fs_blit.sc
new file mode 100644
index 00000000000..9af7bcf0ee6
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/unfiltered/fs_blit.sc
@@ -0,0 +1,14 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+void main()
+{
+ gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/unfiltered/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/unfiltered/varying.def.sc
new file mode 100644
index 00000000000..2aa3cb425c0
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/unfiltered/varying.def.sc
@@ -0,0 +1,6 @@
+vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
+vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
+
+vec3 a_position : POSITION;
+vec4 a_color0 : COLOR0;
+vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/unfiltered/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/unfiltered/vs_blit.sc
new file mode 100644
index 00000000000..405ef8feb3b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/unfiltered/vs_blit.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/fs_gui.sc b/src/osd/modules/render/bgfx/shaders/fs_gui.sc
index a6285212d2f..ab1bff59dee 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_gui.sc
+++ b/src/osd/modules/render/bgfx/shaders/fs_gui.sc
@@ -3,7 +3,7 @@ $input v_color0, v_texcoord0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Samplers
SAMPLER2D(s_tex, 0);
diff --git a/src/osd/modules/render/bgfx/shaders/fs_screen.sc b/src/osd/modules/render/bgfx/shaders/fs_screen.sc
index d0eaa170d49..52dac92785c 100644
--- a/src/osd/modules/render/bgfx/shaders/fs_screen.sc
+++ b/src/osd/modules/render/bgfx/shaders/fs_screen.sc
@@ -3,7 +3,7 @@ $input v_color0, v_texcoord0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
// Samplers
SAMPLER2D(s_tex, 0);
diff --git a/src/osd/modules/render/bgfx/shaders/makefile b/src/osd/modules/render/bgfx/shaders/makefile
index 737ca43554b..e5ee052ab31 100644
--- a/src/osd/modules/render/bgfx/shaders/makefile
+++ b/src/osd/modules/render/bgfx/shaders/makefile
@@ -1,13 +1,29 @@
BGFX_DIR=../../../../../../3rdparty/bgfx
-RUNTIME_DIR=../../../../../..
+RUNTIME_DIR=../../../../../../bgfx
BUILD_DIR=../../../../../../build
-include $(BGFX_DIR)/scripts/shader.mk
+include shader.mk
-rebuild:
+SUBDIRS := $(patsubst .,,$(patsubst ./,,$(shell find . -type d)))
+
+
+rebuild: main $(SUBDIRS)
+
+$(SUBDIRS):
+ @echo $@
+ @make -s --no-print-directory TARGET=0 SHADERS_DIR=$@/ clean all
+ @make -s --no-print-directory TARGET=1 SHADERS_DIR=$@/ clean all
+ @make -s --no-print-directory TARGET=2 SHADERS_DIR=$@/ clean all
+ @make -s --no-print-directory TARGET=3 SHADERS_DIR=$@/ clean all
+ @make -s --no-print-directory TARGET=4 SHADERS_DIR=$@/ clean all
+ @make -s --no-print-directory TARGET=5 SHADERS_DIR=$@/ clean all
+
+main:
@make -s --no-print-directory TARGET=0 clean all
@make -s --no-print-directory TARGET=1 clean all
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all
+
+.PHONY: main rebuild $(SUBDIRS)
diff --git a/src/osd/modules/render/bgfx/shaders/shader.mk b/src/osd/modules/render/bgfx/shaders/shader.mk
new file mode 100644
index 00000000000..6e6730b5c29
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/shader.mk
@@ -0,0 +1,147 @@
+#
+# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
+# License: http://www.opensource.org/licenses/BSD-2-Clause
+#
+
+THISDIR:=../../../../../../3rdparty/bgfx/scripts
+include $(THISDIR)/tools.mk
+
+# Define SHADERS_DIR if your shader files are in a different dir than the makefile including this.
+# Notice: If defined, SHADERS_DIR should end with dir slash '/'.
+# Example:
+# SHADERS_DIR=shader_files/
+
+ifeq ($(SHADERS_DIR), "./")
+ SHADERS_DIR:=""
+endif
+
+ifndef TARGET
+.PHONY: all
+all:
+ @echo Usage: make TARGET=# [clean, all, rebuild]
+ @echo " TARGET=0 (hlsl - dx9)"
+ @echo " TARGET=1 (hlsl - dx11)"
+ @echo " TARGET=2 (glsl - nacl)"
+ @echo " TARGET=3 (glsl - android)"
+ @echo " TARGET=4 (glsl - linux)"
+ @echo " TARGET=5 (metal - OSX/iOS)"
+ @echo " VERBOSE=1 show build commands."
+else
+
+ifeq ($(TARGET), 0)
+VS_FLAGS=--platform windows -p vs_3_0 -O 3
+FS_FLAGS=--platform windows -p ps_3_0 -O 3
+SHADER_PATH=shaders/dx9/$(SHADERS_DIR)
+else
+ifeq ($(TARGET), 1)
+VS_FLAGS=--platform windows -p vs_4_0 -O 3
+FS_FLAGS=--platform windows -p ps_4_0 -O 3
+CS_FLAGS=--platform windows -p cs_5_0 -O 1
+SHADER_PATH=shaders/dx11/$(SHADERS_DIR)
+else
+ifeq ($(TARGET), 2)
+VS_FLAGS=--platform nacl
+FS_FLAGS=--platform nacl
+SHADER_PATH=shaders/gles/$(SHADERS_DIR)
+else
+ifeq ($(TARGET), 3)
+VS_FLAGS=--platform android
+FS_FLAGS=--platform android
+CS_FLAGS=--platform android
+SHADER_PATH=shaders/gles/$(SHADERS_DIR)
+else
+ifeq ($(TARGET), 4)
+VS_FLAGS=--platform linux -p 120
+FS_FLAGS=--platform linux -p 120
+CS_FLAGS=--platform linux -p 430
+SHADER_PATH=shaders/glsl/$(SHADERS_DIR)
+else
+ifeq ($(TARGET), 5)
+VS_FLAGS=--platform osx -p metal
+FS_FLAGS=--platform osx -p metal
+CS_FLAGS=--platform osx -p metal
+SHADER_PATH=shaders/metal/$(SHADERS_DIR)
+endif
+endif
+endif
+endif
+endif
+endif
+
+THISDIR := $(dir $(lastword $(MAKEFILE_LIST)))
+VS_FLAGS+=-i $(THISDIR)../src/;$(THISDIR)../examples/common/
+FS_FLAGS+=-i $(THISDIR)../src/;$(THISDIR)../examples/common/
+CS_FLAGS+=-i $(THISDIR)../src/$(THISDIR)../examples/common/
+
+BUILD_OUTPUT_DIR=$(addprefix ./, $(RUNTIME_DIR)/$(SHADER_PATH))
+BUILD_INTERMEDIATE_DIR=$(addprefix $(BUILD_DIR)/, $(SHADER_PATH))
+
+VS_SOURCES=$(notdir $(wildcard $(addprefix $(SHADERS_DIR), vs_*.sc)))
+VS_DEPS=$(addprefix $(BUILD_INTERMEDIATE_DIR)/,$(addsuffix .bin.d, $(basename $(notdir $(VS_SOURCES)))))
+
+FS_SOURCES=$(notdir $(wildcard $(addprefix $(SHADERS_DIR), fs_*.sc)))
+FS_DEPS=$(addprefix $(BUILD_INTERMEDIATE_DIR)/,$(addsuffix .bin.d, $(basename $(notdir $(FS_SOURCES)))))
+
+CS_SOURCES=$(notdir $(wildcard $(addprefix $(SHADERS_DIR), cs_*.sc)))
+CS_DEPS=$(addprefix $(BUILD_INTERMEDIATE_DIR)/,$(addsuffix .bin.d, $(basename $(notdir $(CS_SOURCES)))))
+
+VS_BIN = $(addprefix $(BUILD_INTERMEDIATE_DIR)/, $(addsuffix .bin, $(basename $(notdir $(VS_SOURCES)))))
+FS_BIN = $(addprefix $(BUILD_INTERMEDIATE_DIR)/, $(addsuffix .bin, $(basename $(notdir $(FS_SOURCES)))))
+CS_BIN = $(addprefix $(BUILD_INTERMEDIATE_DIR)/, $(addsuffix .bin, $(basename $(notdir $(CS_SOURCES)))))
+
+BIN = $(VS_BIN) $(FS_BIN)
+ASM = $(VS_ASM) $(FS_ASM)
+
+ifeq ($(TARGET), 1)
+BIN += $(CS_BIN)
+ASM += $(CS_ASM)
+else
+ifeq ($(TARGET), 3)
+BIN += $(CS_BIN)
+ASM += $(CS_ASM)
+else
+ifeq ($(TARGET), 4)
+BIN += $(CS_BIN)
+ASM += $(CS_ASM)
+endif
+endif
+endif
+
+$(BUILD_INTERMEDIATE_DIR)/vs_%.bin : $(SHADERS_DIR)vs_%.sc
+ @echo [$(<)]
+ $(SILENT) $(SHADERC) $(VS_FLAGS) --type vertex --depends -o $(@) -f $(<) --disasm
+ $(SILENT) cp $(@) $(BUILD_OUTPUT_DIR)/$(@F)
+
+$(BUILD_INTERMEDIATE_DIR)/fs_%.bin : $(SHADERS_DIR)fs_%.sc
+ @echo [$(<)]
+ $(SILENT) $(SHADERC) $(FS_FLAGS) --type fragment --depends -o $(@) -f $(<) --disasm
+ $(SILENT) cp $(@) $(BUILD_OUTPUT_DIR)/$(@F)
+
+$(BUILD_INTERMEDIATE_DIR)/cs_%.bin : $(SHADERS_DIR)cs_%.sc
+ @echo [$(<)]
+ $(SILENT) $(SHADERC) $(CS_FLAGS) --type compute --depends -o $(@) -f $(<) --disasm
+ $(SILENT) cp $(@) $(BUILD_OUTPUT_DIR)/$(@F)
+
+.PHONY: all
+all: dirs $(BIN)
+ @echo Target $(SHADER_PATH)
+
+.PHONY: clean
+clean:
+ @echo Cleaning...
+ @-rm -vf $(BIN)
+ @-$(call CMD_RMDIR,$(BUILD_INTERMEDIATE_DIR))
+
+.PHONY: dirs
+dirs:
+ @-$(call CMD_MKDIR,$(BUILD_INTERMEDIATE_DIR))
+ @-$(call CMD_MKDIR,$(BUILD_OUTPUT_DIR))
+
+.PHONY: rebuild
+rebuild: clean all
+
+endif # TARGET
+
+-include $(VS_DEPS)
+-include $(FS_DEPS)
+-include $(CS_DEPS)
diff --git a/src/osd/modules/render/bgfx/shaders/varying.def.sc b/src/osd/modules/render/bgfx/shaders/varying.def.sc
index 4bbc09efebe..2aa3cb425c0 100644
--- a/src/osd/modules/render/bgfx/shaders/varying.def.sc
+++ b/src/osd/modules/render/bgfx/shaders/varying.def.sc
@@ -1,9 +1,5 @@
vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec2 v_texcoord1 : TEXCOORD1 = vec2(0.0, 0.0);
-vec2 v_texcoord2 : TEXCOORD2 = vec2(0.0, 0.0);
-vec2 v_texcoord3 : TEXCOORD3 = vec2(0.0, 0.0);
-vec3 v_pos : TEXCOORD3 = vec3(0.0, 0.0, 0.0);
vec3 a_position : POSITION;
vec4 a_color0 : COLOR0;
diff --git a/src/osd/modules/render/bgfx/shaders/vs_gui.sc b/src/osd/modules/render/bgfx/shaders/vs_gui.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_gui.sc
+++ b/src/osd/modules/render/bgfx/shaders/vs_gui.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/shaders/vs_screen.sc b/src/osd/modules/render/bgfx/shaders/vs_screen.sc
index fd37320eefb..405ef8feb3b 100644
--- a/src/osd/modules/render/bgfx/shaders/vs_screen.sc
+++ b/src/osd/modules/render/bgfx/shaders/vs_screen.sc
@@ -4,7 +4,7 @@ $output v_texcoord0, v_color0
// license:BSD-3-Clause
// copyright-holders:Dario Manesku
-#include "../../../../../../3rdparty/bgfx/examples/common/common.sh"
+#include "common.sh"
void main()
{
diff --git a/src/osd/modules/render/bgfx/slider.cpp b/src/osd/modules/render/bgfx/slider.cpp
index cd27c973451..94e9c26ee0c 100644
--- a/src/osd/modules/render/bgfx/slider.cpp
+++ b/src/osd/modules/render/bgfx/slider.cpp
@@ -42,7 +42,7 @@ bgfx_slider::~bgfx_slider()
{
}
-static INT32 update_trampoline(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 update_trampoline(running_machine &machine, void *arg, int /*id*/, std::string *str, INT32 newval)
{
if (arg != nullptr)
{
@@ -62,7 +62,7 @@ slider_state* bgfx_slider::create_core_slider(running_machine& machine)
state->incval = m_step;
state->update = update_trampoline;
state->arg = this;
- state->id = 0; // fixme
+ state->id = 0;
strcpy(state->description, m_description.c_str());
return state;
diff --git a/src/osd/modules/render/bgfx/statereader.cpp b/src/osd/modules/render/bgfx/statereader.cpp
index defb4c65296..91f3bd539bd 100644
--- a/src/osd/modules/render/bgfx/statereader.cpp
+++ b/src/osd/modules/render/bgfx/statereader.cpp
@@ -9,6 +9,8 @@
#include "statereader.h"
+#include <math.h>
+
uint64_t state_reader::get_enum_from_value(const Value& value, std::string name, const uint64_t default_value, const string_to_enum* enums, const int count)
{
if (value.HasMember(name.c_str()))
diff --git a/src/osd/modules/render/bgfx/statereader.h b/src/osd/modules/render/bgfx/statereader.h
index 4881120fb3b..9542116624a 100644
--- a/src/osd/modules/render/bgfx/statereader.h
+++ b/src/osd/modules/render/bgfx/statereader.h
@@ -12,10 +12,11 @@
#ifndef __DRAWBGFX_STATE_READER__
#define __DRAWBGFX_STATE_READER__
-#include "emu.h"
+#include <rapidjson/document.h>
#include <string>
-#include "rapidjson/document.h"
+
+#include "osdcore.h"
using namespace rapidjson;
diff --git a/src/osd/modules/render/bgfx/target.cpp b/src/osd/modules/render/bgfx/target.cpp
index f39a4e3cfdb..4d1d3ea6b2a 100644
--- a/src/osd/modules/render/bgfx/target.cpp
+++ b/src/osd/modules/render/bgfx/target.cpp
@@ -6,7 +6,7 @@
//
//============================================================
-#include "emu.h"
+#include "emucore.h"
#include "target.h"
diff --git a/src/osd/modules/render/bgfx/targetmanager.cpp b/src/osd/modules/render/bgfx/targetmanager.cpp
index 6350829a4ed..e17b0e6915a 100644
--- a/src/osd/modules/render/bgfx/targetmanager.cpp
+++ b/src/osd/modules/render/bgfx/targetmanager.cpp
@@ -48,14 +48,26 @@ target_manager::~target_manager()
bgfx_target* target_manager::create_target(std::string name, bgfx::TextureFormat::Enum format, uint16_t width, uint16_t height, uint32_t style, bool double_buffer, bool filter, uint16_t scale, uint32_t screen)
{
bgfx_target* target = new bgfx_target(name, format, width, height, style, double_buffer, filter, scale, screen);
+ std::string full_name = name + std::to_string(screen);
- m_targets[name + std::to_string(screen)] = target;
+ m_targets[full_name] = target;
- m_textures.add_provider(name + std::to_string(screen), target);
+ m_textures.add_provider(full_name, target);
return target;
}
+void target_manager::destroy_target(std::string name, uint32_t screen)
+{
+ std::string full_name = name + std::to_string(screen);
+ if (m_targets[full_name] != nullptr)
+ {
+ delete m_targets[full_name];
+ m_targets[full_name] = nullptr;
+ m_textures.remove_provider(full_name);
+ }
+}
+
bgfx_target* target_manager::create_backbuffer(void *handle, uint16_t width, uint16_t height)
{
bgfx_target* target = new bgfx_target(handle, width, height);
@@ -161,3 +173,15 @@ void target_manager::create_target_if_nonexistent(uint32_t screen, std::string n
create_target(name, bgfx::TextureFormat::RGBA8, width, height, style, double_buffered, filter, 1, screen);
}
+
+uint16_t target_manager::width(uint32_t style, uint32_t screen)
+{
+ std::vector<osd_dim>& sizes = style == TARGET_STYLE_GUEST ? m_guest_dims : m_native_dims;
+ return screen < sizes.size() ? sizes[screen].width() : 0;
+}
+
+uint16_t target_manager::height(uint32_t style, uint32_t screen)
+{
+ std::vector<osd_dim>& sizes = style == TARGET_STYLE_GUEST ? m_guest_dims : m_native_dims;
+ return screen < sizes.size() ? sizes[screen].height() : 0;
+}
diff --git a/src/osd/modules/render/bgfx/targetmanager.h b/src/osd/modules/render/bgfx/targetmanager.h
index fe3ff2ef22f..04ac4252f9d 100644
--- a/src/osd/modules/render/bgfx/targetmanager.h
+++ b/src/osd/modules/render/bgfx/targetmanager.h
@@ -31,6 +31,7 @@ public:
~target_manager();
bgfx_target* create_target(std::string name, bgfx::TextureFormat::Enum format, uint16_t width, uint16_t height, uint32_t style, bool double_buffer, bool filter, uint16_t scale, uint32_t screen);
+ void destroy_target(std::string name, uint32_t screen);
bgfx_target* create_backbuffer(void *handle, uint16_t width, uint16_t height);
void update_target_sizes(uint32_t screen, uint16_t width, uint16_t height, uint32_t style);
@@ -38,6 +39,8 @@ public:
// Getters
bgfx_target* target(uint32_t screen, std::string name);
+ uint16_t width(uint32_t style, uint32_t screen);
+ uint16_t height(uint32_t style, uint32_t screen);
private:
void rebuild_targets(uint32_t screen, uint32_t style);
diff --git a/src/osd/modules/render/bgfx/targetreader.cpp b/src/osd/modules/render/bgfx/targetreader.cpp
index 26a2e21bfc3..c63d05ec015 100644
--- a/src/osd/modules/render/bgfx/targetreader.cpp
+++ b/src/osd/modules/render/bgfx/targetreader.cpp
@@ -21,11 +21,11 @@ const target_reader::string_to_enum target_reader::STYLE_NAMES[target_reader::ST
{ "custom", TARGET_STYLE_CUSTOM }
};
-bool target_reader::read_from_value(const Value& value, std::string prefix, target_manager& targets, osd_options& options, uint32_t screen_index)
+bgfx_target* target_reader::read_from_value(const Value& value, std::string prefix, target_manager& targets, osd_options& options, uint32_t screen_index)
{
if (!validate_parameters(value, prefix))
{
- return false;
+ return nullptr;
}
std::string target_name = value["name"].GetString();
@@ -43,21 +43,24 @@ bool target_reader::read_from_value(const Value& value, std::string prefix, targ
switch (mode)
{
case TARGET_STYLE_GUEST:
- break;
+ width = targets.width(TARGET_STYLE_GUEST, screen_index);
+ height = targets.height(TARGET_STYLE_GUEST, screen_index);
+ break;
case TARGET_STYLE_NATIVE:
- break;
+ width = targets.width(TARGET_STYLE_NATIVE, screen_index);
+ height = targets.height(TARGET_STYLE_NATIVE, screen_index);
+ break;
case TARGET_STYLE_CUSTOM:
- if (!READER_CHECK(value.HasMember("width"), (prefix + "Target '" + target_name + "': Must have numeric value 'width'\n").c_str())) return false;
- if (!READER_CHECK(value["width"].IsNumber(), (prefix + "Target '" + target_name + "': Value 'width' must be a number\n").c_str())) return false;
- if (!READER_CHECK(value.HasMember("height"), (prefix + "Target '" + target_name + "': Must have numeric value 'height'\n").c_str())) return false;
- if (!READER_CHECK(value["height"].IsNumber(), (prefix + "Target '" + target_name + "': Value 'height' must be a number\n").c_str())) return false;
+ if (!READER_CHECK(value.HasMember("width"), (prefix + "Target '" + target_name + "': Must have numeric value 'width'\n").c_str())) return nullptr;
+ if (!READER_CHECK(value["width"].IsNumber(), (prefix + "Target '" + target_name + "': Value 'width' must be a number\n").c_str())) return nullptr;
+ if (!READER_CHECK(value.HasMember("height"), (prefix + "Target '" + target_name + "': Must have numeric value 'height'\n").c_str())) return nullptr;
+ if (!READER_CHECK(value["height"].IsNumber(), (prefix + "Target '" + target_name + "': Value 'height' must be a number\n").c_str())) return nullptr;
width = uint16_t(value["width"].GetDouble());
height = uint16_t(value["height"].GetDouble());
break;
}
- targets.create_target(target_name, bgfx::TextureFormat::RGBA8, width, height, mode, double_buffer, bilinear, scale, screen_index);
- return true;
+ return targets.create_target(target_name, bgfx::TextureFormat::RGBA8, width, height, mode, double_buffer, bilinear, scale, screen_index);
}
bool target_reader::validate_parameters(const Value& value, std::string prefix)
diff --git a/src/osd/modules/render/bgfx/targetreader.h b/src/osd/modules/render/bgfx/targetreader.h
index 78e97665f5f..abbc4f9a805 100644
--- a/src/osd/modules/render/bgfx/targetreader.h
+++ b/src/osd/modules/render/bgfx/targetreader.h
@@ -15,13 +15,14 @@
#include "statereader.h"
+class bgfx_target;
class target_manager;
class osd_options;
class target_reader : public state_reader
{
public:
- static bool read_from_value(const Value& value, std::string prefix, target_manager& targets, osd_options& options, uint32_t screen_index);
+ static bgfx_target* read_from_value(const Value& value, std::string prefix, target_manager& targets, osd_options& options, uint32_t screen_index);
private:
static bool validate_parameters(const Value& value, std::string prefix);
diff --git a/src/osd/modules/render/bgfx/texture.cpp b/src/osd/modules/render/bgfx/texture.cpp
index bd69e18e424..c698f7a9ac5 100644
--- a/src/osd/modules/render/bgfx/texture.cpp
+++ b/src/osd/modules/render/bgfx/texture.cpp
@@ -6,7 +6,7 @@
//
//============================================================
-#include "emu.h"
+#include <string.h>
#include "texture.h"
diff --git a/src/osd/modules/render/bgfx/texturemanager.cpp b/src/osd/modules/render/bgfx/texturemanager.cpp
index 753585fe3f3..0b2d0bb9969 100644
--- a/src/osd/modules/render/bgfx/texturemanager.cpp
+++ b/src/osd/modules/render/bgfx/texturemanager.cpp
@@ -62,23 +62,25 @@ bgfx_texture* texture_manager::create_png_texture(std::string path, std::string
return nullptr;
}
- uint8_t *texture_data = new uint8_t[bitmap.width() * bitmap.height() * 4];
-
- uint32_t width = bitmap.width();
- uint32_t height = bitmap.height();
- uint32_t rowpixels = bitmap.rowpixels();
- void *base = bitmap.raw_pixptr(0);
- for (int y = 0; y < height; y++) {
- copy_util::copyline_argb32(reinterpret_cast<UINT32 *>(texture_data) + y * width, reinterpret_cast<UINT32 *>(base) + y * rowpixels, width, nullptr);
+ uint8_t *data = new uint8_t[bitmap.width() * bitmap.height() * 4];
+ UINT32 *data32 = reinterpret_cast<UINT32 *>(data);
+
+ const uint32_t width = bitmap.width();
+ const uint32_t height = bitmap.height();
+ const uint32_t rowpixels = bitmap.rowpixels();
+ UINT32* base = reinterpret_cast<UINT32 *>(bitmap.raw_pixptr(0));
+ for (int y = 0; y < height; y++)
+ {
+ copy_util::copyline_argb32(data32 + y * width, base + y * rowpixels, width, nullptr);
}
if (screen >= 0)
{
texture_name += std::to_string(screen);
}
- bgfx_texture* texture = create_texture(texture_name, bgfx::TextureFormat::RGBA8, width, height, texture_data, flags);
+ bgfx_texture* texture = create_texture(texture_name, bgfx::TextureFormat::RGBA8, width, height, data, flags);
- delete[] texture_data;
+ delete [] data;
return texture;
}
@@ -106,3 +108,16 @@ bgfx_texture_handle_provider* texture_manager::provider(std::string name)
return nullptr;
}
+
+void texture_manager::remove_provider(std::string name, bool delete_provider)
+{
+ if (provider(name) != nullptr)
+ {
+ if (delete_provider)
+ {
+ delete m_textures[name];
+ }
+ m_textures[name] = nullptr;
+ }
+}
+
diff --git a/src/osd/modules/render/bgfx/texturemanager.h b/src/osd/modules/render/bgfx/texturemanager.h
index 20da9ff8b3e..117fc36c502 100644
--- a/src/osd/modules/render/bgfx/texturemanager.h
+++ b/src/osd/modules/render/bgfx/texturemanager.h
@@ -30,6 +30,7 @@ public:
bgfx_texture* create_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, void* data = nullptr, uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP);
bgfx_texture* create_png_texture(std::string path, std::string file_name, std::string texture_name, uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP, uint32_t screen = -1);
void add_provider(std::string name, bgfx_texture_handle_provider* texture);
+ void remove_provider(std::string name, bool delete_provider = false);
// Getters
bgfx::TextureHandle handle(std::string name);
diff --git a/src/osd/modules/render/bgfxutil.cpp b/src/osd/modules/render/bgfxutil.cpp
new file mode 100644
index 00000000000..a5099534220
--- /dev/null
+++ b/src/osd/modules/render/bgfxutil.cpp
@@ -0,0 +1,67 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// bgfxutil.cpp - BGFX renderer helper utils
+//
+//============================================================
+
+// MAMEOS headers
+#include "emu.h"
+#include "bgfxutil.h"
+#include "copyutil.h"
+
+#include "render.h"
+
+
+const bgfx::Memory* bgfx_util::mame_texture_data_to_bgfx_texture_data(UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base)
+{
+ const bgfx::Memory* mem = bgfx::alloc(width * height * 4);
+ UINT32* data = reinterpret_cast<UINT32*>(mem->data);
+ UINT16* src16 = reinterpret_cast<UINT16*>(base);
+ UINT32* src32 = reinterpret_cast<UINT32*>(base);
+
+ for (int y = 0; y < height; y++)
+ {
+ UINT32* dst_line = data + y * width;
+ UINT16* src_line16 = src16 + y * rowpixels;
+ UINT32* src_line32 = src32 + y * rowpixels;
+ switch (format)
+ {
+ case PRIMFLAG_TEXFORMAT(TEXFORMAT_PALETTE16):
+ copy_util::copyline_palette16(dst_line, src_line16, width, palette);
+ break;
+ case PRIMFLAG_TEXFORMAT(TEXFORMAT_PALETTEA16):
+ copy_util::copyline_palettea16(dst_line, src_line16, width, palette);
+ break;
+ case PRIMFLAG_TEXFORMAT(TEXFORMAT_YUY16):
+ copy_util::copyline_yuy16_to_argb(dst_line, src_line16, width, palette, 1);
+ break;
+ case PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32):
+ copy_util::copyline_argb32(dst_line, src_line32, width, palette);
+ break;
+ case PRIMFLAG_TEXFORMAT(TEXFORMAT_RGB32):
+ copy_util::copyline_rgb32(dst_line, src_line32, width, palette);
+ break;
+ default:
+ break;
+ }
+ }
+ return mem;
+}
+
+uint64_t bgfx_util::get_blend_state(UINT32 blend)
+{
+ switch (blend)
+ {
+ case BLENDMODE_ALPHA:
+ return BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA);
+ case BLENDMODE_RGB_MULTIPLY:
+ return BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_DST_COLOR, BGFX_STATE_BLEND_ZERO);
+ case BLENDMODE_ADD:
+ return BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_ONE);
+ default:
+ return 0L;
+ }
+ return 0L;
+}
diff --git a/src/osd/modules/render/bgfxutil.h b/src/osd/modules/render/bgfxutil.h
new file mode 100644
index 00000000000..0a776755dbf
--- /dev/null
+++ b/src/osd/modules/render/bgfxutil.h
@@ -0,0 +1,18 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+#pragma once
+
+#ifndef __RENDER_BGFX_UTIL__
+#define __RENDER_BGFX_UTIL__
+
+#include <bgfx/bgfx.h>
+
+/* sdl_info is the information about SDL for the current screen */
+class bgfx_util
+{
+public:
+ static const bgfx::Memory* mame_texture_data_to_bgfx_texture_data(UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base);
+ static uint64_t get_blend_state(UINT32 blend);
+};
+
+#endif // __RENDER_BGFX_UTIL__ \ No newline at end of file
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp
index 60bac93db84..4cf8c96a164 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.cpp
+++ b/src/osd/modules/render/d3d/d3dhlsl.cpp
@@ -23,6 +23,7 @@
#include "aviio.h"
#include "png.h"
#include "screen.h"
+#include "ui/ui.h"
// MAMEOS headers
#include "winmain.h"
@@ -37,7 +38,6 @@
// GLOBALS
//============================================================
-static slider_state *g_slider_list;
static osd_file::error open_next(renderer_d3d9 *d3d, emu_file &file, const char *templ, const char *extension, int idx);
//============================================================
@@ -86,7 +86,7 @@ shaders::shaders() :
shaders::~shaders()
{
- for (slider* slider : sliders)
+ for (slider* slider : internal_sliders)
{
delete slider;
}
@@ -400,7 +400,7 @@ void shaders::end_avi_recording()
// shaders::toggle
//============================================================
-void shaders::toggle()
+void shaders::toggle(std::vector<ui_menu_item>& sliders)
{
if (master_enable)
{
@@ -427,7 +427,7 @@ void shaders::toggle()
if (!initialized)
{
// re-create shader resources after renderer resources
- bool failed = create_resources(false);
+ bool failed = create_resources(false, sliders);
if (failed)
{
master_enable = false;
@@ -827,7 +827,7 @@ void shaders::init_fsfx_quad(void *vertbuf)
// shaders::create_resources
//============================================================
-int shaders::create_resources(bool reset)
+int shaders::create_resources(bool reset, std::vector<ui_menu_item>& sliders)
{
if (!master_enable || !d3dintf->post_fx_available)
{
@@ -1003,7 +1003,8 @@ int shaders::create_resources(bool reset)
initialized = true;
- init_slider_list();
+ std::vector<ui_menu_item> my_sliders = init_slider_list();
+ sliders.insert(sliders.end(), my_sliders.begin(), my_sliders.end());
return 0;
}
@@ -1789,7 +1790,7 @@ d3d_render_target* shaders::get_texture_target(render_primitive *prim, texture_i
return nullptr;
}
- bool swap_xy = d3d->swap_xy();
+ bool swap_xy = d3d->window().swap_xy();
int target_width = swap_xy
? static_cast<int>(prim->get_quad_height() + 0.5f)
: static_cast<int>(prim->get_quad_width() + 0.5f);
@@ -1944,7 +1945,7 @@ bool shaders::register_texture(render_primitive *prim, texture_info *texture)
return false;
}
- bool swap_xy = d3d->swap_xy();
+ bool swap_xy = d3d->window().swap_xy();
int target_width = swap_xy
? static_cast<int>(prim->get_quad_height() + 0.5f)
: static_cast<int>(prim->get_quad_width() + 0.5f);
@@ -2103,8 +2104,6 @@ void shaders::delete_resources(bool reset)
}
shadow_bitmap.reset();
-
- g_slider_list = nullptr;
}
@@ -2226,7 +2225,7 @@ INT32 slider::update(std::string *str, INT32 newval)
return 0;
}
-static INT32 slider_update_trampoline(running_machine &machine, void *arg, std::string *str, INT32 newval)
+static INT32 slider_update_trampoline(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
if (arg != nullptr)
{
@@ -2379,10 +2378,6 @@ slider_desc shaders::s_sliders[] =
};
-//============================================================
-// init_slider_list
-//============================================================
-
void *shaders::get_slider_option(int id, int index)
{
switch (id)
@@ -2452,15 +2447,15 @@ void *shaders::get_slider_option(int id, int index)
return nullptr;
}
-void shaders::init_slider_list()
+std::vector<ui_menu_item> shaders::init_slider_list()
{
- if (!master_enable || !d3dintf->post_fx_available)
+ std::vector<ui_menu_item> sliders;
+
+ for (slider* slider : internal_sliders)
{
- g_slider_list = nullptr;
+ delete slider;
}
-
- slider_state *listhead = nullptr;
- slider_state **tailptr = &listhead;
+ internal_sliders.clear();
for (int i = 0; s_sliders[i].name != nullptr; i++)
{
@@ -2488,7 +2483,7 @@ void shaders::init_slider_list()
for (int j = 0; j < count; j++)
{
slider* slider_arg = new slider(desc, get_slider_option(desc->id, j), &options->params_dirty);
- sliders.push_back(slider_arg);
+ internal_sliders.push_back(slider_arg);
std::string name = desc->name;
switch (desc->slider_type)
{
@@ -2507,13 +2502,21 @@ void shaders::init_slider_list()
default:
break;
}
- *tailptr = slider_alloc(*machine, desc->id, name.c_str(), desc->minval, desc->defval, desc->maxval, desc->step, slider_update_trampoline, slider_arg);
- tailptr = &(*tailptr)->next;
+
+ slider_state* core_slider = slider_alloc(*machine, desc->id, name.c_str(), desc->minval, desc->defval, desc->maxval, desc->step, slider_update_trampoline, slider_arg);
+
+ ui_menu_item item;
+ item.text = core_slider->description;
+ item.subtext = "";
+ item.flags = 0;
+ item.ref = core_slider;
+ item.type = ui_menu_item_type::UI_MENU_ITEM_TYPE_SLIDER;
+ sliders.push_back(item);
}
}
}
- g_slider_list = listhead;
+ return sliders;
}
@@ -2617,7 +2620,7 @@ void uniform::update()
case CU_SWAP_XY:
{
- m_shader->set_bool("SwapXY", d3d->swap_xy());
+ m_shader->set_bool("SwapXY", d3d->window().swap_xy());
break;
}
case CU_ORIENTATION_SWAP:
@@ -3052,20 +3055,6 @@ ULONG effect::release()
}
-//============================================================
-// get_slider_list
-//============================================================
-
-slider_state *renderer_d3d9::get_slider_list()
-{
- if (window().m_index > 0)
- {
- return nullptr;
- }
- return g_slider_list;
-}
-
-
// NOTE: The function below is taken directly from src/emu/video.c and should likely be moved into a global helper function.
//-------------------------------------------------
// open_next - open the next non-existing file of
diff --git a/src/osd/modules/render/d3d/d3dhlsl.h b/src/osd/modules/render/d3d/d3dhlsl.h
index 0cf6f0b3de9..e5e6ad600b7 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.h
+++ b/src/osd/modules/render/d3d/d3dhlsl.h
@@ -303,7 +303,7 @@ public:
void init(d3d_base *d3dintf, running_machine *machine, renderer_d3d9 *renderer);
bool enabled() { return master_enable; }
- void toggle();
+ void toggle(std::vector<ui_menu_item>& sliders);
bool vector_enabled() { return master_enable && vector_enable; }
d3d_render_target* get_vector_target(render_primitive *prim);
@@ -338,11 +338,11 @@ public:
void remove_render_target(int source_width, int source_height, UINT32 screen_index, UINT32 page_index);
void remove_render_target(d3d_render_target *rt);
- int create_resources(bool reset);
+ int create_resources(bool reset, std::vector<ui_menu_item>& sliders);
void delete_resources(bool reset);
// slider-related functions
- void init_slider_list();
+ std::vector<ui_menu_item> init_slider_list();
void *get_slider_option(int id, int index = 0);
private:
@@ -438,7 +438,7 @@ private:
d3d_render_target * targethead;
cache_target * cachehead;
- std::vector<slider*> sliders;
+ std::vector<slider*> internal_sliders;
static slider_desc s_sliders[];
static hlsl_options last_options; // last used options
diff --git a/src/osd/modules/render/d3dtarget.h b/src/osd/modules/render/d3dtarget.h
deleted file mode 100644
index 566b1dbdfcd..00000000000
--- a/src/osd/modules/render/d3dtarget.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-//============================================================
-//
-// d3dtarget.h - Direct3D HLSL targets
-//
-//============================================================
-
-#pragma once
-
-#ifndef __D3DTARGET__
-#define __D3DTARGET__
-
-#endif // __D3DTARGET__
diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp
index 85b76864b23..32f45515a08 100644
--- a/src/osd/modules/render/drawbgfx.cpp
+++ b/src/osd/modules/render/drawbgfx.cpp
@@ -28,7 +28,7 @@
#include <algorithm>
#include "drawbgfx.h"
-#include "copyutil.h"
+#include "bgfxutil.h"
#include "bgfx/texturemanager.h"
#include "bgfx/targetmanager.h"
#include "bgfx/shadermanager.h"
@@ -43,6 +43,8 @@
#include "bgfx/slider.h"
#include "bgfx/target.h"
+#include "imgui/imgui.h"
+
//============================================================
// DEBUGGING
//============================================================
@@ -188,8 +190,7 @@ int renderer_bgfx::create()
m_screen_effect[2] = m_effects->effect("screen_multiply");
m_screen_effect[3] = m_effects->effect("screen_add");
- m_chains = new chain_manager(options, *m_textures, *m_targets, *m_effects);
- parse_screen_chains(options.bgfx_screen_chains());
+ m_chains = new chain_manager(window().machine(), options, *m_textures, *m_targets, *m_effects, window().m_index, *this);
m_sliders_dirty = true;
uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP | BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT;
@@ -198,51 +199,9 @@ int renderer_bgfx::create()
memset(m_white, 0xff, sizeof(uint32_t) * 16 * 16);
m_texinfo.push_back(rectangle_packer::packable_rectangle(WHITE_HASH, PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32), 16, 16, 16, nullptr, m_white));
- return 0;
-}
+ imguiCreate();
-//============================================================
-// parse_screen_chains
-//============================================================
-
-void renderer_bgfx::parse_screen_chains(std::string chain_str)
-{
- std::vector<std::vector<std::string>> chains;
- uint32_t length = chain_str.length();
- uint32_t last_start = 0;
- uint32_t win = 0;
- chains.push_back(std::vector<std::string>());
- for (uint32_t i = 0; i < length + 1; i++)
- {
- if (i == length || chain_str[i] == ',' || chain_str[i] == ':')
- {
- chains[win].push_back(chain_str.substr(last_start, i - last_start));
- last_start = i + 1;
- if (chain_str[i] == ':')
- {
- win++;
- chains.push_back(std::vector<std::string>());
- }
- }
- }
-
- for (win = 0; win < chains.size(); win++)
- {
- m_screen_chains.push_back(std::vector<bgfx_chain*>());
- if (win != window().m_index)
- {
- continue;
- }
- for (uint32_t screen = 0; screen < chains[win].size(); screen++)
- {
- bgfx_chain* chain = m_chains->chain(chains[win][screen], window().machine(), win, screen);
- if (chain == nullptr) {
- chains.clear();
- return;
- }
- m_screen_chains[win].push_back(chain);
- }
- }
+ return 0;
}
//============================================================
@@ -261,6 +220,8 @@ renderer_bgfx::~renderer_bgfx()
void renderer_bgfx::exit()
{
+ imguiDestroy();
+
bgfx::shutdown();
s_window_set = false;
}
@@ -376,33 +337,6 @@ void renderer_bgfx::put_packed_quad(render_primitive *prim, UINT32 hash, ScreenV
vertex[5].m_v = v[0];
}
-void renderer_bgfx::process_screen_quad(int screen, render_primitive* prim)
-{
- uint32_t texture_flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP;
- if (video_config.filter == 0)
- {
- texture_flags |= BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT;
- }
-
- uint16_t tex_width(prim->texture.width);
- uint16_t tex_height(prim->texture.height);
-
- const bgfx::Memory* mem = mame_texture_data_to_bgfx_texture_data(prim->flags & PRIMFLAG_TEXFORMAT_MASK,
- tex_width, tex_height, prim->texture.rowpixels, prim->texture.palette, prim->texture.base);
-
- std::string full_name = "screen" + std::to_string(screen);
- bgfx_texture *texture = new bgfx_texture(full_name, bgfx::TextureFormat::RGBA8, tex_width, tex_height, mem);
- m_textures->add_provider(full_name, texture);
-
- m_targets->update_target_sizes(screen, tex_width, tex_height, TARGET_STYLE_GUEST);
-
- screen_chain(screen)->process(prim, s_current_view, screen, *m_textures, window(), get_blend_state(PRIMFLAG_GET_BLENDMODE(prim->flags)));
- s_current_view += screen_chain(screen)->applicable_passes();
-
- m_textures->add_provider(full_name, nullptr);
- delete texture;
-}
-
void renderer_bgfx::render_post_screen_quad(int view, render_primitive* prim, bgfx::TransientVertexBuffer* buffer, int32_t screen)
{
ScreenVertex* vertex = reinterpret_cast<ScreenVertex*>(buffer->data);
@@ -454,9 +388,15 @@ void renderer_bgfx::render_post_screen_quad(int view, render_primitive* prim, bg
vertex[5].m_u = u[0];
vertex[5].m_v = v[0];
+ uint32_t texture_flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP;
+ if (video_config.filter == 0)
+ {
+ texture_flags |= BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT;
+ }
+
UINT32 blend = PRIMFLAG_GET_BLENDMODE(prim->flags);
bgfx::setVertexBuffer(buffer);
- bgfx::setTexture(0, m_screen_effect[blend]->uniform("s_tex")->handle(), m_targets->target(screen, "output")->texture());
+ bgfx::setTexture(0, m_screen_effect[blend]->uniform("s_tex")->handle(), m_targets->target(screen, "output")->texture(), texture_flags);
m_screen_effect[blend]->submit(view);
}
@@ -517,7 +457,7 @@ void renderer_bgfx::render_textured_quad(render_primitive* prim, bgfx::Transient
uint16_t tex_width(prim->texture.width);
uint16_t tex_height(prim->texture.height);
- const bgfx::Memory* mem = mame_texture_data_to_bgfx_texture_data(prim->flags & PRIMFLAG_TEXFORMAT_MASK,
+ const bgfx::Memory* mem = bgfx_util::mame_texture_data_to_bgfx_texture_data(prim->flags & PRIMFLAG_TEXFORMAT_MASK,
tex_width, tex_height, prim->texture.rowpixels, prim->texture.palette, prim->texture.base);
bgfx::TextureHandle texture = bgfx::createTexture2D(tex_width, tex_height, 1, bgfx::TextureFormat::RGBA8, texture_flags, mem);
@@ -721,120 +661,6 @@ uint32_t renderer_bgfx::u32Color(uint32_t r, uint32_t g, uint32_t b, uint32_t a
return (a << 24) | (b << 16) | (g << 8) | r;
}
-const bgfx::Memory* renderer_bgfx::mame_texture_data_to_bgfx_texture_data(UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base)
-{
- const bgfx::Memory* mem = bgfx::alloc(width * height * 4);
- for (int y = 0; y < height; y++)
- {
- switch (format)
- {
- case PRIMFLAG_TEXFORMAT(TEXFORMAT_PALETTE16):
- copy_util::copyline_palette16((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette);
- break;
- case PRIMFLAG_TEXFORMAT(TEXFORMAT_PALETTEA16):
- copy_util::copyline_palettea16((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette);
- break;
- case PRIMFLAG_TEXFORMAT(TEXFORMAT_YUY16):
- copy_util::copyline_yuy16_to_argb((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette, 1);
- break;
- case PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32):
- copy_util::copyline_argb32((UINT32*)mem->data + y * width, (UINT32*)base + y * rowpixels, width, palette);
- break;
- case PRIMFLAG_TEXFORMAT(TEXFORMAT_RGB32):
- copy_util::copyline_rgb32((UINT32*)mem->data + y * width, (UINT32*)base + y * rowpixels, width, palette);
- break;
- default:
- break;
- }
- }
- return mem;
-}
-
-int renderer_bgfx::handle_screen_chains()
-{
- if (m_screen_chains.size() <= window().m_index || m_screen_chains[window().m_index].size() == 0)
- {
- return 0;
- }
-
- window().m_primlist->acquire_lock();
-
- render_primitive *prim = window().m_primlist->first();
-
- // Determine how many post-processing passes are needed
- int screens = 0;
- int total_screen_textures = 0;
- std::vector<void*> bases;
- while (prim != nullptr)
- {
- if (PRIMFLAG_GET_SCREENTEX(prim->flags))
- {
- total_screen_textures++;
- bool found = false;
- for (void* base : bases)
- {
- if (base == prim->texture.base)
- {
- found = true;
- break;
- }
- }
- if (!found)
- {
- screens++;
- bases.push_back(prim->texture.base);
- }
- }
- prim = prim->next();
- }
-
- const uint32_t available_chains = m_screen_chains[window().m_index].size();
- screens = screens >= available_chains ? available_chains : screens;
-
- if (screens > 0)
- {
- m_targets->update_screen_count(screens);
- }
-
- // Process each screen as necessary
- prim = window().m_primlist->first();
- int screen_index = 0;
- while (prim != nullptr)
- {
- if (PRIMFLAG_GET_SCREENTEX(prim->flags))
- {
- if (screen_index >= available_chains)
- {
- break;
- }
- uint16_t screen_width(floor((prim->bounds.x1 - prim->bounds.x0) + 0.5f));
- uint16_t screen_height(floor((prim->bounds.y1 - prim->bounds.y0) + 0.5f));
- m_targets->update_target_sizes(screen_index, screen_width, screen_height, TARGET_STYLE_NATIVE);
- process_screen_quad(screen_index, prim);
- screen_index++;
- }
- prim = prim->next();
- }
-
- window().m_primlist->release_lock();
-
- bgfx::setViewFrameBuffer(s_current_view, BGFX_INVALID_HANDLE);
-
- return s_current_view;
-}
-
-bgfx_chain* renderer_bgfx::screen_chain(int32_t screen)
-{
- if (screen >= m_screen_chains[window().m_index].size())
- {
- return m_screen_chains[window().m_index][m_screen_chains[window().m_index].size() - 1];
- }
- else
- {
- return m_screen_chains[window().m_index][screen];
- }
-}
-
int renderer_bgfx::draw(int update)
{
int window_index = window().m_index;
@@ -851,7 +677,9 @@ int renderer_bgfx::draw(int update)
m_width[window_index] = wdim.width();
m_height[window_index] = wdim.height();
- handle_screen_chains();
+ window().m_primlist->acquire_lock();
+ s_current_view += m_chains->handle_screen_chains(s_current_view, window().m_primlist->first(), window());
+ window().m_primlist->release_lock();
bool skip_frame = update_dimensions();
if (skip_frame)
@@ -1079,7 +907,7 @@ renderer_bgfx::buffer_status renderer_bgfx::buffer_primitives(bool atlas_valid,
return BUFFER_PRE_FLUSH;
}
- if (PRIMFLAG_GET_SCREENTEX((*prim)->flags) && m_screen_chains.size() > window().m_index && screen < m_screen_chains[window().m_index].size())
+ if (PRIMFLAG_GET_SCREENTEX((*prim)->flags) && m_chains->has_applicable_chain(screen))
{
#if SCENE_VIEW
setup_view(s_current_view, true);
@@ -1126,26 +954,10 @@ renderer_bgfx::buffer_status renderer_bgfx::buffer_primitives(bool atlas_valid,
return BUFFER_FLUSH;
}
-uint64_t renderer_bgfx::get_blend_state(UINT32 blend)
-{
- switch (blend)
- {
- case BLENDMODE_ALPHA:
- return BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA);
- case BLENDMODE_RGB_MULTIPLY:
- return BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_DST_COLOR, BGFX_STATE_BLEND_ZERO);
- case BLENDMODE_ADD:
- return BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_ONE);
- default:
- return 0L;
- }
- return 0L;
-}
-
void renderer_bgfx::set_bgfx_state(UINT32 blend)
{
uint64_t flags = BGFX_STATE_RGB_WRITE | BGFX_STATE_ALPHA_WRITE | BGFX_STATE_DEPTH_TEST_ALWAYS;
- bgfx::setState(flags | get_blend_state(blend));
+ bgfx::setState(flags | bgfx_util::get_blend_state(blend));
}
bool renderer_bgfx::update_atlas()
@@ -1188,7 +1000,7 @@ void renderer_bgfx::process_atlas_packs(std::vector<std::vector<rectangle_packer
continue;
}
m_hash_to_entry[rect.hash()] = rect;
- const bgfx::Memory* mem = mame_texture_data_to_bgfx_texture_data(rect.format(), rect.width(), rect.height(), rect.rowpixels(), rect.palette(), rect.base());
+ const bgfx::Memory* mem = bgfx_util::mame_texture_data_to_bgfx_texture_data(rect.format(), rect.width(), rect.height(), rect.rowpixels(), rect.palette(), rect.base());
bgfx::updateTexture2D(m_texture_cache->texture(), 0, rect.x(), rect.y(), rect.width(), rect.height(), mem);
}
}
@@ -1306,38 +1118,13 @@ void renderer_bgfx::allocate_buffer(render_primitive *prim, UINT32 blend, bgfx::
}
}
-slider_state* renderer_bgfx::get_slider_list()
+std::vector<ui_menu_item> renderer_bgfx::get_slider_list()
{
- if (m_screen_chains.size() <= window().m_index || m_screen_chains[window().m_index].size() == 0)
- {
- return nullptr;
- }
-
- slider_state *listhead = nullptr;
- slider_state **tailptr = &listhead;
- for (std::vector<bgfx_chain*> screen : m_screen_chains)
- {
- for (bgfx_chain* chain : screen)
- {
- std::vector<bgfx_slider*> sliders = chain->sliders();
- for (bgfx_slider* slider : sliders)
- {
- if (*tailptr == nullptr)
- {
- *tailptr = slider->core_slider();
- }
- else
- {
- (*tailptr)->next = slider->core_slider();
- tailptr = &(*tailptr)->next;
- }
- }
- }
- }
- if (*tailptr != nullptr)
- {
- (*tailptr)->next = nullptr;
- }
- m_sliders_dirty = false;
- return listhead;
+ m_sliders_dirty = false;
+ return m_chains->get_slider_list();
}
+
+void renderer_bgfx::set_sliders_dirty()
+{
+ m_sliders_dirty = true;
+} \ No newline at end of file
diff --git a/src/osd/modules/render/drawbgfx.h b/src/osd/modules/render/drawbgfx.h
index b2fe4abda78..d48bb5914e6 100644
--- a/src/osd/modules/render/drawbgfx.h
+++ b/src/osd/modules/render/drawbgfx.h
@@ -12,6 +12,7 @@
#include "binpacker.h"
#include "bgfx/vertex.h"
+#include "sliderdirtynotifier.h"
class texture_manager;
class target_manager;
@@ -24,7 +25,7 @@ class bgfx_target;
class bgfx_chain;
/* sdl_info is the information about SDL for the current screen */
-class renderer_bgfx : public osd_renderer
+class renderer_bgfx : public osd_renderer, public slider_dirty_notifier
{
public:
renderer_bgfx(osd_window *w)
@@ -39,9 +40,10 @@ public:
static void exit();
virtual int create() override;
- virtual slider_state* get_slider_list() override;
- virtual bool multi_window_sliders() override { return true; }
- virtual int draw(const int update) override;
+ virtual int draw(const int update) override;
+
+ virtual std::vector<ui_menu_item> get_slider_list() override;
+ virtual void set_sliders_dirty() override;
#ifdef OSD_SDL
virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) override;
@@ -58,11 +60,10 @@ public:
return &window().target()->get_primitives();
}
- static const char* WINDOW_PREFIX;
+ static const char* WINDOW_PREFIX;
private:
- int handle_screen_chains();
- void parse_screen_chains(std::string chain_str);
+ void handle_screen_chains(render_primitive *starting_prim);
bgfx_chain* screen_chain(int32_t screen);
bool update_dimensions();
@@ -81,7 +82,6 @@ private:
};
buffer_status buffer_primitives(bool atlas_valid, render_primitive** prim, bgfx::TransientVertexBuffer* buffer, int32_t screen);
- void process_screen_quad(int view, render_primitive* prim);
void render_textured_quad(render_primitive* prim, bgfx::TransientVertexBuffer* buffer);
void render_post_screen_quad(int view, render_primitive* prim, bgfx::TransientVertexBuffer* buffer, int32_t screen);
@@ -90,14 +90,12 @@ private:
void put_line(float x0, float y0, float x1, float y1, float r, UINT32 rgba, ScreenVertex* vertex, float fth = 1.0f);
void set_bgfx_state(UINT32 blend);
- uint64_t get_blend_state(UINT32 blend);
static uint32_t u32Color(uint32_t r, uint32_t g, uint32_t b, uint32_t a);
bool check_for_dirty_atlas();
bool update_atlas();
void process_atlas_packs(std::vector<std::vector<rectangle_packer::packed_rectangle>>& packed);
- const bgfx::Memory* mame_texture_data_to_bgfx_texture_data(UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base);
UINT32 get_texture_hash(render_primitive *prim);
bgfx_target* m_framebuffer;
@@ -114,7 +112,6 @@ private:
bgfx_effect* m_gui_effect[4];
bgfx_effect* m_screen_effect[4];
- std::vector<std::vector<bgfx_chain*>> m_screen_chains;
std::vector<uint32_t> m_seen_views;
std::map<UINT32, rectangle_packer::packed_rectangle> m_hash_to_entry;
diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp
index 8f18bae8aac..020e4ee3de5 100644
--- a/src/osd/modules/render/drawd3d.cpp
+++ b/src/osd/modules/render/drawd3d.cpp
@@ -27,7 +27,6 @@
#include "window.h"
#include "drawd3d.h"
#include "modules/render/d3d/d3dhlsl.h"
-#include "d3dtarget.h"
//============================================================
@@ -599,7 +598,8 @@ int renderer_d3d9::pre_window_draw_check()
// if we're restarting the renderer, leave things alone
if (m_restarting)
{
- m_shaders->toggle();
+ m_sliders.clear();
+ m_shaders->toggle(m_sliders);
m_restarting = false;
}
@@ -897,14 +897,16 @@ try_again:
m_shaders = (shaders*)global_alloc_clear<shaders>();
m_shaders->init(d3dintf, &window().machine(), this);
- m_sliders_dirty = true;
- int failed = m_shaders->create_resources(false);
+ m_sliders.clear();
+ int failed = m_shaders->create_resources(false, m_sliders);
if (failed)
{
return failed;
}
+ m_sliders_dirty = true;
+
return device_create_resources();
}
@@ -1003,6 +1005,7 @@ void renderer_d3d9::device_delete()
if (m_shaders != nullptr)
{
// free our effects
+ m_sliders.clear();
m_shaders->delete_resources(false);
// delete the HLSL interface
@@ -1131,6 +1134,7 @@ int renderer_d3d9::device_test_cooperative()
osd_printf_verbose("Direct3D: resetting device\n");
// free all existing resources and call reset on the device
+ m_sliders.clear();
m_shaders->delete_resources(true);
device_delete_resources();
result = (*d3dintf->device.reset)(m_device, &m_presentation);
@@ -1150,7 +1154,8 @@ int renderer_d3d9::device_test_cooperative()
return 1;
}
- if (m_shaders->create_resources(true))
+ m_sliders.clear();
+ if (m_shaders->create_resources(true, m_sliders))
{
osd_printf_verbose("Direct3D: failed to recreate HLSL resources for device; failing permanently\n");
device_delete();
diff --git a/src/osd/modules/render/drawd3d.h b/src/osd/modules/render/drawd3d.h
index 2f4b675cba2..672ff6482bb 100644
--- a/src/osd/modules/render/drawd3d.h
+++ b/src/osd/modules/render/drawd3d.h
@@ -47,24 +47,12 @@ public:
static void exit();
virtual int create() override;
- virtual slider_state* get_slider_list() override;
virtual render_primitive_list *get_primitives() override;
virtual int draw(const int update) override;
virtual void save() override;
virtual void record() override;
virtual void toggle_fsfx() override;
- bool swap_xy()
- {
- // todo: move to osd_window
- bool orientation_swap_xy =
- (window().machine().system().flags & ORIENTATION_SWAP_XY) == ORIENTATION_SWAP_XY;
- bool rotation_swap_xy =
- (window().target()->orientation() & ROT90) == ROT90 ||
- (window().target()->orientation() & ROT270) == ROT270;
- return orientation_swap_xy ^ rotation_swap_xy;
- };
-
int initialize();
int device_create(HWND device_HWND);
diff --git a/src/osd/modules/render/sdlglcontext.h b/src/osd/modules/render/sdlglcontext.h
index 5a284ef289d..9a3194582ac 100644
--- a/src/osd/modules/render/sdlglcontext.h
+++ b/src/osd/modules/render/sdlglcontext.h
@@ -13,6 +13,7 @@
#ifndef __SDL_GL_CONTEXT__
#define __SDL_GL_CONTEXT__
+#include "sdlinc.h"
#include "modules/opengl/osd_opengl.h"
class sdl_gl_context : public osd_gl_context
diff --git a/src/osd/modules/render/sliderdirtynotifier.h b/src/osd/modules/render/sliderdirtynotifier.h
new file mode 100644
index 00000000000..bf9f645b894
--- /dev/null
+++ b/src/osd/modules/render/sliderdirtynotifier.h
@@ -0,0 +1,22 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//====================================================================
+//
+// sliderdirtynotifier.cpp - Interface for a slider-changed callback
+//
+//====================================================================
+
+#pragma once
+
+#ifndef __RENDER_SLIDER_DIRTY_NOTIFIER__
+#define __RENDER_SLIDER_DIRTY_NOTIFIER__
+
+class slider_dirty_notifier
+{
+public:
+ virtual ~slider_dirty_notifier() { }
+
+ virtual void set_sliders_dirty() = 0;
+};
+
+#endif // __RENDER_SLIDER_DIRTY_NOTIFIER__ \ No newline at end of file
diff --git a/src/osd/modules/sync/osdsync.cpp b/src/osd/modules/sync/osdsync.cpp
index 46b321369b0..98690149358 100644
--- a/src/osd/modules/sync/osdsync.cpp
+++ b/src/osd/modules/sync/osdsync.cpp
@@ -11,122 +11,4 @@
#include <stdlib.h>
-// C++ headers
-#include <mutex>
-#include <atomic>
-#include <condition_variable>
-//============================================================
-// TYPE DEFINITIONS
-//============================================================
-
-struct osd_event {
- std::mutex *mutex;
- std::condition_variable *cond;
- std::atomic<INT32> autoreset;
- std::atomic<INT32> signalled;
-};
-
-//============================================================
-// osd_event_alloc
-//============================================================
-
-osd_event *osd_event_alloc(int manualreset, int initialstate)
-{
- osd_event *ev;
-
- ev = (osd_event *)calloc(1, sizeof(osd_event));
- if (ev == nullptr)
- return nullptr;
-
- ev->mutex = new std::mutex();
- ev->cond = new std::condition_variable();
- ev->signalled = initialstate;
- ev->autoreset = !manualreset;
-
- return ev;
-}
-
-//============================================================
-// osd_event_free
-//============================================================
-
-void osd_event_free(osd_event *event)
-{
- delete event->mutex;
- delete event->cond;
- free(event);
-}
-
-//============================================================
-// osd_event_set
-//============================================================
-
-void osd_event_set(osd_event *event)
-{
- event->mutex->lock();
- if (event->signalled == FALSE)
- {
- event->signalled = TRUE;
- if (event->autoreset)
- event->cond->notify_one();
- else
- event->cond->notify_all();
- }
- event->mutex->unlock();
-}
-
-//============================================================
-// osd_event_reset
-//============================================================
-
-void osd_event_reset(osd_event *event)
-{
- event->mutex->lock();
- event->signalled = FALSE;
- event->mutex->unlock();
-}
-
-//============================================================
-// osd_event_wait
-//============================================================
-
-int osd_event_wait(osd_event *event, osd_ticks_t timeout)
-{
- if (timeout == OSD_EVENT_WAIT_INFINITE)
- timeout = osd_ticks_per_second() * (osd_ticks_t)10000;
-
- std::unique_lock<std::mutex> lock(*event->mutex);
- if (!timeout)
- {
- if (!event->signalled)
- {
- return FALSE;
- }
- }
- else
- {
- if (!event->signalled)
- {
- UINT64 msec = timeout * 1000 / osd_ticks_per_second();
-
- do {
- if (event->cond->wait_for(lock, std::chrono::milliseconds(msec)) == std::cv_status::timeout)
- {
- if (!event->signalled)
- {
- return FALSE;
- }
- else
- break;
- } else
- break;
-
- } while (TRUE);
- }
- }
-
- if (event->autoreset)
- event->signalled = 0;
- return TRUE;
-}
diff --git a/src/osd/modules/sync/osdsync.h b/src/osd/modules/sync/osdsync.h
index e88d4a223f2..a0eb8d36682 100644
--- a/src/osd/modules/sync/osdsync.h
+++ b/src/osd/modules/sync/osdsync.h
@@ -9,8 +9,12 @@
#ifndef __OSDSYNC__
#define __OSDSYNC__
+// C++ headers
+#include <mutex>
+#include <atomic>
+#include <condition_variable>
+
#include "osdcomm.h"
-#include "osdcore.h"
/***************************************************************************
SYNCHRONIZATION INTERFACES - Events
@@ -20,87 +24,143 @@
/* osd_event is an opaque type which represents a setable/resetable event */
-struct osd_event;
-
-
-/*-----------------------------------------------------------------------------
- osd_event_alloc: allocate a new event
-
- Parameters:
-
- manualreset - boolean. If true, the event will be automatically set
- to non-signalled after a thread successfully waited for
- it.
- initialstate - boolean. If true, the event is signalled initially.
-
- Return value:
-
- A pointer to the allocated event.
------------------------------------------------------------------------------*/
-osd_event *osd_event_alloc(int manualreset, int initialstate);
-
-
-/*-----------------------------------------------------------------------------
- osd_event_wait: wait for an event to be signalled
-
- Parameters:
-
- event - The event to wait for. If the event is in signalled state, the
- function returns immediately. If not it will wait for the event
- to become signalled.
- timeout - timeout in osd_ticks
-
- Return value:
-
- TRUE: The event was signalled
- FALSE: A timeout occurred
------------------------------------------------------------------------------*/
-int osd_event_wait(osd_event *event, osd_ticks_t timeout);
-
-
-/*-----------------------------------------------------------------------------
- osd_event_reset: reset an event to non-signalled state
-
- Parameters:
-
- event - The event to set to non-signalled state
-
- Return value:
-
- None
------------------------------------------------------------------------------*/
-void osd_event_reset(osd_event *event);
-
-
-/*-----------------------------------------------------------------------------
- osd_event_set: set an event to signalled state
-
- Parameters:
-
- event - The event to set to signalled state
-
- Return value:
-
- None
-
- Notes:
-
- All threads waiting for the event will be signalled.
------------------------------------------------------------------------------*/
-void osd_event_set(osd_event *event);
-
-
-/*-----------------------------------------------------------------------------
- osd_event_free: free the memory and resources associated with an osd_event
-
- Parameters:
-
- event - a pointer to a previously allocated osd_event.
+class osd_event
+{
+public:
+ /*-----------------------------------------------------------------------------
+ constructor: allocate a new event
+
+ Parameters:
+
+ manualreset - boolean. If true, the event will be automatically set
+ to non-signalled after a thread successfully waited for
+ it.
+ initialstate - boolean. If true, the event is signalled initially.
- Return value:
+ Return value:
- None.
------------------------------------------------------------------------------*/
-void osd_event_free(osd_event *event);
+ A pointer to the allocated event.
+ -----------------------------------------------------------------------------*/
+ osd_event(int manualreset, int initialstate)
+ {
+ m_signalled = initialstate;
+ m_autoreset = !manualreset;
+ }
+
+ ~osd_event()
+ {
+ }
+
+ /*-----------------------------------------------------------------------------
+ wait: wait for an event to be signalled
+ If the event is in signalled state, the
+ function returns immediately. If not it will wait for the event
+ to become signalled.
+
+ Parameters:
+
+ timeout - timeout in osd_ticks
+
+ Return value:
+
+ true: The event was signalled
+ false: A timeout occurred
+ -----------------------------------------------------------------------------*/
+
+ bool wait(osd_ticks_t timeout)
+ {
+ if (timeout == OSD_EVENT_WAIT_INFINITE)
+ timeout = osd_ticks_per_second() * (osd_ticks_t)10000;
+
+ std::unique_lock<std::mutex> lock(m_mutex);
+ if (!timeout)
+ {
+ if (!m_signalled)
+ {
+ return false;
+ }
+ }
+ else
+ {
+ if (!m_signalled)
+ {
+ UINT64 msec = timeout * 1000 / osd_ticks_per_second();
+
+ do {
+ if (m_cond.wait_for(lock, std::chrono::milliseconds(msec)) == std::cv_status::timeout)
+ {
+ if (!m_signalled)
+ {
+ return FALSE;
+ }
+ else
+ break;
+ } else
+ break;
+
+ } while (true);
+ }
+ }
+
+ if (m_autoreset)
+ m_signalled = 0;
+
+ return true;
+ }
+
+ /*-----------------------------------------------------------------------------
+ osd_event_reset: reset an event to non-signalled state
+
+ Parameters:
+
+ None
+
+ Return value:
+
+ None
+ -----------------------------------------------------------------------------*/
+ void reset()
+ {
+ m_mutex.lock();
+ m_signalled = FALSE;
+ m_mutex.unlock();
+ }
+
+ /*-----------------------------------------------------------------------------
+ osd_event_set: set an event to signalled state
+
+ Parameters:
+
+ None
+
+ Return value:
+
+ None
+
+ Notes:
+
+ All threads waiting for the event will be signalled.
+ -----------------------------------------------------------------------------*/
+ void set()
+ {
+ m_mutex.lock();
+ if (m_signalled == FALSE)
+ {
+ m_signalled = TRUE;
+ if (m_autoreset)
+ m_cond.notify_one();
+ else
+ m_cond.notify_all();
+ }
+ m_mutex.unlock();
+ }
+
+private:
+ std::mutex m_mutex;
+ std::condition_variable m_cond;
+ std::atomic<INT32> m_autoreset;
+ std::atomic<INT32> m_signalled;
+
+};
#endif /* __OSDSYNC__ */
diff --git a/src/osd/modules/sync/work_osd.cpp b/src/osd/modules/sync/work_osd.cpp
index 9f80c9aec76..3afe4e6c273 100644
--- a/src/osd/modules/sync/work_osd.cpp
+++ b/src/osd/modules/sync/work_osd.cpp
@@ -20,6 +20,7 @@
#include <mutex>
#include <atomic>
#include <thread>
+#include <vector>
// MAME headers
#include "osdcore.h"
@@ -29,15 +30,9 @@
#include "eminline.h"
-#if defined(SDLMAME_MACOSX)
-#include "osxutils.h"
-#endif
#if defined(SDLMAME_LINUX) || defined(SDLMAME_BSD) || defined(SDLMAME_HAIKU) || defined(SDLMAME_EMSCRIPTEN) || defined(SDLMAME_MACOSX)
#include <pthread.h>
#endif
-#if defined(OSD_SDL)
-typedef void *PVOID;
-#endif
//============================================================
// DEBUGGING
@@ -96,10 +91,26 @@ static void spin_while_not(const volatile _AtomType * volatile atom, const _Main
struct work_thread_info
{
- osd_work_queue * queue; // pointer back to the queue
+ work_thread_info(UINT32 aid, osd_work_queue &aqueue)
+ : queue(aqueue)
+ , handle(nullptr)
+ , wakeevent(FALSE, FALSE) // auto-reset, not signalled
+ , active(0)
+ , id(aid)
+#if KEEP_STATISTICS
+ , itemsdone(0)
+ , actruntime(0)
+ , runtime(0)
+ , spintime(0)
+ , waittime(0)
+#endif
+ {
+ }
+ osd_work_queue & queue; // pointer back to the queue
std::thread * handle; // handle to the thread
- osd_event * wakeevent; // wake event for the thread
+ osd_event wakeevent; // wake event for the thread
std::atomic<INT32> active; // are we actively processing work?
+ UINT32 id;
#if KEEP_STATISTICS
INT32 itemsdone;
@@ -113,7 +124,28 @@ struct work_thread_info
struct osd_work_queue
{
- std::mutex *lock; // lock for protecting the queue
+ osd_work_queue()
+ : list(nullptr)
+ , tailptr(nullptr)
+ , free(nullptr)
+ , items(0)
+ , livethreads(0)
+ , waiting(0)
+ , exiting(0)
+ , threads(0)
+ , flags(0)
+ , doneevent(TRUE, TRUE) // manual reset, signalled
+#if KEEP_STATISTICS
+ , itemsqueued(0)
+ , setevents(0)
+ , extraitems(0)
+ , spinloops(0)
+#endif
+ {
+
+ }
+
+ std::mutex lock; // lock for protecting the queue
std::atomic<osd_work_item *> list; // list of items in the queue
osd_work_item ** volatile tailptr; // pointer to the tail pointer of work items in the queue
std::atomic<osd_work_item *> free; // free list of work items
@@ -123,8 +155,8 @@ struct osd_work_queue
std::atomic<INT32> exiting; // should the threads exit on their next opportunity?
UINT32 threads; // number of threads in this queue
UINT32 flags; // creation flags
- work_thread_info * thread; // array of thread information
- osd_event * doneevent; // event signalled when work is complete
+ std::vector<work_thread_info *> thread; // array of thread information
+ osd_event doneevent; // event signalled when work is complete
#if KEEP_STATISTICS
std::atomic<INT32> itemsqueued; // total items queued
@@ -137,8 +169,20 @@ struct osd_work_queue
struct osd_work_item
{
+ osd_work_item(osd_work_queue &aqueue)
+ : next(nullptr)
+ , queue(aqueue)
+ , callback(nullptr)
+ , param(nullptr)
+ , result(nullptr)
+ , event(nullptr) // manual reset, not signalled
+ , flags(0)
+ , done(FALSE)
+ {
+ }
+
osd_work_item * next; // pointer to next item
- osd_work_queue * queue; // pointer back to the owning queue
+ osd_work_queue & queue; // pointer back to the owning queue
osd_work_callback callback; // callback function
void * param; // callback parameter
void * result; // callback result
@@ -204,25 +248,12 @@ osd_work_queue *osd_work_queue_alloc(int flags)
const char *osdworkqueuemaxthreads = osd_getenv(ENV_WORKQUEUEMAXTHREADS);
// allocate a new queue
- queue = (osd_work_queue *)osd_malloc(sizeof(*queue));
- if (queue == NULL)
- goto error;
- memset(queue, 0, sizeof(*queue));
+ queue = new osd_work_queue();
// initialize basic queue members
queue->tailptr = (osd_work_item **)&queue->list;
queue->flags = flags;
- // allocate events for the queue
- queue->doneevent = osd_event_alloc(TRUE, TRUE); // manual reset, signalled
- if (queue->doneevent == NULL)
- goto error;
-
- // initialize the critical section
- queue->lock = new std::mutex();
- if (queue->lock == NULL)
- goto error;
-
// determine how many threads to create...
// on a single-CPU system, create 1 thread for I/O queues, and 0 threads for everything else
if (numprocs == 1)
@@ -247,23 +278,13 @@ osd_work_queue *osd_work_queue_alloc(int flags)
printf("osdprocs: %d effecprocs: %d threads: %d allocthreads: %d osdthreads: %d maxthreads: %d queuethreads: %d\n", osd_num_processors, numprocs, threadnum, allocthreadnum, osdthreadnum, WORK_MAX_THREADS, queue->threads);
#endif
- queue->thread = (work_thread_info *)osd_malloc_array(allocthreadnum * sizeof(queue->thread[0]));
- if (queue->thread == NULL)
- goto error;
- memset(queue->thread, 0, allocthreadnum * sizeof(queue->thread[0]));
+ for (threadnum = 0; threadnum < allocthreadnum; threadnum++)
+ queue->thread.push_back(new work_thread_info(threadnum, *queue));
// iterate over threads
for (threadnum = 0; threadnum < queue->threads; threadnum++)
{
- work_thread_info *thread = &queue->thread[threadnum];
-
- // set a pointer back to the queue
- thread->queue = queue;
-
- // create the per-thread wake event
- thread->wakeevent = osd_event_alloc(FALSE, FALSE); // auto-reset, not signalled
- if (thread->wakeevent == NULL)
- goto error;
+ work_thread_info *thread = queue->thread[threadnum];
// create the thread
thread->handle = new std::thread(worker_thread_entry, thread);
@@ -281,7 +302,7 @@ osd_work_queue *osd_work_queue_alloc(int flags)
// start a timer going for "waittime" on the main thread
if (flags & WORK_QUEUE_FLAG_MULTI)
{
- begin_timing(queue->thread[queue->threads].waittime);
+ begin_timing(queue->thread[queue->threads]->waittime);
}
return queue;
@@ -319,7 +340,7 @@ int osd_work_queue_wait(osd_work_queue *queue, osd_ticks_t timeout)
// if this is a multi queue, help out rather than doing nothing
if (queue->flags & WORK_QUEUE_FLAG_MULTI)
{
- work_thread_info *thread = &queue->thread[queue->threads];
+ work_thread_info *thread = queue->thread[queue->threads];
end_timing(thread->waittime);
@@ -341,10 +362,10 @@ int osd_work_queue_wait(osd_work_queue *queue, osd_ticks_t timeout)
}
// reset our done event and double-check the items before waiting
- osd_event_reset(queue->doneevent);
+ queue->doneevent.reset();
queue->waiting = TRUE;
if (queue->items != 0)
- osd_event_wait(queue->doneevent, timeout);
+ queue->doneevent.wait(timeout);
queue->waiting = FALSE;
// return TRUE if we actually hit 0
@@ -358,73 +379,53 @@ int osd_work_queue_wait(osd_work_queue *queue, osd_ticks_t timeout)
void osd_work_queue_free(osd_work_queue *queue)
{
- // if we have threads, clean them up
- if (queue->thread != NULL)
+ // stop the timer for "waittime" on the main thread
+ if (queue->flags & WORK_QUEUE_FLAG_MULTI)
{
- int threadnum;
+ end_timing(queue->thread[queue->threads]->waittime);
+ }
- // stop the timer for "waittime" on the main thread
- if (queue->flags & WORK_QUEUE_FLAG_MULTI)
- {
- end_timing(queue->thread[queue->threads].waittime);
- }
+ // signal all the threads to exit
+ queue->exiting = TRUE;
+ for (int threadnum = 0; threadnum < queue->threads; threadnum++)
+ {
+ work_thread_info *thread = queue->thread[threadnum];
+ thread->wakeevent.set();
+ }
- // signal all the threads to exit
- queue->exiting = TRUE;
- for (threadnum = 0; threadnum < queue->threads; threadnum++)
- {
- work_thread_info *thread = &queue->thread[threadnum];
- if (thread->wakeevent != NULL)
- osd_event_set(thread->wakeevent);
- }
+ // wait for all the threads to go away
+ for (int threadnum = 0; threadnum < queue->threads; threadnum++)
+ {
+ work_thread_info *thread = queue->thread[threadnum];
- // wait for all the threads to go away
- for (threadnum = 0; threadnum < queue->threads; threadnum++)
+ // block on the thread going away, then close the handle
+ if (thread->handle != NULL)
{
- work_thread_info *thread = &queue->thread[threadnum];
-
- // block on the thread going away, then close the handle
- if (thread->handle != NULL)
- {
- thread->handle->join();
- delete thread->handle;
- }
-
- // clean up the wake event
- if (thread->wakeevent != NULL)
- osd_event_free(thread->wakeevent);
+ thread->handle->join();
+ delete thread->handle;
}
-#if KEEP_STATISTICS
- int allocthreadnum;
- if (queue->flags & WORK_QUEUE_FLAG_MULTI)
- allocthreadnum = queue->threads + 1;
- else
- allocthreadnum = queue->threads;
+ }
- // output per-thread statistics
- for (threadnum = 0; threadnum < allocthreadnum; threadnum++)
- {
- work_thread_info *thread = &queue->thread[threadnum];
- osd_ticks_t total = thread->runtime + thread->waittime + thread->spintime;
- printf("Thread %d: items=%9d run=%5.2f%% (%5.2f%%) spin=%5.2f%% wait/other=%5.2f%% total=%9d\n",
- threadnum, thread->itemsdone,
- (double)thread->runtime * 100.0 / (double)total,
- (double)thread->actruntime * 100.0 / (double)total,
- (double)thread->spintime * 100.0 / (double)total,
- (double)thread->waittime * 100.0 / (double)total,
- (UINT32) total);
- }
-#endif
+#if KEEP_STATISTICS
+ // output per-thread statistics
+ for (work_thread_info *thread : queue->thread)
+ {
+ osd_ticks_t total = thread->runtime + thread->waittime + thread->spintime;
+ printf("Thread %d: items=%9d run=%5.2f%% (%5.2f%%) spin=%5.2f%% wait/other=%5.2f%% total=%9d\n",
+ thread->id, thread->itemsdone,
+ (double)thread->runtime * 100.0 / (double)total,
+ (double)thread->actruntime * 100.0 / (double)total,
+ (double)thread->spintime * 100.0 / (double)total,
+ (double)thread->waittime * 100.0 / (double)total,
+ (UINT32) total);
}
+#endif
// free the list
- if (queue->thread != NULL)
- osd_free(queue->thread);
-
- // free all the events
- if (queue->doneevent != NULL)
- osd_event_free(queue->doneevent);
+ for (auto & th : queue->thread)
+ delete th;
+ queue->thread.clear();
// free all items in the free list
while (queue->free.load() != nullptr)
@@ -432,8 +433,8 @@ void osd_work_queue_free(osd_work_queue *queue)
osd_work_item *item = (osd_work_item *)queue->free;
queue->free = item->next;
if (item->event != NULL)
- osd_event_free(item->event);
- osd_free(item);
+ delete item->event;
+ delete item;
}
// free all items in the active list
@@ -442,20 +443,19 @@ void osd_work_queue_free(osd_work_queue *queue)
osd_work_item *item = (osd_work_item *)queue->list;
queue->list = item->next;
if (item->event != NULL)
- osd_event_free(item->event);
- osd_free(item);
+ delete item->event;
+ delete item;
}
#if KEEP_STATISTICS
- printf("Items queued = %9d\n", queue->itemsqueued);
- printf("SetEvent calls = %9d\n", queue->setevents);
- printf("Extra items = %9d\n", queue->extraitems);
- printf("Spin loops = %9d\n", queue->spinloops);
+ printf("Items queued = %9d\n", queue->itemsqueued.load());
+ printf("SetEvent calls = %9d\n", queue->setevents.load());
+ printf("Extra items = %9d\n", queue->extraitems.load());
+ printf("Spin loops = %9d\n", queue->spinloops.load());
#endif
- delete queue->lock;
// free the queue itself
- osd_free(queue);
+ delete queue;
}
@@ -476,7 +476,7 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
// first allocate a new work item; try the free list first
{
- std::lock_guard<std::mutex> lock(*queue->lock);
+ std::lock_guard<std::mutex> lock(queue->lock);
do
{
item = (osd_work_item *)queue->free;
@@ -487,12 +487,9 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
if (item == NULL)
{
// allocate the item
- item = (osd_work_item *)osd_malloc(sizeof(*item));
+ item = new osd_work_item(*queue);
if (item == NULL)
return NULL;
- item->event = NULL;
- item->queue = queue;
- item->done = FALSE;
}
else
{
@@ -515,7 +512,7 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
// enqueue the whole thing within the critical section
{
- std::lock_guard<std::mutex> lock(*queue->lock);
+ std::lock_guard<std::mutex> lock(queue->lock);
*queue->tailptr = itemlist;
queue->tailptr = item_tailptr;
}
@@ -532,12 +529,12 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
// iterate over all the threads
for (threadnum = 0; threadnum < queue->threads; threadnum++)
{
- work_thread_info *thread = &queue->thread[threadnum];
+ work_thread_info *thread = queue->thread[threadnum];
// if this thread is not active, wake him up
if (!thread->active)
{
- osd_event_set(thread->wakeevent);
+ thread->wakeevent.set();
add_to_stat(queue->setevents, 1);
// for non-shared, the first one we find is good enough
@@ -550,9 +547,9 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
// if no threads, run the queue now on this thread
if (queue->threads == 0)
{
- end_timing(queue->thread[0].waittime);
- worker_thread_process(queue, &queue->thread[0]);
- begin_timing(queue->thread[0].waittime);
+ end_timing(queue->thread[0]->waittime);
+ worker_thread_process(queue, queue->thread[0]);
+ begin_timing(queue->thread[0]->waittime);
}
// only return the item if it won't get released automatically
return (flags & WORK_ITEM_FLAG_AUTO_RELEASE) ? NULL : lastitem;
@@ -572,11 +569,11 @@ int osd_work_item_wait(osd_work_item *item, osd_ticks_t timeout)
// if we don't have an event, create one
if (item->event == NULL)
{
- std::lock_guard<std::mutex> lock(*item->queue->lock);
- item->event = osd_event_alloc(TRUE, FALSE); // manual reset, not signalled
+ std::lock_guard<std::mutex> lock(item->queue.lock);
+ item->event = new osd_event(TRUE, FALSE); // manual reset, not signalled
}
else
- osd_event_reset(item->event);
+ item->event->reset();
// if we don't have an event, we need to spin (shouldn't ever really happen)
if (item->event == NULL)
@@ -587,7 +584,7 @@ int osd_work_item_wait(osd_work_item *item, osd_ticks_t timeout)
// otherwise, block on the event until done
else if (!item->done)
- osd_event_wait(item->event, timeout);
+ item->event->wait(timeout);
// return TRUE if the refcount actually hit 0
return item->done;
@@ -616,12 +613,12 @@ void osd_work_item_release(osd_work_item *item)
osd_work_item_wait(item, 100 * osd_ticks_per_second());
// add us to the free list on our queue
- std::lock_guard<std::mutex> lock(*item->queue->lock);
+ std::lock_guard<std::mutex> lock(item->queue.lock);
do
{
- next = (osd_work_item *)item->queue->free;
+ next = (osd_work_item *) item->queue.free;
item->next = next;
- } while (!item->queue->free.compare_exchange_weak(next, item, std::memory_order_release, std::memory_order_relaxed));
+ } while (!item->queue.free.compare_exchange_weak(next, item, std::memory_order_release, std::memory_order_relaxed));
}
@@ -661,64 +658,56 @@ static int effective_num_processors(void)
static void *worker_thread_entry(void *param)
{
work_thread_info *thread = (work_thread_info *)param;
- osd_work_queue *queue = thread->queue;
-
-#if defined(SDLMAME_MACOSX)
- void *arp = NewAutoreleasePool();
-#endif
+ osd_work_queue &queue = thread->queue;
// loop until we exit
for ( ;; )
{
// block waiting for work or exit
// bail on exit, and only wait if there are no pending items in queue
- if (queue->exiting)
+ if (queue.exiting)
break;
- if (!queue_has_list_items(queue))
+ if (!queue_has_list_items(&queue))
{
begin_timing(thread->waittime);
- osd_event_wait(thread->wakeevent, OSD_EVENT_WAIT_INFINITE);
+ thread->wakeevent.wait( OSD_EVENT_WAIT_INFINITE);
end_timing(thread->waittime);
}
- if (queue->exiting)
+ if (queue.exiting)
break;
// indicate that we are live
thread->active = TRUE;
- ++queue->livethreads;
+ ++queue.livethreads;
// process work items
for ( ;; )
{
// process as much as we can
- worker_thread_process(queue, thread);
+ worker_thread_process(&queue, thread);
// if we're a high frequency queue, spin for a while before giving up
- if (queue->flags & WORK_QUEUE_FLAG_HIGH_FREQ && queue->list.load() == nullptr)
+ if (queue.flags & WORK_QUEUE_FLAG_HIGH_FREQ && queue.list.load() == nullptr)
{
// spin for a while looking for more work
begin_timing(thread->spintime);
- spin_while<std::atomic<osd_work_item *>, osd_work_item *>(&queue->list, (osd_work_item *)nullptr, SPIN_LOOP_TIME);
+ spin_while<std::atomic<osd_work_item *>, osd_work_item *>(&queue.list, (osd_work_item *)nullptr, SPIN_LOOP_TIME);
end_timing(thread->spintime);
}
// if nothing more, release the processor
- if (!queue_has_list_items(queue))
+ if (!queue_has_list_items(&queue))
break;
- add_to_stat(queue->spinloops, 1);
+ add_to_stat(queue.spinloops, 1);
}
// decrement the live thread count
thread->active = FALSE;
- --queue->livethreads;
+ --queue.livethreads;
}
-#if defined(SDLMAME_MACOSX)
- ReleaseAutoreleasePool(arp);
-#endif
-
return NULL;
}
@@ -729,7 +718,7 @@ static void *worker_thread_entry(void *param)
static void worker_thread_process(osd_work_queue *queue, work_thread_info *thread)
{
- int threadid = thread - queue->thread;
+ int threadid = thread->id;
begin_timing(thread->runtime);
@@ -742,7 +731,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
// use a critical section to synchronize the removal of items
{
- std::lock_guard<std::mutex> lock(*queue->lock);
+ std::lock_guard<std::mutex> lock(queue->lock);
if (queue->list.load() == nullptr)
{
@@ -784,12 +773,12 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
// set the result and signal the event
else
{
- std::lock_guard<std::mutex> lock(*queue->lock);
+ std::lock_guard<std::mutex> lock(queue->lock);
if (item->event != NULL)
{
- osd_event_set(item->event);
- add_to_stat(item->queue->setevents, 1);
+ item->event->set();
+ add_to_stat(item->queue.setevents, 1);
}
}
@@ -802,7 +791,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
// we don't need to set the doneevent for multi queues because they spin
if (queue->waiting)
{
- osd_event_set(queue->doneevent);
+ queue->doneevent.set();
add_to_stat(queue->setevents, 1);
}
@@ -811,7 +800,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
bool queue_has_list_items(osd_work_queue *queue)
{
- std::lock_guard<std::mutex> lock(*queue->lock);
+ std::lock_guard<std::mutex> lock(queue->lock);
bool has_list_items = (queue->list.load() != nullptr);
return has_list_items;
}
diff --git a/src/osd/osdcore.cpp b/src/osd/osdcore.cpp
index fef7d0d0f7a..3e783159a9b 100644
--- a/src/osd/osdcore.cpp
+++ b/src/osd/osdcore.cpp
@@ -5,6 +5,9 @@
#include <thread>
#include <chrono>
+#if defined(SDLMAME_ANDROID)
+#include <SDL2/SDL.h>
+#endif
static const int MAXSTACK = 10;
static osd_output *m_stack[MAXSTACK];
static int m_ptr = -1;
@@ -58,7 +61,11 @@ void CLIB_DECL osd_printf_error(const char *format, ...)
/* do the output */
va_start(argptr, format);
+#if defined(SDLMAME_ANDROID)
+ SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_ERROR, format, argptr);
+#else
if (m_ptr >= 0) m_stack[m_ptr]->output_callback(OSD_OUTPUT_CHANNEL_ERROR, format, argptr);
+#endif
va_end(argptr);
}
@@ -74,7 +81,11 @@ void CLIB_DECL osd_printf_warning(const char *format, ...)
/* do the output */
va_start(argptr, format);
+#if defined(SDLMAME_ANDROID)
+ SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_ERROR, format, argptr);
+#else
if (m_ptr >= 0) m_stack[m_ptr]->output_callback(OSD_OUTPUT_CHANNEL_WARNING, format, argptr);
+#endif
va_end(argptr);
}
@@ -90,7 +101,11 @@ void CLIB_DECL osd_printf_info(const char *format, ...)
/* do the output */
va_start(argptr, format);
+#if defined(SDLMAME_ANDROID)
+ SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, format, argptr);
+#else
if (m_ptr >= 0) m_stack[m_ptr]->output_callback(OSD_OUTPUT_CHANNEL_INFO, format, argptr);
+#endif
va_end(argptr);
}
@@ -106,7 +121,11 @@ void CLIB_DECL osd_printf_verbose(const char *format, ...)
/* do the output */
va_start(argptr, format);
+#if defined(SDLMAME_ANDROID)
+ SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_VERBOSE, format, argptr);
+#else
if (m_ptr >= 0) m_stack[m_ptr]->output_callback(OSD_OUTPUT_CHANNEL_VERBOSE, format, argptr);
+#endif
va_end(argptr);
}
@@ -122,7 +141,11 @@ void CLIB_DECL osd_printf_debug(const char *format, ...)
/* do the output */
va_start(argptr, format);
+#if defined(SDLMAME_ANDROID)
+ SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, format, argptr);
+#else
if (m_ptr >= 0) m_stack[m_ptr]->output_callback(OSD_OUTPUT_CHANNEL_DEBUG, format, argptr);
+#endif
va_end(argptr);
}
diff --git a/src/osd/osdcore.h b/src/osd/osdcore.h
index 899f024d9f4..623c3ee3f11 100644
--- a/src/osd/osdcore.h
+++ b/src/osd/osdcore.h
@@ -774,11 +774,6 @@ void osd_free_executable(void *ptr, size_t size);
-----------------------------------------------------------------------------*/
void osd_break_into_debugger(const char *message);
-
-/*-----------------------------------------------------------------------------
- MESS specific code below
------------------------------------------------------------------------------*/
-
/*-----------------------------------------------------------------------------
osd_get_clipboard_text: retrieves text from the clipboard
diff --git a/src/osd/osdepend.h b/src/osd/osdepend.h
index b6ab45003e1..661160cb271 100644
--- a/src/osd/osdepend.h
+++ b/src/osd/osdepend.h
@@ -17,6 +17,7 @@
#include "osdcore.h"
#include "unicode.h"
#include "cliopts.h"
+#include "ui/menu.h"
#include <memory>
#include <string>
@@ -56,8 +57,6 @@ public:
// ======================> osd_interface
-struct slider_state;
-
// description of the currently-running machine
class osd_interface
{
@@ -80,7 +79,7 @@ public:
virtual void customize_input_type_list(simple_list<input_type_entry> &typelist) = 0;
// video overridables
- virtual slider_state *get_slider_list() = 0;
+ virtual std::vector<ui_menu_item> get_slider_list() = 0;
// font interface
virtual osd_font::ptr font_alloc() = 0;
diff --git a/src/osd/sdl/README_SDL20.txt b/src/osd/sdl/README_SDL20.txt
deleted file mode 100644
index 7787bdc5e39..00000000000
--- a/src/osd/sdl/README_SDL20.txt
+++ /dev/null
@@ -1,130 +0,0 @@
-======================================================================================
-SDLMAME now supports SDL from version 2.0 on upwards.
-=======================================================================================
-
-
-Warning
-=======
-
-- SDL2.0 still is still under development, the following may or may not
- work.
-- if you are using wine on unix be sure to disable wintab32.dll
-
-Known bugs:
-===========
-
-* SDL1.3/X11: Some compound keys, e.g. "'" are not supported by SDL driver
-* SDL2.0: sdlvideofps does not take -numscreens>1 into account.
-* SDL1.3/WIN32: crashes with -rd d3d
-* SDL1.3/WIN32: resizing does not work
-
-Build SDL 2.0 from HG
-======================
-
-Pull 2.0 from hg. Then
-
-sh autogen.sh
-./configure --prefix=/usr/local/sdl13/ --disable-video-svga --enable-video-directfb --enable-fusionsound
-make
-[sudo] make install
-
-You may leave away the last two enables, if you do not want to play around with directfb - although it is lightning fast now :-)
-
-To build the files in test, do
-
-cd test
-./configure --prefix=/usr/local/sdl13/ --with-sdl-pfx=/usr/local/sdl13
-make
-
-Replace /usr/local/sdl13 above with a safe location, this may as well be a directory in $HOME.
-
-Edit sdl.mak to have
-
-SDL_LIBVER = sdl2
-SDL_INSTALL_ROOT = /usr/local/sdl13
-
-That's it.
-
-make
-./mame -video sdl13 -rd opengl dkong
-
-
-All drivers
-===========
-
-should support:
-
--waitvsync
--prescale
--resolution[X]
--switchres
--numscreens
--screen[X]
-
-The following modes are working:
-
-SDL13
-=====
-
-This is driver using SDL texture and line drawing support. It supports
--prescale, -filter and -waitvsync. The driver determines which pixel
-formats perform best and converts textures to these pixel formats and at
-the same time performs any necessary rotation.
-
-Basic usage examples:
-
-X11/opengl: ./mamed -video sdl13 -rd opengl mario
-DFB/DFB: ./mamed -video sdl13 -vd directfb -rd directfb mario
-
-The performance of the directfb driver depends on the combined
-support of the kernel framebuffer driver and the directfb driver.
-Having loaded radeonfb I get the same performance as with the open source
-radeon X11 driver.
-
-Using the SDL software renderer (preferred is -video soft, thought)
-
-X11,DFB,WIN32 ./mamed -video sdl13 -rd software
-
-Soft:
-=====
-
-./mamed -mt -video soft -sm none -numscreens 2 mario
-
-OpenGL:
-=======
-
-Plain opengl does work. Anything more advanced like pbo, fbo or glsl will
-most probably not work with more than one screen.
-
- ./mamed -mt -video opengl mario -nogl_pbo -nogl_vbo -nogl_glsl -numscreens 2
-
-YUV - modes:
-============
-
- ./mamed -mt -video soft -sm yuy2 mario
-
-Using DirectFB, the following should get you going
-
- ./mamed -mt -video soft -sm yuy2 -vd directfb -rd directfb mario
-
-for accelerated blitting on the framebuffer - provided directfb supports it.
-At least my Radeon R480 is supported.
-
--video soft and -scale_mode (-sm)
-=================================
-
-sdlmame supports 7 scale modes using textures in -video soft:
-
-none: All rendering/scaling in software.
-
-hwblit: Rendering in software/scaling with hardware (if supported)
-
-hwbest: Rendering in software/antialiased scaling with hardware (if supported)
-
-yv12, yv12x2, yuy2, yuy2x2:
-Rendering in software / scaling with hardware (if supported)
-
-Whether these are actually hardware accelerated depends on the SDL driver
-and the hardware. The SDL directfb driver supports all above if the hardware
-supports it. However, only one YUV-texture per display is supported.
-The second window consequently will get "software" YUV blitting.
diff --git a/src/osd/sdl/ledutil.sh b/src/osd/sdl/ledutil.sh
deleted file mode 100644
index e91e44200de..00000000000
--- a/src/osd/sdl/ledutil.sh
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/sh
-# license:BSD-3-Clause
-# copyright-holders:Olivier Galibert, R. Belmont
-# ============================================================
-#
-# ledutil.sh - Example script for output notifiers
-#
-# This is a very basic implementation which
-#
-# a) Sets kbd leds if led0, led1, led2 is received
-# b) Beeps if led0 is set to on (state=1)
-# c) Writes a message when pause is received
-#
-# use "sh ledutil.sh -h" to get more information
-#
-# ============================================================
-
-SDLMAME_OUTPUT=/tmp/sdlmame_out
-
-verbose=0
-autoclose=0
-myname=`basename $0`
-paused=0
-
-while [ $# -gt 0 ]; do
- case $1 in
- -v)
- verbose=1
- ;;
- -a)
- autoclose=1
- ;;
- -h)
- echo "Usage: $myname [-a] [-v]"
- echo ""
- echo " -a Automatically close when sdlmame ends game"
- echo " -v LOG all messages received"
- echo " -h Get help"
- echo ""
- exit
- ;;
- *)
- echo "$myname: invalid option $1"
- echo "Try \`$myname -h' for more information."
- exit
- ;;
- esac
- shift
-done
-
-if [ ! -e ${SDLMAME_OUTPUT} ]; then
- mkfifo ${SDLMAME_OUTPUT}
-fi
-
-while true; do
- cat ${SDLMAME_OUTPUT} | while read class pidnum what state; do
- [ $verbose = 1 ] && echo LOG: $class $pidnum $what $state
- if [ "$class" = "MAME" ]; then
- case "$what" in
- START)
- echo Process $pidnum starting game $state
- paused=0
- ;;
- STOP)
- echo Process $pidnum stopping game $state
- ;;
- esac
- fi
- if [ "$class" = "OUT" ]; then
- case "$what" in
- led0)
- [ "$state" = 1 ] && beep
- [ "$state" = 1 ] && xset led 1
- [ "$state" = 0 ] && xset -led 1
- ;;
- led1)
- [ "$state" = 1 ] && xset led 2
- [ "$state" = 0 ] && xset -led 2
- ;;
- led2)
- [ "$state" = 1 ] && xset led 3
- [ "$state" = 0 ] && xset -led 3
- ;;
- pause)
- paused=$state
- echo Pause $paused!
- ;;
- esac
- fi
- done
- [ $autoclose = 1 ] && break;
-done
-
-rm -f ${SDLMAME_OUTPUT}
-
diff --git a/src/osd/sdl/main.cpp b/src/osd/sdl/main.cpp
deleted file mode 100644
index 7a73e6a82a9..00000000000
--- a/src/osd/sdl/main.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
-//============================================================
-//
-// main.c - Win32 main program
-//
-//============================================================
-
-// standard windows headers
-#ifdef OSD_SDL
-#define _WIN32_WINNT 0x0400
-#endif
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <tchar.h>
-#include <stdlib.h>
-
-// MAMEOS headers
-#include "strconv.h"
-
-extern int utf8_main(int argc, char *argv[]);
-
-
-
-//============================================================
-// main
-//============================================================
-
-// undo the command-line #define that maps main to utf8_main in all other cases
-#ifndef WINUI
-#undef main
-#undef wmain
-#endif
-#ifdef UNICODE
-extern "C" int _tmain(int argc, TCHAR **argv)
-{
- int i, rc;
- char **utf8_argv;
-
- /* convert arguments to UTF-8 */
- utf8_argv = (char **) malloc(argc * sizeof(*argv));
- if (utf8_argv == NULL)
- return 999;
- for (i = 0; i < argc; i++)
- {
- utf8_argv[i] = utf8_from_tstring(argv[i]);
- if (utf8_argv[i] == NULL)
- return 999;
- }
-
- /* run utf8_main */
- rc = utf8_main(argc, utf8_argv);
-
- /* free arguments */
- for (i = 0; i < argc; i++)
- osd_free(utf8_argv[i]);
- free(utf8_argv);
-
- return rc;
-}
-#endif
diff --git a/src/osd/sdl/osdsdl.h b/src/osd/sdl/osdsdl.h
index ddeabebc386..d3ce734b4d2 100644
--- a/src/osd/sdl/osdsdl.h
+++ b/src/osd/sdl/osdsdl.h
@@ -3,8 +3,6 @@
#ifndef _osdsdl_h_
#define _osdsdl_h_
-#include "sdlinc.h"
-
#include "watchdog.h"
#include "clifront.h"
#include "modules/lib/osdobj_common.h"
@@ -142,9 +140,6 @@ public:
virtual void init(running_machine &machine) override;
virtual void update(bool skip_redraw) override;
- // video overridables
- virtual slider_state *get_slider_list() override;
-
// input overridables
virtual void customize_input_type_list(simple_list<input_type_entry> &typelist) override;
@@ -152,13 +147,9 @@ public:
virtual bool video_init() override;
virtual bool window_init() override;
- virtual bool output_init() override;
- //virtual bool midi_init();
virtual void video_exit() override;
virtual void window_exit() override;
- virtual void output_exit() override;
- //virtual void midi_exit();
// sdl specific
void poll_inputs(running_machine &machine);
@@ -180,7 +171,6 @@ private:
sdl_options &m_options;
watchdog *m_watchdog;
- slider_state * m_sliders;
};
//============================================================
diff --git a/src/osd/sdl/osxutils.h b/src/osd/sdl/osxutils.h
deleted file mode 100644
index 61ec4527cf1..00000000000
--- a/src/osd/sdl/osxutils.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Vas Crabb
-//============================================================
-//
-// osxutils.h - Mac OS X utilities for SDLMAME
-//
-// SDLMAME by Olivier Galibert and R. Belmont
-//
-//============================================================
-
-#ifndef __SDLOSXUTILS__
-#define __SDLOSXUTILS__
-
-//============================================================
-// PROTOTYPES
-//============================================================
-
-void * NewAutoreleasePool(void);
-void ReleaseAutoreleasePool(void *pool);
-
-#endif
diff --git a/src/osd/sdl/osxutils.mm b/src/osd/sdl/osxutils.mm
deleted file mode 100644
index c71af922b59..00000000000
--- a/src/osd/sdl/osxutils.mm
+++ /dev/null
@@ -1,34 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Vas Crabb
-//============================================================
-//
-// osxutils.m - Mac OS X utilities for SDLMAME
-//
-// SDLMAME by Olivier Galibert and R. Belmont
-//
-//============================================================
-
-#import <Foundation/Foundation.h>
-
-// MAMEOS headers
-#import "osxutils.h"
-
-
-//============================================================
-// NewAutoreleasePool
-//============================================================
-
-void * NewAutoreleasePool(void)
-{
- return [[NSAutoreleasePool alloc] init];
-}
-
-
-//============================================================
-// ReleaseAutoreleasePool
-//============================================================
-
-void ReleaseAutoreleasePool(void *pool)
-{
- [(NSAutoreleasePool *)pool release];
-}
diff --git a/src/osd/sdl/output.cpp b/src/osd/sdl/output.cpp
deleted file mode 100644
index f2348f592e2..00000000000
--- a/src/osd/sdl/output.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert, R. Belmont
-//============================================================
-//
-// output.c - Generic implementation of MAME output routines
-//
-//============================================================
-
-#if !defined(SDLMAME_WIN32)
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-// MAME headers
-#include "emu.h"
-
-// MAMEOS headers
-#include "osdsdl.h"
-
-
-
-//============================================================
-// CONSTANTS
-//============================================================
-
-#define SDLMAME_OUTPUT "/tmp/sdlmame_out"
-
-/*
- * Using long/int should be sufficient on all
- * architectures.
- */
-
-
-#ifdef PTR64
-#define PID_FMT "%ld"
-#else
-#define PID_FMT "%d"
-#endif
-
-//============================================================
-// TYPEDEFS
-//============================================================
-
-//============================================================
-// PRIVATE VARIABLES
-//============================================================
-
-static FILE *output;
-
-//============================================================
-// FUNCTION PROTOTYPES
-//============================================================
-
-static void notifier_callback(const char *outname, INT32 value, void *param);
-
-//============================================================
-// osd_get_pid
-//============================================================
-
-intptr_t osd_getpid(void)
-{
- return intptr_t(getpid());
-}
-
-//============================================================
-// output_init
-//============================================================
-
-bool sdl_osd_interface::output_init()
-{
- int fildes;
-
- fildes = open(SDLMAME_OUTPUT, O_RDWR | O_NONBLOCK);
-
- if (fildes < 0)
- {
- output = NULL;
- osd_printf_verbose("output: unable to open output notifier file %s\n", SDLMAME_OUTPUT);
- }
- else
- {
- output = fdopen(fildes, "w");
-
- osd_printf_verbose("output: opened output notifier file %s\n", SDLMAME_OUTPUT);
- fprintf(output, "MAME " PID_FMT " START %s\n", osd_getpid(), this->machine().system().name);
- fflush(output);
- }
-
- machine().output().set_notifier(NULL, notifier_callback, NULL);
- return true;
-}
-
-
-//============================================================
-// winoutput_exit
-//============================================================
-
-void sdl_osd_interface::output_exit()
-{
- if (output != NULL)
- {
- fprintf(output, "MAME " PID_FMT " STOP %s\n", osd_getpid(), machine().system().name);
- fflush(output);
- fclose(output);
- output = NULL;
- osd_printf_verbose("output: closed output notifier file\n");
- }
-}
-
-//============================================================
-// notifier_callback
-//============================================================
-
-static void notifier_callback(const char *outname, INT32 value, void *param)
-{
- if (output != NULL)
- {
- fprintf(output, "OUT " PID_FMT " %s %d\n", osd_getpid(), outname, value);
- fflush(output);
- }
-}
-
-#else /* SDLMAME_WIN32 */
-
-#include "emu.h"
-#include "osdsdl.h"
-#include "emucore.h"
-
-//============================================================
-// Stub for win32
-//============================================================
-
-bool sdl_osd_interface::output_init()
-{
- return true;
-}
-
-void sdl_osd_interface::output_exit()
-{
-}
-
-#endif /* SDLMAME_WIN32 */
diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp
index c2e1479ddd2..270bc714320 100644
--- a/src/osd/sdl/sdlmain.cpp
+++ b/src/osd/sdl/sdlmain.cpp
@@ -198,6 +198,11 @@ int main(int argc, char *argv[])
setvbuf(stdout, (char *) NULL, _IONBF, 0);
setvbuf(stderr, (char *) NULL, _IONBF, 0);
+#if defined(SDLMAME_ANDROID)
+ /* Enable standard application logging */
+ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_VERBOSE);
+#endif
+
// FIXME: this should be done differently
#ifdef SDLMAME_UNIX
@@ -245,7 +250,7 @@ static void output_oslog(const running_machine &machine, const char *buffer)
//============================================================
sdl_osd_interface::sdl_osd_interface(sdl_options &options)
-: osd_common_t(options), m_options(options), m_watchdog(nullptr), m_sliders(nullptr)
+: osd_common_t(options), m_options(options), m_watchdog(nullptr)
{
}
@@ -269,7 +274,7 @@ void sdl_osd_interface::osd_exit()
if (!SDLMAME_INIT_IN_WORKER_THREAD)
{
- SDL_QuitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER );
+ SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER );
}
}
@@ -486,12 +491,7 @@ void sdl_osd_interface::init(running_machine &machine)
if (!SDLMAME_INIT_IN_WORKER_THREAD)
{
-#ifdef SDLMAME_EMSCRIPTEN
- // timer brings in threads which are not supported in Emscripten
- if (SDL_InitSubSystem(SDL_INIT_VIDEO| SDL_INIT_GAMECONTROLLER|SDL_INIT_NOPARACHUTE)) {
-#else
- if (SDL_InitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO| SDL_INIT_GAMECONTROLLER|SDL_INIT_NOPARACHUTE)) {
-#endif
+ if (SDL_InitSubSystem(SDL_INIT_VIDEO)) {
osd_printf_error("Could not initialize SDL %s\n", SDL_GetError());
exit(-1);
}
diff --git a/src/osd/sdl/sdlos_macosx.cpp b/src/osd/sdl/sdlos_macosx.cpp
deleted file mode 100644
index 5afcfdc54eb..00000000000
--- a/src/osd/sdl/sdlos_macosx.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert, R. Belmont
-//============================================================
-//
-// sdlos_*.c - OS specific low level code
-//
-// SDLMAME by Olivier Galibert and R. Belmont
-//
-//============================================================
-
-// standard sdl header
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include <mach/mach.h>
-#include <mach/mach_time.h>
-#include <Carbon/Carbon.h>
-
-#include "sdlinc.h"
-
-// MAME headers
-#include "osdcore.h"
-
-
-//============================================================
-// osd_get_clipboard_text
-//============================================================
-
-char *osd_get_clipboard_text(void)
-{
- OSStatus err;
-
- PasteboardRef pasteboard_ref;
- err = PasteboardCreate(kPasteboardClipboard, &pasteboard_ref);
- if (err)
- return NULL;
-
- PasteboardSynchronize(pasteboard_ref);
-
- ItemCount item_count;
- err = PasteboardGetItemCount(pasteboard_ref, &item_count);
-
- char *result = NULL; // core expects a malloced C string of uft8 data
- for (UInt32 item_index = 1; (item_index <= item_count) && !result; item_index++)
- {
- PasteboardItemID item_id;
- err = PasteboardGetItemIdentifier(pasteboard_ref, item_index, &item_id);
- if (err)
- continue;
-
- CFArrayRef flavor_type_array;
- err = PasteboardCopyItemFlavors(pasteboard_ref, item_id, &flavor_type_array);
- if (err)
- continue;
-
- CFIndex const flavor_count = CFArrayGetCount(flavor_type_array);
- for (CFIndex flavor_index = 0; (flavor_index < flavor_count) && !result; flavor_index++)
- {
- CFStringRef const flavor_type = (CFStringRef)CFArrayGetValueAtIndex(flavor_type_array, flavor_index);
-
- CFStringEncoding encoding;
- if (UTTypeConformsTo(flavor_type, kUTTypeUTF16PlainText))
- encoding = kCFStringEncodingUTF16;
- else if (UTTypeConformsTo (flavor_type, kUTTypeUTF8PlainText))
- encoding = kCFStringEncodingUTF8;
- else if (UTTypeConformsTo (flavor_type, kUTTypePlainText))
- encoding = kCFStringEncodingMacRoman;
- else
- continue;
-
- CFDataRef flavor_data;
- err = PasteboardCopyItemFlavorData(pasteboard_ref, item_id, flavor_type, &flavor_data);
-
- if (!err)
- {
- CFStringRef string_ref = CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, flavor_data, encoding);
- CFDataRef data_ref = CFStringCreateExternalRepresentation (kCFAllocatorDefault, string_ref, kCFStringEncodingUTF8, '?');
- CFRelease(string_ref);
- CFRelease(flavor_data);
-
- CFIndex const length = CFDataGetLength(data_ref);
- CFRange const range = CFRangeMake(0, length);
-
- result = reinterpret_cast<char *>(osd_malloc_array(length + 1));
- if (result)
- {
- CFDataGetBytes(data_ref, range, reinterpret_cast<unsigned char *>(result));
- result[length] = 0;
- }
-
- CFRelease(data_ref);
- }
- }
-
- CFRelease(flavor_type_array);
- }
-
- CFRelease(pasteboard_ref);
-
- return result;
-}
diff --git a/src/osd/sdl/sdlos_unix.cpp b/src/osd/sdl/sdlos_unix.cpp
deleted file mode 100644
index 29bb10c6bdd..00000000000
--- a/src/osd/sdl/sdlos_unix.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert, R. Belmont
-//============================================================
-//
-// sdlos_*.c - OS specific low level code
-//
-// SDLMAME by Olivier Galibert and R. Belmont
-//
-//============================================================
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <time.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#ifdef SDLMAME_EMSCRIPTEN
-#include <emscripten.h>
-#endif
-
-#include "sdlinc.h"
-
-// MAME headers
-#include "osdcore.h"
-
-#ifdef SDLMAME_ANDROID
-char *osd_get_clipboard_text(void)
-{
- return nullptr;
-}
-#else
-//============================================================
-// osd_get_clipboard_text
-//============================================================
-
-char *osd_get_clipboard_text(void)
-{
- char *result = NULL;
-
- if (SDL_HasClipboardText())
- {
- char *temp = SDL_GetClipboardText();
- result = (char *) osd_malloc_array(strlen(temp) + 1);
- strcpy(result, temp);
- SDL_free(temp);
- }
- return result;
-}
-
-#endif
diff --git a/src/osd/sdl/sdlos_win32.cpp b/src/osd/sdl/sdlos_win32.cpp
deleted file mode 100644
index 0de8a374817..00000000000
--- a/src/osd/sdl/sdlos_win32.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert, R. Belmont
-//============================================================
-//
-// sdlos_*.c - OS specific low level code
-//
-// SDLMAME by Olivier Galibert and R. Belmont
-//
-//============================================================
-
-// standard sdl header
-#include "sdlinc.h"
-
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-// MAME headers
-#include "osdcore.h"
-#include "strconv.h"
-
-
-//============================================================
-// get_clipboard_text_by_format
-//============================================================
-
-static char *get_clipboard_text_by_format(UINT format, char *(*convert)(LPCVOID data))
-{
- char *result = NULL;
- HANDLE data_handle;
- LPVOID data;
-
- // check to see if this format is available
- if (IsClipboardFormatAvailable(format))
- {
- // open the clipboard
- if (OpenClipboard(NULL))
- {
- // try to access clipboard data
- data_handle = GetClipboardData(format);
- if (data_handle != NULL)
- {
- // lock the data
- data = GlobalLock(data_handle);
- if (data != NULL)
- {
- // invoke the convert
- result = (*convert)(data);
-
- // unlock the data
- GlobalUnlock(data_handle);
- }
- }
-
- // close out the clipboard
- CloseClipboard();
- }
- }
- return result;
-}
-
-
-//============================================================
-// convert_wide
-//============================================================
-
-static char *convert_wide(LPCVOID data)
-{
- return utf8_from_wstring((LPCWSTR) data);
-}
-
-
-
-//============================================================
-// convert_ansi
-//============================================================
-
-static char *convert_ansi(LPCVOID data)
-{
- return utf8_from_astring((LPCSTR) data);
-}
-
-
-
-//============================================================
-// osd_get_clipboard_text
-//============================================================
-
-char *osd_get_clipboard_text(void)
-{
- char *result = NULL;
-
- // try to access unicode text
- if (result == NULL)
- result = get_clipboard_text_by_format(CF_UNICODETEXT, convert_wide);
-
- // try to access ANSI text
- if (result == NULL)
- result = get_clipboard_text_by_format(CF_TEXT, convert_ansi);
-
- return result;
-}
diff --git a/src/osd/sdl/testkeys.cpp b/src/osd/sdl/testkeys.cpp
deleted file mode 100644
index 0f8157aa524..00000000000
--- a/src/osd/sdl/testkeys.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert, R. Belmont
-//============================================================
-//
-// testkey.c - A small utility to analyze SDL keycodes
-//
-// SDLMAME by Olivier Galibert and R. Belmont
-// testkeys by couriersud
-//
-//============================================================
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <wchar.h>
-
-#include "sdlinc.h"
-
-#include "unicode.h"
-
-struct key_lookup_table
-{
- int code;
- const char *name;
-};
-
-#define KE(x) { SDL_SCANCODE_ ## x, "SDL_SCANCODE_" #x },
-#define KE8(A, B, C, D, E, F, G, H) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) KE(H)
-#define KE7(A, B, C, D, E, F, G) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G)
-#define KE5(A, B, C, D, E) KE(A) KE(B) KE(C) KE(D) KE(E)
-#define KE3(A, B, C) KE(A) KE(B) KE(C)
-
-
-static key_lookup_table sdl_lookup[] =
-{
- KE7(UNKNOWN, BACKSPACE, TAB, CLEAR, RETURN, PAUSE, ESCAPE )
- KE(SPACE)
- KE5(COMMA, MINUS, PERIOD, SLASH, 0 )
- KE8(1, 2, 3, 4, 5, 6, 7, 8 )
- KE5(9, SEMICOLON, EQUALS, PRINTSCREEN, AC_REFRESH)
- KE5(LEFTBRACKET,BACKSLASH, RIGHTBRACKET, A, B )
- KE8(C, D, E, F, G, H, I, J )
- KE8(K, L, M, N, O, P, Q, R )
- KE8(S, T, U, V, W, X, Y, Z )
- KE8(DELETE, KP_0, KP_1, KP_2, KP_3, KP_4, KP_5, KP_6 )
- KE8(KP_7, KP_8, KP_9, KP_PERIOD, KP_DIVIDE, KP_MULTIPLY,KP_MINUS, KP_PLUS )
- KE8(KP_ENTER, KP_EQUALS, UP, DOWN, RIGHT, LEFT, INSERT, HOME )
- KE8(END, PAGEUP, PAGEDOWN, F1, F2, F3, F4, F5 )
- KE8(F6, F7, F8, F9, F10, F11, F12, F13 )
- KE8(F14, F15, NUMLOCKCLEAR, CAPSLOCK, SCROLLLOCK, RSHIFT, LSHIFT, RCTRL )
- KE7(LCTRL, RALT, LALT, LGUI, RGUI, KP_DECIMAL, APPLICATION)
- KE5(MENU, NONUSBACKSLASH, UNDO, APOSTROPHE, GRAVE )
- {-1, ""}
-};
-
-static const char * lookup_key_name(const key_lookup_table *kt, int kc)
-{
- int i=0;
- while (kt[i].code>=0)
- {
- if (kc==kt[i].code)
- return kt[i].name;
- i++;
- }
- return NULL;
-}
-
-#ifdef SDLMAME_WIN32
-int utf8_main(int argc, char *argv[])
-#else
-int main(int argc, char *argv[])
-#endif
-{
- SDL_Event event;
- int quit = 0;
- char lasttext[20] = "";
-
- if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
- fprintf(stderr, "Couldn't initialize SDL: %s\n",
- SDL_GetError());
- exit(1);
- }
- SDL_CreateWindow("Input Test", 0, 0, 100, 100,0 );
- while(SDL_PollEvent(&event) || !quit) {
- switch(event.type) {
- case SDL_QUIT:
- quit = 1;
- break;
- case SDL_KEYDOWN:
- if (event.key.keysym.sym == SDLK_ESCAPE)
- quit=1;
- else
- {
- printf("ITEM_ID_XY %s 0x%x 0x%x %s\n",
- lookup_key_name(sdl_lookup, event.key.keysym.scancode),
- (int) event.key.keysym.scancode,
- (int) event.key.keysym.sym,
- "");
- lasttext[0] = 0;
- }
- break;
- case SDL_KEYUP:
- printf("ITEM_ID_XY %s 0x%x 0x%x %s\n",
- lookup_key_name(sdl_lookup, event.key.keysym.scancode),
- (int) event.key.keysym.scancode,
- (int) event.key.keysym.sym,
- lasttext);
- break;
- case SDL_TEXTINPUT:
- strcpy(lasttext, event.text.text);
- break;
- }
- event.type = 0;
- }
- SDL_Quit();
- return(0);
-}
diff --git a/src/osd/sdl/video.cpp b/src/osd/sdl/video.cpp
index 08938b99511..582836f0c8e 100644
--- a/src/osd/sdl/video.cpp
+++ b/src/osd/sdl/video.cpp
@@ -91,16 +91,6 @@ bool sdl_osd_interface::video_init()
return true;
}
-
-//============================================================
-// get_slider_list
-//============================================================
-
-slider_state *sdl_osd_interface::get_slider_list()
-{
- return m_sliders;
-}
-
//============================================================
// video_exit
//============================================================
@@ -116,6 +106,11 @@ void sdl_osd_interface::video_exit()
// sdlvideo_monitor_refresh
//============================================================
+inline osd_rect SDL_Rect_to_osd_rect(const SDL_Rect &r)
+{
+ return osd_rect(r.x, r.y, r.w, r.h);
+}
+
void sdl_monitor_info::refresh()
{
SDL_DisplayMode dmode;
@@ -294,10 +289,19 @@ static void check_osd_inputs(running_machine &machine)
}
}
+ if (machine.ui_input().pressed(IPT_OSD_2))
+ {
+ //FIXME: on a per window basis
+ video_config.fullstretch = !video_config.fullstretch;
+ window->target()->set_scale_mode(video_config.fullstretch? SCALE_FRACTIONAL : SCALE_INTEGER);
+ machine.ui().popup_time(1, "Uneven stretch %s", video_config.fullstretch? "enabled":"disabled");
+ }
+
if (machine.ui_input().pressed(IPT_OSD_4))
{
//FIXME: on a per window basis
video_config.keepaspect = !video_config.keepaspect;
+ window->target()->set_keepaspect(video_config.keepaspect);
machine.ui().popup_time(1, "Keepaspect %s", video_config.keepaspect? "enabled":"disabled");
}
@@ -333,6 +337,7 @@ void sdl_osd_interface::extract_video_config()
video_config.filter = options().filter();
video_config.keepaspect = options().keep_aspect();
video_config.numscreens = options().numscreens();
+ video_config.fullstretch = options().uneven_stretch();
#ifdef SDLMAME_X11
video_config.restrictonemonitor = !options().use_all_heads();
#endif
diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h
index 307f3a898c9..1c6993c0c0b 100644
--- a/src/osd/sdl/video.h
+++ b/src/osd/sdl/video.h
@@ -15,32 +15,12 @@
#include "modules/osdwindow.h"
//============================================================
-// CONSTANTS
-//============================================================
-
-#define MAX_VIDEO_WINDOWS (4)
-
-#define VIDEO_SCALE_MODE_NONE (0)
-
-#define GLSL_SHADER_MAX 10
-
-//============================================================
// TYPE DEFINITIONS
//============================================================
-inline osd_rect SDL_Rect_to_osd_rect(const SDL_Rect &r)
-{
- return osd_rect(r.x, r.y, r.w, r.h);
-}
-
class sdl_monitor_info : public osd_monitor_info
{
public:
-#if 0
- sdl_monitor_info()
- : m_next(NULL), m_handle(0), m_aspect(0.0f)
- {}
-#endif
sdl_monitor_info(const UINT64 handle, const char *monitor_device, float aspect)
: osd_monitor_info(&m_handle, monitor_device, aspect), m_handle(handle)
{
@@ -56,66 +36,4 @@ private:
UINT64 m_handle; // handle to the monitor
};
-struct osd_video_config
-{
- // global configuration
- int windowed; // start windowed?
- int prescale; // prescale factor
- int keepaspect; // keep aspect ratio
- int numscreens; // number of screens
-
- // hardware options
- int mode; // output mode
- int waitvsync; // spin until vsync
- int syncrefresh; // sync only to refresh rate
- int switchres; // switch resolutions
-
- int fullstretch; // FXIME: implement in windows!
-
- // d3d, accel, opengl
- int filter; // enable filtering
- //int filter; // enable filtering, disabled if glsl_filter>0
-
- // OpenGL options
- int glsl;
- int glsl_filter; // glsl filtering, >0 disables filter
- char * glsl_shader_mamebm[GLSL_SHADER_MAX]; // custom glsl shader set, mame bitmap
- int glsl_shader_mamebm_num; // custom glsl shader set number, mame bitmap
- char * glsl_shader_scrn[GLSL_SHADER_MAX]; // custom glsl shader set, screen bitmap
- int glsl_shader_scrn_num; // custom glsl shader number, screen bitmap
- int pbo;
- int vbo;
- int allowtexturerect; // allow GL_ARB_texture_rectangle, default: no
- int forcepow2texture; // force power of two textures, default: no
-
- // dd, d3d
- int triplebuf; // triple buffer
-
- //============================================================
- // SDL - options
- //============================================================
- int novideo; // don't draw, for pure CPU benchmarking
-
- int centerh;
- int centerv;
-
- // vector options
- float beamwidth; // beam width
-
- // perftest
- int perftest; // print out real video fps
-
- // X11 options
- int restrictonemonitor; // in fullscreen, confine to Xinerama monitor 0
-
- // YUV options
- int scale_mode;
-};
-
-//============================================================
-// GLOBAL VARIABLES
-//============================================================
-
-extern osd_video_config video_config;
-
#endif
diff --git a/src/osd/sdl/watchdog.cpp b/src/osd/sdl/watchdog.cpp
index eaa216dd0f8..8a86464cb56 100644
--- a/src/osd/sdl/watchdog.cpp
+++ b/src/osd/sdl/watchdog.cpp
@@ -21,13 +21,13 @@ static void *watchdog_thread(void *param)
while (TRUE)
{
- if (osd_event_wait(thiz->event(), thiz->getTimeout()))
+ if (thiz->event().wait(thiz->getTimeout()))
{
if (thiz->do_exit())
break;
else
{
- osd_event_reset(thiz->event());
+ thiz->event().reset();
continue;
}
}
@@ -42,9 +42,9 @@ static void *watchdog_thread(void *param)
}
watchdog::watchdog(void)
+: m_event(1,0)
{
m_do_exit = 0;
- m_event = osd_event_alloc(1, 0);
m_thread = new std::thread(watchdog_thread, this);
m_timeout = 60 * osd_ticks_per_second();
}
@@ -52,10 +52,9 @@ watchdog::watchdog(void)
watchdog::~watchdog(void)
{
m_do_exit = 1;
- osd_event_set(m_event);
+ m_event.set();
m_thread->join();
delete m_thread;
- osd_event_free(m_event);
}
void watchdog::setTimeout(int timeout)
diff --git a/src/osd/sdl/watchdog.h b/src/osd/sdl/watchdog.h
index cddba0100ef..9cc2ee03322 100644
--- a/src/osd/sdl/watchdog.h
+++ b/src/osd/sdl/watchdog.h
@@ -20,15 +20,15 @@ public:
watchdog(void);
~watchdog(void);
- void reset() { osd_event_set(m_event); }
+ void reset() { m_event.set(); }
- osd_event * event(void) { return m_event; }
+ osd_event & event(void) { return m_event; }
INT32 do_exit(void) { return m_do_exit; }
osd_ticks_t getTimeout(void) { return m_timeout; }
void setTimeout(int timeout);
private:
- osd_event * m_event;
- std::thread* m_thread;
+ osd_event m_event;
+ std::thread* m_thread;
std::atomic<INT32> m_do_exit;
osd_ticks_t m_timeout;
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 8abf89ce5fc..7cec35d400a 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -89,6 +89,14 @@ sdl_window_info *sdl_window_list;
static sdl_window_info **last_window_ptr;
+class SDL_DM_Wrapper
+{
+public:
+ SDL_DisplayMode mode;
+};
+
+
+
// event handling
static SDL_threadID main_threadid;
static SDL_threadID window_threadid;
@@ -176,7 +184,7 @@ static OSDWORK_CALLBACK(sdlwindow_thread_id)
if (SDLMAME_INIT_IN_WORKER_THREAD)
{
- if (SDL_InitSubSystem(SDL_INIT_TIMER|SDL_INIT_AUDIO| SDL_INIT_VIDEO| SDL_INIT_GAMECONTROLLER|SDL_INIT_NOPARACHUTE))
+ if (SDL_InitSubSystem(SDL_INIT_VIDEO))
{
osd_printf_error("Could not initialize SDL: %s.\n", SDL_GetError());
exit(-1);
@@ -300,33 +308,13 @@ void sdl_osd_interface::update_slider_list()
void sdl_osd_interface::build_slider_list()
{
- m_sliders = nullptr;
- slider_state* full_list = nullptr;
- slider_state* curr = nullptr;
+ m_sliders.clear();
+
for (sdl_window_info *window = sdl_window_list; window != nullptr; window = window->m_next)
{
- // take the sliders of the first window
- slider_state* window_sliders = window->renderer().get_slider_list();
- if (window_sliders == nullptr)
- {
- continue;
- }
-
- if (full_list == nullptr)
- {
- full_list = curr = window_sliders;
- }
- else
- {
- curr->next = window_sliders;
- }
-
- while (curr->next != nullptr) {
- curr = curr->next;
- }
+ std::vector<ui_menu_item> window_sliders = window->renderer().get_slider_list();
+ m_sliders.insert(m_sliders.end(), window_sliders.begin(), window_sliders.end());
}
-
- m_sliders = full_list;
}
//============================================================
@@ -488,7 +476,7 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_toggle_full_screen_wt )
if (window->fullscreen() && (video_config.switchres || is_osx))
{
SDL_SetWindowFullscreen(window->sdl_window(), 0); // Try to set mode
- SDL_SetWindowDisplayMode(window->sdl_window(), &window->m_original_mode); // Try to set mode
+ SDL_SetWindowDisplayMode(window->sdl_window(), &window->m_original_mode->mode); // Try to set mode
SDL_SetWindowFullscreen(window->sdl_window(), SDL_WINDOW_FULLSCREEN); // Try to set mode
}
SDL_DestroyWindow(window->sdl_window());
@@ -623,9 +611,6 @@ int sdl_window_info::window_init()
set_renderer(osd_renderer::make_for_type(video_config.mode, reinterpret_cast<osd_window *>(this)));
- // create an event that we can use to skip blitting
- m_rendered_event = osd_event_alloc(FALSE, TRUE);
-
// load the layout
m_target = m_machine.render().target_alloc();
@@ -673,7 +658,7 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_video_window_destroy_wt )
if (window->fullscreen() && video_config.switchres)
{
SDL_SetWindowFullscreen(window->sdl_window(), 0); // Try to set mode
- SDL_SetWindowDisplayMode(window->sdl_window(), &window->m_original_mode); // Try to set mode
+ SDL_SetWindowDisplayMode(window->sdl_window(), &window->m_original_mode->mode); // Try to set mode
SDL_SetWindowFullscreen(window->sdl_window(), SDL_WINDOW_FULLSCREEN); // Try to set mode
}
SDL_DestroyWindow(window->sdl_window());
@@ -706,9 +691,6 @@ void sdl_window_info::destroy()
// free the render target, after the textures!
this->machine().render().target_free(m_target);
- // free the event
- osd_event_free(m_rendered_event);
-
}
@@ -828,7 +810,7 @@ void sdl_window_info::update()
else
event_wait_ticks = 0;
- if (osd_event_wait(m_rendered_event, event_wait_ticks))
+ if (m_rendered_event.wait(event_wait_ticks))
{
// ensure the target bounds are up-to-date, and then get the primitives
@@ -967,7 +949,7 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt )
SDL_DisplayMode mode;
//SDL_GetCurrentDisplayMode(window().monitor()->handle, &mode);
SDL_GetWindowDisplayMode(window->sdl_window(), &mode);
- window->m_original_mode = mode;
+ window->m_original_mode->mode = mode;
mode.w = temp.width();
mode.h = temp.height();
if (window->m_win_config.refresh)
@@ -1130,7 +1112,7 @@ OSDWORK_CALLBACK( sdl_window_info::draw_video_contents_wt )
}
/* all done, ready for next */
- osd_event_set(window->m_rendered_event);
+ window->m_rendered_event.set();
osd_free(wp);
return nullptr;
@@ -1319,6 +1301,16 @@ osd_dim sdl_window_info::get_min_bounds(int constrain)
return osd_dim(minwidth, minheight);
}
+//============================================================
+// get_size
+//============================================================
+
+osd_dim sdl_window_info::get_size()
+{
+ int w=0; int h=0;
+ SDL_GetWindowSize(m_sdl_window, &w, &h);
+ return osd_dim(w,h);
+}
//============================================================
@@ -1361,3 +1353,37 @@ osd_dim sdl_window_info::get_max_bounds(int constrain)
return maximum.dim();
}
+
+//============================================================
+// construction and destruction
+//============================================================
+
+sdl_window_info::sdl_window_info(running_machine &a_machine, int index, osd_monitor_info *a_monitor,
+ const osd_window_config *config)
+: osd_window(), m_next(NULL),
+ // Following three are used by input code to defer resizes
+ m_resize_width(0),
+ m_resize_height(0),
+ m_last_resize(0),
+ m_minimum_dim(0,0),
+ m_windowed_dim(0,0),
+ m_rendered_event(0, 1), m_target(0),
+ m_sdl_window(NULL),
+ m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0)
+{
+ m_win_config = *config;
+ m_index = index;
+
+ //FIXME: these should be per_window in config-> or even better a bit set
+ m_fullscreen = !video_config.windowed;
+ m_prescale = video_config.prescale;
+
+ m_windowed_dim = osd_dim(config->width, config->height);
+ m_original_mode = global_alloc(SDL_DM_Wrapper);
+}
+
+sdl_window_info::~sdl_window_info()
+{
+ global_free(m_renderer);
+ global_free(m_original_mode);
+}
diff --git a/src/osd/sdl/window.h b/src/osd/sdl/window.h
index 5e3e58f92ed..7a62d3a5925 100644
--- a/src/osd/sdl/window.h
+++ b/src/osd/sdl/window.h
@@ -11,7 +11,6 @@
#ifndef __SDLWINDOW__
#define __SDLWINDOW__
-#include "sdlinc.h"
#include "osdsdl.h"
#include "video.h"
@@ -24,6 +23,10 @@
// TYPE DEFINITIONS
//============================================================
+// forward of SDL_DisplayMode not possible (typedef struct) - define wrapper
+
+class SDL_DM_Wrapper;
+
typedef uintptr_t HashT;
#define OSDWORK_CALLBACK(name) void *name(void *param, ATTR_UNUSED int threadid)
@@ -32,32 +35,9 @@ class sdl_window_info : public osd_window
{
public:
sdl_window_info(running_machine &a_machine, int index, osd_monitor_info *a_monitor,
- const osd_window_config *config)
- : osd_window(), m_next(NULL),
- // Following three are used by input code to defer resizes
- m_resize_width(0),
- m_resize_height(0),
- m_last_resize(0),
- m_minimum_dim(0,0),
- m_windowed_dim(0,0),
- m_rendered_event(0), m_target(0),
- m_sdl_window(NULL),
- m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0)
- {
- m_win_config = *config;
- m_index = index;
-
- //FIXME: these should be per_window in config-> or even better a bit set
- m_fullscreen = !video_config.windowed;
- m_prescale = video_config.prescale;
-
- m_windowed_dim = osd_dim(config->width, config->height);
- }
+ const osd_window_config *config);
- ~sdl_window_info()
- {
- global_free(m_renderer);
- }
+ ~sdl_window_info();
int window_init();
@@ -69,12 +49,7 @@ public:
void notify_changed();
- osd_dim get_size() override
- {
- int w=0; int h=0;
- SDL_GetWindowSize(m_sdl_window, &w, &h);
- return osd_dim(w,h);
- }
+ osd_dim get_size() override;
int xy_to_render_target(int x, int y, int *xt, int *yt);
@@ -106,13 +81,13 @@ private:
osd_dim m_windowed_dim;
// rendering info
- osd_event * m_rendered_event;
+ osd_event m_rendered_event;
render_target * m_target;
// Needs to be here as well so we can identify window
SDL_Window *m_sdl_window;
// Original display_mode
- SDL_DisplayMode m_original_mode;
+ SDL_DM_Wrapper *m_original_mode;
int m_extra_flags;
diff --git a/src/osd/strconv.h b/src/osd/strconv.h
index 6d23d78fbb1..aaab2527d25 100644
--- a/src/osd/strconv.h
+++ b/src/osd/strconv.h
@@ -33,6 +33,17 @@ char *utf8_from_astring(const CHAR *s);
WCHAR *wstring_from_utf8(const char *s);
char *utf8_from_wstring(const WCHAR *s);
+struct osd_wstr_deleter
+{
+ void operator () (wchar_t* wstr)
+ {
+ if (wstr != nullptr)
+ osd_free(wstr);
+ }
+};
+
+typedef std::unique_ptr<wchar_t, osd_wstr_deleter> osd_unique_wstr;
+
#ifdef UNICODE
#define tstring_from_utf8 wstring_from_utf8
#define utf8_from_tstring utf8_from_wstring
diff --git a/src/osd/windows/ledutil.cpp b/src/osd/windows/ledutil.cpp
deleted file mode 100644
index 85c7cca1fe1..00000000000
--- a/src/osd/windows/ledutil.cpp
+++ /dev/null
@@ -1,710 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Aaron Giles,Paul Priest
-//============================================================
-//
-// ledutil.c - Win32 example code that tracks changing
-// outputs and updates the keyboard LEDs in response
-//
-//============================================================
-//
-// This is sample code. To use it as a starting point, you
-// should do the following:
-//
-// 1. Change the CLIENT_ID define to something unique.
-//
-// 2. Change the WINDOW_CLASS and WINDOW_NAME defines to
-// something unique.
-//
-// 3. Delete all the code from the >8 snip 8< comment and
-// downward.
-//
-// 4. Implement the following functions:
-//
-// output_startup - called at app init time
-// output_shutdown - called before the app exits
-// output_mame_start - called when MAME starts
-// output_mame_stop - called when MAME exits
-// output_set_state - called whenever state changes
-//
-//============================================================
-
-// standard windows headers
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <winioctl.h>
-
-// standard C headers
-#include <conio.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-// MAME output header file
-typedef int running_machine;
-#include "osdcomm.h"
-#include "output.h"
-
-
-
-//============================================================
-// DEBUGGING
-//============================================================
-
-// note you need to compile as a console app to have any of
-// these printfs show up
-#define DEBUG_VERSION 0
-
-#if DEBUG_VERSION
-#define DEBUG_PRINTF(x) printf x
-#else
-#define DEBUG_PRINTF(x)
-#endif
-
-
-//============================================================
-// CONSTANTS
-//============================================================
-
-// unique client ID
-#define CLIENT_ID (('M' << 24) | ('L' << 16) | ('E' << 8) | ('D' << 0))
-
-// LED methods
-#define LED_METHOD_PS2 0
-#define LED_METHOD_USB 1
-
-// window parameters
-#define WINDOW_CLASS TEXT("LEDSample")
-#define WINDOW_NAME TEXT("LEDSample")
-
-// window styles
-#define WINDOW_STYLE WS_OVERLAPPEDWINDOW
-#define WINDOW_STYLE_EX 0
-
-// Define the keyboard indicators.
-// (Definitions borrowed from ntddkbd.h)
-
-#define IOCTL_KEYBOARD_SET_INDICATORS CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0002, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_KEYBOARD_QUERY_TYPEMATIC CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_KEYBOARD_QUERY_INDICATORS CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define KEYBOARD_SCROLL_LOCK_ON 1
-#define KEYBOARD_NUM_LOCK_ON 2
-#define KEYBOARD_CAPS_LOCK_ON 4
-
-
-
-//============================================================
-// TYPE DEFINITIONS
-//============================================================
-
-struct KEYBOARD_INDICATOR_PARAMETERS
-{
- USHORT UnitId; // Unit identifier.
- USHORT LedFlags; // LED indicator state.
-};
-
-
-struct id_map_entry
-{
- id_map_entry * next;
- const char * name;
- WPARAM id;
-};
-
-
-
-//============================================================
-// GLOBAL VARIABLES
-//============================================================
-
-static int ledmethod;
-static int original_state;
-static int current_state;
-static int pause_state;
-static HANDLE hKbdDev;
-
-static HWND mame_target;
-static HWND listener_hwnd;
-
-static id_map_entry * idmaplist;
-
-// message IDs
-static UINT om_mame_start;
-static UINT om_mame_stop;
-static UINT om_mame_update_state;
-static UINT om_mame_register_client;
-static UINT om_mame_unregister_client;
-static UINT om_mame_get_id_string;
-
-
-
-//============================================================
-// FUNCTION PROTOTYPES
-//============================================================
-
-static int create_window_class(void);
-static LRESULT CALLBACK listener_window_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam);
-static LRESULT handle_mame_start(WPARAM wparam, LPARAM lparam);
-static LRESULT handle_mame_stop(WPARAM wparam, LPARAM lparam);
-static LRESULT handle_copydata(WPARAM wparam, LPARAM lparam);
-static void reset_id_to_outname_cache(void);
-static const char *map_id_to_outname(WPARAM id);
-static LRESULT handle_update_state(WPARAM wparam, LPARAM lparam);
-
-// these functions provide the meat
-static void output_startup(const char *commandline);
-static void output_mame_start(void);
-static void output_set_state(const char *name, INT32 state);
-static void output_mame_stop(void);
-static void output_shutdown(void);
-
-static int led_get_state(void);
-static void led_set_state(int state);
-
-
-//============================================================
-// main
-//============================================================
-
-int main(int argc, char *argv[])
-{
- const char *arg = (argc > 1) ? argv[1] : "";
- int exitcode = 1;
- HWND otherwnd;
- MSG message;
- int result;
-
- // see if there is another instance of us running
- otherwnd = FindWindow(WINDOW_CLASS, WINDOW_NAME);
-
- // if the argument is "-kill", post a close message
- if (strcmp(arg, "-kill") == 0)
- {
- if (otherwnd != nullptr)
- PostMessage(otherwnd, WM_QUIT, 0, 0);
- return (otherwnd != nullptr) ? 1 : 0;
- }
-
- // if we had another instance, defer to it
- if (otherwnd != nullptr)
- return 0;
-
- // call the startup code
- output_startup(arg);
-
- // create our window class
- result = create_window_class();
- if (result != 0)
- goto error;
-
- // create a window
- listener_hwnd = CreateWindowEx(
- WINDOW_STYLE_EX,
- WINDOW_CLASS,
- WINDOW_NAME,
- WINDOW_STYLE,
- 0, 0,
- 1, 1,
- nullptr,
- nullptr,
- GetModuleHandle(nullptr),
- nullptr);
- if (listener_hwnd == nullptr)
- goto error;
-
- // allocate message ids
- om_mame_start = RegisterWindowMessage(OM_MAME_START);
- if (om_mame_start == 0)
- goto error;
- om_mame_stop = RegisterWindowMessage(OM_MAME_STOP);
- if (om_mame_stop == 0)
- goto error;
- om_mame_update_state = RegisterWindowMessage(OM_MAME_UPDATE_STATE);
- if (om_mame_update_state == 0)
- goto error;
-
- om_mame_register_client = RegisterWindowMessage(OM_MAME_REGISTER_CLIENT);
- if (om_mame_register_client == 0)
- goto error;
- om_mame_unregister_client = RegisterWindowMessage(OM_MAME_UNREGISTER_CLIENT);
- if (om_mame_unregister_client == 0)
- goto error;
- om_mame_get_id_string = RegisterWindowMessage(OM_MAME_GET_ID_STRING);
- if (om_mame_get_id_string == 0)
- goto error;
-
- // see if MAME is already running
- otherwnd = FindWindow(OUTPUT_WINDOW_CLASS, OUTPUT_WINDOW_NAME);
- if (otherwnd != nullptr)
- handle_mame_start((WPARAM)otherwnd, 0);
-
- // process messages
- while (GetMessage(&message, nullptr, 0, 0))
- {
- TranslateMessage(&message);
- DispatchMessage(&message);
- }
-
- // reset on the way out if still live
- if (mame_target != nullptr)
- handle_mame_stop((WPARAM)mame_target, 0);
- exitcode = 0;
-
-error:
- // call the shutdown code
- output_shutdown();
-
- return exitcode;
-}
-
-
-//============================================================
-// create_window_class
-//============================================================
-
-static int create_window_class(void)
-{
- static int classes_created = FALSE;
-
- /* only do this once */
- if (!classes_created)
- {
- WNDCLASS wc = { 0 };
-
- // initialize the description of the window class
- wc.lpszClassName = WINDOW_CLASS;
- wc.hInstance = GetModuleHandle(nullptr);
- wc.lpfnWndProc = listener_window_proc;
-
- // register the class; fail if we can't
- if (!RegisterClass(&wc))
- return 1;
- classes_created = TRUE;
- }
-
- return 0;
-}
-
-
-//============================================================
-// window_proc
-//============================================================
-
-static LRESULT CALLBACK listener_window_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
-{
- // OM_MAME_START: register ourselves with the new MAME (first instance only)
- if (message == om_mame_start)
- return handle_mame_start(wparam, lparam);
-
- // OM_MAME_STOP: no need to unregister, just note that we've stopped caring and reset the LEDs
- else if (message == om_mame_stop)
- return handle_mame_stop(wparam, lparam);
-
- // OM_MAME_UPDATE_STATE: update the state of this item if we care
- else if (message == om_mame_update_state)
- return handle_update_state(wparam, lparam);
-
- // WM_COPYDATA: extract the string and create an ID map entry
- else if (message == WM_COPYDATA)
- return handle_copydata(wparam, lparam);
-
- // everything else is default
- else
- return DefWindowProc(wnd, message, wparam, lparam);
-}
-
-
-//============================================================
-// handle_mame_start
-//============================================================
-
-static LRESULT handle_mame_start(WPARAM wparam, LPARAM lparam)
-{
- DEBUG_PRINTF(("mame_start (%08X)\n", (UINT32)wparam));
-
- // make this the targeted version of MAME
- mame_target = (HWND)wparam;
-
- // initialize the LED states
- output_mame_start();
- reset_id_to_outname_cache();
-
- // register ourselves as a client
- PostMessage(mame_target, om_mame_register_client, (WPARAM)listener_hwnd, CLIENT_ID);
-
- // get the game name
- map_id_to_outname(0);
- return 0;
-}
-
-
-//============================================================
-// handle_mame_stop
-//============================================================
-
-static LRESULT handle_mame_stop(WPARAM wparam, LPARAM lparam)
-{
- DEBUG_PRINTF(("mame_stop (%08X)\n", (UINT32)wparam));
-
- // ignore if this is not the instance we care about
- if (mame_target != (HWND)wparam)
- return 1;
-
- // clear our target out
- mame_target = nullptr;
- reset_id_to_outname_cache();
-
- // reset the LED states
- output_mame_stop();
- return 0;
-}
-
-
-//============================================================
-// handle_copydata
-//============================================================
-
-static LRESULT handle_copydata(WPARAM wparam, LPARAM lparam)
-{
- COPYDATASTRUCT *copydata = (COPYDATASTRUCT *)lparam;
- copydata_id_string *data = (copydata_id_string *)copydata->lpData;
- id_map_entry *entry;
- char *string;
-
- DEBUG_PRINTF(("copydata (%08X)\n", (UINT32)wparam));
-
- // ignore requests we don't care about
- if (mame_target != (HWND)wparam)
- return 1;
-
- // allocate memory
- entry = (id_map_entry *)malloc(sizeof(*entry));
- if (entry == nullptr)
- return 0;
-
- string = (char *)malloc(strlen(data->string) + 1);
- if (string == nullptr)
- {
- free(entry);
- return 0;
- }
-
- // if all allocations worked, make a new entry
- entry->next = idmaplist;
- entry->name = string;
- entry->id = data->id;
-
- // copy the string and hook us into the list
- strcpy(string, data->string);
- idmaplist = entry;
-
- DEBUG_PRINTF((" id %d = '%s'\n", (int)entry->id, entry->name));
-
- return 0;
-}
-
-
-//============================================================
-// reset_id_to_outname_cache
-//============================================================
-
-static void reset_id_to_outname_cache(void)
-{
- // free our ID list
- while (idmaplist != nullptr)
- {
- id_map_entry *temp = idmaplist;
- idmaplist = temp->next;
- free((void*)temp->name);
- free(temp);
- }
-}
-
-
-//============================================================
-// map_id_to_outname
-//============================================================
-
-static const char *map_id_to_outname(WPARAM id)
-{
- id_map_entry *entry;
-
- // see if we have an entry in our map
- for (entry = idmaplist; entry != nullptr; entry = entry->next)
- if (entry->id == id)
- return entry->name;
-
- // no entry yet; we have to ask
- SendMessage(mame_target, om_mame_get_id_string, (WPARAM)listener_hwnd, id);
-
- // now see if we have the entry in our map
- for (entry = idmaplist; entry != nullptr; entry = entry->next)
- if (entry->id == id)
- return entry->name;
-
- // if not, use an empty string
- return "";
-}
-
-
-//============================================================
-// handle_update_state
-//============================================================
-
-static LRESULT handle_update_state(WPARAM wparam, LPARAM lparam)
-{
- DEBUG_PRINTF(("update_state: id=%d state=%d\n", (UINT32)wparam, (UINT32)lparam));
- output_set_state(map_id_to_outname(wparam), lparam);
- return 0;
-}
-
-
-//
-// END BOILERPLATE CODE
-//
-// ------------------------>8 snip 8<-------------------------
-//
-// BEGIN LED-SPECIFIC CODE
-//
-
-
-//============================================================
-// output_startup
-//============================================================
-
-static void output_startup(const char *commandline)
-{
- // default to PS/2, override if USB is specified as a parameter
- ledmethod = LED_METHOD_PS2;
- if (commandline != nullptr && strcmp(commandline, "-usb") == 0)
- ledmethod = LED_METHOD_USB;
-
- // output the method
- switch (ledmethod)
- {
- case LED_METHOD_PS2:
- DEBUG_PRINTF(("Using PS/2 method\n"));
- break;
-
- case LED_METHOD_USB:
- DEBUG_PRINTF(("Using USB method\n"));
- break;
- }
-}
-
-
-//============================================================
-// output_shutdown
-//============================================================
-
-static void output_shutdown(void)
-{
- // nothing to do here
-}
-
-
-//============================================================
-// output_mame_start
-//============================================================
-
-static void output_mame_start(void)
-{
- HRESULT error_number;
-
- // initialize the system based on the method
- switch (ledmethod)
- {
- case LED_METHOD_PS2:
- if (!DefineDosDevice(DDD_RAW_TARGET_PATH, TEXT("Kbd"), TEXT("\\Device\\KeyboardClass0")))
- {
- error_number = GetLastError();
- fprintf(stderr, "Unable to open the keyboard device. (error %d)\n", (UINT32)error_number);
- return;
- }
-
- hKbdDev = CreateFile(TEXT("\\\\.\\Kbd"), GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, 0, nullptr);
- if (hKbdDev == INVALID_HANDLE_VALUE)
- {
- error_number = GetLastError();
- fprintf(stderr, "Unable to open the keyboard device. (error %d)\n", (UINT32)error_number);
- return;
- }
- break;
- }
-
- // remember the initial LED states
- original_state = current_state = led_get_state();
-}
-
-
-//============================================================
-// output_mame_stop
-//============================================================
-
-static void output_mame_stop(void)
-{
- int error_number = 0;
-
- // restore the initial LED states
- led_set_state(original_state);
-
- switch (ledmethod)
- {
- case LED_METHOD_PS2:
- if (!DefineDosDevice(DDD_REMOVE_DEFINITION, TEXT("Kbd"), nullptr))
- {
- error_number = GetLastError();
- fprintf(stderr, "Unable to close the keyboard device. (error %d)\n", error_number);
- return;
- }
- if (!CloseHandle(hKbdDev))
- {
- error_number = GetLastError();
- fprintf(stderr, "Unable to close the keyboard device. (error %d)\n", error_number);
- return;
- }
- break;
- }
-}
-
-
-//============================================================
-// output_set_state
-//============================================================
-
-static void output_set_state(const char *outname, INT32 state)
-{
- // look for pause state
- if (strcmp(outname, "pause") == 0)
- {
- if (state)
- {
- pause_state = led_get_state();
- led_set_state(original_state);
- }
- else
- {
- original_state = led_get_state();
- led_set_state(pause_state);
- }
- }
- // look for LED0/LED1/LED2 states and update accordingly
- else if (strcmp(outname, "led0") == 0)
- led_set_state((current_state & ~1) | (state & 1));
- else if (strcmp(outname, "led1") == 0)
- led_set_state((current_state & ~2) | ((state & 1) << 1));
- else if (strcmp(outname, "led2") == 0)
- led_set_state((current_state & ~4) | ((state & 1) << 2));
-}
-
-
-//============================================================
-// led_get_state
-//============================================================
-
-static int led_get_state(void)
-{
- int result = 0;
-
- switch (ledmethod)
- {
- case LED_METHOD_USB:
- {
- BYTE key_states[256];
-
- // get the current state
- GetKeyboardState(&key_states[0]);
-
- // set the numlock bit
- result |= (key_states[VK_NUMLOCK] & 1);
- result |= (key_states[VK_CAPITAL] & 1) << 1;
- result |= (key_states[VK_SCROLL] & 1) << 2;
- break;
- }
-
- case LED_METHOD_PS2:
- {
- KEYBOARD_INDICATOR_PARAMETERS OutputBuffer; // Output buffer for DeviceIoControl
- ULONG DataLength = sizeof(KEYBOARD_INDICATOR_PARAMETERS);
- ULONG ReturnedLength; // Number of bytes returned in output buffer
-
- // Address first keyboard
- OutputBuffer.UnitId = 0;
-
- DeviceIoControl(hKbdDev, IOCTL_KEYBOARD_QUERY_INDICATORS,
- nullptr, 0,
- &OutputBuffer, DataLength,
- &ReturnedLength, nullptr);
-
- // Demangle lights to match 95/98
- if (OutputBuffer.LedFlags & KEYBOARD_NUM_LOCK_ON) result |= 0x1;
- if (OutputBuffer.LedFlags & KEYBOARD_CAPS_LOCK_ON) result |= 0x2;
- if (OutputBuffer.LedFlags & KEYBOARD_SCROLL_LOCK_ON) result |= 0x4;
- break;
- }
- }
-
- return result;
-}
-
-
-//============================================================
-// led_set_state
-//============================================================
-
-static void led_set_state(int state)
-{
- current_state = state;
-
- switch (ledmethod)
- {
- case LED_METHOD_USB:
- {
- static const BYTE vk[3] = { VK_NUMLOCK, VK_CAPITAL, VK_SCROLL };
- BYTE keyState[256];
- int k;
-
- GetKeyboardState((LPBYTE)&keyState);
- for (k = 0; k < 3; k++)
- {
- if ((((state >> k) & 1) && !(keyState[vk[k]] & 1)) ||
- (!((state >> k) & 1) && (keyState[vk[k]] & 1)))
- {
- // Simulate a key press
- keybd_event(vk[k], 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0);
-
- // Simulate a key release
- keybd_event(vk[k], 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
- }
- }
-
- keyState[VK_NUMLOCK] = (keyState[VK_NUMLOCK] & ~1) | ((state >> 0) & 1);
- keyState[VK_CAPITAL] = (keyState[VK_CAPITAL] & ~1) | ((state >> 1) & 1);
- keyState[VK_SCROLL] = (keyState[VK_SCROLL] & ~1) | ((state >> 2) & 1);
- SetKeyboardState(&keyState[0]);
- break;
- }
-
- case LED_METHOD_PS2:
- {
- KEYBOARD_INDICATOR_PARAMETERS InputBuffer; // Input buffer for DeviceIoControl
- ULONG DataLength = sizeof(KEYBOARD_INDICATOR_PARAMETERS);
- ULONG ReturnedLength; // Number of bytes returned in output buffer
- UINT LedFlags=0;
-
- // Demangle lights to match 95/98
- if (state & 0x1) LedFlags |= KEYBOARD_NUM_LOCK_ON;
- if (state & 0x2) LedFlags |= KEYBOARD_CAPS_LOCK_ON;
- if (state & 0x4) LedFlags |= KEYBOARD_SCROLL_LOCK_ON;
-
- // Address first keyboard
- InputBuffer.UnitId = 0;
- InputBuffer.LedFlags = LedFlags;
- DeviceIoControl(hKbdDev, IOCTL_KEYBOARD_SET_INDICATORS,
- &InputBuffer, DataLength,
- nullptr, 0,
- &ReturnedLength, nullptr);
- break;
- }
- }
-}
diff --git a/src/osd/windows/main.cpp b/src/osd/windows/main.cpp
index ccfddb27a0d..6e7717349bb 100644
--- a/src/osd/windows/main.cpp
+++ b/src/osd/windows/main.cpp
@@ -7,28 +7,24 @@
//============================================================
// standard windows headers
+#ifdef OSD_SDL
+#define _WIN32_WINNT 0x0501
+#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <stdlib.h>
-// MAMEOS headers
#include "strconv.h"
-extern int utf8_main(int argc, char *argv[]);
-
-
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+extern int utf8_main(int argc, char *argv[]);
//============================================================
// main
//============================================================
-// undo the command-line #define that maps main to utf8_main in all other cases
-#ifndef WINUI
-#undef main
-#undef wmain
-#endif
-
+#ifdef UNICODE
extern "C" int _tmain(int argc, TCHAR **argv)
{
int i, rc;
@@ -55,3 +51,19 @@ extern "C" int _tmain(int argc, TCHAR **argv)
return rc;
}
+#endif
+
+#else
+
+#include "winmain.h"
+
+// The main function is only used to initialize our IFrameworkView class.
+[Platform::MTAThread]
+int main(Platform::Array<Platform::String^>^)
+{
+ auto app_source = ref new MameViewSource();
+ Windows::ApplicationModel::Core::CoreApplication::Run(app_source);
+ return 0;
+}
+
+#endif
diff --git a/src/osd/windows/output.cpp b/src/osd/windows/output.cpp
deleted file mode 100644
index ef3c563e3ac..00000000000
--- a/src/osd/windows/output.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
-//============================================================
-//
-// output.c - Win32 implementation of MAME output routines
-//
-//============================================================
-
-// standard windows headers
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-// MAME headers
-#include "emu.h"
-#include "winmain.h"
-// MAMEOS headers
-#include "output.h"
-
-#include "winutil.h"
-
-
-
-//============================================================
-// CONSTANTS
-//============================================================
-
-// window styles
-#define WINDOW_STYLE WS_OVERLAPPEDWINDOW
-#define WINDOW_STYLE_EX 0
-
-
-
-//============================================================
-// TYPEDEFS
-//============================================================
-
-struct registered_client
-{
- registered_client * next; // next client in the list
- LPARAM id; // client-specified ID
- HWND hwnd; // client HWND
- running_machine * machine;
-};
-
-
-
-//============================================================
-// GLOBAL VARIABLES
-//============================================================
-
-// our HWND
-static HWND output_hwnd;
-
-// client list
-static registered_client * clientlist;
-
-// message IDs
-static UINT om_mame_start;
-static UINT om_mame_stop;
-static UINT om_mame_update_state;
-static UINT om_mame_register_client;
-static UINT om_mame_unregister_client;
-static UINT om_mame_get_id_string;
-
-
-
-//============================================================
-// FUNCTION PROTOTYPES
-//============================================================
-
-static int create_window_class(void);
-static LRESULT CALLBACK output_window_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam);
-static LRESULT register_client(running_machine &machine, HWND hwnd, LPARAM id);
-static LRESULT unregister_client(running_machine &machine, HWND hwnd, LPARAM id);
-static LRESULT send_id_string(running_machine &machine, HWND hwnd, LPARAM id);
-static void notifier_callback(const char *outname, INT32 value, void *param);
-
-
-
-//============================================================
-// output_init
-//============================================================
-
-bool windows_osd_interface::output_init()
-{
- int result;
-
- // reset globals
- clientlist = nullptr;
-
- // create our window class
- result = create_window_class();
- assert(result == 0);
- (void)result; // to silence gcc 4.6
-
- // create a window
- output_hwnd = CreateWindowEx(
- WINDOW_STYLE_EX,
- OUTPUT_WINDOW_CLASS,
- OUTPUT_WINDOW_NAME,
- WINDOW_STYLE,
- 0, 0,
- 1, 1,
- nullptr,
- nullptr,
- GetModuleHandleUni(),
- nullptr);
- assert(output_hwnd != nullptr);
-
- // set a pointer to the running machine
- SetWindowLongPtr(output_hwnd, GWLP_USERDATA, (LONG_PTR)&machine());
-
- // allocate message ids
- om_mame_start = RegisterWindowMessage(OM_MAME_START);
- assert(om_mame_start != 0);
- om_mame_stop = RegisterWindowMessage(OM_MAME_STOP);
- assert(om_mame_stop != 0);
- om_mame_update_state = RegisterWindowMessage(OM_MAME_UPDATE_STATE);
- assert(om_mame_update_state != 0);
-
- om_mame_register_client = RegisterWindowMessage(OM_MAME_REGISTER_CLIENT);
- assert(om_mame_register_client != 0);
- om_mame_unregister_client = RegisterWindowMessage(OM_MAME_UNREGISTER_CLIENT);
- assert(om_mame_unregister_client != 0);
- om_mame_get_id_string = RegisterWindowMessage(OM_MAME_GET_ID_STRING);
- assert(om_mame_get_id_string != 0);
-
- // broadcast a startup message
- PostMessage(HWND_BROADCAST, om_mame_start, (WPARAM)output_hwnd, 0);
-
- // register a notifier for output changes
- machine().output().set_notifier(nullptr, notifier_callback, &machine());
-
- return true;
-}
-
-
-//============================================================
-// output_exit
-//============================================================
-
-void windows_osd_interface::output_exit()
-{
- // free all the clients
- while (clientlist != nullptr)
- {
- registered_client *temp = clientlist;
- clientlist = temp->next;
- global_free(temp);
- }
-
- // broadcast a shutdown message
- PostMessage(HWND_BROADCAST, om_mame_stop, (WPARAM)output_hwnd, 0);
-}
-
-
-//============================================================
-// create_window_class
-//============================================================
-
-static int create_window_class(void)
-{
- static UINT8 classes_created = FALSE;
-
- /* only do this once */
- if (!classes_created)
- {
- WNDCLASS wc = { 0 };
-
- // initialize the description of the window class
- wc.lpszClassName = OUTPUT_WINDOW_CLASS;
- wc.hInstance = GetModuleHandleUni();
- wc.lpfnWndProc = output_window_proc;
-
- UnregisterClass(wc.lpszClassName, wc.hInstance);
-
- // register the class; fail if we can't
- if (!RegisterClass(&wc))
- return 1;
- classes_created = TRUE;
- }
-
- return 0;
-}
-
-
-//============================================================
-// output_window_proc
-//============================================================
-
-static LRESULT CALLBACK output_window_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
-{
- LONG_PTR ptr = GetWindowLongPtr(wnd, GWLP_USERDATA);
- running_machine &machine = *(running_machine *)ptr;
-
- // register a new client
- if (message == om_mame_register_client)
- return register_client(machine,(HWND)wparam, lparam);
-
- // unregister a client
- else if (message == om_mame_unregister_client)
- return unregister_client(machine,(HWND)wparam, lparam);
-
- // get a string for an ID
- else if (message == om_mame_get_id_string)
- return send_id_string(machine, (HWND)wparam, lparam);
-
- else
- return DefWindowProc(wnd, message, wparam, lparam);
-}
-
-
-//============================================================
-// register_client
-//============================================================
-
-static LRESULT register_client(running_machine &machine, HWND hwnd, LPARAM id)
-{
- registered_client **client;
-
- // find the end of the list; if we find ourself already registered,
- // return 1
- for (client = &clientlist; *client != nullptr; client = &(*client)->next)
- if ((*client)->id == id)
- {
- (*client)->hwnd = hwnd;
- machine.output().notify_all(notifier_callback, *client);
- return 1;
- }
-
- // add us to the end
- *client = global_alloc(registered_client);
- (*client)->next = nullptr;
- (*client)->id = id;
- (*client)->hwnd = hwnd;
- (*client)->machine = &machine;
-
- // request a notification for all outputs
- machine.output().notify_all(notifier_callback, *client);
- return 0;
-}
-
-
-//============================================================
-// unregister_client
-//============================================================
-
-static LRESULT unregister_client(running_machine &machine, HWND hwnd, LPARAM id)
-{
- registered_client **client;
- int found = FALSE;
-
- // find any matching IDs in the list and remove them
- for (client = &clientlist; *client != nullptr; client = &(*client)->next)
- if ((*client)->id == id)
- {
- registered_client *temp = *client;
- *client = (*client)->next;
- global_free(temp);
- found = TRUE;
- break;
- }
-
- // return an error if not found
- return found ? 0 : 1;
-}
-
-
-//============================================================
-// send_id_string
-//============================================================
-
-static LRESULT send_id_string(running_machine &machine, HWND hwnd, LPARAM id)
-{
- COPYDATASTRUCT copydata;
- const char *name;
- int datalen;
-
- // id 0 is the name of the game
- if (id == 0)
- name = machine.system().name;
- else
- name = machine.output().id_to_name(id);
-
- // a NULL name is an empty string
- if (name == nullptr)
- name = "";
-
- // allocate memory for the message
- datalen = sizeof(copydata_id_string) + strlen(name) + 1;
- dynamic_buffer buffer(datalen);
- copydata_id_string *temp = (copydata_id_string *)&buffer[0];
- temp->id = id;
- strcpy(temp->string, name);
-
- // reply by using SendMessage with WM_COPYDATA
- copydata.dwData = COPYDATA_MESSAGE_ID_STRING;
- copydata.cbData = datalen;
- copydata.lpData = temp;
- SendMessage(hwnd, WM_COPYDATA, (WPARAM)output_hwnd, (LPARAM)&copydata);
-
- return 0;
-}
-
-
-//============================================================
-// notifier_callback
-//============================================================
-
-static void notifier_callback(const char *outname, INT32 value, void *param)
-{
- registered_client *client;
- // loop over clients and notify them
- for (client = clientlist; client != nullptr; client = client->next)
- {
- if (param == nullptr || param == client->machine) {
- PostMessage(client->hwnd, om_mame_update_state, client->machine->output().name_to_id(outname), value);
- }
- }
-}
diff --git a/src/osd/windows/output.h b/src/osd/windows/output.h
deleted file mode 100644
index 9d71332b44b..00000000000
--- a/src/osd/windows/output.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
-//============================================================
-//
-// output.h - Win32 implementation of MAME output routines
-//
-//============================================================
-
-#ifndef __WINDOWS_OUTPUT_H__
-#define __WINDOWS_OUTPUT_H__
-
-
-//============================================================
-// CONSTANTS
-//============================================================
-
-// window parameters
-#define OUTPUT_WINDOW_CLASS TEXT("MAMEOutput")
-#define OUTPUT_WINDOW_NAME TEXT("MAMEOutput")
-
-//
-// These messages are sent by MAME:
-//
-
-// OM_MAME_START: broadcast when MAME initializes
-// WPARAM = HWND of MAME's output window
-// LPARAM = unused
-#define OM_MAME_START TEXT("MAMEOutputStart")
-
-// OM_MAME_STOP: broadcast when MAME shuts down
-// WPARAM = HWND of MAME's output window
-// LPARAM = unused
-#define OM_MAME_STOP TEXT("MAMEOutputStop")
-
-// OM_MAME_UPDATE_STATE: sent to registered clients when the state
-// of an output changes
-// WPARAM = ID of the output
-// LPARAM = new value for the output
-#define OM_MAME_UPDATE_STATE TEXT("MAMEOutputUpdateState")
-
-
-//
-// These messages are sent by external clients to MAME:
-//
-
-// OM_MAME_REGISTER_CLIENT: sent to MAME to register a client
-// WPARAM = HWND of client's listener window
-// LPARAM = client-specified ID (must be unique)
-#define OM_MAME_REGISTER_CLIENT TEXT("MAMEOutputRegister")
-
-// OM_MAME_UNREGISTER_CLIENT: sent to MAME to unregister a client
-// WPARAM = HWND of client's listener window
-// LPARAM = client-specified ID (must match registration)
-#define OM_MAME_UNREGISTER_CLIENT TEXT("MAMEOutputUnregister")
-
-// OM_MAME_GET_ID_STRING: requests the string associated with a
-// given ID. ID=0 is always the name of the game. Other IDs are
-// only discoverable from a OM_MAME_UPDATE_STATE message. The
-// result will be sent back as a WM_COPYDATA message with MAME's
-// output window as the sender, dwData = the ID of the string,
-// and lpData pointing to a NULL-terminated string.
-// WPARAM = HWND of client's listener window
-// LPARAM = ID you wish to know about
-#define OM_MAME_GET_ID_STRING TEXT("MAMEOutputGetIDString")
-
-
-//
-// These constants are used to identify WM_COPYDATA messages
-// coming from MAME:
-//
-
-#define COPYDATA_MESSAGE_ID_STRING 1
-
-
-
-//============================================================
-// TYPE DEFINITIONS
-//============================================================
-
-struct copydata_id_string
-{
- UINT32 id; // ID that was requested
- char string[1]; // string array containing the data
-};
-
-#endif /* __WINDOWS_OUTPUT_H__ */
diff --git a/src/osd/windows/video.cpp b/src/osd/windows/video.cpp
index 559213657da..f6de9222c50 100644
--- a/src/osd/windows/video.cpp
+++ b/src/osd/windows/video.cpp
@@ -62,7 +62,7 @@ static void get_resolution(const char *defdata, const char *data, osd_window_con
//============================================================
// FIXME: Temporary workaround
-static osd_window_config windows[MAX_WINDOWS]; // configuration data per-window
+static osd_window_config windows[MAX_VIDEO_WINDOWS]; // configuration data per-window
bool windows_osd_interface::video_init()
{
@@ -89,15 +89,6 @@ bool windows_osd_interface::video_init()
}
//============================================================
-// get_slider_list
-//============================================================
-
-slider_state *windows_osd_interface::get_slider_list()
-{
- return m_sliders;
-}
-
-//============================================================
// video_exit
//============================================================
diff --git a/src/osd/windows/video.h b/src/osd/windows/video.h
index 9e040d90b78..f47a5260b8e 100644
--- a/src/osd/windows/video.h
+++ b/src/osd/windows/video.h
@@ -14,14 +14,6 @@
#include "modules/osdwindow.h"
//============================================================
-// CONSTANTS
-//============================================================
-
-#define MAX_WINDOWS 4
-
-#define GLSL_SHADER_MAX 10
-
-//============================================================
// TYPE DEFINITIONS
//============================================================
@@ -47,67 +39,9 @@ public:
private:
HMONITOR m_handle; // handle to the monitor
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
MONITORINFOEX m_info; // most recently retrieved info
+#endif
};
-struct osd_video_config
-{
- // global configuration
- int windowed; // start windowed?
- int prescale; // prescale factor
- int keepaspect; // keep aspect ratio
- int numscreens; // number of screens
-
- // hardware options
- int mode; // output mode
- int waitvsync; // spin until vsync
- int syncrefresh; // sync only to refresh rate
- int switchres; // switch resolutions
-
- // d3d, accel, opengl
- int filter; // enable filtering
- //int filter; // enable filtering, disabled if glsl_filter>0
-
- // OpenGL options
- int glsl;
- int glsl_filter; // glsl filtering, >0 disables filter
- char * glsl_shader_mamebm[GLSL_SHADER_MAX]; // custom glsl shader set, mame bitmap
- int glsl_shader_mamebm_num; // custom glsl shader set number, mame bitmap
- char * glsl_shader_scrn[GLSL_SHADER_MAX]; // custom glsl shader set, screen bitmap
- int glsl_shader_scrn_num; // custom glsl shader number, screen bitmap
- int pbo;
- int vbo;
- int allowtexturerect; // allow GL_ARB_texture_rectangle, default: no
- int forcepow2texture; // force power of two textures, default: no
-
- // dd, d3d
- int triplebuf; // triple buffer
-
- //============================================================
- // SDL - options
- //============================================================
- int novideo; // don't draw, for pure CPU benchmarking
-
- int centerh;
- int centerv;
-
- // vector options
- float beamwidth; // beam width
-
- // perftest
- int perftest; // print out real video fps
-
- // X11 options
- int restrictonemonitor; // in fullscreen, confine to Xinerama monitor 0
-
- // YUV options
- int scale_mode;
-};
-
-//============================================================
-// GLOBAL VARIABLES
-//============================================================
-
-extern osd_video_config video_config;
-
#endif
diff --git a/src/osd/windows/winclip.cpp b/src/osd/windows/winclip.cpp
deleted file mode 100644
index 7717f4e6188..00000000000
--- a/src/osd/windows/winclip.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
-//============================================================
-//
-// winclip.c - Win32 OSD core clipboard access functions
-//
-//============================================================
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#include "strconv.h"
-
-//============================================================
-// get_clipboard_text_by_format
-//============================================================
-
-static char *get_clipboard_text_by_format(UINT format, char *(*convert)(LPCVOID data))
-{
- char *result = NULL;
- HANDLE data_handle;
- LPVOID data;
-
- // check to see if this format is available
- if (IsClipboardFormatAvailable(format))
- {
- // open the clipboard
- if (OpenClipboard(NULL))
- {
- // try to access clipboard data
- data_handle = GetClipboardData(format);
- if (data_handle != NULL)
- {
- // lock the data
- data = GlobalLock(data_handle);
- if (data != NULL)
- {
- // invoke the convert
- result = (*convert)(data);
-
- // unlock the data
- GlobalUnlock(data_handle);
- }
- }
-
- // close out the clipboard
- CloseClipboard();
- }
- }
- return result;
-}
-
-//============================================================
-// convert_wide
-//============================================================
-
-static char *convert_wide(LPCVOID data)
-{
- return utf8_from_wstring((LPCWSTR) data);
-}
-
-//============================================================
-// convert_ansi
-//============================================================
-
-static char *convert_ansi(LPCVOID data)
-{
- return utf8_from_astring((LPCSTR) data);
-}
-
-
-
-//============================================================
-// osd_get_clipboard_text
-//============================================================
-
-char *osd_get_clipboard_text(void)
-{
- char *result;
-
- // try to access unicode text
- result = get_clipboard_text_by_format(CF_UNICODETEXT, convert_wide);
-
- // try to access ANSI text
- if (result == NULL)
- result = get_clipboard_text_by_format(CF_TEXT, convert_ansi);
-
- return result;
-}
diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp
index ad8de3d2890..0e30da1b93d 100644
--- a/src/osd/windows/window.cpp
+++ b/src/osd/windows/window.cpp
@@ -272,33 +272,14 @@ int windows_osd_interface::window_count()
void windows_osd_interface::build_slider_list()
{
- m_sliders = nullptr;
- slider_state* full_list = nullptr;
- slider_state* curr = nullptr;
+ m_sliders.clear();
+
for (win_window_info *window = win_window_list; window != nullptr; window = window->m_next)
{
// take the sliders of the first window
- slider_state* window_sliders = window->m_renderer->get_slider_list();
- if (window_sliders == nullptr)
- {
- continue;
- }
-
- if (full_list == nullptr)
- {
- full_list = curr = window_sliders;
- }
- else
- {
- curr->next = window_sliders;
- }
-
- while (curr->next != nullptr) {
- curr = curr->next;
- }
+ std::vector<ui_menu_item> window_sliders = window->m_renderer->get_slider_list();
+ m_sliders.insert(m_sliders.end(), window_sliders.begin(), window_sliders.end());
}
-
- m_sliders = full_list;
}
//============================================================
diff --git a/src/osd/windows/window.h b/src/osd/windows/window.h
index bc3544ba637..b42903b9dff 100644
--- a/src/osd/windows/window.h
+++ b/src/osd/windows/window.h
@@ -57,14 +57,22 @@ public:
virtual bool win_has_menu() override
{
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
return GetMenu(m_hwnd) ? true : false;
+#else
+ return false;
+#endif
}
virtual osd_dim get_size() override
{
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
RECT client;
GetClientRect(m_hwnd, &client);
return osd_dim(client.right - client.left, client.bottom - client.top);
+#else
+ throw ref new Platform::NotImplementedException();
+#endif
}
virtual osd_monitor_info *monitor() const override { return m_monitor; }
diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp
index 55cbde387e6..7249c9ee747 100644
--- a/src/osd/windows/winmain.cpp
+++ b/src/osd/windows/winmain.cpp
@@ -33,6 +33,13 @@
#include "winutil.h"
#include "debugger.h"
#include "winfile.h"
+#include "strconv.h"
+
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+using namespace Windows::ApplicationModel;
+using namespace Windows::ApplicationModel::Core;
+using namespace Windows::UI::Popups;
+#endif
#define DEBUG_SLOW_LOCKS 0
@@ -52,6 +59,8 @@
// TYPE DEFINITIONS
//**************************************************************************
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+
template<typename _FunctionPtr>
class dynamic_bind
{
@@ -217,6 +226,34 @@ public:
}
};
+#else
+
+//============================================================
+// winuniversal_output_error
+//============================================================
+
+class winuniversal_output_error : public osd_output
+{
+public:
+ virtual void output_callback(osd_output_channel channel, const char *msg, va_list args) override
+ {
+ if (channel == OSD_OUTPUT_CHANNEL_ERROR)
+ {
+ char buffer[1024];
+ vsnprintf(buffer, ARRAY_LENGTH(buffer), msg, args);
+
+ osd_unique_wstr wcbuffer(wstring_from_utf8(buffer));
+ osd_unique_wstr wcappname(wstring_from_utf8(emulator_info::get_appname()));
+
+ auto dlg = ref new MessageDialog(ref new Platform::String(wcbuffer.get()), ref new Platform::String(wcappname.get()));
+ dlg->ShowAsync();
+ }
+ else
+ chain_output(channel, msg, args);
+ }
+};
+
+#endif
@@ -231,21 +268,23 @@ int _CRT_glob = 0;
// LOCAL VARIABLES
//**************************************************************************
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
static LPTOP_LEVEL_EXCEPTION_FILTER pass_thru_filter;
-static HANDLE watchdog_reset_event;
-static HANDLE watchdog_exit_event;
-static HANDLE watchdog_thread;
+static sampling_profiler *profiler = nullptr;
+static symbol_manager *symbols = nullptr;
-static running_machine *g_current_machine;
+bool stack_walker::s_initialized = false;
static int timeresult = !TIMERR_NOERROR;
static TIMECAPS timecaps;
+#endif
-static sampling_profiler *profiler = nullptr;
-static symbol_manager *symbols = nullptr;
+static HANDLE watchdog_reset_event;
+static HANDLE watchdog_exit_event;
+static HANDLE watchdog_thread;
-bool stack_walker::s_initialized = false;
+static running_machine *g_current_machine;
//**************************************************************************
@@ -374,6 +413,7 @@ const options_entry windows_options::s_option_entries[] =
// MAIN ENTRY POINT
//**************************************************************************
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
//============================================================
// utf8_main
@@ -432,18 +472,6 @@ int main(int argc, char *argv[])
return result;
}
-
-//============================================================
-// windows_options
-//============================================================
-
-windows_options::windows_options()
-: osd_options()
-{
- add_entries(s_option_entries);
-}
-
-
//============================================================
// control_handler
//============================================================
@@ -453,12 +481,12 @@ static BOOL WINAPI control_handler(DWORD type)
// indicate to the user that we detected something
switch (type)
{
- case CTRL_C_EVENT: fprintf(stderr, "Caught Ctrl+C"); break;
- case CTRL_BREAK_EVENT: fprintf(stderr, "Caught Ctrl+break"); break;
- case CTRL_CLOSE_EVENT: fprintf(stderr, "Caught console close"); break;
- case CTRL_LOGOFF_EVENT: fprintf(stderr, "Caught logoff"); break;
- case CTRL_SHUTDOWN_EVENT: fprintf(stderr, "Caught shutdown"); break;
- default: fprintf(stderr, "Caught unexpected console event"); break;
+ case CTRL_C_EVENT: fprintf(stderr, "Caught Ctrl+C"); break;
+ case CTRL_BREAK_EVENT: fprintf(stderr, "Caught Ctrl+break"); break;
+ case CTRL_CLOSE_EVENT: fprintf(stderr, "Caught console close"); break;
+ case CTRL_LOGOFF_EVENT: fprintf(stderr, "Caught logoff"); break;
+ case CTRL_SHUTDOWN_EVENT: fprintf(stderr, "Caught shutdown"); break;
+ default: fprintf(stderr, "Caught unexpected console event"); break;
}
// if we don't have a machine yet, or if we are handling ctrl+c/ctrl+break,
@@ -480,7 +508,82 @@ static BOOL WINAPI control_handler(DWORD type)
return TRUE;
}
+#else
+
+MameMainApp::MameMainApp()
+{
+}
+
+void MameMainApp::Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView)
+{
+ // Register event handlers for app lifecycle.
+}
+
+// Called when the CoreWindow object is created (or re-created).
+void MameMainApp::SetWindow(Windows::UI::Core::CoreWindow^ window)
+{
+ // Attach event handlers on the window for input, etc.
+}
+
+// Initializes scene resources, or loads a previously saved app state.
+void MameMainApp::Load(Platform::String^ entryPoint)
+{
+}
+
+void MameMainApp::Run()
+{
+ // use small output buffers on non-TTYs (i.e. pipes)
+ if (!isatty(fileno(stdout)))
+ setvbuf(stdout, (char *) nullptr, _IOFBF, 64);
+ if (!isatty(fileno(stderr)))
+ setvbuf(stderr, (char *) nullptr, _IOFBF, 64);
+
+ // parse config and cmdline options
+ m_options = std::make_unique<windows_options>();
+ m_osd = std::make_unique<windows_osd_interface>(m_options);
+
+ // Since we're a GUI app, out errors to message boxes
+ // Initialize this after the osd interface so that we are first in the
+ // output order
+ winuniversal_output_error winerror;
+ osd_output::push(&winerror);
+
+ m_osd->register_options();
+ m_frontend = std::make_unique<cli_frontend>(*m_options.get(), *m_osd.get());
+
+ // To satisfy the latter things, pass in the module path name
+ char exe_path[MAX_PATH];
+ GetModuleFileNameA(NULL, exe_path, MAX_PATH);
+ char* args[2] = { exe_path, (char*)"-verbose" };
+
+ DWORD result = m_frontend->execute(ARRAY_LENGTH(args), args);
+ osd_output::pop(&winerror);
+}
+
+// Required for IFrameworkView.
+void MameMainApp::Uninitialize()
+{
+ // Terminate events do not cause Uninitialize to be called. It will be called if your IFrameworkView
+ // class is torn down while the app is in the foreground.
+}
+
+IFrameworkView^ MameViewSource::CreateView()
+{
+ return ref new MameMainApp();
+}
+#endif
+
+
+//============================================================
+// windows_options
+//============================================================
+
+windows_options::windows_options()
+: osd_options()
+{
+ add_entries(s_option_entries);
+}
//============================================================
@@ -501,7 +604,6 @@ static void output_oslog(const running_machine &machine, const char *buffer)
windows_osd_interface::windows_osd_interface(windows_options &options)
: osd_common_t(options)
, m_options(options)
- , m_sliders(nullptr)
{
}
@@ -592,11 +694,13 @@ void windows_osd_interface::init(running_machine &machine)
if (options.oslog())
machine.add_logerror_callback(output_oslog);
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
// crank up the multimedia timer resolution to its max
// this gives the system much finer timeslices
timeresult = timeGetDevCaps(&timecaps, sizeof(timecaps));
if (timeresult == TIMERR_NOERROR)
timeBeginPeriod(timecaps.wPeriodMin);
+#endif
// if a watchdog thread is requested, create one
int watchdog = options.watchdog();
@@ -611,11 +715,13 @@ void windows_osd_interface::init(running_machine &machine)
}
// create and start the profiler
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
if (profile > 0)
{
profiler = global_alloc(sampling_profiler(1000, profile - 1));
profiler->start();
}
+#endif
// initialize sockets
win_init_sockets();
@@ -652,6 +758,7 @@ void windows_osd_interface::osd_exit()
watchdog_thread = nullptr;
}
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
// stop the profiler
if (profiler != nullptr)
{
@@ -663,43 +770,12 @@ void windows_osd_interface::osd_exit()
// restore the timer resolution
if (timeresult == TIMERR_NOERROR)
timeEndPeriod(timecaps.wPeriodMin);
+#endif
// one last pass at events
winwindow_process_events(machine(), 0, 0);
}
-//============================================================
-// winmain_dump_stack
-//============================================================
-
-void winmain_dump_stack()
-{
- // set up the stack walker
- stack_walker walker;
- if (!walker.reset())
- return;
-
- // walk the stack
- while (walker.unwind())
- fprintf(stderr, " %p: %p%s\n", (void *)walker.frame(), (void *)walker.ip(), (symbols == nullptr) ? "" : symbols->symbol_for_address(walker.ip()));
-}
-
-
-//============================================================
-// check_for_double_click_start
-//============================================================
-
-static int is_double_click_start(int argc)
-{
- STARTUPINFO startup_info = { sizeof(STARTUPINFO) };
-
- // determine our startup information
- GetStartupInfo(&startup_info);
-
- // try to determine if MAME was simply double-clicked
- return (argc <= 1 && startup_info.dwFlags && !(startup_info.dwFlags & STARTF_USESTDHANDLES));
-}
-
//============================================================
// watchdog_thread_entry
@@ -751,6 +827,40 @@ void winmain_watchdog_ping(void)
}
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+
+//============================================================
+// winmain_dump_stack
+//============================================================
+
+void winmain_dump_stack()
+{
+ // set up the stack walker
+ stack_walker walker;
+ if (!walker.reset())
+ return;
+
+ // walk the stack
+ while (walker.unwind())
+ fprintf(stderr, " %p: %p%s\n", (void *)walker.frame(), (void *)walker.ip(), (symbols == nullptr) ? "" : symbols->symbol_for_address(walker.ip()));
+}
+
+
+//============================================================
+// check_for_double_click_start
+//============================================================
+
+static int is_double_click_start(int argc)
+{
+ STARTUPINFO startup_info = { sizeof(STARTUPINFO) };
+
+ // determine our startup information
+ GetStartupInfo(&startup_info);
+
+ // try to determine if MAME was simply double-clicked
+ return (argc <= 1 && startup_info.dwFlags && !(startup_info.dwFlags & STARTF_USESTDHANDLES));
+}
+
//============================================================
// exception_filter
//============================================================
@@ -1559,3 +1669,5 @@ void sampling_profiler::thread_run()
Sleep(1);
}
}
+
+#endif \ No newline at end of file
diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h
index 162c2ada1dd..f4d1a611191 100644
--- a/src/osd/windows/winmain.h
+++ b/src/osd/windows/winmain.h
@@ -9,6 +9,7 @@
#ifndef __WINDOWS_WINMAIN_H__
#define __WINDOWS_WINMAIN_H__
+#include <winapifamily.h>
#include "clifront.h"
#include "osdepend.h"
#include "modules/lib/osdobj_common.h"
@@ -210,8 +211,6 @@ private:
static const options_entry s_option_entries[];
};
-
-
//============================================================
// MACROS
//============================================================
@@ -263,19 +262,15 @@ public:
virtual void update(bool skip_redraw) override;
// video overridables
- virtual slider_state *get_slider_list() override;
-
virtual void customize_input_type_list(simple_list<input_type_entry> &typelist) override;
virtual void video_register() override;
virtual bool video_init() override;
virtual bool window_init() override;
- virtual bool output_init() override;
virtual void video_exit() override;
virtual void window_exit() override;
- virtual void output_exit() override;
void extract_video_config();
@@ -296,12 +291,37 @@ private:
virtual void osd_exit() override;
windows_options & m_options;
- slider_state * m_sliders;
static const int DEFAULT_FONT_HEIGHT = 200;
};
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+
+ref class MameMainApp sealed : public Windows::ApplicationModel::Core::IFrameworkView
+{
+private:
+ std::unique_ptr<windows_options> m_options;
+ std::unique_ptr<windows_osd_interface> m_osd;
+ std::unique_ptr<cli_frontend> m_frontend;
+
+public:
+ MameMainApp();
+
+ // IFrameworkView Methods.
+ virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView);
+ virtual void SetWindow(Windows::UI::Core::CoreWindow^ window);
+ virtual void Load(Platform::String^ entryPoint);
+ virtual void Run();
+ virtual void Uninitialize();
+};
+
+ref class MameViewSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
+{
+public:
+ virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView();
+};
+#endif
//============================================================
// GLOBAL VARIABLES
diff --git a/src/osd/sdl/aueffectutil-Info.plist b/src/tools/aueffectutil-Info.plist
index e5094157c33..e5094157c33 100644
--- a/src/osd/sdl/aueffectutil-Info.plist
+++ b/src/tools/aueffectutil-Info.plist
diff --git a/src/osd/sdl/aueffectutil.mm b/src/tools/aueffectutil.mm
index 531d814e987..531d814e987 100644
--- a/src/osd/sdl/aueffectutil.mm
+++ b/src/tools/aueffectutil.mm
diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp
index 59cce01ad29..e70f1fc13ac 100644
--- a/src/tools/unidasm.cpp
+++ b/src/tools/unidasm.cpp
@@ -110,6 +110,7 @@ CPU_DISASSEMBLE( i960 );
CPU_DISASSEMBLE( ie15 );
CPU_DISASSEMBLE( jaguardsp );
CPU_DISASSEMBLE( jaguargpu );
+CPU_DISASSEMBLE( kb1013vk12 );
CPU_DISASSEMBLE( konami );
CPU_DISASSEMBLE( lh5801 );
CPU_DISASSEMBLE( lr35902 );
@@ -158,7 +159,9 @@ CPU_DISASSEMBLE( sh2 );
CPU_DISASSEMBLE( sh4 );
CPU_DISASSEMBLE( sh4be );
CPU_DISASSEMBLE( sharc );
+CPU_DISASSEMBLE( sm500 );
CPU_DISASSEMBLE( sm510 );
+CPU_DISASSEMBLE( sm511 );
CPU_DISASSEMBLE( sm8500 );
CPU_DISASSEMBLE( spc700 );
CPU_DISASSEMBLE( ssem );
@@ -264,6 +267,7 @@ static const dasm_table_entry dasm_table[] =
{ "ie15", _8bit, 0, CPU_DISASSEMBLE_NAME(ie15) },
{ "jaguardsp", _16be, 0, CPU_DISASSEMBLE_NAME(jaguardsp) },
{ "jaguargpu", _16be, 0, CPU_DISASSEMBLE_NAME(jaguargpu) },
+ { "kb1013vk12", _8bit, 0, CPU_DISASSEMBLE_NAME(kb1013vk12) },
{ "konami", _8bit, 0, CPU_DISASSEMBLE_NAME(konami) },
{ "lh5801", _8bit, 0, CPU_DISASSEMBLE_NAME(lh5801) },
{ "lr35902", _8bit, 0, CPU_DISASSEMBLE_NAME(lr35902) },
@@ -311,7 +315,9 @@ static const dasm_table_entry dasm_table[] =
{ "sh4", _16le, 0, CPU_DISASSEMBLE_NAME(sh4) },
{ "sh4be", _16be, 0, CPU_DISASSEMBLE_NAME(sh4be) },
{ "sharc", _48le, -2, CPU_DISASSEMBLE_NAME(sharc) },
+ { "sm500", _8bit, 0, CPU_DISASSEMBLE_NAME(sm500) },
{ "sm510", _8bit, 0, CPU_DISASSEMBLE_NAME(sm510) },
+ { "sm511", _8bit, 0, CPU_DISASSEMBLE_NAME(sm511) },
{ "sm8500", _8bit, 0, CPU_DISASSEMBLE_NAME(sm8500) },
{ "spc700", _8bit, 0, CPU_DISASSEMBLE_NAME(spc700) },
{ "ssem", _32le, 0, CPU_DISASSEMBLE_NAME(ssem) },